From 2db109ba65cc5c90217efed75ac3c65b914f8da5 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 28 Aug 2020 11:41:49 -0700 Subject: [PATCH 001/168] Increment package version after release of com.azure azure-ai-anomalydetector (#14549) --- eng/jacoco-test-coverage/pom.xml | 2 +- eng/versioning/version_client.txt | 2 +- sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md | 3 +++ sdk/anomalydetector/azure-ai-anomalydetector/pom.xml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index e9e28fc926299..1a46c99bc574a 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -39,7 +39,7 @@ com.azure azure-ai-anomalydetector - 3.0.0-beta.1 + 3.0.0-beta.2 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index bd8287ab39a29..a474c545f184b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -4,7 +4,7 @@ com.azure:azure-sdk-all;1.0.0;1.0.0 com.azure:azure-sdk-parent;1.6.0;1.6.0 com.azure:azure-client-sdk-parent;1.7.0;1.7.0 -com.azure:azure-ai-anomalydetector;1.0.0-beta.1;3.0.0-beta.1 +com.azure:azure-ai-anomalydetector;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-ai-formrecognizer;3.0.0;3.1.0-beta.1 com.azure:azure-ai-textanalytics;5.0.0;5.1.0-beta.1 com.azure:azure-core;1.7.0;1.8.0-beta.1 diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md b/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md index d6fa0436bb8bc..2283b6f8619dc 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md +++ b/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 3.0.0-beta.2 (Unreleased) + + ## 3.0.0-beta.1 (2020-08-27) - Change version to 3.0.0-beta.1 diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml index 2cf591bcf8378..7ce431082b526 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml +++ b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml @@ -11,7 +11,7 @@ com.azure azure-ai-anomalydetector - 3.0.0-beta.1 + 3.0.0-beta.2 Microsoft Azure client library for Anomaly Detector This package contains Microsoft Azure Anomaly Detector client library. From 5843d992409a7db0a26b73caba93d1d7bdd52d23 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Fri, 28 Aug 2020 14:48:32 -0700 Subject: [PATCH 002/168] TA add "opinion mining" new feature (#13333) Added "opinion mining" new feature implementation --- .../azure-ai-textanalytics/CHANGELOG.md | 6 +- .../azure-ai-textanalytics/pom.xml | 6 + .../AnalyzeSentimentAsyncClient.java | 160 +++++++++++- .../TextAnalyticsAsyncClient.java | 155 +++++++++-- .../ai/textanalytics/TextAnalyticsClient.java | 151 +++++++++-- .../TextAnalyticsClientBuilder.java | 6 +- .../textanalytics/implementation/Utility.java | 2 +- .../models/AnalyzeSentimentOptions.java | 73 ++++++ .../textanalytics/models/AspectSentiment.java | 86 +++++++ .../ai/textanalytics/models/MinedOpinion.java | 45 ++++ .../models/OpinionSentiment.java | 97 +++++++ .../models/SentenceSentiment.java | 39 ++- .../models/TextAnalyticsRequestOptions.java | 7 +- .../AnalyzeSentimentWithOpinionMining.java | 56 ++++ ...nalyzeSentimentWithOpinionMiningAsync.java | 68 +++++ ...alyticsAsyncClientJavaDocCodeSnippets.java | 151 +++++++++-- ...extAnalyticsClientJavaDocCodeSnippets.java | 112 +++++++- ...timentBatchDocumentsWithOpinionMining.java | 95 +++++++ ...tBatchDocumentsWithOpinionMiningAsync.java | 105 ++++++++ ...SentimentBatchStringWithOpinionMining.java | 78 ++++++ ...mentBatchStringWithOpinionMiningAsync.java | 100 ++++++++ .../textanalytics/DocumentInputAsyncTest.java | 8 +- .../ai/textanalytics/DocumentInputTest.java | 8 +- .../ReferencePointerParseTest.java | 136 ++++++++++ .../com/azure/ai/textanalytics/TestUtils.java | 147 +++++++---- .../TextAnalyticsAsyncClientTest.java | 240 +++++++++++++++--- .../TextAnalyticsClientTest.java | 231 +++++++++++++---- .../TextAnalyticsClientTestBase.java | 164 ++++++++++-- .../org.mockito.plugins.MockMaker | 1 + .../analyzeSentimentDuplicateIdInput.json | 12 +- ...ShowStatisticsButIncludeOpinionMining.json | 26 ++ ...eSentimentForBatchInputShowStatistics.json | 12 +- ...ShowStatisticsAndIncludeOpinionMining.json | 26 ++ ...utShowStatisticsExcludeOpinionMining.json} | 12 +- ...InputWithNullAnalyzeSentimentOptions.json} | 10 +- ...tForBatchInputWithNullRequestOptions.json} | 12 +- .../analyzeSentimentForBatchStringInput.json | 12 +- .../analyzeSentimentForEmptyText.json | 10 +- .../analyzeSentimentForFaultyText.json | 10 +- ...ShowStatisticsButIncludeOpinionMining.json | 26 ++ ...ShowStatisticsAndIncludeOpinionMining.json | 26 ++ ...ingShowStatisticsExcludeOpinionMining.json | 26 ++ ...entimentForListStringWithLanguageHint.json | 26 ++ .../analyzeSentimentForTextInput.json | 10 +- ...ntForTextInputWithDefaultLanguageHint.json | 26 ++ ...entimentForTextInputWithOpinionMining.json | 26 ++ 46 files changed, 2523 insertions(+), 318 deletions(-) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/AnalyzeSentimentOptions.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/AspectSentiment.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/MinedOpinion.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/OpinionSentiment.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMining.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMiningAsync.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMining.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMining.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMiningAsync.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/ReferencePointerParseTest.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json rename sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/{analyzeSentimentForListStringWithOptions.json => analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json} (84%) rename sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/{analyzeSentimentForBatchInput.json => analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json} (85%) rename sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/{analyzeSentimentForListLanguageHint.json => analyzeSentimentForBatchInputWithNullRequestOptions.json} (82%) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index 53218448ed0fb..c2f904541e273 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -5,9 +5,13 @@ - `offset` is the offset of the text from the start of the document **New features** +- Updated Text Analytics SDK's default service API version to `v3.1-preview.1` from `v3.0`. - Added support for Personally Identifiable Information(PII) entity recognition feature. To use this feature, you need to make sure you are using the service's v3.1-preview.1 API. - +- Added support for the Opinion Mining feature. To use this feature, you need to make sure you are using the +service's v3.1-preview.1 and above API. To get this support pass `includeOpinionMining` as `true` in +`AnalyzeSentimentOptions` when calling the sentiment analysis endpoints. + ## 5.0.0 (2020-07-27) - Re-release of version `1.0.1` with updated version `5.0.0`. diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index 8591f86c20d42..29bb4fcf531ef 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/pom.xml +++ b/sdk/textanalytics/azure-ai-textanalytics/pom.xml @@ -91,5 +91,11 @@ 1.1.0 test + + org.mockito + mockito-core + 3.3.3 + test + diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java index 9dfb8eee2a07c..176c441ec8478 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java @@ -4,18 +4,26 @@ package com.azure.ai.textanalytics; import com.azure.ai.textanalytics.implementation.TextAnalyticsClientImpl; +import com.azure.ai.textanalytics.implementation.Utility; +import com.azure.ai.textanalytics.implementation.models.AspectConfidenceScoreLabel; +import com.azure.ai.textanalytics.implementation.models.AspectRelationType; import com.azure.ai.textanalytics.implementation.models.DocumentError; import com.azure.ai.textanalytics.implementation.models.DocumentSentiment; import com.azure.ai.textanalytics.implementation.models.DocumentSentimentValue; import com.azure.ai.textanalytics.implementation.models.MultiLanguageBatchInput; +import com.azure.ai.textanalytics.implementation.models.SentenceAspect; +import com.azure.ai.textanalytics.implementation.models.SentenceOpinion; import com.azure.ai.textanalytics.implementation.models.SentenceSentimentValue; import com.azure.ai.textanalytics.implementation.models.SentimentConfidenceScorePerLabel; import com.azure.ai.textanalytics.implementation.models.SentimentResponse; import com.azure.ai.textanalytics.implementation.models.WarningCodeValue; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; +import com.azure.ai.textanalytics.models.AspectSentiment; +import com.azure.ai.textanalytics.models.MinedOpinion; +import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.SentimentConfidenceScores; -import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextAnalyticsWarning; import com.azure.ai.textanalytics.models.TextDocumentInput; import com.azure.ai.textanalytics.models.TextSentiment; @@ -30,6 +38,8 @@ import java.util.ArrayList; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; import static com.azure.ai.textanalytics.TextAnalyticsAsyncClient.COGNITIVE_TRACING_NAMESPACE_VALUE; @@ -47,6 +57,7 @@ * Helper class for managing sentiment analysis endpoint. */ class AnalyzeSentimentAsyncClient { + private static final int NEUTRAL_SCORE_ZERO = 0; private final ClientLogger logger = new ClientLogger(AnalyzeSentimentAsyncClient.class); private final TextAnalyticsClientImpl service; @@ -65,12 +76,16 @@ class AnalyzeSentimentAsyncClient { * which contains {@link AnalyzeSentimentResultCollection}. * * @param documents The list of documents to analyze sentiments for. - * @param options The {@link TextAnalyticsRequestOptions} request options. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. * * @return A mono {@link Response} contains {@link AnalyzeSentimentResultCollection}. + * + * @throws NullPointerException if {@code documents} is null. + * @throws IllegalArgumentException if {@code documents} is empty. */ public Mono> analyzeSentimentBatch( - Iterable documents, TextAnalyticsRequestOptions options) { + Iterable documents, AnalyzeSentimentOptions options) { try { inputDocumentsValidation(documents); return withContext(context -> getAnalyzedSentimentResponse(documents, options, context)); @@ -84,13 +99,14 @@ public Mono> analyzeSentimentBatch( * which contains {@link AnalyzeSentimentResultCollection}. * * @param documents The list of documents to analyze sentiments for. - * @param options The {@link TextAnalyticsRequestOptions} request options. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. * @param context Additional context that is passed through the Http pipeline during the service call. * * @return A mono {@link Response} contains {@link AnalyzeSentimentResultCollection}. */ Mono> analyzeSentimentBatchWithContext( - Iterable documents, TextAnalyticsRequestOptions options, Context context) { + Iterable documents, AnalyzeSentimentOptions options, Context context) { try { inputDocumentsValidation(documents); return getAnalyzedSentimentResponse(documents, options, context); @@ -111,8 +127,9 @@ private Response toAnalyzeSentimentResultColle Response response) { final SentimentResponse sentimentResponse = response.getValue(); final List analyzeSentimentResults = new ArrayList<>(); - for (DocumentSentiment documentSentiment : sentimentResponse.getDocuments()) { - analyzeSentimentResults.add(convertToAnalyzeSentimentResult(documentSentiment)); + final List documentSentiments = sentimentResponse.getDocuments(); + for (DocumentSentiment documentSentiment : documentSentiments) { + analyzeSentimentResults.add(convertToAnalyzeSentimentResult(documentSentiment, documentSentiments)); } for (DocumentError documentError : sentimentResponse.getErrors()) { analyzeSentimentResults.add(new AnalyzeSentimentResult(documentError.getId(), null, @@ -127,10 +144,12 @@ private Response toAnalyzeSentimentResultColle * Helper method to convert the service response of {@link DocumentSentiment} to {@link AnalyzeSentimentResult}. * * @param documentSentiment The {@link DocumentSentiment} returned by the service. + * @param documentSentimentList The document sentiment list returned by the service. * * @return The {@link AnalyzeSentimentResult} to be returned by the SDK. */ - private AnalyzeSentimentResult convertToAnalyzeSentimentResult(DocumentSentiment documentSentiment) { + private AnalyzeSentimentResult convertToAnalyzeSentimentResult(DocumentSentiment documentSentiment, + List documentSentimentList) { // Document text sentiment final SentimentConfidenceScorePerLabel confidenceScorePerLabel = documentSentiment.getConfidenceScores(); // Sentence text sentiment @@ -141,8 +160,10 @@ private AnalyzeSentimentResult convertToAnalyzeSentimentResult(DocumentSentiment final SentenceSentimentValue sentenceSentimentValue = sentenceSentiment.getSentiment(); return new SentenceSentiment(sentenceSentiment.getText(), TextSentiment.fromString(sentenceSentimentValue == null ? null : sentenceSentimentValue.toString()), + toMinedOpinionList(sentenceSentiment, documentSentimentList), new SentimentConfidenceScores(confidenceScorePerSentence.getNegative(), - confidenceScorePerSentence.getNeutral(), confidenceScorePerSentence.getPositive())); + confidenceScorePerSentence.getNeutral(), confidenceScorePerSentence.getPositive()) + ); }).collect(Collectors.toList()); // Warnings @@ -175,24 +196,135 @@ private AnalyzeSentimentResult convertToAnalyzeSentimentResult(DocumentSentiment * {@link AnalyzeSentimentResultCollection} from a {@link SimpleResponse} of {@link SentimentResponse}. * * @param documents A list of documents to be analyzed. - * @param options The {@link TextAnalyticsRequestOptions} request options. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. * @param context Additional context that is passed through the Http pipeline during the service call. * * @return A mono {@link Response} contains {@link AnalyzeSentimentResultCollection}. */ private Mono> getAnalyzedSentimentResponse( - Iterable documents, TextAnalyticsRequestOptions options, Context context) { - // TODO: add opinion mining in the following PR + Iterable documents, AnalyzeSentimentOptions options, Context context) { return service.sentimentWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), - null, + options == null ? null : options.isIncludeOpinionMining(), context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Analyzed sentiment for a batch of documents - {}", response)) .doOnError(error -> logger.warning("Failed to analyze sentiment - {}", error)) .map(this::toAnalyzeSentimentResultCollectionResponse) - .onErrorMap(throwable -> mapToHttpResponseExceptionIfExist(throwable)); + .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); + } + + /* + * Transform SentenceSentiment's opinion mining to output that user can use. + */ + private IterableStream toMinedOpinionList( + com.azure.ai.textanalytics.implementation.models.SentenceSentiment sentenceSentiment, + List documentSentimentList) { + // If include opinion mining indicator is false, the service return null for the aspect list. + final List sentenceAspects = sentenceSentiment.getAspects(); + if (sentenceAspects == null) { + return null; + } + final List minedOpinions = new ArrayList<>(); + sentenceAspects.forEach(sentenceAspect -> { + final List opinionSentiments = new ArrayList<>(); + sentenceAspect.getRelations().forEach(aspectRelation -> { + final AspectRelationType aspectRelationType = aspectRelation.getRelationType(); + final String opinionPointer = aspectRelation.getRef(); + if (AspectRelationType.OPINION == aspectRelationType) { + opinionSentiments.add(toOpinionSentiment( + findSentimentOpinion(opinionPointer, documentSentimentList))); + } + }); + + minedOpinions.add(new MinedOpinion( + new AspectSentiment(sentenceAspect.getText(), + TextSentiment.fromString(sentenceAspect.getSentiment().toString()), + sentenceAspect.getOffset(), sentenceAspect.getLength(), + toSentimentConfidenceScores(sentenceAspect.getConfidenceScores())), + new IterableStream<>(opinionSentiments))); + }); + + return new IterableStream<>(minedOpinions); + } + + /* + * Transform type AspectConfidenceScoreLabel to SentimentConfidenceScores. + */ + private SentimentConfidenceScores toSentimentConfidenceScores( + AspectConfidenceScoreLabel aspectConfidenceScoreLabel) { + return new SentimentConfidenceScores(aspectConfidenceScoreLabel.getNegative(), NEUTRAL_SCORE_ZERO, + aspectConfidenceScoreLabel.getPositive()); + } + + /* + * Transform type SentenceOpinion to OpinionSentiment. + */ + private OpinionSentiment toOpinionSentiment(SentenceOpinion sentenceOpinion) { + return new OpinionSentiment(sentenceOpinion.getText(), + TextSentiment.fromString(sentenceOpinion.getSentiment().toString()), + sentenceOpinion.getOffset(), sentenceOpinion.getLength(), sentenceOpinion.isNegated(), + toSentimentConfidenceScores(sentenceOpinion.getConfidenceScores())); + } + + /* + * Parses the reference pointer to an index array that contains document, sentence, and opinion indexes. + */ + int[] parseRefPointerToIndexArray(String opinionPointer) { + // The pattern always start with character '#', the opinion index will existing in specified sentence, which + // is under specified document. + // example: #/documents/0/sentences/0/opinions/0 + final String patternRegex = "#/documents/(\\d+)/sentences/(\\d+)/opinions/(\\d+)"; + final Pattern pattern = Pattern.compile(patternRegex); + final Matcher matcher = pattern.matcher(opinionPointer); + final boolean isMatched = matcher.find(); + + // The first index represents the document index, second one represents the sentence index, + // third ond represents the opinion index. + final int[] result = new int[3]; + + if (isMatched) { + String[] segments = opinionPointer.split("/"); + result[0] = Integer.parseInt(segments[2]); + result[1] = Integer.parseInt(segments[4]); + result[2] = Integer.parseInt(segments[6]); + } else { + throw logger.logExceptionAsError(new IllegalStateException( + String.format("'%s' is not a valid opinion pointer.", opinionPointer))); + } + + return result; + } + + /* + * Find the specific sentence opinion in the document sentiment list by given the opinion reference pointer. + */ + SentenceOpinion findSentimentOpinion(String opinionPointer, List documentSentiments) { + final int[] opinionIndexes = parseRefPointerToIndexArray(opinionPointer); + final int documentIndex = opinionIndexes[0]; + final int sentenceIndex = opinionIndexes[1]; + final int opinionIndex = opinionIndexes[2]; + if (documentIndex >= documentSentiments.size()) { + throw logger.logExceptionAsError(new IllegalStateException( + String.format("Invalid document index '%s' in '%s'.", documentIndex, opinionPointer))); + } + final DocumentSentiment documentsentiment = documentSentiments.get(documentIndex); + + final List sentenceSentiments = + documentsentiment.getSentences(); + if (sentenceIndex >= sentenceSentiments.size()) { + throw logger.logExceptionAsError(new IllegalStateException( + String.format("Invalid sentence index '%s' in '%s'.", sentenceIndex, opinionPointer))); + } + + final List opinions = sentenceSentiments.get(sentenceIndex).getOpinions(); + if (opinionIndex >= opinions.size()) { + throw logger.logExceptionAsError(new IllegalStateException( + String.format("Invalid opinion index '%s' in '%s'.", opinionIndex, opinionPointer))); + } + return opinions.get(opinionIndex); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClient.java index 4b409506aeb24..a41dc79c274ae 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClient.java @@ -4,6 +4,7 @@ package com.azure.ai.textanalytics; import com.azure.ai.textanalytics.implementation.TextAnalyticsClientImpl; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; import com.azure.ai.textanalytics.models.CategorizedEntityCollection; import com.azure.ai.textanalytics.models.DetectLanguageInput; @@ -130,7 +131,7 @@ public String getDefaultLanguage() { * * @return A {@link Mono} containing the {@link DetectedLanguage detected language} of the document. * - * @throws NullPointerException if the document is {@code null}. + * @throws NullPointerException if the document is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -157,7 +158,7 @@ public Mono detectLanguage(String document) { * * @return A {@link Mono} contains a {@link DetectedLanguage detected language} of the document. * - * @throws NullPointerException if the document is {@code null}. + * @throws NullPointerException if the document is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -203,7 +204,7 @@ public Mono detectLanguage(String document, String countryHint * * @return A {@link Mono} contains a {@link DetectLanguageResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono detectLanguageBatch( @@ -239,7 +240,7 @@ public Mono detectLanguageBatch( * * @return A {@link Mono} contains a {@link Response} which contains a {@link DetectLanguageResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> detectLanguageBatchWithResponse( @@ -271,7 +272,7 @@ public Mono> detectLanguageBatchWithRes * * @return A {@link Mono} contains a {@link CategorizedEntityCollection recognized categorized entities collection}. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -299,7 +300,7 @@ public Mono recognizeEntities(String document) { * * @return A {@link Mono} contains a {@link CategorizedEntityCollection recognized categorized entities collection}. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -327,7 +328,7 @@ public Mono recognizeEntities(String document, Stri * * @return A {@link Mono} contains a {@link RecognizeEntitiesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono recognizeEntitiesBatch( @@ -362,7 +363,7 @@ public Mono recognizeEntitiesBatch( * * @return A {@link Mono} contains a {@link Response} which contains a {@link RecognizeEntitiesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> recognizeEntitiesBatchWithResponse( @@ -516,7 +517,7 @@ public Mono> recognizePiiEntities * * @return A {@link Mono} contains a {@link LinkedEntityCollection recognized linked entities collection}. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -541,7 +542,7 @@ public Mono recognizeLinkedEntities(String document) { * * @return A {@link Mono} contains a {@link LinkedEntityCollection recognized linked entities collection}. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -570,7 +571,7 @@ public Mono recognizeLinkedEntities(String document, Str * * @return A {@link Mono} contains a {@link RecognizeLinkedEntitiesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono recognizeLinkedEntitiesBatch( @@ -607,7 +608,7 @@ public Mono recognizeLinkedEntitiesBatc * @return A {@link Mono} contains a {@link Response} which contains a * {@link RecognizeLinkedEntitiesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> @@ -636,7 +637,7 @@ public Mono recognizeLinkedEntitiesBatc * * @return A {@link Mono} contains a {@link KeyPhrasesCollection}. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -662,7 +663,7 @@ public Mono extractKeyPhrases(String document) { * * @return A {@link Mono} contains a {@link KeyPhrasesCollection} * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -691,7 +692,7 @@ public Mono extractKeyPhrases(String document, String lang * * @return A {@link Mono} contains a {@link ExtractKeyPhrasesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono extractKeyPhrasesBatch( @@ -726,7 +727,7 @@ public Mono extractKeyPhrasesBatch( * * @return A {@link Mono} contains a {@link Response} that contains a {@link ExtractKeyPhrasesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> extractKeyPhrasesBatchWithResponse( @@ -744,7 +745,8 @@ public Mono> extractKeyPhrasesBatchW * {@link TextAnalyticsClientBuilder#defaultLanguage(String)}. If none is specified, service will use 'en' as * the language. * - *

Analyze sentiment in a list of documents. Subscribes to the call asynchronously and prints out the + *

Code Sample

+ *

Analyze the sentiment in a document. Subscribes to the call asynchronously and prints out the * sentiment details when a response is received.

* * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#string} @@ -755,7 +757,7 @@ public Mono> extractKeyPhrasesBatchW * * @return A {@link Mono} contains the {@link DocumentSentiment analyzed document sentiment} of the document. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -767,10 +769,11 @@ public Mono analyzeSentiment(String document) { * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and * Neutral) for the document and each sentence within it. * - *

Analyze sentiment in a list of documents. Subscribes to the call asynchronously and prints out the - * sentiment details when a response is received.

+ *

Code Sample

+ *

Analyze the sentiments in a document with a provided language representation. Subscribes to the call + * asynchronously and prints out the sentiment details when a response is received.

* - * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#string-string} + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#String-String} * * @param document The document to be analyzed. * For text length limits, maximum batch size, and supported text encoding, see @@ -780,14 +783,46 @@ public Mono analyzeSentiment(String document) { * * @return A {@link Mono} contains the {@link DocumentSentiment analyzed document sentiment} of the document. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono analyzeSentiment(String document, String language) { + return analyzeSentiment(document, language, null); + } + + /** + * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and + * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of + * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the + * opinions of a sentence and conducts more granular analysis around the aspects in the text + * (also known as aspect-based sentiment analysis). + * + *

Code Sample

+ *

Analyze the sentiment and mine the opinions for each sentence in a document with a provided language + * representation and {@link AnalyzeSentimentOptions} options. Subscribes to the call asynchronously and prints + * out the sentiment and mined opinions details when a response is received.

+ * + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#String-String-AnalyzeSentimentOptions} + * + * @param document The document to be analyzed. + * For text length limits, maximum batch size, and supported text encoding, see + * data limits. + * @param language The 2 letter ISO 639-1 representation of language for the text. If not set, uses "en" for + * English as default. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. + * + * @return A {@link Mono} contains the {@link DocumentSentiment analyzed document sentiment} of the document. + * + * @throws NullPointerException if {@code document} is null. + * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono analyzeSentiment(String document, String language, AnalyzeSentimentOptions options) { try { Objects.requireNonNull(document, "'document' cannot be null."); - return analyzeSentimentBatch(Collections.singletonList(document), language, null) + return analyzeSentimentBatch(Collections.singletonList(document), language, options) .map(sentimentResultCollection -> { DocumentSentiment documentSentiment = null; for (AnalyzeSentimentResult sentimentResult : sentimentResultCollection) { @@ -824,11 +859,47 @@ public Mono analyzeSentiment(String document, String language * * @return A {@link Mono} contains a {@link AnalyzeSentimentResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. + * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono analyzeSentimentBatch( Iterable documents, String language, TextAnalyticsRequestOptions options) { + return analyzeSentimentBatch(documents, language, new AnalyzeSentimentOptions() + .setIncludeStatistics(options == null ? false : options.isIncludeStatistics()) + .setModelVersion(options == null ? null : options.getModelVersion())); + } + + /** + * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and + * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of + * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the + * opinions of a sentence and conducts more granular analysis around the aspects in the text + * (also known as aspect-based sentiment analysis). + * + *

Code Sample

+ *

Analyze the sentiments and mine the opinions for each sentence in a list of documents with a provided language + * representation and {@link AnalyzeSentimentOptions} options. Subscribes to the call asynchronously and prints out + * the sentiment and mined opinions details when a response is received.

+ * + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-String-AnalyzeSentimentOptions} + * + * @param documents A list of documents to be analyzed. + * For text length limits, maximum batch size, and supported text encoding, see + * data limits. + * @param language The 2 letter ISO 639-1 representation of language for the document. If not set, uses "en" for + * English as default. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. + * + * @return A {@link Mono} contains a {@link AnalyzeSentimentResultCollection}. + * + * @throws NullPointerException if {@code documents} is null. + * @throws IllegalArgumentException if {@code documents} is empty. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono analyzeSentimentBatch(Iterable documents, + String language, AnalyzeSentimentOptions options) { try { return analyzeSentimentBatchWithResponse( mapByIndex(documents, (index, value) -> { @@ -858,11 +929,45 @@ public Mono analyzeSentimentBatch( * * @return A {@link Mono} contains a {@link Response} that contains a {@link AnalyzeSentimentResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. + * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> analyzeSentimentBatchWithResponse( Iterable documents, TextAnalyticsRequestOptions options) { + return analyzeSentimentAsyncClient.analyzeSentimentBatch(documents, new AnalyzeSentimentOptions() + .setIncludeStatistics(options == null ? false : options.isIncludeStatistics()) + .setModelVersion(options == null ? null : options.getModelVersion())); + } + + /** + * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and + * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of + * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the + * opinions of a sentence and conducts more granular analysis around the aspects in the text + * (also known as aspect-based sentiment analysis). + * + *

Code Sample

+ *

Analyze sentiment and mine the opinions for each sentence in a list of + * {@link TextDocumentInput document} with provided {@link AnalyzeSentimentOptions} options. Subscribes to the call + * asynchronously and prints out the sentiment and mined opinions details when a response is received.

+ * + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-AnalyzeSentimentOptions} + * + * @param documents A list of {@link TextDocumentInput documents} to be analyzed. + * For text length limits, maximum batch size, and supported text encoding, see + * data limits. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. + * + * @return A {@link Mono} contains a {@link Response} that contains a {@link AnalyzeSentimentResultCollection}. + * + * @throws NullPointerException if {@code documents} is null. + * @throws IllegalArgumentException if {@code documents} is empty. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> analyzeSentimentBatchWithResponse( + Iterable documents, AnalyzeSentimentOptions options) { return analyzeSentimentAsyncClient.analyzeSentimentBatch(documents, options); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java index 01508a1e2a3f1..360baf9aacaff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java @@ -3,6 +3,7 @@ package com.azure.ai.textanalytics; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; import com.azure.ai.textanalytics.models.CategorizedEntity; import com.azure.ai.textanalytics.models.CategorizedEntityCollection; import com.azure.ai.textanalytics.models.DetectLanguageInput; @@ -94,7 +95,7 @@ public String getDefaultLanguage() { * * @return The {@link DetectedLanguage detected language} of the document. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public DetectedLanguage detectLanguage(String document) { @@ -118,7 +119,7 @@ public DetectedLanguage detectLanguage(String document) { * * @return The {@link DetectedLanguage detected language} of the document. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public DetectedLanguage detectLanguage(String document, String countryHint) { @@ -143,7 +144,7 @@ public DetectedLanguage detectLanguage(String document, String countryHint) { * * @return A {@link DetectLanguageResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -170,7 +171,7 @@ public DetectLanguageResultCollection detectLanguageBatch( * * @return A {@link Response} that contains a {@link DetectLanguageResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -201,7 +202,7 @@ public Response detectLanguageBatchWithResponse( * @return A {@link CategorizedEntityCollection} contains a list of * {@link CategorizedEntity recognized categorized entities} and warnings. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -227,7 +228,7 @@ public CategorizedEntityCollection recognizeEntities(String document) { * @return The {@link CategorizedEntityCollection} contains a list of * {@link CategorizedEntity recognized categorized entities} and warnings. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -253,7 +254,7 @@ public CategorizedEntityCollection recognizeEntities(String document, String lan * * @return A {@link RecognizeEntitiesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -281,7 +282,7 @@ public RecognizeEntitiesResultCollection recognizeEntitiesBatch( * * @return A {@link Response} that contains a {@link RecognizeEntitiesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -423,7 +424,7 @@ public Response recognizePiiEntitiesBatchW * * @return A {@link LinkedEntityCollection} contains a list of {@link LinkedEntity recognized linked entities}. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -449,7 +450,7 @@ public LinkedEntityCollection recognizeLinkedEntities(String document) { * * @return A {@link LinkedEntityCollection} contains a list of {@link LinkedEntity recognized linked entities}. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -479,7 +480,7 @@ public LinkedEntityCollection recognizeLinkedEntities(String document, String la * * @return A {@link RecognizeLinkedEntitiesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -509,7 +510,7 @@ public RecognizeLinkedEntitiesResultCollection recognizeLinkedEntitiesBatch( * * @return A {@link Response} that contains a {@link RecognizeLinkedEntitiesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -539,7 +540,7 @@ public RecognizeLinkedEntitiesResultCollection recognizeLinkedEntitiesBatch( * * @return A {@link KeyPhrasesCollection} contains a list of extracted key phrases. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -563,7 +564,7 @@ public KeyPhrasesCollection extractKeyPhrases(String document) { * * @return A {@link KeyPhrasesCollection} contains a list of extracted key phrases. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -592,7 +593,7 @@ public KeyPhrasesCollection extractKeyPhrases(String document, String language) * * @return A {@link ExtractKeyPhrasesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -621,7 +622,7 @@ public ExtractKeyPhrasesResultCollection extractKeyPhrasesBatch( * * @return A {@link Response} that contains a {@link ExtractKeyPhrasesResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -635,7 +636,7 @@ public Response extractKeyPhrasesBatchWithRes // Sentiment /** * Returns a sentiment prediction, as well as confidence scores for each sentiment label - * (Positive, Negative, and Neutral) for the document and each sentence within i + * (Positive, Negative, and Neutral) for the document and each sentence within it. * * This method will use the default language that can be set by using method * {@link TextAnalyticsClientBuilder#defaultLanguage(String)}. If none is specified, service will use 'en' as @@ -643,6 +644,7 @@ public Response extractKeyPhrasesBatchWithRes * *

Code Sample

*

Analyze the sentiments of documents

+ * * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String} * * @param document The document to be analyzed. @@ -651,7 +653,7 @@ public Response extractKeyPhrasesBatchWithRes * * @return A {@link DocumentSentiment analyzed document sentiment} of the document. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -661,10 +663,11 @@ public DocumentSentiment analyzeSentiment(String document) { /** * Returns a sentiment prediction, as well as confidence scores for each sentiment label - * (Positive, Negative, and Neutral) for the document and each sentence within i + * (Positive, Negative, and Neutral) for the document and each sentence within it. * *

Code Sample

*

Analyze the sentiments in a document with a provided language representation.

+ * * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String-String} * * @param document The document to be analyzed. @@ -675,15 +678,45 @@ public DocumentSentiment analyzeSentiment(String document) { * * @return A {@link DocumentSentiment analyzed document sentiment} of the document. * - * @throws NullPointerException if {@code document} is {@code null}. + * @throws NullPointerException if {@code document} is null. * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. */ @ServiceMethod(returns = ReturnType.SINGLE) public DocumentSentiment analyzeSentiment(String document, String language) { - Objects.requireNonNull(document, "'document' cannot be null."); return client.analyzeSentiment(document, language).block(); } + /** + * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and + * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of + * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the + * opinions of a sentence and conducts more granular analysis around the aspects in the text + * (also known as aspect-based sentiment analysis). + * + *

Code Sample

+ *

Analyze the sentiment and mine the opinions for each sentence in a document with a provided language + * representation and {@link AnalyzeSentimentOptions} options.

+ * + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String-String-AnalyzeSentimentOptions} + * + * @param document The document to be analyzed. + * For text length limits, maximum batch size, and supported text encoding, see + * data limits. + * @param language The 2 letter ISO 639-1 representation of language for the document. If not set, uses "en" for + * English as default. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. + * + * @return A {@link DocumentSentiment analyzed document sentiment} of the document. + * + * @throws NullPointerException if {@code document} is null. + * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DocumentSentiment analyzeSentiment(String document, String language, AnalyzeSentimentOptions options) { + return client.analyzeSentiment(document, language, options).block(); + } + /** * Returns a sentiment prediction, as well as confidence scores for each sentiment label * (Positive, Negative, and Neutral) for the document and each sentence within it. @@ -702,13 +735,44 @@ public DocumentSentiment analyzeSentiment(String document, String language) { * * @return A {@link AnalyzeSentimentResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) public AnalyzeSentimentResultCollection analyzeSentimentBatch( Iterable documents, String language, TextAnalyticsRequestOptions options) { - inputDocumentsValidation(documents); + return client.analyzeSentimentBatch(documents, language, options).block(); + } + + /** + * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and + * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of + * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the + * opinions of a sentence and conducts more granular analysis around the aspects in the text + * (also known as aspect-based sentiment analysis). + * + *

Code Sample

+ *

Analyze the sentiments and mine the opinions for each sentence in a list of documents with a provided language + * representation and {@link AnalyzeSentimentOptions} options.

+ * + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-String-AnalyzeSentimentOptions} + * + * @param documents A list of documents to be analyzed. + * For text length limits, maximum batch size, and supported text encoding, see + * data limits. + * @param language The 2 letter ISO 639-1 representation of language for the documents. If not set, uses "en" for + * English as default. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. + * + * @return A {@link AnalyzeSentimentResultCollection}. + * + * @throws NullPointerException if {@code documents} is null. + * @throws IllegalArgumentException if {@code documents} is empty. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AnalyzeSentimentResultCollection analyzeSentimentBatch(Iterable documents, + String language, AnalyzeSentimentOptions options) { return client.analyzeSentimentBatch(documents, language, options).block(); } @@ -717,8 +781,8 @@ public AnalyzeSentimentResultCollection analyzeSentimentBatch( * (Positive, Negative, and Neutral) for the document and each sentence within it. * *

Code Sample

- *

Analyze the sentiments with http response in a list of {@link TextDocumentInput documents} with request - * options.

+ *

Analyze sentiment in a list of {@link TextDocumentInput document} with provided request options.

+ * * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-TextAnalyticsRequestOptions-Context} * * @param documents A list of {@link TextDocumentInput documents} to be analyzed. @@ -730,13 +794,46 @@ public AnalyzeSentimentResultCollection analyzeSentimentBatch( * * @return A {@link Response} that contains a {@link AnalyzeSentimentResultCollection}. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response analyzeSentimentBatchWithResponse( Iterable documents, TextAnalyticsRequestOptions options, Context context) { - inputDocumentsValidation(documents); + return client.analyzeSentimentAsyncClient.analyzeSentimentBatchWithContext(documents, + new AnalyzeSentimentOptions() + .setIncludeStatistics(options == null ? false : options.isIncludeStatistics()) + .setModelVersion(options == null ? null : options.getModelVersion()), context).block(); + } + + /** + * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and + * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of + * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the + * opinions of a sentence and conducts more granular analysis around the aspects in the text + * (also known as aspect-based sentiment analysis). + * + *

Code Sample

+ *

Analyze sentiment and mine the opinions for each sentence in a list of + * {@link TextDocumentInput document} with provided {@link AnalyzeSentimentOptions} options.

+ * + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-AnalyzeSentimentOptions-Context} + * + * @param documents A list of {@link TextDocumentInput documents} to be analyzed. + * For text length limits, maximum batch size, and supported text encoding, see + * data limits. + * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when + * analyzing sentiments. + * @param context Additional context that is passed through the Http pipeline during the service call. + * + * @return A {@link Response} that contains a {@link AnalyzeSentimentResultCollection}. + * + * @throws NullPointerException if {@code documents} is null. + * @throws IllegalArgumentException if {@code documents} is empty. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response analyzeSentimentBatchWithResponse( + Iterable documents, AnalyzeSentimentOptions options, Context context) { return client.analyzeSentimentAsyncClient.analyzeSentimentBatchWithContext(documents, options, context).block(); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java index c1caf08b07855..7b45936e81500 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java @@ -259,7 +259,7 @@ public TextAnalyticsClientBuilder endpoint(String endpoint) { * * @param keyCredential {@link AzureKeyCredential} API key credential * @return The updated {@link TextAnalyticsClientBuilder} object. - * @throws NullPointerException If {@code keyCredential} is {@code null} + * @throws NullPointerException If {@code keyCredential} is null */ public TextAnalyticsClientBuilder credential(AzureKeyCredential keyCredential) { this.credential = Objects.requireNonNull(keyCredential, "'keyCredential' cannot be null."); @@ -271,7 +271,7 @@ public TextAnalyticsClientBuilder credential(AzureKeyCredential keyCredential) { * * @param tokenCredential {@link TokenCredential} used to authenticate HTTP requests. * @return The updated {@link TextAnalyticsClientBuilder} object. - * @throws NullPointerException If {@code tokenCredential} is {@code null}. + * @throws NullPointerException If {@code tokenCredential} is null. */ public TextAnalyticsClientBuilder credential(TokenCredential tokenCredential) { Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null."); @@ -297,7 +297,7 @@ public TextAnalyticsClientBuilder httpLogOptions(HttpLogOptions logOptions) { * * @param policy The retry policy for service requests. * @return The updated {@link TextAnalyticsClientBuilder} object. - * @throws NullPointerException If {@code policy} is {@code null}. + * @throws NullPointerException If {@code policy} is null. */ public TextAnalyticsClientBuilder addPolicy(HttpPipelinePolicy policy) { policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java index 9555c37106f6e..76a31499534d9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java @@ -46,7 +46,7 @@ private Utility() { * * @param documents A list of documents. * - * @throws NullPointerException if {@code documents} is {@code null}. + * @throws NullPointerException if {@code documents} is null. * @throws IllegalArgumentException if {@code documents} is empty. */ public static void inputDocumentsValidation(Iterable documents) { diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/AnalyzeSentimentOptions.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/AnalyzeSentimentOptions.java new file mode 100644 index 0000000000000..5c38135d5a1cb --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/AnalyzeSentimentOptions.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.models; + +import com.azure.core.annotation.Fluent; + +/** + * The {@link AnalyzeSentimentOptions} model. + */ +@Fluent +public final class AnalyzeSentimentOptions extends TextAnalyticsRequestOptions { + + /* + * The boolean indicator to include opinion mining data in the returned result. If this + * flag is specified, you'll get a {@code minedOpinions} property on SentenceSentiment. It is provided by service + * v3.1-preview.1 and later. + */ + private boolean includeOpinionMining; + + /** + * Set the model version. This value indicates which model will be used for scoring, e.g. "latest", "2019-10-01". + * If a model-version is not specified, the API will default to the latest, non-preview version. + * + * @param modelVersion The model version. + * + * @return The {@link AnalyzeSentimentOptions} object itself. + */ + @Override + public AnalyzeSentimentOptions setModelVersion(String modelVersion) { + super.setModelVersion(modelVersion); + return this; + } + + /** + * Set the value of {@code includeStatistics}. + * + * @param includeStatistics If a boolean value was specified in the request this field will contain + * information about the document payload. + * + * @return the {@link AnalyzeSentimentOptions} object itself. + */ + @Override + public AnalyzeSentimentOptions setIncludeStatistics(boolean includeStatistics) { + super.setIncludeStatistics(includeStatistics); + return this; + } + + /** + * Get the value of {@code includeOpinionMining}. The boolean indicator to include opinion mining data in the + * returned result. If this flag is specified, you'll get a {@code minedOpinions} property on SentenceSentiment. + * It is provided by service v3.1-preview.1 and later. + * + * @return the value of {@code includeOpinionMining}. + */ + public boolean isIncludeOpinionMining() { + return includeOpinionMining; + } + + /** + * Set the value of {@code includeOpinionMining}. The boolean indicator to include opinion mining data in the + * returned result. If this flag is specified, you'll get a {@code minedOpinions} property on SentenceSentiment. + * It is provided by service v3.1-preview.1 and later. + * + * @param includeOpinionMining The boolean indicator to include opinion mining data in the returned result. + * + * @return the AnalyzeSentimentOptions object itself. + */ + public AnalyzeSentimentOptions setIncludeOpinionMining(boolean includeOpinionMining) { + this.includeOpinionMining = includeOpinionMining; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/AspectSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/AspectSentiment.java new file mode 100644 index 0000000000000..706e6d62e624d --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/AspectSentiment.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.models; + +import com.azure.core.annotation.Immutable; + +/** + * The {@link AspectSentiment} model. + */ +@Immutable +public final class AspectSentiment { + private final String text; + private final TextSentiment sentiment; + private final SentimentConfidenceScores confidenceScores; + private final int length; + private final int offset; + + /** + * Create an {@link AspectSentiment} model that describes aspect. + * + * @param text The aspect text property. + * @param sentiment The text sentiment label: POSITIVE, NEGATIVE, MIXED. {@link TextSentiment} has + * NEUTRAL sentiment type additionally, but aspect sentiment can only be POSITIVE, NEGATIVE, or MIXED. + * @param offset The aspect text offset from the start of document. + * @param length The length of aspect text. + * @param confidenceScores The {@link SentimentConfidenceScores}. + */ + public AspectSentiment(String text, TextSentiment sentiment, + int offset, int length, SentimentConfidenceScores confidenceScores) { + this.text = text; + this.sentiment = sentiment; + this.confidenceScores = confidenceScores; + this.length = length; + this.offset = offset; + } + + /** + * Get the aspect text property. + * + * @return The text value. + */ + public String getText() { + return text; + } + + /** + * Get the aspect text sentiment label: POSITIVE, NEGATIVE, MIXED. {@link TextSentiment} has + * NEUTRAL sentiment type additionally, but aspect sentiment can only be POSITIVE, NEGATIVE, or MIXED. + * + * @return The sentiment value. + */ + public TextSentiment getSentiment() { + return sentiment; + } + + + /** + * Get the aspect text offset from the start of document. + * + * @return The aspect text offset from the start of document. + */ + public int getOffset() { + return offset; + } + + /** + * Get the length of aspect text. + * + * @return The length of aspect text. + */ + public int getLength() { + return length; + } + + /** + * Get the confidence score of the sentiment label. All score values sum up to 1, the higher the score, the + * higher the confidence in the sentiment. AspectSentiment only has positive or negative confidence score value + * because there is no neutral sentiment label in the AspectSentiment. + * + * @return The {@link SentimentConfidenceScores}. + */ + public SentimentConfidenceScores getConfidenceScores() { + return confidenceScores; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/MinedOpinion.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/MinedOpinion.java new file mode 100644 index 0000000000000..ce300ff9d0624 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/MinedOpinion.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.models; + +import com.azure.core.util.IterableStream; + +/** + * The {@link MinedOpinion} model. + */ +public final class MinedOpinion { + private final AspectSentiment aspect; + private final IterableStream opinions; + + /** + * Create an {@link MinedOpinion} model that describes the mined opinions. + * + * @param aspect The aspect of a product/service that the opinions is about. + * @param opinions The opinions of the aspect text. + */ + public MinedOpinion(AspectSentiment aspect, IterableStream opinions) { + this.aspect = aspect; + this.opinions = opinions; + } + + /** + * Get the aspect in text, such as the attributes of products or services. For example, if a customer leaves + * feedback about a hotel such as "the room was great, but the staff was unfriendly", opinion mining will locate + * aspects in the text. The "room" and "staff" are two aspects recognized. + * + * @return The aspect in text. + */ + public AspectSentiment getAspect() { + return this.aspect; + } + + /** + * Get the opinions of aspect text. + * + * @return The opinions of aspect text. + */ + public IterableStream getOpinions() { + return opinions; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/OpinionSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/OpinionSentiment.java new file mode 100644 index 0000000000000..3530c72f58f8d --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/OpinionSentiment.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.models; + +import com.azure.core.annotation.Immutable; + +/** + * The {@link OpinionSentiment} model. + */ +@Immutable +public final class OpinionSentiment { + private final String text; + private final TextSentiment sentiment; + private final SentimentConfidenceScores confidenceScores; + private final boolean isNegated; + private final int length; + private final int offset; + + /** + * Create an {@link OpinionSentiment} model that describes opinion sentiment. + * + * @param text The opinion text property. + * @param sentiment The text sentiment label: POSITIVE, NEGATIVE, MIXED. {@link TextSentiment} has + * {@code neutral} sentiment type additionally, but opinion sentiment can only be positive, negative, or mixed. + * @param offset The offset of opinion text. + * @param length The length of opinion text. + * @param isNegated The boolean indicator to show if the opinion text negated or not. + * @param confidenceScores The {@link SentimentConfidenceScores}. + */ + public OpinionSentiment(String text, TextSentiment sentiment, int offset, int length, + boolean isNegated, SentimentConfidenceScores confidenceScores) { + this.text = text; + this.sentiment = sentiment; + this.offset = offset; + this.length = length; + this.isNegated = isNegated; + this.confidenceScores = confidenceScores; + } + + /** + * Get the opinion text property. + * + * @return The text value. + */ + public String getText() { + return text; + } + + /** + * Get the opinion text sentiment label: POSITIVE, NEGATIVE, MIXED. {@link TextSentiment} has + * {@code neutral} sentiment type additionally, but aspect sentiment can only be positive, negative, or mixed. + * + * @return The sentiment value. + */ + public TextSentiment getSentiment() { + return sentiment; + } + + /** + * Get the offset of opinion text. + * + * @return The offset of opinion text. + */ + public int getOffset() { + return offset; + } + + /** + * Get the length of opinion text. + * + * @return The length of opinion text. + */ + public int getLength() { + return length; + } + + /** + * Get the boolean indicator to show if the text is negative. + * + * @return The boolean indicator to show if the text is negative. + */ + public boolean isNegated() { + return isNegated; + } + + /** + * Get the confidence score of the sentiment label. All score values sum up to 1, the higher the score, the + * higher the confidence in the sentiment. OpinionSentiment only has positive or negative confidence score value + * because there is no neutral sentiment label in the OpinionSentiment. + * + * @return The {@link SentimentConfidenceScores}. + */ + public SentimentConfidenceScores getConfidenceScores() { + return confidenceScores; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/SentenceSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/SentenceSentiment.java index 636739209fe96..67c550c41d5c7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/SentenceSentiment.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/SentenceSentiment.java @@ -4,6 +4,7 @@ package com.azure.ai.textanalytics.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.IterableStream; /** * The {@link SentenceSentiment} model that contains a sentiment label of a sentence, confidence score of the @@ -14,11 +15,11 @@ public final class SentenceSentiment { private final String text; private final SentimentConfidenceScores confidenceScores; private final TextSentiment sentiment; + private final IterableStream minedOpinions; /** * Creates a {@link SentenceSentiment} model that describes the sentiment analysis of sentence. - * - * @param text The sentence text + * @param text The sentence text. * @param sentiment The sentiment label of the sentence. * @param confidenceScores The sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label. * Higher values signify higher confidence. @@ -26,13 +27,31 @@ public final class SentenceSentiment { public SentenceSentiment(String text, TextSentiment sentiment, SentimentConfidenceScores confidenceScores) { this.text = text; this.sentiment = sentiment; + this.minedOpinions = null; + this.confidenceScores = confidenceScores; + } + + /** + * Creates a {@link SentenceSentiment} model that describes the sentiment analysis of sentence. + * @param text The sentence text. + * @param sentiment The sentiment label of the sentence. + * @param minedOpinions The mined opinions of the sentence sentiment. This is only returned if you pass the + * opinion mining parameter to the analyze sentiment APIs. + * @param confidenceScores The sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label. + * Higher values signify higher confidence. + */ + public SentenceSentiment(String text, TextSentiment sentiment, IterableStream minedOpinions, + SentimentConfidenceScores confidenceScores) { + this.text = text; + this.sentiment = sentiment; + this.minedOpinions = minedOpinions; this.confidenceScores = confidenceScores; } /** * Get the sentence text property. * - * @return the text value. + * @return the text property value. */ public String getText() { return this.text; @@ -48,8 +67,18 @@ public TextSentiment getSentiment() { } /** - * Get the confidence score of the sentiment label. All score values sum up to 1, higher the score value means - * higher confidence the sentiment label represents. + * Get the mined opinions of sentence sentiment. + * This is only returned if you pass the opinion mining parameter to the analyze sentiment APIs. + * + * @return The mined opinions of sentence sentiment. + */ + public IterableStream getMinedOpinions() { + return minedOpinions; + } + + /** + * Get the confidence score of the sentiment label. All score values sum up to 1, the higher the score, the + * higher the confidence in the sentiment. * * @return The {@link SentimentConfidenceScores}. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/TextAnalyticsRequestOptions.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/TextAnalyticsRequestOptions.java index b0c96cd9acc67..d566057cc04a2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/TextAnalyticsRequestOptions.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/TextAnalyticsRequestOptions.java @@ -9,7 +9,7 @@ * The {@link TextAnalyticsRequestOptions} model. */ @Fluent -public final class TextAnalyticsRequestOptions { +public class TextAnalyticsRequestOptions { private String modelVersion; private boolean includeStatistics; @@ -27,6 +27,7 @@ public String getModelVersion() { * If a model-version is not specified, the API will default to the latest, non-preview version. * * @param modelVersion The model version. + * * @return The {@link TextAnalyticsRequestOptions} object itself. */ public TextAnalyticsRequestOptions setModelVersion(String modelVersion) { @@ -44,10 +45,12 @@ public boolean isIncludeStatistics() { } /** - * Set the value of {@code includeStatistics}. + * Set the value of {@code includeStatistics}. If set to true, indicates that the service + * should return document and document batch statistics with the results of the operation. * * @param includeStatistics If a boolean value was specified in the request this field will contain * information about the document payload. + * * @return the {@link TextAnalyticsRequestOptions} object itself. */ public TextAnalyticsRequestOptions setIncludeStatistics(boolean includeStatistics) { diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMining.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMining.java new file mode 100644 index 0000000000000..702908b70abcd --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMining.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics; + +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AspectSentiment; +import com.azure.ai.textanalytics.models.DocumentSentiment; +import com.azure.ai.textanalytics.models.OpinionSentiment; +import com.azure.ai.textanalytics.models.SentimentConfidenceScores; +import com.azure.core.credential.AzureKeyCredential; + +/** + * Sample demonstrates how to synchronously analyze the sentiment of document with opinion mining. + */ +public class AnalyzeSentimentWithOpinionMining { + /** + * Main method to invoke this demo about how to analyze the sentiment of document. + * + * @param args Unused arguments to the program. + */ + public static void main(String[] args) { + // Instantiate a client that will be used to call the service. + TextAnalyticsClient client = new TextAnalyticsClientBuilder() + .credential(new AzureKeyCredential("{key}")) + .endpoint("{endpoint}") + .buildClient(); + + // The text that needs be analyzed. + String document = "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful."; + + System.out.printf("Text = %s%n", document); + + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions().setIncludeOpinionMining(true); + final DocumentSentiment documentSentiment = client.analyzeSentiment(document, "en", options); + SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); + System.out.printf( + "Recognized document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); + + documentSentiment.getSentences().forEach(sentenceSentiment -> { + SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); + System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + }); + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMiningAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMiningAsync.java new file mode 100644 index 0000000000000..83e7e682aaa12 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMiningAsync.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics; + +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AspectSentiment; +import com.azure.ai.textanalytics.models.OpinionSentiment; +import com.azure.ai.textanalytics.models.SentimentConfidenceScores; +import com.azure.core.credential.AzureKeyCredential; + +import java.util.concurrent.TimeUnit; + +/** + * Sample demonstrates how to asynchronously analyze the sentiment of document with opinion mining. + */ +public class AnalyzeSentimentWithOpinionMiningAsync { + /** + * Main method to invoke this demo about how to analyze the sentiment of document. + * + * @param args Unused arguments to the program. + */ + public static void main(String[] args) { + // Instantiate a client that will be used to call the service. + TextAnalyticsAsyncClient client = new TextAnalyticsClientBuilder() + .credential(new AzureKeyCredential("{key}")) + .endpoint("{endpoint}") + .buildAsyncClient(); + + // The document that needs be analyzed. + String document = "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful."; + + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions().setIncludeOpinionMining(true); + client.analyzeSentiment(document, "en", options).subscribe( + documentSentiment -> { + SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); + System.out.printf( + "Recognized document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); + + documentSentiment.getSentences().forEach(sentenceSentiment -> { + SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); + System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); + + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + }); + }, + error -> System.err.println("There was an error analyzing sentiment of the text." + error), + () -> System.out.println("Sentiment analyzed.")); + + // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep + // the thread so the program does not end before the send operation is complete. Using .block() instead of + // .subscribe() will turn this into a synchronous call. + try { + TimeUnit.SECONDS.sleep(5); + } catch (InterruptedException ignored) { + } + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java index caf7f39605027..26f5faa0fa561 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java @@ -3,20 +3,23 @@ package com.azure.ai.textanalytics; -import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AspectSentiment; import com.azure.ai.textanalytics.models.DetectLanguageInput; import com.azure.ai.textanalytics.models.DetectLanguageResult; -import com.azure.ai.textanalytics.util.DetectLanguageResultCollection; import com.azure.ai.textanalytics.models.DetectedLanguage; import com.azure.ai.textanalytics.models.DocumentSentiment; import com.azure.ai.textanalytics.models.ExtractKeyPhraseResult; -import com.azure.ai.textanalytics.util.ExtractKeyPhrasesResultCollection; -import com.azure.ai.textanalytics.util.RecognizeEntitiesResultCollection; -import com.azure.ai.textanalytics.util.RecognizeLinkedEntitiesResultCollection; +import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; import com.azure.ai.textanalytics.models.TextDocumentInput; +import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; +import com.azure.ai.textanalytics.util.DetectLanguageResultCollection; +import com.azure.ai.textanalytics.util.ExtractKeyPhrasesResultCollection; +import com.azure.ai.textanalytics.util.RecognizeEntitiesResultCollection; +import com.azure.ai.textanalytics.util.RecognizeLinkedEntitiesResultCollection; import com.azure.ai.textanalytics.util.RecognizePiiEntitiesResultCollection; import com.azure.core.credential.AzureKeyCredential; @@ -547,12 +550,11 @@ public void analyzeSentiment() { * Code snippet for {@link TextAnalyticsAsyncClient#analyzeSentiment(String, String)} */ public void analyzeSentimentWithLanguage() { - // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#string-string + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#String-String String document = "The hotel was dark and unclean."; textAnalyticsAsyncClient.analyzeSentiment(document, "en") .subscribe(documentSentiment -> { System.out.printf("Recognized sentiment label: %s.%n", documentSentiment.getSentiment()); - for (SentenceSentiment sentenceSentiment : documentSentiment.getSentences()) { System.out.printf("Recognized sentence sentiment: %s, positive score: %.2f, neutral score: %.2f, " + "negative score: %.2f.%n", @@ -562,7 +564,32 @@ public void analyzeSentimentWithLanguage() { sentenceSentiment.getConfidenceScores().getNegative()); } }); - // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#string-string + // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#String-String + } + + /** + * Code snippet for {@link TextAnalyticsAsyncClient#analyzeSentiment(String, String, AnalyzeSentimentOptions)} + */ + public void analyzeSentimentWithLanguageWithOpinionMining() { + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#String-String-AnalyzeSentimentOptions + textAnalyticsAsyncClient.analyzeSentiment("The hotel was dark and unclean.", "en", + new AnalyzeSentimentOptions().setIncludeOpinionMining(true)) + .subscribe(documentSentiment -> { + for (SentenceSentiment sentenceSentiment : documentSentiment.getSentences()) { + System.out.printf("\tSentence sentiment: %s%n", sentenceSentiment.getSentiment()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\tAspect sentiment: %s, aspect text: %s%n", + aspectSentiment.getSentiment(), aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t'%s' sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), + opinionSentiment.isNegated()); + } + }); + } + }); + // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentiment#String-String-AnalyzeSentimentOptions } /** @@ -575,7 +602,43 @@ public void analyzeSentimentStringListWithOptions() { "The restaurant had amazing gnocchi." ); - textAnalyticsAsyncClient.analyzeSentimentBatch(documents, "en", null).subscribe( + textAnalyticsAsyncClient.analyzeSentimentBatch(documents, "en", + new TextAnalyticsRequestOptions().setIncludeStatistics(true)).subscribe( + response -> { + // Batch statistics + TextDocumentBatchStatistics batchStatistics = response.getStatistics(); + System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n", + batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); + + response.forEach(analyzeSentimentResult -> { + System.out.printf("Document ID: %s%n", analyzeSentimentResult.getId()); + DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); + System.out.printf("Recognized document sentiment: %s.%n", documentSentiment.getSentiment()); + documentSentiment.getSentences().forEach(sentenceSentiment -> + System.out.printf("Recognized sentence sentiment: %s, positive score: %.2f, " + + "neutral score: %.2f, negative score: %.2f.%n", + sentenceSentiment.getSentiment(), + sentenceSentiment.getConfidenceScores().getPositive(), + sentenceSentiment.getConfidenceScores().getNeutral(), + sentenceSentiment.getConfidenceScores().getNegative())); + }); + }); + // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-String-TextAnalyticsRequestOptions + } + + /** + * Code snippet for {@link TextAnalyticsAsyncClient#analyzeSentimentBatch(Iterable, String, AnalyzeSentimentOptions)} + */ + public void analyzeSentimentStringListWithOptionsAndOpinionMining() { + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-String-AnalyzeSentimentOptions + List documents = Arrays.asList( + "The hotel was dark and unclean.", + "The restaurant had amazing gnocchi." + ); + + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions().setIncludeOpinionMining(true); + + textAnalyticsAsyncClient.analyzeSentimentBatch(documents, "en", options).subscribe( response -> { // Batch statistics TextDocumentBatchStatistics batchStatistics = response.getStatistics(); @@ -585,17 +648,23 @@ public void analyzeSentimentStringListWithOptions() { response.forEach(analyzeSentimentResult -> { System.out.printf("Document ID: %s%n", analyzeSentimentResult.getId()); DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); - System.out.printf("Recognized document sentiment: %s.%n", documentSentiment.getSentiment()); - documentSentiment.getSentences().forEach(sentenceSentiment -> - System.out.printf("Recognized sentence sentiment: %s, positive score: %.2f, " - + "neutral score: %.2f, negative score: %.2f.%n", - sentenceSentiment.getSentiment(), - sentenceSentiment.getConfidenceScores().getPositive(), - sentenceSentiment.getConfidenceScores().getNeutral(), - sentenceSentiment.getConfidenceScores().getNegative())); + documentSentiment.getSentences().forEach(sentenceSentiment -> { + System.out.printf("\tSentence sentiment: %s%n", sentenceSentiment.getSentiment()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", + aspectSentiment.getSentiment(), aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf( + "\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), + opinionSentiment.isNegated()); + } + }); + }); }); }); - // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-String-TextAnalyticsRequestOptions + // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-String-AnalyzeSentimentOptions } /** @@ -637,4 +706,50 @@ public void analyzeBatchSentimentMaxOverload() { }); // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-TextAnalyticsRequestOptions } + + /** + * Code snippet for {@link TextAnalyticsAsyncClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions)} + */ + public void analyzeBatchSentimentMaxOverloadWithOpinionMining() { + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-AnalyzeSentimentOptions + List textDocumentInputs1 = Arrays.asList( + new TextDocumentInput("0", "The hotel was dark and unclean.").setLanguage("en"), + new TextDocumentInput("1", "The restaurant had amazing gnocchi.").setLanguage("en")); + + // Request options: show statistics and model version + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() + .setIncludeOpinionMining(true).setIncludeStatistics(true); + textAnalyticsAsyncClient.analyzeSentimentBatchWithResponse(textDocumentInputs1, options) + .subscribe(response -> { + // Response's status code + System.out.printf("Status code of request response: %d%n", response.getStatusCode()); + AnalyzeSentimentResultCollection resultCollection = response.getValue(); + + // Batch statistics + TextDocumentBatchStatistics batchStatistics = resultCollection.getStatistics(); + System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n", + batchStatistics.getTransactionCount(), + batchStatistics.getValidDocumentCount()); + + resultCollection.forEach(analyzeSentimentResult -> { + System.out.printf("Document ID: %s%n", analyzeSentimentResult.getId()); + DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); + documentSentiment.getSentences().forEach(sentenceSentiment -> { + System.out.printf("\tSentence sentiment: %s%n", sentenceSentiment.getSentiment()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", + aspectSentiment.getSentiment(), aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf( + "\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), + opinionSentiment.isNegated()); + } + }); + }); + }); + }); + // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.analyzeSentimentBatch#Iterable-AnalyzeSentimentOptions + } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java index 346e5111df914..7a004a6abe9c2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java @@ -3,11 +3,14 @@ package com.azure.ai.textanalytics; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AspectSentiment; import com.azure.ai.textanalytics.models.CategorizedEntity; import com.azure.ai.textanalytics.models.CategorizedEntityCollection; import com.azure.ai.textanalytics.models.DetectLanguageInput; import com.azure.ai.textanalytics.models.DetectedLanguage; import com.azure.ai.textanalytics.models.DocumentSentiment; +import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.PiiEntity; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; @@ -576,6 +579,29 @@ public void analyzeSentimentWithLanguage() { // END: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String-String } + /** + * Code snippet for {@link TextAnalyticsClient#analyzeSentiment(String, String, AnalyzeSentimentOptions)} + */ + public void analyzeSentimentWithLanguageWithOpinionMining() { + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String-String-AnalyzeSentimentOptions + final DocumentSentiment documentSentiment = textAnalyticsClient.analyzeSentiment( + "The hotel was dark and unclean.", "en", + new AnalyzeSentimentOptions().setIncludeOpinionMining(true)); + for (SentenceSentiment sentenceSentiment : documentSentiment.getSentences()) { + System.out.printf("\tSentence sentiment: %s%n", sentenceSentiment.getSentiment()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t'%s' sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + } + // END: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String-String-AnalyzeSentimentOptions + } + /** * Code snippet for {@link TextAnalyticsClient#analyzeSentimentBatch(Iterable, String, TextAnalyticsRequestOptions)} */ @@ -587,8 +613,8 @@ public void analyzeSentimentStringListWithOptions() { ); // Analyzing batch sentiments - AnalyzeSentimentResultCollection resultCollection = - textAnalyticsClient.analyzeSentimentBatch(documents, "en", null); + AnalyzeSentimentResultCollection resultCollection = textAnalyticsClient.analyzeSentimentBatch( + documents, "en", new TextAnalyticsRequestOptions().setIncludeStatistics(true)); // Batch statistics TextDocumentBatchStatistics batchStatistics = resultCollection.getStatistics(); @@ -618,6 +644,40 @@ public void analyzeSentimentStringListWithOptions() { // END: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-String-TextAnalyticsRequestOptions } + /** + * Code snippet for {@link TextAnalyticsClient#analyzeSentimentBatch(Iterable, String, AnalyzeSentimentOptions)} + */ + public void analyzeSentimentStringListWithOptionsAndOpinionMining() { + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-String-AnalyzeSentimentOptions + List documents = Arrays.asList( + "The hotel was dark and unclean. The restaurant had amazing gnocchi.", + "The restaurant had amazing gnocchi. The hotel was dark and unclean." + ); + + // Analyzing batch sentiments + AnalyzeSentimentResultCollection resultCollection = textAnalyticsClient.analyzeSentimentBatch( + documents, "en", new AnalyzeSentimentOptions().setIncludeOpinionMining(true)); + + // Analyzed sentiment for each of documents from a batch of documents + resultCollection.forEach(analyzeSentimentResult -> { + System.out.printf("Document ID: %s%n", analyzeSentimentResult.getId()); + DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); + documentSentiment.getSentences().forEach(sentenceSentiment -> { + System.out.printf("\tSentence sentiment: %s%n", sentenceSentiment.getSentiment()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t'%s' sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + }); + }); + // END: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-String-AnalyzeSentimentOptions + } + /** * Code snippet for {@link TextAnalyticsClient#analyzeSentimentBatchWithResponse(Iterable, TextAnalyticsRequestOptions, Context)} */ @@ -668,4 +728,52 @@ public void analyzeBatchSentimentMaxOverload() { }); // END: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-TextAnalyticsRequestOptions-Context } + + /** + * Code snippet for {@link TextAnalyticsClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions, Context)} + */ + public void analyzeBatchSentimentMaxOverloadWithOpinionMining() { + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-AnalyzeSentimentOptions-Context + List textDocumentInputs = Arrays.asList( + new TextDocumentInput("1", "The hotel was dark and unclean. The restaurant had amazing gnocchi.") + .setLanguage("en"), + new TextDocumentInput("2", "The restaurant had amazing gnocchi. The hotel was dark and unclean.") + .setLanguage("en") + ); + + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions().setIncludeOpinionMining(true) + .setIncludeStatistics(true); + + // Analyzing batch sentiments + Response response = + textAnalyticsClient.analyzeSentimentBatchWithResponse(textDocumentInputs, options, Context.NONE); + + // Response's status code + System.out.printf("Status code of request response: %d%n", response.getStatusCode()); + AnalyzeSentimentResultCollection resultCollection = response.getValue(); + + // Batch statistics + TextDocumentBatchStatistics batchStatistics = resultCollection.getStatistics(); + System.out.printf("A batch of documents statistics, transaction count: %s, valid document count: %s.%n", + batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); + + // Analyzed sentiment for each of documents from a batch of documents + resultCollection.forEach(analyzeSentimentResult -> { + System.out.printf("Document ID: %s%n", analyzeSentimentResult.getId()); + DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); + documentSentiment.getSentences().forEach(sentenceSentiment -> { + System.out.printf("\tSentence sentiment: %s%n", sentenceSentiment.getSentiment()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t'%s' sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + }); + }); + // END: com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-AnalyzeSentimentOptions-Context + } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMining.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMining.java new file mode 100644 index 0000000000000..0c0f936ab4606 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMining.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.batch; + +import com.azure.ai.textanalytics.TextAnalyticsClient; +import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AspectSentiment; +import com.azure.ai.textanalytics.models.DocumentSentiment; +import com.azure.ai.textanalytics.models.OpinionSentiment; +import com.azure.ai.textanalytics.models.SentimentConfidenceScores; +import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; +import com.azure.ai.textanalytics.models.TextDocumentInput; +import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Sample demonstrates how to analyze the sentiments of {@link TextDocumentInput} documents with opinion mining. + */ +public class AnalyzeSentimentBatchDocumentsWithOpinionMining { + /** + * Main method to invoke this demo about how to analyze the sentiments of {@link TextDocumentInput} documents. + * + * @param args Unused arguments to the program. + */ + public static void main(String[] args) { + // Instantiate a client that will be used to call the service. + TextAnalyticsClient client = new TextAnalyticsClientBuilder() + .credential(new AzureKeyCredential("{key}")) + .endpoint("{endpoint}") + .buildClient(); + + // The texts that need be analyzed. + List documents = Arrays.asList( + new TextDocumentInput("A", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.").setLanguage("en"), + new TextDocumentInput("B", "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful.").setLanguage("en") + ); + + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() + .setIncludeOpinionMining(true).setIncludeStatistics(true).setModelVersion("latest"); + + // Analyzing sentiment for each document in a batch of documents + Response sentimentBatchResultResponse = + client.analyzeSentimentBatchWithResponse(documents, options, Context.NONE); + + // Response's status code + System.out.printf("Status code of request response: %d%n", sentimentBatchResultResponse.getStatusCode()); + AnalyzeSentimentResultCollection sentimentBatchResultCollection = sentimentBatchResultResponse.getValue(); + + // Model version + System.out.printf("Results of Azure Text Analytics \"Sentiment Analysis\" Model, version: %s%n", sentimentBatchResultCollection.getModelVersion()); + + // Batch statistics + TextDocumentBatchStatistics batchStatistics = sentimentBatchResultCollection.getStatistics(); + System.out.printf("Documents statistics: document count = %s, erroneous document count = %s, transaction count = %s, valid document count = %s.%n", + batchStatistics.getDocumentCount(), batchStatistics.getInvalidDocumentCount(), batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); + + // Analyzed sentiment for each document in a batch of documents + AtomicInteger counter = new AtomicInteger(); + sentimentBatchResultCollection.forEach(analyzeSentimentResult -> { + System.out.printf("%n%s%n", documents.get(counter.getAndIncrement())); + if (analyzeSentimentResult.isError()) { + // Erroneous document + System.out.printf("Cannot analyze sentiment. Error: %s%n", analyzeSentimentResult.getError().getMessage()); + } else { + // Valid document + DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); + SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); + System.out.printf("Analyzed document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); + documentSentiment.getSentences().forEach(sentenceSentiment -> { + SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); + System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + }); + } + }); + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync.java new file mode 100644 index 0000000000000..50b8acde5803b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.batch; + +import com.azure.ai.textanalytics.TextAnalyticsAsyncClient; +import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; +import com.azure.ai.textanalytics.models.AspectSentiment; +import com.azure.ai.textanalytics.models.DocumentSentiment; +import com.azure.ai.textanalytics.models.OpinionSentiment; +import com.azure.ai.textanalytics.models.SentimentConfidenceScores; +import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; +import com.azure.ai.textanalytics.models.TextDocumentInput; +import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; +import com.azure.core.credential.AzureKeyCredential; + +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Sample demonstrates how to asynchronously analyze the sentiments of {@link TextDocumentInput} documents with + * opinion mining. + */ +public class AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync { + /** + * Main method to invoke this demo about how to analyze the sentiments of {@link TextDocumentInput} documents. + * + * @param args Unused arguments to the program. + */ + public static void main(String[] args) { + // Instantiate a client that will be used to call the service. + TextAnalyticsAsyncClient client = new TextAnalyticsClientBuilder() + .credential(new AzureKeyCredential("{key}")) + .endpoint("{endpoint}") + .buildAsyncClient(); + + // The texts that need be analyzed. + List documents = Arrays.asList( + new TextDocumentInput("A", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.").setLanguage("en"), + new TextDocumentInput("B", "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful.").setLanguage("en") + ); + + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() + .setIncludeOpinionMining(true).setIncludeStatistics(true).setModelVersion("latest"); + + // Analyzing sentiment for each document in a batch of documents + client.analyzeSentimentBatchWithResponse(documents, options).subscribe( + sentimentBatchResultResponse -> { + // Response's status code + System.out.printf("Status code of request response: %d%n", sentimentBatchResultResponse.getStatusCode()); + AnalyzeSentimentResultCollection sentimentBatchResultCollection = sentimentBatchResultResponse.getValue(); + + System.out.printf("Results of Azure Text Analytics \"Sentiment Analysis\" Model, version: %s%n", sentimentBatchResultCollection.getModelVersion()); + + // Batch statistics + TextDocumentBatchStatistics batchStatistics = sentimentBatchResultCollection.getStatistics(); + System.out.printf("Documents statistics: document count = %s, erroneous document count = %s, transaction count = %s, valid document count = %s.%n", + batchStatistics.getDocumentCount(), batchStatistics.getInvalidDocumentCount(), batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); + + // Analyzed sentiment for each document in a batch of documents + AtomicInteger counter = new AtomicInteger(); + for (AnalyzeSentimentResult analyzeSentimentResult : sentimentBatchResultCollection) { + System.out.printf("%n%s%n", documents.get(counter.getAndIncrement())); + if (analyzeSentimentResult.isError()) { + // Erroneous document + System.out.printf("Cannot analyze sentiment. Error: %s%n", analyzeSentimentResult.getError().getMessage()); + } else { + // Valid document + DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); + SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); + System.out.printf("Analyzed document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); + documentSentiment.getSentences().forEach(sentenceSentiment -> { + SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); + System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + }); + } + } + }, + error -> System.err.println("There was an error analyzing sentiment of the documents." + error), + () -> System.out.println("Batch of sentiment analyzed.")); + + // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep + // the thread so the program does not end before the send operation is complete. Using .block() instead of + // .subscribe() will turn this into a synchronous call. + try { + TimeUnit.SECONDS.sleep(5); + } catch (InterruptedException ignored) { + } + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMining.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMining.java new file mode 100644 index 0000000000000..0508152e9b307 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMining.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.batch; + +import com.azure.ai.textanalytics.TextAnalyticsClient; +import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; +import com.azure.ai.textanalytics.models.AspectSentiment; +import com.azure.ai.textanalytics.models.DocumentSentiment; +import com.azure.ai.textanalytics.models.OpinionSentiment; +import com.azure.ai.textanalytics.models.SentimentConfidenceScores; +import com.azure.ai.textanalytics.models.TextDocumentInput; +import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; +import com.azure.core.credential.AzureKeyCredential; + +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Sample demonstrates how to analyze the sentiments of {@code String} documents with opinion mining. + */ +public class AnalyzeSentimentBatchStringWithOpinionMining { + /** + * Main method to invoke this demo about how to analyze the sentiments of {@link TextDocumentInput} documents. + * + * @param args Unused arguments to the program. + */ + public static void main(String[] args) { + // Instantiate a client that will be used to call the service. + TextAnalyticsClient client = new TextAnalyticsClientBuilder() + .credential(new AzureKeyCredential("{key}")) + .endpoint("{endpoint}") + .buildClient(); + + // The documents that need to be analyzed. + List documents = Arrays.asList( + "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", + "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful." + ); + + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() + .setIncludeOpinionMining(true).setIncludeStatistics(true).setModelVersion("latest"); + + // Analyzing sentiment for each document in a batch of documents + AnalyzeSentimentResultCollection sentimentBatchResultCollection = client.analyzeSentimentBatch(documents, "en", options); + + // Model version + System.out.printf("Results of Azure Text Analytics \"Sentiment Analysis\" Model, version: %s%n", sentimentBatchResultCollection.getModelVersion()); + + // Analyzed sentiment for each document in a batch of documents + AtomicInteger counter = new AtomicInteger(); + for (AnalyzeSentimentResult analyzeSentimentResult : sentimentBatchResultCollection) { + System.out.printf("%nText = %s%n", documents.get(counter.getAndIncrement())); + DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); + + SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); + System.out.printf("Analyzed document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); + documentSentiment.getSentences().forEach(sentenceSentiment -> { + SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); + System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + }); + } + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMiningAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMiningAsync.java new file mode 100644 index 0000000000000..43e28939f213a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMiningAsync.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.batch; + +import com.azure.ai.textanalytics.TextAnalyticsAsyncClient; +import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; +import com.azure.ai.textanalytics.models.AspectSentiment; +import com.azure.ai.textanalytics.models.DocumentSentiment; +import com.azure.ai.textanalytics.models.OpinionSentiment; +import com.azure.ai.textanalytics.models.SentimentConfidenceScores; +import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; +import com.azure.core.credential.AzureKeyCredential; + +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Sample demonstrates how to asynchronously analyze the sentiments of {@code String} documents with opinion mining. + */ +public class AnalyzeSentimentBatchStringWithOpinionMiningAsync { + + /** + * Main method to invoke this demo about how to analyze the sentiments of {@code String} documents. + * + * @param args Unused arguments to the program. + */ + public static void main(String[] args) { + // Instantiate a client that will be used to call the service. + TextAnalyticsAsyncClient client = new TextAnalyticsClientBuilder() + .credential(new AzureKeyCredential("{key}")) + .endpoint("{endpoint}") + .buildAsyncClient(); + + // The texts that need be analyzed. + List documents = Arrays.asList( + "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", + "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful." + ); + + AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() + .setIncludeOpinionMining(true).setIncludeStatistics(true).setModelVersion("latest"); + + // Analyzing sentiment for each document in a batch of documents + client.analyzeSentimentBatch(documents, "en", options).subscribe( + sentimentBatchResultCollection -> { + System.out.printf("Results of Azure Text Analytics \"Sentiment Analysis\" Model, version: %s%n", sentimentBatchResultCollection.getModelVersion()); + + // Batch statistics + TextDocumentBatchStatistics batchStatistics = sentimentBatchResultCollection.getStatistics(); + System.out.printf("Documents statistics: document count = %s, erroneous document count = %s, transaction count = %s, valid document count = %s.%n", + batchStatistics.getDocumentCount(), batchStatistics.getInvalidDocumentCount(), batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); + + // Analyzed sentiment for each document in a batch of documents + AtomicInteger counter = new AtomicInteger(); + for (AnalyzeSentimentResult analyzeSentimentResult : sentimentBatchResultCollection) { + // Analyzed sentiment for each document + System.out.printf("%nText = %s%n", documents.get(counter.getAndIncrement())); + if (analyzeSentimentResult.isError()) { + // Erroneous document + System.out.printf("Cannot analyze sentiment. Error: %s%n", analyzeSentimentResult.getError().getMessage()); + } else { + // Valid document + DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); + SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); + System.out.printf("Analyzed document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); + documentSentiment.getSentences().forEach(sentenceSentiment -> { + SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); + System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", + sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); + sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { + AspectSentiment aspectSentiment = minedOpinions.getAspect(); + System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), + aspectSentiment.getText()); + for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { + System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", + opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); + } + }); + }); + } + } + }, + error -> System.err.println("There was an error analyzing sentiment of the documents." + error), + () -> System.out.println("Batch of sentiment analyzed.")); + + // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep + // the thread so the program does not end before the send operation is complete. Using .block() instead of + // .subscribe() will turn this into a synchronous call. + try { + TimeUnit.SECONDS.sleep(5); + } catch (InterruptedException ignored) { + } + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/DocumentInputAsyncTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/DocumentInputAsyncTest.java index a00a8c8137a93..ff6fca3990d3b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/DocumentInputAsyncTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/DocumentInputAsyncTest.java @@ -617,7 +617,7 @@ public void analyzeSentimentNullInputWithLanguageHint() { */ @Test public void analyzeSentimentBatchNullInput() { - StepVerifier.create(client.analyzeSentimentBatch(null, null, null)) + StepVerifier.create(client.analyzeSentimentBatch(null, null, new TextAnalyticsRequestOptions())) .verifyErrorSatisfies(exception -> { assertEquals(NullPointerException.class, exception.getClass()); assertTrue(INVALID_DOCUMENT_BATCH_NPE_MESSAGE.equals(exception.getMessage())); @@ -630,7 +630,7 @@ public void analyzeSentimentBatchNullInput() { */ @Test public void analyzeSentimentBatchEmptyInputList() { - StepVerifier.create(client.analyzeSentimentBatch(Collections.emptyList(), null, null)) + StepVerifier.create(client.analyzeSentimentBatch(Collections.emptyList(), null, new TextAnalyticsRequestOptions())) .verifyErrorSatisfies(exception -> { assertEquals(IllegalArgumentException.class, exception.getClass()); assertTrue(INVALID_DOCUMENT_EMPTY_LIST_EXCEPTION_MESSAGE.equals(exception.getMessage())); @@ -643,7 +643,7 @@ public void analyzeSentimentBatchEmptyInputList() { */ @Test public void analyzeSentimentBatchNullInputWithLanguageHint() { - StepVerifier.create(client.analyzeSentimentBatch(null, "en", null)) + StepVerifier.create(client.analyzeSentimentBatch(null, "en", new TextAnalyticsRequestOptions())) .verifyErrorSatisfies(exception -> { assertEquals(NullPointerException.class, exception.getClass()); assertTrue(INVALID_DOCUMENT_BATCH_NPE_MESSAGE.equals(exception.getMessage())); @@ -656,7 +656,7 @@ public void analyzeSentimentBatchNullInputWithLanguageHint() { */ @Test public void analyzeSentimentBatchEmptyInputListWithLanguageHint() { - StepVerifier.create(client.analyzeSentimentBatch(Collections.emptyList(), "en", null)) + StepVerifier.create(client.analyzeSentimentBatch(Collections.emptyList(), "en", new TextAnalyticsRequestOptions())) .verifyErrorSatisfies(exception -> { assertEquals(IllegalArgumentException.class, exception.getClass()); assertTrue(INVALID_DOCUMENT_EMPTY_LIST_EXCEPTION_MESSAGE.equals(exception.getMessage())); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/DocumentInputTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/DocumentInputTest.java index e8e74f2e7167d..308d3c779d76a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/DocumentInputTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/DocumentInputTest.java @@ -535,7 +535,7 @@ public void analyzeSentimentNullInputWithLanguageHint() { @Test public void analyzeSentimentBatchNullInput() { Exception exception = assertThrows(NullPointerException.class, () -> - client.analyzeSentimentBatch(null, null, null)); + client.analyzeSentimentBatch(null, null, new TextAnalyticsRequestOptions())); assertTrue(INVALID_DOCUMENT_BATCH_NPE_MESSAGE.equals(exception.getMessage())); } @@ -546,7 +546,7 @@ public void analyzeSentimentBatchNullInput() { @Test public void analyzeSentimentBatchEmptyInputList() { Exception exception = assertThrows(IllegalArgumentException.class, () -> - client.analyzeSentimentBatch(Collections.emptyList(), null, null)); + client.analyzeSentimentBatch(Collections.emptyList(), null, new TextAnalyticsRequestOptions())); assertTrue(INVALID_DOCUMENT_EMPTY_LIST_EXCEPTION_MESSAGE.equals(exception.getMessage())); } @@ -557,7 +557,7 @@ public void analyzeSentimentBatchEmptyInputList() { @Test public void analyzeSentimentBatchNullInputWithLanguageHint() { Exception exception = assertThrows(NullPointerException.class, () -> - client.analyzeSentimentBatch(null, "en", null)); + client.analyzeSentimentBatch(null, "en", new TextAnalyticsRequestOptions())); assertTrue(INVALID_DOCUMENT_BATCH_NPE_MESSAGE.equals(exception.getMessage())); } @@ -568,7 +568,7 @@ public void analyzeSentimentBatchNullInputWithLanguageHint() { @Test public void analyzeSentimentBatchEmptyInputListWithLanguageHint() { Exception exception = assertThrows(IllegalArgumentException.class, () -> - client.analyzeSentimentBatch(Collections.emptyList(), "en", null)); + client.analyzeSentimentBatch(Collections.emptyList(), "en", new TextAnalyticsRequestOptions())); assertTrue(INVALID_DOCUMENT_EMPTY_LIST_EXCEPTION_MESSAGE.equals(exception.getMessage())); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/ReferencePointerParseTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/ReferencePointerParseTest.java new file mode 100644 index 0000000000000..3b5a2b6d2e919 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/ReferencePointerParseTest.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics; + +import com.azure.ai.textanalytics.implementation.TextAnalyticsClientImpl; +import com.azure.ai.textanalytics.implementation.models.DocumentSentiment; +import com.azure.ai.textanalytics.implementation.models.SentenceOpinion; +import com.azure.ai.textanalytics.implementation.models.SentenceSentiment; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * Unit tests for Aspect relation's reference parse + */ +public class ReferencePointerParseTest { + + @Mock + private TextAnalyticsClientImpl textAnalyticsClientImpl; + + @BeforeEach + void setup() { + MockitoAnnotations.initMocks(this); + } + + @AfterEach + void teardown() { + Mockito.framework().clearInlineMocks(); + } + + private AnalyzeSentimentAsyncClient analyzeSentimentAsyncClient = new AnalyzeSentimentAsyncClient(textAnalyticsClientImpl); + + private static final String INVALID_POINTER_EXCEPTION = "'%s' is not a valid opinion pointer."; + private static final String INVALID_DOCUMENT_INDEX_EXCEPTION = "Invalid document index '%s' in '%s'."; + private static final String INVALID_SENTENCE_INDEX_EXCEPTION = "Invalid sentence index '%s' in '%s'."; + private static final String INVALID_OPINION_INDEX_EXCEPTION = "Invalid opinion index '%s' in '%s'."; + private static final String VALID_OPINION_POINTER = "#/documents/1/sentences/3/opinions/5"; + + @Test + public void parseRefPointerToIndexArrayTest() { + final int[] indexArray = analyzeSentimentAsyncClient.parseRefPointerToIndexArray(VALID_OPINION_POINTER); + assertEquals(1, indexArray[0]); + assertEquals(3, indexArray[1]); + assertEquals(5, indexArray[2]); + } + + @Test + public void parseInvalidNamePatternStringTest() { + final String referencePointer = "#/a/1/b/2/c/3"; + final IllegalStateException illegalStateException = assertThrows(IllegalStateException.class, () -> + analyzeSentimentAsyncClient.parseRefPointerToIndexArray(referencePointer)); + assertEquals(String.format(INVALID_POINTER_EXCEPTION, referencePointer), illegalStateException.getMessage()); + } + + @Test + public void parseInvalidNumberFormatStringTest() { + final String referencePointer = "#/documents/a/sentences/b/opinions/c"; + final IllegalStateException illegalStateException = assertThrows(IllegalStateException.class, () -> + analyzeSentimentAsyncClient.parseRefPointerToIndexArray(referencePointer)); + assertEquals(String.format(INVALID_POINTER_EXCEPTION, referencePointer), illegalStateException.getMessage()); + } + + @Test + public void parseIncompleteReferencePointerStringTest() { + final String referencePointer = "#/documents/1/sentences/2"; + final IllegalStateException illegalStateException = assertThrows(IllegalStateException.class, () -> + analyzeSentimentAsyncClient.parseRefPointerToIndexArray(referencePointer)); + assertEquals(String.format(INVALID_POINTER_EXCEPTION, referencePointer), illegalStateException.getMessage()); + } + + @Test + public void findSentimentOpinion() { + final SentenceOpinion sentenceOpinion = analyzeSentimentAsyncClient.findSentimentOpinion(VALID_OPINION_POINTER, getDocumentSentiments()); + assertEquals(SentenceOpinion.class, sentenceOpinion.getClass()); + } + + @Test + public void findSentimentOpinionWithInvalidDocumentIndex() { + final String referencePointer = "#/documents/2/sentences/1/opinions/1"; + final IllegalStateException illegalStateException = assertThrows(IllegalStateException.class, () -> + analyzeSentimentAsyncClient.findSentimentOpinion(referencePointer, getDocumentSentiments())); + assertEquals(String.format(INVALID_DOCUMENT_INDEX_EXCEPTION, 2, referencePointer), illegalStateException.getMessage()); + } + + @Test + public void findSentimentOpinionWithInvalidSentenceIndex() { + final String referencePointer = "#/documents/1/sentences/4/opinions/1"; + final IllegalStateException illegalStateException = assertThrows(IllegalStateException.class, () -> + analyzeSentimentAsyncClient.findSentimentOpinion(referencePointer, getDocumentSentiments())); + assertEquals(String.format(INVALID_SENTENCE_INDEX_EXCEPTION, 4, referencePointer), illegalStateException.getMessage()); + } + + @Test + public void findSentimentOpinionWithInvalidOpinionIndex() { + final String referencePointer = "#/documents/1/sentences/3/opinions/6"; + final IllegalStateException illegalStateException = assertThrows(IllegalStateException.class, () -> + analyzeSentimentAsyncClient.findSentimentOpinion(referencePointer, getDocumentSentiments())); + assertEquals(String.format(INVALID_OPINION_INDEX_EXCEPTION, 6, referencePointer), illegalStateException.getMessage()); + } + + private List getDocumentSentiments() { + List documentSentiments = new ArrayList<>(); + for (int i = 0; i < 2; i++) { + documentSentiments.add(new DocumentSentiment() + .setId(Integer.toString(i)) + .setSentences(getSentenceSentiments())); + } + return documentSentiments; + } + + private List getSentenceSentiments() { + List sentenceSentiments = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + sentenceSentiments.add(new SentenceSentiment().setOpinions(getSentenceOpinions())); + } + return sentenceSentiments; + } + + private List getSentenceOpinions() { + final List sentenceOpinions = new ArrayList<>(); + for (int i = 0; i < 6; i++) { + sentenceOpinions.add(new SentenceOpinion()); + } + return sentenceOpinions; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java index 7ebb0b86793ec..f364077e39e69 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java @@ -4,34 +4,37 @@ package com.azure.ai.textanalytics; import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; -import com.azure.ai.textanalytics.models.PiiEntity; -import com.azure.ai.textanalytics.models.PiiEntityCollection; -import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; -import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; +import com.azure.ai.textanalytics.models.AspectSentiment; import com.azure.ai.textanalytics.models.CategorizedEntity; import com.azure.ai.textanalytics.models.CategorizedEntityCollection; import com.azure.ai.textanalytics.models.DetectLanguageInput; import com.azure.ai.textanalytics.models.DetectLanguageResult; -import com.azure.ai.textanalytics.util.DetectLanguageResultCollection; import com.azure.ai.textanalytics.models.DetectedLanguage; import com.azure.ai.textanalytics.models.DocumentSentiment; import com.azure.ai.textanalytics.models.EntityCategory; import com.azure.ai.textanalytics.models.ExtractKeyPhraseResult; -import com.azure.ai.textanalytics.util.ExtractKeyPhrasesResultCollection; import com.azure.ai.textanalytics.models.KeyPhrasesCollection; import com.azure.ai.textanalytics.models.LinkedEntity; import com.azure.ai.textanalytics.models.LinkedEntityCollection; import com.azure.ai.textanalytics.models.LinkedEntityMatch; +import com.azure.ai.textanalytics.models.MinedOpinion; +import com.azure.ai.textanalytics.models.OpinionSentiment; +import com.azure.ai.textanalytics.models.PiiEntity; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizeEntitiesResult; -import com.azure.ai.textanalytics.util.RecognizeEntitiesResultCollection; import com.azure.ai.textanalytics.models.RecognizeLinkedEntitiesResult; -import com.azure.ai.textanalytics.util.RecognizeLinkedEntitiesResultCollection; +import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.SentimentConfidenceScores; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; import com.azure.ai.textanalytics.models.TextDocumentInput; import com.azure.ai.textanalytics.models.TextDocumentStatistics; import com.azure.ai.textanalytics.models.TextSentiment; +import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; +import com.azure.ai.textanalytics.util.DetectLanguageResultCollection; +import com.azure.ai.textanalytics.util.ExtractKeyPhrasesResultCollection; +import com.azure.ai.textanalytics.util.RecognizeEntitiesResultCollection; +import com.azure.ai.textanalytics.util.RecognizeLinkedEntitiesResultCollection; import com.azure.ai.textanalytics.util.RecognizePiiEntitiesResultCollection; import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpClient; @@ -50,6 +53,7 @@ import static com.azure.core.test.TestBase.AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL; import static com.azure.core.test.TestBase.getHttpClients; +import static java.util.Arrays.asList; /** * Contains helper methods for generating inputs for test methods @@ -62,45 +66,45 @@ final class TestUtils { static final String FAKE_API_KEY = "1234567890"; static final String AZURE_TEXT_ANALYTICS_API_KEY = "AZURE_TEXT_ANALYTICS_API_KEY"; - static final List SENTIMENT_INPUTS = Arrays.asList("The hotel was dark and unclean. The restaurant had amazing gnocchi.", + static final List SENTIMENT_INPUTS = asList("The hotel was dark and unclean. The restaurant had amazing gnocchi.", "The restaurant had amazing gnocchi. The hotel was dark and unclean."); - static final List CATEGORIZED_ENTITY_INPUTS = Arrays.asList( + static final List CATEGORIZED_ENTITY_INPUTS = asList( "I had a wonderful trip to Seattle last week.", "I work at Microsoft."); - static final List PII_ENTITY_INPUTS = Arrays.asList( + static final List PII_ENTITY_INPUTS = asList( "Microsoft employee with ssn 859-98-0987 is using our awesome API's.", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."); - static final List LINKED_ENTITY_INPUTS = Arrays.asList( + static final List LINKED_ENTITY_INPUTS = asList( "I had a wonderful trip to Seattle last week.", "I work at Microsoft."); - static final List KEY_PHRASE_INPUTS = Arrays.asList( + static final List KEY_PHRASE_INPUTS = asList( "Hello world. This is some input text that I love.", "Bonjour tout le monde"); static final String TOO_LONG_INPUT = "Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmostdoesn'tseemtostopatanygivenpointintime.ThereasonforthistestistotryandseewhathappenswhenwesubmitaveryveryverylongtexttoLanguage.Thisshouldworkjustfinebutjustincaseitisalwaysgoodtohaveatestcase.ThisallowsustotestwhathappensifitisnotOK.Ofcourseitisgoingtobeokbutthenagainitisalsobettertobesure!"; - static final List KEY_PHRASE_FRENCH_INPUTS = Arrays.asList( + static final List KEY_PHRASE_FRENCH_INPUTS = asList( "Bonjour tout le monde.", "Je m'appelle Mondly."); - static final List DETECT_LANGUAGE_INPUTS = Arrays.asList( + static final List DETECT_LANGUAGE_INPUTS = asList( "This is written in English", "Este es un documento escrito en Español.", "~@!~:)"); // "personal" and "social" are common to both English and Spanish and if given with limited context the // response will be based on the "US" country hint. If the origin of the text is known to be coming from // Spanish that can be given as a hint. - static final List SPANISH_SAME_AS_ENGLISH_INPUTS = Arrays.asList("personal", "social"); + static final List SPANISH_SAME_AS_ENGLISH_INPUTS = asList("personal", "social"); static final DetectedLanguage DETECTED_LANGUAGE_SPANISH = new DetectedLanguage("Spanish", "es", 1.0, null); static final DetectedLanguage DETECTED_LANGUAGE_ENGLISH = new DetectedLanguage("English", "en", 1.0, null); - static final List DETECT_SPANISH_LANGUAGE_RESULTS = Arrays.asList( + static final List DETECT_SPANISH_LANGUAGE_RESULTS = asList( DETECTED_LANGUAGE_SPANISH, DETECTED_LANGUAGE_SPANISH); - static final List DETECT_ENGLISH_LANGUAGE_RESULTS = Arrays.asList( + static final List DETECT_ENGLISH_LANGUAGE_RESULTS = asList( DETECTED_LANGUAGE_ENGLISH, DETECTED_LANGUAGE_ENGLISH); static final HttpResponseException HTTP_RESPONSE_EXCEPTION_CLASS = new HttpResponseException("", null); @@ -110,7 +114,7 @@ final class TestUtils { "AZURE_TEXT_ANALYTICS_TEST_SERVICE_VERSIONS"; static List getDetectLanguageInputs() { - return Arrays.asList( + return asList( new DetectLanguageInput("0", DETECT_LANGUAGE_INPUTS.get(0), "US"), new DetectLanguageInput("1", DETECT_LANGUAGE_INPUTS.get(1), "US"), new DetectLanguageInput("2", DETECT_LANGUAGE_INPUTS.get(2), "US") @@ -118,14 +122,14 @@ static List getDetectLanguageInputs() { } static List getDuplicateIdDetectLanguageInputs() { - return Arrays.asList( + return asList( new DetectLanguageInput("0", DETECT_LANGUAGE_INPUTS.get(0), "US"), new DetectLanguageInput("0", DETECT_LANGUAGE_INPUTS.get(0), "US") ); } static List getDuplicateTextDocumentInputs() { - return Arrays.asList( + return asList( new TextDocumentInput("0", CATEGORIZED_ENTITY_INPUTS.get(0)), new TextDocumentInput("0", CATEGORIZED_ENTITY_INPUTS.get(0)), new TextDocumentInput("0", CATEGORIZED_ENTITY_INPUTS.get(0)) @@ -133,7 +137,7 @@ static List getDuplicateTextDocumentInputs() { } static List getWarningsTextDocumentInputs() { - return Arrays.asList( + return asList( new TextDocumentInput("0", TOO_LONG_INPUT), new TextDocumentInput("1", CATEGORIZED_ENTITY_INPUTS.get(1)) ); @@ -153,7 +157,7 @@ static List getTextDocumentInputs(List inputs) { */ static DetectLanguageResultCollection getExpectedBatchDetectedLanguages() { final TextDocumentBatchStatistics textDocumentBatchStatistics = new TextDocumentBatchStatistics(3, 3, 0, 3); - final List detectLanguageResultList = Arrays.asList( + final List detectLanguageResultList = asList( new DetectLanguageResult("0", new TextDocumentStatistics(26, 1), null, getDetectedLanguageEnglish()), new DetectLanguageResult("1", new TextDocumentStatistics(40, 1), null, getDetectedLanguageSpanish()), new DetectLanguageResult("2", new TextDocumentStatistics(6, 1), null, getUnknownDetectedLanguage())); @@ -179,7 +183,7 @@ static DetectedLanguage getUnknownDetectedLanguage() { */ static RecognizeEntitiesResultCollection getExpectedBatchCategorizedEntities() { return new RecognizeEntitiesResultCollection( - Arrays.asList(getExpectedBatchCategorizedEntities1(), getExpectedBatchCategorizedEntities2()), + asList(getExpectedBatchCategorizedEntities1(), getExpectedBatchCategorizedEntities2()), DEFAULT_MODEL_VERSION, new TextDocumentBatchStatistics(2, 2, 0, 2)); } @@ -191,14 +195,14 @@ static List getCategorizedEntitiesList1() { CategorizedEntity categorizedEntity1 = new CategorizedEntity("trip", EntityCategory.EVENT, null, 0.0, 18, 4); CategorizedEntity categorizedEntity2 = new CategorizedEntity("Seattle", EntityCategory.LOCATION, "GPE", 0.0, 26, 7); CategorizedEntity categorizedEntity3 = new CategorizedEntity("last week", EntityCategory.DATE_TIME, "DateRange", 0.0, 34, 9); - return Arrays.asList(categorizedEntity1, categorizedEntity2, categorizedEntity3); + return asList(categorizedEntity1, categorizedEntity2, categorizedEntity3); } /** * Helper method to get the expected Categorized Entities List 2 */ static List getCategorizedEntitiesList2() { - return Arrays.asList(new CategorizedEntity("Microsoft", EntityCategory.ORGANIZATION, null, 0.0, 10, 9)); + return asList(new CategorizedEntity("Microsoft", EntityCategory.ORGANIZATION, null, 0.0, 10, 9)); } /** @@ -233,7 +237,7 @@ static RecognizePiiEntitiesResultCollection getExpectedBatchPiiEntities() { RecognizePiiEntitiesResult recognizeEntitiesResult2 = new RecognizePiiEntitiesResult("1", textDocumentStatistics2, null, piiEntityCollection2); return new RecognizePiiEntitiesResultCollection( - Arrays.asList(recognizeEntitiesResult1, recognizeEntitiesResult2), + asList(recognizeEntitiesResult1, recognizeEntitiesResult2), DEFAULT_MODEL_VERSION, new TextDocumentBatchStatistics(2, 2, 0, 2)); } @@ -244,7 +248,7 @@ static RecognizePiiEntitiesResultCollection getExpectedBatchPiiEntities() { static List getPiiEntitiesList1() { PiiEntity piiEntity0 = new PiiEntity("Microsoft", EntityCategory.ORGANIZATION, null, 1.0, 0, 9); PiiEntity piiEntity1 = new PiiEntity("859-98-0987", EntityCategory.fromString("U.S. Social Security Number (SSN)"), null, 0.65, 28, 11); - return Arrays.asList(piiEntity0, piiEntity1); + return asList(piiEntity0, piiEntity1); } /** @@ -255,7 +259,7 @@ static List getPiiEntitiesList2() { PiiEntity piiEntity3 = new PiiEntity("111000025", EntityCategory.fromString("ABA Routing Number"), null, 0.75, 18, 9); PiiEntity piiEntity4 = new PiiEntity("111000025", EntityCategory.fromString("New Zealand Social Welfare Number"), null, 0.65, 18, 9); PiiEntity piiEntity5 = new PiiEntity("111000025", EntityCategory.fromString("Portugal Tax Identification Number"), null, 0.65, 18, 9); - return Arrays.asList(piiEntity2, piiEntity3, piiEntity4, piiEntity5); + return asList(piiEntity2, piiEntity3, piiEntity4, piiEntity5); } /** @@ -265,7 +269,7 @@ static List getPiiEntitiesList2() { static RecognizeLinkedEntitiesResultCollection getExpectedBatchLinkedEntities() { final TextDocumentBatchStatistics textDocumentBatchStatistics = new TextDocumentBatchStatistics(2, 2, 0, 2); final List recognizeLinkedEntitiesResultList = - Arrays.asList( + asList( new RecognizeLinkedEntitiesResult( "0", new TextDocumentStatistics(44, 1), null, new LinkedEntityCollection(new IterableStream<>(getLinkedEntitiesList1()), null)), @@ -284,7 +288,7 @@ static List getLinkedEntitiesList1() { "Seattle", new IterableStream<>(Collections.singletonList(linkedEntityMatch)), "en", "Seattle", "https://en.wikipedia.org/wiki/Seattle", "Wikipedia"); - return Arrays.asList(linkedEntity); + return asList(linkedEntity); } /** @@ -296,58 +300,89 @@ static List getLinkedEntitiesList2() { "Microsoft", new IterableStream<>(Collections.singletonList(linkedEntityMatch)), "en", "Microsoft", "https://en.wikipedia.org/wiki/Microsoft", "Wikipedia"); - return Arrays.asList(linkedEntity); + return asList(linkedEntity); } /** - * Helper method to get the expected Batch Key Phrases - * @return + * Helper method to get the expected Batch Key Phrases. */ static ExtractKeyPhrasesResultCollection getExpectedBatchKeyPhrases() { TextDocumentStatistics textDocumentStatistics1 = new TextDocumentStatistics(49, 1); TextDocumentStatistics textDocumentStatistics2 = new TextDocumentStatistics(21, 1); - ExtractKeyPhraseResult extractKeyPhraseResult1 = new ExtractKeyPhraseResult("0", textDocumentStatistics1, null, new KeyPhrasesCollection(new IterableStream<>(Arrays.asList("input text", "world")), null)); + ExtractKeyPhraseResult extractKeyPhraseResult1 = new ExtractKeyPhraseResult("0", textDocumentStatistics1, null, new KeyPhrasesCollection(new IterableStream<>(asList("input text", "world")), null)); ExtractKeyPhraseResult extractKeyPhraseResult2 = new ExtractKeyPhraseResult("1", textDocumentStatistics2, null, new KeyPhrasesCollection(new IterableStream<>(Collections.singletonList("monde")), null)); TextDocumentBatchStatistics textDocumentBatchStatistics = new TextDocumentBatchStatistics(2, 2, 0, 2); - List extractKeyPhraseResultList = Arrays.asList(extractKeyPhraseResult1, extractKeyPhraseResult2); + List extractKeyPhraseResultList = asList(extractKeyPhraseResult1, extractKeyPhraseResult2); return new ExtractKeyPhrasesResultCollection(extractKeyPhraseResultList, DEFAULT_MODEL_VERSION, textDocumentBatchStatistics); } /** * Helper method to get the expected Batch Text Sentiments - * @return */ static AnalyzeSentimentResultCollection getExpectedBatchTextSentiment() { final TextDocumentStatistics textDocumentStatistics = new TextDocumentStatistics(67, 1); - - final DocumentSentiment expectedDocumentSentiment = new DocumentSentiment(TextSentiment.MIXED, - new SentimentConfidenceScores(0.0, 0.0, 0.0), - new IterableStream<>(Arrays.asList( - new SentenceSentiment("", TextSentiment.NEGATIVE, new SentimentConfidenceScores(0.0, 0.0, 0.0)), - new SentenceSentiment("", TextSentiment.POSITIVE, new SentimentConfidenceScores(0.0, 0.0, 0.0)) - )), null); - - final DocumentSentiment expectedDocumentSentiment2 = new DocumentSentiment(TextSentiment.MIXED, - new SentimentConfidenceScores(0.0, 0.0, 0.0), - new IterableStream<>(Arrays.asList( - new SentenceSentiment("", TextSentiment.POSITIVE, new SentimentConfidenceScores(0.0, 0.0, 0.0)), - new SentenceSentiment("", TextSentiment.NEGATIVE, new SentimentConfidenceScores(0.0, 0.0, 0.0)) - )), null); - final AnalyzeSentimentResult analyzeSentimentResult1 = new AnalyzeSentimentResult("0", - textDocumentStatistics, null, expectedDocumentSentiment); - + textDocumentStatistics, null, getExpectedDocumentSentiment()); final AnalyzeSentimentResult analyzeSentimentResult2 = new AnalyzeSentimentResult("1", - textDocumentStatistics, null, expectedDocumentSentiment2); + textDocumentStatistics, null, getExpectedDocumentSentiment2()); return new AnalyzeSentimentResultCollection( - Arrays.asList(analyzeSentimentResult1, analyzeSentimentResult2), + asList(analyzeSentimentResult1, analyzeSentimentResult2), DEFAULT_MODEL_VERSION, new TextDocumentBatchStatistics(2, 2, 0, 2)); } + /** + * Helper method that get the first expected DocumentSentiment result. + */ + static DocumentSentiment getExpectedDocumentSentiment() { + return new DocumentSentiment(TextSentiment.MIXED, + new SentimentConfidenceScores(0.0, 0.0, 0.0), + new IterableStream<>(asList( + new SentenceSentiment("The hotel was dark and unclean.", TextSentiment.NEGATIVE, + new IterableStream<>(asList(new MinedOpinion( + new AspectSentiment("hotel", TextSentiment.NEGATIVE, 4, 5, new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new IterableStream<>(asList( + new OpinionSentiment("dark", TextSentiment.NEGATIVE, 14, 4, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new OpinionSentiment("unclean", TextSentiment.NEGATIVE, 23, 7, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)) + ))))), + new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new SentenceSentiment("The restaurant had amazing gnocchi.", TextSentiment.POSITIVE, + new IterableStream<>(asList(new MinedOpinion( + new AspectSentiment("gnocchi", TextSentiment.POSITIVE, 59, 7, new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new IterableStream<>(asList( + new OpinionSentiment("amazing", TextSentiment.POSITIVE, 51, 7, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)) + ))))), + new SentimentConfidenceScores(0.0, 0.0, 0.0)) + )), null); + } + + /** + * Helper method that get the second expected DocumentSentiment result. + */ + static DocumentSentiment getExpectedDocumentSentiment2() { + return new DocumentSentiment(TextSentiment.MIXED, + new SentimentConfidenceScores(0.0, 0.0, 0.0), + new IterableStream<>(asList( + new SentenceSentiment("The restaurant had amazing gnocchi.", TextSentiment.POSITIVE, + new IterableStream<>(asList(new MinedOpinion( + new AspectSentiment("gnocchi", TextSentiment.POSITIVE, 27, 7, new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new IterableStream<>(asList( + new OpinionSentiment("amazing", TextSentiment.POSITIVE, 19, 7, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)) + ))))), + new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new SentenceSentiment("The hotel was dark and unclean.", TextSentiment.NEGATIVE, + new IterableStream<>(asList(new MinedOpinion( + new AspectSentiment("hotel", TextSentiment.NEGATIVE, 40, 5, new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new IterableStream<>(asList( + new OpinionSentiment("dark", TextSentiment.NEGATIVE, 50, 4, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new OpinionSentiment("unclean", TextSentiment.NEGATIVE, 59, 7, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)) + ))))), + new SentimentConfidenceScores(0.0, 0.0, 0.0)) + )), null); + } /** * Returns a stream of arguments that includes all combinations of eligible {@link HttpClient HttpClients} and diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java index e0eccd8773b68..6c04ff9158fc5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java @@ -3,11 +3,13 @@ package com.azure.ai.textanalytics; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; import com.azure.ai.textanalytics.models.DocumentSentiment; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.SentimentConfidenceScores; import com.azure.ai.textanalytics.models.TextAnalyticsError; import com.azure.ai.textanalytics.models.TextAnalyticsException; +import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextSentiment; import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpClient; @@ -32,6 +34,7 @@ import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchLinkedEntities; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchPiiEntities; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchTextSentiment; +import static com.azure.ai.textanalytics.TestUtils.getExpectedDocumentSentiment; import static com.azure.ai.textanalytics.TestUtils.getLinkedEntitiesList1; import static com.azure.ai.textanalytics.TestUtils.getPiiEntitiesList1; import static com.azure.ai.textanalytics.TestUtils.getUnknownDetectedLanguage; @@ -794,16 +797,38 @@ public void extractKeyPhrasesBatchTooManyDocuments(HttpClient httpClient, TextAn @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForTextInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); - final DocumentSentiment expectedDocumentSentiment = new DocumentSentiment(TextSentiment.MIXED, - new SentimentConfidenceScores(0.0, 0.0, 0.0), - new IterableStream<>(Arrays.asList( - new SentenceSentiment("", TextSentiment.NEGATIVE, new SentimentConfidenceScores(0.0, 0.0, 0.0)), - new SentenceSentiment("", TextSentiment.POSITIVE, new SentimentConfidenceScores(0.0, 0.0, 0.0)) - )), null); + analyzeSentimentForSingleTextInputRunner(input -> + StepVerifier.create(client.analyzeSentiment(input)) + .assertNext(response -> validateAnalyzedSentiment(false, getExpectedDocumentSentiment(), response)) + .verifyComplete() + ); + } - StepVerifier - .create(client.analyzeSentiment("The hotel was dark and unclean. The restaurant had amazing gnocchi.")) - .assertNext(response -> validateAnalyzedSentiment(expectedDocumentSentiment, response)).verifyComplete(); + /** + * Test analyzing sentiment for a string input with default language hint. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForTextInputWithDefaultLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + analyzeSentimentForSingleTextInputRunner(input -> + StepVerifier.create(client.analyzeSentiment(input, null)) + .assertNext(response -> validateAnalyzedSentiment(false, getExpectedDocumentSentiment(), response)) + .verifyComplete() + ); + } + + /** + * Test analyzing sentiment for a string input and verifying the result of opinion mining. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForTextInputWithOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + analyzeSentimentForTextInputWithOpinionMiningRunner((input, options) -> + StepVerifier.create(client.analyzeSentiment(input, "en", options)) + .assertNext(response -> validateAnalyzedSentiment(true, getExpectedDocumentSentiment(), response)) + .verifyComplete()); } /** @@ -813,10 +838,11 @@ public void analyzeSentimentForTextInput(HttpClient httpClient, TextAnalyticsSer @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); - StepVerifier.create(client.analyzeSentiment("")) - .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) - .verify(); + emptyTextRunner(input -> + StepVerifier.create(client.analyzeSentiment(input)) + .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException + && INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE.equals(throwable.getMessage())) + .verify()); } /** @@ -826,16 +852,18 @@ public void analyzeSentimentForEmptyText(HttpClient httpClient, TextAnalyticsSer @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForFaultyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); - final DocumentSentiment expectedDocumentSentiment = new DocumentSentiment( - TextSentiment.NEUTRAL, - new SentimentConfidenceScores(0.0, 0.0, 0.0), - new IterableStream<>(Arrays.asList( - new SentenceSentiment("", TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0)), - new SentenceSentiment("", TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0)) - )), null); - - StepVerifier.create(client.analyzeSentiment("!@#%%")) - .assertNext(response -> validateAnalyzedSentiment(expectedDocumentSentiment, response)).verifyComplete(); + faultyTextRunner(input -> { + final DocumentSentiment expectedDocumentSentiment = new DocumentSentiment( + TextSentiment.NEUTRAL, + new SentimentConfidenceScores(0.0, 0.0, 0.0), + new IterableStream<>(Arrays.asList( + new SentenceSentiment("!", TextSentiment.NEUTRAL, null, new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new SentenceSentiment("@#%%", TextSentiment.NEUTRAL, null, new SentimentConfidenceScores(0.0, 0.0, 0.0)) + )), null); + StepVerifier.create(client.analyzeSentiment(input)) + .assertNext(response -> validateAnalyzedSentiment(false, expectedDocumentSentiment, response)) + .verifyComplete(); + }); } /** @@ -846,7 +874,7 @@ public void analyzeSentimentForFaultyText(HttpClient httpClient, TextAnalyticsSe public void analyzeSentimentDuplicateIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); analyzeBatchSentimentDuplicateIdRunner(inputs -> - StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, null)) + StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, new TextAnalyticsRequestOptions())) .verifyErrorSatisfies(ex -> assertEquals(HttpResponseException.class, ex.getClass()))); } @@ -870,67 +898,195 @@ public void analyzeSentimentEmptyIdInput(HttpClient httpClient, TextAnalyticsSer } /** - * Test analyzing sentiment for a list of string input. + * Verify that the collection result excludes request statistics and mined options when given a batch of + * String documents with null TextAnalyticsRequestOptions and null language code which will use the default language + * code, 'en'. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatch(Iterable, String, TextAnalyticsRequestOptions)} + * which TextAnalyticsRequestOptions is null and null language code which will use the default language code, 'en'. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForBatchStringInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); analyzeSentimentStringInputRunner(inputs -> - StepVerifier.create(client.analyzeSentimentBatch(inputs, null, null)) - .assertNext(response -> validateSentimentResultCollection(false, getExpectedBatchTextSentiment(), response)) + StepVerifier.create(client.analyzeSentimentBatch(inputs, null, new TextAnalyticsRequestOptions())) + .assertNext(response -> validateSentimentResultCollection(false, false, getExpectedBatchTextSentiment(), response)) .verifyComplete()); } /** - * Test analyzing sentiment for a list of string input with language code. + * Verify that the collection result excludes request statistics and mined options when given a batch of + * String documents with null TextAnalyticsRequestOptions and given a language code. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatch(Iterable, String, TextAnalyticsRequestOptions)} + * which TextAnalyticsRequestOptions is null and given a language code. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") - public void analyzeSentimentForListLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + public void analyzeSentimentForListStringWithLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); analyzeSentimentLanguageHintRunner((inputs, language) -> - StepVerifier.create(client.analyzeSentimentBatch(inputs, language, null)) - .assertNext(response -> validateSentimentResultCollection(false, getExpectedBatchTextSentiment(), response)) + StepVerifier.create(client.analyzeSentimentBatch(inputs, language, new TextAnalyticsRequestOptions())) + .assertNext(response -> validateSentimentResultCollection(false, false, getExpectedBatchTextSentiment(), response)) .verifyComplete()); } /** - * Test analyzing sentiment for a list of string input with request options. + * Verify that the collection result includes request statistics but not mined options when given a batch of + * String documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatch(Iterable, String, AnalyzeSentimentOptions)} + * which to show the request statistics only and verify the analyzed sentiment result. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") - public void analyzeSentimentForListStringWithOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + public void analyzeSentimentForListStringShowStatisticsExcludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); - analyzeBatchStringSentimentShowStatsRunner((inputs, options) -> + analyzeBatchStringSentimentShowStatsAndIncludeOpinionMiningRunner((inputs, options) -> + StepVerifier.create(client.analyzeSentimentBatch(inputs, null, options.setIncludeOpinionMining(false))) + .assertNext(response -> validateSentimentResultCollection(true, false, getExpectedBatchTextSentiment(), response)) + .verifyComplete()); + } + + /** + * Verify that the collection result includes mined options but not request statistics when given a batch of + * String documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatch(Iterable, String, AnalyzeSentimentOptions)} + * which AnalyzeSentimentOptions includes opinion mining and request statistics. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + analyzeBatchStringSentimentShowStatsAndIncludeOpinionMiningRunner((inputs, options) -> { + options.setIncludeStatistics(false); StepVerifier.create(client.analyzeSentimentBatch(inputs, null, options)) - .assertNext(response -> validateSentimentResultCollection(true, getExpectedBatchTextSentiment(), response)) + .assertNext(response -> validateSentimentResultCollection(false, true, getExpectedBatchTextSentiment(), response)) + .verifyComplete(); + }); + } + + /** + * Verify that the collection result includes mined options and request statistics when given a batch of + * String documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatch(Iterable, String, AnalyzeSentimentOptions)} + * which AnalyzeSentimentOptions includes opinion mining and request statistics. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + analyzeBatchStringSentimentShowStatsAndIncludeOpinionMiningRunner((inputs, options) -> + StepVerifier.create(client.analyzeSentimentBatch(inputs, null, options)) + .assertNext(response -> validateSentimentResultCollection(true, true, getExpectedBatchTextSentiment(), response)) .verifyComplete()); } /** - * Test analyzing sentiment for a batch of documents. + * Verify that the collection result excludes request statistics and mined options when given a batch of + * TextDocumentInput documents with null TextAnalyticsRequestOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatchWithResponse(Iterable, TextAnalyticsRequestOptions)} + * which TextAnalyticsRequestOptions is null. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") - public void analyzeSentimentForBatchInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + public void analyzeSentimentForBatchInputWithNullRequestOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); analyzeBatchSentimentRunner(inputs -> - StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, null)) - .assertNext(response -> validateSentimentResultCollectionWithResponse(false, getExpectedBatchTextSentiment(), 200, response)) + StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, (TextAnalyticsRequestOptions) null)) + .assertNext(response -> validateSentimentResultCollectionWithResponse(false, false, getExpectedBatchTextSentiment(), 200, response)) .verifyComplete()); } /** - * Verify that we can get statistics on the collection result when given a batch of documents with options. + * Verify that we can get statistics on the collection result when given a batch of + * TextDocumentInput documents with TextAnalyticsRequestOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatchWithResponse(Iterable, TextAnalyticsRequestOptions)} + * which TextAnalyticsRequestOptions includes request statistics. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForBatchInputShowStatistics(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); - analyzeBatchSentimentShowStatsRunner((inputs, options) -> + analyzeBatchSentimentShowStatsRunner((inputs, requestOptions) -> + StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, requestOptions)) + .assertNext(response -> validateSentimentResultCollectionWithResponse(true, false, getExpectedBatchTextSentiment(), 200, response)) + .verifyComplete()); + } + + /** + * Verify that the collection result excludes request statistics and mined options when given a batch of + * TextDocumentInput documents with null AnalyzeSentimentOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions)} + * which AnalyzeSentimentOptions is null. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + analyzeBatchSentimentOpinionMining((inputs, options) -> + StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, (AnalyzeSentimentOptions) null)) + .assertNext(response -> validateSentimentResultCollectionWithResponse(false, false, getExpectedBatchTextSentiment(), 200, response)) + .verifyComplete()); + } + + /** + * Verify that the collection result includes request statistics but not mined options when given a batch of + * TextDocumentInput documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions)} + * which AnalyzeSentimentOptions includes request statistics but not opinion mining. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + analyzeBatchSentimentOpinionMining((inputs, options) -> + StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, options.setIncludeOpinionMining(false))) + .assertNext(response -> validateSentimentResultCollectionWithResponse(true, false, getExpectedBatchTextSentiment(), 200, response)) + .verifyComplete()); + } + + /** + * Verify that the collection result includes mined options but not request statistics when given a batch of + * TextDocumentInput documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions)} + * which AnalyzeSentimentOptions includes opinion mining but not request statistics. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + analyzeBatchSentimentOpinionMining((inputs, options) -> { + options.setIncludeStatistics(false); + StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, options)) + .assertNext(response -> + validateSentimentResultCollectionWithResponse(false, true, getExpectedBatchTextSentiment(), 200, response)) + .verifyComplete(); + }); + } + + /** + * Verify that the collection result includes mined options and request statistics when given a batch of + * TextDocumentInput documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsAsyncClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions)} + * which AnalyzeSentimentOptions includes opinion mining and request statistics. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + analyzeBatchSentimentOpinionMining((inputs, options) -> StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, options)) - .assertNext(response -> validateSentimentResultCollectionWithResponse(true, getExpectedBatchTextSentiment(), 200, response)) + .assertNext(response -> validateSentimentResultCollectionWithResponse(true, true, getExpectedBatchTextSentiment(), 200, response)) .verifyComplete()); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java index c797f2cf76ca9..fc573227a3423 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java @@ -3,6 +3,7 @@ package com.azure.ai.textanalytics; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; import com.azure.ai.textanalytics.models.CategorizedEntity; import com.azure.ai.textanalytics.models.DocumentSentiment; import com.azure.ai.textanalytics.models.LinkedEntity; @@ -11,6 +12,7 @@ import com.azure.ai.textanalytics.models.SentimentConfidenceScores; import com.azure.ai.textanalytics.models.TextAnalyticsError; import com.azure.ai.textanalytics.models.TextAnalyticsException; +import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextSentiment; import com.azure.ai.textanalytics.util.RecognizeEntitiesResultCollection; import com.azure.ai.textanalytics.util.RecognizePiiEntitiesResultCollection; @@ -37,6 +39,7 @@ import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchLinkedEntities; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchPiiEntities; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchTextSentiment; +import static com.azure.ai.textanalytics.TestUtils.getExpectedDocumentSentiment; import static com.azure.ai.textanalytics.TestUtils.getLinkedEntitiesList1; import static com.azure.ai.textanalytics.TestUtils.getPiiEntitiesList1; import static com.azure.ai.textanalytics.TestUtils.getUnknownDetectedLanguage; @@ -299,7 +302,7 @@ public void recognizeEntitiesForBatchInput(HttpClient httpClient, TextAnalyticsS public void recognizeEntitiesForBatchInputShowStatistics(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); recognizeBatchCategorizedEntitiesShowStatsRunner((inputs, options) -> - validateCategorizedEntitiesResultCollectionWithResponse(false, getExpectedBatchCategorizedEntities(), 200, + validateCategorizedEntitiesResultCollectionWithResponse(true, getExpectedBatchCategorizedEntities(), 200, client.recognizeEntitiesBatchWithResponse(inputs, options, Context.NONE)) ); } @@ -328,7 +331,7 @@ public void recognizeEntitiesForListLanguageHint(HttpClient httpClient, TextAnal public void recognizeEntitiesForListWithOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); recognizeStringBatchCategorizedEntitiesShowStatsRunner((inputs, options) -> - validateCategorizedEntitiesResultCollection(false, getExpectedBatchCategorizedEntities(), + validateCategorizedEntitiesResultCollection(true, getExpectedBatchCategorizedEntities(), client.recognizeEntitiesBatch(inputs, null, options)) ); } @@ -730,17 +733,36 @@ public void extractKeyPhrasesBatchTooManyDocuments(HttpClient httpClient, TextAn @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForTextInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); - final DocumentSentiment expectedDocumentSentiment = new DocumentSentiment( - TextSentiment.MIXED, - new SentimentConfidenceScores(0.0, 0.0, 0.0), - new IterableStream<>(Arrays.asList( - new SentenceSentiment("", TextSentiment.NEGATIVE, new SentimentConfidenceScores(0.0, 0.0, 0.0)), - new SentenceSentiment("", TextSentiment.POSITIVE, new SentimentConfidenceScores(0.0, 0.0, 0.0)) - )), null); - DocumentSentiment analyzeSentimentResult = - client.analyzeSentiment("The hotel was dark and unclean. The restaurant had amazing gnocchi."); + analyzeSentimentForSingleTextInputRunner(input -> { + validateAnalyzedSentiment(false, getExpectedDocumentSentiment(), client.analyzeSentiment(input)); + }); + } - validateAnalyzedSentiment(expectedDocumentSentiment, analyzeSentimentResult); + /** + * Test analyzing sentiment for a string input with default language hint. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForTextInputWithDefaultLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + analyzeSentimentForSingleTextInputRunner(input -> { + final DocumentSentiment analyzeSentimentResult = client.analyzeSentiment(input, null); + validateAnalyzedSentiment(false, getExpectedDocumentSentiment(), analyzeSentimentResult); + }); + } + + /** + * Test analyzing sentiment for a string input and verifying the result of opinion mining. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForTextInputWithOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + analyzeSentimentForTextInputWithOpinionMiningRunner((input, options) -> { + final DocumentSentiment analyzeSentimentResult = + client.analyzeSentiment(input, "en", options); + validateAnalyzedSentiment(true, getExpectedDocumentSentiment(), analyzeSentimentResult); + }); } /** @@ -750,8 +772,10 @@ public void analyzeSentimentForTextInput(HttpClient httpClient, TextAnalyticsSer @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); - Exception exception = assertThrows(TextAnalyticsException.class, () -> client.analyzeSentiment("")); - assertTrue(exception.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + emptyTextRunner(input -> { + final Exception exception = assertThrows(TextAnalyticsException.class, () -> client.analyzeSentiment(input)); + assertEquals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE, exception.getMessage()); + }); } /** @@ -761,16 +785,16 @@ public void analyzeSentimentForEmptyText(HttpClient httpClient, TextAnalyticsSer @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForFaultyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); - final DocumentSentiment expectedDocumentSentiment = new DocumentSentiment(TextSentiment.NEUTRAL, - new SentimentConfidenceScores(0.0, 0.0, 0.0), - new IterableStream<>(Arrays.asList( - new SentenceSentiment("", TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0)), - new SentenceSentiment("", TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0)) - )), null); - - DocumentSentiment analyzeSentimentResult = client.analyzeSentiment("!@#%%"); - - validateAnalyzedSentiment(expectedDocumentSentiment, analyzeSentimentResult); + faultyTextRunner(input -> { + final DocumentSentiment expectedDocumentSentiment = new DocumentSentiment( + TextSentiment.NEUTRAL, + new SentimentConfidenceScores(0.0, 0.0, 0.0), + new IterableStream<>(Arrays.asList( + new SentenceSentiment("!", TextSentiment.NEUTRAL, null, new SentimentConfidenceScores(0.0, 0.0, 0.0)), + new SentenceSentiment("@#%%", TextSentiment.NEUTRAL, null, new SentimentConfidenceScores(0.0, 0.0, 0.0)) + )), null); + validateAnalyzedSentiment(false, expectedDocumentSentiment, client.analyzeSentiment(input)); + }); } /** @@ -782,7 +806,7 @@ public void analyzeSentimentDuplicateIdInput(HttpClient httpClient, TextAnalytic client = getTextAnalyticsClient(httpClient, serviceVersion); analyzeBatchSentimentDuplicateIdRunner(inputs -> { HttpResponseException response = assertThrows(HttpResponseException.class, - () -> client.analyzeSentimentBatchWithResponse(inputs, null, Context.NONE)); + () -> client.analyzeSentimentBatchWithResponse(inputs, new TextAnalyticsRequestOptions(), Context.NONE)); assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, response.getResponse().getStatusCode()); }); } @@ -806,62 +830,183 @@ public void analyzeSentimentEmptyIdInput(HttpClient httpClient, TextAnalyticsSer } /** - * Test analyzing sentiment for a list of string input. + * Verify that the collection result excludes request statistics and mined options when given a batch of + * String documents with null TextAnalyticsRequestOptions and null language code which will use the default language + * code, 'en'. + * + * {@link TextAnalyticsClient#analyzeSentimentBatch(Iterable, String, TextAnalyticsRequestOptions)} + * which TextAnalyticsRequestOptions is null and null language code which will use the default language code, 'en'. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForBatchStringInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); analyzeSentimentStringInputRunner(inputs -> - validateSentimentResultCollection(false, getExpectedBatchTextSentiment(), - client.analyzeSentimentBatch(inputs, null, null))); + validateSentimentResultCollection(false, false, getExpectedBatchTextSentiment(), + client.analyzeSentimentBatch(inputs, null, new TextAnalyticsRequestOptions()))); } /** - * Test analyzing sentiment for a list of string input with language code. + * Verify that the collection result excludes request statistics and mined options when given a batch of + * String documents with null TextAnalyticsRequestOptions and given a language code. + * + * {@link TextAnalyticsClient#analyzeSentimentBatch(Iterable, String, TextAnalyticsRequestOptions)} + * which TextAnalyticsRequestOptions is null and given a language code. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") - public void analyzeSentimentForListLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + public void analyzeSentimentForListStringWithLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); analyzeSentimentLanguageHintRunner((inputs, language) -> - validateSentimentResultCollection(false, getExpectedBatchTextSentiment(), - client.analyzeSentimentBatch(inputs, language, null))); + validateSentimentResultCollection(false, false, getExpectedBatchTextSentiment(), + client.analyzeSentimentBatch(inputs, language, new TextAnalyticsRequestOptions()))); + } + + /** + * Verify that the collection result includes request statistics but not mined options when given a batch of + * String documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatch(Iterable, String, AnalyzeSentimentOptions)} + * which to show the request statistics only and verify the analyzed sentiment result. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForListStringShowStatisticsExcludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + analyzeBatchStringSentimentShowStatsAndIncludeOpinionMiningRunner((inputs, options) -> + validateSentimentResultCollection(true, false, getExpectedBatchTextSentiment(), + client.analyzeSentimentBatch(inputs, null, options.setIncludeOpinionMining(false)))); + } + + /** + * Verify that the collection result includes mined options but not request statistics when given a batch of + * String documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatch(Iterable, String, AnalyzeSentimentOptions)} + * which AnalyzeSentimentOptions includes opinion mining and request statistics. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + analyzeBatchStringSentimentShowStatsAndIncludeOpinionMiningRunner((inputs, options) -> { + options.setIncludeStatistics(false); + validateSentimentResultCollection(false, true, getExpectedBatchTextSentiment(), + client.analyzeSentimentBatch(inputs, null, options)); + }); } /** - * Verify that we can get statistics on the collection result when given a batch of documents with request options. + * Verify that the collection result includes mined options and request statistics when given a batch of + * String documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatch(Iterable, String, AnalyzeSentimentOptions)} + * which AnalyzeSentimentOptions includes opinion mining and request statistics. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") - public void analyzeSentimentForListStringWithOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + public void analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); - analyzeBatchStringSentimentShowStatsRunner((inputs, options) -> - validateSentimentResultCollection(true, getExpectedBatchTextSentiment(), + analyzeBatchStringSentimentShowStatsAndIncludeOpinionMiningRunner((inputs, options) -> + validateSentimentResultCollection(true, true, getExpectedBatchTextSentiment(), client.analyzeSentimentBatch(inputs, null, options))); } /** - * Test analyzing sentiment for batch of documents. + * Verify that the collection result excludes request statistics and mined options when given a batch of + * TextDocumentInput documents with null TextAnalyticsRequestOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatchWithResponse(Iterable, TextAnalyticsRequestOptions, Context)} + * which TextAnalyticsRequestOptions is null. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") - public void analyzeSentimentForBatchInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + public void analyzeSentimentForBatchInputWithNullRequestOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); analyzeBatchSentimentRunner(inputs -> - validateSentimentResultCollectionWithResponse(false, getExpectedBatchTextSentiment(), 200, - client.analyzeSentimentBatchWithResponse(inputs, null, Context.NONE))); + validateSentimentResultCollectionWithResponse(false, false, getExpectedBatchTextSentiment(), 200, + client.analyzeSentimentBatchWithResponse(inputs, (TextAnalyticsRequestOptions) null, Context.NONE))); } /** - * Verify that we can get statistics on the collection result when given a batch of documents with request options. + * Verify that we can get statistics on the collection result when given a batch of + * TextDocumentInput documents with TextAnalyticsRequestOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatchWithResponse(Iterable, TextAnalyticsRequestOptions, Context)} + * which TextAnalyticsRequestOptions includes request statistics. */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForBatchInputShowStatistics(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); - analyzeBatchSentimentShowStatsRunner((inputs, options) -> - validateSentimentResultCollectionWithResponse(true, getExpectedBatchTextSentiment(), 200, + analyzeBatchSentimentShowStatsRunner((inputs, requestOptions) -> + validateSentimentResultCollectionWithResponse(true, false, getExpectedBatchTextSentiment(), 200, + client.analyzeSentimentBatchWithResponse(inputs, requestOptions, Context.NONE))); + } + + /** + * Verify that the collection result excludes request statistics and mined options when given a batch of + * TextDocumentInput documents with null AnalyzeSentimentOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions, Context)} + * which AnalyzeSentimentOptions is null. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + analyzeBatchSentimentOpinionMining((inputs, options) -> + validateSentimentResultCollectionWithResponse(false, false, getExpectedBatchTextSentiment(), 200, + client.analyzeSentimentBatchWithResponse(inputs, (AnalyzeSentimentOptions) null, Context.NONE))); + } + + /** + * Verify that the collection result includes request statistics but not mined options when given a batch of + * TextDocumentInput documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions, Context)} + * which AnalyzeSentimentOptions includes request statistics but not opinion mining. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + analyzeBatchSentimentOpinionMining((inputs, options) -> + validateSentimentResultCollectionWithResponse(true, false, getExpectedBatchTextSentiment(), 200, + client.analyzeSentimentBatchWithResponse(inputs, options.setIncludeOpinionMining(false), Context.NONE))); + } + + /** + * Verify that the collection result includes mined options but not request statistics when given a batch of + * TextDocumentInput documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions, Context)} + * which AnalyzeSentimentOptions includes opinion mining but not request statistics. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + analyzeBatchSentimentOpinionMining((inputs, options) -> { + options.setIncludeStatistics(false); + validateSentimentResultCollectionWithResponse(false, true, getExpectedBatchTextSentiment(), 200, + client.analyzeSentimentBatchWithResponse(inputs, options, Context.NONE)); + }); + } + + /** + * Verify that the collection result includes mined options and request statistics when given a batch of + * TextDocumentInput documents with AnalyzeSentimentOptions. + * + * {@link TextAnalyticsClient#analyzeSentimentBatchWithResponse(Iterable, AnalyzeSentimentOptions, Context)} + * which AnalyzeSentimentOptions includes opinion mining and request statistics. + */ + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + analyzeBatchSentimentOpinionMining((inputs, options) -> + validateSentimentResultCollectionWithResponse(true, true, getExpectedBatchTextSentiment(), 200, client.analyzeSentimentBatchWithResponse(inputs, options, Context.NONE))); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java index d4010ae03ac8c..8ae36b15d0b5b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java @@ -3,12 +3,16 @@ package com.azure.ai.textanalytics; +import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; +import com.azure.ai.textanalytics.models.AspectSentiment; import com.azure.ai.textanalytics.models.CategorizedEntity; import com.azure.ai.textanalytics.models.DetectLanguageInput; import com.azure.ai.textanalytics.models.DetectedLanguage; import com.azure.ai.textanalytics.models.DocumentSentiment; import com.azure.ai.textanalytics.models.LinkedEntity; import com.azure.ai.textanalytics.models.LinkedEntityMatch; +import com.azure.ai.textanalytics.models.MinedOpinion; +import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.PiiEntity; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsError; @@ -220,6 +224,12 @@ public abstract class TextAnalyticsClientTestBase extends TestBase { @Test abstract void analyzeSentimentForTextInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + @Test + abstract void analyzeSentimentForTextInputWithDefaultLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void analyzeSentimentForTextInputWithOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + @Test abstract void analyzeSentimentForEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); @@ -233,16 +243,37 @@ public abstract class TextAnalyticsClientTestBase extends TestBase { abstract void analyzeSentimentEmptyIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); @Test - abstract void analyzeSentimentForBatchInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + abstract void analyzeSentimentForBatchStringInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void analyzeSentimentForListStringWithLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void analyzeSentimentForListStringShowStatisticsExcludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void analyzeSentimentForBatchInputWithNullRequestOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); @Test abstract void analyzeSentimentForBatchInputShowStatistics(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); @Test - abstract void analyzeSentimentForBatchStringInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + abstract void analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); @Test - abstract void analyzeSentimentForListLanguageHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + abstract void analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); @Test abstract void analyzeSentimentBatchTooManyDocuments(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); @@ -447,6 +478,14 @@ void extractKeyPhrasesBatchWarningRunner(Consumer> testR } // Sentiment Runner + void analyzeSentimentForSingleTextInputRunner(Consumer testRunner) { + testRunner.accept(SENTIMENT_INPUTS.get(0)); + } + + void analyzeSentimentForTextInputWithOpinionMiningRunner(BiConsumer testRunner) { + testRunner.accept(SENTIMENT_INPUTS.get(0), new AnalyzeSentimentOptions().setIncludeOpinionMining(true)); + } + void analyzeSentimentLanguageHintRunner(BiConsumer, String> testRunner) { testRunner.accept(SENTIMENT_INPUTS, "en"); } @@ -463,16 +502,20 @@ void analyzeBatchSentimentDuplicateIdRunner(Consumer> te testRunner.accept(getDuplicateTextDocumentInputs()); } - void analyzeBatchStringSentimentShowStatsRunner(BiConsumer, TextAnalyticsRequestOptions> testRunner) { - testRunner.accept(SENTIMENT_INPUTS, new TextAnalyticsRequestOptions().setIncludeStatistics(true)); + void analyzeBatchStringSentimentShowStatsAndIncludeOpinionMiningRunner(BiConsumer, AnalyzeSentimentOptions> testRunner) { + testRunner.accept(SENTIMENT_INPUTS, + new AnalyzeSentimentOptions().setIncludeStatistics(true).setIncludeOpinionMining(true)); } - void analyzeBatchSentimentShowStatsRunner( - BiConsumer, TextAnalyticsRequestOptions> testRunner) { + void analyzeBatchSentimentShowStatsRunner(BiConsumer, TextAnalyticsRequestOptions> testRunner) { final List textDocumentInputs = TestUtils.getTextDocumentInputs(SENTIMENT_INPUTS); + testRunner.accept(textDocumentInputs, new TextAnalyticsRequestOptions().setIncludeStatistics(true)); + } - TextAnalyticsRequestOptions options = new TextAnalyticsRequestOptions().setIncludeStatistics(true); - testRunner.accept(textDocumentInputs, options); + void analyzeBatchSentimentOpinionMining(BiConsumer, AnalyzeSentimentOptions> testRunner) { + final List textDocumentInputs = TestUtils.getTextDocumentInputs(SENTIMENT_INPUTS); + testRunner.accept(textDocumentInputs, new AnalyzeSentimentOptions().setIncludeOpinionMining(true) + .setIncludeStatistics(true)); } // other Runners @@ -603,18 +646,18 @@ static void validateExtractKeyPhrasesResultCollection(boolean showStatistics, actualItem.getKeyPhrases().stream().collect(Collectors.toList()))); } - static void validateSentimentResultCollectionWithResponse(boolean showStatistics, - AnalyzeSentimentResultCollection expected, int expectedStatusCode, - Response response) { + static void validateSentimentResultCollectionWithResponse(boolean showStatistics, boolean includeOpinionMining, + AnalyzeSentimentResultCollection expected, + int expectedStatusCode, Response response) { assertNotNull(response); assertEquals(expectedStatusCode, response.getStatusCode()); - validateSentimentResultCollection(showStatistics, expected, response.getValue()); + validateSentimentResultCollection(showStatistics, includeOpinionMining, expected, response.getValue()); } - static void validateSentimentResultCollection(boolean showStatistics, + static void validateSentimentResultCollection(boolean showStatistics, boolean includeOpinionMining, AnalyzeSentimentResultCollection expected, AnalyzeSentimentResultCollection actual) { validateTextAnalyticsResult(showStatistics, expected, actual, (expectedItem, actualItem) -> - validateAnalyzedSentiment(expectedItem.getDocumentSentiment(), actualItem.getDocumentSentiment())); + validateAnalyzedSentiment(includeOpinionMining, expectedItem.getDocumentSentiment(), actualItem.getDocumentSentiment())); } /** @@ -755,12 +798,12 @@ static void validateLinkedEntities(List expectedLinkedEntityList, * @param expectedSentimentList a list of analyzed sentence sentiment returned by the service. * @param actualSentimentList a list of analyzed sentence sentiment returned by the API. */ - static void validateAnalyzedSentenceSentiment(List expectedSentimentList, + static void validateAnalyzedSentenceSentiment(boolean includeOpinionMining, List expectedSentimentList, List actualSentimentList) { assertEquals(expectedSentimentList.size(), actualSentimentList.size()); for (int i = 0; i < expectedSentimentList.size(); i++) { - validateSentenceSentiment(expectedSentimentList.get(i), actualSentimentList.get(i)); + validateSentenceSentiment(includeOpinionMining, expectedSentimentList.get(i), actualSentimentList.get(i)); } } @@ -771,8 +814,73 @@ static void validateAnalyzedSentenceSentiment(List expectedSe * @param expectedSentiment analyzed sentence sentiment returned by the service. * @param actualSentiment analyzed sentence sentiment returned by the API. */ - static void validateSentenceSentiment(SentenceSentiment expectedSentiment, SentenceSentiment actualSentiment) { + static void validateSentenceSentiment(boolean includeOpinionMining, SentenceSentiment expectedSentiment, SentenceSentiment actualSentiment) { assertEquals(expectedSentiment.getSentiment(), actualSentiment.getSentiment()); + assertEquals(expectedSentiment.getText(), actualSentiment.getText()); + if (includeOpinionMining) { + validateSentenceMinedOpinions(expectedSentiment.getMinedOpinions().stream().collect(Collectors.toList()), + actualSentiment.getMinedOpinions().stream().collect(Collectors.toList())); + } else { + assertNull(actualSentiment.getMinedOpinions()); + } + } + + /** + * Helper method to validate sentence's mined opinions. + * + * @param expectedMinedOpinions a list of mined opinions returned by the service. + * @param actualMinedOpinions a list of mined opinions returned by the API. + */ + static void validateSentenceMinedOpinions(List expectedMinedOpinions, + List actualMinedOpinions) { + assertEquals(expectedMinedOpinions.size(), actualMinedOpinions.size()); + for (int i = 0; i < actualMinedOpinions.size(); i++) { + final MinedOpinion expectedMinedOpinion = expectedMinedOpinions.get(i); + final MinedOpinion actualMinedOpinion = actualMinedOpinions.get(i); + validateAspectSentiment(expectedMinedOpinion.getAspect(), actualMinedOpinion.getAspect()); + validateAspectOpinionList(expectedMinedOpinion.getOpinions().stream().collect(Collectors.toList()), + actualMinedOpinion.getOpinions().stream().collect(Collectors.toList())); + } + } + + /** + * Helper method to validate aspect sentiment. + * + * @param expectedAspectSentiment An expected aspect sentiment. + * @param actualAspectSentiment An actual aspect sentiment. + */ + static void validateAspectSentiment(AspectSentiment expectedAspectSentiment, AspectSentiment actualAspectSentiment) { + assertEquals(expectedAspectSentiment.getSentiment(), actualAspectSentiment.getSentiment()); + assertEquals(expectedAspectSentiment.getText(), actualAspectSentiment.getText()); + assertEquals(expectedAspectSentiment.getLength(), actualAspectSentiment.getLength()); + assertEquals(expectedAspectSentiment.getOffset(), actualAspectSentiment.getOffset()); + } + + /** + * Helper method to validate a list of {@link OpinionSentiment}. + * + * @param expectedOpinionSentiments A list of expected opinion sentiments. + * @param actualOpinionSentiments A list of actual opinion sentiments. + */ + static void validateAspectOpinionList(List expectedOpinionSentiments, List actualOpinionSentiments) { + assertEquals(expectedOpinionSentiments.size(), actualOpinionSentiments.size()); + for (int i = 0; i < expectedOpinionSentiments.size(); i++) { + validateAspectOpinion(expectedOpinionSentiments.get(i), actualOpinionSentiments.get(i)); + } + } + + /** + * Helper method to validate opinion sentiment. + * + * @param expectedAspectOpinion An expected opinion sentiment. + * @param actualAspectOpinion An actual opinion sentiment. + */ + static void validateAspectOpinion(OpinionSentiment expectedAspectOpinion, OpinionSentiment actualAspectOpinion) { + assertEquals(expectedAspectOpinion.getSentiment(), actualAspectOpinion.getSentiment()); + assertEquals(expectedAspectOpinion.getText(), actualAspectOpinion.getText()); + assertEquals(expectedAspectOpinion.isNegated(), actualAspectOpinion.isNegated()); + assertEquals(expectedAspectOpinion.getLength(), actualAspectOpinion.getLength()); + assertEquals(expectedAspectOpinion.getOffset(), actualAspectOpinion.getOffset()); } /** @@ -782,10 +890,12 @@ static void validateSentenceSentiment(SentenceSentiment expectedSentiment, Sente * @param expectedSentiment analyzed document sentiment returned by the service. * @param actualSentiment analyzed document sentiment returned by the API. */ - static void validateAnalyzedSentiment(DocumentSentiment expectedSentiment, DocumentSentiment actualSentiment) { + static void validateAnalyzedSentiment(boolean includeOpinionMining, DocumentSentiment expectedSentiment, + DocumentSentiment actualSentiment) { assertEquals(expectedSentiment.getSentiment(), actualSentiment.getSentiment()); - validateAnalyzedSentenceSentiment(expectedSentiment.getSentences().stream().collect(Collectors.toList()), - expectedSentiment.getSentences().stream().collect(Collectors.toList())); + validateAnalyzedSentenceSentiment(includeOpinionMining, + expectedSentiment.getSentences().stream().collect(Collectors.toList()), + actualSentiment.getSentences().stream().collect(Collectors.toList())); } /** @@ -818,6 +928,18 @@ static > void validat validateBatchStatistics(((RecognizeLinkedEntitiesResultCollection) expectedResults).getStatistics(), ((RecognizeLinkedEntitiesResultCollection) actualResults).getStatistics()); } + } else { + if (expectedResults instanceof AnalyzeSentimentResultCollection) { + assertNull(((AnalyzeSentimentResultCollection) actualResults).getStatistics()); + } else if (expectedResults instanceof DetectLanguageResultCollection) { + assertNull(((DetectLanguageResultCollection) actualResults).getStatistics()); + } else if (expectedResults instanceof ExtractKeyPhrasesResultCollection) { + assertNull(((ExtractKeyPhrasesResultCollection) actualResults).getStatistics()); + } else if (expectedResults instanceof RecognizeEntitiesResultCollection) { + assertNull(((RecognizeEntitiesResultCollection) actualResults).getStatistics()); + } else if (expectedResults instanceof RecognizeLinkedEntitiesResultCollection) { + assertNull(((RecognizeLinkedEntitiesResultCollection) actualResults).getStatistics()); + } } expected.forEach((key, expectedValue) -> { diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker new file mode 100644 index 0000000000000..1f0955d450f0d --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker @@ -0,0 +1 @@ +mock-maker-inline diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json index c9d5ef0d29908..72b446e011c36 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=false", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "35eb8773-e999-4513-8d99-2be40442eefa", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b71587d2-92a0-4801-884a-9b64e465b52b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "857", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "03e3f07a-e90c-4caf-8e74-fb8216119043", + "apim-request-id" : "a649d200-61d3-4ff8-8ccb-ec9bd374a17a", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Wed, 15 Jul 2020 04:14:29 GMT", + "Date" : "Wed, 19 Aug 2020 12:12:26 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json new file mode 100644 index 0000000000000..4da14aee95d0d --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=true", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cba40f81-c586-4ca0-bc21-0007e532435c", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "1020", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", + "apim-request-id" : "23360b86-499e-4fb4-a0bf-feae50c53e13", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 13 Aug 2020 02:46:06 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json index d743331018666..bb6b021cb8c1d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=false", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "cee9a1c2-b321-4ac5-8081-d779b9fe17f9", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9bf8c67-2dfe-47b6-8910-6a5f45fd4632", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "85", + "x-envoy-upstream-service-time" : "977", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "427cc017-f2bc-42f0-bda4-aa1c305be30c", + "apim-request-id" : "b729dbe2-af27-4322-bc97-70ed6d3c86ac", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:39 GMT", + "Date" : "Thu, 13 Aug 2020 02:46:52 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json new file mode 100644 index 0000000000000..104c9f999beb0 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=true", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee7044d2-8e5d-4dbf-88a3-743ca60094e7", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "932", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", + "apim-request-id" : "d81a7648-08c6-4e81-b3a5-7356d12ab8e5", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 13 Aug 2020 02:45:54 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json similarity index 84% rename from sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithOptions.json rename to sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json index 1c0b90702e698..efe062136f68f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=false", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b05cb28f-b425-48ab-8e47-caacf51b806d", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "31d48485-0b64-435e-bf39-49cbd7c0207e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "106", + "x-envoy-upstream-service-time" : "974", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "767af6d1-b389-4453-9aa7-064af57d0f1c", + "apim-request-id" : "89aa233a-0cb5-404c-88cb-56563de55f30", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:38 GMT", + "Date" : "Thu, 13 Aug 2020 02:45:46 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json similarity index 85% rename from sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInput.json rename to sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json index f6e6cb2e01910..b358a63fe8071 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json @@ -3,21 +3,21 @@ "Method" : "POST", "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9b455e87-cc48-44f2-bd68-d1707c29fa34", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "72540f78-b82a-4a7b-9681-384941cc781b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "91", + "x-envoy-upstream-service-time" : "427", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "ca2e5376-b597-446c-8ec3-cda901902bd0", + "apim-request-id" : "4ba8643d-1a3c-4f9e-b0c4-de195ff1430a", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:32 GMT", + "Date" : "Wed, 19 Aug 2020 12:16:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json similarity index 82% rename from sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListLanguageHint.json rename to sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json index d44c0e87b37a6..593ff1708b19d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=false", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "bfacc9cd-d097-40bd-84cb-e4a7d639641e", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8cc2f855-9ea4-48fc-b48c-721a37cb932b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "145", + "x-envoy-upstream-service-time" : "483", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "af1778a3-0d86-4f67-a583-becbc1bf24e8", + "apim-request-id" : "7fff84fa-4c3b-4999-a8e2-e5407f83f591", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:32 GMT", + "Date" : "Wed, 19 Aug 2020 12:16:02 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json index b0dbe661191fa..5c0c67fcd1c2e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=false", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6a149fed-28e9-4051-92b5-ce68098984a3", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d4b440a-b534-4c2a-9d54-a36ba0c01c93", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "112", + "x-envoy-upstream-service-time" : "1414", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "58d21046-7255-4c36-b95a-d73489a85088", + "apim-request-id" : "642f692e-b950-4196-9626-72e0471c8fb6", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:33 GMT", + "Date" : "Wed, 19 Aug 2020 12:12:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json index e9a4adbda0652..b87369d64e14d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json @@ -3,20 +3,20 @@ "Method" : "POST", "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f67f970f-c761-4c83-a20e-083e7a6ae6f1", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3847ede-f44a-4b9e-ac28-244e1a1f6b5a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "283", + "x-envoy-upstream-service-time" : "885", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "2a27fe98-5923-47bf-83c7-22091d7fd4b6", + "apim-request-id" : "1c05f21f-1ba9-4576-bb26-4fee089fe844", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 06:20:06 GMT", + "Date" : "Wed, 19 Aug 2020 12:06:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json index 7c961368f5869..5616a8b50b0a9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json @@ -3,21 +3,21 @@ "Method" : "POST", "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "314fc550-6a3e-4b08-b0eb-6a78f5c43a7d", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00c290e3-841e-41e8-bd05-6b34bda8a5be", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "95", + "x-envoy-upstream-service-time" : "1109", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "80d8febf-8794-4f72-a306-103a88fb9088", + "apim-request-id" : "14908804-a749-42f8-a444-8ec4c5c47ced", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":0,\"length\":1,\"text\":\"!\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":1,\"length\":4,\"text\":\"@#%%\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:36 GMT", + "Date" : "Wed, 19 Aug 2020 12:11:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json new file mode 100644 index 0000000000000..ac0d577a847e1 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=true", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c90fc67b-cac6-4a3e-9809-8537f74b56e8", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "972", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", + "apim-request-id" : "becc195c-b463-42e1-b855-083626b7b648", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 13 Aug 2020 02:46:32 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json new file mode 100644 index 0000000000000..b098e8e75126f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=true", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f42bc40-5d3f-45ee-8ef8-28515d9933f0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "987", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", + "apim-request-id" : "13f34c9f-abeb-406f-9552-85f7cd8573d0", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 13 Aug 2020 02:46:47 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json new file mode 100644 index 0000000000000..8097ad72aef51 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=false", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "06ee858b-a4cb-4dfd-ba0d-4c79c9f5f847", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "1280", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", + "apim-request-id" : "f10c179e-85d0-4496-850d-88bc981e4142", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 13 Aug 2020 02:46:05 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json new file mode 100644 index 0000000000000..0b1bd47334463 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=false", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a427d4e9-57e4-4e93-847e-30f88dfe3f93", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "426", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", + "apim-request-id" : "52b8dd67-927d-4e76-bef0-6e8db9f70e0d", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 19 Aug 2020 12:13:39 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json index d32e2e898c1b7..17db8e025e742 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json @@ -3,21 +3,21 @@ "Method" : "POST", "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6d57c5af-70da-47e5-b258-8c5bb75ec473", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1b7b36e-90a4-4bc3-aa4f-c49334e219b0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "87", + "x-envoy-upstream-service-time" : "494", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "78660fca-0348-4a7d-8e3d-ac2e82141f7f", + "apim-request-id" : "b398ccd5-907d-4513-88ae-3b746c38429f", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:36 GMT", + "Date" : "Wed, 19 Aug 2020 12:14:29 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json new file mode 100644 index 0000000000000..a203cbfdce987 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cb07bf78-08e5-4cb8-9dfb-60f6f8172267", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "1036", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "be002d0a-abc9-43b7-8514-c989f178365b", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 19 Aug 2020 12:15:06 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json new file mode 100644 index 0000000000000..090ca46e03c8a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=true", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3875ba1c-2304-4f9b-ba0b-4dc1099ec029", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "1369", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "1dd802b2-9892-45a5-b8dc-cc879a0aff33", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 19 Aug 2020 06:32:59 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file From 0015dd669fc2c0310a7658f77d1e512241d29104 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Sat, 29 Aug 2020 16:38:32 -0700 Subject: [PATCH 003/168] Remove myself from every versioning changes --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 80575f7900a87..a310272305332 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -85,7 +85,7 @@ /eng/code-quality-reports/ @mssfang @JonathanGiles /eng/jacoco-test-coverage/ @srnagar @JonathanGiles /eng/spotbugs-aggregate-report/ @srnagar @JonathanGiles -/eng/versioning/ @JimSuplizio @mitchdenny @weshaggard @danieljurek @alzimmermsft @samvaity +/eng/versioning/ @JimSuplizio @mitchdenny @danieljurek @alzimmermsft @samvaity /parent/ @JimSuplizio @alzimmermsft /**/tests.yml @danieljurek From 6a833f14a01a815bbcb7d619694ed0e455b57b2d Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Mon, 31 Aug 2020 12:00:55 +0800 Subject: [PATCH 004/168] LogAnalytics: generate package-2020-08 (#14631) * generate package-2020-08 * fix compile errors * fix deleteAsync --- sdk/loganalytics/mgmt-v2020_08_01/pom.xml | 135 +++ .../v2020_08_01/AvailableServiceTier.java | 55 + .../v2020_08_01/AvailableServiceTiers.java | 29 + .../v2020_08_01/AzureEntityResource.java | 34 + .../loganalytics/v2020_08_01/Cluster.java | 170 +++ .../v2020_08_01/ClusterEntityStatus.java | 56 + .../v2020_08_01/ClusterErrorResponse.java | 44 + .../ClusterErrorResponseException.java | 45 + .../v2020_08_01/ClusterPatch.java | 98 ++ .../loganalytics/v2020_08_01/ClusterSku.java | 69 ++ .../v2020_08_01/ClusterSkuNameEnum.java | 38 + .../loganalytics/v2020_08_01/Clusters.java | 25 + .../loganalytics/v2020_08_01/CoreSummary.java | 69 ++ .../loganalytics/v2020_08_01/DataExport.java | 314 +++++ .../v2020_08_01/DataExportErrorResponse.java | 44 + .../DataExportErrorResponseException.java | 45 + .../loganalytics/v2020_08_01/DataExports.java | 53 + .../v2020_08_01/DataIngestionStatus.java | 53 + .../loganalytics/v2020_08_01/DataSource.java | 181 +++ .../v2020_08_01/DataSourceFilter.java | 57 + .../v2020_08_01/DataSourceKind.java | 134 +++ .../v2020_08_01/DataSourceType.java | 59 + .../loganalytics/v2020_08_01/DataSources.java | 54 + .../v2020_08_01/DeletedWorkspaces.java | 20 + .../v2020_08_01/ErrorAdditionalInfo.java | 47 + .../v2020_08_01/ErrorContract.java | 44 + .../v2020_08_01/ErrorContractException.java | 44 + .../v2020_08_01/ErrorResponse.java | 93 ++ .../loganalytics/v2020_08_01/Gateways.java | 30 + .../loganalytics/v2020_08_01/Identity.java | 73 ++ .../v2020_08_01/IdentityType.java | 53 + .../v2020_08_01/IntelligencePack.java | 35 + .../v2020_08_01/IntelligencePacks.java | 52 + .../v2020_08_01/KeyVaultProperties.java | 96 ++ .../v2020_08_01/LinkedService.java | 205 ++++ .../LinkedServiceEntityStatus.java | 47 + .../v2020_08_01/LinkedServices.java | 53 + .../v2020_08_01/LinkedStorageAccounts.java | 53 + .../LinkedStorageAccountsResource.java | 123 ++ .../v2020_08_01/ManagementGroup.java | 61 + .../v2020_08_01/ManagementGroups.java | 29 + .../loganalytics/v2020_08_01/MetricName.java | 69 ++ .../loganalytics/v2020_08_01/Operation.java | 30 + .../v2020_08_01/OperationDisplay.java | 121 ++ .../v2020_08_01/OperationStatus.java | 52 + .../v2020_08_01/OperationStatuses.java | 29 + .../loganalytics/v2020_08_01/Operations.java | 27 + .../PrivateLinkScopedResource.java | 69 ++ .../v2020_08_01/PublicNetworkAccessType.java | 41 + .../loganalytics/v2020_08_01/PurgeState.java | 41 + .../loganalytics/v2020_08_01/SavedSearch.java | 285 +++++ .../v2020_08_01/SavedSearches.java | 53 + .../v2020_08_01/SavedSearchesListResult.java | 27 + .../loganalytics/v2020_08_01/Schemas.java | 29 + .../v2020_08_01/SearchGetSchemaResponse.java | 31 + .../v2020_08_01/SearchMetadata.java | 461 +++++++ .../v2020_08_01/SearchMetadataSchema.java | 69 ++ .../v2020_08_01/SearchSchemaValue.java | 200 ++++ .../loganalytics/v2020_08_01/SearchSort.java | 69 ++ .../v2020_08_01/SearchSortEnum.java | 41 + .../loganalytics/v2020_08_01/SharedKeys.java | 30 + .../v2020_08_01/SharedKeysOperations.java | 39 + .../loganalytics/v2020_08_01/SkuNameEnum.java | 56 + .../v2020_08_01/StorageAccount.java | 69 ++ .../v2020_08_01/StorageInsight.java | 228 ++++ .../v2020_08_01/StorageInsightConfigs.java | 53 + .../v2020_08_01/StorageInsightState.java | 41 + .../v2020_08_01/StorageInsightStatus.java | 70 ++ .../loganalytics/v2020_08_01/Table.java | 67 ++ .../loganalytics/v2020_08_01/Tables.java | 40 + .../loganalytics/v2020_08_01/Tag.java | 69 ++ .../loganalytics/v2020_08_01/Type.java | 41 + .../loganalytics/v2020_08_01/UsageMetric.java | 51 + .../loganalytics/v2020_08_01/Usages.java | 29 + .../loganalytics/v2020_08_01/Workspace.java | 270 +++++ .../v2020_08_01/WorkspaceCapping.java | 75 ++ .../v2020_08_01/WorkspaceEntityStatus.java | 56 + .../v2020_08_01/WorkspaceModel.java | 69 ++ .../v2020_08_01/WorkspacePatch.java | 238 ++++ .../v2020_08_01/WorkspacePurgeBody.java | 71 ++ .../WorkspacePurgeBodyFilters.java | 125 ++ .../WorkspacePurgePurgeHeaders.java | 43 + .../v2020_08_01/WorkspacePurgeResponse.java | 25 + .../WorkspacePurgeStatusResponse.java | 25 + .../v2020_08_01/WorkspacePurges.java | 42 + .../v2020_08_01/WorkspaceSku.java | 102 ++ .../v2020_08_01/WorkspaceSkuNameEnum.java | 56 + .../loganalytics/v2020_08_01/Workspaces.java | 25 + .../AvailableServiceTierImpl.java | 66 + .../AvailableServiceTierInner.java | 127 ++ .../AvailableServiceTiersImpl.java | 53 + .../AvailableServiceTiersInner.java | 147 +++ .../implementation/ClusterImpl.java | 133 +++ .../implementation/ClusterInner.java | 160 +++ .../implementation/ClustersImpl.java | 138 +++ .../implementation/ClustersInner.java | 1062 +++++++++++++++++ .../implementation/DataExportImpl.java | 189 +++ .../implementation/DataExportInner.java | 248 ++++ .../implementation/DataExportsImpl.java | 85 ++ .../implementation/DataExportsInner.java | 456 +++++++ .../implementation/DataSourceImpl.java | 140 +++ .../implementation/DataSourceInner.java | 139 +++ .../implementation/DataSourcesImpl.java | 85 ++ .../implementation/DataSourcesInner.java | 746 ++++++++++++ .../implementation/DeletedWorkspacesImpl.java | 95 ++ .../DeletedWorkspacesInner.java | 237 ++++ .../implementation/GatewaysImpl.java | 32 + .../implementation/GatewaysInner.java | 152 +++ .../implementation/IdParsingUtils.java | 57 + .../implementation/IntelligencePackImpl.java | 45 + .../implementation/IntelligencePackInner.java | 96 ++ .../implementation/IntelligencePacksImpl.java | 66 + .../IntelligencePacksInner.java | 340 ++++++ .../implementation/LinkedServiceImpl.java | 140 +++ .../implementation/LinkedServiceInner.java | 129 ++ .../implementation/LinkedServicesImpl.java | 85 ++ .../implementation/LinkedServicesInner.java | 625 ++++++++++ .../LinkedStorageAccountsImpl.java | 86 ++ .../LinkedStorageAccountsInner.java | 543 +++++++++ .../LinkedStorageAccountsResourceImpl.java | 118 ++ .../LinkedStorageAccountsResourceInner.java | 64 + .../implementation/LogAnalyticsManager.java | 327 +++++ .../implementation/ManagementGroupImpl.java | 71 ++ .../implementation/ManagementGroupInner.java | 229 ++++ .../implementation/ManagementGroupsImpl.java | 53 + .../implementation/ManagementGroupsInner.java | 152 +++ .../implementation/OperationImpl.java | 37 + .../implementation/OperationInner.java | 70 ++ .../implementation/OperationStatusImpl.java | 72 ++ .../implementation/OperationStatusInner.java | 174 +++ .../implementation/OperationStatusesImpl.java | 50 + .../OperationStatusesInner.java | 146 +++ ...erationalInsightsManagementClientImpl.java | 462 +++++++ .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 283 +++++ .../v2020_08_01/implementation/PageImpl.java | 75 ++ .../v2020_08_01/implementation/PageImpl1.java | 75 ++ .../v2020_08_01/implementation/PageImpl2.java | 75 ++ .../implementation/SavedSearchImpl.java | 184 +++ .../implementation/SavedSearchInner.java | 236 ++++ .../implementation/SavedSearchesImpl.java | 79 ++ .../implementation/SavedSearchesInner.java | 448 +++++++ .../SavedSearchesListResultImpl.java | 32 + .../SavedSearchesListResultInner.java | 44 + .../implementation/SchemasImpl.java | 42 + .../implementation/SchemasInner.java | 146 +++ .../SearchGetSchemaResponseImpl.java | 39 + .../SearchGetSchemaResponseInner.java | 72 ++ .../implementation/SharedKeysImpl.java | 36 + .../implementation/SharedKeysInner.java | 69 ++ .../SharedKeysOperationsImpl.java | 54 + .../SharedKeysOperationsInner.java | 236 ++++ .../StorageInsightConfigsImpl.java | 85 ++ .../StorageInsightConfigsInner.java | 608 ++++++++++ .../implementation/StorageInsightImpl.java | 158 +++ .../implementation/StorageInsightInner.java | 169 +++ .../v2020_08_01/implementation/TableImpl.java | 98 ++ .../implementation/TableInner.java | 47 + .../implementation/TablesImpl.java | 69 ++ .../implementation/TablesInner.java | 443 +++++++ .../implementation/UsageMetricImpl.java | 62 + .../implementation/UsageMetricInner.java | 176 +++ .../implementation/UsagesImpl.java | 53 + .../implementation/UsagesInner.java | 152 +++ .../implementation/WorkspaceImpl.java | 184 +++ .../implementation/WorkspaceInner.java | 243 ++++ .../implementation/WorkspaceModelImpl.java | 91 ++ .../WorkspacePurgeResponseImpl.java | 31 + .../WorkspacePurgeResponseInner.java | 43 + .../WorkspacePurgeStatusResponseImpl.java | 39 + .../WorkspacePurgeStatusResponseInner.java | 45 + .../implementation/WorkspacePurgesImpl.java | 64 + .../implementation/WorkspacePurgesInner.java | 261 ++++ .../implementation/WorkspacesImpl.java | 138 +++ .../implementation/WorkspacesInner.java | 932 +++++++++++++++ .../implementation/package-info.java | 11 + .../v2020_08_01/package-info.java | 11 + sdk/loganalytics/pom.mgmt.xml | 1 + 178 files changed, 22083 insertions(+) create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/pom.xml create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AvailableServiceTier.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AvailableServiceTiers.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AzureEntityResource.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Cluster.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterEntityStatus.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterErrorResponse.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterErrorResponseException.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterPatch.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterSku.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterSkuNameEnum.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Clusters.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/CoreSummary.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExport.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExportErrorResponse.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExportErrorResponseException.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExports.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataIngestionStatus.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSource.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceFilter.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceKind.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceType.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSources.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DeletedWorkspaces.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorAdditionalInfo.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorContract.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorContractException.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorResponse.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Gateways.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Identity.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IdentityType.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IntelligencePack.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IntelligencePacks.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/KeyVaultProperties.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedService.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedServiceEntityStatus.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedServices.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedStorageAccounts.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedStorageAccountsResource.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ManagementGroup.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ManagementGroups.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/MetricName.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Operation.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationDisplay.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationStatus.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationStatuses.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Operations.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PrivateLinkScopedResource.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PublicNetworkAccessType.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PurgeState.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearch.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearches.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearchesListResult.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Schemas.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchGetSchemaResponse.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchMetadata.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchMetadataSchema.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSchemaValue.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSort.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSortEnum.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SharedKeys.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SharedKeysOperations.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SkuNameEnum.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageAccount.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsight.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightConfigs.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightState.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightStatus.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Table.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Tables.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Tag.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Type.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/UsageMetric.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Usages.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Workspace.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceCapping.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceEntityStatus.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceModel.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePatch.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeBody.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeBodyFilters.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgePurgeHeaders.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeResponse.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeStatusResponse.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurges.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceSku.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceSkuNameEnum.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Workspaces.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTierImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTierInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTiersImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTiersInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClusterImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClusterInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClustersImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClustersInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportsImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportsInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourceImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourceInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DeletedWorkspacesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DeletedWorkspacesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/GatewaysImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/GatewaysInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IdParsingUtils.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePackImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePackInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePacksImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePacksInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServiceImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServiceInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServicesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServicesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsResourceImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsResourceInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LogAnalyticsManager.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupsImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupsInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationalInsightsManagementClientImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationsImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationsInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl1.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl2.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesListResultImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesListResultInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SchemasImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SchemasInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SearchGetSchemaResponseImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SearchGetSchemaResponseInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysOperationsImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysOperationsInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightConfigsImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightConfigsInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TableImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TableInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TablesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TablesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsageMetricImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsageMetricInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsagesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsagesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceModelImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeResponseImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeResponseInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeStatusResponseImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeStatusResponseInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesImpl.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesInner.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/package-info.java create mode 100644 sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/package-info.java diff --git a/sdk/loganalytics/mgmt-v2020_08_01/pom.xml b/sdk/loganalytics/mgmt-v2020_08_01/pom.xml new file mode 100644 index 0000000000000..8835a3aa98d28 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.loganalytics.v2020_08_01 + + com.microsoft.azure + azure-arm-parent + 1.3.2 + ../../parents/azure-arm-parent/pom.xml + + azure-mgmt-loganalytics + 1.0.0-beta + jar + Microsoft Azure SDK for LogAnalytics Management + This package contains Microsoft LogAnalytics Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + 1.6.5 + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AvailableServiceTier.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AvailableServiceTier.java new file mode 100644 index 0000000000000..3d6c75c3df8b5 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AvailableServiceTier.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.AvailableServiceTierInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; + +/** + * Type representing AvailableServiceTier. + */ +public interface AvailableServiceTier extends HasInner, HasManager { + /** + * @return the capacityReservationLevel value. + */ + Long capacityReservationLevel(); + + /** + * @return the defaultRetention value. + */ + Long defaultRetention(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the lastSkuUpdate value. + */ + String lastSkuUpdate(); + + /** + * @return the maximumRetention value. + */ + Long maximumRetention(); + + /** + * @return the minimumRetention value. + */ + Long minimumRetention(); + + /** + * @return the serviceTier value. + */ + SkuNameEnum serviceTier(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AvailableServiceTiers.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AvailableServiceTiers.java new file mode 100644 index 0000000000000..ce1609d585308 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AvailableServiceTiers.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.AvailableServiceTiersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AvailableServiceTiers. + */ +public interface AvailableServiceTiers extends HasInner { + /** + * Gets the available service tiers for the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AzureEntityResource.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AzureEntityResource.java new file mode 100644 index 0000000000000..caa5df6dfdd74 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/AzureEntityResource.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * The resource model definition for a Azure Resource Manager resource with an + * etag. + */ +public class AzureEntityResource extends ProxyResource { + /** + * Resource Etag. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource Etag. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Cluster.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Cluster.java new file mode 100644 index 0000000000000..d8af7670f6c1d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Cluster.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.ClusterInner; + +/** + * Type representing Cluster. + */ +public interface Cluster extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the clusterId value. + */ + String clusterId(); + + /** + * @return the identity value. + */ + Identity identity(); + + /** + * @return the keyVaultProperties value. + */ + KeyVaultProperties keyVaultProperties(); + + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the provisioningState value. + */ + ClusterEntityStatus provisioningState(); + + /** + * @return the sku value. + */ + ClusterSku sku(); + + /** + * The entirety of the Cluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of Cluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Cluster definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Cluster definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the cluster definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of the resource + * @return the next definition stage + */ + WithCreate withIdentity(Identity identity); + } + + /** + * The stage of the cluster definition allowing to specify KeyVaultProperties. + */ + interface WithKeyVaultProperties { + /** + * Specifies keyVaultProperties. + * @param keyVaultProperties The associated key properties + * @return the next definition stage + */ + WithCreate withKeyVaultProperties(KeyVaultProperties keyVaultProperties); + } + + /** + * The stage of the cluster definition allowing to specify NextLink. + */ + interface WithNextLink { + /** + * Specifies nextLink. + * @param nextLink The link used to get the next page of recommendations + * @return the next definition stage + */ + WithCreate withNextLink(String nextLink); + } + + /** + * The stage of the cluster definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The sku properties + * @return the next definition stage + */ + WithCreate withSku(ClusterSku sku); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithIdentity, DefinitionStages.WithKeyVaultProperties, DefinitionStages.WithNextLink, DefinitionStages.WithSku { + } + } + /** + * The template for a Cluster update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithKeyVaultProperties, UpdateStages.WithSku { + } + + /** + * Grouping of Cluster update stages. + */ + interface UpdateStages { + /** + * The stage of the cluster update allowing to specify KeyVaultProperties. + */ + interface WithKeyVaultProperties { + /** + * Specifies keyVaultProperties. + * @param keyVaultProperties The associated key properties + * @return the next update stage + */ + Update withKeyVaultProperties(KeyVaultProperties keyVaultProperties); + } + + /** + * The stage of the cluster update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The sku properties + * @return the next update stage + */ + Update withSku(ClusterSku sku); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterEntityStatus.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterEntityStatus.java new file mode 100644 index 0000000000000..918c81c94ef5c --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterEntityStatus.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ClusterEntityStatus. + */ +public final class ClusterEntityStatus extends ExpandableStringEnum { + /** Static value Creating for ClusterEntityStatus. */ + public static final ClusterEntityStatus CREATING = fromString("Creating"); + + /** Static value Succeeded for ClusterEntityStatus. */ + public static final ClusterEntityStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ClusterEntityStatus. */ + public static final ClusterEntityStatus FAILED = fromString("Failed"); + + /** Static value Canceled for ClusterEntityStatus. */ + public static final ClusterEntityStatus CANCELED = fromString("Canceled"); + + /** Static value Deleting for ClusterEntityStatus. */ + public static final ClusterEntityStatus DELETING = fromString("Deleting"); + + /** Static value ProvisioningAccount for ClusterEntityStatus. */ + public static final ClusterEntityStatus PROVISIONING_ACCOUNT = fromString("ProvisioningAccount"); + + /** Static value Updating for ClusterEntityStatus. */ + public static final ClusterEntityStatus UPDATING = fromString("Updating"); + + /** + * Creates or finds a ClusterEntityStatus from its string representation. + * @param name a name to look for + * @return the corresponding ClusterEntityStatus + */ + @JsonCreator + public static ClusterEntityStatus fromString(String name) { + return fromString(name, ClusterEntityStatus.class); + } + + /** + * @return known ClusterEntityStatus values + */ + public static Collection values() { + return values(ClusterEntityStatus.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterErrorResponse.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterErrorResponse.java new file mode 100644 index 0000000000000..6740dc53cdaa2 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterErrorResponse.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error response indicates that the service is not able to process the + * incoming request. The reason is provided in the error message. + */ +public class ClusterErrorResponse { + /** + * The details of the error. + */ + @JsonProperty(value = "error") + private ErrorResponse error; + + /** + * Get the details of the error. + * + * @return the error value + */ + public ErrorResponse error() { + return this.error; + } + + /** + * Set the details of the error. + * + * @param error the error value to set + * @return the ClusterErrorResponse object itself. + */ + public ClusterErrorResponse withError(ErrorResponse error) { + this.error = error; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterErrorResponseException.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterErrorResponseException.java new file mode 100644 index 0000000000000..14a13ec79e105 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterErrorResponseException.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ClusterErrorResponse + * information. + */ +public class ClusterErrorResponseException extends RestException { + /** + * Initializes a new instance of the ClusterErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ClusterErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ClusterErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ClusterErrorResponseException(final String message, final Response response, final ClusterErrorResponse body) { + super(message, response, body); + } + + @Override + public ClusterErrorResponse body() { + return (ClusterErrorResponse) super.body(); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterPatch.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterPatch.java new file mode 100644 index 0000000000000..072bf6ac1eb96 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterPatch.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The top level Log Analytics cluster resource container. + */ +@JsonFlatten +public class ClusterPatch { + /** + * The associated key properties. + */ + @JsonProperty(value = "properties.keyVaultProperties") + private KeyVaultProperties keyVaultProperties; + + /** + * The sku properties. + */ + @JsonProperty(value = "sku") + private ClusterSku sku; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the associated key properties. + * + * @return the keyVaultProperties value + */ + public KeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the associated key properties. + * + * @param keyVaultProperties the keyVaultProperties value to set + * @return the ClusterPatch object itself. + */ + public ClusterPatch withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get the sku properties. + * + * @return the sku value + */ + public ClusterSku sku() { + return this.sku; + } + + /** + * Set the sku properties. + * + * @param sku the sku value to set + * @return the ClusterPatch object itself. + */ + public ClusterPatch withSku(ClusterSku sku) { + this.sku = sku; + return this; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the ClusterPatch object itself. + */ + public ClusterPatch withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterSku.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterSku.java new file mode 100644 index 0000000000000..d9814fd6fb3e8 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterSku.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The cluster sku definition. + */ +public class ClusterSku { + /** + * The capacity value. + */ + @JsonProperty(value = "capacity") + private Long capacity; + + /** + * The name of the SKU. Possible values include: 'CapacityReservation'. + */ + @JsonProperty(value = "name") + private ClusterSkuNameEnum name; + + /** + * Get the capacity value. + * + * @return the capacity value + */ + public Long capacity() { + return this.capacity; + } + + /** + * Set the capacity value. + * + * @param capacity the capacity value to set + * @return the ClusterSku object itself. + */ + public ClusterSku withCapacity(Long capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the name of the SKU. Possible values include: 'CapacityReservation'. + * + * @return the name value + */ + public ClusterSkuNameEnum name() { + return this.name; + } + + /** + * Set the name of the SKU. Possible values include: 'CapacityReservation'. + * + * @param name the name value to set + * @return the ClusterSku object itself. + */ + public ClusterSku withName(ClusterSkuNameEnum name) { + this.name = name; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterSkuNameEnum.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterSkuNameEnum.java new file mode 100644 index 0000000000000..f65c35bf0d939 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ClusterSkuNameEnum.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ClusterSkuNameEnum. + */ +public final class ClusterSkuNameEnum extends ExpandableStringEnum { + /** Static value CapacityReservation for ClusterSkuNameEnum. */ + public static final ClusterSkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation"); + + /** + * Creates or finds a ClusterSkuNameEnum from its string representation. + * @param name a name to look for + * @return the corresponding ClusterSkuNameEnum + */ + @JsonCreator + public static ClusterSkuNameEnum fromString(String name) { + return fromString(name, ClusterSkuNameEnum.class); + } + + /** + * @return known ClusterSkuNameEnum values + */ + public static Collection values() { + return values(ClusterSkuNameEnum.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Clusters.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Clusters.java new file mode 100644 index 0000000000000..cd3f9642d0cc5 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Clusters.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.ClustersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Clusters. + */ +public interface Clusters extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/CoreSummary.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/CoreSummary.java new file mode 100644 index 0000000000000..dfcb88ea3bfa6 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/CoreSummary.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The core summary of a search. + */ +public class CoreSummary { + /** + * The status of a core summary. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The number of documents of a core summary. + */ + @JsonProperty(value = "numberOfDocuments", required = true) + private long numberOfDocuments; + + /** + * Get the status of a core summary. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the status of a core summary. + * + * @param status the status value to set + * @return the CoreSummary object itself. + */ + public CoreSummary withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the number of documents of a core summary. + * + * @return the numberOfDocuments value + */ + public long numberOfDocuments() { + return this.numberOfDocuments; + } + + /** + * Set the number of documents of a core summary. + * + * @param numberOfDocuments the numberOfDocuments value to set + * @return the CoreSummary object itself. + */ + public CoreSummary withNumberOfDocuments(long numberOfDocuments) { + this.numberOfDocuments = numberOfDocuments; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExport.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExport.java new file mode 100644 index 0000000000000..f3c1605e7a46b --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExport.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.DataExportInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import java.util.List; + +/** + * Type representing DataExport. + */ +public interface DataExport extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the allTables value. + */ + Boolean allTables(); + + /** + * @return the createdDate value. + */ + String createdDate(); + + /** + * @return the dataExportId value. + */ + String dataExportId(); + + /** + * @return the dataExportType value. + */ + Type dataExportType(); + + /** + * @return the enable value. + */ + Boolean enable(); + + /** + * @return the eventHubName value. + */ + String eventHubName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the lastModifiedDate value. + */ + String lastModifiedDate(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceId value. + */ + String resourceId(); + + /** + * @return the tableNames value. + */ + List tableNames(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DataExport definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithResourceId, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataExport definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataExport definition. + */ + interface Blank extends WithWorkspace { + } + + /** + * The stage of the dataexport definition allowing to specify Workspace. + */ + interface WithWorkspace { + /** + * Specifies resourceGroupName, workspaceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @return the next definition stage + */ + WithResourceId withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the dataexport definition allowing to specify ResourceId. + */ + interface WithResourceId { + /** + * Specifies resourceId. + * @param resourceId The destination resource ID. This can be copied from the Properties entry of the destination resource in Azure + * @return the next definition stage + */ + WithCreate withResourceId(String resourceId); + } + + /** + * The stage of the dataexport definition allowing to specify AllTables. + */ + interface WithAllTables { + /** + * Specifies allTables. + * @param allTables When ‘true’, all workspace's tables are exported + * @return the next definition stage + */ + WithCreate withAllTables(Boolean allTables); + } + + /** + * The stage of the dataexport definition allowing to specify CreatedDate. + */ + interface WithCreatedDate { + /** + * Specifies createdDate. + * @param createdDate The latest data export rule modification time + * @return the next definition stage + */ + WithCreate withCreatedDate(String createdDate); + } + + /** + * The stage of the dataexport definition allowing to specify DataExportId. + */ + interface WithDataExportId { + /** + * Specifies dataExportId. + * @param dataExportId The data export rule ID + * @return the next definition stage + */ + WithCreate withDataExportId(String dataExportId); + } + + /** + * The stage of the dataexport definition allowing to specify Enable. + */ + interface WithEnable { + /** + * Specifies enable. + * @param enable Active when enabled + * @return the next definition stage + */ + WithCreate withEnable(Boolean enable); + } + + /** + * The stage of the dataexport definition allowing to specify EventHubName. + */ + interface WithEventHubName { + /** + * Specifies eventHubName. + * @param eventHubName Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account + * @return the next definition stage + */ + WithCreate withEventHubName(String eventHubName); + } + + /** + * The stage of the dataexport definition allowing to specify LastModifiedDate. + */ + interface WithLastModifiedDate { + /** + * Specifies lastModifiedDate. + * @param lastModifiedDate Date and time when the export was last modified + * @return the next definition stage + */ + WithCreate withLastModifiedDate(String lastModifiedDate); + } + + /** + * The stage of the dataexport definition allowing to specify TableNames. + */ + interface WithTableNames { + /** + * Specifies tableNames. + * @param tableNames An array of tables to export, for example: [“Heartbeat, SecurityEvent”] + * @return the next definition stage + */ + WithCreate withTableNames(List tableNames); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithAllTables, DefinitionStages.WithCreatedDate, DefinitionStages.WithDataExportId, DefinitionStages.WithEnable, DefinitionStages.WithEventHubName, DefinitionStages.WithLastModifiedDate, DefinitionStages.WithTableNames { + } + } + /** + * The template for a DataExport update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAllTables, UpdateStages.WithCreatedDate, UpdateStages.WithDataExportId, UpdateStages.WithEnable, UpdateStages.WithEventHubName, UpdateStages.WithLastModifiedDate, UpdateStages.WithTableNames { + } + + /** + * Grouping of DataExport update stages. + */ + interface UpdateStages { + /** + * The stage of the dataexport update allowing to specify AllTables. + */ + interface WithAllTables { + /** + * Specifies allTables. + * @param allTables When ‘true’, all workspace's tables are exported + * @return the next update stage + */ + Update withAllTables(Boolean allTables); + } + + /** + * The stage of the dataexport update allowing to specify CreatedDate. + */ + interface WithCreatedDate { + /** + * Specifies createdDate. + * @param createdDate The latest data export rule modification time + * @return the next update stage + */ + Update withCreatedDate(String createdDate); + } + + /** + * The stage of the dataexport update allowing to specify DataExportId. + */ + interface WithDataExportId { + /** + * Specifies dataExportId. + * @param dataExportId The data export rule ID + * @return the next update stage + */ + Update withDataExportId(String dataExportId); + } + + /** + * The stage of the dataexport update allowing to specify Enable. + */ + interface WithEnable { + /** + * Specifies enable. + * @param enable Active when enabled + * @return the next update stage + */ + Update withEnable(Boolean enable); + } + + /** + * The stage of the dataexport update allowing to specify EventHubName. + */ + interface WithEventHubName { + /** + * Specifies eventHubName. + * @param eventHubName Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account + * @return the next update stage + */ + Update withEventHubName(String eventHubName); + } + + /** + * The stage of the dataexport update allowing to specify LastModifiedDate. + */ + interface WithLastModifiedDate { + /** + * Specifies lastModifiedDate. + * @param lastModifiedDate Date and time when the export was last modified + * @return the next update stage + */ + Update withLastModifiedDate(String lastModifiedDate); + } + + /** + * The stage of the dataexport update allowing to specify TableNames. + */ + interface WithTableNames { + /** + * Specifies tableNames. + * @param tableNames An array of tables to export, for example: [“Heartbeat, SecurityEvent”] + * @return the next update stage + */ + Update withTableNames(List tableNames); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExportErrorResponse.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExportErrorResponse.java new file mode 100644 index 0000000000000..b530c44102185 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExportErrorResponse.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error response indicates that the service is not able to process the + * incoming request. The reason is provided in the error message. + */ +public class DataExportErrorResponse { + /** + * The details of the error. + */ + @JsonProperty(value = "error") + private ErrorResponse error; + + /** + * Get the details of the error. + * + * @return the error value + */ + public ErrorResponse error() { + return this.error; + } + + /** + * Set the details of the error. + * + * @param error the error value to set + * @return the DataExportErrorResponse object itself. + */ + public DataExportErrorResponse withError(ErrorResponse error) { + this.error = error; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExportErrorResponseException.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExportErrorResponseException.java new file mode 100644 index 0000000000000..18aa457d71b73 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExportErrorResponseException.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with DataExportErrorResponse + * information. + */ +public class DataExportErrorResponseException extends RestException { + /** + * Initializes a new instance of the DataExportErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public DataExportErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the DataExportErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public DataExportErrorResponseException(final String message, final Response response, final DataExportErrorResponse body) { + super(message, response, body); + } + + @Override + public DataExportErrorResponse body() { + return (DataExportErrorResponse) super.body(); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExports.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExports.java new file mode 100644 index 0000000000000..b9b6b2ec59ebc --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataExports.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.DataExportsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DataExports. + */ +public interface DataExports extends SupportsCreating, HasInner { + /** + * Gets a data export instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String dataExportName); + + /** + * Lists the data export instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName); + + /** + * Deletes the specified data export in a given workspace.. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workspaceName, String dataExportName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataIngestionStatus.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataIngestionStatus.java new file mode 100644 index 0000000000000..f306c2fdefdec --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataIngestionStatus.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DataIngestionStatus. + */ +public final class DataIngestionStatus extends ExpandableStringEnum { + /** Static value RespectQuota for DataIngestionStatus. */ + public static final DataIngestionStatus RESPECT_QUOTA = fromString("RespectQuota"); + + /** Static value ForceOn for DataIngestionStatus. */ + public static final DataIngestionStatus FORCE_ON = fromString("ForceOn"); + + /** Static value ForceOff for DataIngestionStatus. */ + public static final DataIngestionStatus FORCE_OFF = fromString("ForceOff"); + + /** Static value OverQuota for DataIngestionStatus. */ + public static final DataIngestionStatus OVER_QUOTA = fromString("OverQuota"); + + /** Static value SubscriptionSuspended for DataIngestionStatus. */ + public static final DataIngestionStatus SUBSCRIPTION_SUSPENDED = fromString("SubscriptionSuspended"); + + /** Static value ApproachingQuota for DataIngestionStatus. */ + public static final DataIngestionStatus APPROACHING_QUOTA = fromString("ApproachingQuota"); + + /** + * Creates or finds a DataIngestionStatus from its string representation. + * @param name a name to look for + * @return the corresponding DataIngestionStatus + */ + @JsonCreator + public static DataIngestionStatus fromString(String name) { + return fromString(name, DataIngestionStatus.class); + } + + /** + * @return known DataIngestionStatus values + */ + public static Collection values() { + return values(DataIngestionStatus.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSource.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSource.java new file mode 100644 index 0000000000000..f0e0f1ae6e7e4 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSource.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.DataSourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import java.util.Map; + +/** + * Type representing DataSource. + */ +public interface DataSource extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + DataSourceKind kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + Object properties(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DataSource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithKind, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataSource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataSource definition. + */ + interface Blank extends WithWorkspace { + } + + /** + * The stage of the datasource definition allowing to specify Workspace. + */ + interface WithWorkspace { + /** + * Specifies resourceGroupName, workspaceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @return the next definition stage + */ + WithKind withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the datasource definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', 'SecurityEventCollectionConfiguration', 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification' + * @return the next definition stage + */ + WithProperties withKind(DataSourceKind kind); + } + + /** + * The stage of the datasource definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties The data source properties in raw json format, each kind of data source have it's own schema + * @return the next definition stage + */ + WithCreate withProperties(Object properties); + } + + /** + * The stage of the datasource definition allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag The ETag of the data source + * @return the next definition stage + */ + WithCreate withEtag(String etag); + } + + /** + * The stage of the datasource definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithEtag, DefinitionStages.WithTags { + } + } + /** + * The template for a DataSource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithTags { + } + + /** + * Grouping of DataSource update stages. + */ + interface UpdateStages { + /** + * The stage of the datasource update allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag The ETag of the data source + * @return the next update stage + */ + Update withEtag(String etag); + } + + /** + * The stage of the datasource update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceFilter.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceFilter.java new file mode 100644 index 0000000000000..231091883ae61 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceFilter.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DataSource filter. Right now, only filter by kind is supported. + */ +public class DataSourceFilter { + /** + * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', + * 'IISLogs', 'LinuxSyslog', 'LinuxSyslogCollection', + * 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', + * 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', + * 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + * 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', + * 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', + * 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + * 'SecurityWindowsBaselineConfiguration', + * 'SecurityCenterSecurityWindowsBaselineConfiguration', + * 'SecurityEventCollectionConfiguration', + * 'SecurityInsightsSecurityEventCollectionConfiguration', + * 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', + * 'ApplicationInsights', 'SqlDataClassification'. + */ + @JsonProperty(value = "kind") + private DataSourceKind kind; + + /** + * Get possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', 'SecurityEventCollectionConfiguration', 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification'. + * + * @return the kind value + */ + public DataSourceKind kind() { + return this.kind; + } + + /** + * Set possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', 'SecurityEventCollectionConfiguration', 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification'. + * + * @param kind the kind value to set + * @return the DataSourceFilter object itself. + */ + public DataSourceFilter withKind(DataSourceKind kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceKind.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceKind.java new file mode 100644 index 0000000000000..12328aa5a3c5f --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceKind.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DataSourceKind. + */ +public final class DataSourceKind extends ExpandableStringEnum { + /** Static value WindowsEvent for DataSourceKind. */ + public static final DataSourceKind WINDOWS_EVENT = fromString("WindowsEvent"); + + /** Static value WindowsPerformanceCounter for DataSourceKind. */ + public static final DataSourceKind WINDOWS_PERFORMANCE_COUNTER = fromString("WindowsPerformanceCounter"); + + /** Static value IISLogs for DataSourceKind. */ + public static final DataSourceKind IISLOGS = fromString("IISLogs"); + + /** Static value LinuxSyslog for DataSourceKind. */ + public static final DataSourceKind LINUX_SYSLOG = fromString("LinuxSyslog"); + + /** Static value LinuxSyslogCollection for DataSourceKind. */ + public static final DataSourceKind LINUX_SYSLOG_COLLECTION = fromString("LinuxSyslogCollection"); + + /** Static value LinuxPerformanceObject for DataSourceKind. */ + public static final DataSourceKind LINUX_PERFORMANCE_OBJECT = fromString("LinuxPerformanceObject"); + + /** Static value LinuxPerformanceCollection for DataSourceKind. */ + public static final DataSourceKind LINUX_PERFORMANCE_COLLECTION = fromString("LinuxPerformanceCollection"); + + /** Static value CustomLog for DataSourceKind. */ + public static final DataSourceKind CUSTOM_LOG = fromString("CustomLog"); + + /** Static value CustomLogCollection for DataSourceKind. */ + public static final DataSourceKind CUSTOM_LOG_COLLECTION = fromString("CustomLogCollection"); + + /** Static value AzureAuditLog for DataSourceKind. */ + public static final DataSourceKind AZURE_AUDIT_LOG = fromString("AzureAuditLog"); + + /** Static value AzureActivityLog for DataSourceKind. */ + public static final DataSourceKind AZURE_ACTIVITY_LOG = fromString("AzureActivityLog"); + + /** Static value GenericDataSource for DataSourceKind. */ + public static final DataSourceKind GENERIC_DATA_SOURCE = fromString("GenericDataSource"); + + /** Static value ChangeTrackingCustomPath for DataSourceKind. */ + public static final DataSourceKind CHANGE_TRACKING_CUSTOM_PATH = fromString("ChangeTrackingCustomPath"); + + /** Static value ChangeTrackingPath for DataSourceKind. */ + public static final DataSourceKind CHANGE_TRACKING_PATH = fromString("ChangeTrackingPath"); + + /** Static value ChangeTrackingServices for DataSourceKind. */ + public static final DataSourceKind CHANGE_TRACKING_SERVICES = fromString("ChangeTrackingServices"); + + /** Static value ChangeTrackingDataTypeConfiguration for DataSourceKind. */ + public static final DataSourceKind CHANGE_TRACKING_DATA_TYPE_CONFIGURATION = fromString("ChangeTrackingDataTypeConfiguration"); + + /** Static value ChangeTrackingDefaultRegistry for DataSourceKind. */ + public static final DataSourceKind CHANGE_TRACKING_DEFAULT_REGISTRY = fromString("ChangeTrackingDefaultRegistry"); + + /** Static value ChangeTrackingRegistry for DataSourceKind. */ + public static final DataSourceKind CHANGE_TRACKING_REGISTRY = fromString("ChangeTrackingRegistry"); + + /** Static value ChangeTrackingLinuxPath for DataSourceKind. */ + public static final DataSourceKind CHANGE_TRACKING_LINUX_PATH = fromString("ChangeTrackingLinuxPath"); + + /** Static value LinuxChangeTrackingPath for DataSourceKind. */ + public static final DataSourceKind LINUX_CHANGE_TRACKING_PATH = fromString("LinuxChangeTrackingPath"); + + /** Static value ChangeTrackingContentLocation for DataSourceKind. */ + public static final DataSourceKind CHANGE_TRACKING_CONTENT_LOCATION = fromString("ChangeTrackingContentLocation"); + + /** Static value WindowsTelemetry for DataSourceKind. */ + public static final DataSourceKind WINDOWS_TELEMETRY = fromString("WindowsTelemetry"); + + /** Static value Office365 for DataSourceKind. */ + public static final DataSourceKind OFFICE365 = fromString("Office365"); + + /** Static value SecurityWindowsBaselineConfiguration for DataSourceKind. */ + public static final DataSourceKind SECURITY_WINDOWS_BASELINE_CONFIGURATION = fromString("SecurityWindowsBaselineConfiguration"); + + /** Static value SecurityCenterSecurityWindowsBaselineConfiguration for DataSourceKind. */ + public static final DataSourceKind SECURITY_CENTER_SECURITY_WINDOWS_BASELINE_CONFIGURATION = fromString("SecurityCenterSecurityWindowsBaselineConfiguration"); + + /** Static value SecurityEventCollectionConfiguration for DataSourceKind. */ + public static final DataSourceKind SECURITY_EVENT_COLLECTION_CONFIGURATION = fromString("SecurityEventCollectionConfiguration"); + + /** Static value SecurityInsightsSecurityEventCollectionConfiguration for DataSourceKind. */ + public static final DataSourceKind SECURITY_INSIGHTS_SECURITY_EVENT_COLLECTION_CONFIGURATION = fromString("SecurityInsightsSecurityEventCollectionConfiguration"); + + /** Static value ImportComputerGroup for DataSourceKind. */ + public static final DataSourceKind IMPORT_COMPUTER_GROUP = fromString("ImportComputerGroup"); + + /** Static value NetworkMonitoring for DataSourceKind. */ + public static final DataSourceKind NETWORK_MONITORING = fromString("NetworkMonitoring"); + + /** Static value Itsm for DataSourceKind. */ + public static final DataSourceKind ITSM = fromString("Itsm"); + + /** Static value DnsAnalytics for DataSourceKind. */ + public static final DataSourceKind DNS_ANALYTICS = fromString("DnsAnalytics"); + + /** Static value ApplicationInsights for DataSourceKind. */ + public static final DataSourceKind APPLICATION_INSIGHTS = fromString("ApplicationInsights"); + + /** Static value SqlDataClassification for DataSourceKind. */ + public static final DataSourceKind SQL_DATA_CLASSIFICATION = fromString("SqlDataClassification"); + + /** + * Creates or finds a DataSourceKind from its string representation. + * @param name a name to look for + * @return the corresponding DataSourceKind + */ + @JsonCreator + public static DataSourceKind fromString(String name) { + return fromString(name, DataSourceKind.class); + } + + /** + * @return known DataSourceKind values + */ + public static Collection values() { + return values(DataSourceKind.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceType.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceType.java new file mode 100644 index 0000000000000..b1ea7c7d1236c --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSourceType.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataSourceType. + */ +public enum DataSourceType { + /** Enum value CustomLogs. */ + CUSTOM_LOGS("CustomLogs"), + + /** Enum value AzureWatson. */ + AZURE_WATSON("AzureWatson"), + + /** Enum value Query. */ + QUERY("Query"), + + /** Enum value Alerts. */ + ALERTS("Alerts"); + + /** The actual serialized value for a DataSourceType instance. */ + private String value; + + DataSourceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataSourceType instance. + * + * @param value the serialized value to parse. + * @return the parsed DataSourceType object, or null if unable to parse. + */ + @JsonCreator + public static DataSourceType fromString(String value) { + DataSourceType[] items = DataSourceType.values(); + for (DataSourceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSources.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSources.java new file mode 100644 index 0000000000000..dcd3518f39796 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DataSources.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.DataSourcesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DataSources. + */ +public interface DataSources extends SupportsCreating, HasInner { + /** + * Gets a datasource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String dataSourceName); + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter); + + /** + * Deletes a data source instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workspaceName, String dataSourceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DeletedWorkspaces.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DeletedWorkspaces.java new file mode 100644 index 0000000000000..2d94e44d803ef --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/DeletedWorkspaces.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.DeletedWorkspacesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DeletedWorkspaces. + */ +public interface DeletedWorkspaces extends SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorAdditionalInfo.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorAdditionalInfo.java new file mode 100644 index 0000000000000..38b8736aaf902 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorAdditionalInfo.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource management error additional info. + */ +public class ErrorAdditionalInfo { + /** + * The additional info type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * The additional info. + */ + @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY) + private Object info; + + /** + * Get the additional info type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the additional info. + * + * @return the info value + */ + public Object info() { + return this.info; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorContract.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorContract.java new file mode 100644 index 0000000000000..a81b8365247ac --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorContract.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error details. + * Contains details when the response code indicates an error. + */ +public class ErrorContract { + /** + * The details of the error. + */ + @JsonProperty(value = "error") + private ErrorResponse error; + + /** + * Get the details of the error. + * + * @return the error value + */ + public ErrorResponse error() { + return this.error; + } + + /** + * Set the details of the error. + * + * @param error the error value to set + * @return the ErrorContract object itself. + */ + public ErrorContract withError(ErrorResponse error) { + this.error = error; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorContractException.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorContractException.java new file mode 100644 index 0000000000000..968146946a3d7 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorContractException.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorContract information. + */ +public class ErrorContractException extends RestException { + /** + * Initializes a new instance of the ErrorContractException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorContractException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorContractException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorContractException(final String message, final Response response, final ErrorContract body) { + super(message, response, body); + } + + @Override + public ErrorContract body() { + return (ErrorContract) super.body(); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorResponse.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorResponse.java new file mode 100644 index 0000000000000..46b32585ea601 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ErrorResponse.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource management error response. + */ +public class ErrorResponse { + /** + * The error code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * The error message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * The error target. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * The error details. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private List details; + + /** + * The error additional info. + */ + @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY) + private List additionalInfo; + + /** + * Get the error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the error target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Get the error details. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Get the error additional info. + * + * @return the additionalInfo value + */ + public List additionalInfo() { + return this.additionalInfo; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Gateways.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Gateways.java new file mode 100644 index 0000000000000..2732ef2aa0d88 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Gateways.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Completable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.GatewaysInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Gateways. + */ +public interface Gateways extends HasInner { + /** + * Delete a Log Analytics gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workspaceName, String gatewayId); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Identity.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Identity.java new file mode 100644 index 0000000000000..f234af43c6aaa --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Identity.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identity for the resource. + */ +public class Identity { + /** + * The principal ID of resource identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The tenant ID of resource. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * The identity type. Possible values include: 'SystemAssigned', 'None'. + */ + @JsonProperty(value = "type", required = true) + private IdentityType type; + + /** + * Get the principal ID of resource identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenant ID of resource. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the identity type. Possible values include: 'SystemAssigned', 'None'. + * + * @return the type value + */ + public IdentityType type() { + return this.type; + } + + /** + * Set the identity type. Possible values include: 'SystemAssigned', 'None'. + * + * @param type the type value to set + * @return the Identity object itself. + */ + public Identity withType(IdentityType type) { + this.type = type; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IdentityType.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IdentityType.java new file mode 100644 index 0000000000000..f1e8bb01b25c7 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IdentityType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for IdentityType. + */ +public enum IdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a IdentityType instance. */ + private String value; + + IdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed IdentityType object, or null if unable to parse. + */ + @JsonCreator + public static IdentityType fromString(String value) { + IdentityType[] items = IdentityType.values(); + for (IdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IntelligencePack.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IntelligencePack.java new file mode 100644 index 0000000000000..6593d1bdf9ff8 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IntelligencePack.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.IntelligencePackInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; + +/** + * Type representing IntelligencePack. + */ +public interface IntelligencePack extends HasInner, HasManager { + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IntelligencePacks.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IntelligencePacks.java new file mode 100644 index 0000000000000..9a63a0b65dfff --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/IntelligencePacks.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import rx.Completable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.IntelligencePacksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing IntelligencePacks. + */ +public interface IntelligencePacks extends HasInner { + /** + * Disables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable disableAsync(String resourceGroupName, String workspaceName, String intelligencePackName); + + /** + * Enables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable enableAsync(String resourceGroupName, String workspaceName, String intelligencePackName); + + /** + * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String workspaceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/KeyVaultProperties.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/KeyVaultProperties.java new file mode 100644 index 0000000000000..78e0b0164b727 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/KeyVaultProperties.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The key vault properties. + */ +public class KeyVaultProperties { + /** + * The Key Vault uri which holds they key associated with the Log Analytics + * cluster. + */ + @JsonProperty(value = "keyVaultUri") + private String keyVaultUri; + + /** + * The name of the key associated with the Log Analytics cluster. + */ + @JsonProperty(value = "keyName") + private String keyName; + + /** + * The version of the key associated with the Log Analytics cluster. + */ + @JsonProperty(value = "keyVersion") + private String keyVersion; + + /** + * Get the Key Vault uri which holds they key associated with the Log Analytics cluster. + * + * @return the keyVaultUri value + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the Key Vault uri which holds they key associated with the Log Analytics cluster. + * + * @param keyVaultUri the keyVaultUri value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the name of the key associated with the Log Analytics cluster. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the name of the key associated with the Log Analytics cluster. + * + * @param keyName the keyName value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the version of the key associated with the Log Analytics cluster. + * + * @return the keyVersion value + */ + public String keyVersion() { + return this.keyVersion; + } + + /** + * Set the version of the key associated with the Log Analytics cluster. + * + * @param keyVersion the keyVersion value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVersion(String keyVersion) { + this.keyVersion = keyVersion; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedService.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedService.java new file mode 100644 index 0000000000000..31100d0c44eb6 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedService.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LinkedServiceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import java.util.Map; + +/** + * Type representing LinkedService. + */ +public interface LinkedService extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + LinkedServiceEntityStatus provisioningState(); + + /** + * @return the resourceId value. + */ + String resourceId(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the writeAccessResourceId value. + */ + String writeAccessResourceId(); + + /** + * The entirety of the LinkedService definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithCreate { + } + + /** + * Grouping of LinkedService definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a LinkedService definition. + */ + interface Blank extends WithWorkspace { + } + + /** + * The stage of the linkedservice definition allowing to specify Workspace. + */ + interface WithWorkspace { + /** + * Specifies resourceGroupName, workspaceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @return the next definition stage + */ + WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the linkedservice definition allowing to specify ProvisioningState. + */ + interface WithProvisioningState { + /** + * Specifies provisioningState. + * @param provisioningState The provisioning state of the linked service. Possible values include: 'Succeeded', 'Deleting', 'ProvisioningAccount', 'Updating' + * @return the next definition stage + */ + WithCreate withProvisioningState(LinkedServiceEntityStatus provisioningState); + } + + /** + * The stage of the linkedservice definition allowing to specify ResourceId. + */ + interface WithResourceId { + /** + * Specifies resourceId. + * @param resourceId The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access + * @return the next definition stage + */ + WithCreate withResourceId(String resourceId); + } + + /** + * The stage of the linkedservice definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the linkedservice definition allowing to specify WriteAccessResourceId. + */ + interface WithWriteAccessResourceId { + /** + * Specifies writeAccessResourceId. + * @param writeAccessResourceId The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access + * @return the next definition stage + */ + WithCreate withWriteAccessResourceId(String writeAccessResourceId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithProvisioningState, DefinitionStages.WithResourceId, DefinitionStages.WithTags, DefinitionStages.WithWriteAccessResourceId { + } + } + /** + * The template for a LinkedService update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithProvisioningState, UpdateStages.WithResourceId, UpdateStages.WithTags, UpdateStages.WithWriteAccessResourceId { + } + + /** + * Grouping of LinkedService update stages. + */ + interface UpdateStages { + /** + * The stage of the linkedservice update allowing to specify ProvisioningState. + */ + interface WithProvisioningState { + /** + * Specifies provisioningState. + * @param provisioningState The provisioning state of the linked service. Possible values include: 'Succeeded', 'Deleting', 'ProvisioningAccount', 'Updating' + * @return the next update stage + */ + Update withProvisioningState(LinkedServiceEntityStatus provisioningState); + } + + /** + * The stage of the linkedservice update allowing to specify ResourceId. + */ + interface WithResourceId { + /** + * Specifies resourceId. + * @param resourceId The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access + * @return the next update stage + */ + Update withResourceId(String resourceId); + } + + /** + * The stage of the linkedservice update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + /** + * The stage of the linkedservice update allowing to specify WriteAccessResourceId. + */ + interface WithWriteAccessResourceId { + /** + * Specifies writeAccessResourceId. + * @param writeAccessResourceId The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access + * @return the next update stage + */ + Update withWriteAccessResourceId(String writeAccessResourceId); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedServiceEntityStatus.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedServiceEntityStatus.java new file mode 100644 index 0000000000000..9c675b63369bd --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedServiceEntityStatus.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LinkedServiceEntityStatus. + */ +public final class LinkedServiceEntityStatus extends ExpandableStringEnum { + /** Static value Succeeded for LinkedServiceEntityStatus. */ + public static final LinkedServiceEntityStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Deleting for LinkedServiceEntityStatus. */ + public static final LinkedServiceEntityStatus DELETING = fromString("Deleting"); + + /** Static value ProvisioningAccount for LinkedServiceEntityStatus. */ + public static final LinkedServiceEntityStatus PROVISIONING_ACCOUNT = fromString("ProvisioningAccount"); + + /** Static value Updating for LinkedServiceEntityStatus. */ + public static final LinkedServiceEntityStatus UPDATING = fromString("Updating"); + + /** + * Creates or finds a LinkedServiceEntityStatus from its string representation. + * @param name a name to look for + * @return the corresponding LinkedServiceEntityStatus + */ + @JsonCreator + public static LinkedServiceEntityStatus fromString(String name) { + return fromString(name, LinkedServiceEntityStatus.class); + } + + /** + * @return known LinkedServiceEntityStatus values + */ + public static Collection values() { + return values(LinkedServiceEntityStatus.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedServices.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedServices.java new file mode 100644 index 0000000000000..3966708a02630 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedServices.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LinkedServicesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LinkedServices. + */ +public interface LinkedServices extends SupportsCreating, HasInner { + /** + * Gets a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String linkedServiceName); + + /** + * Gets the linked services instances in a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName); + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedStorageAccounts.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedStorageAccounts.java new file mode 100644 index 0000000000000..6bcc67436946f --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedStorageAccounts.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LinkedStorageAccountsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LinkedStorageAccounts. + */ +public interface LinkedStorageAccounts extends SupportsCreating, HasInner { + /** + * Gets all linked storage account of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType); + + /** + * Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName); + + /** + * Deletes all linked storage accounts of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedStorageAccountsResource.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedStorageAccountsResource.java new file mode 100644 index 0000000000000..42e48bc2c3560 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/LinkedStorageAccountsResource.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LinkedStorageAccountsResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import java.util.List; + +/** + * Type representing LinkedStorageAccountsResource. + */ +public interface LinkedStorageAccountsResource extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the dataSourceType value. + */ + DataSourceType dataSourceType(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the storageAccountIds value. + */ + List storageAccountIds(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the LinkedStorageAccountsResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithStorageAccountIds, DefinitionStages.WithCreate { + } + + /** + * Grouping of LinkedStorageAccountsResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a LinkedStorageAccountsResource definition. + */ + interface Blank extends WithWorkspace { + } + + /** + * The stage of the linkedstorageaccountsresource definition allowing to specify Workspace. + */ + interface WithWorkspace { + /** + * Specifies resourceGroupName, workspaceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @return the next definition stage + */ + WithStorageAccountIds withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the linkedstorageaccountsresource definition allowing to specify StorageAccountIds. + */ + interface WithStorageAccountIds { + /** + * Specifies storageAccountIds. + * @param storageAccountIds Linked storage accounts resources ids + * @return the next definition stage + */ + WithCreate withStorageAccountIds(List storageAccountIds); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a LinkedStorageAccountsResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithStorageAccountIds { + } + + /** + * Grouping of LinkedStorageAccountsResource update stages. + */ + interface UpdateStages { + /** + * The stage of the linkedstorageaccountsresource update allowing to specify StorageAccountIds. + */ + interface WithStorageAccountIds { + /** + * Specifies storageAccountIds. + * @param storageAccountIds Linked storage accounts resources ids + * @return the next update stage + */ + Update withStorageAccountIds(List storageAccountIds); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ManagementGroup.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ManagementGroup.java new file mode 100644 index 0000000000000..f0a80f980320d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ManagementGroup.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.ManagementGroupInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import org.joda.time.DateTime; + +/** + * Type representing ManagementGroup. + */ +public interface ManagementGroup extends HasInner, HasManager { + /** + * @return the created value. + */ + DateTime created(); + + /** + * @return the dataReceived value. + */ + DateTime dataReceived(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isGateway value. + */ + Boolean isGateway(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the serverCount value. + */ + Integer serverCount(); + + /** + * @return the sku value. + */ + String sku(); + + /** + * @return the version value. + */ + String version(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ManagementGroups.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ManagementGroups.java new file mode 100644 index 0000000000000..6ec8ab4c58e73 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/ManagementGroups.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.ManagementGroupsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ManagementGroups. + */ +public interface ManagementGroups extends HasInner { + /** + * Gets a list of management groups connected to a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String workspaceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/MetricName.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/MetricName.java new file mode 100644 index 0000000000000..cb9ff04c1f759 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/MetricName.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The name of a metric. + */ +public class MetricName { + /** + * The system name of the metric. + */ + @JsonProperty(value = "value") + private String value; + + /** + * The localized name of the metric. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * Get the system name of the metric. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the system name of the metric. + * + * @param value the value value to set + * @return the MetricName object itself. + */ + public MetricName withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the localized name of the metric. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localized name of the metric. + * + * @param localizedValue the localizedValue value to set + * @return the MetricName object itself. + */ + public MetricName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Operation.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Operation.java new file mode 100644 index 0000000000000..c97a5eb6ec0d5 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Operation.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationDisplay.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationDisplay.java new file mode 100644 index 0000000000000..6c620b5289fa0 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationDisplay.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Display metadata associated with the operation. + */ +public class OperationDisplay { + /** + * Service provider: Microsoft OperationsManagement. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * Resource on which the operation is performed etc. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * Type of operation: get, read, delete, etc. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * Description of operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get service provider: Microsoft OperationsManagement. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set service provider: Microsoft OperationsManagement. + * + * @param provider the provider value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get resource on which the operation is performed etc. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set resource on which the operation is performed etc. + * + * @param resource the resource value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get type of operation: get, read, delete, etc. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set type of operation: get, read, delete, etc. + * + * @param operation the operation value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get description of operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of operation. + * + * @param description the description value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationStatus.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationStatus.java new file mode 100644 index 0000000000000..06c639bd6bf12 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationStatus.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.OperationStatusInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; + +/** + * Type representing OperationStatus. + */ +public interface OperationStatus extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the endTime value. + */ + String endTime(); + + /** + * @return the error value. + */ + ErrorResponse error(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the startTime value. + */ + String startTime(); + + /** + * @return the status value. + */ + String status(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationStatuses.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationStatuses.java new file mode 100644 index 0000000000000..bc2a54e45fb67 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/OperationStatuses.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.OperationStatusesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing OperationStatuses. + */ +public interface OperationStatuses extends HasInner { + /** + * Get the status of a long running azure asynchronous operation. + * + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String location, String asyncOperationId); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Operations.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Operations.java new file mode 100644 index 0000000000000..fec64b4e68a53 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Operations.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PrivateLinkScopedResource.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PrivateLinkScopedResource.java new file mode 100644 index 0000000000000..2fc08b6369df1 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PrivateLinkScopedResource.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The private link scope resource reference. + */ +public class PrivateLinkScopedResource { + /** + * The full resource Id of the private link scope resource. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * The private link scope unique Identifier. + */ + @JsonProperty(value = "scopeId") + private String scopeId; + + /** + * Get the full resource Id of the private link scope resource. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the full resource Id of the private link scope resource. + * + * @param resourceId the resourceId value to set + * @return the PrivateLinkScopedResource object itself. + */ + public PrivateLinkScopedResource withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the private link scope unique Identifier. + * + * @return the scopeId value + */ + public String scopeId() { + return this.scopeId; + } + + /** + * Set the private link scope unique Identifier. + * + * @param scopeId the scopeId value to set + * @return the PrivateLinkScopedResource object itself. + */ + public PrivateLinkScopedResource withScopeId(String scopeId) { + this.scopeId = scopeId; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PublicNetworkAccessType.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PublicNetworkAccessType.java new file mode 100644 index 0000000000000..fd2e4bde03e98 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PublicNetworkAccessType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PublicNetworkAccessType. + */ +public final class PublicNetworkAccessType extends ExpandableStringEnum { + /** Static value Enabled for PublicNetworkAccessType. */ + public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); + + /** Static value Disabled for PublicNetworkAccessType. */ + public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); + + /** + * Creates or finds a PublicNetworkAccessType from its string representation. + * @param name a name to look for + * @return the corresponding PublicNetworkAccessType + */ + @JsonCreator + public static PublicNetworkAccessType fromString(String name) { + return fromString(name, PublicNetworkAccessType.class); + } + + /** + * @return known PublicNetworkAccessType values + */ + public static Collection values() { + return values(PublicNetworkAccessType.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PurgeState.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PurgeState.java new file mode 100644 index 0000000000000..5b213530bf8c1 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/PurgeState.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PurgeState. + */ +public final class PurgeState extends ExpandableStringEnum { + /** Static value pending for PurgeState. */ + public static final PurgeState PENDING = fromString("pending"); + + /** Static value completed for PurgeState. */ + public static final PurgeState COMPLETED = fromString("completed"); + + /** + * Creates or finds a PurgeState from its string representation. + * @param name a name to look for + * @return the corresponding PurgeState + */ + @JsonCreator + public static PurgeState fromString(String name) { + return fromString(name, PurgeState.class); + } + + /** + * @return known PurgeState values + */ + public static Collection values() { + return values(PurgeState.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearch.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearch.java new file mode 100644 index 0000000000000..9eda93dc107dc --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearch.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.SavedSearchInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import java.util.List; + +/** + * Type representing SavedSearch. + */ +public interface SavedSearch extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the category value. + */ + String category(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the functionAlias value. + */ + String functionAlias(); + + /** + * @return the functionParameters value. + */ + String functionParameters(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the query value. + */ + String query(); + + /** + * @return the tags value. + */ + List tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the version value. + */ + Long version(); + + /** + * The entirety of the SavedSearch definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithCategory, DefinitionStages.WithDisplayName, DefinitionStages.WithQuery, DefinitionStages.WithCreate { + } + + /** + * Grouping of SavedSearch definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a SavedSearch definition. + */ + interface Blank extends WithWorkspace { + } + + /** + * The stage of the savedsearch definition allowing to specify Workspace. + */ + interface WithWorkspace { + /** + * Specifies resourceGroupName, workspaceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @return the next definition stage + */ + WithCategory withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the savedsearch definition allowing to specify Category. + */ + interface WithCategory { + /** + * Specifies category. + * @param category The category of the saved search. This helps the user to find a saved search faster + * @return the next definition stage + */ + WithDisplayName withCategory(String category); + } + + /** + * The stage of the savedsearch definition allowing to specify DisplayName. + */ + interface WithDisplayName { + /** + * Specifies displayName. + * @param displayName Saved search display name + * @return the next definition stage + */ + WithQuery withDisplayName(String displayName); + } + + /** + * The stage of the savedsearch definition allowing to specify Query. + */ + interface WithQuery { + /** + * Specifies query. + * @param query The query expression for the saved search + * @return the next definition stage + */ + WithCreate withQuery(String query); + } + + /** + * The stage of the savedsearch definition allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag The ETag of the saved search + * @return the next definition stage + */ + WithCreate withEtag(String etag); + } + + /** + * The stage of the savedsearch definition allowing to specify FunctionAlias. + */ + interface WithFunctionAlias { + /** + * Specifies functionAlias. + * @param functionAlias The function alias if query serves as a function + * @return the next definition stage + */ + WithCreate withFunctionAlias(String functionAlias); + } + + /** + * The stage of the savedsearch definition allowing to specify FunctionParameters. + */ + interface WithFunctionParameters { + /** + * Specifies functionParameters. + * @param functionParameters The optional function parameters if query serves as a function. Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more examples and proper syntax please refer to https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions + * @return the next definition stage + */ + WithCreate withFunctionParameters(String functionParameters); + } + + /** + * The stage of the savedsearch definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags The tags attached to the saved search + * @return the next definition stage + */ + WithCreate withTags(List tags); + } + + /** + * The stage of the savedsearch definition allowing to specify Version. + */ + interface WithVersion { + /** + * Specifies version. + * @param version The version number of the query language. The current version is 2 and is the default + * @return the next definition stage + */ + WithCreate withVersion(Long version); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithEtag, DefinitionStages.WithFunctionAlias, DefinitionStages.WithFunctionParameters, DefinitionStages.WithTags, DefinitionStages.WithVersion { + } + } + /** + * The template for a SavedSearch update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithFunctionAlias, UpdateStages.WithFunctionParameters, UpdateStages.WithTags, UpdateStages.WithVersion { + } + + /** + * Grouping of SavedSearch update stages. + */ + interface UpdateStages { + /** + * The stage of the savedsearch update allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag The ETag of the saved search + * @return the next update stage + */ + Update withEtag(String etag); + } + + /** + * The stage of the savedsearch update allowing to specify FunctionAlias. + */ + interface WithFunctionAlias { + /** + * Specifies functionAlias. + * @param functionAlias The function alias if query serves as a function + * @return the next update stage + */ + Update withFunctionAlias(String functionAlias); + } + + /** + * The stage of the savedsearch update allowing to specify FunctionParameters. + */ + interface WithFunctionParameters { + /** + * Specifies functionParameters. + * @param functionParameters The optional function parameters if query serves as a function. Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more examples and proper syntax please refer to https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions + * @return the next update stage + */ + Update withFunctionParameters(String functionParameters); + } + + /** + * The stage of the savedsearch update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags The tags attached to the saved search + * @return the next update stage + */ + Update withTags(List tags); + } + + /** + * The stage of the savedsearch update allowing to specify Version. + */ + interface WithVersion { + /** + * Specifies version. + * @param version The version number of the query language. The current version is 2 and is the default + * @return the next update stage + */ + Update withVersion(Long version); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearches.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearches.java new file mode 100644 index 0000000000000..21e4ea94c0ac5 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearches.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.SavedSearchesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing SavedSearches. + */ +public interface SavedSearches extends SupportsCreating, HasInner { + /** + * Gets the saved searches for a given Log Analytics Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName); + + /** + * Gets the specified saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String savedSearchId); + + /** + * Deletes the specified saved search in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workspaceName, String savedSearchId); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearchesListResult.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearchesListResult.java new file mode 100644 index 0000000000000..49147b282d757 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SavedSearchesListResult.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.SavedSearchesListResultInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.SavedSearchInner; +import java.util.List; + +/** + * Type representing SavedSearchesListResult. + */ +public interface SavedSearchesListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Schemas.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Schemas.java new file mode 100644 index 0000000000000..6e87980b930b1 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Schemas.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.SchemasInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Schemas. + */ +public interface Schemas extends HasInner { + /** + * Gets the schema for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchGetSchemaResponse.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchGetSchemaResponse.java new file mode 100644 index 0000000000000..93ce56cf32f1b --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchGetSchemaResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.SearchGetSchemaResponseInner; +import java.util.List; + +/** + * Type representing SearchGetSchemaResponse. + */ +public interface SearchGetSchemaResponse extends HasInner, HasManager { + /** + * @return the metadata value. + */ + SearchMetadata metadata(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchMetadata.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchMetadata.java new file mode 100644 index 0000000000000..c21705954269d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchMetadata.java @@ -0,0 +1,461 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metadata for search results. + */ +public class SearchMetadata { + /** + * The request id of the search. + */ + @JsonProperty(value = "requestId") + private String searchId; + + /** + * The search result type. + */ + @JsonProperty(value = "resultType") + private String resultType; + + /** + * The total number of search results. + */ + @JsonProperty(value = "total") + private Long total; + + /** + * The number of top search results. + */ + @JsonProperty(value = "top") + private Long top; + + /** + * The id of the search results request. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The core summaries. + */ + @JsonProperty(value = "coreSummaries") + private List coreSummaries; + + /** + * The status of the search results. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The start time for the search. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The time of last update. + */ + @JsonProperty(value = "lastUpdated") + private DateTime lastUpdated; + + /** + * The ETag of the search results. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /** + * How the results are sorted. + */ + @JsonProperty(value = "sort") + private List sort; + + /** + * The request time. + */ + @JsonProperty(value = "requestTime") + private Long requestTime; + + /** + * The aggregated value field. + */ + @JsonProperty(value = "aggregatedValueField") + private String aggregatedValueField; + + /** + * The aggregated grouping fields. + */ + @JsonProperty(value = "aggregatedGroupingFields") + private String aggregatedGroupingFields; + + /** + * The sum of all aggregates returned in the result set. + */ + @JsonProperty(value = "sum") + private Long sum; + + /** + * The max of all aggregates returned in the result set. + */ + @JsonProperty(value = "max") + private Long max; + + /** + * The schema. + */ + @JsonProperty(value = "schema") + private SearchMetadataSchema schema; + + /** + * Get the request id of the search. + * + * @return the searchId value + */ + public String searchId() { + return this.searchId; + } + + /** + * Set the request id of the search. + * + * @param searchId the searchId value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withSearchId(String searchId) { + this.searchId = searchId; + return this; + } + + /** + * Get the search result type. + * + * @return the resultType value + */ + public String resultType() { + return this.resultType; + } + + /** + * Set the search result type. + * + * @param resultType the resultType value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withResultType(String resultType) { + this.resultType = resultType; + return this; + } + + /** + * Get the total number of search results. + * + * @return the total value + */ + public Long total() { + return this.total; + } + + /** + * Set the total number of search results. + * + * @param total the total value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withTotal(Long total) { + this.total = total; + return this; + } + + /** + * Get the number of top search results. + * + * @return the top value + */ + public Long top() { + return this.top; + } + + /** + * Set the number of top search results. + * + * @param top the top value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withTop(Long top) { + this.top = top; + return this; + } + + /** + * Get the id of the search results request. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id of the search results request. + * + * @param id the id value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withId(String id) { + this.id = id; + return this; + } + + /** + * Get the core summaries. + * + * @return the coreSummaries value + */ + public List coreSummaries() { + return this.coreSummaries; + } + + /** + * Set the core summaries. + * + * @param coreSummaries the coreSummaries value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withCoreSummaries(List coreSummaries) { + this.coreSummaries = coreSummaries; + return this; + } + + /** + * Get the status of the search results. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the status of the search results. + * + * @param status the status value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the start time for the search. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time for the search. + * + * @param startTime the startTime value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the time of last update. + * + * @return the lastUpdated value + */ + public DateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the time of last update. + * + * @param lastUpdated the lastUpdated value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withLastUpdated(DateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the ETag of the search results. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag of the search results. + * + * @param eTag the eTag value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get how the results are sorted. + * + * @return the sort value + */ + public List sort() { + return this.sort; + } + + /** + * Set how the results are sorted. + * + * @param sort the sort value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withSort(List sort) { + this.sort = sort; + return this; + } + + /** + * Get the request time. + * + * @return the requestTime value + */ + public Long requestTime() { + return this.requestTime; + } + + /** + * Set the request time. + * + * @param requestTime the requestTime value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withRequestTime(Long requestTime) { + this.requestTime = requestTime; + return this; + } + + /** + * Get the aggregated value field. + * + * @return the aggregatedValueField value + */ + public String aggregatedValueField() { + return this.aggregatedValueField; + } + + /** + * Set the aggregated value field. + * + * @param aggregatedValueField the aggregatedValueField value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withAggregatedValueField(String aggregatedValueField) { + this.aggregatedValueField = aggregatedValueField; + return this; + } + + /** + * Get the aggregated grouping fields. + * + * @return the aggregatedGroupingFields value + */ + public String aggregatedGroupingFields() { + return this.aggregatedGroupingFields; + } + + /** + * Set the aggregated grouping fields. + * + * @param aggregatedGroupingFields the aggregatedGroupingFields value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withAggregatedGroupingFields(String aggregatedGroupingFields) { + this.aggregatedGroupingFields = aggregatedGroupingFields; + return this; + } + + /** + * Get the sum of all aggregates returned in the result set. + * + * @return the sum value + */ + public Long sum() { + return this.sum; + } + + /** + * Set the sum of all aggregates returned in the result set. + * + * @param sum the sum value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withSum(Long sum) { + this.sum = sum; + return this; + } + + /** + * Get the max of all aggregates returned in the result set. + * + * @return the max value + */ + public Long max() { + return this.max; + } + + /** + * Set the max of all aggregates returned in the result set. + * + * @param max the max value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withMax(Long max) { + this.max = max; + return this; + } + + /** + * Get the schema. + * + * @return the schema value + */ + public SearchMetadataSchema schema() { + return this.schema; + } + + /** + * Set the schema. + * + * @param schema the schema value to set + * @return the SearchMetadata object itself. + */ + public SearchMetadata withSchema(SearchMetadataSchema schema) { + this.schema = schema; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchMetadataSchema.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchMetadataSchema.java new file mode 100644 index 0000000000000..0ffe22a0c3aad --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchMetadataSchema.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema metadata for search. + */ +public class SearchMetadataSchema { + /** + * The name of the metadata schema. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The version of the metadata schema. + */ + @JsonProperty(value = "version") + private Integer version; + + /** + * Get the name of the metadata schema. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the metadata schema. + * + * @param name the name value to set + * @return the SearchMetadataSchema object itself. + */ + public SearchMetadataSchema withName(String name) { + this.name = name; + return this; + } + + /** + * Get the version of the metadata schema. + * + * @return the version value + */ + public Integer version() { + return this.version; + } + + /** + * Set the version of the metadata schema. + * + * @param version the version value to set + * @return the SearchMetadataSchema object itself. + */ + public SearchMetadataSchema withVersion(Integer version) { + this.version = version; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSchemaValue.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSchemaValue.java new file mode 100644 index 0000000000000..8b6f30de9763f --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSchemaValue.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Value object for schema results. + */ +public class SearchSchemaValue { + /** + * The name of the schema. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display name of the schema. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The boolean that indicates the field is searchable as free text. + */ + @JsonProperty(value = "indexed", required = true) + private boolean indexed; + + /** + * The boolean that indicates whether or not the field is stored. + */ + @JsonProperty(value = "stored", required = true) + private boolean stored; + + /** + * The boolean that indicates whether or not the field is a facet. + */ + @JsonProperty(value = "facet", required = true) + private boolean facet; + + /** + * The array of workflows containing the field. + */ + @JsonProperty(value = "ownerType") + private List ownerType; + + /** + * Get the name of the schema. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the schema. + * + * @param name the name value to set + * @return the SearchSchemaValue object itself. + */ + public SearchSchemaValue withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display name of the schema. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the schema. + * + * @param displayName the displayName value to set + * @return the SearchSchemaValue object itself. + */ + public SearchSchemaValue withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type. + * + * @param type the type value to set + * @return the SearchSchemaValue object itself. + */ + public SearchSchemaValue withType(String type) { + this.type = type; + return this; + } + + /** + * Get the boolean that indicates the field is searchable as free text. + * + * @return the indexed value + */ + public boolean indexed() { + return this.indexed; + } + + /** + * Set the boolean that indicates the field is searchable as free text. + * + * @param indexed the indexed value to set + * @return the SearchSchemaValue object itself. + */ + public SearchSchemaValue withIndexed(boolean indexed) { + this.indexed = indexed; + return this; + } + + /** + * Get the boolean that indicates whether or not the field is stored. + * + * @return the stored value + */ + public boolean stored() { + return this.stored; + } + + /** + * Set the boolean that indicates whether or not the field is stored. + * + * @param stored the stored value to set + * @return the SearchSchemaValue object itself. + */ + public SearchSchemaValue withStored(boolean stored) { + this.stored = stored; + return this; + } + + /** + * Get the boolean that indicates whether or not the field is a facet. + * + * @return the facet value + */ + public boolean facet() { + return this.facet; + } + + /** + * Set the boolean that indicates whether or not the field is a facet. + * + * @param facet the facet value to set + * @return the SearchSchemaValue object itself. + */ + public SearchSchemaValue withFacet(boolean facet) { + this.facet = facet; + return this; + } + + /** + * Get the array of workflows containing the field. + * + * @return the ownerType value + */ + public List ownerType() { + return this.ownerType; + } + + /** + * Set the array of workflows containing the field. + * + * @param ownerType the ownerType value to set + * @return the SearchSchemaValue object itself. + */ + public SearchSchemaValue withOwnerType(List ownerType) { + this.ownerType = ownerType; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSort.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSort.java new file mode 100644 index 0000000000000..e32aca7eeae10 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSort.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The sort parameters for search. + */ +public class SearchSort { + /** + * The name of the field the search query is sorted on. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The sort order of the search. Possible values include: 'asc', 'desc'. + */ + @JsonProperty(value = "order") + private SearchSortEnum order; + + /** + * Get the name of the field the search query is sorted on. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the field the search query is sorted on. + * + * @param name the name value to set + * @return the SearchSort object itself. + */ + public SearchSort withName(String name) { + this.name = name; + return this; + } + + /** + * Get the sort order of the search. Possible values include: 'asc', 'desc'. + * + * @return the order value + */ + public SearchSortEnum order() { + return this.order; + } + + /** + * Set the sort order of the search. Possible values include: 'asc', 'desc'. + * + * @param order the order value to set + * @return the SearchSort object itself. + */ + public SearchSort withOrder(SearchSortEnum order) { + this.order = order; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSortEnum.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSortEnum.java new file mode 100644 index 0000000000000..2d20dccd68ffb --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SearchSortEnum.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SearchSortEnum. + */ +public final class SearchSortEnum extends ExpandableStringEnum { + /** Static value asc for SearchSortEnum. */ + public static final SearchSortEnum ASC = fromString("asc"); + + /** Static value desc for SearchSortEnum. */ + public static final SearchSortEnum DESC = fromString("desc"); + + /** + * Creates or finds a SearchSortEnum from its string representation. + * @param name a name to look for + * @return the corresponding SearchSortEnum + */ + @JsonCreator + public static SearchSortEnum fromString(String name) { + return fromString(name, SearchSortEnum.class); + } + + /** + * @return known SearchSortEnum values + */ + public static Collection values() { + return values(SearchSortEnum.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SharedKeys.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SharedKeys.java new file mode 100644 index 0000000000000..5677c37e8db85 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SharedKeys.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.SharedKeysInner; + +/** + * Type representing SharedKeys. + */ +public interface SharedKeys extends HasInner, HasManager { + /** + * @return the primarySharedKey value. + */ + String primarySharedKey(); + + /** + * @return the secondarySharedKey value. + */ + String secondarySharedKey(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SharedKeysOperations.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SharedKeysOperations.java new file mode 100644 index 0000000000000..1a7169f570ef7 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SharedKeysOperations.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.SharedKeysOperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing SharedKeysOperations. + */ +public interface SharedKeysOperations extends HasInner { + /** + * Gets the shared keys for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getSharedKeysAsync(String resourceGroupName, String workspaceName); + + /** + * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational Insights agents to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateAsync(String resourceGroupName, String workspaceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SkuNameEnum.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SkuNameEnum.java new file mode 100644 index 0000000000000..20cd3c875268e --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/SkuNameEnum.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SkuNameEnum. + */ +public final class SkuNameEnum extends ExpandableStringEnum { + /** Static value Free for SkuNameEnum. */ + public static final SkuNameEnum FREE = fromString("Free"); + + /** Static value Standard for SkuNameEnum. */ + public static final SkuNameEnum STANDARD = fromString("Standard"); + + /** Static value Premium for SkuNameEnum. */ + public static final SkuNameEnum PREMIUM = fromString("Premium"); + + /** Static value PerNode for SkuNameEnum. */ + public static final SkuNameEnum PER_NODE = fromString("PerNode"); + + /** Static value PerGB2018 for SkuNameEnum. */ + public static final SkuNameEnum PER_GB2018 = fromString("PerGB2018"); + + /** Static value Standalone for SkuNameEnum. */ + public static final SkuNameEnum STANDALONE = fromString("Standalone"); + + /** Static value CapacityReservation for SkuNameEnum. */ + public static final SkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation"); + + /** + * Creates or finds a SkuNameEnum from its string representation. + * @param name a name to look for + * @return the corresponding SkuNameEnum + */ + @JsonCreator + public static SkuNameEnum fromString(String name) { + return fromString(name, SkuNameEnum.class); + } + + /** + * @return known SkuNameEnum values + */ + public static Collection values() { + return values(SkuNameEnum.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageAccount.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageAccount.java new file mode 100644 index 0000000000000..86910ab625470 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageAccount.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a storage account connection. + */ +public class StorageAccount { + /** + * The Azure Resource Manager ID of the storage account resource. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * The storage account key. + */ + @JsonProperty(value = "key", required = true) + private String key; + + /** + * Get the Azure Resource Manager ID of the storage account resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the Azure Resource Manager ID of the storage account resource. + * + * @param id the id value to set + * @return the StorageAccount object itself. + */ + public StorageAccount withId(String id) { + this.id = id; + return this; + } + + /** + * Get the storage account key. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set the storage account key. + * + * @param key the key value to set + * @return the StorageAccount object itself. + */ + public StorageAccount withKey(String key) { + this.key = key; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsight.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsight.java new file mode 100644 index 0000000000000..37668dfafb23c --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsight.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.StorageInsightInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import java.util.List; +import java.util.Map; + +/** + * Type representing StorageInsight. + */ +public interface StorageInsight extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the containers value. + */ + List containers(); + + /** + * @return the eTag value. + */ + String eTag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the status value. + */ + StorageInsightStatus status(); + + /** + * @return the storageAccount value. + */ + StorageAccount storageAccount(); + + /** + * @return the tables value. + */ + List tables(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the StorageInsight definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithStorageAccount, DefinitionStages.WithCreate { + } + + /** + * Grouping of StorageInsight definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a StorageInsight definition. + */ + interface Blank extends WithWorkspace { + } + + /** + * The stage of the storageinsight definition allowing to specify Workspace. + */ + interface WithWorkspace { + /** + * Specifies resourceGroupName, workspaceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @return the next definition stage + */ + WithStorageAccount withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the storageinsight definition allowing to specify StorageAccount. + */ + interface WithStorageAccount { + /** + * Specifies storageAccount. + * @param storageAccount The storage account connection details + * @return the next definition stage + */ + WithCreate withStorageAccount(StorageAccount storageAccount); + } + + /** + * The stage of the storageinsight definition allowing to specify Containers. + */ + interface WithContainers { + /** + * Specifies containers. + * @param containers The names of the blob containers that the workspace should read + * @return the next definition stage + */ + WithCreate withContainers(List containers); + } + + /** + * The stage of the storageinsight definition allowing to specify ETag. + */ + interface WithETag { + /** + * Specifies eTag. + * @param eTag The ETag of the storage insight + * @return the next definition stage + */ + WithCreate withETag(String eTag); + } + + /** + * The stage of the storageinsight definition allowing to specify Tables. + */ + interface WithTables { + /** + * Specifies tables. + * @param tables The names of the Azure tables that the workspace should read + * @return the next definition stage + */ + WithCreate withTables(List tables); + } + + /** + * The stage of the storageinsight definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithContainers, DefinitionStages.WithETag, DefinitionStages.WithTables, DefinitionStages.WithTags { + } + } + /** + * The template for a StorageInsight update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithContainers, UpdateStages.WithETag, UpdateStages.WithTables, UpdateStages.WithTags { + } + + /** + * Grouping of StorageInsight update stages. + */ + interface UpdateStages { + /** + * The stage of the storageinsight update allowing to specify Containers. + */ + interface WithContainers { + /** + * Specifies containers. + * @param containers The names of the blob containers that the workspace should read + * @return the next update stage + */ + Update withContainers(List containers); + } + + /** + * The stage of the storageinsight update allowing to specify ETag. + */ + interface WithETag { + /** + * Specifies eTag. + * @param eTag The ETag of the storage insight + * @return the next update stage + */ + Update withETag(String eTag); + } + + /** + * The stage of the storageinsight update allowing to specify Tables. + */ + interface WithTables { + /** + * Specifies tables. + * @param tables The names of the Azure tables that the workspace should read + * @return the next update stage + */ + Update withTables(List tables); + } + + /** + * The stage of the storageinsight update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightConfigs.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightConfigs.java new file mode 100644 index 0000000000000..cfd93b4ad9b7c --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightConfigs.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.StorageInsightConfigsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing StorageInsightConfigs. + */ +public interface StorageInsightConfigs extends SupportsCreating, HasInner { + /** + * Gets a storage insight instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String storageInsightName); + + /** + * Lists the storage insight instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByWorkspaceAsync(final String resourceGroupName, final String workspaceName); + + /** + * Deletes a storageInsightsConfigs resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workspaceName, String storageInsightName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightState.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightState.java new file mode 100644 index 0000000000000..91922eea4ac92 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightState.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for StorageInsightState. + */ +public final class StorageInsightState extends ExpandableStringEnum { + /** Static value OK for StorageInsightState. */ + public static final StorageInsightState OK = fromString("OK"); + + /** Static value ERROR for StorageInsightState. */ + public static final StorageInsightState ERROR = fromString("ERROR"); + + /** + * Creates or finds a StorageInsightState from its string representation. + * @param name a name to look for + * @return the corresponding StorageInsightState + */ + @JsonCreator + public static StorageInsightState fromString(String name) { + return fromString(name, StorageInsightState.class); + } + + /** + * @return known StorageInsightState values + */ + public static Collection values() { + return values(StorageInsightState.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightStatus.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightStatus.java new file mode 100644 index 0000000000000..c982f21365611 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/StorageInsightStatus.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The status of the storage insight. + */ +public class StorageInsightStatus { + /** + * The state of the storage insight connection to the workspace. Possible + * values include: 'OK', 'ERROR'. + */ + @JsonProperty(value = "state", required = true) + private StorageInsightState state; + + /** + * Description of the state of the storage insight. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the state of the storage insight connection to the workspace. Possible values include: 'OK', 'ERROR'. + * + * @return the state value + */ + public StorageInsightState state() { + return this.state; + } + + /** + * Set the state of the storage insight connection to the workspace. Possible values include: 'OK', 'ERROR'. + * + * @param state the state value to set + * @return the StorageInsightStatus object itself. + */ + public StorageInsightStatus withState(StorageInsightState state) { + this.state = state; + return this; + } + + /** + * Get description of the state of the storage insight. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the state of the storage insight. + * + * @param description the description value to set + * @return the StorageInsightStatus object itself. + */ + public StorageInsightStatus withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Table.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Table.java new file mode 100644 index 0000000000000..1bf657a7f232a --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Table.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.TableInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; + +/** + * Type representing Table. + */ +public interface Table extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the retentionInDays value. + */ + Integer retentionInDays(); + + /** + * @return the type value. + */ + String type(); + + /** + * The template for a Table update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable
, UpdateStages.WithRetentionInDays { + } + + /** + * Grouping of Table update stages. + */ + interface UpdateStages { + /** + * The stage of the table update allowing to specify RetentionInDays. + */ + interface WithRetentionInDays { + /** + * Specifies retentionInDays. + * @param retentionInDays The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention + * @return the next update stage + */ + Update withRetentionInDays(Integer retentionInDays); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Tables.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Tables.java new file mode 100644 index 0000000000000..e688a8ffbaa98 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Tables.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.TablesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Tables. + */ +public interface Tables extends HasInner { + /** + * Gets a Log Analytics workspace table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable
getAsync(String resourceGroupName, String workspaceName, String tableName); + + /** + * Gets all the tables for the specified Log Analytics workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable
listByWorkspaceAsync(String resourceGroupName, String workspaceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Tag.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Tag.java new file mode 100644 index 0000000000000..ddbff4f3d22e3 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Tag.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A tag of a saved search. + */ +public class Tag { + /** + * The tag name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The tag value. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * Get the tag name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the tag name. + * + * @param name the name value to set + * @return the Tag object itself. + */ + public Tag withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tag value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the tag value. + * + * @param value the value value to set + * @return the Tag object itself. + */ + public Tag withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Type.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Type.java new file mode 100644 index 0000000000000..5ed5cbc0962db --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Type.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Type. + */ +public final class Type extends ExpandableStringEnum { + /** Static value StorageAccount for Type. */ + public static final Type STORAGE_ACCOUNT = fromString("StorageAccount"); + + /** Static value EventHub for Type. */ + public static final Type EVENT_HUB = fromString("EventHub"); + + /** + * Creates or finds a Type from its string representation. + * @param name a name to look for + * @return the corresponding Type + */ + @JsonCreator + public static Type fromString(String name) { + return fromString(name, Type.class); + } + + /** + * @return known Type values + */ + public static Collection values() { + return values(Type.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/UsageMetric.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/UsageMetric.java new file mode 100644 index 0000000000000..0779a8da82929 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/UsageMetric.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.UsageMetricInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import org.joda.time.DateTime; + +/** + * Type representing UsageMetric. + */ +public interface UsageMetric extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Double currentValue(); + + /** + * @return the limit value. + */ + Double limit(); + + /** + * @return the name value. + */ + MetricName name(); + + /** + * @return the nextResetTime value. + */ + DateTime nextResetTime(); + + /** + * @return the quotaPeriod value. + */ + String quotaPeriod(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Usages.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Usages.java new file mode 100644 index 0000000000000..e7354997e350b --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Usages.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.UsagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Usages. + */ +public interface Usages extends HasInner { + /** + * Gets a list of usage metrics for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String workspaceName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Workspace.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Workspace.java new file mode 100644 index 0000000000000..b78631f2c49ea --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Workspace.java @@ -0,0 +1,270 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.WorkspaceInner; + +/** + * Type representing Workspace. + */ +public interface Workspace extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the customerId value. + */ + String customerId(); + + /** + * @return the eTag value. + */ + String eTag(); + + /** + * @return the privateLinkScopedResources value. + */ + List privateLinkScopedResources(); + + /** + * @return the provisioningState value. + */ + WorkspaceEntityStatus provisioningState(); + + /** + * @return the publicNetworkAccessForIngestion value. + */ + PublicNetworkAccessType publicNetworkAccessForIngestion(); + + /** + * @return the publicNetworkAccessForQuery value. + */ + PublicNetworkAccessType publicNetworkAccessForQuery(); + + /** + * @return the retentionInDays value. + */ + Integer retentionInDays(); + + /** + * @return the sku value. + */ + WorkspaceSku sku(); + + /** + * @return the workspaceCapping value. + */ + WorkspaceCapping workspaceCapping(); + + /** + * The entirety of the Workspace definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of Workspace definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Workspace definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Workspace definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the workspace definition allowing to specify ETag. + */ + interface WithETag { + /** + * Specifies eTag. + * @param eTag The ETag of the workspace + * @return the next definition stage + */ + WithCreate withETag(String eTag); + } + + /** + * The stage of the workspace definition allowing to specify ProvisioningState. + */ + interface WithProvisioningState { + /** + * Specifies provisioningState. + * @param provisioningState The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating' + * @return the next definition stage + */ + WithCreate withProvisioningState(WorkspaceEntityStatus provisioningState); + } + + /** + * The stage of the workspace definition allowing to specify PublicNetworkAccessForIngestion. + */ + interface WithPublicNetworkAccessForIngestion { + /** + * Specifies publicNetworkAccessForIngestion. + * @param publicNetworkAccessForIngestion The network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion); + } + + /** + * The stage of the workspace definition allowing to specify PublicNetworkAccessForQuery. + */ + interface WithPublicNetworkAccessForQuery { + /** + * Specifies publicNetworkAccessForQuery. + * @param publicNetworkAccessForQuery The network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery); + } + + /** + * The stage of the workspace definition allowing to specify RetentionInDays. + */ + interface WithRetentionInDays { + /** + * Specifies retentionInDays. + * @param retentionInDays The workspace data retention in days, between 30 and 730 + * @return the next definition stage + */ + WithCreate withRetentionInDays(Integer retentionInDays); + } + + /** + * The stage of the workspace definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The SKU of the workspace + * @return the next definition stage + */ + WithCreate withSku(WorkspaceSku sku); + } + + /** + * The stage of the workspace definition allowing to specify WorkspaceCapping. + */ + interface WithWorkspaceCapping { + /** + * Specifies workspaceCapping. + * @param workspaceCapping The daily volume cap for ingestion + * @return the next definition stage + */ + WithCreate withWorkspaceCapping(WorkspaceCapping workspaceCapping); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithETag, DefinitionStages.WithProvisioningState, DefinitionStages.WithPublicNetworkAccessForIngestion, DefinitionStages.WithPublicNetworkAccessForQuery, DefinitionStages.WithRetentionInDays, DefinitionStages.WithSku, DefinitionStages.WithWorkspaceCapping { + } + } + /** + * The template for a Workspace update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithProvisioningState, UpdateStages.WithPublicNetworkAccessForIngestion, UpdateStages.WithPublicNetworkAccessForQuery, UpdateStages.WithRetentionInDays, UpdateStages.WithSku, UpdateStages.WithWorkspaceCapping { + } + + /** + * Grouping of Workspace update stages. + */ + interface UpdateStages { + /** + * The stage of the workspace update allowing to specify ProvisioningState. + */ + interface WithProvisioningState { + /** + * Specifies provisioningState. + * @param provisioningState The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating' + * @return the next update stage + */ + Update withProvisioningState(WorkspaceEntityStatus provisioningState); + } + + /** + * The stage of the workspace update allowing to specify PublicNetworkAccessForIngestion. + */ + interface WithPublicNetworkAccessForIngestion { + /** + * Specifies publicNetworkAccessForIngestion. + * @param publicNetworkAccessForIngestion The network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled' + * @return the next update stage + */ + Update withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion); + } + + /** + * The stage of the workspace update allowing to specify PublicNetworkAccessForQuery. + */ + interface WithPublicNetworkAccessForQuery { + /** + * Specifies publicNetworkAccessForQuery. + * @param publicNetworkAccessForQuery The network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled' + * @return the next update stage + */ + Update withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery); + } + + /** + * The stage of the workspace update allowing to specify RetentionInDays. + */ + interface WithRetentionInDays { + /** + * Specifies retentionInDays. + * @param retentionInDays The workspace data retention in days, between 30 and 730 + * @return the next update stage + */ + Update withRetentionInDays(Integer retentionInDays); + } + + /** + * The stage of the workspace update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The SKU of the workspace + * @return the next update stage + */ + Update withSku(WorkspaceSku sku); + } + + /** + * The stage of the workspace update allowing to specify WorkspaceCapping. + */ + interface WithWorkspaceCapping { + /** + * Specifies workspaceCapping. + * @param workspaceCapping The daily volume cap for ingestion + * @return the next update stage + */ + Update withWorkspaceCapping(WorkspaceCapping workspaceCapping); + } + + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceCapping.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceCapping.java new file mode 100644 index 0000000000000..98031874600b4 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceCapping.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The daily volume cap for ingestion. + */ +public class WorkspaceCapping { + /** + * The workspace daily quota for ingestion. + */ + @JsonProperty(value = "dailyQuotaGb") + private Double dailyQuotaGb; + + /** + * The time when the quota will be rest. + */ + @JsonProperty(value = "quotaNextResetTime", access = JsonProperty.Access.WRITE_ONLY) + private String quotaNextResetTime; + + /** + * The status of data ingestion for this workspace. Possible values + * include: 'RespectQuota', 'ForceOn', 'ForceOff', 'OverQuota', + * 'SubscriptionSuspended', 'ApproachingQuota'. + */ + @JsonProperty(value = "dataIngestionStatus", access = JsonProperty.Access.WRITE_ONLY) + private DataIngestionStatus dataIngestionStatus; + + /** + * Get the workspace daily quota for ingestion. + * + * @return the dailyQuotaGb value + */ + public Double dailyQuotaGb() { + return this.dailyQuotaGb; + } + + /** + * Set the workspace daily quota for ingestion. + * + * @param dailyQuotaGb the dailyQuotaGb value to set + * @return the WorkspaceCapping object itself. + */ + public WorkspaceCapping withDailyQuotaGb(Double dailyQuotaGb) { + this.dailyQuotaGb = dailyQuotaGb; + return this; + } + + /** + * Get the time when the quota will be rest. + * + * @return the quotaNextResetTime value + */ + public String quotaNextResetTime() { + return this.quotaNextResetTime; + } + + /** + * Get the status of data ingestion for this workspace. Possible values include: 'RespectQuota', 'ForceOn', 'ForceOff', 'OverQuota', 'SubscriptionSuspended', 'ApproachingQuota'. + * + * @return the dataIngestionStatus value + */ + public DataIngestionStatus dataIngestionStatus() { + return this.dataIngestionStatus; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceEntityStatus.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceEntityStatus.java new file mode 100644 index 0000000000000..1673381516cef --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceEntityStatus.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WorkspaceEntityStatus. + */ +public final class WorkspaceEntityStatus extends ExpandableStringEnum { + /** Static value Creating for WorkspaceEntityStatus. */ + public static final WorkspaceEntityStatus CREATING = fromString("Creating"); + + /** Static value Succeeded for WorkspaceEntityStatus. */ + public static final WorkspaceEntityStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for WorkspaceEntityStatus. */ + public static final WorkspaceEntityStatus FAILED = fromString("Failed"); + + /** Static value Canceled for WorkspaceEntityStatus. */ + public static final WorkspaceEntityStatus CANCELED = fromString("Canceled"); + + /** Static value Deleting for WorkspaceEntityStatus. */ + public static final WorkspaceEntityStatus DELETING = fromString("Deleting"); + + /** Static value ProvisioningAccount for WorkspaceEntityStatus. */ + public static final WorkspaceEntityStatus PROVISIONING_ACCOUNT = fromString("ProvisioningAccount"); + + /** Static value Updating for WorkspaceEntityStatus. */ + public static final WorkspaceEntityStatus UPDATING = fromString("Updating"); + + /** + * Creates or finds a WorkspaceEntityStatus from its string representation. + * @param name a name to look for + * @return the corresponding WorkspaceEntityStatus + */ + @JsonCreator + public static WorkspaceEntityStatus fromString(String name) { + return fromString(name, WorkspaceEntityStatus.class); + } + + /** + * @return known WorkspaceEntityStatus values + */ + public static Collection values() { + return values(WorkspaceEntityStatus.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceModel.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceModel.java new file mode 100644 index 0000000000000..7f24e9bd5538c --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceModel.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.WorkspaceInner; + +/** + * Type representing WorkspaceModel. + */ +public interface WorkspaceModel extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, HasManager { + /** + * @return the customerId value. + */ + String customerId(); + + /** + * @return the eTag value. + */ + String eTag(); + + /** + * @return the privateLinkScopedResources value. + */ + List privateLinkScopedResources(); + + /** + * @return the provisioningState value. + */ + WorkspaceEntityStatus provisioningState(); + + /** + * @return the publicNetworkAccessForIngestion value. + */ + PublicNetworkAccessType publicNetworkAccessForIngestion(); + + /** + * @return the publicNetworkAccessForQuery value. + */ + PublicNetworkAccessType publicNetworkAccessForQuery(); + + /** + * @return the retentionInDays value. + */ + Integer retentionInDays(); + + /** + * @return the sku value. + */ + WorkspaceSku sku(); + + /** + * @return the workspaceCapping value. + */ + WorkspaceCapping workspaceCapping(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePatch.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePatch.java new file mode 100644 index 0000000000000..19b40ed4ad605 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePatch.java @@ -0,0 +1,238 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The top level Workspace resource container. + */ +@JsonFlatten +public class WorkspacePatch extends AzureEntityResource { + /** + * The provisioning state of the workspace. Possible values include: + * 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + * 'ProvisioningAccount', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState") + private WorkspaceEntityStatus provisioningState; + + /** + * This is a read-only property. Represents the ID associated with the + * workspace. + */ + @JsonProperty(value = "properties.customerId", access = JsonProperty.Access.WRITE_ONLY) + private String customerId; + + /** + * The SKU of the workspace. + */ + @JsonProperty(value = "properties.sku") + private WorkspaceSku sku; + + /** + * The workspace data retention in days, between 30 and 730. + */ + @JsonProperty(value = "properties.retentionInDays") + private Integer retentionInDays; + + /** + * The daily volume cap for ingestion. + */ + @JsonProperty(value = "properties.workspaceCapping") + private WorkspaceCapping workspaceCapping; + + /** + * The network access type for accessing Log Analytics ingestion. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.publicNetworkAccessForIngestion") + private PublicNetworkAccessType publicNetworkAccessForIngestion; + + /** + * The network access type for accessing Log Analytics query. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.publicNetworkAccessForQuery") + private PublicNetworkAccessType publicNetworkAccessForQuery; + + /** + * List of linked private link scope resources. + */ + @JsonProperty(value = "properties.privateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY) + private List privateLinkScopedResources; + + /** + * Resource tags. Optional. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'. + * + * @return the provisioningState value + */ + public WorkspaceEntityStatus provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'. + * + * @param provisioningState the provisioningState value to set + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withProvisioningState(WorkspaceEntityStatus provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get this is a read-only property. Represents the ID associated with the workspace. + * + * @return the customerId value + */ + public String customerId() { + return this.customerId; + } + + /** + * Get the SKU of the workspace. + * + * @return the sku value + */ + public WorkspaceSku sku() { + return this.sku; + } + + /** + * Set the SKU of the workspace. + * + * @param sku the sku value to set + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withSku(WorkspaceSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the workspace data retention in days, between 30 and 730. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the workspace data retention in days, between 30 and 730. + * + * @param retentionInDays the retentionInDays value to set + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Get the daily volume cap for ingestion. + * + * @return the workspaceCapping value + */ + public WorkspaceCapping workspaceCapping() { + return this.workspaceCapping; + } + + /** + * Set the daily volume cap for ingestion. + * + * @param workspaceCapping the workspaceCapping value to set + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withWorkspaceCapping(WorkspaceCapping workspaceCapping) { + this.workspaceCapping = workspaceCapping; + return this; + } + + /** + * Get the network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled'. + * + * @return the publicNetworkAccessForIngestion value + */ + public PublicNetworkAccessType publicNetworkAccessForIngestion() { + return this.publicNetworkAccessForIngestion; + } + + /** + * Set the network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled'. + * + * @param publicNetworkAccessForIngestion the publicNetworkAccessForIngestion value to set + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) { + this.publicNetworkAccessForIngestion = publicNetworkAccessForIngestion; + return this; + } + + /** + * Get the network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled'. + * + * @return the publicNetworkAccessForQuery value + */ + public PublicNetworkAccessType publicNetworkAccessForQuery() { + return this.publicNetworkAccessForQuery; + } + + /** + * Set the network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled'. + * + * @param publicNetworkAccessForQuery the publicNetworkAccessForQuery value to set + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) { + this.publicNetworkAccessForQuery = publicNetworkAccessForQuery; + return this; + } + + /** + * Get list of linked private link scope resources. + * + * @return the privateLinkScopedResources value + */ + public List privateLinkScopedResources() { + return this.privateLinkScopedResources; + } + + /** + * Get resource tags. Optional. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. Optional. + * + * @param tags the tags value to set + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeBody.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeBody.java new file mode 100644 index 0000000000000..02929b7643a26 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeBody.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the body of a purge request for an App Insights Workspace. + */ +public class WorkspacePurgeBody { + /** + * Table from which to purge data. + */ + @JsonProperty(value = "table", required = true) + private String table; + + /** + * The set of columns and filters (queries) to run over them to purge the + * resulting data. + */ + @JsonProperty(value = "filters", required = true) + private List filters; + + /** + * Get table from which to purge data. + * + * @return the table value + */ + public String table() { + return this.table; + } + + /** + * Set table from which to purge data. + * + * @param table the table value to set + * @return the WorkspacePurgeBody object itself. + */ + public WorkspacePurgeBody withTable(String table) { + this.table = table; + return this; + } + + /** + * Get the set of columns and filters (queries) to run over them to purge the resulting data. + * + * @return the filters value + */ + public List filters() { + return this.filters; + } + + /** + * Set the set of columns and filters (queries) to run over them to purge the resulting data. + * + * @param filters the filters value to set + * @return the WorkspacePurgeBody object itself. + */ + public WorkspacePurgeBody withFilters(List filters) { + this.filters = filters; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeBodyFilters.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeBodyFilters.java new file mode 100644 index 0000000000000..4962635408cfd --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeBodyFilters.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * User-defined filters to return data which will be purged from the table. + */ +public class WorkspacePurgeBodyFilters { + /** + * The column of the table over which the given query should run. + */ + @JsonProperty(value = "column") + private String column; + + /** + * A query operator to evaluate over the provided column and value(s). + * Supported operators are ==, =~, in, in~, >, >=, <, <=, + * between, and have the same behavior as they would in a KQL query. + */ + @JsonProperty(value = "operator") + private String operator; + + /** + * the value for the operator to function over. This can be a number (e.g., + * > 100), a string (timestamp >= '2017-09-01') or array of values. + */ + @JsonProperty(value = "value") + private Object value; + + /** + * When filtering over custom dimensions, this key will be used as the name + * of the custom dimension. + */ + @JsonProperty(value = "key") + private String key; + + /** + * Get the column of the table over which the given query should run. + * + * @return the column value + */ + public String column() { + return this.column; + } + + /** + * Set the column of the table over which the given query should run. + * + * @param column the column value to set + * @return the WorkspacePurgeBodyFilters object itself. + */ + public WorkspacePurgeBodyFilters withColumn(String column) { + this.column = column; + return this; + } + + /** + * Get a query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL query. + * + * @return the operator value + */ + public String operator() { + return this.operator; + } + + /** + * Set a query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL query. + * + * @param operator the operator value to set + * @return the WorkspacePurgeBodyFilters object itself. + */ + public WorkspacePurgeBodyFilters withOperator(String operator) { + this.operator = operator; + return this; + } + + /** + * Get the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of values. + * + * @return the value value + */ + public Object value() { + return this.value; + } + + /** + * Set the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of values. + * + * @param value the value value to set + * @return the WorkspacePurgeBodyFilters object itself. + */ + public WorkspacePurgeBodyFilters withValue(Object value) { + this.value = value; + return this; + } + + /** + * Get when filtering over custom dimensions, this key will be used as the name of the custom dimension. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set when filtering over custom dimensions, this key will be used as the name of the custom dimension. + * + * @param key the key value to set + * @return the WorkspacePurgeBodyFilters object itself. + */ + public WorkspacePurgeBodyFilters withKey(String key) { + this.key = key; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgePurgeHeaders.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgePurgeHeaders.java new file mode 100644 index 0000000000000..b0d444f92c50b --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgePurgeHeaders.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Purge operation. + */ +public class WorkspacePurgePurgeHeaders { + /** + * The location from which to request the operation status. + */ + @JsonProperty(value = "x-ms-status-location") + private String xMsStatusLocation; + + /** + * Get the location from which to request the operation status. + * + * @return the xMsStatusLocation value + */ + public String xMsStatusLocation() { + return this.xMsStatusLocation; + } + + /** + * Set the location from which to request the operation status. + * + * @param xMsStatusLocation the xMsStatusLocation value to set + * @return the WorkspacePurgePurgeHeaders object itself. + */ + public WorkspacePurgePurgeHeaders withXMsStatusLocation(String xMsStatusLocation) { + this.xMsStatusLocation = xMsStatusLocation; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeResponse.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeResponse.java new file mode 100644 index 0000000000000..5c8e5d4432dcf --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.WorkspacePurgeResponseInner; + +/** + * Type representing WorkspacePurgeResponse. + */ +public interface WorkspacePurgeResponse extends HasInner, HasManager { + /** + * @return the operationId value. + */ + String operationId(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeStatusResponse.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeStatusResponse.java new file mode 100644 index 0000000000000..3920a103d7748 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurgeStatusResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.WorkspacePurgeStatusResponseInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.LogAnalyticsManager; + +/** + * Type representing WorkspacePurgeStatusResponse. + */ +public interface WorkspacePurgeStatusResponse extends HasInner, HasManager { + /** + * @return the status value. + */ + PurgeState status(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurges.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurges.java new file mode 100644 index 0000000000000..2b85647e77fb6 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspacePurges.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.WorkspacePurgesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing WorkspacePurges. + */ +public interface WorkspacePurges extends HasInner { + /** + * Gets status of an ongoing purge operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getPurgeStatusAsync(String resourceGroupName, String workspaceName, String purgeId); + + /** + * Purges data in an Log Analytics workspace by a set of user-defined filters. + In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable purgeAsync(String resourceGroupName, String workspaceName, WorkspacePurgeBody body); + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceSku.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceSku.java new file mode 100644 index 0000000000000..d7af80fe4c8cc --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceSku.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SKU (tier) of a workspace. + */ +public class WorkspaceSku { + /** + * The name of the SKU. Possible values include: 'Free', 'Standard', + * 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation'. + */ + @JsonProperty(value = "name", required = true) + private WorkspaceSkuNameEnum name; + + /** + * The capacity reservation level for this workspace, when + * CapacityReservation sku is selected. + */ + @JsonProperty(value = "capacityReservationLevel") + private Integer capacityReservationLevel; + + /** + * The maximum capacity reservation level available for this workspace, + * when CapacityReservation sku is selected. + */ + @JsonProperty(value = "maxCapacityReservationLevel", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxCapacityReservationLevel; + + /** + * The last time when the sku was updated. + */ + @JsonProperty(value = "lastSkuUpdate", access = JsonProperty.Access.WRITE_ONLY) + private String lastSkuUpdate; + + /** + * Get the name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation'. + * + * @return the name value + */ + public WorkspaceSkuNameEnum name() { + return this.name; + } + + /** + * Set the name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation'. + * + * @param name the name value to set + * @return the WorkspaceSku object itself. + */ + public WorkspaceSku withName(WorkspaceSkuNameEnum name) { + this.name = name; + return this; + } + + /** + * Get the capacity reservation level for this workspace, when CapacityReservation sku is selected. + * + * @return the capacityReservationLevel value + */ + public Integer capacityReservationLevel() { + return this.capacityReservationLevel; + } + + /** + * Set the capacity reservation level for this workspace, when CapacityReservation sku is selected. + * + * @param capacityReservationLevel the capacityReservationLevel value to set + * @return the WorkspaceSku object itself. + */ + public WorkspaceSku withCapacityReservationLevel(Integer capacityReservationLevel) { + this.capacityReservationLevel = capacityReservationLevel; + return this; + } + + /** + * Get the maximum capacity reservation level available for this workspace, when CapacityReservation sku is selected. + * + * @return the maxCapacityReservationLevel value + */ + public Integer maxCapacityReservationLevel() { + return this.maxCapacityReservationLevel; + } + + /** + * Get the last time when the sku was updated. + * + * @return the lastSkuUpdate value + */ + public String lastSkuUpdate() { + return this.lastSkuUpdate; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceSkuNameEnum.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceSkuNameEnum.java new file mode 100644 index 0000000000000..d8cbbcfed349e --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/WorkspaceSkuNameEnum.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WorkspaceSkuNameEnum. + */ +public final class WorkspaceSkuNameEnum extends ExpandableStringEnum { + /** Static value Free for WorkspaceSkuNameEnum. */ + public static final WorkspaceSkuNameEnum FREE = fromString("Free"); + + /** Static value Standard for WorkspaceSkuNameEnum. */ + public static final WorkspaceSkuNameEnum STANDARD = fromString("Standard"); + + /** Static value Premium for WorkspaceSkuNameEnum. */ + public static final WorkspaceSkuNameEnum PREMIUM = fromString("Premium"); + + /** Static value PerNode for WorkspaceSkuNameEnum. */ + public static final WorkspaceSkuNameEnum PER_NODE = fromString("PerNode"); + + /** Static value PerGB2018 for WorkspaceSkuNameEnum. */ + public static final WorkspaceSkuNameEnum PER_GB2018 = fromString("PerGB2018"); + + /** Static value Standalone for WorkspaceSkuNameEnum. */ + public static final WorkspaceSkuNameEnum STANDALONE = fromString("Standalone"); + + /** Static value CapacityReservation for WorkspaceSkuNameEnum. */ + public static final WorkspaceSkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation"); + + /** + * Creates or finds a WorkspaceSkuNameEnum from its string representation. + * @param name a name to look for + * @return the corresponding WorkspaceSkuNameEnum + */ + @JsonCreator + public static WorkspaceSkuNameEnum fromString(String name) { + return fromString(name, WorkspaceSkuNameEnum.class); + } + + /** + * @return known WorkspaceSkuNameEnum values + */ + public static Collection values() { + return values(WorkspaceSkuNameEnum.class); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Workspaces.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Workspaces.java new file mode 100644 index 0000000000000..80d3e463b534d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/Workspaces.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.loganalytics.v2020_08_01.implementation.WorkspacesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Workspaces. + */ +public interface Workspaces extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTierImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTierImpl.java new file mode 100644 index 0000000000000..787faa9314f7d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTierImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.AvailableServiceTier; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SkuNameEnum; + +class AvailableServiceTierImpl extends WrapperImpl implements AvailableServiceTier { + private final LogAnalyticsManager manager; + + AvailableServiceTierImpl(AvailableServiceTierInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + + + @Override + public Long capacityReservationLevel() { + return this.inner().capacityReservationLevel(); + } + + @Override + public Long defaultRetention() { + return this.inner().defaultRetention(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public String lastSkuUpdate() { + return this.inner().lastSkuUpdate(); + } + + @Override + public Long maximumRetention() { + return this.inner().maximumRetention(); + } + + @Override + public Long minimumRetention() { + return this.inner().minimumRetention(); + } + + @Override + public SkuNameEnum serviceTier() { + return this.inner().serviceTier(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTierInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTierInner.java new file mode 100644 index 0000000000000..aaf23eccd8a12 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTierInner.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.SkuNameEnum; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service Tier details. + */ +public class AvailableServiceTierInner { + /** + * The name of the Service Tier. Possible values include: 'Free', + * 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + * 'CapacityReservation'. + */ + @JsonProperty(value = "serviceTier", access = JsonProperty.Access.WRITE_ONLY) + private SkuNameEnum serviceTier; + + /** + * True if the Service Tier is enabled for the workspace. + */ + @JsonProperty(value = "enabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean enabled; + + /** + * The minimum retention for the Service Tier, in days. + */ + @JsonProperty(value = "minimumRetention", access = JsonProperty.Access.WRITE_ONLY) + private Long minimumRetention; + + /** + * The maximum retention for the Service Tier, in days. + */ + @JsonProperty(value = "maximumRetention", access = JsonProperty.Access.WRITE_ONLY) + private Long maximumRetention; + + /** + * The default retention for the Service Tier, in days. + */ + @JsonProperty(value = "defaultRetention", access = JsonProperty.Access.WRITE_ONLY) + private Long defaultRetention; + + /** + * The capacity reservation level in GB per day. Returned for the Capacity + * Reservation Service Tier. + */ + @JsonProperty(value = "capacityReservationLevel", access = JsonProperty.Access.WRITE_ONLY) + private Long capacityReservationLevel; + + /** + * Time when the sku was last updated for the workspace. Returned for the + * Capacity Reservation Service Tier. + */ + @JsonProperty(value = "lastSkuUpdate", access = JsonProperty.Access.WRITE_ONLY) + private String lastSkuUpdate; + + /** + * Get the name of the Service Tier. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation'. + * + * @return the serviceTier value + */ + public SkuNameEnum serviceTier() { + return this.serviceTier; + } + + /** + * Get true if the Service Tier is enabled for the workspace. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Get the minimum retention for the Service Tier, in days. + * + * @return the minimumRetention value + */ + public Long minimumRetention() { + return this.minimumRetention; + } + + /** + * Get the maximum retention for the Service Tier, in days. + * + * @return the maximumRetention value + */ + public Long maximumRetention() { + return this.maximumRetention; + } + + /** + * Get the default retention for the Service Tier, in days. + * + * @return the defaultRetention value + */ + public Long defaultRetention() { + return this.defaultRetention; + } + + /** + * Get the capacity reservation level in GB per day. Returned for the Capacity Reservation Service Tier. + * + * @return the capacityReservationLevel value + */ + public Long capacityReservationLevel() { + return this.capacityReservationLevel; + } + + /** + * Get time when the sku was last updated for the workspace. Returned for the Capacity Reservation Service Tier. + * + * @return the lastSkuUpdate value + */ + public String lastSkuUpdate() { + return this.lastSkuUpdate; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTiersImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTiersImpl.java new file mode 100644 index 0000000000000..c52b1b7b8be98 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTiersImpl.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.AvailableServiceTiers; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.AvailableServiceTier; + +class AvailableServiceTiersImpl extends WrapperImpl implements AvailableServiceTiers { + private final LogAnalyticsManager manager; + + AvailableServiceTiersImpl(LogAnalyticsManager manager) { + super(manager.inner().availableServiceTiers()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + private AvailableServiceTierImpl wrapModel(AvailableServiceTierInner inner) { + return new AvailableServiceTierImpl(inner, manager()); + } + + @Override + public Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + AvailableServiceTiersInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public AvailableServiceTier call(AvailableServiceTierInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTiersInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTiersInner.java new file mode 100644 index 0000000000000..823168d867c20 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/AvailableServiceTiersInner.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AvailableServiceTiers. + */ +public class AvailableServiceTiersInner { + /** The Retrofit service to perform REST calls. */ + private AvailableServiceTiersService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of AvailableServiceTiersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AvailableServiceTiersInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(AvailableServiceTiersService.class); + this.client = client; + } + + /** + * The interface defining all the services for AvailableServiceTiers to be + * used by Retrofit to perform actually REST calls. + */ + interface AvailableServiceTiersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.AvailableServiceTiers listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers") + Observable> listByWorkspace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the available service tiers for the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<AvailableServiceTierInner> object if successful. + */ + public List listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets the available service tiers for the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets the available service tiers for the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<AvailableServiceTierInner> object + */ + public Observable> listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the available service tiers for the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<AvailableServiceTierInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(this.client.subscriptionId(), resourceGroupName, workspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listByWorkspaceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClusterImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClusterImpl.java new file mode 100644 index 0000000000000..dc654d9711275 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClusterImpl.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Cluster; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ClusterPatch; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Identity; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ClusterSku; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ClusterEntityStatus; +import com.microsoft.azure.management.loganalytics.v2020_08_01.KeyVaultProperties; +import rx.functions.Func1; + +class ClusterImpl extends GroupableResourceCoreImpl implements Cluster, Cluster.Definition, Cluster.Update { + private ClusterPatch updateParameter; + ClusterImpl(String name, ClusterInner inner, LogAnalyticsManager manager) { + super(name, inner, manager); + this.updateParameter = new ClusterPatch(); + } + + @Override + public Observable createResourceAsync() { + ClustersInner client = this.manager().inner().clusters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public ClusterInner call(ClusterInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ClustersInner client = this.manager().inner().clusters(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public ClusterInner call(ClusterInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ClustersInner client = this.manager().inner().clusters(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new ClusterPatch(); + } + + @Override + public String clusterId() { + return this.inner().clusterId(); + } + + @Override + public Identity identity() { + return this.inner().identity(); + } + + @Override + public KeyVaultProperties keyVaultProperties() { + return this.inner().keyVaultProperties(); + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public ClusterEntityStatus provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ClusterSku sku() { + return this.inner().sku(); + } + + @Override + public ClusterImpl withIdentity(Identity identity) { + this.inner().withIdentity(identity); + return this; + } + + @Override + public ClusterImpl withNextLink(String nextLink) { + this.inner().withNextLink(nextLink); + return this; + } + + @Override + public ClusterImpl withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { + if (isInCreateMode()) { + this.inner().withKeyVaultProperties(keyVaultProperties); + } else { + this.updateParameter.withKeyVaultProperties(keyVaultProperties); + } + return this; + } + + @Override + public ClusterImpl withSku(ClusterSku sku) { + if (isInCreateMode()) { + this.inner().withSku(sku); + } else { + this.updateParameter.withSku(sku); + } + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClusterInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClusterInner.java new file mode 100644 index 0000000000000..538ba3363278c --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClusterInner.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.Identity; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ClusterSku; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ClusterEntityStatus; +import com.microsoft.azure.management.loganalytics.v2020_08_01.KeyVaultProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * The top level Log Analytics cluster resource container. + */ +@JsonFlatten +public class ClusterInner extends Resource { + /** + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * The sku properties. + */ + @JsonProperty(value = "sku") + private ClusterSku sku; + + /** + * The link used to get the next page of recommendations. + */ + @JsonProperty(value = "properties.nextLink") + private String nextLink; + + /** + * The ID associated with the cluster. + */ + @JsonProperty(value = "properties.clusterId", access = JsonProperty.Access.WRITE_ONLY) + private String clusterId; + + /** + * The provisioning state of the cluster. Possible values include: + * 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + * 'ProvisioningAccount', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClusterEntityStatus provisioningState; + + /** + * The associated key properties. + */ + @JsonProperty(value = "properties.keyVaultProperties") + private KeyVaultProperties keyVaultProperties; + + /** + * Get the identity of the resource. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity of the resource. + * + * @param identity the identity value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get the sku properties. + * + * @return the sku value + */ + public ClusterSku sku() { + return this.sku; + } + + /** + * Set the sku properties. + * + * @param sku the sku value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withSku(ClusterSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the link used to get the next page of recommendations. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the link used to get the next page of recommendations. + * + * @param nextLink the nextLink value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the ID associated with the cluster. + * + * @return the clusterId value + */ + public String clusterId() { + return this.clusterId; + } + + /** + * Get the provisioning state of the cluster. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'. + * + * @return the provisioningState value + */ + public ClusterEntityStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the associated key properties. + * + * @return the keyVaultProperties value + */ + public KeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the associated key properties. + * + * @param keyVaultProperties the keyVaultProperties value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClustersImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClustersImpl.java new file mode 100644 index 0000000000000..5f9752fec2a12 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClustersImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Cluster; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class ClustersImpl extends GroupableResourcesCoreImpl implements Clusters { + protected ClustersImpl(LogAnalyticsManager manager) { + super(manager.inner().clusters(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ClustersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ClustersInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + ClustersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ClustersInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Cluster call(ClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ClustersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ClustersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Cluster call(ClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ClusterImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ClusterImpl wrapModel(ClusterInner inner) { + return new ClusterImpl(inner.name(), inner, manager()); + } + + @Override + protected ClusterImpl wrapModel(String name) { + return new ClusterImpl(name, new ClusterInner(), this.manager()); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClustersInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClustersInner.java new file mode 100644 index 0000000000000..4f036cad85cf2 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ClustersInner.java @@ -0,0 +1,1062 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ClusterErrorResponseException; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ClusterPatch; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Clusters. + */ +public class ClustersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ClustersService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of ClustersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ClustersInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(ClustersService.class); + this.client = client; + } + + /** + * The interface defining all the services for Clusters to be + * used by Retrofit to perform actually REST calls. + */ + interface ClustersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters update" }) + @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterPatch parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets Log Analytics clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ClusterInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets Log Analytics clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets Log Analytics clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ClusterInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets Log Analytics clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ClusterInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets Log Analytics clusters in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ClusterErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ClusterErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ClusterErrorResponseException.class) + .build(response); + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ClusterInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ClusterInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ClusterInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ClusterErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ClusterErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ClusterErrorResponseException.class) + .build(response); + } + + /** + * Create or update a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body(); + } + + /** + * Create or update a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Create or update a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(resourceGroupName, this.client.subscriptionId(), clusterName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner beginCreateOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Create or update a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(resourceGroupName, this.client.subscriptionId(), clusterName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ClusterErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ClusterErrorResponseException.class) + .build(response); + } + + /** + * Deletes a cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String clusterName) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Deletes a cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Deletes a cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String clusterName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Deletes a cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Deletes a cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ClusterErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ClusterErrorResponseException.class) + .build(response); + } + + /** + * Gets a Log Analytics cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Gets a Log Analytics cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Gets a Log Analytics cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String clusterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a Log Analytics cluster instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws ClusterErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ClusterErrorResponseException.class) + .build(response); + } + + /** + * Updates a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); + } + + /** + * Updates a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String clusterName, ClusterPatch parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Updates a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable updateAsync(String resourceGroupName, String clusterName, ClusterPatch parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a Log Analytics cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterPatch parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.update(resourceGroupName, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws ClusterErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ClusterErrorResponseException.class) + .build(response); + } + + /** + * Gets Log Analytics clusters in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ClusterInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets Log Analytics clusters in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets Log Analytics clusters in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ClusterInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets Log Analytics clusters in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ClusterInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets Log Analytics clusters in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ClusterErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ClusterErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ClusterErrorResponseException.class) + .build(response); + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ClusterErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ClusterInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ClusterInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ClusterInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the Log Analytics clusters in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ClusterErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ClusterErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ClusterErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportImpl.java new file mode 100644 index 0000000000000..0bfb55197b4c3 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportImpl.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataExport; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Type; + +class DataExportImpl extends CreatableUpdatableImpl implements DataExport, DataExport.Definition, DataExport.Update { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private String dataExportName; + + DataExportImpl(String name, LogAnalyticsManager manager) { + super(name, new DataExportInner()); + this.manager = manager; + // Set resource name + this.dataExportName = name; + // + } + + DataExportImpl(DataExportInner inner, LogAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.dataExportName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.dataExportName = IdParsingUtils.getValueFromIdByName(inner.id(), "dataExports"); + // + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DataExportsInner client = this.manager().inner().dataExports(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.dataExportName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DataExportsInner client = this.manager().inner().dataExports(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.dataExportName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DataExportsInner client = this.manager().inner().dataExports(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.dataExportName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Boolean allTables() { + return this.inner().allTables(); + } + + @Override + public String createdDate() { + return this.inner().createdDate(); + } + + @Override + public String dataExportId() { + return this.inner().dataExportId(); + } + + @Override + public Type dataExportType() { + return this.inner().dataExportType(); + } + + @Override + public Boolean enable() { + return this.inner().enable(); + } + + @Override + public String eventHubName() { + return this.inner().eventHubName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String lastModifiedDate() { + return this.inner().lastModifiedDate(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceId() { + return this.inner().resourceId(); + } + + @Override + public List tableNames() { + return this.inner().tableNames(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DataExportImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + @Override + public DataExportImpl withResourceId(String resourceId) { + this.inner().withResourceId(resourceId); + return this; + } + + @Override + public DataExportImpl withAllTables(Boolean allTables) { + this.inner().withAllTables(allTables); + return this; + } + + @Override + public DataExportImpl withCreatedDate(String createdDate) { + this.inner().withCreatedDate(createdDate); + return this; + } + + @Override + public DataExportImpl withDataExportId(String dataExportId) { + this.inner().withDataExportId(dataExportId); + return this; + } + + @Override + public DataExportImpl withEnable(Boolean enable) { + this.inner().withEnable(enable); + return this; + } + + @Override + public DataExportImpl withEventHubName(String eventHubName) { + this.inner().withEventHubName(eventHubName); + return this; + } + + @Override + public DataExportImpl withLastModifiedDate(String lastModifiedDate) { + this.inner().withLastModifiedDate(lastModifiedDate); + return this; + } + + @Override + public DataExportImpl withTableNames(List tableNames) { + this.inner().withTableNames(tableNames); + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportInner.java new file mode 100644 index 0000000000000..7f5a9798c6044 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportInner.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Type; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The top level data export resource container. + */ +@JsonFlatten +public class DataExportInner extends ProxyResource { + /** + * The data export rule ID. + */ + @JsonProperty(value = "properties.dataExportId") + private String dataExportId; + + /** + * When ‘true’, all workspace's tables are exported. + */ + @JsonProperty(value = "properties.allTables") + private Boolean allTables; + + /** + * An array of tables to export, for example: [“Heartbeat, SecurityEvent”]. + */ + @JsonProperty(value = "properties.tableNames") + private List tableNames; + + /** + * The destination resource ID. This can be copied from the Properties + * entry of the destination resource in Azure. + */ + @JsonProperty(value = "properties.destination.resourceId", required = true) + private String resourceId; + + /** + * The type of the destination resource. Possible values include: + * 'StorageAccount', 'EventHub'. + */ + @JsonProperty(value = "properties.destination.type", access = JsonProperty.Access.WRITE_ONLY) + private Type dataExportType; + + /** + * Optional. Allows to define an Event Hub name. Not applicable when + * destination is Storage Account. + */ + @JsonProperty(value = "properties.destination.metaData.eventHubName") + private String eventHubName; + + /** + * Active when enabled. + */ + @JsonProperty(value = "properties.enable") + private Boolean enable; + + /** + * The latest data export rule modification time. + */ + @JsonProperty(value = "properties.createdDate") + private String createdDate; + + /** + * Date and time when the export was last modified. + */ + @JsonProperty(value = "properties.lastModifiedDate") + private String lastModifiedDate; + + /** + * Get the data export rule ID. + * + * @return the dataExportId value + */ + public String dataExportId() { + return this.dataExportId; + } + + /** + * Set the data export rule ID. + * + * @param dataExportId the dataExportId value to set + * @return the DataExportInner object itself. + */ + public DataExportInner withDataExportId(String dataExportId) { + this.dataExportId = dataExportId; + return this; + } + + /** + * Get when ‘true’, all workspace's tables are exported. + * + * @return the allTables value + */ + public Boolean allTables() { + return this.allTables; + } + + /** + * Set when ‘true’, all workspace's tables are exported. + * + * @param allTables the allTables value to set + * @return the DataExportInner object itself. + */ + public DataExportInner withAllTables(Boolean allTables) { + this.allTables = allTables; + return this; + } + + /** + * Get an array of tables to export, for example: [“Heartbeat, SecurityEvent”]. + * + * @return the tableNames value + */ + public List tableNames() { + return this.tableNames; + } + + /** + * Set an array of tables to export, for example: [“Heartbeat, SecurityEvent”]. + * + * @param tableNames the tableNames value to set + * @return the DataExportInner object itself. + */ + public DataExportInner withTableNames(List tableNames) { + this.tableNames = tableNames; + return this; + } + + /** + * Get the destination resource ID. This can be copied from the Properties entry of the destination resource in Azure. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the destination resource ID. This can be copied from the Properties entry of the destination resource in Azure. + * + * @param resourceId the resourceId value to set + * @return the DataExportInner object itself. + */ + public DataExportInner withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the type of the destination resource. Possible values include: 'StorageAccount', 'EventHub'. + * + * @return the dataExportType value + */ + public Type dataExportType() { + return this.dataExportType; + } + + /** + * Get optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account. + * + * @return the eventHubName value + */ + public String eventHubName() { + return this.eventHubName; + } + + /** + * Set optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account. + * + * @param eventHubName the eventHubName value to set + * @return the DataExportInner object itself. + */ + public DataExportInner withEventHubName(String eventHubName) { + this.eventHubName = eventHubName; + return this; + } + + /** + * Get active when enabled. + * + * @return the enable value + */ + public Boolean enable() { + return this.enable; + } + + /** + * Set active when enabled. + * + * @param enable the enable value to set + * @return the DataExportInner object itself. + */ + public DataExportInner withEnable(Boolean enable) { + this.enable = enable; + return this; + } + + /** + * Get the latest data export rule modification time. + * + * @return the createdDate value + */ + public String createdDate() { + return this.createdDate; + } + + /** + * Set the latest data export rule modification time. + * + * @param createdDate the createdDate value to set + * @return the DataExportInner object itself. + */ + public DataExportInner withCreatedDate(String createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get date and time when the export was last modified. + * + * @return the lastModifiedDate value + */ + public String lastModifiedDate() { + return this.lastModifiedDate; + } + + /** + * Set date and time when the export was last modified. + * + * @param lastModifiedDate the lastModifiedDate value to set + * @return the DataExportInner object itself. + */ + public DataExportInner withLastModifiedDate(String lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportsImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportsImpl.java new file mode 100644 index 0000000000000..43fae836fd102 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataExports; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataExport; + +class DataExportsImpl extends WrapperImpl implements DataExports { + private final LogAnalyticsManager manager; + + DataExportsImpl(LogAnalyticsManager manager) { + super(manager.inner().dataExports()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public DataExportImpl define(String name) { + return wrapModel(name); + } + + private DataExportImpl wrapModel(DataExportInner inner) { + return new DataExportImpl(inner, manager()); + } + + private DataExportImpl wrapModel(String name) { + return new DataExportImpl(name, this.manager()); + } + + @Override + public Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + DataExportsInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public DataExport call(DataExportInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String dataExportName) { + DataExportsInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, dataExportName) + .flatMap(new Func1>() { + @Override + public Observable call(DataExportInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DataExport)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String workspaceName, String dataExportName) { + DataExportsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, workspaceName, dataExportName).toCompletable(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportsInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportsInner.java new file mode 100644 index 0000000000000..133bcc1cc8041 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataExportsInner.java @@ -0,0 +1,456 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataExportErrorResponseException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DataExports. + */ +public class DataExportsInner { + /** The Retrofit service to perform REST calls. */ + private DataExportsService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of DataExportsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DataExportsInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(DataExportsService.class); + this.client = client; + } + + /** + * The interface defining all the services for DataExports to be + * used by Retrofit to perform actually REST calls. + */ + interface DataExportsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataExports listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports") + Observable> listByWorkspace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataExports createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataExportName") String dataExportName, @Query("api-version") String apiVersion, @Body DataExportInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataExports get" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataExportName") String dataExportName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataExports delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataExportName") String dataExportName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the data export instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DataExportErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<DataExportInner> object if successful. + */ + public List listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Lists the data export instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Lists the data export instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DataExportInner> object + */ + public Observable> listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the data export instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DataExportInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(this.client.subscriptionId(), resourceGroupName, workspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceDelegate(Response response) throws DataExportErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DataExportErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DataExportErrorResponseException.class) + .build(response); + } + + /** + * Create or update a data export. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DataExportErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataExportInner object if successful. + */ + public DataExportInner createOrUpdate(String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a data export. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName, parameters), serviceCallback); + } + + /** + * Create or update a data export. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataExportInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName, parameters).map(new Func1, DataExportInner>() { + @Override + public DataExportInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a data export. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataExportInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataExportName == null) { + throw new IllegalArgumentException("Parameter dataExportName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, workspaceName, dataExportName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws DataExportErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DataExportErrorResponseException.class) + .build(response); + } + + /** + * Gets a data export instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DataExportErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataExportInner object if successful. + */ + public DataExportInner get(String resourceGroupName, String workspaceName, String dataExportName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName).toBlocking().single().body(); + } + + /** + * Gets a data export instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String dataExportName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName), serviceCallback); + } + + /** + * Gets a data export instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataExportInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String dataExportName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName).map(new Func1, DataExportInner>() { + @Override + public DataExportInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a data export instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataExportInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataExportName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataExportName == null) { + throw new IllegalArgumentException("Parameter dataExportName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, dataExportName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws DataExportErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DataExportErrorResponseException.class) + .build(response); + } + + /** + * Deletes the specified data export in a given workspace.. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DataExportErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, String dataExportName) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName).toBlocking().single().body(); + } + + /** + * Deletes the specified data export in a given workspace.. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, String dataExportName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName), serviceCallback); + } + + /** + * Deletes the specified data export in a given workspace.. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, String dataExportName) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataExportName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified data export in a given workspace.. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataExportName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataExportName == null) { + throw new IllegalArgumentException("Parameter dataExportName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, workspaceName, dataExportName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws DataExportErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DataExportErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourceImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourceImpl.java new file mode 100644 index 0000000000000..11dac5f21bc01 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourceImpl.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSourceKind; +import java.util.Map; + +class DataSourceImpl extends CreatableUpdatableImpl implements DataSource, DataSource.Definition, DataSource.Update { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private String dataSourceName; + + DataSourceImpl(String name, LogAnalyticsManager manager) { + super(name, new DataSourceInner()); + this.manager = manager; + // Set resource name + this.dataSourceName = name; + // + } + + DataSourceImpl(DataSourceInner inner, LogAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.dataSourceName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.dataSourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "dataSources"); + // + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DataSourcesInner client = this.manager().inner().dataSources(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.dataSourceName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DataSourcesInner client = this.manager().inner().dataSources(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.dataSourceName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DataSourcesInner client = this.manager().inner().dataSources(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.dataSourceName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DataSourceKind kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + + @Override + public Map tags() { + return this.inner().tags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DataSourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + @Override + public DataSourceImpl withKind(DataSourceKind kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public DataSourceImpl withProperties(Object properties) { + this.inner().withProperties(properties); + return this; + } + + @Override + public DataSourceImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public DataSourceImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourceInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourceInner.java new file mode 100644 index 0000000000000..78adad858b794 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourceInner.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSourceKind; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Datasources under OMS Workspace. + */ +public class DataSourceInner extends ProxyResource { + /** + * The data source properties in raw json format, each kind of data source + * have it's own schema. + */ + @JsonProperty(value = "properties", required = true) + private Object properties; + + /** + * The ETag of the data source. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', + * 'IISLogs', 'LinuxSyslog', 'LinuxSyslogCollection', + * 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', + * 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', + * 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + * 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', + * 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', + * 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + * 'SecurityWindowsBaselineConfiguration', + * 'SecurityCenterSecurityWindowsBaselineConfiguration', + * 'SecurityEventCollectionConfiguration', + * 'SecurityInsightsSecurityEventCollectionConfiguration', + * 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', + * 'ApplicationInsights', 'SqlDataClassification'. + */ + @JsonProperty(value = "kind", required = true) + private DataSourceKind kind; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the data source properties in raw json format, each kind of data source have it's own schema. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set the data source properties in raw json format, each kind of data source have it's own schema. + * + * @param properties the properties value to set + * @return the DataSourceInner object itself. + */ + public DataSourceInner withProperties(Object properties) { + this.properties = properties; + return this; + } + + /** + * Get the ETag of the data source. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set the ETag of the data source. + * + * @param etag the etag value to set + * @return the DataSourceInner object itself. + */ + public DataSourceInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', 'SecurityEventCollectionConfiguration', 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification'. + * + * @return the kind value + */ + public DataSourceKind kind() { + return this.kind; + } + + /** + * Set possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', 'SecurityEventCollectionConfiguration', 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification'. + * + * @param kind the kind value to set + * @return the DataSourceInner object itself. + */ + public DataSourceInner withKind(DataSourceKind kind) { + this.kind = kind; + return this; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the DataSourceInner object itself. + */ + public DataSourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesImpl.java new file mode 100644 index 0000000000000..d639efcf747d9 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSources; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSource; + +class DataSourcesImpl extends WrapperImpl implements DataSources { + private final LogAnalyticsManager manager; + + DataSourcesImpl(LogAnalyticsManager manager) { + super(manager.inner().dataSources()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public DataSourceImpl define(String name) { + return wrapModel(name); + } + + private DataSourceImpl wrapModel(DataSourceInner inner) { + return new DataSourceImpl(inner, manager()); + } + + private DataSourceImpl wrapModel(String name) { + return new DataSourceImpl(name, this.manager()); + } + + @Override + public Observable listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter) { + DataSourcesInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName, filter) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataSource call(DataSourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String dataSourceName) { + DataSourcesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, dataSourceName) + .flatMap(new Func1>() { + @Override + public Observable call(DataSourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DataSource)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String workspaceName, String dataSourceName) { + DataSourcesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, workspaceName, dataSourceName).toCompletable(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesInner.java new file mode 100644 index 0000000000000..04ed993253dc2 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesInner.java @@ -0,0 +1,746 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DataSources. + */ +public class DataSourcesInner { + /** The Retrofit service to perform REST calls. */ + private DataSourcesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of DataSourcesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DataSourcesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(DataSourcesService.class); + this.client = client; + } + + /** + * The interface defining all the services for DataSources to be + * used by Retrofit to perform actually REST calls. + */ + interface DataSourcesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataSources createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceName") String dataSourceName, @Path("subscriptionId") String subscriptionId, @Body DataSourceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataSources delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceName") String dataSourceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataSources get" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceName") String dataSourceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataSources listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources") + Observable> listByWorkspace(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$skiptoken") String skiptoken, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DataSources listByWorkspaceNext" }) + @GET + Observable> listByWorkspaceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a data source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName The name of the datasource resource. + * @param parameters The parameters required to create or update a datasource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataSourceInner object if successful. + */ + public DataSourceInner createOrUpdate(String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a data source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName The name of the datasource resource. + * @param parameters The parameters required to create or update a datasource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters), serviceCallback); + } + + /** + * Create or update a data source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName The name of the datasource resource. + * @param parameters The parameters required to create or update a datasource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataSourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters).map(new Func1, DataSourceInner>() { + @Override + public DataSourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a data source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName The name of the datasource resource. + * @param parameters The parameters required to create or update a datasource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataSourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataSourceName == null) { + throw new IllegalArgumentException("Parameter dataSourceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.createOrUpdate(resourceGroupName, workspaceName, dataSourceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a data source instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, String dataSourceName) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName).toBlocking().single().body(); + } + + /** + * Deletes a data source instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, String dataSourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName), serviceCallback); + } + + /** + * Deletes a data source instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, String dataSourceName) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a data source instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataSourceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataSourceName == null) { + throw new IllegalArgumentException("Parameter dataSourceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, workspaceName, dataSourceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a datasource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataSourceInner object if successful. + */ + public DataSourceInner get(String resourceGroupName, String workspaceName, String dataSourceName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName).toBlocking().single().body(); + } + + /** + * Gets a datasource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String dataSourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName), serviceCallback); + } + + /** + * Gets a datasource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataSourceInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String dataSourceName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName).map(new Func1, DataSourceInner>() { + @Override + public DataSourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a datasource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataSourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataSourceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataSourceName == null) { + throw new IllegalArgumentException("Parameter dataSourceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, workspaceName, dataSourceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DataSourceInner> object if successful. + */ + public PagedList listByWorkspace(final String resourceGroupName, final String workspaceName, final String filter) { + ServiceResponse> response = listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataSourceInner> object + */ + public Observable> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataSourceInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final String filter) { + return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataSourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByWorkspaceSinglePageAsync(final String resourceGroupName, final String workspaceName, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (filter == null) { + throw new IllegalArgumentException("Parameter filter is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String skiptoken = null; + return service.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), filter, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @param skiptoken Starting point of the collection of data source instances. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DataSourceInner> object if successful. + */ + public PagedList listByWorkspace(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) { + ServiceResponse> response = listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter, skiptoken).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @param skiptoken Starting point of the collection of data source instances. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter, skiptoken), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @param skiptoken Starting point of the collection of data source instances. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataSourceInner> object + */ + public Observable> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName, filter, skiptoken) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter The filter to apply on the operation. + * @param skiptoken Starting point of the collection of data source instances. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataSourceInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) { + return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter, skiptoken) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param workspaceName The name of the workspace. + ServiceResponse> * @param filter The filter to apply on the operation. + ServiceResponse> * @param skiptoken Starting point of the collection of data source instances. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataSourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByWorkspaceSinglePageAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (filter == null) { + throw new IllegalArgumentException("Parameter filter is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), filter, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DataSourceInner> object if successful. + */ + public PagedList listByWorkspaceNext(final String nextPageLink) { + ServiceResponse> response = listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByWorkspaceNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataSourceInner> object + */ + public Observable> listByWorkspaceNextAsync(final String nextPageLink) { + return listByWorkspaceNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataSourceInner> object + */ + public Observable>> listByWorkspaceNextWithServiceResponseAsync(final String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of data source instances in a workspace with the link to the next page. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataSourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByWorkspaceNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByWorkspaceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DeletedWorkspacesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DeletedWorkspacesImpl.java new file mode 100644 index 0000000000000..cd05d7dba4338 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DeletedWorkspacesImpl.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DeletedWorkspaces; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceModel; +import rx.Observable; +import rx.Completable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class DeletedWorkspacesImpl extends GroupableResourcesCoreImpl implements DeletedWorkspaces { + protected DeletedWorkspacesImpl(LogAnalyticsManager manager) { + super(manager.inner().deletedWorkspaces(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + return null; // NOP Retrieve by resource group not supported + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + DeletedWorkspacesInner client = this.inner(); + return Completable.error(new Throwable("Delete by RG not supported for this resource")); // NOP Delete by RG not supported + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + DeletedWorkspacesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + DeletedWorkspacesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public WorkspaceModel call(WorkspaceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + DeletedWorkspacesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + DeletedWorkspacesInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public WorkspaceModel call(WorkspaceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + protected WorkspaceModelImpl wrapModel(WorkspaceInner inner) { + return new WorkspaceModelImpl(inner.name(), inner, manager()); + } + + @Override + protected WorkspaceModelImpl wrapModel(String name) { + return null; // Model is not creatable + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DeletedWorkspacesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DeletedWorkspacesInner.java new file mode 100644 index 0000000000000..3dcb767498ccd --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DeletedWorkspacesInner.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DeletedWorkspaces. + */ +public class DeletedWorkspacesInner implements InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private DeletedWorkspacesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of DeletedWorkspacesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DeletedWorkspacesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(DeletedWorkspacesService.class); + this.client = client; + } + + /** + * The interface defining all the services for DeletedWorkspaces to be + * used by Retrofit to perform actually REST calls. + */ + interface DeletedWorkspacesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DeletedWorkspaces list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/deletedWorkspaces") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.DeletedWorkspaces listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/deletedWorkspaces") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets recently deleted workspaces in a subscription, available for recovery. + * + * @return the PagedList object if successful. + */ + public PagedList list() { + PageImpl page = new PageImpl<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Gets recently deleted workspaces in a subscription, available for recovery. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets recently deleted workspaces in a subscription, available for recovery. + * + * @return the observable to the List<WorkspaceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Gets recently deleted workspaces in a subscription, available for recovery. + * + * @return the observable to the List<WorkspaceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets recently deleted workspaces in a resource group, available for recovery. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName) { + PageImpl page = new PageImpl<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Gets recently deleted workspaces in a resource group, available for recovery. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); + } + + /** + * Gets recently deleted workspaces in a resource group, available for recovery. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the observable to the List<WorkspaceInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Gets recently deleted workspaces in a resource group, available for recovery. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the observable to the List<WorkspaceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/GatewaysImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/GatewaysImpl.java new file mode 100644 index 0000000000000..f72d2c8e78247 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/GatewaysImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Gateways; +import rx.Completable; + +class GatewaysImpl extends WrapperImpl implements Gateways { + private final LogAnalyticsManager manager; + + GatewaysImpl(LogAnalyticsManager manager) { + super(manager.inner().gateways()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Completable deleteAsync(String resourceGroupName, String workspaceName, String gatewayId) { + return manager().inner().gateways().deleteAsync(resourceGroupName, workspaceName, gatewayId).toCompletable(); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/GatewaysInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/GatewaysInner.java new file mode 100644 index 0000000000000..70534bd7731d6 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/GatewaysInner.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Gateways. + */ +public class GatewaysInner { + /** The Retrofit service to perform REST calls. */ + private GatewaysService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of GatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GatewaysInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(GatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for Gateways to be + * used by Retrofit to perform actually REST calls. + */ + interface GatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Gateways delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/gateways/{gatewayId}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("gatewayId") String gatewayId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Delete a Log Analytics gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, String gatewayId) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, gatewayId).toBlocking().single().body(); + } + + /** + * Delete a Log Analytics gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, String gatewayId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, gatewayId), serviceCallback); + } + + /** + * Delete a Log Analytics gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, String gatewayId) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, gatewayId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a Log Analytics gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String gatewayId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (gatewayId == null) { + throw new IllegalArgumentException("Parameter gatewayId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, workspaceName, gatewayId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IdParsingUtils.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..1045ce7ae1159 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePackImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePackImpl.java new file mode 100644 index 0000000000000..34a6396e70019 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePackImpl.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.IntelligencePack; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class IntelligencePackImpl extends WrapperImpl implements IntelligencePack { + private final LogAnalyticsManager manager; + + IntelligencePackImpl(IntelligencePackInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePackInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePackInner.java new file mode 100644 index 0000000000000..aa5e73e82884a --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePackInner.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Intelligence Pack containing a string name and boolean indicating if it's + * enabled. + */ +public class IntelligencePackInner { + /** + * The name of the intelligence pack. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The enabled boolean for the intelligence pack. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * The display name of the intelligence pack. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get the name of the intelligence pack. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the intelligence pack. + * + * @param name the name value to set + * @return the IntelligencePackInner object itself. + */ + public IntelligencePackInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the enabled boolean for the intelligence pack. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled boolean for the intelligence pack. + * + * @param enabled the enabled value to set + * @return the IntelligencePackInner object itself. + */ + public IntelligencePackInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the display name of the intelligence pack. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the intelligence pack. + * + * @param displayName the displayName value to set + * @return the IntelligencePackInner object itself. + */ + public IntelligencePackInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePacksImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePacksImpl.java new file mode 100644 index 0000000000000..7fab16d4b25be --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePacksImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.IntelligencePacks; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import rx.Completable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.IntelligencePack; + +class IntelligencePacksImpl extends WrapperImpl implements IntelligencePacks { + private final LogAnalyticsManager manager; + + IntelligencePacksImpl(LogAnalyticsManager manager) { + super(manager.inner().intelligencePacks()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + private IntelligencePackImpl wrapModel(IntelligencePackInner inner) { + return new IntelligencePackImpl(inner, manager()); + } + + @Override + public Completable disableAsync(String resourceGroupName, String workspaceName, String intelligencePackName) { + IntelligencePacksInner client = this.inner(); + return client.disableAsync(resourceGroupName, workspaceName, intelligencePackName).toCompletable(); + } + + @Override + public Completable enableAsync(String resourceGroupName, String workspaceName, String intelligencePackName) { + IntelligencePacksInner client = this.inner(); + return client.enableAsync(resourceGroupName, workspaceName, intelligencePackName).toCompletable(); + } + + @Override + public Observable listAsync(String resourceGroupName, String workspaceName) { + IntelligencePacksInner client = this.inner(); + return client.listAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public IntelligencePack call(IntelligencePackInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePacksInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePacksInner.java new file mode 100644 index 0000000000000..8b6c3b46432d7 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/IntelligencePacksInner.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in IntelligencePacks. + */ +public class IntelligencePacksInner { + /** The Retrofit service to perform REST calls. */ + private IntelligencePacksService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of IntelligencePacksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public IntelligencePacksInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(IntelligencePacksService.class); + this.client = client; + } + + /** + * The interface defining all the services for IntelligencePacks to be + * used by Retrofit to perform actually REST calls. + */ + interface IntelligencePacksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.IntelligencePacks disable" }) + @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable") + Observable> disable(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("intelligencePackName") String intelligencePackName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.IntelligencePacks enable" }) + @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable") + Observable> enable(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("intelligencePackName") String intelligencePackName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.IntelligencePacks list" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Disables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void disable(String resourceGroupName, String workspaceName, String intelligencePackName) { + disableWithServiceResponseAsync(resourceGroupName, workspaceName, intelligencePackName).toBlocking().single().body(); + } + + /** + * Disables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture disableAsync(String resourceGroupName, String workspaceName, String intelligencePackName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableWithServiceResponseAsync(resourceGroupName, workspaceName, intelligencePackName), serviceCallback); + } + + /** + * Disables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable disableAsync(String resourceGroupName, String workspaceName, String intelligencePackName) { + return disableWithServiceResponseAsync(resourceGroupName, workspaceName, intelligencePackName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> disableWithServiceResponseAsync(String resourceGroupName, String workspaceName, String intelligencePackName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (intelligencePackName == null) { + throw new IllegalArgumentException("Parameter intelligencePackName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.disable(resourceGroupName, workspaceName, intelligencePackName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Enables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void enable(String resourceGroupName, String workspaceName, String intelligencePackName) { + enableWithServiceResponseAsync(resourceGroupName, workspaceName, intelligencePackName).toBlocking().single().body(); + } + + /** + * Enables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture enableAsync(String resourceGroupName, String workspaceName, String intelligencePackName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(enableWithServiceResponseAsync(resourceGroupName, workspaceName, intelligencePackName), serviceCallback); + } + + /** + * Enables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable enableAsync(String resourceGroupName, String workspaceName, String intelligencePackName) { + return enableWithServiceResponseAsync(resourceGroupName, workspaceName, intelligencePackName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Enables an intelligence pack for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> enableWithServiceResponseAsync(String resourceGroupName, String workspaceName, String intelligencePackName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (intelligencePackName == null) { + throw new IllegalArgumentException("Parameter intelligencePackName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.enable(resourceGroupName, workspaceName, intelligencePackName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = enableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse enableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<IntelligencePackInner> object if successful. + */ + public List list(String resourceGroupName, String workspaceName) { + return listWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<IntelligencePackInner> object + */ + public Observable> listAsync(String resourceGroupName, String workspaceName) { + return listWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<IntelligencePackInner> object + */ + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServiceImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServiceImpl.java new file mode 100644 index 0000000000000..79703ff8d5899 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServiceImpl.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedService; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServiceEntityStatus; +import java.util.Map; + +class LinkedServiceImpl extends CreatableUpdatableImpl implements LinkedService, LinkedService.Definition, LinkedService.Update { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private String linkedServiceName; + + LinkedServiceImpl(String name, LogAnalyticsManager manager) { + super(name, new LinkedServiceInner()); + this.manager = manager; + // Set resource name + this.linkedServiceName = name; + // + } + + LinkedServiceImpl(LinkedServiceInner inner, LogAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.linkedServiceName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.linkedServiceName = IdParsingUtils.getValueFromIdByName(inner.id(), "linkedServices"); + // + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + LinkedServicesInner client = this.manager().inner().linkedServices(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.linkedServiceName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + LinkedServicesInner client = this.manager().inner().linkedServices(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.linkedServiceName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + LinkedServicesInner client = this.manager().inner().linkedServices(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.linkedServiceName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public LinkedServiceEntityStatus provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceId() { + return this.inner().resourceId(); + } + + @Override + public Map tags() { + return this.inner().tags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String writeAccessResourceId() { + return this.inner().writeAccessResourceId(); + } + + @Override + public LinkedServiceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + @Override + public LinkedServiceImpl withProvisioningState(LinkedServiceEntityStatus provisioningState) { + this.inner().withProvisioningState(provisioningState); + return this; + } + + @Override + public LinkedServiceImpl withResourceId(String resourceId) { + this.inner().withResourceId(resourceId); + return this; + } + + @Override + public LinkedServiceImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public LinkedServiceImpl withWriteAccessResourceId(String writeAccessResourceId) { + this.inner().withWriteAccessResourceId(writeAccessResourceId); + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServiceInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServiceInner.java new file mode 100644 index 0000000000000..0803dabf9d34b --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServiceInner.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServiceEntityStatus; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The top level Linked service resource container. + */ +@JsonFlatten +public class LinkedServiceInner extends ProxyResource { + /** + * The resource id of the resource that will be linked to the workspace. + * This should be used for linking resources which require read access. + */ + @JsonProperty(value = "properties.resourceId") + private String resourceId; + + /** + * The resource id of the resource that will be linked to the workspace. + * This should be used for linking resources which require write access. + */ + @JsonProperty(value = "properties.writeAccessResourceId") + private String writeAccessResourceId; + + /** + * The provisioning state of the linked service. Possible values include: + * 'Succeeded', 'Deleting', 'ProvisioningAccount', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState") + private LinkedServiceEntityStatus provisioningState; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access. + * + * @param resourceId the resourceId value to set + * @return the LinkedServiceInner object itself. + */ + public LinkedServiceInner withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access. + * + * @return the writeAccessResourceId value + */ + public String writeAccessResourceId() { + return this.writeAccessResourceId; + } + + /** + * Set the resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access. + * + * @param writeAccessResourceId the writeAccessResourceId value to set + * @return the LinkedServiceInner object itself. + */ + public LinkedServiceInner withWriteAccessResourceId(String writeAccessResourceId) { + this.writeAccessResourceId = writeAccessResourceId; + return this; + } + + /** + * Get the provisioning state of the linked service. Possible values include: 'Succeeded', 'Deleting', 'ProvisioningAccount', 'Updating'. + * + * @return the provisioningState value + */ + public LinkedServiceEntityStatus provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioning state of the linked service. Possible values include: 'Succeeded', 'Deleting', 'ProvisioningAccount', 'Updating'. + * + * @param provisioningState the provisioningState value to set + * @return the LinkedServiceInner object itself. + */ + public LinkedServiceInner withProvisioningState(LinkedServiceEntityStatus provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the LinkedServiceInner object itself. + */ + public LinkedServiceInner withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServicesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServicesImpl.java new file mode 100644 index 0000000000000..817511f6960f3 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServicesImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServices; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedService; + +class LinkedServicesImpl extends WrapperImpl implements LinkedServices { + private final LogAnalyticsManager manager; + + LinkedServicesImpl(LogAnalyticsManager manager) { + super(manager.inner().linkedServices()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public LinkedServiceImpl define(String name) { + return wrapModel(name); + } + + private LinkedServiceImpl wrapModel(LinkedServiceInner inner) { + return new LinkedServiceImpl(inner, manager()); + } + + private LinkedServiceImpl wrapModel(String name) { + return new LinkedServiceImpl(name, this.manager()); + } + + @Override + public Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + LinkedServicesInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public LinkedService call(LinkedServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String linkedServiceName) { + LinkedServicesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, linkedServiceName) + .flatMap(new Func1>() { + @Override + public Observable call(LinkedServiceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((LinkedService)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName) { + LinkedServicesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, workspaceName, linkedServiceName).toCompletable(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServicesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServicesInner.java new file mode 100644 index 0000000000000..e790e43bc269f --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedServicesInner.java @@ -0,0 +1,625 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LinkedServices. + */ +public class LinkedServicesInner { + /** The Retrofit service to perform REST calls. */ + private LinkedServicesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of LinkedServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LinkedServicesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(LinkedServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for LinkedServices to be + * used by Retrofit to perform actually REST calls. + */ + interface LinkedServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServices createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("linkedServiceName") String linkedServiceName, @Path("subscriptionId") String subscriptionId, @Body LinkedServiceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServices beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("linkedServiceName") String linkedServiceName, @Path("subscriptionId") String subscriptionId, @Body LinkedServiceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServices delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("linkedServiceName") String linkedServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServices beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("linkedServiceName") String linkedServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServices get" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("linkedServiceName") String linkedServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServices listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices") + Observable> listByWorkspace(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a linked service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LinkedServiceInner object if successful. + */ + public LinkedServiceInner createOrUpdate(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName, parameters).toBlocking().last().body(); + } + + /** + * Create or update a linked service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName, parameters), serviceCallback); + } + + /** + * Create or update a linked service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName, parameters).map(new Func1, LinkedServiceInner>() { + @Override + public LinkedServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a linked service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (linkedServiceName == null) { + throw new IllegalArgumentException("Parameter linkedServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(resourceGroupName, workspaceName, linkedServiceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a linked service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LinkedServiceInner object if successful. + */ + public LinkedServiceInner beginCreateOrUpdate(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a linked service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName, parameters), serviceCallback); + } + + /** + * Create or update a linked service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedServiceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName, parameters).map(new Func1, LinkedServiceInner>() { + @Override + public LinkedServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a linked service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedServiceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (linkedServiceName == null) { + throw new IllegalArgumentException("Parameter linkedServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(resourceGroupName, workspaceName, linkedServiceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LinkedServiceInner object if successful. + */ + public LinkedServiceInner delete(String resourceGroupName, String workspaceName, String linkedServiceName) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName).toBlocking().last().body(); + } + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName), serviceCallback); + } + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName).map(new Func1, LinkedServiceInner>() { + @Override + public LinkedServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String linkedServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (linkedServiceName == null) { + throw new IllegalArgumentException("Parameter linkedServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, workspaceName, linkedServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LinkedServiceInner object if successful. + */ + public LinkedServiceInner beginDelete(String resourceGroupName, String workspaceName, String linkedServiceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName).toBlocking().single().body(); + } + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName), serviceCallback); + } + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedServiceInner object + */ + public Observable beginDeleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName).map(new Func1, LinkedServiceInner>() { + @Override + public LinkedServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedServiceInner object + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String linkedServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (linkedServiceName == null) { + throw new IllegalArgumentException("Parameter linkedServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, workspaceName, linkedServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LinkedServiceInner object if successful. + */ + public LinkedServiceInner get(String resourceGroupName, String workspaceName, String linkedServiceName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName).toBlocking().single().body(); + } + + /** + * Gets a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String linkedServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName), serviceCallback); + } + + /** + * Gets a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedServiceInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String linkedServiceName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName).map(new Func1, LinkedServiceInner>() { + @Override + public LinkedServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a linked service instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedServiceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String linkedServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (linkedServiceName == null) { + throw new IllegalArgumentException("Parameter linkedServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, workspaceName, linkedServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the linked services instances in a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<LinkedServiceInner> object if successful. + */ + public List listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets the linked services instances in a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets the linked services instances in a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<LinkedServiceInner> object + */ + public Observable> listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the linked services instances in a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<LinkedServiceInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsImpl.java new file mode 100644 index 0000000000000..86a4d8493ef2a --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsImpl.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSourceType; +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedStorageAccounts; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedStorageAccountsResource; + +class LinkedStorageAccountsImpl extends WrapperImpl implements LinkedStorageAccounts { + private final LogAnalyticsManager manager; + + LinkedStorageAccountsImpl(LogAnalyticsManager manager) { + super(manager.inner().linkedStorageAccounts()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public LinkedStorageAccountsResourceImpl define(String name) { + return wrapModel(name); + } + + private LinkedStorageAccountsResourceImpl wrapModel(LinkedStorageAccountsResourceInner inner) { + return new LinkedStorageAccountsResourceImpl(inner, manager()); + } + + private LinkedStorageAccountsResourceImpl wrapModel(String name) { + return new LinkedStorageAccountsResourceImpl(name, this.manager()); + } + + @Override + public Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + LinkedStorageAccountsInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public LinkedStorageAccountsResource call(LinkedStorageAccountsResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + LinkedStorageAccountsInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, dataSourceType) + .flatMap(new Func1>() { + @Override + public Observable call(LinkedStorageAccountsResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((LinkedStorageAccountsResource)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + LinkedStorageAccountsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, workspaceName, dataSourceType).toCompletable(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsInner.java new file mode 100644 index 0000000000000..a6e78b3528821 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsInner.java @@ -0,0 +1,543 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSourceType; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LinkedStorageAccounts. + */ +public class LinkedStorageAccountsInner { + /** The Retrofit service to perform REST calls. */ + private LinkedStorageAccountsService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of LinkedStorageAccountsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LinkedStorageAccountsInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(LinkedStorageAccountsService.class); + this.client = client; + } + + /** + * The interface defining all the services for LinkedStorageAccounts to be + * used by Retrofit to perform actually REST calls. + */ + interface LinkedStorageAccountsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedStorageAccounts createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceType") DataSourceType dataSourceType1, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body LinkedStorageAccountsResourceInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedStorageAccounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceType") DataSourceType dataSourceType1, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedStorageAccounts get" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceType") DataSourceType dataSourceType1, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedStorageAccounts listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts") + Observable> listByWorkspace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LinkedStorageAccountsResourceInner object if successful. + */ + public LinkedStorageAccountsResourceInner createOrUpdate(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType).toBlocking().single().body(); + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType), serviceCallback); + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedStorageAccountsResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType).map(new Func1, LinkedStorageAccountsResourceInner>() { + @Override + public LinkedStorageAccountsResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedStorageAccountsResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataSourceType == null) { + throw new IllegalArgumentException("Parameter dataSourceType is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final List storageAccountIds = null; + LinkedStorageAccountsResourceInner parameters = new LinkedStorageAccountsResourceInner(); + parameters.withStorageAccountIds(null); + return service.createOrUpdate(resourceGroupName, workspaceName, dataSourceType, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @param storageAccountIds Linked storage accounts resources ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LinkedStorageAccountsResourceInner object if successful. + */ + public LinkedStorageAccountsResourceInner createOrUpdate(String resourceGroupName, String workspaceName, DataSourceType dataSourceType, List storageAccountIds) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType, storageAccountIds).toBlocking().single().body(); + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @param storageAccountIds Linked storage accounts resources ids. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType, List storageAccountIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType, storageAccountIds), serviceCallback); + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @param storageAccountIds Linked storage accounts resources ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedStorageAccountsResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType, List storageAccountIds) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType, storageAccountIds).map(new Func1, LinkedStorageAccountsResourceInner>() { + @Override + public LinkedStorageAccountsResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @param storageAccountIds Linked storage accounts resources ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedStorageAccountsResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType, List storageAccountIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataSourceType == null) { + throw new IllegalArgumentException("Parameter dataSourceType is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(storageAccountIds); + LinkedStorageAccountsResourceInner parameters = new LinkedStorageAccountsResourceInner(); + parameters.withStorageAccountIds(storageAccountIds); + return service.createOrUpdate(resourceGroupName, workspaceName, dataSourceType, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes all linked storage accounts of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType).toBlocking().single().body(); + } + + /** + * Deletes all linked storage accounts of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType), serviceCallback); + } + + /** + * Deletes all linked storage accounts of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes all linked storage accounts of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataSourceType == null) { + throw new IllegalArgumentException("Parameter dataSourceType is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, workspaceName, dataSourceType, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all linked storage account of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LinkedStorageAccountsResourceInner object if successful. + */ + public LinkedStorageAccountsResourceInner get(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType).toBlocking().single().body(); + } + + /** + * Gets all linked storage account of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType), serviceCallback); + } + + /** + * Gets all linked storage account of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedStorageAccountsResourceInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceType).map(new Func1, LinkedStorageAccountsResourceInner>() { + @Override + public LinkedStorageAccountsResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all linked storage account of a specific data source type associated with the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LinkedStorageAccountsResourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (dataSourceType == null) { + throw new IllegalArgumentException("Parameter dataSourceType is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, workspaceName, dataSourceType, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<LinkedStorageAccountsResourceInner> object if successful. + */ + public List listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<LinkedStorageAccountsResourceInner> object + */ + public Observable> listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<LinkedStorageAccountsResourceInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(this.client.subscriptionId(), resourceGroupName, workspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsResourceImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsResourceImpl.java new file mode 100644 index 0000000000000..72b4b7b57293d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsResourceImpl.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedStorageAccountsResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSourceType; + +class LinkedStorageAccountsResourceImpl extends CreatableUpdatableImpl implements LinkedStorageAccountsResource, LinkedStorageAccountsResource.Definition, LinkedStorageAccountsResource.Update { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private DataSourceType dataSourceType; + private List cstorageAccountIds; + private List ustorageAccountIds; + + LinkedStorageAccountsResourceImpl(String name, LogAnalyticsManager manager) { + super(name, new LinkedStorageAccountsResourceInner()); + this.manager = manager; + // Set resource name + this.dataSourceType = DataSourceType.fromString(name); + // + } + + LinkedStorageAccountsResourceImpl(LinkedStorageAccountsResourceInner inner, LogAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.dataSourceType = DataSourceType.fromString(inner.name()); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.dataSourceType = DataSourceType.valueOf(IdParsingUtils.getValueFromIdByName(inner.id(), "linkedStorageAccounts")); + // + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + LinkedStorageAccountsInner client = this.manager().inner().linkedStorageAccounts(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.dataSourceType, this.cstorageAccountIds) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + LinkedStorageAccountsInner client = this.manager().inner().linkedStorageAccounts(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.dataSourceType, this.ustorageAccountIds) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + LinkedStorageAccountsInner client = this.manager().inner().linkedStorageAccounts(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.dataSourceType); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public DataSourceType dataSourceType() { + return this.inner().dataSourceType(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List storageAccountIds() { + return this.inner().storageAccountIds(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public LinkedStorageAccountsResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + @Override + public LinkedStorageAccountsResourceImpl withStorageAccountIds(List storageAccountIds) { + if (isInCreateMode()) { + this.cstorageAccountIds = storageAccountIds; + } else { + this.ustorageAccountIds = storageAccountIds; + } + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsResourceInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsResourceInner.java new file mode 100644 index 0000000000000..c05caa52ebd7d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LinkedStorageAccountsResourceInner.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSourceType; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Linked storage accounts top level resource container. + */ +@JsonFlatten +public class LinkedStorageAccountsResourceInner extends ProxyResource { + /** + * Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson', 'Query', 'Alerts'. + */ + @JsonProperty(value = "properties.dataSourceType", access = JsonProperty.Access.WRITE_ONLY) + private DataSourceType dataSourceType; + + /** + * Linked storage accounts resources ids. + */ + @JsonProperty(value = "properties.storageAccountIds") + private List storageAccountIds; + + /** + * Get linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Alerts'. + * + * @return the dataSourceType value + */ + public DataSourceType dataSourceType() { + return this.dataSourceType; + } + + /** + * Get linked storage accounts resources ids. + * + * @return the storageAccountIds value + */ + public List storageAccountIds() { + return this.storageAccountIds; + } + + /** + * Set linked storage accounts resources ids. + * + * @param storageAccountIds the storageAccountIds value to set + * @return the LinkedStorageAccountsResourceInner object itself. + */ + public LinkedStorageAccountsResourceInner withStorageAccountIds(List storageAccountIds) { + this.storageAccountIds = storageAccountIds; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LogAnalyticsManager.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LogAnalyticsManager.java new file mode 100644 index 0000000000000..274669f46652e --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/LogAnalyticsManager.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataExports; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DataSources; +import com.microsoft.azure.management.loganalytics.v2020_08_01.IntelligencePacks; +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedServices; +import com.microsoft.azure.management.loganalytics.v2020_08_01.LinkedStorageAccounts; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ManagementGroups; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Operations; +import com.microsoft.azure.management.loganalytics.v2020_08_01.OperationStatuses; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SharedKeysOperations; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Usages; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces; +import com.microsoft.azure.management.loganalytics.v2020_08_01.DeletedWorkspaces; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Clusters; +import com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightConfigs; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearches; +import com.microsoft.azure.management.loganalytics.v2020_08_01.AvailableServiceTiers; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Gateways; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Schemas; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurges; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Tables; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure LogAnalytics resource management. + */ +public final class LogAnalyticsManager extends ManagerCore { + private DataExports dataExports; + private DataSources dataSources; + private IntelligencePacks intelligencePacks; + private LinkedServices linkedServices; + private LinkedStorageAccounts linkedStorageAccounts; + private ManagementGroups managementGroups; + private Operations operations; + private OperationStatuses operationStatuses; + private SharedKeysOperations sharedKeysOperations; + private Usages usages; + private Workspaces workspaces; + private DeletedWorkspaces deletedWorkspaces; + private Clusters clusters; + private StorageInsightConfigs storageInsightConfigs; + private SavedSearches savedSearches; + private AvailableServiceTiers availableServiceTiers; + private Gateways gateways; + private Schemas schemas; + private WorkspacePurges workspacePurges; + private Tables tables; + /** + * Get a Configurable instance that can be used to create LogAnalyticsManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new LogAnalyticsManager.ConfigurableImpl(); + } + /** + * Creates an instance of LogAnalyticsManager that exposes LogAnalytics resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the LogAnalyticsManager + */ + public static LogAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new LogAnalyticsManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of LogAnalyticsManager that exposes LogAnalytics resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the LogAnalyticsManager + */ + public static LogAnalyticsManager authenticate(RestClient restClient, String subscriptionId) { + return new LogAnalyticsManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of LogAnalyticsManager that exposes LogAnalytics management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing LogAnalytics management API entry points that work across subscriptions + */ + LogAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage DataExports. + */ + public DataExports dataExports() { + if (this.dataExports == null) { + this.dataExports = new DataExportsImpl(this); + } + return this.dataExports; + } + + /** + * @return Entry point to manage DataSources. + */ + public DataSources dataSources() { + if (this.dataSources == null) { + this.dataSources = new DataSourcesImpl(this); + } + return this.dataSources; + } + + /** + * @return Entry point to manage IntelligencePacks. + */ + public IntelligencePacks intelligencePacks() { + if (this.intelligencePacks == null) { + this.intelligencePacks = new IntelligencePacksImpl(this); + } + return this.intelligencePacks; + } + + /** + * @return Entry point to manage LinkedServices. + */ + public LinkedServices linkedServices() { + if (this.linkedServices == null) { + this.linkedServices = new LinkedServicesImpl(this); + } + return this.linkedServices; + } + + /** + * @return Entry point to manage LinkedStorageAccounts. + */ + public LinkedStorageAccounts linkedStorageAccounts() { + if (this.linkedStorageAccounts == null) { + this.linkedStorageAccounts = new LinkedStorageAccountsImpl(this); + } + return this.linkedStorageAccounts; + } + + /** + * @return Entry point to manage ManagementGroups. + */ + public ManagementGroups managementGroups() { + if (this.managementGroups == null) { + this.managementGroups = new ManagementGroupsImpl(this); + } + return this.managementGroups; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage OperationStatuses. + */ + public OperationStatuses operationStatuses() { + if (this.operationStatuses == null) { + this.operationStatuses = new OperationStatusesImpl(this); + } + return this.operationStatuses; + } + + /** + * @return Entry point to manage SharedKeysOperations. + */ + public SharedKeysOperations sharedKeysOperations() { + if (this.sharedKeysOperations == null) { + this.sharedKeysOperations = new SharedKeysOperationsImpl(this); + } + return this.sharedKeysOperations; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * @return Entry point to manage Workspaces. + */ + public Workspaces workspaces() { + if (this.workspaces == null) { + this.workspaces = new WorkspacesImpl(this); + } + return this.workspaces; + } + + /** + * @return Entry point to manage DeletedWorkspaces. + */ + public DeletedWorkspaces deletedWorkspaces() { + if (this.deletedWorkspaces == null) { + this.deletedWorkspaces = new DeletedWorkspacesImpl(this); + } + return this.deletedWorkspaces; + } + + /** + * @return Entry point to manage Clusters. + */ + public Clusters clusters() { + if (this.clusters == null) { + this.clusters = new ClustersImpl(this); + } + return this.clusters; + } + + /** + * @return Entry point to manage StorageInsightConfigs. + */ + public StorageInsightConfigs storageInsightConfigs() { + if (this.storageInsightConfigs == null) { + this.storageInsightConfigs = new StorageInsightConfigsImpl(this); + } + return this.storageInsightConfigs; + } + + /** + * @return Entry point to manage SavedSearches. + */ + public SavedSearches savedSearches() { + if (this.savedSearches == null) { + this.savedSearches = new SavedSearchesImpl(this); + } + return this.savedSearches; + } + + /** + * @return Entry point to manage AvailableServiceTiers. + */ + public AvailableServiceTiers availableServiceTiers() { + if (this.availableServiceTiers == null) { + this.availableServiceTiers = new AvailableServiceTiersImpl(this); + } + return this.availableServiceTiers; + } + + /** + * @return Entry point to manage Gateways. + */ + public Gateways gateways() { + if (this.gateways == null) { + this.gateways = new GatewaysImpl(this); + } + return this.gateways; + } + + /** + * @return Entry point to manage Schemas. + */ + public Schemas schemas() { + if (this.schemas == null) { + this.schemas = new SchemasImpl(this); + } + return this.schemas; + } + + /** + * @return Entry point to manage WorkspacePurges. + */ + public WorkspacePurges workspacePurges() { + if (this.workspacePurges == null) { + this.workspacePurges = new WorkspacePurgesImpl(this); + } + return this.workspacePurges; + } + + /** + * @return Entry point to manage Tables. + */ + public Tables tables() { + if (this.tables == null) { + this.tables = new TablesImpl(this); + } + return this.tables; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public LogAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return LogAnalyticsManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private LogAnalyticsManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new OperationalInsightsManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupImpl.java new file mode 100644 index 0000000000000..17208e512d738 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupImpl.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.ManagementGroup; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; + +class ManagementGroupImpl extends WrapperImpl implements ManagementGroup { + private final LogAnalyticsManager manager; + + ManagementGroupImpl(ManagementGroupInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + + + @Override + public DateTime created() { + return this.inner().created(); + } + + @Override + public DateTime dataReceived() { + return this.inner().dataReceived(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isGateway() { + return this.inner().isGateway(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer serverCount() { + return this.inner().serverCount(); + } + + @Override + public String sku() { + return this.inner().sku(); + } + + @Override + public String version() { + return this.inner().version(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupInner.java new file mode 100644 index 0000000000000..b3de3acf44818 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupInner.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * A management group that is connected to a workspace. + */ +@JsonFlatten +public class ManagementGroupInner { + /** + * The number of servers connected to the management group. + */ + @JsonProperty(value = "properties.serverCount") + private Integer serverCount; + + /** + * Gets or sets a value indicating whether the management group is a + * gateway. + */ + @JsonProperty(value = "properties.isGateway") + private Boolean isGateway; + + /** + * The name of the management group. + */ + @JsonProperty(value = "properties.name") + private String name; + + /** + * The unique ID of the management group. + */ + @JsonProperty(value = "properties.id") + private String id; + + /** + * The datetime that the management group was created. + */ + @JsonProperty(value = "properties.created") + private DateTime created; + + /** + * The last datetime that the management group received data. + */ + @JsonProperty(value = "properties.dataReceived") + private DateTime dataReceived; + + /** + * The version of System Center that is managing the management group. + */ + @JsonProperty(value = "properties.version") + private String version; + + /** + * The SKU of System Center that is managing the management group. + */ + @JsonProperty(value = "properties.sku") + private String sku; + + /** + * Get the number of servers connected to the management group. + * + * @return the serverCount value + */ + public Integer serverCount() { + return this.serverCount; + } + + /** + * Set the number of servers connected to the management group. + * + * @param serverCount the serverCount value to set + * @return the ManagementGroupInner object itself. + */ + public ManagementGroupInner withServerCount(Integer serverCount) { + this.serverCount = serverCount; + return this; + } + + /** + * Get gets or sets a value indicating whether the management group is a gateway. + * + * @return the isGateway value + */ + public Boolean isGateway() { + return this.isGateway; + } + + /** + * Set gets or sets a value indicating whether the management group is a gateway. + * + * @param isGateway the isGateway value to set + * @return the ManagementGroupInner object itself. + */ + public ManagementGroupInner withIsGateway(Boolean isGateway) { + this.isGateway = isGateway; + return this; + } + + /** + * Get the name of the management group. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the management group. + * + * @param name the name value to set + * @return the ManagementGroupInner object itself. + */ + public ManagementGroupInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the unique ID of the management group. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the unique ID of the management group. + * + * @param id the id value to set + * @return the ManagementGroupInner object itself. + */ + public ManagementGroupInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the datetime that the management group was created. + * + * @return the created value + */ + public DateTime created() { + return this.created; + } + + /** + * Set the datetime that the management group was created. + * + * @param created the created value to set + * @return the ManagementGroupInner object itself. + */ + public ManagementGroupInner withCreated(DateTime created) { + this.created = created; + return this; + } + + /** + * Get the last datetime that the management group received data. + * + * @return the dataReceived value + */ + public DateTime dataReceived() { + return this.dataReceived; + } + + /** + * Set the last datetime that the management group received data. + * + * @param dataReceived the dataReceived value to set + * @return the ManagementGroupInner object itself. + */ + public ManagementGroupInner withDataReceived(DateTime dataReceived) { + this.dataReceived = dataReceived; + return this; + } + + /** + * Get the version of System Center that is managing the management group. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set the version of System Center that is managing the management group. + * + * @param version the version value to set + * @return the ManagementGroupInner object itself. + */ + public ManagementGroupInner withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the SKU of System Center that is managing the management group. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set the SKU of System Center that is managing the management group. + * + * @param sku the sku value to set + * @return the ManagementGroupInner object itself. + */ + public ManagementGroupInner withSku(String sku) { + this.sku = sku; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupsImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupsImpl.java new file mode 100644 index 0000000000000..dde532a04e4be --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupsImpl.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ManagementGroups; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ManagementGroup; + +class ManagementGroupsImpl extends WrapperImpl implements ManagementGroups { + private final LogAnalyticsManager manager; + + ManagementGroupsImpl(LogAnalyticsManager manager) { + super(manager.inner().managementGroups()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + private ManagementGroupImpl wrapModel(ManagementGroupInner inner) { + return new ManagementGroupImpl(inner, manager()); + } + + @Override + public Observable listAsync(String resourceGroupName, String workspaceName) { + ManagementGroupsInner client = this.inner(); + return client.listAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ManagementGroup call(ManagementGroupInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupsInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupsInner.java new file mode 100644 index 0000000000000..e64ffaaccbf40 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/ManagementGroupsInner.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ManagementGroups. + */ +public class ManagementGroupsInner { + /** The Retrofit service to perform REST calls. */ + private ManagementGroupsService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of ManagementGroupsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ManagementGroupsInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(ManagementGroupsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ManagementGroups to be + * used by Retrofit to perform actually REST calls. + */ + interface ManagementGroupsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.ManagementGroups list" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of management groups connected to a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ManagementGroupInner> object if successful. + */ + public List list(String resourceGroupName, String workspaceName) { + return listWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets a list of management groups connected to a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets a list of management groups connected to a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ManagementGroupInner> object + */ + public Observable> listAsync(String resourceGroupName, String workspaceName) { + return listWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of management groups connected to a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ManagementGroupInner> object + */ + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationImpl.java new file mode 100644 index 0000000000000..3d1658ccf690d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.OperationDisplay; + +class OperationImpl extends WrapperImpl implements Operation { + private final LogAnalyticsManager manager; + OperationImpl(OperationInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationInner.java new file mode 100644 index 0000000000000..71cab118a7c75 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationInner.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Supported operation of OperationalInsights resource provider. + */ +public class OperationInner { + /** + * Operation name: {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display metadata associated with the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Get operation name: {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set operation name: {provider}/{resource}/{operation}. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get display metadata associated with the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set display metadata associated with the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusImpl.java new file mode 100644 index 0000000000000..4acdeba4b956c --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusImpl.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.OperationStatus; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ErrorResponse; + +class OperationStatusImpl extends IndexableRefreshableWrapperImpl implements OperationStatus { + private final LogAnalyticsManager manager; + private String location; + private String asyncOperationId; + + OperationStatusImpl(OperationStatusInner inner, LogAnalyticsManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.location = IdParsingUtils.getValueFromIdByName(inner.id(), "locations"); + this.asyncOperationId = IdParsingUtils.getValueFromIdByName(inner.id(), "operationStatuses"); + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + OperationStatusesInner client = this.manager().inner().operationStatuses(); + return client.getAsync(this.location, this.asyncOperationId); + } + + + + @Override + public String endTime() { + return this.inner().endTime(); + } + + @Override + public ErrorResponse error() { + return this.inner().error(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String startTime() { + return this.inner().startTime(); + } + + @Override + public String status() { + return this.inner().status(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusInner.java new file mode 100644 index 0000000000000..96cda21a7339f --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusInner.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.ErrorResponse; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The status of operation. + */ +public class OperationStatusInner { + /** + * The operation Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The operation name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The start time of the operation. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /** + * The end time of the operation. + */ + @JsonProperty(value = "endTime") + private String endTime; + + /** + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The error detail of the operation if any. + */ + @JsonProperty(value = "error") + private ErrorResponse error; + + /** + * Get the operation Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the operation Id. + * + * @param id the id value to set + * @return the OperationStatusInner object itself. + */ + public OperationStatusInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the operation name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the operation name. + * + * @param name the name value to set + * @return the OperationStatusInner object itself. + */ + public OperationStatusInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the start time of the operation. + * + * @return the startTime value + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the start time of the operation. + * + * @param startTime the startTime value to set + * @return the OperationStatusInner object itself. + */ + public OperationStatusInner withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time of the operation. + * + * @return the endTime value + */ + public String endTime() { + return this.endTime; + } + + /** + * Set the end time of the operation. + * + * @param endTime the endTime value to set + * @return the OperationStatusInner object itself. + */ + public OperationStatusInner withEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the status of the operation. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the status of the operation. + * + * @param status the status value to set + * @return the OperationStatusInner object itself. + */ + public OperationStatusInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the error detail of the operation if any. + * + * @return the error value + */ + public ErrorResponse error() { + return this.error; + } + + /** + * Set the error detail of the operation if any. + * + * @param error the error value to set + * @return the OperationStatusInner object itself. + */ + public OperationStatusInner withError(ErrorResponse error) { + this.error = error; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesImpl.java new file mode 100644 index 0000000000000..62606680344bb --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesImpl.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.OperationStatuses; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.loganalytics.v2020_08_01.OperationStatus; + +class OperationStatusesImpl extends WrapperImpl implements OperationStatuses { + private final LogAnalyticsManager manager; + + OperationStatusesImpl(LogAnalyticsManager manager) { + super(manager.inner().operationStatuses()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + private OperationStatusImpl wrapModel(OperationStatusInner inner) { + return new OperationStatusImpl(inner, manager()); + } + + @Override + public Observable getAsync(String location, String asyncOperationId) { + OperationStatusesInner client = this.inner(); + return client.getAsync(location, asyncOperationId) + .flatMap(new Func1>() { + @Override + public Observable call(OperationStatusInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((OperationStatus)wrapModel(inner)); + } + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesInner.java new file mode 100644 index 0000000000000..550e35f67ee4e --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesInner.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in OperationStatuses. + */ +public class OperationStatusesInner { + /** The Retrofit service to perform REST calls. */ + private OperationStatusesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of OperationStatusesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationStatusesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(OperationStatusesService.class); + this.client = client; + } + + /** + * The interface defining all the services for OperationStatuses to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationStatusesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.OperationStatuses get" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}") + Observable> get(@Path("location") String location, @Path("asyncOperationId") String asyncOperationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get the status of a long running azure asynchronous operation. + * + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusInner object if successful. + */ + public OperationStatusInner get(String location, String asyncOperationId) { + return getWithServiceResponseAsync(location, asyncOperationId).toBlocking().single().body(); + } + + /** + * Get the status of a long running azure asynchronous operation. + * + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String location, String asyncOperationId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(location, asyncOperationId), serviceCallback); + } + + /** + * Get the status of a long running azure asynchronous operation. + * + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusInner object + */ + public Observable getAsync(String location, String asyncOperationId) { + return getWithServiceResponseAsync(location, asyncOperationId).map(new Func1, OperationStatusInner>() { + @Override + public OperationStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the status of a long running azure asynchronous operation. + * + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusInner object + */ + public Observable> getWithServiceResponseAsync(String location, String asyncOperationId) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (asyncOperationId == null) { + throw new IllegalArgumentException("Parameter asyncOperationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(location, asyncOperationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationalInsightsManagementClientImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationalInsightsManagementClientImpl.java new file mode 100644 index 0000000000000..a1c72a0ac049a --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationalInsightsManagementClientImpl.java @@ -0,0 +1,462 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the OperationalInsightsManagementClientImpl class. + */ +public class OperationalInsightsManagementClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** The API version to use for this operation. */ + private String apiVersion; + + /** + * Gets The API version to use for this operation. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The ID of the target subscription. */ + private String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public OperationalInsightsManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public OperationalInsightsManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public OperationalInsightsManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public OperationalInsightsManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The DataExportsInner object to access its operations. + */ + private DataExportsInner dataExports; + + /** + * Gets the DataExportsInner object to access its operations. + * @return the DataExportsInner object. + */ + public DataExportsInner dataExports() { + return this.dataExports; + } + + /** + * The DataSourcesInner object to access its operations. + */ + private DataSourcesInner dataSources; + + /** + * Gets the DataSourcesInner object to access its operations. + * @return the DataSourcesInner object. + */ + public DataSourcesInner dataSources() { + return this.dataSources; + } + + /** + * The IntelligencePacksInner object to access its operations. + */ + private IntelligencePacksInner intelligencePacks; + + /** + * Gets the IntelligencePacksInner object to access its operations. + * @return the IntelligencePacksInner object. + */ + public IntelligencePacksInner intelligencePacks() { + return this.intelligencePacks; + } + + /** + * The LinkedServicesInner object to access its operations. + */ + private LinkedServicesInner linkedServices; + + /** + * Gets the LinkedServicesInner object to access its operations. + * @return the LinkedServicesInner object. + */ + public LinkedServicesInner linkedServices() { + return this.linkedServices; + } + + /** + * The LinkedStorageAccountsInner object to access its operations. + */ + private LinkedStorageAccountsInner linkedStorageAccounts; + + /** + * Gets the LinkedStorageAccountsInner object to access its operations. + * @return the LinkedStorageAccountsInner object. + */ + public LinkedStorageAccountsInner linkedStorageAccounts() { + return this.linkedStorageAccounts; + } + + /** + * The ManagementGroupsInner object to access its operations. + */ + private ManagementGroupsInner managementGroups; + + /** + * Gets the ManagementGroupsInner object to access its operations. + * @return the ManagementGroupsInner object. + */ + public ManagementGroupsInner managementGroups() { + return this.managementGroups; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The OperationStatusesInner object to access its operations. + */ + private OperationStatusesInner operationStatuses; + + /** + * Gets the OperationStatusesInner object to access its operations. + * @return the OperationStatusesInner object. + */ + public OperationStatusesInner operationStatuses() { + return this.operationStatuses; + } + + /** + * The SharedKeysOperationsInner object to access its operations. + */ + private SharedKeysOperationsInner sharedKeysOperations; + + /** + * Gets the SharedKeysOperationsInner object to access its operations. + * @return the SharedKeysOperationsInner object. + */ + public SharedKeysOperationsInner sharedKeysOperations() { + return this.sharedKeysOperations; + } + + /** + * The UsagesInner object to access its operations. + */ + private UsagesInner usages; + + /** + * Gets the UsagesInner object to access its operations. + * @return the UsagesInner object. + */ + public UsagesInner usages() { + return this.usages; + } + + /** + * The WorkspacesInner object to access its operations. + */ + private WorkspacesInner workspaces; + + /** + * Gets the WorkspacesInner object to access its operations. + * @return the WorkspacesInner object. + */ + public WorkspacesInner workspaces() { + return this.workspaces; + } + + /** + * The DeletedWorkspacesInner object to access its operations. + */ + private DeletedWorkspacesInner deletedWorkspaces; + + /** + * Gets the DeletedWorkspacesInner object to access its operations. + * @return the DeletedWorkspacesInner object. + */ + public DeletedWorkspacesInner deletedWorkspaces() { + return this.deletedWorkspaces; + } + + /** + * The ClustersInner object to access its operations. + */ + private ClustersInner clusters; + + /** + * Gets the ClustersInner object to access its operations. + * @return the ClustersInner object. + */ + public ClustersInner clusters() { + return this.clusters; + } + + /** + * The StorageInsightConfigsInner object to access its operations. + */ + private StorageInsightConfigsInner storageInsightConfigs; + + /** + * Gets the StorageInsightConfigsInner object to access its operations. + * @return the StorageInsightConfigsInner object. + */ + public StorageInsightConfigsInner storageInsightConfigs() { + return this.storageInsightConfigs; + } + + /** + * The SavedSearchesInner object to access its operations. + */ + private SavedSearchesInner savedSearches; + + /** + * Gets the SavedSearchesInner object to access its operations. + * @return the SavedSearchesInner object. + */ + public SavedSearchesInner savedSearches() { + return this.savedSearches; + } + + /** + * The AvailableServiceTiersInner object to access its operations. + */ + private AvailableServiceTiersInner availableServiceTiers; + + /** + * Gets the AvailableServiceTiersInner object to access its operations. + * @return the AvailableServiceTiersInner object. + */ + public AvailableServiceTiersInner availableServiceTiers() { + return this.availableServiceTiers; + } + + /** + * The GatewaysInner object to access its operations. + */ + private GatewaysInner gateways; + + /** + * Gets the GatewaysInner object to access its operations. + * @return the GatewaysInner object. + */ + public GatewaysInner gateways() { + return this.gateways; + } + + /** + * The SchemasInner object to access its operations. + */ + private SchemasInner schemas; + + /** + * Gets the SchemasInner object to access its operations. + * @return the SchemasInner object. + */ + public SchemasInner schemas() { + return this.schemas; + } + + /** + * The WorkspacePurgesInner object to access its operations. + */ + private WorkspacePurgesInner workspacePurges; + + /** + * Gets the WorkspacePurgesInner object to access its operations. + * @return the WorkspacePurgesInner object. + */ + public WorkspacePurgesInner workspacePurges() { + return this.workspacePurges; + } + + /** + * The TablesInner object to access its operations. + */ + private TablesInner tables; + + /** + * Gets the TablesInner object to access its operations. + * @return the TablesInner object. + */ + public TablesInner tables() { + return this.tables; + } + + /** + * Initializes an instance of OperationalInsightsManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public OperationalInsightsManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of OperationalInsightsManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public OperationalInsightsManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of OperationalInsightsManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public OperationalInsightsManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2020-08-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.dataExports = new DataExportsInner(restClient().retrofit(), this); + this.dataSources = new DataSourcesInner(restClient().retrofit(), this); + this.intelligencePacks = new IntelligencePacksInner(restClient().retrofit(), this); + this.linkedServices = new LinkedServicesInner(restClient().retrofit(), this); + this.linkedStorageAccounts = new LinkedStorageAccountsInner(restClient().retrofit(), this); + this.managementGroups = new ManagementGroupsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.operationStatuses = new OperationStatusesInner(restClient().retrofit(), this); + this.sharedKeysOperations = new SharedKeysOperationsInner(restClient().retrofit(), this); + this.usages = new UsagesInner(restClient().retrofit(), this); + this.workspaces = new WorkspacesInner(restClient().retrofit(), this); + this.deletedWorkspaces = new DeletedWorkspacesInner(restClient().retrofit(), this); + this.clusters = new ClustersInner(restClient().retrofit(), this); + this.storageInsightConfigs = new StorageInsightConfigsInner(restClient().retrofit(), this); + this.savedSearches = new SavedSearchesInner(restClient().retrofit(), this); + this.availableServiceTiers = new AvailableServiceTiersInner(restClient().retrofit(), this); + this.gateways = new GatewaysInner(restClient().retrofit(), this); + this.schemas = new SchemasInner(restClient().retrofit(), this); + this.workspacePurges = new WorkspacePurgesInner(restClient().retrofit(), this); + this.tables = new TablesInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "OperationalInsightsManagementClient", "2020-08-01"); + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationsImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..f218af8e09aea --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final LogAnalyticsManager manager; + + OperationsImpl(LogAnalyticsManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationsInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationsInner.java new file mode 100644 index 0000000000000..0c42790186afb --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationsInner.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Operations list" }) + @GET("providers/Microsoft.OperationalInsights/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available OperationalInsights Rest API operations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl.java new file mode 100644 index 0000000000000..a47ddca9cb07b --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl1.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl1.java new file mode 100644 index 0000000000000..fe440c09a4099 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl1.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl1 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl2.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl2.java new file mode 100644 index 0000000000000..7118b89063bb5 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/PageImpl2.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl2 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("@odata.nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl2 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl2 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchImpl.java new file mode 100644 index 0000000000000..f796aa01979f8 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchImpl.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearch; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Tag; + +class SavedSearchImpl extends CreatableUpdatableImpl implements SavedSearch, SavedSearch.Definition, SavedSearch.Update { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private String savedSearchId; + + SavedSearchImpl(String name, LogAnalyticsManager manager) { + super(name, new SavedSearchInner()); + this.manager = manager; + // Set resource name + this.savedSearchId = name; + // + } + + SavedSearchImpl(SavedSearchInner inner, LogAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.savedSearchId = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.savedSearchId = IdParsingUtils.getValueFromIdByName(inner.id(), "savedSearches"); + // + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + SavedSearchesInner client = this.manager().inner().savedSearches(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.savedSearchId, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + SavedSearchesInner client = this.manager().inner().savedSearches(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.savedSearchId, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + SavedSearchesInner client = this.manager().inner().savedSearches(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.savedSearchId); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String category() { + return this.inner().category(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String functionAlias() { + return this.inner().functionAlias(); + } + + @Override + public String functionParameters() { + return this.inner().functionParameters(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String query() { + return this.inner().query(); + } + + @Override + public List tags() { + return this.inner().tags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Long version() { + return this.inner().version(); + } + + @Override + public SavedSearchImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + @Override + public SavedSearchImpl withCategory(String category) { + this.inner().withCategory(category); + return this; + } + + @Override + public SavedSearchImpl withDisplayName(String displayName) { + this.inner().withDisplayName(displayName); + return this; + } + + @Override + public SavedSearchImpl withQuery(String query) { + this.inner().withQuery(query); + return this; + } + + @Override + public SavedSearchImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public SavedSearchImpl withFunctionAlias(String functionAlias) { + this.inner().withFunctionAlias(functionAlias); + return this; + } + + @Override + public SavedSearchImpl withFunctionParameters(String functionParameters) { + this.inner().withFunctionParameters(functionParameters); + return this; + } + + @Override + public SavedSearchImpl withTags(List tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public SavedSearchImpl withVersion(Long version) { + this.inner().withVersion(version); + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchInner.java new file mode 100644 index 0000000000000..c614ea6d10d76 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchInner.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Tag; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Value object for saved search results. + */ +@JsonFlatten +public class SavedSearchInner extends ProxyResource { + /** + * The ETag of the saved search. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * The category of the saved search. This helps the user to find a saved + * search faster. + */ + @JsonProperty(value = "properties.category", required = true) + private String category; + + /** + * Saved search display name. + */ + @JsonProperty(value = "properties.displayName", required = true) + private String displayName; + + /** + * The query expression for the saved search. + */ + @JsonProperty(value = "properties.query", required = true) + private String query; + + /** + * The function alias if query serves as a function. + */ + @JsonProperty(value = "properties.functionAlias") + private String functionAlias; + + /** + * The optional function parameters if query serves as a function. Value + * should be in the following format: 'param-name1:type1 = default_value1, + * param-name2:type2 = default_value2'. For more examples and proper syntax + * please refer to + * https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions. + */ + @JsonProperty(value = "properties.functionParameters") + private String functionParameters; + + /** + * The version number of the query language. The current version is 2 and + * is the default. + */ + @JsonProperty(value = "properties.version") + private Long version; + + /** + * The tags attached to the saved search. + */ + @JsonProperty(value = "properties.tags") + private List tags; + + /** + * Get the ETag of the saved search. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set the ETag of the saved search. + * + * @param etag the etag value to set + * @return the SavedSearchInner object itself. + */ + public SavedSearchInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the category of the saved search. This helps the user to find a saved search faster. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set the category of the saved search. This helps the user to find a saved search faster. + * + * @param category the category value to set + * @return the SavedSearchInner object itself. + */ + public SavedSearchInner withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get saved search display name. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set saved search display name. + * + * @param displayName the displayName value to set + * @return the SavedSearchInner object itself. + */ + public SavedSearchInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the query expression for the saved search. + * + * @return the query value + */ + public String query() { + return this.query; + } + + /** + * Set the query expression for the saved search. + * + * @param query the query value to set + * @return the SavedSearchInner object itself. + */ + public SavedSearchInner withQuery(String query) { + this.query = query; + return this; + } + + /** + * Get the function alias if query serves as a function. + * + * @return the functionAlias value + */ + public String functionAlias() { + return this.functionAlias; + } + + /** + * Set the function alias if query serves as a function. + * + * @param functionAlias the functionAlias value to set + * @return the SavedSearchInner object itself. + */ + public SavedSearchInner withFunctionAlias(String functionAlias) { + this.functionAlias = functionAlias; + return this; + } + + /** + * Get the optional function parameters if query serves as a function. Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more examples and proper syntax please refer to https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions. + * + * @return the functionParameters value + */ + public String functionParameters() { + return this.functionParameters; + } + + /** + * Set the optional function parameters if query serves as a function. Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more examples and proper syntax please refer to https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions. + * + * @param functionParameters the functionParameters value to set + * @return the SavedSearchInner object itself. + */ + public SavedSearchInner withFunctionParameters(String functionParameters) { + this.functionParameters = functionParameters; + return this; + } + + /** + * Get the version number of the query language. The current version is 2 and is the default. + * + * @return the version value + */ + public Long version() { + return this.version; + } + + /** + * Set the version number of the query language. The current version is 2 and is the default. + * + * @param version the version value to set + * @return the SavedSearchInner object itself. + */ + public SavedSearchInner withVersion(Long version) { + this.version = version; + return this; + } + + /** + * Get the tags attached to the saved search. + * + * @return the tags value + */ + public List tags() { + return this.tags; + } + + /** + * Set the tags attached to the saved search. + * + * @param tags the tags value to set + * @return the SavedSearchInner object itself. + */ + public SavedSearchInner withTags(List tags) { + this.tags = tags; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesImpl.java new file mode 100644 index 0000000000000..b7c433c265833 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesImpl.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearches; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearchesListResult; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearch; + +class SavedSearchesImpl extends WrapperImpl implements SavedSearches { + private final LogAnalyticsManager manager; + + SavedSearchesImpl(LogAnalyticsManager manager) { + super(manager.inner().savedSearches()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public SavedSearchImpl define(String name) { + return wrapModel(name); + } + + private SavedSearchImpl wrapModel(SavedSearchInner inner) { + return new SavedSearchImpl(inner, manager()); + } + + private SavedSearchImpl wrapModel(String name) { + return new SavedSearchImpl(name, this.manager()); + } + + @Override + public Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + SavedSearchesInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName) + .map(new Func1() { + @Override + public SavedSearchesListResult call(SavedSearchesListResultInner inner) { + return new SavedSearchesListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String savedSearchId) { + SavedSearchesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, savedSearchId) + .flatMap(new Func1>() { + @Override + public Observable call(SavedSearchInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SavedSearch)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String workspaceName, String savedSearchId) { + SavedSearchesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, workspaceName, savedSearchId).toCompletable(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesInner.java new file mode 100644 index 0000000000000..e83dbf16f75b4 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesInner.java @@ -0,0 +1,448 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in SavedSearches. + */ +public class SavedSearchesInner { + /** The Retrofit service to perform REST calls. */ + private SavedSearchesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of SavedSearchesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SavedSearchesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(SavedSearchesService.class); + this.client = client; + } + + /** + * The interface defining all the services for SavedSearches to be + * used by Retrofit to perform actually REST calls. + */ + interface SavedSearchesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearches delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("savedSearchId") String savedSearchId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearches createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("savedSearchId") String savedSearchId, @Query("api-version") String apiVersion, @Body SavedSearchInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearches get" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("savedSearchId") String savedSearchId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearches listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches") + Observable> listByWorkspace(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified saved search in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, String savedSearchId) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId).toBlocking().single().body(); + } + + /** + * Deletes the specified saved search in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, String savedSearchId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId), serviceCallback); + } + + /** + * Deletes the specified saved search in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, String savedSearchId) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified saved search in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String savedSearchId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (savedSearchId == null) { + throw new IllegalArgumentException("Parameter savedSearchId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, workspaceName, savedSearchId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SavedSearchInner object if successful. + */ + public SavedSearchInner createOrUpdate(String resourceGroupName, String workspaceName, String savedSearchId, SavedSearchInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, String savedSearchId, SavedSearchInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId, parameters), serviceCallback); + } + + /** + * Creates or updates a saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SavedSearchInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String savedSearchId, SavedSearchInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId, parameters).map(new Func1, SavedSearchInner>() { + @Override + public SavedSearchInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SavedSearchInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String savedSearchId, SavedSearchInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (savedSearchId == null) { + throw new IllegalArgumentException("Parameter savedSearchId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, workspaceName, savedSearchId, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the specified saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SavedSearchInner object if successful. + */ + public SavedSearchInner get(String resourceGroupName, String workspaceName, String savedSearchId) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId).toBlocking().single().body(); + } + + /** + * Gets the specified saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String savedSearchId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId), serviceCallback); + } + + /** + * Gets the specified saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SavedSearchInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String savedSearchId) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, savedSearchId).map(new Func1, SavedSearchInner>() { + @Override + public SavedSearchInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified saved search for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SavedSearchInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String savedSearchId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (savedSearchId == null) { + throw new IllegalArgumentException("Parameter savedSearchId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, savedSearchId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the saved searches for a given Log Analytics Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SavedSearchesListResultInner object if successful. + */ + public SavedSearchesListResultInner listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets the saved searches for a given Log Analytics Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listByWorkspaceAsync(String resourceGroupName, String workspaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets the saved searches for a given Log Analytics Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SavedSearchesListResultInner object + */ + public Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1, SavedSearchesListResultInner>() { + @Override + public SavedSearchesListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the saved searches for a given Log Analytics Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SavedSearchesListResultInner object + */ + public Observable> listByWorkspaceWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listByWorkspaceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listByWorkspaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesListResultImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesListResultImpl.java new file mode 100644 index 0000000000000..6e435717a41df --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesListResultImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.SavedSearchesListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class SavedSearchesListResultImpl extends WrapperImpl implements SavedSearchesListResult { + private final LogAnalyticsManager manager; + SavedSearchesListResultImpl(SavedSearchesListResultInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesListResultInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesListResultInner.java new file mode 100644 index 0000000000000..14b8aa843cab0 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SavedSearchesListResultInner.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The saved search list operation response. + */ +public class SavedSearchesListResultInner { + /** + * The array of result values. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the array of result values. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the array of result values. + * + * @param value the value value to set + * @return the SavedSearchesListResultInner object itself. + */ + public SavedSearchesListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SchemasImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SchemasImpl.java new file mode 100644 index 0000000000000..5cf1bc949fce6 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SchemasImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Schemas; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SearchGetSchemaResponse; + +class SchemasImpl extends WrapperImpl implements Schemas { + private final LogAnalyticsManager manager; + + SchemasImpl(LogAnalyticsManager manager) { + super(manager.inner().schemas()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName) { + SchemasInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName) + .map(new Func1() { + @Override + public SearchGetSchemaResponse call(SearchGetSchemaResponseInner inner) { + return new SearchGetSchemaResponseImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SchemasInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SchemasInner.java new file mode 100644 index 0000000000000..b092edaa21151 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SchemasInner.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Schemas. + */ +public class SchemasInner { + /** The Retrofit service to perform REST calls. */ + private SchemasService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of SchemasInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SchemasInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(SchemasService.class); + this.client = client; + } + + /** + * The interface defining all the services for Schemas to be + * used by Retrofit to perform actually REST calls. + */ + interface SchemasService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Schemas get" }) + @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the schema for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SearchGetSchemaResponseInner object if successful. + */ + public SearchGetSchemaResponseInner get(String resourceGroupName, String workspaceName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets the schema for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets the schema for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SearchGetSchemaResponseInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1, SearchGetSchemaResponseInner>() { + @Override + public SearchGetSchemaResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the schema for a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SearchGetSchemaResponseInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SearchGetSchemaResponseImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SearchGetSchemaResponseImpl.java new file mode 100644 index 0000000000000..a6076e45cc529 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SearchGetSchemaResponseImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.SearchGetSchemaResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SearchMetadata; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SearchSchemaValue; + +class SearchGetSchemaResponseImpl extends WrapperImpl implements SearchGetSchemaResponse { + private final LogAnalyticsManager manager; + SearchGetSchemaResponseImpl(SearchGetSchemaResponseInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public SearchMetadata metadata() { + return this.inner().metadata(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SearchGetSchemaResponseInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SearchGetSchemaResponseInner.java new file mode 100644 index 0000000000000..f54f7a16ff914 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SearchGetSchemaResponseInner.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.SearchMetadata; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SearchSchemaValue; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The get schema operation response. + */ +public class SearchGetSchemaResponseInner { + /** + * The metadata from search results. + */ + @JsonProperty(value = "metadata") + private SearchMetadata metadata; + + /** + * The array of result values. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the metadata from search results. + * + * @return the metadata value + */ + public SearchMetadata metadata() { + return this.metadata; + } + + /** + * Set the metadata from search results. + * + * @param metadata the metadata value to set + * @return the SearchGetSchemaResponseInner object itself. + */ + public SearchGetSchemaResponseInner withMetadata(SearchMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the array of result values. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the array of result values. + * + * @param value the value value to set + * @return the SearchGetSchemaResponseInner object itself. + */ + public SearchGetSchemaResponseInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysImpl.java new file mode 100644 index 0000000000000..64cdc9bf8c9a0 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.SharedKeys; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SharedKeysImpl extends WrapperImpl implements SharedKeys { + private final LogAnalyticsManager manager; + SharedKeysImpl(SharedKeysInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public String primarySharedKey() { + return this.inner().primarySharedKey(); + } + + @Override + public String secondarySharedKey() { + return this.inner().secondarySharedKey(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysInner.java new file mode 100644 index 0000000000000..a96ac65829f5f --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysInner.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The shared keys for a workspace. + */ +public class SharedKeysInner { + /** + * The primary shared key of a workspace. + */ + @JsonProperty(value = "primarySharedKey") + private String primarySharedKey; + + /** + * The secondary shared key of a workspace. + */ + @JsonProperty(value = "secondarySharedKey") + private String secondarySharedKey; + + /** + * Get the primary shared key of a workspace. + * + * @return the primarySharedKey value + */ + public String primarySharedKey() { + return this.primarySharedKey; + } + + /** + * Set the primary shared key of a workspace. + * + * @param primarySharedKey the primarySharedKey value to set + * @return the SharedKeysInner object itself. + */ + public SharedKeysInner withPrimarySharedKey(String primarySharedKey) { + this.primarySharedKey = primarySharedKey; + return this; + } + + /** + * Get the secondary shared key of a workspace. + * + * @return the secondarySharedKey value + */ + public String secondarySharedKey() { + return this.secondarySharedKey; + } + + /** + * Set the secondary shared key of a workspace. + * + * @param secondarySharedKey the secondarySharedKey value to set + * @return the SharedKeysInner object itself. + */ + public SharedKeysInner withSecondarySharedKey(String secondarySharedKey) { + this.secondarySharedKey = secondarySharedKey; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysOperationsImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysOperationsImpl.java new file mode 100644 index 0000000000000..611d391f8c66e --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysOperationsImpl.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SharedKeysOperations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.SharedKeys; + +class SharedKeysOperationsImpl extends WrapperImpl implements SharedKeysOperations { + private final LogAnalyticsManager manager; + + SharedKeysOperationsImpl(LogAnalyticsManager manager) { + super(manager.inner().sharedKeysOperations()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable getSharedKeysAsync(String resourceGroupName, String workspaceName) { + SharedKeysOperationsInner client = this.inner(); + return client.getSharedKeysAsync(resourceGroupName, workspaceName) + .map(new Func1() { + @Override + public SharedKeys call(SharedKeysInner inner) { + return new SharedKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable regenerateAsync(String resourceGroupName, String workspaceName) { + SharedKeysOperationsInner client = this.inner(); + return client.regenerateAsync(resourceGroupName, workspaceName) + .map(new Func1() { + @Override + public SharedKeys call(SharedKeysInner inner) { + return new SharedKeysImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysOperationsInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysOperationsInner.java new file mode 100644 index 0000000000000..50d04dc615ebb --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/SharedKeysOperationsInner.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in SharedKeysOperations. + */ +public class SharedKeysOperationsInner { + /** The Retrofit service to perform REST calls. */ + private SharedKeysOperationsService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of SharedKeysOperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SharedKeysOperationsInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(SharedKeysOperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for SharedKeysOperations to be + * used by Retrofit to perform actually REST calls. + */ + interface SharedKeysOperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.SharedKeysOperations getSharedKeys" }) + @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys") + Observable> getSharedKeys(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.SharedKeysOperations regenerate" }) + @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/regenerateSharedKey") + Observable> regenerate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the shared keys for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SharedKeysInner object if successful. + */ + public SharedKeysInner getSharedKeys(String resourceGroupName, String workspaceName) { + return getSharedKeysWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets the shared keys for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSharedKeysAsync(String resourceGroupName, String workspaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSharedKeysWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets the shared keys for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SharedKeysInner object + */ + public Observable getSharedKeysAsync(String resourceGroupName, String workspaceName) { + return getSharedKeysWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1, SharedKeysInner>() { + @Override + public SharedKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the shared keys for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SharedKeysInner object + */ + public Observable> getSharedKeysWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSharedKeys(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSharedKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSharedKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational Insights agents to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SharedKeysInner object if successful. + */ + public SharedKeysInner regenerate(String resourceGroupName, String workspaceName) { + return regenerateWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational Insights agents to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture regenerateAsync(String resourceGroupName, String workspaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational Insights agents to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SharedKeysInner object + */ + public Observable regenerateAsync(String resourceGroupName, String workspaceName) { + return regenerateWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1, SharedKeysInner>() { + @Override + public SharedKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational Insights agents to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SharedKeysInner object + */ + public Observable> regenerateWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.regenerate(this.client.subscriptionId(), resourceGroupName, workspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regenerateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightConfigsImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightConfigsImpl.java new file mode 100644 index 0000000000000..f2f019e240bad --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightConfigsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightConfigs; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsight; + +class StorageInsightConfigsImpl extends WrapperImpl implements StorageInsightConfigs { + private final LogAnalyticsManager manager; + + StorageInsightConfigsImpl(LogAnalyticsManager manager) { + super(manager.inner().storageInsightConfigs()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public StorageInsightImpl define(String name) { + return wrapModel(name); + } + + private StorageInsightImpl wrapModel(StorageInsightInner inner) { + return new StorageInsightImpl(inner, manager()); + } + + private StorageInsightImpl wrapModel(String name) { + return new StorageInsightImpl(name, this.manager()); + } + + @Override + public Observable listByWorkspaceAsync(final String resourceGroupName, final String workspaceName) { + StorageInsightConfigsInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageInsight call(StorageInsightInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String storageInsightName) { + StorageInsightConfigsInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, storageInsightName) + .flatMap(new Func1>() { + @Override + public Observable call(StorageInsightInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((StorageInsight)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String workspaceName, String storageInsightName) { + StorageInsightConfigsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, workspaceName, storageInsightName).toCompletable(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightConfigsInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightConfigsInner.java new file mode 100644 index 0000000000000..13b40871ac888 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightConfigsInner.java @@ -0,0 +1,608 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in StorageInsightConfigs. + */ +public class StorageInsightConfigsInner { + /** The Retrofit service to perform REST calls. */ + private StorageInsightConfigsService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of StorageInsightConfigsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public StorageInsightConfigsInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(StorageInsightConfigsService.class); + this.client = client; + } + + /** + * The interface defining all the services for StorageInsightConfigs to be + * used by Retrofit to perform actually REST calls. + */ + interface StorageInsightConfigsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightConfigs createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("storageInsightName") String storageInsightName, @Path("subscriptionId") String subscriptionId, @Body StorageInsightInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightConfigs get" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("storageInsightName") String storageInsightName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightConfigs delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("storageInsightName") String storageInsightName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightConfigs listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs") + Observable> listByWorkspace(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightConfigs listByWorkspaceNext" }) + @GET + Observable> listByWorkspaceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a storage insight. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StorageInsightInner object if successful. + */ + public StorageInsightInner createOrUpdate(String resourceGroupName, String workspaceName, String storageInsightName, StorageInsightInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a storage insight. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, String storageInsightName, StorageInsightInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName, parameters), serviceCallback); + } + + /** + * Create or update a storage insight. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageInsightInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String storageInsightName, StorageInsightInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName, parameters).map(new Func1, StorageInsightInner>() { + @Override + public StorageInsightInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a storage insight. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageInsightInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String storageInsightName, StorageInsightInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (storageInsightName == null) { + throw new IllegalArgumentException("Parameter storageInsightName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.createOrUpdate(resourceGroupName, workspaceName, storageInsightName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a storage insight instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StorageInsightInner object if successful. + */ + public StorageInsightInner get(String resourceGroupName, String workspaceName, String storageInsightName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName).toBlocking().single().body(); + } + + /** + * Gets a storage insight instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String storageInsightName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName), serviceCallback); + } + + /** + * Gets a storage insight instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageInsightInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String storageInsightName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName).map(new Func1, StorageInsightInner>() { + @Override + public StorageInsightInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a storage insight instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageInsightInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String storageInsightName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (storageInsightName == null) { + throw new IllegalArgumentException("Parameter storageInsightName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, workspaceName, storageInsightName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a storageInsightsConfigs resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, String storageInsightName) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName).toBlocking().single().body(); + } + + /** + * Deletes a storageInsightsConfigs resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, String storageInsightName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName), serviceCallback); + } + + /** + * Deletes a storageInsightsConfigs resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, String storageInsightName) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, storageInsightName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a storageInsightsConfigs resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String storageInsightName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (storageInsightName == null) { + throw new IllegalArgumentException("Parameter storageInsightName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, workspaceName, storageInsightName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the storage insight instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StorageInsightInner> object if successful. + */ + public PagedList listByWorkspace(final String resourceGroupName, final String workspaceName) { + ServiceResponse> response = listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the storage insight instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the storage insight instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageInsightInner> object + */ + public Observable> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the storage insight instances within a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageInsightInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName) { + return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the storage insight instances within a workspace. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageInsightInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByWorkspaceSinglePageAsync(final String resourceGroupName, final String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the storage insight instances within a workspace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StorageInsightInner> object if successful. + */ + public PagedList listByWorkspaceNext(final String nextPageLink) { + ServiceResponse> response = listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the storage insight instances within a workspace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByWorkspaceNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the storage insight instances within a workspace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageInsightInner> object + */ + public Observable> listByWorkspaceNextAsync(final String nextPageLink) { + return listByWorkspaceNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the storage insight instances within a workspace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageInsightInner> object + */ + public Observable>> listByWorkspaceNextWithServiceResponseAsync(final String nextPageLink) { + return listByWorkspaceNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the storage insight instances within a workspace. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageInsightInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByWorkspaceNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByWorkspaceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightImpl.java new file mode 100644 index 0000000000000..7030f4ffaf056 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightImpl.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsight; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.StorageAccount; +import com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightStatus; +import java.util.Map; + +class StorageInsightImpl extends CreatableUpdatableImpl implements StorageInsight, StorageInsight.Definition, StorageInsight.Update { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private String storageInsightName; + + StorageInsightImpl(String name, LogAnalyticsManager manager) { + super(name, new StorageInsightInner()); + this.manager = manager; + // Set resource name + this.storageInsightName = name; + // + } + + StorageInsightImpl(StorageInsightInner inner, LogAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.storageInsightName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.storageInsightName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageInsightConfigs"); + // + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + StorageInsightConfigsInner client = this.manager().inner().storageInsightConfigs(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.storageInsightName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + StorageInsightConfigsInner client = this.manager().inner().storageInsightConfigs(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.storageInsightName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + StorageInsightConfigsInner client = this.manager().inner().storageInsightConfigs(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.storageInsightName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List containers() { + return this.inner().containers(); + } + + @Override + public String eTag() { + return this.inner().eTag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public StorageInsightStatus status() { + return this.inner().status(); + } + + @Override + public StorageAccount storageAccount() { + return this.inner().storageAccount(); + } + + @Override + public List tables() { + return this.inner().tables(); + } + + @Override + public Map tags() { + return this.inner().tags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public StorageInsightImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + @Override + public StorageInsightImpl withStorageAccount(StorageAccount storageAccount) { + this.inner().withStorageAccount(storageAccount); + return this; + } + + @Override + public StorageInsightImpl withContainers(List containers) { + this.inner().withContainers(containers); + return this; + } + + @Override + public StorageInsightImpl withETag(String eTag) { + this.inner().withETag(eTag); + return this; + } + + @Override + public StorageInsightImpl withTables(List tables) { + this.inner().withTables(tables); + return this; + } + + @Override + public StorageInsightImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightInner.java new file mode 100644 index 0000000000000..d3f2f0dfc0cb4 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/StorageInsightInner.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.StorageAccount; +import com.microsoft.azure.management.loganalytics.v2020_08_01.StorageInsightStatus; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The top level storage insight resource container. + */ +@JsonFlatten +public class StorageInsightInner extends ProxyResource { + /** + * The names of the blob containers that the workspace should read. + */ + @JsonProperty(value = "properties.containers") + private List containers; + + /** + * The names of the Azure tables that the workspace should read. + */ + @JsonProperty(value = "properties.tables") + private List tables; + + /** + * The storage account connection details. + */ + @JsonProperty(value = "properties.storageAccount", required = true) + private StorageAccount storageAccount; + + /** + * The status of the storage insight. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private StorageInsightStatus status; + + /** + * The ETag of the storage insight. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the names of the blob containers that the workspace should read. + * + * @return the containers value + */ + public List containers() { + return this.containers; + } + + /** + * Set the names of the blob containers that the workspace should read. + * + * @param containers the containers value to set + * @return the StorageInsightInner object itself. + */ + public StorageInsightInner withContainers(List containers) { + this.containers = containers; + return this; + } + + /** + * Get the names of the Azure tables that the workspace should read. + * + * @return the tables value + */ + public List tables() { + return this.tables; + } + + /** + * Set the names of the Azure tables that the workspace should read. + * + * @param tables the tables value to set + * @return the StorageInsightInner object itself. + */ + public StorageInsightInner withTables(List tables) { + this.tables = tables; + return this; + } + + /** + * Get the storage account connection details. + * + * @return the storageAccount value + */ + public StorageAccount storageAccount() { + return this.storageAccount; + } + + /** + * Set the storage account connection details. + * + * @param storageAccount the storageAccount value to set + * @return the StorageInsightInner object itself. + */ + public StorageInsightInner withStorageAccount(StorageAccount storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Get the status of the storage insight. + * + * @return the status value + */ + public StorageInsightStatus status() { + return this.status; + } + + /** + * Get the ETag of the storage insight. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag of the storage insight. + * + * @param eTag the eTag value to set + * @return the StorageInsightInner object itself. + */ + public StorageInsightInner withETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the StorageInsightInner object itself. + */ + public StorageInsightInner withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TableImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TableImpl.java new file mode 100644 index 0000000000000..108736729adad --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TableImpl.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.Table; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class TableImpl extends CreatableUpdatableImpl implements Table, Table.Update { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private String tableName; + private Integer uretentionInDays; + + TableImpl(String name, LogAnalyticsManager manager) { + super(name, new TableInner()); + this.manager = manager; + // Set resource name + this.tableName = name; + // + } + + TableImpl(TableInner inner, LogAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.tableName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.tableName = IdParsingUtils.getValueFromIdByName(inner.id(), "tables"); + // + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable
createResourceAsync() { + TablesInner client = this.manager().inner().tables(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable
updateResourceAsync() { + TablesInner client = this.manager().inner().tables(); + return client.updateAsync(this.resourceGroupName, this.workspaceName, this.tableName, this.uretentionInDays) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + TablesInner client = this.manager().inner().tables(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.tableName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer retentionInDays() { + return this.inner().retentionInDays(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public TableImpl withRetentionInDays(Integer retentionInDays) { + this.uretentionInDays = retentionInDays; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TableInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TableInner.java new file mode 100644 index 0000000000000..8421820c2988f --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TableInner.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Workspace data table definition. + */ +@JsonFlatten +public class TableInner extends ProxyResource { + /** + * The data table data retention in days, between 30 and 730. Setting this + * property to null will default to the workspace retention. + */ + @JsonProperty(value = "properties.retentionInDays") + private Integer retentionInDays; + + /** + * Get the data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention. + * + * @param retentionInDays the retentionInDays value to set + * @return the TableInner object itself. + */ + public TableInner withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TablesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TablesImpl.java new file mode 100644 index 0000000000000..388e0dd29aa85 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TablesImpl.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Tables; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Table; + +class TablesImpl extends WrapperImpl implements Tables { + private final LogAnalyticsManager manager; + + TablesImpl(LogAnalyticsManager manager) { + super(manager.inner().tables()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + private TableImpl wrapModel(TableInner inner) { + return new TableImpl(inner, manager()); + } + + @Override + public Observable
listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + TablesInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public Table call(TableInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable
getAsync(String resourceGroupName, String workspaceName, String tableName) { + TablesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, tableName) + .flatMap(new Func1>() { + @Override + public Observable
call(TableInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Table)wrapModel(inner)); + } + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TablesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TablesInner.java new file mode 100644 index 0000000000000..bea385fa62a29 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/TablesInner.java @@ -0,0 +1,443 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.loganalytics.v2020_08_01.ErrorContractException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Tables. + */ +public class TablesInner { + /** The Retrofit service to perform REST calls. */ + private TablesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of TablesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public TablesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(TablesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Tables to be + * used by Retrofit to perform actually REST calls. + */ + interface TablesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Tables listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables") + Observable> listByWorkspace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Tables update" }) + @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TableInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Tables get" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all the tables for the specified Log Analytics workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<TableInner> object if successful. + */ + public List listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets all the tables for the specified Log Analytics workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets all the tables for the specified Log Analytics workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<TableInner> object + */ + public Observable> listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the tables for the specified Log Analytics workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<TableInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(this.client.subscriptionId(), resourceGroupName, workspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceDelegate(Response response) throws ErrorContractException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorContractException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorContractException.class) + .build(response); + } + + /** + * Updates a Log Analytics workspace table properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TableInner object if successful. + */ + public TableInner update(String resourceGroupName, String workspaceName, String tableName) { + return updateWithServiceResponseAsync(resourceGroupName, workspaceName, tableName).toBlocking().single().body(); + } + + /** + * Updates a Log Analytics workspace table properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String workspaceName, String tableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceName, tableName), serviceCallback); + } + + /** + * Updates a Log Analytics workspace table properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TableInner object + */ + public Observable updateAsync(String resourceGroupName, String workspaceName, String tableName) { + return updateWithServiceResponseAsync(resourceGroupName, workspaceName, tableName).map(new Func1, TableInner>() { + @Override + public TableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a Log Analytics workspace table properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TableInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String tableName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer retentionInDays = null; + TableInner parameters = new TableInner(); + parameters.withRetentionInDays(null); + return service.update(this.client.subscriptionId(), resourceGroupName, workspaceName, tableName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a Log Analytics workspace table properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param retentionInDays The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TableInner object if successful. + */ + public TableInner update(String resourceGroupName, String workspaceName, String tableName, Integer retentionInDays) { + return updateWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, retentionInDays).toBlocking().single().body(); + } + + /** + * Updates a Log Analytics workspace table properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param retentionInDays The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String workspaceName, String tableName, Integer retentionInDays, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, retentionInDays), serviceCallback); + } + + /** + * Updates a Log Analytics workspace table properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param retentionInDays The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TableInner object + */ + public Observable updateAsync(String resourceGroupName, String workspaceName, String tableName, Integer retentionInDays) { + return updateWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, retentionInDays).map(new Func1, TableInner>() { + @Override + public TableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a Log Analytics workspace table properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param retentionInDays The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TableInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String tableName, Integer retentionInDays) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + TableInner parameters = new TableInner(); + parameters.withRetentionInDays(retentionInDays); + return service.update(this.client.subscriptionId(), resourceGroupName, workspaceName, tableName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws ErrorContractException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorContractException.class) + .build(response); + } + + /** + * Gets a Log Analytics workspace table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TableInner object if successful. + */ + public TableInner get(String resourceGroupName, String workspaceName, String tableName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName).toBlocking().single().body(); + } + + /** + * Gets a Log Analytics workspace table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String tableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName), serviceCallback); + } + + /** + * Gets a Log Analytics workspace table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TableInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String tableName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName).map(new Func1, TableInner>() { + @Override + public TableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a Log Analytics workspace table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TableInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String tableName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, tableName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorContractException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorContractException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsageMetricImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsageMetricImpl.java new file mode 100644 index 0000000000000..c09e4208802e4 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsageMetricImpl.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.UsageMetric; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.MetricName; +import org.joda.time.DateTime; + +class UsageMetricImpl extends WrapperImpl implements UsageMetric { + private final LogAnalyticsManager manager; + + UsageMetricImpl(UsageMetricInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + + + @Override + public Double currentValue() { + return this.inner().currentValue(); + } + + @Override + public Double limit() { + return this.inner().limit(); + } + + @Override + public MetricName name() { + return this.inner().name(); + } + + @Override + public DateTime nextResetTime() { + return this.inner().nextResetTime(); + } + + @Override + public String quotaPeriod() { + return this.inner().quotaPeriod(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsageMetricInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsageMetricInner.java new file mode 100644 index 0000000000000..5723ec755ac16 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsageMetricInner.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.MetricName; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A metric describing the usage of a resource. + */ +public class UsageMetricInner { + /** + * The name of the metric. + */ + @JsonProperty(value = "name") + private MetricName name; + + /** + * The units used for the metric. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * The current value of the metric. + */ + @JsonProperty(value = "currentValue") + private Double currentValue; + + /** + * The quota limit for the metric. + */ + @JsonProperty(value = "limit") + private Double limit; + + /** + * The time that the metric's value will reset. + */ + @JsonProperty(value = "nextResetTime") + private DateTime nextResetTime; + + /** + * The quota period that determines the length of time between value + * resets. + */ + @JsonProperty(value = "quotaPeriod") + private String quotaPeriod; + + /** + * Get the name of the metric. + * + * @return the name value + */ + public MetricName name() { + return this.name; + } + + /** + * Set the name of the metric. + * + * @param name the name value to set + * @return the UsageMetricInner object itself. + */ + public UsageMetricInner withName(MetricName name) { + this.name = name; + return this; + } + + /** + * Get the units used for the metric. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the units used for the metric. + * + * @param unit the unit value to set + * @return the UsageMetricInner object itself. + */ + public UsageMetricInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the current value of the metric. + * + * @return the currentValue value + */ + public Double currentValue() { + return this.currentValue; + } + + /** + * Set the current value of the metric. + * + * @param currentValue the currentValue value to set + * @return the UsageMetricInner object itself. + */ + public UsageMetricInner withCurrentValue(Double currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the quota limit for the metric. + * + * @return the limit value + */ + public Double limit() { + return this.limit; + } + + /** + * Set the quota limit for the metric. + * + * @param limit the limit value to set + * @return the UsageMetricInner object itself. + */ + public UsageMetricInner withLimit(Double limit) { + this.limit = limit; + return this; + } + + /** + * Get the time that the metric's value will reset. + * + * @return the nextResetTime value + */ + public DateTime nextResetTime() { + return this.nextResetTime; + } + + /** + * Set the time that the metric's value will reset. + * + * @param nextResetTime the nextResetTime value to set + * @return the UsageMetricInner object itself. + */ + public UsageMetricInner withNextResetTime(DateTime nextResetTime) { + this.nextResetTime = nextResetTime; + return this; + } + + /** + * Get the quota period that determines the length of time between value resets. + * + * @return the quotaPeriod value + */ + public String quotaPeriod() { + return this.quotaPeriod; + } + + /** + * Set the quota period that determines the length of time between value resets. + * + * @param quotaPeriod the quotaPeriod value to set + * @return the UsageMetricInner object itself. + */ + public UsageMetricInner withQuotaPeriod(String quotaPeriod) { + this.quotaPeriod = quotaPeriod; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsagesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsagesImpl.java new file mode 100644 index 0000000000000..fd5be50d1dc23 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsagesImpl.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Usages; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.UsageMetric; + +class UsagesImpl extends WrapperImpl implements Usages { + private final LogAnalyticsManager manager; + + UsagesImpl(LogAnalyticsManager manager) { + super(manager.inner().usages()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + private UsageMetricImpl wrapModel(UsageMetricInner inner) { + return new UsageMetricImpl(inner, manager()); + } + + @Override + public Observable listAsync(String resourceGroupName, String workspaceName) { + UsagesInner client = this.inner(); + return client.listAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public UsageMetric call(UsageMetricInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsagesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsagesInner.java new file mode 100644 index 0000000000000..3b646870017a2 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/UsagesInner.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Usages. + */ +public class UsagesInner { + /** The Retrofit service to perform REST calls. */ + private UsagesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of UsagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsagesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(UsagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Usages to be + * used by Retrofit to perform actually REST calls. + */ + interface UsagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Usages list" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of usage metrics for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<UsageMetricInner> object if successful. + */ + public List list(String resourceGroupName, String workspaceName) { + return listWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets a list of usage metrics for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets a list of usage metrics for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<UsageMetricInner> object + */ + public Observable> listAsync(String resourceGroupName, String workspaceName) { + return listWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of usage metrics for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<UsageMetricInner> object + */ + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceImpl.java new file mode 100644 index 0000000000000..2326636861800 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceImpl.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Workspace; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePatch; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceEntityStatus; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceSku; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceCapping; +import com.microsoft.azure.management.loganalytics.v2020_08_01.PublicNetworkAccessType; +import com.microsoft.azure.management.loganalytics.v2020_08_01.PrivateLinkScopedResource; +import rx.functions.Func1; + +class WorkspaceImpl extends GroupableResourceCoreImpl implements Workspace, Workspace.Definition, Workspace.Update { + private WorkspacePatch updateParameter; + WorkspaceImpl(String name, WorkspaceInner inner, LogAnalyticsManager manager) { + super(name, inner, manager); + this.updateParameter = new WorkspacePatch(); + } + + @Override + public Observable createResourceAsync() { + WorkspacesInner client = this.manager().inner().workspaces(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public WorkspaceInner call(WorkspaceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WorkspacesInner client = this.manager().inner().workspaces(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public WorkspaceInner call(WorkspaceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WorkspacesInner client = this.manager().inner().workspaces(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new WorkspacePatch(); + } + + @Override + public String customerId() { + return this.inner().customerId(); + } + + @Override + public String eTag() { + return this.inner().eTag(); + } + + @Override + public List privateLinkScopedResources() { + return this.inner().privateLinkScopedResources(); + } + + @Override + public WorkspaceEntityStatus provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PublicNetworkAccessType publicNetworkAccessForIngestion() { + return this.inner().publicNetworkAccessForIngestion(); + } + + @Override + public PublicNetworkAccessType publicNetworkAccessForQuery() { + return this.inner().publicNetworkAccessForQuery(); + } + + @Override + public Integer retentionInDays() { + return this.inner().retentionInDays(); + } + + @Override + public WorkspaceSku sku() { + return this.inner().sku(); + } + + @Override + public WorkspaceCapping workspaceCapping() { + return this.inner().workspaceCapping(); + } + + @Override + public WorkspaceImpl withETag(String eTag) { + this.inner().withETag(eTag); + return this; + } + + @Override + public WorkspaceImpl withProvisioningState(WorkspaceEntityStatus provisioningState) { + if (isInCreateMode()) { + this.inner().withProvisioningState(provisioningState); + } else { + this.updateParameter.withProvisioningState(provisioningState); + } + return this; + } + + @Override + public WorkspaceImpl withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) { + if (isInCreateMode()) { + this.inner().withPublicNetworkAccessForIngestion(publicNetworkAccessForIngestion); + } else { + this.updateParameter.withPublicNetworkAccessForIngestion(publicNetworkAccessForIngestion); + } + return this; + } + + @Override + public WorkspaceImpl withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) { + if (isInCreateMode()) { + this.inner().withPublicNetworkAccessForQuery(publicNetworkAccessForQuery); + } else { + this.updateParameter.withPublicNetworkAccessForQuery(publicNetworkAccessForQuery); + } + return this; + } + + @Override + public WorkspaceImpl withRetentionInDays(Integer retentionInDays) { + if (isInCreateMode()) { + this.inner().withRetentionInDays(retentionInDays); + } else { + this.updateParameter.withRetentionInDays(retentionInDays); + } + return this; + } + + @Override + public WorkspaceImpl withSku(WorkspaceSku sku) { + if (isInCreateMode()) { + this.inner().withSku(sku); + } else { + this.updateParameter.withSku(sku); + } + return this; + } + + @Override + public WorkspaceImpl withWorkspaceCapping(WorkspaceCapping workspaceCapping) { + if (isInCreateMode()) { + this.inner().withWorkspaceCapping(workspaceCapping); + } else { + this.updateParameter.withWorkspaceCapping(workspaceCapping); + } + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceInner.java new file mode 100644 index 0000000000000..e3d8c09823a9d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceInner.java @@ -0,0 +1,243 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceEntityStatus; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceSku; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceCapping; +import com.microsoft.azure.management.loganalytics.v2020_08_01.PublicNetworkAccessType; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.PrivateLinkScopedResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * The top level Workspace resource container. + */ +@JsonFlatten +public class WorkspaceInner extends Resource { + /** + * The provisioning state of the workspace. Possible values include: + * 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + * 'ProvisioningAccount', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState") + private WorkspaceEntityStatus provisioningState; + + /** + * This is a read-only property. Represents the ID associated with the + * workspace. + */ + @JsonProperty(value = "properties.customerId", access = JsonProperty.Access.WRITE_ONLY) + private String customerId; + + /** + * The SKU of the workspace. + */ + @JsonProperty(value = "properties.sku") + private WorkspaceSku sku; + + /** + * The workspace data retention in days, between 30 and 730. + */ + @JsonProperty(value = "properties.retentionInDays") + private Integer retentionInDays; + + /** + * The daily volume cap for ingestion. + */ + @JsonProperty(value = "properties.workspaceCapping") + private WorkspaceCapping workspaceCapping; + + /** + * The network access type for accessing Log Analytics ingestion. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.publicNetworkAccessForIngestion") + private PublicNetworkAccessType publicNetworkAccessForIngestion; + + /** + * The network access type for accessing Log Analytics query. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.publicNetworkAccessForQuery") + private PublicNetworkAccessType publicNetworkAccessForQuery; + + /** + * List of linked private link scope resources. + */ + @JsonProperty(value = "properties.privateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY) + private List privateLinkScopedResources; + + /** + * The ETag of the workspace. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /** + * Get the provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'. + * + * @return the provisioningState value + */ + public WorkspaceEntityStatus provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'. + * + * @param provisioningState the provisioningState value to set + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withProvisioningState(WorkspaceEntityStatus provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get this is a read-only property. Represents the ID associated with the workspace. + * + * @return the customerId value + */ + public String customerId() { + return this.customerId; + } + + /** + * Get the SKU of the workspace. + * + * @return the sku value + */ + public WorkspaceSku sku() { + return this.sku; + } + + /** + * Set the SKU of the workspace. + * + * @param sku the sku value to set + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withSku(WorkspaceSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the workspace data retention in days, between 30 and 730. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the workspace data retention in days, between 30 and 730. + * + * @param retentionInDays the retentionInDays value to set + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Get the daily volume cap for ingestion. + * + * @return the workspaceCapping value + */ + public WorkspaceCapping workspaceCapping() { + return this.workspaceCapping; + } + + /** + * Set the daily volume cap for ingestion. + * + * @param workspaceCapping the workspaceCapping value to set + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withWorkspaceCapping(WorkspaceCapping workspaceCapping) { + this.workspaceCapping = workspaceCapping; + return this; + } + + /** + * Get the network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled'. + * + * @return the publicNetworkAccessForIngestion value + */ + public PublicNetworkAccessType publicNetworkAccessForIngestion() { + return this.publicNetworkAccessForIngestion; + } + + /** + * Set the network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled'. + * + * @param publicNetworkAccessForIngestion the publicNetworkAccessForIngestion value to set + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) { + this.publicNetworkAccessForIngestion = publicNetworkAccessForIngestion; + return this; + } + + /** + * Get the network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled'. + * + * @return the publicNetworkAccessForQuery value + */ + public PublicNetworkAccessType publicNetworkAccessForQuery() { + return this.publicNetworkAccessForQuery; + } + + /** + * Set the network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled'. + * + * @param publicNetworkAccessForQuery the publicNetworkAccessForQuery value to set + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) { + this.publicNetworkAccessForQuery = publicNetworkAccessForQuery; + return this; + } + + /** + * Get list of linked private link scope resources. + * + * @return the privateLinkScopedResources value + */ + public List privateLinkScopedResources() { + return this.privateLinkScopedResources; + } + + /** + * Get the ETag of the workspace. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag of the workspace. + * + * @param eTag the eTag value to set + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceModelImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceModelImpl.java new file mode 100644 index 0000000000000..dece641cffe53 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspaceModelImpl.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceModel; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_08_01.PrivateLinkScopedResource; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceEntityStatus; +import com.microsoft.azure.management.loganalytics.v2020_08_01.PublicNetworkAccessType; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceSku; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspaceCapping; + +class WorkspaceModelImpl extends GroupableResourceCoreImpl implements WorkspaceModel { + WorkspaceModelImpl(String name, WorkspaceInner inner, LogAnalyticsManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + DeletedWorkspacesInner client = this.manager().inner().deletedWorkspaces(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + DeletedWorkspacesInner client = this.manager().inner().deletedWorkspaces(); + return null; // NOP updateResourceAsync implementation as update is not supported + } + + @Override + protected Observable getInnerAsync() { + DeletedWorkspacesInner client = this.manager().inner().deletedWorkspaces(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + + + @Override + public String customerId() { + return this.inner().customerId(); + } + + @Override + public String eTag() { + return this.inner().eTag(); + } + + @Override + public List privateLinkScopedResources() { + return this.inner().privateLinkScopedResources(); + } + + @Override + public WorkspaceEntityStatus provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PublicNetworkAccessType publicNetworkAccessForIngestion() { + return this.inner().publicNetworkAccessForIngestion(); + } + + @Override + public PublicNetworkAccessType publicNetworkAccessForQuery() { + return this.inner().publicNetworkAccessForQuery(); + } + + @Override + public Integer retentionInDays() { + return this.inner().retentionInDays(); + } + + @Override + public WorkspaceSku sku() { + return this.inner().sku(); + } + + @Override + public WorkspaceCapping workspaceCapping() { + return this.inner().workspaceCapping(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeResponseImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeResponseImpl.java new file mode 100644 index 0000000000000..72b9ddcfdb768 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeResponseImpl.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurgeResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class WorkspacePurgeResponseImpl extends WrapperImpl implements WorkspacePurgeResponse { + private final LogAnalyticsManager manager; + WorkspacePurgeResponseImpl(WorkspacePurgeResponseInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + public String operationId() { + return this.inner().operationId(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeResponseInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeResponseInner.java new file mode 100644 index 0000000000000..281227dbddfa8 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeResponseInner.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response containing operationId for a specific purge action. + */ +public class WorkspacePurgeResponseInner { + /** + * Id to use when querying for status for a particular purge operation. + */ + @JsonProperty(value = "operationId", required = true) + private String operationId; + + /** + * Get id to use when querying for status for a particular purge operation. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + + /** + * Set id to use when querying for status for a particular purge operation. + * + * @param operationId the operationId value to set + * @return the WorkspacePurgeResponseInner object itself. + */ + public WorkspacePurgeResponseInner withOperationId(String operationId) { + this.operationId = operationId; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeStatusResponseImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeStatusResponseImpl.java new file mode 100644 index 0000000000000..07af727427ed8 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeStatusResponseImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurgeStatusResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_08_01.PurgeState; + +class WorkspacePurgeStatusResponseImpl extends WrapperImpl implements WorkspacePurgeStatusResponse { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private String purgeId; + + WorkspacePurgeStatusResponseImpl(WorkspacePurgeStatusResponseInner inner, LogAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + + + @Override + public PurgeState status() { + return this.inner().status(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeStatusResponseInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeStatusResponseInner.java new file mode 100644 index 0000000000000..81f56d9fe1849 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgeStatusResponseInner.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.management.loganalytics.v2020_08_01.PurgeState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response containing status for a specific purge operation. + */ +public class WorkspacePurgeStatusResponseInner { + /** + * Status of the operation represented by the requested Id. Possible values + * include: 'pending', 'completed'. + */ + @JsonProperty(value = "status", required = true) + private PurgeState status; + + /** + * Get status of the operation represented by the requested Id. Possible values include: 'pending', 'completed'. + * + * @return the status value + */ + public PurgeState status() { + return this.status; + } + + /** + * Set status of the operation represented by the requested Id. Possible values include: 'pending', 'completed'. + * + * @param status the status value to set + * @return the WorkspacePurgeStatusResponseInner object itself. + */ + public WorkspacePurgeStatusResponseInner withStatus(PurgeState status) { + this.status = status; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgesImpl.java new file mode 100644 index 0000000000000..2bb76444b797d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgesImpl.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurges; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurgeStatusResponse; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurgeResponse; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurgeBody; + +class WorkspacePurgesImpl extends WrapperImpl implements WorkspacePurges { + private final LogAnalyticsManager manager; + + WorkspacePurgesImpl(LogAnalyticsManager manager) { + super(manager.inner().workspacePurges()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + private WorkspacePurgeStatusResponseImpl wrapModel(WorkspacePurgeStatusResponseInner inner) { + return new WorkspacePurgeStatusResponseImpl(inner, manager()); + } + + @Override + public Observable getPurgeStatusAsync(String resourceGroupName, String workspaceName, String purgeId) { + WorkspacePurgesInner client = this.inner(); + return client.getPurgeStatusAsync(resourceGroupName, workspaceName, purgeId) + .flatMap(new Func1>() { + @Override + public Observable call(WorkspacePurgeStatusResponseInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WorkspacePurgeStatusResponse)wrapModel(inner)); + } + } + }); + } + + @Override + public Observable purgeAsync(String resourceGroupName, String workspaceName, WorkspacePurgeBody body) { + WorkspacePurgesInner client = this.inner(); + return client.purgeAsync(resourceGroupName, workspaceName, body) + .map(new Func1() { + @Override + public WorkspacePurgeResponse call(WorkspacePurgeResponseInner inner) { + return new WorkspacePurgeResponseImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgesInner.java new file mode 100644 index 0000000000000..ef335543f7828 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacePurgesInner.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurgeBody; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurgePurgeHeaders; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.ServiceResponseWithHeaders; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WorkspacePurges. + */ +public class WorkspacePurgesInner { + /** The Retrofit service to perform REST calls. */ + private WorkspacePurgesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of WorkspacePurgesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkspacePurgesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(WorkspacePurgesService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkspacePurges to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkspacePurgesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurges purge" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge") + Observable> purge(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("workspaceName") String workspaceName, @Query("api-version") String apiVersion, @Body WorkspacePurgeBody body, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePurges getPurgeStatus" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/operations/{purgeId}") + Observable> getPurgeStatus(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("workspaceName") String workspaceName, @Path("purgeId") String purgeId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Purges data in an Log Analytics workspace by a set of user-defined filters. + In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkspacePurgeResponseInner object if successful. + */ + public WorkspacePurgeResponseInner purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body) { + return purgeWithServiceResponseAsync(resourceGroupName, workspaceName, body).toBlocking().single().body(); + } + + /** + * Purges data in an Log Analytics workspace by a set of user-defined filters. + In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture purgeAsync(String resourceGroupName, String workspaceName, WorkspacePurgeBody body, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(purgeWithServiceResponseAsync(resourceGroupName, workspaceName, body), serviceCallback); + } + + /** + * Purges data in an Log Analytics workspace by a set of user-defined filters. + In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspacePurgeResponseInner object + */ + public Observable purgeAsync(String resourceGroupName, String workspaceName, WorkspacePurgeBody body) { + return purgeWithServiceResponseAsync(resourceGroupName, workspaceName, body).map(new Func1, WorkspacePurgeResponseInner>() { + @Override + public WorkspacePurgeResponseInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Purges data in an Log Analytics workspace by a set of user-defined filters. + In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspacePurgeResponseInner object + */ + public Observable> purgeWithServiceResponseAsync(String resourceGroupName, String workspaceName, WorkspacePurgeBody body) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (body == null) { + throw new IllegalArgumentException("Parameter body is required and cannot be null."); + } + Validator.validate(body); + return service.purge(resourceGroupName, this.client.subscriptionId(), workspaceName, this.client.apiVersion(), body, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = purgeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders purgeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, WorkspacePurgePurgeHeaders.class); + } + + /** + * Gets status of an ongoing purge operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkspacePurgeStatusResponseInner object if successful. + */ + public WorkspacePurgeStatusResponseInner getPurgeStatus(String resourceGroupName, String workspaceName, String purgeId) { + return getPurgeStatusWithServiceResponseAsync(resourceGroupName, workspaceName, purgeId).toBlocking().single().body(); + } + + /** + * Gets status of an ongoing purge operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getPurgeStatusAsync(String resourceGroupName, String workspaceName, String purgeId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPurgeStatusWithServiceResponseAsync(resourceGroupName, workspaceName, purgeId), serviceCallback); + } + + /** + * Gets status of an ongoing purge operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspacePurgeStatusResponseInner object + */ + public Observable getPurgeStatusAsync(String resourceGroupName, String workspaceName, String purgeId) { + return getPurgeStatusWithServiceResponseAsync(resourceGroupName, workspaceName, purgeId).map(new Func1, WorkspacePurgeStatusResponseInner>() { + @Override + public WorkspacePurgeStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets status of an ongoing purge operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspacePurgeStatusResponseInner object + */ + public Observable> getPurgeStatusWithServiceResponseAsync(String resourceGroupName, String workspaceName, String purgeId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (purgeId == null) { + throw new IllegalArgumentException("Parameter purgeId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPurgeStatus(resourceGroupName, this.client.subscriptionId(), workspaceName, purgeId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPurgeStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPurgeStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesImpl.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesImpl.java new file mode 100644 index 0000000000000..08241a19deb02 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces; +import com.microsoft.azure.management.loganalytics.v2020_08_01.Workspace; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class WorkspacesImpl extends GroupableResourcesCoreImpl implements Workspaces { + protected WorkspacesImpl(LogAnalyticsManager manager) { + super(manager.inner().workspaces(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + WorkspacesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + WorkspacesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + WorkspacesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + WorkspacesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public Workspace call(WorkspaceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + WorkspacesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + WorkspacesInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public Workspace call(WorkspaceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public WorkspaceImpl define(String name) { + return wrapModel(name); + } + + @Override + protected WorkspaceImpl wrapModel(WorkspaceInner inner) { + return new WorkspaceImpl(inner.name(), inner, manager()); + } + + @Override + protected WorkspaceImpl wrapModel(String name) { + return new WorkspaceImpl(name, new WorkspaceInner(), this.manager()); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesInner.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesInner.java new file mode 100644 index 0000000000000..3bb5bb7b9582f --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesInner.java @@ -0,0 +1,932 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.loganalytics.v2020_08_01.WorkspacePatch; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Workspaces. + */ +public class WorkspacesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private WorkspacesService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of WorkspacesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkspacesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(WorkspacesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Workspaces to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkspacesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Body WorkspaceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Body WorkspaceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("force") Boolean force, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("force") Boolean force, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_08_01.Workspaces update" }) + @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Body WorkspacePatch parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the workspaces in a subscription. + * + * @return the PagedList object if successful. + */ + public PagedList list() { + PageImpl page = new PageImpl<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Gets the workspaces in a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets the workspaces in a subscription. + * + * @return the observable to the List<WorkspaceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Gets the workspaces in a subscription. + * + * @return the observable to the List<WorkspaceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets workspaces in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName) { + PageImpl page = new PageImpl<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Gets workspaces in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); + } + + /** + * Gets workspaces in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the observable to the List<WorkspaceInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Gets workspaces in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the observable to the List<WorkspaceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to create or update a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkspaceInner object if successful. + */ + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).toBlocking().last().body(); + } + + /** + * Create or update a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to create or update a workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, WorkspaceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters), serviceCallback); + } + + /** + * Create or update a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to create or update a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).map(new Func1, WorkspaceInner>() { + @Override + public WorkspaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to create or update a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(resourceGroupName, workspaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to create or update a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkspaceInner object if successful. + */ + public WorkspaceInner beginCreateOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to create or update a workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, WorkspaceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters), serviceCallback); + } + + /** + * Create or update a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to create or update a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspaceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).map(new Func1, WorkspaceInner>() { + @Override + public WorkspaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to create or update a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspaceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(resourceGroupName, workspaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().last().body(); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean force = null; + Observable> observable = service.delete(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), force, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, Boolean force) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, force).toBlocking().last().body(); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, Boolean force, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, force), serviceCallback); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, Boolean force) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, force).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, Boolean force) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), force, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String workspaceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String workspaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String workspaceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean force = null; + return service.beginDelete(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), force, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String workspaceName, Boolean force) { + beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, force).toBlocking().single().body(); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String workspaceName, Boolean force, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, force), serviceCallback); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String workspaceName, Boolean force) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, force).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, Boolean force) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), force, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a workspace instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkspaceInner object if successful. + */ + public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Gets a workspace instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String workspaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Gets a workspace instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspaceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1, WorkspaceInner>() { + @Override + public WorkspaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a workspace instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspaceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to patch a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkspaceInner object if successful. + */ + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspacePatch parameters) { + return updateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).toBlocking().single().body(); + } + + /** + * Updates a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to patch a workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String workspaceName, WorkspacePatch parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters), serviceCallback); + } + + /** + * Updates a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to patch a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspaceInner object + */ + public Observable updateAsync(String resourceGroupName, String workspaceName, WorkspacePatch parameters) { + return updateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).map(new Func1, WorkspaceInner>() { + @Override + public WorkspaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param parameters The parameters required to patch a workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkspaceInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String workspaceName, WorkspacePatch parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.update(resourceGroupName, workspaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/package-info.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/package-info.java new file mode 100644 index 0000000000000..d5c8171ff6e96 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for OperationalInsightsManagementClient. + * Operational Insights Client. + */ +package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation; diff --git a/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/package-info.java b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/package-info.java new file mode 100644 index 0000000000000..41b5bed1c1f28 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for OperationalInsightsManagementClient. + * Operational Insights Client. + */ +package com.microsoft.azure.management.loganalytics.v2020_08_01; diff --git a/sdk/loganalytics/pom.mgmt.xml b/sdk/loganalytics/pom.mgmt.xml index 9686e1a90b09d..b639609a5fa05 100644 --- a/sdk/loganalytics/pom.mgmt.xml +++ b/sdk/loganalytics/pom.mgmt.xml @@ -11,5 +11,6 @@ mgmt-v2015_03_20 mgmt-v2020_03_01_preview + mgmt-v2020_08_01 From 8880b04b0dea7f5d52fc5d6e7482d7fe7ef220d0 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Mon, 31 Aug 2020 12:01:34 +0800 Subject: [PATCH 005/168] mgmt add azure-resourcemanager-eventhubs (#14469) * copy eventhubs code from azure-libraries-for-java * rename package * update api-spec * generate eventhubs * fix compile errors * update session records * update for storage changes * update eventhubs in azure client * add samples for eventhubs * update credcheck and session records * rename and reformat * rename EventHubManager to EventHubsManager * remove azure-storage-blob * update indexable cast * throw illegal argument exception when casting * support add both send and listen access * concatenate post run tasks in eventhubs * update credcheck and session records * update test case after running credcheck --- eng/versioning/version_client.txt | 1 + sdk/resourcemanager/api-specs.json | 6 +- .../CHANGELOG.md | 5 + .../azure-resourcemanager-eventhubs/README.md | 42 + .../azure-resourcemanager-eventhubs/pom.xml | 135 + .../eventhubs/EventHubManagementClient.java | 203 + .../EventHubManagementClientBuilder.java | 149 + .../eventhubs/EventHubsManager.java | 192 + .../fluent/ConsumerGroupsClient.java | 1149 +++++ .../fluent/DisasterRecoveryConfigsClient.java | 2212 ++++++++++ .../eventhubs/fluent/EventHubsClient.java | 2505 +++++++++++ .../eventhubs/fluent/NamespacesClient.java | 3767 +++++++++++++++++ .../eventhubs/fluent/OperationsClient.java | 245 ++ .../eventhubs/fluent/RegionsClient.java | 284 ++ .../fluent/inner/AccessKeysInner.java | 132 + .../inner/ArmDisasterRecoveryInner.java | 133 + .../ArmDisasterRecoveryListResultInner.java | 71 + .../fluent/inner/AuthorizationRuleInner.java | 55 + .../AuthorizationRuleListResultInner.java | 83 + .../CheckNameAvailabilityResultInner.java | 95 + .../fluent/inner/ConsumerGroupInner.java | 91 + .../inner/ConsumerGroupListResultInner.java | 83 + .../fluent/inner/EHNamespaceInner.java | 218 + .../inner/EHNamespaceListResultInner.java | 83 + .../fluent/inner/EventHubListResultInner.java | 83 + .../eventhubs/fluent/inner/EventhubInner.java | 189 + .../fluent/inner/MessagingPlanInner.java | 88 + .../fluent/inner/MessagingRegionsInner.java | 55 + .../MessagingRegionsListResultInner.java | 71 + .../fluent/inner/NetworkRuleSetInner.java | 115 + .../inner/NetworkRuleSetListResultInner.java | 83 + .../fluent/inner/OperationInner.java | 69 + .../inner/OperationListResultInner.java | 59 + .../eventhubs/fluent/inner/package-info.java | 6 + .../eventhubs/fluent/package-info.java | 6 + .../eventhubs/implementation/Ancestors.java | 90 + .../AuthorizationRuleBaseImpl.java | 109 + .../AuthorizationRulesBaseImpl.java | 44 + ...erRecoveryPairingAuthorizationKeyImpl.java | 50 + ...rRecoveryPairingAuthorizationRuleImpl.java | 67 + ...RecoveryPairingAuthorizationRulesImpl.java | 92 + .../EventHubAuthorizationKeyImpl.java | 40 + .../EventHubAuthorizationRuleImpl.java | 121 + .../EventHubAuthorizationRulesImpl.java | 104 + .../EventHubConsumerGroupImpl.java | 120 + .../EventHubConsumerGroupsImpl.java | 119 + .../EventHubDisasterRecoveryPairingImpl.java | 202 + .../EventHubDisasterRecoveryPairingsImpl.java | 121 + .../implementation/EventHubImpl.java | 546 +++ ...ventHubNamespaceAuthorizationRuleImpl.java | 112 + ...entHubNamespaceAuthorizationRulesImpl.java | 101 + .../implementation/EventHubNamespaceImpl.java | 272 ++ .../EventHubNamespacesImpl.java | 55 + .../implementation/EventHubsImpl.java | 123 + .../implementation/NestedResourceImpl.java | 63 + .../eventhubs/models/AccessRights.java | 37 + .../eventhubs/models/AuthorizationRule.java | 196 + .../eventhubs/models/CaptureDescription.java | 196 + .../CheckNameAvailabilityParameter.java | 56 + .../eventhubs/models/DefaultAction.java | 34 + .../eventhubs/models/Destination.java | 137 + ...sasterRecoveryPairingAuthorizationKey.java | 44 + ...asterRecoveryPairingAuthorizationRule.java | 34 + ...sterRecoveryPairingAuthorizationRules.java | 68 + .../models/EncodingCaptureDescription.java | 47 + .../eventhubs/models/EntityStatus.java | 68 + .../eventhubs/models/EventHub.java | 548 +++ .../models/EventHubAuthorizationKey.java | 34 + .../models/EventHubAuthorizationRule.java | 103 + .../models/EventHubAuthorizationRules.java | 91 + .../models/EventHubConsumerGroup.java | 159 + .../models/EventHubConsumerGroups.java | 95 + .../EventHubDisasterRecoveryPairing.java | 226 + .../EventHubDisasterRecoveryPairings.java | 85 + .../eventhubs/models/EventHubNamespace.java | 376 ++ .../EventHubNamespaceAuthorizationRule.java | 101 + .../EventHubNamespaceAuthorizationRules.java | 84 + .../models/EventHubNamespaceSkuType.java | 92 + .../eventhubs/models/EventHubNamespaces.java | 46 + .../eventhubs/models/EventHubs.java | 93 + .../eventhubs/models/KeyType.java | 47 + .../models/MessagingRegionsProperties.java | 54 + .../eventhubs/models/NWRuleSetIpRules.java | 76 + .../models/NWRuleSetVirtualNetworkRules.java | 81 + .../eventhubs/models/NestedResource.java | 29 + .../eventhubs/models/NetworkRuleIpAction.java | 31 + .../eventhubs/models/OperationDisplay.java | 69 + .../eventhubs/models/ProvisioningStateDR.java | 50 + .../models/RegenerateAccessKeyParameters.java | 85 + .../models/RoleDisasterRecovery.java | 50 + .../resourcemanager/eventhubs/models/Sku.java | 107 + .../eventhubs/models/SkuName.java | 34 + .../eventhubs/models/SkuTier.java | 34 + .../eventhubs/models/Subnet.java | 54 + .../eventhubs/models/UnavailableReason.java | 59 + .../eventhubs/models/package-info.java | 6 + .../eventhubs/package-info.java | 6 + .../eventhubs/EventHubTests.java | 577 +++ .../canConfigureEventHubDataCapturing.json | 569 +++ .../canEnableEventHubDataCaptureOnUpdate.json | 516 +++ .../canManageEventHubAuthorizationRules.json | 447 ++ .../canManageEventHubConsumerGroups.json | 450 ++ ...geEventHubNamespaceAuthorizationRules.json | 496 +++ ...nManageEventHubNamespaceBasicSettings.json | 468 ++ .../canManageEventHubNamespaceEventHubs.json | 424 ++ .../canManageGeoDisasterRecoveryPairing.json | 874 ++++ .../README.md | 2 + .../redis/RedisCacheOperationsTests.java | 12 +- .../session-records/canCRUDLinkedServers.json | 4 +- .../session-records/canCRUDRedisCache.json | 14 +- .../eventhubs/samples/ManageEventHub.java | 207 + .../samples/ManageEventHubEvents.java | 161 + .../ManageEventHubGeoDisasterRecovery.java | 195 + .../eventhubs/samples/package-info.java | 7 + .../azure/resourcemanager/samples/Utils.java | 227 +- .../samples/EventHubsSampleTests.java | 26 + ...teCosmosDBTableWithVirtualNetworkRule.json | 4 +- ...CreateCosmosDBWithEventualConsistency.json | 6 +- .../testCreateCosmosDBWithIPRange.json | 4 +- .../testCreateCosmosDBWithKindMongoDB.json | 4 +- .../session-records/testManageEventHub.json | 674 ++- .../testManageEventHubEvents.json | 1505 ++++--- ...testManageEventHubGeoDisasterRecovery.json | 608 +-- .../session-records/testManageHACosmosDB.json | 10 +- .../testManageLinuxWebAppCosmosDbByMsi.json | 4 +- .../session-records/testManageRedisCache.json | 10 +- .../testManageSearchService.json | 16 +- .../testManageWebAppCosmosDbByMsi.json | 6 +- ...stManageWebAppCosmosDbThroughKeyVault.json | 6 +- ...iceBusPublishSubscribeAdvanceFeatures.json | 2 +- .../testServiceBusPublishSubscribeBasic.json | 4 +- .../testServiceBusQueueAdvanceFeatures.json | 2 +- .../testServiceBusQueueBasic.json | 4 +- ...ServiceBusWithClaimBasedAuthorization.json | 2 +- .../azure-resourcemanager/pom.xml | 5 + .../java/com/azure/resourcemanager/Azure.java | 53 +- .../resources/session-records/testRedis.json | 2 +- .../testSearchServiceAnySku.json | 20 +- .../testSearchServiceBasicSku.json | 6 +- .../testSearchServiceFreeSku.json | 6 +- .../testSearchServiceStandardSku.json | 6 +- sdk/resourcemanager/credcheck.js | 7 + sdk/resourcemanager/pom.xml | 1 + 143 files changed, 26429 insertions(+), 1460 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/README.md create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClientBuilder.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/RegionsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AccessKeysInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ArmDisasterRecoveryInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ArmDisasterRecoveryListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AuthorizationRuleInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AuthorizationRuleListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/CheckNameAvailabilityResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ConsumerGroupInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ConsumerGroupListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EHNamespaceInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EHNamespaceListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EventHubListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EventhubInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingPlanInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingRegionsInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingRegionsListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/NetworkRuleSetInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/NetworkRuleSetListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/OperationInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/OperationListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/Ancestors.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/AuthorizationRuleBaseImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/AuthorizationRulesBaseImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationKeyImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationRuleImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationRulesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationKeyImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationRuleImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationRulesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubConsumerGroupImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubConsumerGroupsImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubDisasterRecoveryPairingImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubDisasterRecoveryPairingsImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceAuthorizationRuleImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceAuthorizationRulesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespacesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NestedResourceImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AuthorizationRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/CaptureDescription.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/CheckNameAvailabilityParameter.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationKey.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHub.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationKey.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubConsumerGroup.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubConsumerGroups.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubDisasterRecoveryPairing.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubDisasterRecoveryPairings.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespace.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceAuthorizationRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceAuthorizationRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceSkuType.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaces.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubs.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MessagingRegionsProperties.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NestedResource.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningStateDR.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/RegenerateAccessKeyParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/RoleDisasterRecovery.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canConfigureEventHubDataCapturing.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canEnableEventHubDataCaptureOnUpdate.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubAuthorizationRules.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubConsumerGroups.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceAuthorizationRules.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceBasicSettings.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceEventHubs.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageGeoDisasterRecoveryPairing.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/EventHubsSampleTests.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index a474c545f184b..59f822acb45f5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -71,6 +71,7 @@ com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.0.0-beta.3;2 com.azure.resourcemanager:azure-resourcemanager-containerservice;2.0.0-beta.3;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.0.0-beta.3;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-dns;2.0.0-beta.3;2.0.0-beta.4 +com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.0.0-beta.4;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-keyvault;2.0.0-beta.3;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-monitor;2.0.0-beta.3;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-msi;2.0.0-beta.3;2.0.0-beta.4 diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 9788391b34ae4..06a1104b68d6e 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -154,10 +154,10 @@ "package": "com.azure.resourcemanager.dns", "args": "--payload-flattening-threshold=1 --tag=package-2018-03-preview" }, - "eventhub": { - "dir": "azure-resourcemanager-eventhub", + "eventhubs": { + "dir": "azure-resourcemanager-eventhubs", "source": "specification/eventhub/resource-manager/readme.md", - "package": "com.microsoft.azure.resourcemanager.eventhub", + "package": "com.azure.resourcemanager.eventhubs", "args": "--payload-flattening-threshold=1 --tag=package-2017-04" }, "features": { diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md new file mode 100644 index 0000000000000..003c434ede62c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 2.0.0-beta.4 (Unreleased) + +- TODO diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/README.md b/sdk/resourcemanager/azure-resourcemanager-eventhubs/README.md new file mode 100644 index 0000000000000..1e41c42c56388 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/README.md @@ -0,0 +1,42 @@ +# Azure Resource Manager EventHubs client library for Java + +Azure Resource Manager EventHubs client library for Java + +For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azure-sdk-java-mgmt). + +## Getting started + +### Prerequisites + +- Java Development Kit (JDK) with version 8 or above + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-eventhubs;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-eventhubs + 2.0.0-beta.4 + +``` +[//]: # ({x-version-update-end}) + +## Key concepts + +## Examples + +## Troubleshooting + +## Next steps + +## Contributing + +If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft +Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml new file mode 100644 index 0000000000000..2a1ce1af63f82 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-eventhubs + 2.0.0-beta.4 + jar + + Microsoft Azure SDK for EventHubs Management + This package contains Microsoft Azure EventHubs Management SDK. For documentation on how to use this package, please see https://aka.ms/azure-sdk-java-mgmt + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + 0.10 + 0.10 + + + + + microsoft + Microsoft + + + + + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.0.0-beta.4 + + + com.azure.resourcemanager + azure-resourcemanager-storage + 2.0.0-beta.4 + + + org.junit.jupiter + junit-jupiter-engine + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-api + 5.6.2 + test + + + com.azure + azure-core-http-netty + 1.5.4 + test + + + com.azure + azure-identity + 1.1.0 + test + + + + + azure-mgmt-sdk-test-jar + + + !maven.test.skip + + + + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.0.0-beta.4 + test-jar + test + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + true + true + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + com/azure/resourcemanager/**/fluent/**/* + com/azure/resourcemanager/**/models/**/* + + + + + + diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClient.java new file mode 100644 index 0000000000000..8c5484367cf92 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClient.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.resourcemanager.eventhubs.fluent.ConsumerGroupsClient; +import com.azure.resourcemanager.eventhubs.fluent.DisasterRecoveryConfigsClient; +import com.azure.resourcemanager.eventhubs.fluent.EventHubsClient; +import com.azure.resourcemanager.eventhubs.fluent.NamespacesClient; +import com.azure.resourcemanager.eventhubs.fluent.OperationsClient; +import com.azure.resourcemanager.eventhubs.fluent.RegionsClient; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; +import java.time.Duration; + +/** Initializes a new instance of the EventHubManagementClient type. */ +@ServiceClient(builder = EventHubManagementClientBuilder.class) +public final class EventHubManagementClient extends AzureServiceClient { + private final ClientLogger logger = new ClientLogger(EventHubManagementClient.class); + + /** + * Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. + */ + private final String subscriptionId; + + /** + * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The NamespacesClient object to access its operations. */ + private final NamespacesClient namespaces; + + /** + * Gets the NamespacesClient object to access its operations. + * + * @return the NamespacesClient object. + */ + public NamespacesClient getNamespaces() { + return this.namespaces; + } + + /** The DisasterRecoveryConfigsClient object to access its operations. */ + private final DisasterRecoveryConfigsClient disasterRecoveryConfigs; + + /** + * Gets the DisasterRecoveryConfigsClient object to access its operations. + * + * @return the DisasterRecoveryConfigsClient object. + */ + public DisasterRecoveryConfigsClient getDisasterRecoveryConfigs() { + return this.disasterRecoveryConfigs; + } + + /** The EventHubsClient object to access its operations. */ + private final EventHubsClient eventHubs; + + /** + * Gets the EventHubsClient object to access its operations. + * + * @return the EventHubsClient object. + */ + public EventHubsClient getEventHubs() { + return this.eventHubs; + } + + /** The ConsumerGroupsClient object to access its operations. */ + private final ConsumerGroupsClient consumerGroups; + + /** + * Gets the ConsumerGroupsClient object to access its operations. + * + * @return the ConsumerGroupsClient object. + */ + public ConsumerGroupsClient getConsumerGroups() { + return this.consumerGroups; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** The RegionsClient object to access its operations. */ + private final RegionsClient regions; + + /** + * Gets the RegionsClient object to access its operations. + * + * @return the RegionsClient object. + */ + public RegionsClient getRegions() { + return this.regions; + } + + /** + * Initializes an instance of EventHubManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + */ + EventHubManagementClient( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + super(httpPipeline, serializerAdapter, environment); + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2017-04-01"; + this.namespaces = new NamespacesClient(this); + this.disasterRecoveryConfigs = new DisasterRecoveryConfigsClient(this); + this.eventHubs = new EventHubsClient(this); + this.consumerGroups = new ConsumerGroupsClient(this); + this.operations = new OperationsClient(this); + this.regions = new RegionsClient(this); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClientBuilder.java new file mode 100644 index 0000000000000..541ca6cde51af --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClientBuilder.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.AzureJacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the EventHubManagementClient type. */ +@ServiceClientBuilder(serviceClients = {EventHubManagementClient.class}) +public final class EventHubManagementClientBuilder { + /* + * Subscription credentials that uniquely identify a Microsoft Azure + * subscription. The subscription ID forms part of the URI for every + * service call. + */ + private String subscriptionId; + + /** + * Sets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the EventHubManagementClientBuilder. + */ + public EventHubManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the EventHubManagementClientBuilder. + */ + public EventHubManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the EventHubManagementClientBuilder. + */ + public EventHubManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the EventHubManagementClientBuilder. + */ + public EventHubManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the EventHubManagementClientBuilder. + */ + public EventHubManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the EventHubManagementClientBuilder. + */ + public EventHubManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /** + * Builds an instance of EventHubManagementClient with the provided parameters. + * + * @return an instance of EventHubManagementClient. + */ + public EventHubManagementClient buildClient() { + if (endpoint == null) { + this.endpoint = "https://management.azure.com"; + } + if (environment == null) { + this.environment = AzureEnvironment.AZURE; + } + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = new AzureJacksonAdapter(); + } + if (defaultPollInterval == null) { + this.defaultPollInterval = Duration.ofSeconds(30); + } + EventHubManagementClient client = + new EventHubManagementClient( + pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + return client; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java new file mode 100644 index 0000000000000..6941b51a29272 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.eventhubs.implementation.DisasterRecoveryPairingAuthorizationRulesImpl; +import com.azure.resourcemanager.eventhubs.implementation.EventHubAuthorizationRulesImpl; +import com.azure.resourcemanager.eventhubs.implementation.EventHubConsumerGroupsImpl; +import com.azure.resourcemanager.eventhubs.implementation.EventHubDisasterRecoveryPairingsImpl; +import com.azure.resourcemanager.eventhubs.implementation.EventHubNamespaceAuthorizationRulesImpl; +import com.azure.resourcemanager.eventhubs.implementation.EventHubNamespacesImpl; +import com.azure.resourcemanager.eventhubs.implementation.EventHubsImpl; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRules; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationRules; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroups; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairings; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRules; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaces; +import com.azure.resourcemanager.eventhubs.models.EventHubs; +import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; +import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; +import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.storage.StorageManager; + +/** + * Entry point to Azure EventHub resource management. + */ +public final class EventHubsManager extends Manager { + private EventHubNamespaces namespaces; + private EventHubs eventHubs; + private EventHubConsumerGroups consumerGroups; + private EventHubAuthorizationRules eventHubAuthorizationRules; + private EventHubNamespaceAuthorizationRules namespaceAuthorizationRules; + private EventHubDisasterRecoveryPairings eventHubDisasterRecoveryPairings; + private DisasterRecoveryPairingAuthorizationRules disasterRecoveryPairingAuthorizationRules; + + private final StorageManager storageManager; + + /** + * Get a Configurable instance that can be used to create EventHubsManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new EventHubsManager.ConfigurableImpl(); + } + + /** + * Creates an instance of EventHubsManager that exposes EventHub resource management API entry points. + * + * @param credential the credential to use + * @param profile the profile to use + * @return the EventHubsManager + */ + public static EventHubsManager authenticate(TokenCredential credential, AzureProfile profile) { + return authenticate(HttpPipelineProvider.buildHttpPipeline(credential, profile), profile); + } + + /** + * Creates an instance of EventHubsManager that exposes EventHub resource management API entry points. + * + * @param httpPipeline the HttpPipeline to be used for API calls. + * @param profile the profile to use + * @return the EventHubsManager + */ + public static EventHubsManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + return authenticate(httpPipeline, profile, new SdkContext()); + } + + /** + * Creates an instance of EventHubsManager that exposes EventHub resource management API entry points. + * + * @param httpPipeline the HttpPipeline to be used for API calls. + * @param profile the profile to use + * @param sdkContext the sdk context + * @return the EventHubsManager + */ + public static EventHubsManager authenticate( + HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { + return new EventHubsManager(httpPipeline, profile, sdkContext); + } + + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of EventHubsManager that exposes EventHub management API entry points. + * + * @param credential the credential to use + * @param profile the profile to use + * @return the interface exposing EventHub management API entry points that work across subscriptions + */ + EventHubsManager authenticate(TokenCredential credential, AzureProfile profile); + } + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { + public EventHubsManager authenticate(TokenCredential credential, AzureProfile profile) { + return EventHubsManager.authenticate(buildHttpPipeline(credential, profile), profile); + } + } + private EventHubsManager(HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { + super( + httpPipeline, + profile, + new EventHubManagementClientBuilder() + .pipeline(httpPipeline) + .endpoint(profile.environment().getResourceManagerEndpoint()) + .subscriptionId(profile.subscriptionId()) + .buildClient(), + sdkContext + ); + storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); + } + + /** + * @return entry point to manage EventHub namespaces + */ + public EventHubNamespaces namespaces() { + if (this.namespaces == null) { + this.namespaces = new EventHubNamespacesImpl(this); + } + return this.namespaces; + } + + /** + * @return entry point to manage event hubs + */ + public EventHubs eventHubs() { + if (this.eventHubs == null) { + this.eventHubs = new EventHubsImpl(this, this.storageManager); + } + return this.eventHubs; + } + + /** + * @return entry point to manage event hub consumer groups + */ + public EventHubConsumerGroups consumerGroups() { + if (this.consumerGroups == null) { + this.consumerGroups = new EventHubConsumerGroupsImpl(this); + } + return this.consumerGroups; + } + + /** + * @return entry point to manage disaster recovery pairing of event hub namespaces. + */ + public EventHubDisasterRecoveryPairings eventHubDisasterRecoveryPairings() { + if (this.eventHubDisasterRecoveryPairings == null) { + this.eventHubDisasterRecoveryPairings = new EventHubDisasterRecoveryPairingsImpl(this); + } + return this.eventHubDisasterRecoveryPairings; + } + + /** + * @return entry point to manage event hub authorization rules. + */ + public EventHubAuthorizationRules eventHubAuthorizationRules() { + if (this.eventHubAuthorizationRules == null) { + this.eventHubAuthorizationRules = new EventHubAuthorizationRulesImpl(this); + } + return this.eventHubAuthorizationRules; + } + + /** + * @return entry point to manage event hub namespace authorization rules. + */ + public EventHubNamespaceAuthorizationRules namespaceAuthorizationRules() { + if (this.namespaceAuthorizationRules == null) { + this.namespaceAuthorizationRules = new EventHubNamespaceAuthorizationRulesImpl(this); + } + return this.namespaceAuthorizationRules; + } + + /** + * @return entry point to manage disaster recovery pairing authorization rules. + */ + public DisasterRecoveryPairingAuthorizationRules disasterRecoveryPairingAuthorizationRules() { + if (this.disasterRecoveryPairingAuthorizationRules == null) { + this.disasterRecoveryPairingAuthorizationRules = new DisasterRecoveryPairingAuthorizationRulesImpl(this); + } + return this.disasterRecoveryPairingAuthorizationRules; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java new file mode 100644 index 0000000000000..07ed795016fba --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java @@ -0,0 +1,1149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.EventHubManagementClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.ConsumerGroupInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.ConsumerGroupListResultInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ConsumerGroups. */ +public final class ConsumerGroupsClient { + private final ClientLogger logger = new ClientLogger(ConsumerGroupsClient.class); + + /** The proxy service used to perform REST calls. */ + private final ConsumerGroupsService service; + + /** The service client containing this operation class. */ + private final EventHubManagementClient client; + + /** + * Initializes an instance of ConsumerGroupsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public ConsumerGroupsClient(EventHubManagementClient client) { + this.service = + RestProxy.create(ConsumerGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventHubManagementClientConsumerGroups to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") + private interface ConsumerGroupsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @PathParam("consumerGroupName") String consumerGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ConsumerGroupInner parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @PathParam("consumerGroupName") String consumerGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @PathParam("consumerGroupName") String consumerGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/consumergroups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByEventHub( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$skip") Integer skip, + @QueryParam("$top") Integer top, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByEventHubNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. + * e.g. it can be used to store descriptive data, such as list of teams and their contact information also + * user-defined configuration settings can be stored. + * @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 single item in List or Get Consumer group operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + String userMetadata) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (consumerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter consumerGroupName 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.")); + } + ConsumerGroupInner parameters = new ConsumerGroupInner(); + parameters.withUserMetadata(userMetadata); + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + consumerGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. + * e.g. it can be used to store descriptive data, such as list of teams and their contact information also + * user-defined configuration settings can be stored. + * @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 single item in List or Get Consumer group operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + String userMetadata, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (consumerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter consumerGroupName 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.")); + } + ConsumerGroupInner parameters = new ConsumerGroupInner(); + parameters.withUserMetadata(userMetadata); + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + consumerGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. + * e.g. it can be used to store descriptive data, such as list of teams and their contact information also + * user-defined configuration settings can be stored. + * @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 single item in List or Get Consumer group operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + String userMetadata) { + return createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, consumerGroupName, userMetadata) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. + * e.g. it can be used to store descriptive data, such as list of teams and their contact information also + * user-defined configuration settings can be stored. + * @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 single item in List or Get Consumer group operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + String userMetadata, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, consumerGroupName, userMetadata, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. + * e.g. it can be used to store descriptive data, such as list of teams and their contact information also + * user-defined configuration settings can be stored. + * @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 single item in List or Get Consumer group operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConsumerGroupInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + String userMetadata) { + return createOrUpdateAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, userMetadata) + .block(); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. + * e.g. it can be used to store descriptive data, such as list of teams and their contact information also + * user-defined configuration settings can be stored. + * @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 single item in List or Get Consumer group operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConsumerGroupInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + String userMetadata, + Context context) { + return createOrUpdateAsync( + resourceGroupName, namespaceName, eventHubName, consumerGroupName, userMetadata, context) + .block(); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (consumerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter consumerGroupName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + consumerGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (consumerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter consumerGroupName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + consumerGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync( + String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + deleteAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).block(); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + Context context) { + deleteAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, context).block(); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 description for the specified consumer group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (consumerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter consumerGroupName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + consumerGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 description for the specified consumer group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (consumerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter consumerGroupName 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.")); + } + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + consumerGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 description for the specified consumer group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 description for the specified consumer group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 description for the specified consumer group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConsumerGroupInner get( + String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + return getAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).block(); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param consumerGroupName The consumer group name. + * @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 description for the specified consumer group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConsumerGroupInner get( + String resourceGroupName, + String namespaceName, + String eventHubName, + String consumerGroupName, + Context context) { + return getAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, context).block(); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the + * Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the consumer groups in a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByEventHubSinglePageAsync( + String resourceGroupName, String namespaceName, String eventHubName, Integer skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listByEventHub( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + skip, + top, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the + * Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the consumer groups in a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByEventHubSinglePageAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + Integer skip, + Integer top, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.")); + } + context = this.client.mergeContext(context); + return service + .listByEventHub( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + skip, + top, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the + * Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the consumer groups in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByEventHubAsync( + String resourceGroupName, String namespaceName, String eventHubName, Integer skip, Integer top) { + return new PagedFlux<>( + () -> listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName, skip, top), + nextLink -> listByEventHubNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the + * Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the consumer groups in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByEventHubAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + Integer skip, + Integer top, + Context context) { + return new PagedFlux<>( + () -> listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName, skip, top, context), + nextLink -> listByEventHubNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the + * Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 all the consumer groups in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByEventHubAsync( + String resourceGroupName, String namespaceName, String eventHubName) { + final Integer skip = null; + final Integer top = null; + final Context context = null; + return new PagedFlux<>( + () -> listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName, skip, top), + nextLink -> listByEventHubNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the + * Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the consumer groups in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEventHub( + String resourceGroupName, String namespaceName, String eventHubName, Integer skip, Integer top) { + return new PagedIterable<>(listByEventHubAsync(resourceGroupName, namespaceName, eventHubName, skip, top)); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the + * Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the consumer groups in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEventHub( + String resourceGroupName, + String namespaceName, + String eventHubName, + Integer skip, + Integer top, + Context context) { + return new PagedIterable<>( + listByEventHubAsync(resourceGroupName, namespaceName, eventHubName, skip, top, context)); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the + * Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 all the consumer groups in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEventHub( + String resourceGroupName, String namespaceName, String eventHubName) { + final Integer skip = null; + final Integer top = null; + final Context context = null; + return new PagedIterable<>(listByEventHubAsync(resourceGroupName, namespaceName, eventHubName, skip, top)); + } + + /** + * 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 the result to the List Consumer Group operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByEventHubNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listByEventHubNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the result to the List Consumer Group operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByEventHubNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listByEventHubNext(nextLink, 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-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java new file mode 100644 index 0000000000000..9a6f7bbce26f9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java @@ -0,0 +1,2212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.EventHubManagementClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.ArmDisasterRecoveryInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.ArmDisasterRecoveryListResultInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleListResultInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.CheckNameAvailabilityResultInner; +import com.azure.resourcemanager.eventhubs.models.CheckNameAvailabilityParameter; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DisasterRecoveryConfigs. */ +public final class DisasterRecoveryConfigsClient { + private final ClientLogger logger = new ClientLogger(DisasterRecoveryConfigsClient.class); + + /** The proxy service used to perform REST calls. */ + private final DisasterRecoveryConfigsService service; + + /** The service client containing this operation class. */ + private final EventHubManagementClient client; + + /** + * Initializes an instance of DisasterRecoveryConfigsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public DisasterRecoveryConfigsClient(EventHubManagementClient client) { + this.service = + RestProxy + .create(DisasterRecoveryConfigsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventHubManagementClientDisasterRecoveryConfigs to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") + private interface DisasterRecoveryConfigsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRules( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("alias") String alias, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("alias") String alias, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}" + + "/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("alias") String alias, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @BodyParam("application/json") CheckNameAvailabilityParameter parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/{alias}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("alias") String alias, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ArmDisasterRecoveryInner parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/{alias}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("alias") String alias, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/{alias}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("alias") String alias, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> breakPairing( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("alias") String alias, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/disasterRecoveryConfigs/{alias}/failover") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> failOver( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("alias") String alias, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, String alias) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, String alias, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, String alias) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, String alias, Context context) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, String alias) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, alias)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, String alias, Context context) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, alias, context)); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName, Context context) { + return getAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, alias, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName).block(); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName, Context context) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName, context) + .block(); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner listKeys( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + return listKeysAsync(resourceGroupName, namespaceName, alias, authorizationRuleName).block(); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner listKeys( + String resourceGroupName, String namespaceName, String alias, String authorizationRuleName, Context context) { + return listKeysAsync(resourceGroupName, namespaceName, alias, authorizationRuleName, context).block(); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkNameAvailabilityWithResponseAsync( + String resourceGroupName, String namespaceName, String name) { + 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 (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + CheckNameAvailabilityParameter parameters = new CheckNameAvailabilityParameter(); + parameters.withName(name); + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkNameAvailabilityWithResponseAsync( + String resourceGroupName, String namespaceName, String name, 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 (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + CheckNameAvailabilityParameter parameters = new CheckNameAvailabilityParameter(); + parameters.withName(name); + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + parameters, + context); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync( + String resourceGroupName, String namespaceName, String name) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, namespaceName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync( + String resourceGroupName, String namespaceName, String name, Context context) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, namespaceName, name, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResultInner checkNameAvailability( + String resourceGroupName, String namespaceName, String name) { + return checkNameAvailabilityAsync(resourceGroupName, namespaceName, name).block(); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResultInner checkNameAvailability( + String resourceGroupName, String namespaceName, String name, Context context) { + return checkNameAvailabilityAsync(resourceGroupName, namespaceName, name, context).block(); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all Alias(Disaster Recovery configurations). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all Alias(Disaster Recovery configurations). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all Alias(Disaster Recovery configurations). + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String namespaceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, namespaceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all Alias(Disaster Recovery configurations). + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync( + String resourceGroupName, String namespaceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all Alias(Disaster Recovery configurations). + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all Alias(Disaster Recovery configurations). + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String namespaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, namespaceName, context)); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param parameters Single item in List or Get Alias(Disaster Recovery configuration) 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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, ArmDisasterRecoveryInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param parameters Single item in List or Get Alias(Disaster Recovery configuration) operation. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String alias, + ArmDisasterRecoveryInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param parameters Single item in List or Get Alias(Disaster Recovery configuration) 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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String alias, ArmDisasterRecoveryInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, alias, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param parameters Single item in List or Get Alias(Disaster Recovery configuration) operation. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String alias, + ArmDisasterRecoveryInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, alias, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param parameters Single item in List or Get Alias(Disaster Recovery configuration) 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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArmDisasterRecoveryInner createOrUpdate( + String resourceGroupName, String namespaceName, String alias, ArmDisasterRecoveryInner parameters) { + return createOrUpdateAsync(resourceGroupName, namespaceName, alias, parameters).block(); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param parameters Single item in List or Get Alias(Disaster Recovery configuration) operation. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArmDisasterRecoveryInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String alias, + ArmDisasterRecoveryInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, alias, parameters, context).block(); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String alias) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, String alias) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, alias) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, String alias, Context context) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, alias, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String alias) { + deleteAsync(resourceGroupName, namespaceName, alias).block(); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String alias, Context context) { + deleteAsync(resourceGroupName, namespaceName, alias, context).block(); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String alias) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, String alias) { + return getWithResponseAsync(resourceGroupName, namespaceName, alias) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String namespaceName, String alias, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, alias, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArmDisasterRecoveryInner get(String resourceGroupName, String namespaceName, String alias) { + return getAsync(resourceGroupName, namespaceName, alias).block(); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArmDisasterRecoveryInner get(String resourceGroupName, String namespaceName, String alias, Context context) { + return getAsync(resourceGroupName, namespaceName, alias, context).block(); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> breakPairingWithResponseAsync( + String resourceGroupName, String namespaceName, String alias) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + return FluxUtil + .withContext( + context -> + service + .breakPairing( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> breakPairingWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + context = this.client.mergeContext(context); + return service + .breakPairing( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono breakPairingAsync(String resourceGroupName, String namespaceName, String alias) { + return breakPairingWithResponseAsync(resourceGroupName, namespaceName, alias) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono breakPairingAsync(String resourceGroupName, String namespaceName, String alias, Context context) { + return breakPairingWithResponseAsync(resourceGroupName, namespaceName, alias, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void breakPairing(String resourceGroupName, String namespaceName, String alias) { + breakPairingAsync(resourceGroupName, namespaceName, alias).block(); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void breakPairing(String resourceGroupName, String namespaceName, String alias, Context context) { + breakPairingAsync(resourceGroupName, namespaceName, alias, context).block(); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> failOverWithResponseAsync( + String resourceGroupName, String namespaceName, String alias) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + return FluxUtil + .withContext( + context -> + service + .failOver( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> failOverWithResponseAsync( + String resourceGroupName, String namespaceName, String alias, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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.")); + } + context = this.client.mergeContext(context); + return service + .failOver( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + alias, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono failOverAsync(String resourceGroupName, String namespaceName, String alias) { + return failOverWithResponseAsync(resourceGroupName, namespaceName, alias) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono failOverAsync(String resourceGroupName, String namespaceName, String alias, Context context) { + return failOverWithResponseAsync(resourceGroupName, namespaceName, alias, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void failOver(String resourceGroupName, String namespaceName, String alias) { + failOverAsync(resourceGroupName, namespaceName, alias).block(); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void failOver(String resourceGroupName, String namespaceName, String alias, Context context) { + failOverAsync(resourceGroupName, namespaceName, alias, context).block(); + } + + /** + * 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 the response from the List namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAuthorizationRulesNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response from the List namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRulesNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the result of the List Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the result of the List Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listNext(nextLink, 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-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java new file mode 100644 index 0000000000000..cacb2687bedf3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java @@ -0,0 +1,2505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.EventHubManagementClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleListResultInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.EventHubListResultInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.EventhubInner; +import com.azure.resourcemanager.eventhubs.models.AccessRights; +import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; +import java.util.List; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in EventHubs. */ +public final class EventHubsClient { + private final ClientLogger logger = new ClientLogger(EventHubsClient.class); + + /** The proxy service used to perform REST calls. */ + private final EventHubsService service; + + /** The service client containing this operation class. */ + private final EventHubManagementClient client; + + /** + * Initializes an instance of EventHubsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public EventHubsClient(EventHubManagementClient client) { + this.service = + RestProxy.create(EventHubsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventHubManagementClientEventHubs to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") + private interface EventHubsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/authorizationRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRules( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdateAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") AuthorizationRuleInner parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") RegenerateAccessKeyParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespace( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$skip") Integer skip, + @QueryParam("$top") Integer top, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") EventhubInner parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/eventhubs/{eventHubName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the authorization rules for an Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, String eventHubName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the authorization rules for an Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, String eventHubName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the authorization rules for an Event Hub. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, String eventHubName) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the authorization rules for an Event Hub. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, String eventHubName, Context context) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the authorization rules for an Event Hub. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, String eventHubName) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName)); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the authorization rules for an Event Hub. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, String eventHubName, Context context) { + return new PagedIterable<>( + listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName, context)); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule + * will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + List rights) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + AuthorizationRuleInner parameters = new AuthorizationRuleInner(); + parameters.withRights(rights); + return FluxUtil + .withContext( + context -> + service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule + * will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + List rights, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + AuthorizationRuleInner parameters = new AuthorizationRuleInner(); + parameters.withRights(rights); + context = this.client.mergeContext(context); + return service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule + * will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + List rights) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule + * will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + List rights, + Context context) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule + * will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + List rights) { + return createOrUpdateAuthorizationRuleAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights) + .block(); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule + * will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + List rights, + Context context) { + return createOrUpdateAuthorizationRuleAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights, context) + .block(); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for an Event Hub by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for an Event Hub by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for an Event Hub by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for an Event Hub by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + return getAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for an Event Hub by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).block(); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for an Event Hub by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner getAuthorizationRule( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, context) + .block(); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return deleteAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + return deleteAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).block(); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, context) + .block(); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the ACS and SAS connection strings for the Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the ACS and SAS connection strings for the Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the ACS and SAS connection strings for the Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the ACS and SAS connection strings for the Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the ACS and SAS connection strings for the Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner listKeys( + String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return listKeysAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).block(); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @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 the ACS and SAS connection strings for the Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner listKeys( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + Context context) { + return listKeysAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, context).block(); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters) { + return regenerateKeysWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters, + Context context) { + return regenerateKeysWithResponseAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters) { + return regenerateKeysAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters) + .block(); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String eventHubName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters, + Context context) { + return regenerateKeysAsync( + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters, context) + .block(); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the Event Hubs in a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, Integer skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listByNamespace( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + skip, + top, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the Event Hubs in a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, Integer skip, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .listByNamespace( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + skip, + top, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the Event Hubs in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, Integer skip, Integer top) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the Event Hubs in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, Integer skip, Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all the Event Hubs in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final Integer skip = null; + final Integer top = null; + final Context context = null; + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the Event Hubs in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, Integer skip, Integer top) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top)); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the Event Hubs in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, Integer skip, Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top, context)); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all the Event Hubs in a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final Integer skip = null; + final Integer top = null; + final Context context = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top)); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param parameters Single item in List or Get Event Hub 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 single item in List or Get Event Hub operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param parameters Single item in List or Get Event Hub operation. + * @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 single item in List or Get Event Hub operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + EventhubInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param parameters Single item in List or Get Event Hub 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 single item in List or Get Event Hub operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, eventHubName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param parameters Single item in List or Get Event Hub operation. + * @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 single item in List or Get Event Hub operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String eventHubName, + EventhubInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, eventHubName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param parameters Single item in List or Get Event Hub 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 single item in List or Get Event Hub operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventhubInner createOrUpdate( + String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { + return createOrUpdateAsync(resourceGroupName, namespaceName, eventHubName, parameters).block(); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param parameters Single item in List or Get Event Hub operation. + * @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 single item in List or Get Event Hub operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventhubInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String eventHubName, + EventhubInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, eventHubName, parameters, context).block(); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, String eventHubName) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, eventHubName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync( + String resourceGroupName, String namespaceName, String eventHubName, Context context) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, eventHubName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String eventHubName) { + deleteAsync(resourceGroupName, namespaceName, eventHubName).block(); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String eventHubName, Context context) { + deleteAsync(resourceGroupName, namespaceName, eventHubName, context).block(); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 an Event Hubs description for the specified Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 an Event Hubs description for the specified Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String eventHubName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.")); + } + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + eventHubName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 an Event Hubs description for the specified Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName) { + return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 an Event Hubs description for the specified Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String namespaceName, String eventHubName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 an Event Hubs description for the specified Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventhubInner get(String resourceGroupName, String namespaceName, String eventHubName) { + return getAsync(resourceGroupName, namespaceName, eventHubName).block(); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 an Event Hubs description for the specified Event Hub. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventhubInner get(String resourceGroupName, String namespaceName, String eventHubName, Context context) { + return getAsync(resourceGroupName, namespaceName, eventHubName, context).block(); + } + + /** + * 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 the response from the List namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAuthorizationRulesNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response from the List namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRulesNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the result of the List EventHubs operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByNamespaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listByNamespaceNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the result of the List EventHubs operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByNamespaceNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listByNamespaceNext(nextLink, 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-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java new file mode 100644 index 0000000000000..f313de4adc9c3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java @@ -0,0 +1,3767 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventhubs.EventHubManagementClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleListResultInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.CheckNameAvailabilityResultInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.EHNamespaceInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.EHNamespaceListResultInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.MessagingPlanInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.NetworkRuleSetInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.NetworkRuleSetListResultInner; +import com.azure.resourcemanager.eventhubs.models.AccessRights; +import com.azure.resourcemanager.eventhubs.models.CheckNameAvailabilityParameter; +import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import java.nio.ByteBuffer; +import java.util.List; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Namespaces. */ +public final class NamespacesClient + implements InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { + private final ClientLogger logger = new ClientLogger(NamespacesClient.class); + + /** The proxy service used to perform REST calls. */ + private final NamespacesService service; + + /** The service client containing this operation class. */ + private final EventHubManagementClient client; + + /** + * Initializes an instance of NamespacesClient. + * + * @param client the instance of the service client containing this operation class. + */ + public NamespacesClient(EventHubManagementClient client) { + this.service = + RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventHubManagementClientNamespaces to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") + private interface NamespacesService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/authorizationRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRules( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdateAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") AuthorizationRuleInner parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") RegenerateAccessKeyParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") CheckNameAvailabilityParameter parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub" + + "/namespaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") EHNamespaceInner parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") EHNamespaceInner parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/messagingplan") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMessagingPlan( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/networkRuleSets/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdateNetworkRuleSet( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") NetworkRuleSetInner parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/networkRuleSets/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getNetworkRuleSet( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces" + + "/{namespaceName}/networkRuleSets") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNetworkRuleSets( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNetworkRuleSetsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, Context context) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 authorization rules for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, Context context) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, context)); + } + + /** + * Creates or updates an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + AuthorizationRuleInner parameters = new AuthorizationRuleInner(); + parameters.withRights(rights); + return FluxUtil + .withContext( + context -> + service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + List rights, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + AuthorizationRuleInner parameters = new AuthorizationRuleInner(); + parameters.withRights(rights); + context = this.client.mergeContext(context); + return service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, authorizationRuleName, rights) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + List rights, + Context context) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, authorizationRuleName, rights, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner createOrUpdateAuthorizationRule( + String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { + return createOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName, rights) + .block(); + } + + /** + * Creates or updates an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 single item in a List or Get AuthorizationRule operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + List rights, + Context context) { + return createOrUpdateAuthorizationRuleAsync( + resourceGroupName, namespaceName, authorizationRuleName, rights, context) + .block(); + } + + /** + * Deletes an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return deleteAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return deleteAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, authorizationRuleName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName).block(); + } + + /** + * Deletes an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName, context).block(); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName).block(); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName, context).block(); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) { + return listKeysAsync(resourceGroupName, namespaceName, authorizationRuleName).block(); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner listKeys( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return listKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, context).block(); + } + + /** + * Regenerates the primary or secondary connection strings for the specified Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Regenerates the primary or secondary connection strings for the specified Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Regenerates the primary or secondary connection strings for the specified Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters) { + return regenerateKeysWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates the primary or secondary connection strings for the specified Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters, + Context context) { + return regenerateKeysWithResponseAsync( + resourceGroupName, namespaceName, authorizationRuleName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates the primary or secondary connection strings for the specified Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters) { + return regenerateKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).block(); + } + + /** + * Regenerates the primary or secondary connection strings for the specified Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs + * to be reset. + * @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 namespace/EventHub Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + RegenerateAccessKeyParameters parameters, + Context context) { + return regenerateKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters, context) + .block(); + } + + /** + * Check the give Namespace name availability. + * + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkNameAvailabilityWithResponseAsync(String name) { + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + CheckNameAvailabilityParameter parameters = new CheckNameAvailabilityParameter(); + parameters.withName(name); + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Check the give Namespace name availability. + * + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkNameAvailabilityWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + CheckNameAvailabilityParameter parameters = new CheckNameAvailabilityParameter(); + parameters.withName(name); + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Check the give Namespace name availability. + * + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync(String name) { + return checkNameAvailabilityWithResponseAsync(name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Check the give Namespace name availability. + * + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync(String name, Context context) { + return checkNameAvailabilityWithResponseAsync(name, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Check the give Namespace name availability. + * + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResultInner checkNameAvailability(String name) { + return checkNameAvailabilityAsync(name).block(); + } + + /** + * Check the give Namespace name availability. + * + * @param name Name to check the namespace name availability. + * @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 the Result of the CheckNameAvailability operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResultInner checkNameAvailability(String name, Context context) { + return checkNameAvailabilityAsync(name, context).block(); + } + + /** + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + 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.")); + } + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(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.")); + } + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists the available Namespaces within a resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Lists the available Namespaces within a resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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.")); + } + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists the available Namespaces within a resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists the available Namespaces within a resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the available Namespaces within a resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists the available Namespaces within a resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get 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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get Operation. + * @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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get 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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, EHNamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), EHNamespaceInner.class, EHNamespaceInner.class, Context.NONE); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get Operation. + * @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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, EHNamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), EHNamespaceInner.class, EHNamespaceInner.class, context); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get 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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, EHNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get Operation. + * @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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, EHNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get 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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get Operation. + * @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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get 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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EHNamespaceInner createOrUpdate( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return createOrUpdateAsync(resourceGroupName, namespaceName, parameters).block(); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get Operation. + * @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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EHNamespaceInner createOrUpdate( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).block(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName) { + return beginDeleteAsync(resourceGroupName, namespaceName).getSyncPoller(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, context).getSyncPoller(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName) { + return beginDeleteAsync(resourceGroupName, namespaceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName) { + deleteAsync(resourceGroupName, namespaceName).block(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, Context context) { + deleteAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * Gets the description of the specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the description of the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the description of the specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the description of the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets the description of the specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the description of the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the description of the specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the description of the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync( + String resourceGroupName, String namespaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the description of the specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the description of the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { + return getByResourceGroupAsync(resourceGroupName, namespaceName).block(); + } + + /** + * Gets the description of the specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 the description of the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName, Context context) { + return getByResourceGroupAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get 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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get Operation. + * @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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get 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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return updateWithResponseAsync(resourceGroupName, namespaceName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get Operation. + * @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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, namespaceName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get 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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return updateAsync(resourceGroupName, namespaceName, parameters).block(); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Single Namespace item in List or Get Operation. + * @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 single Namespace item in List or Get Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EHNamespaceInner update( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { + return updateAsync(resourceGroupName, namespaceName, parameters, context).block(); + } + + /** + * Gets messaging plan for specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 messaging plan for specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMessagingPlanWithResponseAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getMessagingPlan( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets messaging plan for specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 messaging plan for specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMessagingPlanWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .getMessagingPlan( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets messaging plan for specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 messaging plan for specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getMessagingPlanAsync(String resourceGroupName, String namespaceName) { + return getMessagingPlanWithResponseAsync(resourceGroupName, namespaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets messaging plan for specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 messaging plan for specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getMessagingPlanAsync( + String resourceGroupName, String namespaceName, Context context) { + return getMessagingPlanWithResponseAsync(resourceGroupName, namespaceName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets messaging plan for specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 messaging plan for specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MessagingPlanInner getMessagingPlan(String resourceGroupName, String namespaceName) { + return getMessagingPlanAsync(resourceGroupName, namespaceName).block(); + } + + /** + * Gets messaging plan for specified namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 messaging plan for specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MessagingPlanInner getMessagingPlan(String resourceGroupName, String namespaceName, Context context) { + return getMessagingPlanAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * Create or update NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Description of NetworkRuleSet 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 description of NetworkRuleSet resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateNetworkRuleSetWithResponseAsync( + String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdateNetworkRuleSet( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Create or update NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Description of NetworkRuleSet 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 description of NetworkRuleSet resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateNetworkRuleSetWithResponseAsync( + String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdateNetworkRuleSet( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Create or update NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Description of NetworkRuleSet 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 description of NetworkRuleSet resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateNetworkRuleSetAsync( + String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { + return createOrUpdateNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Description of NetworkRuleSet 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 description of NetworkRuleSet resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateNetworkRuleSetAsync( + String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters, Context context) { + return createOrUpdateNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Description of NetworkRuleSet 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 description of NetworkRuleSet resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkRuleSetInner createOrUpdateNetworkRuleSet( + String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { + return createOrUpdateNetworkRuleSetAsync(resourceGroupName, namespaceName, parameters).block(); + } + + /** + * Create or update NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Description of NetworkRuleSet 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 description of NetworkRuleSet resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkRuleSetInner createOrUpdateNetworkRuleSet( + String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters, Context context) { + return createOrUpdateNetworkRuleSetAsync(resourceGroupName, namespaceName, parameters, context).block(); + } + + /** + * Gets NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 networkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getNetworkRuleSetWithResponseAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getNetworkRuleSet( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 networkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getNetworkRuleSetWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .getNetworkRuleSet( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 networkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) { + return getNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 networkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getNetworkRuleSetAsync( + String resourceGroupName, String namespaceName, Context context) { + return getNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 networkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName) { + return getNetworkRuleSetAsync(resourceGroupName, namespaceName).block(); + } + + /** + * Gets NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 networkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName, Context context) { + return getNetworkRuleSetAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * Gets list of NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 list of NetworkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNetworkRuleSetsSinglePageAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listNetworkRuleSets( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets list of NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 list of NetworkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNetworkRuleSetsSinglePageAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .listNetworkRuleSets( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets list of NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 list of NetworkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listNetworkRuleSetsAsync(String resourceGroupName, String namespaceName) { + return new PagedFlux<>( + () -> listNetworkRuleSetsSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listNetworkRuleSetsNextSinglePageAsync(nextLink)); + } + + /** + * Gets list of NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 list of NetworkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listNetworkRuleSetsAsync( + String resourceGroupName, String namespaceName, Context context) { + return new PagedFlux<>( + () -> listNetworkRuleSetsSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listNetworkRuleSetsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets list of NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 list of NetworkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNetworkRuleSets(String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listNetworkRuleSetsAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets list of NetworkRuleSet for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 list of NetworkRuleSet for a Namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNetworkRuleSets( + String resourceGroupName, String namespaceName, Context context) { + return new PagedIterable<>(listNetworkRuleSetsAsync(resourceGroupName, namespaceName, context)); + } + + /** + * 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 the response from the List namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAuthorizationRulesNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response from the List namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRulesNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listByResourceGroupNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the response of the List NetworkRuleSet operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNetworkRuleSetsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listNetworkRuleSetsNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response of the List NetworkRuleSet operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNetworkRuleSetsNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listNetworkRuleSetsNext(nextLink, 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-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java new file mode 100644 index 0000000000000..28a017f772cbd --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.EventHubManagementClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.OperationInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.OperationListResultInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Operations. */ +public final class OperationsClient { + private final ClientLogger logger = new ClientLogger(OperationsClient.class); + + /** The proxy service used to perform REST calls. */ + private final OperationsService service; + + /** The service client containing this operation class. */ + private final EventHubManagementClient client; + + /** + * Initializes an instance of OperationsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public OperationsClient(EventHubManagementClient client) { + this.service = + RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventHubManagementClientOperations to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") + private interface OperationsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/providers/Microsoft.EventHub/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Lists all of the available Event Hub REST API operations. + * + * @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 result of the request to list Event Hub operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Lists all of the available Event Hub REST API operations. + * + * @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 result of the request to list Event Hub operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all of the available Event Hub REST API operations. + * + * @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 result of the request to list Event Hub operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the available Event Hub REST API operations. + * + * @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 result of the request to list Event Hub operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the available Event Hub REST API operations. + * + * @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 result of the request to list Event Hub operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all of the available Event Hub REST API operations. + * + * @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 result of the request to list Event Hub operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * 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 result of the request to list Event Hub operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 result of the request to list Event Hub operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listNext(nextLink, 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-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/RegionsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/RegionsClient.java new file mode 100644 index 0000000000000..2e67fcd05fe66 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/RegionsClient.java @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.EventHubManagementClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.MessagingRegionsInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.MessagingRegionsListResultInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Regions. */ +public final class RegionsClient { + private final ClientLogger logger = new ClientLogger(RegionsClient.class); + + /** The proxy service used to perform REST calls. */ + private final RegionsService service; + + /** The service client containing this operation class. */ + private final EventHubManagementClient client; + + /** + * Initializes an instance of RegionsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public RegionsClient(EventHubManagementClient client) { + this.service = RestProxy.create(RegionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventHubManagementClientRegions to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") + private interface RegionsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/sku/{sku}/regions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySku( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("sku") String sku, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySkuNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @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 the available Regions for a given sku. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBySkuSinglePageAsync(String sku) { + 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 (sku == null) { + return Mono.error(new IllegalArgumentException("Parameter sku is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .listBySku( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + sku, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @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 the available Regions for a given sku. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBySkuSinglePageAsync(String sku, 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 (sku == null) { + return Mono.error(new IllegalArgumentException("Parameter sku is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listBySku( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), sku, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @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 the available Regions for a given sku. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBySkuAsync(String sku) { + return new PagedFlux<>(() -> listBySkuSinglePageAsync(sku), nextLink -> listBySkuNextSinglePageAsync(nextLink)); + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @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 the available Regions for a given sku. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBySkuAsync(String sku, Context context) { + return new PagedFlux<>( + () -> listBySkuSinglePageAsync(sku, context), nextLink -> listBySkuNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @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 the available Regions for a given sku. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySku(String sku) { + return new PagedIterable<>(listBySkuAsync(sku)); + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @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 the available Regions for a given sku. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySku(String sku, Context context) { + return new PagedIterable<>(listBySkuAsync(sku, context)); + } + + /** + * 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 the response of the List MessagingRegions operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBySkuNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listBySkuNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response of the List MessagingRegions operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBySkuNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listBySkuNext(nextLink, 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-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AccessKeysInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AccessKeysInner.java new file mode 100644 index 0000000000000..190f59aa2fbee --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AccessKeysInner.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AccessKeys model. */ +@Immutable +public final class AccessKeysInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AccessKeysInner.class); + + /* + * Primary connection string of the created namespace AuthorizationRule. + */ + @JsonProperty(value = "primaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String primaryConnectionString; + + /* + * Secondary connection string of the created namespace AuthorizationRule. + */ + @JsonProperty(value = "secondaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryConnectionString; + + /* + * Primary connection string of the alias if GEO DR is enabled + */ + @JsonProperty(value = "aliasPrimaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String aliasPrimaryConnectionString; + + /* + * Secondary connection string of the alias if GEO DR is enabled + */ + @JsonProperty(value = "aliasSecondaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String aliasSecondaryConnectionString; + + /* + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String primaryKey; + + /* + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryKey; + + /* + * A string that describes the AuthorizationRule. + */ + @JsonProperty(value = "keyName", access = JsonProperty.Access.WRITE_ONLY) + private String keyName; + + /** + * Get the primaryConnectionString property: Primary connection string of the created namespace AuthorizationRule. + * + * @return the primaryConnectionString value. + */ + public String primaryConnectionString() { + return this.primaryConnectionString; + } + + /** + * Get the secondaryConnectionString property: Secondary connection string of the created namespace + * AuthorizationRule. + * + * @return the secondaryConnectionString value. + */ + public String secondaryConnectionString() { + return this.secondaryConnectionString; + } + + /** + * Get the aliasPrimaryConnectionString property: Primary connection string of the alias if GEO DR is enabled. + * + * @return the aliasPrimaryConnectionString value. + */ + public String aliasPrimaryConnectionString() { + return this.aliasPrimaryConnectionString; + } + + /** + * Get the aliasSecondaryConnectionString property: Secondary connection string of the alias if GEO DR is enabled. + * + * @return the aliasSecondaryConnectionString value. + */ + public String aliasSecondaryConnectionString() { + return this.aliasSecondaryConnectionString; + } + + /** + * Get the primaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the primaryKey value. + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Get the secondaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the secondaryKey value. + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Get the keyName property: A string that describes the AuthorizationRule. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ArmDisasterRecoveryInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ArmDisasterRecoveryInner.java new file mode 100644 index 0000000000000..53670509a5cfb --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ArmDisasterRecoveryInner.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.models.ProvisioningStateDR; +import com.azure.resourcemanager.eventhubs.models.RoleDisasterRecovery; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ArmDisasterRecovery model. */ +@JsonFlatten +@Fluent +public class ArmDisasterRecoveryInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmDisasterRecoveryInner.class); + + /* + * Provisioning state of the Alias(Disaster Recovery configuration) - + * possible values 'Accepted' or 'Succeeded' or 'Failed' + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningStateDR provisioningState; + + /* + * ARM Id of the Primary/Secondary eventhub namespace name, which is part + * of GEO DR pairing + */ + @JsonProperty(value = "properties.partnerNamespace") + private String partnerNamespace; + + /* + * Alternate name specified when alias and namespace names are same. + */ + @JsonProperty(value = "properties.alternateName") + private String alternateName; + + /* + * role of namespace in GEO DR - possible values 'Primary' or + * 'PrimaryNotReplicating' or 'Secondary' + */ + @JsonProperty(value = "properties.role", access = JsonProperty.Access.WRITE_ONLY) + private RoleDisasterRecovery role; + + /* + * Number of entities pending to be replicated. + */ + @JsonProperty(value = "properties.pendingReplicationOperationsCount", access = JsonProperty.Access.WRITE_ONLY) + private Long pendingReplicationOperationsCount; + + /** + * Get the provisioningState property: Provisioning state of the Alias(Disaster Recovery configuration) - possible + * values 'Accepted' or 'Succeeded' or 'Failed'. + * + * @return the provisioningState value. + */ + public ProvisioningStateDR provisioningState() { + return this.provisioningState; + } + + /** + * Get the partnerNamespace property: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO + * DR pairing. + * + * @return the partnerNamespace value. + */ + public String partnerNamespace() { + return this.partnerNamespace; + } + + /** + * Set the partnerNamespace property: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO + * DR pairing. + * + * @param partnerNamespace the partnerNamespace value to set. + * @return the ArmDisasterRecoveryInner object itself. + */ + public ArmDisasterRecoveryInner withPartnerNamespace(String partnerNamespace) { + this.partnerNamespace = partnerNamespace; + return this; + } + + /** + * Get the alternateName property: Alternate name specified when alias and namespace names are same. + * + * @return the alternateName value. + */ + public String alternateName() { + return this.alternateName; + } + + /** + * Set the alternateName property: Alternate name specified when alias and namespace names are same. + * + * @param alternateName the alternateName value to set. + * @return the ArmDisasterRecoveryInner object itself. + */ + public ArmDisasterRecoveryInner withAlternateName(String alternateName) { + this.alternateName = alternateName; + return this; + } + + /** + * Get the role property: role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or + * 'Secondary'. + * + * @return the role value. + */ + public RoleDisasterRecovery role() { + return this.role; + } + + /** + * Get the pendingReplicationOperationsCount property: Number of entities pending to be replicated. + * + * @return the pendingReplicationOperationsCount value. + */ + public Long pendingReplicationOperationsCount() { + return this.pendingReplicationOperationsCount; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ArmDisasterRecoveryListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ArmDisasterRecoveryListResultInner.java new file mode 100644 index 0000000000000..8c3af6303af0f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ArmDisasterRecoveryListResultInner.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +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; + +/** The ArmDisasterRecoveryListResult model. */ +@Fluent +public final class ArmDisasterRecoveryListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmDisasterRecoveryListResultInner.class); + + /* + * List of Alias(Disaster Recovery configurations) + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of Alias(Disaster Recovery configuration) + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: List of Alias(Disaster Recovery configurations). + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of Alias(Disaster Recovery configurations). + * + * @param value the value value to set. + * @return the ArmDisasterRecoveryListResultInner object itself. + */ + public ArmDisasterRecoveryListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Alias(Disaster Recovery configuration). + * + * @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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AuthorizationRuleInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AuthorizationRuleInner.java new file mode 100644 index 0000000000000..f371d5a0ac8b4 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AuthorizationRuleInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.models.AccessRights; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The AuthorizationRule model. */ +@JsonFlatten +@Fluent +public class AuthorizationRuleInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthorizationRuleInner.class); + + /* + * The rights associated with the rule. + */ + @JsonProperty(value = "properties.rights") + private List rights; + + /** + * Get the rights property: The rights associated with the rule. + * + * @return the rights value. + */ + public List rights() { + return this.rights; + } + + /** + * Set the rights property: The rights associated with the rule. + * + * @param rights the rights value to set. + * @return the AuthorizationRuleInner object itself. + */ + public AuthorizationRuleInner withRights(List rights) { + this.rights = rights; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AuthorizationRuleListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AuthorizationRuleListResultInner.java new file mode 100644 index 0000000000000..3164566b98f5c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/AuthorizationRuleListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +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; + +/** The AuthorizationRuleListResult model. */ +@Fluent +public final class AuthorizationRuleListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthorizationRuleListResultInner.class); + + /* + * Result of the List Authorization Rules operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains an + * incomplete list of Authorization Rules + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List Authorization Rules operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List Authorization Rules operation. + * + * @param value the value value to set. + * @return the AuthorizationRuleListResultInner object itself. + */ + public AuthorizationRuleListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains an incomplete list of + * Authorization Rules. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains an incomplete list of + * Authorization Rules. + * + * @param nextLink the nextLink value to set. + * @return the AuthorizationRuleListResultInner object itself. + */ + public AuthorizationRuleListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/CheckNameAvailabilityResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/CheckNameAvailabilityResultInner.java new file mode 100644 index 0000000000000..34e7fc6e46670 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/CheckNameAvailabilityResultInner.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.models.UnavailableReason; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CheckNameAvailabilityResult model. */ +@Fluent +public final class CheckNameAvailabilityResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityResultInner.class); + + /* + * The detailed info regarding the reason associated with the Namespace. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * Value indicating Namespace is availability, true if the Namespace is + * available; otherwise, false. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /* + * The reason for unavailability of a Namespace. + */ + @JsonProperty(value = "reason") + private UnavailableReason reason; + + /** + * Get the message property: The detailed info regarding the reason associated with the Namespace. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the nameAvailable property: Value indicating Namespace is availability, true if the Namespace is available; + * otherwise, false. + * + * @return the nameAvailable value. + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set the nameAvailable property: Value indicating Namespace is availability, true if the Namespace is available; + * otherwise, false. + * + * @param nameAvailable the nameAvailable value to set. + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason property: The reason for unavailability of a Namespace. + * + * @return the reason value. + */ + public UnavailableReason reason() { + return this.reason; + } + + /** + * Set the reason property: The reason for unavailability of a Namespace. + * + * @param reason the reason value to set. + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withReason(UnavailableReason reason) { + this.reason = reason; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ConsumerGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ConsumerGroupInner.java new file mode 100644 index 0000000000000..d24b98b216b1e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ConsumerGroupInner.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The ConsumerGroup model. */ +@JsonFlatten +@Fluent +public class ConsumerGroupInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ConsumerGroupInner.class); + + /* + * Exact time the message was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * User Metadata is a placeholder to store user-defined string data with + * maximum length 1024. e.g. it can be used to store descriptive data, such + * as list of teams and their contact information also user-defined + * configuration settings can be stored. + */ + @JsonProperty(value = "properties.userMetadata") + private String userMetadata; + + /** + * Get the createdAt property: Exact time the message was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the updatedAt property: The exact time the message was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the userMetadata property: User Metadata is a placeholder to store user-defined string data with maximum + * length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information + * also user-defined configuration settings can be stored. + * + * @return the userMetadata value. + */ + public String userMetadata() { + return this.userMetadata; + } + + /** + * Set the userMetadata property: User Metadata is a placeholder to store user-defined string data with maximum + * length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information + * also user-defined configuration settings can be stored. + * + * @param userMetadata the userMetadata value to set. + * @return the ConsumerGroupInner object itself. + */ + public ConsumerGroupInner withUserMetadata(String userMetadata) { + this.userMetadata = userMetadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ConsumerGroupListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ConsumerGroupListResultInner.java new file mode 100644 index 0000000000000..4829b08ac1590 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/ConsumerGroupListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +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; + +/** The ConsumerGroupListResult model. */ +@Fluent +public final class ConsumerGroupListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ConsumerGroupListResultInner.class); + + /* + * Result of the List Consumer Group operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of Consumer Group + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List Consumer Group operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List Consumer Group operation. + * + * @param value the value value to set. + * @return the ConsumerGroupListResultInner object itself. + */ + public ConsumerGroupListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Consumer Group. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Consumer Group. + * + * @param nextLink the nextLink value to set. + * @return the ConsumerGroupListResultInner object itself. + */ + public ConsumerGroupListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EHNamespaceInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EHNamespaceInner.java new file mode 100644 index 0000000000000..27a5af5043c85 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EHNamespaceInner.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.models.Sku; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The EHNamespace model. */ +@JsonFlatten +@Fluent +public class EHNamespaceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EHNamespaceInner.class); + + /* + * Properties of sku resource + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * Provisioning state of the Namespace. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The time the Namespace was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The time the Namespace was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * Endpoint you can use to perform Service Bus operations. + */ + @JsonProperty(value = "properties.serviceBusEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String serviceBusEndpoint; + + /* + * Identifier for Azure Insights metrics. + */ + @JsonProperty(value = "properties.metricId", access = JsonProperty.Access.WRITE_ONLY) + private String metricId; + + /* + * Value that indicates whether AutoInflate is enabled for eventhub + * namespace. + */ + @JsonProperty(value = "properties.isAutoInflateEnabled") + private Boolean isAutoInflateEnabled; + + /* + * Upper limit of throughput units when AutoInflate is enabled, value + * should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = + * true) + */ + @JsonProperty(value = "properties.maximumThroughputUnits") + private Integer maximumThroughputUnits; + + /* + * Value that indicates whether Kafka is enabled for eventhub namespace. + */ + @JsonProperty(value = "properties.kafkaEnabled") + private Boolean kafkaEnabled; + + /** + * Get the sku property: Properties of sku resource. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Properties of sku resource. + * + * @param sku the sku value to set. + * @return the EHNamespaceInner object itself. + */ + public EHNamespaceInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Namespace. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the createdAt property: The time the Namespace was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the updatedAt property: The time the Namespace was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the serviceBusEndpoint property: Endpoint you can use to perform Service Bus operations. + * + * @return the serviceBusEndpoint value. + */ + public String serviceBusEndpoint() { + return this.serviceBusEndpoint; + } + + /** + * Get the metricId property: Identifier for Azure Insights metrics. + * + * @return the metricId value. + */ + public String metricId() { + return this.metricId; + } + + /** + * Get the isAutoInflateEnabled property: Value that indicates whether AutoInflate is enabled for eventhub + * namespace. + * + * @return the isAutoInflateEnabled value. + */ + public Boolean isAutoInflateEnabled() { + return this.isAutoInflateEnabled; + } + + /** + * Set the isAutoInflateEnabled property: Value that indicates whether AutoInflate is enabled for eventhub + * namespace. + * + * @param isAutoInflateEnabled the isAutoInflateEnabled value to set. + * @return the EHNamespaceInner object itself. + */ + public EHNamespaceInner withIsAutoInflateEnabled(Boolean isAutoInflateEnabled) { + this.isAutoInflateEnabled = isAutoInflateEnabled; + return this; + } + + /** + * Get the maximumThroughputUnits property: Upper limit of throughput units when AutoInflate is enabled, value + * should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). + * + * @return the maximumThroughputUnits value. + */ + public Integer maximumThroughputUnits() { + return this.maximumThroughputUnits; + } + + /** + * Set the maximumThroughputUnits property: Upper limit of throughput units when AutoInflate is enabled, value + * should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). + * + * @param maximumThroughputUnits the maximumThroughputUnits value to set. + * @return the EHNamespaceInner object itself. + */ + public EHNamespaceInner withMaximumThroughputUnits(Integer maximumThroughputUnits) { + this.maximumThroughputUnits = maximumThroughputUnits; + return this; + } + + /** + * Get the kafkaEnabled property: Value that indicates whether Kafka is enabled for eventhub namespace. + * + * @return the kafkaEnabled value. + */ + public Boolean kafkaEnabled() { + return this.kafkaEnabled; + } + + /** + * Set the kafkaEnabled property: Value that indicates whether Kafka is enabled for eventhub namespace. + * + * @param kafkaEnabled the kafkaEnabled value to set. + * @return the EHNamespaceInner object itself. + */ + public EHNamespaceInner withKafkaEnabled(Boolean kafkaEnabled) { + this.kafkaEnabled = kafkaEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EHNamespaceListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EHNamespaceListResultInner.java new file mode 100644 index 0000000000000..0c3c5aab87b09 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EHNamespaceListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +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; + +/** The EHNamespaceListResult model. */ +@Fluent +public final class EHNamespaceListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EHNamespaceListResultInner.class); + + /* + * Result of the List Namespace operation + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of namespaces. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List Namespace operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List Namespace operation. + * + * @param value the value value to set. + * @return the EHNamespaceListResultInner object itself. + */ + public EHNamespaceListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * namespaces. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * namespaces. + * + * @param nextLink the nextLink value to set. + * @return the EHNamespaceListResultInner object itself. + */ + public EHNamespaceListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EventHubListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EventHubListResultInner.java new file mode 100644 index 0000000000000..df7d5ee6e048d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EventHubListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +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; + +/** The EventHubListResult model. */ +@Fluent +public final class EventHubListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubListResultInner.class); + + /* + * Result of the List EventHubs operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of EventHubs. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List EventHubs operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List EventHubs operation. + * + * @param value the value value to set. + * @return the EventHubListResultInner object itself. + */ + public EventHubListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * EventHubs. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * EventHubs. + * + * @param nextLink the nextLink value to set. + * @return the EventHubListResultInner object itself. + */ + public EventHubListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EventhubInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EventhubInner.java new file mode 100644 index 0000000000000..20662e38dbc54 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/EventhubInner.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.models.CaptureDescription; +import com.azure.resourcemanager.eventhubs.models.EntityStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The Eventhub model. */ +@JsonFlatten +@Fluent +public class EventhubInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EventhubInner.class); + + /* + * Current number of shards on the Event Hub. + */ + @JsonProperty(value = "properties.partitionIds", access = JsonProperty.Access.WRITE_ONLY) + private List partitionIds; + + /* + * Exact time the Event Hub was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * Number of days to retain the events for this Event Hub, value should be + * 1 to 7 days + */ + @JsonProperty(value = "properties.messageRetentionInDays") + private Long messageRetentionInDays; + + /* + * Number of partitions created for the Event Hub, allowed values are from + * 1 to 32 partitions. + */ + @JsonProperty(value = "properties.partitionCount") + private Long partitionCount; + + /* + * Enumerates the possible values for the status of the Event Hub. + */ + @JsonProperty(value = "properties.status") + private EntityStatus status; + + /* + * Properties of capture description + */ + @JsonProperty(value = "properties.captureDescription") + private CaptureDescription captureDescription; + + /** + * Get the partitionIds property: Current number of shards on the Event Hub. + * + * @return the partitionIds value. + */ + public List partitionIds() { + return this.partitionIds; + } + + /** + * Get the createdAt property: Exact time the Event Hub was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the updatedAt property: The exact time the message was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the messageRetentionInDays property: Number of days to retain the events for this Event Hub, value should be + * 1 to 7 days. + * + * @return the messageRetentionInDays value. + */ + public Long messageRetentionInDays() { + return this.messageRetentionInDays; + } + + /** + * Set the messageRetentionInDays property: Number of days to retain the events for this Event Hub, value should be + * 1 to 7 days. + * + * @param messageRetentionInDays the messageRetentionInDays value to set. + * @return the EventhubInner object itself. + */ + public EventhubInner withMessageRetentionInDays(Long messageRetentionInDays) { + this.messageRetentionInDays = messageRetentionInDays; + return this; + } + + /** + * Get the partitionCount property: Number of partitions created for the Event Hub, allowed values are from 1 to 32 + * partitions. + * + * @return the partitionCount value. + */ + public Long partitionCount() { + return this.partitionCount; + } + + /** + * Set the partitionCount property: Number of partitions created for the Event Hub, allowed values are from 1 to 32 + * partitions. + * + * @param partitionCount the partitionCount value to set. + * @return the EventhubInner object itself. + */ + public EventhubInner withPartitionCount(Long partitionCount) { + this.partitionCount = partitionCount; + return this; + } + + /** + * Get the status property: Enumerates the possible values for the status of the Event Hub. + * + * @return the status value. + */ + public EntityStatus status() { + return this.status; + } + + /** + * Set the status property: Enumerates the possible values for the status of the Event Hub. + * + * @param status the status value to set. + * @return the EventhubInner object itself. + */ + public EventhubInner withStatus(EntityStatus status) { + this.status = status; + return this; + } + + /** + * Get the captureDescription property: Properties of capture description. + * + * @return the captureDescription value. + */ + public CaptureDescription captureDescription() { + return this.captureDescription; + } + + /** + * Set the captureDescription property: Properties of capture description. + * + * @param captureDescription the captureDescription value to set. + * @return the EventhubInner object itself. + */ + public EventhubInner withCaptureDescription(CaptureDescription captureDescription) { + this.captureDescription = captureDescription; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (captureDescription() != null) { + captureDescription().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingPlanInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingPlanInner.java new file mode 100644 index 0000000000000..1e47593043f2e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingPlanInner.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The MessagingPlan model. */ +@JsonFlatten +@Immutable +public class MessagingPlanInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MessagingPlanInner.class); + + /* + * Sku type + */ + @JsonProperty(value = "properties.sku", access = JsonProperty.Access.WRITE_ONLY) + private Integer sku; + + /* + * Selected event hub unit + */ + @JsonProperty(value = "properties.selectedEventHubUnit", access = JsonProperty.Access.WRITE_ONLY) + private Integer selectedEventHubUnit; + + /* + * The exact time the messaging plan was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * revision number + */ + @JsonProperty(value = "properties.revision", access = JsonProperty.Access.WRITE_ONLY) + private Long revision; + + /** + * Get the sku property: Sku type. + * + * @return the sku value. + */ + public Integer sku() { + return this.sku; + } + + /** + * Get the selectedEventHubUnit property: Selected event hub unit. + * + * @return the selectedEventHubUnit value. + */ + public Integer selectedEventHubUnit() { + return this.selectedEventHubUnit; + } + + /** + * Get the updatedAt property: The exact time the messaging plan was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the revision property: revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.revision; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingRegionsInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingRegionsInner.java new file mode 100644 index 0000000000000..97262bbcb559e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingRegionsInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.models.MessagingRegionsProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MessagingRegions model. */ +@Fluent +public final class MessagingRegionsInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MessagingRegionsInner.class); + + /* + * Properties of Messaging Region + */ + @JsonProperty(value = "properties") + private MessagingRegionsProperties properties; + + /** + * Get the properties property: Properties of Messaging Region. + * + * @return the properties value. + */ + public MessagingRegionsProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of Messaging Region. + * + * @param properties the properties value to set. + * @return the MessagingRegionsInner object itself. + */ + public MessagingRegionsInner withProperties(MessagingRegionsProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingRegionsListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingRegionsListResultInner.java new file mode 100644 index 0000000000000..75ad6db743ad0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/MessagingRegionsListResultInner.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +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; + +/** The MessagingRegionsListResult model. */ +@Fluent +public final class MessagingRegionsListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MessagingRegionsListResultInner.class); + + /* + * Result of the List MessagingRegions type. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of MessagingRegions. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: Result of the List MessagingRegions type. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List MessagingRegions type. + * + * @param value the value value to set. + * @return the MessagingRegionsListResultInner object itself. + */ + public MessagingRegionsListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * MessagingRegions. + * + * @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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/NetworkRuleSetInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/NetworkRuleSetInner.java new file mode 100644 index 0000000000000..cc2d1199dc34c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/NetworkRuleSetInner.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.models.DefaultAction; +import com.azure.resourcemanager.eventhubs.models.NWRuleSetIpRules; +import com.azure.resourcemanager.eventhubs.models.NWRuleSetVirtualNetworkRules; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The NetworkRuleSet model. */ +@JsonFlatten +@Fluent +public class NetworkRuleSetInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkRuleSetInner.class); + + /* + * Default Action for Network Rule Set + */ + @JsonProperty(value = "properties.defaultAction") + private DefaultAction defaultAction; + + /* + * List VirtualNetwork Rules + */ + @JsonProperty(value = "properties.virtualNetworkRules") + private List virtualNetworkRules; + + /* + * List of IpRules + */ + @JsonProperty(value = "properties.ipRules") + private List ipRules; + + /** + * Get the defaultAction property: Default Action for Network Rule Set. + * + * @return the defaultAction value. + */ + public DefaultAction defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: Default Action for Network Rule Set. + * + * @param defaultAction the defaultAction value to set. + * @return the NetworkRuleSetInner object itself. + */ + public NetworkRuleSetInner withDefaultAction(DefaultAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get the virtualNetworkRules property: List VirtualNetwork Rules. + * + * @return the virtualNetworkRules value. + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Set the virtualNetworkRules property: List VirtualNetwork Rules. + * + * @param virtualNetworkRules the virtualNetworkRules value to set. + * @return the NetworkRuleSetInner object itself. + */ + public NetworkRuleSetInner withVirtualNetworkRules(List virtualNetworkRules) { + this.virtualNetworkRules = virtualNetworkRules; + return this; + } + + /** + * Get the ipRules property: List of IpRules. + * + * @return the ipRules value. + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set the ipRules property: List of IpRules. + * + * @param ipRules the ipRules value to set. + * @return the NetworkRuleSetInner object itself. + */ + public NetworkRuleSetInner withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualNetworkRules() != null) { + virtualNetworkRules().forEach(e -> e.validate()); + } + if (ipRules() != null) { + ipRules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/NetworkRuleSetListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/NetworkRuleSetListResultInner.java new file mode 100644 index 0000000000000..e2c6a96bb3839 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/NetworkRuleSetListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +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; + +/** The NetworkRuleSetListResult model. */ +@Fluent +public final class NetworkRuleSetListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkRuleSetListResultInner.class); + + /* + * Result of the List NetworkRuleSet operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of NetworkRuleSet. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List NetworkRuleSet operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List NetworkRuleSet operation. + * + * @param value the value value to set. + * @return the NetworkRuleSetListResultInner object itself. + */ + public NetworkRuleSetListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * NetworkRuleSet. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * NetworkRuleSet. + * + * @param nextLink the nextLink value to set. + * @return the NetworkRuleSetListResultInner object itself. + */ + public NetworkRuleSetListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/OperationInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/OperationInner.java new file mode 100644 index 0000000000000..3a1dcec6d24e7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/OperationInner.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.models.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Operation model. */ +@Fluent +public final class OperationInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); + + /* + * Operation name: {provider}/{resource}/{operation} + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The object that represents the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Get the name property: Operation name: {provider}/{resource}/{operation}. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the display property: The object that represents the operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: The object that represents the operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/OperationListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/OperationListResultInner.java new file mode 100644 index 0000000000000..2d8b1a1ddf7cf --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/OperationListResultInner.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.fluent.inner; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The OperationListResult model. */ +@Immutable +public final class OperationListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class); + + /* + * List of Event Hub operations supported by the Microsoft.EventHub + * resource provider. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results if there are any. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: List of Event Hub operations supported by the Microsoft.EventHub resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results if there are any. + * + * @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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/package-info.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/package-info.java new file mode 100644 index 0000000000000..cd4cc0a96d5e3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/inner/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the inner classes for EventHubManagementClient. Azure Event Hubs client. */ +package com.azure.resourcemanager.eventhubs.fluent.inner; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java new file mode 100644 index 0000000000000..27a28c361d770 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the client classes for EventHubManagementClient. Azure Event Hubs client. */ +package com.azure.resourcemanager.eventhubs.fluent; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/Ancestors.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/Ancestors.java new file mode 100644 index 0000000000000..44592e3674d8c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/Ancestors.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; + +import java.util.Objects; + +class Ancestors { + + class OneAncestor { + private final String resourceGroupName; + private final String ancestor1Name; + + OneAncestor(String resourceGroupName, String ancestor1Name) { + this.resourceGroupName = Objects.requireNonNull(resourceGroupName); + this.ancestor1Name = Objects.requireNonNull(ancestor1Name); + } + + OneAncestor(ResourceId resourceId) { + Objects.requireNonNull(resourceId); + Objects.requireNonNull(resourceId.parent()); + + this.resourceGroupName = Objects.requireNonNull(resourceId.resourceGroupName()); + this.ancestor1Name = Objects.requireNonNull(resourceId.parent().name()); + } + + OneAncestor(String resourceId) { + this(ResourceId.fromString(Objects.requireNonNull(resourceId))); + } + + public String resourceGroupName() { + return this.resourceGroupName; + } + + public String ancestor1Name() { + return this.ancestor1Name; + } + } + + class TwoAncestor extends OneAncestor { + private final String ancestor2Name; + + TwoAncestor(String resourceGroupName, String ancestor1Name, String ancestor2Name) { + super(resourceGroupName, ancestor1Name); + this.ancestor2Name = Objects.requireNonNull(ancestor2Name); + } + + TwoAncestor(ResourceId resourceId) { + super(resourceId); + Objects.requireNonNull(resourceId.parent().parent()); + + this.ancestor2Name = Objects.requireNonNull(resourceId.parent().parent().name()); + } + + TwoAncestor(String resourceId) { + this(ResourceId.fromString(Objects.requireNonNull(resourceId))); + } + + public String ancestor2Name() { + return this.ancestor2Name; + } + } + + class ThreeAncestor extends TwoAncestor { + private final String ancestor3Name; + + ThreeAncestor(String resourceGroupName, String ancestor1Name, String ancestor2Name, String ancestor3Name) { + super(resourceGroupName, ancestor1Name, ancestor2Name); + + this.ancestor3Name = Objects.requireNonNull(ancestor3Name); + } + + ThreeAncestor(ResourceId resourceId) { + super(resourceId); + Objects.requireNonNull(resourceId.parent().parent().parent()); + + this.ancestor3Name = Objects.requireNonNull(resourceId.parent().parent().parent().name()); + } + + ThreeAncestor(String resourceId) { + this(ResourceId.fromString(Objects.requireNonNull(resourceId))); + } + + public String ancestor3Name() { + return this.ancestor3Name; + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/AuthorizationRuleBaseImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/AuthorizationRuleBaseImpl.java new file mode 100644 index 0000000000000..08e57a60c7430 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/AuthorizationRuleBaseImpl.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.models.AccessRights; +import com.azure.resourcemanager.eventhubs.models.AuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationKey; +import com.azure.resourcemanager.eventhubs.models.KeyType; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.IndexableRefreshableWrapperImpl; +import reactor.core.publisher.Mono; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Base implementation for authorization rule. + * (Internal use only) + * + * @param rule fluent model + * @param implementation of rule fluent model + */ +abstract class AuthorizationRuleBaseImpl, + RuleImpl extends IndexableRefreshableWrapperImpl> + extends NestedResourceImpl implements AuthorizationRule { + + protected AuthorizationRuleBaseImpl(String name, AuthorizationRuleInner inner, EventHubsManager manager) { + super(name, inner, manager); + } + + @Override + public Mono getKeysAsync() { + return this.getKeysInnerAsync() + .map(EventHubAuthorizationKeyImpl::new); + } + + @Override + public EventHubAuthorizationKey getKeys() { + return getKeysAsync().block(); + } + + @Override + public Mono regenerateKeyAsync(KeyType keyType) { + return this.regenerateKeysInnerAsync(keyType) + .map(EventHubAuthorizationKeyImpl::new); + } + + @Override + public EventHubAuthorizationKey regenerateKey(KeyType keyType) { + return regenerateKeyAsync(keyType).block(); + } + + @Override + public List rights() { + if (this.inner().rights() == null) { + return Collections.unmodifiableList(new ArrayList<>()); + } + return Collections.unmodifiableList(this.inner().rights()); + } + + + @SuppressWarnings("unchecked") + public RuleImpl withListenAccess() { + if (this.inner().rights() == null) { + this.inner().withRights(new ArrayList<>()); + } + if (!this.inner().rights().contains(AccessRights.LISTEN)) { + this.inner().rights().add(AccessRights.LISTEN); + } + return (RuleImpl) this; + } + + @SuppressWarnings("unchecked") + public RuleImpl withSendAccess() { + if (this.inner().rights() == null) { + this.inner().withRights(new ArrayList<>()); + } + if (!this.inner().rights().contains(AccessRights.SEND)) { + this.inner().rights().add(AccessRights.SEND); + } + return (RuleImpl) this; + } + + @SuppressWarnings("unchecked") + public RuleImpl withSendAndListenAccess() { + withListenAccess(); + withSendAccess(); + return (RuleImpl) this; + } + + @SuppressWarnings("unchecked") + public RuleImpl withManageAccess() { + withListenAccess(); + withSendAccess(); + if (!this.inner().rights().contains(AccessRights.MANAGE)) { + this.inner().rights().add(AccessRights.MANAGE); + } + return (RuleImpl) this; + } + + protected abstract Mono getKeysInnerAsync(); + protected abstract Mono regenerateKeysInnerAsync(KeyType keyType); + protected abstract Mono getInnerAsync(); + public abstract Mono createResourceAsync(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/AuthorizationRulesBaseImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/AuthorizationRulesBaseImpl.java new file mode 100644 index 0000000000000..b2c639f4edf1b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/AuthorizationRulesBaseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import reactor.core.publisher.Mono; + +abstract class AuthorizationRulesBaseImpl + extends WrapperImpl + implements HasManager, + SupportsGettingById, + SupportsDeletingById { + + protected final EventHubsManager manager; + + protected AuthorizationRulesBaseImpl(EventHubsManager manager, InnerT inner) { + super(inner); + this.manager = manager; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public RuleT getById(String id) { + return getByIdAsync(id).block(); + } + + @Override + public void deleteById(String id) { + deleteByIdAsync(id).block(); + } + + protected abstract RuleImpl wrapModel(AuthorizationRuleInner innerModel); + public abstract Mono getByIdAsync(String id); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationKeyImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationKeyImpl.java new file mode 100644 index 0000000000000..07679136d962b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationKeyImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationKey; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; + +/** + * Implementation for {@link DisasterRecoveryPairingAuthorizationKey}. + */ +class DisasterRecoveryPairingAuthorizationKeyImpl + extends WrapperImpl + implements DisasterRecoveryPairingAuthorizationKey { + + DisasterRecoveryPairingAuthorizationKeyImpl(AccessKeysInner inner) { + super(inner); + } + + @Override + public String primaryKey() { + return this.inner().primaryKey(); + } + + @Override + public String secondaryKey() { + return this.inner().secondaryKey(); + } + + @Override + public String primaryConnectionString() { + return this.inner().primaryConnectionString(); + } + + @Override + public String secondaryConnectionString() { + return this.inner().secondaryConnectionString(); + } + + @Override + public String aliasPrimaryConnectionString() { + return this.inner().aliasPrimaryConnectionString(); + } + + @Override + public String aliasSecondaryConnectionString() { + return this.inner().aliasSecondaryConnectionString(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationRuleImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..fca87760e36f3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationRuleImpl.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.models.AccessRights; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationKey; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRule; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Objects; + +/** + * Implementation for {@link DisasterRecoveryPairingAuthorizationRule}. + */ +class DisasterRecoveryPairingAuthorizationRuleImpl + extends WrapperImpl + implements DisasterRecoveryPairingAuthorizationRule { + + private final EventHubsManager manager; + private final Ancestors.TwoAncestor ancestor; + + protected DisasterRecoveryPairingAuthorizationRuleImpl(AuthorizationRuleInner inner, EventHubsManager manager) { + super(inner); + this.manager = manager; + this.ancestor = new Ancestors().new TwoAncestor(inner.id()); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List rights() { + return this.inner().rights(); + } + + @Override + public Mono getKeysAsync() { + return this.manager.inner().getDisasterRecoveryConfigs() + .listKeysAsync(this.ancestor().resourceGroupName(), + this.ancestor.ancestor2Name(), + this.ancestor().ancestor1Name(), + this.name()) + .map(DisasterRecoveryPairingAuthorizationKeyImpl::new); + } + + @Override + public DisasterRecoveryPairingAuthorizationKey getKeys() { + return this.getKeysAsync().block(); + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + private Ancestors.TwoAncestor ancestor() { + Objects.requireNonNull(this.ancestor); + return this.ancestor; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationRulesImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationRulesImpl.java new file mode 100644 index 0000000000000..6be98fc58a3d7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryPairingAuthorizationRulesImpl.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.DisasterRecoveryConfigsClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRules; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; +import reactor.core.publisher.Mono; + +/** + * Implementation for {@link DisasterRecoveryPairingAuthorizationRules}. + */ +public final class DisasterRecoveryPairingAuthorizationRulesImpl + extends ReadableWrappersImpl + implements DisasterRecoveryPairingAuthorizationRules { + + private final EventHubsManager manager; + + public DisasterRecoveryPairingAuthorizationRulesImpl(EventHubsManager manager) { + this.manager = manager; + } + + @Override + public PagedIterable listByDisasterRecoveryPairing( + String resourceGroupName, String namespaceName, String pairingName) { + return inner() + .listAuthorizationRules(resourceGroupName, namespaceName, pairingName) + .mapPage(this::wrapModel); + } + + @Override + public PagedFlux listByDisasterRecoveryPairingAsync( + String resourceGroupName, String namespaceName, String pairingName) { + return inner() + .listAuthorizationRulesAsync(resourceGroupName, namespaceName, pairingName) + .mapPage(this::wrapModel); + } + + @Override + public Mono getByNameAsync( + String resourceGroupName, String namespaceName, String pairingName, String name) { + return this.manager.inner().getDisasterRecoveryConfigs().getAuthorizationRuleAsync(resourceGroupName, + namespaceName, + pairingName, + name) + .map(this::wrapModel); + } + + @Override + public DisasterRecoveryPairingAuthorizationRule getByName( + String resourceGroupName, String namespaceName, String pairingName, String name) { + return getByNameAsync(resourceGroupName, namespaceName, pairingName, name).block(); + } + + @Override + public DisasterRecoveryPairingAuthorizationRule getById(String id) { + return getByIdAsync(id).block(); + } + + @Override + public Mono getByIdAsync(String id) { + ResourceId resourceId = ResourceId.fromString(id); + return this.getByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().name(), + resourceId.parent().parent().name(), + resourceId.name()); + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public DisasterRecoveryConfigsClient inner() { + return this.manager.inner().getDisasterRecoveryConfigs(); + } + + @Override + protected DisasterRecoveryPairingAuthorizationRuleImpl wrapModel(AuthorizationRuleInner inner) { + return new DisasterRecoveryPairingAuthorizationRuleImpl(inner, manager); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationKeyImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationKeyImpl.java new file mode 100644 index 0000000000000..0c8d69ddcd41d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationKeyImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationKey; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; + +/** + * Implementation for AuthorizationKeys. + */ +class EventHubAuthorizationKeyImpl + extends WrapperImpl + implements EventHubAuthorizationKey { + + EventHubAuthorizationKeyImpl(AccessKeysInner inner) { + super(inner); + } + + @Override + public String primaryKey() { + return this.inner().primaryKey(); + } + + @Override + public String secondaryKey() { + return this.inner().secondaryKey(); + } + + @Override + public String primaryConnectionString() { + return this.inner().primaryConnectionString(); + } + + @Override + public String secondaryConnectionString() { + return this.inner().secondaryConnectionString(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationRuleImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..af9edaece701a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationRuleImpl.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.KeyType; +import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * Implementation for {@link EventHubAuthorizationRule}. + */ +class EventHubAuthorizationRuleImpl extends AuthorizationRuleBaseImpl + implements + EventHubAuthorizationRule, + EventHubAuthorizationRule.Definition, + EventHubAuthorizationRule.Update { + + private Ancestors.TwoAncestor ancestor; + + EventHubAuthorizationRuleImpl(String name, AuthorizationRuleInner inner, EventHubsManager manager) { + super(name, inner, manager); + this.ancestor = new Ancestors().new TwoAncestor(inner.id()); + } + + EventHubAuthorizationRuleImpl(String name, EventHubsManager manager) { + super(name, new AuthorizationRuleInner(), manager); + } + + @Override + public String namespaceResourceGroupName() { + return this.ancestor().resourceGroupName(); + } + + @Override + public String namespaceName() { + return this.ancestor().ancestor2Name(); + } + + @Override + public String eventHubName() { + return this.ancestor().ancestor1Name(); + } + + @Override + public EventHubAuthorizationRuleImpl withExistingEventHubId(String eventHubResourceId) { + this.ancestor = new Ancestors().new TwoAncestor(selfId(eventHubResourceId)); + return this; + } + + @Override + public EventHubAuthorizationRuleImpl withExistingEventHub( + String resourceGroupName, String namespaceName, String eventHubName) { + this.ancestor = new Ancestors().new TwoAncestor(resourceGroupName, eventHubName, namespaceName); + return this; + } + + @Override + public EventHubAuthorizationRuleImpl withExistingEventHub(EventHub eventHub) { + this.ancestor = new Ancestors().new TwoAncestor(selfId(eventHub.id())); + return this; + } + + @Override + protected Mono getInnerAsync() { + return this.manager.inner().getEventHubs() + .getAuthorizationRuleAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor2Name(), + this.ancestor().ancestor1Name(), + this.name()); + } + + @Override + public Mono createResourceAsync() { + return this.manager.inner().getEventHubs() + .createOrUpdateAuthorizationRuleAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor2Name(), + this.ancestor().ancestor1Name(), + this.name(), + this.inner().rights()) + .map(innerToFluentMap(this)); + } + + @Override + protected Mono getKeysInnerAsync() { + return this.manager.inner().getEventHubs() + .listKeysAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor2Name(), + this.ancestor().ancestor1Name(), + this.name()); + } + + @Override + protected Mono regenerateKeysInnerAsync(KeyType keyType) { + final RegenerateAccessKeyParameters regenKeyInner = new RegenerateAccessKeyParameters() + .withKeyType(keyType); + return this.manager.inner().getEventHubs() + .regenerateKeysAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor2Name(), + this.ancestor().ancestor1Name(), + this.name(), + regenKeyInner); + } + + private Ancestors.TwoAncestor ancestor() { + Objects.requireNonNull(this.ancestor); + return this.ancestor; + } + + private String selfId(String parentId) { + return String.format("%s/authorizationRules/%s", parentId, this.name()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationRulesImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationRulesImpl.java new file mode 100644 index 0000000000000..1e5ce8618a446 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubAuthorizationRulesImpl.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.EventHubsClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationRules; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * Implementation for {@link EventHubAuthorizationRules}. + */ +public final class EventHubAuthorizationRulesImpl + extends AuthorizationRulesBaseImpl + implements EventHubAuthorizationRules { + + public EventHubAuthorizationRulesImpl(EventHubsManager manager) { + super(manager, manager.inner().getEventHubs()); + } + + @Override + public EventHubAuthorizationRuleImpl define(String name) { + return new EventHubAuthorizationRuleImpl(name, this.manager); + } + + @Override + public Mono getByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + + return getByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().parent().name(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public EventHubAuthorizationRule getByName( + String resourceGroupName, String namespaceName, String eventHubName, String name) { + return getByNameAsync(resourceGroupName, namespaceName, eventHubName, name).block(); + } + + @Override + public Mono getByNameAsync( + String resourceGroupName, String namespaceName, String eventHubName, String name) { + return this.inner().getAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, name) + .map(this::wrapModel); + } + + @Override + public PagedIterable listByEventHub( + final String resourceGroupName, final String namespaceName, final String eventHubName) { + return inner() + .listAuthorizationRules(resourceGroupName, namespaceName, eventHubName) + .mapPage(this::wrapModel); + } + + @Override + public PagedFlux listByEventHubAsync( + String resourceGroupName, String namespaceName, final String eventHubName) { + return this.inner() + .listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName) + .mapPage(this::wrapModel); + } + + @Override + public Mono deleteByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + return deleteByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().parent().name(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public void deleteByName(String resourceGroupName, String namespaceName, String eventHubName, String name) { + deleteByNameAsync(resourceGroupName, namespaceName, eventHubName, name).block(); + } + + @Override + public Mono deleteByNameAsync( + String resourceGroupName, String namespaceName, String eventHubName, String name) { + return this.inner().deleteAuthorizationRuleAsync(resourceGroupName, + namespaceName, + eventHubName, + name); + } + + @Override + protected EventHubAuthorizationRuleImpl wrapModel(AuthorizationRuleInner innerModel) { + return new EventHubAuthorizationRuleImpl(innerModel.name(), innerModel, this.manager); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubConsumerGroupImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubConsumerGroupImpl.java new file mode 100644 index 0000000000000..ae03233128428 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubConsumerGroupImpl.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.ConsumerGroupInner; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroup; +import reactor.core.publisher.Mono; + +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Implementation for {@link EventHubConsumerGroup}. + */ +class EventHubConsumerGroupImpl + extends NestedResourceImpl + implements EventHubConsumerGroup, + EventHubConsumerGroup.Definition, + EventHubConsumerGroup.Update { + + private Ancestors.TwoAncestor ancestor; + + EventHubConsumerGroupImpl(String name, ConsumerGroupInner inner, EventHubsManager manager) { + super(name, inner, manager); + this.ancestor = new Ancestors().new TwoAncestor(inner.id()); + } + + EventHubConsumerGroupImpl(String name, EventHubsManager manager) { + super(name, new ConsumerGroupInner(), manager); + } + + @Override + public String namespaceResourceGroupName() { + return this.ancestor().resourceGroupName(); + } + + @Override + public String namespaceName() { + return this.ancestor().ancestor2Name(); + } + + @Override + public String eventHubName() { + return this.ancestor().ancestor1Name(); + } + + @Override + public OffsetDateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public OffsetDateTime updatedAt() { + return this.inner().updatedAt(); + } + + @Override + public String userMetadata() { + return this.inner().userMetadata(); + } + + @Override + public EventHubConsumerGroupImpl withExistingEventHub(EventHub eventHub) { + this.ancestor = new Ancestors().new TwoAncestor(selfId(eventHub.id())); + return this; + } + + @Override + public EventHubConsumerGroupImpl withExistingEventHubId(String eventHubId) { + this.ancestor = new Ancestors().new TwoAncestor(selfId(eventHubId)); + return this; + } + + @Override + public EventHubConsumerGroupImpl withExistingEventHub( + String resourceGroupName, String namespaceName, String eventHubName) { + this.ancestor = new Ancestors().new TwoAncestor(resourceGroupName, eventHubName, namespaceName); + return this; + } + + @Override + public EventHubConsumerGroupImpl withUserMetadata(String metadata) { + this.inner().withUserMetadata(metadata); + return this; + } + + @Override + public Mono createResourceAsync() { + return this.manager.inner().getConsumerGroups() + .createOrUpdateAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor2Name(), + this.ancestor().ancestor1Name(), + this.name(), + this.inner().userMetadata()) + .map(innerToFluentMap(this)); + } + + @Override + protected Mono getInnerAsync() { + return this.manager.inner().getConsumerGroups() + .getAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor2Name(), + this.ancestor().ancestor1Name(), + this.name()); + } + + private Ancestors.TwoAncestor ancestor() { + Objects.requireNonNull(this.ancestor); + return this.ancestor; + } + + private String selfId(String parentId) { + return String.format("%s/consumerGroups/%s", parentId, this.name()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubConsumerGroupsImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubConsumerGroupsImpl.java new file mode 100644 index 0000000000000..51ed9c8a0773c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubConsumerGroupsImpl.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.ConsumerGroupsClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.ConsumerGroupInner; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroup; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroups; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * Implementation for {@link EventHubConsumerGroups}. + */ +public final class EventHubConsumerGroupsImpl + extends WrapperImpl + implements EventHubConsumerGroups { + private final EventHubsManager manager; + + public EventHubConsumerGroupsImpl(EventHubsManager manager) { + super(manager.inner().getConsumerGroups()); + this.manager = manager; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public EventHubConsumerGroupImpl define(String name) { + return new EventHubConsumerGroupImpl(name, this.manager); + } + + @Override + public EventHubConsumerGroup getById(String id) { + return getByIdAsync(id).block(); + } + + @Override + public Mono getByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + + return getByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().parent().name(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public Mono getByNameAsync( + String resourceGroupName, String namespaceName, String eventHubName, String name) { + return this.inner().getAsync(resourceGroupName, namespaceName, eventHubName, name).map(this::wrapModel); + } + + @Override + public EventHubConsumerGroup getByName( + String resourceGroupName, String namespaceName, String eventHubName, String name) { + return getByNameAsync(resourceGroupName, namespaceName, eventHubName, name).block(); + } + + @Override + public PagedIterable listByEventHub( + String resourceGroupName, String namespaceName, String eventHubName) { + return inner() + .listByEventHub(resourceGroupName, namespaceName, eventHubName) + .mapPage(this::wrapModel); + } + + @Override + public PagedFlux listByEventHubAsync( + String resourceGroupName, String namespaceName, String eventHubName) { + return inner() + .listByEventHubAsync(resourceGroupName, namespaceName, eventHubName) + .mapPage(this::wrapModel); + } + + @Override + public void deleteById(String id) { + deleteByIdAsync(id).block(); + } + + @Override + public Mono deleteByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + + return deleteByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().parent().name(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public Mono deleteByNameAsync( + String resourceGroupName, String namespaceName, String eventHubName, String name) { + return this.inner().deleteAsync(resourceGroupName, + namespaceName, + eventHubName, + name); + } + + @Override + public void deleteByName(String resourceGroupName, String namespaceName, String eventHubName, String name) { + deleteByNameAsync(resourceGroupName, namespaceName, eventHubName, name).block(); + } + + private EventHubConsumerGroupImpl wrapModel(ConsumerGroupInner innerModel) { + return new EventHubConsumerGroupImpl(innerModel.name(), innerModel, this.manager); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubDisasterRecoveryPairingImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubDisasterRecoveryPairingImpl.java new file mode 100644 index 0000000000000..c0531e26be0ba --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubDisasterRecoveryPairingImpl.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.ArmDisasterRecoveryInner; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairing; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.eventhubs.models.ProvisioningStateDR; +import com.azure.resourcemanager.eventhubs.models.RoleDisasterRecovery; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * Implementation for {@link EventHubDisasterRecoveryPairing}. + */ +class EventHubDisasterRecoveryPairingImpl + extends NestedResourceImpl + implements EventHubDisasterRecoveryPairing, + EventHubDisasterRecoveryPairing.Definition, + EventHubDisasterRecoveryPairing.Update { + + private Ancestors.OneAncestor ancestor; + private final ClientLogger logger = new ClientLogger(EventHubDisasterRecoveryPairingImpl.class); + + EventHubDisasterRecoveryPairingImpl(String name, ArmDisasterRecoveryInner inner, EventHubsManager manager) { + super(name, inner, manager); + this.ancestor = new Ancestors().new OneAncestor(inner.id()); + } + + EventHubDisasterRecoveryPairingImpl(String name, EventHubsManager manager) { + super(name, new ArmDisasterRecoveryInner(), manager); + } + + @Override + public String primaryNamespaceResourceGroupName() { + return this.ancestor().resourceGroupName(); + } + + @Override + public String primaryNamespaceName() { + return this.ancestor().ancestor1Name(); + } + + @Override + public String secondaryNamespaceId() { + return this.inner().partnerNamespace(); + } + + @Override + public RoleDisasterRecovery namespaceRole() { + return this.inner().role(); + } + + @Override + public ProvisioningStateDR provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public EventHubDisasterRecoveryPairingImpl withNewPrimaryNamespace( + Creatable namespaceCreatable) { + this.addDependency(namespaceCreatable); + if (namespaceCreatable instanceof EventHubNamespaceImpl) { + EventHubNamespaceImpl namespace = ((EventHubNamespaceImpl) namespaceCreatable); + this.ancestor = new Ancestors().new OneAncestor(namespace.resourceGroupName(), namespaceCreatable.name()); + } else { + logger.logExceptionAsError(new IllegalArgumentException("The namespaceCreatable is invalid.")); + } + return this; + } + + @Override + public EventHubDisasterRecoveryPairingImpl withExistingPrimaryNamespace(EventHubNamespace namespace) { + this.ancestor = new Ancestors().new OneAncestor(selfId(namespace.id())); + return this; + } + + @Override + public EventHubDisasterRecoveryPairingImpl withExistingPrimaryNamespace( + String resourceGroupName, String primaryNamespaceName) { + this.ancestor = new Ancestors().new OneAncestor(resourceGroupName, primaryNamespaceName); + return this; + } + + @Override + public EventHubDisasterRecoveryPairingImpl withExistingPrimaryNamespaceId(String namespaceId) { + this.ancestor = new Ancestors().new OneAncestor(selfId(namespaceId)); + return this; + } + + @Override + public EventHubDisasterRecoveryPairingImpl withNewSecondaryNamespace( + Creatable namespaceCreatable) { + this.addDependency(namespaceCreatable); + if (namespaceCreatable instanceof EventHubNamespaceImpl) { + EventHubNamespaceImpl namespace = ((EventHubNamespaceImpl) namespaceCreatable); + this.inner().withPartnerNamespace(namespace.name()); + } else { + logger.logExceptionAsError(new IllegalArgumentException("The namespaceCreatable is invalid.")); + } + return this; + } + + @Override + public EventHubDisasterRecoveryPairingImpl withExistingSecondaryNamespace(EventHubNamespace namespace) { + Objects.requireNonNull(namespace.id()); + this.inner().withPartnerNamespace(namespace.id()); + return this; + } + + @Override + public EventHubDisasterRecoveryPairingImpl withExistingSecondaryNamespaceId(String namespaceId) { + Objects.requireNonNull(namespaceId); + this.inner().withPartnerNamespace(namespaceId); + return this; + } + + @Override + public Mono createResourceAsync() { + return this.manager().inner().getDisasterRecoveryConfigs() + .createOrUpdateAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name(), + this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Mono breakPairingAsync() { + return this.manager().inner().getDisasterRecoveryConfigs() + .breakPairingAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name()) + .then(refreshAsync()) + .then(); + } + + @Override + public void breakPairing() { + this.breakPairingAsync().block(); + } + + @Override + public Mono failOverAsync() { + // Fail over is run against secondary namespace (because primary might be down at time of failover) + // + ResourceId secondaryNs = ResourceId.fromString(this.inner().partnerNamespace()); + return this.manager().inner().getDisasterRecoveryConfigs().failOverAsync(secondaryNs.resourceGroupName(), + secondaryNs.name(), + this.name()) + .then(refreshAsync()) + .then(); + } + + @Override + public void failOver() { + this.failOverAsync().block(); + } + + @Override + public PagedFlux listAuthorizationRulesAsync() { + return this.manager().disasterRecoveryPairingAuthorizationRules() + .listByDisasterRecoveryPairingAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name()); + } + + @Override + public PagedIterable listAuthorizationRules() { + return this.manager().disasterRecoveryPairingAuthorizationRules() + .listByDisasterRecoveryPairing(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name()); + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getDisasterRecoveryConfigs().getAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name()); + } + + private Ancestors.OneAncestor ancestor() { + Objects.requireNonNull(this.ancestor); + return this.ancestor; + } + + private String selfId(String parentId) { + return String.format("%s/disasterRecoveryConfig/%s", parentId, this.name()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubDisasterRecoveryPairingsImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubDisasterRecoveryPairingsImpl.java new file mode 100644 index 0000000000000..4b388242012ba --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubDisasterRecoveryPairingsImpl.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.DisasterRecoveryConfigsClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.ArmDisasterRecoveryInner; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRules; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairing; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairings; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * Implementation for {@link EventHubDisasterRecoveryPairings}. + */ +public final class EventHubDisasterRecoveryPairingsImpl + extends WrapperImpl + implements EventHubDisasterRecoveryPairings { + private EventHubsManager manager; + + public EventHubDisasterRecoveryPairingsImpl(EventHubsManager manager) { + super(manager.inner().getDisasterRecoveryConfigs()); + this.manager = manager; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public EventHubDisasterRecoveryPairingImpl define(String name) { + return new EventHubDisasterRecoveryPairingImpl(name, this.manager); + } + + @Override + public DisasterRecoveryPairingAuthorizationRules authorizationRules() { + return null; + } + + @Override + public EventHubDisasterRecoveryPairing getById(String id) { + return getByIdAsync(id).block(); + } + + @Override + public Mono getByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + return getByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public Mono getByNameAsync( + String resourceGroupName, String namespaceName, String name) { + return this.inner().getAsync(resourceGroupName, + namespaceName, + name) + .map(this::wrapModel); + } + + @Override + public EventHubDisasterRecoveryPairing getByName( + String resourceGroupName, String namespaceName, String name) { + return getByNameAsync(resourceGroupName, namespaceName, name).block(); + } + + @Override + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName) { + return inner() + .list(resourceGroupName, namespaceName) + .mapPage(this::wrapModel); + } + + @Override + public PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName) { + return this.inner().listAsync(resourceGroupName, namespaceName) + .mapPage(this::wrapModel); + } + + @Override + public void deleteById(String id) { + deleteByIdAsync(id).block(); + } + + @Override + public Mono deleteByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + return deleteByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public Mono deleteByNameAsync(String resourceGroupName, String namespaceName, String name) { + return this.inner().deleteAsync(resourceGroupName, + namespaceName, + name); + } + + @Override + public void deleteByName(String resourceGroupName, String namespaceName, String name) { + deleteByNameAsync(resourceGroupName, namespaceName, name).block(); + } + + private EventHubDisasterRecoveryPairingImpl wrapModel(ArmDisasterRecoveryInner innerModel) { + return new EventHubDisasterRecoveryPairingImpl(innerModel.name(), innerModel, this.manager); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubImpl.java new file mode 100644 index 0000000000000..e1cd0094ed170 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubImpl.java @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.EventhubInner; +import com.azure.resourcemanager.eventhubs.models.CaptureDescription; +import com.azure.resourcemanager.eventhubs.models.Destination; +import com.azure.resourcemanager.eventhubs.models.EncodingCaptureDescription; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroup; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.resources.fluentcore.dag.VoidIndexable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Indexable; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.storage.StorageManager; +import com.azure.resourcemanager.storage.models.PublicAccess; +import com.azure.resourcemanager.storage.models.StorageAccount; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; + +/** + * Implementation for {@link EventHub}. + */ +class EventHubImpl + extends NestedResourceImpl + implements EventHub, EventHub.Definition, EventHub.Update { + + private Ancestors.OneAncestor ancestor; + private CaptureSettings captureSettings; + private StorageManager storageManager; + private Flux postRunTasks; + + private final ClientLogger logger = new ClientLogger(EventHubImpl.class); + + EventHubImpl(String name, EventhubInner inner, EventHubsManager manager, StorageManager storageManager) { + super(name, inner, manager); + this.ancestor = new Ancestors().new OneAncestor(inner.id()); + this.captureSettings = new CaptureSettings(this.inner()); + this.storageManager = storageManager; + } + + EventHubImpl(String name, EventHubsManager manager, StorageManager storageManager) { + super(name, new EventhubInner(), manager); + this.storageManager = storageManager; + this.captureSettings = new CaptureSettings(this.inner()); + } + + @Override + public String namespaceResourceGroupName() { + return this.ancestor().resourceGroupName(); + } + + @Override + public String namespaceName() { + return this.ancestor().ancestor1Name(); + } + + @Override + public boolean isDataCaptureEnabled() { + if (this.inner().captureDescription() == null) { + return false; + } + return Utils.toPrimitiveBoolean(this.inner().captureDescription().enabled()); + } + + @Override + public int dataCaptureWindowSizeInSeconds() { + if (this.inner().captureDescription() == null) { + return 0; + } + return Utils.toPrimitiveInt(this.inner().captureDescription().intervalInSeconds()); + } + + @Override + public int dataCaptureWindowSizeInMB() { + if (this.inner().captureDescription() == null) { + return 0; + } + int inBytes = Utils.toPrimitiveInt(this.inner().captureDescription().sizeLimitInBytes()); + if (inBytes != 0) { + return inBytes / (1024 * 1024); + } else { + return 0; + } + } + + @Override + public boolean dataCaptureSkipEmptyArchives() { + if (this.inner().captureDescription() == null) { + return false; + } + return this.inner().captureDescription().skipEmptyArchives(); + } + + @Override + public String dataCaptureFileNameFormat() { + if (this.inner().captureDescription() == null) { + return null; + } else if (this.inner().captureDescription().destination() == null) { + return null; + } else { + return this.inner().captureDescription().destination().archiveNameFormat(); + } + } + + @Override + public Destination captureDestination() { + if (this.inner().captureDescription() == null) { + return null; + } else { + return this.inner().captureDescription().destination(); + } + } + + @Override + public Set partitionIds() { + if (this.inner().partitionIds() == null) { + return Collections.unmodifiableSet(new HashSet()); + } else { + return Collections.unmodifiableSet(new HashSet(this.inner().partitionIds())); + } + } + + @Override + public int messageRetentionPeriodInDays() { + return Utils.toPrimitiveInt(this.inner().messageRetentionInDays()); + } + + @Override + public EventHubImpl withNewNamespace(Creatable namespaceCreatable) { + this.addDependency(namespaceCreatable); + if (namespaceCreatable instanceof EventHubNamespaceImpl) { + EventHubNamespaceImpl namespace = ((EventHubNamespaceImpl) namespaceCreatable); + this.ancestor = new Ancestors().new OneAncestor(namespace.resourceGroupName(), namespaceCreatable.name()); + } else { + logger.logExceptionAsError(new IllegalArgumentException("The namespaceCreatable is invalid.")); + } + return this; + } + + @Override + public EventHubImpl withExistingNamespace(EventHubNamespace namespace) { + this.ancestor = new Ancestors().new OneAncestor(selfId(namespace.id())); + return this; + } + + @Override + public EventHubImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.ancestor = new Ancestors().new OneAncestor(resourceGroupName, namespaceName); + return this; + } + + @Override + public EventHubImpl withExistingNamespaceId(String namespaceId) { + this.ancestor = new Ancestors().new OneAncestor(selfId(namespaceId)); + return this; + } + + @Override + public EventHubImpl withNewStorageAccountForCapturedData( + Creatable storageAccountCreatable, String containerName) { + this.captureSettings.withNewStorageAccountForCapturedData(storageAccountCreatable, containerName); + return this; + } + + @Override + public EventHubImpl withExistingStorageAccountForCapturedData( + StorageAccount storageAccount, String containerName) { + this.captureSettings.withExistingStorageAccountForCapturedData(storageAccount, containerName); + return this; + } + + @Override + public EventHubImpl withExistingStorageAccountForCapturedData( + String storageAccountId, String containerName) { + this.captureSettings.withExistingStorageAccountForCapturedData(storageAccountId, containerName); + return this; + } + + @Override + public EventHubImpl withDataCaptureEnabled() { + this.captureSettings.withDataCaptureEnabled(); + return this; + } + + @Override + public EventHubImpl withDataCaptureDisabled() { + this.captureSettings.withDataCaptureDisabled(); + return this; + } + + @Override + public EventHubImpl withDataCaptureWindowSizeInSeconds(int sizeInSeconds) { + this.captureSettings.withDataCaptureWindowSizeInSeconds(sizeInSeconds); + return this; + } + + @Override + public EventHubImpl withDataCaptureSkipEmptyArchives(Boolean skipEmptyArchives) { + this.captureSettings.withDataCaptureSkipEmptyArchives(skipEmptyArchives); + return this; + } + + @Override + public EventHubImpl withDataCaptureWindowSizeInMB(int sizeInMB) { + this.captureSettings.withDataCaptureWindowSizeInMB(sizeInMB); + return this; + } + + @Override + public EventHubImpl withDataCaptureFileNameFormat(String format) { + this.captureSettings.withDataCaptureFileNameFormat(format); + return this; + } + + @Override + public EventHubImpl withNewSendRule(final String ruleName) { + concatPostRunTask(manager().eventHubAuthorizationRules() + .define(ruleName) + .withExistingEventHub(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()) + .withSendAccess() + .createAsync() + .last()); + return this; + } + + @Override + public EventHubImpl withNewListenRule(final String ruleName) { + concatPostRunTask(manager().eventHubAuthorizationRules() + .define(ruleName) + .withExistingEventHub(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()) + .withListenAccess() + .createAsync() + .last()); + return this; + } + + @Override + public EventHubImpl withNewSendAndListenRule(final String ruleName) { + concatPostRunTask(manager().eventHubAuthorizationRules() + .define(ruleName) + .withExistingEventHub(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()) + .withSendAndListenAccess() + .createAsync() + .last()); + return this; + } + + @Override + public EventHubImpl withNewManageRule(final String ruleName) { + concatPostRunTask(manager().eventHubAuthorizationRules() + .define(ruleName) + .withExistingEventHub(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()) + .withManageAccess() + .createAsync() + .last()); + return this; + } + + @Override + public EventHubImpl withoutAuthorizationRule(final String ruleName) { + concatPostRunTask(manager().eventHubAuthorizationRules() + .deleteByNameAsync(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name(), ruleName) + .map(aVoid -> new VoidIndexable(UUID.randomUUID().toString()))); + return this; + } + + @Override + public EventHubImpl withNewConsumerGroup(final String name) { + concatPostRunTask(manager().consumerGroups() + .define(name) + .withExistingEventHub(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()) + .createAsync() + .last()); + return this; + } + + @Override + public EventHubImpl withNewConsumerGroup(final String name, final String metadata) { + concatPostRunTask(manager().consumerGroups() + .define(name) + .withExistingEventHub(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()) + .withUserMetadata(metadata) + .createAsync() + .last()); + return this; + } + + @Override + public EventHubImpl withoutConsumerGroup(final String name) { + concatPostRunTask(manager().consumerGroups() + .deleteByNameAsync(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name(), name) + .map(aVoid -> new VoidIndexable(UUID.randomUUID().toString()))); + return this; + } + + @Override + public EventHubImpl withPartitionCount(long count) { + this.inner().withPartitionCount(count); + return this; + } + + @Override + public EventHubImpl withRetentionPeriodInDays(long period) { + this.inner().withMessageRetentionInDays(period); + return this; + } + + @Override + public EventHubImpl update() { + this.captureSettings = new CaptureSettings(this.inner()); + return super.update(); + } + + @Override + public void beforeGroupCreateOrUpdate() { + if (postRunTasks != null) { + addPostRunDependent(context -> postRunTasks.last()); + } + this.inner().withCaptureDescription(this.captureSettings.validateAndGetSettings()); + } + + @Override + public Mono createResourceAsync() { + return this.manager.inner().getEventHubs() + .createOrUpdateAsync(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Mono afterPostRunAsync(boolean isGroupFaulted) { + postRunTasks = null; + return Mono.empty(); + } + + @Override + protected Mono getInnerAsync() { + return this.manager.inner().getEventHubs().getAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name()); + } + + @Override + public PagedFlux listConsumerGroupsAsync() { + return this.manager.consumerGroups() + .listByEventHubAsync(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()); + } + + @Override + public PagedFlux listAuthorizationRulesAsync() { + return this.manager.eventHubAuthorizationRules() + .listByEventHubAsync(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()); + } + + @Override + public PagedIterable listConsumerGroups() { + return this.manager.consumerGroups() + .listByEventHub(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()); + } + + @Override + public PagedIterable listAuthorizationRules() { + return this.manager.eventHubAuthorizationRules() + .listByEventHub(ancestor().resourceGroupName(), ancestor().ancestor1Name(), name()); + } + + private Ancestors.OneAncestor ancestor() { + Objects.requireNonNull(this.ancestor); + return this.ancestor; + } + + private String selfId(String parentId) { + return String.format("%s/eventhubs/%s", parentId, this.name()); + } + + private void concatPostRunTask(Mono task) { + if (postRunTasks == null) { + postRunTasks = Flux.empty(); + } + postRunTasks = postRunTasks.concatWith(task); + } + + private class CaptureSettings { + private final CaptureDescription currentSettings; + private CaptureDescription newSettings; + + CaptureSettings(final EventhubInner eventhubInner) { + this.currentSettings = eventhubInner.captureDescription(); + } + + public CaptureSettings withNewStorageAccountForCapturedData( + final Creatable creatableStorageAccount, final String containerName) { + this.ensureSettings().destination().withStorageAccountResourceId("temp-id"); + this.ensureSettings().destination().withBlobContainer(containerName); + // + // Schedule task to create storage account and container. + // + addDependency(context -> creatableStorageAccount + .createAsync() + .last() + .flatMap(indexable -> { + StorageAccount storageAccount = (StorageAccount) indexable; + ensureSettings().destination().withStorageAccountResourceId(storageAccount.id()); + return createContainerIfNotExistsAsync(storageAccount, containerName); + })); + return this; + } + + public CaptureSettings withExistingStorageAccountForCapturedData( + final StorageAccount storageAccount, final String containerName) { + this.ensureSettings().destination().withStorageAccountResourceId(storageAccount.id()); + this.ensureSettings().destination().withBlobContainer(containerName); + // + // Schedule task to create container if not exists. + // + addDependency(context -> createContainerIfNotExistsAsync(storageAccount, containerName)); + return this; + } + + public CaptureSettings withExistingStorageAccountForCapturedData( + final String storageAccountId, final String containerName) { + this.ensureSettings().destination().withStorageAccountResourceId(storageAccountId); + this.ensureSettings().destination().withBlobContainer(containerName); + // + // Schedule task to create container if not exists. + // + addDependency(context -> storageManager.storageAccounts() + .getByIdAsync(storageAccountId) + .flatMap(storageAccount -> { + ensureSettings().destination().withStorageAccountResourceId(storageAccount.id()); + return createContainerIfNotExistsAsync(storageAccount, containerName); + })); + return this; + } + + public CaptureSettings withDataCaptureEnabled() { + this.ensureSettings().withEnabled(true); + return this; + } + + public CaptureSettings withDataCaptureDisabled() { + this.ensureSettings().withEnabled(false); + return this; + } + + public CaptureSettings withDataCaptureSkipEmptyArchives(Boolean skipEmptyArchives) { + this.ensureSettings().withSkipEmptyArchives(skipEmptyArchives); + return this; + } + + public CaptureSettings withDataCaptureWindowSizeInSeconds(int sizeInSeconds) { + this.ensureSettings().withIntervalInSeconds(sizeInSeconds); + return this; + } + + public CaptureSettings withDataCaptureWindowSizeInMB(int sizeInMB) { + this.ensureSettings().withSizeLimitInBytes(sizeInMB * 1024 * 1024); + return this; + } + + public CaptureSettings withDataCaptureFileNameFormat(String format) { + this.ensureSettings().destination().withArchiveNameFormat(format); + return this; + } + + public CaptureDescription validateAndGetSettings() { + if (this.newSettings == null) { + return this.currentSettings; + } else if (this.newSettings.destination() == null + || this.newSettings.destination().storageAccountResourceId() == null + || this.newSettings.destination().blobContainer() == null) { + throw logger.logExceptionAsError(new IllegalStateException( + "Setting any of the capture properties requires " + + "capture destination [StorageAccount, DataLake] to be specified")); + } + if (this.newSettings.destination().name() == null) { + this.newSettings.destination().withName("EventHubArchive.AzureBlockBlob"); + } + if (this.newSettings.encoding() == null) { + this.newSettings.withEncoding(EncodingCaptureDescription.AVRO); + } + return this.newSettings; + } + + private CaptureDescription ensureSettings() { + if (this.newSettings != null) { + return this.newSettings; + } else if (this.currentSettings == null) { + this.newSettings = new CaptureDescription().withDestination(new Destination()); + return this.newSettings; + } else { + // Clone the current settings to new settings (one time) + // + this.newSettings = cloneCurrentSettings(); + return this.newSettings; + } + } + + private Mono createContainerIfNotExistsAsync(final StorageAccount storageAccount, + final String containerName) { + return storageManager.blobContainers() + .getAsync(storageAccount.resourceGroupName(), storageAccount.name(), containerName) + .cast(Indexable.class) + .onErrorResume(throwable -> storageManager.blobContainers() + .defineContainer(containerName) + .withExistingBlobService(storageAccount.resourceGroupName(), storageAccount.name()) + .withPublicAccess(PublicAccess.CONTAINER) + .createAsync() + .last()); + } + + private CaptureDescription cloneCurrentSettings() { + Objects.requireNonNull(this.currentSettings); + CaptureDescription clone = new CaptureDescription(); + clone.withSizeLimitInBytes(this.currentSettings.sizeLimitInBytes()); + clone.withSkipEmptyArchives(this.currentSettings.skipEmptyArchives()); + clone.withIntervalInSeconds(this.currentSettings.intervalInSeconds()); + clone.withEnabled(this.currentSettings.enabled()); + clone.withEncoding(this.currentSettings.encoding()); + if (this.currentSettings.destination() != null) { + clone.withDestination(new Destination()); + clone.destination().withArchiveNameFormat(this.currentSettings.destination().archiveNameFormat()); + clone.destination().withBlobContainer(this.currentSettings.destination().blobContainer()); + clone.destination().withName(this.currentSettings.destination().name()); + clone.destination().withStorageAccountResourceId( + this.currentSettings.destination().storageAccountResourceId()); + } else { + clone.withDestination(new Destination()); + } + return clone; + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceAuthorizationRuleImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..97d09ce791ea8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceAuthorizationRuleImpl.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.KeyType; +import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * Implementation for {@link EventHubNamespaceAuthorizationRule}. + */ +class EventHubNamespaceAuthorizationRuleImpl extends AuthorizationRuleBaseImpl + implements + EventHubNamespaceAuthorizationRule, + EventHubNamespaceAuthorizationRule.Definition, + EventHubNamespaceAuthorizationRule.Update { + + private Ancestors.OneAncestor ancestor; + + EventHubNamespaceAuthorizationRuleImpl(String name, AuthorizationRuleInner inner, EventHubsManager manager) { + super(name, inner, manager); + this.ancestor = new Ancestors().new OneAncestor(inner.id()); + } + + EventHubNamespaceAuthorizationRuleImpl(String name, EventHubsManager manager) { + super(name, new AuthorizationRuleInner(), manager); + } + + @Override + public String namespaceResourceGroupName() { + return this.ancestor().resourceGroupName(); + } + + @Override + public String namespaceName() { + return this.ancestor().ancestor1Name(); + } + + @Override + public EventHubNamespaceAuthorizationRuleImpl withExistingNamespaceId(String namespaceResourceId) { + this.ancestor = new Ancestors().new OneAncestor(selfId(namespaceResourceId)); + return this; + } + + @Override + public EventHubNamespaceAuthorizationRuleImpl withExistingNamespace( + String resourceGroupName, String namespaceName) { + this.ancestor = new Ancestors().new OneAncestor(resourceGroupName, namespaceName); + return this; + } + + @Override + public EventHubNamespaceAuthorizationRuleImpl withExistingNamespace(EventHubNamespace namespace) { + this.ancestor = new Ancestors().new OneAncestor(selfId(namespace.id())); + return this; + } + + @Override + protected Mono getInnerAsync() { + return this.manager.inner().getNamespaces() + .getAuthorizationRuleAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name()); + } + + @Override + public Mono createResourceAsync() { + return this.manager.inner().getNamespaces() + .createOrUpdateAuthorizationRuleAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name(), + this.inner().rights()) + .map(innerToFluentMap(this)); + } + + @Override + protected Mono getKeysInnerAsync() { + return this.manager.inner().getNamespaces() + .listKeysAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name()); + } + + @Override + protected Mono regenerateKeysInnerAsync(KeyType keyType) { + final RegenerateAccessKeyParameters regenKeyInner = new RegenerateAccessKeyParameters() + .withKeyType(keyType); + return this.manager.inner().getNamespaces() + .regenerateKeysAsync(this.ancestor().resourceGroupName(), + this.ancestor().ancestor1Name(), + this.name(), + regenKeyInner); + } + + private Ancestors.OneAncestor ancestor() { + Objects.requireNonNull(this.ancestor); + return this.ancestor; + } + + private String selfId(String parentId) { + return String.format("%s/authorizationRules/%s", parentId, this.name()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceAuthorizationRulesImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceAuthorizationRulesImpl.java new file mode 100644 index 0000000000000..ea153525d3305 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceAuthorizationRulesImpl.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.NamespacesClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRules; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * Implementation for {@link EventHubNamespaceAuthorizationRules}. + */ +public final class EventHubNamespaceAuthorizationRulesImpl + extends AuthorizationRulesBaseImpl + implements EventHubNamespaceAuthorizationRules { + + public EventHubNamespaceAuthorizationRulesImpl(EventHubsManager manager) { + super(manager, manager.inner().getNamespaces()); + } + + @Override + public EventHubNamespaceAuthorizationRuleImpl define(String name) { + return new EventHubNamespaceAuthorizationRuleImpl(name, this.manager); + } + + @Override + public Mono getByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + return getByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public EventHubNamespaceAuthorizationRule getByName(String resourceGroupName, String namespaceName, String name) { + return getByNameAsync(resourceGroupName, namespaceName, name).block(); + } + + @Override + public Mono getByNameAsync( + String resourceGroupName, String namespaceName, String name) { + return this.inner().getAuthorizationRuleAsync(resourceGroupName, + namespaceName, + name) + .map(this::wrapModel); + } + + @Override + public PagedIterable listByNamespace( + final String resourceGroupName, final String namespaceName) { + return inner() + .listAuthorizationRules(resourceGroupName, namespaceName) + .mapPage(this::wrapModel); + } + + @Override + public PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName) { + return this.inner() + .listAuthorizationRulesAsync(resourceGroupName, namespaceName) + .mapPage(this::wrapModel); + } + + @Override + public Mono deleteByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + + return deleteByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public Mono deleteByNameAsync(String resourceGroupName, String namespaceName, String name) { + return this.inner().deleteAuthorizationRuleAsync(resourceGroupName, + namespaceName, + name); + } + + @Override + public void deleteByName(String resourceGroupName, String namespaceName, String name) { + deleteByNameAsync(resourceGroupName, namespaceName, name).block(); + } + + @Override + protected EventHubNamespaceAuthorizationRuleImpl wrapModel(AuthorizationRuleInner innerModel) { + return new EventHubNamespaceAuthorizationRuleImpl(innerModel.name(), innerModel, this.manager); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceImpl.java new file mode 100644 index 0000000000000..53d6e781c40eb --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceImpl.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.EHNamespaceInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.GroupableResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.dag.VoidIndexable; +import com.azure.resourcemanager.resources.fluentcore.model.Indexable; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceSkuType; +import com.azure.resourcemanager.eventhubs.models.Sku; +import com.azure.resourcemanager.eventhubs.models.SkuName; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.time.OffsetDateTime; +import java.util.UUID; + +/** + * Implementation for {@link EventHubNamespace}. + */ +class EventHubNamespaceImpl + extends GroupableResourceImpl + implements + EventHubNamespace, + EventHubNamespace.Definition, + EventHubNamespace.Update { + + private Flux postRunTasks; + + protected EventHubNamespaceImpl(String name, EHNamespaceInner innerObject, EventHubsManager manager) { + super(name, innerObject, manager); + } + + @Override + public EventHubNamespaceSkuType sku() { + return new EventHubNamespaceSkuType(this.inner().sku()); + } + + @Override + public String azureInsightMetricId() { + return this.inner().metricId(); + } + + @Override + public String serviceBusEndpoint() { + return this.inner().serviceBusEndpoint(); + } + + @Override + public OffsetDateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public OffsetDateTime updatedAt() { + return this.inner().updatedAt(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public boolean isAutoScaleEnabled() { + return Utils.toPrimitiveBoolean(this.inner().isAutoInflateEnabled()); + } + + @Override + public int currentThroughputUnits() { + return Utils.toPrimitiveInt(this.inner().sku().capacity()); + } + + @Override + public int throughputUnitsUpperLimit() { + return Utils.toPrimitiveInt(this.inner().maximumThroughputUnits()); + } + + @Override + public EventHubNamespaceImpl withNewEventHub(final String eventHubName) { + concatPostRunTask(manager().eventHubs() + .define(eventHubName) + .withExistingNamespace(resourceGroupName(), name()) + .createAsync() + .last()); + return this; + } + + @Override + public EventHubNamespaceImpl withNewEventHub(final String eventHubName, final int partitionCount) { + concatPostRunTask(manager().eventHubs() + .define(eventHubName) + .withExistingNamespace(resourceGroupName(), name()) + .withPartitionCount(partitionCount) + .createAsync() + .last()); + return this; + } + + @Override + public EventHubNamespaceImpl withNewEventHub( + final String eventHubName, final int partitionCount, final int retentionPeriodInDays) { + concatPostRunTask(manager().eventHubs() + .define(eventHubName) + .withExistingNamespace(resourceGroupName(), name()) + .withPartitionCount(partitionCount) + .withRetentionPeriodInDays(retentionPeriodInDays) + .createAsync() + .last()); + return this; + } + + @Override + public Update withoutEventHub(final String eventHubName) { + concatPostRunTask(manager().eventHubs() + .deleteByNameAsync(resourceGroupName(), name(), eventHubName) + .map(aVoid -> new VoidIndexable(UUID.randomUUID().toString()))); + return this; + } + + @Override + public EventHubNamespaceImpl withNewSendRule(final String ruleName) { + concatPostRunTask(manager().namespaceAuthorizationRules() + .define(ruleName) + .withExistingNamespace(resourceGroupName(), name()) + .withSendAccess() + .createAsync() + .last()); + return this; + } + + @Override + public EventHubNamespaceImpl withNewListenRule(final String ruleName) { + concatPostRunTask(manager().namespaceAuthorizationRules() + .define(ruleName) + .withExistingNamespace(resourceGroupName(), name()) + .withListenAccess() + .createAsync() + .last()); + return this; + } + + @Override + public EventHubNamespaceImpl withNewManageRule(final String ruleName) { + concatPostRunTask(manager().namespaceAuthorizationRules() + .define(ruleName) + .withExistingNamespace(resourceGroupName(), name()) + .withManageAccess() + .createAsync() + .last()); + return this; + } + + @Override + public EventHubNamespaceImpl withoutAuthorizationRule(final String ruleName) { + concatPostRunTask(manager().namespaceAuthorizationRules() + .deleteByNameAsync(resourceGroupName(), name(), ruleName) + .map(aVoid -> new VoidIndexable(UUID.randomUUID().toString()))); + return this; + } + + @Override + public EventHubNamespaceImpl withAutoScaling() { + // Auto-inflate requires a Sku > 'Basic' with capacity. + this.setDefaultSkuIfNotSet(); + this.inner().withIsAutoInflateEnabled(true); + if (this.inner().maximumThroughputUnits() == null) { + // Required when auto-inflate is set & use portal default. + this.withThroughputUnitsUpperLimit(20); + } + return this; + } + + @Override + public EventHubNamespaceImpl withSku(EventHubNamespaceSkuType namespaceSku) { + Sku newSkuInner = new Sku() + .withName(namespaceSku.name()) + .withTier(namespaceSku.tier()) + .withCapacity(null); + Sku currentSkuInner = this.inner().sku(); + + boolean isDifferent = currentSkuInner == null || !currentSkuInner.name().equals(newSkuInner.name()); + if (isDifferent) { + this.inner().withSku(newSkuInner); + if (newSkuInner.name().equals(SkuName.STANDARD)) { + newSkuInner.withCapacity(1); + } + } + return this; + } + + @Override + public EventHubNamespaceImpl withCurrentThroughputUnits(int units) { + this.setDefaultSkuIfNotSet(); + this.inner().sku().withCapacity(units); + return this; + } + + @Override + public EventHubNamespaceImpl withThroughputUnitsUpperLimit(int units) { + this.inner().withMaximumThroughputUnits(units); + return this; + } + + @Override + public void beforeGroupCreateOrUpdate() { + if (postRunTasks != null) { + addPostRunDependent(context -> postRunTasks.last()); + } + } + + @Override + public Mono createResourceAsync() { + return this.manager().inner().getNamespaces() + .createOrUpdateAsync(resourceGroupName(), name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Mono afterPostRunAsync(boolean isGroupFaulted) { + postRunTasks = null; + return Mono.empty(); + } + + @Override + public PagedFlux listEventHubsAsync() { + return this.manager().eventHubs().listByNamespaceAsync(resourceGroupName(), name()); + } + + @Override + public PagedFlux listAuthorizationRulesAsync() { + return this.manager().namespaceAuthorizationRules() + .listByNamespaceAsync(this.resourceGroupName(), this.name()); + } + + @Override + public PagedIterable listEventHubs() { + return this.manager().eventHubs().listByNamespace(resourceGroupName(), name()); + } + + @Override + public PagedIterable listAuthorizationRules() { + return this.manager().namespaceAuthorizationRules() + .listByNamespace(this.resourceGroupName(), this.name()); + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getNamespaces().getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + private void setDefaultSkuIfNotSet() { + if (this.inner().sku() == null) { + this.withSku(EventHubNamespaceSkuType.STANDARD); + } + } + + private void concatPostRunTask(Mono task) { + if (postRunTasks == null) { + postRunTasks = Flux.empty(); + } + postRunTasks = postRunTasks.concatWith(task); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespacesImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespacesImpl.java new file mode 100644 index 0000000000000..73b0236118b01 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespacesImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.NamespacesClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.EHNamespaceInner; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.TopLevelModifiableResourcesImpl; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRules; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaces; +import com.azure.resourcemanager.eventhubs.models.EventHubs; + +/** + * Implementation for {@link EventHubNamespaces}. + */ +public final class EventHubNamespacesImpl + extends TopLevelModifiableResourcesImpl< + EventHubNamespace, + EventHubNamespaceImpl, + EHNamespaceInner, + NamespacesClient, + EventHubsManager> + implements EventHubNamespaces { + + public EventHubNamespacesImpl(EventHubsManager manager) { + super(manager.inner().getNamespaces(), manager); + } + + @Override + protected EventHubNamespaceImpl wrapModel(String name) { + return new EventHubNamespaceImpl(name, new EHNamespaceInner(), this.manager()); + } + + @Override + protected EventHubNamespaceImpl wrapModel(EHNamespaceInner inner) { + return new EventHubNamespaceImpl(inner.name(), inner, this.manager()); + } + + @Override + public EventHubNamespaceImpl define(String name) { + return wrapModel(name); + } + + @Override + public EventHubNamespaceAuthorizationRules authorizationRules() { + return this.manager().namespaceAuthorizationRules(); + } + + @Override + public EventHubs eventHubs() { + return this.manager().eventHubs(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsImpl.java new file mode 100644 index 0000000000000..1bb8c3c577a50 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsImpl.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.EventHubsClient; +import com.azure.resourcemanager.eventhubs.fluent.inner.EventhubInner; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import com.azure.resourcemanager.storage.StorageManager; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationRules; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroups; +import com.azure.resourcemanager.eventhubs.models.EventHubs; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * Implementation for {@link EventHubs}. + */ +public final class EventHubsImpl extends WrapperImpl implements EventHubs { + private final EventHubsManager manager; + private final StorageManager storageManager; + + public EventHubsImpl(EventHubsManager manager, StorageManager storageManager) { + super(manager.inner().getEventHubs()); + this.manager = manager; + this.storageManager = storageManager; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public EventHubImpl define(String name) { + return new EventHubImpl(name, this.manager, this.storageManager); + } + + public EventHubAuthorizationRules authorizationRules() { + return this.manager().eventHubAuthorizationRules(); + } + + public EventHubConsumerGroups consumerGroups() { + return this.manager().consumerGroups(); + } + + @Override + public EventHub getById(String id) { + return getByIdAsync(id).block(); + } + + @Override + public Mono getByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + return getByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public Mono getByNameAsync(String resourceGroupName, String namespaceName, String name) { + return this.inner().getAsync(resourceGroupName, + namespaceName, + name) + .map(this::wrapModel); + } + + @Override + public EventHub getByName(String resourceGroupName, String namespaceName, String name) { + return getByNameAsync(resourceGroupName, namespaceName, name).block(); + } + + @Override + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + return inner() + .listByNamespace(resourceGroupName, namespaceName) + .mapPage(this::wrapModel); + } + + @Override + public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + return inner() + .listByNamespaceAsync(resourceGroupName, namespaceName) + .mapPage(this::wrapModel); + } + + @Override + public void deleteById(String id) { + deleteByIdAsync(id).block(); + } + + @Override + public Mono deleteByIdAsync(String id) { + Objects.requireNonNull(id); + ResourceId resourceId = ResourceId.fromString(id); + return deleteByNameAsync(resourceId.resourceGroupName(), + resourceId.parent().name(), + resourceId.name()); + } + + @Override + public Mono deleteByNameAsync(String resourceGroupName, String namespaceName, String name) { + return this.inner().deleteAsync(resourceGroupName, + namespaceName, + name); + } + + @Override + public void deleteByName(String resourceGroupName, String namespaceName, String name) { + deleteByNameAsync(resourceGroupName, namespaceName, name).block(); + } + + private EventHubImpl wrapModel(EventhubInner innerModel) { + return new EventHubImpl(innerModel.name(), innerModel, this.manager, this.storageManager); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NestedResourceImpl.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NestedResourceImpl.java new file mode 100644 index 0000000000000..76990ffffe50b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NestedResourceImpl.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.implementation; + +import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.model.Indexable; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.CreatableUpdatableImpl; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.IndexableRefreshableWrapperImpl; +import com.azure.resourcemanager.eventhubs.models.NestedResource; + +/** + * The implementation for {@link NestedResource}. + * (Internal use only) + * + * @param the fluent model of the nested resource + * @param the inner model of the nested resource + * @param the fluent model implementation of the nested resource + */ +public abstract class NestedResourceImpl< + FluentModelT extends Indexable, + InnerModelT extends ProxyResource, + FluentModelImplT extends IndexableRefreshableWrapperImpl> + extends CreatableUpdatableImpl + implements HasManager, NestedResource { + protected final EventHubsManager manager; + + NestedResourceImpl(final String name, final InnerModelT inner, EventHubsManager manager) { + super(name, inner); + this.manager = manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + if (this.inner().name() == null) { + return super.name(); + } else { + return this.inner().name(); + } + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.java new file mode 100644 index 0000000000000..8559de36833b9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.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.resourcemanager.eventhubs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AccessRights. */ +public final class AccessRights extends ExpandableStringEnum { + /** Static value Manage for AccessRights. */ + public static final AccessRights MANAGE = fromString("Manage"); + + /** Static value Send for AccessRights. */ + public static final AccessRights SEND = fromString("Send"); + + /** Static value Listen for AccessRights. */ + public static final AccessRights LISTEN = fromString("Listen"); + + /** + * Creates or finds a AccessRights from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccessRights. + */ + @JsonCreator + public static AccessRights fromString(String name) { + return fromString(name, AccessRights.class); + } + + /** @return known AccessRights values. */ + public static Collection values() { + return values(AccessRights.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AuthorizationRule.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AuthorizationRule.java new file mode 100644 index 0000000000000..040f7bb79cb48 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AuthorizationRule.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * The base type representing authorization rule of event hub namespace and event hub. + * + * @param the specific authorization rule type + */ +@Fluent +public interface AuthorizationRule> extends + NestedResource, HasInner, HasManager, + Refreshable { + /** + * @return rights associated with the authorization rule + */ + List rights(); + /** + * @return a representation of the deferred computation of this call, + * returning access keys (primary, secondary) and the connection strings + */ + Mono getKeysAsync(); + /** + * @return the access keys (primary, secondary) and the connection strings + */ + EventHubAuthorizationKey getKeys(); + /** + * Regenerates primary or secondary access keys. + * + * @param keyType the key to regenerate + * @return a representation of the deferred computation of this call, + * returning access keys (primary, secondary) and the connection strings + */ + Mono regenerateKeyAsync(KeyType keyType); + /** + * Regenerates primary or secondary keys. + * + * @param keyType the key to regenerate + * @return the access keys (primary, secondary) and the connection strings + */ + EventHubAuthorizationKey regenerateKey(KeyType keyType); + + /** + * Grouping of commons authorization rule definition stages shared + * between event hub namespace authorization rule and event hub authorization rule. + */ + interface DefinitionStages { + /** + * The stage of the event hub namespace or event hub authorization rule definition + * allowing to enable listen policy. + * + * @param the next stage of the definition + */ + interface WithListen { + /** + * Specifies that the rule should have listening access enabled. + * + * @return the next stage of the definition + */ + T withListenAccess(); + } + + /** + * The stage of the event hub namespace or event hub authorization rule definition + * allowing to enable send policy. + * + * @param the next stage of the definition + */ + interface WithSend { + /** + * Specifies that the rule should have sending access enabled. + * + * @return the next stage of the definition + */ + T withSendAccess(); + } + + /** + * The stage of the event hub namespace or event hub authorization rule definition + * allowing to enable manage policy. + * + * @param the next stage of the definition + */ + interface WithManage { + /** + * Specifies that the rule should have management access enabled. + * + * @return the next stage of the definition + */ + T withManageAccess(); + } + + /** + * The stage of the event hub namespace or event hub authorization rule definition + * allowing to enable send or manage policy. + * + * @param the next stage of the definition + */ + interface WithSendOrManage extends WithSend, WithManage { + } + + /** + * The stage of the event hub namespace or event hub authorization rule definition + * allowing to enable listen, send or manage policy. + * + * @param the next stage of the definition + */ + interface WithListenOrSendOrManage extends WithListen, WithSendOrManage { + /** + * Specifies that the rule should have sending and listening access enabled. + * + * @return the next stage of the definition + */ + T withSendAndListenAccess(); + } + } + + /** + * Grouping of commons authorization rule update stages shared + * between event hub namespace authorization rule and event hub authorization rule. + */ + interface UpdateStages { + /** + * The stage of the event hub namespace or event hub authorization rule update + * allowing to enable listen policy. + * + * @param the next stage of the update + */ + interface WithListen { + /** + * Specifies that the rule should have listening access enabled. + * + * @return the next stage of the update + */ + T withListenAccess(); + } + + /** + * The stage of the event hub namespace or event hub authorization rule update + * allowing to enable send policy. + * + * @param the next stage of the update + */ + interface WithSend { + /** + * Specifies that the rule should have sending access enabled. + * + * @return the next stage of the update + */ + T withSendAccess(); + } + + /** + * The stage of event hub namespace or event hub authorization rule update + * allowing to enable manage policy. + * + * @param the next stage of the update + */ + interface WithManage { + /** + * Specifies that the rule should have sending access enabled. + * + * @return the next stage of the update + */ + T withManageAccess(); + } + + /** + * The stage of the event hub namespace or event hub authorization rule update + * allowing to enable send or manage policy. + * + * @param the next stage of the update + */ + interface WithSendOrManage extends WithSend, WithManage { + } + + /** + * The stage of the event hub namespace or event hub authorization rule update + * allowing to enable listen, send or manage policy. + * + * @param the next stage of the update + */ + interface WithListenOrSendOrManage extends WithListen, WithSendOrManage { + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/CaptureDescription.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/CaptureDescription.java new file mode 100644 index 0000000000000..235a2e0a4995d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/CaptureDescription.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.resourcemanager.eventhubs.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; + +/** The CaptureDescription model. */ +@Fluent +public final class CaptureDescription { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CaptureDescription.class); + + /* + * A value that indicates whether capture description is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Enumerates the possible values for the encoding format of capture + * description. Note: 'AvroDeflate' will be deprecated in New API Version + */ + @JsonProperty(value = "encoding") + private EncodingCaptureDescription encoding; + + /* + * The time window allows you to set the frequency with which the capture + * to Azure Blobs will happen, value should between 60 to 900 seconds + */ + @JsonProperty(value = "intervalInSeconds") + private Integer intervalInSeconds; + + /* + * The size window defines the amount of data built up in your Event Hub + * before an capture operation, value should be between 10485760 to + * 524288000 bytes + */ + @JsonProperty(value = "sizeLimitInBytes") + private Integer sizeLimitInBytes; + + /* + * Properties of Destination where capture will be stored. (Storage + * Account, Blob Names) + */ + @JsonProperty(value = "destination") + private Destination destination; + + /* + * A value that indicates whether to Skip Empty Archives + */ + @JsonProperty(value = "skipEmptyArchives") + private Boolean skipEmptyArchives; + + /** + * Get the enabled property: A value that indicates whether capture description is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: A value that indicates whether capture description is enabled. + * + * @param enabled the enabled value to set. + * @return the CaptureDescription object itself. + */ + public CaptureDescription withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the encoding property: Enumerates the possible values for the encoding format of capture description. Note: + * 'AvroDeflate' will be deprecated in New API Version. + * + * @return the encoding value. + */ + public EncodingCaptureDescription encoding() { + return this.encoding; + } + + /** + * Set the encoding property: Enumerates the possible values for the encoding format of capture description. Note: + * 'AvroDeflate' will be deprecated in New API Version. + * + * @param encoding the encoding value to set. + * @return the CaptureDescription object itself. + */ + public CaptureDescription withEncoding(EncodingCaptureDescription encoding) { + this.encoding = encoding; + return this; + } + + /** + * Get the intervalInSeconds property: The time window allows you to set the frequency with which the capture to + * Azure Blobs will happen, value should between 60 to 900 seconds. + * + * @return the intervalInSeconds value. + */ + public Integer intervalInSeconds() { + return this.intervalInSeconds; + } + + /** + * Set the intervalInSeconds property: The time window allows you to set the frequency with which the capture to + * Azure Blobs will happen, value should between 60 to 900 seconds. + * + * @param intervalInSeconds the intervalInSeconds value to set. + * @return the CaptureDescription object itself. + */ + public CaptureDescription withIntervalInSeconds(Integer intervalInSeconds) { + this.intervalInSeconds = intervalInSeconds; + return this; + } + + /** + * Get the sizeLimitInBytes property: The size window defines the amount of data built up in your Event Hub before + * an capture operation, value should be between 10485760 to 524288000 bytes. + * + * @return the sizeLimitInBytes value. + */ + public Integer sizeLimitInBytes() { + return this.sizeLimitInBytes; + } + + /** + * Set the sizeLimitInBytes property: The size window defines the amount of data built up in your Event Hub before + * an capture operation, value should be between 10485760 to 524288000 bytes. + * + * @param sizeLimitInBytes the sizeLimitInBytes value to set. + * @return the CaptureDescription object itself. + */ + public CaptureDescription withSizeLimitInBytes(Integer sizeLimitInBytes) { + this.sizeLimitInBytes = sizeLimitInBytes; + return this; + } + + /** + * Get the destination property: Properties of Destination where capture will be stored. (Storage Account, Blob + * Names). + * + * @return the destination value. + */ + public Destination destination() { + return this.destination; + } + + /** + * Set the destination property: Properties of Destination where capture will be stored. (Storage Account, Blob + * Names). + * + * @param destination the destination value to set. + * @return the CaptureDescription object itself. + */ + public CaptureDescription withDestination(Destination destination) { + this.destination = destination; + return this; + } + + /** + * Get the skipEmptyArchives property: A value that indicates whether to Skip Empty Archives. + * + * @return the skipEmptyArchives value. + */ + public Boolean skipEmptyArchives() { + return this.skipEmptyArchives; + } + + /** + * Set the skipEmptyArchives property: A value that indicates whether to Skip Empty Archives. + * + * @param skipEmptyArchives the skipEmptyArchives value to set. + * @return the CaptureDescription object itself. + */ + public CaptureDescription withSkipEmptyArchives(Boolean skipEmptyArchives) { + this.skipEmptyArchives = skipEmptyArchives; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (destination() != null) { + destination().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/CheckNameAvailabilityParameter.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/CheckNameAvailabilityParameter.java new file mode 100644 index 0000000000000..4020d1bf78724 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/CheckNameAvailabilityParameter.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.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; + +/** The CheckNameAvailabilityParameter model. */ +@Fluent +public final class CheckNameAvailabilityParameter { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityParameter.class); + + /* + * Name to check the namespace name availability + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the name property: Name to check the namespace name availability. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name to check the namespace name availability. + * + * @param name the name value to set. + * @return the CheckNameAvailabilityParameter object itself. + */ + public CheckNameAvailabilityParameter withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model CheckNameAvailabilityParameter")); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java new file mode 100644 index 0000000000000..5d962ea58189f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DefaultAction. */ +public final class DefaultAction extends ExpandableStringEnum { + /** Static value Allow for DefaultAction. */ + public static final DefaultAction ALLOW = fromString("Allow"); + + /** Static value Deny for DefaultAction. */ + public static final DefaultAction DENY = fromString("Deny"); + + /** + * Creates or finds a DefaultAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultAction. + */ + @JsonCreator + public static DefaultAction fromString(String name) { + return fromString(name, DefaultAction.class); + } + + /** @return known DefaultAction values. */ + public static Collection values() { + return values(DefaultAction.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java new file mode 100644 index 0000000000000..7a854d7b75081 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Destination model. */ +@JsonFlatten +@Fluent +public class Destination { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Destination.class); + + /* + * Name for capture destination + */ + @JsonProperty(value = "name") + private String name; + + /* + * Resource id of the storage account to be used to create the blobs + */ + @JsonProperty(value = "properties.storageAccountResourceId") + private String storageAccountResourceId; + + /* + * Blob container Name + */ + @JsonProperty(value = "properties.blobContainer") + private String blobContainer; + + /* + * Blob naming convention for archive, e.g. + * {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. + * Here all the parameters (Namespace,EventHub .. etc) are mandatory + * irrespective of order + */ + @JsonProperty(value = "properties.archiveNameFormat") + private String archiveNameFormat; + + /** + * Get the name property: Name for capture destination. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name for capture destination. + * + * @param name the name value to set. + * @return the Destination object itself. + */ + public Destination withName(String name) { + this.name = name; + return this; + } + + /** + * Get the storageAccountResourceId property: Resource id of the storage account to be used to create the blobs. + * + * @return the storageAccountResourceId value. + */ + public String storageAccountResourceId() { + return this.storageAccountResourceId; + } + + /** + * Set the storageAccountResourceId property: Resource id of the storage account to be used to create the blobs. + * + * @param storageAccountResourceId the storageAccountResourceId value to set. + * @return the Destination object itself. + */ + public Destination withStorageAccountResourceId(String storageAccountResourceId) { + this.storageAccountResourceId = storageAccountResourceId; + return this; + } + + /** + * Get the blobContainer property: Blob container Name. + * + * @return the blobContainer value. + */ + public String blobContainer() { + return this.blobContainer; + } + + /** + * Set the blobContainer property: Blob container Name. + * + * @param blobContainer the blobContainer value to set. + * @return the Destination object itself. + */ + public Destination withBlobContainer(String blobContainer) { + this.blobContainer = blobContainer; + return this; + } + + /** + * Get the archiveNameFormat property: Blob naming convention for archive, e.g. + * {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters + * (Namespace,EventHub .. etc) are mandatory irrespective of order. + * + * @return the archiveNameFormat value. + */ + public String archiveNameFormat() { + return this.archiveNameFormat; + } + + /** + * Set the archiveNameFormat property: Blob naming convention for archive, e.g. + * {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters + * (Namespace,EventHub .. etc) are mandatory irrespective of order. + * + * @param archiveNameFormat the archiveNameFormat value to set. + * @return the Destination object itself. + */ + public Destination withArchiveNameFormat(String archiveNameFormat) { + this.archiveNameFormat = archiveNameFormat; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationKey.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationKey.java new file mode 100644 index 0000000000000..37757c5056e1c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationKey.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; + +/** + * Type representing access key of {@link DisasterRecoveryPairingAuthorizationRule}. + */ +@Fluent +public interface DisasterRecoveryPairingAuthorizationKey + extends HasInner { + /** + * @return primary access key + */ + String primaryKey(); + + /** + * @return secondary access key + */ + String secondaryKey(); + + /** + * @return primary connection string + */ + String primaryConnectionString(); + + /** + * @return secondary connection string + */ + String secondaryConnectionString(); + + /** + * @return alias primary connection string + */ + String aliasPrimaryConnectionString(); + + /** + * @return alias secondary connection string + */ + String aliasSecondaryConnectionString(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationRule.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationRule.java new file mode 100644 index 0000000000000..7d287437b2f02 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationRule.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasName; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * Type representing authorization rule of {@link EventHubDisasterRecoveryPairing}. + */ +@Fluent +public interface DisasterRecoveryPairingAuthorizationRule + extends HasName, HasInner, HasManager { + /** + * @return rights associated with the rule + */ + List rights(); + + /** + * @return an observable that emits a single entity containing access keys (primary and secondary) + */ + Mono getKeysAsync(); + /** + * @return entity containing access keys (primary and secondary) + */ + DisasterRecoveryPairingAuthorizationKey getKeys(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationRules.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationRules.java new file mode 100644 index 0000000000000..faa733a81c2a3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DisasterRecoveryPairingAuthorizationRules.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.fluent.DisasterRecoveryConfigsClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import reactor.core.publisher.Mono; + +/** + * Entry point to manage disaster recovery pairing authorization rules. + */ +@Fluent +public interface DisasterRecoveryPairingAuthorizationRules extends + SupportsGettingById, + HasInner, + HasManager { + /** + * Lists the authorization rules that can be used to access the disaster recovery pairing. + * + * @param resourceGroupName resource group name + * @param namespaceName primary namespace name + * @param pairingName pairing name + * @return list of authorization rules + */ + PagedIterable listByDisasterRecoveryPairing( + String resourceGroupName, String namespaceName, String pairingName); + + /** + * Lists the authorization rules that can be used to access the disaster recovery pairing. + * + * @param resourceGroupName resource group name + * @param namespaceName primary namespace name + * @param pairingName pairing name + * @return observable that emits the authorization rules + */ + PagedFlux listByDisasterRecoveryPairingAsync( + String resourceGroupName, String namespaceName, String pairingName); + + /** + * Gets an authorization rule that can be used to access the disaster recovery pairing. + * + * @param resourceGroupName resource group name + * @param namespaceName primary namespace name + * @param pairingName pairing name + * @param name rule name + * @return observable that emits the authorization rule + */ + Mono getByNameAsync( + String resourceGroupName, String namespaceName, String pairingName, String name); + + /** + * Gets an authorization rule that can be used to access the disaster recovery pairing. + * + * @param resourceGroupName resource group name + * @param namespaceName primary namespace name + * @param pairingName pairing name + * @param name rule name + * @return the authorization rule + */ + DisasterRecoveryPairingAuthorizationRule getByName( + String resourceGroupName, String namespaceName, String pairingName, String name); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java new file mode 100644 index 0000000000000..11764288e7607 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for EncodingCaptureDescription. */ +public enum EncodingCaptureDescription { + /** Enum value Avro. */ + AVRO("Avro"), + + /** Enum value AvroDeflate. */ + AVRO_DEFLATE("AvroDeflate"); + + /** The actual serialized value for a EncodingCaptureDescription instance. */ + private final String value; + + EncodingCaptureDescription(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncodingCaptureDescription instance. + * + * @param value the serialized value to parse. + * @return the parsed EncodingCaptureDescription object, or null if unable to parse. + */ + @JsonCreator + public static EncodingCaptureDescription fromString(String value) { + EncodingCaptureDescription[] items = EncodingCaptureDescription.values(); + for (EncodingCaptureDescription item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java new file mode 100644 index 0000000000000..79dcc844a38e5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for EntityStatus. */ +public enum EntityStatus { + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value Restoring. */ + RESTORING("Restoring"), + + /** Enum value SendDisabled. */ + SEND_DISABLED("SendDisabled"), + + /** Enum value ReceiveDisabled. */ + RECEIVE_DISABLED("ReceiveDisabled"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Renaming. */ + RENAMING("Renaming"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a EntityStatus instance. */ + private final String value; + + EntityStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EntityStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed EntityStatus object, or null if unable to parse. + */ + @JsonCreator + public static EntityStatus fromString(String value) { + EntityStatus[] items = EntityStatus.values(); + for (EntityStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHub.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHub.java new file mode 100644 index 0000000000000..d2017d3f269d2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHub.java @@ -0,0 +1,548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.EventhubInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import com.azure.resourcemanager.storage.models.StorageAccount; + +import java.util.Set; + +/** + * Type representing an Azure EventHub. + */ +@Fluent +public interface EventHub extends + NestedResource, + HasManager, + Refreshable, + Updatable, + HasInner { + /** + * @return the resource group of the parent namespace + */ + String namespaceResourceGroupName(); + + /** + * @return name of the parent namespace + */ + String namespaceName(); + + /** + * @return true if the data capture enabled for the event hub events, false otherwise + */ + boolean isDataCaptureEnabled(); + + /** + * @return configured window in seconds to be used for event capturing when capturing is enabled + */ + int dataCaptureWindowSizeInSeconds(); + + /** + * @return configured window in MB to be used for event capturing when capturing is enabled + */ + int dataCaptureWindowSizeInMB(); + + /** + * @return whether to skip empty archives when capturing is enabled + */ + boolean dataCaptureSkipEmptyArchives(); + + /** + * @return the format file name that stores captured data when capturing is enabled + */ + String dataCaptureFileNameFormat(); + + /** + * @return description of the destination where captured data will be stored + */ + Destination captureDestination(); + + /** + * @return the partition identifiers + */ + Set partitionIds(); + + /** + * @return retention period of events in days + */ + int messageRetentionPeriodInDays(); + + /** + * @return consumer group in the event hub + */ + PagedFlux listConsumerGroupsAsync(); + /** + * @return authorization rules enabled for the event hub + */ + PagedFlux listAuthorizationRulesAsync(); + /** + * @return consumer group in the event hub + */ + PagedIterable listConsumerGroups(); + /** + * @return authorization rules enabled for the event hub + */ + PagedIterable listAuthorizationRules(); + + /** + * The entirety of the event hub definition. + */ + interface Definition extends + DefinitionStages.Blank, + DefinitionStages.WithNamespace, + DefinitionStages.WithCaptureProviderOrCreate, + DefinitionStages.WithCaptureEnabledDisabled, + DefinitionStages.WithCaptureOptionalSettingsOrCreate, + DefinitionStages.WithCreate { + } + + /** + * Grouping of event hub definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a event hub definition. + */ + interface Blank extends WithNamespace { + } + + /** + * The stage of the event hub definition allowing to specify the name space in which + * event hub needs to be created. + */ + interface WithNamespace { + /** + * Specifies the new namespace in which event hub needs to be created. + * + * @param namespaceCreatable namespace creatable definition + * @return next stage of the event hub definition + */ + WithCaptureProviderOrCreate withNewNamespace(Creatable namespaceCreatable); + + /** + * Specifies an existing event hub namespace in which event hub needs to be created. + * + * @param namespace event hub namespace + * @return next stage of the event hub definition + */ + WithCaptureProviderOrCreate withExistingNamespace(EventHubNamespace namespace); + + /** + * Specifies an existing event hub namespace in which event hub needs to be created. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub namespace + * @return next stage of the event hub definition + */ + WithCaptureProviderOrCreate withExistingNamespace(String resourceGroupName, String namespaceName); + + /** + * Specifies id of an existing event hub namespace in which event hub needs to be created. + * + * @param namespaceId event hub namespace resource id + * @return next stage of the event hub definition + */ + WithCaptureProviderOrCreate withExistingNamespaceId(String namespaceId); + } + + /** + * The stage of the event hub definition allowing to specify provider to store captured data + * when data capturing is enabled. + */ + interface WithCaptureProviderOrCreate extends WithCreate { + /** + * Specifies a new storage account to store the captured data when data capturing is enabled. + * + * @param storageAccountCreatable creatable storage account definition + * @param containerName container to store the files containing captured data + * @return next stage of the event hub definition + */ + WithCaptureEnabledDisabled withNewStorageAccountForCapturedData( + Creatable storageAccountCreatable, String containerName); + + /** + * Specifies an existing storage account to store the captured data when data capturing is enabled. + * + * @param storageAccount storage account + * @param containerName an existing or new container to store the files containing captured data + * @return next stage of the event hub definition + */ + WithCaptureEnabledDisabled withExistingStorageAccountForCapturedData( + StorageAccount storageAccount, String containerName); + + /** + * Specifies an existing storage account to store the captured data when data capturing is enabled. + * + * @param storageAccountId storage account arm id + * @param containerName an existing or new container to store the files containing captured data + * @return next stage of the event hub definition + */ + WithCaptureEnabledDisabled withExistingStorageAccountForCapturedData( + String storageAccountId, String containerName); + } + + /** + * The stage of the event hub definition allowing to enable or disable data capturing. + */ + interface WithCaptureEnabledDisabled { + /** + * Specifies that data capture should be enabled for the event hub. + * + * @return next stage of the event hub definition + */ + WithCaptureOptionalSettingsOrCreate withDataCaptureEnabled(); + + /** + * Specifies that data capture should be disabled for the event hub. + * + * @return next stage of the event hub definition + */ + WithCaptureOptionalSettingsOrCreate withDataCaptureDisabled(); + } + + /** + * The stage of the event hub definition allowing to configure data capturing. + */ + interface WithCaptureOptionalSettingsOrCreate extends WithCreate { + /** + * Specifies the capture window size in seconds. + * + * @param sizeInSeconds window size in seconds + * @return next stage of the event hub definition + */ + WithCaptureOptionalSettingsOrCreate withDataCaptureWindowSizeInSeconds(int sizeInSeconds); + + /** + * Set a value that indicates whether to Skip Empty Archives. + * + * @param skipEmptyArchives the skipEmptyArchives value to set + * @return next stage of the event hub definition + */ + WithCaptureOptionalSettingsOrCreate withDataCaptureSkipEmptyArchives(Boolean skipEmptyArchives); + + /** + * Specifies the capture window size in MB. + * + * @param sizeInMB window size in MB + * @return next stage of the event hub definition + */ + WithCaptureOptionalSettingsOrCreate withDataCaptureWindowSizeInMB(int sizeInMB); + + /** + * Specifies file name format containing captured data. + * + * @param format the file name format + * @return next stage of the event hub definition + */ + WithCaptureOptionalSettingsOrCreate withDataCaptureFileNameFormat(String format); + } + + /** + * The stage of the event hub definition allowing to add authorization rule for accessing + * the event hub. + */ + interface WithAuthorizationRule { + /** + * Specifies that a new authorization rule should be created that has send access to the event hub. + * + * @param ruleName rule name + * @return next stage of the event hub definition + */ + WithCreate withNewSendRule(String ruleName); + + /** + * Specifies that a new authorization rule should be created that has listen access to the event hub. + * + * @param ruleName rule name + * @return next stage of the event hub definition + */ + WithCreate withNewListenRule(String ruleName); + + /** + * Specifies that a new authorization rule should be created + * that has send and listen access to the event hub. + * + * @param ruleName rule name + * @return next stage of the event hub definition + */ + WithCreate withNewSendAndListenRule(String ruleName); + + /** + * Specifies that a new authorization rule should be created that has manage access to the event hub. + * + * @param ruleName rule name + * @return next stage of the event hub definition + */ + WithCreate withNewManageRule(String ruleName); + } + + /** + * The stage of the event hub definition allowing to add consumer group for the event hub. + */ + interface WithConsumerGroup { + /** + * Specifies that a new consumer group should be created for the event hub. + * + * @param name consumer group name + * @return next stage of the event hub definition + */ + WithCreate withNewConsumerGroup(String name); + + /** + * Specifies that a new consumer group should be created for the event hub. + * + * @param name consumer group name + * @param metadata consumer group metadata + * @return next stage of the event hub definition + */ + WithCreate withNewConsumerGroup(String name, String metadata); + } + + /** + * The stage of the event hub definition allowing to specify partition count for event hub. + */ + interface WithPartitionCount { + /** + * Specifies the number of partitions in the event hub. + * + * @param count partitions count + * @return next stage of the event hub definition + */ + WithCreate withPartitionCount(long count); + } + + /** + * The stage of the event hub definition allowing to specify retention period for event hub events. + */ + interface WithRetentionPeriod { + /** + * Specifies the retention period for events in days. + * + * @param period retention period + * @return next stage of the event hub definition + */ + WithCreate withRetentionPeriodInDays(long period); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends + Creatable, + DefinitionStages.WithAuthorizationRule, + DefinitionStages.WithConsumerGroup, + DefinitionStages.WithPartitionCount, + DefinitionStages.WithRetentionPeriod { + } + } + + /** + * Grouping of event hub update stages. + */ + interface UpdateStages { + /** + * The stage of the event hub definition allowing to add an authorization rule for accessing + * the event hub. + */ + interface WithAuthorizationRule { + /** + * Specifies that a new authorization rule should be created that has send access to the event hub. + * + * @param name rule name + * @return next stage of the event hub update + */ + Update withNewSendRule(String name); + + /** + * Specifies that a new authorization rule should be created that has listen access to the event hub. + * + * @param name rule name + * @return next stage of the event hub update + */ + Update withNewListenRule(String name); + + /** + * Specifies that a new authorization rule should be created + * that has send and listen access to the event hub. + * + * @param name rule name + * @return next stage of the event hub update + */ + Update withNewSendAndListenRule(String name); + + /** + * Specifies that a new authorization rule should be created that has manage access to the event hub. + * + * @param name rule name + * @return next stage of the event hub update + */ + Update withNewManageRule(String name); + + /** + * Specifies that an authorization rule associated with the event hub should be deleted. + * + * @param ruleName rule name + * @return next stage of the event hub update + */ + Update withoutAuthorizationRule(String ruleName); + } + + /** + * The stage of the event hub update allowing to add consumer group for event hub. + */ + interface WithConsumerGroup { + /** + * Specifies that a new consumer group should be created for the event hub. + * + * @param name group name + * @return next stage of the event hub update + */ + Update withNewConsumerGroup(String name); + + /** + * Specifies that a new consumer group should be created for the event hub. + * + * @param name group name + * @param metadata group metadata + * @return next stage of the event hub update + */ + Update withNewConsumerGroup(String name, String metadata); + + /** + * Specifies that a consumer group associated with the event hub should be deleted. + * + * @param name group name + * @return next stage of the event hub update + */ + Update withoutConsumerGroup(String name); + } + + /** + * The stage of the event hub update allowing to configure data capture. + */ + interface WithCapture { + /** + * Specifies a new storage account to store the captured data when data capturing is enabled. + * + * @param storageAccountCreatable creatable storage account definition + * @param containerName container to store the files containing captured data + * @return next stage of the event hub update + */ + Update withNewStorageAccountForCapturedData( + Creatable storageAccountCreatable, String containerName); + + /** + * Specifies an existing storage account to store the captured data when data capturing is enabled. + * + * @param storageAccount storage account + * @param containerName an existing or new container to store the files containing captured data + * @return next stage of the event hub update + */ + Update withExistingStorageAccountForCapturedData(StorageAccount storageAccount, String containerName); + + /** + * Specifies an existing storage account to store the captured data when data capturing is enabled. + * + * @param storageAccountId storage account arm id + * @param containerName an existing or new container to store the files containing captured data + * @return next stage of the event hub update + */ + Update withExistingStorageAccountForCapturedData(String storageAccountId, String containerName); + + /** + * Specifies that data capture should be enabled for the event hub. + * + * @return next stage of the event hub update + */ + Update withDataCaptureEnabled(); + + /** + * Specifies that data capture should be disabled for the event hub. + * + * @return next stage of the event hub update + */ + Update withDataCaptureDisabled(); + + /** + * Specifies the capture window size in seconds. + * + * @param sizeInSeconds window size in seconds + * @return next stage of the event hub update + */ + Update withDataCaptureWindowSizeInSeconds(int sizeInSeconds); + + /** + * Specified the capture whether to Skip Empty Archives. + * + * @param skipEmptyArchives the skipEmptyArchives value to set + * @return next stage of the event hub update + */ + Update withDataCaptureSkipEmptyArchives(Boolean skipEmptyArchives); + + /** + * Specifies the capture window size in MB. + * + * @param sizeInMB window size in MB + * @return next stage of the event hub update + */ + Update withDataCaptureWindowSizeInMB(int sizeInMB); + /** + * Specifies the format of the file containing captured data. + * + * @param format the file name format + * @return next stage of the event hub update + */ + Update withDataCaptureFileNameFormat(String format); + } + + /** + * The stage of the event hub update allowing to specify partition count for event hub. + */ + interface WithPartitionCount { + /** + * Specifies the number of partitions in the event hub. + * + * @param count partitions count + * @return next stage of the event hub update + */ + Update withPartitionCount(long count); + } + + /** + * The stage of the event hub definition allowing to specify retention period for event hub events. + */ + interface WithRetentionPeriod { + /** + * Specifies the retention period for events in days. + * + * @param period retention period + * @return next stage of the event hub update + */ + Update withRetentionPeriodInDays(long period); + } + } + + /** + * The template for a event hub update operation, containing all the settings that can be modified. + */ + interface Update extends + Appliable, + UpdateStages.WithConsumerGroup, + UpdateStages.WithAuthorizationRule, + UpdateStages.WithCapture, + UpdateStages.WithPartitionCount, + UpdateStages.WithRetentionPeriod { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationKey.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationKey.java new file mode 100644 index 0000000000000..2f80d57916014 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationKey.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; + +/** + * Type representing access key of {@link EventHubNamespaceAuthorizationRule}. + */ +@Fluent +public interface EventHubAuthorizationKey + extends HasInner { + /** + * @return primary access key + */ + String primaryKey(); + + /** + * @return secondary access key + */ + String secondaryKey(); + + /** + * @return primary connection string + */ + String primaryConnectionString(); + + /** + * @return secondary connection string + */ + String secondaryConnectionString(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationRule.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationRule.java new file mode 100644 index 0000000000000..b53c2c0f6b56d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationRule.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; + +/** + * Type representing authorization rule of an event hub. + */ +@Fluent +public interface EventHubAuthorizationRule + extends + AuthorizationRule { + /** + * @return the resource group of the namespace where parent event hub resides + */ + String namespaceResourceGroupName(); + /** + * @return the namespace name of parent event hub + */ + String namespaceName(); + /** + * @return the name of the parent event hub + */ + String eventHubName(); + + /** + * Grouping of event hub authorization rule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of event hub authorization rule definition. + */ + interface Blank extends WithEventHub { + } + + /** + * Stage of the authorization rule definition allowing to specify the event for which rule needs to be created. + */ + interface WithEventHub { + /** + * Specifies that authorization rule needs to be created for the given event hub. + * + * @param eventHubResourceId the resource id of the event Hub + * @return the next stage of the definition + */ + WithAccessPolicy withExistingEventHubId(String eventHubResourceId); + /** + * Specifies that authorization rule needs to be created for the given event hub. + * + * @param resourceGroupName event hub namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @return the next stage of the definition + */ + WithAccessPolicy withExistingEventHub(String resourceGroupName, String namespaceName, String eventHubName); + /** + * Specifies that authorization rule needs to be created for the given event hub. + * + * @param eventHub the event hub + * @return the next stage of the definition + */ + WithAccessPolicy withExistingEventHub(EventHub eventHub); + } + + /** + * Stage of the authorization rule definition allowing to specify access policy. + */ + interface WithAccessPolicy extends AuthorizationRule + .DefinitionStages + .WithListenOrSendOrManage { + + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + + /** + * The entirety of the event hub namespace authorization rule definition. + */ + interface Definition extends + DefinitionStages.Blank, + DefinitionStages.WithEventHub, + DefinitionStages.WithAccessPolicy, + DefinitionStages.WithCreate { + } + + /** + * The entirety of the event hub authorization rule update. + */ + interface Update extends + Appliable, + UpdateStages.WithListenOrSendOrManage { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationRules.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationRules.java new file mode 100644 index 0000000000000..367d708b6efce --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubAuthorizationRules.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.EventHubsClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import reactor.core.publisher.Mono; + +/** + * Entry point to manage event hub authorization rules. + */ +@Fluent +public interface EventHubAuthorizationRules extends + SupportsCreating, + SupportsDeletingById, + SupportsGettingById, + HasInner, + HasManager { + /** + * Lists the authorization rules of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @return list of authorization rules + */ + PagedIterable listByEventHub( + String resourceGroupName, String namespaceName, String eventHubName); + /** + * Lists the authorization rules of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @return observable that emits the authorization rules + */ + PagedFlux listByEventHubAsync( + String resourceGroupName, String namespaceName, String eventHubName); + /** + * Gets an authorization rule of an event hub in a namespace in a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @param name authorization rule name + * @return observable that emits the authorization rule + */ + Mono getByNameAsync( + String resourceGroupName, String namespaceName, String eventHubName, String name); + /** + * Gets an authorization rule of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @param name authorization rule name + * @return the authorization rule + */ + EventHubAuthorizationRule getByName( + String resourceGroupName, String namespaceName, String eventHubName, String name); + + /** + * Deletes an authorization rule of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @param name authorization rule name + * @return the completable representing the task + */ + Mono deleteByNameAsync( + String resourceGroupName, String namespaceName, String eventHubName, String name); + + /** + * Deletes an authorization rule of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @param name authorization rule name + */ + void deleteByName(String resourceGroupName, String namespaceName, String eventHubName, String name); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubConsumerGroup.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubConsumerGroup.java new file mode 100644 index 0000000000000..f4de8cf4bc5b7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubConsumerGroup.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.inner.ConsumerGroupInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; + +import java.time.OffsetDateTime; + +/** + * Type representing consumer group of an event hub. + */ +@Fluent +public interface EventHubConsumerGroup extends + NestedResource, + HasManager, + Refreshable, + HasInner, + Updatable { + /** + * @return the resource group of the namespace where parent event hub resides + */ + String namespaceResourceGroupName(); + + /** + * @return the namespace name of parent event hub + */ + String namespaceName(); + + /** + * @return the name of the parent event hub + */ + String eventHubName(); + + /** + * @return creation time of the consumer group + */ + OffsetDateTime createdAt(); + + /** + * @return last modified time of the consumer group + */ + OffsetDateTime updatedAt(); + + /** + * @return user metadata associated with the consumer group + */ + String userMetadata(); + + /** + * The entirety of the consumer group definition. + */ + interface Definition extends + DefinitionStages.Blank, + DefinitionStages.WithEventHub, + DefinitionStages.WithUserMetadata, + DefinitionStages.WithCreate { + } + + /** + * Grouping of consumer group definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a event hub definition. + */ + interface Blank extends WithEventHub { + } + + /** + * The stage of the consumer group definition allowing to specify the event + * hub to be associated with it. + */ + interface WithEventHub { + /** + * Specifies the event hub for which consumer group needs to be created. + * + * @param eventHub event hub + * @return next stage of the consumer group definition + */ + WithCreate withExistingEventHub(EventHub eventHub); + + /** + * Specifies the event hub for which consumer group needs to be created. + * + * @param eventHubId ARM resource id of event hub + * @return next stage of the consumer group definition + */ + WithCreate withExistingEventHubId(String eventHubId); + + /** + * Specifies the event hub for which consumer group needs to be created. + * + * @param resourceGroupName event hub namespace resource group name + * @param namespaceName event hub namespace name + * @param eventHubName event hub name + * @return next stage of the consumer group definition + */ + WithCreate withExistingEventHub(String resourceGroupName, String namespaceName, String eventHubName); + } + + /** + * The stage of the consumer group definition allowing to specify user metadata. + */ + interface WithUserMetadata { + /** + * Specifies user metadata. + * + * @param metadata the metadata + * @return next stage of the consumer group definition + */ + WithCreate withUserMetadata(String metadata); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends + Creatable, + DefinitionStages.WithUserMetadata { + } + } + + /** + * The template for a consumer group update operation, containing all the settings + * that can be modified. + */ + interface Update extends + Appliable, + UpdateStages.WithUserMetadata { + } + + /** + * Grouping of consumer group update stages. + */ + interface UpdateStages { + /** + * The stage of the consumer group update allowing to specify user metadata. + */ + interface WithUserMetadata { + /** + * Specifies user metadata. + * + * @param metadata the metadata + * @return next stage of the consumer group update + */ + Update withUserMetadata(String metadata); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubConsumerGroups.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubConsumerGroups.java new file mode 100644 index 0000000000000..06d8bf59c5362 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubConsumerGroups.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.ConsumerGroupsClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import reactor.core.publisher.Mono; + +/** + * Entry point to manage event hub consumer groups. + */ +@Fluent +public interface EventHubConsumerGroups extends + SupportsCreating, + SupportsDeletingById, + SupportsGettingById, + HasInner, + HasManager { + /** + * Lists the consumer groups of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @return list of consumer groups + */ + PagedIterable listByEventHub( + String resourceGroupName, String namespaceName, String eventHubName); + + /** + * Lists the consumer groups of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @return observable that emits the consumer groups + */ + PagedFlux listByEventHubAsync( + String resourceGroupName, String namespaceName, String eventHubName); + + /** + * Gets a consumer group of an event hub in a namespace in a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @param name consumer group name + * @return observable that emits the consumer group + */ + Mono getByNameAsync( + String resourceGroupName, String namespaceName, String eventHubName, String name); + + /** + * Gets a consumer group of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @param name consumer group name + * @return the consumer group + */ + EventHubConsumerGroup getByName( + String resourceGroupName, String namespaceName, String eventHubName, String name); + + /** + * Deletes a consumer group of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @param name consumer group name + * @return the completable representing the task + */ + Mono deleteByNameAsync( + String resourceGroupName, String namespaceName, String eventHubName, String name); + + /** + * Deletes a consumer group of an event hub in a namespace under a resource group. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName event hub parent namespace name + * @param eventHubName event hub name + * @param name consumer group name + */ + void deleteByName( + String resourceGroupName, String namespaceName, String eventHubName, String name); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubDisasterRecoveryPairing.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubDisasterRecoveryPairing.java new file mode 100644 index 0000000000000..e83cad48ebc05 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubDisasterRecoveryPairing.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.fluent.inner.ArmDisasterRecoveryInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import reactor.core.publisher.Mono; + +/** + * Type representing disaster recovery pairing for event hub namespaces. + */ +@Fluent +public interface EventHubDisasterRecoveryPairing extends + NestedResource, + HasManager, + Refreshable, + Updatable, + HasInner { + /** + * @return primary event hub namespace resource group + */ + String primaryNamespaceResourceGroupName(); + + /** + * @return primary event hub namespace in the pairing + */ + String primaryNamespaceName(); + + /** + * @return secondary event hub namespace in the pairing + */ + String secondaryNamespaceId(); + + /** + * @return the namespace role + */ + RoleDisasterRecovery namespaceRole(); + + /** + * @return provisioning state of the pairing + */ + ProvisioningStateDR provisioningState(); + + /** + * Break the pairing between a primary and secondary namespace. + * + * @return completable representing the pairing break action + */ + Mono breakPairingAsync(); + + /** + * Break the pairing between a primary and secondary namespace. + */ + void breakPairing(); + + /** + * Perform fail over so that the secondary namespace becomes the primary. + * + * @return completable representing the fail-over action + */ + Mono failOverAsync(); + + /** + * Perform fail over so that the secondary namespace becomes the primary. + */ + void failOver(); + + /** + * @return the authorization rules for the event hub disaster recovery pairing + */ + PagedFlux listAuthorizationRulesAsync(); + + /** + * @return the authorization rules for the event hub disaster recovery pairing + */ + PagedIterable listAuthorizationRules(); + + /** + * The entirety of the event hub disaster recovery pairing definition. + */ + interface Definition extends + DefinitionStages.Blank, + DefinitionStages.WithPrimaryNamespace, + DefinitionStages.WithSecondaryNamespace, + DefinitionStages.WithCreate { + } + + /** + * Grouping of disaster recovery pairing definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a disaster recovery pairing definition. + */ + interface Blank extends WithPrimaryNamespace { + } + + /** + * The stage of the disaster recovery pairing definition allowing to specify primary event hub namespace. + */ + interface WithPrimaryNamespace { + /** + * Specifies that the given namespace should be used as primary namespace in disaster recovery pairing. + * + * @param namespaceCreatable creatable definition for the primary namespace + * @return next stage of the disaster recovery pairing definition + */ + WithSecondaryNamespace withNewPrimaryNamespace(Creatable namespaceCreatable); + + /** + * Specifies that the given namespace should be used as primary namespace in disaster recovery pairing. + * + * @param namespace the primary event hub namespace + * @return next stage of the disaster recovery pairing definition + */ + WithSecondaryNamespace withExistingPrimaryNamespace(EventHubNamespace namespace); + + /** + * Specifies that the given namespace should be used as primary namespace in disaster recovery pairing. + * + * @param resourceGroupName resource group name of primary namespace + * @param namespaceName the primary namespace + * @return next stage of the disaster recovery pairing definition + */ + WithSecondaryNamespace withExistingPrimaryNamespace(String resourceGroupName, String namespaceName); + + /** + * Specifies that the given namespace should be used as primary namespace in disaster recovery pairing. + * + * @param namespaceId the primary namespace + * @return next stage of the disaster recovery pairing definition + */ + WithSecondaryNamespace withExistingPrimaryNamespaceId(String namespaceId); + } + + /** + * The stage of the disaster recovery pairing definition allowing to specify the secondary event hub namespace. + */ + interface WithSecondaryNamespace { + /** + * Specifies that the given namespace should be used as secondary namespace in disaster recovery pairing. + * + * @param namespaceCreatable creatable definition for the primary namespace + * @return next stage of the event hub definition + */ + WithCreate withNewSecondaryNamespace(Creatable namespaceCreatable); + + /** + * Specifies that the given namespace should be used as secondary namespace in disaster recovery pairing. + * + * @param namespace the secondary namespace + * @return next stage of the disaster recovery pairing definition + */ + WithCreate withExistingSecondaryNamespace(EventHubNamespace namespace); + + /** + * Specifies that the given namespace should be used as secondary namespace in disaster recovery pairing. + * + * @param namespaceId the secondary namespace + * @return next stage of the disaster recovery pairing definition + */ + WithCreate withExistingSecondaryNamespaceId(String namespaceId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends + Creatable { + } + } + + /** + * Grouping of disaster recovery pairing update stages. + */ + interface UpdateStages { + /** + * The stage of the disaster recovery pairing definition allowing to specify primary event hub namespace. + */ + interface WithSecondaryNamespace { + /** + * Specifies that the given namespace should be used as secondary namespace in disaster recovery pairing. + * + * @param namespaceCreatable creatable definition for the secondary namespace + * @return next stage of the disaster recovery pairing update + */ + Update withNewSecondaryNamespace(Creatable namespaceCreatable); + + /** + * Specifies that the given namespace should be used as secondary namespace in disaster recovery pairing. + * + * @param namespace the secondary event hub namespace + * @return next stage of the disaster recovery pairing update + */ + Update withExistingSecondaryNamespace(EventHubNamespace namespace); + + /** + * Specifies that the given namespace should be used as secondary namespace in disaster recovery pairing. + * + * @param namespaceId the secondary namespace + * @return next stage of the disaster recovery pairing update + */ + Update withExistingSecondaryNamespaceId(String namespaceId); + } + } + + /** + * The template for a disaster recovery pairing update operation, containing all the settings + * that can be modified. + */ + interface Update extends + UpdateStages.WithSecondaryNamespace, + Appliable { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubDisasterRecoveryPairings.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubDisasterRecoveryPairings.java new file mode 100644 index 0000000000000..9ab2149b9cedc --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubDisasterRecoveryPairings.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.fluent.DisasterRecoveryConfigsClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import reactor.core.publisher.Mono; + +/** + * Entry point to manage disaster recovery pairing of event hub namespaces. + */ +@Fluent +public interface EventHubDisasterRecoveryPairings extends + SupportsCreating, + SupportsDeletingById, + SupportsGettingById, + HasInner, + HasManager { + /** + * @return entry point to manage authorization rules of a disaster recovery pairing. + */ + DisasterRecoveryPairingAuthorizationRules authorizationRules(); + /** + * Lists the disaster recovery pairings of a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @return list of disaster recovery pairings + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + /** + * Lists the disaster recovery pairings of a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @return observable that emits disaster recovery pairings + */ + PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); + /** + * Gets a disaster recovery pairings of a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name disaster recovery pairing name + * @return observable that emits disaster recovery pairings + */ + Mono getByNameAsync(String resourceGroupName, String namespaceName, String name); + + /** + * Gets a disaster recovery pairings of a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name disaster recovery pairing name + * @return the disaster recovery pairing + */ + EventHubDisasterRecoveryPairing getByName(String resourceGroupName, String namespaceName, String name); + + /** + * Deletes a disaster recovery pairings of a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name disaster recovery pairing name + * @return the completable representing the task + */ + Mono deleteByNameAsync(String resourceGroupName, String namespaceName, String name); + + /** + * Deletes a disaster recovery pairings of a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name disaster recovery pairing + */ + void deleteByName(String resourceGroupName, String namespaceName, String name); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespace.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespace.java new file mode 100644 index 0000000000000..0e0365c7e3512 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespace.java @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.fluent.inner.EHNamespaceInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; +import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; + +import java.time.OffsetDateTime; + +/** + * Type representing an Azure EventHub namespace. + */ +@Fluent +public interface EventHubNamespace extends + GroupableResource, + Refreshable, + Updatable { + /** + * @return namespace sku + */ + EventHubNamespaceSkuType sku(); + + /** + * @return resource id of the Azure Insights metrics associated with the namespace + */ + String azureInsightMetricId(); + + /** + * @return the service bus endpoint associated with the namespace + */ + String serviceBusEndpoint(); + + /** + * @return namespace created time + */ + OffsetDateTime createdAt(); + + /** + * @return namespace last modified time + */ + OffsetDateTime updatedAt(); + + /** + * @return provisioning state of the namespace + */ + String provisioningState(); + + /** + * @return true if auto-scale is enabled for the namespace, false otherwise + */ + boolean isAutoScaleEnabled(); + + /** + * @return current throughput units set for the namespace + */ + int currentThroughputUnits(); + + /** + * @return maximum throughput unit that auto-scalar is allowed to set + */ + int throughputUnitsUpperLimit(); + + /** + * @return the event hubs in the namespace + */ + PagedFlux listEventHubsAsync(); + + /** + * @return the authorization rules for the event hub namespace + */ + PagedFlux listAuthorizationRulesAsync(); + + /** + * @return list of event hubs in the namespace + */ + PagedIterable listEventHubs(); + + /** + * @return list of authorization rules for the event hub namespace + */ + PagedIterable listAuthorizationRules(); + + /** + * The entirety of the event hub namespace definition. + */ + interface Definition extends + EventHubNamespace.DefinitionStages.Blank, + EventHubNamespace.DefinitionStages.WithGroup, + EventHubNamespace.DefinitionStages.WithCreate { + } + + /** + * Grouping of event hub namespace definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a event hub namespace definition. + */ + interface Blank extends GroupableResource.DefinitionWithRegion { + } + + /** + * The stage of the event hub namespace definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResource.DefinitionStages.WithGroup { + } + + /** + * The stage of the event hub namespace definition allowing to specify the sku. + */ + interface WithSku { + /** + * Specifies the namespace sku. + * + * @param namespaceSku the sku + * @return next stage of the event hub namespace definition + */ + WithCreate withSku(EventHubNamespaceSkuType namespaceSku); + } + + /** + * The stage of the event hub namespace definition allowing to add new event hub in the namespace. + */ + interface WithEventHub { + /** + * Specifies that a new event hub should be created in the namespace. + * + * @param eventHubName event hub name + * @return next stage of the event hub namespace definition + */ + WithCreate withNewEventHub(String eventHubName); + + /** + * Specifies that a new event hub should be created in the namespace. + * + * @param eventHubName event hub name + * @param partitionCount the number of partitions in the event hub + * @return next stage of the event hub namespace definition + */ + WithCreate withNewEventHub(String eventHubName, int partitionCount); + + /** + * Specifies that a new event hub should be created in the namespace. + * + * @param eventHubName event hub name + * @param partitionCount the number of partitions in the event hub + * @param retentionPeriodInDays the retention period for events in days + * @return next stage of the event hub namespace definition + */ + WithCreate withNewEventHub(String eventHubName, int partitionCount, int retentionPeriodInDays); + } + + /** + * The stage of the event hub namespace definition allowing to add authorization rule for accessing + * the event hub. + */ + interface WithAuthorizationRule { + /** + * Specifies that a new authorization rule should be created + * that has send access to the event hub namespace. + * + * @param ruleName rule name + * @return next stage of the event hub namespace definition + */ + WithCreate withNewSendRule(String ruleName); + + /** + * Specifies that a new authorization rule should be created + * that has listen access to the event hub namespace. + * + * @param ruleName rule name + * @return next stage of the event hub namespace definition + */ + WithCreate withNewListenRule(String ruleName); + + /** + * Specifies that a new authorization rule should be created + * that has manage access to the event hub namespace. + * + * @param ruleName rule name + * @return next stage of the event hub namespace definition + */ + WithCreate withNewManageRule(String ruleName); + } + + /** + * The stage of the event hub namespace definition + * allowing to specify the throughput unit settings. + */ + interface WithThroughputConfiguration { + /** + * Enables the scaling up the throughput units automatically based on load. + * + * @return next stage of the event hub namespace definition + */ + WithCreate withAutoScaling(); + /** + * Specifies the current throughput units. + * + * @param units throughput units + * @return next stage of the event hub namespace definition + */ + WithCreate withCurrentThroughputUnits(int units); + + /** + * Specifies the maximum throughput units that auto-scalar is allowed to scale-up. + * + * @param units throughput units + * @return next stage of the event hub namespace definition + */ + WithCreate withThroughputUnitsUpperLimit(int units); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends + Creatable, + Resource.DefinitionWithTags, + EventHubNamespace.DefinitionStages.WithSku, + EventHubNamespace.DefinitionStages.WithEventHub, + EventHubNamespace.DefinitionStages.WithAuthorizationRule, + EventHubNamespace.DefinitionStages.WithThroughputConfiguration { + } + } + + /** + * The template for a event hub namespace update operation, containing all the settings that can be modified. + */ + interface Update extends + Appliable, + Resource.UpdateWithTags, + EventHubNamespace.UpdateStages.WithSku, + EventHubNamespace.UpdateStages.WithEventHub, + EventHubNamespace.UpdateStages.WithAuthorizationRule, + EventHubNamespace.UpdateStages.WithThroughputConfiguration { + } + + /** + * Grouping of all the event hub namespace update stages. + */ + interface UpdateStages { + /** + * The stage of the event hub namespace update allowing to change the sku. + */ + interface WithSku { + /** + * Specifies the namespace sku. + * + * @param namespaceSku the sku + * @return next stage of the event hub namespace update + */ + Update withSku(EventHubNamespaceSkuType namespaceSku); + } + + /** + * The stage of the event hub namespace update allowing to add new event hub in the namespace. + */ + interface WithEventHub { + /** + * Specifies that a new event hub should be created in the namespace. + * + * @param eventHubName event hub name + * @return next stage of the event hub namespace update + */ + Update withNewEventHub(String eventHubName); + + /** + * Specifies that a new event hub should be created in the namespace. + * + * @param eventHubName event hub name + * @param partitionCount the number of partitions in the event hub + * @return next stage of the event hub namespace update + */ + Update withNewEventHub(String eventHubName, int partitionCount); + + /** + * Specifies that a new event hub should be created in the namespace. + * + * @param eventHubName event hub name + * @param partitionCount the number of partitions in the event hub + * @param retentionPeriodInDays the retention period for events in days + * @return next stage of the event hub namespace update + */ + Update withNewEventHub(String eventHubName, int partitionCount, int retentionPeriodInDays); + + /** + * Deletes an event hub in the event hub namespace. + * + * @param eventHubName event hub name + * @return next stage of the event hub namespace update + */ + Update withoutEventHub(String eventHubName); + } + + /** + * The stage of the event hub namespace update allowing to add authorization rule for accessing + * the event hub. + */ + interface WithAuthorizationRule { + /** + * Specifies that a new authorization rule should be created + * that has send access to the event hub namespace. + * + * @param ruleName rule name + * @return next stage of the event hub namespace update + */ + Update withNewSendRule(String ruleName); + + /** + * Specifies that a new authorization rule should be created + * that has listen access to the event hub namespace. + * + * @param ruleName rule name + * @return next stage of the event hub namespace update + */ + Update withNewListenRule(String ruleName); + + /** + * Specifies that a new authorization rule should be created + * that has manage access to the event hub namespace. + * + * @param ruleName rule name + * @return next stage of the event hub namespace update + */ + Update withNewManageRule(String ruleName); + + /** + * Deletes an authorization rule associated with the event hub namespace. + * + * @param ruleName rule name + * @return next stage of the event hub namespace update + */ + Update withoutAuthorizationRule(String ruleName); + } + + /** + * The stage of the event hub namespace update allowing to specify the throughput unit settings. + */ + interface WithThroughputConfiguration { + /** + * Enables the scaling up the throughput units automatically based on load. + * + * @return next stage of the event hub namespace update + */ + Update withAutoScaling(); + + /** + * Specifies the current throughput units. + * + * @param units throughput units + * @return next stage of the event hub namespace update + */ + Update withCurrentThroughputUnits(int units); + + /** + * Specifies the maximum throughput units that auto-scalar is allowed to scale-up. + * + * @param units throughput units + * @return next stage of the event hub namespace update + */ + Update withThroughputUnitsUpperLimit(int units); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceAuthorizationRule.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceAuthorizationRule.java new file mode 100644 index 0000000000000..4f38078cdc5f3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceAuthorizationRule.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; + +/** + * Type representing authorization rule of an event hub namespace. + */ +@Fluent +public interface EventHubNamespaceAuthorizationRule + extends AuthorizationRule { + /** + * @return the resource group of the namespace where parent event hub resides. + */ + String namespaceResourceGroupName(); + + /** + * @return the name of the event hub namespace. + */ + String namespaceName(); + + /** + * Grouping of Event Hub namespace authorization rule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of event hub namespace authorization rule definition. + */ + interface Blank extends WithNamespace { + } + + /** + * Stage of the authorization rule definition allowing to specify + * the event namespace for which rule needs to be created. + */ + interface WithNamespace { + /** + * Specifies that authorization rule needs to be created for the given event hub namespace. + * + * @param namespaceResourceId the resource id of the event Hub namespace + * @return the next stage of the definition + */ + WithAccessPolicy withExistingNamespaceId(String namespaceResourceId); + + /** + * Specifies that authorization rule needs to be created for the given event hub namespace. + * + * @param resourceGroupName namespace resource group name + * @param namespaceName namespace name + * @return the next stage of the definition + */ + WithAccessPolicy withExistingNamespace(String resourceGroupName, String namespaceName); + + /** + * Specifies that authorization rule needs to be created for the given event hub namespace. + * + * @param namespace the namespace + * @return the next stage of the definition + */ + WithAccessPolicy withExistingNamespace(EventHubNamespace namespace); + } + + /** + * Stage of the authorization rule definition allowing to specify access policy. + */ + interface WithAccessPolicy extends AuthorizationRule + .DefinitionStages + .WithListenOrSendOrManage { + + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + + /** + * The entirety of the event hub namespace authorization rule definition. + */ + interface Definition extends + DefinitionStages.Blank, + DefinitionStages.WithNamespace, + DefinitionStages.WithAccessPolicy, + DefinitionStages.WithCreate { + } + + /** + * The entirety of the event hub namespace authorization rule update. + */ + interface Update extends + Appliable, + AuthorizationRule.UpdateStages.WithListenOrSendOrManage { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceAuthorizationRules.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceAuthorizationRules.java new file mode 100644 index 0000000000000..60b79ad594f6e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceAuthorizationRules.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.fluent.NamespacesClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import reactor.core.publisher.Mono; + +/** + * Entry point to manage event hub namespace authorization rules. + */ +@Fluent +public interface EventHubNamespaceAuthorizationRules extends + SupportsCreating, + SupportsDeletingById, + SupportsGettingById, + HasInner, + HasManager { + /** + * Lists the authorization rules under a namespace in a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @return list of authorization rules + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * Lists the authorization rules under a namespace in a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @return observable that emits the authorization rules + */ + PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); + + /** + * Gets an authorization rule under a namespace in a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name authorization rule name + * @return observable that emits the authorization rule + */ + Mono getByNameAsync( + String resourceGroupName, String namespaceName, String name); + + /** + * Gets an authorization rule under a namespace in a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name authorization rule name + * @return the authorization rule + */ + EventHubNamespaceAuthorizationRule getByName(String resourceGroupName, String namespaceName, String name); + + /** + * Deletes an authorization rule under a namespace in a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name authorization rule name + * @return the completable representing the task + */ + Mono deleteByNameAsync(String resourceGroupName, String namespaceName, String name); + + /** + * Deletes an authorization rule under a namespace in a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name authorization rule name + */ + void deleteByName(String resourceGroupName, String namespaceName, String name); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceSkuType.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceSkuType.java new file mode 100644 index 0000000000000..1650f4688d42c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaceSkuType.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; + +/** + * Defines values for EventHubNamespaceSkuType. + */ +public class EventHubNamespaceSkuType implements HasInner { + /** Static value NamespaceSku for BASIC. */ + public static final EventHubNamespaceSkuType BASIC = + new EventHubNamespaceSkuType(new Sku().withName(SkuName.BASIC).withTier(SkuTier.BASIC)); + /** Static value NamespaceSku for STANDARD. */ + public static final EventHubNamespaceSkuType STANDARD = + new EventHubNamespaceSkuType(new Sku().withName(SkuName.STANDARD).withTier(SkuTier.STANDARD)); + + private final Sku sku; + + /** + * Creates event hub namespace sku. + * + * @param sku inner sku model instance + */ + public EventHubNamespaceSkuType(Sku sku) { + this.sku = sku; + } + + /** + * Creates event hub namespace sku. + * + * @param name sku name + * @param tier sku tier + */ + public EventHubNamespaceSkuType(SkuName name, SkuTier tier) { + this(new Sku().withName(name).withTier(tier).withCapacity(null)); + } + + @Override + public Sku inner() { + return this.sku; + } + + /** + * @return sku tier + */ + public SkuName name() { + return this.sku.name(); + } + + /** + * @return sku tier + */ + public SkuTier tier() { + return this.sku.tier(); + } + + /** + * @return sku capacity + */ + public int capacity() { + return Utils.toPrimitiveInt(this.sku.capacity()); + } + + @Override + public String toString() { + return String.format("%s_%s", this.sku.name(), this.sku.tier()); + } + + @Override + public int hashCode() { + return this.toString().hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof EventHubNamespaceSkuType)) { + return false; + } else if (obj == this) { + return true; + } else { + EventHubNamespaceSkuType rhs = (EventHubNamespaceSkuType) obj; + if (sku == null) { + return rhs.sku == null; + } else { + return this.toString().equalsIgnoreCase(rhs.toString()); + } + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaces.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaces.java new file mode 100644 index 0000000000000..19bc8b08dd33e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespaces.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventhubs.fluent.NamespacesClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsBatchCreation; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.eventhubs.EventHubsManager; + +/** + * Entry point to manage EventHub namespaces. + */ +@Fluent +public interface EventHubNamespaces extends + SupportsCreating, + SupportsListing, + SupportsListingByResourceGroup, + SupportsGettingByResourceGroup, + SupportsGettingById, + SupportsDeletingById, + SupportsDeletingByResourceGroup, + SupportsBatchCreation, + SupportsBatchDeletion, + HasManager, + HasInner { + /** + * @return entry point to manage authorization rules of event hub namespaces. + */ + EventHubNamespaceAuthorizationRules authorizationRules(); + + /** + * @return entry point to manage event hubs of event hub namespaces. + */ + EventHubs eventHubs(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubs.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubs.java new file mode 100644 index 0000000000000..da7d5b5a655c4 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubs.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.fluent.EventHubsClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import reactor.core.publisher.Mono; + +/** + * Entry point to manage event hubs. + */ +@Fluent +public interface EventHubs extends + SupportsCreating, + SupportsDeletingById, + SupportsGettingById, + HasInner, + HasManager { + /** + * @return entry point to manage authorization rules of event hubs. + */ + EventHubAuthorizationRules authorizationRules(); + + /** + * @return entry point to manage consumer group of event hubs. + */ + + EventHubConsumerGroups consumerGroups(); + /** + * Lists the event hubs in a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @return list of event hubs + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * Lists the event hubs in a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @return observable that emits the event hubs + */ + PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); + + /** + * Gets an event hub in a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name event hub name + * @return observable that emits the event hubs + */ + Mono getByNameAsync(String resourceGroupName, String namespaceName, String name); + + /** + * Gets an event hub in a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name event hub name + * @return the event hubs + */ + EventHub getByName(String resourceGroupName, String namespaceName, String name); + + /** + * Deletes an event hub in a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name event hub name + * @return the completable representing the task + */ + Mono deleteByNameAsync(String resourceGroupName, String namespaceName, String name); + + /** + * Deletes an event hub in a namespace under a resource group. + * + * @param resourceGroupName resource group name + * @param namespaceName namespace name + * @param name event hub name + */ + void deleteByName(String resourceGroupName, String namespaceName, String name); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java new file mode 100644 index 0000000000000..3f9f99308370b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for KeyType. */ +public enum KeyType { + /** Enum value PrimaryKey. */ + PRIMARY_KEY("PrimaryKey"), + + /** Enum value SecondaryKey. */ + SECONDARY_KEY("SecondaryKey"); + + /** The actual serialized value for a KeyType instance. */ + private final String value; + + KeyType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a KeyType instance. + * + * @param value the serialized value to parse. + * @return the parsed KeyType object, or null if unable to parse. + */ + @JsonCreator + public static KeyType fromString(String value) { + KeyType[] items = KeyType.values(); + for (KeyType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MessagingRegionsProperties.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MessagingRegionsProperties.java new file mode 100644 index 0000000000000..aa6e87dcaf93c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MessagingRegionsProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MessagingRegionsProperties model. */ +@Immutable +public final class MessagingRegionsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MessagingRegionsProperties.class); + + /* + * Region code + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Full name of the region + */ + @JsonProperty(value = "fullName", access = JsonProperty.Access.WRITE_ONLY) + private String fullName; + + /** + * Get the code property: Region code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the fullName property: Full name of the region. + * + * @return the fullName value. + */ + public String fullName() { + return this.fullName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java new file mode 100644 index 0000000000000..a46c5e8184635 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.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; + +/** The NWRuleSetIpRules model. */ +@Fluent +public final class NWRuleSetIpRules { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NWRuleSetIpRules.class); + + /* + * IP Mask + */ + @JsonProperty(value = "ipMask") + private String ipMask; + + /* + * The IP Filter Action + */ + @JsonProperty(value = "action") + private NetworkRuleIpAction action; + + /** + * Get the ipMask property: IP Mask. + * + * @return the ipMask value. + */ + public String ipMask() { + return this.ipMask; + } + + /** + * Set the ipMask property: IP Mask. + * + * @param ipMask the ipMask value to set. + * @return the NWRuleSetIpRules object itself. + */ + public NWRuleSetIpRules withIpMask(String ipMask) { + this.ipMask = ipMask; + return this; + } + + /** + * Get the action property: The IP Filter Action. + * + * @return the action value. + */ + public NetworkRuleIpAction action() { + return this.action; + } + + /** + * Set the action property: The IP Filter Action. + * + * @param action the action value to set. + * @return the NWRuleSetIpRules object itself. + */ + public NWRuleSetIpRules withAction(NetworkRuleIpAction action) { + this.action = action; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java new file mode 100644 index 0000000000000..21c312dcff955 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.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; + +/** The NWRuleSetVirtualNetworkRules model. */ +@Fluent +public final class NWRuleSetVirtualNetworkRules { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NWRuleSetVirtualNetworkRules.class); + + /* + * Subnet properties + */ + @JsonProperty(value = "subnet") + private Subnet subnet; + + /* + * Value that indicates whether to ignore missing VNet Service Endpoint + */ + @JsonProperty(value = "ignoreMissingVnetServiceEndpoint") + private Boolean ignoreMissingVnetServiceEndpoint; + + /** + * Get the subnet property: Subnet properties. + * + * @return the subnet value. + */ + public Subnet subnet() { + return this.subnet; + } + + /** + * Set the subnet property: Subnet properties. + * + * @param subnet the subnet value to set. + * @return the NWRuleSetVirtualNetworkRules object itself. + */ + public NWRuleSetVirtualNetworkRules withSubnet(Subnet subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the ignoreMissingVnetServiceEndpoint property: Value that indicates whether to ignore missing VNet Service + * Endpoint. + * + * @return the ignoreMissingVnetServiceEndpoint value. + */ + public Boolean ignoreMissingVnetServiceEndpoint() { + return this.ignoreMissingVnetServiceEndpoint; + } + + /** + * Set the ignoreMissingVnetServiceEndpoint property: Value that indicates whether to ignore missing VNet Service + * Endpoint. + * + * @param ignoreMissingVnetServiceEndpoint the ignoreMissingVnetServiceEndpoint value to set. + * @return the NWRuleSetVirtualNetworkRules object itself. + */ + public NWRuleSetVirtualNetworkRules withIgnoreMissingVnetServiceEndpoint(Boolean ignoreMissingVnetServiceEndpoint) { + this.ignoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnet() != null) { + subnet().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NestedResource.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NestedResource.java new file mode 100644 index 0000000000000..a959199a3c4d3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NestedResource.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.model.Indexable; + +/** + * A type contains subset of ARM envelop properties + * in {@link com.azure.core.management.Resource} namely id, name and type. + */ +@Fluent +public interface NestedResource extends Indexable { + /** + * @return resource id. + */ + String id(); + + /** + * @return the resource name. + */ + String name(); + + /** + * + * @return the resource type. + */ + String type(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java new file mode 100644 index 0000000000000..954b1692ed2d1 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for NetworkRuleIpAction. */ +public final class NetworkRuleIpAction extends ExpandableStringEnum { + /** Static value Allow for NetworkRuleIpAction. */ + public static final NetworkRuleIpAction ALLOW = fromString("Allow"); + + /** + * Creates or finds a NetworkRuleIpAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkRuleIpAction. + */ + @JsonCreator + public static NetworkRuleIpAction fromString(String name) { + return fromString(name, NetworkRuleIpAction.class); + } + + /** @return known NetworkRuleIpAction values. */ + public static Collection values() { + return values(NetworkRuleIpAction.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java new file mode 100644 index 0000000000000..77fa7e2cd2420 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OperationDisplay model. */ +@Immutable +public final class OperationDisplay { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); + + /* + * Service provider: Microsoft.EventHub + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * Resource on which the operation is performed: Invoice, etc. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * Operation type: Read, write, delete, etc. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * Get the provider property: Service provider: Microsoft.EventHub. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: Resource on which the operation is performed: Invoice, etc. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: Operation type: Read, write, delete, etc. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningStateDR.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningStateDR.java new file mode 100644 index 0000000000000..33954f68b0206 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningStateDR.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ProvisioningStateDR. */ +public enum ProvisioningStateDR { + /** Enum value Accepted. */ + ACCEPTED("Accepted"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a ProvisioningStateDR instance. */ + private final String value; + + ProvisioningStateDR(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProvisioningStateDR instance. + * + * @param value the serialized value to parse. + * @return the parsed ProvisioningStateDR object, or null if unable to parse. + */ + @JsonCreator + public static ProvisioningStateDR fromString(String value) { + ProvisioningStateDR[] items = ProvisioningStateDR.values(); + for (ProvisioningStateDR item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/RegenerateAccessKeyParameters.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/RegenerateAccessKeyParameters.java new file mode 100644 index 0000000000000..be6d7c55ecbcf --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/RegenerateAccessKeyParameters.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.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; + +/** The RegenerateAccessKeyParameters model. */ +@Fluent +public final class RegenerateAccessKeyParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RegenerateAccessKeyParameters.class); + + /* + * The access key to regenerate. + */ + @JsonProperty(value = "keyType", required = true) + private KeyType keyType; + + /* + * Optional, if the key value provided, is set for KeyType or autogenerated + * Key value set for keyType + */ + @JsonProperty(value = "key") + private String key; + + /** + * Get the keyType property: The access key to regenerate. + * + * @return the keyType value. + */ + public KeyType keyType() { + return this.keyType; + } + + /** + * Set the keyType property: The access key to regenerate. + * + * @param keyType the keyType value to set. + * @return the RegenerateAccessKeyParameters object itself. + */ + public RegenerateAccessKeyParameters withKeyType(KeyType keyType) { + this.keyType = keyType; + return this; + } + + /** + * Get the key property: Optional, if the key value provided, is set for KeyType or autogenerated Key value set for + * keyType. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Optional, if the key value provided, is set for KeyType or autogenerated Key value set for + * keyType. + * + * @param key the key value to set. + * @return the RegenerateAccessKeyParameters object itself. + */ + public RegenerateAccessKeyParameters withKey(String key) { + this.key = key; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property keyType in model RegenerateAccessKeyParameters")); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/RoleDisasterRecovery.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/RoleDisasterRecovery.java new file mode 100644 index 0000000000000..a647ac29502b7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/RoleDisasterRecovery.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for RoleDisasterRecovery. */ +public enum RoleDisasterRecovery { + /** Enum value Primary. */ + PRIMARY("Primary"), + + /** Enum value PrimaryNotReplicating. */ + PRIMARY_NOT_REPLICATING("PrimaryNotReplicating"), + + /** Enum value Secondary. */ + SECONDARY("Secondary"); + + /** The actual serialized value for a RoleDisasterRecovery instance. */ + private final String value; + + RoleDisasterRecovery(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RoleDisasterRecovery instance. + * + * @param value the serialized value to parse. + * @return the parsed RoleDisasterRecovery object, or null if unable to parse. + */ + @JsonCreator + public static RoleDisasterRecovery fromString(String value) { + RoleDisasterRecovery[] items = RoleDisasterRecovery.values(); + for (RoleDisasterRecovery item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java new file mode 100644 index 0000000000000..a32eacb3d687f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.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; + +/** The Sku model. */ +@Fluent +public final class Sku { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); + + /* + * Name of this SKU. + */ + @JsonProperty(value = "name", required = true) + private SkuName name; + + /* + * The billing tier of this particular SKU. + */ + @JsonProperty(value = "tier") + private SkuTier tier; + + /* + * The Event Hubs throughput units, value should be 0 to 20 throughput + * units. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Get the name property: Name of this SKU. + * + * @return the name value. + */ + public SkuName name() { + return this.name; + } + + /** + * Set the name property: Name of this SKU. + * + * @param name the name value to set. + * @return the Sku object itself. + */ + public Sku withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get the tier property: The billing tier of this particular SKU. + * + * @return the tier value. + */ + public SkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: The billing tier of this particular SKU. + * + * @param tier the tier value to set. + * @return the Sku object itself. + */ + public Sku withTier(SkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Get the capacity property: The Event Hubs throughput units, value should be 0 to 20 throughput units. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The Event Hubs throughput units, value should be 0 to 20 throughput units. + * + * @param capacity the capacity value to set. + * @return the Sku object itself. + */ + public Sku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java new file mode 100644 index 0000000000000..9f6fad6a24951 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuName. */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Basic for SkuName. */ + public static final SkuName BASIC = fromString("Basic"); + + /** Static value Standard for SkuName. */ + public static final SkuName STANDARD = fromString("Standard"); + + /** + * Creates or finds a SkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuName. + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** @return known SkuName values. */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java new file mode 100644 index 0000000000000..f522977f21d2c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuTier. */ +public final class SkuTier extends ExpandableStringEnum { + /** Static value Basic for SkuTier. */ + public static final SkuTier BASIC = fromString("Basic"); + + /** Static value Standard for SkuTier. */ + public static final SkuTier STANDARD = fromString("Standard"); + + /** + * Creates or finds a SkuTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuTier. + */ + @JsonCreator + public static SkuTier fromString(String name) { + return fromString(name, SkuTier.class); + } + + /** @return known SkuTier values. */ + public static Collection values() { + return values(SkuTier.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java new file mode 100644 index 0000000000000..09267361ac0fb --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.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; + +/** The Subnet model. */ +@Fluent +public final class Subnet { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Subnet.class); + + /* + * Resource ID of Virtual Network Subnet + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * Get the id property: Resource ID of Virtual Network Subnet. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of Virtual Network Subnet. + * + * @param id the id value to set. + * @return the Subnet object itself. + */ + public Subnet withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property id in model Subnet")); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java new file mode 100644 index 0000000000000..6310e714e6e43 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for UnavailableReason. */ +public enum UnavailableReason { + /** Enum value None. */ + NONE("None"), + + /** Enum value InvalidName. */ + INVALID_NAME("InvalidName"), + + /** Enum value SubscriptionIsDisabled. */ + SUBSCRIPTION_IS_DISABLED("SubscriptionIsDisabled"), + + /** Enum value NameInUse. */ + NAME_IN_USE("NameInUse"), + + /** Enum value NameInLockdown. */ + NAME_IN_LOCKDOWN("NameInLockdown"), + + /** Enum value TooManyNamespaceInCurrentSubscription. */ + TOO_MANY_NAMESPACE_IN_CURRENT_SUBSCRIPTION("TooManyNamespaceInCurrentSubscription"); + + /** The actual serialized value for a UnavailableReason instance. */ + private final String value; + + UnavailableReason(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UnavailableReason instance. + * + * @param value the serialized value to parse. + * @return the parsed UnavailableReason object, or null if unable to parse. + */ + @JsonCreator + public static UnavailableReason fromString(String value) { + UnavailableReason[] items = UnavailableReason.values(); + for (UnavailableReason item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java new file mode 100644 index 0000000000000..873a61441795c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for EventHubManagementClient. Azure Event Hubs client. */ +package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/package-info.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/package-info.java new file mode 100644 index 0000000000000..1fb40769c55ca --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for EventHubManagementClient. Azure Event Hubs client. */ +package com.azure.resourcemanager.eventhubs; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java new file mode 100644 index 0000000000000..755053ce109c5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java @@ -0,0 +1,577 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.eventhubs; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.eventhubs.models.AccessRights; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationKey; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroup; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairing; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairings; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceSkuType; +import com.azure.resourcemanager.eventhubs.models.ProvisioningStateDR; +import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.core.TestBase; +import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.storage.StorageManager; +import com.azure.resourcemanager.storage.models.StorageAccount; +import com.azure.resourcemanager.storage.models.StorageAccountSkuType; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.Exceptions; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; + +public class EventHubTests extends TestBase { + protected EventHubsManager eventHubsManager; + protected StorageManager storageManager; + protected ResourceManager resourceManager; + private String rgName = ""; + private final Region region = Region.US_EAST; + + @Override + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + eventHubsManager = EventHubsManager.authenticate(httpPipeline, profile); + storageManager = StorageManager.authenticate(httpPipeline, profile); + resourceManager = ResourceManager + .authenticate(httpPipeline, profile) + .withDefaultSubscription(); + } + + @Override + protected void cleanUpResources() { + if (rgName != null && !rgName.isEmpty()) { + resourceManager.resourceGroups().deleteByName(rgName); + } + } + + @Test + public void canManageEventHubNamespaceBasicSettings() { + rgName = generateRandomResourceName("javacsmrg", 15); + final String namespaceName1 = generateRandomResourceName("ns", 14); + final String namespaceName2 = generateRandomResourceName("ns", 14); + final String namespaceName3 = generateRandomResourceName("ns", 14); + + EventHubNamespace namespace1 = eventHubsManager.namespaces() + .define(namespaceName1) + .withRegion(region) + .withNewResourceGroup(rgName) + // SDK should use Sku as 'Standard' and set capacity.capacity in it as 1 + .withAutoScaling() + .create(); + + Assertions.assertNotNull(namespace1); + Assertions.assertNotNull(namespace1.inner()); + Assertions.assertNotNull(namespace1.sku()); + Assertions.assertTrue(namespace1.sku().equals(EventHubNamespaceSkuType.STANDARD)); + Assertions.assertTrue(namespace1.isAutoScaleEnabled()); + Assertions.assertNotNull(namespace1.inner().maximumThroughputUnits()); + Assertions.assertNotNull(namespace1.inner().sku().capacity()); + + EventHubNamespace namespace2 = eventHubsManager.namespaces() + .define(namespaceName2) + .withRegion(region) + .withExistingResourceGroup(rgName) + // SDK should use Sku as 'Standard' and set capacity.capacity in it as 11 + .withCurrentThroughputUnits(11) + .create(); + + Assertions.assertNotNull(namespace2); + Assertions.assertNotNull(namespace2.inner()); + Assertions.assertNotNull(namespace2.sku()); + Assertions.assertTrue(namespace2.sku().equals(EventHubNamespaceSkuType.STANDARD)); + Assertions.assertNotNull(namespace2.inner().maximumThroughputUnits()); + Assertions.assertNotNull(namespace2.inner().sku().capacity()); + Assertions.assertEquals(11, namespace2.currentThroughputUnits()); + + EventHubNamespace namespace3 = eventHubsManager.namespaces() + .define(namespaceName3) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withSku(EventHubNamespaceSkuType.BASIC) + .create(); + + Assertions.assertNotNull(namespace3); + Assertions.assertNotNull(namespace3.inner()); + Assertions.assertNotNull(namespace3.sku()); + Assertions.assertTrue(namespace3.sku().equals(EventHubNamespaceSkuType.BASIC)); + + namespace3.update() + .withSku(EventHubNamespaceSkuType.STANDARD) + .withTag("aa", "bb") + .apply(); + + Assertions.assertNotNull(namespace3.sku()); + Assertions.assertTrue(namespace3.sku().equals(EventHubNamespaceSkuType.STANDARD)); + Assertions.assertNotNull(namespace3.tags()); + Assertions.assertTrue(namespace3.tags().size() > 0); + } + + @Test + public void canManageEventHubNamespaceEventHubs() { + rgName = generateRandomResourceName("javacsmrg", 15); + final String namespaceName = generateRandomResourceName("ns", 14); + final String eventHubName1 = generateRandomResourceName("eh", 14); + final String eventHubName2 = generateRandomResourceName("eh", 14); + final String eventHubName3 = generateRandomResourceName("eh", 14); + + EventHubNamespace namespace = eventHubsManager.namespaces() + .define(namespaceName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withNewEventHub(eventHubName1) + .withNewEventHub(eventHubName2) + .create(); + + Assertions.assertNotNull(namespace); + Assertions.assertNotNull(namespace.inner()); + + PagedIterable hubs = namespace.listEventHubs(); + HashSet set = new HashSet<>(); + for (EventHub hub : hubs) { + set.add(hub.name()); + } + Assertions.assertTrue(set.contains(eventHubName1)); + Assertions.assertTrue(set.contains(eventHubName2)); + + hubs = eventHubsManager.namespaces() + .eventHubs() + .listByNamespace(namespace.resourceGroupName(), namespace.name()); + + set.clear(); + for (EventHub hub : hubs) { + set.add(hub.name()); + } + Assertions.assertTrue(set.contains(eventHubName1)); + Assertions.assertTrue(set.contains(eventHubName2)); + + eventHubsManager.namespaces() + .eventHubs() + .define(eventHubName3) + .withExistingNamespaceId(namespace.id()) + .withPartitionCount(5) + .withRetentionPeriodInDays(6) + .create(); + + hubs = namespace.listEventHubs(); + set.clear(); + for (EventHub hub : hubs) { + set.add(hub.name()); + } + Assertions.assertTrue(set.contains(eventHubName1)); + Assertions.assertTrue(set.contains(eventHubName2)); + Assertions.assertTrue(set.contains(eventHubName3)); + } + + @Test + public void canManageEventHubNamespaceAuthorizationRules() { + rgName = generateRandomResourceName("javacsmrg", 15); + final String namespaceName = generateRandomResourceName("ns", 14); + + EventHubNamespace namespace = eventHubsManager.namespaces() + .define(namespaceName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withNewManageRule("mngRule1") + .withNewSendRule("sndRule1") + .create(); + + Assertions.assertNotNull(namespace); + Assertions.assertNotNull(namespace.inner()); + + PagedIterable rules = namespace.listAuthorizationRules(); + HashSet set = new HashSet<>(); + for (EventHubNamespaceAuthorizationRule rule : rules) { + set.add(rule.name()); + } + Assertions.assertTrue(set.contains("mngRule1")); + Assertions.assertTrue(set.contains("sndRule1")); + + rules = eventHubsManager.namespaces() + .authorizationRules() + .listByNamespace(namespace.resourceGroupName(), namespace.name()); + + set.clear(); + for (EventHubNamespaceAuthorizationRule rule : rules) { + set.add(rule.name()); + } + Assertions.assertTrue(set.contains("mngRule1")); + Assertions.assertTrue(set.contains("sndRule1")); + + eventHubsManager.namespaces() + .authorizationRules() + .define("sndRule2") + .withExistingNamespaceId(namespace.id()) + .withSendAccess() + .create(); + + rules = namespace.listAuthorizationRules(); + set.clear(); + for (EventHubNamespaceAuthorizationRule rule : rules) { + set.add(rule.name()); + } + Assertions.assertTrue(set.contains("mngRule1")); + Assertions.assertTrue(set.contains("sndRule1")); + Assertions.assertTrue(set.contains("sndRule2")); + + eventHubsManager.namespaces() + .authorizationRules() + .define("sndLsnRule3") + .withExistingNamespaceId(namespace.id()) + .withSendAndListenAccess() + .create(); + + rules = namespace.listAuthorizationRules(); + Map rulesMap = new HashMap<>(); + for (EventHubNamespaceAuthorizationRule rule : rules) { + rulesMap.put(rule.name(), rule); + } + Assertions.assertTrue(rulesMap.containsKey("sndLsnRule3")); + Assertions.assertEquals( + new HashSet<>(Arrays.asList(AccessRights.SEND, AccessRights.LISTEN)), + new HashSet<>(rulesMap.get("sndLsnRule3").rights())); + } + + @Test + public void canManageEventHubConsumerGroups() { + rgName = generateRandomResourceName("javacsmrg", 15); + final String namespaceName = generateRandomResourceName("ns", 14); + final String eventHubName = generateRandomResourceName("eh", 14); + + Creatable namespaceCreatable = eventHubsManager.namespaces() + .define(namespaceName) + .withRegion(region) + .withNewResourceGroup(rgName); + + EventHub eventHub = eventHubsManager.eventHubs() + .define(eventHubName) + .withNewNamespace(namespaceCreatable) + .withNewConsumerGroup("grp1") + .withNewConsumerGroup("grp2", "metadata111") + .create(); + + Assertions.assertNotNull(eventHub); + Assertions.assertNotNull(eventHub.inner()); + + PagedIterable cGroups = eventHub.listConsumerGroups(); + HashSet set = new HashSet<>(); + for (EventHubConsumerGroup grp : cGroups) { + set.add(grp.name()); + } + Assertions.assertTrue(set.contains("grp1")); + Assertions.assertTrue(set.contains("grp2")); + + cGroups = eventHubsManager.eventHubs() + .consumerGroups() + .listByEventHub(eventHub.namespaceResourceGroupName(), eventHub.namespaceName(), eventHub.name()); + + set.clear(); + for (EventHubConsumerGroup rule : cGroups) { + set.add(rule.name()); + } + Assertions.assertTrue(set.contains("grp1")); + Assertions.assertTrue(set.contains("grp2")); + + eventHubsManager.eventHubs() + .consumerGroups() + .define("grp3") + .withExistingEventHubId(eventHub.id()) + .withUserMetadata("metadata222") + .create(); + + cGroups = eventHub.listConsumerGroups(); + set.clear(); + for (EventHubConsumerGroup grp : cGroups) { + set.add(grp.name()); + } + Assertions.assertTrue(set.contains("grp1")); + Assertions.assertTrue(set.contains("grp2")); + Assertions.assertTrue(set.contains("grp3")); + } + + @Test + public void canManageEventHubAuthorizationRules() { + rgName = generateRandomResourceName("javacsmrg", 15); + final String namespaceName = generateRandomResourceName("ns", 14); + final String eventHubName = generateRandomResourceName("eh", 14); + + Creatable namespaceCreatable = eventHubsManager.namespaces() + .define(namespaceName) + .withRegion(region) + .withNewResourceGroup(rgName); + + EventHub eventHub = eventHubsManager.eventHubs() + .define(eventHubName) + .withNewNamespace(namespaceCreatable) + .withNewManageRule("mngRule1") + .withNewSendRule("sndRule1") + .create(); + + Assertions.assertNotNull(eventHub); + Assertions.assertNotNull(eventHub.inner()); + + PagedIterable rules = eventHub.listAuthorizationRules(); + HashSet set = new HashSet<>(); + for (EventHubAuthorizationRule rule : rules) { + set.add(rule.name()); + } + Assertions.assertTrue(set.contains("mngRule1")); + Assertions.assertTrue(set.contains("sndRule1")); + + rules = eventHubsManager.eventHubs() + .authorizationRules() + .listByEventHub(eventHub.namespaceResourceGroupName(), eventHub.namespaceName(), eventHub.name()); + + set.clear(); + for (EventHubAuthorizationRule rule : rules) { + set.add(rule.name()); + } + Assertions.assertTrue(set.contains("mngRule1")); + Assertions.assertTrue(set.contains("sndRule1")); + + eventHubsManager.eventHubs() + .authorizationRules() + .define("sndRule2") + .withExistingEventHubId(eventHub.id()) + .withSendAccess() + .create(); + + rules = eventHub.listAuthorizationRules(); + set.clear(); + for (EventHubAuthorizationRule rule : rules) { + set.add(rule.name()); + } + Assertions.assertTrue(set.contains("mngRule1")); + Assertions.assertTrue(set.contains("sndRule1")); + Assertions.assertTrue(set.contains("sndRule2")); + } + + @Test + public void canConfigureEventHubDataCapturing() { + rgName = generateRandomResourceName("javacsmrg", 15); + final String stgName = generateRandomResourceName("stg", 14); + final String namespaceName = generateRandomResourceName("ns", 14); + final String eventHubName1 = generateRandomResourceName("eh", 14); + final String eventHubName2 = generateRandomResourceName("eh", 14); + + Creatable storageAccountCreatable = storageManager.storageAccounts() + .define(stgName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withSku(StorageAccountSkuType.STANDARD_LRS); + + Creatable namespaceCreatable = eventHubsManager.namespaces() + .define(namespaceName) + .withRegion(region) + .withNewResourceGroup(rgName); + + final String containerName1 = "eventsctr1"; + + EventHub eventHub1 = eventHubsManager.eventHubs() + .define(eventHubName1) + .withNewNamespace(namespaceCreatable) + .withNewStorageAccountForCapturedData(storageAccountCreatable, containerName1) + .withDataCaptureEnabled() + // Window config is optional if not set service will choose default for it2 + // + .withDataCaptureWindowSizeInSeconds(120) + .withDataCaptureWindowSizeInMB(300) + .withDataCaptureSkipEmptyArchives(true) + .create(); + + Assertions.assertNotNull(eventHub1); + Assertions.assertNotNull(eventHub1.inner()); + + Assertions.assertNotNull(eventHub1.name()); + Assertions.assertTrue(eventHub1.name().equalsIgnoreCase(eventHubName1)); + + Assertions.assertNotNull(eventHub1.partitionIds()); + + Assertions.assertTrue(eventHub1.isDataCaptureEnabled()); + Assertions.assertNotNull(eventHub1.captureDestination()); + Assertions.assertTrue(eventHub1.captureDestination().storageAccountResourceId().contains("/storageAccounts/")); + Assertions.assertTrue(eventHub1.captureDestination().storageAccountResourceId().contains(stgName)); + Assertions.assertTrue(eventHub1.captureDestination().blobContainer().equalsIgnoreCase(containerName1)); + Assertions.assertTrue(eventHub1.dataCaptureSkipEmptyArchives()); + + // Create another event Hub in the same namespace with data capture uses the same storage account + // + String stgAccountId = eventHub1.captureDestination().storageAccountResourceId(); + final String containerName2 = "eventsctr2"; + + EventHub eventHub2 = eventHubsManager.eventHubs() + .define(eventHubName2) + .withNewNamespace(namespaceCreatable) + .withExistingStorageAccountForCapturedData(stgAccountId, containerName2) + .withDataCaptureEnabled() + .create(); + + Assertions.assertTrue(eventHub2.isDataCaptureEnabled()); + Assertions.assertNotNull(eventHub2.captureDestination()); + Assertions.assertTrue(eventHub2.captureDestination().storageAccountResourceId().contains("/storageAccounts/")); + Assertions.assertTrue(eventHub2.captureDestination().storageAccountResourceId().contains(stgName)); + Assertions.assertTrue(eventHub2.captureDestination().blobContainer().equalsIgnoreCase(containerName2)); + + eventHub2.update() + .withDataCaptureDisabled() + .apply(); + + Assertions.assertFalse(eventHub2.isDataCaptureEnabled()); + } + + @Test + public void canEnableEventHubDataCaptureOnUpdate() { + rgName = generateRandomResourceName("javacsmrg", 15); + final String stgName = generateRandomResourceName("stg", 14); + final String namespaceName = generateRandomResourceName("ns", 14); + final String eventHubName = generateRandomResourceName("eh", 14); + + Creatable namespaceCreatable = eventHubsManager.namespaces() + .define(namespaceName) + .withRegion(region) + .withNewResourceGroup(rgName); + + EventHub eventHub = eventHubsManager.eventHubs() + .define(eventHubName) + .withNewNamespace(namespaceCreatable) + .create(); + + boolean exceptionThrown = false; + try { + eventHub.update() + .withDataCaptureEnabled() + .apply(); + } catch (IllegalStateException ex) { + exceptionThrown = true; + } + Assertions.assertTrue(exceptionThrown, "Expected IllegalStateException is not thrown"); + + eventHub = eventHub.refresh(); + + Creatable storageAccountCreatable = storageManager.storageAccounts() + .define(stgName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withSku(StorageAccountSkuType.STANDARD_LRS); + + eventHub.update() + .withDataCaptureEnabled() + .withNewStorageAccountForCapturedData(storageAccountCreatable, "eventctr") + .apply(); + + Assertions.assertTrue(eventHub.isDataCaptureEnabled()); + Assertions.assertNotNull(eventHub.captureDestination()); + Assertions.assertTrue(eventHub.captureDestination().storageAccountResourceId().contains("/storageAccounts/")); + Assertions.assertTrue(eventHub.captureDestination().storageAccountResourceId().contains(stgName)); + Assertions.assertTrue(eventHub.captureDestination().blobContainer().equalsIgnoreCase("eventctr")); + } + + @Test + public void canManageGeoDisasterRecoveryPairing() throws Throwable { + rgName = generateRandomResourceName("javacsmrg", 15); + final String geodrName = generateRandomResourceName("geodr", 14); + final String namespaceName1 = generateRandomResourceName("ns", 14); + final String namespaceName2 = generateRandomResourceName("ns", 14); + + EventHubNamespace primaryNamespace = eventHubsManager.namespaces() + .define(namespaceName1) + .withRegion(Region.US_SOUTH_CENTRAL) + .withNewResourceGroup(rgName) + .create(); + + EventHubNamespace secondaryNamespace = eventHubsManager.namespaces() + .define(namespaceName2) + .withRegion(Region.US_NORTH_CENTRAL) + .withExistingResourceGroup(rgName) + .create(); + + Exception exception = null; + Exception breakingFailed = null; + EventHubDisasterRecoveryPairing pairing = null; + try { + pairing = eventHubsManager.eventHubDisasterRecoveryPairings() + .define(geodrName) + .withExistingPrimaryNamespace(primaryNamespace) + .withExistingSecondaryNamespace(secondaryNamespace) + .create(); + + while (pairing.provisioningState() != ProvisioningStateDR.SUCCEEDED) { + pairing = pairing.refresh(); + SdkContext.sleep(15 * 1000); + if (pairing.provisioningState() == ProvisioningStateDR.FAILED) { + Assertions.assertTrue(false, "Provisioning state of the pairing is FAILED"); + } + } + + + Assertions.assertTrue(pairing.name().equalsIgnoreCase(geodrName)); + Assertions.assertTrue(pairing.primaryNamespaceResourceGroupName().equalsIgnoreCase(rgName)); + Assertions.assertTrue(pairing.primaryNamespaceName().equalsIgnoreCase(primaryNamespace.name())); + Assertions.assertTrue(pairing.secondaryNamespaceId().equalsIgnoreCase(secondaryNamespace.id())); + + PagedIterable rules = pairing.listAuthorizationRules(); + Assertions.assertTrue(TestUtilities.getSize(rules) > 0); + for (DisasterRecoveryPairingAuthorizationRule rule : rules) { + DisasterRecoveryPairingAuthorizationKey keys = rule.getKeys(); + Assertions.assertNotNull(keys.aliasPrimaryConnectionString()); + Assertions.assertNotNull(keys.aliasPrimaryConnectionString()); + Assertions.assertNotNull(keys.primaryKey()); + Assertions.assertNotNull(keys.secondaryKey()); + } + + EventHubDisasterRecoveryPairings pairingsCol = eventHubsManager.eventHubDisasterRecoveryPairings(); + PagedIterable pairings = pairingsCol + .listByNamespace(primaryNamespace.resourceGroupName(), primaryNamespace.name()); + + Assertions.assertTrue(TestUtilities.getSize(pairings) > 0); + + boolean found = false; + for (EventHubDisasterRecoveryPairing pairing1 : pairings) { + if (pairing1.name().equalsIgnoreCase(pairing.name())) { + found = true; + Assertions.assertTrue(pairing1.primaryNamespaceResourceGroupName().equalsIgnoreCase(rgName)); + Assertions.assertTrue(pairing1.primaryNamespaceName().equalsIgnoreCase(primaryNamespace.name())); + Assertions.assertTrue(pairing1.secondaryNamespaceId().equalsIgnoreCase(secondaryNamespace.id())); + } + } + Assertions.assertTrue(found); + } catch (Exception ex) { + exception = ex; + } finally { + if (exception != null && pairing != null) { + // Resource group cannot be deleted if the pairing-replication is progress so + // pairing must forcefully break. + try { + pairing.breakPairing(); + } catch (Exception ex) { + breakingFailed = ex; + } + } + } + if (exception != null && breakingFailed != null) { + throw Exceptions.addSuppressed(exception, breakingFailed); + } + if (exception != null) { + throw exception; + } + if (breakingFailed != null) { + throw breakingFailed; + } + pairing.refresh(); + pairing.failOver(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canConfigureEventHubDataCapturing.json b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canConfigureEventHubDataCapturing.json new file mode 100644 index 0000000000000..3fb51f24a5b9a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canConfigureEventHubDataCapturing.json @@ -0,0 +1,569 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg75599?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:34 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d6cfe00a-4922-4a30-a641-5d22ec2eda6e", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063234Z:d6cfe00a-4922-4a30-a641-5d22ec2eda6e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "d6cfe00a-4922-4a30-a641-5d22ec2eda6e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599\",\"name\":\"javacsmrg75599\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:32:31.908316300Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg75599?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:33 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "88ac9eb3-34f6-43ff-9c2a-a4432bfe0689", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063234Z:88ac9eb3-34f6-43ff-9c2a-a4432bfe0689", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "88ac9eb3-34f6-43ff-9c2a-a4432bfe0689", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599\",\"name\":\"javacsmrg75599\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:32:31.893356500Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:40 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ff2c3048-1b3d-4852-9dec-d1079567a7a1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063240Z:ff2c3048-1b3d-4852-9dec-d1079567a7a1", + "content-type" : "text/plain; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/702e74fb-997e-448c-800b-56b0cd26982a?monitor=true&api-version=2019-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "702e74fb-997e-448c-800b-56b0cd26982a", + "Body" : "" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:41 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ea18d183-e9b1-43e2-b239-b1017e48533e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "48", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063241Z:ea18d183-e9b1-43e2-b239-b1017e48533e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c4825712-1926-4709-91ed-edcb84de489d_M11CH3_M11CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728\",\"name\":\"nsfbd2101728\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsfbd2101728\",\"createdAt\":\"2020-08-28T06:32:39.96Z\",\"updatedAt\":\"2020-08-28T06:32:39.96Z\",\"serviceBusEndpoint\":\"https://nsfbd2101728.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/702e74fb-997e-448c-800b-56b0cd26982a?monitor=true&api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:58 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "1107", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6423c0d5-4b11-4868-b119-8b772abcf80f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063258Z:6423c0d5-4b11-4868-b119-8b772abcf80f", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "bb15ff1e-1830-41d4-a61c-80b50a55510d", + "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000\",\"name\":\"stgb3c522000\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:32:40.3511954Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:32:40.3511954Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-08-28T06:32:40.2574414Z\",\"primaryEndpoints\":{\"blob\":\"https://stgb3c522000.blob.core.windows.net/\",\"queue\":\"https://stgb3c522000.queue.core.windows.net/\",\"table\":\"https://stgb3c522000.table.core.windows.net/\",\"file\":\"https://stgb3c522000.file.core.windows.net/\"},\"primaryLocation\":\"eastus\",\"statusOfPrimary\":\"available\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:58 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "1107", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11965", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a8307579-f38d-4a59-8197-8406c39fc31c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063259Z:a8307579-f38d-4a59-8197-8406c39fc31c", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "7b51abb6-7b46-4689-8059-b406900c1b9c", + "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000\",\"name\":\"stgb3c522000\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:32:40.3511954Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:32:40.3511954Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-08-28T06:32:40.2574414Z\",\"primaryEndpoints\":{\"blob\":\"https://stgb3c522000.blob.core.windows.net/\",\"queue\":\"https://stgb3c522000.queue.core.windows.net/\",\"table\":\"https://stgb3c522000.table.core.windows.net/\",\"file\":\"https://stgb3c522000.file.core.windows.net/\"},\"primaryLocation\":\"eastus\",\"statusOfPrimary\":\"available\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000/blobServices/default/containers/eventsctr1?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:59 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "181", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "404", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "29140169-35c8-4d82-98ac-7e9bf873d394", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063259Z:29140169-35c8-4d82-98ac-7e9bf873d394", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "2034165d-2456-45ea-b65c-f33704de307a", + "Body" : "{\"error\":{\"code\":\"ContainerOperationFailure\",\"message\":\"The specified container does not exist.\\nRequestId:73eb3dfc-501e-007b-3805-7da262000000\\nTime:2020-08-28T06:32:59.4670052Z\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000/blobServices/default/containers/eventsctr1?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:59 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "413", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "012fd9e9-964a-4b0e-a1f0-95d6ed10607a", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063300Z:012fd9e9-964a-4b0e-a1f0-95d6ed10607a", + "etag" : "\"0x8D84B1C356D7E89\"", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "d03dba51-bdcc-4526-8f85-cd225237155f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000/blobServices/default/containers/eventsctr1\",\"name\":\"eventsctr1\",\"type\":\"Microsoft.Storage/storageAccounts/blobServices/containers\",\"properties\":{\"deleted\":false,\"remainingRetentionDays\":0,\"publicAccess\":\"Container\",\"hasImmutabilityPolicy\":false,\"hasLegalHold\":false}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:11 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "83c54e8a-f1e0-4484-b6ac-c9e2955440fe", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063312Z:83c54e8a-f1e0-4484-b6ac-c9e2955440fe", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "4e36245f-a2a7-4708-9d63-af2a1ad26e9a_M7SN1_M7SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728\",\"name\":\"nsfbd2101728\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsfbd2101728\",\"createdAt\":\"2020-08-28T06:32:39.96Z\",\"updatedAt\":\"2020-08-28T06:32:39.96Z\",\"serviceBusEndpoint\":\"https://nsfbd2101728.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "645", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "56e228ac-d2e9-4830-8565-54514e3a4232", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063342Z:56e228ac-d2e9-4830-8565-54514e3a4232", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "5d33ce26-aa72-4f7f-87a9-e011d51ccb93_M11CH3_M11CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728\",\"name\":\"nsfbd2101728\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsfbd2101728\",\"createdAt\":\"2020-08-28T06:32:39.96Z\",\"updatedAt\":\"2020-08-28T06:33:29.907Z\",\"serviceBusEndpoint\":\"https://nsfbd2101728.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728/eventhubs/eh1658418986?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:45 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "955", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "99d89e80-f126-4715-98d8-ab310cadb2fc", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063345Z:99d89e80-f126-4715-98d8-ab310cadb2fc", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "08b22bde-61f7-4f55-ba9e-7c7202405440_M2SN1_M2SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728/eventhubs/eh1658418986\",\"name\":\"eh1658418986\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:44.447Z\",\"updatedAt\":\"2020-08-28T06:33:44.773Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000\",\"blobContainer\":\"eventsctr1\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":120,\"sizeLimitInBytes\":314572800,\"skipEmptyArchives\":true}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:45 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "1107", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "21042529-2c19-46bd-9aff-1143fceb9640", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063345Z:21042529-2c19-46bd-9aff-1143fceb9640", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "46e86267-60f1-42d3-8e5c-4662009f1afa", + "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000\",\"name\":\"stgb3c522000\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:32:40.3511954Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:32:40.3511954Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-08-28T06:32:40.2574414Z\",\"primaryEndpoints\":{\"blob\":\"https://stgb3c522000.blob.core.windows.net/\",\"queue\":\"https://stgb3c522000.queue.core.windows.net/\",\"table\":\"https://stgb3c522000.table.core.windows.net/\",\"file\":\"https://stgb3c522000.file.core.windows.net/\"},\"primaryLocation\":\"eastus\",\"statusOfPrimary\":\"available\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000/blobServices/default/containers/eventsctr2?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:46 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "181", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "404", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0a9b2a2b-2bea-432c-8180-8c18548609fa", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063346Z:0a9b2a2b-2bea-432c-8180-8c18548609fa", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "6d5cffe7-7f81-4af2-a8c3-6e491da3596c", + "Body" : "{\"error\":{\"code\":\"ContainerOperationFailure\",\"message\":\"The specified container does not exist.\\nRequestId:73ec11e5-501e-007b-7305-7da262000000\\nTime:2020-08-28T06:33:46.0452328Z\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000/blobServices/default/containers/eventsctr2?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:46 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "413", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a96092e9-2c18-46e6-a7b4-746e91e8415b", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063346Z:a96092e9-2c18-46e6-a7b4-746e91e8415b", + "etag" : "\"0x8D84B1C512DA65C\"", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "6030c6af-bfce-4794-bb6c-22ef2890d2bf", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000/blobServices/default/containers/eventsctr2\",\"name\":\"eventsctr2\",\"type\":\"Microsoft.Storage/storageAccounts/blobServices/containers\",\"properties\":{\"deleted\":false,\"remainingRetentionDays\":0,\"publicAccess\":\"Container\",\"hasImmutabilityPolicy\":false,\"hasLegalHold\":false}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728/eventhubs/eh146414972c?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:49 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "928", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "52aabefe-35bf-4965-b6f5-2b9e100b2aa3", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063349Z:52aabefe-35bf-4965-b6f5-2b9e100b2aa3", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "ea50e5e2-1269-4d00-b787-650882d6aa61_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728/eventhubs/eh146414972c\",\"name\":\"eh146414972c\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:48.88Z\",\"updatedAt\":\"2020-08-28T06:33:49.22Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000\",\"blobContainer\":\"eventsctr2\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":300,\"sizeLimitInBytes\":104857600}}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728/eventhubs/eh146414972c?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:50 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "906", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "edf52203-fad2-4f08-bab3-ced147bb9bf7", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063350Z:edf52203-fad2-4f08-bab3-ced147bb9bf7", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "2d2bc102-45ca-4bc8-afe4-e6470b768f0a_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.EventHub/namespaces/nsfbd2101728/eventhubs/eh146414972c\",\"name\":\"eh146414972c\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":false,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg75599/providers/Microsoft.Storage/storageAccounts/stgb3c522000\",\"blobContainer\":\"eventsctr2\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":300,\"sizeLimitInBytes\":104857600}}}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg75599?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:55 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5588c296-3e2e-42eb-a26d-67d9f64245e5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063355Z:5588c296-3e2e-42eb-a26d-67d9f64245e5", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "5588c296-3e2e-42eb-a26d-67d9f64245e5", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:10 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4802825f-4e94-4f57-a8b6-bd76ca8554c3", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063411Z:4802825f-4e94-4f57-a8b6-bd76ca8554c3", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "4802825f-4e94-4f57-a8b6-bd76ca8554c3", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:26 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "95cec205-4354-4b2c-a66b-ada8155ec7ea", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063426Z:95cec205-4354-4b2c-a66b-ada8155ec7ea", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "95cec205-4354-4b2c-a66b-ada8155ec7ea", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:41 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d7f1ca3a-6ad7-451c-b38d-a51588e115ce", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063442Z:d7f1ca3a-6ad7-451c-b38d-a51588e115ce", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "d7f1ca3a-6ad7-451c-b38d-a51588e115ce", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:57 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e1f47439-be12-4caa-b3db-9c9e0763d775", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063457Z:e1f47439-be12-4caa-b3db-9c9e0763d775", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "e1f47439-be12-4caa-b3db-9c9e0763d775", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:13 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b547292a-4961-4c27-944a-692c6d41adac", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063513Z:b547292a-4961-4c27-944a-692c6d41adac", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "b547292a-4961-4c27-944a-692c6d41adac", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc3NTU5OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:28 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "44350f60-79f0-43c4-ab6c-916bc2a05ada", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063528Z:44350f60-79f0-43c4-ab6c-916bc2a05ada", + "cache-control" : "no-cache", + "x-ms-request-id" : "44350f60-79f0-43c4-ab6c-916bc2a05ada", + "Body" : "" + } + } ], + "variables" : [ "javacsmrg75599", "stgb3c522000", "nsfbd2101728", "eh1658418986", "eh146414972c" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canEnableEventHubDataCaptureOnUpdate.json b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canEnableEventHubDataCaptureOnUpdate.json new file mode 100644 index 0000000000000..c828bfab14227 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canEnableEventHubDataCaptureOnUpdate.json @@ -0,0 +1,516 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg19977?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:34 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c0761014-c635-4f3e-ab40-d24d4237d465", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063234Z:c0761014-c635-4f3e-ab40-d24d4237d465", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c0761014-c635-4f3e-ab40-d24d4237d465", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977\",\"name\":\"javacsmrg19977\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:32:31.919286600Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:41 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b8e03b5b-8f17-4d4a-9e7f-fe285f59d097", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063241Z:b8e03b5b-8f17-4d4a-9e7f-fe285f59d097", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "81ef151b-29fd-4128-8c1c-30baa05518b0_M6SN1_M6SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247\",\"name\":\"ns8808166247\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns8808166247\",\"createdAt\":\"2020-08-28T06:32:40.11Z\",\"updatedAt\":\"2020-08-28T06:32:40.11Z\",\"serviceBusEndpoint\":\"https://ns8808166247.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:11 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "30111295-b46a-4865-b1bc-68220780a00c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063312Z:30111295-b46a-4865-b1bc-68220780a00c", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "be9d78dc-3e5f-4407-9a12-c10619306b52_M11CH3_M11CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247\",\"name\":\"ns8808166247\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns8808166247\",\"createdAt\":\"2020-08-28T06:32:40.11Z\",\"updatedAt\":\"2020-08-28T06:32:40.11Z\",\"serviceBusEndpoint\":\"https://ns8808166247.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:41 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "644", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "26a68512-141c-4573-aee1-ead091767151", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063342Z:26a68512-141c-4573-aee1-ead091767151", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8c8ab952-c861-4d28-b654-f8d64c32d0e8_M7SN1_M7SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247\",\"name\":\"ns8808166247\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns8808166247\",\"createdAt\":\"2020-08-28T06:32:40.11Z\",\"updatedAt\":\"2020-08-28T06:33:26.23Z\",\"serviceBusEndpoint\":\"https://ns8808166247.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247/eventhubs/ehcdc85575b3?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:44 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "447", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4808ba2b-fe3d-45b8-9fd2-c549c82779ed", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063344Z:4808ba2b-fe3d-45b8-9fd2-c549c82779ed", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8832cb30-8424-49f3-be45-7d3d96d0426c_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247/eventhubs/ehcdc85575b3\",\"name\":\"ehcdc85575b3\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:43.907Z\",\"updatedAt\":\"2020-08-28T06:33:44.07Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247/eventhubs/ehcdc85575b3?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:44 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "445", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "69e08f09-18a4-4c7d-81d6-4decb2945bc2", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063345Z:69e08f09-18a4-4c7d-81d6-4decb2945bc2", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "7abd546d-3d3b-44de-9842-c990fc4b7ebc_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247/eventhubs/ehcdc85575b3\",\"name\":\"ehcdc85575b3\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:43.907\",\"updatedAt\":\"2020-08-28T06:33:44.07\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg19977?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:46 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "799a8064-9a16-4feb-8e66-3f4b70d2e5e4", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063347Z:799a8064-9a16-4feb-8e66-3f4b70d2e5e4", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "799a8064-9a16-4feb-8e66-3f4b70d2e5e4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977\",\"name\":\"javacsmrg19977\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:33:45.227072500Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.Storage/storageAccounts/stg73481328c?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:52 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e377c9b2-7808-4e81-876a-e61190a90265", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063353Z:e377c9b2-7808-4e81-876a-e61190a90265", + "content-type" : "text/plain; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/e8ccc480-e3d3-4074-a9b3-54182949e1fb?monitor=true&api-version=2019-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "e8ccc480-e3d3-4074-a9b3-54182949e1fb", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/e8ccc480-e3d3-4074-a9b3-54182949e1fb?monitor=true&api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:10 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "1107", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "36660d35-7b24-4e47-81c7-c3274ca26b9c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063411Z:36660d35-7b24-4e47-81c7-c3274ca26b9c", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "55239240-abff-47e3-aa03-7d2ae8b4ac24", + "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.Storage/storageAccounts/stg73481328c\",\"name\":\"stg73481328c\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:33:53.2115538Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:33:53.2115538Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-08-28T06:33:53.1178062Z\",\"primaryEndpoints\":{\"blob\":\"https://stg73481328c.blob.core.windows.net/\",\"queue\":\"https://stg73481328c.queue.core.windows.net/\",\"table\":\"https://stg73481328c.table.core.windows.net/\",\"file\":\"https://stg73481328c.file.core.windows.net/\"},\"primaryLocation\":\"eastus\",\"statusOfPrimary\":\"available\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.Storage/storageAccounts/stg73481328c?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:11 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "1107", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e4a36ec5-8494-4625-8b00-0aa03773a2b4", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063412Z:e4a36ec5-8494-4625-8b00-0aa03773a2b4", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "438d4eac-8d4d-4de8-a9aa-bb168e28e7a4", + "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.Storage/storageAccounts/stg73481328c\",\"name\":\"stg73481328c\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:33:53.2115538Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:33:53.2115538Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-08-28T06:33:53.1178062Z\",\"primaryEndpoints\":{\"blob\":\"https://stg73481328c.blob.core.windows.net/\",\"queue\":\"https://stg73481328c.queue.core.windows.net/\",\"table\":\"https://stg73481328c.table.core.windows.net/\",\"file\":\"https://stg73481328c.file.core.windows.net/\"},\"primaryLocation\":\"eastus\",\"statusOfPrimary\":\"available\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.Storage/storageAccounts/stg73481328c/blobServices/default/containers/eventctr?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:12 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "181", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "404", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ad8cc00a-f28a-46d1-9097-602d1badd91c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063413Z:ad8cc00a-f28a-46d1-9097-602d1badd91c", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "e7010ec8-c9ae-4b6c-b89a-2b60fdffd923", + "Body" : "{\"error\":{\"code\":\"ContainerOperationFailure\",\"message\":\"The specified container does not exist.\\nRequestId:b7b5ab49-d01e-003f-2905-7d5fc5000000\\nTime:2020-08-28T06:34:12.9093053Z\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.Storage/storageAccounts/stg73481328c/blobServices/default/containers/eventctr?api-version=2019-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:13 GMT", + "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "409", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "96c241da-847c-44ff-98f1-a3a6b17cddd0", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063413Z:96c241da-847c-44ff-98f1-a3a6b17cddd0", + "etag" : "\"0x8D84B1C61341F52\"", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "2bb64375-5076-4f65-9558-22e1d3a3ced2", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.Storage/storageAccounts/stg73481328c/blobServices/default/containers/eventctr\",\"name\":\"eventctr\",\"type\":\"Microsoft.Storage/storageAccounts/blobServices/containers\",\"properties\":{\"deleted\":false,\"remainingRetentionDays\":0,\"publicAccess\":\"Container\",\"hasImmutabilityPolicy\":false,\"hasLegalHold\":false}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247/eventhubs/ehcdc85575b3?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:13 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "903", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "75a9a382-bbb6-4dbe-b6ac-b1e14886a92c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063414Z:75a9a382-bbb6-4dbe-b6ac-b1e14886a92c", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3188d2be-48ca-455d-afe0-e60efdb7b44b_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.EventHub/namespaces/ns8808166247/eventhubs/ehcdc85575b3\",\"name\":\"ehcdc85575b3\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19977/providers/Microsoft.Storage/storageAccounts/stg73481328c\",\"blobContainer\":\"eventctr\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":300,\"sizeLimitInBytes\":104857600}}}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg19977?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:15 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "294ab68d-0d87-40a4-b80d-eeaae8c306f7", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063416Z:294ab68d-0d87-40a4-b80d-eeaae8c306f7", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "294ab68d-0d87-40a4-b80d-eeaae8c306f7", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:31 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "408b5ccb-cd70-4fef-b25d-ebfa03e4b0de", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063432Z:408b5ccb-cd70-4fef-b25d-ebfa03e4b0de", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "408b5ccb-cd70-4fef-b25d-ebfa03e4b0de", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:47 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9c5cdfca-d1c5-43d1-9b33-48cb04d60d2e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063447Z:9c5cdfca-d1c5-43d1-9b33-48cb04d60d2e", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "9c5cdfca-d1c5-43d1-9b33-48cb04d60d2e", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:02 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0606f6fd-2f92-495f-9762-8047b8ba6965", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063503Z:0606f6fd-2f92-495f-9762-8047b8ba6965", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "0606f6fd-2f92-495f-9762-8047b8ba6965", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:17 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cad12b62-bb86-4a1b-99b9-b2246893fa59", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063518Z:cad12b62-bb86-4a1b-99b9-b2246893fa59", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "cad12b62-bb86-4a1b-99b9-b2246893fa59", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:33 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11975", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a3bf753c-42cd-40a9-a66d-2ecf593878b5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063534Z:a3bf753c-42cd-40a9-a66d-2ecf593878b5", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "a3bf753c-42cd-40a9-a66d-2ecf593878b5", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:49 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9d73d744-94cd-4200-84ad-3c7b6c378423", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063549Z:9d73d744-94cd-4200-84ad-3c7b6c378423", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "9d73d744-94cd-4200-84ad-3c7b6c378423", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTk3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:05 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11956", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d697f51a-3253-4474-ab48-7cce018b337d", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063605Z:d697f51a-3253-4474-ab48-7cce018b337d", + "cache-control" : "no-cache", + "x-ms-request-id" : "d697f51a-3253-4474-ab48-7cce018b337d", + "Body" : "" + } + } ], + "variables" : [ "javacsmrg19977", "stg73481328c", "ns8808166247", "ehcdc85575b3" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubAuthorizationRules.json b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubAuthorizationRules.json new file mode 100644 index 0000000000000..ae3f9a30bc26e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubAuthorizationRules.json @@ -0,0 +1,447 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg89263?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:33 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "be7027fe-eeb3-4116-8258-f38dbffb83b2", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063234Z:be7027fe-eeb3-4116-8258-f38dbffb83b2", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "be7027fe-eeb3-4116-8258-f38dbffb83b2", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263\",\"name\":\"javacsmrg89263\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:32:31.876401600Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "648", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f9db4ba5-b293-4de5-bc15-85d8f6bea6c7", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063242Z:f9db4ba5-b293-4de5-bc15-85d8f6bea6c7", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "66c55575-1fcf-4038-8fb7-7777cff1c060_M4CH3_M4CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f\",\"name\":\"ns9bd229844f\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9bd229844f\",\"createdAt\":\"2020-08-28T06:32:40.877Z\",\"updatedAt\":\"2020-08-28T06:32:40.877Z\",\"serviceBusEndpoint\":\"https://ns9bd229844f.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:12 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "648", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2f2bc40b-7686-4234-83cc-1f2bc67727ed", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063313Z:2f2bc40b-7686-4234-83cc-1f2bc67727ed", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "893cde07-24b3-40ef-adac-7840d550fed8_M6CH3_M6CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f\",\"name\":\"ns9bd229844f\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9bd229844f\",\"createdAt\":\"2020-08-28T06:32:40.877Z\",\"updatedAt\":\"2020-08-28T06:32:40.877Z\",\"serviceBusEndpoint\":\"https://ns9bd229844f.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "645", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0812a647-df0c-41ac-b525-54b703abecb8", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063343Z:0812a647-df0c-41ac-b525-54b703abecb8", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c86a2263-1b31-4aab-90c4-a3c9a05afc5f_M7CH3_M7CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f\",\"name\":\"ns9bd229844f\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9bd229844f\",\"createdAt\":\"2020-08-28T06:32:40.877Z\",\"updatedAt\":\"2020-08-28T06:33:34.31Z\",\"serviceBusEndpoint\":\"https://ns9bd229844f.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:45 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "447", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5a198578-07d5-4af4-b281-dc013eac2fb5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063346Z:5a198578-07d5-4af4-b281-dc013eac2fb5", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3e4a0540-e289-4487-9024-9c1f5d8ff7e7_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6\",\"name\":\"ehd6690694e6\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:45.177Z\",\"updatedAt\":\"2020-08-28T06:33:45.42Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/mngRule1?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:46 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "352", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6c37b849-3960-4f3a-8785-4abdf50eb695", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063346Z:6c37b849-3960-4f3a-8785-4abdf50eb695", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "7cb64d04-b139-4484-a363-d25ad7467753_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/sndRule1?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:46 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "334", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c9ded3fa-37d4-4e82-b518-ab7f78f62e6e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063347Z:c9ded3fa-37d4-4e82-b518-ab7f78f62e6e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "9f01e357-1212-4285-a31a-ba1c9c0ee202_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:48 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "699", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "25ffd8f3-b4b0-4a4f-96d1-edf23679d9c4", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063348Z:25ffd8f3-b4b0-4a4f-96d1-edf23679d9c4", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "7191dc75-23ce-4e5e-94a4-2c030e6a6c6e_M7CH3_M7CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}]}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:48 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "699", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7d24b09e-8f8a-4bcf-9862-eb5a9cf2b898", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063348Z:7d24b09e-8f8a-4bcf-9862-eb5a9cf2b898", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "0cb467b8-cad6-464a-9ea3-062bc0310723_M10CH3_M10CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}]}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/sndRule2?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:48 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "334", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ba17abd1-2ff1-4e00-a8c8-083fd78c62b3", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063349Z:ba17abd1-2ff1-4e00-a8c8-083fd78c62b3", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8dba7b31-f33f-4ec1-a459-003f68950c6e_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/sndRule2\",\"name\":\"sndRule2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:49 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "1034", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1025ce36-eb7b-4cfc-9744-28e392128477", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063349Z:1025ce36-eb7b-4cfc-9744-28e392128477", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "fc1d626f-be54-4ac8-82d7-74a21df5efaa_M7CH3_M7CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg89263/providers/Microsoft.EventHub/namespaces/ns9bd229844f/eventhubs/ehd6690694e6/authorizationRules/sndRule2\",\"name\":\"sndRule2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}]}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg89263?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:54 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "466bcb3b-b6d2-48c3-9bfc-fa10a5c0ef91", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063354Z:466bcb3b-b6d2-48c3-9bfc-fa10a5c0ef91", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "466bcb3b-b6d2-48c3-9bfc-fa10a5c0ef91", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:10 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0df42f36-1ded-4e94-a622-3dfaf0d86054", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063410Z:0df42f36-1ded-4e94-a622-3dfaf0d86054", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "0df42f36-1ded-4e94-a622-3dfaf0d86054", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:26 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11961", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8d58b65c-a64d-4edc-a6c2-3e283ae69237", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063426Z:8d58b65c-a64d-4edc-a6c2-3e283ae69237", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "8d58b65c-a64d-4edc-a6c2-3e283ae69237", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:41 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e35d6b75-a942-4ede-8588-0316f49e141f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063442Z:e35d6b75-a942-4ede-8588-0316f49e141f", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "e35d6b75-a942-4ede-8588-0316f49e141f", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:56 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b64771b1-f76b-4a37-a212-3a8114bce1ca", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063457Z:b64771b1-f76b-4a37-a212-3a8114bce1ca", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "b64771b1-f76b-4a37-a212-3a8114bce1ca", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:13 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "20fbef10-1790-41c2-a57e-be5b4839ac03", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063513Z:20fbef10-1790-41c2-a57e-be5b4839ac03", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "20fbef10-1790-41c2-a57e-be5b4839ac03", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc4OTI2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:28 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1bdb0285-5df7-4a8d-97b0-081b058b0c40", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063528Z:1bdb0285-5df7-4a8d-97b0-081b058b0c40", + "cache-control" : "no-cache", + "x-ms-request-id" : "1bdb0285-5df7-4a8d-97b0-081b058b0c40", + "Body" : "" + } + } ], + "variables" : [ "javacsmrg89263", "ns9bd229844f", "ehd6690694e6" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubConsumerGroups.json b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubConsumerGroups.json new file mode 100644 index 0000000000000..a8dbc54c02dbc --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubConsumerGroups.json @@ -0,0 +1,450 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg00463?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:33 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7514927c-1303-4003-b505-b08c6923713a", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063234Z:7514927c-1303-4003-b505-b08c6923713a", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "7514927c-1303-4003-b505-b08c6923713a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463\",\"name\":\"javacsmrg00463\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:32:31.881388100Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "648", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e5c8977c-0d3e-47bb-865f-293689122df8", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063243Z:e5c8977c-0d3e-47bb-865f-293689122df8", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "85d614a0-a0c9-4cd5-80a6-2ed4fcd75b06_M2CH3_M2CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c\",\"name\":\"ns5a9322645c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns5a9322645c\",\"createdAt\":\"2020-08-28T06:32:40.773Z\",\"updatedAt\":\"2020-08-28T06:32:40.773Z\",\"serviceBusEndpoint\":\"https://ns5a9322645c.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:12 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "648", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "35ed7692-c84f-4622-a767-a4995b9e30a3", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063313Z:35ed7692-c84f-4622-a767-a4995b9e30a3", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "125dc89e-d5ad-410f-8808-ba3d42e59098_M7CH3_M7CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c\",\"name\":\"ns5a9322645c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns5a9322645c\",\"createdAt\":\"2020-08-28T06:32:40.773Z\",\"updatedAt\":\"2020-08-28T06:32:40.773Z\",\"serviceBusEndpoint\":\"https://ns5a9322645c.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:43 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "323445a5-cbdd-43b7-bdfd-e40e970a2163", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063344Z:323445a5-cbdd-43b7-bdfd-e40e970a2163", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6009d6c6-9be0-4f98-8e5f-2894c6f3e726_M7SN1_M7SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c\",\"name\":\"ns5a9322645c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns5a9322645c\",\"createdAt\":\"2020-08-28T06:32:40.773Z\",\"updatedAt\":\"2020-08-28T06:33:33.177Z\",\"serviceBusEndpoint\":\"https://ns5a9322645c.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:47 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "447", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d7ab0c56-0a08-453f-8b5c-76c5eaef085d", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063347Z:d7ab0c56-0a08-453f-8b5c-76c5eaef085d", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "4ccfc211-0313-4850-8322-84a9c7163989_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5\",\"name\":\"ehf6425585d5\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:46.657Z\",\"updatedAt\":\"2020-08-28T06:33:46.92Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp1?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:49 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "386", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4ea2562d-0ec0-47fc-93c1-0bfebaf025bb", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063349Z:4ea2562d-0ec0-47fc-93c1-0bfebaf025bb", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "ca49157f-89c7-403d-bfdb-2fc4043b48e9_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp1\",\"name\":\"grp1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:49.3839272Z\",\"updatedAt\":\"2020-08-28T06:33:49.3839272Z\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp2?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:50 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "415", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e7426f9b-8112-4b8d-952a-b8b442cc92df", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063351Z:e7426f9b-8112-4b8d-952a-b8b442cc92df", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "0da9b598-3459-4cec-bfb7-c5146eed1f11_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp2\",\"name\":\"grp2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:51.1427763Z\",\"updatedAt\":\"2020-08-28T06:33:51.1427763Z\",\"userMetadata\":\"metadata111\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:50 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "1183", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11962", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b5664150-9589-46dc-b17a-c72663c13486", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063351Z:b5664150-9589-46dc-b17a-c72663c13486", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-inline-count" : "", + "x-ms-request-id" : "4208b72f-3687-4f52-b24a-aaab1267af1b_M1SN1_M1SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:46.702Z\",\"updatedAt\":\"2020-08-28T06:33:46.702Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp1\",\"name\":\"grp1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:49.421Z\",\"updatedAt\":\"2020-08-28T06:33:49.421Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp2\",\"name\":\"grp2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:51.14Z\",\"updatedAt\":\"2020-08-28T06:33:51.14Z\",\"userMetadata\":\"metadata111\"}}]}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:51 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "1185", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0197403b-d263-44a2-9dda-03d773cee36d", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063352Z:0197403b-d263-44a2-9dda-03d773cee36d", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-inline-count" : "", + "x-ms-request-id" : "cdba4ed5-f461-470a-a50f-49da92a8c229_M7SN1_M7SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:46.701Z\",\"updatedAt\":\"2020-08-28T06:33:46.701Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp1\",\"name\":\"grp1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:49.421Z\",\"updatedAt\":\"2020-08-28T06:33:49.421Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp2\",\"name\":\"grp2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:51.141Z\",\"updatedAt\":\"2020-08-28T06:33:51.141Z\",\"userMetadata\":\"metadata111\"}}]}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp3?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:53 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "415", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "caa8f1db-7242-4bd7-90df-d751266729be", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063354Z:caa8f1db-7242-4bd7-90df-d751266729be", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "bc1b0143-e7c8-48e0-9a5e-27329a431671_M1SN1_M1SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp3\",\"name\":\"grp3\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:53.7964577Z\",\"updatedAt\":\"2020-08-28T06:33:53.7964577Z\",\"userMetadata\":\"metadata222\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:53 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "1593", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "97743505-2567-4455-aa32-d824cfe2fc62", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063354Z:97743505-2567-4455-aa32-d824cfe2fc62", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-inline-count" : "", + "x-ms-request-id" : "7d0a0ab4-ecca-421f-90c9-e580d60ded5f_M7SN1_M7SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:46.701Z\",\"updatedAt\":\"2020-08-28T06:33:46.701Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp1\",\"name\":\"grp1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:49.421Z\",\"updatedAt\":\"2020-08-28T06:33:49.421Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp2\",\"name\":\"grp2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:51.141Z\",\"updatedAt\":\"2020-08-28T06:33:51.141Z\",\"userMetadata\":\"metadata111\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg00463/providers/Microsoft.EventHub/namespaces/ns5a9322645c/eventhubs/ehf6425585d5/consumergroups/grp3\",\"name\":\"grp3\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US\",\"properties\":{\"createdAt\":\"2020-08-28T06:33:53.798Z\",\"updatedAt\":\"2020-08-28T06:33:53.798Z\",\"userMetadata\":\"metadata222\"}}]}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg00463?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:59 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "26575d51-bfa8-4242-8b5e-cf33d67c9aaf", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063400Z:26575d51-bfa8-4242-8b5e-cf33d67c9aaf", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "26575d51-bfa8-4242-8b5e-cf33d67c9aaf", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:15 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "14e4ad4d-a4a8-4d44-97a9-24d5a15ec48f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063416Z:14e4ad4d-a4a8-4d44-97a9-24d5a15ec48f", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "14e4ad4d-a4a8-4d44-97a9-24d5a15ec48f", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:31 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "736ec049-8b08-4c8a-81a9-142f008674f6", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063431Z:736ec049-8b08-4c8a-81a9-142f008674f6", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "736ec049-8b08-4c8a-81a9-142f008674f6", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:46 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11960", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1693add2-4963-4315-b8f2-cbbcbb8470c0", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063447Z:1693add2-4963-4315-b8f2-cbbcbb8470c0", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "1693add2-4963-4315-b8f2-cbbcbb8470c0", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:02 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b66f8e11-8918-498e-94c6-a296a9109f78", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063502Z:b66f8e11-8918-498e-94c6-a296a9109f78", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "b66f8e11-8918-498e-94c6-a296a9109f78", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:18 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4af6b0fc-cd4b-4bf6-854d-bf53c05ea490", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063518Z:4af6b0fc-cd4b-4bf6-854d-bf53c05ea490", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "4af6b0fc-cd4b-4bf6-854d-bf53c05ea490", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcwMDQ2My1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:33 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11957", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "abf3c02a-c893-411e-955b-49c0fbb5eb6b", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063534Z:abf3c02a-c893-411e-955b-49c0fbb5eb6b", + "cache-control" : "no-cache", + "x-ms-request-id" : "abf3c02a-c893-411e-955b-49c0fbb5eb6b", + "Body" : "" + } + } ], + "variables" : [ "javacsmrg00463", "ns5a9322645c", "ehf6425585d5" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceAuthorizationRules.json b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceAuthorizationRules.json new file mode 100644 index 0000000000000..7c73360ff3837 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceAuthorizationRules.json @@ -0,0 +1,496 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg61079?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:35 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9a225d75-bb34-43db-b02f-d51e75b7b149", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063235Z:9a225d75-bb34-43db-b02f-d51e75b7b149", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "9a225d75-bb34-43db-b02f-d51e75b7b149", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079\",\"name\":\"javacsmrg61079\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:32:31.876401600Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:43 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7736deec-a179-40a2-b794-2b30150ed5aa", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063243Z:7736deec-a179-40a2-b794-2b30150ed5aa", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "868557b7-3483-471c-8542-f4f56c3f57bd_M6CH3_M6CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a\",\"name\":\"nsc84517966a\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsc84517966a\",\"createdAt\":\"2020-08-28T06:32:42.12Z\",\"updatedAt\":\"2020-08-28T06:32:42.12Z\",\"serviceBusEndpoint\":\"https://nsc84517966a.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:13 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11964", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1d0ec513-717a-4069-8206-0f6830530c44", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063314Z:1d0ec513-717a-4069-8206-0f6830530c44", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "2fd354bf-7638-4264-93ec-e9c298789267_M1SN1_M1SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a\",\"name\":\"nsc84517966a\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsc84517966a\",\"createdAt\":\"2020-08-28T06:32:42.12Z\",\"updatedAt\":\"2020-08-28T06:32:42.12Z\",\"serviceBusEndpoint\":\"https://nsc84517966a.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:44 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "645", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c30bedcb-c53b-4462-9c6f-bd87afb7c132", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063344Z:c30bedcb-c53b-4462-9c6f-bd87afb7c132", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "216a55f3-ff15-40dd-b1f2-786ee6d9dd47_M7CH3_M7CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a\",\"name\":\"nsc84517966a\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsc84517966a\",\"createdAt\":\"2020-08-28T06:32:42.12Z\",\"updatedAt\":\"2020-08-28T06:33:37.043Z\",\"serviceBusEndpoint\":\"https://nsc84517966a.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/mngRule1?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:50 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "319", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "56635464-8e9b-452f-aa22-f40870e9fa1f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063351Z:56635464-8e9b-452f-aa22-f40870e9fa1f", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "4f2d92e5-ae30-45bf-961e-e08c2fa1ffed_M1SN1_M1SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule1?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:56 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "301", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e0be3ca2-fa9f-4343-a53e-31c5c675e58e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063357Z:e0be3ca2-fa9f-4343-a53e-31c5c675e58e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "1a4b34eb-fc21-4788-a789-096ffec0bedb_M2SN1_M2SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:58 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "987", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cd52134d-220f-43e8-a7d5-9957f36690c9", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063358Z:cd52134d-220f-43e8-a7d5-9957f36690c9", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "dfb04855-4136-4249-a6ec-8727dfd438b5_M11CH3_M11CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}]}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:58 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "987", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7024a9bf-8c33-472e-a5b3-f74694bf6d8e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063359Z:7024a9bf-8c33-472e-a5b3-f74694bf6d8e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "9ccec6c4-94aa-492f-9871-7e496f4ba748_M6SN1_M6SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}]}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule2?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:05 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "301", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5ce421ce-c787-42c7-9895-2ef011f5f2d7", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063405Z:5ce421ce-c787-42c7-9895-2ef011f5f2d7", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "5ec90de1-c8ad-409b-8148-dc1bf42de787_M1SN1_M1SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule2\",\"name\":\"sndRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:06 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "1289", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cb4aa580-7c49-4594-8ae2-ae30db4cb42f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063407Z:cb4aa580-7c49-4594-8ae2-ae30db4cb42f", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8d24b2e2-87cf-4dae-8867-613a67ea8cd8_M1SN1_M1SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule2\",\"name\":\"sndRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}}]}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndLsnRule3?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:13 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "316", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1cba839e-4e8f-4ae0-8faa-b49e0dae9cfb", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063413Z:1cba839e-4e8f-4ae0-8faa-b49e0dae9cfb", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "62148ae3-01a3-457c-a3f8-6dae313323d7_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndLsnRule3\",\"name\":\"sndLsnRule3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\"]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:14 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "1606", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d3171647-d3f2-4536-9536-fdb4e4309705", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063414Z:d3171647-d3f2-4536-9536-fdb4e4309705", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3c9caae5-2da6-4b6e-899b-1f64299c4bf0_M7CH3_M7CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/mngRule1\",\"name\":\"mngRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule1\",\"name\":\"sndRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndRule2\",\"name\":\"sndRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg61079/providers/Microsoft.EventHub/namespaces/nsc84517966a/authorizationRules/sndLsnRule3\",\"name\":\"sndLsnRule3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Send\"]}}]}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg61079?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:16 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "36f6a6ca-3013-42c2-a77b-cb36c5e7d420", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063417Z:36f6a6ca-3013-42c2-a77b-cb36c5e7d420", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "36f6a6ca-3013-42c2-a77b-cb36c5e7d420", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:32 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b9191745-6711-4d1d-b8ee-ead7a27db292", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063433Z:b9191745-6711-4d1d-b8ee-ead7a27db292", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "b9191745-6711-4d1d-b8ee-ead7a27db292", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:48 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "eefd1f21-5da2-4d1f-b0d5-652fdcd661f1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063448Z:eefd1f21-5da2-4d1f-b0d5-652fdcd661f1", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "eefd1f21-5da2-4d1f-b0d5-652fdcd661f1", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:03 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "83a493a0-31f8-4145-aedb-8c3742d1057e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063504Z:83a493a0-31f8-4145-aedb-8c3742d1057e", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "83a493a0-31f8-4145-aedb-8c3742d1057e", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:19 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cc87b638-ab36-47aa-9000-5d8badbbf1d4", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063519Z:cc87b638-ab36-47aa-9000-5d8badbbf1d4", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "cc87b638-ab36-47aa-9000-5d8badbbf1d4", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:34 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "afd9a1db-b831-4690-80a7-503c0818f4fd", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063535Z:afd9a1db-b831-4690-80a7-503c0818f4fd", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "afd9a1db-b831-4690-80a7-503c0818f4fd", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:50 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "37492173-66e8-4099-a039-16d80724284a", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063550Z:37492173-66e8-4099-a039-16d80724284a", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "37492173-66e8-4099-a039-16d80724284a", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc2MTA3OS1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:05 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d5bffa9c-ca8e-482b-a667-848ccd0dba9e", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063606Z:d5bffa9c-ca8e-482b-a667-848ccd0dba9e", + "cache-control" : "no-cache", + "x-ms-request-id" : "d5bffa9c-ca8e-482b-a667-848ccd0dba9e", + "Body" : "" + } + } ], + "variables" : [ "javacsmrg61079", "nsc84517966a" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceBasicSettings.json b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceBasicSettings.json new file mode 100644 index 0000000000000..50d733c0e5998 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceBasicSettings.json @@ -0,0 +1,468 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg19177?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:35 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "befc3c64-d50f-4f56-8786-d528e859eca0", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063235Z:befc3c64-d50f-4f56-8786-d528e859eca0", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "befc3c64-d50f-4f56-8786-d528e859eca0", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177\",\"name\":\"javacsmrg19177\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:32:31.888369500Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns1e936151fd?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "bfe87a24-c606-41d0-a624-8484f54b6b10", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "48", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063242Z:bfe87a24-c606-41d0-a624-8484f54b6b10", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "de3c3bc4-b566-4e12-b0d0-0274e5b06956_M8CH3_M8CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns1e936151fd\",\"name\":\"ns1e936151fd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns1e936151fd\",\"createdAt\":\"2020-08-28T06:32:40.98Z\",\"updatedAt\":\"2020-08-28T06:32:40.98Z\",\"serviceBusEndpoint\":\"https://ns1e936151fd.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns1e936151fd?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:13 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2a0b5cd2-5137-48c3-a5de-6db527c01e8a", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063313Z:2a0b5cd2-5137-48c3-a5de-6db527c01e8a", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "95e3d60a-2b9e-4b83-b913-7711fb720c96_M3SN1_M3SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns1e936151fd\",\"name\":\"ns1e936151fd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns1e936151fd\",\"createdAt\":\"2020-08-28T06:32:40.98Z\",\"updatedAt\":\"2020-08-28T06:32:40.98Z\",\"serviceBusEndpoint\":\"https://ns1e936151fd.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns1e936151fd?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "645", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11963", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "32408ca1-003b-49e2-ad0e-2d0116cb9476", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063343Z:32408ca1-003b-49e2-ad0e-2d0116cb9476", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c6c78a8e-c5ee-4cc4-b45f-feef9e4bd4d7_M1SN1_M1SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns1e936151fd\",\"name\":\"ns1e936151fd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns1e936151fd\",\"createdAt\":\"2020-08-28T06:32:40.98Z\",\"updatedAt\":\"2020-08-28T06:33:32.973Z\",\"serviceBusEndpoint\":\"https://ns1e936151fd.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns0dd1001546?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:51 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "649", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a36e9551-9066-41d5-8a40-b6eb746bfb00", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "47", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063351Z:a36e9551-9066-41d5-8a40-b6eb746bfb00", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "b220849b-2425-4367-a09c-88e90d3de368_M11CH3_M11CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":11},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns0dd1001546\",\"name\":\"ns0dd1001546\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns0dd1001546\",\"createdAt\":\"2020-08-28T06:33:49.543Z\",\"updatedAt\":\"2020-08-28T06:33:49.543Z\",\"serviceBusEndpoint\":\"https://ns0dd1001546.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns0dd1001546?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:21 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "649", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1743f944-f8f5-4615-861a-d0c57d6d8e53", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063421Z:1743f944-f8f5-4615-861a-d0c57d6d8e53", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "fa49e117-0a13-4394-b34e-767ee51f10f3_M2SN1_M2SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":11},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns0dd1001546\",\"name\":\"ns0dd1001546\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns0dd1001546\",\"createdAt\":\"2020-08-28T06:33:49.543Z\",\"updatedAt\":\"2020-08-28T06:33:49.543Z\",\"serviceBusEndpoint\":\"https://ns0dd1001546.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns0dd1001546?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:51 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "647", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f28460a0-351e-49be-b85c-ac86a23289ec", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063452Z:f28460a0-351e-49be-b85c-ac86a23289ec", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "e33f698c-93aa-496d-a619-acce0c736272_M7CH3_M7CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":11},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns0dd1001546\",\"name\":\"ns0dd1001546\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns0dd1001546\",\"createdAt\":\"2020-08-28T06:33:49.543Z\",\"updatedAt\":\"2020-08-28T06:34:35.677Z\",\"serviceBusEndpoint\":\"https://ns0dd1001546.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:59 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "643", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0d916684-ed5c-4eda-bd6e-3fc2d0de6fe5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "46", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063500Z:0d916684-ed5c-4eda-bd6e-3fc2d0de6fe5", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8f6481d2-c3bb-4e11-9dc1-cdee5cc77387_M3CH3_M3CH3", + "Body" : "{\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976\",\"name\":\"ns9f34263976\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":false,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9f34263976\",\"createdAt\":\"2020-08-28T06:34:58.477Z\",\"updatedAt\":\"2020-08-28T06:34:58.477Z\",\"serviceBusEndpoint\":\"https://ns9f34263976.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:31 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "643", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "249e63f8-515b-4eb9-a307-177f95e0f0a4", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063531Z:249e63f8-515b-4eb9-a307-177f95e0f0a4", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "60149745-660d-4c8d-b1ad-6956e7eb77d4_M3CH3_M3CH3", + "Body" : "{\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976\",\"name\":\"ns9f34263976\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":false,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9f34263976\",\"createdAt\":\"2020-08-28T06:34:58.477Z\",\"updatedAt\":\"2020-08-28T06:34:58.477Z\",\"serviceBusEndpoint\":\"https://ns9f34263976.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:01 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "640", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e0d8e0b7-b9e0-4408-880b-41f4bc3e7319", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063602Z:e0d8e0b7-b9e0-4408-880b-41f4bc3e7319", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "0051866b-d4d3-42f7-8456-21ae6055d3ab_M6CH3_M6CH3", + "Body" : "{\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976\",\"name\":\"ns9f34263976\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":false,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9f34263976\",\"createdAt\":\"2020-08-28T06:34:58.477Z\",\"updatedAt\":\"2020-08-28T06:35:50.21Z\",\"serviceBusEndpoint\":\"https://ns9f34263976.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:13 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "656", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "67f8e4f0-1761-40cb-af54-e2e1da20d93a", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "48", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063613Z:67f8e4f0-1761-40cb-af54-e2e1da20d93a", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "e2d96097-adbc-4522-99b4-75cf5a12fa91_M11CH3_M11CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976\",\"name\":\"ns9f34263976\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{\"aa\":\"bb\"},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9f34263976\",\"createdAt\":\"2020-08-28T06:34:58.477Z\",\"updatedAt\":\"2020-08-28T06:36:09.7Z\",\"serviceBusEndpoint\":\"https://ns9f34263976.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:44 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "655", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1f4aaabc-7b23-4ae9-8dd5-649bd39732c6", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063644Z:1f4aaabc-7b23-4ae9-8dd5-649bd39732c6", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "2bf74b8d-a70f-471c-a067-0bb83a2bb2fe_M9CH3_M9CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg19177/providers/Microsoft.EventHub/namespaces/ns9f34263976\",\"name\":\"ns9f34263976\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{\"aa\":\"bb\"},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9f34263976\",\"createdAt\":\"2020-08-28T06:34:58.477Z\",\"updatedAt\":\"2020-08-28T06:36:12.013Z\",\"serviceBusEndpoint\":\"https://ns9f34263976.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg19177?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:47 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f9873a8f-34f1-4e74-aa72-bea13ddbbaf1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063648Z:f9873a8f-34f1-4e74-aa72-bea13ddbbaf1", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "f9873a8f-34f1-4e74-aa72-bea13ddbbaf1", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:03 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f202e417-e9a6-4cc1-9666-743f40ea0566", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063704Z:f202e417-e9a6-4cc1-9666-743f40ea0566", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "f202e417-e9a6-4cc1-9666-743f40ea0566", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:18 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11954", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f9a8556e-595a-4151-abc1-fbec01c2d7a9", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063719Z:f9a8556e-595a-4151-abc1-fbec01c2d7a9", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "f9a8556e-595a-4151-abc1-fbec01c2d7a9", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:35 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d87c8e62-e1a4-466f-9e4f-6132bd1186eb", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063735Z:d87c8e62-e1a4-466f-9e4f-6132bd1186eb", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "d87c8e62-e1a4-466f-9e4f-6132bd1186eb", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:50 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "bcf21fe5-41e5-420d-bf4d-3aa2fc7e3afe", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063751Z:bcf21fe5-41e5-420d-bf4d-3aa2fc7e3afe", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "bcf21fe5-41e5-420d-bf4d-3aa2fc7e3afe", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:38:07 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5e4a4dfc-9f43-4cfc-b198-dcbb45c8484f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063807Z:5e4a4dfc-9f43-4cfc-b198-dcbb45c8484f", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "5e4a4dfc-9f43-4cfc-b198-dcbb45c8484f", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxOTE3Ny1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:38:22 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a92abb9a-46fd-496e-b003-08046d44b845", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063823Z:a92abb9a-46fd-496e-b003-08046d44b845", + "cache-control" : "no-cache", + "x-ms-request-id" : "a92abb9a-46fd-496e-b003-08046d44b845", + "Body" : "" + } + } ], + "variables" : [ "javacsmrg19177", "ns1e936151fd", "ns0dd1001546", "ns9f34263976" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceEventHubs.json b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceEventHubs.json new file mode 100644 index 0000000000000..cc43fd61b4b6e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageEventHubNamespaceEventHubs.json @@ -0,0 +1,424 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg15778?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:34 GMT", + "content-length" : "315", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8e6d28a6-4fb3-4751-a388-2ecf72b237a8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063234Z:8e6d28a6-4fb3-4751-a388-2ecf72b237a8", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8e6d28a6-4fb3-4751-a388-2ecf72b237a8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778\",\"name\":\"javacsmrg15778\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:32:31.876401600Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:40 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "648", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "376d588d-59e0-4c8a-969f-0299dd501c2c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063241Z:376d588d-59e0-4c8a-969f-0299dd501c2c", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "9adf43e6-4483-449c-9891-e5eb16f956a7_M1SN1_M1SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398\",\"name\":\"ns4b69445398\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns4b69445398\",\"createdAt\":\"2020-08-28T06:32:39.917Z\",\"updatedAt\":\"2020-08-28T06:32:39.917Z\",\"serviceBusEndpoint\":\"https://ns4b69445398.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:11 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "648", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "72b2df81-8c83-42a1-ae41-6979c19cf144", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063311Z:72b2df81-8c83-42a1-ae41-6979c19cf144", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "aa79d16d-3ca7-4e8b-b11f-3649cccd4a89_M7SN1_M7SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398\",\"name\":\"ns4b69445398\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns4b69445398\",\"createdAt\":\"2020-08-28T06:32:39.917Z\",\"updatedAt\":\"2020-08-28T06:32:39.917Z\",\"serviceBusEndpoint\":\"https://ns4b69445398.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "646", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3bb9ed83-664f-4234-92f8-2a7b7e81b29a", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063342Z:3bb9ed83-664f-4234-92f8-2a7b7e81b29a", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "f5d5c5e0-d19b-44bd-837f-49140a1e1143_M11CH3_M11CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398\",\"name\":\"ns4b69445398\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns4b69445398\",\"createdAt\":\"2020-08-28T06:32:39.917Z\",\"updatedAt\":\"2020-08-28T06:33:26.517Z\",\"serviceBusEndpoint\":\"https://ns4b69445398.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehddb96382c9?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:44 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "447", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e347acb8-0e33-4486-aaf5-267569db1b38", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063344Z:e347acb8-0e33-4486-aaf5-267569db1b38", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "a1dbfe77-08d8-4fa8-83c3-36c7d87bab5b_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehddb96382c9\",\"name\":\"ehddb96382c9\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:43.97Z\",\"updatedAt\":\"2020-08-28T06:33:44.147Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehf0036654ab?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:47 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "448", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "db141457-d507-40c4-8f4b-4cece2a8012d", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063347Z:db141457-d507-40c4-8f4b-4cece2a8012d", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6814accf-5824-4f20-b650-8b70929f3e2f_M7CH3_M7CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehf0036654ab\",\"name\":\"ehf0036654ab\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:46.677Z\",\"updatedAt\":\"2020-08-28T06:33:46.917Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:47 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "904", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "995ddddd-c111-4d07-8afb-b084baa3394e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063348Z:995ddddd-c111-4d07-8afb-b084baa3394e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-inline-count" : "", + "x-ms-request-id" : "98b2e7be-9086-4cdf-9184-a5a630b19f39_M7SN1_M7SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehddb96382c9\",\"name\":\"ehddb96382c9\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:43.97\",\"updatedAt\":\"2020-08-28T06:33:44.147\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehf0036654ab\",\"name\":\"ehf0036654ab\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:46.677\",\"updatedAt\":\"2020-08-28T06:33:46.917\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}]}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:49 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "904", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1d1958e9-e7e8-4554-969c-5e9c81ae5bae", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063349Z:1d1958e9-e7e8-4554-969c-5e9c81ae5bae", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-inline-count" : "", + "x-ms-request-id" : "81df4f72-8133-485d-96e2-025d5538a33a_M7CH3_M7CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehddb96382c9\",\"name\":\"ehddb96382c9\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:43.97\",\"updatedAt\":\"2020-08-28T06:33:44.147\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehf0036654ab\",\"name\":\"ehf0036654ab\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:46.677\",\"updatedAt\":\"2020-08-28T06:33:46.917\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}]}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/eh4a2627573d?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:51 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "451", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5dc5b665-8002-4077-91fe-38cb312ed79c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063351Z:5dc5b665-8002-4077-91fe-38cb312ed79c", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "30adc0e1-44b1-4d71-8e6d-a11818aa0bc4_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/eh4a2627573d\",\"name\":\"eh4a2627573d\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":6,\"partitionCount\":5,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:51.06Z\",\"updatedAt\":\"2020-08-28T06:33:51.243Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\",\"4\"]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:52 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "1354", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5172c113-30a8-4f71-9b6e-fcbdd639f6d0", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063352Z:5172c113-30a8-4f71-9b6e-fcbdd639f6d0", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-inline-count" : "", + "x-ms-request-id" : "58fe6214-600a-4e77-a10a-8469b614a8bb_M11CH3_M11CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/eh4a2627573d\",\"name\":\"eh4a2627573d\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":6,\"partitionCount\":5,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:51.06\",\"updatedAt\":\"2020-08-28T06:33:51.243\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\",\"4\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehddb96382c9\",\"name\":\"ehddb96382c9\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:43.97\",\"updatedAt\":\"2020-08-28T06:33:44.147\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg15778/providers/Microsoft.EventHub/namespaces/ns4b69445398/eventhubs/ehf0036654ab\",\"name\":\"ehf0036654ab\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:33:46.677\",\"updatedAt\":\"2020-08-28T06:33:46.917\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}]}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg15778?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:57 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "13627b7a-b173-4576-8c09-a072bf99c0ee", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063357Z:13627b7a-b173-4576-8c09-a072bf99c0ee", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "13627b7a-b173-4576-8c09-a072bf99c0ee", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:12 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "67534934-3bae-4310-a004-ba5c98fad5bb", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063412Z:67534934-3bae-4310-a004-ba5c98fad5bb", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "67534934-3bae-4310-a004-ba5c98fad5bb", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:28 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "db4ff242-380f-4872-977a-22482f64ea27", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063429Z:db4ff242-380f-4872-977a-22482f64ea27", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "db4ff242-380f-4872-977a-22482f64ea27", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:45 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e106c450-4ced-4290-ae5d-b72704bf7164", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063445Z:e106c450-4ced-4290-ae5d-b72704bf7164", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "e106c450-4ced-4290-ae5d-b72704bf7164", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:00 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11959", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "98201373-e52c-4d29-b064-3e4b68e3f584", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063501Z:98201373-e52c-4d29-b064-3e4b68e3f584", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "98201373-e52c-4d29-b064-3e4b68e3f584", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:16 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "29d38992-475b-47d0-8839-dafbf9ee6e03", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063516Z:29d38992-475b-47d0-8839-dafbf9ee6e03", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "29d38992-475b-47d0-8839-dafbf9ee6e03", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNTc3OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:31 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "da8d6bde-10df-4fdd-b4ab-a41397dd59e2", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063532Z:da8d6bde-10df-4fdd-b4ab-a41397dd59e2", + "cache-control" : "no-cache", + "x-ms-request-id" : "da8d6bde-10df-4fdd-b4ab-a41397dd59e2", + "Body" : "" + } + } ], + "variables" : [ "javacsmrg15778", "ns4b69445398", "ehddb96382c9", "ehf0036654ab", "eh4a2627573d" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageGeoDisasterRecoveryPairing.json b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageGeoDisasterRecoveryPairing.json new file mode 100644 index 0000000000000..1029e9ec61a20 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/session-records/canManageGeoDisasterRecoveryPairing.json @@ -0,0 +1,874 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg14317?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:36 GMT", + "content-length" : "323", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f548a365-b787-4eb7-870d-54e6adb8e469", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063236Z:f548a365-b787-4eb7-870d-54e6adb8e469", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "f548a365-b787-4eb7-870d-54e6adb8e469", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317\",\"name\":\"javacsmrg14317\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"southcentralus\",\"tags\":{\"date\":\"2020-08-28T06:32:32.054925200Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:32:44 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "657", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cd90b006-6d2d-46b0-88ab-a4dc2b5eecc8", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063244Z:cd90b006-6d2d-46b0-88ab-a4dc2b5eecc8", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "1f5d22d5-7a6f-4511-a8df-60cee71597e1_M2SN1_M2SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4\",\"name\":\"ns71b85515a4\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns71b85515a4\",\"createdAt\":\"2020-08-28T06:32:43.443Z\",\"updatedAt\":\"2020-08-28T06:32:43.443Z\",\"serviceBusEndpoint\":\"https://ns71b85515a4.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:14 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "657", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7f26c2ef-fd2d-4442-888e-40c3c75ba410", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063315Z:7f26c2ef-fd2d-4442-888e-40c3c75ba410", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "79885955-deae-444a-909f-e0b812606273_M6SN1_M6SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4\",\"name\":\"ns71b85515a4\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns71b85515a4\",\"createdAt\":\"2020-08-28T06:32:43.443Z\",\"updatedAt\":\"2020-08-28T06:32:43.443Z\",\"serviceBusEndpoint\":\"https://ns71b85515a4.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:45 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "653", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5fa4afd4-888a-437c-9a0b-77e86cbdc294", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063345Z:5fa4afd4-888a-437c-9a0b-77e86cbdc294", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "a07d5516-abd9-4a43-9378-c0b7d17f2b4d_M2CH3_M2CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4\",\"name\":\"ns71b85515a4\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns71b85515a4\",\"createdAt\":\"2020-08-28T06:32:43.443Z\",\"updatedAt\":\"2020-08-28T06:33:32.1Z\",\"serviceBusEndpoint\":\"https://ns71b85515a4.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:33:51 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "655", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1fc07365-b5ab-4ca4-a69e-5167b6e4718e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "48", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063352Z:1fc07365-b5ab-4ca4-a69e-5167b6e4718e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "d53af3bd-b5fb-44cd-8f37-d1d6adca0677_M2SN1_M2SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"name\":\"ns2e2617078a\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns2e2617078a\",\"createdAt\":\"2020-08-28T06:33:50.83Z\",\"updatedAt\":\"2020-08-28T06:33:50.83Z\",\"serviceBusEndpoint\":\"https://ns2e2617078a.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:21 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "655", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0a4dd881-237b-4ab9-8768-dd89e31644ff", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063422Z:0a4dd881-237b-4ab9-8768-dd89e31644ff", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "322bf2af-cf9d-4687-99ec-39820b7399ee_M6SN1_M6SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"name\":\"ns2e2617078a\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns2e2617078a\",\"createdAt\":\"2020-08-28T06:33:50.83Z\",\"updatedAt\":\"2020-08-28T06:33:50.83Z\",\"serviceBusEndpoint\":\"https://ns2e2617078a.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:34:53 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "653", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "188999bb-37f4-48d3-a092-b49aca70ce0b", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063454Z:188999bb-37f4-48d3-a092-b49aca70ce0b", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "d93796af-c456-4a86-aaec-067bbf4025e6_M3CH3_M3CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"name\":\"ns2e2617078a\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns2e2617078a\",\"createdAt\":\"2020-08-28T06:33:50.83Z\",\"updatedAt\":\"2020-08-28T06:34:37.61Z\",\"serviceBusEndpoint\":\"https://ns2e2617078a.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:01 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0c9bb942-7fb1-4fb4-a741-f70b45d757f8", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063501Z:0c9bb942-7fb1-4fb4-a741-f70b45d757f8", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "a417b5c2-d434-4784-b708-3c80adccb408_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:01 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "abb97b26-ca3f-4bec-af9f-897c268ad6b2", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063502Z:abb97b26-ca3f-4bec-af9f-897c268ad6b2", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "5633214f-ce41-408e-bbea-aec65082401e_M1SN1_M1SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:16 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11958", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c729b9a5-af82-4e8a-bd6d-2ee8bc47ef9f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063517Z:c729b9a5-af82-4e8a-bd6d-2ee8bc47ef9f", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "4b779ea5-e1ae-40cd-a6ea-b164c4b6d289_M1SN1_M1SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:32 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "43087eaf-c2d6-435b-b63f-ca23ee8cc844", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063532Z:43087eaf-c2d6-435b-b63f-ca23ee8cc844", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "658f8de5-a07c-4288-b6e9-7ec7dcdf62b2_M4CH3_M4CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:35:47 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "af3b803d-12e4-4be2-a360-bd3888486f26", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063548Z:af3b803d-12e4-4be2-a360-bd3888486f26", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "d824a575-fac1-402b-b961-80ed62848c01_M9CH3_M9CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:03 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a119d124-5f9b-4e36-ba6f-2d79c0324865", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063603Z:a119d124-5f9b-4e36-ba6f-2d79c0324865", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "55f3cd5b-7a96-447a-884f-4752345fc600_M4CH3_M4CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:18 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f6a50282-d345-4511-9386-07dbe43cb12f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063619Z:f6a50282-d345-4511-9386-07dbe43cb12f", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c598dab1-6e19-4f8d-96d3-02383cf90529_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:34 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c0ce557b-424c-4ad3-8378-b5c6753f35e5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063634Z:c0ce557b-424c-4ad3-8378-b5c6753f35e5", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3e8bb614-9943-47ab-936b-1f84ce889f28_M9CH3_M9CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:36:50 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "554", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1be7cc0a-a564-4888-9947-871f81ad57b5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063650Z:1be7cc0a-a564-4888-9947-871f81ad57b5", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "b7a878fe-5a82-4238-b72e-0a25866b51f9_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:06 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "412", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11955", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4dcb5e56-b4ec-4db9-b951-578badc215a7", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063706Z:4dcb5e56-b4ec-4db9-b951-578badc215a7", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6ad302dd-519a-49fe-8264-3dca794e9432_M4CH3_M4CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"South Central US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}]}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821/authorizationRules?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:07 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "412", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/SN1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11973", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ca0aeef8-0964-4854-9dcc-0ce47968171e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063707Z:ca0aeef8-0964-4854-9dcc-0ce47968171e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6e703628-5b5f-493d-aedf-c7c29f31f2ff_M2SN1_M2SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"South Central US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}]}" + } + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:08 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "547", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "575d69e0-a0d0-4b29-8d79-5966a074697c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063708Z:575d69e0-a0d0-4b29-8d79-5966a074697c", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eed9796e-9983-4d4e-b2f1-ca54e60db770_M5CH3_M5CH3", + "Body" : "{\"aliasPrimaryConnectionString\":\"Endpoint=sb://geodreed90821.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://geodreed90821.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:08 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "528", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f28e305c-2378-4222-8ceb-393119c724a2", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063708Z:f28e305c-2378-4222-8ceb-393119c724a2", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "f092eba9-1dd0-442d-846d-c06fbf039db4_M11CH3_M11CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}]}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:09 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "528", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "78fe84e3-ec1d-4bba-bf22-9479ce2dc241", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063709Z:78fe84e3-ec1d-4bba-bf22-9479ce2dc241", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "942af240-b52e-41cb-a44f-78334dc3d7d9_M9CH3_M9CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}]}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:09 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "554", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "263cc735-39d7-4fcc-aa5c-58a7915ea0e7", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063710Z:263cc735-39d7-4fcc-aa5c-58a7915ea0e7", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "7ce27601-fab4-4914-9fc8-b0db656fc4aa_M9CH3_M9CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}" + } + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a/disasterRecoveryConfigs/geodreed90821/failover?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:10 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "0", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5fa4a220-9d12-42fb-8458-00a17ddb3ae9", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063710Z:5fa4a220-9d12-42fb-8458-00a17ddb3ae9", + "cache-control" : "no-cache", + "x-ms-request-id" : "b3998811-3aae-4f2f-be5d-5dd8d6ac9c72_M4CH3_M4CH3", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821?api-version=2017-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:10 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "515", + "expires" : "-1", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7cf47949-58ce-44ed-b2b5-5f83a8b470e8", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063711Z:7cf47949-58ce-44ed-b2b5-5f83a8b470e8", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "f549ac77-b4c2-4232-8464-67c3d60b9893_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns71b85515a4/disasterRecoveryConfigs/geodreed90821\",\"name\":\"geodreed90821\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg14317/providers/Microsoft.EventHub/namespaces/ns2e2617078a\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg14317?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:14 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14996", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "75f908a0-bd03-45b4-b785-6bc7312b495e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063715Z:75f908a0-bd03-45b4-b785-6bc7312b495e", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "75f908a0-bd03-45b4-b785-6bc7312b495e", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:30 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11972", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8529931e-7969-4762-a413-ba42b9976e6f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063731Z:8529931e-7969-4762-a413-ba42b9976e6f", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "8529931e-7969-4762-a413-ba42b9976e6f", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:37:47 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0cefff57-f689-457c-b3cb-09a5d5a6cdac", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063747Z:0cefff57-f689-457c-b3cb-09a5d5a6cdac", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "0cefff57-f689-457c-b3cb-09a5d5a6cdac", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:38:02 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "70efd13d-0f1a-43e3-9feb-f9b37e2fc9d5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063803Z:70efd13d-0f1a-43e3-9feb-f9b37e2fc9d5", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "70efd13d-0f1a-43e3-9feb-f9b37e2fc9d5", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:38:19 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0ec2b480-8980-4f90-ad57-bab2953264a2", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063819Z:0ec2b480-8980-4f90-ad57-bab2953264a2", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "0ec2b480-8980-4f90-ad57-bab2953264a2", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:38:35 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11953", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6e28c898-b8c2-41e6-90f8-3ee0b5fcdfb5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063835Z:6e28c898-b8c2-41e6-90f8-3ee0b5fcdfb5", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "6e28c898-b8c2-41e6-90f8-3ee0b5fcdfb5", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:38:51 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11971", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "08014086-6b2c-478e-825a-c8e0ac60473b", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063851Z:08014086-6b2c-478e-825a-c8e0ac60473b", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "08014086-6b2c-478e-825a-c8e0ac60473b", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:39:07 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4ddcdb54-fb59-40e5-8654-b4e86f72d31f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063907Z:4ddcdb54-fb59-40e5-8654-b4e86f72d31f", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "4ddcdb54-fb59-40e5-8654-b4e86f72d31f", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:39:23 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5becd0b8-9754-40fa-85e7-c8241a1e0a3c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063923Z:5becd0b8-9754-40fa-85e7-c8241a1e0a3c", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "5becd0b8-9754-40fa-85e7-c8241a1e0a3c", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:39:39 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "83f80121-1f74-44da-b52a-fb83873d3509", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063939Z:83f80121-1f74-44da-b52a-fb83873d3509", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "83f80121-1f74-44da-b52a-fb83873d3509", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkcxNDMxNy1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:39:55 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "bc39a2c4-8918-48a9-a7f7-b66d1df2876e", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T063956Z:bc39a2c4-8918-48a9-a7f7-b66d1df2876e", + "cache-control" : "no-cache", + "x-ms-request-id" : "bc39a2c4-8918-48a9-a7f7-b66d1df2876e", + "Body" : "" + } + } ], + "variables" : [ "javacsmrg14317", "geodreed90821", "ns71b85515a4", "ns2e2617078a" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/README.md b/sdk/resourcemanager/azure-resourcemanager-privatedns/README.md index 698889684ee20..85bfd8a464583 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/README.md +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/README.md @@ -2,6 +2,8 @@ Azure Resource Manager Private DNS client library for Java +For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azure-sdk-java-mgmt). + ## Getting started ### Prerequisites diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java index b635676d521b5..c43bb652d86cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java @@ -123,11 +123,13 @@ public void canCRUDRedisCache() throws Exception { Assertions.assertNotNull(oldKeys); Assertions.assertNotNull(updatedPrimaryKey); Assertions.assertNotNull(updatedSecondaryKey); - Assertions.assertNotEquals(oldKeys.primaryKey(), updatedPrimaryKey.primaryKey()); - Assertions.assertEquals(oldKeys.secondaryKey(), updatedPrimaryKey.secondaryKey()); - Assertions.assertNotEquals(oldKeys.secondaryKey(), updatedSecondaryKey.secondaryKey()); - Assertions.assertNotEquals(updatedPrimaryKey.secondaryKey(), updatedSecondaryKey.secondaryKey()); - Assertions.assertEquals(updatedPrimaryKey.primaryKey(), updatedSecondaryKey.primaryKey()); + if (isRecordMode()) { + Assertions.assertNotEquals(oldKeys.primaryKey(), updatedPrimaryKey.primaryKey()); + Assertions.assertEquals(oldKeys.secondaryKey(), updatedPrimaryKey.secondaryKey()); + Assertions.assertNotEquals(oldKeys.secondaryKey(), updatedSecondaryKey.secondaryKey()); + Assertions.assertNotEquals(updatedPrimaryKey.secondaryKey(), updatedSecondaryKey.secondaryKey()); + Assertions.assertEquals(updatedPrimaryKey.primaryKey(), updatedSecondaryKey.primaryKey()); + } // Update to STANDARD Sku from BASIC SKU redisCache = redisCache.update().withStandardSku().apply(); diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/session-records/canCRUDLinkedServers.json b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/session-records/canCRUDLinkedServers.json index b6fdf9f114967..569416a912b28 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/session-records/canCRUDLinkedServers.json +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/session-records/canCRUDLinkedServers.json @@ -100,7 +100,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg65142Second/providers/Microsoft.Cache/redis/javacsmrc87925Third?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "caaf8476-fed3-4116-8f06-eec50efa5b22", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg65142Second/providers/Microsoft.Cache/Redis/javacsmrc87925Third\",\"location\":\"Central US\",\"name\":\"javacsmrc87925Third\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":2},\"enableNonSslPort\":true,\"redisConfiguration\":{\"maxclients\":\"15000\",\"maxmemory-reserved\":\"500\",\"maxfragmentationmemory-reserved\":\"650\",\"maxmemory-delta\":\"500\"},\"accessKeys\":{\"primaryKey\":\"+sKNdk9KJ9CKkAUKU4IQf+FNq6dMhrBOgy7SOiqUoq8=\",\"secondaryKey\":\"75TebVHPNoVC6jHuDIeINFwfV5IfdGaiB4nl8TMpbbU=\"},\"hostName\":\"javacsmrc87925Third.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg65142Second/providers/Microsoft.Cache/Redis/javacsmrc87925Third\",\"location\":\"Central US\",\"name\":\"javacsmrc87925Third\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":2},\"enableNonSslPort\":true,\"redisConfiguration\":{\"maxclients\":\"15000\",\"maxmemory-reserved\":\"500\",\"maxfragmentationmemory-reserved\":\"650\",\"maxmemory-delta\":\"500\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"javacsmrc87925Third.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" } }, { "Method" : "GET", @@ -1254,7 +1254,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg65142Second/providers/Microsoft.Cache/redis/javacsmrc87925Second?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "a24310c3-5181-428a-9f6e-c24259b670b4", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg65142Second/providers/Microsoft.Cache/Redis/javacsmrc87925Second\",\"location\":\"East US\",\"name\":\"javacsmrc87925Second\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":2},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"15000\",\"maxmemory-reserved\":\"500\",\"maxfragmentationmemory-reserved\":\"650\",\"maxmemory-delta\":\"500\"},\"accessKeys\":{\"primaryKey\":\"HY0l+aHU+DbLqobixJ1g0gFO3Y7DrBAckv+MFa6pea8=\",\"secondaryKey\":\"9Pk6r9DgaHiYHzYWZzvTbIiogKDXusdLNaUOcAV5axs=\"},\"hostName\":\"javacsmrc87925Second.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg65142Second/providers/Microsoft.Cache/Redis/javacsmrc87925Second\",\"location\":\"East US\",\"name\":\"javacsmrc87925Second\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":2},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"15000\",\"maxmemory-reserved\":\"500\",\"maxfragmentationmemory-reserved\":\"650\",\"maxmemory-delta\":\"500\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"javacsmrc87925Second.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" } }, { "Method" : "GET", diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/session-records/canCRUDRedisCache.json b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/session-records/canCRUDRedisCache.json index 6564cc8012374..d1bfa84659597 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/session-records/canCRUDRedisCache.json +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/session-records/canCRUDRedisCache.json @@ -125,7 +125,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807/providers/Microsoft.Cache/redis/javacsmrc51721?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "61fad7f2-b1d3-4c49-a1b0-3c379bb6b032", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807/providers/Microsoft.Cache/Redis/javacsmrc51721\",\"location\":\"East Asia\",\"name\":\"javacsmrc51721\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Basic\",\"family\":\"C\",\"capacity\":0},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"256\",\"maxmemory-reserved\":\"2\",\"maxfragmentationmemory-reserved\":\"12\",\"maxmemory-delta\":\"2\"},\"accessKeys\":{\"primaryKey\":\"AdyeDAYVPtgKLJ4cQMAw+ALEPXdovvKckW2H1a5ejZE=\",\"secondaryKey\":\"4fVc+AWXu5Sgf0iaViLUb+IOZzQXzyAR2eGjXn0dlqo=\"},\"hostName\":\"javacsmrc51721.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807/providers/Microsoft.Cache/Redis/javacsmrc51721\",\"location\":\"East Asia\",\"name\":\"javacsmrc51721\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Basic\",\"family\":\"C\",\"capacity\":0},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"256\",\"maxmemory-reserved\":\"2\",\"maxfragmentationmemory-reserved\":\"12\",\"maxmemory-delta\":\"2\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"javacsmrc51721.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" } }, { "Method" : "PUT", @@ -153,7 +153,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807Second/providers/Microsoft.Cache/redis/javacsmrc51721Second?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "dc1c4311-6392-4fc8-9ed3-dc11902be76e", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807Second/providers/Microsoft.Cache/Redis/javacsmrc51721Second\",\"location\":\"Central US\",\"name\":\"javacsmrc51721Second\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":1},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"7500\",\"maxmemory-reserved\":\"200\",\"maxfragmentationmemory-reserved\":\"300\",\"maxmemory-delta\":\"200\"},\"accessKeys\":{\"primaryKey\":\"ZFNTIZCby8pbpEoUlH1an2wuFTFv1f9j4+a53lMfAg8=\",\"secondaryKey\":\"K8mPCdzUjA3qbhjjmLHhXvn9cUhvzBwNB7KyGEf+Zvg=\"},\"hostName\":\"javacsmrc51721Second.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"shardCount\":10,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807Second/providers/Microsoft.Cache/Redis/javacsmrc51721Second\",\"location\":\"Central US\",\"name\":\"javacsmrc51721Second\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":1},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"7500\",\"maxmemory-reserved\":\"200\",\"maxfragmentationmemory-reserved\":\"300\",\"maxmemory-delta\":\"200\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"javacsmrc51721Second.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"shardCount\":10,\"linkedServers\":[]}}" } }, { "Method" : "PUT", @@ -181,7 +181,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807Second/providers/Microsoft.Cache/redis/javacsmrc51721Third?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "35e5322b-43c6-4ece-9973-dfe066519caa", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807Second/providers/Microsoft.Cache/Redis/javacsmrc51721Third\",\"location\":\"Central US\",\"name\":\"javacsmrc51721Third\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":2},\"enableNonSslPort\":true,\"redisConfiguration\":{\"maxclients\":\"15000\",\"maxmemory-reserved\":\"500\",\"maxfragmentationmemory-reserved\":\"650\",\"maxmemory-delta\":\"500\"},\"accessKeys\":{\"primaryKey\":\"qVQgSW448ddB4oanNNFJQrduy+5JLGBRcWqEZ5FEeNw=\",\"secondaryKey\":\"cJfVKjyQfZXMkfvhAEhPYhaKUFSE4yFK82qS5s0W6oc=\"},\"hostName\":\"javacsmrc51721Third.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg83807Second/providers/Microsoft.Cache/Redis/javacsmrc51721Third\",\"location\":\"Central US\",\"name\":\"javacsmrc51721Third\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":2},\"enableNonSslPort\":true,\"redisConfiguration\":{\"maxclients\":\"15000\",\"maxmemory-reserved\":\"500\",\"maxfragmentationmemory-reserved\":\"650\",\"maxmemory-delta\":\"500\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"javacsmrc51721Third.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" } }, { "Method" : "GET", @@ -3289,7 +3289,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "1e2dc122-d8d2-4dbb-98a8-551ac8bb6849", - "Body" : "{\"primaryKey\":\"AdyeDAYVPtgKLJ4cQMAw+ALEPXdovvKckW2H1a5ejZE=\",\"secondaryKey\":\"4fVc+AWXu5Sgf0iaViLUb+IOZzQXzyAR2eGjXn0dlqo=\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -3316,7 +3316,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "62600221-9f9c-451a-a42c-d6859834f6dd", - "Body" : "{\"primaryKey\":\"AdyeDAYVPtgKLJ4cQMAw+ALEPXdovvKckW2H1a5ejZE=\",\"secondaryKey\":\"4fVc+AWXu5Sgf0iaViLUb+IOZzQXzyAR2eGjXn0dlqo=\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -3343,7 +3343,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "b5ec5f70-4b84-4249-b503-9e5626f8f2a0", - "Body" : "{\"primaryKey\":\"ga00lm2mNftTeV8BedCDwq77Mzr4x7wfH9yHumasP8U=\",\"secondaryKey\":\"4fVc+AWXu5Sgf0iaViLUb+IOZzQXzyAR2eGjXn0dlqo=\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -3370,7 +3370,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "3a4df646-5377-44e5-8865-92a64b309ddc", - "Body" : "{\"primaryKey\":\"ga00lm2mNftTeV8BedCDwq77Mzr4x7wfH9yHumasP8U=\",\"secondaryKey\":\"bRZoakksfS7oetXsnBhjsZkxwQF+wSctjArqvKL8+NA=\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "PATCH", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java new file mode 100644 index 0000000000000..dae848ecb8da8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroup; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.storage.models.StorageAccount; +import com.azure.resourcemanager.storage.models.StorageAccountSkuType; + +/** + * Azure Event Hub sample for managing event hub - + * - Create an event hub namespace + * - Create an event hub in the namespace with data capture enabled along with a consumer group and rule + * - List consumer groups in the event hub + * - Create a second event hub in the namespace + * - Create a consumer group in the second event hub + * - List consumer groups in the second event hub + * - Create an event hub namespace along with event hub. + */ +public class ManageEventHub { + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + final String rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); + final String namespaceName1 = azure.sdkContext().randomResourceName("ns", 14); + final String namespaceName2 = azure.sdkContext().randomResourceName("ns", 14); + final String storageAccountName = azure.sdkContext().randomResourceName("stg", 14); + final String eventHubName1 = azure.sdkContext().randomResourceName("eh", 14); + final String eventHubName2 = azure.sdkContext().randomResourceName("eh", 14); + try { + + //============================================================ + // Create an event hub namespace + // + System.out.println("Creating a namespace"); + + EventHubNamespace namespace1 = azure.eventHubNamespaces() + .define(namespaceName1) + .withRegion(Region.US_EAST2) + .withNewResourceGroup(rgName) + .create(); + + Utils.print(namespace1); + System.out.println("Created a namespace"); + //============================================================ + // Create an event hub in the namespace with data capture enabled, with consumer group and auth rule + // + + Creatable storageAccountCreatable = azure.storageAccounts() + .define(storageAccountName) + .withRegion(Region.US_EAST2) + .withExistingResourceGroup(rgName) + .withSku(StorageAccountSkuType.STANDARD_LRS); + + System.out.println("Creating an event hub with data capture enabled with a consumer group and rule in it"); + + EventHub eventHub1 = azure.eventHubs() + .define(eventHubName1) + .withExistingNamespace(namespace1) + // Optional - configure data capture + .withNewStorageAccountForCapturedData(storageAccountCreatable, "datacpt") + .withDataCaptureEnabled() + // Optional - create one consumer group in event hub + .withNewConsumerGroup("cg1", "sometadata") + // Optional - create an authorization rule for event hub + .withNewListenRule("listenrule1") + .create(); + + System.out.println("Created an event hub with data capture enabled with a consumer group and rule in it"); + Utils.print(eventHub1); + + //============================================================ + // Retrieve consumer groups in the event hub + // + System.out.println("Retrieving consumer groups"); + + PagedIterable consumerGroups = eventHub1.listConsumerGroups(); + + System.out.println("Retrieved consumer groups"); + for (EventHubConsumerGroup group : consumerGroups) { + Utils.print(group); + } + + //============================================================ + // Create another event hub in the namespace using event hub accessor in namespace accessor + // + + System.out.println("Creating another event hub in the namespace"); + + EventHub eventHub2 = azure.eventHubNamespaces() + .eventHubs() + .define(eventHubName2) + .withExistingNamespace(namespace1) + .create(); + + System.out.println("Created second event hub"); + Utils.print(eventHub2); + + //============================================================ + // Create a consumer group in the event hub using consumer group accessor in event hub accessor + // + + System.out.println("Creating a consumer group in the second event hub"); + + EventHubConsumerGroup consumerGroup2 = azure.eventHubNamespaces() + .eventHubs() + .consumerGroups() + .define("cg2") + .withExistingEventHub(eventHub2) + // Optional + .withUserMetadata("sometadata") + .create(); + + System.out.println("Created a consumer group in the second event hub"); + Utils.print(consumerGroup2); + + //============================================================ + // Retrieve consumer groups in the event hub + // + System.out.println("Retrieving consumer groups in the second event hub"); + + consumerGroups = eventHub2.listConsumerGroups(); + + System.out.println("Retrieved consumer groups in the seoond event hub"); + for (EventHubConsumerGroup group : consumerGroups) { + Utils.print(group); + } + + //============================================================ + // Create an event hub namespace with event hub + // + + System.out.println("Creating an event hub namespace along with event hub"); + + EventHubNamespace namespace2 = azure.eventHubNamespaces() + .define(namespaceName2) + .withRegion(Region.US_EAST2) + .withExistingResourceGroup(rgName) + .withNewEventHub(eventHubName2) + .create(); + + System.out.println("Created an event hub namespace along with event hub"); + Utils.print(namespace2); + for (EventHub eh : namespace2.listEventHubs()) { + Utils.print(eh); + } + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().deleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java new file mode 100644 index 0000000000000..3570ce08736c7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.cosmos.models.CosmosDBAccount; +import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRule; +import com.azure.resourcemanager.monitor.models.DiagnosticSetting; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.samples.Utils; + +import java.time.Duration; + +/** + * Stream Azure Service Logs and Metrics for consumption through Event Hub. + * - Create a DocumentDB instance + * - Creates a Event Hub namespace and an Event Hub in it + * - Retrieve the root namespace authorization rule + * - Enable diagnostics on a existing cosmosDB to stream events to event hub + */ +public class ManageEventHubEvents { + /** + * Main function which runs the actual sample. + * + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + final Region region = Region.US_EAST; + final String rgName = azure.sdkContext().randomResourceName("rgEvHb", 24); + final String namespaceName = azure.sdkContext().randomResourceName("ns", 24); + final String eventHubName = "FirstEventHub"; + String diagnosticSettingId = null; + + try { + //============================================================= + // Creates a Cosmos DB. + // + CosmosDBAccount docDb = azure.cosmosDBAccounts() + .define(namespaceName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withKind(DatabaseAccountKind.MONGO_DB) + .withEventualConsistency() + .withWriteReplication(Region.US_WEST) + .withReadReplication(Region.US_CENTRAL) + .create(); + + System.out.println("Created a DocumentDb instance."); + Utils.print(docDb); + //============================================================= + // Creates a Event Hub namespace and an Event Hub in it. + // + + System.out.println("Creating event hub namespace and event hub"); + + EventHubNamespace namespace = azure.eventHubNamespaces() + .define(namespaceName) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withNewEventHub(eventHubName) + .create(); + + System.out.println(String.format("Created event hub namespace %s and event hub %s ", namespace.name(), eventHubName)); + System.out.println(); + Utils.print(namespace); + + //============================================================= + // Retrieve the root namespace authorization rule. + // + + System.out.println("Retrieving the namespace authorization rule"); + + EventHubNamespaceAuthorizationRule eventHubAuthRule = azure.eventHubNamespaces().authorizationRules() + .getByName(namespace.resourceGroupName(), namespace.name(), "RootManageSharedAccessKey"); + + System.out.println("Namespace authorization rule Retrieved"); + + //============================================================= + // Enable diagnostics on a cosmosDB to stream events to event hub + // + + System.out.println("Enabling diagnostics events of a cosmosdb to stream to event hub"); + + // Store Id of created Diagnostic settings only for clean-up + DiagnosticSetting ds = azure.diagnosticSettings() + .define("DiaEventHub") + .withResource(docDb.id()) + .withEventHub(eventHubAuthRule.id(), eventHubName) + .withLog("DataPlaneRequests", 0) + .withLog("MongoRequests", 0) + .withMetric("AllMetrics", Duration.ofMinutes(5), 0) + .create(); + + Utils.print(ds); + diagnosticSettingId = ds.id(); + + System.out.println("Streaming of diagnostics events to event hub is enabled"); + + //============================================================= + // Listen for events from event hub using Event Hub dataplane APIs. + + return true; + } catch (Exception f) { + System.out.println(f.getMessage()); + f.printStackTrace(); + } finally { + try { + if (diagnosticSettingId != null) { + System.out.println("Deleting Diagnostic Setting: " + diagnosticSettingId); + azure.diagnosticSettings().deleteById(diagnosticSettingId); + } + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + + return false; + } + + /** + * Main entry point. + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java new file mode 100644 index 0000000000000..a472257cd6d3f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.eventhubs.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationKey; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairing; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; +import com.azure.resourcemanager.eventhubs.models.ProvisioningStateDR; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.resources.models.ResourceGroup; +import com.azure.resourcemanager.samples.Utils; + +/** + * Azure Event Hub sample for managing geo disaster recovery pairing - + * - Create two event hub namespaces + * - Create a pairing between two namespaces + * - Create an event hub in the primary namespace and retrieve it from the secondary namespace + * - Retrieve the pairing connection string + * - Fail over so that secondary namespace become primary. + */ +public class ManageEventHubGeoDisasterRecovery { + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + final String rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); + final String primaryNamespaceName = azure.sdkContext().randomResourceName("ns", 14); + final String secondaryNamespaceName = azure.sdkContext().randomResourceName("ns", 14); + final String geoDRName = azure.sdkContext().randomResourceName("geodr", 14); + final String eventHubName = azure.sdkContext().randomResourceName("eh", 14); + boolean isFailOverSucceeded = false; + EventHubDisasterRecoveryPairing pairing = null; + + try { + + //============================================================ + // Create resource group for the namespaces and recovery pairings + // + ResourceGroup resourceGroup = azure.resourceGroups().define(rgName) + .withRegion(Region.US_SOUTH_CENTRAL) + .create(); + + System.out.println("Creating primary event hub namespace " + primaryNamespaceName); + + EventHubNamespace primaryNamespace = azure.eventHubNamespaces() + .define(primaryNamespaceName) + .withRegion(Region.US_SOUTH_CENTRAL) + .withExistingResourceGroup(resourceGroup) + .create(); + + System.out.println("Primary event hub namespace created"); + Utils.print(primaryNamespace); + + System.out.println("Creating secondary event hub namespace " + primaryNamespaceName); + + EventHubNamespace secondaryNamespace = azure.eventHubNamespaces() + .define(secondaryNamespaceName) + .withRegion(Region.US_NORTH_CENTRAL) + .withExistingResourceGroup(resourceGroup) + .create(); + + System.out.println("Secondary event hub namespace created"); + Utils.print(secondaryNamespace); + + //============================================================ + // Create primary and secondary namespaces and recovery pairing + // + System.out.println("Creating geo-disaster recovery pairing " + geoDRName); + + pairing = azure.eventHubDisasterRecoveryPairings() + .define(geoDRName) + .withExistingPrimaryNamespace(primaryNamespace) + .withExistingSecondaryNamespace(secondaryNamespace) + .create(); + + while (pairing.provisioningState() != ProvisioningStateDR.SUCCEEDED) { + pairing = pairing.refresh(); + SdkContext.sleep(15 * 1000); + if (pairing.provisioningState() == ProvisioningStateDR.FAILED) { + throw new Exception("Provisioning state of the pairing is FAILED"); + } + } + + System.out.println("Created geo-disaster recovery pairing " + geoDRName); + Utils.print(pairing); + + //============================================================ + // Create an event hub and consumer group in primary namespace + // + + System.out.println("Creating an event hub and consumer group in primary namespace"); + + EventHub eventHubInPrimaryNamespace = azure.eventHubs() + .define(eventHubName) + .withExistingNamespace(primaryNamespace) + .withNewConsumerGroup("consumerGrp1") + .create(); + + System.out.println("Created event hub and consumer group in primary namespace"); + Utils.print(eventHubInPrimaryNamespace); + + System.out.println("Waiting for 60 seconds to allow metadata to sync across primary and secondary"); + SdkContext.sleep(60 * 1000); // Wait for syncing to finish + + System.out.println("Retrieving the event hubs in secondary namespace"); + + EventHub eventHubInSecondaryNamespace = azure.eventHubs().getByName(rgName, secondaryNamespaceName, eventHubName); + + System.out.println("Retrieved the event hubs in secondary namespace"); + Utils.print(eventHubInSecondaryNamespace); + + //============================================================ + // Retrieving the connection string + // + PagedIterable rules = pairing.listAuthorizationRules(); + for (DisasterRecoveryPairingAuthorizationRule rule : rules) { + DisasterRecoveryPairingAuthorizationKey key = rule.getKeys(); + Utils.print(key); + } + + System.out.println("Initiating fail over"); + + pairing.failOver(); + isFailOverSucceeded = true; + + System.out.println("Fail over initiated"); + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + try { + // It is necessary to break pairing before deleting resource group + // + if (pairing != null && !isFailOverSucceeded) { + pairing.breakPairing(); + } + } catch (Exception ex) { + System.out.println("Pairing breaking failed:" + ex.getMessage()); + } + + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/package-info.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/package-info.java new file mode 100644 index 0000000000000..2ed4a762d8e9c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * This package contains the classes for eventhubs samples. + */ +package com.azure.resourcemanager.eventhubs.samples; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java index bc5bfe3b60245..911334e89d5a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java @@ -83,6 +83,13 @@ import com.azure.resourcemanager.dns.models.SrvRecordSet; import com.azure.resourcemanager.dns.models.TxtRecord; import com.azure.resourcemanager.dns.models.TxtRecordSet; +import com.azure.resourcemanager.eventhubs.models.AccessRights; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationKey; +import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationRule; +import com.azure.resourcemanager.eventhubs.models.EventHub; +import com.azure.resourcemanager.eventhubs.models.EventHubConsumerGroup; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairing; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; import com.azure.resourcemanager.keyvault.models.AccessPolicy; import com.azure.resourcemanager.keyvault.models.CertificatePermissions; import com.azure.resourcemanager.keyvault.models.KeyPermissions; @@ -2781,116 +2788,116 @@ public static void print(ContainerGroup resource) { System.out.println(info.toString()); } -// /** -// * Print event hub namespace. -// * -// * @param resource a virtual machine -// */ -// public static void print(EventHubNamespace resource) { -// StringBuilder info = new StringBuilder(); -// info.append("Eventhub Namespace: ").append(resource.id()) -// .append("\n\tName: ").append(resource.name()) -// .append("\n\tRegion: ").append(resource.region()) -// .append("\n\tTags: ").append(resource.tags()) -// .append("\n\tAzureInsightMetricId: ").append(resource.azureInsightMetricId()) -// .append("\n\tIsAutoScale enabled: ").append(resource.isAutoScaleEnabled()) -// .append("\n\tServiceBus endpoint: ").append(resource.serviceBusEndpoint()) -// .append("\n\tThroughPut upper limit: ").append(resource.throughputUnitsUpperLimit()) -// .append("\n\tCurrent ThroughPut: ").append(resource.currentThroughputUnits()) -// .append("\n\tCreated time: ").append(resource.createdAt()) -// .append("\n\tUpdated time: ").append(resource.updatedAt()); -// -// System.out.println(info.toString()); -// } -// -// /** -// * Print event hub. -// * -// * @param resource event hub -// */ -// public static void print(EventHub resource) { -// StringBuilder info = new StringBuilder(); -// info.append("Eventhub: ").append(resource.id()) -// .append("\n\tName: ").append(resource.name()) -// .append("\n\tNamespace resource group: ").append(resource.namespaceResourceGroupName()) -// .append("\n\tNamespace: ").append(resource.namespaceName()) -// .append("\n\tIs data capture enabled: ").append(resource.isDataCaptureEnabled()) -// .append("\n\tPartition ids: ").append(resource.partitionIds()); -// if (resource.isDataCaptureEnabled()) { -// info.append("\n\t\t\tData capture window size in MB: ").append(resource.dataCaptureWindowSizeInMB()); -// info.append("\n\t\t\tData capture window size in seconds: ").append(resource.dataCaptureWindowSizeInSeconds()); -// if (resource.captureDestination() != null) { -// info.append("\n\t\t\tData capture storage account: ").append(resource.captureDestination().storageAccountResourceId()); -// info.append("\n\t\t\tData capture storage container: ").append(resource.captureDestination().blobContainer()); -// } -// } -// System.out.println(info.toString()); -// } -// -// /** -// * Print event hub namespace recovery pairing. -// * -// * @param resource event hub namespace disaster recovery pairing -// */ -// public static void print(EventHubDisasterRecoveryPairing resource) { -// StringBuilder info = new StringBuilder(); -// info.append("DisasterRecoveryPairing: ").append(resource.id()) -// .append("\n\tName: ").append(resource.name()) -// .append("\n\tPrimary namespace resource group name: ").append(resource.primaryNamespaceResourceGroupName()) -// .append("\n\tPrimary namespace name: ").append(resource.primaryNamespaceName()) -// .append("\n\tSecondary namespace: ").append(resource.secondaryNamespaceId()) -// .append("\n\tNamespace role: ").append(resource.namespaceRole()); -// System.out.println(info.toString()); -// } -// -// /** -// * Print event hub namespace recovery pairing auth rules. -// * -// * @param resource event hub namespace disaster recovery pairing auth rule -// */ -// public static void print(DisasterRecoveryPairingAuthorizationRule resource) { -// StringBuilder info = new StringBuilder(); -// info.append("DisasterRecoveryPairing auth rule: ").append(resource.name()); -// List rightsStr = new ArrayList<>(); -// for (com.microsoft.azure.management.eventhub.AccessRights rights : resource.rights()) { -// rightsStr.add(rights.toString()); -// } -// info.append("\n\tRights: ").append(rightsStr); -// System.out.println(info.toString()); -// } -// -// /** -// * Print event hub namespace recovery pairing auth rule key. -// * -// * @param resource event hub namespace disaster recovery pairing auth rule key -// */ -// public static void print(DisasterRecoveryPairingAuthorizationKey resource) { -// StringBuilder info = new StringBuilder(); -// info.append("DisasterRecoveryPairing auth key: ") -// .append("\n\t Alias primary connection string: ").append(resource.aliasPrimaryConnectionString()) -// .append("\n\t Alias secondary connection string: ").append(resource.aliasSecondaryConnectionString()) -// .append("\n\t Primary key: ").append(resource.primaryKey()) -// .append("\n\t Secondary key: ").append(resource.secondaryKey()) -// .append("\n\t Primary connection string: ").append(resource.primaryConnectionString()) -// .append("\n\t Secondary connection string: ").append(resource.secondaryConnectionString()); -// System.out.println(info.toString()); -// } -// -// /** -// * Print event hub consumer group. -// * -// * @param resource event hub consumer group -// */ -// public static void print(EventHubConsumerGroup resource) { -// StringBuilder info = new StringBuilder(); -// info.append("Event hub consumer group: ").append(resource.id()) -// .append("\n\tName: ").append(resource.name()) -// .append("\n\tNamespace resource group: ").append(resource.namespaceResourceGroupName()) -// .append("\n\tNamespace: ").append(resource.namespaceName()) -// .append("\n\tEvent hub name: ").append(resource.eventHubName()) -// .append("\n\tUser metadata: ").append(resource.userMetadata()); -// System.out.println(info.toString()); -// } + /** + * Print event hub namespace. + * + * @param resource a virtual machine + */ + public static void print(EventHubNamespace resource) { + StringBuilder info = new StringBuilder(); + info.append("Eventhub Namespace: ").append(resource.id()) + .append("\n\tName: ").append(resource.name()) + .append("\n\tRegion: ").append(resource.region()) + .append("\n\tTags: ").append(resource.tags()) + .append("\n\tAzureInsightMetricId: ").append(resource.azureInsightMetricId()) + .append("\n\tIsAutoScale enabled: ").append(resource.isAutoScaleEnabled()) + .append("\n\tServiceBus endpoint: ").append(resource.serviceBusEndpoint()) + .append("\n\tThroughPut upper limit: ").append(resource.throughputUnitsUpperLimit()) + .append("\n\tCurrent ThroughPut: ").append(resource.currentThroughputUnits()) + .append("\n\tCreated time: ").append(resource.createdAt()) + .append("\n\tUpdated time: ").append(resource.updatedAt()); + + System.out.println(info.toString()); + } + + /** + * Print event hub. + * + * @param resource event hub + */ + public static void print(EventHub resource) { + StringBuilder info = new StringBuilder(); + info.append("Eventhub: ").append(resource.id()) + .append("\n\tName: ").append(resource.name()) + .append("\n\tNamespace resource group: ").append(resource.namespaceResourceGroupName()) + .append("\n\tNamespace: ").append(resource.namespaceName()) + .append("\n\tIs data capture enabled: ").append(resource.isDataCaptureEnabled()) + .append("\n\tPartition ids: ").append(resource.partitionIds()); + if (resource.isDataCaptureEnabled()) { + info.append("\n\t\t\tData capture window size in MB: ").append(resource.dataCaptureWindowSizeInMB()); + info.append("\n\t\t\tData capture window size in seconds: ").append(resource.dataCaptureWindowSizeInSeconds()); + if (resource.captureDestination() != null) { + info.append("\n\t\t\tData capture storage account: ").append(resource.captureDestination().storageAccountResourceId()); + info.append("\n\t\t\tData capture storage container: ").append(resource.captureDestination().blobContainer()); + } + } + System.out.println(info.toString()); + } + + /** + * Print event hub namespace recovery pairing. + * + * @param resource event hub namespace disaster recovery pairing + */ + public static void print(EventHubDisasterRecoveryPairing resource) { + StringBuilder info = new StringBuilder(); + info.append("DisasterRecoveryPairing: ").append(resource.id()) + .append("\n\tName: ").append(resource.name()) + .append("\n\tPrimary namespace resource group name: ").append(resource.primaryNamespaceResourceGroupName()) + .append("\n\tPrimary namespace name: ").append(resource.primaryNamespaceName()) + .append("\n\tSecondary namespace: ").append(resource.secondaryNamespaceId()) + .append("\n\tNamespace role: ").append(resource.namespaceRole()); + System.out.println(info.toString()); + } + + /** + * Print event hub namespace recovery pairing auth rules. + * + * @param resource event hub namespace disaster recovery pairing auth rule + */ + public static void print(DisasterRecoveryPairingAuthorizationRule resource) { + StringBuilder info = new StringBuilder(); + info.append("DisasterRecoveryPairing auth rule: ").append(resource.name()); + List rightsStr = new ArrayList<>(); + for (AccessRights rights : resource.rights()) { + rightsStr.add(rights.toString()); + } + info.append("\n\tRights: ").append(rightsStr); + System.out.println(info.toString()); + } + + /** + * Print event hub namespace recovery pairing auth rule key. + * + * @param resource event hub namespace disaster recovery pairing auth rule key + */ + public static void print(DisasterRecoveryPairingAuthorizationKey resource) { + StringBuilder info = new StringBuilder(); + info.append("DisasterRecoveryPairing auth key: ") + .append("\n\t Alias primary connection string: ").append(resource.aliasPrimaryConnectionString()) + .append("\n\t Alias secondary connection string: ").append(resource.aliasSecondaryConnectionString()) + .append("\n\t Primary key: ").append(resource.primaryKey()) + .append("\n\t Secondary key: ").append(resource.secondaryKey()) + .append("\n\t Primary connection string: ").append(resource.primaryConnectionString()) + .append("\n\t Secondary connection string: ").append(resource.secondaryConnectionString()); + System.out.println(info.toString()); + } + + /** + * Print event hub consumer group. + * + * @param resource event hub consumer group + */ + public static void print(EventHubConsumerGroup resource) { + StringBuilder info = new StringBuilder(); + info.append("Event hub consumer group: ").append(resource.id()) + .append("\n\tName: ").append(resource.name()) + .append("\n\tNamespace resource group: ").append(resource.namespaceResourceGroupName()) + .append("\n\tNamespace: ").append(resource.namespaceName()) + .append("\n\tEvent hub name: ").append(resource.eventHubName()) + .append("\n\tUser metadata: ").append(resource.userMetadata()); + System.out.println(info.toString()); + } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/EventHubsSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/EventHubsSampleTests.java new file mode 100644 index 0000000000000..333ac59ec7bad --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/EventHubsSampleTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.samples; + +import com.azure.resourcemanager.eventhubs.samples.ManageEventHub; +import com.azure.resourcemanager.eventhubs.samples.ManageEventHubEvents; +import com.azure.resourcemanager.eventhubs.samples.ManageEventHubGeoDisasterRecovery; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class EventHubsSampleTests extends SamplesTestBase { + @Test + public void testManageEventHub() { + Assertions.assertTrue(ManageEventHub.runSample(azure)); + } + + @Test + public void testManageEventHubEvents() { + Assertions.assertTrue(ManageEventHubEvents.runSample(azure)); + } + + @Test + public void testManageEventHubGeoDisasterRecovery() { + Assertions.assertTrue(ManageEventHubGeoDisasterRecovery.runSample(azure)); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBTableWithVirtualNetworkRule.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBTableWithVirtualNetworkRule.json index 96d9649a2e378..81c599a1ef9dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBTableWithVirtualNetworkRule.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBTableWithVirtualNetworkRule.json @@ -1226,7 +1226,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "49b5ad5e-45e9-4ea8-a0a3-03e54fdc5aed", - "Body" : "{\"primaryMasterKey\":\"cgx8Z7uUVMw2aREIvsSQA2tyrg7PZKjQanzskb0SWaqy8XPBRBimSa9dFtLyOd1388B41X7N6V0CjL7Oh4ROiw==\",\"secondaryMasterKey\":\"f1DwDXFCAA3zPUdvzSDaO5K8HZOQckR9R32AnoVSXvBnWEeRFaxhZBrpmqF4VXpOjzun1p5fZ8DcCas78aY6pQ==\",\"primaryReadonlyMasterKey\":\"LeNhbFOrT5uEGEQhwRTlI4MXAq2fMuG5MKkkTOysO9ypuF2gp0wAViUcnI14eWeWnRb9aenEzMHFwfFcfH74rA==\",\"secondaryReadonlyMasterKey\":\"RE7ipJ8EDlZg2GAnmmvvWtK2UmRsOfRFYoIqH7I3hdhyMY19rW836itaClImqcu6v3sVxpTgQ3uKm1taGB0jLg==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1252,7 +1252,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "5561a47e-c093-4a18-8ef6-1154a72e3f0c", - "Body" : "{\"primaryReadonlyMasterKey\":\"LeNhbFOrT5uEGEQhwRTlI4MXAq2fMuG5MKkkTOysO9ypuF2gp0wAViUcnI14eWeWnRb9aenEzMHFwfFcfH74rA==\",\"secondaryReadonlyMasterKey\":\"RE7ipJ8EDlZg2GAnmmvvWtK2UmRsOfRFYoIqH7I3hdhyMY19rW836itaClImqcu6v3sVxpTgQ3uKm1taGB0jLg==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "PATCH", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithEventualConsistency.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithEventualConsistency.json index 468f7e5a9eef3..8f49e98a86843 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithEventualConsistency.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithEventualConsistency.json @@ -1186,7 +1186,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "91e0b032-5421-4d0e-94e0-ea91e70bf766", - "Body" : "{\"primaryMasterKey\":\"1sXgABJwWdUBFwG0XSpO0EtO8c6ceXmNmZyWdsGHzxzFWQ9war1NsyVD4yXryDB15UwL78DzPkqRPUIwKnUJcA==\",\"secondaryMasterKey\":\"l2WRGtDJ2B6owmlJafEwELZZrJM59v95fgoCsVkQ1a2OOfaZLjr46stdyqtDVDrtcXiWpNo16MVm3TsE1StyLg==\",\"primaryReadonlyMasterKey\":\"HdEhuaOhDvI02QdkwZaqIO00G6TkR57T2hRo1akRrJHR2EYfHLXOivQZUbvZiZPQoxWlgsmYidKbsQtNrtzXoA==\",\"secondaryReadonlyMasterKey\":\"Y8mbhGDr1gpp2GmBr3mr3UqcsyPD4JozNnNk5eK52uhVoEuuHbGueeXpaBd4LRUr7U5kUXkD9OwphoyeiUguIQ==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1213,7 +1213,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "d403b17b-fbe2-4802-af43-917e3b4602a2", - "Body" : "{\"primaryReadonlyMasterKey\":\"HdEhuaOhDvI02QdkwZaqIO00G6TkR57T2hRo1akRrJHR2EYfHLXOivQZUbvZiZPQoxWlgsmYidKbsQtNrtzXoA==\",\"secondaryReadonlyMasterKey\":\"Y8mbhGDr1gpp2GmBr3mr3UqcsyPD4JozNnNk5eK52uhVoEuuHbGueeXpaBd4LRUr7U5kUXkD9OwphoyeiUguIQ==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1240,7 +1240,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "f2b5b00a-1eef-4975-aee1-92239227b071", - "Body" : "{\"primaryMasterKey\":\"1sXgABJwWdUBFwG0XSpO0EtO8c6ceXmNmZyWdsGHzxzFWQ9war1NsyVD4yXryDB15UwL78DzPkqRPUIwKnUJcA==\",\"secondaryMasterKey\":\"l2WRGtDJ2B6owmlJafEwELZZrJM59v95fgoCsVkQ1a2OOfaZLjr46stdyqtDVDrtcXiWpNo16MVm3TsE1StyLg==\",\"primaryReadonlyMasterKey\":\"HdEhuaOhDvI02QdkwZaqIO00G6TkR57T2hRo1akRrJHR2EYfHLXOivQZUbvZiZPQoxWlgsmYidKbsQtNrtzXoA==\",\"secondaryReadonlyMasterKey\":\"Y8mbhGDr1gpp2GmBr3mr3UqcsyPD4JozNnNk5eK52uhVoEuuHbGueeXpaBd4LRUr7U5kUXkD9OwphoyeiUguIQ==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "DELETE", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithIPRange.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithIPRange.json index d04a94237a75f..02089df452a41 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithIPRange.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithIPRange.json @@ -1268,7 +1268,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "8d8ddc23-f484-404e-9562-e2b853e98e36", - "Body" : "{\"primaryMasterKey\":\"v0tDudm3GbrUFmroSZ8OrPDMDRDBXKnFTCASLPKQBa7lwUyGpqOTKqWRXLU4PduhNPndN1RAwFdyD5a9HoLUSw==\",\"secondaryMasterKey\":\"eelokRguKR3yslgJwVemq5t2UVLupPLrQiM9Je8KC8aWY77qdfi5EH5ld6bX2Le00d4LB3CwJPNpHy6HzYJMsA==\",\"primaryReadonlyMasterKey\":\"FlsRhs6yXEJUKl3vzT12dGarjcOaB1M1cmI5MRJidaT6CVEhDu3wA6bnkZklBNrI0SbZ33IJENEhtFSy3fl1Mw==\",\"secondaryReadonlyMasterKey\":\"OUhyx3qdnLQwOpWw6qlEB4LW0Hx7QjoGEOPZVyeaQdHHD4jc4mdsoMeSlOvuDCCdfJEu6iUPPW0Xuh9uc8kYRg==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1294,7 +1294,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "cec1719c-a57a-47b0-99ab-e9ac266b8958", - "Body" : "{\"primaryReadonlyMasterKey\":\"FlsRhs6yXEJUKl3vzT12dGarjcOaB1M1cmI5MRJidaT6CVEhDu3wA6bnkZklBNrI0SbZ33IJENEhtFSy3fl1Mw==\",\"secondaryReadonlyMasterKey\":\"OUhyx3qdnLQwOpWw6qlEB4LW0Hx7QjoGEOPZVyeaQdHHD4jc4mdsoMeSlOvuDCCdfJEu6iUPPW0Xuh9uc8kYRg==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "DELETE", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithKindMongoDB.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithKindMongoDB.json index e8ca2a86f0ecb..2e0953850746b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithKindMongoDB.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testCreateCosmosDBWithKindMongoDB.json @@ -1321,7 +1321,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "104b58f0-955a-4193-96c9-c204c5ed4a19", - "Body" : "{\"primaryMasterKey\":\"RotZNwxj9u3CpTdXcsb2KVlUmXMSDUMSYGcgewz3BjuxNKooZSFixezwgZc0T8Y7KHCpyCTmkesvJs8izAzGBQ==\",\"secondaryMasterKey\":\"7BrIEgcMhzmQMS5h30wVOuzKU2m8ARnw9JZU7vXLcmNXnUxebzBWSvxPlRGSO8rd4FsWxAQzSBDu9nQBEm2mAg==\",\"primaryReadonlyMasterKey\":\"jUOPOrThCxA17gfIPCbkU5TTeHQf4KWX6HR2W217ZkU8heNWCJsvpK6VNy072FfWhzlQi1bBvLRipfgqopqAgA==\",\"secondaryReadonlyMasterKey\":\"SXbdOGw6jZPoJp17aaKAxmEeMw0xBBdFj1oETSU3kIdPFLXM85CZ1npFWbeRbOVOXRRY9Me1YiFxnHHwOYEN1A==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1348,7 +1348,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "7eea78d2-8f3e-47ee-867f-4d1e25c2bd71", - "Body" : "{\"primaryReadonlyMasterKey\":\"jUOPOrThCxA17gfIPCbkU5TTeHQf4KWX6HR2W217ZkU8heNWCJsvpK6VNy072FfWhzlQi1bBvLRipfgqopqAgA==\",\"secondaryReadonlyMasterKey\":\"SXbdOGw6jZPoJp17aaKAxmEeMw0xBBdFj1oETSU3kIdPFLXM85CZ1npFWbeRbOVOXRRY9Me1YiFxnHHwOYEN1A==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHub.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHub.json index 89c924784f75a..2cad3d66e7233 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHub.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHub.json @@ -1,810 +1,752 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_263763384311?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_0d844955bd37?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:42:10 GMT", - "content-length" : "192", + "date" : "Fri, 28 Aug 2020 06:01:30 GMT", + "content-length" : "326", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8944c5e4-d96f-4a89-8dfe-23876562734c", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2270dcb2-fe7f-4ede-aa50-32566a993bb7", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004211Z:8944c5e4-d96f-4a89-8dfe-23876562734c", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060131Z:2270dcb2-fe7f-4ede-aa50-32566a993bb7", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "8944c5e4-d96f-4a89-8dfe-23876562734c", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311\",\"name\":\"rgnemv_263763384311\",\"location\":\"eastus2\",\"properties\":{\"provisioningState\":\"Succeeded\"}}" + "x-ms-request-id" : "2270dcb2-fe7f-4ede-aa50-32566a993bb7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37\",\"name\":\"rgnemv_0d844955bd37\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus2\",\"tags\":{\"date\":\"2020-08-28T06:01:27.477412700Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:42:12 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "635", + "date" : "Fri, 28 Aug 2020 06:01:40 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "651", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "server-sb" : "Service-Bus-Resource-Provider/CH3", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5d00363f-69cb-49d8-81c8-7c0ef97e7e57", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "091398be-b5fc-4933-a813-45ebc263ff4b", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004213Z:091398be-b5fc-4933-a813-45ebc263ff4b", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060141Z:5d00363f-69cb-49d8-81c8-7c0ef97e7e57", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "523dd2cd-629a-47a1-a010-00aef6feeb97_M1SN1_M1SN1", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa\",\"name\":\"nsba561500fa\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsba561500fa\",\"createdAt\":\"2018-02-23T00:42:10.847Z\",\"updatedAt\":\"2018-02-23T00:42:10.847Z\",\"serviceBusEndpoint\":\"https://nsba561500fa.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "dd9023ad-5d68-4d20-8f5e-bd592b9345de_M8CH3_M8CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968\",\"name\":\"ns0b03701968\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns0b03701968\",\"createdAt\":\"2020-08-28T06:01:38.7Z\",\"updatedAt\":\"2020-08-28T06:01:38.7Z\",\"serviceBusEndpoint\":\"https://ns0b03701968.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:42:13 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "635", + "date" : "Fri, 28 Aug 2020 06:02:11 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "651", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "server-sb" : "Service-Bus-Resource-Provider/CH3", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14998", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0582e022-fcde-4b1d-9402-383a1373393d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "58672c2c-1b82-47c6-8373-ad5c55526a96", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004214Z:58672c2c-1b82-47c6-8373-ad5c55526a96", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060212Z:0582e022-fcde-4b1d-9402-383a1373393d", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "5682ac20-d09f-42a4-82f3-155f488e5b8e_M1SN1_M1SN1", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa\",\"name\":\"nsba561500fa\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsba561500fa\",\"createdAt\":\"2018-02-23T00:42:10.847Z\",\"updatedAt\":\"2018-02-23T00:42:10.847Z\",\"serviceBusEndpoint\":\"https://nsba561500fa.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "31180da4-faf6-4060-81d4-3e841374a3f5_M4CH3_M4CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968\",\"name\":\"ns0b03701968\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns0b03701968\",\"createdAt\":\"2020-08-28T06:01:38.7Z\",\"updatedAt\":\"2020-08-28T06:01:38.7Z\",\"serviceBusEndpoint\":\"https://ns0b03701968.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:42:43 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "633", + "date" : "Fri, 28 Aug 2020 06:02:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "651", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14997", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a2e427cd-36cf-4fee-98ba-100d4115a4bd", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ee36506a-f329-4e53-bcf3-a2df0cc1d3c5", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004244Z:ee36506a-f329-4e53-bcf3-a2df0cc1d3c5", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060242Z:a2e427cd-36cf-4fee-98ba-100d4115a4bd", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "36f89d60-7731-47ab-ab0f-85ae68378d97_M1SN1_M1SN1", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa\",\"name\":\"nsba561500fa\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsba561500fa\",\"createdAt\":\"2018-02-23T00:42:10.847Z\",\"updatedAt\":\"2018-02-23T00:42:37.973Z\",\"serviceBusEndpoint\":\"https://nsba561500fa.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + "x-ms-request-id" : "9f055c25-04b0-4c98-af3e-5d5d15e1aa11_M1SN1_M1SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968\",\"name\":\"ns0b03701968\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns0b03701968\",\"createdAt\":\"2020-08-28T06:01:38.7Z\",\"updatedAt\":\"2020-08-28T06:02:29.683Z\",\"serviceBusEndpoint\":\"https://ns0b03701968.servicebus.windows.net:443/\",\"status\":\"Active\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.Storage/storageAccounts/stg0b6106413?api-version=2017-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.Storage/storageAccounts/stg328161738?api-version=2019-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (StorageManagementClient, 2017-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:42:45 GMT", - "content-length" : "0", + "date" : "Fri, 28 Aug 2020 06:02:52 GMT", "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "0", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5b200a24-1563-4b84-a34c-a9148b393de9", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5f2cc419-1199-484d-9d6f-5b5852093770", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004246Z:5f2cc419-1199-484d-9d6f-5b5852093770", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060252Z:5b200a24-1563-4b84-a34c-a9148b393de9", "content-type" : "text/plain; charset=utf-8", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/5de2e0bd-6d0c-4463-95d0-e629d5865291?monitor=true&api-version=2017-10-01", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/6fac29af-8281-4fb7-870b-d13ac8568015?monitor=true&api-version=2019-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "5de2e0bd-6d0c-4463-95d0-e629d5865291", + "x-ms-request-id" : "6fac29af-8281-4fb7-870b-d13ac8568015", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/5de2e0bd-6d0c-4463-95d0-e629d5865291?monitor=true&api-version=2017-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/6fac29af-8281-4fb7-870b-d13ac8568015?monitor=true&api-version=2019-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (StorageManagementClient, 2017-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:42:45 GMT", - "content-length" : "0", + "date" : "Fri, 28 Aug 2020 06:03:08 GMT", "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14996", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d1c8061c-1a49-4b91-b0f7-f9ddf7b768df", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d257ca3f-37b2-4e87-88b1-dbcc0c7c6c00", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004246Z:d257ca3f-37b2-4e87-88b1-dbcc0c7c6c00", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060309Z:d1c8061c-1a49-4b91-b0f7-f9ddf7b768df", "content-type" : "text/plain; charset=utf-8", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/5de2e0bd-6d0c-4463-95d0-e629d5865291?monitor=true&api-version=2017-10-01", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/6fac29af-8281-4fb7-870b-d13ac8568015?monitor=true&api-version=2019-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "fc484adf-5c4f-4292-98d5-48ba64e8c2e6", + "x-ms-request-id" : "9ed88ae5-d618-4516-b6bd-0a1b83dc7559", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/5de2e0bd-6d0c-4463-95d0-e629d5865291?monitor=true&api-version=2017-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/6fac29af-8281-4fb7-870b-d13ac8568015?monitor=true&api-version=2019-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (StorageManagementClient, 2017-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:03 GMT", - "content-length" : "0", + "date" : "Fri, 28 Aug 2020 06:03:12 GMT", "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "content-length" : "1114", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14995", - "StatusCode" : "202", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8fa4016d-e41e-415d-a2e1-e42653906996", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3fe2ef1b-9cc9-44ee-a7f3-4e82c87d0f0e", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004303Z:3fe2ef1b-9cc9-44ee-a7f3-4e82c87d0f0e", - "content-type" : "text/plain; charset=utf-8", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/5de2e0bd-6d0c-4463-95d0-e629d5865291?monitor=true&api-version=2017-10-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060313Z:8fa4016d-e41e-415d-a2e1-e42653906996", + "content-type" : "application/json", "cache-control" : "no-cache", - "x-ms-request-id" : "334b8dad-5e47-4e53-871e-058983d7cf6c", - "Body" : "" + "x-ms-request-id" : "56e8a8f4-43ad-405b-9572-1d19582c272a", + "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.Storage/storageAccounts/stg328161738\",\"name\":\"stg328161738\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:02:51.7676050Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:02:51.7676050Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-08-28T06:02:51.6738252Z\",\"primaryEndpoints\":{\"blob\":\"https://stg328161738.blob.core.windows.net/\",\"queue\":\"https://stg328161738.queue.core.windows.net/\",\"table\":\"https://stg328161738.table.core.windows.net/\",\"file\":\"https://stg328161738.file.core.windows.net/\"},\"primaryLocation\":\"eastus2\",\"statusOfPrimary\":\"available\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus2/asyncoperations/5de2e0bd-6d0c-4463-95d0-e629d5865291?monitor=true&api-version=2017-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.Storage/storageAccounts/stg328161738?api-version=2019-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (StorageManagementClient, 2017-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:20 GMT", + "date" : "Fri, 28 Aug 2020 06:03:12 GMT", "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "1105", + "content-length" : "1114", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14994", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "fb4e8473-0506-4dbe-8305-cddb59e2f028", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5af1b3b6-037d-41a0-a09f-69e31e2f0f8a", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004320Z:5af1b3b6-037d-41a0-a09f-69e31e2f0f8a", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060313Z:fb4e8473-0506-4dbe-8305-cddb59e2f028", "content-type" : "application/json", "cache-control" : "no-cache", - "x-ms-request-id" : "ec5dc401-4a28-4618-be59-b247ad843fa0", - "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.Storage/storageAccounts/stg0b6106413\",\"name\":\"stg0b6106413\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"trustedDirectories\":[\"00000000-0000-0000-0000-000000000000\"],\"supportsHttpsTrafficOnly\":false,\"encryption\":{\"services\":{\"file\":{\"enabled\":true,\"lastEnabledTime\":\"2018-02-23T00:42:46.5547986Z\"},\"blob\":{\"enabled\":true,\"lastEnabledTime\":\"2018-02-23T00:42:46.5547986Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2018-02-23T00:42:46.5235455Z\",\"primaryEndpoints\":{\"blob\":\"https://stg0b6106413.blob.core.windows.net/\",\"queue\":\"https://stg0b6106413.queue.core.windows.net/\",\"table\":\"https://stg0b6106413.table.core.windows.net/\",\"file\":\"https://stg0b6106413.file.core.windows.net/\"},\"primaryLocation\":\"eastus2\",\"statusOfPrimary\":\"available\"}}" + "x-ms-request-id" : "0cca187e-b004-4662-a9e2-c5fdc91743a1", + "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.Storage/storageAccounts/stg328161738\",\"name\":\"stg328161738\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:02:51.7676050Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-08-28T06:02:51.7676050Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-08-28T06:02:51.6738252Z\",\"primaryEndpoints\":{\"blob\":\"https://stg328161738.blob.core.windows.net/\",\"queue\":\"https://stg328161738.queue.core.windows.net/\",\"table\":\"https://stg328161738.table.core.windows.net/\",\"file\":\"https://stg328161738.file.core.windows.net/\"},\"primaryLocation\":\"eastus2\",\"statusOfPrimary\":\"available\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.Storage/storageAccounts/stg0b6106413?api-version=2017-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.Storage/storageAccounts/stg328161738/blobServices/default/containers/datacpt?api-version=2019-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (StorageManagementClient, 2017-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:20 GMT", + "date" : "Fri, 28 Aug 2020 06:03:13 GMT", "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "1105", + "content-length" : "181", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14993", - "StatusCode" : "200", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "404", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9069871a-6d7e-4e3e-a61c-20bb84ea3814", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "21c39ddc-47ea-4407-b13a-d1bfb1085f6c", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004321Z:21c39ddc-47ea-4407-b13a-d1bfb1085f6c", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060313Z:9069871a-6d7e-4e3e-a61c-20bb84ea3814", "content-type" : "application/json", "cache-control" : "no-cache", - "x-ms-request-id" : "82ae133e-844d-4a9d-bd5a-98d32ef111f8", - "Body" : "{\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.Storage/storageAccounts/stg0b6106413\",\"name\":\"stg0b6106413\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"trustedDirectories\":[\"00000000-0000-0000-0000-000000000000\"],\"supportsHttpsTrafficOnly\":false,\"encryption\":{\"services\":{\"file\":{\"enabled\":true,\"lastEnabledTime\":\"2018-02-23T00:42:46.5547986Z\"},\"blob\":{\"enabled\":true,\"lastEnabledTime\":\"2018-02-23T00:42:46.5547986Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2018-02-23T00:42:46.5235455Z\",\"primaryEndpoints\":{\"blob\":\"https://stg0b6106413.blob.core.windows.net/\",\"queue\":\"https://stg0b6106413.queue.core.windows.net/\",\"table\":\"https://stg0b6106413.table.core.windows.net/\",\"file\":\"https://stg0b6106413.file.core.windows.net/\"},\"primaryLocation\":\"eastus2\",\"statusOfPrimary\":\"available\"}}" + "x-ms-request-id" : "fa4e003c-46cd-494d-a6d5-8822907444d4", + "Body" : "{\"error\":{\"code\":\"ContainerOperationFailure\",\"message\":\"The specified container does not exist.\\nRequestId:a4902940-f01e-005b-2f00-7deeb4000000\\nTime:2020-08-28T06:03:13.6925491Z\"}}" } }, { - "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.Storage/storageAccounts/stg0b6106413/listKeys?api-version=2017-10-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.Storage/storageAccounts/stg328161738/blobServices/default/containers/datacpt?api-version=2019-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (StorageManagementClient, 2017-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:21 GMT", + "date" : "Fri, 28 Aug 2020 06:03:14 GMT", "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "288", + "content-length" : "412", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", "retry-after" : "0", - "StatusCode" : "200", + "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e87c2093-29af-45b7-991d-a0b6eb6f39ae", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7a4c0261-9059-47a5-9e39-e16169a525e6", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004321Z:7a4c0261-9059-47a5-9e39-e16169a525e6", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060314Z:e87c2093-29af-45b7-991d-a0b6eb6f39ae", + "etag" : "\"0x8D84B180D0D2A76\"", "content-type" : "application/json", "cache-control" : "no-cache", - "x-ms-request-id" : "c174ab01-deb2-400b-8d08-d92c2f7b1958", - "Body" : "{\"keys\":[{\"keyName\":\"key1\",\"value\":\"***REMOVED***\",\"permissions\":\"FULL\"},{\"keyName\":\"key2\",\"value\":\"***REMOVED***\",\"permissions\":\"FULL\"}]}" + "x-ms-request-id" : "9b9ced5d-a521-400f-9cc7-6e8d95a91b31", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.Storage/storageAccounts/stg328161738/blobServices/default/containers/datacpt\",\"name\":\"datacpt\",\"type\":\"Microsoft.Storage/storageAccounts/blobServices/containers\",\"properties\":{\"deleted\":false,\"remainingRetentionDays\":0,\"publicAccess\":\"Container\",\"hasImmutabilityPolicy\":false,\"hasLegalHold\":false}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:35 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", + "date" : "Fri, 28 Aug 2020 06:03:17 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "939", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3e90c452-d41e-4127-8ab4-d08410af44a8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "581d996c-d130-4f9e-b96e-26a742d3d6a6", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004336Z:581d996c-d130-4f9e-b96e-26a742d3d6a6", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060317Z:3e90c452-d41e-4127-8ab4-d08410af44a8", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "0621dc06-c362-476a-b311-68df2698cfea_M1SN1_M1SN1", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5\",\"name\":\"ehde106942d5\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US 2\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2018-02-23T00:43:26.993Z\",\"updatedAt\":\"2018-02-23T00:43:37.277Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.Storage/storageAccounts/stg0b6106413\",\"blobContainer\":\"datacpt\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":300,\"sizeLimitInBytes\":104857600}}}" + "x-ms-request-id" : "1e38bcfb-8572-4a56-a279-25458a3f2af4_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9\",\"name\":\"eh85878709e9\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US 2\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:03:16.467Z\",\"updatedAt\":\"2020-08-28T06:03:16.773Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.Storage/storageAccounts/stg328161738\",\"blobContainer\":\"datacpt\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":300,\"sizeLimitInBytes\":104857600}}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5/consumergroups/cg1?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9/consumergroups/cg1?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:36 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", + "date" : "Fri, 28 Aug 2020 06:03:18 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "419", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6f9e5577-cfed-4dd2-8f0f-3c9789f2a82a", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "697af20c-da84-4d4c-80b6-f9692524600f", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004337Z:697af20c-da84-4d4c-80b6-f9692524600f", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060319Z:6f9e5577-cfed-4dd2-8f0f-3c9789f2a82a", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "8cad65de-6b50-49e2-8263-8d365d2d65b5_M1SN1_M1SN1", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5/consumergroups/cg1\",\"name\":\"cg1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2018-02-23T00:43:37.8459399Z\",\"updatedAt\":\"2018-02-23T00:43:37.8459399Z\",\"userMetadata\":\"sometadata\"}}" + "x-ms-request-id" : "9d8a7db6-fe1e-4841-949b-da8f6a9f6ff9_M1SN1_M1SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9/consumergroups/cg1\",\"name\":\"cg1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2020-08-28T06:03:19.2749937Z\",\"updatedAt\":\"2020-08-28T06:03:19.2749937Z\",\"userMetadata\":\"sometadata\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5/authorizationRules/listenrule1?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9/authorizationRules/listenrule1?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:38 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", + "date" : "Fri, 28 Aug 2020 06:03:21 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "349", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d01bf3f2-8ec5-4d60-8208-c3b6cc45c26d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "053ebe8a-e537-4ac5-a2db-8869753b10e4", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004338Z:053ebe8a-e537-4ac5-a2db-8869753b10e4", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060321Z:d01bf3f2-8ec5-4d60-8208-c3b6cc45c26d", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "c7b7fe3b-6a43-4f17-8248-f4025098aa3d_M1SN1_M1SN1", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5/authorizationRules/listenrule1\",\"name\":\"listenrule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US 2\",\"properties\":{\"rights\":[\"Listen\"]}}" + "x-ms-request-id" : "dc2e2c46-49a1-4b41-b249-514872c4667c_M7CH3_M7CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9/authorizationRules/listenrule1\",\"name\":\"listenrule1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules\",\"location\":\"East US 2\",\"properties\":{\"rights\":[\"Listen\"]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5/consumergroups?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9/consumergroups?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:39 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "829", + "date" : "Fri, 28 Aug 2020 06:03:21 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "813", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14992", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "84fb8ead-5e84-47c7-8ee7-4b3c55b1fc98", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "992ef541-d514-45c0-9cf6-40de063b7bd9", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004339Z:992ef541-d514-45c0-9cf6-40de063b7bd9", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060322Z:84fb8ead-5e84-47c7-8ee7-4b3c55b1fc98", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-inline-count" : "", - "x-ms-request-id" : "3efcce6f-985f-4335-8c91-98549d1a2592_M1SN1_M1SN1", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2018-02-23T00:43:32.6102444\",\"updatedAt\":\"2018-02-23T00:43:32.6102444\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/ehde106942d5/consumergroups/cg1\",\"name\":\"cg1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2018-02-23T00:43:37.8447883\",\"updatedAt\":\"2018-02-23T00:43:37.8447883\",\"userMetadata\":\"sometadata\"}}]}" + "x-ms-request-id" : "55ab8038-ec76-4c00-9609-b8d03b1ab7d6_M1SN1_M1SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2020-08-28T06:03:16.5Z\",\"updatedAt\":\"2020-08-28T06:03:16.5Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh85878709e9/consumergroups/cg1\",\"name\":\"cg1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2020-08-28T06:03:19.265Z\",\"updatedAt\":\"2020-08-28T06:03:19.265Z\",\"userMetadata\":\"sometadata\"}}]}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/eh17a4325774?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh0c329685b9?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:41 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "455", + "date" : "Fri, 28 Aug 2020 06:03:25 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "454", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f484b63e-e791-4dde-9c5a-5ab6bb2b4957", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7920cbe8-531a-4211-a65f-c1b632a9a497", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004341Z:7920cbe8-531a-4211-a65f-c1b632a9a497", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060325Z:f484b63e-e791-4dde-9c5a-5ab6bb2b4957", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "4a41b8fb-ba5e-4299-b679-00207c7ee07c_M1SN1_M1SN1", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/eh17a4325774\",\"name\":\"eh17a4325774\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US 2\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2018-02-23T00:43:42.213Z\",\"updatedAt\":\"2018-02-23T00:43:42.417Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + "x-ms-request-id" : "78b22b2a-7817-42be-972e-c5221668f11d_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh0c329685b9\",\"name\":\"eh0c329685b9\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US 2\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:03:25.053Z\",\"updatedAt\":\"2020-08-28T06:03:25.25Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/eh17a4325774/consumergroups/cg2?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh0c329685b9/consumergroups/cg2?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:42 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", + "date" : "Fri, 28 Aug 2020 06:03:27 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "419", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3cc6da05-03a7-4ae4-86e1-b8eb6416dd3f", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "715a48af-fdd3-49dc-a46b-03116e048dca", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004342Z:715a48af-fdd3-49dc-a46b-03116e048dca", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060327Z:3cc6da05-03a7-4ae4-86e1-b8eb6416dd3f", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "538e78a0-eb5d-4eed-aa77-6ece1590172d_M1SN1_M1SN1", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/eh17a4325774/consumergroups/cg2\",\"name\":\"cg2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2018-02-23T00:43:42.9725475Z\",\"updatedAt\":\"2018-02-23T00:43:42.9725475Z\",\"userMetadata\":\"sometadata\"}}" + "x-ms-request-id" : "791c9c53-f8f3-4517-8a94-2c921c070726_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh0c329685b9/consumergroups/cg2\",\"name\":\"cg2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2020-08-28T06:03:27.3593283Z\",\"updatedAt\":\"2020-08-28T06:03:27.3593283Z\",\"userMetadata\":\"sometadata\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/eh17a4325774/consumergroups?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh0c329685b9/consumergroups?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:43 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "829", + "date" : "Fri, 28 Aug 2020 06:03:27 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "817", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14991", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "27e14388-babe-4748-98a4-bea90f5c834b", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7d541223-c063-4809-9a47-2914c516a5eb", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004343Z:7d541223-c063-4809-9a47-2914c516a5eb", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060328Z:27e14388-babe-4748-98a4-bea90f5c834b", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-inline-count" : "", - "x-ms-request-id" : "fe390df6-66e7-4f3a-a998-7795e4b6c791_M1SN1_M1SN1", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/eh17a4325774/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2018-02-23T00:43:40.7166475\",\"updatedAt\":\"2018-02-23T00:43:40.7166475\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/nsba561500fa/eventhubs/eh17a4325774/consumergroups/cg2\",\"name\":\"cg2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2018-02-23T00:43:42.9826852\",\"updatedAt\":\"2018-02-23T00:43:42.9826852\",\"userMetadata\":\"sometadata\"}}]}" + "x-ms-request-id" : "c9b0823d-4dce-4cfe-ba4c-203f77c23f76_M1SN1_M1SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh0c329685b9/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2020-08-28T06:03:25.109Z\",\"updatedAt\":\"2020-08-28T06:03:25.109Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/ns0b03701968/eventhubs/eh0c329685b9/consumergroups/cg2\",\"name\":\"cg2\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"East US 2\",\"properties\":{\"createdAt\":\"2020-08-28T06:03:27.359Z\",\"updatedAt\":\"2020-08-28T06:03:27.359Z\",\"userMetadata\":\"sometadata\"}}]}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:44 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "633", + "date" : "Fri, 28 Aug 2020 06:03:35 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "655", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "server-sb" : "Service-Bus-Resource-Provider/CH3", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "47f51ff6-874f-4f67-bd0e-9db59a7e77db", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a3158bdb-41ea-4071-9742-6dfd57be0bfe", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004344Z:a3158bdb-41ea-4071-9742-6dfd57be0bfe", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "48", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060336Z:47f51ff6-874f-4f67-bd0e-9db59a7e77db", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "8b214332-326b-4342-b16a-6c6eac7e0eac_M1SN1_M1SN1", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b\",\"name\":\"ns7eb947293b\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns7eb947293b\",\"createdAt\":\"2018-02-23T00:43:42.51Z\",\"updatedAt\":\"2018-02-23T00:43:42.51Z\",\"serviceBusEndpoint\":\"https://ns7eb947293b.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "563bf712-25fc-4c27-bde0-413d2cb3dbc4_M6CH3_M6CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c\",\"name\":\"nse5d368290c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nse5d368290c\",\"createdAt\":\"2020-08-28T06:03:33.943Z\",\"updatedAt\":\"2020-08-28T06:03:33.943Z\",\"serviceBusEndpoint\":\"https://nse5d368290c.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:43:44 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "633", + "date" : "Fri, 28 Aug 2020 06:04:06 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "655", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "server-sb" : "Service-Bus-Resource-Provider/CH3", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14990", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2d3694d1-259f-43fd-88f4-05dbc82062c3", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b053dae3-94e8-41d0-8f81-ef2f3f887af6", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004344Z:b053dae3-94e8-41d0-8f81-ef2f3f887af6", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060406Z:2d3694d1-259f-43fd-88f4-05dbc82062c3", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "6c802091-1a98-4efd-af6d-446a78c1ea31_M1SN1_M1SN1", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b\",\"name\":\"ns7eb947293b\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns7eb947293b\",\"createdAt\":\"2018-02-23T00:43:42.51Z\",\"updatedAt\":\"2018-02-23T00:43:42.51Z\",\"serviceBusEndpoint\":\"https://ns7eb947293b.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "f6124deb-9b07-40ab-a4f8-a586566b491e_M3CH3_M3CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c\",\"name\":\"nse5d368290c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nse5d368290c\",\"createdAt\":\"2020-08-28T06:03:33.943Z\",\"updatedAt\":\"2020-08-28T06:03:33.943Z\",\"serviceBusEndpoint\":\"https://nse5d368290c.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:44:17 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "632", + "date" : "Fri, 28 Aug 2020 06:04:36 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "653", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "server-sb" : "Service-Bus-Resource-Provider/CH3", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14989", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "06f02bd0-0861-42a9-ae34-a45145797af1", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "685c9bd2-7218-47e9-95f6-50f1585505fd", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004417Z:685c9bd2-7218-47e9-95f6-50f1585505fd", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060436Z:06f02bd0-0861-42a9-ae34-a45145797af1", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "1f9c1593-0c29-458a-83ad-b74d5ce39a01_M1SN1_M1SN1", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b\",\"name\":\"ns7eb947293b\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns7eb947293b\",\"createdAt\":\"2018-02-23T00:43:42.51Z\",\"updatedAt\":\"2018-02-23T00:44:08.557Z\",\"serviceBusEndpoint\":\"https://ns7eb947293b.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + "x-ms-request-id" : "cef3c39f-39d0-467c-a8f2-c688db66e2fd_M4CH3_M4CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c\",\"name\":\"nse5d368290c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nse5d368290c\",\"createdAt\":\"2020-08-28T06:03:33.943Z\",\"updatedAt\":\"2020-08-28T06:04:21.447Z\",\"serviceBusEndpoint\":\"https://nse5d368290c.servicebus.windows.net:443/\",\"status\":\"Active\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b/eventhubs/eh17a4325774?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c/eventhubs/eh0c329685b9?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:44:24 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "454", + "date" : "Fri, 28 Aug 2020 06:04:40 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "453", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "108df65e-f219-421c-aad7-026cede0c9ea", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e17d3069-1a0d-4a71-a32f-8aceaefd7fd4", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004424Z:e17d3069-1a0d-4a71-a32f-8aceaefd7fd4", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060440Z:108df65e-f219-421c-aad7-026cede0c9ea", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eda64847-adf0-4f57-ab0c-04f72cd34860_M1SN1_M1SN1", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b/eventhubs/eh17a4325774\",\"name\":\"eh17a4325774\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US 2\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2018-02-23T00:44:21.433Z\",\"updatedAt\":\"2018-02-23T00:44:25.56Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + "x-ms-request-id" : "d21f554b-816b-4599-abb0-b99bdb7b0963_M4CH3_M4CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c/eventhubs/eh0c329685b9\",\"name\":\"eh0c329685b9\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US 2\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:04:39.77Z\",\"updatedAt\":\"2020-08-28T06:04:40.01Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b/eventhubs?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c/eventhubs?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:44:25 GMT", - "server" : "Service-Bus-Resource-Provider/SN1", - "content-length" : "464", + "date" : "Fri, 28 Aug 2020 06:04:41 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "463", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/SN1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "server-sb" : "Service-Bus-Resource-Provider/CH3", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14988", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5911bfb7-93cc-4c84-bfc5-73441d9c3def", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "95bc3768-9655-4cd8-8a2f-3e4726eaed55", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004425Z:95bc3768-9655-4cd8-8a2f-3e4726eaed55", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060441Z:5911bfb7-93cc-4c84-bfc5-73441d9c3def", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-inline-count" : "", - "x-ms-request-id" : "6e81602f-f7e3-4a83-bae3-784123f813e6_M1SN1_M1SN1", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_263763384311/providers/Microsoft.EventHub/namespaces/ns7eb947293b/eventhubs/eh17a4325774\",\"name\":\"eh17a4325774\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US 2\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2018-02-23T00:44:21.433\",\"updatedAt\":\"2018-02-23T00:44:25.56\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}]}" + "x-ms-request-id" : "fd5a1ddf-7827-4c15-9e8c-925e183a342b_M11CH3_M11CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0d844955bd37/providers/Microsoft.EventHub/namespaces/nse5d368290c/eventhubs/eh0c329685b9\",\"name\":\"eh0c329685b9\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US 2\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:04:39.77\",\"updatedAt\":\"2020-08-28T06:04:40.01\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}]}" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_263763384311?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_0d844955bd37?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:44:26 GMT", + "date" : "Fri, 28 Aug 2020 06:04:46 GMT", "content-length" : "0", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", "retry-after" : "0", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f646b8aa-6708-4f9d-bb30-eaf2d78913b0", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "22c69290-0b94-4139-b00e-4776cec73df7", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004426Z:22c69290-0b94-4139-b00e-4776cec73df7", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060446Z:f646b8aa-6708-4f9d-bb30-eaf2d78913b0", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "22c69290-0b94-4139-b00e-4776cec73df7", + "x-ms-request-id" : "f646b8aa-6708-4f9d-bb30-eaf2d78913b0", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:44:26 GMT", + "date" : "Fri, 28 Aug 2020 06:05:01 GMT", "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14987", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "af33aacc-1a3c-4bc0-9c20-9269c67c757f", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4058dfcf-a284-4109-96bb-5399f19cad7e", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004426Z:4058dfcf-a284-4109-96bb-5399f19cad7e", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060501Z:af33aacc-1a3c-4bc0-9c20-9269c67c757f", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "4058dfcf-a284-4109-96bb-5399f19cad7e", + "x-ms-request-id" : "af33aacc-1a3c-4bc0-9c20-9269c67c757f", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:44:41 GMT", + "date" : "Fri, 28 Aug 2020 06:05:17 GMT", "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14986", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ae37c438-bb95-4517-8c9a-ac7b43553d39", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "27ccae37-a88a-437b-b4da-5ad3466d779b", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004442Z:27ccae37-a88a-437b-b4da-5ad3466d779b", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060517Z:ae37c438-bb95-4517-8c9a-ac7b43553d39", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "27ccae37-a88a-437b-b4da-5ad3466d779b", + "x-ms-request-id" : "ae37c438-bb95-4517-8c9a-ac7b43553d39", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:44:56 GMT", + "date" : "Fri, 28 Aug 2020 06:05:32 GMT", "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14985", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ead70dce-c541-4ed4-b751-841ca5560273", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4b407bfe-aefd-4fe4-bd22-1ec269823816", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004457Z:4b407bfe-aefd-4fe4-bd22-1ec269823816", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060533Z:ead70dce-c541-4ed4-b751-841ca5560273", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "4b407bfe-aefd-4fe4-bd22-1ec269823816", + "x-ms-request-id" : "ead70dce-c541-4ed4-b751-841ca5560273", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:45:11 GMT", + "date" : "Fri, 28 Aug 2020 06:05:48 GMT", "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14984", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "949e43c9-341e-4980-8450-2ab9907c0089", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "63353f34-cc41-422e-bfff-b10553de15cc", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004512Z:63353f34-cc41-422e-bfff-b10553de15cc", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060549Z:949e43c9-341e-4980-8450-2ab9907c0089", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "63353f34-cc41-422e-bfff-b10553de15cc", + "x-ms-request-id" : "949e43c9-341e-4980-8450-2ab9907c0089", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:45:26 GMT", + "date" : "Fri, 28 Aug 2020 06:06:04 GMT", "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14983", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "60be1720-9f56-45cb-bf03-4c521228daf8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "daeb34cd-33d7-4521-b201-a06aee249228", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004527Z:daeb34cd-33d7-4521-b201-a06aee249228", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060604Z:60be1720-9f56-45cb-bf03-4c521228daf8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "daeb34cd-33d7-4521-b201-a06aee249228", + "x-ms-request-id" : "60be1720-9f56-45cb-bf03-4c521228daf8", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:45:42 GMT", + "date" : "Fri, 28 Aug 2020 06:06:20 GMT", "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14982", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "dc469fed-f33b-4c02-9968-9e282ef55c06", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b7cc17bb-0ba0-4fa7-968c-c9759f34c83f", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004542Z:b7cc17bb-0ba0-4fa7-968c-c9759f34c83f", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060620Z:dc469fed-f33b-4c02-9968-9e282ef55c06", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "b7cc17bb-0ba0-4fa7-968c-c9759f34c83f", + "x-ms-request-id" : "dc469fed-f33b-4c02-9968-9e282ef55c06", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwRDg0NDk1NUJEMzctRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 23 Feb 2018 00:45:57 GMT", + "date" : "Fri, 28 Aug 2020 06:06:36 GMT", "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14981", - "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "964f62c4-3a24-4d1c-9304-bc58486deb7e", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004557Z:964f62c4-3a24-4d1c-9304-bc58486deb7e", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", - "cache-control" : "no-cache", - "x-ms-request-id" : "964f62c4-3a24-4d1c-9304-bc58486deb7e", - "Body" : "" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYyNjM3NjMzODQzMTEtRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2017-05-10", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:f82fa839f6b46fd84edc56e01cf7c8c6d4faaa2190534aff5c1d17095f0a3c13 Java:1.8.0_144 (ResourceManagementClient, 2017-05-10)" - }, - "Response" : { - "date" : "Fri, 23 Feb 2018 00:46:12 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "14980", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", "StatusCode" : "200", - "pragma" : "no-cache", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "0948c661-b826-42ce-b92d-e97865952622", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3e85a3ae-3ca3-4bd7-b195-b1c1fd7fa4a6", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "WESTUS2:20180223T004613Z:0948c661-b826-42ce-b92d-e97865952622", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060636Z:3e85a3ae-3ca3-4bd7-b195-b1c1fd7fa4a6", "cache-control" : "no-cache", - "x-ms-request-id" : "0948c661-b826-42ce-b92d-e97865952622", + "x-ms-request-id" : "3e85a3ae-3ca3-4bd7-b195-b1c1fd7fa4a6", "Body" : "" } } ], - "variables" : [ "rgnemv_263763384311", "nsba561500fa", "ns7eb947293b", "stg0b6106413", "ehde106942d5", "eh17a4325774", "80ac137e-e7f1-40ed-bd2c-6a9cddb6f423", "d2081e5e-da8b-42f1-a6c8-4e14b27b7b8a", "74225f15-502b-4cc4-a645-7341483ccf90", "87d32f48-ab6e-420e-9c41-da1d12a30957", "317309ea-6614-452d-b720-edc46dbfee2d", "7031b36a-bd52-4640-a091-449d1702caa3", "7cc9f9f9-1a31-46a1-910f-46ad9015b5ac", "d682d080-9d5f-4ad8-9fec-d21db46e4f3a", "7d16eae9-5d94-4cb5-ada9-b8f75a1df9f6", "bc7fd634-5072-4641-b36c-4704807e60d7", "2edf7357-8a20-4ec5-be53-da88618e14f3", "fb802d58-bdad-4a89-aa15-abd558f97a93", "0a0eb84f-613b-47c4-b8a2-aa24a7b3a08e", "663ae923-1e37-4450-acbc-98236f9bd120", "7e6c4cdb-f7e0-4dc3-b1be-625d7230f989", "c84e5aab-9a93-4b78-82c8-98a7fb97d3d9", "f730a413-5741-41c4-bfa8-f88d7045f3aa", "f329d904-636d-49d9-b251-df5ca7c5a578", "3950aa53-6220-47c5-b19b-127a875ce9d5" ] + "variables" : [ "rgnemv_0d844955bd37", "ns0b03701968", "nse5d368290c", "stg328161738", "eh85878709e9", "eh0c329685b9" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHubEvents.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHubEvents.json index 99cf26d5a1996..bbdc906b60e73 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHubEvents.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHubEvents.json @@ -1,1123 +1,1628 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgevhbb2f4031237a7751b?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgevhb05f3496656b8b?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:37:31 GMT", + "date" : "Fri, 28 Aug 2020 06:01:30 GMT", "content-length" : "325", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "76de8b6a-b011-4b92-9c40-bd79cce5dcd2", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9c481e31-72bc-4f27-84f3-bf3df3b659fa", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T113731Z:76de8b6a-b011-4b92-9c40-bd79cce5dcd2", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060131Z:9c481e31-72bc-4f27-84f3-bf3df3b659fa", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "76de8b6a-b011-4b92-9c40-bd79cce5dcd2", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b\",\"name\":\"rgevhbb2f4031237a7751b\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2019-11-15T11:37:27.090Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + "x-ms-request-id" : "9c481e31-72bc-4f27-84f3-bf3df3b659fa", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b\",\"name\":\"rgevhb05f3496656b8b\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-28T06:01:27.477412700Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:37:36 GMT", + "date" : "Fri, 28 Aug 2020 06:01:41 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "1435", - "vary" : "Accept-Encoding", + "content-length" : "1753", "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "80073468-2ebb-4971-b28a-61c994945801", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4f2ca2f7-799a-4245-add0-7dff2e07d3c2", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T113737Z:4f2ca2f7-799a-4245-add0-7dff2e07d3c2", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060141Z:80073468-2ebb-4971-b28a-61c994945801", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25/operationResults/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563/operationResults/124436f6-a662-4113-9786-ada6e9db8c92?api-version=2019-08-01", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "af679c9c-868d-42c4-bf81-fdfb8d5634bf", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25\",\"name\":\"nsa0d23658d1a8d1ec25\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"properties\":{\"provisioningState\":\"Initializing\",\"ipRangeFilter\":\"\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Initializing\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Initializing\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Initializing\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[]}}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01" + "x-ms-request-id" : "124436f6-a662-4113-9786-ada6e9db8c92", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/124436f6-a662-4113-9786-ada6e9db8c92?api-version=2019-08-01" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:37:37 GMT", + "date" : "Fri, 28 Aug 2020 06:02:12 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1753", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "280af9b0-2b41-4d62-a151-3ff07de08185", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e2960b4d-a785-444a-9bc8-a03836f3ff47", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T113737Z:e2960b4d-a785-444a-9bc8-a03836f3ff47", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060212Z:280af9b0-2b41-4d62-a151-3ff07de08185", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "e2960b4d-a785-444a-9bc8-a03836f3ff47", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "280af9b0-2b41-4d62-a151-3ff07de08185", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:38:07 GMT", + "date" : "Fri, 28 Aug 2020 06:02:42 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1753", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cb216361-8ddc-4cae-98ca-58b0fc55ba30", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "438b8d63-079a-4c50-b11e-03c68dd2e535", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T113807Z:438b8d63-079a-4c50-b11e-03c68dd2e535", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060243Z:cb216361-8ddc-4cae-98ca-58b0fc55ba30", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "438b8d63-079a-4c50-b11e-03c68dd2e535", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "cb216361-8ddc-4cae-98ca-58b0fc55ba30", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:38:39 GMT", + "date" : "Fri, 28 Aug 2020 06:03:13 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1753", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f2a96bbf-a33f-4ff9-a36b-43e10442cae3", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "6346bd36-fbab-4278-be60-3dbb32402006", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T113839Z:6346bd36-fbab-4278-be60-3dbb32402006", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060314Z:f2a96bbf-a33f-4ff9-a36b-43e10442cae3", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "6346bd36-fbab-4278-be60-3dbb32402006", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "f2a96bbf-a33f-4ff9-a36b-43e10442cae3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:39:10 GMT", + "date" : "Fri, 28 Aug 2020 06:03:44 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1753", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4a8bd40b-848a-4527-9a31-320debb19a55", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3ae4da95-a0d9-4440-a3f0-0ace7a4eb7bb", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T113910Z:3ae4da95-a0d9-4440-a3f0-0ace7a4eb7bb", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060344Z:4a8bd40b-848a-4527-9a31-320debb19a55", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "3ae4da95-a0d9-4440-a3f0-0ace7a4eb7bb", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "4a8bd40b-848a-4527-9a31-320debb19a55", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:39:40 GMT", + "date" : "Fri, 28 Aug 2020 06:04:14 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1753", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a4c1154e-598a-4655-a475-bac9b8908c41", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fb5f0025-f4c8-452c-918d-85a841578b44", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T113941Z:fb5f0025-f4c8-452c-918d-85a841578b44", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060415Z:a4c1154e-598a-4655-a475-bac9b8908c41", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "fb5f0025-f4c8-452c-918d-85a841578b44", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "a4c1154e-598a-4655-a475-bac9b8908c41", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:40:10 GMT", + "date" : "Fri, 28 Aug 2020 06:04:46 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1753", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d7ad6340-108c-4705-af48-37af97971f59", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5d3e5ca2-23d2-45a2-a734-ed9d13fdab02", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114011Z:5d3e5ca2-23d2-45a2-a734-ed9d13fdab02", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060446Z:d7ad6340-108c-4705-af48-37af97971f59", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "5d3e5ca2-23d2-45a2-a734-ed9d13fdab02", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "d7ad6340-108c-4705-af48-37af97971f59", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:40:41 GMT", + "date" : "Fri, 28 Aug 2020 06:05:16 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1753", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3f892e9f-88e4-46c1-97ee-e93aca67a7d8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a5da014e-42a9-4940-b968-43b146b8370c", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114041Z:a5da014e-42a9-4940-b968-43b146b8370c", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060516Z:3f892e9f-88e4-46c1-97ee-e93aca67a7d8", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "a5da014e-42a9-4940-b968-43b146b8370c", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "3f892e9f-88e4-46c1-97ee-e93aca67a7d8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:41:11 GMT", + "date" : "Fri, 28 Aug 2020 06:05:46 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5f57c13e-618f-4851-a7fb-2784f3253357", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d67db21f-3884-4860-ac57-64fd149f46c0", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114112Z:d67db21f-3884-4860-ac57-64fd149f46c0", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060547Z:5f57c13e-618f-4851-a7fb-2784f3253357", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "d67db21f-3884-4860-ac57-64fd149f46c0", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "5f57c13e-618f-4851-a7fb-2784f3253357", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:41:42 GMT", + "date" : "Fri, 28 Aug 2020 06:06:17 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b242c0fe-7053-4814-84c5-fd2bd86ee279", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e8029110-c485-444b-98c8-764c37ce24f6", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114143Z:e8029110-c485-444b-98c8-764c37ce24f6", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060617Z:b242c0fe-7053-4814-84c5-fd2bd86ee279", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "e8029110-c485-444b-98c8-764c37ce24f6", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "b242c0fe-7053-4814-84c5-fd2bd86ee279", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:42:13 GMT", + "date" : "Fri, 28 Aug 2020 06:06:47 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d3cd0d00-029f-4b8d-9ac4-d67448eed997", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b347aa37-cea6-4dc0-9dd9-ceb42eed6e25", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114213Z:b347aa37-cea6-4dc0-9dd9-ceb42eed6e25", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060647Z:d3cd0d00-029f-4b8d-9ac4-d67448eed997", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "b347aa37-cea6-4dc0-9dd9-ceb42eed6e25", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "d3cd0d00-029f-4b8d-9ac4-d67448eed997", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:42:43 GMT", + "date" : "Fri, 28 Aug 2020 06:07:18 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f7849dde-4f69-401f-84d3-cb4c283e5eb7", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b01861f2-cb3c-4ebf-99d2-0772ec5b9988", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114244Z:b01861f2-cb3c-4ebf-99d2-0772ec5b9988", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060718Z:f7849dde-4f69-401f-84d3-cb4c283e5eb7", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "b01861f2-cb3c-4ebf-99d2-0772ec5b9988", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "f7849dde-4f69-401f-84d3-cb4c283e5eb7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:43:13 GMT", + "date" : "Fri, 28 Aug 2020 06:07:48 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7102d9b0-3ccc-419e-b230-8864ebd8a4b0", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060748Z:7102d9b0-3ccc-419e-b230-8864ebd8a4b0", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "7102d9b0-3ccc-419e-b230-8864ebd8a4b0", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:08:19 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "1990", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11988", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "95afb05b-a277-4d93-bb67-2d1a4d14fae5", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3bc2d497-c9ce-4412-b504-b9f3dc5874b2", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114314Z:3bc2d497-c9ce-4412-b504-b9f3dc5874b2", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060819Z:95afb05b-a277-4d93-bb67-2d1a4d14fae5", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "3bc2d497-c9ce-4412-b504-b9f3dc5874b2", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "95afb05b-a277-4d93-bb67-2d1a4d14fae5", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:43:44 GMT", + "date" : "Fri, 28 Aug 2020 06:08:48 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "19973904-8869-47cb-8fa2-84a1f2ca5d03", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ca4906ba-aa9b-4522-8ed4-114dc01c39a3", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114344Z:ca4906ba-aa9b-4522-8ed4-114dc01c39a3", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060849Z:19973904-8869-47cb-8fa2-84a1f2ca5d03", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "ca4906ba-aa9b-4522-8ed4-114dc01c39a3", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "19973904-8869-47cb-8fa2-84a1f2ca5d03", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:44:14 GMT", + "date" : "Fri, 28 Aug 2020 06:09:19 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "143f93f5-fe56-49c3-aa7d-7f7d4d2e2e6b", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "0e5f7a44-a920-4f5a-8a32-06d0c66f47ff", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114414Z:0e5f7a44-a920-4f5a-8a32-06d0c66f47ff", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060919Z:143f93f5-fe56-49c3-aa7d-7f7d4d2e2e6b", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "0e5f7a44-a920-4f5a-8a32-06d0c66f47ff", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "143f93f5-fe56-49c3-aa7d-7f7d4d2e2e6b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:44:44 GMT", + "date" : "Fri, 28 Aug 2020 06:09:49 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5387be79-efa7-4c18-8dae-0013c55510a4", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4b0852db-8fc8-4c31-b50e-49f069ceae4d", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114445Z:4b0852db-8fc8-4c31-b50e-49f069ceae4d", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060950Z:5387be79-efa7-4c18-8dae-0013c55510a4", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "4b0852db-8fc8-4c31-b50e-49f069ceae4d", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "5387be79-efa7-4c18-8dae-0013c55510a4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:45:15 GMT", + "date" : "Fri, 28 Aug 2020 06:10:20 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "1990", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11984", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "66e645a5-b53f-4452-9747-acf97a0d7029", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c3cd0b68-7b3c-451d-b604-421f839ad1a5", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114516Z:c3cd0b68-7b3c-451d-b604-421f839ad1a5", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061020Z:66e645a5-b53f-4452-9747-acf97a0d7029", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "c3cd0b68-7b3c-451d-b604-421f839ad1a5", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "66e645a5-b53f-4452-9747-acf97a0d7029", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:45:48 GMT", + "date" : "Fri, 28 Aug 2020 06:10:49 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b799cbe3-7423-4cd8-8035-3816cfe2f9bc", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061050Z:b799cbe3-7423-4cd8-8035-3816cfe2f9bc", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "b799cbe3-7423-4cd8-8035-3816cfe2f9bc", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:11:20 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "fdbce81e-0b65-4934-8f93-c4180b30cd61", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061121Z:fdbce81e-0b65-4934-8f93-c4180b30cd61", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "fdbce81e-0b65-4934-8f93-c4180b30cd61", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:11:51 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11983", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "43387a2c-7927-4138-b72f-9488c668e58b", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061151Z:43387a2c-7927-4138-b72f-9488c668e58b", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "43387a2c-7927-4138-b72f-9488c668e58b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:12:21 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b5e64464-bb59-4c9d-836d-edcea67577b4", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9663f864-132a-460c-993f-ed922354bc60", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114548Z:9663f864-132a-460c-993f-ed922354bc60", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061221Z:b5e64464-bb59-4c9d-836d-edcea67577b4", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "9663f864-132a-460c-993f-ed922354bc60", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "b5e64464-bb59-4c9d-836d-edcea67577b4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:46:19 GMT", + "date" : "Fri, 28 Aug 2020 06:12:52 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "95d40ea2-058f-44ea-aaa0-71aa73cec98f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061252Z:95d40ea2-058f-44ea-aaa0-71aa73cec98f", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "95d40ea2-058f-44ea-aaa0-71aa73cec98f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:13:22 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11982", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a0bcaf4e-06e1-468a-8599-a1aa8ce284bc", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061323Z:a0bcaf4e-06e1-468a-8599-a1aa8ce284bc", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "a0bcaf4e-06e1-468a-8599-a1aa8ce284bc", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:13:53 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "73455419-2642-4f66-8b94-173d66a5fa82", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061354Z:73455419-2642-4f66-8b94-173d66a5fa82", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "73455419-2642-4f66-8b94-173d66a5fa82", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:14:23 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3d2c82ae-cbf2-418a-b865-046a817b60d8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "80d08ea8-b46c-47b5-aca6-8681beb306c3", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114619Z:80d08ea8-b46c-47b5-aca6-8681beb306c3", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061424Z:3d2c82ae-cbf2-418a-b865-046a817b60d8", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "80d08ea8-b46c-47b5-aca6-8681beb306c3", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "3d2c82ae-cbf2-418a-b865-046a817b60d8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:46:49 GMT", + "date" : "Fri, 28 Aug 2020 06:14:54 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2015", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11981", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "63abfff0-2802-4f83-8545-8cd5f96b3667", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061454Z:63abfff0-2802-4f83-8545-8cd5f96b3667", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "63abfff0-2802-4f83-8545-8cd5f96b3667", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:15:25 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11975", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0ae1cc59-d4bf-4e9d-9c61-839a5d0ab5d0", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061526Z:0ae1cc59-d4bf-4e9d-9c61-839a5d0ab5d0", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "0ae1cc59-d4bf-4e9d-9c61-839a5d0ab5d0", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:15:56 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f8bd18b2-a4c3-499d-82f6-809c43faf5e3", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fbb052b3-5bb5-4ea4-ad0d-f21f09dfda9c", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114649Z:fbb052b3-5bb5-4ea4-ad0d-f21f09dfda9c", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061556Z:f8bd18b2-a4c3-499d-82f6-809c43faf5e3", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "fbb052b3-5bb5-4ea4-ad0d-f21f09dfda9c", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "f8bd18b2-a4c3-499d-82f6-809c43faf5e3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:47:20 GMT", + "date" : "Fri, 28 Aug 2020 06:16:26 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2015", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11980", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cd6290b6-b9eb-43e1-a881-479099a28214", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061626Z:cd6290b6-b9eb-43e1-a881-479099a28214", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "cd6290b6-b9eb-43e1-a881-479099a28214", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:16:57 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2015", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "61a1998e-ac42-41ff-b182-2967d47443fd", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061657Z:61a1998e-ac42-41ff-b182-2967d47443fd", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "61a1998e-ac42-41ff-b182-2967d47443fd", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:01:38.1802154Z\"},\"properties\":{\"provisioningState\":\"Creating\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Creating\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:17:27 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2459", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "131f1038-419c-42ce-862f-ad7065484428", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e5cea504-5684-48ba-8360-34a809d608f1", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114720Z:e5cea504-5684-48ba-8360-34a809d608f1", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061727Z:131f1038-419c-42ce-862f-ad7065484428", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "e5cea504-5684-48ba-8360-34a809d608f1", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "131f1038-419c-42ce-862f-ad7065484428", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"failoverPriority\":1}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:47:49 GMT", + "date" : "Fri, 28 Aug 2020 06:17:27 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2459", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11979", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1e72fb21-da57-45f1-a895-87d696a8048d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8a083724-36da-4be7-bc7b-56d7822b8baf", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114750Z:8a083724-36da-4be7-bc7b-56d7822b8baf", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061728Z:1e72fb21-da57-45f1-a895-87d696a8048d", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "8a083724-36da-4be7-bc7b-56d7822b8baf", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "1e72fb21-da57-45f1-a895-87d696a8048d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"failoverPriority\":1}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:48:21 GMT", + "date" : "Fri, 28 Aug 2020 06:17:57 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2459", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "x-ms-ratelimit-remaining-subscription-reads" : "11973", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ddc1033e-3f69-4b27-8377-f2e0e23b6906", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "6e2a6a43-0633-43bd-88aa-edbdc1f259e6", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114821Z:6e2a6a43-0633-43bd-88aa-edbdc1f259e6", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061758Z:ddc1033e-3f69-4b27-8377-f2e0e23b6906", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "6e2a6a43-0633-43bd-88aa-edbdc1f259e6", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "ddc1033e-3f69-4b27-8377-f2e0e23b6906", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"failoverPriority\":1}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:48:52 GMT", + "date" : "Fri, 28 Aug 2020 06:18:27 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2459", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "03717043-e396-43fa-abc8-46877b5c7b9d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "99bd1e62-171e-4b13-936f-c0d161934ad1", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114852Z:99bd1e62-171e-4b13-936f-c0d161934ad1", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061828Z:03717043-e396-43fa-abc8-46877b5c7b9d", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "99bd1e62-171e-4b13-936f-c0d161934ad1", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "03717043-e396-43fa-abc8-46877b5c7b9d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"failoverPriority\":1}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:49:22 GMT", + "date" : "Fri, 28 Aug 2020 06:18:58 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2459", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7e37f5bb-d366-4e0a-a92e-e7939a028818", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "590af619-5716-4fd1-bc7e-debad4c76ba8", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114922Z:590af619-5716-4fd1-bc7e-debad4c76ba8", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061859Z:7e37f5bb-d366-4e0a-a92e-e7939a028818", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "590af619-5716-4fd1-bc7e-debad4c76ba8", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "7e37f5bb-d366-4e0a-a92e-e7939a028818", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"failoverPriority\":1}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:49:51 GMT", + "date" : "Fri, 28 Aug 2020 06:19:29 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2459", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11975", + "x-ms-ratelimit-remaining-subscription-reads" : "11972", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3e9415b0-0bc0-4ac0-a3a7-22ae9097fa1e", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a6e13e79-c5b8-493d-9f1e-6e103dc263a4", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T114952Z:a6e13e79-c5b8-493d-9f1e-6e103dc263a4", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061929Z:3e9415b0-0bc0-4ac0-a3a7-22ae9097fa1e", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "a6e13e79-c5b8-493d-9f1e-6e103dc263a4", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "3e9415b0-0bc0-4ac0-a3a7-22ae9097fa1e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"provisioningState\":\"Creating\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0},{\"id\":\"nsf1493750fdd5563-centralus\",\"locationName\":\"Central US\",\"failoverPriority\":1}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:50:22 GMT", + "date" : "Fri, 28 Aug 2020 06:19:59 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2091", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "53f46da0-97d7-4a47-b633-f74727d900b2", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a3114ce9-2ffb-4271-9ef3-4eb0cef0c64f", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115023Z:a3114ce9-2ffb-4271-9ef3-4eb0cef0c64f", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T061959Z:53f46da0-97d7-4a47-b633-f74727d900b2", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "a3114ce9-2ffb-4271-9ef3-4eb0cef0c64f", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "53f46da0-97d7-4a47-b633-f74727d900b2", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:50:52 GMT", + "date" : "Fri, 28 Aug 2020 06:20:29 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "32", - "vary" : "Accept-Encoding", + "content-length" : "2091", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11973", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "80790310-e976-442e-8811-76cb484a2fcf", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "51e3c06a-5e50-4d5e-a39a-d4f06f629a44", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115053Z:51e3c06a-5e50-4d5e-a39a-d4f06f629a44", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062030Z:80790310-e976-442e-8811-76cb484a2fcf", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "51e3c06a-5e50-4d5e-a39a-d4f06f629a44", - "Body" : "{\"status\":\"Dequeued\",\"error\":{}}" + "x-ms-request-id" : "80790310-e976-442e-8811-76cb484a2fcf", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:51:22 GMT", + "date" : "Fri, 28 Aug 2020 06:21:01 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "33", - "vary" : "Accept-Encoding", + "content-length" : "2091", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11972", + "x-ms-ratelimit-remaining-subscription-reads" : "11971", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b7783e32-2edf-4487-99be-35693488506a", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "721f3d17-7c18-485e-81c3-f4ea6274b470", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115123Z:721f3d17-7c18-485e-81c3-f4ea6274b470", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/af679c9c-868d-42c4-bf81-fdfb8d5634bf?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062101Z:b7783e32-2edf-4487-99be-35693488506a", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "721f3d17-7c18-485e-81c3-f4ea6274b470", - "Body" : "{\"status\":\"Succeeded\",\"error\":{}}" + "x-ms-request-id" : "b7783e32-2edf-4487-99be-35693488506a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:51:23 GMT", + "date" : "Fri, 28 Aug 2020 06:21:31 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2318", - "vary" : "Accept-Encoding", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "55ffe548-98fd-4a0f-92d9-455c04068f86", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062132Z:55ffe548-98fd-4a0f-92d9-455c04068f86", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "55ffe548-98fd-4a0f-92d9-455c04068f86", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:22:02 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11971", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "aa8bba5f-6033-4270-b674-dd7b48e42866", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "25bc45bf-e61f-46d1-ad29-8511d76bcab4", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115124Z:25bc45bf-e61f-46d1-ad29-8511d76bcab4", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062202Z:aa8bba5f-6033-4270-b674-dd7b48e42866", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "25bc45bf-e61f-46d1-ad29-8511d76bcab4", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25\",\"name\":\"nsa0d23658d1a8d1ec25\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25.documents.azure.com:443/\",\"ipRangeFilter\":\"\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsa0d23658d1a8d1ec25-centralus\",\"locationName\":\"Central US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-centralus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsa0d23658d1a8d1ec25-centralus\",\"locationName\":\"Central US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-centralus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"failoverPriority\":0},{\"id\":\"nsa0d23658d1a8d1ec25-centralus\",\"locationName\":\"Central US\",\"failoverPriority\":1}],\"cors\":[],\"capabilities\":[]}}" + "x-ms-request-id" : "aa8bba5f-6033-4270-b674-dd7b48e42866", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:51:23 GMT", + "date" : "Fri, 28 Aug 2020 06:22:33 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2318", - "vary" : "Accept-Encoding", + "content-length" : "2091", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11970", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6f7f306e-883d-418a-b08d-ce5652d80076", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c8d57c06-f7c3-481f-8d66-8872c04f531a", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115124Z:c8d57c06-f7c3-481f-8d66-8872c04f531a", - "x-ms-gatewayversion" : "version=2.7.0", - "content-location" : "https://management.documents.azure.com:450/subscriptions/1c638cf4-608f-4ee6-b680-c329e824c3a8/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062234Z:6f7f306e-883d-418a-b08d-ce5652d80076", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "c8d57c06-f7c3-481f-8d66-8872c04f531a", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25\",\"name\":\"nsa0d23658d1a8d1ec25\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25.documents.azure.com:443/\",\"ipRangeFilter\":\"\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsa0d23658d1a8d1ec25-centralus\",\"locationName\":\"Central US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-centralus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false},{\"id\":\"nsa0d23658d1a8d1ec25-centralus\",\"locationName\":\"Central US\",\"documentEndpoint\":\"https://nsa0d23658d1a8d1ec25-centralus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":1,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsa0d23658d1a8d1ec25-westus\",\"locationName\":\"West US\",\"failoverPriority\":0},{\"id\":\"nsa0d23658d1a8d1ec25-centralus\",\"locationName\":\"Central US\",\"failoverPriority\":1}],\"cors\":[],\"capabilities\":[]}}" + "x-ms-request-id" : "6f7f306e-883d-418a-b08d-ce5652d80076", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { - "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25/listKeys?api-version=2019-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:51:25 GMT", + "date" : "Fri, 28 Aug 2020 06:23:03 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "461", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f6ebcdc3-5f28-4705-a858-24222654af3d", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062304Z:f6ebcdc3-5f28-4705-a858-24222654af3d", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "f6ebcdc3-5f28-4705-a858-24222654af3d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:23:36 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11970", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0773aa1e-52b6-48c3-82c2-3ea977ac3ea7", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d8fc9097-4128-4194-85af-07fd25840b8d", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115125Z:d8fc9097-4128-4194-85af-07fd25840b8d", - "x-ms-gatewayversion" : "version=2.7.0", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062336Z:0773aa1e-52b6-48c3-82c2-3ea977ac3ea7", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "d8fc9097-4128-4194-85af-07fd25840b8d", - "Body" : "{\"primaryMasterKey\":\"ci6vsQPSIHEhRN5PICmODAcu4gysTzTzoPdtHLF0F869gp8o7fd5TNziEsoaG3FoozF1CwuEofbDcEkeCEzsXw==\",\"secondaryMasterKey\":\"iRS2s7ZIxhEEObKFrJoBWrT0UarRxiacyJp5DE7esIIuZOom5o1y70qDi9LIsXV8EGuw9DylbywFr2tQwk9D0w==\",\"primaryReadonlyMasterKey\":\"9i4Lub6MMzen4H9aCgGV8GUWOvfNTY1YZG9GDzkNNzWGBtBUc968xzhW5TH3lLBqqayltIeEcoy2YD5mXompjA==\",\"secondaryReadonlyMasterKey\":\"s9imgcyNqiNvgSVMtY3jk5n3NaQm2KqodZRNrllkNh7hvc1BpaIwcCt2x6GfYFcZB7hOgXTUWgGLiDOjAgvvoQ==\"}" + "x-ms-request-id" : "0773aa1e-52b6-48c3-82c2-3ea977ac3ea7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:24:06 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11969", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "eca307ac-6f0a-4438-b2f5-ccc2bd46e169", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062406Z:eca307ac-6f0a-4438-b2f5-ccc2bd46e169", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "eca307ac-6f0a-4438-b2f5-ccc2bd46e169", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:24:36 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "394444ac-b0b2-4c6f-be8a-afd82e6cb916", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062437Z:394444ac-b0b2-4c6f-be8a-afd82e6cb916", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "394444ac-b0b2-4c6f-be8a-afd82e6cb916", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:25:06 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11969", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "336093b6-3d4f-4b59-a7bd-ee2bc87a1896", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062507Z:336093b6-3d4f-4b59-a7bd-ee2bc87a1896", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "336093b6-3d4f-4b59-a7bd-ee2bc87a1896", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:25:37 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11968", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a2e67f51-90a2-4582-ac4e-5332c6929325", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062537Z:a2e67f51-90a2-4582-ac4e-5332c6929325", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "a2e67f51-90a2-4582-ac4e-5332c6929325", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:26:08 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "27700088-2a89-4ae8-b14c-b52abbe5aeb3", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062608Z:27700088-2a89-4ae8-b14c-b52abbe5aeb3", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "27700088-2a89-4ae8-b14c-b52abbe5aeb3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:26:38 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11968", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "66dcedaf-f9bb-4cad-9cf1-6cfb039ac716", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062639Z:66dcedaf-f9bb-4cad-9cf1-6cfb039ac716", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "66dcedaf-f9bb-4cad-9cf1-6cfb039ac716", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:27:10 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11967", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "fd6caa63-fba3-4907-b7b6-2e4094886f12", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062710Z:fd6caa63-fba3-4907-b7b6-2e4094886f12", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "fd6caa63-fba3-4907-b7b6-2e4094886f12", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Fri, 28 Aug 2020 06:27:40 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2091", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3251f17f-48b1-47b7-b9fa-b60782a34c62", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062741Z:3251f17f-48b1-47b7-b9fa-b60782a34c62", + "x-ms-gatewayversion" : "version=2.11.0", + "content-location" : "https://management.documents.azure.com:450/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563?api-version=2019-08-01", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "3251f17f-48b1-47b7-b9fa-b60782a34c62", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"location\":\"East US\",\"type\":\"Microsoft.DocumentDB/databaseAccounts\",\"kind\":\"MongoDB\",\"tags\":{},\"systemData\":{\"createdAt\":\"2020-08-28T06:17:00.1760491Z\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"documentEndpoint\":\"https://nsf1493750fdd5563.documents.azure.com:443/\",\"enableAutomaticFailover\":false,\"enableMultipleWriteLocations\":false,\"enablePartitionKeyMonitor\":false,\"isVirtualNetworkFilterEnabled\":false,\"virtualNetworkRules\":[],\"EnabledApiTypes\":\"MongoDB\",\"disableKeyBasedMetadataWriteAccess\":false,\"enableFreeTier\":false,\"enableAnalyticalStorage\":false,\"instanceId\":\"c06288fe-2faa-47ca-8bd5-cf0ab33927eb\",\"createMode\":\"Default\",\"databaseAccountOfferType\":\"Standard\",\"enableCassandraConnector\":false,\"connectorOffer\":\"\",\"ipRangeFilter\":\"\",\"consistencyPolicy\":{\"defaultConsistencyLevel\":\"Eventual\",\"maxIntervalInSeconds\":5,\"maxStalenessPrefix\":100},\"apiProperties\":{\"serverVersion\":\"3.2\"},\"configurationOverrides\":{\"EnableBsonSchema\":\"True\"},\"writeLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"readLocations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"locations\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"documentEndpoint\":\"https://nsf1493750fdd5563-westus.documents.azure.com:443/\",\"provisioningState\":\"Succeeded\",\"failoverPriority\":0,\"isZoneRedundant\":false}],\"failoverPolicies\":[{\"id\":\"nsf1493750fdd5563-westus\",\"locationName\":\"West US\",\"failoverPriority\":0}],\"cors\":[],\"capabilities\":[],\"backupPolicy\":{\"type\":\"Periodic\",\"periodicModeProperties\":{\"backupIntervalInMinutes\":240,\"backupRetentionIntervalInHours\":8}}}}" } }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25/readonlykeys?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563/listKeys?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (CosmosDB)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:51:25 GMT", + "date" : "Fri, 28 Aug 2020 06:27:42 GMT", "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "239", - "vary" : "Accept-Encoding", + "content-length" : "461", "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9991f294-4128-484f-b6e3-f7d9b1185201", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9a80e5c4-6451-4ad3-b116-78002f0217bb", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115125Z:9a80e5c4-6451-4ad3-b116-78002f0217bb", - "x-ms-gatewayversion" : "version=2.7.0", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062743Z:9991f294-4128-484f-b6e3-f7d9b1185201", + "x-ms-gatewayversion" : "version=2.11.0", "content-type" : "application/json", "cache-control" : "no-store, no-cache", - "x-ms-request-id" : "9a80e5c4-6451-4ad3-b116-78002f0217bb", - "Body" : "{\"primaryReadonlyMasterKey\":\"9i4Lub6MMzen4H9aCgGV8GUWOvfNTY1YZG9GDzkNNzWGBtBUc968xzhW5TH3lLBqqayltIeEcoy2YD5mXompjA==\",\"secondaryReadonlyMasterKey\":\"s9imgcyNqiNvgSVMtY3jk5n3NaQm2KqodZRNrllkNh7hvc1BpaIwcCt2x6GfYFcZB7hOgXTUWgGLiDOjAgvvoQ==\"}" + "x-ms-request-id" : "9991f294-4128-484f-b6e3-f7d9b1185201", + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25?api-version=2017-04-01", + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563/readonlykeys?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.cosmos/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:51:30 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "688", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "vary" : "Accept-Encoding", + "date" : "Fri, 28 Aug 2020 06:27:43 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "239", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4b599eba-4110-4ab3-8655-889b98ecb2cf", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "212fc1c3-70de-4592-b7e9-ed04d26f741c", "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115130Z:212fc1c3-70de-4592-b7e9-ed04d26f741c", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "73e902e3-fab3-401f-b95b-21ec7523ac91_M1CH3_M1CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25\",\"name\":\"nsa0d23658d1a8d1ec25\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsa0d23658d1a8d1ec25\",\"createdAt\":\"2019-11-15T11:51:29.493Z\",\"updatedAt\":\"2019-11-15T11:51:29.493Z\",\"serviceBusEndpoint\":\"https://nsa0d23658d1a8d1ec25.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062743Z:4b599eba-4110-4ab3-8655-889b98ecb2cf", + "x-ms-gatewayversion" : "version=2.11.0", + "content-type" : "application/json", + "cache-control" : "no-store, no-cache", + "x-ms-request-id" : "4b599eba-4110-4ab3-8655-889b98ecb2cf", + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25?api-version=2017-04-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:51:32 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "688", + "date" : "Fri, 28 Aug 2020 06:27:52 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "671", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11969", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "df30da25-6aa4-42d3-af5c-e5cc8cafe85a", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "deb0b3f9-8d0d-4a8e-80f0-0a0f8010c140", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115132Z:deb0b3f9-8d0d-4a8e-80f0-0a0f8010c140", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062752Z:df30da25-6aa4-42d3-af5c-e5cc8cafe85a", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "f627a3af-7621-429d-9e7e-71f0b613e9d2_M1CH3_M1CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25\",\"name\":\"nsa0d23658d1a8d1ec25\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsa0d23658d1a8d1ec25\",\"createdAt\":\"2019-11-15T11:51:29.493Z\",\"updatedAt\":\"2019-11-15T11:51:29.493Z\",\"serviceBusEndpoint\":\"https://nsa0d23658d1a8d1ec25.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "f0dca823-0548-46c9-82ac-117aea9afd6e_M4CH3_M4CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsf1493750fdd5563\",\"createdAt\":\"2020-08-28T06:27:50.01Z\",\"updatedAt\":\"2020-08-28T06:27:50.01Z\",\"serviceBusEndpoint\":\"https://nsf1493750fdd5563.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:52:01 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "688", + "date" : "Fri, 28 Aug 2020 06:28:23 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "671", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11968", + "x-ms-ratelimit-remaining-subscription-reads" : "11967", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "edba00f6-7016-4a5c-b39b-6e0bf38eca8f", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "31f77fbc-4ea1-47e8-8e50-65f9b350d00a", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115202Z:31f77fbc-4ea1-47e8-8e50-65f9b350d00a", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062824Z:edba00f6-7016-4a5c-b39b-6e0bf38eca8f", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "afa860fa-0efa-475c-9ca8-c38dac3f41b0_M2CH3_M2CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25\",\"name\":\"nsa0d23658d1a8d1ec25\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsa0d23658d1a8d1ec25\",\"createdAt\":\"2019-11-15T11:51:29.493Z\",\"updatedAt\":\"2019-11-15T11:51:29.493Z\",\"serviceBusEndpoint\":\"https://nsa0d23658d1a8d1ec25.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "d5f155ab-e6a9-4a93-947f-072863464b08_M8CH3_M8CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsf1493750fdd5563\",\"createdAt\":\"2020-08-28T06:27:50.01Z\",\"updatedAt\":\"2020-08-28T06:27:50.01Z\",\"serviceBusEndpoint\":\"https://nsf1493750fdd5563.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:52:32 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "686", + "date" : "Fri, 28 Aug 2020 06:28:54 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "670", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11967", + "x-ms-ratelimit-remaining-subscription-reads" : "11966", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7c612437-0e82-4605-b6a5-5bf52c8e8d2a", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3b793ae1-aa80-4b44-be11-0602d2c14135", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115232Z:3b793ae1-aa80-4b44-be11-0602d2c14135", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062854Z:7c612437-0e82-4605-b6a5-5bf52c8e8d2a", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "fa0205b6-236a-4da2-ba91-c9aea4c98a6e_M9CH3_M9CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25\",\"name\":\"nsa0d23658d1a8d1ec25\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsa0d23658d1a8d1ec25\",\"createdAt\":\"2019-11-15T11:51:29.493Z\",\"updatedAt\":\"2019-11-15T11:52:15.553Z\",\"serviceBusEndpoint\":\"https://nsa0d23658d1a8d1ec25.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + "x-ms-request-id" : "cdea6a07-7d1c-46f3-8ec5-74bdf40f7fa6_M5CH3_M5CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563\",\"name\":\"nsf1493750fdd5563\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsf1493750fdd5563\",\"createdAt\":\"2020-08-28T06:27:50.01Z\",\"updatedAt\":\"2020-08-28T06:28:38.293Z\",\"serviceBusEndpoint\":\"https://nsf1493750fdd5563.servicebus.windows.net:443/\",\"status\":\"Active\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25/eventhubs/FirstEventHub?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563/eventhubs/FirstEventHub?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:52:36 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "465", + "date" : "Fri, 28 Aug 2020 06:28:57 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "459", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6ec72501-1ed0-40c4-a9a9-f40ca9f84352", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b6d41794-4ec2-4b80-9565-303e585f97de", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115237Z:b6d41794-4ec2-4b80-9565-303e585f97de", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062858Z:6ec72501-1ed0-40c4-a9a9-f40ca9f84352", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "9e68b9f2-e747-4eaa-82c7-dbba88a64acc_M1CH3_M1CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25/eventhubs/FirstEventHub\",\"name\":\"FirstEventHub\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2019-11-15T11:52:36.127Z\",\"updatedAt\":\"2019-11-15T11:52:36.47Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + "x-ms-request-id" : "486d5173-c3c1-44b9-8642-04e07b6b8978_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563/eventhubs/FirstEventHub\",\"name\":\"FirstEventHub\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"East US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:28:57.417Z\",\"updatedAt\":\"2020-08-28T06:28:57.94Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25/AuthorizationRules/RootManageSharedAccessKey?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563/authorizationRules/RootManageSharedAccessKey?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:52:38 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "369", + "date" : "Fri, 28 Aug 2020 06:28:59 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "363", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "vary" : "Accept-Encoding", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11966", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d07bd760-2832-4da3-aa4b-e6de6d829979", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3fb48e49-137d-41ad-82d7-9124930c6921", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115239Z:3fb48e49-137d-41ad-82d7-9124930c6921", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062859Z:d07bd760-2832-4da3-aa4b-e6de6d829979", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "bb187aa6-5d2d-4d14-9244-67114ffe2f13_M9CH3_M9CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}" + "x-ms-request-id" : "1a9ebefc-e2ad-4cec-b1dd-eba06baba05c_M7CH3_M7CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.DocumentDB/databaseAccounts/nsa0d23658d1a8d1ec25/providers/microsoft.insights/diagnosticSettings/DiaEventHub?api-version=2017-05-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.DocumentDB/databaseAccounts/nsf1493750fdd5563/providers/microsoft.insights/diagnosticSettings/DiaEventHub?api-version=2017-05-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (MonitorManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.monitor/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:52:45 GMT", + "date" : "Fri, 28 Aug 2020 06:29:07 GMT", "server" : "Microsoft-IIS/10.0", - "content-length" : "997", + "content-length" : "985", "expires" : "-1", - "vary" : "Accept-Encoding", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a5d3e734-6108-4b42-af83-fc5e1b1e3632", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "0552edad-125d-436a-aa49-141ed3b54573", "x-content-type-options" : "nosniff", "x-ms-ratelimit-remaining-subscription-resource-requests" : "149", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115245Z:0552edad-125d-436a-aa49-141ed3b54573", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062907Z:a5d3e734-6108-4b42-af83-fc5e1b1e3632", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "b9d918b2-664e-43cd-9aa8-79322b462243", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgevhbb2f4031237a7751b/providers/microsoft.documentdb/databaseaccounts/nsa0d23658d1a8d1ec25/providers/microsoft.insights/diagnosticSettings/DiaEventHub\",\"type\":null,\"name\":\"DiaEventHub\",\"location\":null,\"kind\":null,\"tags\":null,\"properties\":{\"storageAccountId\":null,\"serviceBusRuleId\":null,\"workspaceId\":null,\"eventHubAuthorizationRuleId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhbb2f4031237a7751b/providers/Microsoft.EventHub/namespaces/nsa0d23658d1a8d1ec25/AuthorizationRules/RootManageSharedAccessKey\",\"eventHubName\":\"FirstEventHub\",\"metrics\":[{\"timeGrain\":\"PT1M\",\"category\":\"Requests\",\"enabled\":true,\"retentionPolicy\":{\"enabled\":true,\"days\":0}}],\"logs\":[{\"category\":\"DataPlaneRequests\",\"enabled\":true,\"retentionPolicy\":{\"enabled\":false,\"days\":0}},{\"category\":\"MongoRequests\",\"enabled\":true,\"retentionPolicy\":{\"enabled\":false,\"days\":0}}],\"logAnalyticsDestinationType\":null},\"identity\":null}" + "x-ms-request-id" : "19d374e3-6177-4a10-bda4-5d7acda62028", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgevhb05f3496656b8b/providers/microsoft.documentdb/databaseaccounts/nsf1493750fdd5563/providers/microsoft.insights/diagnosticSettings/DiaEventHub\",\"type\":null,\"name\":\"DiaEventHub\",\"location\":null,\"kind\":null,\"tags\":null,\"properties\":{\"storageAccountId\":null,\"serviceBusRuleId\":null,\"workspaceId\":null,\"eventHubAuthorizationRuleId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgevhb05f3496656b8b/providers/Microsoft.EventHub/namespaces/nsf1493750fdd5563/authorizationRules/RootManageSharedAccessKey\",\"eventHubName\":\"FirstEventHub\",\"metrics\":[{\"timeGrain\":\"PT1M\",\"category\":\"Requests\",\"enabled\":true,\"retentionPolicy\":{\"enabled\":true,\"days\":0}}],\"logs\":[{\"category\":\"DataPlaneRequests\",\"enabled\":true,\"retentionPolicy\":{\"enabled\":false,\"days\":0}},{\"category\":\"MongoRequests\",\"enabled\":true,\"retentionPolicy\":{\"enabled\":false,\"days\":0}}],\"logAnalyticsDestinationType\":null},\"identity\":null}" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgevhbb2f4031237a7751b/providers/microsoft.documentdb/databaseaccounts/nsa0d23658d1a8d1ec25/providers/microsoft.insights/diagnosticSettings/DiaEventHub?api-version=2017-05-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgevhb05f3496656b8b/providers/microsoft.documentdb/databaseaccounts/nsf1493750fdd5563/providers/microsoft.insights/diagnosticSettings/DiaEventHub?api-version=2017-05-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (MonitorManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.monitor/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:52:49 GMT", - "content-length" : "0", + "date" : "Fri, 28 Aug 2020 06:29:12 GMT", "server" : "Microsoft-IIS/10.0", + "content-length" : "0", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "871b0622-f255-4b40-8a1b-d6c9d9d1b0b9", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8b65e4ff-3b6a-4cf9-a34c-0b9a20319b32", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115249Z:871b0622-f255-4b40-8a1b-d6c9d9d1b0b9", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062913Z:8b65e4ff-3b6a-4cf9-a34c-0b9a20319b32", "cache-control" : "no-cache", - "x-ms-request-id" : "c2adda25-0661-41c6-9bac-c1ceb58ec849", + "x-ms-request-id" : "04bc67a6-06c7-48b7-bc8e-f91b1899e0a9", "Body" : "" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgevhbb2f4031237a7751b?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgevhb05f3496656b8b?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:9cc036e5627b47f1226db264b19f71f32dfb7a4fac78a6902ca4f9fedae7623f Java:11.0.3 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Fri, 15 Nov 2019 11:52:53 GMT", + "date" : "Fri, 28 Aug 2020 06:29:18 GMT", "content-length" : "0", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-deletes" : "14998", "retry-after" : "0", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1829648e-c2c4-4b3f-a4c6-bc7faf1a9e1d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8f691e19-f8a0-4a38-bd8d-83235b0a6122", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191115T115254Z:8f691e19-f8a0-4a38-bd8d-83235b0a6122", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0VWSEJCMkY0MDMxMjM3QTc3NTFCLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T062918Z:1829648e-c2c4-4b3f-a4c6-bc7faf1a9e1d", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0VWSEIwNUYzNDk2NjU2QjhCLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "8f691e19-f8a0-4a38-bd8d-83235b0a6122", + "x-ms-request-id" : "1829648e-c2c4-4b3f-a4c6-bc7faf1a9e1d", "Body" : "" } } ], - "variables" : [ "rgevhbb2f4031237a7751b", "nsa0d23658d1a8d1ec25", "stga2a77189b07d4d2d6", "f2eafc92-e537-47f9-b1cc-90a1054c6afa", "595c8673-fecd-4f00-b778-44f32e0722a8", "1dcc54f7-1181-4a93-a098-aefbbf374655", "9109d1d3-d5ae-4eac-8e04-6277e1d56525", "5d7e3076-3945-4846-846c-97ced7754bb5", "80126600-1ac1-4064-8c48-4e35e51bc573", "20bdefbf-87b2-446a-826b-6a9629ca9b45", "7d2b6b9f-3d30-4f8c-b5b5-e5770ff731e2" ] + "variables" : [ "rgevhb05f3496656b8b", "nsf1493750fdd5563" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHubGeoDisasterRecovery.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHubGeoDisasterRecovery.json index c5421248649dd..d821cc4a42226 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHubGeoDisasterRecovery.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageEventHubGeoDisasterRecovery.json @@ -1,743 +1,593 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_0ae756922bba?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_ba938696f1a6?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:01:02 GMT", - "content-length" : "327", + "date" : "Fri, 28 Aug 2020 06:01:29 GMT", + "content-length" : "333", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b20f3d5f-8c83-44ca-aa22-11730102c548", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080103Z:b20f3d5f-8c83-44ca-aa22-11730102c548", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "b20f3d5f-8c83-44ca-aa22-11730102c548", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba\",\"name\":\"rgnemv_0ae756922bba\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"southcentralus\",\"tags\":{\"date\":\"2019-10-17T08:00:58.365Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671?api-version=2017-04-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Thu, 17 Oct 2019 08:01:08 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "662", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", - "retry-after" : "0", - "StatusCode" : "200", "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ebd1e3ea-2618-4946-bffe-2cef3cafc036", + "x-ms-correlation-request-id" : "dcc2b6b4-dce9-45b4-b701-a94e7fb38732", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080109Z:ebd1e3ea-2618-4946-bffe-2cef3cafc036", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060130Z:dcc2b6b4-dce9-45b4-b701-a94e7fb38732", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "06fcdb01-e8b2-4a55-a7d2-d61409510682_M9CH3_M9CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671\",\"name\":\"nse552069671\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nse552069671\",\"createdAt\":\"2019-10-17T08:01:07.557Z\",\"updatedAt\":\"2019-10-17T08:01:07.557Z\",\"serviceBusEndpoint\":\"https://nse552069671.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "dcc2b6b4-dce9-45b4-b701-a94e7fb38732", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6\",\"name\":\"rgnemv_ba938696f1a6\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"southcentralus\",\"tags\":{\"date\":\"2020-08-28T06:01:27.477412700Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" } }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671?api-version=2017-04-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:01:08 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "662", + "date" : "Fri, 28 Aug 2020 06:01:40 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "660", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "797cf786-47d2-4ed5-a653-1aa0c55840e8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "1be3ec93-af58-42c3-b4cb-7eb25c9c76c4", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080109Z:1be3ec93-af58-42c3-b4cb-7eb25c9c76c4", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "49", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060141Z:797cf786-47d2-4ed5-a653-1aa0c55840e8", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "fd44761f-4a95-41de-8291-997a8e9dcca1_M2CH3_M2CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671\",\"name\":\"nse552069671\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nse552069671\",\"createdAt\":\"2019-10-17T08:01:07.557Z\",\"updatedAt\":\"2019-10-17T08:01:07.557Z\",\"serviceBusEndpoint\":\"https://nse552069671.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "8b206f53-a934-44a9-aa71-c54e95d430f6_M10CH3_M10CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660\",\"name\":\"ns9886694660\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9886694660\",\"createdAt\":\"2020-08-28T06:01:39.43Z\",\"updatedAt\":\"2020-08-28T06:01:39.43Z\",\"serviceBusEndpoint\":\"https://ns9886694660.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:01:38 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "662", + "date" : "Fri, 28 Aug 2020 06:02:11 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "660", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8e65838a-6f41-4b11-8080-f224e1ce9043", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "60dd4f97-c937-45a3-aee6-b2e0a5c895fc", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080139Z:60dd4f97-c937-45a3-aee6-b2e0a5c895fc", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060211Z:8e65838a-6f41-4b11-8080-f224e1ce9043", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "3774b315-5ddc-4ab7-a9be-10cd3beb3f6e_M2CH3_M2CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671\",\"name\":\"nse552069671\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nse552069671\",\"createdAt\":\"2019-10-17T08:01:07.557Z\",\"updatedAt\":\"2019-10-17T08:01:07.557Z\",\"serviceBusEndpoint\":\"https://nse552069671.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "6a125f5d-629d-4f7f-87ff-5bb493850115_M4CH3_M4CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660\",\"name\":\"ns9886694660\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9886694660\",\"createdAt\":\"2020-08-28T06:01:39.43Z\",\"updatedAt\":\"2020-08-28T06:01:39.43Z\",\"serviceBusEndpoint\":\"https://ns9886694660.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:02:09 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:02:42 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "659", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8ef13623-ffc5-45bb-b3f9-3e2426864543", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "0609769d-2be1-47f4-93fb-c9ec73c34b70", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080210Z:0609769d-2be1-47f4-93fb-c9ec73c34b70", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060242Z:8ef13623-ffc5-45bb-b3f9-3e2426864543", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "32b00934-f037-44c5-823e-1be8f833619e_M3CH3_M3CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671\",\"name\":\"nse552069671\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nse552069671\",\"createdAt\":\"2019-10-17T08:01:07.557Z\",\"updatedAt\":\"2019-10-17T08:01:54.21Z\",\"serviceBusEndpoint\":\"https://nse552069671.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + "x-ms-request-id" : "a4df79d6-acd8-4425-b397-189290972b6d_M5CH3_M5CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660\",\"name\":\"ns9886694660\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns9886694660\",\"createdAt\":\"2020-08-28T06:01:39.43Z\",\"updatedAt\":\"2020-08-28T06:02:27.267Z\",\"serviceBusEndpoint\":\"https://ns9886694660.servicebus.windows.net:443/\",\"status\":\"Active\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:02:14 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "660", + "date" : "Fri, 28 Aug 2020 06:02:51 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "662", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1197", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cffde026-1a9b-4324-ba96-c7bb25548d11", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "646cd2d4-a316-476c-b638-beec36d6597b", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080214Z:646cd2d4-a316-476c-b638-beec36d6597b", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "48", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060251Z:cffde026-1a9b-4324-ba96-c7bb25548d11", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "c7b47641-1939-409d-995c-7576a145c47f_M3CH3_M3CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"name\":\"nsa1d3643465\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsa1d3643465\",\"createdAt\":\"2019-10-17T08:02:13.51Z\",\"updatedAt\":\"2019-10-17T08:02:13.51Z\",\"serviceBusEndpoint\":\"https://nsa1d3643465.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "dde255be-3b80-4d6f-a701-277e7f260fee_M10CH3_M10CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"name\":\"ns6fd85416bf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns6fd85416bf\",\"createdAt\":\"2020-08-28T06:02:49.767Z\",\"updatedAt\":\"2020-08-28T06:02:49.767Z\",\"serviceBusEndpoint\":\"https://ns6fd85416bf.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:02:15 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "660", + "date" : "Fri, 28 Aug 2020 06:03:21 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "662", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e197a5fc-af94-4d22-9e84-022e0c406054", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d9ecf7c1-8434-46e2-ab1a-0895a0cde2ec", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080215Z:d9ecf7c1-8434-46e2-ab1a-0895a0cde2ec", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060321Z:e197a5fc-af94-4d22-9e84-022e0c406054", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "2080561e-5c31-40d8-a232-04c768d272a4_M2CH3_M2CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"name\":\"nsa1d3643465\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsa1d3643465\",\"createdAt\":\"2019-10-17T08:02:13.51Z\",\"updatedAt\":\"2019-10-17T08:02:13.51Z\",\"serviceBusEndpoint\":\"https://nsa1d3643465.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" + "x-ms-request-id" : "4cb0453f-6282-4e7c-839d-5d3205614c3a_M1CH3_M1CH3", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"name\":\"ns6fd85416bf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns6fd85416bf\",\"createdAt\":\"2020-08-28T06:02:49.767Z\",\"updatedAt\":\"2020-08-28T06:02:49.767Z\",\"serviceBusEndpoint\":\"https://ns6fd85416bf.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:02:45 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:03:52 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "660", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "server-sb" : "Service-Bus-Resource-Provider/SN1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11995", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d790e6a9-c0eb-40e2-a523-4f84fde8cdbc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080245Z:d790e6a9-c0eb-40e2-a523-4f84fde8cdbc", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "6673cb92-7880-40d0-b346-fde990af24c6_M3CH3_M3CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"name\":\"nsa1d3643465\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsa1d3643465\",\"createdAt\":\"2019-10-17T08:02:13.51Z\",\"updatedAt\":\"2019-10-17T08:02:13.51Z\",\"serviceBusEndpoint\":\"https://nsa1d3643465.servicebus.windows.net:443/\",\"status\":\"Activating\"}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465?api-version=2017-04-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)" - }, - "Response" : { - "date" : "Thu, 17 Oct 2019 08:03:15 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "659", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "aa7e97f0-7f33-42e3-901f-ed4c3e61e6a5", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a4e20694-6b8a-436f-bb1b-ac0845d4c577", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080316Z:a4e20694-6b8a-436f-bb1b-ac0845d4c577", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060352Z:aa7e97f0-7f33-42e3-901f-ed4c3e61e6a5", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "2240fb49-583f-409d-bec4-f4da17db32a2_M6CH3_M6CH3", - "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"name\":\"nsa1d3643465\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:nsa1d3643465\",\"createdAt\":\"2019-10-17T08:02:13.51Z\",\"updatedAt\":\"2019-10-17T08:02:58.537Z\",\"serviceBusEndpoint\":\"https://nsa1d3643465.servicebus.windows.net:443/\",\"status\":\"Active\"}}" + "x-ms-request-id" : "aa08c422-007c-41b9-926f-70f2065ae826_M1SN1_M1SN1", + "Body" : "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"name\":\"ns6fd85416bf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Central US\",\"tags\":{},\"properties\":{\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:ns6fd85416bf\",\"createdAt\":\"2020-08-28T06:02:49.767Z\",\"updatedAt\":\"2020-08-28T06:03:37.053Z\",\"serviceBusEndpoint\":\"https://ns6fd85416bf.servicebus.windows.net:443/\",\"status\":\"Active\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:03:33 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:03:59 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "525", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1196", - "retry-after" : "0", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3d748729-ff73-427e-9da5-0512d374bb53", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080333Z:3d748729-ff73-427e-9da5-0512d374bb53", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "8e8733a5-d06b-4b57-99dd-0a91e34b59fd_M6CH3_M6CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Thu, 17 Oct 2019 08:03:33 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "525", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1bc84f9a-cd08-456f-8607-f496eec9b2d4", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "bb7dcd7e-e3d6-4263-b22c-42b6758b0383", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080333Z:bb7dcd7e-e3d6-4263-b22c-42b6758b0383", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060400Z:1bc84f9a-cd08-456f-8607-f496eec9b2d4", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "c7eab4fc-c816-4ab2-a8cf-1ccdcb1c1947_M6CH3_M6CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + "x-ms-request-id" : "93845068-f942-4e05-85f7-63281599526e_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:03:48 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:04:00 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "525", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5724fb9d-4772-4c7b-80e3-49eb49806c14", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "77b4d220-67f8-4ab5-9201-b5cc7b039b22", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080349Z:77b4d220-67f8-4ab5-9201-b5cc7b039b22", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060400Z:5724fb9d-4772-4c7b-80e3-49eb49806c14", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "ee567304-7357-4a4a-9f1a-097b390ca5a9_M15CH3_M15CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + "x-ms-request-id" : "32d5d241-73bd-4852-99ed-92d865eebd80_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:04:04 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:04:15 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "525", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e4f38839-fc34-4809-8f6e-5d859e9b67a3", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5bee936e-0d09-4665-8db6-cb356516d617", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080404Z:5bee936e-0d09-4665-8db6-cb356516d617", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060416Z:e4f38839-fc34-4809-8f6e-5d859e9b67a3", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "11195cee-9437-45ec-94bf-6c8e695efd45_M15CH3_M15CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + "x-ms-request-id" : "747d30f7-f053-4a38-8672-eeeab491c8d7_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:04:19 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:04:31 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "525", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "server-sb" : "Service-Bus-Resource-Provider/SN1", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ce86b3f5-44c0-4bab-b2b3-4aba9ec64970", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f4f4e62a-83a0-475f-bb15-c9b2e7315b03", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080419Z:f4f4e62a-83a0-475f-bb15-c9b2e7315b03", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060431Z:ce86b3f5-44c0-4bab-b2b3-4aba9ec64970", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "f9a8c526-991a-41a7-9486-b29b86185884_M6CH3_M6CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + "x-ms-request-id" : "3915e9db-e014-4e26-94f0-866a61161db3_M1SN1_M1SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:04:34 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:04:46 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "525", "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11989", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d2449c91-0f57-40c3-a90f-360d7b88264d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080435Z:d2449c91-0f57-40c3-a90f-360d7b88264d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "6d6089f3-a1f4-4b39-9463-7bee853636bf_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Thu, 17 Oct 2019 08:04:49 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "525", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "server-sb" : "Service-Bus-Resource-Provider/SN1", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11988", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "acea86dc-8129-4bb0-a412-43b3da561ab7", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9ef4622f-9028-40b6-af4e-912f82e0dabb", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080450Z:9ef4622f-9028-40b6-af4e-912f82e0dabb", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060446Z:acea86dc-8129-4bb0-a412-43b3da561ab7", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "efebc845-fb82-4be6-8d7a-85b751a90328_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + "x-ms-request-id" : "6ec7d749-53da-4925-b09b-d82f9d43113b_M1SN1_M1SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:05:06 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:05:01 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "525", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "19ffd6b3-1195-48e8-a047-8e58bdcb8065", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f9fe445b-13ac-4a27-9e81-6719a2c24047", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080507Z:f9fe445b-13ac-4a27-9e81-6719a2c24047", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060502Z:19ffd6b3-1195-48e8-a047-8e58bdcb8065", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "47050423-5656-4869-a49f-673a90390f0b_M2CH3_M2CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + "x-ms-request-id" : "b9758905-acb1-48f3-8246-7341d09db346_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:05:22 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:05:17 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "525", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5082e245-a782-46ac-94cc-246dedef5aa2", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5f8f09bc-57f7-408e-bbf3-8c51cb8a7ae0", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080522Z:5f8f09bc-57f7-408e-bbf3-8c51cb8a7ae0", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060517Z:5082e245-a782-46ac-94cc-246dedef5aa2", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "60c62712-a01f-4395-8d6f-9d24c859ae66_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + "x-ms-request-id" : "8ebd97f4-7c16-4b65-a5d3-25eeb0c4b1f3_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:05:38 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:05:32 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "564", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8c5be4d4-b0fe-4de5-9950-b7c139eda7e8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "1a544246-aa9a-4161-8bd3-b103a78cbdb4", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080538Z:1a544246-aa9a-4161-8bd3-b103a78cbdb4", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060533Z:8c5be4d4-b0fe-4de5-9950-b7c139eda7e8", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "690765d7-7858-48dc-9690-39e0634148b1_M2CH3_M2CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}" + "x-ms-request-id" : "6137c90a-7bd9-4ca6-ab70-5936e9bcab93_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/eventhubs/eh66a10761a1?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/eventhubs/eh80a6647353?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:06:01 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:05:54 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "470", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3782013d-d5f5-47b4-b6dd-f1c6a907c990", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "aab75f8f-8b69-4280-aa35-7654fb72eda8", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080601Z:aab75f8f-8b69-4280-aa35-7654fb72eda8", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060555Z:3782013d-d5f5-47b4-b6dd-f1c6a907c990", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "354fb722-fd39-4d15-82d2-b24d1fb3766b_M2CH3_M2CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/eventhubs/eh66a10761a1\",\"name\":\"eh66a10761a1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"South Central US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2019-10-17T08:05:55.5934299Z\",\"updatedAt\":\"2019-10-17T08:05:55.5934299Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + "x-ms-request-id" : "d28b0344-8db6-400c-a3f6-0245af2289a9_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/eventhubs/eh80a6647353\",\"name\":\"eh80a6647353\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"South Central US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:05:50.4436229Z\",\"updatedAt\":\"2020-08-28T06:05:50.4436229Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/eventhubs/eh66a10761a1/consumergroups/consumerGrp1?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/eventhubs/eh80a6647353/consumergroups/consumerGrp1?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:06:08 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:06:01 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "416", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c5aeb82b-ffe5-4684-b88a-fad7193f381d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "18f02bb9-c8e2-4fd1-8a8e-d7c4cedfc4b9", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080608Z:18f02bb9-c8e2-4fd1-8a8e-d7c4cedfc4b9", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060601Z:c5aeb82b-ffe5-4684-b88a-fad7193f381d", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "f4c003d7-48bb-4116-8d15-ec39697aa96c_M2CH3_M2CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/eventhubs/eh66a10761a1/consumergroups/consumerGrp1\",\"name\":\"consumerGrp1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"South Central US\",\"properties\":{\"createdAt\":\"2019-10-17T08:06:03.8617592Z\",\"updatedAt\":\"2019-10-17T08:06:03.8617592Z\"}}" + "x-ms-request-id" : "134d2d44-6ab4-4043-8ea1-7ebacb5e412c_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/eventhubs/eh80a6647353/consumergroups/consumerGrp1\",\"name\":\"consumerGrp1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups\",\"location\":\"South Central US\",\"properties\":{\"createdAt\":\"2020-08-28T06:05:57.1088339Z\",\"updatedAt\":\"2020-08-28T06:05:57.1088339Z\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465/eventhubs/eh66a10761a1?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf/eventhubs/eh80a6647353?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:07:08 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "460", + "date" : "Fri, 28 Aug 2020 06:07:01 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "459", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b9962481-509f-403d-b562-ea1fb0eb9955", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "512aafb0-8860-4cc8-b22c-76323b25353a", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080709Z:512aafb0-8860-4cc8-b22c-76323b25353a", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060702Z:b9962481-509f-403d-b562-ea1fb0eb9955", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "aae9da7d-c273-4b45-9e41-1065d607d17a_M7CH3_M7CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465/eventhubs/eh66a10761a1\",\"name\":\"eh66a10761a1\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"North Central US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2019-10-17T08:06:01.927\",\"updatedAt\":\"2019-10-17T08:06:02.377\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" + "x-ms-request-id" : "0460226d-fd60-4566-9878-7b826aa41088_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf/eventhubs/eh80a6647353\",\"name\":\"eh80a6647353\",\"type\":\"Microsoft.EventHub/Namespaces/EventHubs\",\"location\":\"North Central US\",\"properties\":{\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2020-08-28T06:05:55.583\",\"updatedAt\":\"2020-08-28T06:05:55.82\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395/AuthorizationRules?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911/authorizationRules?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:07:10 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:07:02 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "417", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "aefb180f-8b7b-4b6e-98f3-b574ad05f2bb", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e2cf18ad-b984-45aa-9ac6-fd2ebc68d022", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080711Z:e2cf18ad-b984-45aa-9ac6-fd2ebc68d022", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060703Z:aefb180f-8b7b-4b6e-98f3-b574ad05f2bb", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "4c61008f-1518-4067-8540-6ebbf5b608b1_M3CH3_M3CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"South Central US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}]}" + "x-ms-request-id" : "58e378c6-645c-43c4-bd94-eee9b4e2c401_M5CH3_M5CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"South Central US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}]}" } }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:07:11 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:07:03 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "547", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2a24cba6-e26b-45f0-b87d-056fb62e006d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4c2ff26a-e40f-4831-a858-630a05c8fc39", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080712Z:4c2ff26a-e40f-4831-a858-630a05c8fc39", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060704Z:2a24cba6-e26b-45f0-b87d-056fb62e006d", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "80e9eb31-2b2d-4875-a11f-b9271be8ddeb_M3CH3_M3CH3", - "Body" : "{\"aliasPrimaryConnectionString\":\"Endpoint=sb://geodr48470395.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=G6m+p658y6Q63Uc8bxoz10xduy/66cv2+hrumllMhi0=\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://geodr48470395.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SiXEwfxm//1ZbFfM7FUgXoF7ptyj/AddcV7MtzkR96U=\",\"primaryKey\":\"G6m+p658y6Q63Uc8bxoz10xduy/66cv2+hrumllMhi0=\",\"secondaryKey\":\"SiXEwfxm//1ZbFfM7FUgXoF7ptyj/AddcV7MtzkR96U=\",\"keyName\":\"RootManageSharedAccessKey\"}" + "x-ms-request-id" : "2d42ff39-1215-435c-aeb1-48e2c8dcc3b1_M5CH3_M5CH3", + "Body" : "{\"aliasPrimaryConnectionString\":\"Endpoint=sb://geodr81255911.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://geodr81255911.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" } }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465/disasterRecoveryConfigs/geodr48470395/failover?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf/disasterRecoveryConfigs/geodr81255911/failover?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:07:12 GMT", + "date" : "Fri, 28 Aug 2020 06:07:03 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "412b676e-ce91-4153-b8c9-e0511a3243df", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8ec267f1-2efd-433b-abfc-2b93f5f54d4f", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080712Z:8ec267f1-2efd-433b-abfc-2b93f5f54d4f", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060704Z:412b676e-ce91-4153-b8c9-e0511a3243df", "cache-control" : "no-cache", - "x-ms-request-id" : "1a397189-aa92-44f5-a563-2126332717a8_M3CH3_M3CH3", + "x-ms-request-id" : "c8a3cc4a-7e8c-4aae-9ede-fc018ace24a9_M3CH3_M3CH3", "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395?api-version=2017-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911?api-version=2017-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (EventHubManagementClient, 2017-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.eventhubs/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:07:12 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", + "date" : "Fri, 28 Aug 2020 06:07:04 GMT", + "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "525", "expires" : "-1", "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "24519282-7609-4a46-b588-1ddfdea484a3", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "56db4470-6c27-4be1-8f54-e7591774164e", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080713Z:56db4470-6c27-4be1-8f54-e7591774164e", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060705Z:24519282-7609-4a46-b588-1ddfdea484a3", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "bba39f01-cce1-438c-af73-ce0c8e72a912_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nse552069671/disasterRecoveryConfigs/geodr48470395\",\"name\":\"geodr48470395\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_0ae756922bba/providers/Microsoft.EventHub/namespaces/nsa1d3643465\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" + "x-ms-request-id" : "d7b1c19f-eb2f-4cce-9573-c51462683653_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns9886694660/disasterRecoveryConfigs/geodr81255911\",\"name\":\"geodr81255911\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_ba938696f1a6/providers/Microsoft.EventHub/namespaces/ns6fd85416bf\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_0ae756922bba?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_ba938696f1a6?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 08:07:19 GMT", + "date" : "Fri, 28 Aug 2020 06:07:08 GMT", "content-length" : "0", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", "retry-after" : "0", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4421ac6c-0851-463f-966a-ba9f8734f98c", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ea7b6fe9-a67c-4b64-9599-be6663a19c97", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T080719Z:ea7b6fe9-a67c-4b64-9599-be6663a19c97", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYwQUU3NTY5MjJCQkEtU09VVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6InNvdXRoY2VudHJhbHVzIn0?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200828T060709Z:4421ac6c-0851-463f-966a-ba9f8734f98c", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUZCQTkzODY5NkYxQTYtU09VVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6InNvdXRoY2VudHJhbHVzIn0?api-version=2020-06-01", "cache-control" : "no-cache", - "x-ms-request-id" : "ea7b6fe9-a67c-4b64-9599-be6663a19c97", + "x-ms-request-id" : "4421ac6c-0851-463f-966a-ba9f8734f98c", "Body" : "" } } ], - "variables" : [ "rgnemv_0ae756922bba", "nse552069671", "nsa1d3643465", "geodr48470395", "eh66a10761a1", "66583cb2-3c38-4900-806f-39562a4464de", "91ecf8be-fbf3-4bc7-8c82-82b9cee0e922", "98e177b1-e268-4ff2-ba79-e672ff21d3a6", "6e43fca5-2b98-4b11-9ca7-84835a7bea1f", "cdd5a0d3-9e11-4e74-a778-6ac8e8dce54b", "cda51942-1f90-4885-8417-4521693b042c", "3761455e-46ca-4ada-b19f-89a1615506bd", "1ec2c586-8aa6-42c0-8c66-7a6a445bd928" ] + "variables" : [ "rgnemv_ba938696f1a6", "ns9886694660", "ns6fd85416bf", "geodr81255911", "eh80a6647353" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageHACosmosDB.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageHACosmosDB.json index 9f10089b578d1..15b2a269386a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageHACosmosDB.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageHACosmosDB.json @@ -1321,7 +1321,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "3a7d2071-f333-4200-93e9-58e5f793102c", - "Body" : "{\"primaryMasterKey\":\"Ft9wEIb1dqTQPu2PdB5K0alJAe0BFcqFgu065FfnIMQGfv29qYZdOeplfSljBjcr4F4lr0fSFfKBYGpbgVuYxQ==\",\"secondaryMasterKey\":\"Y9M7eEctE74ywFXdwzzf5mU2bLFma71CH8PcVPI7bPM0sq0Jm5V7oa0jEfbcmFzwJB5FoprSZSj9c6dE6ojbkQ==\",\"primaryReadonlyMasterKey\":\"83gsYDOdzlKm2Ze37wgy3oPXq2awjM0T6nrpraHqGgk4dUoz2dRjNUAL4qxPGdhIuWcKcOpQ39Sd2GGsZ6qz1g==\",\"secondaryReadonlyMasterKey\":\"XyifKTgU00Dey4JeUBCr8jtMx3DfuKJcxiSPR9sRk3f4lqQcFVOgDKtY3MMQjlcxn5sXGI6vWlseEkhCFuDLAg==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1348,7 +1348,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "d4ce7efc-c556-43d5-adcd-576747a5eddc", - "Body" : "{\"primaryReadonlyMasterKey\":\"83gsYDOdzlKm2Ze37wgy3oPXq2awjM0T6nrpraHqGgk4dUoz2dRjNUAL4qxPGdhIuWcKcOpQ39Sd2GGsZ6qz1g==\",\"secondaryReadonlyMasterKey\":\"XyifKTgU00Dey4JeUBCr8jtMx3DfuKJcxiSPR9sRk3f4lqQcFVOgDKtY3MMQjlcxn5sXGI6vWlseEkhCFuDLAg==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "PUT", @@ -17001,7 +17001,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "e80265e0-4eae-4a6d-bfa7-7302a7271d9e", - "Body" : "{\"primaryMasterKey\":\"Ft9wEIb1dqTQPu2PdB5K0alJAe0BFcqFgu065FfnIMQGfv29qYZdOeplfSljBjcr4F4lr0fSFfKBYGpbgVuYxQ==\",\"secondaryMasterKey\":\"Y9M7eEctE74ywFXdwzzf5mU2bLFma71CH8PcVPI7bPM0sq0Jm5V7oa0jEfbcmFzwJB5FoprSZSj9c6dE6ojbkQ==\",\"primaryReadonlyMasterKey\":\"83gsYDOdzlKm2Ze37wgy3oPXq2awjM0T6nrpraHqGgk4dUoz2dRjNUAL4qxPGdhIuWcKcOpQ39Sd2GGsZ6qz1g==\",\"secondaryReadonlyMasterKey\":\"XyifKTgU00Dey4JeUBCr8jtMx3DfuKJcxiSPR9sRk3f4lqQcFVOgDKtY3MMQjlcxn5sXGI6vWlseEkhCFuDLAg==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -17028,7 +17028,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "4d6835c1-2133-476d-8b31-d37b9f71fba5", - "Body" : "{\"primaryReadonlyMasterKey\":\"83gsYDOdzlKm2Ze37wgy3oPXq2awjM0T6nrpraHqGgk4dUoz2dRjNUAL4qxPGdhIuWcKcOpQ39Sd2GGsZ6qz1g==\",\"secondaryReadonlyMasterKey\":\"XyifKTgU00Dey4JeUBCr8jtMx3DfuKJcxiSPR9sRk3f4lqQcFVOgDKtY3MMQjlcxn5sXGI6vWlseEkhCFuDLAg==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -17055,7 +17055,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "cb5912e7-9650-4834-9c3e-300aaca9ad89", - "Body" : "{\"primaryMasterKey\":\"Ft9wEIb1dqTQPu2PdB5K0alJAe0BFcqFgu065FfnIMQGfv29qYZdOeplfSljBjcr4F4lr0fSFfKBYGpbgVuYxQ==\",\"secondaryMasterKey\":\"Y9M7eEctE74ywFXdwzzf5mU2bLFma71CH8PcVPI7bPM0sq0Jm5V7oa0jEfbcmFzwJB5FoprSZSj9c6dE6ojbkQ==\",\"primaryReadonlyMasterKey\":\"83gsYDOdzlKm2Ze37wgy3oPXq2awjM0T6nrpraHqGgk4dUoz2dRjNUAL4qxPGdhIuWcKcOpQ39Sd2GGsZ6qz1g==\",\"secondaryReadonlyMasterKey\":\"XyifKTgU00Dey4JeUBCr8jtMx3DfuKJcxiSPR9sRk3f4lqQcFVOgDKtY3MMQjlcxn5sXGI6vWlseEkhCFuDLAg==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "DELETE", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageLinuxWebAppCosmosDbByMsi.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageLinuxWebAppCosmosDbByMsi.json index 325eb228b3542..9b80bccb92594 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageLinuxWebAppCosmosDbByMsi.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageLinuxWebAppCosmosDbByMsi.json @@ -1267,7 +1267,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "58b7c28f-9ee2-465e-8348-61e80165e33c", - "Body" : "{\"primaryMasterKey\":\"EMN0AMndWeiEP4WFqxzvcx0fo6vNXONb2DYNeGRQYhaeQDLIEY6LMvIpzbY7qwB8223uyClCk3VX7UgYNLQkYg==\",\"secondaryMasterKey\":\"J1v8KbD1Ocve5ueEt3Q5hLOH7mtnPF5dCk3uV3MneK6TU5DPmWdcimLl3oXjDvszaXjpBTqXjsS22fHFSyImxA==\",\"primaryReadonlyMasterKey\":\"ahfe4u5l8MMNjXodjP09E911JSekjbLPPTvoAb0PdIGMuOXiozvuwGKzrMGZjA9QFROwu5j4byAMq5Vgc9EL9A==\",\"secondaryReadonlyMasterKey\":\"l1dNJOi7lavR6qz1fUPXBvBVuAgkuMlolwCw1d9zZUv6wrKVVC4FoMCzIQJcIldd1Oc6sSFNHDhZWftV1yk5IA==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1294,7 +1294,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "22fc76c2-1533-4818-b3bc-e2478854f14a", - "Body" : "{\"primaryReadonlyMasterKey\":\"ahfe4u5l8MMNjXodjP09E911JSekjbLPPTvoAb0PdIGMuOXiozvuwGKzrMGZjA9QFROwu5j4byAMq5Vgc9EL9A==\",\"secondaryReadonlyMasterKey\":\"l1dNJOi7lavR6qz1fUPXBvBVuAgkuMlolwCw1d9zZUv6wrKVVC4FoMCzIQJcIldd1Oc6sSFNHDhZWftV1yk5IA==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "DELETE", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageRedisCache.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageRedisCache.json index 6e660aa8b2ff0..09303a08d1244 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageRedisCache.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageRedisCache.json @@ -100,7 +100,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/redis/rc23d4773541645?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "e3a8df8e-4e75-476c-a038-5023bfcfcacf", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/Redis/rc23d4773541645\",\"location\":\"Central US\",\"name\":\"rc23d4773541645\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":1},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"7500\",\"maxmemory-reserved\":\"200\",\"maxfragmentationmemory-reserved\":\"300\",\"maxmemory-delta\":\"200\"},\"accessKeys\":{\"primaryKey\":\"zip9801oIDXSLHc1i3mRRw9TsKQDWPHAhuAD6n3Zb3w=\",\"secondaryKey\":\"IQ1OtFXtmMGEcR8xn3OCXpX2vKuCKUKea1oR7UogC2U=\"},\"hostName\":\"rc23d4773541645.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"shardCount\":3,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/Redis/rc23d4773541645\",\"location\":\"Central US\",\"name\":\"rc23d4773541645\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":1},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"7500\",\"maxmemory-reserved\":\"200\",\"maxfragmentationmemory-reserved\":\"300\",\"maxmemory-delta\":\"200\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"rc23d4773541645.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"shardCount\":3,\"linkedServers\":[]}}" } }, { "Method" : "PUT", @@ -128,7 +128,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/redis/rc37bb65299cbed?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "fc3c9363-2c5d-4802-8f06-f19c23063e31", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/Redis/rc37bb65299cbed\",\"location\":\"Central US\",\"name\":\"rc37bb65299cbed\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":2},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"15000\",\"maxmemory-reserved\":\"500\",\"maxfragmentationmemory-reserved\":\"650\",\"maxmemory-delta\":\"500\"},\"accessKeys\":{\"primaryKey\":\"N576YEi547JcuXwjleF7z1+03cdyP6YsSr9Bya2cohU=\",\"secondaryKey\":\"Jq+qhX9HQoDht7VgRCOmEtCYrL7XXDKrrWmuCAbtzx4=\"},\"hostName\":\"rc37bb65299cbed.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"shardCount\":3,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/Redis/rc37bb65299cbed\",\"location\":\"Central US\",\"name\":\"rc37bb65299cbed\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Premium\",\"family\":\"P\",\"capacity\":2},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"15000\",\"maxmemory-reserved\":\"500\",\"maxfragmentationmemory-reserved\":\"650\",\"maxmemory-delta\":\"500\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"rc37bb65299cbed.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"shardCount\":3,\"linkedServers\":[]}}" } }, { "Method" : "PUT", @@ -156,7 +156,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/redis/rc176d4024708a0?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "645eca80-43d4-468b-bb30-22ef536e3544", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/Redis/rc176d4024708a0\",\"location\":\"Central US\",\"name\":\"rc176d4024708a0\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Basic\",\"family\":\"C\",\"capacity\":0},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"256\",\"maxmemory-reserved\":\"2\",\"maxfragmentationmemory-reserved\":\"12\",\"maxmemory-delta\":\"2\"},\"accessKeys\":{\"primaryKey\":\"ZEilosf5a3+pkiJt9F0SSsS8qiAE6gjWuRXr9Ebeom8=\",\"secondaryKey\":\"hJFSsnxYzPnEFhNtBCalcs5SfBRmF8TCoKhynzilDd8=\"},\"hostName\":\"rc176d4024708a0.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgrcmc33210131885/providers/Microsoft.Cache/Redis/rc176d4024708a0\",\"location\":\"Central US\",\"name\":\"rc176d4024708a0\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Basic\",\"family\":\"C\",\"capacity\":0},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"256\",\"maxmemory-reserved\":\"2\",\"maxfragmentationmemory-reserved\":\"12\",\"maxmemory-delta\":\"2\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"rc176d4024708a0.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" } }, { "Method" : "GET", @@ -2889,7 +2889,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "587a2ce3-dc33-4bdd-a3b3-7af39f3c6051", - "Body" : "{\"primaryKey\":\"ZEilosf5a3+pkiJt9F0SSsS8qiAE6gjWuRXr9Ebeom8=\",\"secondaryKey\":\"hJFSsnxYzPnEFhNtBCalcs5SfBRmF8TCoKhynzilDd8=\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -2916,7 +2916,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "dc577759-c824-4411-9f17-bdf509c0092f", - "Body" : "{\"primaryKey\":\"ZEilosf5a3+pkiJt9F0SSsS8qiAE6gjWuRXr9Ebeom8=\",\"secondaryKey\":\"gG0JVgoM7o8BlZ01GHj38v+j2Bn9oD6lwIqWc9SKjeI=\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageSearchService.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageSearchService.json index aa2f9e4c07289..cd5cffbe941fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageSearchService.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageSearchService.json @@ -929,7 +929,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "110024c2-0ec7-48a0-9163-592062178298", - "Body" : "{\"primaryKey\":\"7532A11F810684282EABB97C5BEA78D3\",\"secondaryKey\":\"4ABA58E9A9866A023DB52C6AFB83197E\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1038,7 +1038,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "2e86e95f-ee65-41f9-a4b3-3f0c7c798480", - "Body" : "{\"primaryKey\":\"2D69CCC569C9615F467E8CEE2B3440F3\",\"secondaryKey\":\"751C9C50BEF8D2C364AE801A136478B6\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1122,7 +1122,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "09f436f3-e88e-410f-8c3e-6a463315c505", - "Body" : "{\"primaryKey\":\"2D69CCC569C9615F467E8CEE2B3440F3\",\"secondaryKey\":\"751C9C50BEF8D2C364AE801A136478B6\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1178,7 +1178,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "9de15cd5-9238-4c22-a637-0ec0cc74e794", - "Body" : "{\"primaryKey\":\"7532A11F810684282EABB97C5BEA78D3\",\"secondaryKey\":\"4ABA58E9A9866A023DB52C6AFB83197E\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1262,7 +1262,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "3fe80763-7b47-4b60-a789-b1735c3c8542", - "Body" : "{\"primaryKey\":\"7B03CE37EBB5A90C9C716C3F9D53EF88\",\"secondaryKey\":\"751C9C50BEF8D2C364AE801A136478B6\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1290,7 +1290,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "fef36f4c-ca64-4e5a-863c-18474e577d16", - "Body" : "{\"primaryKey\":\"7B03CE37EBB5A90C9C716C3F9D53EF88\",\"secondaryKey\":\"15F5B92C778C3A8CAF867978EEE2A562\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "PUT", @@ -3503,7 +3503,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "0fc59f83-af42-4fca-a632-3a7e29ec1c18", - "Body" : "{\"primaryKey\":\"7B03CE37EBB5A90C9C716C3F9D53EF88\",\"secondaryKey\":\"15F5B92C778C3A8CAF867978EEE2A562\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -3611,7 +3611,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "7ad1666b-ffae-48fb-83fd-7e47e24395da", - "Body" : "{\"primaryKey\":\"7B03CE37EBB5A90C9C716C3F9D53EF88\",\"secondaryKey\":\"15F5B92C778C3A8CAF867978EEE2A562\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppCosmosDbByMsi.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppCosmosDbByMsi.json index 8c4b007942079..deeecd0b77a3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppCosmosDbByMsi.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppCosmosDbByMsi.json @@ -1186,7 +1186,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "4b94b8fc-f2ab-42ff-a700-80a14123a21a", - "Body" : "{\"primaryMasterKey\":\"b5FYzSCbFcjRoVoYV4szVMNHGu4MilMXP5ICnYnGsEOwd1jPZ0OLEzqH8IL9Rx5eD8lvwM0AvE7Q5GqflrgPdA==\",\"secondaryMasterKey\":\"I1MRcaw77jtQ9t1nTMGRrtHTQOcnbTlwMTLrS56N9xpN26x79zSPo2ftP8D2L9bKPU196AU3vAN2OKJaTSt9tQ==\",\"primaryReadonlyMasterKey\":\"8qRCIe4qoGDVBlUS0lFH5rPkrN8sNn3yWvm7fhE8Vjq2GYYZqHl6Qf1fwFnmz62bGAd2Pr80hi1JyJRWRVT8vg==\",\"secondaryReadonlyMasterKey\":\"2ocHfbfXD8CSRN0AN1SufEbfHHn5xQfaZ1kZkOG6TBgpuVEtBkfmcbAWKmevMs8HuE1TReL0EdJPUpFdmyuENA==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1213,7 +1213,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "0466350e-0137-4552-87ab-d2b8d51aa9da", - "Body" : "{\"primaryReadonlyMasterKey\":\"8qRCIe4qoGDVBlUS0lFH5rPkrN8sNn3yWvm7fhE8Vjq2GYYZqHl6Qf1fwFnmz62bGAd2Pr80hi1JyJRWRVT8vg==\",\"secondaryReadonlyMasterKey\":\"2ocHfbfXD8CSRN0AN1SufEbfHHn5xQfaZ1kZkOG6TBgpuVEtBkfmcbAWKmevMs8HuE1TReL0EdJPUpFdmyuENA==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1415,7 +1415,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "cba97e8e-ef8d-4856-a229-8c6d1c7e8884", - "Body" : "{\"primaryMasterKey\":\"b5FYzSCbFcjRoVoYV4szVMNHGu4MilMXP5ICnYnGsEOwd1jPZ0OLEzqH8IL9Rx5eD8lvwM0AvE7Q5GqflrgPdA==\",\"secondaryMasterKey\":\"I1MRcaw77jtQ9t1nTMGRrtHTQOcnbTlwMTLrS56N9xpN26x79zSPo2ftP8D2L9bKPU196AU3vAN2OKJaTSt9tQ==\",\"primaryReadonlyMasterKey\":\"8qRCIe4qoGDVBlUS0lFH5rPkrN8sNn3yWvm7fhE8Vjq2GYYZqHl6Qf1fwFnmz62bGAd2Pr80hi1JyJRWRVT8vg==\",\"secondaryReadonlyMasterKey\":\"2ocHfbfXD8CSRN0AN1SufEbfHHn5xQfaZ1kZkOG6TBgpuVEtBkfmcbAWKmevMs8HuE1TReL0EdJPUpFdmyuENA==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "PUT", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppCosmosDbThroughKeyVault.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppCosmosDbThroughKeyVault.json index 9fdc5f0f92ed2..e20c2244cb93f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppCosmosDbThroughKeyVault.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppCosmosDbThroughKeyVault.json @@ -1240,7 +1240,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "4b05fe54-8e9b-480a-a1e8-ae14a4caca88", - "Body" : "{\"primaryMasterKey\":\"taWYFWtSUfwh56y369Ept0v4Ygr61tovqz4J37EKaY3pSDm8bMBoIBw4GtcXcmkW9BtgERq6T5MdgMSdX3tv7g==\",\"secondaryMasterKey\":\"gezxWEOelAMbcEtP2mQzNvGpJj1XbEPd2k5jtm6WZfEYqpBQajaueyon7yG9Mvn2i2BxPUuFT2bBNr20QSNnFA==\",\"primaryReadonlyMasterKey\":\"hmXbpals60WPk0BZNskmCaQxqgABL9yKE5Iux2uDe50473F3vdkHNdxEHI4mxW8E0fzhwe8xJcOil7iRpAWx9w==\",\"secondaryReadonlyMasterKey\":\"fpJUCU2n6l48t4elr2RKSloyWJa6Gl9AxtEAbXoYtGJp7v0a8qTk1s3aY8vfOiOVJQav1IdLSXSq7jHDcUq5fg==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -1267,7 +1267,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "8f7cf5ae-854d-4e0c-b39a-dfa8bc1ed913", - "Body" : "{\"primaryReadonlyMasterKey\":\"hmXbpals60WPk0BZNskmCaQxqgABL9yKE5Iux2uDe50473F3vdkHNdxEHI4mxW8E0fzhwe8xJcOil7iRpAWx9w==\",\"secondaryReadonlyMasterKey\":\"fpJUCU2n6l48t4elr2RKSloyWJa6Gl9AxtEAbXoYtGJp7v0a8qTk1s3aY8vfOiOVJQav1IdLSXSq7jHDcUq5fg==\"}" + "Body" : "{\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1524,7 +1524,7 @@ "content-type" : "application/json", "cache-control" : "no-store, no-cache", "x-ms-request-id" : "f9d23907-e66d-41c0-9d59-9cba39aef64a", - "Body" : "{\"primaryMasterKey\":\"taWYFWtSUfwh56y369Ept0v4Ygr61tovqz4J37EKaY3pSDm8bMBoIBw4GtcXcmkW9BtgERq6T5MdgMSdX3tv7g==\",\"secondaryMasterKey\":\"gezxWEOelAMbcEtP2mQzNvGpJj1XbEPd2k5jtm6WZfEYqpBQajaueyon7yG9Mvn2i2BxPUuFT2bBNr20QSNnFA==\",\"primaryReadonlyMasterKey\":\"hmXbpals60WPk0BZNskmCaQxqgABL9yKE5Iux2uDe50473F3vdkHNdxEHI4mxW8E0fzhwe8xJcOil7iRpAWx9w==\",\"secondaryReadonlyMasterKey\":\"fpJUCU2n6l48t4elr2RKSloyWJa6Gl9AxtEAbXoYtGJp7v0a8qTk1s3aY8vfOiOVJQav1IdLSXSq7jHDcUq5fg==\"}" + "Body" : "{\"primaryMasterKey\":\"***REMOVED***\",\"secondaryMasterKey\":\"***REMOVED***\",\"primaryReadonlyMasterKey\":\"***REMOVED***\",\"secondaryReadonlyMasterKey\":\"***REMOVED***\"}" } }, { "Method" : "PUT", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeAdvanceFeatures.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeAdvanceFeatures.json index fb6fd3e750e6c..77b712742e652 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeAdvanceFeatures.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeAdvanceFeatures.json @@ -519,7 +519,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "af43f2f0-d150-4e90-9f92-db71dd5d51c7_M10CH3_M10CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacebe847995d.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Q7cSCcx6Ac5KwpCDPPvEXzOwqq8st3bGHZJfRUx6WkE=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacebe847995d.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=O5vX7GKgWoQWYb95fqh5CfVB31lXAeZ5tK4HVqxDriI=\",\"primaryKey\":\"Q7cSCcx6Ac5KwpCDPPvEXzOwqq8st3bGHZJfRUx6WkE=\",\"secondaryKey\":\"O5vX7GKgWoQWYb95fqh5CfVB31lXAeZ5tK4HVqxDriI=\",\"keyName\":\"RootManageSharedAccessKey\"}" + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacebe847995d.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespacebe847995d.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" } }, { "Method" : "DELETE", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeBasic.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeBasic.json index e72ca94586123..34dbed31b7a69 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeBasic.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeBasic.json @@ -410,7 +410,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "81a1c11b-c1e1-40a8-aa4c-3e9517090d0e_M9CH3_M9CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SB2pU7XcFe6s9JQ99TjVe5CXoU/mowFDOWYnJel6j8k=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=KLmtlpiXfyjSpYexoLNksGp8w6rq87MTa4MEbmqCKco=\",\"primaryKey\":\"SB2pU7XcFe6s9JQ99TjVe5CXoU/mowFDOWYnJel6j8k=\",\"secondaryKey\":\"KLmtlpiXfyjSpYexoLNksGp8w6rq87MTa4MEbmqCKco=\",\"keyName\":\"RootManageSharedAccessKey\"}" + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" } }, { "Method" : "POST", @@ -438,7 +438,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "1dcff976-8365-415d-8d7e-4332edbe2941_M9CH3_M9CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SB2pU7XcFe6s9JQ99TjVe5CXoU/mowFDOWYnJel6j8k=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=hY8zK1xZuCH05t0ae+nB97vt+I8tNIsXg4YTyTTtoYY=\",\"primaryKey\":\"SB2pU7XcFe6s9JQ99TjVe5CXoU/mowFDOWYnJel6j8k=\",\"secondaryKey\":\"hY8zK1xZuCH05t0ae+nB97vt+I8tNIsXg4YTyTTtoYY=\",\"keyName\":\"RootManageSharedAccessKey\"}" + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" } }, { "Method" : "PUT", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueAdvanceFeatures.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueAdvanceFeatures.json index 6550e3261b5d7..05b542f66c6fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueAdvanceFeatures.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueAdvanceFeatures.json @@ -326,7 +326,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "c81e69e3-ddb0-43c5-bd95-3e16f03a035e_M5CH3_M5CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace839795598.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=yFBUOgfUlL0FcO+gOTUk4/pW0VEBokoIKgpMtzTRNao=\",\"secondaryConnectionString\":\"Endpoint=sb://namespace839795598.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=NXIuxEXSYF5cxeOzBrj1l5Gl7p9F37r1k79xbg2plU8=\",\"primaryKey\":\"yFBUOgfUlL0FcO+gOTUk4/pW0VEBokoIKgpMtzTRNao=\",\"secondaryKey\":\"NXIuxEXSYF5cxeOzBrj1l5Gl7p9F37r1k79xbg2plU8=\",\"keyName\":\"RootManageSharedAccessKey\"}" + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace839795598.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace839795598.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" } }, { "Method" : "PUT", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueBasic.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueBasic.json index 9c2e716cbe75a..a06c8d12e4bfd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueBasic.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueBasic.json @@ -437,7 +437,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "662d7b71-9a51-4edf-b884-e72023c3a0bb_M3CH3_M3CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=oqmjUy2rDMfTzLGzshqKeVK0+K2cP46vGje+e9iE15g=\",\"secondaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=dM7w4CQMvUXRD4gTrx+RJYNpa4BJURL+pdZPW95QhFQ=\",\"primaryKey\":\"oqmjUy2rDMfTzLGzshqKeVK0+K2cP46vGje+e9iE15g=\",\"secondaryKey\":\"dM7w4CQMvUXRD4gTrx+RJYNpa4BJURL+pdZPW95QhFQ=\",\"keyName\":\"RootManageSharedAccessKey\"}" + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" } }, { "Method" : "POST", @@ -465,7 +465,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "047de933-15c4-461c-88df-0aaa43eb2e55_M3CH3_M3CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=oqmjUy2rDMfTzLGzshqKeVK0+K2cP46vGje+e9iE15g=\",\"secondaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=MyeY8+gcsykpDcstI8JjlVtXhGQ4ekhVZVtQf8pNryU=\",\"primaryKey\":\"oqmjUy2rDMfTzLGzshqKeVK0+K2cP46vGje+e9iE15g=\",\"secondaryKey\":\"MyeY8+gcsykpDcstI8JjlVtXhGQ4ekhVZVtQf8pNryU=\",\"keyName\":\"RootManageSharedAccessKey\"}" + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" } }, { "Method" : "DELETE", diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusWithClaimBasedAuthorization.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusWithClaimBasedAuthorization.json index f259395ca451b..8ee5ccb4a229e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusWithClaimBasedAuthorization.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusWithClaimBasedAuthorization.json @@ -410,7 +410,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "5ad02cee-7b6b-435f-8438-614354403ec5_M11CH3_M11CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace82e20752f.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=aC2ZIEcRZtz0REf5hXdvXKKNgD0OT2P7QHWWAvUKWMk=\",\"secondaryConnectionString\":\"Endpoint=sb://namespace82e20752f.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=GNvXqJRgykUQSoVhcOCoWlFJXWuwRWIQWlnVi1W4U/I=\",\"primaryKey\":\"aC2ZIEcRZtz0REf5hXdvXKKNgD0OT2P7QHWWAvUKWMk=\",\"secondaryKey\":\"GNvXqJRgykUQSoVhcOCoWlFJXWuwRWIQWlnVi1W4U/I=\",\"keyName\":\"SendRule\"}" + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace82e20752f.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace82e20752f.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"SendRule\"}" } }, { "Method" : "DELETE", diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 59fa751fb0f57..d189150b90b1c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -140,6 +140,11 @@ azure-resourcemanager-redis 2.0.0-beta.4 + + com.azure.resourcemanager + azure-resourcemanager-eventhubs + 2.0.0-beta.4 + org.junit.jupiter junit-jupiter-engine diff --git a/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java index 3a2304e5065b0..d5161edc64689 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java @@ -47,6 +47,10 @@ import com.azure.resourcemanager.cosmos.models.CosmosDBAccounts; import com.azure.resourcemanager.dns.DnsZoneManager; import com.azure.resourcemanager.dns.models.DnsZones; +import com.azure.resourcemanager.eventhubs.EventHubsManager; +import com.azure.resourcemanager.eventhubs.models.EventHubDisasterRecoveryPairings; +import com.azure.resourcemanager.eventhubs.models.EventHubNamespaces; +import com.azure.resourcemanager.eventhubs.models.EventHubs; import com.azure.resourcemanager.keyvault.KeyVaultManager; import com.azure.resourcemanager.keyvault.models.Vaults; import com.azure.resourcemanager.monitor.MonitorManager; @@ -132,7 +136,7 @@ public final class Azure { // private final AuthorizationManager authorizationManager; private final MSIManager msiManager; private final MonitorManager monitorManager; - // private final EventHubManager eventHubManager; + private final EventHubsManager eventHubsManager; private final AppPlatformManager appPlatformManager; private final PrivateDnsZoneManager privateDnsZoneManager; private final Authenticated authenticated; @@ -381,7 +385,7 @@ private Azure(HttpPipeline httpPipeline, AzureProfile profile, Authenticated aut // this.authorizationManager = AuthorizationManager.authenticate(restClient, subscriptionId, sdkContext); this.msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); this.monitorManager = MonitorManager.authenticate(httpPipeline, profile, sdkContext); - // this.eventHubManager = EventHubManager.authenticate(restClient, subscriptionId, sdkContext); + this.eventHubsManager = EventHubsManager.authenticate(httpPipeline, profile, sdkContext); this.appPlatformManager = AppPlatformManager.authenticate(httpPipeline, profile, sdkContext); this.privateDnsZoneManager = PrivateDnsZoneManager.authenticate(httpPipeline, profile, sdkContext); this.authenticated = authenticated; @@ -768,30 +772,27 @@ public AlertRules alertRules() { public AutoscaleSettings autoscaleSettings() { return this.monitorManager.autoscaleSettings(); } - // - // /** - // * @return entry point to managing event hub namespaces. - // */ - // @Beta(SinceVersion.V1_7_0) - // public EventHubNamespaces eventHubNamespaces() { - // return this.eventHubManager.namespaces(); - // } - // - // /** - // * @return entry point to managing event hubs. - // */ - // @Beta(SinceVersion.V1_7_0) - // public EventHubs eventHubs() { - // return this.eventHubManager.eventHubs(); - // } - // - // /** - // * @return entry point to managing event hub namespace geo disaster recovery. - // */ - // @Beta(SinceVersion.V1_7_0) - // public EventHubDisasterRecoveryPairings eventHubDisasterRecoveryPairings() { - // return this.eventHubManager.eventHubDisasterRecoveryPairings(); - // } + + /** + * @return entry point to managing event hub namespaces. + */ + public EventHubNamespaces eventHubNamespaces() { + return this.eventHubsManager.namespaces(); + } + + /** + * @return entry point to managing event hubs. + */ + public EventHubs eventHubs() { + return this.eventHubsManager.eventHubs(); + } + + /** + * @return entry point to managing event hub namespace geo disaster recovery. + */ + public EventHubDisasterRecoveryPairings eventHubDisasterRecoveryPairings() { + return this.eventHubsManager.eventHubDisasterRecoveryPairings(); + } /** @return entry point to manage compute galleries. */ public Galleries galleries() { diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testRedis.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testRedis.json index 6c1c27cea71cc..10b53903c6263 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testRedis.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testRedis.json @@ -100,7 +100,7 @@ "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/redis66337group/providers/Microsoft.Cache/redis/redis66337?api-version=2018-03-01", "cache-control" : "no-cache", "x-ms-request-id" : "811a055d-e9ff-430a-8d23-1f3603bd4e64", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/redis66337group/providers/Microsoft.Cache/Redis/redis66337\",\"location\":\"East US\",\"name\":\"redis66337\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{\"mytag\":\"testtag\"},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Standard\",\"family\":\"C\",\"capacity\":0},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"256\",\"maxmemory-reserved\":\"2\",\"maxfragmentationmemory-reserved\":\"12\",\"maxmemory-delta\":\"2\"},\"accessKeys\":{\"primaryKey\":\"KLZuFk4EyF39mDkzgKFsBhlXNJe2mP3PyDPDC9ipsgg=\",\"secondaryKey\":\"LeqvWXGTy2XH7gB6Z+QuzhUePUHdznUvvtTzHCNFDrU=\"},\"hostName\":\"redis66337.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/redis66337group/providers/Microsoft.Cache/Redis/redis66337\",\"location\":\"East US\",\"name\":\"redis66337\",\"type\":\"Microsoft.Cache/Redis\",\"tags\":{\"mytag\":\"testtag\"},\"properties\":{\"provisioningState\":\"Creating\",\"redisVersion\":\"4.0.14\",\"sku\":{\"name\":\"Standard\",\"family\":\"C\",\"capacity\":0},\"enableNonSslPort\":false,\"redisConfiguration\":{\"maxclients\":\"256\",\"maxmemory-reserved\":\"2\",\"maxfragmentationmemory-reserved\":\"12\",\"maxmemory-delta\":\"2\"},\"accessKeys\":{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"},\"hostName\":\"redis66337.redis.cache.windows.net\",\"port\":6379,\"sslPort\":6380,\"linkedServers\":[]}}" } }, { "Method" : "GET", diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceAnySku.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceAnySku.json index 87ce9f58d2c90..f5a9998976bb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceAnySku.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceAnySku.json @@ -879,7 +879,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "eedb9349-9375-4522-b8e3-072cbcb90a56", - "Body" : "{\"primaryKey\":\"A6E7AC4B810F11A3FECC443C8FF24AF1\",\"secondaryKey\":\"3B4AC761ABD21E8910989A8B1BCB9323\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -935,7 +935,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "46591e2c-aef7-4249-b347-4a89f3adb9ff", - "Body" : "{\"primaryKey\":\"A6E7AC4B810F11A3FECC443C8FF24AF1\",\"secondaryKey\":\"3B4AC761ABD21E8910989A8B1BCB9323\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1852,7 +1852,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "f4287cbf-8214-4ee4-92d3-547c76d5b09d", - "Body" : "{\"primaryKey\":\"A6E7AC4B810F11A3FECC443C8FF24AF1\",\"secondaryKey\":\"3B4AC761ABD21E8910989A8B1BCB9323\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1993,7 +1993,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "4b570ee3-f6bb-4a30-b8e0-c0f0bbfc1136", - "Body" : "{\"primaryKey\":\"A6E7AC4B810F11A3FECC443C8FF24AF1\",\"secondaryKey\":\"3B4AC761ABD21E8910989A8B1BCB9323\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -2021,7 +2021,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "05e84194-dc87-4aa2-8e2b-b17dccb63f93", - "Body" : "{\"primaryKey\":\"A6E7AC4B810F11A3FECC443C8FF24AF1\",\"secondaryKey\":\"3B4AC761ABD21E8910989A8B1BCB9323\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -2101,7 +2101,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "ba6016a9-c96e-47c7-9822-e9f8861580f9", - "Body" : "{\"primaryKey\":\"8CA59418170B2C85BF284AB0D1E59605\",\"secondaryKey\":\"3B4AC761ABD21E8910989A8B1BCB9323\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -2129,7 +2129,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "64ae2303-489f-45e7-bfc3-423b97dfc5ed", - "Body" : "{\"primaryKey\":\"8CA59418170B2C85BF284AB0D1E59605\",\"secondaryKey\":\"6E6D3C6A24499F835827CA19DC8AB23E\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -2185,7 +2185,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "1e8a1824-2fa5-4e40-9d0b-b9aebfd139aa", - "Body" : "{\"primaryKey\":\"8CA59418170B2C85BF284AB0D1E59605\",\"secondaryKey\":\"6E6D3C6A24499F835827CA19DC8AB23E\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -2213,7 +2213,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "804ebb98-19ed-4079-b64c-4c7b2031bd41", - "Body" : "{\"primaryKey\":\"8CA59418170B2C85BF284AB0D1E59605\",\"secondaryKey\":\"6E6D3C6A24499F835827CA19DC8AB23E\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "POST", @@ -2241,7 +2241,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "3acb99d0-4cc5-4307-8756-f8fe15df40d9", - "Body" : "{\"primaryKey\":\"8CA59418170B2C85BF284AB0D1E59605\",\"secondaryKey\":\"6E6D3C6A24499F835827CA19DC8AB23E\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceBasicSku.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceBasicSku.json index 72a76b7c37da1..de8ac3d4b8daf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceBasicSku.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceBasicSku.json @@ -876,7 +876,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "97baf4a4-ca9e-4d82-bfad-9564e09750b0", - "Body" : "{\"primaryKey\":\"5B8B0EC74B686241C01416C2FF8BD3BB\",\"secondaryKey\":\"7FD603E8CE8C6864D7FA475826A014A0\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1818,7 +1818,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "6b1f51d3-f16e-443f-b383-50358d03930a", - "Body" : "{\"primaryKey\":\"5B8B0EC74B686241C01416C2FF8BD3BB\",\"secondaryKey\":\"7FD603E8CE8C6864D7FA475826A014A0\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1903,7 +1903,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "edebc7b9-87e6-409e-9ae0-d0b44032c614", - "Body" : "{\"primaryKey\":\"5B8B0EC74B686241C01416C2FF8BD3BB\",\"secondaryKey\":\"7FD603E8CE8C6864D7FA475826A014A0\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceFreeSku.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceFreeSku.json index 0520a1eb121e7..1b03a763b2c8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceFreeSku.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceFreeSku.json @@ -426,7 +426,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "9f701a9e-fb04-485d-9b27-4ae8c50f2871", - "Body" : "{\"primaryKey\":\"439FA1B5D4785AB3DC8BF4DA1EDC8105\",\"secondaryKey\":\"A237AD467E79D1F64ACE5FF197B65EC7\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -918,7 +918,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "5d5f279c-4515-48df-bafd-597e1477bd91", - "Body" : "{\"primaryKey\":\"439FA1B5D4785AB3DC8BF4DA1EDC8105\",\"secondaryKey\":\"A237AD467E79D1F64ACE5FF197B65EC7\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -1003,7 +1003,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "a1d954e0-b5c6-485d-b20c-385b3b82d30b", - "Body" : "{\"primaryKey\":\"439FA1B5D4785AB3DC8BF4DA1EDC8105\",\"secondaryKey\":\"A237AD467E79D1F64ACE5FF197B65EC7\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceStandardSku.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceStandardSku.json index fe750fb639fc0..9964d722988dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceStandardSku.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testSearchServiceStandardSku.json @@ -2478,7 +2478,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "3677ebb3-54c1-47d2-aa3d-fb4937c7d6a3", - "Body" : "{\"primaryKey\":\"8434F43A0E9A31153CDA4B002CE2F8A3\",\"secondaryKey\":\"71DF6F5EF0652AAF8B64E38847DD09EF\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -3345,7 +3345,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "9b1c6c6c-9c1d-448b-8206-d04399671585", - "Body" : "{\"primaryKey\":\"8434F43A0E9A31153CDA4B002CE2F8A3\",\"secondaryKey\":\"71DF6F5EF0652AAF8B64E38847DD09EF\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", @@ -4606,7 +4606,7 @@ "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", "x-ms-request-id" : "11e6e50d-3dd0-4921-b5aa-175db2014899", - "Body" : "{\"primaryKey\":\"8434F43A0E9A31153CDA4B002CE2F8A3\",\"secondaryKey\":\"71DF6F5EF0652AAF8B64E38847DD09EF\"}" + "Body" : "{\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\"}" } }, { "Method" : "GET", diff --git a/sdk/resourcemanager/credcheck.js b/sdk/resourcemanager/credcheck.js index d880b59830ea3..52eacc89e0b50 100644 --- a/sdk/resourcemanager/credcheck.js +++ b/sdk/resourcemanager/credcheck.js @@ -11,6 +11,13 @@ function credcheck(dir) { redactDict.set(/\\"keyName\\":\\"key1\\",\\"value\\":\\"(.*?)\\"/g, '\\"keyName\\":\\"key1\\",\\"value\\":\\"***REMOVED***\\"'); redactDict.set(/\\"keyName\\":\\"key2\\",\\"value\\":\\"(.*?)\\"/g, '\\"keyName\\":\\"key2\\",\\"value\\":\\"***REMOVED***\\"'); redactDict.set(/;AccountKey=(.*?)(;|\\")/g, ';AccountKey=***REMOVED***$2'); + redactDict.set(/\\"primaryMasterKey\\":\\"(.*?)\\"/g, '\\"primaryMasterKey\\":\\"***REMOVED***\\"'); + redactDict.set(/\\"primaryReadonlyMasterKey\\":\\"(.*?)\\"/g, '\\"primaryReadonlyMasterKey\\":\\"***REMOVED***\\"'); + redactDict.set(/\\"secondaryMasterKey\\":\\"(.*?)\\"/g, '\\"secondaryMasterKey\\":\\"***REMOVED***\\"'); + redactDict.set(/\\"secondaryReadonlyMasterKey\\":\\"(.*?)\\"/g, '\\"secondaryReadonlyMasterKey\\":\\"***REMOVED***\\"'); + redactDict.set(/;SharedAccessKey=(.*?)(;|\\")/g, ';SharedAccessKey=***REMOVED***$2'); + redactDict.set(/\\"primaryKey\\":\\"(.*?)\\"/g, '\\"primaryKey\\":\\"***REMOVED***\\"'); + redactDict.set(/\\"secondaryKey\\":\\"(.*?)\\"/g, '\\"secondaryKey\\":\\"***REMOVED***\\"'); credcheckRecursive(dir, redactDict); } diff --git a/sdk/resourcemanager/pom.xml b/sdk/resourcemanager/pom.xml index 2fa6d0f6ba8e4..fd6eef5755963 100644 --- a/sdk/resourcemanager/pom.xml +++ b/sdk/resourcemanager/pom.xml @@ -19,6 +19,7 @@ azure-resourcemanager-containerservice azure-resourcemanager-cosmos azure-resourcemanager-dns + azure-resourcemanager-eventhubs azure-resourcemanager-keyvault azure-resourcemanager-monitor azure-resourcemanager-msi From a5acccf35cbf14ce990188b4f60920bc7f3a6292 Mon Sep 17 00:00:00 2001 From: M <19926623+moarychan@users.noreply.github.com> Date: Mon, 31 Aug 2020 12:55:30 +0800 Subject: [PATCH 006/168] Implement new version schema for cosmosdb starter (#14465) * Correct usage, small time is first parameter, otherwise the result is negative * update cosmosdb starter artfact id * Implement new version schema for cosmosdb starter https://github.com/Azure/azure-sdk-for-java/issues/14369 * update readme link broken;add python ignore dir * update readme link broken * update indentation * refer to reviewer' comment and update * refer to reviewer' comment and update * refer to reviewer's comment and update * update change log * fix test error and update python code * fix test error * update indentation and markdown * update python log * update pom description * update indentation in spring/test.yml * update readme link address * update readme link address * update spring live test config * update spring live test config --- .gitignore | 4 + eng/jacoco-test-coverage/pom.xml | 9 +- .../templates/stages/cosmos-sdk-client.yml | 4 +- eng/versioning/external_dependencies.txt | 9 + eng/versioning/version_client.txt | 3 +- sdk/cosmos/tests.yml | 4 +- sdk/spring/README.md | 4 +- .../CHANGELOG.md | 4 + .../README.md | 57 +++++ .../pom.xml | 181 ++++++++++++++++ .../src/main/resources/cosmosdb.enable.config | 0 .../CHANGELOG.md | 0 .../README.md | 14 +- .../pom.xml | 8 +- .../src/main/resources/cosmosdb.enable.config | 1 + .../pom.xml | 4 +- .../azure-spring-boot-sample-cosmosdb/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../azure-spring-boot-starter/README.md | 3 +- .../azure-spring-boot-test-cosmosdb/pom.xml | 6 +- sdk/spring/azure-spring-boot/README.md | 3 +- sdk/spring/ci.yml | 7 +- sdk/spring/pom.xml | 3 +- sdk/spring/scripts/artifact_id_pair.py | 11 + sdk/spring/scripts/replace_artifact.py | 108 ---------- sdk/spring/scripts/replace_util.py | 202 ++++++++++++++++++ sdk/spring/scripts/version_update_item.py | 11 + sdk/spring/tests.yml | 40 ++++ 29 files changed, 570 insertions(+), 142 deletions(-) create mode 100644 sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/CHANGELOG.md create mode 100644 sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md create mode 100644 sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/pom.xml rename sdk/spring/{azure-spring-boot-starter-cosmosdb => azure-spring-boot-2-2-starter-cosmosdb}/src/main/resources/cosmosdb.enable.config (100%) rename sdk/spring/{azure-spring-boot-starter-cosmosdb => azure-spring-boot-2-3-starter-cosmosdb}/CHANGELOG.md (100%) rename sdk/spring/{azure-spring-boot-starter-cosmosdb => azure-spring-boot-2-3-starter-cosmosdb}/README.md (94%) rename sdk/spring/{azure-spring-boot-starter-cosmosdb => azure-spring-boot-2-3-starter-cosmosdb}/pom.xml (96%) create mode 100644 sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/src/main/resources/cosmosdb.enable.config create mode 100644 sdk/spring/scripts/artifact_id_pair.py delete mode 100644 sdk/spring/scripts/replace_artifact.py create mode 100644 sdk/spring/scripts/replace_util.py create mode 100644 sdk/spring/scripts/version_update_item.py diff --git a/.gitignore b/.gitignore index 9dbe97f68a396..0160ec82cf1ff 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,7 @@ jacoco.exec # Generated client pom file ClientAggregatePom.xml + + +# Anaconda virtual +venv diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 1a46c99bc574a..5dbf3eeaf2a16 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -354,8 +354,13 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-2-3-starter + 2.4.0-beta.1 + + + com.microsoft.azure + azure-cosmosdb-spring-boot-2-2-starter + 2.4.0-beta.1 com.microsoft.azure diff --git a/eng/pipelines/templates/stages/cosmos-sdk-client.yml b/eng/pipelines/templates/stages/cosmos-sdk-client.yml index 5496e68350f6e..2d6e1c7948f2a 100644 --- a/eng/pipelines/templates/stages/cosmos-sdk-client.yml +++ b/eng/pipelines/templates/stages/cosmos-sdk-client.yml @@ -153,9 +153,9 @@ stages: - script: | python --version python -m pip install setuptools termcolor in_place - python sdk/spring/scripts/replace_artifact.py --module cosmos --log debug --color false + python sdk/spring/scripts/replace_util.py --module cosmos --log debug --color false condition: eq(variables['DisplayName'], 'Spring Emulator only Integration Tests') - displayName: 'Run replace_artifact.py' + displayName: 'Run replace_util.py' - task: Maven@3 condition: eq(variables['DisplayName'], 'Spring Emulator only Integration Tests') displayName: 'Run tests again: $(DisplayName)' diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index d196e51c20d68..a7947d4cc65f5 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -320,5 +320,14 @@ storage_com.microsoft.azure:azure-storage;8.4.0 # sdk\spring\azure-spring-boot\pom.xml spring_com.microsoft.azure:azure;1.34.0 +# sdk\spring\azure-spring-boot-2-2-starter-cosmosdb\pom.xml +springboot22_com.microsoft.azure:spring-data-cosmosdb;2.2.2.M2 +springboot22_org.springframework.boot:spring-boot-starter;2.2.9.RELEASE +springboot22_org.springframework.boot:spring-boot;2.2.9.RELEASE +springboot22_org.springframework.boot:spring-boot-starter-validation;2.2.9.RELEASE +springboot22_org.springframework.boot:spring-boot-starter-test;2.2.9.RELEASE +springboot22_org.springframework.boot:spring-boot-starter-actuator;2.2.9.RELEASE +springboot22_org.springframework.boot:spring-boot-starter-web;2.2.9.RELEASE + # sdk\cosmos springdata22_org.springframework.data:spring-data-commons;2.2.9.RELEASE diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 59f822acb45f5..dfe4903af7e7c 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -85,7 +85,8 @@ com.azure.resourcemanager:azure-resourcemanager-storage;2.0.0-beta.3;2.0.0-beta. com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.4;2.0.0-beta.4 com.microsoft.azure:azure-active-directory-b2c-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-cosmosdb-spring-boot-starter;2.3.3;2.4.0-beta.1 +com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter;2.4.0-beta.1;2.4.0-beta.1 +com.microsoft.azure:azure-cosmosdb-spring-boot-2-2-starter;2.4.0-beta.1;2.4.0-beta.1 com.microsoft.azure:azure-data-gremlin-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.3.3;2.4.0-beta.1 diff --git a/sdk/cosmos/tests.yml b/sdk/cosmos/tests.yml index c048cb8791f65..761a1ca6c0be3 100644 --- a/sdk/cosmos/tests.yml +++ b/sdk/cosmos/tests.yml @@ -270,8 +270,8 @@ jobs: - script: | python --version python -m pip install setuptools termcolor in_place - python sdk/spring/scripts/replace_artifact.py --module cosmos --log debug --color false - displayName: 'Run replace_artifact.py' + python sdk/spring/scripts/replace_util.py --module cosmos --log debug --color false + displayName: 'Run replace_util.py' - task: Maven@3 displayName: 'Build and Install again, JDK Version: $(JavaBuildVersion)' inputs: diff --git a/sdk/spring/README.md b/sdk/spring/README.md index 4a831a548a9d5..f7f3fc17bf14a 100644 --- a/sdk/spring/README.md +++ b/sdk/spring/README.md @@ -25,7 +25,9 @@ Starter Name | Version for Spring Boot 2.3.x | Version for Spring Boot 2.2.x | V [azure-storage-spring-boot-starter](azure-spring-boot-starter-storage/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-storage-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.0.*) [azure-keyvault-secrets-spring-boot-starter](azure-spring-boot-starter-keyvault-secrets/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-keyvault-secrets-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.0.*) [azure-active-directory-b2c-spring-boot-starter](azure-spring-boot-starter-active-directory-b2c/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-active-directory-b2c-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.2.*) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.1.*) | N/A -[azure-cosmosdb-spring-boot-starter](azure-spring-boot-starter-cosmosdb/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*) +azure-cosmosdb-spring-boot-starter | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*) +[azure-cosmosdb-spring-boot-2-2-starter](azure-spring-boot-2-2-starter-cosmosdb/README.md) | N/A | N/A | N/A | N/A +[azure-cosmosdb-spring-boot-2-3-starter](azure-spring-boot-2-3-starter-cosmosdb/README.md) | N/A | N/A | N/A | N/A [azure-mediaservices-spring-boot-starter](azure-spring-boot-starter-mediaservices/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-mediaservices-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.0.*) [azure-servicebus-spring-boot-starter](azure-spring-boot-starter-servicebus/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-servicebus-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.0.*) [spring-data-gremlin-boot-starter](azure-spring-boot-starter-data-gremlin/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22spring-data-gremlin-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.0.*) diff --git a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/CHANGELOG.md b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/CHANGELOG.md new file mode 100644 index 0000000000000..b995c29e5fc99 --- /dev/null +++ b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + + +## 2.4.0-beta.1 (Unreleased) diff --git a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md new file mode 100644 index 0000000000000..0d606e3065544 --- /dev/null +++ b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md @@ -0,0 +1,57 @@ +# Azure Cosmos DB Spring Boot 2.2 Starter client library for Java + +[Azure Cosmos DB](https://azure.microsoft.com/services/cosmos-db/) is a globally-distributed database service that allows developers to work with data using a variety of standard APIs, such as SQL, MongoDB, Graph, and Azure Table storage. + +[Package (Maven)][package] | [API reference documentation][refdocs] | [Product documentation][docs] | [Samples][sample] + +## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven](http://maven.apache.org/) 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:azure-cosmosdb-spring-boot-2-2-starter;current}) +```xml + + com.microsoft.azure + azure-cosmosdb-spring-boot-2-2-starter + 2.4.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +## Key concepts +Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_key_concepts] for key concepts. + +## Examples +Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_examples] for examples. + +## Troubleshooting +Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_troubleshooting] for troubleshooting. + +## Next steps + +Besides using this Azure CosmosDb Spring Boot Starter, you can directly use Spring Data for Azure CosmosDb package for more complex scenarios. Please refer to [Spring Data for Azure CosmosDB](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core) for more details. + +The following section provide a sample project illustrating how to use the starter. +### More sample code +- [Cosmos DB SQL API][cosmos_db_sql_api] + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_readme] to build from source or contribute. + + +[docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-cosmos-db +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#azure-cosmosdb-spring-boot-starter +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/azure-cosmosdb-spring-boot-starter +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[azure_spring_boot_2_3_starter_cosmosdb_readme_key_concepts]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#key-concepts +[azure_spring_boot_2_3_starter_cosmosdb_readme_examples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#examples +[azure_spring_boot_2_3_starter_cosmosdb_readme_troubleshooting]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#troubleshooting +[cosmos_db_sql_api]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb +[contributing_readme]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md diff --git a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/pom.xml new file mode 100644 index 0000000000000..7e37ea64bd44c --- /dev/null +++ b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/pom.xml @@ -0,0 +1,181 @@ + + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.microsoft.azure + azure-cosmosdb-spring-boot-2-2-starter + 2.4.0-beta.1 + + Azure Cosmos DB Spring Boot 2.2 Starter + Spring Boot 2.2 Starter for Azure Cosmos DB service + https://github.com/Azure/azure-sdk-for-java + + + + org.springframework.boot + spring-boot-starter + 2.2.9.RELEASE + + + org.springframework.boot + spring-boot-starter-validation + 2.2.9.RELEASE + + + com.microsoft.azure + azure-spring-boot + 2.4.0-beta.1 + + + com.microsoft.azure + spring-data-cosmosdb + 2.2.2.M2 + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + + + com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] + com.microsoft.azure:spring-data-cosmosdb:[2.2.2.M2] + org.springframework.boot:spring-boot-starter:[2.2.9.RELEASE] + org.springframework.boot:spring-boot-starter-validation:[2.2.9.RELEASE] + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + + attach-javadocs + + jar + + + true + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + empty-javadoc-jar-with-readme + package + + jar + + + javadoc + ${project.basedir}/javadocTemp + + + + + + empty-sources-jar-with-readme + package + + jar + + + sources + ${project.basedir}/sourceTemp + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + copy-readme-to-javadocTemp + prepare-package + + + Deleting existing ${project.basedir}/javadocTemp + + + + Copying ${project.basedir}/README.md to + ${project.basedir}/javadocTemp/README.md + + + + + + run + + + + copy-readme-to-sourceTemp + prepare-package + + + Deleting existing ${project.basedir}/sourceTemp + + + + Copying ${project.basedir}/README.md to + ${project.basedir}/sourceTemp/README.md + + + + + + run + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + none + + + + + + + diff --git a/sdk/spring/azure-spring-boot-starter-cosmosdb/src/main/resources/cosmosdb.enable.config b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/src/main/resources/cosmosdb.enable.config similarity index 100% rename from sdk/spring/azure-spring-boot-starter-cosmosdb/src/main/resources/cosmosdb.enable.config rename to sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/src/main/resources/cosmosdb.enable.config diff --git a/sdk/spring/azure-spring-boot-starter-cosmosdb/CHANGELOG.md b/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/CHANGELOG.md similarity index 100% rename from sdk/spring/azure-spring-boot-starter-cosmosdb/CHANGELOG.md rename to sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/CHANGELOG.md diff --git a/sdk/spring/azure-spring-boot-starter-cosmosdb/README.md b/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/README.md similarity index 94% rename from sdk/spring/azure-spring-boot-starter-cosmosdb/README.md rename to sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/README.md index c75c96d6a5e8b..99a5854cc9ae4 100644 --- a/sdk/spring/azure-spring-boot-starter-cosmosdb/README.md +++ b/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/README.md @@ -1,4 +1,4 @@ -# Azure Cosmos DB Spring Boot Starter client library for Java +# Azure Cosmos DB Spring Boot 2.3 Starter client library for Java [Azure Cosmos DB](https://azure.microsoft.com/services/cosmos-db/) is a globally-distributed database service that allows developers to work with data using a variety of standard APIs, such as SQL, MongoDB, Graph, and Azure Table storage. @@ -11,12 +11,12 @@ - [Maven](http://maven.apache.org/) 3.0 and above ### Include the package -[//]: # ({x-version-update-start;com.microsoft.azure:azure-cosmosdb-spring-boot-starter;current}) +[//]: # ({x-version-update-start;com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter;current}) ```xml com.microsoft.azure - azure-cosmosdb-spring-boot-starter - 2.3.3 + azure-cosmosdb-spring-boot-2-3-starter + 2.4.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -235,12 +235,12 @@ Besides using this Azure CosmosDb Spring Boot Starter, you can directly use Spri The following section provide a sample project illustrating how to use the starter. ### More sample code -- [Cosmos DB SQL API](../azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb) +- [Cosmos DB SQL API][cosmos_db_sql_api] ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. -Please follow [instructions here](../CONTRIBUTING.md) to build from source or contribute. +Please follow [instructions here][contributing_readme] to build from source or contribute. [docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-cosmos-db @@ -249,3 +249,5 @@ Please follow [instructions here](../CONTRIBUTING.md) to build from source or co [sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb [logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application [azure_subscription]: https://azure.microsoft.com/free +[cosmos_db_sql_api]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb +[contributing_readme]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md diff --git a/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/pom.xml similarity index 96% rename from sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml rename to sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/pom.xml index a9c4a380fd0a6..2893b8da1b2c1 100644 --- a/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/pom.xml @@ -12,11 +12,11 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-2-3-starter + 2.4.0-beta.1 - Azure Cosmos DB Spring Boot Starter - Spring Boot Starter for Azure Document DB service + Azure Cosmos DB Spring Boot 2.3 Starter + Spring Boot 2.3 Starter for Azure Cosmos DB service https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/src/main/resources/cosmosdb.enable.config b/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/src/main/resources/cosmosdb.enable.config new file mode 100644 index 0000000000000..2995a4d0e7491 --- /dev/null +++ b/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/src/main/resources/cosmosdb.enable.config @@ -0,0 +1 @@ +dummy \ No newline at end of file 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 0679465ad6b90..c37a2dd629992 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 @@ -21,8 +21,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-2-3-starter + 2.4.0-beta.1 com.microsoft.azure diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml index 0b34ed7bd23d0..6de0c15674b86 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml @@ -21,8 +21,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-2-3-starter + 2.4.0-beta.1 org.springframework.boot diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml index 6433a1c135d9a..2e6af04539aec 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml @@ -30,8 +30,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-2-3-starter + 2.4.0-beta.1 com.google.guava diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml index 644d98045c0a7..a111862ac459c 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml @@ -31,8 +31,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-2-3-starter + 2.4.0-beta.1 com.google.guava diff --git a/sdk/spring/azure-spring-boot-starter/README.md b/sdk/spring/azure-spring-boot-starter/README.md index 2bf40e9f73681..9f23a4fff799a 100644 --- a/sdk/spring/azure-spring-boot-starter/README.md +++ b/sdk/spring/azure-spring-boot-starter/README.md @@ -35,7 +35,8 @@ Starter Name | Version for Spring Boot 2.3.x | Version for Spring Boot 2.2.x | V [azure-storage-spring-boot-starter](../azure-spring-boot-starter-storage/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-storage-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.0.*) [azure-keyvault-secrets-spring-boot-starter](../azure-spring-boot-starter-keyvault-secrets/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-keyvault-secrets-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.0.*) [azure-active-directory-b2c-spring-boot-starter](../azure-spring-boot-starter-active-directory-b2c/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-active-directory-b2c-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.2.*) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.1.*) | N/A -[azure-cosmosdb-spring-boot-starter](../azure-spring-boot-starter-cosmosdb/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*) +[azure-cosmosdb-spring-boot-2-2-starter](../azure-spring-boot-2-2-starter-cosmosdb/README.md) | N/A | N/A | N/A | N/A +[azure-cosmosdb-spring-boot-2-3-starter](../azure-spring-boot-2-3-starter-cosmosdb/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-2-3-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*) [azure-mediaservices-spring-boot-starter](../azure-spring-boot-starter-mediaservices/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-mediaservices-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.0.*) [azure-servicebus-spring-boot-starter](../azure-spring-boot-starter-servicebus/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-servicebus-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.0.*) [spring-data-gremlin-boot-starter](../azure-spring-boot-starter-data-gremlin/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22spring-data-gremlin-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.0.*) diff --git a/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml index dc244b8da17d3..71086b12e90ce 100644 --- a/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml @@ -17,8 +17,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-2-3-starter + 2.4.0-beta.1 com.azure @@ -57,7 +57,7 @@ - com.microsoft.azure:azure-cosmosdb-spring-boot-starter:[2.4.0-beta.1] + com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter:[2.4.0-beta.1] org.springframework.boot:spring-boot-starter-web:[2.3.3.RELEASE] org.springframework.boot:spring-boot-starter-actuator:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot/README.md b/sdk/spring/azure-spring-boot/README.md index 65463e267c349..1888ceca398cf 100644 --- a/sdk/spring/azure-spring-boot/README.md +++ b/sdk/spring/azure-spring-boot/README.md @@ -43,7 +43,8 @@ This project provides auto-configuration for the following Azure services: - [Azure Active Directory](../azure-spring-boot-starter-active-directory) - [Azure Active Directory B2C](../azure-spring-boot-starter-active-directory-b2c) -- [Cosmos DB SQL API](../azure-spring-boot-starter-cosmosdb) +- [Spring Boot 2.2 for Cosmos DB SQL API](../azure-spring-boot-2-2-starter-cosmosdb) +- [Spring Boot 2.3 for Cosmos DB SQL API](../azure-spring-boot-2-3-starter-cosmosdb) - [Gremlin SQL API](../azure-spring-boot-starter-data-gremlin) - [Key Vault Secrets](../azure-spring-boot-starter-keyvault-secrets) - [Metrics Service](../azure-spring-boot-starter-metrics) diff --git a/sdk/spring/ci.yml b/sdk/spring/ci.yml index 1d5edd75f02ba..9a5987522fe44 100644 --- a/sdk/spring/ci.yml +++ b/sdk/spring/ci.yml @@ -42,9 +42,12 @@ extends: - name: azure-active-directory-b2c-spring-boot-starter groupId: com.microsoft.azure safeName: azurespringbootstarteractivedirectoryb2c - - name: azure-cosmosdb-spring-boot-starter + - name: azure-cosmosdb-spring-boot-2-2-starter groupId: com.microsoft.azure - safeName: azurespringbootstartercosmosdb + safeName: azurespringboot22startercosmosdb + - name: azure-cosmosdb-spring-boot-2-3-starter + groupId: com.microsoft.azure + safeName: azurespringboot23startercosmosdb - name: azure-data-gremlin-spring-boot-starter groupId: com.microsoft.azure safeName: azurespringbootstarterdatagremlin diff --git a/sdk/spring/pom.xml b/sdk/spring/pom.xml index 1a77e7b300987..02f16372a5f69 100644 --- a/sdk/spring/pom.xml +++ b/sdk/spring/pom.xml @@ -13,7 +13,8 @@ azure-spring-boot-starter azure-spring-boot-starter-active-directory azure-spring-boot-starter-active-directory-b2c - azure-spring-boot-starter-cosmosdb + azure-spring-boot-2-2-starter-cosmosdb + azure-spring-boot-2-3-starter-cosmosdb azure-spring-boot-starter-data-gremlin azure-spring-boot-starter-keyvault-secrets azure-spring-boot-starter-metrics diff --git a/sdk/spring/scripts/artifact_id_pair.py b/sdk/spring/scripts/artifact_id_pair.py new file mode 100644 index 0000000000000..18c2f995445fb --- /dev/null +++ b/sdk/spring/scripts/artifact_id_pair.py @@ -0,0 +1,11 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + + +class ArtifactIdPair: + def __init__(self, old_artifact_id, new_artifact_id): + self.old_artifact_id = old_artifact_id + self.new_artifact_id = new_artifact_id + + def __str__(self): + return '[old_artifact_id: {}; new_artifact_id: {}]'.format(self.old_artifact_id, self.new_artifact_id) diff --git a/sdk/spring/scripts/replace_artifact.py b/sdk/spring/scripts/replace_artifact.py deleted file mode 100644 index 87eec38c15a5d..0000000000000 --- a/sdk/spring/scripts/replace_artifact.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - - -import argparse -import os -import time - -import in_place - -from log import log, Log - -config = { - 'cosmos': { - 'artifact_dict': { - 'azure-spring-data-2-3-cosmos': 'azure-spring-data-2-2-cosmos' - }, - 'pom_list': [ - 'sdk/cosmos/azure-spring-data-cosmos-test/pom.xml' - ] - } -} - - -def main(): - start_time = time.time() - change_to_root_dir() - log.debug('Current working directory = {}.'.format(os.getcwd())) - args = get_args() - init_log(args) - replace_artifact(args.module) - elapsed_time = time.time() - start_time - log.info('elapsed_time = {}'.format(elapsed_time)) - - -def change_to_root_dir(): - os.chdir(os.path.dirname(os.path.realpath(__file__))) - os.chdir('../../..') - - -def get_args(): - parser = argparse.ArgumentParser( - description = 'Replace artifact id in pom file.' - ) - parser.add_argument( - '--module', - type = str, - choices = ['spring', 'cosmos'], - required = False, - default = 'cosmos', - help = 'Specify the target module.' - ) - parser.add_argument( - '--log', - type = str, - choices = ['debug', 'info', 'warn', 'error', 'none'], - required = False, - default = 'info', - help = 'Set log level.' - ) - parser.add_argument( - '--color', - type = str, - choices = ['true', 'false'], - required = False, - default = 'true', - help = 'Whether need colorful log.' - ) - return parser.parse_args() - - -def init_log(args): - log_dict = { - 'debug': Log.DEBUG, - 'info': Log.INFO, - 'warn': Log.WARN, - 'error': Log.ERROR, - 'none': Log.NONE - } - log.set_log_level(log_dict[args.log]) - color_dict = { - 'true': True, - 'false': False - } - log.set_color(color_dict[args.color]) - - -def replace_artifact(module): - artifact_dict = config[module]['artifact_dict'] - pom_list = config[module]['pom_list'] - for pom in pom_list: - log.info('Processing file: {}'.format(pom)) - with in_place.InPlace(pom) as file: - line_num = 0 - for line in file: - line_num = line_num + 1 - for key, value in artifact_dict.items(): - new_line = line.replace(key, value) - if line != new_line: - log.debug('Updated line {}'.format(line_num)) - log.debug(' old_line = {}.'.format(line.strip('\n'))) - log.debug(' new_line = {}.'.format(new_line.strip('\n'))) - line = new_line - file.write(line) - - -if __name__ == '__main__': - main() diff --git a/sdk/spring/scripts/replace_util.py b/sdk/spring/scripts/replace_util.py new file mode 100644 index 0000000000000..884af92eb4f4b --- /dev/null +++ b/sdk/spring/scripts/replace_util.py @@ -0,0 +1,202 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + + +import argparse +import os +import time + +import in_place + +from log import log, Log +from artifact_id_pair import ArtifactIdPair +from version_update_item import VersionUpdateItem + +X_VERSION_UPDATE = 'x-version-update' +X_INCLUDE_UPDATE = 'x-include-update' +ARTIFACT_ID_PAIRS = 'artifact_id_pairs' +VERSION_UPDATE_ITEMS = 'version_update_items' + +config = { + 'cosmos': { + 'sdk/cosmos/azure-spring-data-cosmos-test/pom.xml': { + ARTIFACT_ID_PAIRS: ( + ArtifactIdPair('azure-spring-data-2-3-cosmos', 'azure-spring-data-2-2-cosmos'), + ) + } + }, + 'spring': { + 'sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml': { + ARTIFACT_ID_PAIRS: ( + ArtifactIdPair('azure-cosmosdb-spring-boot-2-3-starter', 'azure-cosmosdb-spring-boot-2-2-starter'), + ), + VERSION_UPDATE_ITEMS: ( + VersionUpdateItem('org.springframework.boot:spring-boot-starter-web', '2.2.9.RELEASE'), + VersionUpdateItem('org.springframework.boot:spring-boot-starter-actuator', '2.2.9.RELEASE'), + VersionUpdateItem('org.springframework.boot:spring-boot-starter-test', '2.2.9.RELEASE') + ) + } + } +} + + +def main(): + start_time = time.time() + change_to_root_dir() + log.debug('Current working directory = {}.'.format(os.getcwd())) + args = get_args() + init_log(args) + replace(args.module) + elapsed_time = time.time() - start_time + log.info('elapsed_time = {}'.format(elapsed_time)) + + +def change_to_root_dir(): + os.chdir(os.path.dirname(os.path.realpath(__file__))) + os.chdir('../../..') + + +def get_args(): + parser = argparse.ArgumentParser( + description = 'Replace artifact id in pom file.' + ) + parser.add_argument( + '--module', + type = str, + choices = ['spring', 'cosmos'], + required = False, + default = 'cosmos', + help = 'Specify the target module.' + ) + parser.add_argument( + '--log', + type = str, + choices = ['debug', 'info', 'warn', 'error', 'none'], + required = False, + default = 'info', + help = 'Set log level.' + ) + parser.add_argument( + '--color', + type = str, + choices = ['true', 'false'], + required = False, + default = 'true', + help = 'Whether need colorful log.' + ) + return parser.parse_args() + + +def init_log(args): + log_dict = { + 'debug': Log.DEBUG, + 'info': Log.INFO, + 'warn': Log.WARN, + 'error': Log.ERROR, + 'none': Log.NONE + } + log.set_log_level(log_dict[args.log]) + color_dict = { + 'true': True, + 'false': False + } + log.set_color(color_dict[args.color]) + + +def replace(module): + """ + Replace action + :param module: module name + """ + for pom in config[module].keys(): + replace_artifact_id(module, pom) + replace_version(module, pom) + + +def get_str(tuple_obj): + """ + Return str list for tuple obj for logger. + :param tuple_obj: tuple obj + :return: string list + """ + str_list = list() + for item in tuple_obj: + str_list.append(str(item)) + return str_list + + +def replace_artifact_id(module, pom): + """ + Replace artifactId in dependency and plugin part. + :param module: module name + :param pom: pom file path + """ + log.debug('Replacing artifact id in file: {}'.format(pom, module)) + pom_dict = config[module][pom] + if ARTIFACT_ID_PAIRS not in pom_dict: + log.warn('No config key {} in pom parameters.'.format(ARTIFACT_ID_PAIRS)) + return + + artifact_id_pairs = pom_dict[ARTIFACT_ID_PAIRS] + log.debug('Module: {}, artifact ids: {}'.format(module, get_str(artifact_id_pairs))) + with in_place.InPlace(pom) as file: + line_num = 0 + for line in file: + line_num = line_num + 1 + for artifact_id_pair in artifact_id_pairs: + if artifact_id_pair.old_artifact_id in line: + new_line = line.replace(artifact_id_pair.old_artifact_id, artifact_id_pair.new_artifact_id) + log.debug('Updating artifact id in line {}'.format(line_num)) + log.debug(' old_line = {}.'.format(line.strip('\n'))) + log.debug(' new_line = {}.'.format(new_line.strip('\n'))) + line = new_line + file.write(line) + + +def replace_version(module, pom): + """ + Replace version in dependency and plugin part. + :param module: module name + :param pom: pom file path + """ + log.debug('Replacing version in file: {}'.format(pom)) + pom_dict = config[module][pom] + if VERSION_UPDATE_ITEMS not in pom_dict: + log.warn('No config key {} in pom parameters.'.format(VERSION_UPDATE_ITEMS)) + return + + version_update_items = pom_dict[VERSION_UPDATE_ITEMS] + log.debug('Module: {}, versions: {}'.format(module, get_str(version_update_items))) + with in_place.InPlace(pom) as file: + line_num = 0 + for line in file: + line_num = line_num + 1 + for version_update_item in version_update_items: + if version_update_item.id in line: + # update version in dependency part + if X_VERSION_UPDATE in line: + old_version = line[(line.index('') + 9):line.index('')] + if old_version != version_update_item.new_version: + new_line = line.replace(old_version, version_update_item.new_version) + log.debug('Updating version of dependency in line {}'.format(line_num)) + log.debug(' old_line = {}.'.format(line.strip('\n'))) + log.debug(' new_line = {}.'.format(new_line.strip('\n'))) + line = new_line + else: + log.warn('The same with new version in dependency part.') + # update version in plugin part + elif X_INCLUDE_UPDATE in line: + old_version = line[(line.index('[') + 1):line.index(']')] + if old_version != version_update_item.new_version: + new_line = line.replace(old_version, version_update_item.new_version) + log.debug('Updating line {}'.format(line_num)) + log.debug(' old_line = {}.'.format(line.strip('\n'))) + log.debug(' new_line = {}.'.format(new_line.strip('\n'))) + line = new_line + else: + log.warn('The same with new version in plugin part.') + file.write(line) + + +if __name__ == '__main__': + main() diff --git a/sdk/spring/scripts/version_update_item.py b/sdk/spring/scripts/version_update_item.py new file mode 100644 index 0000000000000..a4f359893b53c --- /dev/null +++ b/sdk/spring/scripts/version_update_item.py @@ -0,0 +1,11 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + + +class VersionUpdateItem: + def __init__(self, id, new_version): + self.id = id + self.new_version = new_version + + def __str__(self): + return '[id: {}; new_version: {}]'.format(self.id, self.new_version) diff --git a/sdk/spring/tests.yml b/sdk/spring/tests.yml index 7b8b25d366fff..2126148090577 100644 --- a/sdk/spring/tests.yml +++ b/sdk/spring/tests.yml @@ -43,3 +43,43 @@ jobs: AAD_SINGLE_TENANT_CLIENT_SECRET: $(java-spring-aad-single-tenant-secret) AAD_SINGLE_TENANT_CLIENT_ID_WITH_ROLE: $(java-spring-aad-single-tenant-id-with-role) AAD_SINGLE_TENANT_CLIENT_SECRET_WITH_ROLE: $(java-spring-aad-single-tenant-secret-with-role) + + PostRunSteps: + - script: | + python --version + python -m pip install setuptools termcolor in_place + python sdk/spring/scripts/replace_util.py --module spring --log debug --color false + displayName: 'Run replace_util.py' + + - task: Maven@3 + displayName: 'Build and Install again, JDK Version: $(JavaBuildVersion)' + inputs: + mavenPomFile: pom.xml + goals: 'install' + options: '$(DefaultOptions) -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -pl $(ProjectList) -am' + mavenOptions: '$(MemoryOptions) $(LoggingOptions)' + javaHomeOption: 'JDKVersion' + jdkVersionOption: $(JavaBuildVersion) + jdkArchitectureOption: 'x64' + publishJUnitResults: false + + - task: Maven@3 + displayName: 'Run tests again, JDK Version: $(JavaBuildVersion)' + inputs: + mavenPomFile: pom.xml + goals: verify + options: '-Dmaven.wagon.http.pool=false $(DefaultOptions) -Dmaven.javadoc.skip=true -Drevapi.skip=true -DskipSpringITs=false -pl $(ProjectList)' + env: + AZURE_TEST_MODE: LIVE + AAD_TENANT_ID_1: $(java-spring-aad-tenant-id-1) + AAD_USER_NAME_1: $(java-spring-aad-user-name-1) + AAD_USER_PASSWORD_1: $(java-spring-aad-user-password-1) + AAD_TENANT_ID_2: $(java-spring-aad-tenant-id-2) + AAD_USER_NAME_2: $(java-spring-aad-user-name-2) + AAD_USER_PASSWORD_2: $(java-spring-aad-user-password-2) + AAD_MULTI_TENANT_CLIENT_ID: $(java-spring-aad-multi-tenant-client-id) + AAD_MULTI_TENANT_CLIENT_SECRET: $(java-spring-aad-multi-tenant-client-secret) + AAD_SINGLE_TENANT_CLIENT_ID: $(java-spring-aad-single-tenant-id) + AAD_SINGLE_TENANT_CLIENT_SECRET: $(java-spring-aad-single-tenant-secret) + AAD_SINGLE_TENANT_CLIENT_ID_WITH_ROLE: $(java-spring-aad-single-tenant-id-with-role) + AAD_SINGLE_TENANT_CLIENT_SECRET_WITH_ROLE: $(java-spring-aad-single-tenant-secret-with-role) From c329352dac2f9cb38e493ca88004a5ded79a3d85 Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Mon, 31 Aug 2020 13:11:44 +0800 Subject: [PATCH 007/168] Mgmt Spring Cloud Deployment update (#14423) * add attach for deployment * update test * fix compile warning * format code * fix test * fix checkstyle * grouping all definition * rename spring cloud test * separate some playback test * cannot remove disk from app * update session-records * fix checkstyle * Add changelog --- .../CHANGELOG.md | 7 +- .../appplatform/AppPlatformManager.java | 1 - .../SpringAppDeploymentImpl.java | 14 +- .../SpringAppDeploymentsImpl.java | 2 +- .../implementation/SpringAppDomainsImpl.java | 2 +- .../implementation/SpringAppImpl.java | 37 +- .../SpringServiceCertificateImpl.java | 5 +- .../implementation/SpringServiceImpl.java | 1 + .../implementation/SpringServicesImpl.java | 1 + .../appplatform/models/SpringApp.java | 52 +- .../models/SpringAppDeployment.java | 66 +- .../models/SpringAppDeployments.java | 4 +- .../appplatform/AppPlatformTest.java | 46 + .../appplatform/SpringCloudLiveOnlyTest.java | 271 +++ .../appplatform/SpringCloudTest.java | 326 +--- .../resources/session-records/canCRUDApp.json | 763 ++++++++ .../session-records/canCRUDServie.json | 1684 +++++++++++++++++ .../samples/ManageSpringCloud.java | 31 +- 18 files changed, 2925 insertions(+), 388 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudLiveOnlyTest.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/session-records/canCRUDApp.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/session-records/canCRUDServie.json diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md index 003c434ede62c..277a90dc04c24 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md @@ -2,4 +2,9 @@ ## 2.0.0-beta.4 (Unreleased) -- TODO +- Updated `api-version` to `2020-07-01` +- Add `defineActiveDeployment` and `getActiveDeployment` in SpringApp +- Removed `withoutTemporaryDisk` and `withoutPersistentDisk` in SpringAppDeployment +- Removed `withSettingsFromDeployment` in SpringAppDeployment +- Removed `deployJar` and `deploySource` in SpringApp +- Changed `serverProperties` to `getServerProperties` and `traceProperties` to `getMonitoringSetting` in SpringService diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java index 02426a2949cdf..8a2f0b7b1b939 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java @@ -3,7 +3,6 @@ package com.azure.resourcemanager.appplatform; - import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.appplatform.implementation.SpringServicesImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentImpl.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentImpl.java index 6a4a6a17b4b06..48a8d0137f25b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentImpl.java @@ -30,10 +30,11 @@ public class SpringAppDeploymentImpl extends ExternalChildResourceImpl - implements SpringAppDeployment, SpringAppDeployment.Definition, SpringAppDeployment.Update { + implements SpringAppDeployment, + SpringAppDeployment.Definition, + SpringAppDeployment.Update { - SpringAppDeploymentImpl(String name, SpringAppImpl parent, - DeploymentResourceInner innerObject) { + SpringAppDeploymentImpl(String name, SpringAppImpl parent, DeploymentResourceInner innerObject) { super(name, parent, innerObject); } @@ -190,7 +191,7 @@ private Mono uploadToStorage(File source, ResourceUploadDefinition option) ShareFileAsyncClient shareFileAsyncClient = createShareFileAsyncClient(option); return shareFileAsyncClient.create(source.length()) .flatMap(fileInfo -> shareFileAsyncClient.uploadFromFile(source.getAbsolutePath())) - .then(Mono.empty()); + .then(Mono.empty()); } catch (Exception e) { return Mono.error(e); } @@ -389,4 +390,9 @@ public SpringAppDeploymentImpl update() { private AppPlatformManager manager() { return parent().manager(); } + + @Override + public SpringAppImpl attach() { + return parent().addActiveDeployment(this); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentsImpl.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentsImpl.java index 3815f685c418b..9e598c8f376a5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentsImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentsImpl.java @@ -18,7 +18,7 @@ public class SpringAppDeploymentsImpl extends ExternalChildResourcesNonCachedImpl< SpringAppDeploymentImpl, SpringAppDeployment, DeploymentResourceInner, SpringAppImpl, SpringApp> - implements SpringAppDeployments { + implements SpringAppDeployments { SpringAppDeploymentsImpl(SpringAppImpl parent) { super(parent, parent.taskGroup(), "SpringAppDeployment"); diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainsImpl.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainsImpl.java index 16462e8241175..1becb376b7be7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainsImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainsImpl.java @@ -19,7 +19,7 @@ public class SpringAppDomainsImpl extends ExternalChildResourcesNonCachedImpl< - SpringAppDomainImpl, SpringAppDomain, CustomDomainResourceInner, SpringAppImpl, SpringApp> + SpringAppDomainImpl, SpringAppDomain, CustomDomainResourceInner, SpringAppImpl, SpringApp> implements SpringAppDomains { SpringAppDomainsImpl(SpringAppImpl parent) { super(parent, parent.taskGroup(), "SpringAppDomain"); diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppImpl.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppImpl.java index f7fa76de3498a..0fafab58ba016 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppImpl.java @@ -121,8 +121,9 @@ public Mono getActiveDeploymentAsync() { } @Override - public SpringAppDeployments deployments() { - return deployments; + @SuppressWarnings("unchecked") + public > SpringAppDeployments deployments() { + return (SpringAppDeployments) deployments; } @Override @@ -205,13 +206,6 @@ public SpringAppImpl withTemporaryDisk(int sizeInGB, String mountPath) { return this; } - @Override - public SpringAppImpl withoutTemporaryDisk() { - ensureProperty(); - inner().properties().withTemporaryDisk(null); - return this; - } - @Override public SpringAppImpl withPersistentDisk(int sizeInGB, String mountPath) { ensureProperty(); @@ -219,13 +213,6 @@ public SpringAppImpl withPersistentDisk(int sizeInGB, String mountPath) { return this; } - @Override - public SpringAppImpl withoutPersistentDisk() { - ensureProperty(); - inner().properties().withPersistentDisk(null); - return this; - } - @Override public SpringAppImpl withActiveDeployment(String name) { ensureProperty(); @@ -291,10 +278,26 @@ public SpringAppImpl withoutServiceBinding(String name) { return this; } - public void withDefaultActiveDeployment() { + @Override + public SpringAppImpl withDefaultActiveDeployment() { String defaultDeploymentName = "default"; withActiveDeployment(defaultDeploymentName); springAppDeploymentToCreate = deployments().define(defaultDeploymentName) .withExistingSource(UserSourceType.JAR, String.format("<%s>", defaultDeploymentName)); + return this; + } + + @Override + @SuppressWarnings("unchecked") + public > + SpringAppDeployment.DefinitionStages.Blank defineActiveDeployment(String name) { + return (SpringAppDeployment.DefinitionStages.Blank) deployments.define(name); + } + + SpringAppImpl addActiveDeployment(SpringAppDeploymentImpl deployment) { + withActiveDeployment(deployment.name()); + springAppDeploymentToCreate = deployment; + return this; } } diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificateImpl.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificateImpl.java index d517c28cc2c35..9316d87b23a90 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificateImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificateImpl.java @@ -13,10 +13,9 @@ public class SpringServiceCertificateImpl extends ExternalChildResourceImpl< - SpringServiceCertificate, CertificateResourceInner, SpringServiceImpl, SpringService> + SpringServiceCertificate, CertificateResourceInner, SpringServiceImpl, SpringService> implements SpringServiceCertificate { - SpringServiceCertificateImpl(String name, SpringServiceImpl parent, - CertificateResourceInner innerObject) { + SpringServiceCertificateImpl(String name, SpringServiceImpl parent, CertificateResourceInner innerObject) { super(name, parent, innerObject); } diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceImpl.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceImpl.java index 93440d1dd0608..4c1fa7c5a0e0e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceImpl.java @@ -34,6 +34,7 @@ public class SpringServiceImpl SpringServiceImpl(String name, ServiceResourceInner innerObject, AppPlatformManager manager) { super(name, innerObject, manager); } + @Override public Sku sku() { return inner().sku(); diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServicesImpl.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServicesImpl.java index b94599001a474..8812da59472ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServicesImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServicesImpl.java @@ -22,6 +22,7 @@ public class SpringServicesImpl SpringService, SpringServiceImpl, ServiceResourceInner, ServicesClient, AppPlatformManager> implements SpringServices { private static final String SPRING_TYPE = "Microsoft.AppPlatform/Spring"; + public SpringServicesImpl(AppPlatformManager manager) { super(manager.inner().getServices(), manager); } diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java index 3e9eefc637c45..db86874da7eed 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java @@ -55,8 +55,11 @@ public interface SpringApp /** @return the active deployment */ Mono getActiveDeploymentAsync(); - /** @return the entry point of the spring app deployment */ - SpringAppDeployments deployments(); + /** + * @param derived type of {@link SpringAppDeployment.DefinitionStages.WithCreate} + * @return the entry point of the spring app deployment + */ + > SpringAppDeployments deployments(); /** @return the entry point of the spring app service binding */ SpringAppServiceBindings serviceBindings(); @@ -72,12 +75,34 @@ public interface SpringApp /** Container interface for all the definitions that need to be implemented. */ interface Definition - extends DefinitionStages.Blank { } + extends DefinitionStages.Blank, + DefinitionStages.WithCreate { } /** Grouping of all the spring app definition stages. */ interface DefinitionStages { /** The first stage of the spring app definition. */ - interface Blank extends WithCreate { } + interface Blank extends WithDeployment { } + + /** + * The stage of a spring app definition allowing to specify an active deployment. + */ + interface WithDeployment { + /** + * Deploys a default package for the spring app with default scale. + * @return the next stage of spring app definition + */ + WithCreate withDefaultActiveDeployment(); + + /** + * Starts the definition of the active deployment for the spring app. + * @param name the name of the deployment + * @param derived type of {@link SpringAppDeployment.DefinitionStages.WithAttach} + * @return the first stage of spring app deployment definition + */ + > + SpringAppDeployment.DefinitionStages.Blank defineActiveDeployment(String name); + } /** The stage of a spring app definition allowing to specify the endpoint. */ interface WithEndpoint { @@ -128,13 +153,6 @@ interface WithDisk { WithCreate withPersistentDisk(int sizeInGB, String mountPath); } - /** - * The stage of a spring app definition allowing to specify an simple active deployment. - * for more operations, use {@link #deployments()} - */ - interface WithDeployment { - } - /** The stage of a spring app update allowing to specify the service binding. */ interface WithServiceBinding { /** @@ -234,12 +252,6 @@ interface WithDisk { */ Update withTemporaryDisk(int sizeInGB, String mountPath); - /** - * Removes the temporary disk for the spring app. - * @return the next stage of spring app update - */ - Update withoutTemporaryDisk(); - /** * Specifies the persistent disk for the spring app. * @param sizeInGB the size of the disk @@ -247,12 +259,6 @@ interface WithDisk { * @return the next stage of spring app update */ Update withPersistentDisk(int sizeInGB, String mountPath); - - /** - * Removes the persistent disk for the spring app. - * @return the next stage of spring app update - */ - Update withoutPersistentDisk(); } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java index a6107d02307fd..f9c3b572e63b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java @@ -8,6 +8,7 @@ import com.azure.resourcemanager.appplatform.fluent.inner.DeploymentResourceInner; import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Attachable; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; import com.azure.resourcemanager.resources.fluentcore.model.Updatable; @@ -75,26 +76,32 @@ public interface SpringAppDeployment /** @return the log file url of the deployment */ Mono getLogFileUrlAsync(); - /** Container interface for all the definitions that need to be implemented. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithSource, - DefinitionStages.WithModule, - DefinitionStages.WithCreate { } + /** + * Container interface for all the definitions that need to be implemented. + * @param the stage of the parent definition to return to after attaching this definition + * @param The return type of final stage, + * usually {@link DefinitionStages.WithCreate} or {@link DefinitionStages.WithAttach} + */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithSource, + DefinitionStages.WithModule, + DefinitionStages.WithCreate, + DefinitionStages.WithAttach { } /** Grouping of all the deployment definition stages. */ interface DefinitionStages { /** The first stage of the deployment definition. */ - interface Blank extends WithSource { } + interface Blank extends WithSource { } /** The stage of a deployment definition allowing to specify the source code or package. */ - interface WithSource { + interface WithSource { /** * Specifies the jar package for the deployment. * @param jar the file of the jar * @return the next stage of deployment definition */ - WithCreate withJarFile(File jar); + T withJarFile(File jar); // Remove compression first due to tar.gz needs extern dependency // /** @@ -109,7 +116,7 @@ interface WithSource { * @param sourceCodeTarGz a tar.gz file of the source code * @return the next stage of deployment definition */ - WithModule withSourceCodeTarGzFile(File sourceCodeTarGz); + WithModule withSourceCodeTarGzFile(File sourceCodeTarGz); /** * Specifies the a existing source in the cloud storage. @@ -117,61 +124,61 @@ interface WithSource { * @param relativePath the relative path gotten from getResourceUploadUrl * @return the next stage of deployment definition */ - WithCreate withExistingSource(UserSourceType type, String relativePath); + T withExistingSource(UserSourceType type, String relativePath); } /** The stage of a deployment definition allowing to specify the module of the source code. */ - interface WithModule { + interface WithModule { /** * Specifies the module of the source code. * @param moduleName the target module of the multi-module source code * @return the next stage of deployment definition */ - WithCreate withTargetModule(String moduleName); + T withTargetModule(String moduleName); /** * Specifies the only module of the source code. * @return the next stage of deployment definition */ - WithCreate withSingleModule(); + T withSingleModule(); } /** The stage of a deployment definition allowing to specify deployment settings. */ - interface WithSettings { + interface WithSettings { /** * Specifies the instance number of the deployment. * @param count the number of the instance * @return the next stage of deployment definition */ - WithCreate withInstance(int count); + T withInstance(int count); /** * Specifies the cpu number of the deployment. * @param cpuCount the number of the cpu * @return the next stage of deployment definition */ - WithCreate withCpu(int cpuCount); + T withCpu(int cpuCount); /** * Specifies the memory of the deployment. * @param sizeInGB the size of the memory in GB * @return the next stage of deployment definition */ - WithCreate withMemory(int sizeInGB); + T withMemory(int sizeInGB); /** * Specifies the runtime version of the deployment. * @param version the runtime version of Java * @return the next stage of deployment definition */ - WithCreate withRuntime(RuntimeVersion version); + T withRuntime(RuntimeVersion version); /** * Specifies the jvm options of the deployment. * @param jvmOptions the argument of jvm * @return the next stage of deployment definition */ - WithCreate withJvmOptions(String jvmOptions); + T withJvmOptions(String jvmOptions); /** * Specifies a environment variable of the deployment. @@ -179,29 +186,36 @@ interface WithSettings { * @param value the value of the environment * @return the next stage of deployment definition */ - WithCreate withEnvironment(String key, String value); + T withEnvironment(String key, String value); /** * Specifies the version of the deployment. * @param versionName the version name of the deployment * @return the next stage of deployment definition */ - WithCreate withVersionName(String versionName); + T withVersionName(String versionName); /** * Activates of the deployment after definition. * @return the next stage of deployment definition */ - WithCreate withActivation(); + T withActivation(); } /** * The stage of the definition which contains all the minimum required inputs for the resource to be created, * but also allows for any other optional settings to be specified. */ - interface WithCreate - extends Creatable, - WithSettings { } + interface Final + extends WithSettings { } + + /** The final stage of the definition allowing to create a deployment */ + interface WithCreate + extends Creatable, Final { } + + /** The final stage of the definition allowing to attach a deployment to its parent */ + interface WithAttach + extends Attachable, Final { } } /** The template for an update operation, containing all the settings that can be modified. */ diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployments.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployments.java index 94b05124a722e..17918b6497b79 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployments.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployments.java @@ -20,11 +20,11 @@ /** Entry point for Spring App Deployments API. */ @Fluent @Beta -public interface SpringAppDeployments +public interface SpringAppDeployments extends HasManager, HasInner, HasParent, - SupportsCreating, + SupportsCreating>, SupportsGettingById, SupportsGettingByName, SupportsListing, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java index e7261b470278d..d4fb6dcf3191b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java @@ -9,8 +9,11 @@ import com.azure.resourcemanager.keyvault.KeyVaultManager; import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; public class AppPlatformTest extends TestBase { protected AppPlatformManager appPlatformManager; @@ -41,4 +44,47 @@ protected void cleanUpResources() { appPlatformManager.resourceManager().resourceGroups().beginDeleteByName(rgName); } catch (Exception e) { } } + + protected boolean checkRedirect(String url) throws IOException { + for (int i = 0; i < 60; ++i) { + HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); + connection.setInstanceFollowRedirects(false); + try { + connection.connect(); + if (200 <= connection.getResponseCode() && connection.getResponseCode() < 400) { + connection.getInputStream().close(); + if (connection.getResponseCode() / 100 == 3) { + return true; + } + System.out.printf("Do request to %s with response code %d%n", url, connection.getResponseCode()); + } + } catch (Exception e) { + System.err.printf("Do request to %s with error %s%n", url, e.getMessage()); + } finally { + connection.disconnect(); + } + SdkContext.sleep(5000); + } + return false; + } + + protected boolean requestSuccess(String url) throws IOException { + for (int i = 0; i < 60; ++i) { + HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); + try { + connection.connect(); + if (connection.getResponseCode() == 200) { + connection.getInputStream().close(); + return true; + } + System.out.printf("Do request to %s with response code %d%n", url, connection.getResponseCode()); + } catch (Exception e) { + System.err.printf("Do request to %s with error %s%n", url, e.getMessage()); + } finally { + connection.disconnect(); + } + SdkContext.sleep(5000); + } + return false; + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudLiveOnlyTest.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudLiveOnlyTest.java new file mode 100644 index 0000000000000..830e2a34e670b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudLiveOnlyTest.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform; + +import com.azure.resourcemanager.appplatform.models.RuntimeVersion; +import com.azure.resourcemanager.appplatform.models.SpringApp; +import com.azure.resourcemanager.appplatform.models.SpringAppDeployment; +import com.azure.resourcemanager.appplatform.models.SpringService; +import com.azure.resourcemanager.appservice.models.AppServiceCertificateOrder; +import com.azure.resourcemanager.appservice.models.AppServiceDomain; +import com.azure.resourcemanager.dns.models.DnsZone; +import com.azure.resourcemanager.keyvault.models.CertificatePermissions; +import com.azure.resourcemanager.keyvault.models.Secret; +import com.azure.resourcemanager.keyvault.models.SecretPermissions; +import com.azure.resourcemanager.keyvault.models.Vault; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.security.keyvault.certificates.CertificateClient; +import com.azure.security.keyvault.certificates.CertificateClientBuilder; +import com.azure.security.keyvault.certificates.models.ImportCertificateOptions; +import org.apache.commons.compress.archivers.tar.TarArchiveEntry; +import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; +import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream; +import org.apache.commons.compress.utils.IOUtils; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import javax.xml.bind.DatatypeConverter; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.security.KeyStore; +import java.security.MessageDigest; +import java.util.Base64; +import java.util.Collections; + +public class SpringCloudLiveOnlyTest extends AppPlatformTest { + private static final String PIGGYMETRICS_CONFIG_URL = "https://github.com/Azure-Samples/piggymetrics-config"; + private static final String GATEWAY_JAR_URL = "https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/gateway.jar"; + private static final String PIGGYMETRICS_TAR_GZ_URL = "https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/piggymetrics.tar.gz"; + + private static final String SPRING_CLOUD_SERVICE_PRINCIPAL = "03b39d0f-4213-4864-a245-b1476ec03169"; + + SpringCloudLiveOnlyTest() { + super(RunCondition.LIVE_ONLY); // need storage data-plane and url check + } + + @Test + public void canCRUDDeployment() throws Exception { + String serviceName = generateRandomResourceName("springsvc", 15); + String appName = "gateway"; + String deploymentName = generateRandomResourceName("deploy", 15); + String deploymentName1 = generateRandomResourceName("deploy", 15); + Region region = Region.US_EAST; + + SpringService service = appPlatformManager.springServices().define(serviceName) + .withRegion(region) + .withNewResourceGroup(rgName) + .create(); + + File jarFile = new File("gateway.jar"); + if (!jarFile.exists()) { + HttpURLConnection connection = (HttpURLConnection) new URL(GATEWAY_JAR_URL).openConnection(); + connection.connect(); + try (InputStream inputStream = connection.getInputStream(); + OutputStream outputStream = new FileOutputStream(jarFile)) { + IOUtils.copy(inputStream, outputStream); + } + connection.disconnect(); + } + + SpringApp app = service.apps().define(appName) + .defineActiveDeployment(deploymentName) + .withJarFile(jarFile) + .withInstance(2) + .withCpu(2) + .withMemory(4) + .withRuntime(RuntimeVersion.JAVA_11) + .attach() + .withDefaultPublicEndpoint() + .create(); + + Assertions.assertNotNull(app.url()); + Assertions.assertNotNull(app.activeDeploymentName()); + Assertions.assertEquals(1, app.deployments().list().stream().count()); + + Assertions.assertTrue(requestSuccess(app.url())); + + SpringAppDeployment deployment = app.getActiveDeployment(); + + Assertions.assertEquals(2, deployment.settings().cpu()); + Assertions.assertEquals(4, deployment.settings().memoryInGB()); + Assertions.assertEquals(RuntimeVersion.JAVA_11, deployment.settings().runtimeVersion()); + Assertions.assertEquals(2, deployment.instances().size()); + + File gzFile = new File("piggymetrics.tar.gz"); + if (!gzFile.exists()) { + HttpURLConnection connection = (HttpURLConnection) new URL(PIGGYMETRICS_TAR_GZ_URL).openConnection(); + connection.connect(); + try (InputStream inputStream = connection.getInputStream(); + OutputStream outputStream = new FileOutputStream(gzFile)) { + IOUtils.copy(inputStream, outputStream); + } + connection.disconnect(); + } + + deployment = app.deployments().define(deploymentName1) + .withSourceCodeTarGzFile(gzFile) + .withTargetModule("gateway") + .withActivation() + .create(); + app.refresh(); + + Assertions.assertEquals(deploymentName1, app.activeDeploymentName()); + Assertions.assertEquals(1, deployment.settings().cpu()); + Assertions.assertNotNull(deployment.getLogFileUrl()); + + Assertions.assertTrue(requestSuccess(app.url())); + + app.update() + .withoutDefaultPublicEndpoint() + .apply(); + Assertions.assertFalse(app.isPublic()); + + app.deployments().deleteByName(deploymentName); + Assertions.assertEquals(1, app.deployments().list().stream().count()); + } + + @Test + public void canCreateCustomDomainWithSsl() throws Exception { + String domainName = generateRandomResourceName("jsdkdemo-", 20) + ".com"; + String certOrderName = generateRandomResourceName("cert", 15); + String vaultName = generateRandomResourceName("vault", 15); + String certName = generateRandomResourceName("cert", 15); + String serviceName = generateRandomResourceName("springsvc", 15); + String appName = "gateway"; + Region region = Region.US_EAST; + + appPlatformManager.resourceManager().resourceGroups().define(rgName) + .withRegion(region) + .create(); + + // create custom domain and certificate + DnsZone dnsZone = dnsZoneManager.zones().define(domainName) + .withExistingResourceGroup(rgName) + .create(); + + AppServiceDomain domain = appServiceManager.domains().define(domainName) + .withExistingResourceGroup(rgName) + .defineRegistrantContact() + .withFirstName("Jon") + .withLastName("Doe") + .withEmail("jondoe@contoso.com") + .withAddressLine1("123 4th Ave") + .withCity("Redmond") + .withStateOrProvince("WA") + .withCountry(CountryIsoCode.UNITED_STATES) + .withPostalCode("98052") + .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) + .withPhoneNumber("4258828080") + .attach() + .withDomainPrivacyEnabled(true) + .withAutoRenewEnabled(false) + .withExistingDnsZone(dnsZone) + .create(); + + AppServiceCertificateOrder certificateOrder = appServiceManager.certificateOrders().define(certOrderName) + .withExistingResourceGroup(rgName) + .withHostName(String.format("*.%s", domainName)) + .withWildcardSku() + .withDomainVerification(domain) + .withNewKeyVault(vaultName, region) + .withAutoRenew(true) + .create(); + + Vault vault = keyVaultManager.vaults().getByResourceGroup(rgName, vaultName); + vault.update() + .defineAccessPolicy() + .forServicePrincipal(clientIdFromFile()) + .allowSecretAllPermissions() + .allowCertificateAllPermissions() + .attach() + .defineAccessPolicy() + .forServicePrincipal(SPRING_CLOUD_SERVICE_PRINCIPAL) + .allowCertificatePermissions(CertificatePermissions.GET, CertificatePermissions.LIST) + .allowSecretPermissions(SecretPermissions.GET, SecretPermissions.LIST) + .attach() + .apply(); + + Secret secret = vault.secrets().getByName(certOrderName); + + byte[] certificate = Base64.getDecoder().decode(secret.value()); + + // upload certificate + CertificateClient certificateClient = new CertificateClientBuilder() + .vaultUrl(vault.vaultUri()) + .pipeline(appPlatformManager.httpPipeline()) + .buildClient(); + + certificateClient.importCertificate( + new ImportCertificateOptions(certName, certificate) + .setEnabled(true) + ); + + // get thumbprint + KeyStore store = KeyStore.getInstance("PKCS12"); + store.load(new ByteArrayInputStream(certificate), null); + String alias = Collections.list(store.aliases()).get(0); + String thumbprint = DatatypeConverter.printHexBinary(MessageDigest.getInstance("SHA-1").digest(store.getCertificate(alias).getEncoded())); + + SpringService service = appPlatformManager.springServices().define(serviceName) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withCertificate("test", vault.vaultUri(), certName) + .create(); + + service.apps().define(appName).withDefaultActiveDeployment().withDefaultPublicEndpoint().create(); + SpringApp app = service.apps().getByName(appName); + + dnsZone.update() + .withCNameRecordSet("www", app.fqdn()) + .withCNameRecordSet("ssl", app.fqdn()) + .apply(); + + app.update() + .withoutDefaultPublicEndpoint() + .withCustomDomain(String.format("www.%s", domainName)) + .withCustomDomain(String.format("ssl.%s", domainName), thumbprint) + .apply(); + + Assertions.assertTrue(app.customDomains().validate(String.format("www.%s", domainName)).isValid()); + Assertions.assertTrue(requestSuccess(String.format("http://www.%s", domainName))); + Assertions.assertTrue(requestSuccess(String.format("https://ssl.%s", domainName))); + + app.update() + .withHttpsOnly() + .apply(); + Assertions.assertTrue(checkRedirect(String.format("http://ssl.%s", domainName))); + } + + private void extraTarGzSource(File folder, URL url) throws IOException { + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.connect(); + try (TarArchiveInputStream inputStream = new TarArchiveInputStream(new GzipCompressorInputStream(connection.getInputStream()))) { + TarArchiveEntry entry; + while ((entry = inputStream.getNextTarEntry()) != null) { + if (entry.isDirectory()) { + continue; + } + File file = new File(folder, entry.getName()); + File parent = file.getParentFile(); + if (parent.exists() || parent.mkdirs()) { + try (OutputStream outputStream = new FileOutputStream(file)) { + IOUtils.copy(inputStream, outputStream); + } + } else { + throw new IllegalStateException("Cannot create directory: " + parent.getAbsolutePath()); + } + } + } finally { + connection.disconnect(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java index 55787e92b4ecb..e4b1e98e75b26 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java @@ -5,68 +5,25 @@ import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.appplatform.models.ConfigServerProperties; -import com.azure.resourcemanager.appplatform.models.RuntimeVersion; import com.azure.resourcemanager.appplatform.models.SpringApp; -import com.azure.resourcemanager.appplatform.models.SpringAppDeployment; import com.azure.resourcemanager.appplatform.models.SpringService; -import com.azure.resourcemanager.appservice.models.AppServiceCertificateOrder; -import com.azure.resourcemanager.appservice.models.AppServiceDomain; -import com.azure.resourcemanager.dns.models.DnsZone; -import com.azure.resourcemanager.keyvault.models.CertificatePermissions; -import com.azure.resourcemanager.keyvault.models.Secret; -import com.azure.resourcemanager.keyvault.models.SecretPermissions; -import com.azure.resourcemanager.keyvault.models.Vault; -import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; -import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; -import com.azure.security.keyvault.certificates.CertificateClient; -import com.azure.security.keyvault.certificates.CertificateClientBuilder; -import com.azure.security.keyvault.certificates.models.ImportCertificateOptions; -import org.apache.commons.compress.archivers.tar.TarArchiveEntry; -import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; -import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream; -import org.apache.commons.compress.utils.IOUtils; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -import javax.xml.bind.DatatypeConverter; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.KeyStore; -import java.security.MessageDigest; -import java.util.Base64; -import java.util.Collections; - public class SpringCloudTest extends AppPlatformTest { private static final String PIGGYMETRICS_CONFIG_URL = "https://github.com/Azure-Samples/piggymetrics-config"; - private static final String GATEWAY_JAR_URL = "https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/gateway.jar"; - private static final String PIGGYMETRICS_TAR_GZ_URL = "https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/piggymetrics.tar.gz"; - - private static final String SPRING_CLOUD_SERVICE_PRINCIPAL = "03b39d0f-4213-4864-a245-b1476ec03169"; - - SpringCloudTest() { - super(RunCondition.LIVE_ONLY); // need storage data-plane and url check - } @Test - public void canCRUDSpringAppWithDeployment() throws IOException { + public void canCRUDServie() { String serviceName = generateRandomResourceName("springsvc", 15); - String appName = "gateway"; - String deploymentName = generateRandomResourceName("deploy", 15); Region region = Region.US_EAST; Assertions.assertTrue(appPlatformManager.springServices().checkNameAvailability(serviceName, region).nameAvailable()); SpringService service = appPlatformManager.springServices().define(serviceName) - .withRegion(Region.US_EAST) + .withRegion(region) .withNewResourceGroup(rgName) .withSku("B0") .withGitUri(PIGGYMETRICS_CONFIG_URL) @@ -89,91 +46,7 @@ public void canCRUDSpringAppWithDeployment() throws IOException { || serverProperties.configServer().gitProperty().uri() == null || serverProperties.configServer().gitProperty().uri().isEmpty()); - File jarFile = new File("gateway.jar"); - if (!jarFile.exists()) { - HttpURLConnection connection = (HttpURLConnection) new URL(GATEWAY_JAR_URL).openConnection(); - connection.connect(); - try (InputStream inputStream = connection.getInputStream(); - OutputStream outputStream = new FileOutputStream(jarFile)) { - IOUtils.copy(inputStream, outputStream); - } - connection.disconnect(); - } - - SpringApp app = service.apps().define(appName) - .withDefaultPublicEndpoint() - .create(); - - Assertions.assertNotNull(app.url()); - Assertions.assertNotNull(app.activeDeploymentName()); - - Assertions.assertTrue(requestSuccess(app.url())); - - SpringAppDeployment deployment = app.getActiveDeployment(); - deployment - .update() - .withInstance(2) - .withCpu(2) - .withMemory(4) - .withRuntime(RuntimeVersion.JAVA_11) - .apply(); - - // Deployment cannot be scaled and updated at the same time. - deployment.update() - .withJarFile(jarFile) - .apply(); - - Assertions.assertNotNull(app.url()); - Assertions.assertEquals(1, app.deployments().list().stream().count()); - Assertions.assertTrue(requestSuccess(app.url())); - - Assertions.assertEquals(2, deployment.settings().cpu()); - Assertions.assertEquals(4, deployment.settings().memoryInGB()); - Assertions.assertEquals(RuntimeVersion.JAVA_11, deployment.settings().runtimeVersion()); - Assertions.assertEquals(2, deployment.instances().size()); - - File gzFile = new File("piggymetrics.tar.gz"); - if (!gzFile.exists()) { - HttpURLConnection connection = (HttpURLConnection) new URL(PIGGYMETRICS_TAR_GZ_URL).openConnection(); - connection.connect(); - try (InputStream inputStream = connection.getInputStream(); - OutputStream outputStream = new FileOutputStream(gzFile)) { - IOUtils.copy(inputStream, outputStream); - } - connection.disconnect(); - } - - deployment = app.deployments().define(deploymentName) - .withSourceCodeTarGzFile(gzFile) - .withTargetModule("gateway") - .withActivation() - .create(); - app.refresh(); - - Assertions.assertEquals(deploymentName, app.activeDeploymentName()); - Assertions.assertEquals(1, deployment.settings().cpu()); - Assertions.assertNotNull(deployment.getLogFileUrl()); - - Assertions.assertTrue(requestSuccess(app.url())); - - app.update() - .withoutDefaultPublicEndpoint() - .apply(); - Assertions.assertFalse(app.isPublic()); - - app.deployments().list().forEach(deploy -> { - if (!deploy.name().equals(deploymentName)) { - app.deployments().deleteById(deploy.id()); - } - }); - Assertions.assertEquals(1, app.deployments().list().stream().count()); - - service.apps().deleteById(app.id()); - Assertions.assertEquals(404, - service.apps().getByIdAsync(app.id()).map(o -> 200) - .onErrorResume(e -> - Mono.just(e instanceof ManagementException ? ((ManagementException) e).getResponse().getStatusCode() : 400)) - .block()); + Assertions.assertEquals(1, appPlatformManager.springServices().list().stream().filter(s -> s.name().equals(serviceName)).count()); appPlatformManager.springServices().deleteById(service.id()); Assertions.assertEquals(404, @@ -184,183 +57,52 @@ public void canCRUDSpringAppWithDeployment() throws IOException { } @Test - public void canCreateCustomDomainWithSsl() throws Exception { - String domainName = generateRandomResourceName("jsdkdemo-", 20) + ".com"; - String certOrderName = generateRandomResourceName("cert", 15); - String vaultName = generateRandomResourceName("vault", 15); - String certName = generateRandomResourceName("cert", 15); + public void canCRUDApp() throws Exception { String serviceName = generateRandomResourceName("springsvc", 15); String appName = "gateway"; Region region = Region.US_EAST; - appPlatformManager.resourceManager().resourceGroups().define(rgName) - .withRegion(region) - .create(); - - // create custom domain and certificate - DnsZone dnsZone = dnsZoneManager.zones().define(domainName) - .withExistingResourceGroup(rgName) - .create(); - - AppServiceDomain domain = appServiceManager.domains().define(domainName) - .withExistingResourceGroup(rgName) - .defineRegistrantContact() - .withFirstName("Jon") - .withLastName("Doe") - .withEmail("jondoe@contoso.com") - .withAddressLine1("123 4th Ave") - .withCity("Redmond") - .withStateOrProvince("WA") - .withCountry(CountryIsoCode.UNITED_STATES) - .withPostalCode("98052") - .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) - .withPhoneNumber("4258828080") - .attach() - .withDomainPrivacyEnabled(true) - .withAutoRenewEnabled(false) - .withExistingDnsZone(dnsZone) - .create(); - - AppServiceCertificateOrder certificateOrder = appServiceManager.certificateOrders().define(certOrderName) - .withExistingResourceGroup(rgName) - .withHostName(String.format("*.%s", domainName)) - .withWildcardSku() - .withDomainVerification(domain) - .withNewKeyVault(vaultName, region) - .withAutoRenew(true) - .create(); - - Vault vault = keyVaultManager.vaults().getByResourceGroup(rgName, vaultName); - vault.update() - .defineAccessPolicy() - .forServicePrincipal(clientIdFromFile()) - .allowSecretAllPermissions() - .allowCertificateAllPermissions() - .attach() - .defineAccessPolicy() - .forServicePrincipal(SPRING_CLOUD_SERVICE_PRINCIPAL) - .allowCertificatePermissions(CertificatePermissions.GET, CertificatePermissions.LIST) - .allowSecretPermissions(SecretPermissions.GET, SecretPermissions.LIST) - .attach() - .apply(); - - Secret secret = vault.secrets().getByName(certOrderName); - - byte[] certificate = Base64.getDecoder().decode(secret.value()); - - // upload certificate - CertificateClient certificateClient = new CertificateClientBuilder() - .vaultUrl(vault.vaultUri()) - .pipeline(appPlatformManager.httpPipeline()) - .buildClient(); - - certificateClient.importCertificate( - new ImportCertificateOptions(certName, certificate) - .setEnabled(true) - ); - - // get thumbprint - KeyStore store = KeyStore.getInstance("PKCS12"); - store.load(new ByteArrayInputStream(certificate), null); - String alias = Collections.list(store.aliases()).get(0); - String thumbprint = DatatypeConverter.printHexBinary(MessageDigest.getInstance("SHA-1").digest(store.getCertificate(alias).getEncoded())); - - Assertions.assertTrue(appPlatformManager.springServices().checkNameAvailability(serviceName, region).nameAvailable()); - SpringService service = appPlatformManager.springServices().define(serviceName) .withRegion(region) - .withExistingResourceGroup(rgName) - .withCertificate("test", vault.vaultUri(), certName) + .withNewResourceGroup(rgName) .create(); - service.apps().define(appName).withDefaultPublicEndpoint().create(); - SpringApp app = service.apps().getByName(appName); + SpringApp app = service.apps().define(appName) + .withDefaultActiveDeployment() + .withDefaultPublicEndpoint() + .withHttpsOnly() + .withPersistentDisk(10, "/per") + .withTemporaryDisk(4, "/tmp") + .create(); - dnsZone.update() - .withCNameRecordSet("www", app.fqdn()) - .withCNameRecordSet("ssl", app.fqdn()) - .apply(); + Assertions.assertNotNull(app.url()); + Assertions.assertNotNull(app.activeDeploymentName()); + Assertions.assertTrue(app.isPublic()); + Assertions.assertTrue(app.isHttpsOnly()); + Assertions.assertEquals("/per", app.persistentDisk().mountPath()); + Assertions.assertEquals(10, app.persistentDisk().sizeInGB()); + Assertions.assertEquals("/tmp", app.temporaryDisk().mountPath()); + Assertions.assertEquals(4, app.temporaryDisk().sizeInGB()); + + if (isRecordMode()) { + Assertions.assertTrue(requestSuccess(app.url())); + } app.update() .withoutDefaultPublicEndpoint() - .withCustomDomain(String.format("www.%s", domainName)) - .withCustomDomain(String.format("ssl.%s", domainName), thumbprint) - .apply(); - - Assertions.assertTrue(app.customDomains().validate(String.format("www.%s", domainName)).isValid()); - Assertions.assertTrue(requestSuccess(String.format("http://www.%s", domainName))); - Assertions.assertTrue(requestSuccess(String.format("https://ssl.%s", domainName))); - - app.update() - .withHttpsOnly() + .withoutHttpsOnly() .apply(); - Assertions.assertTrue(checkRedirect(String.format("http://ssl.%s", domainName))); - } - private boolean checkRedirect(String url) throws IOException { - for (int i = 0; i < 60; ++i) { - HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); - connection.setInstanceFollowRedirects(false); - try { - connection.connect(); - if (200 <= connection.getResponseCode() && connection.getResponseCode() < 400) { - connection.getInputStream().close(); - if (connection.getResponseCode() / 100 == 3) { - return true; - } - System.out.printf("Do request to %s with response code %d%n", url, connection.getResponseCode()); - } - } catch (Exception e) { - System.err.printf("Do request to %s with error %s%n", url, e.getMessage()); - } finally { - connection.disconnect(); - } - SdkContext.sleep(5000); - } - return false; - } + Assertions.assertFalse(app.isPublic()); + Assertions.assertFalse(app.isHttpsOnly()); - private boolean requestSuccess(String url) throws IOException { - for (int i = 0; i < 60; ++i) { - HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); - try { - connection.connect(); - if (connection.getResponseCode() == 200) { - connection.getInputStream().close(); - return true; - } - System.out.printf("Do request to %s with response code %d%n", url, connection.getResponseCode()); - } catch (Exception e) { - System.err.printf("Do request to %s with error %s%n", url, e.getMessage()); - } finally { - connection.disconnect(); - } - SdkContext.sleep(5000); - } - return false; - } + Assertions.assertEquals(1, service.apps().list().stream().filter(s -> s.name().equals(appName)).count()); - private void extraTarGzSource(File folder, URL url) throws IOException { - HttpURLConnection connection = (HttpURLConnection) url.openConnection(); - connection.connect(); - try (TarArchiveInputStream inputStream = new TarArchiveInputStream(new GzipCompressorInputStream(connection.getInputStream()))) { - TarArchiveEntry entry; - while ((entry = inputStream.getNextTarEntry()) != null) { - if (entry.isDirectory()) { - continue; - } - File file = new File(folder, entry.getName()); - File parent = file.getParentFile(); - if (parent.exists() || parent.mkdirs()) { - try (OutputStream outputStream = new FileOutputStream(file)) { - IOUtils.copy(inputStream, outputStream); - } - } else { - throw new IllegalStateException("Cannot create directory: " + parent.getAbsolutePath()); - } - } - } finally { - connection.disconnect(); - } + service.apps().deleteById(app.id()); + Assertions.assertEquals(404, + service.apps().getByIdAsync(app.id()).map(o -> 200) + .onErrorResume( + e -> Mono.just((e instanceof ManagementException) ? ((ManagementException) e).getResponse().getStatusCode() : 400) + ).block()); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/session-records/canCRUDApp.json b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/session-records/canCRUDApp.json new file mode 100644 index 0000000000000..d66cc79803aec --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/session-records/canCRUDApp.json @@ -0,0 +1,763 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgf8d873765ba72?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:46:27 GMT", + "content-length" : "360", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e851b70d-0819-4b21-954f-5c333047dc35", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024627Z:e851b70d-0819-4b21-954f-5c333047dc35", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "e851b70d-0819-4b21-954f-5c333047dc35", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72\",\"name\":\"rgf8d873765ba72\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-26T02:46:23.386325600Z\",\"product\":\"javasdk\",\"cause\":\"automation\",\"StorageType\":\"Standard_LRS\",\"type\":\"test\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:46:45 GMT", + "server" : "nginx/1.17.7", + "content-length" : "380", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "797a2c05-15ea-4dae-8e14-a6a254ddc834", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "1199", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024645Z:797a2c05-15ea-4dae-8e14-a6a254ddc834", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationResults/fee92c57-3b04-4523-9f48-d0aa831c2324/Spring/springsvc60651?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "797a2c05-15ea-4dae-8e14-a6a254ddc834", + "Body" : "{\"properties\":{\"provisioningState\":\"Creating\",\"version\":2,\"serviceId\":\"f3b5b42c6b3c431d8e11539f0edb921f\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"S0\",\"tier\":\"Standard\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651\",\"name\":\"springsvc60651\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324?api-version=2020-07-01", + "x-ms-client-request-id" : "55758268-f95d-433b-b452-6d1ebbbbd054" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:47:15 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3b06253a-65fa-4485-a956-050326308302", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024716Z:3b06253a-65fa-4485-a956-050326308302", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3b06253a-65fa-4485-a956-050326308302", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324\",\"name\":\"fee92c57-3b04-4523-9f48-d0aa831c2324\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:46:37.9723363Z\"}", + "x-ms-client-request-id" : "cd150846-a0df-4307-a1b5-63bcc1b31bd5" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:47:46 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ef4e7854-1665-4eff-8023-82b40e4a765b", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024746Z:ef4e7854-1665-4eff-8023-82b40e4a765b", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "ef4e7854-1665-4eff-8023-82b40e4a765b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324\",\"name\":\"fee92c57-3b04-4523-9f48-d0aa831c2324\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:46:37.9723363Z\"}", + "x-ms-client-request-id" : "7acd0913-f8ee-4b26-b980-72c94e914f40" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:48:17 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5ffb1fb9-a97d-41ac-a28f-ebc82257c33c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024817Z:5ffb1fb9-a97d-41ac-a28f-ebc82257c33c", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "5ffb1fb9-a97d-41ac-a28f-ebc82257c33c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324\",\"name\":\"fee92c57-3b04-4523-9f48-d0aa831c2324\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:46:37.9723363Z\"}", + "x-ms-client-request-id" : "ecbb1c70-43ba-4f0e-a545-80b028284e7a" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:48:47 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3b746166-3ac9-49f1-86ef-9ade176c42b8", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024847Z:3b746166-3ac9-49f1-86ef-9ade176c42b8", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3b746166-3ac9-49f1-86ef-9ade176c42b8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324\",\"name\":\"fee92c57-3b04-4523-9f48-d0aa831c2324\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:46:37.9723363Z\"}", + "x-ms-client-request-id" : "ef49c161-fbcf-46ee-b780-c3f99b112e88" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:49:17 GMT", + "server" : "nginx/1.17.7", + "content-length" : "370", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "37a480e3-1384-4e32-a4e2-e7457a3e2baa", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024918Z:37a480e3-1384-4e32-a4e2-e7457a3e2baa", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "37a480e3-1384-4e32-a4e2-e7457a3e2baa", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc60651/operationId/fee92c57-3b04-4523-9f48-d0aa831c2324\",\"name\":\"fee92c57-3b04-4523-9f48-d0aa831c2324\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:46:37.9723363Z\",\"endTime\":\"2020-08-26T02:49:15.420329Z\"}", + "x-ms-client-request-id" : "bd32359e-894a-418c-8541-d0a49dde7cc8" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:49:17 GMT", + "server" : "nginx/1.17.7", + "content-length" : "381", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6dc9b2a6-bfde-49f7-af6f-f25a7c94efd9", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024918Z:6dc9b2a6-bfde-49f7-af6f-f25a7c94efd9", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6dc9b2a6-bfde-49f7-af6f-f25a7c94efd9", + "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"version\":2,\"serviceId\":\"f3b5b42c6b3c431d8e11539f0edb921f\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"S0\",\"tier\":\"Standard\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651\",\"name\":\"springsvc60651\"}", + "x-ms-client-request-id" : "e508cf32-49ac-408f-84ee-74a5eb52ed8b" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:49:18 GMT", + "server" : "nginx/1.17.7", + "content-length" : "333", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "edab1b09-9da9-4eac-b791-6716fc1c8c33", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "1199", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024919Z:edab1b09-9da9-4eac-b791-6716fc1c8c33", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationResults/a1c8a64a-33dd-41bd-972e-5ad7111da364/Spring/gateway?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "edab1b09-9da9-4eac-b791-6716fc1c8c33", + "Body" : "{\"properties\":{\"public\":false,\"provisioningState\":\"Creating\",\"httpsOnly\":false},\"type\":\"Microsoft.AppPlatform/Spring/apps\",\"identity\":null,\"location\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway\",\"name\":\"gateway\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/a1c8a64a-33dd-41bd-972e-5ad7111da364?api-version=2020-07-01", + "x-ms-client-request-id" : "46b77c44-69b2-4379-89a9-79729b6d6bb0" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/a1c8a64a-33dd-41bd-972e-5ad7111da364?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:49:49 GMT", + "server" : "nginx/1.17.7", + "content-length" : "364", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "bd7770b7-ffde-4f87-9691-31c2c13c342e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024949Z:bd7770b7-ffde-4f87-9691-31c2c13c342e", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "bd7770b7-ffde-4f87-9691-31c2c13c342e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/a1c8a64a-33dd-41bd-972e-5ad7111da364\",\"name\":\"a1c8a64a-33dd-41bd-972e-5ad7111da364\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:49:18.9018644Z\",\"endTime\":\"2020-08-26T02:49:25.1038418Z\"}", + "x-ms-client-request-id" : "66d583f5-e625-4f27-a9de-b753aed431d0" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:49:50 GMT", + "server" : "nginx/1.17.7", + "content-length" : "529", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "92bf515d-7acf-46d0-ad20-a9ff8398fc2e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024950Z:92bf515d-7acf-46d0-ad20-a9ff8398fc2e", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "92bf515d-7acf-46d0-ad20-a9ff8398fc2e", + "Body" : "{\"properties\":{\"public\":false,\"provisioningState\":\"Succeeded\",\"fqdn\":\"springsvc60651.azuremicroservices.io\",\"httpsOnly\":false,\"createdTime\":\"2020-08-26T02:49:25.065Z\",\"temporaryDisk\":{\"sizeInGB\":5,\"mountPath\":\"/tmp\"},\"persistentDisk\":{\"sizeInGB\":0,\"mountPath\":\"/persistent\"}},\"type\":\"Microsoft.AppPlatform/Spring/apps\",\"identity\":null,\"location\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway\",\"name\":\"gateway\"}", + "x-ms-client-request-id" : "950f660f-f6a3-4548-9151-7494a4f21941" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway/deployments/default?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:49:55 GMT", + "server" : "nginx/1.17.7", + "content-length" : "569", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "686e6e6a-c7e3-4f3c-98d2-ef01b7711da5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "1199", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024955Z:686e6e6a-c7e3-4f3c-98d2-ef01b7711da5", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationResults/c7c5e221-9412-4f58-a573-c10966262dd7/Spring/default?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "686e6e6a-c7e3-4f3c-98d2-ef01b7711da5", + "Body" : "{\"properties\":{\"source\":{\"type\":\"Jar\",\"relativePath\":\"\"},\"appName\":\"gateway\",\"deploymentSettings\":{\"cpu\":1,\"memoryInGB\":1,\"environmentVariables\":null,\"runtimeVersion\":\"Java_8\"},\"provisioningState\":\"Creating\",\"status\":\"Running\",\"active\":false,\"instances\":null},\"type\":\"Microsoft.AppPlatform/Spring/apps/deployments\",\"sku\":{\"name\":\"S0\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway/deployments/default\",\"name\":\"default\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/default/operationId/c7c5e221-9412-4f58-a573-c10966262dd7?api-version=2020-07-01", + "x-ms-client-request-id" : "09b245bd-05af-4443-83ca-d5e46672b252" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/default/operationId/c7c5e221-9412-4f58-a573-c10966262dd7?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:50:25 GMT", + "server" : "nginx/1.17.7", + "content-length" : "321", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c4fe4ecb-ece7-4aa5-b04a-4da84f86351d", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025025Z:c4fe4ecb-ece7-4aa5-b04a-4da84f86351d", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c4fe4ecb-ece7-4aa5-b04a-4da84f86351d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/default/operationId/c7c5e221-9412-4f58-a573-c10966262dd7\",\"name\":\"c7c5e221-9412-4f58-a573-c10966262dd7\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:49:55.3990037Z\"}", + "x-ms-client-request-id" : "448096f7-a48a-4a6b-9822-5f2aae8fd5ac" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/default/operationId/c7c5e221-9412-4f58-a573-c10966262dd7?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:50:55 GMT", + "server" : "nginx/1.17.7", + "content-length" : "364", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ba47350f-ea25-4bda-bc2e-627810908c16", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025056Z:ba47350f-ea25-4bda-bc2e-627810908c16", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "ba47350f-ea25-4bda-bc2e-627810908c16", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/default/operationId/c7c5e221-9412-4f58-a573-c10966262dd7\",\"name\":\"c7c5e221-9412-4f58-a573-c10966262dd7\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:49:55.3990037Z\",\"endTime\":\"2020-08-26T02:50:44.5673336Z\"}", + "x-ms-client-request-id" : "3a564216-252e-4be3-a4ca-c8bd8176d3a6" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway/deployments/default?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:50:57 GMT", + "server" : "nginx/1.17.7", + "content-length" : "691", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6d850e01-6add-44b8-b2d2-7124e00378bc", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025058Z:6d850e01-6add-44b8-b2d2-7124e00378bc", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6d850e01-6add-44b8-b2d2-7124e00378bc", + "Body" : "{\"properties\":{\"source\":{\"type\":\"Jar\",\"relativePath\":\"\"},\"appName\":\"gateway\",\"deploymentSettings\":{\"cpu\":1,\"memoryInGB\":1,\"environmentVariables\":null,\"runtimeVersion\":\"Java_8\"},\"provisioningState\":\"Succeeded\",\"status\":\"Running\",\"active\":false,\"instances\":[{\"name\":\"gateway-default-7-84dcb4d66-2pz2k\",\"status\":\"Running\",\"discoveryStatus\":\"DOWN\",\"startTime\":\"2020-08-26T02:49:52Z\"}]},\"type\":\"Microsoft.AppPlatform/Spring/apps/deployments\",\"sku\":{\"name\":\"S0\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway/deployments/default\",\"name\":\"default\"}", + "x-ms-client-request-id" : "71733ece-bbc5-4229-b6dc-b3c1c46425ca" + } + }, { + "Method" : "PATCH", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:50:58 GMT", + "server" : "nginx/1.17.7", + "content-length" : "554", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "71daa708-a3ee-4de0-8451-3cb264f7b226", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "1198", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025059Z:71daa708-a3ee-4de0-8451-3cb264f7b226", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationResults/908ba225-e319-451a-bf28-41d94c8c0d9b/Spring/gateway?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "71daa708-a3ee-4de0-8451-3cb264f7b226", + "Body" : "{\"properties\":{\"public\":true,\"provisioningState\":\"Succeeded\",\"activeDeploymentName\":\"default\",\"fqdn\":\"springsvc60651.azuremicroservices.io\",\"httpsOnly\":true,\"createdTime\":\"2020-08-26T02:49:25.065Z\",\"temporaryDisk\":{\"sizeInGB\":4,\"mountPath\":\"/tmp\"},\"persistentDisk\":{\"sizeInGB\":10,\"mountPath\":\"/per\"}},\"type\":\"Microsoft.AppPlatform/Spring/apps\",\"identity\":null,\"location\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway\",\"name\":\"gateway\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/908ba225-e319-451a-bf28-41d94c8c0d9b?api-version=2020-07-01", + "x-ms-client-request-id" : "eb22af89-c8f7-41fc-a119-af37a43c05ea" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/908ba225-e319-451a-bf28-41d94c8c0d9b?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:51:29 GMT", + "server" : "nginx/1.17.7", + "content-length" : "364", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5cdfffc7-01b7-4d5c-a3df-984318948fdd", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025129Z:5cdfffc7-01b7-4d5c-a3df-984318948fdd", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "5cdfffc7-01b7-4d5c-a3df-984318948fdd", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/908ba225-e319-451a-bf28-41d94c8c0d9b\",\"name\":\"908ba225-e319-451a-bf28-41d94c8c0d9b\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:50:58.9951424Z\",\"endTime\":\"2020-08-26T02:51:10.4609849Z\"}", + "x-ms-client-request-id" : "9a67f28c-4c8c-42bf-ba3d-9a59802434c4" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:51:29 GMT", + "server" : "nginx/1.17.7", + "content-length" : "615", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9fee11d5-51fc-4cb8-90b3-7ac2a44aba98", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025129Z:9fee11d5-51fc-4cb8-90b3-7ac2a44aba98", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "9fee11d5-51fc-4cb8-90b3-7ac2a44aba98", + "Body" : "{\"properties\":{\"public\":true,\"url\":\"https://springsvc60651-gateway.azuremicroservices.io\",\"provisioningState\":\"Succeeded\",\"activeDeploymentName\":\"default\",\"fqdn\":\"springsvc60651.azuremicroservices.io\",\"httpsOnly\":true,\"createdTime\":\"2020-08-26T02:49:25.065Z\",\"temporaryDisk\":{\"sizeInGB\":4,\"mountPath\":\"/tmp\"},\"persistentDisk\":{\"sizeInGB\":10,\"mountPath\":\"/per\"}},\"type\":\"Microsoft.AppPlatform/Spring/apps\",\"identity\":null,\"location\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway\",\"name\":\"gateway\"}", + "x-ms-client-request-id" : "35e4c66a-6d12-4f94-9b29-b872b1bc714a" + } + }, { + "Method" : "PATCH", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:52:05 GMT", + "server" : "nginx/1.17.7", + "content-length" : "617", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9242cbe2-3f47-4454-88bd-802c2d06588b", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "1197", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025205Z:9242cbe2-3f47-4454-88bd-802c2d06588b", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationResults/a0b6774b-eead-4f45-a8d8-d3f522a03415/Spring/gateway?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "9242cbe2-3f47-4454-88bd-802c2d06588b", + "Body" : "{\"properties\":{\"public\":false,\"url\":\"https://springsvc60651-gateway.azuremicroservices.io\",\"provisioningState\":\"Succeeded\",\"activeDeploymentName\":\"default\",\"fqdn\":\"springsvc60651.azuremicroservices.io\",\"httpsOnly\":false,\"createdTime\":\"2020-08-26T02:49:25.065Z\",\"temporaryDisk\":{\"sizeInGB\":4,\"mountPath\":\"/tmp\"},\"persistentDisk\":{\"sizeInGB\":10,\"mountPath\":\"/per\"}},\"type\":\"Microsoft.AppPlatform/Spring/apps\",\"identity\":null,\"location\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway\",\"name\":\"gateway\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/a0b6774b-eead-4f45-a8d8-d3f522a03415?api-version=2020-07-01", + "x-ms-client-request-id" : "686edf43-c3df-4ce7-850b-1f407b3898d9" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/a0b6774b-eead-4f45-a8d8-d3f522a03415?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:52:35 GMT", + "server" : "nginx/1.17.7", + "content-length" : "364", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1c3618b7-fb1f-4017-b9ac-601c0b0245ca", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025235Z:1c3618b7-fb1f-4017-b9ac-601c0b0245ca", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "1c3618b7-fb1f-4017-b9ac-601c0b0245ca", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/a0b6774b-eead-4f45-a8d8-d3f522a03415\",\"name\":\"a0b6774b-eead-4f45-a8d8-d3f522a03415\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:52:05.2947541Z\",\"endTime\":\"2020-08-26T02:52:13.0853965Z\"}", + "x-ms-client-request-id" : "9c0a0780-cb81-4763-b93d-07238c4234ac" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:52:35 GMT", + "server" : "nginx/1.17.7", + "content-length" : "569", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0b7cd358-229e-422a-b0d1-4330ad569d49", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11997", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025236Z:0b7cd358-229e-422a-b0d1-4330ad569d49", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "0b7cd358-229e-422a-b0d1-4330ad569d49", + "Body" : "{\"properties\":{\"public\":false,\"url\":\"None\",\"provisioningState\":\"Succeeded\",\"activeDeploymentName\":\"default\",\"fqdn\":\"springsvc60651.azuremicroservices.io\",\"httpsOnly\":false,\"createdTime\":\"2020-08-26T02:49:25.065Z\",\"temporaryDisk\":{\"sizeInGB\":4,\"mountPath\":\"/tmp\"},\"persistentDisk\":{\"sizeInGB\":10,\"mountPath\":\"/per\"}},\"type\":\"Microsoft.AppPlatform/Spring/apps\",\"identity\":null,\"location\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway\",\"name\":\"gateway\"}", + "x-ms-client-request-id" : "71398a23-1ccb-497f-bb60-5011565c236b" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:52:35 GMT", + "server" : "nginx/1.17.7", + "content-length" : "581", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b7584917-831f-4df5-90cb-6bc4a7f9da27", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11996", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025236Z:b7584917-831f-4df5-90cb-6bc4a7f9da27", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "b7584917-831f-4df5-90cb-6bc4a7f9da27", + "Body" : "{\"value\":[{\"properties\":{\"public\":false,\"url\":\"None\",\"provisioningState\":\"Succeeded\",\"activeDeploymentName\":\"default\",\"fqdn\":\"springsvc60651.azuremicroservices.io\",\"httpsOnly\":false,\"createdTime\":\"2020-08-26T02:49:25.065Z\",\"temporaryDisk\":{\"sizeInGB\":4,\"mountPath\":\"/tmp\"},\"persistentDisk\":{\"sizeInGB\":10,\"mountPath\":\"/per\"}},\"type\":\"Microsoft.AppPlatform/Spring/apps\",\"identity\":null,\"location\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway\",\"name\":\"gateway\"}]}", + "x-ms-client-request-id" : "1cde3ec1-d168-484d-afab-172a9e2b790a" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:52:36 GMT", + "server" : "nginx/1.17.7", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b3a6ea1b-6a27-4e5d-8989-71ae9dfadda9", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025236Z:b3a6ea1b-6a27-4e5d-8989-71ae9dfadda9", + "connection" : "keep-alive", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationResults/6516144e-9273-4ac2-81a8-8251045c6f09/Spring/gateway?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "b3a6ea1b-6a27-4e5d-8989-71ae9dfadda9", + "Body" : "", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/6516144e-9273-4ac2-81a8-8251045c6f09?api-version=2020-07-01", + "x-ms-client-request-id" : "7f58a168-5041-4e40-9def-89919e5b787e" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/6516144e-9273-4ac2-81a8-8251045c6f09?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:53:06 GMT", + "server" : "nginx/1.17.7", + "content-length" : "364", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "887a268c-6a8c-434c-87f5-a23646a80943", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025307Z:887a268c-6a8c-434c-87f5-a23646a80943", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "887a268c-6a8c-434c-87f5-a23646a80943", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/gateway/operationId/6516144e-9273-4ac2-81a8-8251045c6f09\",\"name\":\"6516144e-9273-4ac2-81a8-8251045c6f09\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:52:36.7854059Z\",\"endTime\":\"2020-08-26T02:52:44.5982679Z\"}", + "x-ms-client-request-id" : "e1bcc5ce-2eb0-4eb7-ab3b-6641b553ab08" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/locations/eastus/operationResults/6516144e-9273-4ac2-81a8-8251045c6f09/Spring/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:53:07 GMT", + "server" : "nginx/1.17.7", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "204", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5cc5592c-c1ff-4efa-8066-6c6e6af1c2d0", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025308Z:5cc5592c-c1ff-4efa-8066-6c6e6af1c2d0", + "connection" : "keep-alive", + "cache-control" : "no-cache", + "x-ms-request-id" : "5cc5592c-c1ff-4efa-8066-6c6e6af1c2d0", + "Body" : "", + "x-ms-client-request-id" : "6a580828-aac1-4e91-9ecf-0efb9ea6bf02" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:53:07 GMT", + "server" : "nginx/1.17.7", + "content-length" : "235", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "404", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7f89c660-0394-40d6-b5ab-3921e17be389", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11995", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025308Z:7f89c660-0394-40d6-b5ab-3921e17be389", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "7f89c660-0394-40d6-b5ab-3921e17be389", + "Body" : "{\"error\":{\"code\":\"NotFound\",\"message\":\"App was not found\",\"target\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgf8d873765ba72/providers/Microsoft.AppPlatform/Spring/springsvc60651/apps/gateway\",\"details\":null}}", + "x-ms-client-request-id" : "37ffb6c3-dde0-4352-8ccd-de1f0d7310c2" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgf8d873765ba72?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:53:11 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "16618c87-a007-4cb7-884c-4a6b024a4ab5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025312Z:16618c87-a007-4cb7-884c-4a6b024a4ab5", + "connection" : "keep-alive", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0Y4RDg3Mzc2NUJBNzItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "16618c87-a007-4cb7-884c-4a6b024a4ab5", + "Body" : "" + } + } ], + "variables" : [ "rgf8d873765ba72", "springsvc60651" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/session-records/canCRUDServie.json b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/session-records/canCRUDServie.json new file mode 100644 index 0000000000000..29246bd6dd250 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/session-records/canCRUDServie.json @@ -0,0 +1,1684 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppPlatform/locations/eastus/checkNameAvailability?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:31:54 GMT", + "server" : "nginx/1.17.7", + "content-length" : "22", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "41f52b91-f064-46af-acd3-f2700356c24f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023154Z:41f52b91-f064-46af-acd3-f2700356c24f", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "41f52b91-f064-46af-acd3-f2700356c24f", + "Body" : "{\"nameAvailable\":true}", + "x-ms-client-request-id" : "3327363c-7469-422b-acbe-3e8323e0011e" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgb0d583251971e?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:31:56 GMT", + "content-length" : "360", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "15019c1b-ae19-4f4d-8650-de2b08a22124", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023157Z:15019c1b-ae19-4f4d-8650-de2b08a22124", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "15019c1b-ae19-4f4d-8650-de2b08a22124", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e\",\"name\":\"rgb0d583251971e\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-08-26T02:31:55.290472400Z\",\"product\":\"javasdk\",\"cause\":\"automation\",\"StorageType\":\"Standard_LRS\",\"type\":\"test\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:32:15 GMT", + "server" : "nginx/1.17.7", + "content-length" : "377", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "88d77d9f-c8ca-497f-bfff-436c6823adca", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "1199", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023215Z:88d77d9f-c8ca-497f-bfff-436c6823adca", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationResults/ac552aef-e47f-4822-b0ef-6a3679c5eb5d/Spring/springsvc44969?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "88d77d9f-c8ca-497f-bfff-436c6823adca", + "Body" : "{\"properties\":{\"provisioningState\":\"Creating\",\"version\":2,\"serviceId\":\"cbc99866e80e4a218fcb419bfda336a8\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"B0\",\"tier\":\"Basic\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969\",\"name\":\"springsvc44969\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d?api-version=2020-07-01", + "x-ms-client-request-id" : "60227c02-4e6e-4f6c-9b20-85fa9729ca30" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:32:45 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "79a4d33e-cfd1-4427-8f98-8e683a14e556", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023246Z:79a4d33e-cfd1-4427-8f98-8e683a14e556", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "79a4d33e-cfd1-4427-8f98-8e683a14e556", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"name\":\"ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:32:07.7746588Z\"}", + "x-ms-client-request-id" : "f3c0f6cb-bc1f-4ea6-9238-1722d996bb54" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:33:16 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1e3a6eda-9e24-48df-9bb0-b97e4507b2b4", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023316Z:1e3a6eda-9e24-48df-9bb0-b97e4507b2b4", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "1e3a6eda-9e24-48df-9bb0-b97e4507b2b4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"name\":\"ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:32:07.7746588Z\"}", + "x-ms-client-request-id" : "24a68141-a9c4-46a7-a099-5af04889ce9f" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:33:46 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "780a34d4-7296-494a-9cf3-8dd29a0d3b3c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023346Z:780a34d4-7296-494a-9cf3-8dd29a0d3b3c", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "780a34d4-7296-494a-9cf3-8dd29a0d3b3c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"name\":\"ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:32:07.7746588Z\"}", + "x-ms-client-request-id" : "c3710cb8-0164-4a09-8298-60f19ee1cd6d" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:34:16 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8748eba5-27ba-4b33-8548-08f4cfd44852", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023417Z:8748eba5-27ba-4b33-8548-08f4cfd44852", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8748eba5-27ba-4b33-8548-08f4cfd44852", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"name\":\"ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:32:07.7746588Z\"}", + "x-ms-client-request-id" : "f06d583c-7c6e-405f-8053-170710c297dc" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:34:46 GMT", + "server" : "nginx/1.17.7", + "content-length" : "371", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4937fe24-9796-4d60-8013-40f22a4690c7", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023447Z:4937fe24-9796-4d60-8013-40f22a4690c7", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "4937fe24-9796-4d60-8013-40f22a4690c7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"name\":\"ac552aef-e47f-4822-b0ef-6a3679c5eb5d\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:32:07.7746588Z\",\"endTime\":\"2020-08-26T02:34:43.9717382Z\"}", + "x-ms-client-request-id" : "d9730b11-51a6-4126-b55f-c9916fc83116" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:34:47 GMT", + "server" : "nginx/1.17.7", + "content-length" : "378", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1791608f-60bb-425c-b56d-9f8999dc2290", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023447Z:1791608f-60bb-425c-b56d-9f8999dc2290", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "1791608f-60bb-425c-b56d-9f8999dc2290", + "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"version\":2,\"serviceId\":\"cbc99866e80e4a218fcb419bfda336a8\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"B0\",\"tier\":\"Basic\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969\",\"name\":\"springsvc44969\"}", + "x-ms-client-request-id" : "0e5e7fc8-41f4-4a12-ade2-bc194fceda88" + } + }, { + "Method" : "PATCH", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:34:47 GMT", + "server" : "nginx/1.17.7", + "content-length" : "270", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "85f21b67-3855-497a-bbf3-f93a61d3c9cb", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023448Z:85f21b67-3855-497a-bbf3-f93a61d3c9cb", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationResults/b13647dd-4099-41fd-b54e-f02215c1673e/Spring/springsvc44969?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "85f21b67-3855-497a-bbf3-f93a61d3c9cb", + "Body" : "{\"properties\":{\"state\":\"Updating\"},\"type\":\"Microsoft.AppPlatform/Spring/configServers\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default\",\"name\":\"default\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/b13647dd-4099-41fd-b54e-f02215c1673e?api-version=2020-07-01", + "x-ms-client-request-id" : "52de3770-d3b5-4a93-8ade-9bce95d6ea88" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/b13647dd-4099-41fd-b54e-f02215c1673e?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:35:18 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "518f2124-b194-42ee-bf11-a58a367f2cc3", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023518Z:518f2124-b194-42ee-bf11-a58a367f2cc3", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "518f2124-b194-42ee-bf11-a58a367f2cc3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/b13647dd-4099-41fd-b54e-f02215c1673e\",\"name\":\"b13647dd-4099-41fd-b54e-f02215c1673e\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:34:48.2131362Z\"}", + "x-ms-client-request-id" : "47d7beaf-5ae4-4393-b875-599ef78906bb" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/b13647dd-4099-41fd-b54e-f02215c1673e?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:35:48 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c7aedbfa-9f58-494f-a6b1-0e87b33d81d8", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023549Z:c7aedbfa-9f58-494f-a6b1-0e87b33d81d8", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c7aedbfa-9f58-494f-a6b1-0e87b33d81d8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/b13647dd-4099-41fd-b54e-f02215c1673e\",\"name\":\"b13647dd-4099-41fd-b54e-f02215c1673e\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:34:48.2131362Z\"}", + "x-ms-client-request-id" : "461f1800-7ad8-4b9a-aab3-5ba9664faf84" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/b13647dd-4099-41fd-b54e-f02215c1673e?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:36:18 GMT", + "server" : "nginx/1.17.7", + "content-length" : "371", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "13a1115c-343f-43dd-965f-b7a409e13f4b", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023619Z:13a1115c-343f-43dd-965f-b7a409e13f4b", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "13a1115c-343f-43dd-965f-b7a409e13f4b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/b13647dd-4099-41fd-b54e-f02215c1673e\",\"name\":\"b13647dd-4099-41fd-b54e-f02215c1673e\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:34:48.2131362Z\",\"endTime\":\"2020-08-26T02:35:58.5329169Z\"}", + "x-ms-client-request-id" : "0eee3792-5d47-4071-9441-c19025f208df" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:36:19 GMT", + "server" : "nginx/1.17.7", + "content-length" : "365", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "51033d2f-646f-4200-af6f-f284c291fcc5", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023619Z:51033d2f-646f-4200-af6f-f284c291fcc5", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "51033d2f-646f-4200-af6f-f284c291fcc5", + "Body" : "{\"properties\":{\"state\":\"Succeeded\",\"configServer\":{\"gitProperty\":{\"uri\":\"https://github.com/Azure-Samples/piggymetrics-config\"}}},\"type\":\"Microsoft.AppPlatform/Spring/configServers\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default\",\"name\":\"default\"}", + "x-ms-client-request-id" : "d5458dd4-95cf-45f7-82e8-1ef0898b7ef4" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:36:19 GMT", + "server" : "nginx/1.17.7", + "content-length" : "365", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4b25bee0-78ff-4a4f-bd97-28e299db29f0", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023620Z:4b25bee0-78ff-4a4f-bd97-28e299db29f0", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "4b25bee0-78ff-4a4f-bd97-28e299db29f0", + "Body" : "{\"properties\":{\"state\":\"Succeeded\",\"configServer\":{\"gitProperty\":{\"uri\":\"https://github.com/Azure-Samples/piggymetrics-config\"}}},\"type\":\"Microsoft.AppPlatform/Spring/configServers\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default\",\"name\":\"default\"}", + "x-ms-client-request-id" : "34012b5a-d01b-4e8e-851b-de771a94490a" + } + }, { + "Method" : "PATCH", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:36:21 GMT", + "server" : "nginx/1.17.7", + "content-length" : "377", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "90e68e55-4ff9-4304-ae3a-3b70c9010d51", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "1198", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023622Z:90e68e55-4ff9-4304-ae3a-3b70c9010d51", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationResults/a278460d-07e8-438f-8c52-664ce2fdfd24/Spring/springsvc44969?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "90e68e55-4ff9-4304-ae3a-3b70c9010d51", + "Body" : "{\"properties\":{\"provisioningState\":\"Updating\",\"version\":2,\"serviceId\":\"cbc99866e80e4a218fcb419bfda336a8\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"B0\",\"tier\":\"Basic\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969\",\"name\":\"springsvc44969\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "x-ms-client-request-id" : "ff2fa57d-81c4-4d35-b77a-0c34a12e345a" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:36:51 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "56a5eee1-0bfe-422d-87ab-8604f65acf4f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023652Z:56a5eee1-0bfe-422d-87ab-8604f65acf4f", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "56a5eee1-0bfe-422d-87ab-8604f65acf4f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "06562378-9d5e-463d-b00a-fc8d77a29449" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:37:22 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ae86dcd3-4ae7-46da-ac38-5cdee951d902", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023722Z:ae86dcd3-4ae7-46da-ac38-5cdee951d902", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "ae86dcd3-4ae7-46da-ac38-5cdee951d902", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "53e2b24c-4648-431d-bbae-965231c9cd1f" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:37:52 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "59c7ccd6-b4ff-480a-b7c4-1739965cb746", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023753Z:59c7ccd6-b4ff-480a-b7c4-1739965cb746", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "59c7ccd6-b4ff-480a-b7c4-1739965cb746", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "dcd948b2-c4bf-4948-a3a1-a68a8fcd2b6d" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:38:23 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "53fd261c-fc41-40a2-9783-139e1a014313", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023823Z:53fd261c-fc41-40a2-9783-139e1a014313", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "53fd261c-fc41-40a2-9783-139e1a014313", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "ca47ec8d-2ad2-4cc5-aa93-55b6248d6f72" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:38:53 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6c0c1826-f071-4843-95c0-893be6022fe1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023854Z:6c0c1826-f071-4843-95c0-893be6022fe1", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6c0c1826-f071-4843-95c0-893be6022fe1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "acee43f5-3f19-4077-b3d3-886ae12beda4" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:39:24 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8ceeada7-28d5-4ea9-b079-f374184756ad", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023924Z:8ceeada7-28d5-4ea9-b079-f374184756ad", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8ceeada7-28d5-4ea9-b079-f374184756ad", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "805d92a1-d353-4445-94fa-344535d551e0" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:39:54 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "74297052-e46f-40ab-8e1d-af60ca9e2ee9", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T023954Z:74297052-e46f-40ab-8e1d-af60ca9e2ee9", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "74297052-e46f-40ab-8e1d-af60ca9e2ee9", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "d8f2b56b-5fd2-4ea2-8fb6-fc7a135a3908" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:40:24 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cea48e2d-5057-47a6-b711-816d63e964b0", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024025Z:cea48e2d-5057-47a6-b711-816d63e964b0", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "cea48e2d-5057-47a6-b711-816d63e964b0", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "3d92cd5d-ccc7-4219-b2f5-49c68482d4e7" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:40:54 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "92682565-fc43-4b4e-9bf9-1f32437f5dd3", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024055Z:92682565-fc43-4b4e-9bf9-1f32437f5dd3", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "92682565-fc43-4b4e-9bf9-1f32437f5dd3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "9a2cdd6b-6d64-472d-867b-97f671f4e7b8" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:41:25 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5a7559c7-81fb-4b11-8327-7c1e3eb9a54d", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024125Z:5a7559c7-81fb-4b11-8327-7c1e3eb9a54d", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a7559c7-81fb-4b11-8327-7c1e3eb9a54d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "44ef29c9-75dd-44b2-a377-dfc3763292ba" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:41:55 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "40689c22-7c3b-43d8-92dd-9d0d0c57f21c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024156Z:40689c22-7c3b-43d8-92dd-9d0d0c57f21c", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "40689c22-7c3b-43d8-92dd-9d0d0c57f21c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "bea62c50-e7cd-469c-a806-c37dc1346ca9" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:42:25 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c5a4cd8b-8169-4421-a932-009b6754d08e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024226Z:c5a4cd8b-8169-4421-a932-009b6754d08e", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c5a4cd8b-8169-4421-a932-009b6754d08e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\"}", + "x-ms-client-request-id" : "4d995c89-9363-4c04-b5cd-359fcc8623c4" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:42:56 GMT", + "server" : "nginx/1.17.7", + "content-length" : "371", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3035968d-8d26-499c-8af9-0ba8cbdc275a", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024256Z:3035968d-8d26-499c-8af9-0ba8cbdc275a", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3035968d-8d26-499c-8af9-0ba8cbdc275a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/a278460d-07e8-438f-8c52-664ce2fdfd24\",\"name\":\"a278460d-07e8-438f-8c52-664ce2fdfd24\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:36:21.6859161Z\",\"endTime\":\"2020-08-26T02:42:37.2436053Z\"}", + "x-ms-client-request-id" : "95e075cf-6378-4c55-b2cc-e7dd5ab5388a" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:42:56 GMT", + "server" : "nginx/1.17.7", + "content-length" : "381", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "fd70c426-4b58-457d-8e2f-27cc776a3200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024257Z:fd70c426-4b58-457d-8e2f-27cc776a3200", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "fd70c426-4b58-457d-8e2f-27cc776a3200", + "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"version\":2,\"serviceId\":\"cbc99866e80e4a218fcb419bfda336a8\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"S0\",\"tier\":\"Standard\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969\",\"name\":\"springsvc44969\"}", + "x-ms-client-request-id" : "48a9f37c-b3df-4975-a443-97388bbc35b0" + } + }, { + "Method" : "PATCH", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:42:57 GMT", + "server" : "nginx/1.17.7", + "content-length" : "364", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ab16a9bf-5da1-4fdd-9956-bb457a331d1d", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024257Z:ab16a9bf-5da1-4fdd-9956-bb457a331d1d", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationResults/4516f95b-5272-43a1-880e-0f05d402cda3/Spring/springsvc44969?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "ab16a9bf-5da1-4fdd-9956-bb457a331d1d", + "Body" : "{\"properties\":{\"state\":\"Updating\",\"configServer\":{\"gitProperty\":{\"uri\":\"https://github.com/Azure-Samples/piggymetrics-config\"}}},\"type\":\"Microsoft.AppPlatform/Spring/configServers\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default\",\"name\":\"default\"}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/4516f95b-5272-43a1-880e-0f05d402cda3?api-version=2020-07-01", + "x-ms-client-request-id" : "b1d7c5cb-23ca-4bb2-be30-c02dd2ae2580" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/4516f95b-5272-43a1-880e-0f05d402cda3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:43:27 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7eaaf225-384f-45a0-9ff1-7368333514b3", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024328Z:7eaaf225-384f-45a0-9ff1-7368333514b3", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "7eaaf225-384f-45a0-9ff1-7368333514b3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/4516f95b-5272-43a1-880e-0f05d402cda3\",\"name\":\"4516f95b-5272-43a1-880e-0f05d402cda3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:42:57.5207095Z\"}", + "x-ms-client-request-id" : "31c7f61f-3b98-4825-b37f-40f85fa6dcc9" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/4516f95b-5272-43a1-880e-0f05d402cda3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:43:58 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11975", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0a832e66-eb6f-4634-9cde-bb45d11514c9", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024358Z:0a832e66-eb6f-4634-9cde-bb45d11514c9", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "0a832e66-eb6f-4634-9cde-bb45d11514c9", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/4516f95b-5272-43a1-880e-0f05d402cda3\",\"name\":\"4516f95b-5272-43a1-880e-0f05d402cda3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:42:57.5207095Z\"}", + "x-ms-client-request-id" : "7fcda775-4794-474d-b7a2-045014e56842" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/4516f95b-5272-43a1-880e-0f05d402cda3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:44:28 GMT", + "server" : "nginx/1.17.7", + "content-length" : "371", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3555329a-1103-49c2-8003-4b28ccd62d17", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024428Z:3555329a-1103-49c2-8003-4b28ccd62d17", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3555329a-1103-49c2-8003-4b28ccd62d17", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/4516f95b-5272-43a1-880e-0f05d402cda3\",\"name\":\"4516f95b-5272-43a1-880e-0f05d402cda3\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:42:57.5207095Z\",\"endTime\":\"2020-08-26T02:44:06.2895464Z\"}", + "x-ms-client-request-id" : "cb0d259a-7d3b-42f8-a036-6bfe04205186" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:44:30 GMT", + "server" : "nginx/1.17.7", + "content-length" : "271", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11973", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "67a740c6-11b3-4fdd-be9b-2ddf7d378458", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024430Z:67a740c6-11b3-4fdd-be9b-2ddf7d378458", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "67a740c6-11b3-4fdd-be9b-2ddf7d378458", + "Body" : "{\"properties\":{\"state\":\"Succeeded\"},\"type\":\"Microsoft.AppPlatform/Spring/configServers\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default\",\"name\":\"default\"}", + "x-ms-client-request-id" : "853757c9-a353-4c41-9384-6432ca6ea4f3" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:44:31 GMT", + "server" : "nginx/1.17.7", + "content-length" : "271", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11972", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "067d5135-9226-4d29-86ca-0571d2980e22", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024431Z:067d5135-9226-4d29-86ca-0571d2980e22", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "067d5135-9226-4d29-86ca-0571d2980e22", + "Body" : "{\"properties\":{\"state\":\"Succeeded\"},\"type\":\"Microsoft.AppPlatform/Spring/configServers\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969/configServers/default\",\"name\":\"default\"}", + "x-ms-client-request-id" : "c4aec0f1-0e9a-4353-9f47-905e97d46331" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppPlatform/Spring?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:44:31 GMT", + "server" : "nginx/1.17.7", + "content-length" : "1155", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "bf6fb80d-09b4-4b2e-84d2-c7db0e42badd", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11997", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024432Z:bf6fb80d-09b4-4b2e-84d2-c7db0e42badd", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "bf6fb80d-09b4-4b2e-84d2-c7db0e42badd", + "Body" : "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"version\":2,\"serviceId\":\"0013adc401624bd9a17e84162703b9f3\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"S0\",\"tier\":\"Standard\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg95a50425821b1/providers/Microsoft.AppPlatform/Spring/springsvc87938\",\"name\":\"springsvc87938\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"version\":2,\"serviceId\":\"cbc99866e80e4a218fcb419bfda336a8\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"S0\",\"tier\":\"Standard\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969\",\"name\":\"springsvc44969\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"version\":2,\"serviceId\":\"a560b7fa6da644e2a038e8f4c6d88af5\"},\"type\":\"Microsoft.AppPlatform/Spring\",\"sku\":{\"name\":\"S0\",\"tier\":\"Standard\"},\"location\":\"eastus\",\"tags\":{},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgd45036868731a/providers/Microsoft.AppPlatform/Spring/springsvc45572\",\"name\":\"springsvc45572\"}]}", + "x-ms-client-request-id" : "01577b3c-18e7-412a-a4a3-123dae4cf079" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:44:32 GMT", + "server" : "nginx/1.17.7", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4c93dfbb-f4fa-43b5-a852-5e05fe727b04", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024433Z:4c93dfbb-f4fa-43b5-a852-5e05fe727b04", + "connection" : "keep-alive", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationResults/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3/Spring/springsvc44969?api-version=2020-07-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "4c93dfbb-f4fa-43b5-a852-5e05fe727b04", + "Body" : "", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "x-ms-client-request-id" : "c49ee2e5-1238-4439-96ab-f7aee0a2e21c" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:45:03 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11971", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6d10e491-d0d3-4313-9325-5bb357ac2e84", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024503Z:6d10e491-d0d3-4313-9325-5bb357ac2e84", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6d10e491-d0d3-4313-9325-5bb357ac2e84", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "c1538a52-58fd-4e66-8624-0b8cbaaf4a42" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:45:33 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11970", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9f52b622-1ffc-4cae-8d70-08b2caf831a1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024533Z:9f52b622-1ffc-4cae-8d70-08b2caf831a1", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "9f52b622-1ffc-4cae-8d70-08b2caf831a1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "5fbbb014-f0e8-4465-b6be-09de9beeb8f0" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:46:04 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11969", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "359b7c31-b8a5-46cc-a4ea-3c4b58d1915d", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024604Z:359b7c31-b8a5-46cc-a4ea-3c4b58d1915d", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "359b7c31-b8a5-46cc-a4ea-3c4b58d1915d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "cd838373-9b3b-4b5b-b635-d09da3783949" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:46:34 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11968", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b8d77db3-c581-4470-9865-dd23902cdfba", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024634Z:b8d77db3-c581-4470-9865-dd23902cdfba", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "b8d77db3-c581-4470-9865-dd23902cdfba", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "9acc3d88-31a7-4284-ab01-2299e5c0a457" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:47:04 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11967", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2bca5964-6506-4e05-a91a-53c4d69d99f1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024704Z:2bca5964-6506-4e05-a91a-53c4d69d99f1", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "2bca5964-6506-4e05-a91a-53c4d69d99f1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "8d2c2ae0-8d8c-4aa8-af74-d83189952278" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:47:34 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11966", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2049d2bc-55ce-45a7-b65a-d79fb9135ec1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024735Z:2049d2bc-55ce-45a7-b65a-d79fb9135ec1", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "2049d2bc-55ce-45a7-b65a-d79fb9135ec1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "dd36245d-0102-424c-801e-fa234104b2cf" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:48:04 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11965", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ffbc3c29-cdff-40e4-9a85-f3a1ec95f780", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024805Z:ffbc3c29-cdff-40e4-9a85-f3a1ec95f780", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "ffbc3c29-cdff-40e4-9a85-f3a1ec95f780", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "b070255a-c65d-40f8-a782-886e25077cc9" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:48:34 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11964", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4854f8a7-fd29-44a6-9cb1-be13e2afda37", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024835Z:4854f8a7-fd29-44a6-9cb1-be13e2afda37", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "4854f8a7-fd29-44a6-9cb1-be13e2afda37", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "48251ed3-c27d-4194-adbb-79670c5b1356" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:49:06 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11963", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6a7c949f-a6f4-44b3-9fa7-d89114448515", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024906Z:6a7c949f-a6f4-44b3-9fa7-d89114448515", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "6a7c949f-a6f4-44b3-9fa7-d89114448515", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "388ab9b3-53d1-4911-893c-a726c958f8af" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:49:36 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11962", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "64be1d7f-90e0-4fba-bad3-ed875a7e6eae", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T024936Z:64be1d7f-90e0-4fba-bad3-ed875a7e6eae", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "64be1d7f-90e0-4fba-bad3-ed875a7e6eae", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "488cc27b-2608-4e35-ba06-d535ae331087" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:50:06 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11961", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a2d041ed-cc7f-489a-a283-03a182426d54", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025006Z:a2d041ed-cc7f-489a-a283-03a182426d54", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "a2d041ed-cc7f-489a-a283-03a182426d54", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "92115ba9-a555-41f6-a38e-a3b12c082639" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:50:37 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11960", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ecf89f9a-9aad-4c73-84b8-8fd3b7b64ce9", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025037Z:ecf89f9a-9aad-4c73-84b8-8fd3b7b64ce9", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "ecf89f9a-9aad-4c73-84b8-8fd3b7b64ce9", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "e2597610-fced-4754-8245-27cc731bf8b1" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:51:08 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11959", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c4a73042-8c32-49a0-b2a7-79cbc80fa09c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025108Z:c4a73042-8c32-49a0-b2a7-79cbc80fa09c", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c4a73042-8c32-49a0-b2a7-79cbc80fa09c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "54330fed-b59e-4858-9f0b-b32d877673ed" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:51:38 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11958", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b072ee2d-521a-46a3-923b-669ab0f49862", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025138Z:b072ee2d-521a-46a3-923b-669ab0f49862", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "b072ee2d-521a-46a3-923b-669ab0f49862", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "5e8a7c99-915d-4aa7-9511-05a903f793d3" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:52:08 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11957", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "be1bc153-c2c1-4286-961b-351e29991e8e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025208Z:be1bc153-c2c1-4286-961b-351e29991e8e", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "be1bc153-c2c1-4286-961b-351e29991e8e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "0f513b39-ff60-412f-b4a3-308b42e2feb6" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:52:38 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11956", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8fc27942-2e08-4399-b95f-5ed145703806", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025239Z:8fc27942-2e08-4399-b95f-5ed145703806", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8fc27942-2e08-4399-b95f-5ed145703806", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "c0641c65-894a-4308-896f-8b6f1d13969a" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:53:09 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11955", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "8468d91c-8e06-4f26-9251-7d9d2f25c2ae", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025309Z:8468d91c-8e06-4f26-9251-7d9d2f25c2ae", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8468d91c-8e06-4f26-9251-7d9d2f25c2ae", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "57cf381d-c8d3-45d0-bc61-b699b9830c22" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:53:39 GMT", + "server" : "nginx/1.17.7", + "content-length" : "328", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11954", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "44b6a37b-b676-4025-b205-8e733944cf1f", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025339Z:44b6a37b-b676-4025-b205-8e733944cf1f", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "44b6a37b-b676-4025-b205-8e733944cf1f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Running\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\"}", + "x-ms-client-request-id" : "4e9fed5e-e518-4283-821b-ba83ebed81cf" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:54:10 GMT", + "server" : "nginx/1.17.7", + "content-length" : "371", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11953", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "44d67c5b-ae31-4de8-af79-ed465146d241", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025411Z:44d67c5b-ae31-4de8-af79-ed465146d241", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "44d67c5b-ae31-4de8-af79-ed465146d241", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/springsvc44969/operationId/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"name\":\"6fd1d074-21d4-4ccb-b74d-07f8a135f2f3\",\"status\":\"Succeeded\",\"startTime\":\"2020-08-26T02:44:33.0900235Z\",\"endTime\":\"2020-08-26T02:53:55.9360746Z\"}", + "x-ms-client-request-id" : "f0f8779a-aa1f-487e-88a7-8917465a9309" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/locations/eastus/operationResults/6fd1d074-21d4-4ccb-b74d-07f8a135f2f3/Spring/springsvc44969?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:54:10 GMT", + "server" : "nginx/1.17.7", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11952", + "StatusCode" : "204", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "fc8b202a-59aa-4a01-908b-1827b5d1489e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-rp-server-mvid" : "d8cff8a2-0549-4ee1-8c3d-fa9d1b5306d8", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025411Z:fc8b202a-59aa-4a01-908b-1827b5d1489e", + "connection" : "keep-alive", + "cache-control" : "no-cache", + "x-ms-request-id" : "fc8b202a-59aa-4a01-908b-1827b5d1489e", + "Body" : "", + "x-ms-client-request-id" : "6524b2fd-a5ea-4816-8cd7-e615086b6595" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgb0d583251971e/providers/Microsoft.AppPlatform/Spring/springsvc44969?api-version=2020-07-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appplatform/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:54:11 GMT", + "content-length" : "230", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "404", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "12ab688a-e2bd-4252-88b3-97a1b3960411", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-failure-cause" : "gateway", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025411Z:12ab688a-e2bd-4252-88b3-97a1b3960411", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "12ab688a-e2bd-4252-88b3-97a1b3960411", + "Body" : "{\"error\":{\"code\":\"ResourceNotFound\",\"message\":\"The Resource 'Microsoft.AppPlatform/Spring/springsvc44969' under resource group 'rgb0d583251971e' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"}}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgb0d583251971e?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.3; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 26 Aug 2020 02:54:15 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d1e291de-6e06-43c9-ba86-351e7b01c79e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200826T025416Z:d1e291de-6e06-43c9-ba86-351e7b01c79e", + "connection" : "keep-alive", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0IwRDU4MzI1MTk3MUUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "d1e291de-6e06-43c9-ba86-351e7b01c79e", + "Body" : "" + } + } ], + "variables" : [ "rgb0d583251971e", "springsvc44969" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java index 51e3808340fba..6ffaec5f4f500 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java @@ -112,14 +112,13 @@ public static boolean runSample(Azure azure, String clientId) { System.out.printf("Creating spring cloud app gateway in resource group %s ...%n", rgName); SpringApp gateway = service.apps().define("gateway") + .defineActiveDeployment("default") + .withSourceCodeTarGzFile(gzFile) + .withTargetModule("gateway") + .attach() .withDefaultPublicEndpoint() .withHttpsOnly() .create(); - gateway.getActiveDeployment() - .update() - .withSourceCodeTarGzFile(gzFile) - .withTargetModule("gateway") - .apply(); System.out.println("Created spring cloud service gateway"); Utils.print(gateway); @@ -129,12 +128,11 @@ public static boolean runSample(Azure azure, String clientId) { System.out.printf("Creating spring cloud app auth-service in resource group %s ...%n", rgName); SpringApp authService = service.apps().define("auth-service") + .defineActiveDeployment("default") + .withSourceCodeTarGzFile(gzFile) + .withTargetModule("auth-service") + .attach() .create(); - authService.getActiveDeployment() - .update() - .withSourceCodeTarGzFile(gzFile) - .withTargetModule("auth-service") - .apply(); System.out.println("Created spring cloud service auth-service"); Utils.print(authService); @@ -144,12 +142,11 @@ public static boolean runSample(Azure azure, String clientId) { System.out.printf("Creating spring cloud app account-service in resource group %s ...%n", rgName); SpringApp accountService = service.apps().define("account-service") + .defineActiveDeployment("default") + .withSourceCodeTarGzFile(gzFile) + .withTargetModule("account-service") + .attach() .create(); - accountService.getActiveDeployment() - .update() - .withSourceCodeTarGzFile(gzFile) - .withTargetModule("account-service") - .apply(); System.out.println("Created spring cloud service account-service"); Utils.print(accountService); @@ -250,12 +247,12 @@ public static boolean runSample(Azure azure, String clientId) { .withCertificate(certName, vault.vaultUri(), certName) .apply(); - System.out.printf("Updating Spring Cloud App with domain ssl.%s ...", domainName); + System.out.printf("Updating Spring Cloud App with domain ssl.%s ...%n", domainName); gateway.update() .withCustomDomain(String.format("ssl.%s", domainName), thumbprint) .apply(); - System.out.printf("Successfully expose domain ssl.%s", domainName); + System.out.printf("Successfully expose domain ssl.%s%n", domainName); return true; } catch (Exception e) { From 419eeb19df85de17611e0df029409f702b400ff8 Mon Sep 17 00:00:00 2001 From: Philippe Partarrieu Date: Mon, 31 Aug 2020 07:39:21 +0200 Subject: [PATCH 008/168] Use next link from group membership request (#14305) * Use next link from group membership request loadUser only gets the first 100 groups a user belongs to rather than using the odata.nextLink in the response to get the full list of groups. Fix this by checking if the response contains an odata.nextLink and then build the URL appropriately for the configured API version. For V1, odata.nextLink contains a skip token which we extract. More information here: https://docs.microsoft.com/en-us/previous-versions/azure/ad/graph/api/users-operations#get-a-users-manager-- For V2, odata.nextLink can be used directly as the URL for the request as specified here: https://docs.microsoft.com/en-us/graph/paging fix #14222 * Remove jackson datatype dep Change the type of the odata.nextLink from Optional to String * Remove unused Jdk8Module import Co-authored-by: Philippe Partarrieu --- .../aad/controller/TodoListController.java | 2 +- .../autoconfigure/aad/AzureADGraphClient.java | 57 ++++++++++++------- .../spring/autoconfigure/aad/UserGroup.java | 23 +++++++- .../spring/autoconfigure/aad/UserGroups.java | 52 +++++++++++++++++ .../aad/AzureADGraphClientTest.java | 6 +- .../autoconfigure/aad/UserGroupTest.java | 11 +++- .../aad/azure-ad-graph-user-groups.json | 3 +- .../aad/microsoft-graph-user-groups.json | 3 +- 8 files changed, 122 insertions(+), 35 deletions(-) create mode 100644 sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java index 09017c9a3dc9d..e972685eada77 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java @@ -93,7 +93,7 @@ public ResponseEntity deleteTodoItem(@PathVariable("id") int id, final UserPrincipal current = (UserPrincipal) authToken.getPrincipal(); if (current.isMemberOf( - new UserGroup("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "group1"))) { + new UserGroup("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Group", "group1"))) { final List find = todoList.stream().filter(i -> i.getID() == id).collect(Collectors.toList()); if (!find.isEmpty()) { todoList.remove(todoList.indexOf(find.get(0))); diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java index f6f2b52d27297..571d2bb88ed6d 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java @@ -3,7 +3,6 @@ package com.microsoft.azure.spring.autoconfigure.aad; -import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.microsoft.aad.msal4j.ClientCredentialFactory; import com.microsoft.aad.msal4j.ConfidentialClientApplication; @@ -40,7 +39,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.stream.Collectors; -import java.util.stream.StreamSupport; /** * Microsoft Graph client encapsulation. @@ -77,8 +75,8 @@ private void initAADMicrosoftGraphApiBool(String endpointEnv) { this.aadMicrosoftGraphApiBool = endpointEnv.contains(V2_VERSION_ENV_FLAG); } - private String getUserMembershipsV1(String accessToken) throws IOException { - final URL url = new URL(serviceEndpoints.getAadMembershipRestUri()); + private String getUserMemberships(String accessToken, String odataNextLink) throws IOException { + final URL url = buildUrl(odataNextLink); final HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // Set the appropriate header fields in the request header. @@ -103,6 +101,26 @@ private String getUserMembershipsV1(String accessToken) throws IOException { } } + private String getSkipTokenFromLink(String odataNextLink) { + String[] parts = odataNextLink.split("/memberOf\\?"); + return parts[1]; + } + + private URL buildUrl(String odataNextLink) throws MalformedURLException { + URL url; + if (odataNextLink != null) { + if (this.aadMicrosoftGraphApiBool) { + url = new URL(odataNextLink); + } else { + String skipToken = getSkipTokenFromLink(odataNextLink); + url = new URL(serviceEndpoints.getAadMembershipRestUri() + "&" + skipToken); + } + } else { + url = new URL(serviceEndpoints.getAadMembershipRestUri()); + } + return url; + } + private static String getResponseStringFromConn(HttpURLConnection conn) throws IOException { try (BufferedReader reader = new BufferedReader( @@ -121,37 +139,34 @@ public List getGroups(String graphApiToken) throws IOException { } private List loadUserGroups(String graphApiToken) throws IOException { - final String responseInJson = getUserMembershipsV1(graphApiToken); + String responseInJson = getUserMemberships(graphApiToken, null); final List lUserGroups = new ArrayList<>(); final ObjectMapper objectMapper = JacksonObjectMapperFactory.getInstance(); - final JsonNode rootNode = objectMapper.readValue(responseInJson, JsonNode.class); - final JsonNode valuesNode = rootNode.get("value"); - - if (valuesNode != null) { - lUserGroups - .addAll(StreamSupport.stream(valuesNode.spliterator(), false).filter(this::isMatchingUserGroupKey) - .map(node -> { - final String objectID = node. - get(aadAuthenticationProperties.getUserGroup().getObjectIDKey()).asText(); - final String displayName = node.get("displayName").asText(); - return new UserGroup(objectID, displayName); - }).collect(Collectors.toList())); + UserGroups groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); + if (groupsFromJson.getValue() != null) { + lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) + .collect(Collectors.toList())); + } + while (groupsFromJson.getOdataNextLink() != null) { + responseInJson = getUserMemberships(graphApiToken, groupsFromJson.getOdataNextLink()); + groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); + lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) + .collect(Collectors.toList())); } return lUserGroups; } /** - * Checks that the JSON Node is a valid User Group to extract User Groups from + * Checks that the UserGroup has a Group object type. * * @param node - json node to look for a key/value to equate against the * {@link AADAuthenticationProperties.UserGroupProperties} * @return true if the json node contains the correct key, and expected value to identify a user group. */ - private boolean isMatchingUserGroupKey(final JsonNode node) { - return node.get(aadAuthenticationProperties.getUserGroup().getKey()).asText() - .equals(aadAuthenticationProperties.getUserGroup().getValue()); + private boolean isMatchingUserGroupKey(final UserGroup group) { + return group.getObjectType().equals(aadAuthenticationProperties.getUserGroup().getValue()); } public Set getGrantedAuthorities(String graphApiToken) throws IOException { diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java index 360ae47ebb298..6d1857bcfb0d2 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java @@ -6,14 +6,26 @@ import java.io.Serializable; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonAlias; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) public class UserGroup implements Serializable { private static final long serialVersionUID = 9064197572478554735L; private String objectID; + private String objectType; private String displayName; - public UserGroup(String objectID, String displayName) { + @JsonCreator + public UserGroup( + @JsonProperty("objectId") @JsonAlias("id") String objectID, + @JsonProperty("objectType") @JsonAlias("@odata.type") String objectType, + @JsonProperty("displayName") String displayName) { this.objectID = objectID; + this.objectType = objectType; this.displayName = displayName; } @@ -21,6 +33,10 @@ public String getDisplayName() { return displayName; } + public String getObjectType() { + return objectType; + } + public String getObjectID() { return objectID; } @@ -35,11 +51,12 @@ public boolean equals(Object o) { } final UserGroup group = (UserGroup) o; return this.getDisplayName().equals(group.getDisplayName()) - && this.getObjectID().equals(group.getObjectID()); + && this.getObjectID().equals(group.getObjectID()) + && this.getObjectType().equals(group.getObjectType()); } @Override public int hashCode() { - return Objects.hash(objectID, displayName); + return Objects.hash(objectID, objectType, displayName); } } diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java new file mode 100644 index 0000000000000..a909ed6a3be72 --- /dev/null +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.spring.autoconfigure.aad; + +import java.util.List; +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class UserGroups { + + private String odataNextLink; + private List value; + + @JsonCreator + public UserGroups( + @JsonProperty("odata.nextLink") String odataNextLink, + @JsonProperty("value") List value) { + this.odataNextLink = odataNextLink; + this.value = value; + } + + public String getOdataNextLink() { + return odataNextLink; + } + + public List getValue() { + return value; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UserGroups)) { + return false; + } + final UserGroups groups = (UserGroups) o; + return this.getOdataNextLink().equals(groups.getOdataNextLink()) + && this.getValue().equals(groups.getValue()); + } + + @Override + public int hashCode() { + return Objects.hash(odataNextLink, value); + } +} diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java index 34b8ecd7b9e15..e2a5c429fb8e3 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java @@ -41,7 +41,7 @@ public void setup() { public void testConvertGroupToGrantedAuthorities() { final List userGroups = Collections.singletonList( - new UserGroup("testId", "Test_Group")); + new UserGroup("testId", "Group", "Test_Group")); final Set authorities = adGraphClient.convertGroupsToGrantedAuthorities(userGroups); assertThat(authorities).hasSize(1).extracting(GrantedAuthority::getAuthority) @@ -51,8 +51,8 @@ public void testConvertGroupToGrantedAuthorities() { @Test public void testConvertGroupToGrantedAuthoritiesUsingAllowedGroups() { final List userGroups = Arrays - .asList(new UserGroup("testId", "Test_Group"), - new UserGroup("testId", "Another_Group")); + .asList(new UserGroup("testId", "Group", "Test_Group"), + new UserGroup("testId", "Group", "Another_Group")); aadAuthProps.getUserGroup().getAllowedGroups().add("Another_Group"); final Set authorities = adGraphClient.convertGroupsToGrantedAuthorities(userGroups); assertThat(authorities).hasSize(2).extracting(GrantedAuthority::getAuthority) diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java index 08906553218cc..8851acc5af144 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java @@ -7,13 +7,18 @@ import org.junit.Test; public class UserGroupTest { - private static final UserGroup GROUP_1 = new UserGroup("12345", "test"); + private static final UserGroup GROUP_1 = new UserGroup("12345", "Group", "test"); @Test public void getDisplayName() { Assert.assertEquals("test", GROUP_1.getDisplayName()); } + @Test + public void getObjectType() { + Assert.assertEquals("Group", GROUP_1.getObjectType()); + } + @Test public void getObjectID() { Assert.assertEquals("12345", GROUP_1.getObjectID()); @@ -21,13 +26,13 @@ public void getObjectID() { @Test public void equals() { - final UserGroup group2 = new UserGroup("12345", "test"); + final UserGroup group2 = new UserGroup("12345", "Group", "test"); Assert.assertEquals(GROUP_1, group2); } @Test public void hashCodeTest() { - final UserGroup group2 = new UserGroup("12345", "test"); + final UserGroup group2 = new UserGroup("12345", "Group", "test"); Assert.assertEquals(GROUP_1.hashCode(), group2.hashCode()); } } diff --git a/sdk/spring/azure-spring-boot/src/test/resources/aad/azure-ad-graph-user-groups.json b/sdk/spring/azure-spring-boot/src/test/resources/aad/azure-ad-graph-user-groups.json index baf41c7408b2c..93441b9088b2d 100644 --- a/sdk/spring/azure-spring-boot/src/test/resources/aad/azure-ad-graph-user-groups.json +++ b/sdk/spring/azure-spring-boot/src/test/resources/aad/azure-ad-graph-user-groups.json @@ -60,6 +60,5 @@ "provisioningErrors": [], "proxyAddresses": [], "securityEnabled": true - }], - "odata.nextLink": "directoryObjects/$/Microsoft.DirectoryServices.User/12345678-2898-434a-a370-8ec974c2fb57/memberOf?$skiptoken=X'445370740700010000000000000000100000009D29CBA7B45D854A84FF7F9B636BD9DC000000000000000000000017312E322E3834302E3131333535362E312E342E3233333100000000'" + }] } diff --git a/sdk/spring/azure-spring-boot/src/test/resources/aad/microsoft-graph-user-groups.json b/sdk/spring/azure-spring-boot/src/test/resources/aad/microsoft-graph-user-groups.json index 93497a317b70a..1e8bdf1396d28 100644 --- a/sdk/spring/azure-spring-boot/src/test/resources/aad/microsoft-graph-user-groups.json +++ b/sdk/spring/azure-spring-boot/src/test/resources/aad/microsoft-graph-user-groups.json @@ -75,6 +75,5 @@ "securityEnabled": true, "visibility": null, "onPremisesProvisioningErrors": [] - }], - "odata.nextLink": "directoryObjects/$/Microsoft.DirectoryServices.User/12345678-2898-434a-a370-8ec974c2fb57/memberOf?$skiptoken=X'445370740700010000000000000000100000009D29CBA7B45D854A84FF7F9B636BD9DC000000000000000000000017312E322E3834302E3131333535362E312E342E3233333100000000'" + }] } From a31612ad2de914ca17c87f05254f0038d53e2af1 Mon Sep 17 00:00:00 2001 From: Jack Lu Date: Mon, 31 Aug 2020 14:35:32 +0800 Subject: [PATCH 009/168] add azure spring boot servicebus jms integration test (#14562) * Resolve netty version conflicts * modify order * add azure spring boot servicebus jms integration test Signed-off-by: Jack Lu * add azure spring boot servicebus jms integration test Signed-off-by: Jack Lu * modify test-resources.json Signed-off-by: Jack Lu * modify test-resource.json * remove unused import --- eng/versioning/version_client.txt | 1 + .../CHANGELOG.md | 3 + .../README.md | 9 +++ .../pom.xml | 69 +++++++++++++++++ .../azure/servicebus/jms/Application.java | 12 +++ .../azure/servicebus/jms/Receiver.java | 23 ++++++ .../azure/servicebus/jms/ServiceBusJmsIT.java | 26 +++++++ .../microsoft/azure/servicebus/jms/User.java | 25 +++++++ .../src/test/resources/application.properties | 1 + .../test-resources.json | 75 +++++++++++++++++++ sdk/spring/pom.xml | 1 + sdk/spring/tests.yml | 3 + 12 files changed, 248 insertions(+) create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/CHANGELOG.md create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/README.md create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/pom.xml create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/Application.java create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/Receiver.java create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/ServiceBusJmsIT.java create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/User.java create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/resources/application.properties create mode 100644 sdk/spring/azure-spring-boot-test-servicebus-jms/test-resources.json diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index dfe4903af7e7c..2419b096e7b61 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -59,6 +59,7 @@ com.azure:azure-spring-boot-test-aad;1.0.0;1.0.0 com.azure:azure-spring-boot-test-core;1.0.0;1.0.0 com.azure:azure-spring-boot-test-cosmosdb;1.0.0;1.0.0 com.azure:azure-spring-boot-test-keyvault;1.0.0;1.0.0 +com.azure:azure-spring-boot-test-servicebus-jms;1.0.0;1.0.0 com.azure:azure-spring-cloud-test-eventhubs;1.0.0;1.0.0 com.azure:azure-spring-data-gremlin;2.3.1-beta.1;2.3.1-beta.1 com.azure.resourcemanager:azure-resourcemanager;2.0.0-beta.3;2.0.0-beta.4 diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/CHANGELOG.md b/sdk/spring/azure-spring-boot-test-servicebus-jms/CHANGELOG.md new file mode 100644 index 0000000000000..3bae488de73c9 --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0 (Unreleased) diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/README.md b/sdk/spring/azure-spring-boot-test-servicebus-jms/README.md new file mode 100644 index 0000000000000..a20e9ce11abec --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/README.md @@ -0,0 +1,9 @@ +# Azure Spring Boot Integration tests client library for Java + +## Key concepts +## Getting started +## Key concepts +## Examples +## Troubleshooting +## Next steps +## Contributing diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/pom.xml b/sdk/spring/azure-spring-boot-test-servicebus-jms/pom.xml new file mode 100644 index 0000000000000..627e96e5044d1 --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/pom.xml @@ -0,0 +1,69 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-spring-boot-test-servicebus-jms + 1.0.0 + + + 1.8 + true + + + + + com.microsoft.azure + azure-servicebus-jms-spring-boot-starter + 2.4.0-beta.1 + + + + org.springframework.boot + spring-boot-starter-test + 2.3.3.RELEASE + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + + + com.microsoft.azure:azure-servicebus-jms-spring-boot-starter:[2.4.0-beta.1] + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.22.0 + + ${skipSpringITs} + + + + + + diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/Application.java b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/Application.java new file mode 100644 index 0000000000000..e98244eb39923 --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/Application.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.servicebus.jms; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.jms.annotation.EnableJms; + +@EnableJms +@SpringBootApplication +public class Application { +} diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/Receiver.java b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/Receiver.java new file mode 100644 index 0000000000000..59cc4a93928da --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/Receiver.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.servicebus.jms; + +import org.springframework.jms.annotation.JmsListener; +import org.springframework.stereotype.Component; + +import java.util.concurrent.Exchanger; + +@Component +public class Receiver { + + public static final String QUEUE_NAME = "que001"; + + public static final Exchanger EXCHANGER = new Exchanger<>(); + + @JmsListener(destination = QUEUE_NAME, containerFactory = "jmsListenerContainerFactory") + public void receiveMessage(User user) throws InterruptedException { + EXCHANGER.exchange(user.getName()); + } + +} diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/ServiceBusJmsIT.java b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/ServiceBusJmsIT.java new file mode 100644 index 0000000000000..2bcc5052f98ec --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/ServiceBusJmsIT.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.servicebus.jms; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.jms.core.JmsTemplate; + +@SpringBootTest +class ServiceBusJmsIT { + + @Autowired + private JmsTemplate jmsTemplate; + + @Test + void integrationTest() throws InterruptedException { + final String name = "Tester"; + jmsTemplate.convertAndSend(Receiver.QUEUE_NAME, new User(name)); + String msg = Receiver.EXCHANGER.exchange(name); + Assertions.assertEquals(name, msg); + } + +} diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/User.java b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/User.java new file mode 100644 index 0000000000000..638619e42aa96 --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/java/com/microsoft/azure/servicebus/jms/User.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.servicebus.jms; + +import java.io.Serializable; + +public class User implements Serializable { + + private static final long serialVersionUID = -295422703255886286L; + private String name; + + User(String name) { + setName(name); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + +} diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/resources/application.properties b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/resources/application.properties new file mode 100644 index 0000000000000..7809b2aabd131 --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/src/test/resources/application.properties @@ -0,0 +1 @@ +spring.jms.servicebus.connection-string=${SPRING_JMS_SERVICEBUS_CONNECTION_STRING} diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/test-resources.json b/sdk/spring/azure-spring-boot-test-servicebus-jms/test-resources.json new file mode 100644 index 0000000000000..0fd57ada2748d --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/test-resources.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "defaultValue": "[resourceGroup().name]", + "type": "String" + } + }, + "variables": { + "namespaces_name": "[parameters('baseName')]", + "location": "[resourceGroup().location]" + }, + "resources": [ + { + "type": "Microsoft.ServiceBus/namespaces", + "apiVersion": "2018-01-01-preview", + "name": "[variables('namespaces_name')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "zoneRedundant": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", + "apiVersion": "2017-04-01", + "name": "[concat(variables('namespaces_name'), '/RootManageSharedAccessKey')]", + "location": "[variables('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', variables('namespaces_name'))]" + ], + "properties": { + "rights": [ + "Listen", + "Manage", + "Send" + ] + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(variables('namespaces_name'), '/que001')]", + "location": "[variables('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', variables('namespaces_name'))]" + ], + "properties": { + "lockDuration": "PT30S", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + } + ], + "outputs": { + "SPRING_JMS_SERVICEBUS_CONNECTION_STRING": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', variables('namespaces_name'), 'RootManageSharedAccessKey'), '2017-04-01').primaryConnectionString]" + } + } +} diff --git a/sdk/spring/pom.xml b/sdk/spring/pom.xml index 02f16372a5f69..ac725ef8dae60 100644 --- a/sdk/spring/pom.xml +++ b/sdk/spring/pom.xml @@ -24,6 +24,7 @@ azure-spring-boot-test-aad azure-spring-boot-test-cosmosdb azure-spring-boot-test-keyvault + azure-spring-boot-test-servicebus-jms azure-spring-cloud-test-eventhubs azure-spring-boot-samples/azure-spring-boot-sample-active-directory azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc diff --git a/sdk/spring/tests.yml b/sdk/spring/tests.yml index 2126148090577..a298e4d836096 100644 --- a/sdk/spring/tests.yml +++ b/sdk/spring/tests.yml @@ -25,6 +25,9 @@ jobs: - name: azure-spring-boot-test-keyvault groupId: com.azure safeName: azurespringboottestkeyvault + - name: azure-spring-boot-test-servicebus-jms + groupId: com.azure + safeName: azurespringboottestservicebusjms - name: azure-spring-cloud-test-eventhubs groupId: com.azure safeName: azurespringcloudtesteventhubs From db97b97c7100b6c969002b32f948d073d84264cb Mon Sep 17 00:00:00 2001 From: Vinay Gera Date: Mon, 31 Aug 2020 01:45:02 -0700 Subject: [PATCH 010/168] Identity adfs support aug 2020 (#14444) --- .../resources/spotbugs/spotbugs-exclude.xml | 1 - eng/versioning/external_dependencies.txt | 3 +- .../microsoft-azure-eventhubs/pom.xml | 2 +- sdk/identity/azure-identity/pom.xml | 10 +-- .../AuthorizationCodeListener.java | 81 ------------------- .../implementation/IdentityClient.java | 59 ++++++-------- .../src/main/java/module-info.java | 1 - .../implementation/IdentityClientTests.java | 29 ++++--- .../pom.xml | 4 +- sdk/spring/azure-spring-boot/pom.xml | 4 +- 10 files changed, 52 insertions(+), 142 deletions(-) delete mode 100644 sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/AuthorizationCodeListener.java diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index 34f8e1955870f..3813a1d6e493f 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -633,7 +633,6 @@ name="com.azure.data.appconfiguration.credentials.ConfigurationClientCredentials$AuthorizationHeaderProvider"/> - diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index a7947d4cc65f5..2ba2cc5e0839b 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -153,7 +153,7 @@ com.microsoft.azure:azure-mgmt-resources;1.3.0 com.microsoft.azure:azure-mgmt-search;1.24.1 com.microsoft.azure:azure-mgmt-storage;1.3.0 com.microsoft.azure:azure-storage;8.0.0 -com.microsoft.azure:msal4j;1.6.1 +com.microsoft.azure:msal4j;1.6.2 com.microsoft.azure:msal4j-persistence-extension;1.0.0 com.sun.activation:jakarta.activation;1.2.2 io.opentelemetry:opentelemetry-api;0.6.0 @@ -247,7 +247,6 @@ org.eclipse.m2e:lifecycle-mapping;1.0.0 org.jacoco:jacoco-maven-plugin;0.8.5 org.jacoco:org.jacoco.agent;0.8.5 org.mockito:mockito-core;3.3.3 -org.nanohttpd:nanohttpd;2.3.1 org.revapi:revapi-java;0.20.0 org.revapi:revapi-maven-plugin;0.11.2 diff --git a/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml b/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml index 5b3c0991042f8..65d337730f3c0 100644 --- a/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml +++ b/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml @@ -76,7 +76,7 @@ com.microsoft.azure msal4j - 1.6.1 + 1.6.2 test diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index 6f5e7c4c0205c..df7ef398a15e2 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -32,7 +32,7 @@ com.microsoft.azure msal4j - 1.6.1 + 1.6.2 com.microsoft.azure @@ -44,11 +44,6 @@ oauth2-oidc-sdk 7.1.1 - - org.nanohttpd - nanohttpd - 2.3.1 - junit @@ -116,12 +111,11 @@ - com.microsoft.azure:msal4j:[1.6.1] + com.microsoft.azure:msal4j:[1.6.2] com.microsoft.azure:msal4j-persistence-extension:[1.0.0] com.nimbusds:oauth2-oidc-sdk:[7.1.1] net.java.dev.jna:jna-platform:[5.4.0] org.linguafranca.pwdb:KeePassJava2:[2.1.4] - org.nanohttpd:nanohttpd:[2.3.1] diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/AuthorizationCodeListener.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/AuthorizationCodeListener.java deleted file mode 100644 index 2c186a36bb76c..0000000000000 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/AuthorizationCodeListener.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.identity.implementation; - -import com.azure.core.util.UrlBuilder; -import com.azure.core.util.logging.ClientLogger; -import fi.iki.elonen.NanoHTTPD; -import reactor.core.publisher.Mono; -import reactor.core.publisher.MonoProcessor; - -import java.io.IOException; - -/** - * A local HTTP server that listens to the authorization code response from Azure Active Directory. - */ -public final class AuthorizationCodeListener { - private final ClientLogger logger = new ClientLogger(AuthorizationCodeListener.class); - - private NanoHTTPD httpServer; - private MonoProcessor authorizationCodeEmitter; - - private AuthorizationCodeListener(NanoHTTPD httpServer, MonoProcessor authorizationCodeEmitter) { - this.httpServer = httpServer; - this.authorizationCodeEmitter = authorizationCodeEmitter; - - try { - this.httpServer.start(); - } catch (IOException e) { - logger.error( - "Unable to start identity authorization code listener on port " + httpServer.getListeningPort(), e); - } - } - - /** - * Starts the server asynchronously on a given port. "http://locahost:{port}" must be white-listed as a reply URL. - * @param port the port to listen on - * @return a Publisher emitting the listener instance - */ - public static Mono create(int port) { - MonoProcessor monoProcessor = MonoProcessor.create(); - - return Mono.just(new NanoHTTPD(port) { - @Override - public Response serve(final IHTTPSession session) { - String uriWithQueryParams = session.getUri() + "?" + session.getQueryParameterString(); - monoProcessor.onNext(getCodeFromUri(uriWithQueryParams)); - return newFixedLengthResponse(""); - } - }).map(server -> new AuthorizationCodeListener(server, monoProcessor)); - } - - /** - * Dispose the server - * @return a Publisher signaling the completion - */ - public Mono dispose() { - return Mono.fromRunnable(() -> { - httpServer.closeAllConnections(); - httpServer.stop(); - }); - } - - /** - * Listen for the next authorization code - * @return a Publisher emitting an authorization code - */ - public Mono listen() { - return authorizationCodeEmitter; - } - - private static String getCodeFromUri(String uri) { - UrlBuilder urlBuilder = UrlBuilder.parse(uri); - for (String query : urlBuilder.getQuery().keySet()) { - if ("code".equalsIgnoreCase(query)) { - return urlBuilder.getQuery().get(query); - } - } - return null; - } -} diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java index 5e05a5d5a3766..93ab41910d318 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java @@ -33,6 +33,7 @@ import com.microsoft.aad.msal4j.IAccount; import com.microsoft.aad.msal4j.IAuthenticationResult; import com.microsoft.aad.msal4j.IClientCredential; +import com.microsoft.aad.msal4j.InteractiveRequestParameters; import com.microsoft.aad.msal4j.PublicClientApplication; import com.microsoft.aad.msal4j.RefreshTokenParameters; import com.microsoft.aad.msal4j.SilentParameters; @@ -42,7 +43,6 @@ import com.microsoft.aad.msal4jextensions.persistence.linux.KeyRingAccessException; import com.sun.jna.Platform; import reactor.core.publisher.Mono; -import reactor.core.scheduler.Schedulers; import java.io.BufferedReader; import java.io.File; @@ -76,7 +76,6 @@ import java.util.Map; import java.util.Random; import java.util.Scanner; -import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; @@ -111,6 +110,7 @@ public class IdentityClient { private static final String DEFAULT_CONFIDENTIAL_KEYRING_ITEM_NAME = DEFAULT_CONFIDENTIAL_KEYCHAIN_ACCOUNT; private static final String DEFAULT_KEYRING_ATTR_NAME = "MsalClientID"; private static final String DEFAULT_KEYRING_ATTR_VALUE = "Microsoft.Developer.IdentityService"; + private static final String HTTP_LOCALHOST = "http://localhost"; private final ClientLogger logger = new ClientLogger(IdentityClient.class); private final IdentityClientOptions options; @@ -640,38 +640,20 @@ public Mono authenticateWithAuthorizationCode(TokenRequestContext req * @return a Publisher that emits an AccessToken */ public Mono authenticateWithBrowserInteraction(TokenRequestContext request, int port) { - String authorityUrl = options.getAuthorityHost().replaceAll("/+$", "") + "/" + tenantId; - return AuthorizationCodeListener.create(port) - .flatMap(server -> { - URI redirectUri; - String browserUri; - try { - redirectUri = new URI(String.format("http://localhost:%s", port)); - browserUri = - String.format("%s/oauth2/v2.0/authorize?response_type=code&response_mode=query&prompt" - + "=select_account&client_id=%s&redirect_uri=%s&state=%s&scope=%s", - authorityUrl, - clientId, - redirectUri.toString(), - UUID.randomUUID(), - String.join(" ", request.getScopes())); - } catch (URISyntaxException e) { - return server.dispose().then(Mono.error(e)); - } + URI redirectUri; + try { + redirectUri = new URI(HTTP_LOCALHOST + ":" + port); + } catch (URISyntaxException e) { + return Mono.error(logger.logExceptionAsError(new RuntimeException(e))); + } + InteractiveRequestParameters parameters = InteractiveRequestParameters.builder(redirectUri) + .scopes(new HashSet<>(request.getScopes())) + .build(); + Mono acquireToken = publicClientApplicationAccessor.getValue() + .flatMap(pc -> Mono.fromFuture(() -> pc.acquireToken(parameters))); - return server.listen() - .mergeWith(Mono.fromRunnable(() -> { - try { - openUrl(browserUri); - } catch (IOException e) { - throw logger.logExceptionAsError(new IllegalStateException(e)); - } - }).subscribeOn(Schedulers.newSingle("browser"))) - .next() - .flatMap(code -> authenticateWithAuthorizationCode(request, code, redirectUri)) - .onErrorResume(t -> server.dispose().then(Mono.error(t))) - .flatMap(msalToken -> server.dispose().then(Mono.just(msalToken))); - }); + return acquireToken.onErrorMap(t -> new ClientAuthenticationException( + "Failed to acquire token with Interactive Browser Authentication.", null, t)).map(MsalToken::new); } /** @@ -821,7 +803,16 @@ public Mono authenticateToIMDSEndpoint(TokenRequestContext request) throw logger.logExceptionAsError(new RuntimeException( String.format("Could not connect to the url: %s.", url), exception)); } - int responseCode = connection.getResponseCode(); + int responseCode; + try { + responseCode = connection.getResponseCode(); + } catch (Exception e) { + throw logger.logExceptionAsError( + new CredentialUnavailableException( + "ManagedIdentityCredential authentication unavailable. " + + "Connection to IMDS endpoint cannot be established, " + + e.getMessage() + ".", e)); + } if (responseCode == 410 || responseCode == 429 || responseCode == 404 diff --git a/sdk/identity/azure-identity/src/main/java/module-info.java b/sdk/identity/azure-identity/src/main/java/module-info.java index 2fb83a340921f..52d4c547b91a4 100644 --- a/sdk/identity/azure-identity/src/main/java/module-info.java +++ b/sdk/identity/azure-identity/src/main/java/module-info.java @@ -8,7 +8,6 @@ requires msal4j.persistence.extension; requires com.sun.jna; requires com.sun.jna.platform; - requires nanohttpd; requires org.reactivestreams; requires org.linguafranca.pwdb.database; requires org.linguafranca.pwdb.kdbx; diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java index 4decdfd94044a..22c6cc91a8c5a 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java @@ -16,6 +16,7 @@ import com.microsoft.aad.msal4j.IClientCertificate; import com.microsoft.aad.msal4j.IClientCredential; import com.microsoft.aad.msal4j.IClientSecret; +import com.microsoft.aad.msal4j.InteractiveRequestParameters; import com.microsoft.aad.msal4j.MsalServiceException; import com.microsoft.aad.msal4j.PublicClientApplication; import com.microsoft.aad.msal4j.SilentParameters; @@ -29,7 +30,6 @@ import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import java.io.ByteArrayInputStream; @@ -55,7 +55,7 @@ @RunWith(PowerMockRunner.class) @PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"}) -@PrepareForTest({CertificateUtil.class, ClientCredentialFactory.class, AuthorizationCodeListener.class, Runtime.class, URL.class, ConfidentialClientApplication.class, ConfidentialClientApplication.Builder.class, PublicClientApplication.class, PublicClientApplication.Builder.class, IdentityClient.class}) +@PrepareForTest({CertificateUtil.class, ClientCredentialFactory.class, Runtime.class, URL.class, ConfidentialClientApplication.class, ConfidentialClientApplication.Builder.class, PublicClientApplication.class, PublicClientApplication.Builder.class, IdentityClient.class}) public class IdentityClientTests { private static final String TENANT_ID = "contoso.com"; @@ -303,8 +303,7 @@ public void testBrowserAuthenicationCodeFlow() throws Exception { OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plusHours(1); // mock - mockForAuthorizationCodeFlow(token, request, expiresOn); - mocForBrowserAuthenticationCodeFlow(); + mocForBrowserAuthenticationCodeFlow(token, request, expiresOn); // test IdentityClientOptions options = new IdentityClientOptions(); @@ -470,12 +469,22 @@ private void mockForIMDSCodeFlow(String tokenJson) throws Exception { when(huc.getInputStream()).thenReturn(inputStream); } - private void mocForBrowserAuthenticationCodeFlow() throws Exception { - AuthorizationCodeListener authorizationCodeListener = PowerMockito.mock(AuthorizationCodeListener.class); - whenNew(AuthorizationCodeListener.class).withAnyArguments().thenReturn((authorizationCodeListener)); - when(authorizationCodeListener.listen()).thenReturn(Mono.just("auth-Code")); - when(authorizationCodeListener.dispose()).thenReturn(Mono.empty()); - when(authorizationCodeListener.dispose()).thenReturn(Mono.empty()); + private void mocForBrowserAuthenticationCodeFlow(String token, TokenRequestContext request, OffsetDateTime expiresOn) throws Exception { + PublicClientApplication application = PowerMockito.mock(PublicClientApplication.class); + when(application.acquireToken(any(InteractiveRequestParameters.class))) + .thenAnswer(invocation -> { + InteractiveRequestParameters argument = (InteractiveRequestParameters) invocation.getArguments()[0]; + if (argument.scopes().size() != 1 || request.getScopes().get(0).equals(argument.scopes().iterator().next())) { + return TestUtils.getMockAuthenticationResult(token, expiresOn); + } else { + throw new InvalidUseOfMatchersException(String.format("Argument %s does not match", (Object) argument)); + } + }); + PublicClientApplication.Builder builder = PowerMockito.mock(PublicClientApplication.Builder.class); + when(builder.build()).thenReturn(application); + when(builder.authority(any())).thenReturn(builder); + when(builder.httpClient(any())).thenReturn(builder); + whenNew(PublicClientApplication.Builder.class).withArguments(CLIENT_ID).thenReturn(builder); } private void mockForAuthorizationCodeFlow(String token1, TokenRequestContext request, OffsetDateTime expiresAt) throws Exception { diff --git a/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml b/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml index 84a542882ffaa..0afbbe0b8b072 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml @@ -58,7 +58,7 @@ com.microsoft.azure msal4j - 1.6.1 + 1.6.2 com.nimbusds @@ -84,7 +84,7 @@ com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] --> com.fasterxml.jackson.core:jackson-databind:[2.11.2] - com.microsoft.azure:msal4j:[1.6.1] + com.microsoft.azure:msal4j:[1.6.2] com.nimbusds:nimbus-jose-jwt:[7.9] org.springframework:spring-web:[5.2.8.RELEASE] org.springframework.boot:spring-boot-starter:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot/pom.xml b/sdk/spring/azure-spring-boot/pom.xml index 2992d278c7174..9faff1b021415 100644 --- a/sdk/spring/azure-spring-boot/pom.xml +++ b/sdk/spring/azure-spring-boot/pom.xml @@ -158,7 +158,7 @@ com.microsoft.azure msal4j - 1.6.1 + 1.6.2 true @@ -264,7 +264,7 @@ com.fasterxml.jackson.core:jackson-databind:[2.11.2] net.minidev:json-smart:[2.3] - com.microsoft.azure:msal4j:[1.6.1] + com.microsoft.azure:msal4j:[1.6.2] com.microsoft.azure:spring-data-cosmosdb:[2.3.0] com.microsoft.spring.data.gremlin:spring-data-gremlin:[2.3.0] com.nimbusds:nimbus-jose-jwt:[7.9] From 1317e077e5149238c349c72849842d33bd10ccf6 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Mon, 31 Aug 2020 09:47:23 -0700 Subject: [PATCH 011/168] Implement Models API Part #1 (#14533) --- .../azure-digitaltwins-core/API design.md | 114 +------------ .../core/DigitalTwinsAsyncClient.java | 151 ++++++++++++++++++ .../digitaltwins/core/DigitalTwinsClient.java | 92 ++++++++++- .../core/util/ListModelOptions.java | 81 ++++++++++ 4 files changed, 324 insertions(+), 114 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/ListModelOptions.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/API design.md b/sdk/digitaltwins/azure-digitaltwins-core/API design.md index 1ae87eee05c02..1e9b645702ea4 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/API design.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/API design.md @@ -1175,63 +1175,7 @@ When updating a model, the payload for a multi-operation json patch follows the Async APIs ```java - /** - * Creates one or many models. - * @param models The list of models to create. Each string corresponds to exactly one model. - * @return The list of created models - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public Mono> createModels(List models) { } - - /** - * Creates one or many models. - * @param models The list of models to create. Each string corresponds to exactly one model. - * @return A REST response containing the list of created models. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public Mono>> createModelsWithResponse(List models) { } - - /** - * Gets a model, including the model metadata and the model definition. - * @param modelId The Id of the model. - * @return The application/json model - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getModel(String modelId) { } - - /** - * Gets a model, including the model metadata and the model definition asynchronously. - * @param modelId The Id of the model. - * @return A REST response containing the model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getModelWithResponse(String modelId) { } - - /** - * Gets the list of models by iterating through a collection. - * @param dependenciesFor The model Ids to have dependencies retrieved. - * @param includeModelDefinition Whether to include the model definition in the result. If false, only the model metadata will be returned. - * @param options The options to follow when listing the models. For example, the page size hint can be specified. - * @return A {@link PagedFlux} of ModelData. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listModels(List dependenciesFor, boolean includeModelDefinition, DigitalTwinModelsListOptions options) { } - - /** - * Deletes a model. - * @param modelId The id for the model. The id is globally unique and case sensitive. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteModel(String modelId) { } - - /** - * Deletes a model. - * @param modelId The id for the model. The id is globally unique and case sensitive. - * @return The http response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteModelWithResponse(String modelId) { } - + /** * Decommissions a model. * @param modelId The Id of the model to decommission. @@ -1252,61 +1196,6 @@ Async APIs Sync APIs ```java /** - * Creates one or many models. - * @param models The list of models to create. Each string corresponds to exactly one model. - * @return The list of created models - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public List createModels(List models) { } - - /** - * Creates one or many models. - * @param models The list of models to create. Each string corresponds to exactly one model. - * @return A REST response containing the list of created models. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public Response> createModelsWithResponse(List models, Context context) { } - - /** - * Gets a model, including the model metadata and the model definition. - * @param modelId The Id of the model. - * @return The application/json model - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelData getModel(String modelId) { } - - /** - * Gets a model, including the model metadata and the model definition. - * @param modelId The Id of the model. - * @return A REST response containing the model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getModelWithResponse(String modelId, Context context) { } - - /** - * Gets the list of models by iterating through a collection. - * @param dependenciesFor The model Ids to have dependencies retrieved. - * @param includeModelDefinition Whether to include the model definition in the result. If false, only the model metadata will be returned. - * @param options The options to follow when listing the models. For example, the page size hint can be specified. - * @return A {@link PagedIterable} of ModelData. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listModels(List dependenciesFor, boolean includeModelDefinition, DigitalTwinModelsListOptions options, Context context) { } - - /** - * Deletes a model. - * @param modelId The id for the model. The id is globally unique and case sensitive. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteModel(String modelId) { } - - /** - * Deletes a model. - * @param modelId The id for the model. The id is globally unique and case sensitive. - * @return The http response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteModelWithResponse(String modelId, Context context) { } /** * Decommissions a model. @@ -1318,6 +1207,7 @@ Sync APIs /** * Decommissions a model. * @param modelId The Id of the model to decommission. + * @param context Additional context that is passed through the Http pipeline during the service call. * @return The http response. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 6b24eeda5dfc9..13b9120310c58 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -13,14 +13,19 @@ import com.azure.core.util.serializer.JacksonAdapter; import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImpl; import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImplBuilder; +import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; +import com.azure.digitaltwins.core.models.ModelData; import com.azure.digitaltwins.core.util.DigitalTwinsResponse; import com.azure.digitaltwins.core.util.DigitalTwinsResponseHeaders; import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; +import com.azure.digitaltwins.core.util.ListModelOptions; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -48,6 +53,7 @@ public final class DigitalTwinsAsyncClient { private static final ObjectMapper mapper = new ObjectMapper(); private final DigitalTwinsServiceVersion serviceVersion; private final AzureDigitalTwinsAPIImpl protocolLayer; + private static final Boolean includeModelDefinition = true; DigitalTwinsAsyncClient(HttpPipeline pipeline, DigitalTwinsServiceVersion serviceVersion, String host) { final SimpleModule stringModule = new SimpleModule("String Serializer"); @@ -228,4 +234,149 @@ Mono> listRelationshipsNextSinglePageAsync(String nextLink }); } + + //================================================================================================================================================== + // Models APIs + //================================================================================================================================================== + + /** + * Creates one or many models. + * @param models The list of models to create. Each string corresponds to exactly one model. + * @return A {@link PagedFlux} of created models and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux createModels(List models) { + return new PagedFlux<>( + () -> withContext(context -> createModelsSinglePageAsync(models, context)), + nextLink -> withContext(context -> Mono.empty())); + } + + PagedFlux createModels(List models, Context context){ + return new PagedFlux<>( + () -> createModelsSinglePageAsync(models, context), + nextLink -> Mono.empty()); + } + + Mono> createModelsSinglePageAsync(List models, Context context) + { + List modelsPayload = new ArrayList<>(); + for (String model: models) { + try { + modelsPayload.add(mapper.readValue(model, Object.class)); + } + catch (JsonProcessingException e) { + logger.error("Could not parse the model payload [%s]: %s", model, e); + return Mono.error(e); + } + } + + return protocolLayer.getDigitalTwinModels().addWithResponseAsync(modelsPayload, context) + .map( + listResponse -> new PagedResponseBase<>( + listResponse.getRequest(), + listResponse.getStatusCode(), + listResponse.getHeaders(), + listResponse.getValue(), + null, + ((ResponseBase)listResponse).getDeserializedHeaders())); + } + + /** + * Gets a model, including the model metadata and the model definition. + * @param modelId The Id of the model. + * @return The ModelData + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getModel(String modelId) { + return withContext(context -> getModelWithResponse(modelId, context)) + .flatMap(response -> Mono.just(response.getValue())); + } + + /** + * Gets a model, including the model metadata and the model definition. + * @param modelId The Id of the model. + * @return The ModelData and the http response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getModelWithResponse(String modelId) { + return withContext(context -> getModelWithResponse(modelId, context)); + } + + Mono> getModelWithResponse(String modelId, Context context){ + return protocolLayer + .getDigitalTwinModels() + .getByIdWithResponseAsync(modelId, includeModelDefinition, context); + } + + /** + * Gets the list of models by iterating through a collection. + * @param listModelOptions The options to follow when listing the models. For example, the page size hint can be specified. + * @return A {@link PagedFlux} of ModelData and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listModels(ListModelOptions listModelOptions) { + return new PagedFlux<>( + () -> withContext(context -> listModelsSinglePageAsync(listModelOptions, context)), + nextLink -> withContext(context -> listModelsNextSinglePageAsync(nextLink, context))); + } + + /** + * Gets the list of models by iterating through a collection. + * @return A {@link PagedFlux} of ModelData and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listModels() { + return listModels(new ListModelOptions()); + } + + PagedFlux listModels(Context context){ + return new PagedFlux<>( + () -> listModelsSinglePageAsync(new ListModelOptions(), context), + nextLink -> listModelsNextSinglePageAsync(nextLink, context)); + } + + PagedFlux listModels(ListModelOptions listModelOptions, Context context){ + return new PagedFlux<>( + () -> listModelsSinglePageAsync(listModelOptions, context), + nextLink -> listModelsNextSinglePageAsync(nextLink, context)); + } + + Mono> listModelsSinglePageAsync(ListModelOptions listModelOptions, Context context){ + return protocolLayer.getDigitalTwinModels().listSinglePageAsync( + listModelOptions.getDependenciesFor(), + listModelOptions.getIncludeModelDefinition(), + new DigitalTwinModelsListOptions().setMaxItemCount(listModelOptions.getMaxItemCount()), + context); + } + + Mono> listModelsNextSinglePageAsync(String nextLink, Context context){ + return protocolLayer.getDigitalTwinModels().listNextSinglePageAsync(nextLink, context); + } + + /** + * Deletes a model. + * @param modelId The Id for the model. The Id is globally unique and case sensitive. + * @return An empty Mono + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteModel(String modelId) { + return withContext(context -> deleteModelWithResponse(modelId, context)) + .flatMap(response -> Mono.just(response.getValue())); + } + + /** + * Deletes a model. + * @param modelId The Id for the model. The Id is globally unique and case sensitive. + * @return The http response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteModelWithResponse(String modelId) { + return withContext(context -> deleteModelWithResponse(modelId, context)); + } + + Mono> deleteModelWithResponse(String modelId, Context context){ + return protocolLayer.getDigitalTwinModels().deleteWithResponseAsync(modelId, context); + } + + //TODO: Decommission Model APIs (waiting for Abhipsa's change to come in) } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 496cd1844e761..9aff8f0b84073 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -7,10 +7,18 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.*; import com.azure.core.util.Context; +import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; +import com.azure.digitaltwins.core.models.ModelData; +import com.azure.digitaltwins.core.util.ListModelOptions; import com.fasterxml.jackson.core.JsonProcessingException; +import reactor.core.publisher.Mono; + +import java.util.ArrayList; +import java.util.List; + +import static com.azure.core.util.FluxUtil.withContext; /** * This class provides a client for interacting synchronously with an Azure Digital Twins instance. @@ -80,4 +88,84 @@ public Response createRelationshipWithResponse(String digitalTwinId, Str public PagedIterable listRelationships(String digitalTwinId, String relationshipName, Context context) { return new PagedIterable<>(digitalTwinsAsyncClient.listRelationships(digitalTwinId, relationshipName, context)); } + + //================================================================================================================================================== + // Models APIs + //================================================================================================================================================== + + /** + * Creates one or many models. + * @param models The list of models to create. Each string corresponds to exactly one model. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link PagedIterable} of created models and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable createModels(List models, Context context) { + return new PagedIterable<>(digitalTwinsAsyncClient.createModels(models, context)); + } + + /** + * Gets a model, including the model metadata and the model definition. + * @param modelId The Id of the model. + * @return The ModelData + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelData getModel(String modelId) { + return digitalTwinsAsyncClient.getModel(modelId).block(); + } + + /** + * Gets a model, including the model metadata and the model definition. + * @param modelId The Id of the model. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The ModelData and the http response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getModelWithResponse(String modelId, Context context) { + return digitalTwinsAsyncClient.getModelWithResponse(modelId, context).block(); + } + + /** + * Gets the list of models by iterating through a collection. + * @param listModelOptions The options to follow when listing the models. For example, the page size hint can be specified. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link PagedIterable} of ModelData and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listModels(ListModelOptions listModelOptions, Context context) { + return new PagedIterable<>( + digitalTwinsAsyncClient.listModels(listModelOptions, context)); + } + + /** + * Gets the list of models by iterating through a collection. + * @return A {@link PagedFlux} of ModelData and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listModels() { + return new PagedIterable<>(digitalTwinsAsyncClient.listModels()); + } + + /** + * Deletes a model. + * @param modelId The Id for the model. The Id is globally unique and case sensitive. + * @return Void + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Void deleteModel(String modelId) { + return digitalTwinsAsyncClient.deleteModel(modelId).block(); + } + + /** + * Deletes a model. + * @param modelId The Id for the model. The Id is globally unique and case sensitive. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The http response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteModelWithResponse(String modelId, Context context) { + return digitalTwinsAsyncClient.deleteModelWithResponse(modelId, context).block(); + } + + //TODO: Decommission Model APIs (waiting for Abhipsa's change to come in) } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/ListModelOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/ListModelOptions.java new file mode 100644 index 0000000000000..e63131a3e4330 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/ListModelOptions.java @@ -0,0 +1,81 @@ +package com.azure.digitaltwins.core.util; + +import com.azure.core.annotation.Fluent; + +import java.util.List; + +@Fluent +public final class ListModelOptions { + + /* + * The maximum number of items to retrieve per request. The server may + * choose to return less than the requested max. + */ + private Integer maxItemCount; + + /** + * Get the maxItemCount property. + * + * @return the maxItemCount value. + */ + public Integer getMaxItemCount() { + return this.maxItemCount; + } + + /** + * Set the maxItemCount property. + * + * @param maxItemCount the maxItemCount value to set. + * @return the ListModelOptions object itself. + */ + public ListModelOptions setMaxItemCount(Integer maxItemCount) { + this.maxItemCount = maxItemCount; + return this; + } + + /* + * Whether to include the model definition in the result. If false, only the model metadata will be returned. + */ + private Boolean includeModelDefinition; + + /** + * Get the includeModelDefinition property. + * + * @return the includeModelDefinition value. + */ + public Boolean getIncludeModelDefinition() { return this.includeModelDefinition; } + + /** + * Set the includeModelDefinition property. + * + * @param includeModelDefinition the includeModelDefinition value to set. + * @return the ListModelOptions object itself. + */ + public ListModelOptions setIncludeModelDefinition(Boolean includeModelDefinition) { + this.includeModelDefinition = includeModelDefinition; + return this; + } + + /* + * The model Ids to have dependencies retrieved. + */ + private List dependenciesFor; + + /** + * Get the dependenciesFor property. + * + * @return the dependenciesFor value. + */ + public List getDependenciesFor() { return this.dependenciesFor; } + + /** + * Set the dependenciesFor property. + * + * @param dependenciesFor the dependenciesFor value to set. + * @return the ListModelOptions object itself. + */ + public ListModelOptions setDependenciesFor(List dependenciesFor) { + this.dependenciesFor = dependenciesFor; + return this; + } +} From 299d31f210c0b1f298cefd63b227f0b2e9f67bc7 Mon Sep 17 00:00:00 2001 From: bsiegel <96068+bsiegel@users.noreply.github.com> Date: Mon, 31 Aug 2020 10:16:35 -0700 Subject: [PATCH 012/168] Add metadata to TableItem & TableEntity (#14497) * Implement metadata methods for all clients * Add Timestamp metadata to TableEntity * Store full metadata for TableItem * Add listTables test * Fix SpotBugs issue --- .../azure/data/tables/TableAsyncClient.java | 127 +++++++++--------- .../com/azure/data/tables/TableClient.java | 14 +- .../azure/data/tables/TableClientBuilder.java | 2 +- .../data/tables/TableServiceAsyncClient.java | 34 ++++- .../azure/data/tables/TableServiceClient.java | 29 +++- .../implementation/TableEntityHelper.java | 66 --------- ...bleConstants.java => TablesConstants.java} | 15 ++- .../TablesJacksonSerializer.java | 2 +- .../implementation/TablesModelHelper.java | 115 ++++++++++++++++ .../azure/data/tables/models/TableEntity.java | 45 +++++-- .../azure/data/tables/models/TableItem.java | 49 ++++++- .../tables/TableServiceAsyncClientTest.java | 13 +- .../data/tables/TablesAsyncClientTest.java | 1 + .../implementation/AzureTableImplTest.java | 4 +- .../serviceListTablesWithFilterAsync.json | 52 +++++++ 15 files changed, 400 insertions(+), 168 deletions(-) delete mode 100644 sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TableEntityHelper.java rename sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/{TableConstants.java => TablesConstants.java} (67%) create mode 100644 sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesModelHelper.java create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java index fe3c9276db89b..fe1b3720f59f4 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java @@ -18,9 +18,8 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.data.tables.implementation.AzureTableImpl; import com.azure.data.tables.implementation.AzureTableImplBuilder; -import com.azure.data.tables.implementation.TableEntityHelper; -import com.azure.data.tables.implementation.TableConstants; -import com.azure.data.tables.implementation.TablesImpl; +import com.azure.data.tables.implementation.TablesConstants; +import com.azure.data.tables.implementation.TablesModelHelper; import com.azure.data.tables.implementation.models.OdataMetadataFormat; import com.azure.data.tables.implementation.models.QueryOptions; import com.azure.data.tables.implementation.models.ResponseFormat; @@ -33,14 +32,14 @@ import java.net.URI; import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.format.DateTimeParseException; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import static com.azure.core.util.FluxUtil.monoError; import static com.azure.core.util.FluxUtil.withContext; -import static com.azure.data.tables.implementation.TableConstants.PARTITION_KEY; -import static com.azure.data.tables.implementation.TableConstants.ROW_KEY; /** * class for the table async client @@ -53,43 +52,34 @@ public class TableAsyncClient { private final ClientLogger logger = new ClientLogger(TableAsyncClient.class); private final String tableName; private final AzureTableImpl implementation; - private final TablesImpl tableImplementation; private final String accountName; private final String tableUrl; - private final TablesServiceVersion apiVersion; private final QueryOptions defaultQueryOptions = new QueryOptions() .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); TableAsyncClient(String tableName, AzureTableImpl implementation) { - this.implementation = implementation; - this.tableImplementation = implementation.getTables(); - this.tableName = tableName; - this.accountName = null; - this.tableUrl = null; - this.apiVersion = null; - } - - TableAsyncClient(String tableName, HttpPipeline pipeline, String url, TablesServiceVersion serviceVersion, - SerializerAdapter serializerAdapter) { - try { - final URI uri = URI.create(url); + final URI uri = URI.create(implementation.getUrl()); + this.accountName = uri.getHost().split("\\.", 2)[0]; + this.tableUrl = uri.resolve("/" + tableName).toString(); logger.verbose("Table Service URI: {}", uri); } catch (IllegalArgumentException ex) { throw logger.logExceptionAsError(ex); } - this.implementation = new AzureTableImplBuilder() + this.implementation = implementation; + this.tableName = tableName; + } + + TableAsyncClient(String tableName, HttpPipeline pipeline, String url, TablesServiceVersion serviceVersion, + SerializerAdapter serializerAdapter) { + this(tableName, new AzureTableImplBuilder() .url(url) .serializerAdapter(serializerAdapter) .pipeline(pipeline) .version(serviceVersion.getVersion()) - .buildClient(); - this.tableImplementation = implementation.getTables(); - this.tableName = tableName; - this.accountName = null; - this.tableUrl = null; - this.apiVersion = null; + .buildClient() + ); } /** @@ -111,7 +101,7 @@ public String getAccountName() { } /** - * returns Url of this service + * returns Url of this table * * @return Url */ @@ -125,7 +115,7 @@ public String getTableUrl() { * @return the version */ public TablesServiceVersion getApiVersion() { - return apiVersion; + return TablesServiceVersion.valueOf(implementation.getVersion()); } /** @@ -156,7 +146,7 @@ public Mono> createWithResponse() { * @return An HTTP response */ Mono> createWithResponse(Context context) { - return tableImplementation.createWithResponseAsync(new TableProperties().setTableName(tableName), null, + return implementation.getTables().createWithResponseAsync(new TableProperties().setTableName(tableName), null, ResponseFormat.RETURN_NO_CONTENT, null, context).map(response -> { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null); @@ -190,7 +180,7 @@ public Mono> createEntityWithResponse(TableEntity entity) { } Mono> createEntityWithResponse(TableEntity entity, Context context) { - return tableImplementation.insertEntityWithResponseAsync(tableName, null, null, + return implementation.getTables().insertEntityWithResponseAsync(tableName, null, null, ResponseFormat.RETURN_NO_CONTENT, entity.getProperties(), null, context).map(response -> { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -243,14 +233,14 @@ Mono> upsertEntityWithResponse(TableEntity entity, UpdateMode upd return monoError(logger, new NullPointerException("TableEntity cannot be null")); } if (updateMode == UpdateMode.REPLACE) { - return tableImplementation.updateEntityWithResponseAsync(tableName, entity.getPartitionKey(), + return implementation.getTables().updateEntityWithResponseAsync(tableName, entity.getPartitionKey(), entity.getRowKey(), timeoutInt, null, "*", entity.getProperties(), null, context).map(response -> { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null); }); } else { - return tableImplementation.mergeEntityWithResponseAsync(tableName, entity.getPartitionKey(), + return implementation.getTables().mergeEntityWithResponseAsync(tableName, entity.getPartitionKey(), entity.getRowKey(), timeoutInt, null, "*", entity.getProperties(), null, context).map(response -> { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -323,7 +313,7 @@ Mono> updateEntityWithResponse(TableEntity entity, boolean ifUnch Integer timeoutInt = timeout == null ? null : (int) timeout.getSeconds(); if (updateMode == null || updateMode == UpdateMode.MERGE) { if (ifUnchanged) { - return tableImplementation.mergeEntityWithResponseAsync(tableName, entity.getPartitionKey(), + return implementation.getTables().mergeEntityWithResponseAsync(tableName, entity.getPartitionKey(), entity.getRowKey(), timeoutInt, null, entity.getETag(), entity.getProperties(), null, context).map(response -> { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), @@ -332,7 +322,7 @@ Mono> updateEntityWithResponse(TableEntity entity, boolean ifUnch } else { return getEntity(entity.getPartitionKey(), entity.getRowKey()) .flatMap(entityReturned -> { - return tableImplementation.mergeEntityWithResponseAsync(tableName, + return implementation.getTables().mergeEntityWithResponseAsync(tableName, entity.getPartitionKey(), entity.getRowKey(), timeoutInt, null, "*", entity.getProperties(), null, context); }).map(response -> { @@ -342,7 +332,7 @@ Mono> updateEntityWithResponse(TableEntity entity, boolean ifUnch } } else { if (ifUnchanged) { - return tableImplementation.updateEntityWithResponseAsync(tableName, entity.getPartitionKey(), + return implementation.getTables().updateEntityWithResponseAsync(tableName, entity.getPartitionKey(), entity.getRowKey(), timeoutInt, null, entity.getETag(), entity.getProperties(), null, context).map(response -> { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), @@ -351,7 +341,7 @@ Mono> updateEntityWithResponse(TableEntity entity, boolean ifUnch } else { return getEntity(entity.getPartitionKey(), entity.getRowKey()) .flatMap(entityReturned -> { - return tableImplementation.updateEntityWithResponseAsync(tableName, + return implementation.getTables().updateEntityWithResponseAsync(tableName, entity.getPartitionKey(), entity.getRowKey(), timeoutInt, null, "*", entity.getProperties(), null, context); @@ -391,7 +381,7 @@ public Mono> deleteWithResponse() { * @return a table */ Mono> deleteWithResponse(Context context) { - return tableImplementation.deleteWithResponseAsync(tableName, null, context).map(response -> { + return implementation.getTables().deleteWithResponseAsync(tableName, null, context).map(response -> { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null); }); @@ -443,7 +433,7 @@ Mono> deleteEntityWithResponse(String partitionKey, String rowKey String matchParam = eTag == null ? "*" : eTag; Integer timeoutInt = timeout == null ? null : (int) timeout.getSeconds(); context = context == null ? Context.NONE : context; - return tableImplementation.deleteEntityWithResponseAsync(tableName, partitionKey, rowKey, matchParam, + return implementation.getTables().deleteEntityWithResponseAsync(tableName, partitionKey, rowKey, matchParam, timeoutInt, null, null, context).map(response -> { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null); @@ -470,26 +460,26 @@ public PagedFlux listEntities() { @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listEntities(ListEntitiesOptions options) { return new PagedFlux<>( - () -> withContext(context -> listFirstPageEntities(context, options)), - token -> withContext(context -> listNextPageEntities(token, context, options))); + () -> withContext(context -> listEntitiesFirstPage(context, options)), + token -> withContext(context -> listEntitiesNextPage(token, context, options))); } //802 - PagedFlux listTables(ListEntitiesOptions options, Context context) { + PagedFlux listEntities(ListEntitiesOptions options, Context context) { return new PagedFlux<>( - () -> listFirstPageEntities(context, options), - token -> listNextPageEntities(token, context, options)); + () -> listEntitiesFirstPage(context, options), + token -> listEntitiesNextPage(token, context, options)); } //802 - private Mono> listFirstPageEntities(Context context, ListEntitiesOptions options) { + private Mono> listEntitiesFirstPage(Context context, ListEntitiesOptions options) { try { - return listTables(null, null, context, options); + return listEntities(null, null, context, options); } catch (RuntimeException e) { return monoError(logger, e); } } //1459 - private Mono> listNextPageEntities(String token, Context context, + private Mono> listEntitiesNextPage(String token, Context context, ListEntitiesOptions options) { if (token == null) { return Mono.empty(); @@ -502,14 +492,14 @@ private Mono> listNextPageEntities(String token, Cont } String nextPartitionKey = split[0]; String nextRowKey = split[1]; - return listTables(nextPartitionKey, nextRowKey, context, options); + return listEntities(nextPartitionKey, nextRowKey, context, options); } catch (RuntimeException e) { return monoError(logger, e); } } //1459 - private Mono> listTables(String nextPartitionKey, String nextRowKey, Context context, - ListEntitiesOptions options) { + private Mono> listEntities(String nextPartitionKey, String nextRowKey, Context context, + ListEntitiesOptions options) { QueryOptions queryOptions = new QueryOptions() .setFilter(options.getFilter()) .setTop(options.getTop()) @@ -615,7 +605,7 @@ public Mono> getEntityWithResponse(String partitionKey, St Mono> getEntityWithResponse(String partitionKey, String rowKey, QueryOptions queryOptions, Context context) { - return tableImplementation.queryEntitiesWithPartitionAndRowKeyWithResponseAsync(tableName, partitionKey, + return implementation.getTables().queryEntitiesWithPartitionAndRowKeyWithResponseAsync(tableName, partitionKey, rowKey, null, null, queryOptions, context) .handle((response, sink) -> { final TableEntityQueryResponse entityQueryResponse = response.getValue(); @@ -658,26 +648,43 @@ Mono> getEntityWithResponse(String partitionKey, String ro * @throws NullPointerException if 'properties' is null. */ private static TableEntity deserializeEntity(ClientLogger logger, Map properties) { - final Object partitionKeyValue = properties.get(PARTITION_KEY); + final Object partitionKeyValue = properties.get(TablesConstants.PARTITION_KEY); if (!(partitionKeyValue instanceof String) || ((String) partitionKeyValue).isEmpty()) { throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "'%s' does not exist in property map or is an empty value.", PARTITION_KEY))); + "'%s' does not exist in property map or is an empty value.", TablesConstants.PARTITION_KEY))); } - final Object rowKeyValue = properties.get(ROW_KEY); + final Object rowKeyValue = properties.get(TablesConstants.ROW_KEY); if (!(rowKeyValue instanceof String) || ((String) rowKeyValue).isEmpty()) { throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "'%s' does not exist in property map or is an empty value.", ROW_KEY))); + "'%s' does not exist in property map or is an empty value.", TablesConstants.ROW_KEY))); } - final TableEntity entity = new TableEntity((String) partitionKeyValue, (String) rowKeyValue); - properties.forEach((key, value) -> { - if (key.equals(TableConstants.ETAG_KEY)) { - TableEntityHelper.setETag(entity, String.valueOf(value)); + final Object timestampValue = properties.get(TablesConstants.TIMESTAMP_KEY); + OffsetDateTime timestamp = null; + if (timestampValue != null) { + if (!(timestampValue instanceof String)) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is of the wrong type.", TablesConstants.TIMESTAMP_KEY))); } + try { + timestamp = OffsetDateTime.parse((String) timestampValue); + } catch (DateTimeParseException e) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is not a valid OffsetDateTime.", TablesConstants.TIMESTAMP_KEY), e)); + } + } - entity.getProperties().putIfAbsent(key, value); - }); + final Object etagValue = properties.get(TablesConstants.ODATA_ETAG_KEY); + if (etagValue != null && !(etagValue instanceof String)) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is of the wrong type.", TablesConstants.ODATA_ETAG_KEY))); + } + + final TableEntity entity = new TableEntity((String) partitionKeyValue, (String) rowKeyValue); + TablesModelHelper.setValues(entity, timestamp, (String) etagValue); + + properties.forEach((key, value) -> entity.getProperties().putIfAbsent(key, value)); return entity; } diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClient.java index e2ba186704435..17087f5b96792 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClient.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClient.java @@ -20,11 +20,9 @@ @ServiceClient( builder = TableClientBuilder.class) public class TableClient { - final String tableName; final TableAsyncClient client; - TableClient(String tableName, TableAsyncClient client) { - this.tableName = tableName; + TableClient(TableAsyncClient client) { this.client = client; } @@ -34,7 +32,7 @@ public class TableClient { * @return table name */ public String getTableName() { - return this.tableName; + return this.client.getTableName(); } /** @@ -43,16 +41,16 @@ public String getTableName() { * @return a string of the account name */ public String getAccountName() { - return null; + return this.client.getAccountName(); } /** - * returns Url of this service + * returns Url of this table * * @return Url */ public String getTableUrl() { - return null; + return this.client.getTableUrl(); } /** @@ -61,7 +59,7 @@ public String getTableUrl() { * @return the version */ public TablesServiceVersion getApiVersion() { - return null; + return this.client.getApiVersion(); } /** diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClientBuilder.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClientBuilder.java index 0f3ee4af7f135..eeaec5ac8121f 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClientBuilder.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClientBuilder.java @@ -98,7 +98,7 @@ public TableClientBuilder tableName(String tableName) { * @return a sync tableClient */ public TableClient buildClient() { - return new TableClient(tableName, buildAsyncClient()); + return new TableClient(buildAsyncClient()); } /** diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java index 8126819c62c12..7f3c9ac770128 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java @@ -18,6 +18,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.data.tables.implementation.AzureTableImpl; import com.azure.data.tables.implementation.AzureTableImplBuilder; +import com.azure.data.tables.implementation.TablesModelHelper; import com.azure.data.tables.implementation.models.OdataMetadataFormat; import com.azure.data.tables.implementation.models.QueryOptions; import com.azure.data.tables.implementation.models.ResponseFormat; @@ -41,12 +42,14 @@ public class TableServiceAsyncClient { private final ClientLogger logger = new ClientLogger(TableServiceAsyncClient.class); private final AzureTableImpl implementation; + private final String accountName; TableServiceAsyncClient(HttpPipeline pipeline, String url, TablesServiceVersion serviceVersion, SerializerAdapter serializerAdapter) { try { final URI uri = URI.create(url); + this.accountName = uri.getHost().split("\\.", 2)[0]; logger.verbose("Table Service URI: {}", uri); } catch (IllegalArgumentException ex) { throw logger.logExceptionAsError(ex); @@ -60,6 +63,33 @@ public class TableServiceAsyncClient { .buildClient(); } + /** + * returns the account for this service + * + * @return returns the account name + */ + public String getAccountName() { + return accountName; + } + + /** + * returns Url of this service + * + * @return Url + */ + public String getServiceUrl() { + return implementation.getUrl(); + } + + /** + * returns the version + * + * @return the version + */ + public TablesServiceVersion getApiVersion() { + return TablesServiceVersion.valueOf(implementation.getVersion()); + } + /** * retrieves the async table client for the provided table or creates one if it doesn't exist * @@ -191,7 +221,7 @@ private Mono> listTables(String nextTableName, Context QueryOptions queryOptions = new QueryOptions() .setFilter(options.getFilter()) .setTop(options.getTop()) - .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_MINIMALMETADATA); + .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); return implementation.getTables().queryWithResponseAsync(null, nextTableName, queryOptions, context) .flatMap(response -> { TableQueryResponse tableQueryResponse = response.getValue(); @@ -203,7 +233,7 @@ private Mono> listTables(String nextTableName, Context return Mono.empty(); } final List tables = tableResponsePropertiesList.stream() - .map(e -> new TableItem(e.getTableName())).collect(Collectors.toList()); + .map(TablesModelHelper::createItem).collect(Collectors.toList()); return Mono.just(new TablePaged(response, tables, response.getDeserializedHeaders().getXMsContinuationNextTableName())); diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java index eceabc831038e..f82e012651da4 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java @@ -23,6 +23,33 @@ public class TableServiceClient { this.client = client; } + /** + * returns the account for this service + * + * @return returns the account name + */ + public String getAccountName() { + return client.getAccountName(); + } + + /** + * returns Url of this service + * + * @return Url + */ + public String getServiceUrl() { + return client.getServiceUrl(); + } + + /** + * returns the version + * + * @return the version + */ + public TablesServiceVersion getApiVersion() { + return client.getApiVersion(); + } + /** * gets the Table Client for the given table * @@ -30,7 +57,7 @@ public class TableServiceClient { * @return the Table Client for the table */ public TableClient getTableClient(String name) { - return null; + return new TableClient(client.getTableClient(name)); } /** diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TableEntityHelper.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TableEntityHelper.java deleted file mode 100644 index ff4ca36658135..0000000000000 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TableEntityHelper.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.data.tables.implementation; - -import com.azure.core.util.logging.ClientLogger; -import com.azure.data.tables.models.TableEntity; - -import java.util.Objects; - -/** - * Used to access internal methods on models. - */ -public final class TableEntityHelper { - private static EntityAccessor entityAccessor; - - static { - // Force initialise this class. - try { - Class.forName(EntityAccessor.class.getName(), true, EntityAccessor.class.getClassLoader()); - } catch (ClassNotFoundException e) { - throw new ClientLogger(TableEntityHelper.class).logThrowableAsError(new AssertionError(e)); - } - } - - /** - * Sets the entity accessor. - * - * @param accessor The entity accessor. - * @throws IllegalStateException if the accessor has already been set. - */ - public static void setEntityAccessor(EntityAccessor accessor) { - Objects.requireNonNull(accessor, "'accessor' cannot be null."); - - if (TableEntityHelper.entityAccessor != null) { - throw new ClientLogger(TableEntityHelper.class).logExceptionAsError(new IllegalStateException( - "'entityAccessor' is already set.")); - } - - entityAccessor = accessor; - } - - /** - * Sets the ETag on an {@link TableEntity}. - * - * @param entity Entity to set the ETag on. - * @param eTag ETag to set. - */ - public static void setETag(TableEntity entity, String eTag) { - if (entityAccessor == null) { - throw new ClientLogger(TableEntityHelper.class).logExceptionAsError( - new IllegalStateException("'entityAccessor' should not be null.")); - } - - entityAccessor.setETag(entity, eTag); - } - - public interface EntityAccessor { - /** - * Sets the ETag on an {@link TableEntity}. - * - * @param entity Entity to set the ETag on. - * @param eTag ETag to set. - */ - void setETag(TableEntity entity, String eTag); - } -} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TableConstants.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java similarity index 67% rename from sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TableConstants.java rename to sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java index 0c4e038fd65aa..d973ac94a81a7 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TableConstants.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java @@ -5,7 +5,7 @@ /** * Constants for Tables service. */ -public final class TableConstants { +public final class TablesConstants { /** * Name in the Map to get the partition key. */ @@ -17,9 +17,14 @@ public final class TableConstants { public static final String ROW_KEY = "RowKey"; /** - * Name in the map to get row key. + * Name in the Map to get the timestamp. */ - public static final String ETAG_KEY = "odata.etag"; + public static final String TIMESTAMP_KEY = "Timestamp"; + + /** + * Name in the map to get the eTag. + */ + public static final String ODATA_ETAG_KEY = "odata.etag"; /** * Name in the map for key of metadata related to object. @@ -29,11 +34,11 @@ public final class TableConstants { /** * Name in the map for the entity's URL. */ - public static final String EDIT_LINK_KEY = "odata.editLink"; + public static final String ODATA_EDIT_LINK_KEY = "odata.editLink"; /** * Private constructor so this class cannot be instantiated. */ - private TableConstants() { + private TablesConstants() { } } diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java index 91106f4885fce..c8f2ed7b4f082 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java @@ -65,7 +65,7 @@ public U deserialize(InputStream inputStream, Type type, SerializerEncoding final Map.Entry entry = it.next(); final JsonNode childNode = entry.getValue(); - if (entry.getKey().equals(TableConstants.ODATA_METADATA_KEY)) { + if (entry.getKey().equals(TablesConstants.ODATA_METADATA_KEY)) { odataMetadata = childNode.asText(); continue; } diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesModelHelper.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesModelHelper.java new file mode 100644 index 0000000000000..8e86d5afe2a9b --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesModelHelper.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables.implementation; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.data.tables.implementation.models.TableResponseProperties; +import com.azure.data.tables.models.TableEntity; +import com.azure.data.tables.models.TableItem; + +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Used to access internal methods on models. + */ +public final class TablesModelHelper { + private static EntityAccessor entityAccessor; + private static ItemCreator itemCreator; + + static { + // Force classes' static blocks to execute + try { + Class.forName(TableEntity.class.getName(), true, TableEntity.class.getClassLoader()); + Class.forName(TableItem.class.getName(), true, TableItem.class.getClassLoader()); + } catch (ClassNotFoundException e) { + AssertionError err = new AssertionError("Failed to initialize TablesModelHelper dependency classes.", e); + new ClientLogger(TablesModelHelper.class).logThrowableAsError(err); + throw err; + } + } + + /** + * Sets the entity accessor. + * + * @param accessor The entity accessor. + * @throws IllegalStateException if the accessor has already been set. + */ + public static void setEntityAccessor(EntityAccessor accessor) { + Objects.requireNonNull(accessor, "'accessor' cannot be null."); + + if (TablesModelHelper.entityAccessor != null) { + throw new ClientLogger(TablesModelHelper.class).logExceptionAsError(new IllegalStateException( + "'entityAccessor' is already set.")); + } + + entityAccessor = accessor; + } + + /** + * Sets the item creator. + * + * @param creator The item creator. + * @throws IllegalStateException if the accessor has already been set. + */ + public static void setItemCreator(ItemCreator creator) { + Objects.requireNonNull(creator, "'creator' cannot be null."); + + if (TablesModelHelper.itemCreator != null) { + throw new ClientLogger(TablesModelHelper.class).logExceptionAsError(new IllegalStateException( + "'itemCreator' is already set.")); + } + + itemCreator = creator; + } + + /** + * Sets values on a {@link TableEntity}. + * + * @param entity Entity to set the values on. + * @param timestamp Timestamp to set. + * @param eTag ETag to set. + */ + public static void setValues(TableEntity entity, OffsetDateTime timestamp, String eTag) { + if (entityAccessor == null) { + throw new ClientLogger(TablesModelHelper.class).logExceptionAsError( + new IllegalStateException("'entityAccessor' should not be null.")); + } + + entityAccessor.setValues(entity, timestamp, eTag); + } + + /** + * Creates a {@link TableItem}. + * + * @param properties The TableResponseProperties used to construct the table + */ + public static TableItem createItem(TableResponseProperties properties) { + if (itemCreator == null) { + throw new ClientLogger(TablesModelHelper.class).logExceptionAsError( + new IllegalStateException("'itemCreator' should not be null.")); + } + + return itemCreator.create(properties); + } + + public interface EntityAccessor { + /** + * Sets values on a {@link TableEntity}. + * + * @param entity Entity to set the ETag on. + * @param timestamp Timestamp to set. + * @param eTag ETag to set. + */ + void setValues(TableEntity entity, OffsetDateTime timestamp, String eTag); + } + + public interface ItemCreator { + /** + * Creates a {@link TableItem}. + * + * @param properties The TableResponseProperties used to construct the table + */ + TableItem create(TableResponseProperties properties); + } +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableEntity.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableEntity.java index cbef57484cd22..832e9c60a0abc 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableEntity.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableEntity.java @@ -5,15 +5,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.data.tables.implementation.TableEntityHelper; -import com.azure.data.tables.implementation.TableConstants; +import com.azure.data.tables.implementation.TablesConstants; +import com.azure.data.tables.implementation.TablesModelHelper; + +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; import java.util.Objects; -import static com.azure.data.tables.implementation.TableConstants.PARTITION_KEY; -import static com.azure.data.tables.implementation.TableConstants.ROW_KEY; - /** * table entity class */ @@ -24,11 +23,15 @@ public class TableEntity { private final String rowKey; private final Map properties = new HashMap<>(); + private OffsetDateTime timestamp; private String eTag; static { // This is used by classes in different packages to get access to private and package-private methods. - TableEntityHelper.setEntityAccessor((entity, name) -> entity.setETag(name)); + TablesModelHelper.setEntityAccessor((entity, timestamp, eTag) -> { + entity.setTimestamp(timestamp); + entity.setETag(eTag); + }); } /** @@ -42,8 +45,8 @@ public TableEntity(String partitionKey, String rowKey) { this.partitionKey = Objects.requireNonNull(partitionKey, "'partitionKey' cannot be null."); Objects.requireNonNull(properties, "'properties' cannot be null."); - properties.put(PARTITION_KEY, partitionKey); - properties.put(TableConstants.ROW_KEY, rowKey); + properties.put(TablesConstants.PARTITION_KEY, partitionKey); + properties.put(TablesConstants.ROW_KEY, rowKey); } /** @@ -67,12 +70,12 @@ public Map getProperties() { public TableEntity addProperty(String key, Object value) { Objects.requireNonNull(key, "'key' cannot be null."); - if (PARTITION_KEY.equals(key)) { + if (TablesConstants.PARTITION_KEY.equals(key)) { throw logger.logExceptionAsError( - new IllegalArgumentException(PARTITION_KEY + " cannot be set after object creation.")); - } else if (ROW_KEY.equals(key)) { + new IllegalArgumentException(TablesConstants.PARTITION_KEY + " cannot be set after object creation.")); + } else if (TablesConstants.ROW_KEY.equals(key)) { throw logger.logExceptionAsError( - new IllegalArgumentException(ROW_KEY + " cannot be set after object creation.")); + new IllegalArgumentException(TablesConstants.ROW_KEY + " cannot be set after object creation.")); } properties.put(key, value); @@ -97,6 +100,24 @@ public String getPartitionKey() { return partitionKey; } + /** + * gets the Timestamp + * + * @return the Timestamp for the entity + */ + public OffsetDateTime getTimestamp() { + return timestamp; + } + + /** + * Sets the Timestamp on the Entity. + * + * @param timestamp Timestamp to set. + */ + void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + /** * gets the etag * diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableItem.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableItem.java index 8957438954e65..3e34d0dab9a6a 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableItem.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableItem.java @@ -2,18 +2,32 @@ // Licensed under the MIT License. package com.azure.data.tables.models; +import com.azure.data.tables.implementation.TablesModelHelper; +import com.azure.data.tables.implementation.models.TableResponseProperties; + /** * class for a table object */ public class TableItem { private final String name; + private final String odataType; + private final String odataId; + private final String odataEditLink; + + static { + // This is used by classes in different packages to get access to private and package-private methods. + TablesModelHelper.setItemCreator(TableItem::new); + } /** - * crete a table - * @param name the name of the table + * create a table + * @param properties The TableResponseProperties used to construct this table */ - public TableItem(String name) { - this.name = name; + TableItem(TableResponseProperties properties) { + this.name = properties.getTableName(); + this.odataType = properties.getOdataType(); + this.odataId = properties.getOdataId(); + this.odataEditLink = properties.getOdataEditLink(); } /** @@ -24,4 +38,31 @@ public TableItem(String name) { public String getName() { return name; } + + /** + * returns the type of this table + * + * @return type + */ + String getOdataType() { + return odataType; + } + + /** + * returns the ID of this table + * + * @return ID + */ + String getOdataId() { + return odataId; + } + + /** + * returns the edit link of this table + * + * @return edit link + */ + String getOdataEditLink() { + return odataEditLink; + } } diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java index 56b77413df3ca..f71cf943232b9 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java @@ -12,12 +12,13 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import reactor.test.StepVerifier; import java.time.Duration; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Tests methods for {@link TableServiceAsyncClient}. */ @@ -108,19 +109,19 @@ void serviceDeleteTableWithResponseAsync() { .verify(); } - @Disabled("TODO: Not working at the moment.") @Test - void serviceListTableWithResponseWithParamsAsync() { + void serviceListTablesWithFilterAsync() { // Arrange - ListTablesOptions options = new ListTablesOptions().setFilter("TableName eq SampleTable"); + final String tableName = testResourceNamer.randomName("test", 20); + ListTablesOptions options = new ListTablesOptions().setFilter("TableName eq '" + tableName + "'"); + serviceClient.createTable(tableName).block(TIMEOUT); // Act & Assert StepVerifier.create(serviceClient.listTables(options)) .assertNext(table -> { - System.out.print(table); + assertEquals(tableName, table.getName()); }) .expectComplete() .verify(); - } } diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java index 0e50bc8f049e6..9c9ec05b8a67f 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java @@ -245,6 +245,7 @@ void getEntityWithResponseAsync() { assertEquals(tableEntity.getPartitionKey(), entity.getPartitionKey()); assertEquals(tableEntity.getRowKey(), entity.getRowKey()); + assertNotNull(entity.getTimestamp()); assertNotNull(entity.getETag()); assertNotNull(entity.getProperties()); }) diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/implementation/AzureTableImplTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/implementation/AzureTableImplTest.java index f240a06ebe2c8..bb277fff8dd1f 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/implementation/AzureTableImplTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/implementation/AzureTableImplTest.java @@ -45,8 +45,8 @@ import java.util.List; import java.util.Map; -import static com.azure.data.tables.implementation.TableConstants.PARTITION_KEY; -import static com.azure.data.tables.implementation.TableConstants.ROW_KEY; +import static com.azure.data.tables.implementation.TablesConstants.PARTITION_KEY; +import static com.azure.data.tables.implementation.TablesConstants.ROW_KEY; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json new file mode 100644 index 0000000000000..9d252a115a735 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json @@ -0,0 +1,52 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "06927113-a636-42f5-bb72-b5cc497cefdb", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 01:51:44 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test3626197efd')", + "Content-Length" : "0", + "x-ms-request-id" : "671fe630-5002-0020-6414-7cb1fb000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "06927113-a636-42f5-bb72-b5cc497cefdb", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test3626197efd')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$filter=TableName%20eq%20%27test3626197efd%27", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "85c97dca-bb2e-4abf-bdea-81ad47538df3" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "671fe642-5002-0020-7314-7cb1fb000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test3626197efd')\",\"odata.editLink\":\"Tables('test3626197efd')\",\"TableName\":\"test3626197efd\"}]}", + "Date" : "Thu, 27 Aug 2020 01:51:44 GMT", + "x-ms-client-request-id" : "85c97dca-bb2e-4abf-bdea-81ad47538df3", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test3626197efd" ] +} \ No newline at end of file From 7fb9af3af9c20a168397fff6c9a594d14291b408 Mon Sep 17 00:00:00 2001 From: bsiegel <96068+bsiegel@users.noreply.github.com> Date: Mon, 31 Aug 2020 10:54:38 -0700 Subject: [PATCH 013/168] Add createIfNotExists to TableServiceClients (#14536) --- .../data/tables/TableServiceAsyncClient.java | 35 ++++++++++ .../azure/data/tables/TableServiceClient.java | 22 ++++++ .../tables/TableServiceAsyncClientTest.java | 67 +++++++++++++++++++ .../data/tables/TableServiceClientTest.java | 33 ++++++++- .../serviceCreateTableFailsIfExists.json | 54 +++++++++++++++ .../serviceCreateTableFailsIfExistsAsync.json | 54 +++++++++++++++ .../serviceCreateTableIfNotExists.json | 29 ++++++++ .../serviceCreateTableIfNotExistsAsync.json | 29 ++++++++ ...reateTableIfNotExistsSucceedsIfExists.json | 54 +++++++++++++++ ...TableIfNotExistsSucceedsIfExistsAsync.json | 54 +++++++++++++++ ...eateTableIfNotExistsWithResponseAsync.json | 29 ++++++++ ...istsWithResponseSucceedsIfExistsAsync.json | 54 +++++++++++++++ 12 files changed, 513 insertions(+), 1 deletion(-) create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExists.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExistsAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExists.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExists.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExistsAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync.json diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java index 7f3c9ac770128..d98821ec57eb9 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java @@ -8,6 +8,7 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; @@ -25,6 +26,7 @@ import com.azure.data.tables.implementation.models.TableProperties; import com.azure.data.tables.implementation.models.TableQueryResponse; import com.azure.data.tables.implementation.models.TableResponseProperties; +import com.azure.data.tables.implementation.models.TableServiceErrorException; import com.azure.data.tables.models.ListTablesOptions; import com.azure.data.tables.models.TableItem; import java.net.URI; @@ -139,6 +141,39 @@ Mono> createTableWithResponse(String tableName, Context context) } } + /** + * creates the table with the given name if it does not exist, otherwise no action is taken. + * + * @param tableName the name of the table to create + * @return mono void + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createTableIfNotExists(String tableName) { + return createTableIfNotExistsWithResponse(tableName).flatMap(response -> Mono.justOrEmpty(response.getValue())); + } + + /** + * creates the table with the given name if it does not exist, otherwise no action is taken. + * + * @param tableName the name of the table to create + * @return a response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createTableIfNotExistsWithResponse(String tableName) { + return withContext(context -> createTableIfNotExistsWithResponse(tableName, context)); + } + + Mono> createTableIfNotExistsWithResponse(String tableName, Context context) { + return createTableWithResponse(tableName, context).onErrorResume(e -> e instanceof TableServiceErrorException + && ((TableServiceErrorException) e).getResponse() != null + && ((TableServiceErrorException) e).getResponse().getStatusCode() == 409, + e -> { + HttpResponse response = ((TableServiceErrorException) e).getResponse(); + return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), null)); + }); + } + /** * deletes the given table. Will error if the table doesn't exists or cannot be found with the given name. * diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java index f82e012651da4..41a6223f5563b 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java @@ -82,6 +82,28 @@ public Response createTableWithResponse(String tableName, Context context) return client.createTableWithResponse(tableName, context).block(); } + /** + * creates the table with the given name if it does not exist, otherwise no action is taken. + * + * @param tableName the name of the table to create + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void createTableIfNotExists(String tableName) { + client.createTableIfNotExists(tableName).block(); + } + + /** + * creates the table with the given name if it does not exist, otherwise no action is taken. + * + * @param tableName the name of the table to create + * @param context the context of the query + * @return response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createTableIfNotExistsWithResponse(String tableName, Context context) { + return client.createTableIfNotExistsWithResponse(tableName, context).block(); + } + /** * deletes the given table. Will error if the table doesn't exists or cannot be found with the given name. * diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java index f71cf943232b9..a99fe6143d5fd 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java @@ -8,6 +8,7 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.test.TestBase; +import com.azure.data.tables.implementation.models.TableServiceErrorException; import com.azure.data.tables.models.ListTablesOptions; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; @@ -65,6 +66,19 @@ void serviceCreateTableAsync() { .verify(); } + @Test + void serviceCreateTableFailsIfExistsAsync() { + // Arrange + String tableName = testResourceNamer.randomName("test", 20); + serviceClient.createTable(tableName).block(TIMEOUT); + + //Act & Assert + StepVerifier.create(serviceClient.createTable(tableName)) + .expectErrorMatches(e -> e instanceof TableServiceErrorException + && ((TableServiceErrorException) e).getResponse().getStatusCode() == 409) + .verify(); + } + @Test void serviceCreateTableWithResponseAsync() { // Arrange @@ -75,7 +89,60 @@ void serviceCreateTableWithResponseAsync() { StepVerifier.create(serviceClient.createTableWithResponse(tableName)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); + }) + .expectComplete() + .verify(); + } + + @Test + void serviceCreateTableIfNotExistsAsync() { + // Arrange + String tableName = testResourceNamer.randomName("test", 20); + + //Act & Assert + StepVerifier.create(serviceClient.createTableIfNotExists(tableName)) + .expectComplete() + .verify(); + } + + @Test + void serviceCreateTableIfNotExistsSucceedsIfExistsAsync() { + // Arrange + String tableName = testResourceNamer.randomName("test", 20); + serviceClient.createTable(tableName).block(TIMEOUT); + + //Act & Assert + StepVerifier.create(serviceClient.createTableIfNotExists(tableName)) + .expectComplete() + .verify(); + } + + @Test + void serviceCreateTableIfNotExistsWithResponseAsync() { + // Arrange + String tableName = testResourceNamer.randomName("test", 20); + int expectedStatusCode = 204; + + //Act & Assert + StepVerifier.create(serviceClient.createTableIfNotExistsWithResponse(tableName)) + .assertNext(response -> { + Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); + }) + .expectComplete() + .verify(); + } + @Test + void serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync() { + // Arrange + String tableName = testResourceNamer.randomName("test", 20); + int expectedStatusCode = 409; + serviceClient.createTable(tableName).block(TIMEOUT); + + //Act & Assert + StepVerifier.create(serviceClient.createTableIfNotExistsWithResponse(tableName)) + .assertNext(response -> { + Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); }) .expectComplete() .verify(); diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceClientTest.java index 7e42838d5d647..da0e885c49831 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceClientTest.java @@ -8,6 +8,8 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.test.TestBase; +import com.azure.data.tables.implementation.models.TableServiceErrorException; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class TableServiceClientTest extends TestBase { @@ -36,8 +38,37 @@ void serviceCreateTable() { // Arrange String tableName = testResourceNamer.randomName("test", 20); - // Act + // Act & Assert + serviceClient.createTable(tableName); + } + + @Test + void serviceCreateTableFailsIfExists() { + // Arrange + String tableName = testResourceNamer.randomName("test", 20); serviceClient.createTable(tableName); + + // Act & Assert + Assertions.assertThrows(TableServiceErrorException.class, () -> serviceClient.createTable(tableName)); + } + + @Test + void serviceCreateTableIfNotExists() { + // Arrange + String tableName = testResourceNamer.randomName("test", 20); + + // Act & Assert + serviceClient.createTableIfNotExists(tableName); + } + + @Test + void serviceCreateTableIfNotExistsSucceedsIfExists() { + // Arrange + String tableName = testResourceNamer.randomName("test", 20); + serviceClient.createTable(tableName); + + //Act & Assert + serviceClient.createTableIfNotExists(tableName); } @Test diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExists.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExists.json new file mode 100644 index 0000000000000..9fa3959b18aad --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExists.json @@ -0,0 +1,54 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "d86532b0-9bfa-474d-9a54-49d1c0294cd2", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 21:38:34 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test15790b43b7')", + "Content-Length" : "0", + "x-ms-request-id" : "f56aa02c-4002-00c8-61ba-7c286d000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "d86532b0-9bfa-474d-9a54-49d1c0294cd2", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test15790b43b7')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "f8f6d880-45e0-4b30-b42f-8c55014bcc94", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "409", + "Date" : "Thu, 27 Aug 2020 21:38:34 GMT", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "f56aa030-4002-00c8-63ba-7c286d000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:f56aa030-4002-00c8-63ba-7c286d000000\\nTime:2020-08-27T21:38:34.8728592Z\"}}}", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "f8f6d880-45e0-4b30-b42f-8c55014bcc94", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test15790b43b7" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExistsAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExistsAsync.json new file mode 100644 index 0000000000000..a918cc60f9301 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExistsAsync.json @@ -0,0 +1,54 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "4b14eb7d-4782-47b6-87f1-ef7c18ec6375", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 21:37:02 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test95670e2797')", + "Content-Length" : "0", + "x-ms-request-id" : "18358b1a-5002-0030-3fba-7c7493000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "4b14eb7d-4782-47b6-87f1-ef7c18ec6375", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test95670e2797')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "8866db20-4dbd-4b0c-842e-f9b9d5820482", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "409", + "Date" : "Thu, 27 Aug 2020 21:37:02 GMT", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "18358b2d-5002-0030-50ba-7c7493000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:18358b2d-5002-0030-50ba-7c7493000000\\nTime:2020-08-27T21:37:02.7996625Z\"}}}", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "8866db20-4dbd-4b0c-842e-f9b9d5820482", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test95670e2797" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExists.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExists.json new file mode 100644 index 0000000000000..dac7dc8ac32a4 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExists.json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "028ae606-12ab-429a-b0d0-a6ee00215377", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 21:38:31 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test79947b18e1')", + "Content-Length" : "0", + "x-ms-request-id" : "8ef6e693-1002-0088-30ba-7c2f55000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "028ae606-12ab-429a-b0d0-a6ee00215377", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test79947b18e1')" + }, + "Exception" : null + } ], + "variables" : [ "test79947b18e1" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsAsync.json new file mode 100644 index 0000000000000..704a78a6c2a69 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsAsync.json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "5c560ffe-c0ab-44a2-8dfd-c171966c9ecf", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 21:36:51 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test002158a072')", + "Content-Length" : "0", + "x-ms-request-id" : "140844c0-6002-003b-5bba-7c8ff8000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "5c560ffe-c0ab-44a2-8dfd-c171966c9ecf", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test002158a072')" + }, + "Exception" : null + } ], + "variables" : [ "test002158a072" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExists.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExists.json new file mode 100644 index 0000000000000..ca42f54d49d48 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExists.json @@ -0,0 +1,54 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "da640b5b-358c-4b00-af94-6113be63e82e", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 21:38:40 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test31065a18ca')", + "Content-Length" : "0", + "x-ms-request-id" : "63b4c6ee-c002-0050-40ba-7c080c000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "da640b5b-358c-4b00-af94-6113be63e82e", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test31065a18ca')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "b8963546-fa06-4651-ba49-9b8bbb5dc940", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "409", + "Date" : "Thu, 27 Aug 2020 21:38:40 GMT", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "63b4c6ff-c002-0050-4eba-7c080c000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:63b4c6ff-c002-0050-4eba-7c080c000000\\nTime:2020-08-27T21:38:40.5250347Z\"}}}", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "b8963546-fa06-4651-ba49-9b8bbb5dc940", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test31065a18ca" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExistsAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExistsAsync.json new file mode 100644 index 0000000000000..f137c00edd041 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExistsAsync.json @@ -0,0 +1,54 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "fee1b199-6178-4c19-a2df-789f7035ccc3", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 21:36:44 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test5149491e99')", + "Content-Length" : "0", + "x-ms-request-id" : "32eef6a8-a002-0046-66ba-7cfedb000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "fee1b199-6178-4c19-a2df-789f7035ccc3", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test5149491e99')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "a38b4f2f-09e4-40d6-9700-2c12ff0aa2be", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "409", + "Date" : "Thu, 27 Aug 2020 21:36:44 GMT", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "32eef6b2-a002-0046-6dba-7cfedb000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:32eef6b2-a002-0046-6dba-7cfedb000000\\nTime:2020-08-27T21:36:45.5055127Z\"}}}", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "a38b4f2f-09e4-40d6-9700-2c12ff0aa2be", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test5149491e99" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseAsync.json new file mode 100644 index 0000000000000..3687cb1bf9c5f --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseAsync.json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "460c0b0d-4ff4-4aab-b4b8-5a973ac1dc5e", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 22:54:28 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test46374d0f85')", + "Content-Length" : "0", + "x-ms-request-id" : "0aebf3ba-1002-006c-44c5-7c21cb000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "460c0b0d-4ff4-4aab-b4b8-5a973ac1dc5e", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test46374d0f85')" + }, + "Exception" : null + } ], + "variables" : [ "test46374d0f85" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync.json new file mode 100644 index 0000000000000..754094a560993 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync.json @@ -0,0 +1,54 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "876aae1c-f914-454e-8c2f-e67e1f2843d3", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Thu, 27 Aug 2020 22:54:07 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test46962d85c7')", + "Content-Length" : "0", + "x-ms-request-id" : "0d226c5b-8002-00b5-09c4-7c594e000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "876aae1c-f914-454e-8c2f-e67e1f2843d3", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test46962d85c7')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "9134baa8-adf5-423d-832d-3748c73b0fdc", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "409", + "Date" : "Thu, 27 Aug 2020 22:54:08 GMT", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "0d2275aa-8002-00b5-04c4-7c594e000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:0d2275aa-8002-00b5-04c4-7c594e000000\\nTime:2020-08-27T22:54:08.2704495Z\"}}}", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "9134baa8-adf5-423d-832d-3748c73b0fdc", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test46962d85c7" ] +} \ No newline at end of file From 28503b2043e4dd1a134568bbba24abc4ffe882ba Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Mon, 31 Aug 2020 11:11:57 -0700 Subject: [PATCH 014/168] Add implementation for relationship APIs (#14527) * feat(adt): Add implementation for relationship APIs --- .../azure-digitaltwins-core/API design.md | 377 +-------------- .../core/DigitalTwinsAsyncClient.java | 429 +++++++++++++++--- .../digitaltwins/core/DigitalTwinsClient.java | 219 ++++++++- .../digitaltwins/core/RequestOptions.java | 41 ++ .../serialization/BasicRelationship.java | 128 ++++++ .../core/util/UpdateOperationUtility.java | 123 +++++ .../azure/digitaltwins/core/AsyncSample.java | 36 ++ 7 files changed, 909 insertions(+), 444 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/API design.md b/sdk/digitaltwins/azure-digitaltwins-core/API design.md index 1e9b645702ea4..cb386611f147d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/API design.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/API design.md @@ -275,387 +275,14 @@ When updating a relationship edge, the patch string follows the below format
Async APIs -These APIs are invoked via DigitalTwinsAsyncClient. - -```java - /** - * Creates a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be created. - * @param relationship The application/json relationship to be created. - * @return The application/json relationship created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createRelationship(String digitalTwinId, String relationshipId, String relationship) { } - - /** - * Creates a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be created. - * @param relationship The application/json relationship to be created. - * @return A REST response containing the application/json relationship created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createRelationshipWithResponse(String digitalTwinId, String relationshipId, String relationship) { } - - /** - * Creates a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be created. - * @param relationship The relationship to be created. - * @param modelClass The model class to convert the relationship to. - * @return The relationship created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createRelationship(String digitalTwinId, String relationshipId, Object relationship, Class modelClass) { } - - /** - * Creates a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be created. - * @param relationship The relationship to be created. - * @param modelClass The model class to convert the relationship to. - * @return A REST response containing the relationship created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createRelationshipWithResponse(String digitalTwinId, String relationshipId, Object relationship, Class modelClass) { } +These APIs have been implemented. Refer to [DigitalTwinsAsyncClient](./src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java). - /** - * Gets a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to retrieve. - * @return The application/json relationship corresponding to the provided relationshipId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getRelationship(String digitalTwinId, String relationshipId) { } - - /** - * Gets a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to retrieve. - * @return A REST response containing the application/json relationship corresponding to the provided relationshipId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRelationshipWithResponse(String digitalTwinId, String relationshipId) { } - - /** - * Gets a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to retrieve. - * @param modelClass The model class to convert the relationship to. - * @return The relationship corresponding to the provided relationshipId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getRelationship(String digitalTwinId, String relationshipId, Class modelClass) { } - - /** - * Gets a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to retrieve. - * @param modelClass The model class to convert the relationship to. - * @return A REST response containing the relationship corresponding to the provided relationshipId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRelationshipWithResponse(String digitalTwinId, String relationshipId, Class modelClass) { } - - /** - * Updates the properties of a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be updated. - * @param relationshipUpdateOperations The list of application/json-patch+json operations to be performed on the specified digital twin's relationship. - * @return An empty response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateRelationship(String digitalTwinId, String relationshipId, List relationshipUpdateOperations) { } - - /** - * Updates the properties of a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be updated. - * @param relationshipUpdateOperations The list of application/json-patch+json operations to be performed on the specified digital twin's relationship. - * @param options The optional settings for this request. - * @return A REST response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, RequestOptions options) { } - - /** - * Deletes a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to delete. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteRelationship(String digitalTwinId, String relationshipId) { } - - /** - * Deletes a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to delete. - * @param options The optional settings for this request. - * @return A REST response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, RequestOptions options) { } - - /** - * Gets all the relationships on a digital twin by iterating through a collection. - * - * @param digitalTwinId The Id of the source digital twin. - * @return A {@link PagedFlux} of application/json relationships belonging to the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRelationships(String digitalTwinId) { } - - /** - * Gets all the relationships on a digital twin filtered by the relationship name, by iterating through a collection. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipName The name of a relationship to filter to. - * @return A {@link PagedFlux} of application/json relationships belonging to the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRelationships(String digitalTwinId, String relationshipName) { } - - /** - * Gets all the relationships on a digital twin by iterating through a collection. - * - * @param digitalTwinId The Id of the source digital twin. - * @param modelClass The model class to convert the relationship to. Since a digital twin might have relationships conforming to different models, it is advisable to convert them to a generic model. - * @return A {@link PagedFlux} of relationships belonging to the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRelationships(String digitalTwinId, Class modelClass) { } - - /** - * Gets all the relationships on a digital twin filtered by the relationship name, by iterating through a collection. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipName The name of a relationship to filter to. - * @param modelClass The model class to convert the relationship to. - * @return A {@link PagedFlux} of relationships belonging to the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRelationships(String digitalTwinId, String relationshipName, Class modelClass) { } - - - /** - * Gets all the relationships referencing a digital twin as a target by iterating through a collection. - * - * @param digitalTwinId The Id of the target digital twin. - * @return A {@link PagedFlux} of relationships directed towards the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listIncomingRelationships(String digitalTwinId) { } - -```
Sync APIs -These APIs are invoked via DigitalTwinsClient. - -```java - /** - * Creates a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be created. - * @param relationship The application/json relationship to be created. - * @return The application/json relationship created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public String createRelationship(String digitalTwinId, String relationshipId, String relationship) { } - - /** - * Creates a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be created. - * @param relationship The application/json relationship to be created. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containing the application/json relationship created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DigitalTwinsResponse createRelationshipWithResponse(String digitalTwinId, String relationshipId, String relationship, Context context) { } - - /** - * Creates a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be created. - * @param relationship The relationship to be created. - * @param modelClass The model class to convert the relationship to. - * @return The relationship created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public T createRelationship(String digitalTwinId, String relationshipId, Object relationship, Class modelClass) { } - - /** - * Creates a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be created. - * @param relationship The relationship to be created. - * @param modelClass The model class to convert the relationship to. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containing the relationship created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DigitalTwinsResponse createRelationshipWithResponse(String digitalTwinId, String relationshipId, Object relationship, Class modelClass, Context context) { } - - /** - * Gets a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to retrieve. - * @return The application/json relationship corresponding to the provided relationshipId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public String getRelationship(String digitalTwinId, String relationshipId) { } - - /** - * Gets a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to retrieve. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containing the application/json relationship corresponding to the provided relationshipId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DigitalTwinsResponse getRelationshipWithResponse(String digitalTwinId, String relationshipId, Context context) { } - - /** - * Gets a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to retrieve. - * @param modelClass The model class to convert the relationship to. - * @return The relationship corresponding to the provided relationshipId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public T getRelationship(String digitalTwinId, String relationshipId, Class modelClass) { } - - /** - * Gets a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to retrieve. - * @param modelClass The model class to convert the relationship to. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containing the relationship corresponding to the provided relationshipId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DigitalTwinsResponse getRelationshipWithResponse(String digitalTwinId, String relationshipId, Class modelClass, Context context) { } +These APIs have been implemented. Refer to [DigitalTwinsClient](./src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java). - /** - * Updates the properties of a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be updated. - * @param relationshipUpdateOperations The list of application/json-patch+json operations to be performed on the specified digital twin's relationship. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateRelationship(String digitalTwinId, String relationshipId, List relationshipUpdateOperations) { } - - /** - * Updates the properties of a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to be updated. - * @param relationshipUpdateOperations The list of application/json-patch+json operations to be performed on the specified digital twin's relationship. - * @param options The optional settings for this request. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DigitalTwinsResponse updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, RequestOptions options, Context context) { } - - /** - * Deletes a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to delete. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteRelationship(String digitalTwinId, String relationshipId) { } - - /** - * Deletes a relationship on a digital twin. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipId The Id of the relationship to delete. - * @param options The optional settings for this request. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, RequestOptions options, Context context) { } - - /** - * Gets all the relationships on a digital twin by iterating through a collection. - * - * @param digitalTwinId The Id of the source digital twin. - * @return A {@link PagedIterable} of application/json relationships belonging to the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRelationships(String digitalTwinId) { } - - /** - * Gets all the relationships on a digital twin filtered by the relationship name, by iterating through a collection. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipName The name of a relationship to filter to. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link PagedIterable} of application/json relationships belonging to the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRelationships(String digitalTwinId, String relationshipName, Context context) { } - - /** - * Gets all the relationships on a digital twin by iterating through a collection. - * - * @param digitalTwinId The Id of the source digital twin. - * @param modelClass The model class to convert the relationship to. Since a digital twin might have relationships conforming to different models, it is advisable to convert them to a generic model. - * @return A {@link PagedIterable} of relationships belonging to the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRelationships(String digitalTwinId, Class modelClass) { } - - /** - * Gets all the relationships on a digital twin filtered by the relationship name, by iterating through a collection. - * - * @param digitalTwinId The Id of the source digital twin. - * @param relationshipName The name of a relationship to filter to. - * @param modelClass The model class to convert the relationship to. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link PagedIterable} of relationships belonging to the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRelationships(String digitalTwinId, String relationshipName, Class modelClass, Context context) { } - - /** - * Gets all the relationships referencing a digital twin as a target by iterating through a collection. - * - * @param digitalTwinId The Id of the target digital twin. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link PagedIterable} of application/json relationships directed towards the specified digital twin and the http response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listIncomingRelationships(String digitalTwinId, Context context) { } - -``` ## Digital Twins diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 13b9120310c58..45139226e5ba6 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -14,22 +14,20 @@ import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImpl; import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImplBuilder; import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; +import com.azure.digitaltwins.core.implementation.models.IncomingRelationship; +import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; import com.azure.digitaltwins.core.models.ModelData; import com.azure.digitaltwins.core.util.DigitalTwinsResponse; import com.azure.digitaltwins.core.util.DigitalTwinsResponseHeaders; -import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; import com.azure.digitaltwins.core.util.ListModelOptions; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import java.util.ArrayList; import java.util.List; import java.util.Objects; -import java.util.function.Function; -import java.util.function.Supplier; import java.util.stream.Collectors; import static com.azure.core.util.FluxUtil.withContext; @@ -98,39 +96,81 @@ public Mono> createDigitalTwinWithResponse(String d return withContext(context -> createDigitalTwinWithResponse(digitalTwinId, digitalTwin, context)); } + Mono> createDigitalTwinWithResponse(String digitalTwinId, String digitalTwin, Context context) { + return protocolLayer + .getDigitalTwins() + .addWithResponseAsync(digitalTwinId, digitalTwin, context) + .flatMap(response -> { + try { + String jsonResponse = mapper.writeValueAsString(response.getValue()); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), jsonResponse, twinHeaders)); + } catch (JsonProcessingException e) { + logger.error("JsonProcessingException occurred while creating a digital twin: ", e); + return Mono.error(e); + } + }); + } + // TODO: This is a temporary implementation for sample purposes. This should be spruced up/replaced once this API is actually designed. // Input is Object and output is Response. @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createDigitalTwinWithResponse(String digitalTwinId, Object digitalTwin, Class klazz) { - return withContext(context -> createDigitalTwinWithResponse(digitalTwinId, digitalTwin, klazz, context)); + public Mono> createDigitalTwinWithResponse(String digitalTwinId, Object digitalTwin, Class clazz) { + return withContext(context -> createDigitalTwinWithResponse(digitalTwinId, digitalTwin, clazz, context)); } - Mono> createDigitalTwinWithResponse(String digitalTwinId, String digitalTwin, Context context) { + Mono> createDigitalTwinWithResponse(String digitalTwinId, Object digitalTwin, Class clazz, Context context) { return protocolLayer .getDigitalTwins() .addWithResponseAsync(digitalTwinId, digitalTwin, context) - .flatMap( - response -> { - try { - String jsonResponse = mapper.writeValueAsString(response.getValue()); - DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); - return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), jsonResponse, twinHeaders)); - } catch (JsonProcessingException e) { - return Mono.error(e); - } - }); - } - - Mono> createDigitalTwinWithResponse(String digitalTwinId, Object digitalTwin, Class klazz, Context context) { + .map(response -> { + T genericResponse = mapper.convertValue(response.getValue(), clazz); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), genericResponse, twinHeaders); + }); + } + + /** + * Creates a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be created. + * @param relationship The application/json relationship to be created. + * @return The application/json relationship created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRelationship(String digitalTwinId, String relationshipId, String relationship) { + return createRelationshipWithResponse(digitalTwinId, relationshipId, relationship) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Creates a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be created. + * @param relationship The application/json relationship to be created. + * @return The Http response containing the application/json relationship created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createRelationshipWithResponse(String digitalTwinId, String relationshipId, String relationship) { + return withContext(context -> createRelationshipWithResponse(digitalTwinId, relationshipId, relationship, context)); + } + + Mono> createRelationshipWithResponse(String digitalTwinId, String relationshipId, String relationship, Context context) { return protocolLayer .getDigitalTwins() - .addWithResponseAsync(digitalTwinId, digitalTwin, context) - .flatMap( - response -> { - T genericResponse = mapper.convertValue(response.getValue(), klazz); + .addRelationshipWithResponseAsync(digitalTwinId, relationshipId, relationship, context) + .flatMap(response -> { + try { + String jsonResponse = mapper.writeValueAsString(response.getValue()); DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); - return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), genericResponse, twinHeaders)); - }); + return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), jsonResponse, twinHeaders)); + } catch (JsonProcessingException e) { + logger.error("JsonProcessingException occurred while creating a relationship: ", e); + return Mono.error(e); + } + }); } /** @@ -138,27 +178,203 @@ Mono> createDigitalTwinWithResponse(String digitalTw * * @param digitalTwinId The Id of the source digital twin. * @param relationshipId The Id of the relationship to be created. - * @param relationship The application/json relationship to be created. - * @return A REST response containing the application/json relationship created. + * @param relationship The relationship to be created. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @return The relationship created. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createRelationshipWithResponse(String digitalTwinId, String relationshipId, String relationship) { - return withContext(context -> createRelationshipWithResponse(digitalTwinId, relationshipId, relationship, context)); + public Mono createRelationship(String digitalTwinId, String relationshipId, Object relationship, Class clazz) { + return createRelationshipWithResponse(digitalTwinId, relationshipId, relationship, clazz) + .map(DigitalTwinsResponse::getValue); } - Mono> createRelationshipWithResponse(String digitalTwinId, String relationshipId, String relationship, Context context) { + /** + * Creates a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be created. + * @param relationship The relationship to be created. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @return The Http response containing the relationship created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createRelationshipWithResponse(String digitalTwinId, String relationshipId, Object relationship, Class clazz) { + return withContext(context -> createRelationshipWithResponse(digitalTwinId, relationshipId, relationship, clazz, context)); + } + + Mono> createRelationshipWithResponse(String digitalTwinId, String relationshipId, Object relationship, Class clazz, Context context) { return protocolLayer .getDigitalTwins() .addRelationshipWithResponseAsync(digitalTwinId, relationshipId, relationship, context) - .flatMap( - response -> { - try { - String jsonResponse = mapper.writeValueAsString(response.getValue()); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), jsonResponse)); - } catch (JsonProcessingException e) { - return Mono.error(e); - } - }); + .map(response -> { + T genericResponse = mapper.convertValue(response.getValue(), clazz); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), genericResponse, twinHeaders); + }); + } + + /** + * Gets a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to retrieve. + * @return The application/json relationship corresponding to the provided relationshipId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRelationship(String digitalTwinId, String relationshipId) { + return getRelationshipWithResponse(digitalTwinId, relationshipId) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Gets a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to retrieve. + * @return The Http response containing the application/json relationship corresponding to the provided relationshipId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRelationshipWithResponse(String digitalTwinId, String relationshipId) { + return withContext(context -> getRelationshipWithResponse(digitalTwinId, relationshipId, context)); + } + + Mono> getRelationshipWithResponse(String digitalTwinId, String relationshipId, Context context) { + return protocolLayer + .getDigitalTwins() + .getRelationshipByIdWithResponseAsync(digitalTwinId, relationshipId, context) + .flatMap(response -> { + try { + String jsonResponse = mapper.writeValueAsString(response.getValue()); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return Mono.justOrEmpty(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), jsonResponse, twinHeaders)); + } catch (JsonProcessingException e) { + logger.error("JsonProcessingException occurred while retrieving a relationship: ", e); + return Mono.error(e); + } + }); + } + + /** + * Gets a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to retrieve. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @return The relationship corresponding to the provided relationshipId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRelationship(String digitalTwinId, String relationshipId, Class clazz) { + return getRelationshipWithResponse(digitalTwinId, relationshipId, clazz) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Gets a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to retrieve. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @return The Http response containing the relationship corresponding to the provided relationshipId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRelationshipWithResponse(String digitalTwinId, String relationshipId, Class clazz) { + return withContext(context -> getRelationshipWithResponse(digitalTwinId, relationshipId, clazz, context)); + } + + Mono> getRelationshipWithResponse(String digitalTwinId, String relationshipId, Class clazz, Context context) { + return protocolLayer + .getDigitalTwins() + .getRelationshipByIdWithResponseAsync(digitalTwinId, relationshipId, context) + .map(response -> { + T genericResponse = mapper.convertValue(response.getValue(), clazz); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), genericResponse, twinHeaders); + }); + } + + /** + * Updates the properties of a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be updated. + * @param relationshipUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin's relationship. + * @return An empty Mono. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateRelationship(String digitalTwinId, String relationshipId, List relationshipUpdateOperations) { + return updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, new RequestOptions()) + .flatMap(voidResponse -> Mono.empty()); + } + + /** + * Updates the properties of a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be updated. + * @param relationshipUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin's relationship. + * @param options The optional settings for this request. + * @return The Http response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, RequestOptions options) { + return withContext(context -> updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context)); + } + + Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, RequestOptions options, Context context) { + return protocolLayer + .getDigitalTwins() + .updateRelationshipWithResponseAsync(digitalTwinId, relationshipId, options.getIfMatch(), relationshipUpdateOperations, context) + .map(response -> { + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), response.getValue(), twinHeaders); + }); + } + + /** + * Deletes a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to delete. + * @return An empty Mono. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRelationship(String digitalTwinId, String relationshipId) { + return deleteRelationshipWithResponse(digitalTwinId, relationshipId, new RequestOptions()) + .flatMap(voidResponse -> Mono.empty()); + } + + /** + * Deletes a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to delete. + * @param options The optional settings for this request. + * @return The Http response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, RequestOptions options) { + return withContext(context -> deleteRelationshipWithResponse(digitalTwinId, relationshipId, options, context)); + } + + Mono> deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, RequestOptions options, Context context) { + return protocolLayer + .getDigitalTwins() + .deleteRelationshipWithResponseAsync(digitalTwinId, relationshipId, options.getIfMatch(), context); + } + + /** + * Gets all the relationships on a digital twin by iterating through a collection. + * + * @param digitalTwinId The Id of the source digital twin. + * @return A {@link PagedFlux} of application/json relationships belonging to the specified digital twin and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRelationships(String digitalTwinId) { + return listRelationships(digitalTwinId, (String) null); } /** @@ -170,21 +386,15 @@ Mono> createRelationshipWithResponse(String digitalTwinId, Stri */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listRelationships(String digitalTwinId, String relationshipName) { - return new PagedFlux<>( - () -> withContext(context -> listRelationshipsSinglePageAsync(digitalTwinId, relationshipName, context)), - nextLink -> withContext(context -> listRelationshipsNextSinglePageAsync(nextLink, context))); + () -> withContext(context -> listRelationshipsFirstPage(digitalTwinId, relationshipName, context)), + nextLink -> withContext(context -> listRelationshipsNextPage(nextLink, context))); } - PagedFlux listRelationships(String digitalTwinId, String relationshipName, Context context) { - - return new PagedFlux<>( - () -> listRelationshipsSinglePageAsync(digitalTwinId, relationshipName, context), - nextLink -> listRelationshipsNextSinglePageAsync(nextLink, context)); - } - - Mono> listRelationshipsSinglePageAsync(String digitalTwinId, String relationshipName, Context context) { - return protocolLayer.getDigitalTwins().listRelationshipsSinglePageAsync(digitalTwinId, relationshipName, context) + Mono> listRelationshipsFirstPage(String digitalTwinId, String relationshipName, Context context) { + return protocolLayer + .getDigitalTwins() + .listRelationshipsSinglePageAsync(digitalTwinId, relationshipName, context) .map( objectPagedResponse -> { List stringList = objectPagedResponse.getValue().stream() @@ -192,8 +402,8 @@ Mono> listRelationshipsSinglePageAsync(String digitalTwinI try { return mapper.writeValueAsString(object); } catch (JsonProcessingException e) { - logger.error("Could not parse the returned relationship [%s]: %s", object, e); - return null; + logger.error("JsonProcessingException occurred while retrieving relationships: ", e); + throw new RuntimeException("JsonProcessingException occurred while retrieving relationships", e); } }) .filter(Objects::nonNull) @@ -205,21 +415,22 @@ Mono> listRelationshipsSinglePageAsync(String digitalTwinI stringList, objectPagedResponse.getContinuationToken(), ((PagedResponseBase) objectPagedResponse).getDeserializedHeaders()); - } ); } - Mono> listRelationshipsNextSinglePageAsync(String nextLink, Context context) { - return protocolLayer.getDigitalTwins().listRelationshipsNextSinglePageAsync(nextLink, context) + Mono> listRelationshipsNextPage(String nextLink, Context context) { + return protocolLayer + .getDigitalTwins() + .listRelationshipsNextSinglePageAsync(nextLink, context) .map(objectPagedResponse -> { List stringList = objectPagedResponse.getValue().stream() .map(object -> { try { return mapper.writeValueAsString(object); } catch (JsonProcessingException e) { - logger.error("Could not parse the returned relationship [%s]: %s", object, e); - return null; + logger.error("JsonProcessingException occurred while retrieving relationships: ", e); + throw new RuntimeException("JsonProcessingException occurred while retrieving relationships", e); } }) .filter(Objects::nonNull) @@ -234,6 +445,100 @@ Mono> listRelationshipsNextSinglePageAsync(String nextLink }); } + /** + * Gets all the relationships on a digital twin by iterating through a collection. + * + * @param digitalTwinId The Id of the source digital twin. + * @param clazz The model class to convert the relationship to. Since a digital twin might have relationships conforming to different models, it is advisable to convert them to a generic model like {@link com.azure.digitaltwins.core.implementation.serialization.BasicRelationship}. + * @param The generic type to convert the relationship to. + * @return A {@link PagedFlux} of relationships belonging to the specified digital twin and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRelationships(String digitalTwinId, Class clazz) { + return listRelationships(digitalTwinId, null, clazz); + } + + /** + * Gets all the relationships on a digital twin filtered by the relationship name, by iterating through a collection. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipName The name of a relationship to filter to. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @return A {@link PagedFlux} of relationships belonging to the specified digital twin and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRelationships(String digitalTwinId, String relationshipName, Class clazz) { + return new PagedFlux<>( + () -> withContext(context -> listRelationshipsFirstPage(digitalTwinId, relationshipName, clazz, context)), + nextLink -> withContext(context -> listRelationshipsNextPage(nextLink, clazz, context))); + } + + Mono> listRelationshipsFirstPage(String digitalTwinId, String relationshipName, Class clazz, Context context) { + return protocolLayer + .getDigitalTwins() + .listRelationshipsSinglePageAsync(digitalTwinId, relationshipName, context) + .map( + objectPagedResponse -> { + List list = objectPagedResponse.getValue().stream() + .map(object -> mapper.convertValue(object, clazz)) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + return new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + list, + objectPagedResponse.getContinuationToken(), + ((PagedResponseBase) objectPagedResponse).getDeserializedHeaders()); + } + ); + } + + Mono> listRelationshipsNextPage(String nextLink, Class clazz, Context context) { + return protocolLayer + .getDigitalTwins() + .listRelationshipsNextSinglePageAsync(nextLink, context) + .map(objectPagedResponse -> { + List stringList = objectPagedResponse.getValue().stream() + .map(object -> mapper.convertValue(object, clazz)) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + return new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + stringList, + objectPagedResponse.getContinuationToken(), + ((PagedResponseBase)objectPagedResponse).getDeserializedHeaders()); + }); + } + + PagedFlux listRelationships(String digitalTwinId, String relationshipName, Class clazz, Context context) { + return new PagedFlux<>( + () -> listRelationshipsFirstPage(digitalTwinId, relationshipName, clazz, context), + nextLink -> listRelationshipsNextPage(nextLink, clazz, context)); + } + + /** + * Gets all the relationships referencing a digital twin as a target by iterating through a collection. + * + * @param digitalTwinId The Id of the target digital twin. + * @return A {@link PagedFlux} of relationships directed towards the specified digital twin and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listIncomingRelationships(String digitalTwinId) { + return new PagedFlux<>( + () -> withContext(context -> protocolLayer.getDigitalTwins().listIncomingRelationshipsSinglePageAsync(digitalTwinId, context)), + nextLink -> withContext(context -> protocolLayer.getDigitalTwins().listIncomingRelationshipsNextSinglePageAsync(nextLink, context))); + } + + PagedFlux listIncomingRelationships(String digitalTwinId, Context context) { + return new PagedFlux<>( + () -> protocolLayer.getDigitalTwins().listIncomingRelationshipsSinglePageAsync(digitalTwinId, context), + nextLink -> protocolLayer.getDigitalTwins().listIncomingRelationshipsNextSinglePageAsync(nextLink, context)); + } + //================================================================================================================================================== // Models APIs @@ -379,4 +684,10 @@ Mono> deleteModelWithResponse(String modelId, Context context){ } //TODO: Decommission Model APIs (waiting for Abhipsa's change to come in) + PagedFlux listRelationships(String digitalTwinId, String relationshipName, Context context) { + return new PagedFlux<>( + () -> listRelationshipsFirstPage(digitalTwinId, relationshipName, context), + nextLink -> listRelationshipsNextPage(nextLink, context)); + } + } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 9aff8f0b84073..671484f6e5f88 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -7,19 +7,17 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; -import com.azure.core.http.rest.*; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; +import com.azure.digitaltwins.core.implementation.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; +import com.azure.digitaltwins.core.util.DigitalTwinsResponse; import com.azure.digitaltwins.core.util.ListModelOptions; -import com.fasterxml.jackson.core.JsonProcessingException; -import reactor.core.publisher.Mono; -import java.util.ArrayList; import java.util.List; -import static com.azure.core.util.FluxUtil.withContext; - /** * This class provides a client for interacting synchronously with an Azure Digital Twins instance. * @@ -61,7 +59,19 @@ public DigitalTwinsServiceVersion getServiceVersion() { return this.digitalTwinsAsyncClient.getServiceVersion(); } - // TODO These are temporary implementations for sample purposes. This should be spruced up/replaced once this API is actually designed. + /** + * Creates a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be created. + * @param relationship The application/json relationship to be created. + * @return The application/json relationship created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String createRelationship(String digitalTwinId, String relationshipId, String relationship) { + return createRelationshipWithResponse(digitalTwinId, relationshipId, relationship, Context.NONE).getValue(); + } + /** * Creates a relationship on a digital twin. * @@ -69,13 +79,161 @@ public DigitalTwinsServiceVersion getServiceVersion() { * @param relationshipId The Id of the relationship to be created. * @param relationship The application/json relationship to be created. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containing the application/json relationship created. + * @return The Http response containing the application/json relationship created. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createRelationshipWithResponse(String digitalTwinId, String relationshipId, String relationship, Context context) { + public DigitalTwinsResponse createRelationshipWithResponse(String digitalTwinId, String relationshipId, String relationship, Context context) { return digitalTwinsAsyncClient.createRelationshipWithResponse(digitalTwinId, relationshipId, relationship, context).block(); } + /** + * Creates a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be created. + * @param relationship The relationship to be created. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @return The relationship created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public T createRelationship(String digitalTwinId, String relationshipId, Object relationship, Class clazz) { + return createRelationshipWithResponse(digitalTwinId, relationshipId, relationship, clazz, Context.NONE).getValue(); + } + + /** + * Creates a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be created. + * @param relationship The relationship to be created. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The Http response containing the relationship created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse createRelationshipWithResponse(String digitalTwinId, String relationshipId, Object relationship, Class clazz, Context context) { + return digitalTwinsAsyncClient.createRelationshipWithResponse(digitalTwinId, relationshipId, relationship, clazz, context).block(); + } + + /** + * Gets a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to retrieve. + * @return The application/json relationship corresponding to the provided relationshipId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String getRelationship(String digitalTwinId, String relationshipId) { + return getRelationshipWithResponse(digitalTwinId, relationshipId, Context.NONE).getValue(); + } + + /** + * Gets a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to retrieve. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The Http response containing the application/json relationship corresponding to the provided relationshipId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse getRelationshipWithResponse(String digitalTwinId, String relationshipId, Context context) { + return digitalTwinsAsyncClient.getRelationshipWithResponse(digitalTwinId, relationshipId, context).block(); + } + + /** + * Gets a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to retrieve. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @return The relationship corresponding to the provided relationshipId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public T getRelationship(String digitalTwinId, String relationshipId, Class clazz) { + return getRelationshipWithResponse(digitalTwinId, relationshipId, clazz, Context.NONE).getValue(); + } + + /** + * Gets a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to retrieve. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The Http response containing the relationship corresponding to the provided relationshipId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse getRelationshipWithResponse(String digitalTwinId, String relationshipId, Class clazz, Context context) { + return digitalTwinsAsyncClient.getRelationshipWithResponse(digitalTwinId, relationshipId, clazz, context).block(); + } + + /** + * Updates the properties of a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be updated. + * @param relationshipUpdateOperations The list of application/json-patch+json operations to be performed on the specified digital twin's relationship. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateRelationship(String digitalTwinId, String relationshipId, List relationshipUpdateOperations) { + updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, new RequestOptions(), Context.NONE); + } + + /** + * Updates the properties of a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to be updated. + * @param relationshipUpdateOperations The list of application/json-patch+json operations to be performed on the specified digital twin's relationship. + * @param options The optional settings for this request. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The Http response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, RequestOptions options, Context context) { + return digitalTwinsAsyncClient.updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context).block(); + } + + /** + * Deletes a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to delete. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRelationship(String digitalTwinId, String relationshipId) { + deleteRelationshipWithResponse(digitalTwinId, relationshipId, new RequestOptions(), Context.NONE); + } + + /** + * Deletes a relationship on a digital twin. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipId The Id of the relationship to delete. + * @param options The optional settings for this request. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The Http response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, RequestOptions options, Context context) { + return digitalTwinsAsyncClient.deleteRelationshipWithResponse(digitalTwinId, relationshipId, options, context).block(); + } + + /** + * Gets all the relationships on a digital twin by iterating through a collection. + * + * @param digitalTwinId The Id of the source digital twin. + * @return A {@link PagedIterable} of application/json relationships belonging to the specified digital twin and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRelationships(String digitalTwinId) { + return listRelationships(digitalTwinId, null, Context.NONE); + } + /** * Gets all the relationships on a digital twin filtered by the relationship name, by iterating through a collection. * @@ -89,6 +247,46 @@ public PagedIterable listRelationships(String digitalTwinId, String rela return new PagedIterable<>(digitalTwinsAsyncClient.listRelationships(digitalTwinId, relationshipName, context)); } + /** + * Gets all the relationships on a digital twin by iterating through a collection. + * + * @param digitalTwinId The Id of the source digital twin. + * @param clazz The model class to convert the relationship to. Since a digital twin might have relationships conforming to different models, it is advisable to convert them to a generic model like {@link com.azure.digitaltwins.core.implementation.serialization.BasicRelationship}. + * @param The generic type to convert the relationship to. + * @return A {@link PagedIterable} of relationships belonging to the specified digital twin and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRelationships(String digitalTwinId, Class clazz) { + return listRelationships(digitalTwinId, null, clazz, Context.NONE); + } + + /** + * Gets all the relationships on a digital twin filtered by the relationship name, by iterating through a collection. + * + * @param digitalTwinId The Id of the source digital twin. + * @param relationshipName The name of a relationship to filter to. + * @param clazz The model class to convert the relationship to. + * @param The generic type to convert the relationship to. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link PagedIterable} of relationships belonging to the specified digital twin and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRelationships(String digitalTwinId, String relationshipName, Class clazz, Context context) { + return new PagedIterable<>(digitalTwinsAsyncClient.listRelationships(digitalTwinId, relationshipName, clazz, context)); + } + + /** + * Gets all the relationships referencing a digital twin as a target by iterating through a collection. + * + * @param digitalTwinId The Id of the target digital twin. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link PagedIterable} of application/json relationships directed towards the specified digital twin and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listIncomingRelationships(String digitalTwinId, Context context) { + return new PagedIterable<>(digitalTwinsAsyncClient.listIncomingRelationships(digitalTwinId, context)); + } + //================================================================================================================================================== // Models APIs //================================================================================================================================================== @@ -168,4 +366,5 @@ public Response deleteModelWithResponse(String modelId, Context context) { } //TODO: Decommission Model APIs (waiting for Abhipsa's change to come in) + } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java new file mode 100644 index 0000000000000..5d8b3adafaf4f --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + +import com.azure.core.annotation.Fluent; + +/** + * General request options that are applicable, but optional, for many APIs. + */ +@Fluent +public class RequestOptions { + + private String ifMatch; + + /** + * Gets a string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. + * @return A string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Sets a string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. + * + *

The request's operation is performed only if this ETag matches the value maintained by the server, + * indicating that the entity has not been modified since it was last retrieved. + * To force the operation to execute only if the entity exists, set the ETag to the wildcard character '*'. + * To force the operation to execute unconditionally, leave this value null. + * If this value is not set, it defaults to null, and the ifMatch header will not be sent with the request. + * This means that update and delete will be unconditional and the operation will execute regardless of the existence of the resource.

+ * + * @param ifMatch A string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. + * @return The RequestOptions object itself. + */ + public RequestOptions setIfMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java new file mode 100644 index 0000000000000..71b16ec8a6fad --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core.implementation.serialization; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.HashMap; +import java.util.Map; + +/** + * Although relationships have a user-defined schema, these properties should exist on every instance. + * This is useful to use as a base class to ensure your custom relationships have the necessary properties. + */ +@Fluent +public class BasicRelationship { + + @JsonProperty(value = "$relationshipId", required = true) + private String id; + + @JsonProperty(value = "$sourceId", required = true) + private String sourceId; + + @JsonProperty(value = "$targetId", required = true) + private String targetId; + + @JsonProperty(value = "$relationshipName", required = true) + private String name; + + private final Map customProperties = new HashMap<>(); + + /** + * Gets the unique Id of the relationship. This field is present on every relationship. + * @return The unique Id of the relationship. This field is present on every relationship. + */ + public String getId() { + return id; + } + + /** + * Sets the unique Id of the relationship. This field is present on every relationship. + * @param id The unique Id of the relationship. This field is present on every relationship. + * @return The BasicRelationship object itself. + */ + public BasicRelationship setId(String id) { + this.id = id; + return this; + } + + /** + * Gets the unique Id of the source digital twin. This field is present on every relationship. + * @return The unique Id of the source digital twin. This field is present on every relationship. + */ + public String getSourceId() { + return sourceId; + } + + /** + * Sets the unique Id of the source digital twin. This field is present on every relationship. + * @param sourceId The unique Id of the source digital twin. This field is present on every relationship. + * @return The BasicRelationship object itself. + */ + public BasicRelationship setSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Gets the unique Id of the target digital twin. This field is present on every relationship. + * @return The unique Id of the target digital twin. This field is present on every relationship. + */ + public String getTargetId() { + return targetId; + } + + /** + * Sets the unique Id of the target digital twin. This field is present on every relationship. + * @param targetId The unique Id of the target digital twin. This field is present on every relationship. + * @return The BasicRelationship object itself. + */ + public BasicRelationship setTargetId(String targetId) { + this.targetId = targetId; + return this; + } + + /** + * Gets the name of the relationship, which defines the type of link (e.g. Contains). This field is present on every relationship. + * @return The name of the relationship, which defines the type of link (e.g. Contains). This field is present on every relationship. + */ + public String getName() { + return name; + } + + /** + * Sets the name of the relationship, which defines the type of link (e.g. Contains). This field is present on every relationship. + * @param name The name of the relationship, which defines the type of link (e.g. Contains). This field is present on every relationship. + * @return The BasicRelationship object itself. + */ + public BasicRelationship setName(String name) { + this.name = name; + return this; + } + + /** + * Gets the additional properties defined in the model. This field will contain any properties of the relationship that are not already defined by the other strong types of this class. + * @return The additional properties defined in the model. This field will contain any properties of the relationship that are not already defined by the other strong types of this class. + */ + @JsonAnyGetter + public Map getCustomProperties() { + return customProperties; + } + + /** + * Sets the additional properties defined in the model. This field will contain any properties of the relationship that are not already defined by the other strong types of this class. + * @param key The key of the additional property to be added to the relationship. + * @param value The value of the additional property to be added to the relationship. + * @return The BasicRelationship object itself. + */ + @JsonAnySetter + public BasicRelationship setCustomProperties(String key, Object value) { + this.customProperties.put(key, value); + return this; + } + +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java new file mode 100644 index 0000000000000..aa6e448a55f02 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core.util; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * A utility to create the application/json-patch+json operations payload required for update operations. + */ +@Fluent +public class UpdateOperationUtility { + private static final String ADD = "add"; + private static final String REPLACE = "replace"; + private static final String REMOVE = "remove"; + private static final ObjectMapper mapper = new ObjectMapper(); + + private final List operations = new ArrayList<>(); + + /** + * Gets the application/json-patch+json operations payload required for update operations. + * @return The application/json-patch+json operations payload required for update operations. + */ + public List getUpdateOperations() { + return operations.stream().map(op -> mapper.convertValue(op, Object.class)).collect(Collectors.toList()); + } + + /** + * Include an add operation. + * @param path The path to the property to be added. + * @param value The value to update to. + * @return The UpdateOperationUtility object itself. + */ + public UpdateOperationUtility appendAddOperation(String path, Object value) { + operations.add( + new UpdateOperation() + .setOperation(ADD) + .setPath(path) + .setValue(value)); + + return this; + } + + /** + * Include a replace operation. + * @param path The path to the property to be updated. + * @param value The value to update to. + * @return The UpdateOperationUtility object itself. + */ + public UpdateOperationUtility appendReplaceOperation(String path, Object value) { + operations.add( + new UpdateOperation() + .setOperation(REPLACE) + .setPath(path) + .setValue(value)); + + return this; + } + + /** + * Include a remove operation. + * @param path The path to the property to be added. + * @return The UpdateOperationUtility object itself. + */ + public UpdateOperationUtility appendRemoveOperation(String path) { + operations.add( + new UpdateOperation() + .setOperation(REMOVE) + .setPath(path)); + + return this; + } + + @Fluent + // A static inner class is declared as a static member of another class and it is not tied to any instance of the containing class. + // An inner class is declared as a non-static member of another class and it is tied to a particular instance of its containing class. + // An inner class may be static if it doesn't reference its enclosing instance. + // A static inner class does not keep an implicit reference to its enclosing instance. This prevents a common cause of memory leaks and uses less memory per instance of the class. + static class UpdateOperation { + @JsonProperty(value = "op") + private String operation; + + @JsonProperty(value = "path") + private String path; + + @JsonProperty(value = "value") + private Object value; + + public String getOperation() { + return operation; + } + + public UpdateOperation setOperation(String operation) { + this.operation = operation; + return this; + } + + public String getPath() { + return path; + } + + public UpdateOperation setPath(String path) { + this.path = path; + return this; + } + + public Object getValue() { + return value; + } + + public UpdateOperation setValue(Object value) { + this.value = value; + return this; + } + } + +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java index 98254d3c1adbe..a34a8a7495f07 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java @@ -9,8 +9,10 @@ import com.azure.digitaltwins.core.implementation.serialization.BasicDigitalTwin; import com.azure.digitaltwins.core.implementation.serialization.DigitalTwinMetadata; import com.azure.digitaltwins.core.util.DigitalTwinsResponse; +import com.azure.digitaltwins.core.util.UpdateOperationUtility; import com.azure.identity.ClientSecretCredentialBuilder; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import reactor.core.publisher.Mono; @@ -118,5 +120,39 @@ public static void main(String[] args) throws InterruptedException, JsonProcessi boolean created = createTwinsSemaphore.tryAcquire(2, 20, TimeUnit.SECONDS); System.out.println("Source twins created: " + created); + String targetTwin1_Id = "targetTwin_1_" + random.nextInt(); + String targetTwin_1 = "{\"$metadata\": {\"$model\": \"dtmi:samples:HVAC;1\"}, \"Efficiency\": 10, \"TargetTemperature\": 10, \"TargetHumidity\": 10}"; + + String targetTwin2_Id = "targetTwin_2_" + random.nextInt(); + String targetTwin_2 = "{\"$metadata\": {\"$model\": \"dtmi:samples:HVAC;1\"}, \"Efficiency\": 50, \"TargetTemperature\": 50, \"TargetHumidity\": 50}"; + + String targetTwin3_Id = "targetTwin_3_" + random.nextInt(); + String targetTwin_3 = "{\"$metadata\": {\"$model\": \"dtmi:samples:Floor;1\"}, \"AverageTemperature\": 100}"; + + client.createDigitalTwinWithResponse(targetTwin1_Id, targetTwin_1).block(); + client.createDigitalTwinWithResponse(targetTwin2_Id, targetTwin_2).block(); + client.createDigitalTwinWithResponse(targetTwin3_Id, targetTwin_3).block(); + + String r_id_1 = "r_id_1_" + random.nextInt(); + String r_id_2 = "r_id_2_" + random.nextInt(); + String r_id_3 = "r_id_3_" + random.nextInt(); + String relationship1 = "{\"$relationshipName\": \"isEquippedWith\", \"$targetId\": \"" + targetTwin1_Id + "\"}"; + String relationship2 = "{\"$relationshipName\": \"isEquippedWith\", \"$targetId\": \"" + targetTwin2_Id + "\"}"; + String relationship3 = "{\"$relationshipName\": \"has\", \"$targetId\": \"" + targetTwin3_Id + "\"}"; + + client.createRelationshipWithResponse(dtId_String, r_id_1, relationship1).block(); + client.createRelationshipWithResponse(dtId_String, r_id_2, relationship2).block(); + client.createRelationshipWithResponse(dtId_String, r_id_3, relationship3).block(); + + UpdateOperationUtility utility = new UpdateOperationUtility().appendAddOperation("/isAccessRestricted", false); + client.updateRelationship(dtId_String, r_id_3, utility.getUpdateOperations()).block(); + + String createdRelationship2 = client.getRelationship(dtId_String, r_id_2).block(); + JsonNode jsonNode = mapper.readTree(createdRelationship2); + String etag = jsonNode.path("$etag").textValue(); + + client.deleteRelationship(dtId_String, r_id_1).block(); + client.deleteRelationshipWithResponse(dtId_String, r_id_2, new RequestOptions().setIfMatch(etag)).block(); + } } From 1d8ce6bcf16efd390c2cc3f93ff9bcd24a48471d Mon Sep 17 00:00:00 2001 From: bsiegel <96068+bsiegel@users.noreply.github.com> Date: Mon, 31 Aug 2020 12:36:14 -0700 Subject: [PATCH 015/168] Fix deserialization of entities (#14551) * TablesJacksonSerializer uniformly deserializes entities 1. Enable the serializer to handle lists of entities 2. Centralize the conversion from Map -> TableEntity in its constructor 3. Begin implementing @odata.type annotation processing * Fix deserialization of single entities for getEntity * Deserialized TableEntities have no required properties When using a Select clause, the user can cause any properties to be omitted, even ones that are service-specific like PartitionKey and RowKey. --- .../azure/data/tables/TableAsyncClient.java | 60 +-- .../data/tables/TableServiceAsyncClient.java | 4 +- .../tables/implementation/ModelHelper.java | 94 ++++ .../implementation/TablesConstants.java | 34 +- .../TablesJacksonSerializer.java | 112 +++-- .../implementation/TablesModelHelper.java | 115 ----- .../azure/data/tables/models/TableEntity.java | 123 +++++- .../azure/data/tables/models/TableItem.java | 4 +- .../tables/TableServiceAsyncClientTest.java | 52 ++- .../data/tables/TablesAsyncClientTest.java | 72 ++- .../session-records/listEntitiesAsync.json | 104 +++++ .../listEntitiesWithFilterAsync.json | 104 +++++ .../listEntitiesWithSelectAsync.json | 78 ++++ .../listEntitiesWithTopAsync.json | 155 +++++++ .../serviceListTablesAsync.json | 77 ++++ .../serviceListTablesWithFilterAsync.json | 51 ++- .../serviceListTablesWithTopAsync.json | 414 ++++++++++++++++++ 17 files changed, 1384 insertions(+), 269 deletions(-) create mode 100644 sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/ModelHelper.java delete mode 100644 sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesModelHelper.java create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithFilterAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithSelectAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithTopAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesAsync.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithTopAsync.json diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java index fe1b3720f59f4..a6710efcf72dc 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java @@ -18,8 +18,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.data.tables.implementation.AzureTableImpl; import com.azure.data.tables.implementation.AzureTableImplBuilder; -import com.azure.data.tables.implementation.TablesConstants; -import com.azure.data.tables.implementation.TablesModelHelper; +import com.azure.data.tables.implementation.ModelHelper; import com.azure.data.tables.implementation.models.OdataMetadataFormat; import com.azure.data.tables.implementation.models.QueryOptions; import com.azure.data.tables.implementation.models.ResponseFormat; @@ -32,8 +31,6 @@ import java.net.URI; import java.time.Duration; -import java.time.OffsetDateTime; -import java.time.format.DateTimeParseException; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -519,7 +516,7 @@ private Mono> listEntities(String nextPartitionKey, S } final List entities = entityResponseValue.stream() - .map(entityMap -> deserializeEntity(logger, entityMap)) + .map(ModelHelper::createEntity) .collect(Collectors.toList()); return Mono.just(new EntityPaged(response, entities, @@ -632,60 +629,9 @@ Mono> getEntityWithResponse(String partitionKey, String ro // Deserialize the first entity. // TODO: Potentially update logic to deserialize them all. - final TableEntity entity = deserializeEntity(logger, matchingEntities.get(0)); + final TableEntity entity = ModelHelper.createEntity(matchingEntities.get(0)); sink.next(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), entity)); }); } - - /** - * Given a Map, creates the corresponding entity. - * - * @param properties Properties representing the entity. - * - * @return The Entity represented by this map. - * @throws IllegalArgumentException if the Map is missing a row key or partition key. - * @throws NullPointerException if 'properties' is null. - */ - private static TableEntity deserializeEntity(ClientLogger logger, Map properties) { - final Object partitionKeyValue = properties.get(TablesConstants.PARTITION_KEY); - if (!(partitionKeyValue instanceof String) || ((String) partitionKeyValue).isEmpty()) { - throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "'%s' does not exist in property map or is an empty value.", TablesConstants.PARTITION_KEY))); - } - - final Object rowKeyValue = properties.get(TablesConstants.ROW_KEY); - if (!(rowKeyValue instanceof String) || ((String) rowKeyValue).isEmpty()) { - throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "'%s' does not exist in property map or is an empty value.", TablesConstants.ROW_KEY))); - } - - final Object timestampValue = properties.get(TablesConstants.TIMESTAMP_KEY); - OffsetDateTime timestamp = null; - if (timestampValue != null) { - if (!(timestampValue instanceof String)) { - throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "'%s' value is of the wrong type.", TablesConstants.TIMESTAMP_KEY))); - } - try { - timestamp = OffsetDateTime.parse((String) timestampValue); - } catch (DateTimeParseException e) { - throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "'%s' value is not a valid OffsetDateTime.", TablesConstants.TIMESTAMP_KEY), e)); - } - } - - final Object etagValue = properties.get(TablesConstants.ODATA_ETAG_KEY); - if (etagValue != null && !(etagValue instanceof String)) { - throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "'%s' value is of the wrong type.", TablesConstants.ODATA_ETAG_KEY))); - } - - final TableEntity entity = new TableEntity((String) partitionKeyValue, (String) rowKeyValue); - TablesModelHelper.setValues(entity, timestamp, (String) etagValue); - - properties.forEach((key, value) -> entity.getProperties().putIfAbsent(key, value)); - - return entity; - } } diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java index d98821ec57eb9..c870205ec6f3b 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java @@ -19,7 +19,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.data.tables.implementation.AzureTableImpl; import com.azure.data.tables.implementation.AzureTableImplBuilder; -import com.azure.data.tables.implementation.TablesModelHelper; +import com.azure.data.tables.implementation.ModelHelper; import com.azure.data.tables.implementation.models.OdataMetadataFormat; import com.azure.data.tables.implementation.models.QueryOptions; import com.azure.data.tables.implementation.models.ResponseFormat; @@ -268,7 +268,7 @@ private Mono> listTables(String nextTableName, Context return Mono.empty(); } final List tables = tableResponsePropertiesList.stream() - .map(TablesModelHelper::createItem).collect(Collectors.toList()); + .map(ModelHelper::createItem).collect(Collectors.toList()); return Mono.just(new TablePaged(response, tables, response.getDeserializedHeaders().getXMsContinuationNextTableName())); diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/ModelHelper.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/ModelHelper.java new file mode 100644 index 0000000000000..3927adbc5b2b3 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/ModelHelper.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables.implementation; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.data.tables.implementation.models.TableResponseProperties; +import com.azure.data.tables.models.TableEntity; +import com.azure.data.tables.models.TableItem; + +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; + +/** + * Used to access internal methods on models. + */ +public final class ModelHelper { + private static Function, TableEntity> entityCreator; + private static Function itemCreator; + + static { + // Force classes' static blocks to execute + try { + Class.forName(TableEntity.class.getName(), true, TableEntity.class.getClassLoader()); + Class.forName(TableItem.class.getName(), true, TableItem.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw new ExceptionInInitializerError(new ClientLogger(ModelHelper.class).logThrowableAsError(e)); + } + } + + /** + * Sets the entity creator. + * + * @param creator The entity creator. + * @throws IllegalStateException if the creator has already been set. + */ + public static void setEntityCreator(Function, TableEntity> creator) { + Objects.requireNonNull(creator, "'creator' cannot be null."); + + if (ModelHelper.entityCreator != null) { + throw new ClientLogger(ModelHelper.class).logExceptionAsError(new IllegalStateException( + "'entityCreator' is already set.")); + } + + entityCreator = creator; + } + + /** + * Sets the item creator. + * + * @param creator The item creator. + * @throws IllegalStateException if the creator has already been set. + */ + public static void setItemCreator(Function creator) { + Objects.requireNonNull(creator, "'creator' cannot be null."); + + if (ModelHelper.itemCreator != null) { + throw new ClientLogger(ModelHelper.class).logExceptionAsError(new IllegalStateException( + "'itemCreator' is already set.")); + } + + itemCreator = creator; + } + + /** + * Creates a {@link TableEntity}. + * + * @param properties The properties used to construct the entity + * @return The created TableEntity + */ + public static TableEntity createEntity(Map properties) { + if (entityCreator == null) { + throw new ClientLogger(ModelHelper.class).logExceptionAsError( + new IllegalStateException("'entityCreator' should not be null.")); + } + + return entityCreator.apply(properties); + } + + /** + * Creates a {@link TableItem}. + * + * @param properties The TableResponseProperties used to construct the table + * @return The created TableItem + */ + public static TableItem createItem(TableResponseProperties properties) { + if (itemCreator == null) { + throw new ClientLogger(ModelHelper.class).logExceptionAsError( + new IllegalStateException("'itemCreator' should not be null.")); + } + + return itemCreator.apply(properties); + } +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java index d973ac94a81a7..66e0380930c61 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java @@ -2,10 +2,21 @@ // Licensed under the MIT License. package com.azure.data.tables.implementation; +import java.util.HashSet; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + /** * Constants for Tables service. */ public final class TablesConstants { + + /** + * Name in the Map to get the table name. + */ + public static final String TABLE_NAME_KEY = "TableName"; + /** * Name in the Map to get the partition key. */ @@ -32,10 +43,31 @@ public final class TablesConstants { public static final String ODATA_METADATA_KEY = "odata.metadata"; /** - * Name in the map for the entity's URL. + * Name in the map for the table or entity's URL. */ public static final String ODATA_EDIT_LINK_KEY = "odata.editLink"; + /** + * Name in the map for the table or entity's type. + */ + public static final String ODATA_TYPE_KEY = "odata.type"; + + /** + * Name in the map for the table or entity's ID. + */ + public static final String ODATA_ID_KEY = "odata.id"; + + /** + * Set of keys returned in OData metadata. + */ + public static final Set METADATA_KEYS = Stream.of( + ODATA_EDIT_LINK_KEY, + ODATA_ETAG_KEY, + ODATA_ID_KEY, + ODATA_METADATA_KEY, + ODATA_TYPE_KEY + ).collect(Collectors.toCollection(HashSet::new)); + /** * Private constructor so this class cannot be instantiated. */ diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java index c8f2ed7b4f082..4f840de467343 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java @@ -2,9 +2,7 @@ // Licensed under the MIT License. package com.azure.data.tables.implementation; -import com.azure.core.http.HttpHeaders; import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.serializer.CollectionFormat; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.data.tables.implementation.models.TableEntityQueryResponse; @@ -15,6 +13,8 @@ import java.io.InputStream; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.time.format.DateTimeParseException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -27,71 +27,107 @@ public class TablesJacksonSerializer extends JacksonAdapter { private final ClientLogger logger = new ClientLogger(TablesJacksonSerializer.class); - @Override - public String serialize(Object object, SerializerEncoding serializerEncoding) throws IOException { - return super.serialize(object, serializerEncoding); - } - - @Override - public String serializeRaw(Object object) { - return super.serializeRaw(object); - } - - @Override - public String serializeList(List list, CollectionFormat format) { - return super.serializeList(list, format); - } - @Override public U deserialize(String value, Type type, SerializerEncoding serializerEncoding) throws IOException { - return deserialize(new ByteArrayInputStream(value.getBytes(StandardCharsets.UTF_8)), type, serializerEncoding); + if (type == TableEntityQueryResponse.class) { + return deserialize(new ByteArrayInputStream(value.getBytes(StandardCharsets.UTF_8)), type, + serializerEncoding); + } else { + return super.deserialize(value, type, serializerEncoding); + } } @Override - @SuppressWarnings("unchecked") public U deserialize(InputStream inputStream, Type type, SerializerEncoding serializerEncoding) throws IOException { - if (type != TableEntityQueryResponse.class) { + if (type == TableEntityQueryResponse.class) { + return deserializeTableEntityQueryResponse(inputStream); + } else { return super.deserialize(inputStream, type, serializerEncoding); } + } - // Force to deserialize as a Map by using Object.class + @SuppressWarnings("unchecked") + private U deserializeTableEntityQueryResponse(InputStream inputStream) throws IOException { String odataMetadata = null; List> values = new ArrayList<>(); + // Represents the entries in the response. It's possible that it is a single or multiple response. final JsonNode node = super.serializer().readTree(inputStream); - final Map rootObject = new HashMap<>(); + Map singleValue = null; + for (Iterator> it = node.fields(); it.hasNext();) { final Map.Entry entry = it.next(); + final String fieldName = entry.getKey(); final JsonNode childNode = entry.getValue(); - if (entry.getKey().equals(TablesConstants.ODATA_METADATA_KEY)) { + if (fieldName.equals(TablesConstants.ODATA_METADATA_KEY)) { odataMetadata = childNode.asText(); - continue; - } - - // Represents the entries in the response. It's possible that it is a single or multiple response. - if (entry.getKey().equals("value")) { + } else if (fieldName.equals("value")) { if (childNode.isArray()) { - logger.info("Node is an array of items."); + // This is a multiple-entity response. + for (JsonNode childEntry : childNode) { + values.add(getEntityFieldsAsMap(childEntry)); + } + } else { + // This is a single-entity response where the user just happened to use the key "value". + if (singleValue == null) { + singleValue = new HashMap<>(); + } + singleValue.put(fieldName, getEntityFieldAsObject(node, fieldName)); } - - throw logger.logExceptionAsError( - new UnsupportedOperationException("Multiple return values not supported yet.")); + } else { + // This is a single-entity response. + if (singleValue == null) { + singleValue = new HashMap<>(); + } + singleValue.put(fieldName, getEntityFieldAsObject(node, fieldName)); } - - rootObject.put(entry.getKey(), entry.getValue().asText()); } - values.add(0, rootObject); + if (singleValue != null) { + if (values.size() > 0) { + throw logger.logExceptionAsError(new IllegalStateException( + "Unexpected response format. Response containing a 'value' array must not contain other properties." + )); + } + values.add(singleValue); + } return (U) new TableEntityQueryResponse() .setOdataMetadata(odataMetadata) .setValue(values); } - @Override - public U deserialize(HttpHeaders httpHeaders, Type type) throws IOException { - return super.deserialize(httpHeaders, type); + private Map getEntityFieldsAsMap(JsonNode node) { + Map result = new HashMap<>(); + for (Iterator it = node.fieldNames(); it.hasNext();) { + String fieldName = it.next(); + result.put(fieldName, getEntityFieldAsObject(node, fieldName)); + } + return result; + } + + private Object getEntityFieldAsObject(JsonNode parentNode, String fieldName) { + JsonNode valueNode = parentNode.get(fieldName); + if (!TablesConstants.METADATA_KEYS.contains(fieldName) && !fieldName.endsWith("@odata.type")) { + JsonNode typeNode = parentNode.get(fieldName + "@odata.type"); + if (typeNode != null) { + String type = typeNode.asText(); + switch (type) { + case "Edm.DateTime": + try { + return OffsetDateTime.parse(valueNode.asText()); + } catch (DateTimeParseException e) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is not a valid OffsetDateTime.", TablesConstants.TIMESTAMP_KEY), e)); + } + default: + logger.warning(String.format("'%s' value has unknown OData type '%s'", fieldName, type)); + break; // Fallthrough to the default return value + } + } + } + return valueNode.asText(); } } diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesModelHelper.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesModelHelper.java deleted file mode 100644 index 8e86d5afe2a9b..0000000000000 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesModelHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.data.tables.implementation; - -import com.azure.core.util.logging.ClientLogger; -import com.azure.data.tables.implementation.models.TableResponseProperties; -import com.azure.data.tables.models.TableEntity; -import com.azure.data.tables.models.TableItem; - -import java.time.OffsetDateTime; -import java.util.Objects; - -/** - * Used to access internal methods on models. - */ -public final class TablesModelHelper { - private static EntityAccessor entityAccessor; - private static ItemCreator itemCreator; - - static { - // Force classes' static blocks to execute - try { - Class.forName(TableEntity.class.getName(), true, TableEntity.class.getClassLoader()); - Class.forName(TableItem.class.getName(), true, TableItem.class.getClassLoader()); - } catch (ClassNotFoundException e) { - AssertionError err = new AssertionError("Failed to initialize TablesModelHelper dependency classes.", e); - new ClientLogger(TablesModelHelper.class).logThrowableAsError(err); - throw err; - } - } - - /** - * Sets the entity accessor. - * - * @param accessor The entity accessor. - * @throws IllegalStateException if the accessor has already been set. - */ - public static void setEntityAccessor(EntityAccessor accessor) { - Objects.requireNonNull(accessor, "'accessor' cannot be null."); - - if (TablesModelHelper.entityAccessor != null) { - throw new ClientLogger(TablesModelHelper.class).logExceptionAsError(new IllegalStateException( - "'entityAccessor' is already set.")); - } - - entityAccessor = accessor; - } - - /** - * Sets the item creator. - * - * @param creator The item creator. - * @throws IllegalStateException if the accessor has already been set. - */ - public static void setItemCreator(ItemCreator creator) { - Objects.requireNonNull(creator, "'creator' cannot be null."); - - if (TablesModelHelper.itemCreator != null) { - throw new ClientLogger(TablesModelHelper.class).logExceptionAsError(new IllegalStateException( - "'itemCreator' is already set.")); - } - - itemCreator = creator; - } - - /** - * Sets values on a {@link TableEntity}. - * - * @param entity Entity to set the values on. - * @param timestamp Timestamp to set. - * @param eTag ETag to set. - */ - public static void setValues(TableEntity entity, OffsetDateTime timestamp, String eTag) { - if (entityAccessor == null) { - throw new ClientLogger(TablesModelHelper.class).logExceptionAsError( - new IllegalStateException("'entityAccessor' should not be null.")); - } - - entityAccessor.setValues(entity, timestamp, eTag); - } - - /** - * Creates a {@link TableItem}. - * - * @param properties The TableResponseProperties used to construct the table - */ - public static TableItem createItem(TableResponseProperties properties) { - if (itemCreator == null) { - throw new ClientLogger(TablesModelHelper.class).logExceptionAsError( - new IllegalStateException("'itemCreator' should not be null.")); - } - - return itemCreator.create(properties); - } - - public interface EntityAccessor { - /** - * Sets values on a {@link TableEntity}. - * - * @param entity Entity to set the ETag on. - * @param timestamp Timestamp to set. - * @param eTag ETag to set. - */ - void setValues(TableEntity entity, OffsetDateTime timestamp, String eTag); - } - - public interface ItemCreator { - /** - * Creates a {@link TableItem}. - * - * @param properties The TableResponseProperties used to construct the table - */ - TableItem create(TableResponseProperties properties); - } -} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableEntity.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableEntity.java index 832e9c60a0abc..74f99ff5a78a2 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableEntity.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableEntity.java @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.data.tables.implementation.TablesConstants; -import com.azure.data.tables.implementation.TablesModelHelper; +import com.azure.data.tables.implementation.ModelHelper; import java.time.OffsetDateTime; import java.util.HashMap; @@ -21,17 +21,17 @@ public class TableEntity { private final ClientLogger logger = new ClientLogger(TableEntity.class); private final String partitionKey; private final String rowKey; - private final Map properties = new HashMap<>(); + private final Map properties; - private OffsetDateTime timestamp; - private String eTag; + private final OffsetDateTime timestamp; + private final String eTag; + private final String odataType; + private final String odataId; + private final String odataEditLink; static { // This is used by classes in different packages to get access to private and package-private methods. - TablesModelHelper.setEntityAccessor((entity, timestamp, eTag) -> { - entity.setTimestamp(timestamp); - entity.setETag(eTag); - }); + ModelHelper.setEntityCreator(TableEntity::new); } /** @@ -41,14 +41,82 @@ public class TableEntity { * @param rowKey the row key */ public TableEntity(String partitionKey, String rowKey) { - this.rowKey = Objects.requireNonNull(rowKey, "'rowKey' cannot be null."); - this.partitionKey = Objects.requireNonNull(partitionKey, "'partitionKey' cannot be null."); - Objects.requireNonNull(properties, "'properties' cannot be null."); + if (partitionKey == null || partitionKey.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' is an empty value.", TablesConstants.PARTITION_KEY))); + } + this.partitionKey = partitionKey; + + if (rowKey == null || rowKey.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' is an empty value.", TablesConstants.ROW_KEY))); + } + this.rowKey = rowKey; + this.timestamp = null; + this.eTag = null; + this.odataEditLink = null; + this.odataId = null; + this.odataType = null; + + this.properties = new HashMap<>(); properties.put(TablesConstants.PARTITION_KEY, partitionKey); properties.put(TablesConstants.ROW_KEY, rowKey); } + TableEntity(Map properties) { + Object partitionKey = properties.get(TablesConstants.PARTITION_KEY); + if (partitionKey != null && (!(partitionKey instanceof String) || ((String) partitionKey).isEmpty())) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' is an empty value or is of the wrong type.", TablesConstants.PARTITION_KEY))); + } + this.partitionKey = (String) partitionKey; + + Object rowKey = properties.get(TablesConstants.ROW_KEY); + if (rowKey != null && (!(rowKey instanceof String) || ((String) rowKey).isEmpty())) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' is an empty value or is of the wrong type.", TablesConstants.ROW_KEY))); + } + this.rowKey = (String) rowKey; + + Object timestamp = properties.get(TablesConstants.TIMESTAMP_KEY); + if (timestamp != null && !(timestamp instanceof OffsetDateTime)) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is of the wrong type.", TablesConstants.TIMESTAMP_KEY))); + } + this.timestamp = (OffsetDateTime) timestamp; + + Object eTag = properties.get(TablesConstants.ODATA_ETAG_KEY); + if (eTag != null && !(eTag instanceof String)) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is of the wrong type.", TablesConstants.ODATA_ETAG_KEY))); + } + this.eTag = (String) eTag; + + Object odataEditLink = properties.get(TablesConstants.ODATA_EDIT_LINK_KEY); + if (odataEditLink != null && !(odataEditLink instanceof String)) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is of the wrong type.", TablesConstants.ODATA_EDIT_LINK_KEY))); + } + this.odataEditLink = (String) odataEditLink; + + Object odataId = properties.get(TablesConstants.ODATA_ID_KEY); + if (odataId != null && !(odataId instanceof String)) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is of the wrong type.", TablesConstants.ODATA_ID_KEY))); + } + this.odataId = (String) odataId; + + Object odataType = properties.get(TablesConstants.ODATA_TYPE_KEY); + if (odataType != null && !(odataType instanceof String)) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is of the wrong type.", TablesConstants.ODATA_TYPE_KEY))); + } + this.odataType = (String) odataType; + + this.properties = properties; + } + /** * Gets the map of properties * @@ -110,29 +178,38 @@ public OffsetDateTime getTimestamp() { } /** - * Sets the Timestamp on the Entity. + * gets the etag * - * @param timestamp Timestamp to set. + * @return the etag for the entity */ - void setTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; + public String getETag() { + return eTag; } /** - * gets the etag + * returns the type of this entity * - * @return the etag for the entity + * @return type */ - public String getETag() { - return eTag; + String getOdataType() { + return odataType; + } + + /** + * returns the ID of this entity + * + * @return ID + */ + String getOdataId() { + return odataId; } /** - * Sets the ETag on the Entity. + * returns the edit link of this entity * - * @param eTag ETag to set. + * @return edit link */ - void setETag(String eTag) { - this.eTag = eTag; + String getOdataEditLink() { + return odataEditLink; } } diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableItem.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableItem.java index 3e34d0dab9a6a..350d34dd9d7da 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableItem.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableItem.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.data.tables.models; -import com.azure.data.tables.implementation.TablesModelHelper; +import com.azure.data.tables.implementation.ModelHelper; import com.azure.data.tables.implementation.models.TableResponseProperties; /** @@ -16,7 +16,7 @@ public class TableItem { static { // This is used by classes in different packages to get access to private and package-private methods. - TablesModelHelper.setItemCreator(TableItem::new); + ModelHelper.setItemCreator(TableItem::new); } /** diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java index a99fe6143d5fd..0262afda0edcb 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java @@ -13,7 +13,9 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import java.time.Duration; @@ -177,17 +179,65 @@ void serviceDeleteTableWithResponseAsync() { } @Test + @Tag("ListTables") + void serviceListTablesAsync() { + // Arrange + final String tableName = testResourceNamer.randomName("test", 20); + final String tableName2 = testResourceNamer.randomName("test", 20); + Mono.when( + serviceClient.createTable(tableName), + serviceClient.createTable(tableName2) + ).block(TIMEOUT); + + // Act & Assert + StepVerifier.create(serviceClient.listTables()) + .expectNextCount(2) + .thenConsumeWhile(x -> true) + .expectComplete() + .verify(); + } + + @Test + @Tag("ListTables") void serviceListTablesWithFilterAsync() { // Arrange final String tableName = testResourceNamer.randomName("test", 20); + final String tableName2 = testResourceNamer.randomName("test", 20); ListTablesOptions options = new ListTablesOptions().setFilter("TableName eq '" + tableName + "'"); - serviceClient.createTable(tableName).block(TIMEOUT); + Mono.when( + serviceClient.createTable(tableName), + serviceClient.createTable(tableName2) + ).block(TIMEOUT); // Act & Assert StepVerifier.create(serviceClient.listTables(options)) .assertNext(table -> { assertEquals(tableName, table.getName()); }) + .expectNextCount(0) + .thenConsumeWhile(x -> true) + .expectComplete() + .verify(); + } + + @Test + @Tag("ListTables") + void serviceListTablesWithTopAsync() { + // Arrange + final String tableName = testResourceNamer.randomName("test", 20); + final String tableName2 = testResourceNamer.randomName("test", 20); + final String tableName3 = testResourceNamer.randomName("test", 20); + ListTablesOptions options = new ListTablesOptions().setTop(2); + Mono.when( + serviceClient.createTable(tableName), + serviceClient.createTable(tableName2), + serviceClient.createTable(tableName3) + ).block(TIMEOUT); + + // Act & Assert + StepVerifier.create(serviceClient.listTables(options)) + .expectNextCount(2) + .thenConsumeWhile(x -> true) .expectComplete() .verify(); } diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java index 9c9ec05b8a67f..5b90f427dc958 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java @@ -12,8 +12,9 @@ import com.azure.data.tables.models.ListEntitiesOptions; import com.azure.data.tables.models.TableEntity; import com.azure.data.tables.models.UpdateMode; -import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import java.time.Duration; @@ -21,6 +22,7 @@ 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.assertTrue; /** @@ -302,29 +304,54 @@ void updateEntityWithResponseAsync(UpdateMode mode) { .verifyComplete(); } - @Disabled("List not working yet.") @Test - void listEntityWithFilterAsync() { + @Tag("ListEntities") + void listEntitiesAsync() { // Arrange final String partitionKeyValue = testResourceNamer.randomName("partitionKey", 20); final String rowKeyValue = testResourceNamer.randomName("rowKey", 20); - final TableEntity entity = new TableEntity(partitionKeyValue, rowKeyValue); - ListEntitiesOptions options = new ListEntitiesOptions().setFilter("PartitionKey eq '" + entity.getPartitionKey() + "'"); - tableClient.createEntity(entity).block(TIMEOUT); + final String rowKeyValue2 = testResourceNamer.randomName("rowKey", 20); + Mono.when( + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)), + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)) + ).block(TIMEOUT); + + // Act & Assert + StepVerifier.create(tableClient.listEntities()) + .expectNextCount(2) + .thenConsumeWhile(x -> true) + .expectComplete() + .verify(); + } + + @Test + @Tag("ListEntities") + void listEntitiesWithFilterAsync() { + // Arrange + final String partitionKeyValue = testResourceNamer.randomName("partitionKey", 20); + final String rowKeyValue = testResourceNamer.randomName("rowKey", 20); + final String rowKeyValue2 = testResourceNamer.randomName("rowKey", 20); + ListEntitiesOptions options = new ListEntitiesOptions().setFilter("RowKey eq '" + rowKeyValue + "'"); + Mono.when( + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)), + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)) + ).block(TIMEOUT); // Act & Assert StepVerifier.create(tableClient.listEntities(options)) .assertNext(returnEntity -> { assertEquals(partitionKeyValue, returnEntity.getPartitionKey()); - assertEquals(entity.getRowKey(), returnEntity.getRowKey()); + assertEquals(rowKeyValue, returnEntity.getRowKey()); }) + .expectNextCount(0) + .thenConsumeWhile(x -> true) .expectComplete() .verify(); } - @Disabled("List not working yet.") @Test - void listEntityWithSelectAsync() { + @Tag("ListEntities") + void listEntitiesWithSelectAsync() { // Arrange final String partitionKeyValue = testResourceNamer.randomName("partitionKey", 20); final String rowKeyValue = testResourceNamer.randomName("rowKey", 20); @@ -332,30 +359,41 @@ void listEntityWithSelectAsync() { .addProperty("propertyC", "valueC") .addProperty("propertyD", "valueD"); ListEntitiesOptions options = new ListEntitiesOptions() - .setFilter("PartitionKey eq '" + entity.getPartitionKey() + "'") .setSelect("propertyC"); tableClient.createEntity(entity).block(TIMEOUT); // Act & Assert StepVerifier.create(tableClient.listEntities(options)) .assertNext(returnEntity -> { - assertEquals(entity.getRowKey(), returnEntity.getRowKey()); - assertEquals(entity.getPartitionKey(), returnEntity.getPartitionKey()); + assertNull(returnEntity.getRowKey()); + assertNull(returnEntity.getPartitionKey()); assertEquals("valueC", returnEntity.getProperties().get("propertyC")); - assertEquals(3, returnEntity.getProperties().size()); + assertNull(returnEntity.getProperties().get("propertyD")); }) .expectComplete() .verify(); } @Test - void listEntityWithTopAsync() { + @Tag("ListEntities") + void listEntitiesWithTopAsync() { // Arrange - ListEntitiesOptions options = new ListEntitiesOptions() - .setTop(1); + final String partitionKeyValue = testResourceNamer.randomName("partitionKey", 20); + final String rowKeyValue = testResourceNamer.randomName("rowKey", 20); + final String rowKeyValue2 = testResourceNamer.randomName("rowKey", 20); + final String rowKeyValue3 = testResourceNamer.randomName("rowKey", 20); + ListEntitiesOptions options = new ListEntitiesOptions().setTop(2); + Mono.when( + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)), + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)), + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue3)) + ).block(TIMEOUT); // Act & Assert StepVerifier.create(tableClient.listEntities(options)) - .expectNextCount(2); + .expectNextCount(2) + .thenConsumeWhile(x -> true) + .expectComplete() + .verify(); } } diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesAsync.json new file mode 100644 index 0000000000000..442d9f50cf2ed --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesAsync.json @@ -0,0 +1,104 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "fad069a0-b37b-4737-85fa-3ba98cb6f3dd", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:58 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename577453a5')", + "Content-Length" : "0", + "x-ms-request-id" : "70d54cd7-7002-00c3-7ee2-7cd306000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "fad069a0-b37b-4737-85fa-3ba98cb6f3dd", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename577453a5')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename577453a5", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "f00db36d-d908-4ca7-b19a-ea4c351cf969", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:58 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-08-28T02%3A26%3A58.439355Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey97788c73c')", + "Content-Length" : "0", + "x-ms-request-id" : "70d54ce7-7002-00c3-0be2-7cd306000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "f00db36d-d908-4ca7-b19a-ea4c351cf969", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey97788c73c')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename577453a5", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "e4975ec7-7893-4e35-ac3d-8d353dafd1ac", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:58 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-08-28T02%3A26%3A58.464373Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey68919b12e')", + "Content-Length" : "0", + "x-ms-request-id" : "70d54ce8-7002-00c3-0ce2-7cd306000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "e4975ec7-7893-4e35-ac3d-8d353dafd1ac", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey68919b12e')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/tablename577453a5()?$format=application/json%3Bodata%3Dfullmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "b2e2ebae-423a-44d1-91fe-6916abf1ef91" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "70d54cf2-7002-00c3-16e2-7cd306000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename577453a5\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename577453a5\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey68919b12e')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A58.464373Z'\\\"\",\"odata.editLink\":\"tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey68919b12e')\",\"PartitionKey\":\"partitionkey46738e\",\"RowKey\":\"rowkey68919b12e\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:58.464373Z\"},{\"odata.type\":\"brsiegelsample.tablename577453a5\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey97788c73c')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A58.439355Z'\\\"\",\"odata.editLink\":\"tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey97788c73c')\",\"PartitionKey\":\"partitionkey46738e\",\"RowKey\":\"rowkey97788c73c\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:58.439355Z\"}]}", + "Date" : "Fri, 28 Aug 2020 02:26:58 GMT", + "x-ms-client-request-id" : "b2e2ebae-423a-44d1-91fe-6916abf1ef91", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "tablename577453a5", "partitionkey46738e", "rowkey97788c73c", "rowkey68919b12e" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithFilterAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithFilterAsync.json new file mode 100644 index 0000000000000..b67e0fd6ddb04 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithFilterAsync.json @@ -0,0 +1,104 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "b375b08e-0964-4563-a383-f59ea8087d1d", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:49 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename1503261f')", + "Content-Length" : "0", + "x-ms-request-id" : "285df789-9002-003f-5de2-7c02ff000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "b375b08e-0964-4563-a383-f59ea8087d1d", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename1503261f')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename1503261f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "1e4e4506-8ae8-4b69-b46f-9c7baab89b18", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:49 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-08-28T02%3A26%3A50.3094455Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey846239572')", + "Content-Length" : "0", + "x-ms-request-id" : "285df7a4-9002-003f-76e2-7c02ff000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "1e4e4506-8ae8-4b69-b46f-9c7baab89b18", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey846239572')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename1503261f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "4b2bc3d6-9965-4dae-b80e-582f3791637b", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:49 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-08-28T02%3A26%3A50.3354635Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey041465618')", + "Content-Length" : "0", + "x-ms-request-id" : "285df7ad-9002-003f-7fe2-7c02ff000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "4b2bc3d6-9965-4dae-b80e-582f3791637b", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey041465618')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/tablename1503261f()?$format=application/json%3Bodata%3Dfullmetadata&$filter=RowKey%20eq%20%27rowkey846239572%27", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "c4892b9a-ae0f-4653-b036-753a85f0cedc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "285df7b6-9002-003f-08e2-7c02ff000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename1503261f\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename1503261f\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey846239572')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A50.3094455Z'\\\"\",\"odata.editLink\":\"tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey846239572')\",\"PartitionKey\":\"partitionkey75827c\",\"RowKey\":\"rowkey846239572\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:50.3094455Z\"}]}", + "Date" : "Fri, 28 Aug 2020 02:26:50 GMT", + "x-ms-client-request-id" : "c4892b9a-ae0f-4653-b036-753a85f0cedc", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "tablename1503261f", "partitionkey75827c", "rowkey846239572", "rowkey041465618" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithSelectAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithSelectAsync.json new file mode 100644 index 0000000000000..9c6af2025909c --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithSelectAsync.json @@ -0,0 +1,78 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "098dbc14-5c49-4d95-94c4-310729fbf5d9", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:54 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename52409778')", + "Content-Length" : "0", + "x-ms-request-id" : "cf783c07-d002-0073-09e2-7c92cf000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "098dbc14-5c49-4d95-94c4-310729fbf5d9", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename52409778')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename52409778", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "d7c60741-caeb-41b7-a893-7239d31a91b6", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:54 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-08-28T02%3A26%3A55.6348765Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename52409778(PartitionKey='partitionkey005024',RowKey='rowkey19878b418')", + "Content-Length" : "0", + "x-ms-request-id" : "cf783c2b-d002-0073-27e2-7c92cf000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "d7c60741-caeb-41b7-a893-7239d31a91b6", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename52409778(PartitionKey='partitionkey005024',RowKey='rowkey19878b418')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/tablename52409778()?$format=application/json%3Bodata%3Dfullmetadata&$select=propertyC", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "0bb758c9-aa0a-4d87-9141-fabb1aa392db" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "cf783c3a-d002-0073-36e2-7c92cf000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename52409778&$select=propertyC\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename52409778\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename52409778(PartitionKey='partitionkey005024',RowKey='rowkey19878b418')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A55.6348765Z'\\\"\",\"odata.editLink\":\"tablename52409778(PartitionKey='partitionkey005024',RowKey='rowkey19878b418')\",\"propertyC\":\"valueC\"}]}", + "Date" : "Fri, 28 Aug 2020 02:26:54 GMT", + "x-ms-client-request-id" : "0bb758c9-aa0a-4d87-9141-fabb1aa392db", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "tablename52409778", "partitionkey005024", "rowkey19878b418" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithTopAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithTopAsync.json new file mode 100644 index 0000000000000..424b03d2898f8 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithTopAsync.json @@ -0,0 +1,155 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "5670cdd2-5d72-46ae-aaf4-a05e673a2ef9", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename04439a16')", + "Content-Length" : "0", + "x-ms-request-id" : "93862bd3-f002-005b-46e2-7cf367000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "5670cdd2-5d72-46ae-aaf4-a05e673a2ef9", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename04439a16')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "93c97b2c-093d-41e7-a939-c4902ff7d816", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-08-28T02%3A26%3A52.9304254Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey5423059a3')", + "Content-Length" : "0", + "x-ms-request-id" : "93862be0-f002-005b-51e2-7cf367000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "93c97b2c-093d-41e7-a939-c4902ff7d816", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey5423059a3')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "f7710adb-a82d-4536-bb43-8724b1660840", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-08-28T02%3A26%3A52.952441Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey999612231')", + "Content-Length" : "0", + "x-ms-request-id" : "93862be6-f002-005b-56e2-7cf367000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "f7710adb-a82d-4536-bb43-8724b1660840", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey999612231')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "b63785b9-7062-40e8-a0a8-29c89e0a573e", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-08-28T02%3A26%3A52.9744561Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey914436f52')", + "Content-Length" : "0", + "x-ms-request-id" : "93862beb-f002-005b-5ae2-7cf367000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "b63785b9-7062-40e8-a0a8-29c89e0a573e", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey914436f52')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16()?$format=application/json%3Bodata%3Dfullmetadata&$top=2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "bc366565-49d3-439a-803b-cf7d59a42288" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "x-ms-continuation-NextPartitionKey" : "1!24!cGFydGl0aW9ua2V5MTkyNjU4", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Cache-Control" : "no-cache", + "x-ms-continuation-NextRowKey" : "1!20!cm93a2V5OTk5NjEyMjMx", + "x-ms-request-id" : "93862bef-f002-005b-5ee2-7cf367000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename04439a16\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename04439a16\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey5423059a3')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A52.9304254Z'\\\"\",\"odata.editLink\":\"tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey5423059a3')\",\"PartitionKey\":\"partitionkey192658\",\"RowKey\":\"rowkey5423059a3\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:52.9304254Z\"},{\"odata.type\":\"brsiegelsample.tablename04439a16\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey914436f52')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A52.9744561Z'\\\"\",\"odata.editLink\":\"tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey914436f52')\",\"PartitionKey\":\"partitionkey192658\",\"RowKey\":\"rowkey914436f52\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:52.9744561Z\"}]}", + "x-ms-client-request-id" : "bc366565-49d3-439a-803b-cf7d59a42288", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16()?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextPartitionKey=1%2124%21cGFydGl0aW9ua2V5MTkyNjU4&NextRowKey=1%2120%21cm93a2V5OTk5NjEyMjMx", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "927a9498-40e7-4657-920b-e34daaddedae" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "93862bf3-f002-005b-62e2-7cf367000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename04439a16\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename04439a16\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey999612231')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A52.952441Z'\\\"\",\"odata.editLink\":\"tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey999612231')\",\"PartitionKey\":\"partitionkey192658\",\"RowKey\":\"rowkey999612231\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:52.952441Z\"}]}", + "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "x-ms-client-request-id" : "927a9498-40e7-4657-920b-e34daaddedae", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "tablename04439a16", "partitionkey192658", "rowkey5423059a3", "rowkey999612231", "rowkey914436f52" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesAsync.json new file mode 100644 index 0000000000000..41d3f2dd8563f --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesAsync.json @@ -0,0 +1,77 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "45f1c2da-f5dc-49c6-bac2-c296f155031c", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:31:53 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test06383c9e71')", + "Content-Length" : "0", + "x-ms-request-id" : "6a583a33-c002-0032-5ce3-7cca2b000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "45f1c2da-f5dc-49c6-bac2-c296f155031c", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test06383c9e71')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "babc6f73-f740-4f14-8f33-5d85ee1148b9", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:31:53 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test82653e4fb9')", + "Content-Length" : "0", + "x-ms-request-id" : "6a583a3d-c002-0032-64e3-7cca2b000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "babc6f73-f740-4f14-8f33-5d85ee1148b9", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test82653e4fb9')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "5459e73f-430d-4d3d-9be3-c253d5e5028b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6a583a42-c002-0032-68e3-7cca2b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename005593d7')\",\"odata.editLink\":\"Tables('tablename005593d7')\",\"TableName\":\"tablename005593d7\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename04439a16')\",\"odata.editLink\":\"Tables('tablename04439a16')\",\"TableName\":\"tablename04439a16\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename05399ab1')\",\"odata.editLink\":\"Tables('tablename05399ab1')\",\"TableName\":\"tablename05399ab1\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename08863144')\",\"odata.editLink\":\"Tables('tablename08863144')\",\"TableName\":\"tablename08863144\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename12011fa2')\",\"odata.editLink\":\"Tables('tablename12011fa2')\",\"TableName\":\"tablename12011fa2\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename1503261f')\",\"odata.editLink\":\"Tables('tablename1503261f')\",\"TableName\":\"tablename1503261f\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename1740503e')\",\"odata.editLink\":\"Tables('tablename1740503e')\",\"TableName\":\"tablename1740503e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename22151d64')\",\"odata.editLink\":\"Tables('tablename22151d64')\",\"TableName\":\"tablename22151d64\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename22570f34')\",\"odata.editLink\":\"Tables('tablename22570f34')\",\"TableName\":\"tablename22570f34\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename22926b61')\",\"odata.editLink\":\"Tables('tablename22926b61')\",\"TableName\":\"tablename22926b61\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename24297981')\",\"odata.editLink\":\"Tables('tablename24297981')\",\"TableName\":\"tablename24297981\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename266742d8')\",\"odata.editLink\":\"Tables('tablename266742d8')\",\"TableName\":\"tablename266742d8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename2735672b')\",\"odata.editLink\":\"Tables('tablename2735672b')\",\"TableName\":\"tablename2735672b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename28265d57')\",\"odata.editLink\":\"Tables('tablename28265d57')\",\"TableName\":\"tablename28265d57\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename29023a45')\",\"odata.editLink\":\"Tables('tablename29023a45')\",\"TableName\":\"tablename29023a45\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename29498f86')\",\"odata.editLink\":\"Tables('tablename29498f86')\",\"TableName\":\"tablename29498f86\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename318470ba')\",\"odata.editLink\":\"Tables('tablename318470ba')\",\"TableName\":\"tablename318470ba\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename380507a9')\",\"odata.editLink\":\"Tables('tablename380507a9')\",\"TableName\":\"tablename380507a9\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename429824e5')\",\"odata.editLink\":\"Tables('tablename429824e5')\",\"TableName\":\"tablename429824e5\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename4765688e')\",\"odata.editLink\":\"Tables('tablename4765688e')\",\"TableName\":\"tablename4765688e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename50892c11')\",\"odata.editLink\":\"Tables('tablename50892c11')\",\"TableName\":\"tablename50892c11\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename52409778')\",\"odata.editLink\":\"Tables('tablename52409778')\",\"TableName\":\"tablename52409778\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename55175482')\",\"odata.editLink\":\"Tables('tablename55175482')\",\"TableName\":\"tablename55175482\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename577453a5')\",\"odata.editLink\":\"Tables('tablename577453a5')\",\"TableName\":\"tablename577453a5\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename5869215e')\",\"odata.editLink\":\"Tables('tablename5869215e')\",\"TableName\":\"tablename5869215e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename59331a54')\",\"odata.editLink\":\"Tables('tablename59331a54')\",\"TableName\":\"tablename59331a54\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename61704c28')\",\"odata.editLink\":\"Tables('tablename61704c28')\",\"TableName\":\"tablename61704c28\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename676177ca')\",\"odata.editLink\":\"Tables('tablename676177ca')\",\"TableName\":\"tablename676177ca\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename752523f0')\",\"odata.editLink\":\"Tables('tablename752523f0')\",\"TableName\":\"tablename752523f0\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename759867f7')\",\"odata.editLink\":\"Tables('tablename759867f7')\",\"TableName\":\"tablename759867f7\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8230294b')\",\"odata.editLink\":\"Tables('tablename8230294b')\",\"TableName\":\"tablename8230294b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8345426e')\",\"odata.editLink\":\"Tables('tablename8345426e')\",\"TableName\":\"tablename8345426e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename84415286')\",\"odata.editLink\":\"Tables('tablename84415286')\",\"TableName\":\"tablename84415286\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8628280c')\",\"odata.editLink\":\"Tables('tablename8628280c')\",\"TableName\":\"tablename8628280c\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename86719a4c')\",\"odata.editLink\":\"Tables('tablename86719a4c')\",\"TableName\":\"tablename86719a4c\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename89280cf9')\",\"odata.editLink\":\"Tables('tablename89280cf9')\",\"TableName\":\"tablename89280cf9\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename911357f6')\",\"odata.editLink\":\"Tables('tablename911357f6')\",\"TableName\":\"tablename911357f6\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename92139cb2')\",\"odata.editLink\":\"Tables('tablename92139cb2')\",\"TableName\":\"tablename92139cb2\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename94779836')\",\"odata.editLink\":\"Tables('tablename94779836')\",\"TableName\":\"tablename94779836\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9640599b')\",\"odata.editLink\":\"Tables('tablename9640599b')\",\"TableName\":\"tablename9640599b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test006395df14')\",\"odata.editLink\":\"Tables('test006395df14')\",\"TableName\":\"test006395df14\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test007347455e')\",\"odata.editLink\":\"Tables('test007347455e')\",\"TableName\":\"test007347455e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test0374771735')\",\"odata.editLink\":\"Tables('test0374771735')\",\"TableName\":\"test0374771735\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test04639b0b55')\",\"odata.editLink\":\"Tables('test04639b0b55')\",\"TableName\":\"test04639b0b55\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test057208851c')\",\"odata.editLink\":\"Tables('test057208851c')\",\"TableName\":\"test057208851c\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test06383c9e71')\",\"odata.editLink\":\"Tables('test06383c9e71')\",\"TableName\":\"test06383c9e71\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test0745122b86')\",\"odata.editLink\":\"Tables('test0745122b86')\",\"TableName\":\"test0745122b86\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test10015a9f16')\",\"odata.editLink\":\"Tables('test10015a9f16')\",\"TableName\":\"test10015a9f16\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test155744f244')\",\"odata.editLink\":\"Tables('test155744f244')\",\"TableName\":\"test155744f244\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test1647277e78')\",\"odata.editLink\":\"Tables('test1647277e78')\",\"TableName\":\"test1647277e78\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test21844768a3')\",\"odata.editLink\":\"Tables('test21844768a3')\",\"TableName\":\"test21844768a3\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test257389fbf8')\",\"odata.editLink\":\"Tables('test257389fbf8')\",\"TableName\":\"test257389fbf8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2599971a94')\",\"odata.editLink\":\"Tables('test2599971a94')\",\"TableName\":\"test2599971a94\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2622631dd8')\",\"odata.editLink\":\"Tables('test2622631dd8')\",\"TableName\":\"test2622631dd8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test26338149bb')\",\"odata.editLink\":\"Tables('test26338149bb')\",\"TableName\":\"test26338149bb\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test281826ce94')\",\"odata.editLink\":\"Tables('test281826ce94')\",\"TableName\":\"test281826ce94\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test28355fbd99')\",\"odata.editLink\":\"Tables('test28355fbd99')\",\"TableName\":\"test28355fbd99\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test33027fb27c')\",\"odata.editLink\":\"Tables('test33027fb27c')\",\"TableName\":\"test33027fb27c\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test3894166e75')\",\"odata.editLink\":\"Tables('test3894166e75')\",\"TableName\":\"test3894166e75\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test3997052fe6')\",\"odata.editLink\":\"Tables('test3997052fe6')\",\"TableName\":\"test3997052fe6\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test4212370301')\",\"odata.editLink\":\"Tables('test4212370301')\",\"TableName\":\"test4212370301\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test4765734d77')\",\"odata.editLink\":\"Tables('test4765734d77')\",\"TableName\":\"test4765734d77\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test47781842bc')\",\"odata.editLink\":\"Tables('test47781842bc')\",\"TableName\":\"test47781842bc\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test51168a9b38')\",\"odata.editLink\":\"Tables('test51168a9b38')\",\"TableName\":\"test51168a9b38\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test520311ed97')\",\"odata.editLink\":\"Tables('test520311ed97')\",\"TableName\":\"test520311ed97\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test520753e49d')\",\"odata.editLink\":\"Tables('test520753e49d')\",\"TableName\":\"test520753e49d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test566703d6dd')\",\"odata.editLink\":\"Tables('test566703d6dd')\",\"TableName\":\"test566703d6dd\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test56846ce380')\",\"odata.editLink\":\"Tables('test56846ce380')\",\"TableName\":\"test56846ce380\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test59416cb4ec')\",\"odata.editLink\":\"Tables('test59416cb4ec')\",\"TableName\":\"test59416cb4ec\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test6722241abb')\",\"odata.editLink\":\"Tables('test6722241abb')\",\"TableName\":\"test6722241abb\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test679311d126')\",\"odata.editLink\":\"Tables('test679311d126')\",\"TableName\":\"test679311d126\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test702437ff4e')\",\"odata.editLink\":\"Tables('test702437ff4e')\",\"TableName\":\"test702437ff4e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test734214d762')\",\"odata.editLink\":\"Tables('test734214d762')\",\"TableName\":\"test734214d762\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test752186f9b8')\",\"odata.editLink\":\"Tables('test752186f9b8')\",\"TableName\":\"test752186f9b8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test78362c260e')\",\"odata.editLink\":\"Tables('test78362c260e')\",\"TableName\":\"test78362c260e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test80861bd1a2')\",\"odata.editLink\":\"Tables('test80861bd1a2')\",\"TableName\":\"test80861bd1a2\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test81380603c8')\",\"odata.editLink\":\"Tables('test81380603c8')\",\"TableName\":\"test81380603c8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test82653e4fb9')\",\"odata.editLink\":\"Tables('test82653e4fb9')\",\"TableName\":\"test82653e4fb9\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test830095af33')\",\"odata.editLink\":\"Tables('test830095af33')\",\"TableName\":\"test830095af33\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test85149324b9')\",\"odata.editLink\":\"Tables('test85149324b9')\",\"TableName\":\"test85149324b9\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test853437ea44')\",\"odata.editLink\":\"Tables('test853437ea44')\",\"TableName\":\"test853437ea44\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test85922dd8da')\",\"odata.editLink\":\"Tables('test85922dd8da')\",\"TableName\":\"test85922dd8da\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test88876136a4')\",\"odata.editLink\":\"Tables('test88876136a4')\",\"TableName\":\"test88876136a4\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test90030d7fe2')\",\"odata.editLink\":\"Tables('test90030d7fe2')\",\"TableName\":\"test90030d7fe2\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test90613aee41')\",\"odata.editLink\":\"Tables('test90613aee41')\",\"TableName\":\"test90613aee41\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test92691e7cc4')\",\"odata.editLink\":\"Tables('test92691e7cc4')\",\"TableName\":\"test92691e7cc4\"}]}", + "Date" : "Fri, 28 Aug 2020 02:31:53 GMT", + "x-ms-client-request-id" : "5459e73f-430d-4d3d-9be3-c253d5e5028b", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test06383c9e71", "test82653e4fb9" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json index 9d252a115a735..653cac014908d 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "06927113-a636-42f5-bb72-b5cc497cefdb", + "x-ms-client-request-id" : "22243d2c-0c42-487e-84a9-483849e3fd28", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,48 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 01:51:44 GMT", + "Date" : "Fri, 28 Aug 2020 02:31:50 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test3626197efd')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test90030d7fe2')", "Content-Length" : "0", - "x-ms-request-id" : "671fe630-5002-0020-6414-7cb1fb000000", + "x-ms-request-id" : "5e05a870-5002-00b6-2de3-7cb82a000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "06927113-a636-42f5-bb72-b5cc497cefdb", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test3626197efd')" + "x-ms-client-request-id" : "22243d2c-0c42-487e-84a9-483849e3fd28", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test90030d7fe2')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "c0083317-0462-4d71-b5b4-c7e91544c5a1", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Fri, 28 Aug 2020 02:31:50 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test81380603c8')", + "Content-Length" : "0", + "x-ms-request-id" : "5e05a87c-5002-00b6-37e3-7cb82a000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "c0083317-0462-4d71-b5b4-c7e91544c5a1", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test81380603c8')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$filter=TableName%20eq%20%27test3626197efd%27", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$filter=TableName%20eq%20%27test90030d7fe2%27", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "85c97dca-bb2e-4abf-bdea-81ad47538df3" + "x-ms-client-request-id" : "38544705-b1d0-4467-8864-8aff39b2064e" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -40,13 +65,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "671fe642-5002-0020-7314-7cb1fb000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test3626197efd')\",\"odata.editLink\":\"Tables('test3626197efd')\",\"TableName\":\"test3626197efd\"}]}", - "Date" : "Thu, 27 Aug 2020 01:51:44 GMT", - "x-ms-client-request-id" : "85c97dca-bb2e-4abf-bdea-81ad47538df3", + "x-ms-request-id" : "5e05a881-5002-00b6-3be3-7cb82a000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test90030d7fe2')\",\"odata.editLink\":\"Tables('test90030d7fe2')\",\"TableName\":\"test90030d7fe2\"}]}", + "Date" : "Fri, 28 Aug 2020 02:31:50 GMT", + "x-ms-client-request-id" : "38544705-b1d0-4467-8864-8aff39b2064e", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test3626197efd" ] + "variables" : [ "test90030d7fe2", "test81380603c8" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithTopAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithTopAsync.json new file mode 100644 index 0000000000000..1f33790e9fcd7 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithTopAsync.json @@ -0,0 +1,414 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "8c2ddc34-77e4-4207-af59-90703668bf9b", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test2869773f50')", + "Content-Length" : "0", + "x-ms-request-id" : "3685c5fd-7002-0018-619f-7d153b000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "8c2ddc34-77e4-4207-af59-90703668bf9b", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test2869773f50')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "6703030a-6486-42fe-bf7f-3d3f21e6c113", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test61000c4016')", + "Content-Length" : "0", + "x-ms-request-id" : "57e6a677-c002-009b-069f-7d0b59000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "6703030a-6486-42fe-bf7f-3d3f21e6c113", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test61000c4016')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "d2e9b05e-0fe9-4d73-921e-73539291091c", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test50046e8327')", + "Content-Length" : "0", + "x-ms-request-id" : "a2d08562-3002-00a0-0e9f-7d4efd000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "d2e9b05e-0fe9-4d73-921e-73539291091c", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test50046e8327')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "f6c5a706-dc25-4ddf-8da3-df43ba1cac4a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lMjAwNTA1ZjUBMDFkNjdkOTExNGYzNjhhNQ--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "3685c609-7002-0018-6a9f-7d153b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename18710f82')\",\"odata.editLink\":\"Tables('tablename18710f82')\",\"TableName\":\"tablename18710f82\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename20049a1f')\",\"odata.editLink\":\"Tables('tablename20049a1f')\",\"TableName\":\"tablename20049a1f\"}]}", + "x-ms-client-request-id" : "f6c5a706-dc25-4ddf-8da3-df43ba1cac4a", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lMjAwNTA1ZjUBMDFkNjdkOTExNGYzNjhhNQ--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "ae5f3487-09a0-4d74-a042-2ee3e40fdf31" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNDI5MTNlMTIBMDFkNjdkOTEwMzYxNGMwZg--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "57e6a686-c002-009b-0f9f-7d0b59000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename200505f5')\",\"odata.editLink\":\"Tables('tablename200505f5')\",\"TableName\":\"tablename200505f5\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename376233ff')\",\"odata.editLink\":\"Tables('tablename376233ff')\",\"TableName\":\"tablename376233ff\"}]}", + "x-ms-client-request-id" : "ae5f3487-09a0-4d74-a042-2ee3e40fdf31", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNDI5MTNlMTIBMDFkNjdkOTEwMzYxNGMwZg--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "9d378ac2-cfbd-4f95-92df-847788bbb7aa" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNDM3MzFkNjUBMDFkNjdkOTBmZTY1ZmJmZA--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "a2d0856b-3002-00a0-159f-7d4efd000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename42913e12')\",\"odata.editLink\":\"Tables('tablename42913e12')\",\"TableName\":\"tablename42913e12\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename43390846')\",\"odata.editLink\":\"Tables('tablename43390846')\",\"TableName\":\"tablename43390846\"}]}", + "x-ms-client-request-id" : "9d378ac2-cfbd-4f95-92df-847788bbb7aa", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNDM3MzFkNjUBMDFkNjdkOTBmZTY1ZmJmZA--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "d66f4cf2-d16a-4098-b0b4-71cf777da718" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNjY0NjhkN2IBMDFkNjdkOTEwYjQyMTk2NQ--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "3685c613-7002-0018-749f-7d153b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename43731d65')\",\"odata.editLink\":\"Tables('tablename43731d65')\",\"TableName\":\"tablename43731d65\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename4907877c')\",\"odata.editLink\":\"Tables('tablename4907877c')\",\"TableName\":\"tablename4907877c\"}]}", + "x-ms-client-request-id" : "d66f4cf2-d16a-4098-b0b4-71cf777da718", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNjY0NjhkN2IBMDFkNjdkOTEwYjQyMTk2NQ--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "8abd5c72-f88d-4bb3-9bd6-9fc83aa96f91" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lODI5MjcwYWYBMDFkNjdkOTEwOTlkNmM1MQ--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "57e6a688-c002-009b-119f-7d0b59000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename66468d7b')\",\"odata.editLink\":\"Tables('tablename66468d7b')\",\"TableName\":\"tablename66468d7b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename71199fe7')\",\"odata.editLink\":\"Tables('tablename71199fe7')\",\"TableName\":\"tablename71199fe7\"}]}", + "x-ms-client-request-id" : "8abd5c72-f88d-4bb3-9bd6-9fc83aa96f91", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lODI5MjcwYWYBMDFkNjdkOTEwOTlkNmM1MQ--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "70b80a1b-4276-4775-b0e7-de71855a535a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lODU3Nzc3MGYBMDFkNjdkOTExMzU3OTZjYQ--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "a2d0857e-3002-00a0-279f-7d4efd000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename829270af')\",\"odata.editLink\":\"Tables('tablename829270af')\",\"TableName\":\"tablename829270af\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename83209b67')\",\"odata.editLink\":\"Tables('tablename83209b67')\",\"TableName\":\"tablename83209b67\"}]}", + "x-ms-client-request-id" : "70b80a1b-4276-4775-b0e7-de71855a535a", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lODU3Nzc3MGYBMDFkNjdkOTExMzU3OTZjYQ--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "e79577eb-ae05-45f2-a765-3c298951bae2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lOTMwNTU5OWQBMDFkNjdkOTEwY2M0NmQyNA--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "3685c618-7002-0018-799f-7d153b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8577770f')\",\"odata.editLink\":\"Tables('tablename8577770f')\",\"TableName\":\"tablename8577770f\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9126961e')\",\"odata.editLink\":\"Tables('tablename9126961e')\",\"TableName\":\"tablename9126961e\"}]}", + "x-ms-client-request-id" : "e79577eb-ae05-45f2-a765-3c298951bae2", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lOTMwNTU5OWQBMDFkNjdkOTEwY2M0NmQyNA--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "391ec67b-1951-4df7-8e00-f493e9be18ab" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDA3Mzg3MGQyMjIBMDFkNjdkOTExZDJmZDNmZg--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "57e6a691-c002-009b-189f-7d0b59000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9305599d')\",\"odata.editLink\":\"Tables('tablename9305599d')\",\"TableName\":\"tablename9305599d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9526959a')\",\"odata.editLink\":\"Tables('tablename9526959a')\",\"TableName\":\"tablename9526959a\"}]}", + "x-ms-client-request-id" : "391ec67b-1951-4df7-8e00-f493e9be18ab", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDA3Mzg3MGQyMjIBMDFkNjdkOTExZDJmZDNmZg--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "03163fad-bfcf-462e-8332-641bf0cb7568" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:39 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDI4Njk3NzNmNTABMDFkNjdkOWZjZjcxYzQxZQ--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "a2d08595-3002-00a0-3e9f-7d4efd000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test073870d222')\",\"odata.editLink\":\"Tables('test073870d222')\",\"TableName\":\"test073870d222\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test221679dc96')\",\"odata.editLink\":\"Tables('test221679dc96')\",\"TableName\":\"test221679dc96\"}]}", + "x-ms-client-request-id" : "03163fad-bfcf-462e-8332-641bf0cb7568", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDI4Njk3NzNmNTABMDFkNjdkOWZjZjcxYzQxZQ--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "1103dc99-34d1-41a6-ba9d-9cb9d0156da4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDYxMDAwYzQwMTYBMDFkNjdkOWZjZjcxZWIzYQ--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "3685c622-7002-0018-019f-7d153b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2869773f50')\",\"odata.editLink\":\"Tables('test2869773f50')\",\"TableName\":\"test2869773f50\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test50046e8327')\",\"odata.editLink\":\"Tables('test50046e8327')\",\"TableName\":\"test50046e8327\"}]}", + "x-ms-client-request-id" : "1103dc99-34d1-41a6-ba9d-9cb9d0156da4", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDYxMDAwYzQwMTYBMDFkNjdkOWZjZjcxZWIzYQ--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "2a654345-510b-4ba1-b20d-eb37fcb73572" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDczNzQyNjNkNTYBMDFkNjdkOTExYmE4OWY0Yw--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "57e6a697-c002-009b-1e9f-7d0b59000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test61000c4016')\",\"odata.editLink\":\"Tables('test61000c4016')\",\"TableName\":\"test61000c4016\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test7364588c80')\",\"odata.editLink\":\"Tables('test7364588c80')\",\"TableName\":\"test7364588c80\"}]}", + "x-ms-client-request-id" : "2a654345-510b-4ba1-b20d-eb37fcb73572", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDczNzQyNjNkNTYBMDFkNjdkOTExYmE4OWY0Yw--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "871f7872-6136-407a-afbb-976d39fb28ff" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:39 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDgwODU0NzdiMzMBMDFkNjdkOTExNjhlYzUzYg--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "a2d085aa-3002-00a0-539f-7d4efd000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test7374263d56')\",\"odata.editLink\":\"Tables('test7374263d56')\",\"TableName\":\"test7374263d56\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test792520b9e3')\",\"odata.editLink\":\"Tables('test792520b9e3')\",\"TableName\":\"test792520b9e3\"}]}", + "x-ms-client-request-id" : "871f7872-6136-407a-afbb-976d39fb28ff", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDgwODU0NzdiMzMBMDFkNjdkOTExNjhlYzUzYg--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "041c7387-65fd-4f35-af4a-59268246cb78" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDk4OTk4NjY3ZTIBMDFkNjdkOWZjYzQyNWYxMg--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "3685c62d-7002-0018-0a9f-7d153b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test8085477b33')\",\"odata.editLink\":\"Tables('test8085477b33')\",\"TableName\":\"test8085477b33\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test97656af5d7')\",\"odata.editLink\":\"Tables('test97656af5d7')\",\"TableName\":\"test97656af5d7\"}]}", + "x-ms-client-request-id" : "041c7387-65fd-4f35-af4a-59268246cb78", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDk4OTk4NjY3ZTIBMDFkNjdkOWZjYzQyNWYxMg--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "f0bebb6f-af3d-463c-b101-1648527f7cb3" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "57e6a69c-c002-009b-229f-7d0b59000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test98998667e2')\",\"odata.editLink\":\"Tables('test98998667e2')\",\"TableName\":\"test98998667e2\"}]}", + "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "x-ms-client-request-id" : "f0bebb6f-af3d-463c-b101-1648527f7cb3", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test61000c4016", "test2869773f50", "test50046e8327" ] +} \ No newline at end of file From e9be5e240a61a033cb3039cea13d09a1382399a9 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Mon, 31 Aug 2020 13:39:41 -0700 Subject: [PATCH 016/168] Updating description to point to new packages. (#14601) --- sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml | 7 ++++++- sdk/eventhubs/microsoft-azure-eventhubs-extensions/pom.xml | 7 ++++++- sdk/eventhubs/microsoft-azure-eventhubs/pom.xml | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml b/sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml index ef2707bbb27fa..36ad6f3c45d22 100644 --- a/sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml +++ b/sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml @@ -17,7 +17,12 @@ 3.3.0-beta.1 Microsoft Azure SDK for Event Hubs Event Processor Host(EPH) - EPH is built on top of the Azure Event Hubs Client and provides a number of features not present in that lower layer + EPH is built on top of the Azure Event Hubs Client and provides a number of features not present in that lower layer.${line.separator} + This library has been replaced by new Azure SDKs, you can read about them at https://aka.ms/azsdkvalueprop. The latest libraries to interact with the Azure Event Hubs service are:${line.separator} + 1. https://search.maven.org/artifact/com.azure/azure-messaging-eventhubs${line.separator} + 2. https://search.maven.org/artifact/com.azure/azure-messaging-eventhubs-checkpointstore-blob${line.separator} + It is recommended that you move to the new package. + https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/eventhubs/microsoft-azure-eventhubs-extensions/pom.xml b/sdk/eventhubs/microsoft-azure-eventhubs-extensions/pom.xml index 5cac60426ed43..7b8a792234d20 100644 --- a/sdk/eventhubs/microsoft-azure-eventhubs-extensions/pom.xml +++ b/sdk/eventhubs/microsoft-azure-eventhubs-extensions/pom.xml @@ -17,7 +17,12 @@ 3.3.0-beta.1 Microsoft Azure SDK for Event Hubs Extensions - Extensions built on Microsoft Azure Event Hubs + Extensions built on Microsoft Azure Event Hubs${line.separator} + This library has been replaced by new Azure SDKs, you can read about them at https://aka.ms/azsdkvalueprop. The latest libraries to interact with the Azure Event Hubs service are:${line.separator} + 1. https://search.maven.org/artifact/com.azure/azure-messaging-eventhubs${line.separator} + 2. https://search.maven.org/artifact/com.azure/azure-messaging-eventhubs-checkpointstore-blob${line.separator} + It is recommended that you move to the new package. + https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml b/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml index 65d337730f3c0..29648b40d78b4 100644 --- a/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml +++ b/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml @@ -17,7 +17,12 @@ 3.3.0-beta.1 Microsoft Azure SDK for Event Hubs - Libraries built on Microsoft Azure Event Hubs + Libraries built on Microsoft Azure Event Hubs.${line.separator} + This library has been replaced by new Azure SDKs, you can read about them at https://aka.ms/azsdkvalueprop. The latest libraries to interact with the Azure Event Hubs service are:${line.separator} + 1. https://search.maven.org/artifact/com.azure/azure-messaging-eventhubs${line.separator} + 2. https://search.maven.org/artifact/com.azure/azure-messaging-eventhubs-checkpointstore-blob${line.separator} + It is recommended that you move to the new package. + https://github.com/Azure/azure-sdk-for-java From d0ff18ecfb612baab3b99c82d1e566ef3377858a Mon Sep 17 00:00:00 2001 From: Hemant Tanwar Date: Mon, 31 Aug 2020 13:50:07 -0700 Subject: [PATCH 017/168] SB Track2 : SubQueue Implementation (#14587) * SubQueue Implementation to support deadLetter and transfer deadletter queue using builder.subQueue() API --- .../azure-messaging-servicebus/README.md | 5 +- .../servicebus/ServiceBusClientBuilder.java | 209 ++++-------------- .../messaging/servicebus/models/SubQueue.java | 37 ++++ .../messaging/servicebus/ReadmeSamples.java | 5 +- .../ServiceBusClientBuilderTest.java | 36 +++ ...BusReceiverAsyncClientIntegrationTest.java | 7 +- 6 files changed, 124 insertions(+), 175 deletions(-) create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/models/SubQueue.java diff --git a/sdk/servicebus/azure-messaging-servicebus/README.md b/sdk/servicebus/azure-messaging-servicebus/README.md index 5562cf63a7a7c..4fde057b82232 100644 --- a/sdk/servicebus/azure-messaging-servicebus/README.md +++ b/sdk/servicebus/azure-messaging-servicebus/README.md @@ -326,13 +326,14 @@ Azure Service Bus queues and topic subscriptions provide a secondary sub-queue, The dead-letter queue doesn't need to be explicitly created and can't be deleted or otherwise managed independent of the main entity. Learn more about dead-letter queue [here][dead-letter-queue]. - + ```java ServiceBusReceiverClient receiver = new ServiceBusClientBuilder() .connectionString("<< CONNECTION STRING FOR THE SERVICE BUS NAMESPACE >>") - .deadLetterReceiver() + .receiver() .topicName("<< TOPIC NAME >>") .subscriptionName("<< SUBSCRIPTION NAME >>") + .subQueue(SubQueue.DEAD_LETTER_QUEUE) .buildClient(); ``` 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 463f02502650f..a97ef33132cda 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 @@ -31,6 +31,7 @@ import com.azure.messaging.servicebus.implementation.ServiceBusReactorAmqpConnection; import com.azure.messaging.servicebus.implementation.ServiceBusSharedKeyCredential; import com.azure.messaging.servicebus.models.ReceiveMode; +import com.azure.messaging.servicebus.models.SubQueue; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Scheduler; @@ -58,6 +59,8 @@ public final class ServiceBusClientBuilder { private static final String SERVICE_BUS_PROPERTIES_FILE = "azure-messaging-servicebus.properties"; private static final String SUBSCRIPTION_ENTITY_PATH_FORMAT = "%s/subscriptions/%s"; + private static final String DEAD_LETTER_QUEUE_NAME_SUFFIX = "/$deadletterqueue"; + private static final String TRANSFER_DEAD_LETTER_QUEUE_NAME_SUFFIX = "/$Transfer/$deadletterqueue"; // Using 0 pre-fetch count for both receive modes, to avoid message lock lost exceptions in application // receiving messages at a slow rate. Applications can set it to a higher value if they need better performance. @@ -236,15 +239,6 @@ public ServiceBusSessionReceiverClientBuilder sessionReceiver() { return new ServiceBusSessionReceiverClientBuilder(); } - /** - * A new instance of {@link ServiceBusDeadLetterReceiverClientBuilder} used to configure Service Bus message - * consumers from dead letter queue. - * @return A new instance of {@link ServiceBusDeadLetterReceiverClientBuilder}. - */ - public ServiceBusDeadLetterReceiverClientBuilder deadLetterReceiver() { - return new ServiceBusDeadLetterReceiverClientBuilder(); - } - /** * Called when a child client is closed. Disposes of the shared connection if there are no more clients. */ @@ -426,9 +420,9 @@ private static MessagingEntityType validateEntityPaths(ClientLogger logger, Stri } private static String getEntityPath(ClientLogger logger, MessagingEntityType entityType, String queueName, - String topicName, String subscriptionName) { + String topicName, String subscriptionName, SubQueue subQueue) { - final String entityPath; + String entityPath; switch (entityType) { case QUEUE: entityPath = queueName; @@ -447,13 +441,25 @@ private static String getEntityPath(ClientLogger logger, MessagingEntityType ent new IllegalArgumentException("Unknown entity type: " + entityType)); } - return entityPath; - } + if (subQueue == null) { + return entityPath; + } + + switch (subQueue) { + case NONE: + break; + case TRANSFER_DEAD_LETTER_QUEUE: + entityPath += TRANSFER_DEAD_LETTER_QUEUE_NAME_SUFFIX; + break; + case DEAD_LETTER_QUEUE: + entityPath += DEAD_LETTER_QUEUE_NAME_SUFFIX; + break; + default: + throw logger.logExceptionAsError(new IllegalArgumentException("Unsupported value of subqueue type: " + + subQueue)); + } - private static String getDeadLetterEntityPath(ClientLogger logger, MessagingEntityType entityType, String queueName, - String topicName, String subscriptionName) { - String entityPath = getEntityPath(logger, entityType, queueName, topicName, subscriptionName); - return entityPath + "/$deadletterqueue"; + return entityPath; } /** @@ -716,7 +722,8 @@ public ServiceBusSessionReceiverClientBuilder topicName(String topicName) { public ServiceBusReceiverAsyncClient buildAsyncClient() { final MessagingEntityType entityType = validateEntityPaths(logger, connectionStringEntityName, topicName, queueName); - final String entityPath = getEntityPath(logger, entityType, queueName, topicName, subscriptionName); + final String entityPath = getEntityPath(logger, entityType, queueName, topicName, subscriptionName, + SubQueue.NONE); validateAndThrow(prefetchCount, maxAutoLockRenewalDuration); @@ -787,6 +794,7 @@ private boolean isRollingSessionReceiver() { public final class ServiceBusReceiverClientBuilder { private int prefetchCount = DEFAULT_PREFETCH_COUNT; private String queueName; + private SubQueue subQueue; private ReceiveMode receiveMode = ReceiveMode.PEEK_LOCK; private String subscriptionName; private String topicName; @@ -848,6 +856,19 @@ public ServiceBusReceiverClientBuilder receiveMode(ReceiveMode receiveMode) { return this; } + /** + * Sets the type of the {@link SubQueue} to connect to. + * + * @param subQueue The type of the sub queue. + * + * @return The modified {@link ServiceBusReceiverClientBuilder} object. + * @see #queueName A queuename or #topicName A topic name should be set as well. + */ + public ServiceBusReceiverClientBuilder subQueue(SubQueue subQueue) { + this.subQueue = subQueue; + return this; + } + /** * Sets the name of the subscription in the topic to listen to. {@link #topicName(String)} must also be set. * @@ -891,8 +912,8 @@ public ServiceBusReceiverClientBuilder topicName(String topicName) { public ServiceBusReceiverAsyncClient buildAsyncClient() { final MessagingEntityType entityType = validateEntityPaths(logger, connectionStringEntityName, topicName, queueName); - final String entityPath = getEntityPath(logger, entityType, queueName, topicName, subscriptionName); - + final String entityPath = getEntityPath(logger, entityType, queueName, topicName, subscriptionName, + subQueue); validateAndThrow(prefetchCount, maxAutoLockRenewalDuration); final ServiceBusConnectionProcessor connectionProcessor = getOrCreateConnectionProcessor(messageSerializer); @@ -921,154 +942,6 @@ public ServiceBusReceiverClient buildClient() { } } - /** - * Azure Service Bus queues and topic subscriptions provide a secondary subqueue, called a dead-letter queue (DLQ). - * The dead-letter queue doesn't need to be explicitly created and can't be deleted or otherwise managed - * independent of the main entity. - *

- * This is builder for creating {@link ServiceBusReceiverClient} and {@link ServiceBusReceiverAsyncClient} to - * consume dead-letter messages from Service Bus entity. - * @see ServiceBusReceiverAsyncClient - * @see ServiceBusReceiverClient - */ - @ServiceClientBuilder(serviceClients = {ServiceBusReceiverClient.class, ServiceBusReceiverAsyncClient.class}) - public final class ServiceBusDeadLetterReceiverClientBuilder { - private int prefetchCount = DEFAULT_PREFETCH_COUNT; - private String queueName; - private ReceiveMode receiveMode = ReceiveMode.PEEK_LOCK; - private String subscriptionName; - private String topicName; - private Duration maxAutoLockRenewalDuration; - - private ServiceBusDeadLetterReceiverClientBuilder() { - } - - /** - * Enables auto-lock renewal by renewing each message lock renewal until the {@code maxAutoLockRenewalDuration} - * has elapsed. - * @param maxAutoLockRenewalDuration Maximum amount of time to renew the session lock. - * - * @return The modified {@link ServiceBusDeadLetterReceiverClientBuilder} object. - */ - public ServiceBusDeadLetterReceiverClientBuilder maxAutoLockRenewalDuration( - Duration maxAutoLockRenewalDuration) { - this.maxAutoLockRenewalDuration = maxAutoLockRenewalDuration; - return this; - } - - /** - * Sets the prefetch count of the receiver. For both {@link ReceiveMode#PEEK_LOCK PEEK_LOCK} and {@link - * ReceiveMode#RECEIVE_AND_DELETE RECEIVE_AND_DELETE} modes the default value is 1. - *

- * Prefetch speeds up the message flow by aiming to have a message readily available for local retrieval when - * and before the application asks for one using {@link ServiceBusReceiverAsyncClient#receiveMessages()}. - * Setting a non-zero value will prefetch that number of messages. Setting the value to zero turns prefetch off. - * @param prefetchCount The prefetch count. - * - * @return The modified {@link ServiceBusDeadLetterReceiverClientBuilder} object. - */ - public ServiceBusDeadLetterReceiverClientBuilder prefetchCount(int prefetchCount) { - this.prefetchCount = prefetchCount; - return this; - } - - /** - * Sets the name of the queue to create a receiver for. - * @param queueName Name of the queue. - * - * @return The modified {@link ServiceBusDeadLetterReceiverClientBuilder} object. - */ - public ServiceBusDeadLetterReceiverClientBuilder queueName(String queueName) { - this.queueName = queueName; - return this; - } - - /** - * Sets the receive mode for the receiver. - * @param receiveMode Mode for receiving messages. - * - * @return The modified {@link ServiceBusDeadLetterReceiverClientBuilder} object. - */ - public ServiceBusDeadLetterReceiverClientBuilder receiveMode(ReceiveMode receiveMode) { - this.receiveMode = receiveMode; - return this; - } - - /** - * Sets the name of the subscription in the topic to listen to. {@link #topicName(String)} must also be set. - * - * @param subscriptionName Name of the subscription. - * - * @return The modified {@link ServiceBusDeadLetterReceiverClientBuilder} object. - * @see ServiceBusDeadLetterReceiverClientBuilder#topicName(String) A topic name should be set as well... - */ - public ServiceBusDeadLetterReceiverClientBuilder subscriptionName(String subscriptionName) { - this.subscriptionName = subscriptionName; - return this; - } - - /** - * Sets the name of the topic. {@link #subscriptionName(String)} must also be set. - * @param topicName Name of the topic. - * - * @return The modified {@link ServiceBusDeadLetterReceiverClientBuilder} object. - * @see ServiceBusDeadLetterReceiverClientBuilder#subscriptionName(String) A subscription name should be set - * as well. - */ - public ServiceBusDeadLetterReceiverClientBuilder topicName(String topicName) { - this.topicName = topicName; - return this; - } - - /** - * Creates an asynchronous Service Bus receiver responsible for reading {@link ServiceBusMessage - * messages} from secondary subqueue, called a dead-letter queue (DLQ). - * @return An new {@link ServiceBusReceiverAsyncClient} that receives messages from secondary subqueue, called - * a dead-letter queue (DLQ). - * @throws IllegalStateException if {@link #queueName(String) queueName} or {@link #topicName(String) - * topicName} are not set or, both of these fields are set. It is also thrown if the Service Bus {@link - * #connectionString(String) connectionString} contains an {@code EntityPath} that does not match one set in - * {@link #queueName(String) queueName} or {@link #topicName(String) topicName}. Lastly, if a {@link - * #topicName(String) topicName} is set, but {@link #subscriptionName(String) subscriptionName} is not. - * @throws IllegalArgumentException Queue or topic name are not set via {@link #queueName(String) - * queueName()} or {@link #topicName(String) topicName()}, respectively. - */ - public ServiceBusReceiverAsyncClient buildAsyncClient() { - final MessagingEntityType entityType = validateEntityPaths(logger, connectionStringEntityName, topicName, - queueName); - final String entityPath = getDeadLetterEntityPath(logger, entityType, queueName, topicName, - subscriptionName); - - validateAndThrow(prefetchCount, maxAutoLockRenewalDuration); - - final ServiceBusConnectionProcessor connectionProcessor = getOrCreateConnectionProcessor(messageSerializer); - final ReceiverOptions receiverOptions = new ReceiverOptions(receiveMode, prefetchCount, - maxAutoLockRenewalDuration); - - return new ServiceBusReceiverAsyncClient(connectionProcessor.getFullyQualifiedNamespace(), entityPath, - entityType, receiverOptions, connectionProcessor, ServiceBusConstants.OPERATION_TIMEOUT, - tracerProvider, messageSerializer, ServiceBusClientBuilder.this::onClientClose); - } - - /** - * Creates synchronous Service Bus receiver responsible for reading {@link ServiceBusMessage messages} - * from secondary subqueue, called a dead-letter queue (DLQ). - * - * @return An new {@link ServiceBusReceiverClient} that receives messages from secondary subqueue, called a - * dead-letter queue (DLQ). - * @throws IllegalStateException if {@link #queueName(String) queueName} or {@link #topicName(String) - * topicName} are not set or, both of these fields are set. It is also thrown if the Service Bus {@link - * #connectionString(String) connectionString} contains an {@code EntityPath} that does not match one set in - * {@link #queueName(String) queueName} or {@link #topicName(String) topicName}. Lastly, if a {@link - * #topicName(String) topicName} is set, but {@link #subscriptionName(String) subscriptionName} is not. - * @throws IllegalArgumentException Queue or topic name are not set via {@link #queueName(String) - * queueName()} or {@link #topicName(String) topicName()}, respectively. - */ - public ServiceBusReceiverClient buildClient() { - return new ServiceBusReceiverClient(buildAsyncClient(), retryOptions.getTryTimeout()); - } - } - private void validateAndThrow(int prefetchCount, Duration maxAutoLockRenewalDuration) { if (prefetchCount < 1) { throw logger.logExceptionAsError(new IllegalArgumentException(String.format( diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/models/SubQueue.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/models/SubQueue.java new file mode 100644 index 0000000000000..7cba579796582 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/models/SubQueue.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.models; + +import com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient; +import com.azure.messaging.servicebus.ServiceBusReceiverClient; + +/** + * Azure Service Bus queues and topic subscriptions provide a secondary subqueue, called a dead-letter queue (DLQ). + * The dead-letter queue doesn't need to be explicitly created and can't be deleted or otherwise managed + * independent of the main entity. + * + * @see Dead-letter Queues + */ +public enum SubQueue { + /** + * Connect to the default entity (directly to the queue or subscription) + */ + NONE, + + /** + * This value to indicate dead-letter queue. + *

+ * This is builder for creating {@link ServiceBusReceiverClient} and {@link ServiceBusReceiverAsyncClient} to + * consume dead-letter messages from Service Bus entity. + */ + DEAD_LETTER_QUEUE, + + /** + * This value to indicate transfer dead-letter queue. + *

+ * This is builder for creating {@link ServiceBusReceiverClient} and {@link ServiceBusReceiverAsyncClient} to + * consume transfer dead-letter messages from Service Bus entity. + */ + TRANSFER_DEAD_LETTER_QUEUE; +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReadmeSamples.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReadmeSamples.java index 68ecda0ad74fb..d38385814e700 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReadmeSamples.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReadmeSamples.java @@ -7,6 +7,7 @@ import com.azure.core.util.IterableStream; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.messaging.servicebus.models.ReceiveMode; +import com.azure.messaging.servicebus.models.SubQueue; import reactor.core.Disposable; import java.nio.charset.StandardCharsets; @@ -18,7 +19,6 @@ * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS ARE USED TO EXTRACT * APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING LINE NUMBERS OF EXISTING CODE * SAMPLES. - * * Class containing code snippets that will be injected to README.md. */ public class ReadmeSamples { @@ -199,9 +199,10 @@ public void unnamedSessionReceiver() { public void createSynchronousServiceBusDeadLetterQueueReceiver() { ServiceBusReceiverClient receiver = new ServiceBusClientBuilder() .connectionString("<< CONNECTION STRING FOR THE SERVICE BUS NAMESPACE >>") - .deadLetterReceiver() + .receiver() .topicName("<< TOPIC NAME >>") .subscriptionName("<< SUBSCRIPTION NAME >>") + .subQueue(SubQueue.DEAD_LETTER_QUEUE) .buildClient(); } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java index d81c822548660..996a668fd8434 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java @@ -10,6 +10,7 @@ import com.azure.messaging.servicebus.ServiceBusClientBuilder.ServiceBusReceiverClientBuilder; import com.azure.messaging.servicebus.ServiceBusClientBuilder.ServiceBusSenderClientBuilder; import com.azure.messaging.servicebus.models.ReceiveMode; +import com.azure.messaging.servicebus.models.SubQueue; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -25,6 +26,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; class ServiceBusClientBuilderTest { private static final String NAMESPACE_NAME = "dummyNamespaceName"; @@ -36,6 +38,8 @@ class ServiceBusClientBuilderTest { private static final String SHARED_ACCESS_KEY_NAME = "dummySasKeyName"; private static final String SHARED_ACCESS_KEY = "dummySasKey"; private static final String ENDPOINT = getUri(ENDPOINT_FORMAT, NAMESPACE_NAME, DEFAULT_DOMAIN_NAME).toString(); + private static final String DEAD_LETTER_QUEUE_NAME_SUFFIX = "/$deadletterqueue"; + private static final String TRANSFER_DEAD_LETTER_QUEUE_NAME_SUFFIX = "/$Transfer/$deadletterqueue"; private static final String PROXY_HOST = "127.0.0.1"; private static final String PROXY_PORT = "3128"; @@ -75,6 +79,38 @@ void queueClientWithViaQueueName() { assertNotNull(client); } + @Test + void deadLetterqueueClient() { + // Arrange + final ServiceBusReceiverClientBuilder builder = new ServiceBusClientBuilder() + .connectionString(NAMESPACE_CONNECTION_STRING) + .receiver() + .queueName(QUEUE_NAME) + .subQueue(SubQueue.DEAD_LETTER_QUEUE); + + // Act + final ServiceBusReceiverAsyncClient client = builder.buildAsyncClient(); + + // Assert + assertTrue(client.getEntityPath().endsWith(DEAD_LETTER_QUEUE_NAME_SUFFIX)); + } + + @Test + void transferDeadLetterqueueClient() { + // Arrange + final ServiceBusReceiverClientBuilder builder = new ServiceBusClientBuilder() + .connectionString(NAMESPACE_CONNECTION_STRING) + .receiver() + .queueName(QUEUE_NAME) + .subQueue(SubQueue.TRANSFER_DEAD_LETTER_QUEUE); + + // Act + final ServiceBusReceiverAsyncClient client = builder.buildAsyncClient(); + + // Assert + assertTrue(client.getEntityPath().endsWith(TRANSFER_DEAD_LETTER_QUEUE_NAME_SUFFIX)); + } + @Test void missingConnectionString() { assertThrows(IllegalArgumentException.class, () -> { diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java index 0647bea059b4e..6926ce8a23060 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java @@ -9,6 +9,7 @@ import com.azure.messaging.servicebus.implementation.MessagingEntityType; import com.azure.messaging.servicebus.models.LockRenewalStatus; import com.azure.messaging.servicebus.models.ReceiveMode; +import com.azure.messaging.servicebus.models.SubQueue; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; @@ -1089,7 +1090,7 @@ private void completeDeferredMessages(ServiceBusReceiverAsyncClient client, Serv receiver.complete(receivedDeferredMessage.getLockToken()).block(TIMEOUT); } - private ServiceBusClientBuilder.ServiceBusDeadLetterReceiverClientBuilder getDeadLetterReceiverBuilder(boolean useCredentials, + private ServiceBusClientBuilder.ServiceBusReceiverClientBuilder getDeadLetterReceiverBuilder(boolean useCredentials, MessagingEntityType entityType, int entityIndex, Function onBuilderCreate) { ServiceBusClientBuilder builder = getBuilder(useCredentials); @@ -1100,14 +1101,14 @@ private ServiceBusClientBuilder.ServiceBusDeadLetterReceiverClientBuilder getDea final String queueName = getQueueName(entityIndex); assertNotNull(queueName, "'queueName' cannot be null."); - return builder.deadLetterReceiver().queueName(queueName); + return builder.receiver().queueName(queueName).subQueue(SubQueue.DEAD_LETTER_QUEUE); case SUBSCRIPTION: final String topicName = getTopicName(entityIndex); final String subscriptionName = getSubscriptionBaseName(); assertNotNull(topicName, "'topicName' cannot be null."); assertNotNull(subscriptionName, "'subscriptionName' cannot be null."); - return builder.deadLetterReceiver().topicName(topicName).subscriptionName(subscriptionName); + return builder.receiver().topicName(topicName).subscriptionName(subscriptionName).subQueue(SubQueue.DEAD_LETTER_QUEUE); default: throw logger.logExceptionAsError(new IllegalArgumentException("Unknown entity type: " + entityType)); } From c06b9ebce134c7d82141831351917a43beb35399 Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Mon, 31 Aug 2020 13:59:34 -0700 Subject: [PATCH 018/168] Update the helper classes used for serialization and deserialization (#14659) * Update the helper classes used for serialization and deserialization --- .../serialization/BasicRelationship.java | 4 ++++ .../serialization/WritableProperty.java | 8 +++++--- .../core/util/UpdateOperationUtility.java | 12 ++++++------ .../azure/digitaltwins/core/CustomDigitalTwin.java | 8 +++++--- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java index 71b16ec8a6fad..df584f95c4ee1 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java @@ -6,16 +6,20 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.HashMap; import java.util.Map; +import static com.fasterxml.jackson.annotation.JsonInclude.*; + /** * Although relationships have a user-defined schema, these properties should exist on every instance. * This is useful to use as a base class to ensure your custom relationships have the necessary properties. */ @Fluent +@JsonInclude(Include.NON_NULL) public class BasicRelationship { @JsonProperty(value = "$relationshipId", required = true) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/WritableProperty.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/WritableProperty.java index 9b6ca1f82977a..227e09c76cb01 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/WritableProperty.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/WritableProperty.java @@ -7,11 +7,13 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import static com.fasterxml.jackson.annotation.JsonInclude.*; + /** * An optional, helper class for deserializing a digital twin. */ @Fluent -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(Include.NON_NULL) public class WritableProperty { @JsonProperty(value = "desiredValue") @@ -20,10 +22,10 @@ public class WritableProperty { @JsonProperty(value = "desiredVersion") private int desiredVersion; - @JsonProperty(value = "ackVersion") + @JsonProperty(value = "ackVersion", required = true) private int ackVersion; - @JsonProperty(value = "ackCode") + @JsonProperty(value = "ackCode", required = true) private int ackCode; @JsonProperty(value = "ackDescription") diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java index aa6e448a55f02..4e33e27bd7701 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java @@ -92,29 +92,29 @@ static class UpdateOperation { @JsonProperty(value = "value") private Object value; - public String getOperation() { + String getOperation() { return operation; } - public UpdateOperation setOperation(String operation) { + UpdateOperation setOperation(String operation) { this.operation = operation; return this; } - public String getPath() { + String getPath() { return path; } - public UpdateOperation setPath(String path) { + UpdateOperation setPath(String path) { this.path = path; return this; } - public Object getValue() { + Object getValue() { return value; } - public UpdateOperation setValue(Object value) { + UpdateOperation setValue(Object value) { this.value = value; return this; } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/CustomDigitalTwin.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/CustomDigitalTwin.java index f6176f9fcc8ac..948a2be57aa38 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/CustomDigitalTwin.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/CustomDigitalTwin.java @@ -8,8 +8,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import static com.fasterxml.jackson.annotation.JsonInclude.*; + @Fluent -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(Include.NON_NULL) public class CustomDigitalTwin { @JsonProperty(value = "$dtId", required = true) @@ -74,7 +76,7 @@ public CustomDigitalTwin setTemperatureUnit(String temperatureUnit) { } @Fluent -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(Include.NON_NULL) class Metadata { @JsonProperty(value = "$model", required = true) @@ -91,7 +93,7 @@ public Metadata setModelId(String modelId) { } @Fluent -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(Include.NON_NULL) class CustomDigitalTwinMetadata extends Metadata { @JsonProperty(value = "AverageTemperature") From f7add49c43fa676a982c7a6299946b9fcb3cf434 Mon Sep 17 00:00:00 2001 From: Hemant Tanwar Date: Mon, 31 Aug 2020 14:11:11 -0700 Subject: [PATCH 019/168] Added unit test (#14634) Co-authored-by: Hemant Tanwar --- .../ManagementChannelTests.java | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java index c3a81d310bda0..08a55c7069e37 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java @@ -10,14 +10,18 @@ import com.azure.core.amqp.implementation.TokenManager; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.messaging.servicebus.ServiceBusTransactionContext; import com.azure.messaging.servicebus.administration.models.DeadLetterOptions; import org.apache.qpid.proton.Proton; import org.apache.qpid.proton.amqp.Binary; import org.apache.qpid.proton.amqp.messaging.AmqpValue; import org.apache.qpid.proton.amqp.messaging.ApplicationProperties; +import org.apache.qpid.proton.amqp.transaction.TransactionalState; +import org.apache.qpid.proton.amqp.transport.DeliveryState; import org.apache.qpid.proton.message.Message; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -34,6 +38,7 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; +import java.nio.ByteBuffer; import java.time.Duration; import java.time.Instant; import java.util.Date; @@ -60,6 +65,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.isNull; +import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.when; @@ -90,6 +96,8 @@ class ManagementChannelTests { private RequestResponseChannel requestResponseChannel; @Captor private ArgumentCaptor messageCaptor; + @Captor + private ArgumentCaptor amqpDeliveryStateCaptor; @BeforeAll static void beforeAll() { @@ -380,6 +388,39 @@ void updateDisposition(String sessionId, String associatedLinkName) { } } + /** + * Verifies that transaction-id is set properly. + */ + @Test + void updateDispositionWithTransaction() { + // Arrange + final String associatedLinkName = "associatedLinkName"; + final String TXN_ID_STRING = "Transaction-ID"; + final DeadLetterOptions options = new DeadLetterOptions() + .setDeadLetterErrorDescription("dlq-description") + .setDeadLetterReason("dlq-reason"); + + final UUID lockToken = UUID.randomUUID(); + final ServiceBusTransactionContext mockTransaction = mock(ServiceBusTransactionContext.class); + when(mockTransaction.getTransactionId()).thenReturn(ByteBuffer.wrap(TXN_ID_STRING.getBytes())); + when(requestResponseChannel.sendWithAck(any(Message.class), any(DeliveryState.class))) + .thenReturn(Mono.just(responseMessage)); + + // Act & Assert + StepVerifier.create(managementChannel.updateDisposition(lockToken.toString(), DispositionStatus.SUSPENDED, + options.getDeadLetterReason(), options.getDeadLetterErrorDescription(), options.getPropertiesToModify(), + null, associatedLinkName, mockTransaction)) + .verifyComplete(); + + // Verify the contents of our request to make sure the correct properties were given. + verify(requestResponseChannel).sendWithAck(any(Message.class), amqpDeliveryStateCaptor.capture()); + + final DeliveryState delivery = amqpDeliveryStateCaptor.getValue(); + Assertions.assertNotNull(delivery); + Assertions.assertTrue(delivery instanceof TransactionalState); + Assertions.assertEquals(TXN_ID_STRING, ((TransactionalState) delivery).getTxnId().toString()); + } + /** * Verifies that an error is emitted when user is unauthorized. */ From 01e0e42cd4ea21087cc10208753efe5b272db554 Mon Sep 17 00:00:00 2001 From: Soreloser2 <43689321+Soreloser2@users.noreply.github.com> Date: Mon, 31 Aug 2020 14:14:26 -0700 Subject: [PATCH 020/168] EventGrid Track 2 autogenerated code (#14440) * Regenerate SDK from Autorest v4 Autorest regenerated using up to date version for track 2 pom file incorporated to jacoco and dependencies for module handled issue around capitalization of etag discrepancy fixed no test coverage yet * Regenerate SDK from Autorest v4 Autorest regenerated using up to date version for track 2 pom file incorporated to jacoco and dependencies for module handled issue around capitalization of etag discrepancy fixed no test coverage yet * EventGrid Track 2 Autogenerated Autogenerate EventGrid track 2 classes using the swagger. All files except EventGridPublisherImplTests.java, pom.xml, and the swagger readme.md are autogenerated. * Exclude readme requirement Readme is included in the PR that has all the written components, since the Readme contains samples that only work with written code. * fix docsettings indents * Add back in paths * Fix tests and pom tests now renamed, use StepVerifier. Core dependency changed, added reactor test as dependency and remove build configs in pom. Refactor swagger readme for captialization. * fix docsettings indenting again Co-authored-by: Soren Dahl --- eng/.docsettings.yml | 2 + eng/jacoco-test-coverage/pom.xml | 5 + eng/versioning/version_client.txt | 1 + .../azure-messaging-eventgrid/pom.xml | 123 +++++++ .../EventGridPublisherClientImpl.java | 341 +++++++++++++++++ .../EventGridPublisherClientImplBuilder.java | 71 ++++ .../implementation/models/CloudEvent.java | 327 +++++++++++++++++ .../implementation/models/EventGridEvent.java | 212 +++++++++++ .../implementation/models/package-info.java | 8 + .../implementation/package-info.java | 10 + .../messaging/eventgrid/package-info.java | 6 + .../eventgrid/systemevents/AppAction.java | 48 +++ ...ConfigurationKeyValueDeletedEventData.java | 92 +++++ ...onfigurationKeyValueModifiedEventData.java | 92 +++++ .../systemevents/AppEventTypeDetail.java | 40 ++ .../systemevents/AppServicePlanAction.java | 33 ++ .../AppServicePlanEventTypeDetail.java | 92 +++++ .../eventgrid/systemevents/AsyncStatus.java | 39 ++ .../ContainerRegistryArtifactEventData.java | 119 ++++++ .../ContainerRegistryArtifactEventTarget.java | 196 ++++++++++ ...ontainerRegistryChartDeletedEventData.java | 13 + ...ContainerRegistryChartPushedEventData.java | 13 + .../ContainerRegistryEventActor.java | 41 +++ .../ContainerRegistryEventData.java | 203 ++++++++++ .../ContainerRegistryEventRequest.java | 151 ++++++++ .../ContainerRegistryEventSource.java | 70 ++++ .../ContainerRegistryEventTarget.java | 197 ++++++++++ ...ontainerRegistryImageDeletedEventData.java | 13 + ...ContainerRegistryImagePushedEventData.java | 13 + .../DeviceConnectionStateEventInfo.java | 47 +++ .../DeviceConnectionStateEventProperties.java | 133 +++++++ .../DeviceLifeCycleEventProperties.java | 102 +++++ .../DeviceTelemetryEventProperties.java | 96 +++++ .../systemevents/DeviceTwinInfo.java | 314 ++++++++++++++++ .../DeviceTwinInfoProperties.java | 72 ++++ .../DeviceTwinInfoX509Thumbprint.java | 66 ++++ .../systemevents/DeviceTwinMetadata.java | 40 ++ .../systemevents/DeviceTwinProperties.java | 66 ++++ .../EventHubCaptureFileCreatedEventData.java | 249 +++++++++++++ .../IotHubDeviceConnectedEventData.java | 13 + .../IotHubDeviceCreatedEventData.java | 13 + .../IotHubDeviceDeletedEventData.java | 13 + .../IotHubDeviceDisconnectedEventData.java | 13 + .../IotHubDeviceTelemetryEventData.java | 13 + .../KeyVaultCertificateExpiredEventData.java | 196 ++++++++++ ...eyVaultCertificateNearExpiryEventData.java | 196 ++++++++++ ...CertificateNewVersionCreatedEventData.java | 196 ++++++++++ .../KeyVaultKeyExpiredEventData.java | 196 ++++++++++ .../KeyVaultKeyNearExpiryEventData.java | 196 ++++++++++ ...KeyVaultKeyNewVersionCreatedEventData.java | 196 ++++++++++ .../KeyVaultSecretExpiredEventData.java | 196 ++++++++++ .../KeyVaultSecretNearExpiryEventData.java | 196 ++++++++++ ...VaultSecretNewVersionCreatedEventData.java | 196 ++++++++++ ...ServicesDatasetDriftDetectedEventData.java | 225 ++++++++++++ ...earningServicesModelDeployedEventData.java | 145 ++++++++ ...rningServicesModelRegisteredEventData.java | 118 ++++++ ...LearningServicesRunCompletedEventData.java | 170 +++++++++ ...ningServicesRunStatusChangedEventData.java | 196 ++++++++++ .../MapsGeofenceEnteredEventData.java | 13 + .../MapsGeofenceEventProperties.java | 133 +++++++ .../MapsGeofenceExitedEventData.java | 13 + .../systemevents/MapsGeofenceGeometry.java | 194 ++++++++++ .../MapsGeofenceResultEventData.java | 13 + .../MediaJobCanceledEventData.java | 41 +++ .../MediaJobCancelingEventData.java | 13 + .../eventgrid/systemevents/MediaJobError.java | 93 +++++ .../systemevents/MediaJobErrorCategory.java | 58 +++ .../systemevents/MediaJobErrorCode.java | 70 ++++ .../systemevents/MediaJobErrorDetail.java | 44 +++ .../MediaJobErroredEventData.java | 41 +++ .../MediaJobFinishedEventData.java | 41 +++ .../systemevents/MediaJobOutput.java | 130 +++++++ .../systemevents/MediaJobOutputAsset.java | 46 +++ .../MediaJobOutputCanceledEventData.java | 13 + .../MediaJobOutputCancelingEventData.java | 13 + .../MediaJobOutputErroredEventData.java | 13 + .../MediaJobOutputFinishedEventData.java | 13 + .../MediaJobOutputProcessingEventData.java | 13 + .../MediaJobOutputProgressEventData.java | 93 +++++ .../MediaJobOutputScheduledEventData.java | 13 + .../MediaJobOutputStateChangeEventData.java | 82 +++++ .../MediaJobProcessingEventData.java | 13 + .../eventgrid/systemevents/MediaJobRetry.java | 49 +++ .../MediaJobScheduledEventData.java | 13 + .../eventgrid/systemevents/MediaJobState.java | 64 ++++ .../MediaJobStateChangeEventData.java | 71 ++++ ...aLiveEventConnectionRejectedEventData.java | 89 +++++ ...diaLiveEventEncoderConnectedEventData.java | 74 ++++ ...LiveEventEncoderDisconnectedEventData.java | 89 +++++ ...ventIncomingDataChunkDroppedEventData.java | 104 ++++++ ...eEventIncomingStreamReceivedEventData.java | 149 ++++++++ ...ventIncomingStreamsOutOfSyncEventData.java | 104 ++++++ ...ncomingVideoStreamsOutOfSyncEventData.java | 90 +++++ ...ediaLiveEventIngestHeartbeatEventData.java | 194 ++++++++++ ...ntTrackDiscontinuityDetectedEventData.java | 120 ++++++ .../RedisExportRDBCompletedEventData.java | 93 +++++ .../RedisImportRDBCompletedEventData.java | 93 +++++ .../RedisPatchingCompletedEventData.java | 93 +++++ .../RedisScalingCompletedEventData.java | 93 +++++ .../ResourceActionCancelData.java | 300 +++++++++++++++ .../ResourceActionFailureData.java | 300 +++++++++++++++ .../ResourceActionSuccessData.java | 300 +++++++++++++++ .../ResourceDeleteCancelData.java | 300 +++++++++++++++ .../ResourceDeleteFailureData.java | 300 +++++++++++++++ .../ResourceDeleteSuccessData.java | 300 +++++++++++++++ .../systemevents/ResourceWriteCancelData.java | 300 +++++++++++++++ .../ResourceWriteFailureData.java | 300 +++++++++++++++ .../ResourceWriteSuccessData.java | 300 +++++++++++++++ ...agesAvailableWithNoListenersEventData.java | 182 +++++++++ ...agesAvailableWithNoListenersEventData.java | 182 +++++++++ ...iceClientConnectionConnectedEventData.java | 119 ++++++ ...ClientConnectionDisconnectedEventData.java | 145 ++++++++ .../eventgrid/systemevents/StampKind.java | 39 ++ .../StorageBlobCreatedEventData.java | 347 ++++++++++++++++++ .../StorageBlobDeletedEventData.java | 266 ++++++++++++++ .../StorageBlobRenamedEventData.java | 237 ++++++++++++ .../StorageDirectoryCreatedEventData.java | 238 ++++++++++++ .../StorageDirectoryDeletedEventData.java | 238 ++++++++++++ .../StorageDirectoryRenamedEventData.java | 238 ++++++++++++ ...ageLifecyclePolicyActionSummaryDetail.java | 92 +++++ ...rageLifecyclePolicyCompletedEventData.java | 126 +++++++ .../SubscriptionDeletedEventData.java | 29 ++ .../SubscriptionValidationEventData.java | 58 +++ .../SubscriptionValidationResponse.java | 43 +++ .../WebAppServicePlanUpdatedEventData.java | 232 ++++++++++++ .../WebAppServicePlanUpdatedEventDataSku.java | 144 ++++++++ .../systemevents/WebAppUpdatedEventData.java | 205 +++++++++++ .../WebBackupOperationCompletedEventData.java | 205 +++++++++++ .../WebBackupOperationFailedEventData.java | 205 +++++++++++ .../WebBackupOperationStartedEventData.java | 205 +++++++++++ ...WebRestoreOperationCompletedEventData.java | 205 +++++++++++ .../WebRestoreOperationFailedEventData.java | 205 +++++++++++ .../WebRestoreOperationStartedEventData.java | 205 +++++++++++ .../WebSlotSwapCompletedEventData.java | 205 +++++++++++ .../WebSlotSwapFailedEventData.java | 205 +++++++++++ .../WebSlotSwapStartedEventData.java | 205 +++++++++++ ...SlotSwapWithPreviewCancelledEventData.java | 205 +++++++++++ ...ebSlotSwapWithPreviewStartedEventData.java | 205 +++++++++++ .../eventgrid/systemevents/package-info.java | 8 + .../EventGridPublisherImplTests.java | 177 +++++++++ .../publishCloudEventsImpl.json | 21 ++ .../publishCustomEventsImpl.json | 21 ++ .../publishEventGridEventsImpl.json | 21 ++ .../swagger/README.md | 62 ++++ sdk/eventgrid/pom.xml | 1 + 145 files changed, 17656 insertions(+) create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/pom.xml create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/package-info.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/package-info.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/package-info.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppAction.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanAction.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AsyncStatus.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceResultEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCanceledEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCategory.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCode.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputErroredEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProgressEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputStateChangeEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobProcessingEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobRetry.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobState.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRDBCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRDBCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteCancelData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StampKind.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobDeletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryCreatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryDeletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryRenamedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyActionSummaryDetail.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/package-info.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsImpl.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEventsImpl.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEventsImpl.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index a790ad07921b3..cc07234ec979d 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -52,6 +52,7 @@ known_presence_issues: - ['sdk/core/azure-core-auth', '#2847'] - ['sdk/core/azure-core-management', '#2847'] - ['sdk/e2e', '#2847'] + - ['sdk/eventgrid/azure-messaging-eventgrid', '#2847'] - ['sdk/eventhubs/microsoft-azure-eventhubs-extensions', '#2847'] - ['sdk/keyvault/microsoft-azure-keyvault', '#2847'] - ['sdk/keyvault/microsoft-azure-keyvault-core', '#2847'] @@ -128,6 +129,7 @@ known_content_issues: - ['sdk/cosmos/azure-cosmos/README.md', '#3113'] - ['sdk/cosmos/azure-cosmos-encryption/README.md', '#3113'] - ['sdk/e2e/README.md', '#3113'] + - ['sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md', '#3113'] - ['sdk/eventgrid/microsoft-azure-eventgrid/README.md', '#3113'] - ['sdk/eventhubs/microsoft-azure-eventhubs-eph/README.md', '#3113'] - ['sdk/eventhubs/README.md', '#3113'] diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 5dbf3eeaf2a16..49bc33c4fef81 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -141,6 +141,11 @@ azure-identity 1.2.0-beta.1 + + com.azure + azure-messaging-eventgrid + 2.0.0-beta.1 + com.azure azure-messaging-eventhubs diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 2419b096e7b61..4dd0135aea4f5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -31,6 +31,7 @@ com.azure:azure-digitaltwins-core;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-identity;1.1.0;1.2.0-beta.1 com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1 +com.azure:azure-messaging-eventgrid;2.0.0-beta.1;2.0.0-beta.1 com.azure:azure-messaging-eventhubs;5.1.2;5.2.0-beta.3 com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.1.2;1.2.0-beta.3 com.azure:azure-messaging-servicebus;7.0.0-beta.5;7.0.0-beta.6 diff --git a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml new file mode 100644 index 0000000000000..f44852421c256 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml @@ -0,0 +1,123 @@ + + + 4.0.0 + + com.azure + azure-messaging-eventgrid + 2.0.0-beta.1 + + jar + Microsoft Azure SDK for eventgrid + This package contains Microsoft Azure EventGrid SDK. + + com.azure + azure-data-sdk-parent + 1.3.0 + ../../parents/azure-data-sdk-parent + + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + UTF-8 + + + + + + microsoft + Microsoft + + + + + + com.azure + azure-core + 1.7.0 + + + com.azure + azure-core-http-netty + 1.5.4 + + + com.azure + azure-core-serializer-json-jackson + 1.0.0-beta.3 + + + + + commons-io + commons-io + 2.6 + test + + + org.junit.jupiter + junit-jupiter-api + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-params + 5.6.2 + test + + + com.azure + azure-core-test + 1.4.0 + test + + + org.mockito + mockito-core + 3.3.3 + test + + + io.projectreactor + reactor-test + 3.3.9.RELEASE + + + + + diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java new file mode 100644 index 0000000000000..774f24c1f27a6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.messaging.eventgrid.implementation.models.CloudEvent; +import com.azure.messaging.eventgrid.implementation.models.EventGridEvent; +import java.util.List; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the EventGridPublisherClient type. */ +public final class EventGridPublisherClientImpl { + /** The proxy service used to perform REST calls. */ + private final EventGridPublisherClientService service; + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** Initializes an instance of EventGridPublisherClient client. */ + EventGridPublisherClientImpl() { + this( + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(), + JacksonAdapter.createDefaultSerializerAdapter()); + } + + /** + * Initializes an instance of EventGridPublisherClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + */ + EventGridPublisherClientImpl(HttpPipeline httpPipeline) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter()); + } + + /** + * Initializes an instance of EventGridPublisherClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + */ + EventGridPublisherClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.apiVersion = "2018-01-01"; + this.service = + RestProxy.create(EventGridPublisherClientService.class, this.httpPipeline, this.getSerializerAdapter()); + } + + /** + * The interface defining all the services for EventGridPublisherClient to be used by the proxy service to perform + * REST calls. + */ + @Host("https://{topicHostname}") + @ServiceInterface(name = "EventGridPublisherCl") + private interface EventGridPublisherClientService { + @Post("/api/events") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> publishEvents( + @HostParam("topicHostname") String topicHostname, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") List events, + Context context); + + @Post("/api/events") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> publishCloudEventEvents( + @HostParam("topicHostname") String topicHostname, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/cloudevents-batch+json; charset=utf-8") List events, + Context context); + + @Post("/api/events") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> publishCustomEventEvents( + @HostParam("topicHostname") String topicHostname, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") List events, + Context context); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of EventGridEvent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> publishEventsWithResponseAsync(String topicHostname, List events) { + return FluxUtil.withContext( + context -> service.publishEvents(topicHostname, this.getApiVersion(), events, context)); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of EventGridEvent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> publishEventsWithResponseAsync( + String topicHostname, List events, Context context) { + return service.publishEvents(topicHostname, this.getApiVersion(), events, context); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of EventGridEvent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono publishEventsAsync(String topicHostname, List events) { + return publishEventsWithResponseAsync(topicHostname, events).flatMap((Response res) -> Mono.empty()); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of EventGridEvent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono publishEventsAsync(String topicHostname, List events, Context context) { + return publishEventsWithResponseAsync(topicHostname, events, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of CloudEventEvent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> publishCloudEventEventsWithResponseAsync( + String topicHostname, List events) { + return FluxUtil.withContext( + context -> service.publishCloudEventEvents(topicHostname, this.getApiVersion(), events, context)); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of CloudEventEvent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> publishCloudEventEventsWithResponseAsync( + String topicHostname, List events, Context context) { + return service.publishCloudEventEvents(topicHostname, this.getApiVersion(), events, context); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of CloudEventEvent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono publishCloudEventEventsAsync(String topicHostname, List events) { + return publishCloudEventEventsWithResponseAsync(topicHostname, events) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of CloudEventEvent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono publishCloudEventEventsAsync(String topicHostname, List events, Context context) { + return publishCloudEventEventsWithResponseAsync(topicHostname, events, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of any. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> publishCustomEventEventsWithResponseAsync(String topicHostname, List events) { + return FluxUtil.withContext( + context -> service.publishCustomEventEvents(topicHostname, this.getApiVersion(), events, context)); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of any. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> publishCustomEventEventsWithResponseAsync( + String topicHostname, List events, Context context) { + return service.publishCustomEventEvents(topicHostname, this.getApiVersion(), events, context); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of any. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono publishCustomEventEventsAsync(String topicHostname, List events) { + return publishCustomEventEventsWithResponseAsync(topicHostname, events) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Publishes a batch of events to an Azure Event Grid topic. + * + * @param topicHostname simple string. + * @param events Array of any. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono publishCustomEventEventsAsync(String topicHostname, List events, Context context) { + return publishCustomEventEventsWithResponseAsync(topicHostname, events, context) + .flatMap((Response res) -> Mono.empty()); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java new file mode 100644 index 0000000000000..d2a882247287e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** A builder for creating a new instance of the EventGridPublisherClient type. */ +@ServiceClientBuilder(serviceClients = {EventGridPublisherClientImpl.class}) +public final class EventGridPublisherClientImplBuilder { + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the EventGridPublisherClientImplBuilder. + */ + public EventGridPublisherClientImplBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the EventGridPublisherClientImplBuilder. + */ + public EventGridPublisherClientImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of EventGridPublisherClientImpl with the provided parameters. + * + * @return an instance of EventGridPublisherClientImpl. + */ + public EventGridPublisherClientImpl buildClient() { + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); + } + EventGridPublisherClientImpl client = new EventGridPublisherClientImpl(pipeline, serializerAdapter); + return client; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java new file mode 100644 index 0000000000000..14c93a6b1a1d6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java @@ -0,0 +1,327 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** The CloudEvent model. */ +@Fluent +public final class CloudEvent { + /* + * An identifier for the event. The combination of id and source must be + * unique for each distinct event. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * Identifies the context in which an event happened. The combination of id + * and source must be unique for each distinct event. + */ + @JsonProperty(value = "source", required = true) + private String source; + + /* + * Event data specific to the event type. + */ + @JsonProperty(value = "data") + private Object data; + + /* + * Event data specific to the event type, encoded as a base64 string. + */ + @JsonProperty(value = "data_base64") + private byte[] dataBase64; + + /* + * Type of event related to the originating occurrence. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /* + * The time (in UTC) the event was generated, in RFC3339 format. + */ + @JsonProperty(value = "time") + private OffsetDateTime time; + + /* + * The version of the CloudEvents specification which the event uses. + */ + @JsonProperty(value = "specversion", required = true) + private String specversion; + + /* + * Identifies the schema that data adheres to. + */ + @JsonProperty(value = "dataschema") + private String dataschema; + + /* + * Content type of data value. + */ + @JsonProperty(value = "datacontenttype") + private String datacontenttype; + + /* + * This describes the subject of the event in the context of the event + * producer (identified by source). + */ + @JsonProperty(value = "subject") + private String subject; + + /* + * Properties of an event published to an Event Grid topic using the + * CloudEvent 1.0 Schema + */ + @JsonIgnore private Map additionalProperties; + + /** + * Get the id property: An identifier for the event. The combination of id and source must be unique for each + * distinct event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: An identifier for the event. The combination of id and source must be unique for each + * distinct event. + * + * @param id the id value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setId(String id) { + this.id = id; + return this; + } + + /** + * Get the source property: Identifies the context in which an event happened. The combination of id and source must + * be unique for each distinct event. + * + * @return the source value. + */ + public String getSource() { + return this.source; + } + + /** + * Set the source property: Identifies the context in which an event happened. The combination of id and source must + * be unique for each distinct event. + * + * @param source the source value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setSource(String source) { + this.source = source; + return this; + } + + /** + * Get the data property: Event data specific to the event type. + * + * @return the data value. + */ + public Object getData() { + return this.data; + } + + /** + * Set the data property: Event data specific to the event type. + * + * @param data the data value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setData(Object data) { + this.data = data; + return this; + } + + /** + * Get the dataBase64 property: Event data specific to the event type, encoded as a base64 string. + * + * @return the dataBase64 value. + */ + public byte[] getDataBase64() { + return CoreUtils.clone(this.dataBase64); + } + + /** + * Set the dataBase64 property: Event data specific to the event type, encoded as a base64 string. + * + * @param dataBase64 the dataBase64 value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setDataBase64(byte[] dataBase64) { + this.dataBase64 = CoreUtils.clone(dataBase64); + return this; + } + + /** + * Get the type property: Type of event related to the originating occurrence. + * + * @return the type value. + */ + public String getType() { + return this.type; + } + + /** + * Set the type property: Type of event related to the originating occurrence. + * + * @param type the type value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setType(String type) { + this.type = type; + return this; + } + + /** + * Get the time property: The time (in UTC) the event was generated, in RFC3339 format. + * + * @return the time value. + */ + public OffsetDateTime getTime() { + return this.time; + } + + /** + * Set the time property: The time (in UTC) the event was generated, in RFC3339 format. + * + * @param time the time value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setTime(OffsetDateTime time) { + this.time = time; + return this; + } + + /** + * Get the specversion property: The version of the CloudEvents specification which the event uses. + * + * @return the specversion value. + */ + public String getSpecversion() { + return this.specversion; + } + + /** + * Set the specversion property: The version of the CloudEvents specification which the event uses. + * + * @param specversion the specversion value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setSpecversion(String specversion) { + this.specversion = specversion; + return this; + } + + /** + * Get the dataschema property: Identifies the schema that data adheres to. + * + * @return the dataschema value. + */ + public String getDataschema() { + return this.dataschema; + } + + /** + * Set the dataschema property: Identifies the schema that data adheres to. + * + * @param dataschema the dataschema value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setDataschema(String dataschema) { + this.dataschema = dataschema; + return this; + } + + /** + * Get the datacontenttype property: Content type of data value. + * + * @return the datacontenttype value. + */ + public String getDatacontenttype() { + return this.datacontenttype; + } + + /** + * Set the datacontenttype property: Content type of data value. + * + * @param datacontenttype the datacontenttype value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setDatacontenttype(String datacontenttype) { + this.datacontenttype = datacontenttype; + return this; + } + + /** + * Get the subject property: This describes the subject of the event in the context of the event producer + * (identified by source). + * + * @return the subject value. + */ + public String getSubject() { + return this.subject; + } + + /** + * Set the subject property: This describes the subject of the event in the context of the event producer + * (identified by source). + * + * @param subject the subject value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setSubject(String subject) { + this.subject = subject; + return this; + } + + /** + * Get the additionalProperties property: Properties of an event published to an Event Grid topic using the + * CloudEvent 1.0 Schema. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Properties of an event published to an Event Grid topic using the + * CloudEvent 1.0 Schema. + * + * @param additionalProperties the additionalProperties value to set. + * @return the CloudEvent object itself. + */ + public CloudEvent setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void setAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, value); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java new file mode 100644 index 0000000000000..f78e9b5b07cb4 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The EventGridEvent model. */ +@Fluent +public final class EventGridEvent { + /* + * An unique identifier for the event. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * The resource path of the event source. + */ + @JsonProperty(value = "topic") + private String topic; + + /* + * A resource path relative to the topic path. + */ + @JsonProperty(value = "subject", required = true) + private String subject; + + /* + * Event data specific to the event type. + */ + @JsonProperty(value = "data", required = true) + private Object data; + + /* + * The type of the event that occurred. + */ + @JsonProperty(value = "eventType", required = true) + private String eventType; + + /* + * The time (in UTC) the event was generated. + */ + @JsonProperty(value = "eventTime", required = true) + private OffsetDateTime eventTime; + + /* + * The schema version of the event metadata. + */ + @JsonProperty(value = "metadataVersion", access = JsonProperty.Access.WRITE_ONLY) + private String metadataVersion; + + /* + * The schema version of the data object. + */ + @JsonProperty(value = "dataVersion", required = true) + private String dataVersion; + + /** + * Get the id property: An unique identifier for the event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: An unique identifier for the event. + * + * @param id the id value to set. + * @return the EventGridEvent object itself. + */ + public EventGridEvent setId(String id) { + this.id = id; + return this; + } + + /** + * Get the topic property: The resource path of the event source. + * + * @return the topic value. + */ + public String getTopic() { + return this.topic; + } + + /** + * Set the topic property: The resource path of the event source. + * + * @param topic the topic value to set. + * @return the EventGridEvent object itself. + */ + public EventGridEvent setTopic(String topic) { + this.topic = topic; + return this; + } + + /** + * Get the subject property: A resource path relative to the topic path. + * + * @return the subject value. + */ + public String getSubject() { + return this.subject; + } + + /** + * Set the subject property: A resource path relative to the topic path. + * + * @param subject the subject value to set. + * @return the EventGridEvent object itself. + */ + public EventGridEvent setSubject(String subject) { + this.subject = subject; + return this; + } + + /** + * Get the data property: Event data specific to the event type. + * + * @return the data value. + */ + public Object getData() { + return this.data; + } + + /** + * Set the data property: Event data specific to the event type. + * + * @param data the data value to set. + * @return the EventGridEvent object itself. + */ + public EventGridEvent setData(Object data) { + this.data = data; + return this; + } + + /** + * Get the eventType property: The type of the event that occurred. + * + * @return the eventType value. + */ + public String getEventType() { + return this.eventType; + } + + /** + * Set the eventType property: The type of the event that occurred. + * + * @param eventType the eventType value to set. + * @return the EventGridEvent object itself. + */ + public EventGridEvent setEventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Get the eventTime property: The time (in UTC) the event was generated. + * + * @return the eventTime value. + */ + public OffsetDateTime getEventTime() { + return this.eventTime; + } + + /** + * Set the eventTime property: The time (in UTC) the event was generated. + * + * @param eventTime the eventTime value to set. + * @return the EventGridEvent object itself. + */ + public EventGridEvent setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Get the metadataVersion property: The schema version of the event metadata. + * + * @return the metadataVersion value. + */ + public String getMetadataVersion() { + return this.metadataVersion; + } + + /** + * Get the dataVersion property: The schema version of the data object. + * + * @return the dataVersion value. + */ + public String getDataVersion() { + return this.dataVersion; + } + + /** + * Set the dataVersion property: The schema version of the data object. + * + * @param dataVersion the dataVersion value to set. + * @return the EventGridEvent object itself. + */ + public EventGridEvent setDataVersion(String dataVersion) { + this.dataVersion = dataVersion; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/package-info.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/package-info.java new file mode 100644 index 0000000000000..410ee975b7c86 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing classes for EventGridPublisherClient. EventGrid Publisher Client. */ +package com.azure.messaging.eventgrid.implementation.models; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/package-info.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/package-info.java new file mode 100644 index 0000000000000..91d46530ed7e7 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations and inner classes for EventGridPublisherClient. EventGrid Publisher Client. + */ +package com.azure.messaging.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/package-info.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/package-info.java new file mode 100644 index 0000000000000..934d3116d5cf2 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +/** Package containing the classes for EventGridClient. Azure EventGrid Client. */ +package com.azure.messaging.eventgrid; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppAction.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppAction.java new file mode 100644 index 0000000000000..a49e4e0957567 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppAction.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +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 AppAction. */ +public final class AppAction extends ExpandableStringEnum { + /** Static value Restarted for AppAction. */ + public static final AppAction RESTARTED = fromString("Restarted"); + + /** Static value Stopped for AppAction. */ + public static final AppAction STOPPED = fromString("Stopped"); + + /** Static value ChangedAppSettings for AppAction. */ + public static final AppAction CHANGED_APP_SETTINGS = fromString("ChangedAppSettings"); + + /** Static value Started for AppAction. */ + public static final AppAction STARTED = fromString("Started"); + + /** Static value Completed for AppAction. */ + public static final AppAction COMPLETED = fromString("Completed"); + + /** Static value Failed for AppAction. */ + public static final AppAction FAILED = fromString("Failed"); + + /** + * Creates or finds a AppAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding AppAction. + */ + @JsonCreator + public static AppAction fromString(String name) { + return fromString(name, AppAction.class); + } + + /** @return known AppAction values. */ + public static Collection values() { + return values(AppAction.class); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java new file mode 100644 index 0000000000000..ed9d26bc21b1e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AppConfigurationKeyValueDeletedEventData model. */ +@Fluent +public final class AppConfigurationKeyValueDeletedEventData { + /* + * The key used to identify the key-value that was deleted. + */ + @JsonProperty(value = "key") + private String key; + + /* + * The label, if any, used to identify the key-value that was deleted. + */ + @JsonProperty(value = "label") + private String label; + + /* + * The etag representing the key-value that was deleted. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Get the key property: The key used to identify the key-value that was deleted. + * + * @return the key value. + */ + public String getKey() { + return this.key; + } + + /** + * Set the key property: The key used to identify the key-value that was deleted. + * + * @param key the key value to set. + * @return the AppConfigurationKeyValueDeletedEventData object itself. + */ + public AppConfigurationKeyValueDeletedEventData setKey(String key) { + this.key = key; + return this; + } + + /** + * Get the label property: The label, if any, used to identify the key-value that was deleted. + * + * @return the label value. + */ + public String getLabel() { + return this.label; + } + + /** + * Set the label property: The label, if any, used to identify the key-value that was deleted. + * + * @param label the label value to set. + * @return the AppConfigurationKeyValueDeletedEventData object itself. + */ + public AppConfigurationKeyValueDeletedEventData setLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the etag property: The etag representing the key-value that was deleted. + * + * @return the etag value. + */ + public String getEtag() { + return this.etag; + } + + /** + * Set the etag property: The etag representing the key-value that was deleted. + * + * @param etag the etag value to set. + * @return the AppConfigurationKeyValueDeletedEventData object itself. + */ + public AppConfigurationKeyValueDeletedEventData setEtag(String etag) { + this.etag = etag; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java new file mode 100644 index 0000000000000..6b4d8a3a731f1 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AppConfigurationKeyValueModifiedEventData model. */ +@Fluent +public final class AppConfigurationKeyValueModifiedEventData { + /* + * The key used to identify the key-value that was modified. + */ + @JsonProperty(value = "key") + private String key; + + /* + * The label, if any, used to identify the key-value that was modified. + */ + @JsonProperty(value = "label") + private String label; + + /* + * The etag representing the new state of the key-value. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Get the key property: The key used to identify the key-value that was modified. + * + * @return the key value. + */ + public String getKey() { + return this.key; + } + + /** + * Set the key property: The key used to identify the key-value that was modified. + * + * @param key the key value to set. + * @return the AppConfigurationKeyValueModifiedEventData object itself. + */ + public AppConfigurationKeyValueModifiedEventData setKey(String key) { + this.key = key; + return this; + } + + /** + * Get the label property: The label, if any, used to identify the key-value that was modified. + * + * @return the label value. + */ + public String getLabel() { + return this.label; + } + + /** + * Set the label property: The label, if any, used to identify the key-value that was modified. + * + * @param label the label value to set. + * @return the AppConfigurationKeyValueModifiedEventData object itself. + */ + public AppConfigurationKeyValueModifiedEventData setLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the etag property: The etag representing the new state of the key-value. + * + * @return the etag value. + */ + public String getEtag() { + return this.etag; + } + + /** + * Set the etag property: The etag representing the new state of the key-value. + * + * @param etag the etag value to set. + * @return the AppConfigurationKeyValueModifiedEventData object itself. + */ + public AppConfigurationKeyValueModifiedEventData setEtag(String etag) { + this.etag = etag; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java new file mode 100644 index 0000000000000..037baccf3f6ef --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AppEventTypeDetail model. */ +@Fluent +public final class AppEventTypeDetail { + /* + * Type of action of the operation. + */ + @JsonProperty(value = "action") + private AppAction action; + + /** + * Get the action property: Type of action of the operation. + * + * @return the action value. + */ + public AppAction getAction() { + return this.action; + } + + /** + * Set the action property: Type of action of the operation. + * + * @param action the action value to set. + * @return the AppEventTypeDetail object itself. + */ + public AppEventTypeDetail setAction(AppAction action) { + this.action = action; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanAction.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanAction.java new file mode 100644 index 0000000000000..dc2a1a3b6fd84 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanAction.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +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 AppServicePlanAction. */ +public final class AppServicePlanAction extends ExpandableStringEnum { + /** Static value Updated for AppServicePlanAction. */ + public static final AppServicePlanAction UPDATED = fromString("Updated"); + + /** + * Creates or finds a AppServicePlanAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding AppServicePlanAction. + */ + @JsonCreator + public static AppServicePlanAction fromString(String name) { + return fromString(name, AppServicePlanAction.class); + } + + /** @return known AppServicePlanAction values. */ + public static Collection values() { + return values(AppServicePlanAction.class); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java new file mode 100644 index 0000000000000..c386526ea3ffc --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AppServicePlanEventTypeDetail model. */ +@Fluent +public final class AppServicePlanEventTypeDetail { + /* + * Kind of environment where app service plan is. + */ + @JsonProperty(value = "stampKind") + private StampKind stampKind; + + /* + * Type of action on the app service plan. + */ + @JsonProperty(value = "action") + private AppServicePlanAction action; + + /* + * Asynchronous operation status of the operation on the app service plan. + */ + @JsonProperty(value = "status") + private AsyncStatus status; + + /** + * Get the stampKind property: Kind of environment where app service plan is. + * + * @return the stampKind value. + */ + public StampKind getStampKind() { + return this.stampKind; + } + + /** + * Set the stampKind property: Kind of environment where app service plan is. + * + * @param stampKind the stampKind value to set. + * @return the AppServicePlanEventTypeDetail object itself. + */ + public AppServicePlanEventTypeDetail setStampKind(StampKind stampKind) { + this.stampKind = stampKind; + return this; + } + + /** + * Get the action property: Type of action on the app service plan. + * + * @return the action value. + */ + public AppServicePlanAction getAction() { + return this.action; + } + + /** + * Set the action property: Type of action on the app service plan. + * + * @param action the action value to set. + * @return the AppServicePlanEventTypeDetail object itself. + */ + public AppServicePlanEventTypeDetail setAction(AppServicePlanAction action) { + this.action = action; + return this; + } + + /** + * Get the status property: Asynchronous operation status of the operation on the app service plan. + * + * @return the status value. + */ + public AsyncStatus getStatus() { + return this.status; + } + + /** + * Set the status property: Asynchronous operation status of the operation on the app service plan. + * + * @param status the status value to set. + * @return the AppServicePlanEventTypeDetail object itself. + */ + public AppServicePlanEventTypeDetail setStatus(AsyncStatus status) { + this.status = status; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AsyncStatus.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AsyncStatus.java new file mode 100644 index 0000000000000..ecdf8f5c1025b --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AsyncStatus.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +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 AsyncStatus. */ +public final class AsyncStatus extends ExpandableStringEnum { + /** Static value Started for AsyncStatus. */ + public static final AsyncStatus STARTED = fromString("Started"); + + /** Static value Completed for AsyncStatus. */ + public static final AsyncStatus COMPLETED = fromString("Completed"); + + /** Static value Failed for AsyncStatus. */ + public static final AsyncStatus FAILED = fromString("Failed"); + + /** + * Creates or finds a AsyncStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding AsyncStatus. + */ + @JsonCreator + public static AsyncStatus fromString(String name) { + return fromString(name, AsyncStatus.class); + } + + /** @return known AsyncStatus values. */ + public static Collection values() { + return values(AsyncStatus.class); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java new file mode 100644 index 0000000000000..3435092fdf06a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The ContainerRegistryArtifactEventData model. */ +@Fluent +public class ContainerRegistryArtifactEventData { + /* + * The event ID. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The time at which the event occurred. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * The action that encompasses the provided event. + */ + @JsonProperty(value = "action") + private String action; + + /* + * The target of the event. + */ + @JsonProperty(value = "target") + private ContainerRegistryArtifactEventTarget target; + + /** + * Get the id property: The event ID. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The event ID. + * + * @param id the id value to set. + * @return the ContainerRegistryArtifactEventData object itself. + */ + public ContainerRegistryArtifactEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The time at which the event occurred. + * + * @param timestamp the timestamp value to set. + * @return the ContainerRegistryArtifactEventData object itself. + */ + public ContainerRegistryArtifactEventData setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the action property: The action that encompasses the provided event. + * + * @return the action value. + */ + public String getAction() { + return this.action; + } + + /** + * Set the action property: The action that encompasses the provided event. + * + * @param action the action value to set. + * @return the ContainerRegistryArtifactEventData object itself. + */ + public ContainerRegistryArtifactEventData setAction(String action) { + this.action = action; + return this; + } + + /** + * Get the target property: The target of the event. + * + * @return the target value. + */ + public ContainerRegistryArtifactEventTarget getTarget() { + return this.target; + } + + /** + * Set the target property: The target of the event. + * + * @param target the target value to set. + * @return the ContainerRegistryArtifactEventData object itself. + */ + public ContainerRegistryArtifactEventData setTarget(ContainerRegistryArtifactEventTarget target) { + this.target = target; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java new file mode 100644 index 0000000000000..1eed6d3d5ff49 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerRegistryArtifactEventTarget model. */ +@Fluent +public final class ContainerRegistryArtifactEventTarget { + /* + * The MIME type of the artifact. + */ + @JsonProperty(value = "mediaType") + private String mediaType; + + /* + * The size in bytes of the artifact. + */ + @JsonProperty(value = "size") + private Long size; + + /* + * The digest of the artifact. + */ + @JsonProperty(value = "digest") + private String digest; + + /* + * The repository name of the artifact. + */ + @JsonProperty(value = "repository") + private String repository; + + /* + * The tag of the artifact. + */ + @JsonProperty(value = "tag") + private String tag; + + /* + * The name of the artifact. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The version of the artifact. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Get the mediaType property: The MIME type of the artifact. + * + * @return the mediaType value. + */ + public String getMediaType() { + return this.mediaType; + } + + /** + * Set the mediaType property: The MIME type of the artifact. + * + * @param mediaType the mediaType value to set. + * @return the ContainerRegistryArtifactEventTarget object itself. + */ + public ContainerRegistryArtifactEventTarget setMediaType(String mediaType) { + this.mediaType = mediaType; + return this; + } + + /** + * Get the size property: The size in bytes of the artifact. + * + * @return the size value. + */ + public Long getSize() { + return this.size; + } + + /** + * Set the size property: The size in bytes of the artifact. + * + * @param size the size value to set. + * @return the ContainerRegistryArtifactEventTarget object itself. + */ + public ContainerRegistryArtifactEventTarget setSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the digest property: The digest of the artifact. + * + * @return the digest value. + */ + public String getDigest() { + return this.digest; + } + + /** + * Set the digest property: The digest of the artifact. + * + * @param digest the digest value to set. + * @return the ContainerRegistryArtifactEventTarget object itself. + */ + public ContainerRegistryArtifactEventTarget setDigest(String digest) { + this.digest = digest; + return this; + } + + /** + * Get the repository property: The repository name of the artifact. + * + * @return the repository value. + */ + public String getRepository() { + return this.repository; + } + + /** + * Set the repository property: The repository name of the artifact. + * + * @param repository the repository value to set. + * @return the ContainerRegistryArtifactEventTarget object itself. + */ + public ContainerRegistryArtifactEventTarget setRepository(String repository) { + this.repository = repository; + return this; + } + + /** + * Get the tag property: The tag of the artifact. + * + * @return the tag value. + */ + public String getTag() { + return this.tag; + } + + /** + * Set the tag property: The tag of the artifact. + * + * @param tag the tag value to set. + * @return the ContainerRegistryArtifactEventTarget object itself. + */ + public ContainerRegistryArtifactEventTarget setTag(String tag) { + this.tag = tag; + return this; + } + + /** + * Get the name property: The name of the artifact. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of the artifact. + * + * @param name the name value to set. + * @return the ContainerRegistryArtifactEventTarget object itself. + */ + public ContainerRegistryArtifactEventTarget setName(String name) { + this.name = name; + return this; + } + + /** + * Get the version property: The version of the artifact. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the artifact. + * + * @param version the version value to set. + * @return the ContainerRegistryArtifactEventTarget object itself. + */ + public ContainerRegistryArtifactEventTarget setVersion(String version) { + this.version = version; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java new file mode 100644 index 0000000000000..eed911405ca38 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The ContainerRegistryChartDeletedEventData model. */ +@Immutable +public final class ContainerRegistryChartDeletedEventData extends ContainerRegistryArtifactEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java new file mode 100644 index 0000000000000..d07b195a8be69 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The ContainerRegistryChartPushedEventData model. */ +@Immutable +public final class ContainerRegistryChartPushedEventData extends ContainerRegistryArtifactEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java new file mode 100644 index 0000000000000..9557bca67a46e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerRegistryEventActor model. */ +@Fluent +public final class ContainerRegistryEventActor { + /* + * The subject or username associated with the request context that + * generated the event. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get the name property: The subject or username associated with the request context that generated the event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The subject or username associated with the request context that generated the event. + * + * @param name the name value to set. + * @return the ContainerRegistryEventActor object itself. + */ + public ContainerRegistryEventActor setName(String name) { + this.name = name; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java new file mode 100644 index 0000000000000..77c0c2492debe --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The ContainerRegistryEventData model. */ +@Fluent +public class ContainerRegistryEventData { + /* + * The event ID. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The time at which the event occurred. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * The action that encompasses the provided event. + */ + @JsonProperty(value = "action") + private String action; + + /* + * The target of the event. + */ + @JsonProperty(value = "target") + private ContainerRegistryEventTarget target; + + /* + * The request that generated the event. + */ + @JsonProperty(value = "request") + private ContainerRegistryEventRequest request; + + /* + * The agent that initiated the event. For most situations, this could be + * from the authorization context of the request. + */ + @JsonProperty(value = "actor") + private ContainerRegistryEventActor actor; + + /* + * The registry node that generated the event. Put differently, while the + * actor initiates the event, the source generates it. + */ + @JsonProperty(value = "source") + private ContainerRegistryEventSource source; + + /** + * Get the id property: The event ID. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The event ID. + * + * @param id the id value to set. + * @return the ContainerRegistryEventData object itself. + */ + public ContainerRegistryEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The time at which the event occurred. + * + * @param timestamp the timestamp value to set. + * @return the ContainerRegistryEventData object itself. + */ + public ContainerRegistryEventData setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the action property: The action that encompasses the provided event. + * + * @return the action value. + */ + public String getAction() { + return this.action; + } + + /** + * Set the action property: The action that encompasses the provided event. + * + * @param action the action value to set. + * @return the ContainerRegistryEventData object itself. + */ + public ContainerRegistryEventData setAction(String action) { + this.action = action; + return this; + } + + /** + * Get the target property: The target of the event. + * + * @return the target value. + */ + public ContainerRegistryEventTarget getTarget() { + return this.target; + } + + /** + * Set the target property: The target of the event. + * + * @param target the target value to set. + * @return the ContainerRegistryEventData object itself. + */ + public ContainerRegistryEventData setTarget(ContainerRegistryEventTarget target) { + this.target = target; + return this; + } + + /** + * Get the request property: The request that generated the event. + * + * @return the request value. + */ + public ContainerRegistryEventRequest getRequest() { + return this.request; + } + + /** + * Set the request property: The request that generated the event. + * + * @param request the request value to set. + * @return the ContainerRegistryEventData object itself. + */ + public ContainerRegistryEventData setRequest(ContainerRegistryEventRequest request) { + this.request = request; + return this; + } + + /** + * Get the actor property: The agent that initiated the event. For most situations, this could be from the + * authorization context of the request. + * + * @return the actor value. + */ + public ContainerRegistryEventActor getActor() { + return this.actor; + } + + /** + * Set the actor property: The agent that initiated the event. For most situations, this could be from the + * authorization context of the request. + * + * @param actor the actor value to set. + * @return the ContainerRegistryEventData object itself. + */ + public ContainerRegistryEventData setActor(ContainerRegistryEventActor actor) { + this.actor = actor; + return this; + } + + /** + * Get the source property: The registry node that generated the event. Put differently, while the actor initiates + * the event, the source generates it. + * + * @return the source value. + */ + public ContainerRegistryEventSource getSource() { + return this.source; + } + + /** + * Set the source property: The registry node that generated the event. Put differently, while the actor initiates + * the event, the source generates it. + * + * @param source the source value to set. + * @return the ContainerRegistryEventData object itself. + */ + public ContainerRegistryEventData setSource(ContainerRegistryEventSource source) { + this.source = source; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java new file mode 100644 index 0000000000000..c069dbb096218 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerRegistryEventRequest model. */ +@Fluent +public final class ContainerRegistryEventRequest { + /* + * The ID of the request that initiated the event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The IP or hostname and possibly port of the client connection that + * initiated the event. This is the RemoteAddr from the standard http + * request. + */ + @JsonProperty(value = "addr") + private String addr; + + /* + * The externally accessible hostname of the registry instance, as + * specified by the http host header on incoming requests. + */ + @JsonProperty(value = "host") + private String host; + + /* + * The request method that generated the event. + */ + @JsonProperty(value = "method") + private String method; + + /* + * The user agent header of the request. + */ + @JsonProperty(value = "useragent") + private String useragent; + + /** + * Get the id property: The ID of the request that initiated the event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The ID of the request that initiated the event. + * + * @param id the id value to set. + * @return the ContainerRegistryEventRequest object itself. + */ + public ContainerRegistryEventRequest setId(String id) { + this.id = id; + return this; + } + + /** + * Get the addr property: The IP or hostname and possibly port of the client connection that initiated the event. + * This is the RemoteAddr from the standard http request. + * + * @return the addr value. + */ + public String getAddr() { + return this.addr; + } + + /** + * Set the addr property: The IP or hostname and possibly port of the client connection that initiated the event. + * This is the RemoteAddr from the standard http request. + * + * @param addr the addr value to set. + * @return the ContainerRegistryEventRequest object itself. + */ + public ContainerRegistryEventRequest setAddr(String addr) { + this.addr = addr; + return this; + } + + /** + * Get the host property: The externally accessible hostname of the registry instance, as specified by the http host + * header on incoming requests. + * + * @return the host value. + */ + public String getHost() { + return this.host; + } + + /** + * Set the host property: The externally accessible hostname of the registry instance, as specified by the http host + * header on incoming requests. + * + * @param host the host value to set. + * @return the ContainerRegistryEventRequest object itself. + */ + public ContainerRegistryEventRequest setHost(String host) { + this.host = host; + return this; + } + + /** + * Get the method property: The request method that generated the event. + * + * @return the method value. + */ + public String getMethod() { + return this.method; + } + + /** + * Set the method property: The request method that generated the event. + * + * @param method the method value to set. + * @return the ContainerRegistryEventRequest object itself. + */ + public ContainerRegistryEventRequest setMethod(String method) { + this.method = method; + return this; + } + + /** + * Get the useragent property: The user agent header of the request. + * + * @return the useragent value. + */ + public String getUseragent() { + return this.useragent; + } + + /** + * Set the useragent property: The user agent header of the request. + * + * @param useragent the useragent value to set. + * @return the ContainerRegistryEventRequest object itself. + */ + public ContainerRegistryEventRequest setUseragent(String useragent) { + this.useragent = useragent; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java new file mode 100644 index 0000000000000..7d85649c726bd --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerRegistryEventSource model. */ +@Fluent +public final class ContainerRegistryEventSource { + /* + * The IP or hostname and the port of the registry node that generated the + * event. Generally, this will be resolved by os.Hostname() along with the + * running port. + */ + @JsonProperty(value = "addr") + private String addr; + + /* + * The running instance of an application. Changes after each restart. + */ + @JsonProperty(value = "instanceID") + private String instanceID; + + /** + * Get the addr property: The IP or hostname and the port of the registry node that generated the event. Generally, + * this will be resolved by os.Hostname() along with the running port. + * + * @return the addr value. + */ + public String getAddr() { + return this.addr; + } + + /** + * Set the addr property: The IP or hostname and the port of the registry node that generated the event. Generally, + * this will be resolved by os.Hostname() along with the running port. + * + * @param addr the addr value to set. + * @return the ContainerRegistryEventSource object itself. + */ + public ContainerRegistryEventSource setAddr(String addr) { + this.addr = addr; + return this; + } + + /** + * Get the instanceID property: The running instance of an application. Changes after each restart. + * + * @return the instanceID value. + */ + public String getInstanceID() { + return this.instanceID; + } + + /** + * Set the instanceID property: The running instance of an application. Changes after each restart. + * + * @param instanceID the instanceID value to set. + * @return the ContainerRegistryEventSource object itself. + */ + public ContainerRegistryEventSource setInstanceID(String instanceID) { + this.instanceID = instanceID; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java new file mode 100644 index 0000000000000..aedf436903178 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerRegistryEventTarget model. */ +@Fluent +public final class ContainerRegistryEventTarget { + /* + * The MIME type of the referenced object. + */ + @JsonProperty(value = "mediaType") + private String mediaType; + + /* + * The number of bytes of the content. Same as Length field. + */ + @JsonProperty(value = "size") + private Long size; + + /* + * The digest of the content, as defined by the Registry V2 HTTP API + * Specification. + */ + @JsonProperty(value = "digest") + private String digest; + + /* + * The number of bytes of the content. Same as Size field. + */ + @JsonProperty(value = "length") + private Long length; + + /* + * The repository name. + */ + @JsonProperty(value = "repository") + private String repository; + + /* + * The direct URL to the content. + */ + @JsonProperty(value = "url") + private String url; + + /* + * The tag name. + */ + @JsonProperty(value = "tag") + private String tag; + + /** + * Get the mediaType property: The MIME type of the referenced object. + * + * @return the mediaType value. + */ + public String getMediaType() { + return this.mediaType; + } + + /** + * Set the mediaType property: The MIME type of the referenced object. + * + * @param mediaType the mediaType value to set. + * @return the ContainerRegistryEventTarget object itself. + */ + public ContainerRegistryEventTarget setMediaType(String mediaType) { + this.mediaType = mediaType; + return this; + } + + /** + * Get the size property: The number of bytes of the content. Same as Length field. + * + * @return the size value. + */ + public Long getSize() { + return this.size; + } + + /** + * Set the size property: The number of bytes of the content. Same as Length field. + * + * @param size the size value to set. + * @return the ContainerRegistryEventTarget object itself. + */ + public ContainerRegistryEventTarget setSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the digest property: The digest of the content, as defined by the Registry V2 HTTP API Specification. + * + * @return the digest value. + */ + public String getDigest() { + return this.digest; + } + + /** + * Set the digest property: The digest of the content, as defined by the Registry V2 HTTP API Specification. + * + * @param digest the digest value to set. + * @return the ContainerRegistryEventTarget object itself. + */ + public ContainerRegistryEventTarget setDigest(String digest) { + this.digest = digest; + return this; + } + + /** + * Get the length property: The number of bytes of the content. Same as Size field. + * + * @return the length value. + */ + public Long getLength() { + return this.length; + } + + /** + * Set the length property: The number of bytes of the content. Same as Size field. + * + * @param length the length value to set. + * @return the ContainerRegistryEventTarget object itself. + */ + public ContainerRegistryEventTarget setLength(Long length) { + this.length = length; + return this; + } + + /** + * Get the repository property: The repository name. + * + * @return the repository value. + */ + public String getRepository() { + return this.repository; + } + + /** + * Set the repository property: The repository name. + * + * @param repository the repository value to set. + * @return the ContainerRegistryEventTarget object itself. + */ + public ContainerRegistryEventTarget setRepository(String repository) { + this.repository = repository; + return this; + } + + /** + * Get the url property: The direct URL to the content. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Set the url property: The direct URL to the content. + * + * @param url the url value to set. + * @return the ContainerRegistryEventTarget object itself. + */ + public ContainerRegistryEventTarget setUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the tag property: The tag name. + * + * @return the tag value. + */ + public String getTag() { + return this.tag; + } + + /** + * Set the tag property: The tag name. + * + * @param tag the tag value to set. + * @return the ContainerRegistryEventTarget object itself. + */ + public ContainerRegistryEventTarget setTag(String tag) { + this.tag = tag; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java new file mode 100644 index 0000000000000..0cb7d0034b549 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The ContainerRegistryImageDeletedEventData model. */ +@Immutable +public final class ContainerRegistryImageDeletedEventData extends ContainerRegistryEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java new file mode 100644 index 0000000000000..f5a97572feb82 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The ContainerRegistryImagePushedEventData model. */ +@Immutable +public final class ContainerRegistryImagePushedEventData extends ContainerRegistryEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java new file mode 100644 index 0000000000000..8c5abc0b6896e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeviceConnectionStateEventInfo model. */ +@Fluent +public final class DeviceConnectionStateEventInfo { + /* + * Sequence number is string representation of a hexadecimal number. string + * compare can be used to identify the larger number because both in ASCII + * and HEX numbers come after alphabets. If you are converting the string + * to hex, then the number is a 256 bit number. + */ + @JsonProperty(value = "sequenceNumber") + private String sequenceNumber; + + /** + * Get the sequenceNumber property: Sequence number is string representation of a hexadecimal number. string compare + * can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are + * converting the string to hex, then the number is a 256 bit number. + * + * @return the sequenceNumber value. + */ + public String getSequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence number is string representation of a hexadecimal number. string compare + * can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are + * converting the string to hex, then the number is a 256 bit number. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the DeviceConnectionStateEventInfo object itself. + */ + public DeviceConnectionStateEventInfo setSequenceNumber(String sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java new file mode 100644 index 0000000000000..fff57f4fca192 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeviceConnectionStateEventProperties model. */ +@Fluent +public class DeviceConnectionStateEventProperties { + /* + * The unique identifier of the device. This case-sensitive string can be + * up to 128 characters long, and supports ASCII 7-bit alphanumeric + * characters plus the following special characters: - : . + % _ # * ? + * ! ( ) , = @ ; $ '. + */ + @JsonProperty(value = "deviceId") + private String deviceId; + + /* + * The unique identifier of the module. This case-sensitive string can be + * up to 128 characters long, and supports ASCII 7-bit alphanumeric + * characters plus the following special characters: - : . + % _ # * ? + * ! ( ) , = @ ; $ '. + */ + @JsonProperty(value = "moduleId") + private String moduleId; + + /* + * Name of the IoT Hub where the device was created or deleted. + */ + @JsonProperty(value = "hubName") + private String hubName; + + /* + * Information about the device connection state event. + */ + @JsonProperty(value = "deviceConnectionStateEventInfo") + private DeviceConnectionStateEventInfo deviceConnectionStateEventInfo; + + /** + * Get the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 + * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ &#35; * ? ! ( ) , = @ ; $ '. + * + * @return the deviceId value. + */ + public String getDeviceId() { + return this.deviceId; + } + + /** + * Set the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 + * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ &#35; * ? ! ( ) , = @ ; $ '. + * + * @param deviceId the deviceId value to set. + * @return the DeviceConnectionStateEventProperties object itself. + */ + public DeviceConnectionStateEventProperties setDeviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * Get the moduleId property: The unique identifier of the module. This case-sensitive string can be up to 128 + * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ &#35; * ? ! ( ) , = @ ; $ '. + * + * @return the moduleId value. + */ + public String getModuleId() { + return this.moduleId; + } + + /** + * Set the moduleId property: The unique identifier of the module. This case-sensitive string can be up to 128 + * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ &#35; * ? ! ( ) , = @ ; $ '. + * + * @param moduleId the moduleId value to set. + * @return the DeviceConnectionStateEventProperties object itself. + */ + public DeviceConnectionStateEventProperties setModuleId(String moduleId) { + this.moduleId = moduleId; + return this; + } + + /** + * Get the hubName property: Name of the IoT Hub where the device was created or deleted. + * + * @return the hubName value. + */ + public String getHubName() { + return this.hubName; + } + + /** + * Set the hubName property: Name of the IoT Hub where the device was created or deleted. + * + * @param hubName the hubName value to set. + * @return the DeviceConnectionStateEventProperties object itself. + */ + public DeviceConnectionStateEventProperties setHubName(String hubName) { + this.hubName = hubName; + return this; + } + + /** + * Get the deviceConnectionStateEventInfo property: Information about the device connection state event. + * + * @return the deviceConnectionStateEventInfo value. + */ + public DeviceConnectionStateEventInfo getDeviceConnectionStateEventInfo() { + return this.deviceConnectionStateEventInfo; + } + + /** + * Set the deviceConnectionStateEventInfo property: Information about the device connection state event. + * + * @param deviceConnectionStateEventInfo the deviceConnectionStateEventInfo value to set. + * @return the DeviceConnectionStateEventProperties object itself. + */ + public DeviceConnectionStateEventProperties setDeviceConnectionStateEventInfo( + DeviceConnectionStateEventInfo deviceConnectionStateEventInfo) { + this.deviceConnectionStateEventInfo = deviceConnectionStateEventInfo; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java new file mode 100644 index 0000000000000..c7526763fe9a9 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeviceLifeCycleEventProperties model. */ +@Fluent +public class DeviceLifeCycleEventProperties { + /* + * The unique identifier of the device. This case-sensitive string can be + * up to 128 characters long, and supports ASCII 7-bit alphanumeric + * characters plus the following special characters: - : . + % _ # * ? + * ! ( ) , = @ ; $ '. + */ + @JsonProperty(value = "deviceId") + private String deviceId; + + /* + * Name of the IoT Hub where the device was created or deleted. + */ + @JsonProperty(value = "hubName") + private String hubName; + + /* + * Information about the device twin, which is the cloud representation of + * application device metadata. + */ + @JsonProperty(value = "twin") + private DeviceTwinInfo twin; + + /** + * Get the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 + * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ &#35; * ? ! ( ) , = @ ; $ '. + * + * @return the deviceId value. + */ + public String getDeviceId() { + return this.deviceId; + } + + /** + * Set the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 + * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ &#35; * ? ! ( ) , = @ ; $ '. + * + * @param deviceId the deviceId value to set. + * @return the DeviceLifeCycleEventProperties object itself. + */ + public DeviceLifeCycleEventProperties setDeviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * Get the hubName property: Name of the IoT Hub where the device was created or deleted. + * + * @return the hubName value. + */ + public String getHubName() { + return this.hubName; + } + + /** + * Set the hubName property: Name of the IoT Hub where the device was created or deleted. + * + * @param hubName the hubName value to set. + * @return the DeviceLifeCycleEventProperties object itself. + */ + public DeviceLifeCycleEventProperties setHubName(String hubName) { + this.hubName = hubName; + return this; + } + + /** + * Get the twin property: Information about the device twin, which is the cloud representation of application device + * metadata. + * + * @return the twin value. + */ + public DeviceTwinInfo getTwin() { + return this.twin; + } + + /** + * Set the twin property: Information about the device twin, which is the cloud representation of application device + * metadata. + * + * @param twin the twin value to set. + * @return the DeviceLifeCycleEventProperties object itself. + */ + public DeviceLifeCycleEventProperties setTwin(DeviceTwinInfo twin) { + this.twin = twin; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java new file mode 100644 index 0000000000000..bc7137a8e7e60 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The DeviceTelemetryEventProperties model. */ +@Fluent +public class DeviceTelemetryEventProperties { + /* + * The content of the message from the device. + */ + @JsonProperty(value = "body") + private Object body; + + /* + * Application properties are user-defined strings that can be added to the + * message. These fields are optional. + */ + @JsonProperty(value = "properties") + private Map properties; + + /* + * System properties help identify contents and source of the messages. + */ + @JsonProperty(value = "systemProperties") + private Map systemProperties; + + /** + * Get the body property: The content of the message from the device. + * + * @return the body value. + */ + public Object getBody() { + return this.body; + } + + /** + * Set the body property: The content of the message from the device. + * + * @param body the body value to set. + * @return the DeviceTelemetryEventProperties object itself. + */ + public DeviceTelemetryEventProperties setBody(Object body) { + this.body = body; + return this; + } + + /** + * Get the properties property: Application properties are user-defined strings that can be added to the message. + * These fields are optional. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: Application properties are user-defined strings that can be added to the message. + * These fields are optional. + * + * @param properties the properties value to set. + * @return the DeviceTelemetryEventProperties object itself. + */ + public DeviceTelemetryEventProperties setProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemProperties property: System properties help identify contents and source of the messages. + * + * @return the systemProperties value. + */ + public Map getSystemProperties() { + return this.systemProperties; + } + + /** + * Set the systemProperties property: System properties help identify contents and source of the messages. + * + * @param systemProperties the systemProperties value to set. + * @return the DeviceTelemetryEventProperties object itself. + */ + public DeviceTelemetryEventProperties setSystemProperties(Map systemProperties) { + this.systemProperties = systemProperties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java new file mode 100644 index 0000000000000..98b5697abf7dc --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeviceTwinInfo model. */ +@Fluent +public final class DeviceTwinInfo { + /* + * Authentication type used for this device: either SAS, SelfSigned, or + * CertificateAuthority. + */ + @JsonProperty(value = "authenticationType") + private String authenticationType; + + /* + * Count of cloud to device messages sent to this device. + */ + @JsonProperty(value = "cloudToDeviceMessageCount") + private Float cloudToDeviceMessageCount; + + /* + * Whether the device is connected or disconnected. + */ + @JsonProperty(value = "connectionState") + private String connectionState; + + /* + * The unique identifier of the device twin. + */ + @JsonProperty(value = "deviceId") + private String deviceId; + + /* + * A piece of information that describes the content of the device twin. + * Each etag is guaranteed to be unique per device twin. + */ + @JsonProperty(value = "etag") + private String etag; + + /* + * The ISO8601 timestamp of the last activity. + */ + @JsonProperty(value = "lastActivityTime") + private String lastActivityTime; + + /* + * Properties JSON element. + */ + @JsonProperty(value = "properties") + private DeviceTwinInfoProperties properties; + + /* + * Whether the device twin is enabled or disabled. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The ISO8601 timestamp of the last device twin status update. + */ + @JsonProperty(value = "statusUpdateTime") + private String statusUpdateTime; + + /* + * An integer that is incremented by one each time the device twin is + * updated. + */ + @JsonProperty(value = "version") + private Float version; + + /* + * The thumbprint is a unique value for the x509 certificate, commonly used + * to find a particular certificate in a certificate store. The thumbprint + * is dynamically generated using the SHA1 algorithm, and does not + * physically exist in the certificate. + */ + @JsonProperty(value = "x509Thumbprint") + private DeviceTwinInfoX509Thumbprint x509Thumbprint; + + /** + * Get the authenticationType property: Authentication type used for this device: either SAS, SelfSigned, or + * CertificateAuthority. + * + * @return the authenticationType value. + */ + public String getAuthenticationType() { + return this.authenticationType; + } + + /** + * Set the authenticationType property: Authentication type used for this device: either SAS, SelfSigned, or + * CertificateAuthority. + * + * @param authenticationType the authenticationType value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setAuthenticationType(String authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * Get the cloudToDeviceMessageCount property: Count of cloud to device messages sent to this device. + * + * @return the cloudToDeviceMessageCount value. + */ + public Float getCloudToDeviceMessageCount() { + return this.cloudToDeviceMessageCount; + } + + /** + * Set the cloudToDeviceMessageCount property: Count of cloud to device messages sent to this device. + * + * @param cloudToDeviceMessageCount the cloudToDeviceMessageCount value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setCloudToDeviceMessageCount(Float cloudToDeviceMessageCount) { + this.cloudToDeviceMessageCount = cloudToDeviceMessageCount; + return this; + } + + /** + * Get the connectionState property: Whether the device is connected or disconnected. + * + * @return the connectionState value. + */ + public String getConnectionState() { + return this.connectionState; + } + + /** + * Set the connectionState property: Whether the device is connected or disconnected. + * + * @param connectionState the connectionState value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setConnectionState(String connectionState) { + this.connectionState = connectionState; + return this; + } + + /** + * Get the deviceId property: The unique identifier of the device twin. + * + * @return the deviceId value. + */ + public String getDeviceId() { + return this.deviceId; + } + + /** + * Set the deviceId property: The unique identifier of the device twin. + * + * @param deviceId the deviceId value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setDeviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * Get the etag property: A piece of information that describes the content of the device twin. Each etag is + * guaranteed to be unique per device twin. + * + * @return the etag value. + */ + public String getEtag() { + return this.etag; + } + + /** + * Set the etag property: A piece of information that describes the content of the device twin. Each etag is + * guaranteed to be unique per device twin. + * + * @param etag the etag value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the lastActivityTime property: The ISO8601 timestamp of the last activity. + * + * @return the lastActivityTime value. + */ + public String getLastActivityTime() { + return this.lastActivityTime; + } + + /** + * Set the lastActivityTime property: The ISO8601 timestamp of the last activity. + * + * @param lastActivityTime the lastActivityTime value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setLastActivityTime(String lastActivityTime) { + this.lastActivityTime = lastActivityTime; + return this; + } + + /** + * Get the properties property: Properties JSON element. + * + * @return the properties value. + */ + public DeviceTwinInfoProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties JSON element. + * + * @param properties the properties value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setProperties(DeviceTwinInfoProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the status property: Whether the device twin is enabled or disabled. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Whether the device twin is enabled or disabled. + * + * @param status the status value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the statusUpdateTime property: The ISO8601 timestamp of the last device twin status update. + * + * @return the statusUpdateTime value. + */ + public String getStatusUpdateTime() { + return this.statusUpdateTime; + } + + /** + * Set the statusUpdateTime property: The ISO8601 timestamp of the last device twin status update. + * + * @param statusUpdateTime the statusUpdateTime value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setStatusUpdateTime(String statusUpdateTime) { + this.statusUpdateTime = statusUpdateTime; + return this; + } + + /** + * Get the version property: An integer that is incremented by one each time the device twin is updated. + * + * @return the version value. + */ + public Float getVersion() { + return this.version; + } + + /** + * Set the version property: An integer that is incremented by one each time the device twin is updated. + * + * @param version the version value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setVersion(Float version) { + this.version = version; + return this; + } + + /** + * Get the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to find + * a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 + * algorithm, and does not physically exist in the certificate. + * + * @return the x509Thumbprint value. + */ + public DeviceTwinInfoX509Thumbprint getX509Thumbprint() { + return this.x509Thumbprint; + } + + /** + * Set the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to find + * a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 + * algorithm, and does not physically exist in the certificate. + * + * @param x509Thumbprint the x509Thumbprint value to set. + * @return the DeviceTwinInfo object itself. + */ + public DeviceTwinInfo setX509Thumbprint(DeviceTwinInfoX509Thumbprint x509Thumbprint) { + this.x509Thumbprint = x509Thumbprint; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java new file mode 100644 index 0000000000000..9dfe4d3e0f30c --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeviceTwinInfoProperties model. */ +@Fluent +public final class DeviceTwinInfoProperties { + /* + * A portion of the properties that can be written only by the application + * back-end, and read by the device. + */ + @JsonProperty(value = "desired") + private DeviceTwinProperties desired; + + /* + * A portion of the properties that can be written only by the device, and + * read by the application back-end. + */ + @JsonProperty(value = "reported") + private DeviceTwinProperties reported; + + /** + * Get the desired property: A portion of the properties that can be written only by the application back-end, and + * read by the device. + * + * @return the desired value. + */ + public DeviceTwinProperties getDesired() { + return this.desired; + } + + /** + * Set the desired property: A portion of the properties that can be written only by the application back-end, and + * read by the device. + * + * @param desired the desired value to set. + * @return the DeviceTwinInfoProperties object itself. + */ + public DeviceTwinInfoProperties setDesired(DeviceTwinProperties desired) { + this.desired = desired; + return this; + } + + /** + * Get the reported property: A portion of the properties that can be written only by the device, and read by the + * application back-end. + * + * @return the reported value. + */ + public DeviceTwinProperties getReported() { + return this.reported; + } + + /** + * Set the reported property: A portion of the properties that can be written only by the device, and read by the + * application back-end. + * + * @param reported the reported value to set. + * @return the DeviceTwinInfoProperties object itself. + */ + public DeviceTwinInfoProperties setReported(DeviceTwinProperties reported) { + this.reported = reported; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java new file mode 100644 index 0000000000000..414f8de2783f6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeviceTwinInfoX509Thumbprint model. */ +@Fluent +public final class DeviceTwinInfoX509Thumbprint { + /* + * Primary thumbprint for the x509 certificate. + */ + @JsonProperty(value = "primaryThumbprint") + private String primaryThumbprint; + + /* + * Secondary thumbprint for the x509 certificate. + */ + @JsonProperty(value = "secondaryThumbprint") + private String secondaryThumbprint; + + /** + * Get the primaryThumbprint property: Primary thumbprint for the x509 certificate. + * + * @return the primaryThumbprint value. + */ + public String getPrimaryThumbprint() { + return this.primaryThumbprint; + } + + /** + * Set the primaryThumbprint property: Primary thumbprint for the x509 certificate. + * + * @param primaryThumbprint the primaryThumbprint value to set. + * @return the DeviceTwinInfoX509Thumbprint object itself. + */ + public DeviceTwinInfoX509Thumbprint setPrimaryThumbprint(String primaryThumbprint) { + this.primaryThumbprint = primaryThumbprint; + return this; + } + + /** + * Get the secondaryThumbprint property: Secondary thumbprint for the x509 certificate. + * + * @return the secondaryThumbprint value. + */ + public String getSecondaryThumbprint() { + return this.secondaryThumbprint; + } + + /** + * Set the secondaryThumbprint property: Secondary thumbprint for the x509 certificate. + * + * @param secondaryThumbprint the secondaryThumbprint value to set. + * @return the DeviceTwinInfoX509Thumbprint object itself. + */ + public DeviceTwinInfoX509Thumbprint setSecondaryThumbprint(String secondaryThumbprint) { + this.secondaryThumbprint = secondaryThumbprint; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java new file mode 100644 index 0000000000000..4be2b51c25170 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeviceTwinMetadata model. */ +@Fluent +public final class DeviceTwinMetadata { + /* + * The ISO8601 timestamp of the last time the properties were updated. + */ + @JsonProperty(value = "lastUpdated") + private String lastUpdated; + + /** + * Get the lastUpdated property: The ISO8601 timestamp of the last time the properties were updated. + * + * @return the lastUpdated value. + */ + public String getLastUpdated() { + return this.lastUpdated; + } + + /** + * Set the lastUpdated property: The ISO8601 timestamp of the last time the properties were updated. + * + * @param lastUpdated the lastUpdated value to set. + * @return the DeviceTwinMetadata object itself. + */ + public DeviceTwinMetadata setLastUpdated(String lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java new file mode 100644 index 0000000000000..eb30161c51a77 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeviceTwinProperties model. */ +@Fluent +public final class DeviceTwinProperties { + /* + * Metadata information for the properties JSON document. + */ + @JsonProperty(value = "metadata") + private DeviceTwinMetadata metadata; + + /* + * Version of device twin properties. + */ + @JsonProperty(value = "version") + private Float version; + + /** + * Get the metadata property: Metadata information for the properties JSON document. + * + * @return the metadata value. + */ + public DeviceTwinMetadata getMetadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata information for the properties JSON document. + * + * @param metadata the metadata value to set. + * @return the DeviceTwinProperties object itself. + */ + public DeviceTwinProperties setMetadata(DeviceTwinMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the version property: Version of device twin properties. + * + * @return the version value. + */ + public Float getVersion() { + return this.version; + } + + /** + * Set the version property: Version of device twin properties. + * + * @param version the version value to set. + * @return the DeviceTwinProperties object itself. + */ + public DeviceTwinProperties setVersion(Float version) { + this.version = version; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java new file mode 100644 index 0000000000000..73078586a523b --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The EventHubCaptureFileCreatedEventData model. */ +@Fluent +public final class EventHubCaptureFileCreatedEventData { + /* + * The path to the capture file. + */ + @JsonProperty(value = "fileurl") + private String fileurl; + + /* + * The file type of the capture file. + */ + @JsonProperty(value = "fileType") + private String fileType; + + /* + * The shard ID. + */ + @JsonProperty(value = "partitionId") + private String partitionId; + + /* + * The file size. + */ + @JsonProperty(value = "sizeInBytes") + private Integer sizeInBytes; + + /* + * The number of events in the file. + */ + @JsonProperty(value = "eventCount") + private Integer eventCount; + + /* + * The smallest sequence number from the queue. + */ + @JsonProperty(value = "firstSequenceNumber") + private Integer firstSequenceNumber; + + /* + * The last sequence number from the queue. + */ + @JsonProperty(value = "lastSequenceNumber") + private Integer lastSequenceNumber; + + /* + * The first time from the queue. + */ + @JsonProperty(value = "firstEnqueueTime") + private OffsetDateTime firstEnqueueTime; + + /* + * The last time from the queue. + */ + @JsonProperty(value = "lastEnqueueTime") + private OffsetDateTime lastEnqueueTime; + + /** + * Get the fileurl property: The path to the capture file. + * + * @return the fileurl value. + */ + public String getFileurl() { + return this.fileurl; + } + + /** + * Set the fileurl property: The path to the capture file. + * + * @param fileurl the fileurl value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setFileurl(String fileurl) { + this.fileurl = fileurl; + return this; + } + + /** + * Get the fileType property: The file type of the capture file. + * + * @return the fileType value. + */ + public String getFileType() { + return this.fileType; + } + + /** + * Set the fileType property: The file type of the capture file. + * + * @param fileType the fileType value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setFileType(String fileType) { + this.fileType = fileType; + return this; + } + + /** + * Get the partitionId property: The shard ID. + * + * @return the partitionId value. + */ + public String getPartitionId() { + return this.partitionId; + } + + /** + * Set the partitionId property: The shard ID. + * + * @param partitionId the partitionId value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setPartitionId(String partitionId) { + this.partitionId = partitionId; + return this; + } + + /** + * Get the sizeInBytes property: The file size. + * + * @return the sizeInBytes value. + */ + public Integer getSizeInBytes() { + return this.sizeInBytes; + } + + /** + * Set the sizeInBytes property: The file size. + * + * @param sizeInBytes the sizeInBytes value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setSizeInBytes(Integer sizeInBytes) { + this.sizeInBytes = sizeInBytes; + return this; + } + + /** + * Get the eventCount property: The number of events in the file. + * + * @return the eventCount value. + */ + public Integer getEventCount() { + return this.eventCount; + } + + /** + * Set the eventCount property: The number of events in the file. + * + * @param eventCount the eventCount value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setEventCount(Integer eventCount) { + this.eventCount = eventCount; + return this; + } + + /** + * Get the firstSequenceNumber property: The smallest sequence number from the queue. + * + * @return the firstSequenceNumber value. + */ + public Integer getFirstSequenceNumber() { + return this.firstSequenceNumber; + } + + /** + * Set the firstSequenceNumber property: The smallest sequence number from the queue. + * + * @param firstSequenceNumber the firstSequenceNumber value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setFirstSequenceNumber(Integer firstSequenceNumber) { + this.firstSequenceNumber = firstSequenceNumber; + return this; + } + + /** + * Get the lastSequenceNumber property: The last sequence number from the queue. + * + * @return the lastSequenceNumber value. + */ + public Integer getLastSequenceNumber() { + return this.lastSequenceNumber; + } + + /** + * Set the lastSequenceNumber property: The last sequence number from the queue. + * + * @param lastSequenceNumber the lastSequenceNumber value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setLastSequenceNumber(Integer lastSequenceNumber) { + this.lastSequenceNumber = lastSequenceNumber; + return this; + } + + /** + * Get the firstEnqueueTime property: The first time from the queue. + * + * @return the firstEnqueueTime value. + */ + public OffsetDateTime getFirstEnqueueTime() { + return this.firstEnqueueTime; + } + + /** + * Set the firstEnqueueTime property: The first time from the queue. + * + * @param firstEnqueueTime the firstEnqueueTime value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setFirstEnqueueTime(OffsetDateTime firstEnqueueTime) { + this.firstEnqueueTime = firstEnqueueTime; + return this; + } + + /** + * Get the lastEnqueueTime property: The last time from the queue. + * + * @return the lastEnqueueTime value. + */ + public OffsetDateTime getLastEnqueueTime() { + return this.lastEnqueueTime; + } + + /** + * Set the lastEnqueueTime property: The last time from the queue. + * + * @param lastEnqueueTime the lastEnqueueTime value to set. + * @return the EventHubCaptureFileCreatedEventData object itself. + */ + public EventHubCaptureFileCreatedEventData setLastEnqueueTime(OffsetDateTime lastEnqueueTime) { + this.lastEnqueueTime = lastEnqueueTime; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java new file mode 100644 index 0000000000000..5a3ca2af659b0 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The IotHubDeviceConnectedEventData model. */ +@Immutable +public final class IotHubDeviceConnectedEventData extends DeviceConnectionStateEventProperties {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java new file mode 100644 index 0000000000000..181b9b6aef5e7 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The IotHubDeviceCreatedEventData model. */ +@Immutable +public final class IotHubDeviceCreatedEventData extends DeviceLifeCycleEventProperties {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java new file mode 100644 index 0000000000000..e6f8a0be6d274 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The IotHubDeviceDeletedEventData model. */ +@Immutable +public final class IotHubDeviceDeletedEventData extends DeviceLifeCycleEventProperties {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java new file mode 100644 index 0000000000000..afc027f410df4 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The IotHubDeviceDisconnectedEventData model. */ +@Immutable +public final class IotHubDeviceDisconnectedEventData extends DeviceConnectionStateEventProperties {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java new file mode 100644 index 0000000000000..99ed284c3a3a2 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The IotHubDeviceTelemetryEventData model. */ +@Immutable +public final class IotHubDeviceTelemetryEventData extends DeviceTelemetryEventProperties {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java new file mode 100644 index 0000000000000..e48f92e968a90 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultCertificateExpiredEventData model. */ +@Fluent +public final class KeyVaultCertificateExpiredEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultCertificateExpiredEventData object itself. + */ + public KeyVaultCertificateExpiredEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultCertificateExpiredEventData object itself. + */ + public KeyVaultCertificateExpiredEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultCertificateExpiredEventData object itself. + */ + public KeyVaultCertificateExpiredEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultCertificateExpiredEventData object itself. + */ + public KeyVaultCertificateExpiredEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultCertificateExpiredEventData object itself. + */ + public KeyVaultCertificateExpiredEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultCertificateExpiredEventData object itself. + */ + public KeyVaultCertificateExpiredEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultCertificateExpiredEventData object itself. + */ + public KeyVaultCertificateExpiredEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java new file mode 100644 index 0000000000000..85163bf47d631 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultCertificateNearExpiryEventData model. */ +@Fluent +public final class KeyVaultCertificateNearExpiryEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultCertificateNearExpiryEventData object itself. + */ + public KeyVaultCertificateNearExpiryEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultCertificateNearExpiryEventData object itself. + */ + public KeyVaultCertificateNearExpiryEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultCertificateNearExpiryEventData object itself. + */ + public KeyVaultCertificateNearExpiryEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultCertificateNearExpiryEventData object itself. + */ + public KeyVaultCertificateNearExpiryEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultCertificateNearExpiryEventData object itself. + */ + public KeyVaultCertificateNearExpiryEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultCertificateNearExpiryEventData object itself. + */ + public KeyVaultCertificateNearExpiryEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultCertificateNearExpiryEventData object itself. + */ + public KeyVaultCertificateNearExpiryEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java new file mode 100644 index 0000000000000..30aa6a81c89ce --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultCertificateNewVersionCreatedEventData model. */ +@Fluent +public final class KeyVaultCertificateNewVersionCreatedEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultCertificateNewVersionCreatedEventData object itself. + */ + public KeyVaultCertificateNewVersionCreatedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultCertificateNewVersionCreatedEventData object itself. + */ + public KeyVaultCertificateNewVersionCreatedEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultCertificateNewVersionCreatedEventData object itself. + */ + public KeyVaultCertificateNewVersionCreatedEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultCertificateNewVersionCreatedEventData object itself. + */ + public KeyVaultCertificateNewVersionCreatedEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultCertificateNewVersionCreatedEventData object itself. + */ + public KeyVaultCertificateNewVersionCreatedEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultCertificateNewVersionCreatedEventData object itself. + */ + public KeyVaultCertificateNewVersionCreatedEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultCertificateNewVersionCreatedEventData object itself. + */ + public KeyVaultCertificateNewVersionCreatedEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java new file mode 100644 index 0000000000000..3f3ed1c626dc3 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultKeyExpiredEventData model. */ +@Fluent +public final class KeyVaultKeyExpiredEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultKeyExpiredEventData object itself. + */ + public KeyVaultKeyExpiredEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultKeyExpiredEventData object itself. + */ + public KeyVaultKeyExpiredEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultKeyExpiredEventData object itself. + */ + public KeyVaultKeyExpiredEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultKeyExpiredEventData object itself. + */ + public KeyVaultKeyExpiredEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultKeyExpiredEventData object itself. + */ + public KeyVaultKeyExpiredEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultKeyExpiredEventData object itself. + */ + public KeyVaultKeyExpiredEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultKeyExpiredEventData object itself. + */ + public KeyVaultKeyExpiredEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java new file mode 100644 index 0000000000000..780d8d74e5154 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultKeyNearExpiryEventData model. */ +@Fluent +public final class KeyVaultKeyNearExpiryEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultKeyNearExpiryEventData object itself. + */ + public KeyVaultKeyNearExpiryEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultKeyNearExpiryEventData object itself. + */ + public KeyVaultKeyNearExpiryEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultKeyNearExpiryEventData object itself. + */ + public KeyVaultKeyNearExpiryEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultKeyNearExpiryEventData object itself. + */ + public KeyVaultKeyNearExpiryEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultKeyNearExpiryEventData object itself. + */ + public KeyVaultKeyNearExpiryEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultKeyNearExpiryEventData object itself. + */ + public KeyVaultKeyNearExpiryEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultKeyNearExpiryEventData object itself. + */ + public KeyVaultKeyNearExpiryEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java new file mode 100644 index 0000000000000..0cbd749f1e598 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultKeyNewVersionCreatedEventData model. */ +@Fluent +public final class KeyVaultKeyNewVersionCreatedEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultKeyNewVersionCreatedEventData object itself. + */ + public KeyVaultKeyNewVersionCreatedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultKeyNewVersionCreatedEventData object itself. + */ + public KeyVaultKeyNewVersionCreatedEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultKeyNewVersionCreatedEventData object itself. + */ + public KeyVaultKeyNewVersionCreatedEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultKeyNewVersionCreatedEventData object itself. + */ + public KeyVaultKeyNewVersionCreatedEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultKeyNewVersionCreatedEventData object itself. + */ + public KeyVaultKeyNewVersionCreatedEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultKeyNewVersionCreatedEventData object itself. + */ + public KeyVaultKeyNewVersionCreatedEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultKeyNewVersionCreatedEventData object itself. + */ + public KeyVaultKeyNewVersionCreatedEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java new file mode 100644 index 0000000000000..415492cec3c3e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultSecretExpiredEventData model. */ +@Fluent +public final class KeyVaultSecretExpiredEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultSecretExpiredEventData object itself. + */ + public KeyVaultSecretExpiredEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultSecretExpiredEventData object itself. + */ + public KeyVaultSecretExpiredEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultSecretExpiredEventData object itself. + */ + public KeyVaultSecretExpiredEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultSecretExpiredEventData object itself. + */ + public KeyVaultSecretExpiredEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultSecretExpiredEventData object itself. + */ + public KeyVaultSecretExpiredEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultSecretExpiredEventData object itself. + */ + public KeyVaultSecretExpiredEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultSecretExpiredEventData object itself. + */ + public KeyVaultSecretExpiredEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java new file mode 100644 index 0000000000000..4ac2015aca346 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultSecretNearExpiryEventData model. */ +@Fluent +public final class KeyVaultSecretNearExpiryEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultSecretNearExpiryEventData object itself. + */ + public KeyVaultSecretNearExpiryEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultSecretNearExpiryEventData object itself. + */ + public KeyVaultSecretNearExpiryEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultSecretNearExpiryEventData object itself. + */ + public KeyVaultSecretNearExpiryEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultSecretNearExpiryEventData object itself. + */ + public KeyVaultSecretNearExpiryEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultSecretNearExpiryEventData object itself. + */ + public KeyVaultSecretNearExpiryEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultSecretNearExpiryEventData object itself. + */ + public KeyVaultSecretNearExpiryEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultSecretNearExpiryEventData object itself. + */ + public KeyVaultSecretNearExpiryEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java new file mode 100644 index 0000000000000..922c80ed95129 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultSecretNewVersionCreatedEventData model. */ +@Fluent +public final class KeyVaultSecretNewVersionCreatedEventData { + /* + * The id of the object that triggered this event. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Key vault name of the object that triggered this event. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The type of the object that triggered this event + */ + @JsonProperty(value = "objectType") + private String objectType; + + /* + * The name of the object that triggered this event + */ + @JsonProperty(value = "objectName") + private String objectName; + + /* + * The version of the object that triggered this event + */ + @JsonProperty(value = "version") + private String version; + + /* + * Not before date of the object that triggered this event + */ + @JsonProperty(value = "nbf") + private Float nbf; + + /* + * The expiration date of the object that triggered this event + */ + @JsonProperty(value = "exp") + private Float exp; + + /** + * Get the id property: The id of the object that triggered this event. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the object that triggered this event. + * + * @param id the id value to set. + * @return the KeyVaultSecretNewVersionCreatedEventData object itself. + */ + public KeyVaultSecretNewVersionCreatedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the vaultName property: Key vault name of the object that triggered this event. + * + * @return the vaultName value. + */ + public String getVaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: Key vault name of the object that triggered this event. + * + * @param vaultName the vaultName value to set. + * @return the KeyVaultSecretNewVersionCreatedEventData object itself. + */ + public KeyVaultSecretNewVersionCreatedEventData setVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the objectType property: The type of the object that triggered this event. + * + * @return the objectType value. + */ + public String getObjectType() { + return this.objectType; + } + + /** + * Set the objectType property: The type of the object that triggered this event. + * + * @param objectType the objectType value to set. + * @return the KeyVaultSecretNewVersionCreatedEventData object itself. + */ + public KeyVaultSecretNewVersionCreatedEventData setObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the objectName property: The name of the object that triggered this event. + * + * @return the objectName value. + */ + public String getObjectName() { + return this.objectName; + } + + /** + * Set the objectName property: The name of the object that triggered this event. + * + * @param objectName the objectName value to set. + * @return the KeyVaultSecretNewVersionCreatedEventData object itself. + */ + public KeyVaultSecretNewVersionCreatedEventData setObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get the version property: The version of the object that triggered this event. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of the object that triggered this event. + * + * @param version the version value to set. + * @return the KeyVaultSecretNewVersionCreatedEventData object itself. + */ + public KeyVaultSecretNewVersionCreatedEventData setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the nbf property: Not before date of the object that triggered this event. + * + * @return the nbf value. + */ + public Float getNbf() { + return this.nbf; + } + + /** + * Set the nbf property: Not before date of the object that triggered this event. + * + * @param nbf the nbf value to set. + * @return the KeyVaultSecretNewVersionCreatedEventData object itself. + */ + public KeyVaultSecretNewVersionCreatedEventData setNbf(Float nbf) { + this.nbf = nbf; + return this; + } + + /** + * Get the exp property: The expiration date of the object that triggered this event. + * + * @return the exp value. + */ + public Float getExp() { + return this.exp; + } + + /** + * Set the exp property: The expiration date of the object that triggered this event. + * + * @param exp the exp value to set. + * @return the KeyVaultSecretNewVersionCreatedEventData object itself. + */ + public KeyVaultSecretNewVersionCreatedEventData setExp(Float exp) { + this.exp = exp; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java new file mode 100644 index 0000000000000..21a4e70169876 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The MachineLearningServicesDatasetDriftDetectedEventData model. */ +@Fluent +public final class MachineLearningServicesDatasetDriftDetectedEventData { + /* + * The ID of the data drift monitor that triggered the event. + */ + @JsonProperty(value = "dataDriftId") + private String dataDriftId; + + /* + * The name of the data drift monitor that triggered the event. + */ + @JsonProperty(value = "dataDriftName") + private String dataDriftName; + + /* + * The ID of the Run that detected data drift. + */ + @JsonProperty(value = "runId") + private String runId; + + /* + * The ID of the base Dataset used to detect drift. + */ + @JsonProperty(value = "baseDatasetId") + private String baseDatasetId; + + /* + * The ID of the target Dataset used to detect drift. + */ + @JsonProperty(value = "targetDatasetId") + private String targetDatasetId; + + /* + * The coefficient result that triggered the event. + */ + @JsonProperty(value = "driftCoefficient") + private Double driftCoefficient; + + /* + * The start time of the target dataset time series that resulted in drift + * detection. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * The end time of the target dataset time series that resulted in drift + * detection. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /** + * Get the dataDriftId property: The ID of the data drift monitor that triggered the event. + * + * @return the dataDriftId value. + */ + public String getDataDriftId() { + return this.dataDriftId; + } + + /** + * Set the dataDriftId property: The ID of the data drift monitor that triggered the event. + * + * @param dataDriftId the dataDriftId value to set. + * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. + */ + public MachineLearningServicesDatasetDriftDetectedEventData setDataDriftId(String dataDriftId) { + this.dataDriftId = dataDriftId; + return this; + } + + /** + * Get the dataDriftName property: The name of the data drift monitor that triggered the event. + * + * @return the dataDriftName value. + */ + public String getDataDriftName() { + return this.dataDriftName; + } + + /** + * Set the dataDriftName property: The name of the data drift monitor that triggered the event. + * + * @param dataDriftName the dataDriftName value to set. + * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. + */ + public MachineLearningServicesDatasetDriftDetectedEventData setDataDriftName(String dataDriftName) { + this.dataDriftName = dataDriftName; + return this; + } + + /** + * Get the runId property: The ID of the Run that detected data drift. + * + * @return the runId value. + */ + public String getRunId() { + return this.runId; + } + + /** + * Set the runId property: The ID of the Run that detected data drift. + * + * @param runId the runId value to set. + * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. + */ + public MachineLearningServicesDatasetDriftDetectedEventData setRunId(String runId) { + this.runId = runId; + return this; + } + + /** + * Get the baseDatasetId property: The ID of the base Dataset used to detect drift. + * + * @return the baseDatasetId value. + */ + public String getBaseDatasetId() { + return this.baseDatasetId; + } + + /** + * Set the baseDatasetId property: The ID of the base Dataset used to detect drift. + * + * @param baseDatasetId the baseDatasetId value to set. + * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. + */ + public MachineLearningServicesDatasetDriftDetectedEventData setBaseDatasetId(String baseDatasetId) { + this.baseDatasetId = baseDatasetId; + return this; + } + + /** + * Get the targetDatasetId property: The ID of the target Dataset used to detect drift. + * + * @return the targetDatasetId value. + */ + public String getTargetDatasetId() { + return this.targetDatasetId; + } + + /** + * Set the targetDatasetId property: The ID of the target Dataset used to detect drift. + * + * @param targetDatasetId the targetDatasetId value to set. + * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. + */ + public MachineLearningServicesDatasetDriftDetectedEventData setTargetDatasetId(String targetDatasetId) { + this.targetDatasetId = targetDatasetId; + return this; + } + + /** + * Get the driftCoefficient property: The coefficient result that triggered the event. + * + * @return the driftCoefficient value. + */ + public Double getDriftCoefficient() { + return this.driftCoefficient; + } + + /** + * Set the driftCoefficient property: The coefficient result that triggered the event. + * + * @param driftCoefficient the driftCoefficient value to set. + * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. + */ + public MachineLearningServicesDatasetDriftDetectedEventData setDriftCoefficient(Double driftCoefficient) { + this.driftCoefficient = driftCoefficient; + return this; + } + + /** + * Get the startTime property: The start time of the target dataset time series that resulted in drift detection. + * + * @return the startTime value. + */ + public OffsetDateTime getStartTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the target dataset time series that resulted in drift detection. + * + * @param startTime the startTime value to set. + * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. + */ + public MachineLearningServicesDatasetDriftDetectedEventData setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the target dataset time series that resulted in drift detection. + * + * @return the endTime value. + */ + public OffsetDateTime getEndTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the target dataset time series that resulted in drift detection. + * + * @param endTime the endTime value to set. + * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. + */ + public MachineLearningServicesDatasetDriftDetectedEventData setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java new file mode 100644 index 0000000000000..594ac9d23b302 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MachineLearningServicesModelDeployedEventData model. */ +@Fluent +public final class MachineLearningServicesModelDeployedEventData { + /* + * The name of the deployed service. + */ + @JsonProperty(value = "serviceName") + private String serviceName; + + /* + * The compute type (e.g. ACI, AKS) of the deployed service. + */ + @JsonProperty(value = "serviceComputeType") + private String serviceComputeType; + + /* + * A common separated list of model IDs. The IDs of the models deployed in + * the service. + */ + @JsonProperty(value = "modelIds") + private String modelIds; + + /* + * The tags of the deployed service. + */ + @JsonProperty(value = "serviceTags") + private Object serviceTags; + + /* + * The properties of the deployed service. + */ + @JsonProperty(value = "serviceProperties") + private Object serviceProperties; + + /** + * Get the serviceName property: The name of the deployed service. + * + * @return the serviceName value. + */ + public String getServiceName() { + return this.serviceName; + } + + /** + * Set the serviceName property: The name of the deployed service. + * + * @param serviceName the serviceName value to set. + * @return the MachineLearningServicesModelDeployedEventData object itself. + */ + public MachineLearningServicesModelDeployedEventData setServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the serviceComputeType property: The compute type (e.g. ACI, AKS) of the deployed service. + * + * @return the serviceComputeType value. + */ + public String getServiceComputeType() { + return this.serviceComputeType; + } + + /** + * Set the serviceComputeType property: The compute type (e.g. ACI, AKS) of the deployed service. + * + * @param serviceComputeType the serviceComputeType value to set. + * @return the MachineLearningServicesModelDeployedEventData object itself. + */ + public MachineLearningServicesModelDeployedEventData setServiceComputeType(String serviceComputeType) { + this.serviceComputeType = serviceComputeType; + return this; + } + + /** + * Get the modelIds property: A common separated list of model IDs. The IDs of the models deployed in the service. + * + * @return the modelIds value. + */ + public String getModelIds() { + return this.modelIds; + } + + /** + * Set the modelIds property: A common separated list of model IDs. The IDs of the models deployed in the service. + * + * @param modelIds the modelIds value to set. + * @return the MachineLearningServicesModelDeployedEventData object itself. + */ + public MachineLearningServicesModelDeployedEventData setModelIds(String modelIds) { + this.modelIds = modelIds; + return this; + } + + /** + * Get the serviceTags property: The tags of the deployed service. + * + * @return the serviceTags value. + */ + public Object getServiceTags() { + return this.serviceTags; + } + + /** + * Set the serviceTags property: The tags of the deployed service. + * + * @param serviceTags the serviceTags value to set. + * @return the MachineLearningServicesModelDeployedEventData object itself. + */ + public MachineLearningServicesModelDeployedEventData setServiceTags(Object serviceTags) { + this.serviceTags = serviceTags; + return this; + } + + /** + * Get the serviceProperties property: The properties of the deployed service. + * + * @return the serviceProperties value. + */ + public Object getServiceProperties() { + return this.serviceProperties; + } + + /** + * Set the serviceProperties property: The properties of the deployed service. + * + * @param serviceProperties the serviceProperties value to set. + * @return the MachineLearningServicesModelDeployedEventData object itself. + */ + public MachineLearningServicesModelDeployedEventData setServiceProperties(Object serviceProperties) { + this.serviceProperties = serviceProperties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java new file mode 100644 index 0000000000000..2519ae1d95243 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MachineLearningServicesModelRegisteredEventData model. */ +@Fluent +public final class MachineLearningServicesModelRegisteredEventData { + /* + * The name of the model that was registered. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * The version of the model that was registered. + */ + @JsonProperty(value = "modelVersion") + private String modelVersion; + + /* + * The tags of the model that was registered. + */ + @JsonProperty(value = "modelTags") + private Object modelTags; + + /* + * The properties of the model that was registered. + */ + @JsonProperty(value = "modelProperties") + private Object modelProperties; + + /** + * Get the modelName property: The name of the model that was registered. + * + * @return the modelName value. + */ + public String getModelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model that was registered. + * + * @param modelName the modelName value to set. + * @return the MachineLearningServicesModelRegisteredEventData object itself. + */ + public MachineLearningServicesModelRegisteredEventData setModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the modelVersion property: The version of the model that was registered. + * + * @return the modelVersion value. + */ + public String getModelVersion() { + return this.modelVersion; + } + + /** + * Set the modelVersion property: The version of the model that was registered. + * + * @param modelVersion the modelVersion value to set. + * @return the MachineLearningServicesModelRegisteredEventData object itself. + */ + public MachineLearningServicesModelRegisteredEventData setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + return this; + } + + /** + * Get the modelTags property: The tags of the model that was registered. + * + * @return the modelTags value. + */ + public Object getModelTags() { + return this.modelTags; + } + + /** + * Set the modelTags property: The tags of the model that was registered. + * + * @param modelTags the modelTags value to set. + * @return the MachineLearningServicesModelRegisteredEventData object itself. + */ + public MachineLearningServicesModelRegisteredEventData setModelTags(Object modelTags) { + this.modelTags = modelTags; + return this; + } + + /** + * Get the modelProperties property: The properties of the model that was registered. + * + * @return the modelProperties value. + */ + public Object getModelProperties() { + return this.modelProperties; + } + + /** + * Set the modelProperties property: The properties of the model that was registered. + * + * @param modelProperties the modelProperties value to set. + * @return the MachineLearningServicesModelRegisteredEventData object itself. + */ + public MachineLearningServicesModelRegisteredEventData setModelProperties(Object modelProperties) { + this.modelProperties = modelProperties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java new file mode 100644 index 0000000000000..923719c57f355 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MachineLearningServicesRunCompletedEventData model. */ +@Fluent +public final class MachineLearningServicesRunCompletedEventData { + /* + * The ID of the experiment that the run belongs to. + */ + @JsonProperty(value = "experimentId") + private String experimentId; + + /* + * The name of the experiment that the run belongs to. + */ + @JsonProperty(value = "experimentName") + private String experimentName; + + /* + * The ID of the Run that was completed. + */ + @JsonProperty(value = "runId") + private String runId; + + /* + * The Run Type of the completed Run. + */ + @JsonProperty(value = "runType") + private String runType; + + /* + * The tags of the completed Run. + */ + @JsonProperty(value = "runTags") + private Object runTags; + + /* + * The properties of the completed Run. + */ + @JsonProperty(value = "runProperties") + private Object runProperties; + + /** + * Get the experimentId property: The ID of the experiment that the run belongs to. + * + * @return the experimentId value. + */ + public String getExperimentId() { + return this.experimentId; + } + + /** + * Set the experimentId property: The ID of the experiment that the run belongs to. + * + * @param experimentId the experimentId value to set. + * @return the MachineLearningServicesRunCompletedEventData object itself. + */ + public MachineLearningServicesRunCompletedEventData setExperimentId(String experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get the experimentName property: The name of the experiment that the run belongs to. + * + * @return the experimentName value. + */ + public String getExperimentName() { + return this.experimentName; + } + + /** + * Set the experimentName property: The name of the experiment that the run belongs to. + * + * @param experimentName the experimentName value to set. + * @return the MachineLearningServicesRunCompletedEventData object itself. + */ + public MachineLearningServicesRunCompletedEventData setExperimentName(String experimentName) { + this.experimentName = experimentName; + return this; + } + + /** + * Get the runId property: The ID of the Run that was completed. + * + * @return the runId value. + */ + public String getRunId() { + return this.runId; + } + + /** + * Set the runId property: The ID of the Run that was completed. + * + * @param runId the runId value to set. + * @return the MachineLearningServicesRunCompletedEventData object itself. + */ + public MachineLearningServicesRunCompletedEventData setRunId(String runId) { + this.runId = runId; + return this; + } + + /** + * Get the runType property: The Run Type of the completed Run. + * + * @return the runType value. + */ + public String getRunType() { + return this.runType; + } + + /** + * Set the runType property: The Run Type of the completed Run. + * + * @param runType the runType value to set. + * @return the MachineLearningServicesRunCompletedEventData object itself. + */ + public MachineLearningServicesRunCompletedEventData setRunType(String runType) { + this.runType = runType; + return this; + } + + /** + * Get the runTags property: The tags of the completed Run. + * + * @return the runTags value. + */ + public Object getRunTags() { + return this.runTags; + } + + /** + * Set the runTags property: The tags of the completed Run. + * + * @param runTags the runTags value to set. + * @return the MachineLearningServicesRunCompletedEventData object itself. + */ + public MachineLearningServicesRunCompletedEventData setRunTags(Object runTags) { + this.runTags = runTags; + return this; + } + + /** + * Get the runProperties property: The properties of the completed Run. + * + * @return the runProperties value. + */ + public Object getRunProperties() { + return this.runProperties; + } + + /** + * Set the runProperties property: The properties of the completed Run. + * + * @param runProperties the runProperties value to set. + * @return the MachineLearningServicesRunCompletedEventData object itself. + */ + public MachineLearningServicesRunCompletedEventData setRunProperties(Object runProperties) { + this.runProperties = runProperties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java new file mode 100644 index 0000000000000..4fba8ddd71e93 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MachineLearningServicesRunStatusChangedEventData model. */ +@Fluent +public final class MachineLearningServicesRunStatusChangedEventData { + /* + * The ID of the experiment that the Machine Learning Run belongs to. + */ + @JsonProperty(value = "experimentId") + private String experimentId; + + /* + * The name of the experiment that the Machine Learning Run belongs to. + */ + @JsonProperty(value = "experimentName") + private String experimentName; + + /* + * The ID of the Machine Learning Run. + */ + @JsonProperty(value = "runId") + private String runId; + + /* + * The Run Type of the Machine Learning Run. + */ + @JsonProperty(value = "runType") + private String runType; + + /* + * The tags of the Machine Learning Run. + */ + @JsonProperty(value = "runTags") + private Object runTags; + + /* + * The properties of the Machine Learning Run. + */ + @JsonProperty(value = "runProperties") + private Object runProperties; + + /* + * The status of the Machine Learning Run. + */ + @JsonProperty(value = "runStatus") + private String runStatus; + + /** + * Get the experimentId property: The ID of the experiment that the Machine Learning Run belongs to. + * + * @return the experimentId value. + */ + public String getExperimentId() { + return this.experimentId; + } + + /** + * Set the experimentId property: The ID of the experiment that the Machine Learning Run belongs to. + * + * @param experimentId the experimentId value to set. + * @return the MachineLearningServicesRunStatusChangedEventData object itself. + */ + public MachineLearningServicesRunStatusChangedEventData setExperimentId(String experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get the experimentName property: The name of the experiment that the Machine Learning Run belongs to. + * + * @return the experimentName value. + */ + public String getExperimentName() { + return this.experimentName; + } + + /** + * Set the experimentName property: The name of the experiment that the Machine Learning Run belongs to. + * + * @param experimentName the experimentName value to set. + * @return the MachineLearningServicesRunStatusChangedEventData object itself. + */ + public MachineLearningServicesRunStatusChangedEventData setExperimentName(String experimentName) { + this.experimentName = experimentName; + return this; + } + + /** + * Get the runId property: The ID of the Machine Learning Run. + * + * @return the runId value. + */ + public String getRunId() { + return this.runId; + } + + /** + * Set the runId property: The ID of the Machine Learning Run. + * + * @param runId the runId value to set. + * @return the MachineLearningServicesRunStatusChangedEventData object itself. + */ + public MachineLearningServicesRunStatusChangedEventData setRunId(String runId) { + this.runId = runId; + return this; + } + + /** + * Get the runType property: The Run Type of the Machine Learning Run. + * + * @return the runType value. + */ + public String getRunType() { + return this.runType; + } + + /** + * Set the runType property: The Run Type of the Machine Learning Run. + * + * @param runType the runType value to set. + * @return the MachineLearningServicesRunStatusChangedEventData object itself. + */ + public MachineLearningServicesRunStatusChangedEventData setRunType(String runType) { + this.runType = runType; + return this; + } + + /** + * Get the runTags property: The tags of the Machine Learning Run. + * + * @return the runTags value. + */ + public Object getRunTags() { + return this.runTags; + } + + /** + * Set the runTags property: The tags of the Machine Learning Run. + * + * @param runTags the runTags value to set. + * @return the MachineLearningServicesRunStatusChangedEventData object itself. + */ + public MachineLearningServicesRunStatusChangedEventData setRunTags(Object runTags) { + this.runTags = runTags; + return this; + } + + /** + * Get the runProperties property: The properties of the Machine Learning Run. + * + * @return the runProperties value. + */ + public Object getRunProperties() { + return this.runProperties; + } + + /** + * Set the runProperties property: The properties of the Machine Learning Run. + * + * @param runProperties the runProperties value to set. + * @return the MachineLearningServicesRunStatusChangedEventData object itself. + */ + public MachineLearningServicesRunStatusChangedEventData setRunProperties(Object runProperties) { + this.runProperties = runProperties; + return this; + } + + /** + * Get the runStatus property: The status of the Machine Learning Run. + * + * @return the runStatus value. + */ + public String getRunStatus() { + return this.runStatus; + } + + /** + * Set the runStatus property: The status of the Machine Learning Run. + * + * @param runStatus the runStatus value to set. + * @return the MachineLearningServicesRunStatusChangedEventData object itself. + */ + public MachineLearningServicesRunStatusChangedEventData setRunStatus(String runStatus) { + this.runStatus = runStatus; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java new file mode 100644 index 0000000000000..e2861f657e40e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MapsGeofenceEnteredEventData model. */ +@Immutable +public final class MapsGeofenceEnteredEventData extends MapsGeofenceEventProperties {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java new file mode 100644 index 0000000000000..4836b5e502db7 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The MapsGeofenceEventProperties model. */ +@Fluent +public class MapsGeofenceEventProperties { + /* + * Lists of the geometry ID of the geofence which is expired relative to + * the user time in the request. + */ + @JsonProperty(value = "expiredGeofenceGeometryId") + private List expiredGeofenceGeometryId; + + /* + * Lists the fence geometries that either fully contain the coordinate + * position or have an overlap with the searchBuffer around the fence. + */ + @JsonProperty(value = "geometries") + private List geometries; + + /* + * Lists of the geometry ID of the geofence which is in invalid period + * relative to the user time in the request. + */ + @JsonProperty(value = "invalidPeriodGeofenceGeometryId") + private List invalidPeriodGeofenceGeometryId; + + /* + * True if at least one event is published to the Azure Maps event + * subscriber, false if no event is published to the Azure Maps event + * subscriber. + */ + @JsonProperty(value = "isEventPublished") + private Boolean isEventPublished; + + /** + * Get the expiredGeofenceGeometryId property: Lists of the geometry ID of the geofence which is expired relative to + * the user time in the request. + * + * @return the expiredGeofenceGeometryId value. + */ + public List getExpiredGeofenceGeometryId() { + return this.expiredGeofenceGeometryId; + } + + /** + * Set the expiredGeofenceGeometryId property: Lists of the geometry ID of the geofence which is expired relative to + * the user time in the request. + * + * @param expiredGeofenceGeometryId the expiredGeofenceGeometryId value to set. + * @return the MapsGeofenceEventProperties object itself. + */ + public MapsGeofenceEventProperties setExpiredGeofenceGeometryId(List expiredGeofenceGeometryId) { + this.expiredGeofenceGeometryId = expiredGeofenceGeometryId; + return this; + } + + /** + * Get the geometries property: Lists the fence geometries that either fully contain the coordinate position or have + * an overlap with the searchBuffer around the fence. + * + * @return the geometries value. + */ + public List getGeometries() { + return this.geometries; + } + + /** + * Set the geometries property: Lists the fence geometries that either fully contain the coordinate position or have + * an overlap with the searchBuffer around the fence. + * + * @param geometries the geometries value to set. + * @return the MapsGeofenceEventProperties object itself. + */ + public MapsGeofenceEventProperties setGeometries(List geometries) { + this.geometries = geometries; + return this; + } + + /** + * Get the invalidPeriodGeofenceGeometryId property: Lists of the geometry ID of the geofence which is in invalid + * period relative to the user time in the request. + * + * @return the invalidPeriodGeofenceGeometryId value. + */ + public List getInvalidPeriodGeofenceGeometryId() { + return this.invalidPeriodGeofenceGeometryId; + } + + /** + * Set the invalidPeriodGeofenceGeometryId property: Lists of the geometry ID of the geofence which is in invalid + * period relative to the user time in the request. + * + * @param invalidPeriodGeofenceGeometryId the invalidPeriodGeofenceGeometryId value to set. + * @return the MapsGeofenceEventProperties object itself. + */ + public MapsGeofenceEventProperties setInvalidPeriodGeofenceGeometryId( + List invalidPeriodGeofenceGeometryId) { + this.invalidPeriodGeofenceGeometryId = invalidPeriodGeofenceGeometryId; + return this; + } + + /** + * Get the isEventPublished property: True if at least one event is published to the Azure Maps event subscriber, + * false if no event is published to the Azure Maps event subscriber. + * + * @return the isEventPublished value. + */ + public Boolean isEventPublished() { + return this.isEventPublished; + } + + /** + * Set the isEventPublished property: True if at least one event is published to the Azure Maps event subscriber, + * false if no event is published to the Azure Maps event subscriber. + * + * @param isEventPublished the isEventPublished value to set. + * @return the MapsGeofenceEventProperties object itself. + */ + public MapsGeofenceEventProperties setIsEventPublished(Boolean isEventPublished) { + this.isEventPublished = isEventPublished; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java new file mode 100644 index 0000000000000..0454728cc9b58 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MapsGeofenceExitedEventData model. */ +@Immutable +public final class MapsGeofenceExitedEventData extends MapsGeofenceEventProperties {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java new file mode 100644 index 0000000000000..63b9bbfc8d79e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MapsGeofenceGeometry model. */ +@Fluent +public final class MapsGeofenceGeometry { + /* + * ID of the device. + */ + @JsonProperty(value = "deviceId") + private String deviceId; + + /* + * Distance from the coordinate to the closest border of the geofence. + * Positive means the coordinate is outside of the geofence. If the + * coordinate is outside of the geofence, but more than the value of + * searchBuffer away from the closest geofence border, then the value is + * 999. Negative means the coordinate is inside of the geofence. If the + * coordinate is inside the polygon, but more than the value of + * searchBuffer away from the closest geofencing border,then the value is + * -999. A value of 999 means that there is great confidence the coordinate + * is well outside the geofence. A value of -999 means that there is great + * confidence the coordinate is well within the geofence. + */ + @JsonProperty(value = "distance") + private Float distance; + + /* + * The unique ID for the geofence geometry. + */ + @JsonProperty(value = "geometryId") + private String geometryId; + + /* + * Latitude of the nearest point of the geometry. + */ + @JsonProperty(value = "nearestLat") + private Float nearestLat; + + /* + * Longitude of the nearest point of the geometry. + */ + @JsonProperty(value = "nearestLon") + private Float nearestLon; + + /* + * The unique id returned from user upload service when uploading a + * geofence. Will not be included in geofencing post API. + */ + @JsonProperty(value = "udId") + private String udId; + + /** + * Get the deviceId property: ID of the device. + * + * @return the deviceId value. + */ + public String getDeviceId() { + return this.deviceId; + } + + /** + * Set the deviceId property: ID of the device. + * + * @param deviceId the deviceId value to set. + * @return the MapsGeofenceGeometry object itself. + */ + public MapsGeofenceGeometry setDeviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * Get the distance property: Distance from the coordinate to the closest border of the geofence. Positive means the + * coordinate is outside of the geofence. If the coordinate is outside of the geofence, but more than the value of + * searchBuffer away from the closest geofence border, then the value is 999. Negative means the coordinate is + * inside of the geofence. If the coordinate is inside the polygon, but more than the value of searchBuffer away + * from the closest geofencing border,then the value is -999. A value of 999 means that there is great confidence + * the coordinate is well outside the geofence. A value of -999 means that there is great confidence the coordinate + * is well within the geofence. + * + * @return the distance value. + */ + public Float getDistance() { + return this.distance; + } + + /** + * Set the distance property: Distance from the coordinate to the closest border of the geofence. Positive means the + * coordinate is outside of the geofence. If the coordinate is outside of the geofence, but more than the value of + * searchBuffer away from the closest geofence border, then the value is 999. Negative means the coordinate is + * inside of the geofence. If the coordinate is inside the polygon, but more than the value of searchBuffer away + * from the closest geofencing border,then the value is -999. A value of 999 means that there is great confidence + * the coordinate is well outside the geofence. A value of -999 means that there is great confidence the coordinate + * is well within the geofence. + * + * @param distance the distance value to set. + * @return the MapsGeofenceGeometry object itself. + */ + public MapsGeofenceGeometry setDistance(Float distance) { + this.distance = distance; + return this; + } + + /** + * Get the geometryId property: The unique ID for the geofence geometry. + * + * @return the geometryId value. + */ + public String getGeometryId() { + return this.geometryId; + } + + /** + * Set the geometryId property: The unique ID for the geofence geometry. + * + * @param geometryId the geometryId value to set. + * @return the MapsGeofenceGeometry object itself. + */ + public MapsGeofenceGeometry setGeometryId(String geometryId) { + this.geometryId = geometryId; + return this; + } + + /** + * Get the nearestLat property: Latitude of the nearest point of the geometry. + * + * @return the nearestLat value. + */ + public Float getNearestLat() { + return this.nearestLat; + } + + /** + * Set the nearestLat property: Latitude of the nearest point of the geometry. + * + * @param nearestLat the nearestLat value to set. + * @return the MapsGeofenceGeometry object itself. + */ + public MapsGeofenceGeometry setNearestLat(Float nearestLat) { + this.nearestLat = nearestLat; + return this; + } + + /** + * Get the nearestLon property: Longitude of the nearest point of the geometry. + * + * @return the nearestLon value. + */ + public Float getNearestLon() { + return this.nearestLon; + } + + /** + * Set the nearestLon property: Longitude of the nearest point of the geometry. + * + * @param nearestLon the nearestLon value to set. + * @return the MapsGeofenceGeometry object itself. + */ + public MapsGeofenceGeometry setNearestLon(Float nearestLon) { + this.nearestLon = nearestLon; + return this; + } + + /** + * Get the udId property: The unique id returned from user upload service when uploading a geofence. Will not be + * included in geofencing post API. + * + * @return the udId value. + */ + public String getUdId() { + return this.udId; + } + + /** + * Set the udId property: The unique id returned from user upload service when uploading a geofence. Will not be + * included in geofencing post API. + * + * @param udId the udId value to set. + * @return the MapsGeofenceGeometry object itself. + */ + public MapsGeofenceGeometry setUdId(String udId) { + this.udId = udId; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceResultEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceResultEventData.java new file mode 100644 index 0000000000000..c88066cd30381 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceResultEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MapsGeofenceResultEventData model. */ +@Immutable +public final class MapsGeofenceResultEventData extends MapsGeofenceEventProperties {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCanceledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCanceledEventData.java new file mode 100644 index 0000000000000..a851f2471e835 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCanceledEventData.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The MediaJobCanceledEventData model. */ +@Fluent +public final class MediaJobCanceledEventData extends MediaJobStateChangeEventData { + /* + * Gets the Job outputs. + */ + @JsonProperty(value = "outputs") + private List outputs; + + /** + * Get the outputs property: Gets the Job outputs. + * + * @return the outputs value. + */ + public List getOutputs() { + return this.outputs; + } + + /** + * Set the outputs property: Gets the Job outputs. + * + * @param outputs the outputs value to set. + * @return the MediaJobCanceledEventData object itself. + */ + public MediaJobCanceledEventData setOutputs(List outputs) { + this.outputs = outputs; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java new file mode 100644 index 0000000000000..8445b42b42758 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobCancelingEventData model. */ +@Immutable +public final class MediaJobCancelingEventData extends MediaJobStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java new file mode 100644 index 0000000000000..99cc73c832162 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The MediaJobError model. */ +@Immutable +public final class MediaJobError { + /* + * Error code describing the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private MediaJobErrorCode code; + + /* + * A human-readable language-dependent representation of the error. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * Helps with categorization of errors. + */ + @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) + private MediaJobErrorCategory category; + + /* + * Indicates that it may be possible to retry the Job. If retry is + * unsuccessful, please contact Azure support via Azure Portal. + */ + @JsonProperty(value = "retry", access = JsonProperty.Access.WRITE_ONLY) + private MediaJobRetry retry; + + /* + * An array of details about specific errors that led to this reported + * error. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private List details; + + /** + * Get the code property: Error code describing the error. + * + * @return the code value. + */ + public MediaJobErrorCode getCode() { + return this.code; + } + + /** + * Get the message property: A human-readable language-dependent representation of the error. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Get the category property: Helps with categorization of errors. + * + * @return the category value. + */ + public MediaJobErrorCategory getCategory() { + return this.category; + } + + /** + * Get the retry property: Indicates that it may be possible to retry the Job. If retry is unsuccessful, please + * contact Azure support via Azure Portal. + * + * @return the retry value. + */ + public MediaJobRetry getRetry() { + return this.retry; + } + + /** + * Get the details property: An array of details about specific errors that led to this reported error. + * + * @return the details value. + */ + public List getDetails() { + return this.details; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCategory.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCategory.java new file mode 100644 index 0000000000000..4c8961e12d6fc --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCategory.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for MediaJobErrorCategory. */ +public enum MediaJobErrorCategory { + /** Enum value Service. */ + SERVICE("Service"), + + /** Enum value Download. */ + DOWNLOAD("Download"), + + /** Enum value Upload. */ + UPLOAD("Upload"), + + /** Enum value Configuration. */ + CONFIGURATION("Configuration"), + + /** Enum value Content. */ + CONTENT("Content"); + + /** The actual serialized value for a MediaJobErrorCategory instance. */ + private final String value; + + MediaJobErrorCategory(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MediaJobErrorCategory instance. + * + * @param value the serialized value to parse. + * @return the parsed MediaJobErrorCategory object, or null if unable to parse. + */ + @JsonCreator + public static MediaJobErrorCategory fromString(String value) { + MediaJobErrorCategory[] items = MediaJobErrorCategory.values(); + for (MediaJobErrorCategory item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCode.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCode.java new file mode 100644 index 0000000000000..51311539ff3df --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCode.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for MediaJobErrorCode. */ +public enum MediaJobErrorCode { + /** Enum value ServiceError. */ + SERVICE_ERROR("ServiceError"), + + /** Enum value ServiceTransientError. */ + SERVICE_TRANSIENT_ERROR("ServiceTransientError"), + + /** Enum value DownloadNotAccessible. */ + DOWNLOAD_NOT_ACCESSIBLE("DownloadNotAccessible"), + + /** Enum value DownloadTransientError. */ + DOWNLOAD_TRANSIENT_ERROR("DownloadTransientError"), + + /** Enum value UploadNotAccessible. */ + UPLOAD_NOT_ACCESSIBLE("UploadNotAccessible"), + + /** Enum value UploadTransientError. */ + UPLOAD_TRANSIENT_ERROR("UploadTransientError"), + + /** Enum value ConfigurationUnsupported. */ + CONFIGURATION_UNSUPPORTED("ConfigurationUnsupported"), + + /** Enum value ContentMalformed. */ + CONTENT_MALFORMED("ContentMalformed"), + + /** Enum value ContentUnsupported. */ + CONTENT_UNSUPPORTED("ContentUnsupported"); + + /** The actual serialized value for a MediaJobErrorCode instance. */ + private final String value; + + MediaJobErrorCode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MediaJobErrorCode instance. + * + * @param value the serialized value to parse. + * @return the parsed MediaJobErrorCode object, or null if unable to parse. + */ + @JsonCreator + public static MediaJobErrorCode fromString(String value) { + MediaJobErrorCode[] items = MediaJobErrorCode.values(); + for (MediaJobErrorCode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java new file mode 100644 index 0000000000000..405e543a397f7 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaJobErrorDetail model. */ +@Immutable +public final class MediaJobErrorDetail { + /* + * Code describing the error detail. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * A human-readable representation of the error. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the code property: Code describing the error detail. + * + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Get the message property: A human-readable representation of the error. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java new file mode 100644 index 0000000000000..6c448b5ef0186 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The MediaJobErroredEventData model. */ +@Fluent +public final class MediaJobErroredEventData extends MediaJobStateChangeEventData { + /* + * Gets the Job outputs. + */ + @JsonProperty(value = "outputs") + private List outputs; + + /** + * Get the outputs property: Gets the Job outputs. + * + * @return the outputs value. + */ + public List getOutputs() { + return this.outputs; + } + + /** + * Set the outputs property: Gets the Job outputs. + * + * @param outputs the outputs value to set. + * @return the MediaJobErroredEventData object itself. + */ + public MediaJobErroredEventData setOutputs(List outputs) { + this.outputs = outputs; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java new file mode 100644 index 0000000000000..6d45306ff3c5c --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The MediaJobFinishedEventData model. */ +@Fluent +public final class MediaJobFinishedEventData extends MediaJobStateChangeEventData { + /* + * Gets the Job outputs. + */ + @JsonProperty(value = "outputs") + private List outputs; + + /** + * Get the outputs property: Gets the Job outputs. + * + * @return the outputs value. + */ + public List getOutputs() { + return this.outputs; + } + + /** + * Set the outputs property: Gets the Job outputs. + * + * @param outputs the outputs value to set. + * @return the MediaJobFinishedEventData object itself. + */ + public MediaJobFinishedEventData setOutputs(List outputs) { + this.outputs = outputs; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java new file mode 100644 index 0000000000000..c5260164299b5 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The MediaJobOutput model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@odata\\.type", + defaultImpl = MediaJobOutput.class) +@JsonTypeName("MediaJobOutput") +@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.JobOutputAsset", value = MediaJobOutputAsset.class)}) +@JsonFlatten +@Fluent +public class MediaJobOutput { + /* + * Gets the Job output error. + */ + @JsonProperty(value = "error") + private MediaJobError error; + + /* + * Gets the Job output label. + */ + @JsonProperty(value = "label") + private String label; + + /* + * Gets the Job output progress. + */ + @JsonProperty(value = "progress", required = true) + private long progress; + + /* + * Gets the Job output state. + */ + @JsonProperty(value = "state", required = true) + private MediaJobState state; + + /** + * Get the error property: Gets the Job output error. + * + * @return the error value. + */ + public MediaJobError getError() { + return this.error; + } + + /** + * Set the error property: Gets the Job output error. + * + * @param error the error value to set. + * @return the MediaJobOutput object itself. + */ + public MediaJobOutput setError(MediaJobError error) { + this.error = error; + return this; + } + + /** + * Get the label property: Gets the Job output label. + * + * @return the label value. + */ + public String getLabel() { + return this.label; + } + + /** + * Set the label property: Gets the Job output label. + * + * @param label the label value to set. + * @return the MediaJobOutput object itself. + */ + public MediaJobOutput setLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the progress property: Gets the Job output progress. + * + * @return the progress value. + */ + public long getProgress() { + return this.progress; + } + + /** + * Set the progress property: Gets the Job output progress. + * + * @param progress the progress value to set. + * @return the MediaJobOutput object itself. + */ + public MediaJobOutput setProgress(long progress) { + this.progress = progress; + return this; + } + + /** + * Get the state property: Gets the Job output state. + * + * @return the state value. + */ + public MediaJobState getState() { + return this.state; + } + + /** + * Set the state property: Gets the Job output state. + * + * @param state the state value to set. + * @return the MediaJobOutput object itself. + */ + public MediaJobOutput setState(MediaJobState state) { + this.state = state; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java new file mode 100644 index 0000000000000..d7ac6ca9ab758 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The MediaJobOutputAsset model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeName("#Microsoft.Media.JobOutputAsset") +@JsonFlatten +@Fluent +public class MediaJobOutputAsset extends MediaJobOutput { + /* + * Gets the Job output asset name. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /** + * Get the assetName property: Gets the Job output asset name. + * + * @return the assetName value. + */ + public String getAssetName() { + return this.assetName; + } + + /** + * Set the assetName property: Gets the Job output asset name. + * + * @param assetName the assetName value to set. + * @return the MediaJobOutputAsset object itself. + */ + public MediaJobOutputAsset setAssetName(String assetName) { + this.assetName = assetName; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java new file mode 100644 index 0000000000000..f8edd7784c79f --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobOutputCanceledEventData model. */ +@Immutable +public final class MediaJobOutputCanceledEventData extends MediaJobOutputStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java new file mode 100644 index 0000000000000..986e80f34451c --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobOutputCancelingEventData model. */ +@Immutable +public final class MediaJobOutputCancelingEventData extends MediaJobOutputStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputErroredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputErroredEventData.java new file mode 100644 index 0000000000000..00f87a53c58b5 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputErroredEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobOutputErroredEventData model. */ +@Immutable +public final class MediaJobOutputErroredEventData extends MediaJobOutputStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java new file mode 100644 index 0000000000000..2261cb940d89a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobOutputFinishedEventData model. */ +@Immutable +public final class MediaJobOutputFinishedEventData extends MediaJobOutputStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java new file mode 100644 index 0000000000000..1d385315f1e6e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobOutputProcessingEventData model. */ +@Immutable +public final class MediaJobOutputProcessingEventData extends MediaJobOutputStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProgressEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProgressEventData.java new file mode 100644 index 0000000000000..a28899969ef6f --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProgressEventData.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The MediaJobOutputProgressEventData model. */ +@Fluent +public final class MediaJobOutputProgressEventData { + /* + * Gets the Job output label. + */ + @JsonProperty(value = "label") + private String label; + + /* + * Gets the Job output progress. + */ + @JsonProperty(value = "progress") + private Long progress; + + /* + * Gets the Job correlation data. + */ + @JsonProperty(value = "jobCorrelationData") + private Map jobCorrelationData; + + /** + * Get the label property: Gets the Job output label. + * + * @return the label value. + */ + public String getLabel() { + return this.label; + } + + /** + * Set the label property: Gets the Job output label. + * + * @param label the label value to set. + * @return the MediaJobOutputProgressEventData object itself. + */ + public MediaJobOutputProgressEventData setLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the progress property: Gets the Job output progress. + * + * @return the progress value. + */ + public Long getProgress() { + return this.progress; + } + + /** + * Set the progress property: Gets the Job output progress. + * + * @param progress the progress value to set. + * @return the MediaJobOutputProgressEventData object itself. + */ + public MediaJobOutputProgressEventData setProgress(Long progress) { + this.progress = progress; + return this; + } + + /** + * Get the jobCorrelationData property: Gets the Job correlation data. + * + * @return the jobCorrelationData value. + */ + public Map getJobCorrelationData() { + return this.jobCorrelationData; + } + + /** + * Set the jobCorrelationData property: Gets the Job correlation data. + * + * @param jobCorrelationData the jobCorrelationData value to set. + * @return the MediaJobOutputProgressEventData object itself. + */ + public MediaJobOutputProgressEventData setJobCorrelationData(Map jobCorrelationData) { + this.jobCorrelationData = jobCorrelationData; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java new file mode 100644 index 0000000000000..f70841a3e912c --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobOutputScheduledEventData model. */ +@Immutable +public final class MediaJobOutputScheduledEventData extends MediaJobOutputStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputStateChangeEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputStateChangeEventData.java new file mode 100644 index 0000000000000..9dd09a6eb44c8 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputStateChangeEventData.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The MediaJobOutputStateChangeEventData model. */ +@Fluent +public class MediaJobOutputStateChangeEventData { + /* + * The previous state of the Job. + */ + @JsonProperty(value = "previousState", access = JsonProperty.Access.WRITE_ONLY) + private MediaJobState previousState; + + /* + * Gets the output. + */ + @JsonProperty(value = "output") + private MediaJobOutput output; + + /* + * Gets the Job correlation data. + */ + @JsonProperty(value = "jobCorrelationData") + private Map jobCorrelationData; + + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + public MediaJobState getPreviousState() { + return this.previousState; + } + + /** + * Get the output property: Gets the output. + * + * @return the output value. + */ + public MediaJobOutput getOutput() { + return this.output; + } + + /** + * Set the output property: Gets the output. + * + * @param output the output value to set. + * @return the MediaJobOutputStateChangeEventData object itself. + */ + public MediaJobOutputStateChangeEventData setOutput(MediaJobOutput output) { + this.output = output; + return this; + } + + /** + * Get the jobCorrelationData property: Gets the Job correlation data. + * + * @return the jobCorrelationData value. + */ + public Map getJobCorrelationData() { + return this.jobCorrelationData; + } + + /** + * Set the jobCorrelationData property: Gets the Job correlation data. + * + * @param jobCorrelationData the jobCorrelationData value to set. + * @return the MediaJobOutputStateChangeEventData object itself. + */ + public MediaJobOutputStateChangeEventData setJobCorrelationData(Map jobCorrelationData) { + this.jobCorrelationData = jobCorrelationData; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobProcessingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobProcessingEventData.java new file mode 100644 index 0000000000000..fd0b7b46b2634 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobProcessingEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobProcessingEventData model. */ +@Immutable +public final class MediaJobProcessingEventData extends MediaJobStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobRetry.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobRetry.java new file mode 100644 index 0000000000000..754ad76954556 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobRetry.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for MediaJobRetry. */ +public enum MediaJobRetry { + /** Enum value DoNotRetry. */ + DO_NOT_RETRY("DoNotRetry"), + + /** Enum value MayRetry. */ + MAY_RETRY("MayRetry"); + + /** The actual serialized value for a MediaJobRetry instance. */ + private final String value; + + MediaJobRetry(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MediaJobRetry instance. + * + * @param value the serialized value to parse. + * @return the parsed MediaJobRetry object, or null if unable to parse. + */ + @JsonCreator + public static MediaJobRetry fromString(String value) { + MediaJobRetry[] items = MediaJobRetry.values(); + for (MediaJobRetry item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java new file mode 100644 index 0000000000000..1bdb322a006c1 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; + +/** The MediaJobScheduledEventData model. */ +@Immutable +public final class MediaJobScheduledEventData extends MediaJobStateChangeEventData {} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobState.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobState.java new file mode 100644 index 0000000000000..1fdb3d63528f3 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobState.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for MediaJobState. */ +public enum MediaJobState { + /** Enum value Canceled. */ + CANCELED("Canceled"), + + /** Enum value Canceling. */ + CANCELING("Canceling"), + + /** Enum value Error. */ + ERROR("Error"), + + /** Enum value Finished. */ + FINISHED("Finished"), + + /** Enum value Processing. */ + PROCESSING("Processing"), + + /** Enum value Queued. */ + QUEUED("Queued"), + + /** Enum value Scheduled. */ + SCHEDULED("Scheduled"); + + /** The actual serialized value for a MediaJobState instance. */ + private final String value; + + MediaJobState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MediaJobState instance. + * + * @param value the serialized value to parse. + * @return the parsed MediaJobState object, or null if unable to parse. + */ + @JsonCreator + public static MediaJobState fromString(String value) { + MediaJobState[] items = MediaJobState.values(); + for (MediaJobState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java new file mode 100644 index 0000000000000..116584286d917 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The MediaJobStateChangeEventData model. */ +@Fluent +public class MediaJobStateChangeEventData { + /* + * The previous state of the Job. + */ + @JsonProperty(value = "previousState", access = JsonProperty.Access.WRITE_ONLY) + private MediaJobState previousState; + + /* + * The new state of the Job. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MediaJobState state; + + /* + * Gets the Job correlation data. + */ + @JsonProperty(value = "correlationData") + private Map correlationData; + + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + public MediaJobState getPreviousState() { + return this.previousState; + } + + /** + * Get the state property: The new state of the Job. + * + * @return the state value. + */ + public MediaJobState getState() { + return this.state; + } + + /** + * Get the correlationData property: Gets the Job correlation data. + * + * @return the correlationData value. + */ + public Map getCorrelationData() { + return this.correlationData; + } + + /** + * Set the correlationData property: Gets the Job correlation data. + * + * @param correlationData the correlationData value to set. + * @return the MediaJobStateChangeEventData object itself. + */ + public MediaJobStateChangeEventData setCorrelationData(Map correlationData) { + this.correlationData = correlationData; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java new file mode 100644 index 0000000000000..19ccfee1950ee --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventConnectionRejectedEventData model. */ +@Immutable +public final class MediaLiveEventConnectionRejectedEventData { + /* + * Gets the ingest URL provided by the live event. + */ + @JsonProperty(value = "ingestUrl", access = JsonProperty.Access.WRITE_ONLY) + private String ingestUrl; + + /* + * Gets the stream Id. + */ + @JsonProperty(value = "streamId", access = JsonProperty.Access.WRITE_ONLY) + private String streamId; + + /* + * Gets the remote IP. + */ + @JsonProperty(value = "encoderIp", access = JsonProperty.Access.WRITE_ONLY) + private String encoderIp; + + /* + * Gets the remote port. + */ + @JsonProperty(value = "encoderPort", access = JsonProperty.Access.WRITE_ONLY) + private String encoderPort; + + /* + * Gets the result code. + */ + @JsonProperty(value = "resultCode", access = JsonProperty.Access.WRITE_ONLY) + private String resultCode; + + /** + * Get the ingestUrl property: Gets the ingest URL provided by the live event. + * + * @return the ingestUrl value. + */ + public String getIngestUrl() { + return this.ingestUrl; + } + + /** + * Get the streamId property: Gets the stream Id. + * + * @return the streamId value. + */ + public String getStreamId() { + return this.streamId; + } + + /** + * Get the encoderIp property: Gets the remote IP. + * + * @return the encoderIp value. + */ + public String getEncoderIp() { + return this.encoderIp; + } + + /** + * Get the encoderPort property: Gets the remote port. + * + * @return the encoderPort value. + */ + public String getEncoderPort() { + return this.encoderPort; + } + + /** + * Get the resultCode property: Gets the result code. + * + * @return the resultCode value. + */ + public String getResultCode() { + return this.resultCode; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java new file mode 100644 index 0000000000000..e2d136eee3c84 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventEncoderConnectedEventData model. */ +@Immutable +public final class MediaLiveEventEncoderConnectedEventData { + /* + * Gets the ingest URL provided by the live event. + */ + @JsonProperty(value = "ingestUrl", access = JsonProperty.Access.WRITE_ONLY) + private String ingestUrl; + + /* + * Gets the stream Id. + */ + @JsonProperty(value = "streamId", access = JsonProperty.Access.WRITE_ONLY) + private String streamId; + + /* + * Gets the remote IP. + */ + @JsonProperty(value = "encoderIp", access = JsonProperty.Access.WRITE_ONLY) + private String encoderIp; + + /* + * Gets the remote port. + */ + @JsonProperty(value = "encoderPort", access = JsonProperty.Access.WRITE_ONLY) + private String encoderPort; + + /** + * Get the ingestUrl property: Gets the ingest URL provided by the live event. + * + * @return the ingestUrl value. + */ + public String getIngestUrl() { + return this.ingestUrl; + } + + /** + * Get the streamId property: Gets the stream Id. + * + * @return the streamId value. + */ + public String getStreamId() { + return this.streamId; + } + + /** + * Get the encoderIp property: Gets the remote IP. + * + * @return the encoderIp value. + */ + public String getEncoderIp() { + return this.encoderIp; + } + + /** + * Get the encoderPort property: Gets the remote port. + * + * @return the encoderPort value. + */ + public String getEncoderPort() { + return this.encoderPort; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java new file mode 100644 index 0000000000000..dcfc355bb9121 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventEncoderDisconnectedEventData model. */ +@Immutable +public final class MediaLiveEventEncoderDisconnectedEventData { + /* + * Gets the ingest URL provided by the live event. + */ + @JsonProperty(value = "ingestUrl", access = JsonProperty.Access.WRITE_ONLY) + private String ingestUrl; + + /* + * Gets the stream Id. + */ + @JsonProperty(value = "streamId", access = JsonProperty.Access.WRITE_ONLY) + private String streamId; + + /* + * Gets the remote IP. + */ + @JsonProperty(value = "encoderIp", access = JsonProperty.Access.WRITE_ONLY) + private String encoderIp; + + /* + * Gets the remote port. + */ + @JsonProperty(value = "encoderPort", access = JsonProperty.Access.WRITE_ONLY) + private String encoderPort; + + /* + * Gets the result code. + */ + @JsonProperty(value = "resultCode", access = JsonProperty.Access.WRITE_ONLY) + private String resultCode; + + /** + * Get the ingestUrl property: Gets the ingest URL provided by the live event. + * + * @return the ingestUrl value. + */ + public String getIngestUrl() { + return this.ingestUrl; + } + + /** + * Get the streamId property: Gets the stream Id. + * + * @return the streamId value. + */ + public String getStreamId() { + return this.streamId; + } + + /** + * Get the encoderIp property: Gets the remote IP. + * + * @return the encoderIp value. + */ + public String getEncoderIp() { + return this.encoderIp; + } + + /** + * Get the encoderPort property: Gets the remote port. + * + * @return the encoderPort value. + */ + public String getEncoderPort() { + return this.encoderPort; + } + + /** + * Get the resultCode property: Gets the result code. + * + * @return the resultCode value. + */ + public String getResultCode() { + return this.resultCode; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java new file mode 100644 index 0000000000000..1758ee3c9b8b3 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventIncomingDataChunkDroppedEventData model. */ +@Immutable +public final class MediaLiveEventIncomingDataChunkDroppedEventData { + /* + * Gets the timestamp of the data chunk dropped. + */ + @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) + private String timestamp; + + /* + * Gets the type of the track (Audio / Video). + */ + @JsonProperty(value = "trackType", access = JsonProperty.Access.WRITE_ONLY) + private String trackType; + + /* + * Gets the bitrate of the track. + */ + @JsonProperty(value = "bitrate", access = JsonProperty.Access.WRITE_ONLY) + private Long bitrate; + + /* + * Gets the timescale of the Timestamp. + */ + @JsonProperty(value = "timescale", access = JsonProperty.Access.WRITE_ONLY) + private String timescale; + + /* + * Gets the result code for fragment drop operation. + */ + @JsonProperty(value = "resultCode", access = JsonProperty.Access.WRITE_ONLY) + private String resultCode; + + /* + * Gets the name of the track for which fragment is dropped. + */ + @JsonProperty(value = "trackName", access = JsonProperty.Access.WRITE_ONLY) + private String trackName; + + /** + * Get the timestamp property: Gets the timestamp of the data chunk dropped. + * + * @return the timestamp value. + */ + public String getTimestamp() { + return this.timestamp; + } + + /** + * Get the trackType property: Gets the type of the track (Audio / Video). + * + * @return the trackType value. + */ + public String getTrackType() { + return this.trackType; + } + + /** + * Get the bitrate property: Gets the bitrate of the track. + * + * @return the bitrate value. + */ + public Long getBitrate() { + return this.bitrate; + } + + /** + * Get the timescale property: Gets the timescale of the Timestamp. + * + * @return the timescale value. + */ + public String getTimescale() { + return this.timescale; + } + + /** + * Get the resultCode property: Gets the result code for fragment drop operation. + * + * @return the resultCode value. + */ + public String getResultCode() { + return this.resultCode; + } + + /** + * Get the trackName property: Gets the name of the track for which fragment is dropped. + * + * @return the trackName value. + */ + public String getTrackName() { + return this.trackName; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java new file mode 100644 index 0000000000000..e6003bbc4d33a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventIncomingStreamReceivedEventData model. */ +@Immutable +public final class MediaLiveEventIncomingStreamReceivedEventData { + /* + * Gets the ingest URL provided by the live event. + */ + @JsonProperty(value = "ingestUrl", access = JsonProperty.Access.WRITE_ONLY) + private String ingestUrl; + + /* + * Gets the type of the track (Audio / Video). + */ + @JsonProperty(value = "trackType", access = JsonProperty.Access.WRITE_ONLY) + private String trackType; + + /* + * Gets the track name. + */ + @JsonProperty(value = "trackName", access = JsonProperty.Access.WRITE_ONLY) + private String trackName; + + /* + * Gets the bitrate of the track. + */ + @JsonProperty(value = "bitrate", access = JsonProperty.Access.WRITE_ONLY) + private Long bitrate; + + /* + * Gets the remote IP. + */ + @JsonProperty(value = "encoderIp", access = JsonProperty.Access.WRITE_ONLY) + private String encoderIp; + + /* + * Gets the remote port. + */ + @JsonProperty(value = "encoderPort", access = JsonProperty.Access.WRITE_ONLY) + private String encoderPort; + + /* + * Gets the first timestamp of the data chunk received. + */ + @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) + private String timestamp; + + /* + * Gets the duration of the first data chunk. + */ + @JsonProperty(value = "duration", access = JsonProperty.Access.WRITE_ONLY) + private String duration; + + /* + * Gets the timescale in which timestamp is represented. + */ + @JsonProperty(value = "timescale", access = JsonProperty.Access.WRITE_ONLY) + private String timescale; + + /** + * Get the ingestUrl property: Gets the ingest URL provided by the live event. + * + * @return the ingestUrl value. + */ + public String getIngestUrl() { + return this.ingestUrl; + } + + /** + * Get the trackType property: Gets the type of the track (Audio / Video). + * + * @return the trackType value. + */ + public String getTrackType() { + return this.trackType; + } + + /** + * Get the trackName property: Gets the track name. + * + * @return the trackName value. + */ + public String getTrackName() { + return this.trackName; + } + + /** + * Get the bitrate property: Gets the bitrate of the track. + * + * @return the bitrate value. + */ + public Long getBitrate() { + return this.bitrate; + } + + /** + * Get the encoderIp property: Gets the remote IP. + * + * @return the encoderIp value. + */ + public String getEncoderIp() { + return this.encoderIp; + } + + /** + * Get the encoderPort property: Gets the remote port. + * + * @return the encoderPort value. + */ + public String getEncoderPort() { + return this.encoderPort; + } + + /** + * Get the timestamp property: Gets the first timestamp of the data chunk received. + * + * @return the timestamp value. + */ + public String getTimestamp() { + return this.timestamp; + } + + /** + * Get the duration property: Gets the duration of the first data chunk. + * + * @return the duration value. + */ + public String getDuration() { + return this.duration; + } + + /** + * Get the timescale property: Gets the timescale in which timestamp is represented. + * + * @return the timescale value. + */ + public String getTimescale() { + return this.timescale; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java new file mode 100644 index 0000000000000..8d4b3db85a149 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventIncomingStreamsOutOfSyncEventData model. */ +@Immutable +public final class MediaLiveEventIncomingStreamsOutOfSyncEventData { + /* + * Gets the minimum last timestamp received. + */ + @JsonProperty(value = "minLastTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String minLastTimestamp; + + /* + * Gets the type of stream with minimum last timestamp. + */ + @JsonProperty(value = "typeOfStreamWithMinLastTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String typeOfStreamWithMinLastTimestamp; + + /* + * Gets the maximum timestamp among all the tracks (audio or video). + */ + @JsonProperty(value = "maxLastTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String maxLastTimestamp; + + /* + * Gets the type of stream with maximum last timestamp. + */ + @JsonProperty(value = "typeOfStreamWithMaxLastTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String typeOfStreamWithMaxLastTimestamp; + + /* + * Gets the timescale in which "MinLastTimestamp" is represented. + */ + @JsonProperty(value = "timescaleOfMinLastTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String timescaleOfMinLastTimestamp; + + /* + * Gets the timescale in which "MaxLastTimestamp" is represented. + */ + @JsonProperty(value = "timescaleOfMaxLastTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String timescaleOfMaxLastTimestamp; + + /** + * Get the minLastTimestamp property: Gets the minimum last timestamp received. + * + * @return the minLastTimestamp value. + */ + public String getMinLastTimestamp() { + return this.minLastTimestamp; + } + + /** + * Get the typeOfStreamWithMinLastTimestamp property: Gets the type of stream with minimum last timestamp. + * + * @return the typeOfStreamWithMinLastTimestamp value. + */ + public String getTypeOfStreamWithMinLastTimestamp() { + return this.typeOfStreamWithMinLastTimestamp; + } + + /** + * Get the maxLastTimestamp property: Gets the maximum timestamp among all the tracks (audio or video). + * + * @return the maxLastTimestamp value. + */ + public String getMaxLastTimestamp() { + return this.maxLastTimestamp; + } + + /** + * Get the typeOfStreamWithMaxLastTimestamp property: Gets the type of stream with maximum last timestamp. + * + * @return the typeOfStreamWithMaxLastTimestamp value. + */ + public String getTypeOfStreamWithMaxLastTimestamp() { + return this.typeOfStreamWithMaxLastTimestamp; + } + + /** + * Get the timescaleOfMinLastTimestamp property: Gets the timescale in which "MinLastTimestamp" is represented. + * + * @return the timescaleOfMinLastTimestamp value. + */ + public String getTimescaleOfMinLastTimestamp() { + return this.timescaleOfMinLastTimestamp; + } + + /** + * Get the timescaleOfMaxLastTimestamp property: Gets the timescale in which "MaxLastTimestamp" is represented. + * + * @return the timescaleOfMaxLastTimestamp value. + */ + public String getTimescaleOfMaxLastTimestamp() { + return this.timescaleOfMaxLastTimestamp; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java new file mode 100644 index 0000000000000..6e7cc52c5668f --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventIncomingVideoStreamsOutOfSyncEventData model. */ +@Immutable +public final class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData { + /* + * Gets the first timestamp received for one of the quality levels. + */ + @JsonProperty(value = "firstTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String firstTimestamp; + + /* + * Gets the duration of the data chunk with first timestamp. + */ + @JsonProperty(value = "firstDuration", access = JsonProperty.Access.WRITE_ONLY) + private String firstDuration; + + /* + * Gets the timestamp received for some other quality levels. + */ + @JsonProperty(value = "secondTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String secondTimestamp; + + /* + * Gets the duration of the data chunk with second timestamp. + */ + @JsonProperty(value = "secondDuration", access = JsonProperty.Access.WRITE_ONLY) + private String secondDuration; + + /* + * Gets the timescale in which both the timestamps and durations are + * represented. + */ + @JsonProperty(value = "timescale", access = JsonProperty.Access.WRITE_ONLY) + private String timescale; + + /** + * Get the firstTimestamp property: Gets the first timestamp received for one of the quality levels. + * + * @return the firstTimestamp value. + */ + public String getFirstTimestamp() { + return this.firstTimestamp; + } + + /** + * Get the firstDuration property: Gets the duration of the data chunk with first timestamp. + * + * @return the firstDuration value. + */ + public String getFirstDuration() { + return this.firstDuration; + } + + /** + * Get the secondTimestamp property: Gets the timestamp received for some other quality levels. + * + * @return the secondTimestamp value. + */ + public String getSecondTimestamp() { + return this.secondTimestamp; + } + + /** + * Get the secondDuration property: Gets the duration of the data chunk with second timestamp. + * + * @return the secondDuration value. + */ + public String getSecondDuration() { + return this.secondDuration; + } + + /** + * Get the timescale property: Gets the timescale in which both the timestamps and durations are represented. + * + * @return the timescale value. + */ + public String getTimescale() { + return this.timescale; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java new file mode 100644 index 0000000000000..d71b2eb97f900 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventIngestHeartbeatEventData model. */ +@Immutable +public final class MediaLiveEventIngestHeartbeatEventData { + /* + * Gets the type of the track (Audio / Video). + */ + @JsonProperty(value = "trackType", access = JsonProperty.Access.WRITE_ONLY) + private String trackType; + + /* + * Gets the track name. + */ + @JsonProperty(value = "trackName", access = JsonProperty.Access.WRITE_ONLY) + private String trackName; + + /* + * Gets the bitrate of the track. + */ + @JsonProperty(value = "bitrate", access = JsonProperty.Access.WRITE_ONLY) + private Long bitrate; + + /* + * Gets the incoming bitrate. + */ + @JsonProperty(value = "incomingBitrate", access = JsonProperty.Access.WRITE_ONLY) + private Long incomingBitrate; + + /* + * Gets the last timestamp. + */ + @JsonProperty(value = "lastTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String lastTimestamp; + + /* + * Gets the timescale of the last timestamp. + */ + @JsonProperty(value = "timescale", access = JsonProperty.Access.WRITE_ONLY) + private String timescale; + + /* + * Gets the fragment Overlap count. + */ + @JsonProperty(value = "overlapCount", access = JsonProperty.Access.WRITE_ONLY) + private Long overlapCount; + + /* + * Gets the fragment Discontinuity count. + */ + @JsonProperty(value = "discontinuityCount", access = JsonProperty.Access.WRITE_ONLY) + private Long discontinuityCount; + + /* + * Gets Non increasing count. + */ + @JsonProperty(value = "nonincreasingCount", access = JsonProperty.Access.WRITE_ONLY) + private Long nonincreasingCount; + + /* + * Gets a value indicating whether unexpected bitrate is present or not. + */ + @JsonProperty(value = "unexpectedBitrate", access = JsonProperty.Access.WRITE_ONLY) + private Boolean unexpectedBitrate; + + /* + * Gets the state of the live event. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /* + * Gets a value indicating whether preview is healthy or not. + */ + @JsonProperty(value = "healthy", access = JsonProperty.Access.WRITE_ONLY) + private Boolean healthy; + + /** + * Get the trackType property: Gets the type of the track (Audio / Video). + * + * @return the trackType value. + */ + public String getTrackType() { + return this.trackType; + } + + /** + * Get the trackName property: Gets the track name. + * + * @return the trackName value. + */ + public String getTrackName() { + return this.trackName; + } + + /** + * Get the bitrate property: Gets the bitrate of the track. + * + * @return the bitrate value. + */ + public Long getBitrate() { + return this.bitrate; + } + + /** + * Get the incomingBitrate property: Gets the incoming bitrate. + * + * @return the incomingBitrate value. + */ + public Long getIncomingBitrate() { + return this.incomingBitrate; + } + + /** + * Get the lastTimestamp property: Gets the last timestamp. + * + * @return the lastTimestamp value. + */ + public String getLastTimestamp() { + return this.lastTimestamp; + } + + /** + * Get the timescale property: Gets the timescale of the last timestamp. + * + * @return the timescale value. + */ + public String getTimescale() { + return this.timescale; + } + + /** + * Get the overlapCount property: Gets the fragment Overlap count. + * + * @return the overlapCount value. + */ + public Long getOverlapCount() { + return this.overlapCount; + } + + /** + * Get the discontinuityCount property: Gets the fragment Discontinuity count. + * + * @return the discontinuityCount value. + */ + public Long getDiscontinuityCount() { + return this.discontinuityCount; + } + + /** + * Get the nonincreasingCount property: Gets Non increasing count. + * + * @return the nonincreasingCount value. + */ + public Long getNonincreasingCount() { + return this.nonincreasingCount; + } + + /** + * Get the unexpectedBitrate property: Gets a value indicating whether unexpected bitrate is present or not. + * + * @return the unexpectedBitrate value. + */ + public Boolean isUnexpectedBitrate() { + return this.unexpectedBitrate; + } + + /** + * Get the state property: Gets the state of the live event. + * + * @return the state value. + */ + public String getState() { + return this.state; + } + + /** + * Get the healthy property: Gets a value indicating whether preview is healthy or not. + * + * @return the healthy value. + */ + public Boolean isHealthy() { + return this.healthy; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java new file mode 100644 index 0000000000000..9b81a4e68878a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaLiveEventTrackDiscontinuityDetectedEventData model. */ +@Immutable +public final class MediaLiveEventTrackDiscontinuityDetectedEventData { + /* + * Gets the type of the track (Audio / Video). + */ + @JsonProperty(value = "trackType", access = JsonProperty.Access.WRITE_ONLY) + private String trackType; + + /* + * Gets the track name. + */ + @JsonProperty(value = "trackName", access = JsonProperty.Access.WRITE_ONLY) + private String trackName; + + /* + * Gets the bitrate. + */ + @JsonProperty(value = "bitrate", access = JsonProperty.Access.WRITE_ONLY) + private Long bitrate; + + /* + * Gets the timestamp of the previous fragment. + */ + @JsonProperty(value = "previousTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String previousTimestamp; + + /* + * Gets the timestamp of the current fragment. + */ + @JsonProperty(value = "newTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String newTimestamp; + + /* + * Gets the timescale in which both timestamps and discontinuity gap are + * represented. + */ + @JsonProperty(value = "timescale", access = JsonProperty.Access.WRITE_ONLY) + private String timescale; + + /* + * Gets the discontinuity gap between PreviousTimestamp and NewTimestamp. + */ + @JsonProperty(value = "discontinuityGap", access = JsonProperty.Access.WRITE_ONLY) + private String discontinuityGap; + + /** + * Get the trackType property: Gets the type of the track (Audio / Video). + * + * @return the trackType value. + */ + public String getTrackType() { + return this.trackType; + } + + /** + * Get the trackName property: Gets the track name. + * + * @return the trackName value. + */ + public String getTrackName() { + return this.trackName; + } + + /** + * Get the bitrate property: Gets the bitrate. + * + * @return the bitrate value. + */ + public Long getBitrate() { + return this.bitrate; + } + + /** + * Get the previousTimestamp property: Gets the timestamp of the previous fragment. + * + * @return the previousTimestamp value. + */ + public String getPreviousTimestamp() { + return this.previousTimestamp; + } + + /** + * Get the newTimestamp property: Gets the timestamp of the current fragment. + * + * @return the newTimestamp value. + */ + public String getNewTimestamp() { + return this.newTimestamp; + } + + /** + * Get the timescale property: Gets the timescale in which both timestamps and discontinuity gap are represented. + * + * @return the timescale value. + */ + public String getTimescale() { + return this.timescale; + } + + /** + * Get the discontinuityGap property: Gets the discontinuity gap between PreviousTimestamp and NewTimestamp. + * + * @return the discontinuityGap value. + */ + public String getDiscontinuityGap() { + return this.discontinuityGap; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRDBCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRDBCompletedEventData.java new file mode 100644 index 0000000000000..33e6c15184ead --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRDBCompletedEventData.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The RedisExportRDBCompletedEventData model. */ +@Fluent +public final class RedisExportRDBCompletedEventData { + /* + * The time at which the event occurred. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * The name of this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The status of this event. Failed or succeeded + */ + @JsonProperty(value = "status") + private String status; + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The time at which the event occurred. + * + * @param timestamp the timestamp value to set. + * @return the RedisExportRDBCompletedEventData object itself. + */ + public RedisExportRDBCompletedEventData setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the name property: The name of this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of this event. + * + * @param name the name value to set. + * @return the RedisExportRDBCompletedEventData object itself. + */ + public RedisExportRDBCompletedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: The status of this event. Failed or succeeded. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of this event. Failed or succeeded. + * + * @param status the status value to set. + * @return the RedisExportRDBCompletedEventData object itself. + */ + public RedisExportRDBCompletedEventData setStatus(String status) { + this.status = status; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRDBCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRDBCompletedEventData.java new file mode 100644 index 0000000000000..6c860d82905eb --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRDBCompletedEventData.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The RedisImportRDBCompletedEventData model. */ +@Fluent +public final class RedisImportRDBCompletedEventData { + /* + * The time at which the event occurred. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * The name of this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The status of this event. Failed or succeeded + */ + @JsonProperty(value = "status") + private String status; + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The time at which the event occurred. + * + * @param timestamp the timestamp value to set. + * @return the RedisImportRDBCompletedEventData object itself. + */ + public RedisImportRDBCompletedEventData setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the name property: The name of this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of this event. + * + * @param name the name value to set. + * @return the RedisImportRDBCompletedEventData object itself. + */ + public RedisImportRDBCompletedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: The status of this event. Failed or succeeded. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of this event. Failed or succeeded. + * + * @param status the status value to set. + * @return the RedisImportRDBCompletedEventData object itself. + */ + public RedisImportRDBCompletedEventData setStatus(String status) { + this.status = status; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java new file mode 100644 index 0000000000000..9d3d601d0ef2b --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The RedisPatchingCompletedEventData model. */ +@Fluent +public final class RedisPatchingCompletedEventData { + /* + * The time at which the event occurred. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * The name of this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The status of this event. Failed or succeeded + */ + @JsonProperty(value = "status") + private String status; + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The time at which the event occurred. + * + * @param timestamp the timestamp value to set. + * @return the RedisPatchingCompletedEventData object itself. + */ + public RedisPatchingCompletedEventData setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the name property: The name of this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of this event. + * + * @param name the name value to set. + * @return the RedisPatchingCompletedEventData object itself. + */ + public RedisPatchingCompletedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: The status of this event. Failed or succeeded. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of this event. Failed or succeeded. + * + * @param status the status value to set. + * @return the RedisPatchingCompletedEventData object itself. + */ + public RedisPatchingCompletedEventData setStatus(String status) { + this.status = status; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java new file mode 100644 index 0000000000000..01c5df3ca7056 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The RedisScalingCompletedEventData model. */ +@Fluent +public final class RedisScalingCompletedEventData { + /* + * The time at which the event occurred. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * The name of this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The status of this event. Failed or succeeded + */ + @JsonProperty(value = "status") + private String status; + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The time at which the event occurred. + * + * @param timestamp the timestamp value to set. + * @return the RedisScalingCompletedEventData object itself. + */ + public RedisScalingCompletedEventData setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the name property: The name of this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of this event. + * + * @param name the name value to set. + * @return the RedisScalingCompletedEventData object itself. + */ + public RedisScalingCompletedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: The status of this event. Failed or succeeded. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of this event. Failed or succeeded. + * + * @param status the status value to set. + * @return the RedisScalingCompletedEventData object itself. + */ + public RedisScalingCompletedEventData setStatus(String status) { + this.status = status; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelData.java new file mode 100644 index 0000000000000..994ff4912aea0 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceActionCancelData model. */ +@Fluent +public final class ResourceActionCancelData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureData.java new file mode 100644 index 0000000000000..1cb7056025282 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceActionFailureData model. */ +@Fluent +public final class ResourceActionFailureData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessData.java new file mode 100644 index 0000000000000..00f37ae608234 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceActionSuccessData model. */ +@Fluent +public final class ResourceActionSuccessData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelData.java new file mode 100644 index 0000000000000..03fa2422258da --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceDeleteCancelData model. */ +@Fluent +public final class ResourceDeleteCancelData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceDeleteCancelData object itself. + */ + public ResourceDeleteCancelData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureData.java new file mode 100644 index 0000000000000..8b217537c3976 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceDeleteFailureData model. */ +@Fluent +public final class ResourceDeleteFailureData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceDeleteFailureData object itself. + */ + public ResourceDeleteFailureData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessData.java new file mode 100644 index 0000000000000..a82b82a7e60b6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceDeleteSuccessData model. */ +@Fluent +public final class ResourceDeleteSuccessData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceDeleteSuccessData object itself. + */ + public ResourceDeleteSuccessData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteCancelData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteCancelData.java new file mode 100644 index 0000000000000..4f1ebf8e69edf --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteCancelData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceWriteCancelData model. */ +@Fluent +public final class ResourceWriteCancelData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceWriteCancelData object itself. + */ + public ResourceWriteCancelData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureData.java new file mode 100644 index 0000000000000..d1666ed902bbf --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceWriteFailureData model. */ +@Fluent +public final class ResourceWriteFailureData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceWriteFailureData object itself. + */ + public ResourceWriteFailureData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessData.java new file mode 100644 index 0000000000000..5e69800643e0f --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessData.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceWriteSuccessData model. */ +@Fluent +public final class ResourceWriteSuccessData { + /* + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /* + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /* + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /* + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenantId property: The tenant ID of the resource. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of the resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscriptionId property: The subscription ID of the resource. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resource group of the resource. + * + * @return the resourceGroup value. + */ + public String getResourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resourceProvider property: The resource provider performing the operation. + * + * @return the resourceProvider value. + */ + public String getResourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resourceProvider property: The resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the resourceUri property: The URI of the resource in the operation. + * + * @return the resourceUri value. + */ + public String getResourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: The URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operationName property: The operation that was performed. + * + * @return the operationName value. + */ + public String getOperationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation that was performed. + * + * @param operationName the operationName value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status property: The status of the operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the operation. + * + * @param status the status value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the authorization property: The requested authorization for the operation. + * + * @return the authorization value. + */ + public String getAuthorization() { + return this.authorization; + } + + /** + * Set the authorization property: The requested authorization for the operation. + * + * @param authorization the authorization value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the claims property: The properties of the claims. + * + * @return the claims value. + */ + public String getClaims() { + return this.claims; + } + + /** + * Set the claims property: The properties of the claims. + * + * @param claims the claims value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get the correlationId property: An operation ID used for troubleshooting. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: An operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the httpRequest property: The details of the operation. + * + * @return the httpRequest value. + */ + public String getHttpRequest() { + return this.httpRequest; + } + + /** + * Set the httpRequest property: The details of the operation. + * + * @param httpRequest the httpRequest value to set. + * @return the ResourceWriteSuccessData object itself. + */ + public ResourceWriteSuccessData setHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java new file mode 100644 index 0000000000000..0ff020d629410 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ServiceBusActiveMessagesAvailableWithNoListenersEventData model. */ +@Fluent +public final class ServiceBusActiveMessagesAvailableWithNoListenersEventData { + /* + * The namespace name of the Microsoft.ServiceBus resource. + */ + @JsonProperty(value = "namespaceName") + private String namespaceName; + + /* + * The endpoint of the Microsoft.ServiceBus resource. + */ + @JsonProperty(value = "requestUri") + private String requestUri; + + /* + * The entity type of the Microsoft.ServiceBus resource. Could be one of + * 'queue' or 'subscriber'. + */ + @JsonProperty(value = "entityType") + private String entityType; + + /* + * The name of the Microsoft.ServiceBus queue. If the entity type is of + * type 'subscriber', then this value will be null. + */ + @JsonProperty(value = "queueName") + private String queueName; + + /* + * The name of the Microsoft.ServiceBus topic. If the entity type is of + * type 'queue', then this value will be null. + */ + @JsonProperty(value = "topicName") + private String topicName; + + /* + * The name of the Microsoft.ServiceBus topic's subscription. If the entity + * type is of type 'queue', then this value will be null. + */ + @JsonProperty(value = "subscriptionName") + private String subscriptionName; + + /** + * Get the namespaceName property: The namespace name of the Microsoft.ServiceBus resource. + * + * @return the namespaceName value. + */ + public String getNamespaceName() { + return this.namespaceName; + } + + /** + * Set the namespaceName property: The namespace name of the Microsoft.ServiceBus resource. + * + * @param namespaceName the namespaceName value to set. + * @return the ServiceBusActiveMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusActiveMessagesAvailableWithNoListenersEventData setNamespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * Get the requestUri property: The endpoint of the Microsoft.ServiceBus resource. + * + * @return the requestUri value. + */ + public String getRequestUri() { + return this.requestUri; + } + + /** + * Set the requestUri property: The endpoint of the Microsoft.ServiceBus resource. + * + * @param requestUri the requestUri value to set. + * @return the ServiceBusActiveMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusActiveMessagesAvailableWithNoListenersEventData setRequestUri(String requestUri) { + this.requestUri = requestUri; + return this; + } + + /** + * Get the entityType property: The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or + * 'subscriber'. + * + * @return the entityType value. + */ + public String getEntityType() { + return this.entityType; + } + + /** + * Set the entityType property: The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or + * 'subscriber'. + * + * @param entityType the entityType value to set. + * @return the ServiceBusActiveMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusActiveMessagesAvailableWithNoListenersEventData setEntityType(String entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get the queueName property: The name of the Microsoft.ServiceBus queue. If the entity type is of type + * 'subscriber', then this value will be null. + * + * @return the queueName value. + */ + public String getQueueName() { + return this.queueName; + } + + /** + * Set the queueName property: The name of the Microsoft.ServiceBus queue. If the entity type is of type + * 'subscriber', then this value will be null. + * + * @param queueName the queueName value to set. + * @return the ServiceBusActiveMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusActiveMessagesAvailableWithNoListenersEventData setQueueName(String queueName) { + this.queueName = queueName; + return this; + } + + /** + * Get the topicName property: The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', + * then this value will be null. + * + * @return the topicName value. + */ + public String getTopicName() { + return this.topicName; + } + + /** + * Set the topicName property: The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', + * then this value will be null. + * + * @param topicName the topicName value to set. + * @return the ServiceBusActiveMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusActiveMessagesAvailableWithNoListenersEventData setTopicName(String topicName) { + this.topicName = topicName; + return this; + } + + /** + * Get the subscriptionName property: The name of the Microsoft.ServiceBus topic's subscription. If the entity type + * is of type 'queue', then this value will be null. + * + * @return the subscriptionName value. + */ + public String getSubscriptionName() { + return this.subscriptionName; + } + + /** + * Set the subscriptionName property: The name of the Microsoft.ServiceBus topic's subscription. If the entity type + * is of type 'queue', then this value will be null. + * + * @param subscriptionName the subscriptionName value to set. + * @return the ServiceBusActiveMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusActiveMessagesAvailableWithNoListenersEventData setSubscriptionName(String subscriptionName) { + this.subscriptionName = subscriptionName; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java new file mode 100644 index 0000000000000..7c17a5c1ee52a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ServiceBusDeadletterMessagesAvailableWithNoListenersEventData model. */ +@Fluent +public final class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData { + /* + * The namespace name of the Microsoft.ServiceBus resource. + */ + @JsonProperty(value = "namespaceName") + private String namespaceName; + + /* + * The endpoint of the Microsoft.ServiceBus resource. + */ + @JsonProperty(value = "requestUri") + private String requestUri; + + /* + * The entity type of the Microsoft.ServiceBus resource. Could be one of + * 'queue' or 'subscriber'. + */ + @JsonProperty(value = "entityType") + private String entityType; + + /* + * The name of the Microsoft.ServiceBus queue. If the entity type is of + * type 'subscriber', then this value will be null. + */ + @JsonProperty(value = "queueName") + private String queueName; + + /* + * The name of the Microsoft.ServiceBus topic. If the entity type is of + * type 'queue', then this value will be null. + */ + @JsonProperty(value = "topicName") + private String topicName; + + /* + * The name of the Microsoft.ServiceBus topic's subscription. If the entity + * type is of type 'queue', then this value will be null. + */ + @JsonProperty(value = "subscriptionName") + private String subscriptionName; + + /** + * Get the namespaceName property: The namespace name of the Microsoft.ServiceBus resource. + * + * @return the namespaceName value. + */ + public String getNamespaceName() { + return this.namespaceName; + } + + /** + * Set the namespaceName property: The namespace name of the Microsoft.ServiceBus resource. + * + * @param namespaceName the namespaceName value to set. + * @return the ServiceBusDeadletterMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusDeadletterMessagesAvailableWithNoListenersEventData setNamespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * Get the requestUri property: The endpoint of the Microsoft.ServiceBus resource. + * + * @return the requestUri value. + */ + public String getRequestUri() { + return this.requestUri; + } + + /** + * Set the requestUri property: The endpoint of the Microsoft.ServiceBus resource. + * + * @param requestUri the requestUri value to set. + * @return the ServiceBusDeadletterMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusDeadletterMessagesAvailableWithNoListenersEventData setRequestUri(String requestUri) { + this.requestUri = requestUri; + return this; + } + + /** + * Get the entityType property: The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or + * 'subscriber'. + * + * @return the entityType value. + */ + public String getEntityType() { + return this.entityType; + } + + /** + * Set the entityType property: The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or + * 'subscriber'. + * + * @param entityType the entityType value to set. + * @return the ServiceBusDeadletterMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusDeadletterMessagesAvailableWithNoListenersEventData setEntityType(String entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get the queueName property: The name of the Microsoft.ServiceBus queue. If the entity type is of type + * 'subscriber', then this value will be null. + * + * @return the queueName value. + */ + public String getQueueName() { + return this.queueName; + } + + /** + * Set the queueName property: The name of the Microsoft.ServiceBus queue. If the entity type is of type + * 'subscriber', then this value will be null. + * + * @param queueName the queueName value to set. + * @return the ServiceBusDeadletterMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusDeadletterMessagesAvailableWithNoListenersEventData setQueueName(String queueName) { + this.queueName = queueName; + return this; + } + + /** + * Get the topicName property: The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', + * then this value will be null. + * + * @return the topicName value. + */ + public String getTopicName() { + return this.topicName; + } + + /** + * Set the topicName property: The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', + * then this value will be null. + * + * @param topicName the topicName value to set. + * @return the ServiceBusDeadletterMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusDeadletterMessagesAvailableWithNoListenersEventData setTopicName(String topicName) { + this.topicName = topicName; + return this; + } + + /** + * Get the subscriptionName property: The name of the Microsoft.ServiceBus topic's subscription. If the entity type + * is of type 'queue', then this value will be null. + * + * @return the subscriptionName value. + */ + public String getSubscriptionName() { + return this.subscriptionName; + } + + /** + * Set the subscriptionName property: The name of the Microsoft.ServiceBus topic's subscription. If the entity type + * is of type 'queue', then this value will be null. + * + * @param subscriptionName the subscriptionName value to set. + * @return the ServiceBusDeadletterMessagesAvailableWithNoListenersEventData object itself. + */ + public ServiceBusDeadletterMessagesAvailableWithNoListenersEventData setSubscriptionName(String subscriptionName) { + this.subscriptionName = subscriptionName; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java new file mode 100644 index 0000000000000..40cb527c4bb3a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The SignalRServiceClientConnectionConnectedEventData model. */ +@Fluent +public final class SignalRServiceClientConnectionConnectedEventData { + /* + * The time at which the event occurred. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * The hub of connected client connection. + */ + @JsonProperty(value = "hubName") + private String hubName; + + /* + * The connection Id of connected client connection. + */ + @JsonProperty(value = "connectionId") + private String connectionId; + + /* + * The user Id of connected client connection. + */ + @JsonProperty(value = "userId") + private String userId; + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The time at which the event occurred. + * + * @param timestamp the timestamp value to set. + * @return the SignalRServiceClientConnectionConnectedEventData object itself. + */ + public SignalRServiceClientConnectionConnectedEventData setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the hubName property: The hub of connected client connection. + * + * @return the hubName value. + */ + public String getHubName() { + return this.hubName; + } + + /** + * Set the hubName property: The hub of connected client connection. + * + * @param hubName the hubName value to set. + * @return the SignalRServiceClientConnectionConnectedEventData object itself. + */ + public SignalRServiceClientConnectionConnectedEventData setHubName(String hubName) { + this.hubName = hubName; + return this; + } + + /** + * Get the connectionId property: The connection Id of connected client connection. + * + * @return the connectionId value. + */ + public String getConnectionId() { + return this.connectionId; + } + + /** + * Set the connectionId property: The connection Id of connected client connection. + * + * @param connectionId the connectionId value to set. + * @return the SignalRServiceClientConnectionConnectedEventData object itself. + */ + public SignalRServiceClientConnectionConnectedEventData setConnectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Get the userId property: The user Id of connected client connection. + * + * @return the userId value. + */ + public String getUserId() { + return this.userId; + } + + /** + * Set the userId property: The user Id of connected client connection. + * + * @param userId the userId value to set. + * @return the SignalRServiceClientConnectionConnectedEventData object itself. + */ + public SignalRServiceClientConnectionConnectedEventData setUserId(String userId) { + this.userId = userId; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java new file mode 100644 index 0000000000000..98d9b035a7740 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The SignalRServiceClientConnectionDisconnectedEventData model. */ +@Fluent +public final class SignalRServiceClientConnectionDisconnectedEventData { + /* + * The time at which the event occurred. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * The hub of connected client connection. + */ + @JsonProperty(value = "hubName") + private String hubName; + + /* + * The connection Id of connected client connection. + */ + @JsonProperty(value = "connectionId") + private String connectionId; + + /* + * The user Id of connected client connection. + */ + @JsonProperty(value = "userId") + private String userId; + + /* + * The message of error that cause the client connection disconnected. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The time at which the event occurred. + * + * @param timestamp the timestamp value to set. + * @return the SignalRServiceClientConnectionDisconnectedEventData object itself. + */ + public SignalRServiceClientConnectionDisconnectedEventData setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the hubName property: The hub of connected client connection. + * + * @return the hubName value. + */ + public String getHubName() { + return this.hubName; + } + + /** + * Set the hubName property: The hub of connected client connection. + * + * @param hubName the hubName value to set. + * @return the SignalRServiceClientConnectionDisconnectedEventData object itself. + */ + public SignalRServiceClientConnectionDisconnectedEventData setHubName(String hubName) { + this.hubName = hubName; + return this; + } + + /** + * Get the connectionId property: The connection Id of connected client connection. + * + * @return the connectionId value. + */ + public String getConnectionId() { + return this.connectionId; + } + + /** + * Set the connectionId property: The connection Id of connected client connection. + * + * @param connectionId the connectionId value to set. + * @return the SignalRServiceClientConnectionDisconnectedEventData object itself. + */ + public SignalRServiceClientConnectionDisconnectedEventData setConnectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Get the userId property: The user Id of connected client connection. + * + * @return the userId value. + */ + public String getUserId() { + return this.userId; + } + + /** + * Set the userId property: The user Id of connected client connection. + * + * @param userId the userId value to set. + * @return the SignalRServiceClientConnectionDisconnectedEventData object itself. + */ + public SignalRServiceClientConnectionDisconnectedEventData setUserId(String userId) { + this.userId = userId; + return this; + } + + /** + * Get the errorMessage property: The message of error that cause the client connection disconnected. + * + * @return the errorMessage value. + */ + public String getErrorMessage() { + return this.errorMessage; + } + + /** + * Set the errorMessage property: The message of error that cause the client connection disconnected. + * + * @param errorMessage the errorMessage value to set. + * @return the SignalRServiceClientConnectionDisconnectedEventData object itself. + */ + public SignalRServiceClientConnectionDisconnectedEventData setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StampKind.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StampKind.java new file mode 100644 index 0000000000000..880cd72f2bd87 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StampKind.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +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 StampKind. */ +public final class StampKind extends ExpandableStringEnum { + /** Static value Public for StampKind. */ + public static final StampKind PUBLIC = fromString("Public"); + + /** Static value AseV1 for StampKind. */ + public static final StampKind ASE_V1 = fromString("AseV1"); + + /** Static value AseV2 for StampKind. */ + public static final StampKind ASE_V2 = fromString("AseV2"); + + /** + * Creates or finds a StampKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding StampKind. + */ + @JsonCreator + public static StampKind fromString(String name) { + return fromString(name, StampKind.class); + } + + /** @return known StampKind values. */ + public static Collection values() { + return values(StampKind.class); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java new file mode 100644 index 0000000000000..d3f0cf3e11467 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StorageBlobCreatedEventData model. */ +@Fluent +public final class StorageBlobCreatedEventData { + /* + * The name of the API/operation that triggered this event. + */ + @JsonProperty(value = "api") + private String api; + + /* + * A request id provided by the client of the storage API operation that + * triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The request id generated by the Storage service for the storage API + * operation that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * The etag of the blob at the time this event was triggered. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * The content type of the blob. This is the same as what would be returned + * in the Content-Type header from the blob. + */ + @JsonProperty(value = "contentType") + private String contentType; + + /* + * The size of the blob in bytes. This is the same as what would be + * returned in the Content-Length header from the blob. + */ + @JsonProperty(value = "contentLength") + private Long contentLength; + + /* + * The offset of the blob in bytes. + */ + @JsonProperty(value = "contentOffset") + private Long contentOffset; + + /* + * The type of blob. + */ + @JsonProperty(value = "blobType") + private String blobType; + + /* + * The path to the blob. + */ + @JsonProperty(value = "url") + private String url; + + /* + * An opaque string value representing the logical sequence of events for + * any particular blob name. Users can use standard string comparison to + * understand the relative sequence of two events on the same blob name. + */ + @JsonProperty(value = "sequencer") + private String sequencer; + + /* + * The identity of the requester that triggered this event. + */ + @JsonProperty(value = "identity") + private String identity; + + /* + * For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + */ + @JsonProperty(value = "storageDiagnostics") + private Object storageDiagnostics; + + /** + * Get the api property: The name of the API/operation that triggered this event. + * + * @return the api value. + */ + public String getApi() { + return this.api; + } + + /** + * Set the api property: The name of the API/operation that triggered this event. + * + * @param api the api value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setApi(String api) { + this.api = api; + return this; + } + + /** + * Get the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the Storage service for the storage API operation that + * triggered this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the Storage service for the storage API operation that + * triggered this event. + * + * @param requestId the requestId value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the eTag property: The etag of the blob at the time this event was triggered. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The etag of the blob at the time this event was triggered. + * + * @param eTag the eTag value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the contentType property: The content type of the blob. This is the same as what would be returned in the + * Content-Type header from the blob. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content type of the blob. This is the same as what would be returned in the + * Content-Type header from the blob. + * + * @param contentType the contentType value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the contentLength property: The size of the blob in bytes. This is the same as what would be returned in the + * Content-Length header from the blob. + * + * @return the contentLength value. + */ + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property: The size of the blob in bytes. This is the same as what would be returned in the + * Content-Length header from the blob. + * + * @param contentLength the contentLength value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * Get the contentOffset property: The offset of the blob in bytes. + * + * @return the contentOffset value. + */ + public Long getContentOffset() { + return this.contentOffset; + } + + /** + * Set the contentOffset property: The offset of the blob in bytes. + * + * @param contentOffset the contentOffset value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setContentOffset(Long contentOffset) { + this.contentOffset = contentOffset; + return this; + } + + /** + * Get the blobType property: The type of blob. + * + * @return the blobType value. + */ + public String getBlobType() { + return this.blobType; + } + + /** + * Set the blobType property: The type of blob. + * + * @param blobType the blobType value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setBlobType(String blobType) { + this.blobType = blobType; + return this; + } + + /** + * Get the url property: The path to the blob. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Set the url property: The path to the blob. + * + * @param url the url value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the sequencer property: An opaque string value representing the logical sequence of events for any particular + * blob name. Users can use standard string comparison to understand the relative sequence of two events on the same + * blob name. + * + * @return the sequencer value. + */ + public String getSequencer() { + return this.sequencer; + } + + /** + * Set the sequencer property: An opaque string value representing the logical sequence of events for any particular + * blob name. Users can use standard string comparison to understand the relative sequence of two events on the same + * blob name. + * + * @param sequencer the sequencer value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setSequencer(String sequencer) { + this.sequencer = sequencer; + return this; + } + + /** + * Get the identity property: The identity of the requester that triggered this event. + * + * @return the identity value. + */ + public String getIdentity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the requester that triggered this event. + * + * @param identity the identity value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @return the storageDiagnostics value. + */ + public Object getStorageDiagnostics() { + return this.storageDiagnostics; + } + + /** + * Set the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @param storageDiagnostics the storageDiagnostics value to set. + * @return the StorageBlobCreatedEventData object itself. + */ + public StorageBlobCreatedEventData setStorageDiagnostics(Object storageDiagnostics) { + this.storageDiagnostics = storageDiagnostics; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobDeletedEventData.java new file mode 100644 index 0000000000000..75064011575df --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobDeletedEventData.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StorageBlobDeletedEventData model. */ +@Fluent +public final class StorageBlobDeletedEventData { + /* + * The name of the API/operation that triggered this event. + */ + @JsonProperty(value = "api") + private String api; + + /* + * A request id provided by the client of the storage API operation that + * triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The request id generated by the Storage service for the storage API + * operation that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * The content type of the blob. This is the same as what would be returned + * in the Content-Type header from the blob. + */ + @JsonProperty(value = "contentType") + private String contentType; + + /* + * The type of blob. + */ + @JsonProperty(value = "blobType") + private String blobType; + + /* + * The path to the blob. + */ + @JsonProperty(value = "url") + private String url; + + /* + * An opaque string value representing the logical sequence of events for + * any particular blob name. Users can use standard string comparison to + * understand the relative sequence of two events on the same blob name. + */ + @JsonProperty(value = "sequencer") + private String sequencer; + + /* + * The identity of the requester that triggered this event. + */ + @JsonProperty(value = "identity") + private String identity; + + /* + * For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + */ + @JsonProperty(value = "storageDiagnostics") + private Object storageDiagnostics; + + /** + * Get the api property: The name of the API/operation that triggered this event. + * + * @return the api value. + */ + public String getApi() { + return this.api; + } + + /** + * Set the api property: The name of the API/operation that triggered this event. + * + * @param api the api value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setApi(String api) { + this.api = api; + return this; + } + + /** + * Get the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the Storage service for the storage API operation that + * triggered this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the Storage service for the storage API operation that + * triggered this event. + * + * @param requestId the requestId value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the contentType property: The content type of the blob. This is the same as what would be returned in the + * Content-Type header from the blob. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content type of the blob. This is the same as what would be returned in the + * Content-Type header from the blob. + * + * @param contentType the contentType value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the blobType property: The type of blob. + * + * @return the blobType value. + */ + public String getBlobType() { + return this.blobType; + } + + /** + * Set the blobType property: The type of blob. + * + * @param blobType the blobType value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setBlobType(String blobType) { + this.blobType = blobType; + return this; + } + + /** + * Get the url property: The path to the blob. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Set the url property: The path to the blob. + * + * @param url the url value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the sequencer property: An opaque string value representing the logical sequence of events for any particular + * blob name. Users can use standard string comparison to understand the relative sequence of two events on the same + * blob name. + * + * @return the sequencer value. + */ + public String getSequencer() { + return this.sequencer; + } + + /** + * Set the sequencer property: An opaque string value representing the logical sequence of events for any particular + * blob name. Users can use standard string comparison to understand the relative sequence of two events on the same + * blob name. + * + * @param sequencer the sequencer value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setSequencer(String sequencer) { + this.sequencer = sequencer; + return this; + } + + /** + * Get the identity property: The identity of the requester that triggered this event. + * + * @return the identity value. + */ + public String getIdentity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the requester that triggered this event. + * + * @param identity the identity value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @return the storageDiagnostics value. + */ + public Object getStorageDiagnostics() { + return this.storageDiagnostics; + } + + /** + * Set the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @param storageDiagnostics the storageDiagnostics value to set. + * @return the StorageBlobDeletedEventData object itself. + */ + public StorageBlobDeletedEventData setStorageDiagnostics(Object storageDiagnostics) { + this.storageDiagnostics = storageDiagnostics; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java new file mode 100644 index 0000000000000..4cc91a94ad1e5 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StorageBlobRenamedEventData model. */ +@Fluent +public final class StorageBlobRenamedEventData { + /* + * The name of the API/operation that triggered this event. + */ + @JsonProperty(value = "api") + private String api; + + /* + * A request id provided by the client of the storage API operation that + * triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The request id generated by the storage service for the storage API + * operation that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * The path to the blob that was renamed. + */ + @JsonProperty(value = "sourceUrl") + private String sourceUrl; + + /* + * The new path to the blob after the rename operation. + */ + @JsonProperty(value = "destinationUrl") + private String destinationUrl; + + /* + * An opaque string value representing the logical sequence of events for + * any particular blob name. Users can use standard string comparison to + * understand the relative sequence of two events on the same blob name. + */ + @JsonProperty(value = "sequencer") + private String sequencer; + + /* + * The identity of the requester that triggered this event. + */ + @JsonProperty(value = "identity") + private String identity; + + /* + * For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + */ + @JsonProperty(value = "storageDiagnostics") + private Object storageDiagnostics; + + /** + * Get the api property: The name of the API/operation that triggered this event. + * + * @return the api value. + */ + public String getApi() { + return this.api; + } + + /** + * Set the api property: The name of the API/operation that triggered this event. + * + * @param api the api value to set. + * @return the StorageBlobRenamedEventData object itself. + */ + public StorageBlobRenamedEventData setApi(String api) { + this.api = api; + return this; + } + + /** + * Get the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the StorageBlobRenamedEventData object itself. + */ + public StorageBlobRenamedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the storage service for the storage API operation that + * triggered this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the storage service for the storage API operation that + * triggered this event. + * + * @param requestId the requestId value to set. + * @return the StorageBlobRenamedEventData object itself. + */ + public StorageBlobRenamedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the sourceUrl property: The path to the blob that was renamed. + * + * @return the sourceUrl value. + */ + public String getSourceUrl() { + return this.sourceUrl; + } + + /** + * Set the sourceUrl property: The path to the blob that was renamed. + * + * @param sourceUrl the sourceUrl value to set. + * @return the StorageBlobRenamedEventData object itself. + */ + public StorageBlobRenamedEventData setSourceUrl(String sourceUrl) { + this.sourceUrl = sourceUrl; + return this; + } + + /** + * Get the destinationUrl property: The new path to the blob after the rename operation. + * + * @return the destinationUrl value. + */ + public String getDestinationUrl() { + return this.destinationUrl; + } + + /** + * Set the destinationUrl property: The new path to the blob after the rename operation. + * + * @param destinationUrl the destinationUrl value to set. + * @return the StorageBlobRenamedEventData object itself. + */ + public StorageBlobRenamedEventData setDestinationUrl(String destinationUrl) { + this.destinationUrl = destinationUrl; + return this; + } + + /** + * Get the sequencer property: An opaque string value representing the logical sequence of events for any particular + * blob name. Users can use standard string comparison to understand the relative sequence of two events on the same + * blob name. + * + * @return the sequencer value. + */ + public String getSequencer() { + return this.sequencer; + } + + /** + * Set the sequencer property: An opaque string value representing the logical sequence of events for any particular + * blob name. Users can use standard string comparison to understand the relative sequence of two events on the same + * blob name. + * + * @param sequencer the sequencer value to set. + * @return the StorageBlobRenamedEventData object itself. + */ + public StorageBlobRenamedEventData setSequencer(String sequencer) { + this.sequencer = sequencer; + return this; + } + + /** + * Get the identity property: The identity of the requester that triggered this event. + * + * @return the identity value. + */ + public String getIdentity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the requester that triggered this event. + * + * @param identity the identity value to set. + * @return the StorageBlobRenamedEventData object itself. + */ + public StorageBlobRenamedEventData setIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @return the storageDiagnostics value. + */ + public Object getStorageDiagnostics() { + return this.storageDiagnostics; + } + + /** + * Set the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @param storageDiagnostics the storageDiagnostics value to set. + * @return the StorageBlobRenamedEventData object itself. + */ + public StorageBlobRenamedEventData setStorageDiagnostics(Object storageDiagnostics) { + this.storageDiagnostics = storageDiagnostics; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryCreatedEventData.java new file mode 100644 index 0000000000000..c96e2bfab6257 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryCreatedEventData.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StorageDirectoryCreatedEventData model. */ +@Fluent +public final class StorageDirectoryCreatedEventData { + /* + * The name of the API/operation that triggered this event. + */ + @JsonProperty(value = "api") + private String api; + + /* + * A request id provided by the client of the storage API operation that + * triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The request id generated by the storage service for the storage API + * operation that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * The etag of the directory at the time this event was triggered. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * The path to the directory. + */ + @JsonProperty(value = "url") + private String url; + + /* + * An opaque string value representing the logical sequence of events for + * any particular directory name. Users can use standard string comparison + * to understand the relative sequence of two events on the same directory + * name. + */ + @JsonProperty(value = "sequencer") + private String sequencer; + + /* + * The identity of the requester that triggered this event. + */ + @JsonProperty(value = "identity") + private String identity; + + /* + * For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + */ + @JsonProperty(value = "storageDiagnostics") + private Object storageDiagnostics; + + /** + * Get the api property: The name of the API/operation that triggered this event. + * + * @return the api value. + */ + public String getApi() { + return this.api; + } + + /** + * Set the api property: The name of the API/operation that triggered this event. + * + * @param api the api value to set. + * @return the StorageDirectoryCreatedEventData object itself. + */ + public StorageDirectoryCreatedEventData setApi(String api) { + this.api = api; + return this; + } + + /** + * Get the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the StorageDirectoryCreatedEventData object itself. + */ + public StorageDirectoryCreatedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the storage service for the storage API operation that + * triggered this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the storage service for the storage API operation that + * triggered this event. + * + * @param requestId the requestId value to set. + * @return the StorageDirectoryCreatedEventData object itself. + */ + public StorageDirectoryCreatedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the eTag property: The etag of the directory at the time this event was triggered. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The etag of the directory at the time this event was triggered. + * + * @param eTag the eTag value to set. + * @return the StorageDirectoryCreatedEventData object itself. + */ + public StorageDirectoryCreatedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the url property: The path to the directory. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Set the url property: The path to the directory. + * + * @param url the url value to set. + * @return the StorageDirectoryCreatedEventData object itself. + */ + public StorageDirectoryCreatedEventData setUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the sequencer property: An opaque string value representing the logical sequence of events for any particular + * directory name. Users can use standard string comparison to understand the relative sequence of two events on the + * same directory name. + * + * @return the sequencer value. + */ + public String getSequencer() { + return this.sequencer; + } + + /** + * Set the sequencer property: An opaque string value representing the logical sequence of events for any particular + * directory name. Users can use standard string comparison to understand the relative sequence of two events on the + * same directory name. + * + * @param sequencer the sequencer value to set. + * @return the StorageDirectoryCreatedEventData object itself. + */ + public StorageDirectoryCreatedEventData setSequencer(String sequencer) { + this.sequencer = sequencer; + return this; + } + + /** + * Get the identity property: The identity of the requester that triggered this event. + * + * @return the identity value. + */ + public String getIdentity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the requester that triggered this event. + * + * @param identity the identity value to set. + * @return the StorageDirectoryCreatedEventData object itself. + */ + public StorageDirectoryCreatedEventData setIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @return the storageDiagnostics value. + */ + public Object getStorageDiagnostics() { + return this.storageDiagnostics; + } + + /** + * Set the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @param storageDiagnostics the storageDiagnostics value to set. + * @return the StorageDirectoryCreatedEventData object itself. + */ + public StorageDirectoryCreatedEventData setStorageDiagnostics(Object storageDiagnostics) { + this.storageDiagnostics = storageDiagnostics; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryDeletedEventData.java new file mode 100644 index 0000000000000..1242dba500759 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryDeletedEventData.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StorageDirectoryDeletedEventData model. */ +@Fluent +public final class StorageDirectoryDeletedEventData { + /* + * The name of the API/operation that triggered this event. + */ + @JsonProperty(value = "api") + private String api; + + /* + * A request id provided by the client of the storage API operation that + * triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The request id generated by the storage service for the storage API + * operation that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * The path to the deleted directory. + */ + @JsonProperty(value = "url") + private String url; + + /* + * Is this event for a recursive delete operation. + */ + @JsonProperty(value = "recursive") + private Boolean recursive; + + /* + * An opaque string value representing the logical sequence of events for + * any particular directory name. Users can use standard string comparison + * to understand the relative sequence of two events on the same directory + * name. + */ + @JsonProperty(value = "sequencer") + private String sequencer; + + /* + * The identity of the requester that triggered this event. + */ + @JsonProperty(value = "identity") + private String identity; + + /* + * For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + */ + @JsonProperty(value = "storageDiagnostics") + private Object storageDiagnostics; + + /** + * Get the api property: The name of the API/operation that triggered this event. + * + * @return the api value. + */ + public String getApi() { + return this.api; + } + + /** + * Set the api property: The name of the API/operation that triggered this event. + * + * @param api the api value to set. + * @return the StorageDirectoryDeletedEventData object itself. + */ + public StorageDirectoryDeletedEventData setApi(String api) { + this.api = api; + return this; + } + + /** + * Get the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the StorageDirectoryDeletedEventData object itself. + */ + public StorageDirectoryDeletedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the storage service for the storage API operation that + * triggered this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the storage service for the storage API operation that + * triggered this event. + * + * @param requestId the requestId value to set. + * @return the StorageDirectoryDeletedEventData object itself. + */ + public StorageDirectoryDeletedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the url property: The path to the deleted directory. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Set the url property: The path to the deleted directory. + * + * @param url the url value to set. + * @return the StorageDirectoryDeletedEventData object itself. + */ + public StorageDirectoryDeletedEventData setUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the recursive property: Is this event for a recursive delete operation. + * + * @return the recursive value. + */ + public Boolean isRecursive() { + return this.recursive; + } + + /** + * Set the recursive property: Is this event for a recursive delete operation. + * + * @param recursive the recursive value to set. + * @return the StorageDirectoryDeletedEventData object itself. + */ + public StorageDirectoryDeletedEventData setRecursive(Boolean recursive) { + this.recursive = recursive; + return this; + } + + /** + * Get the sequencer property: An opaque string value representing the logical sequence of events for any particular + * directory name. Users can use standard string comparison to understand the relative sequence of two events on the + * same directory name. + * + * @return the sequencer value. + */ + public String getSequencer() { + return this.sequencer; + } + + /** + * Set the sequencer property: An opaque string value representing the logical sequence of events for any particular + * directory name. Users can use standard string comparison to understand the relative sequence of two events on the + * same directory name. + * + * @param sequencer the sequencer value to set. + * @return the StorageDirectoryDeletedEventData object itself. + */ + public StorageDirectoryDeletedEventData setSequencer(String sequencer) { + this.sequencer = sequencer; + return this; + } + + /** + * Get the identity property: The identity of the requester that triggered this event. + * + * @return the identity value. + */ + public String getIdentity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the requester that triggered this event. + * + * @param identity the identity value to set. + * @return the StorageDirectoryDeletedEventData object itself. + */ + public StorageDirectoryDeletedEventData setIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @return the storageDiagnostics value. + */ + public Object getStorageDiagnostics() { + return this.storageDiagnostics; + } + + /** + * Set the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @param storageDiagnostics the storageDiagnostics value to set. + * @return the StorageDirectoryDeletedEventData object itself. + */ + public StorageDirectoryDeletedEventData setStorageDiagnostics(Object storageDiagnostics) { + this.storageDiagnostics = storageDiagnostics; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryRenamedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryRenamedEventData.java new file mode 100644 index 0000000000000..19f7e73c83efe --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryRenamedEventData.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StorageDirectoryRenamedEventData model. */ +@Fluent +public final class StorageDirectoryRenamedEventData { + /* + * The name of the API/operation that triggered this event. + */ + @JsonProperty(value = "api") + private String api; + + /* + * A request id provided by the client of the storage API operation that + * triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The request id generated by the storage service for the storage API + * operation that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * The path to the directory that was renamed. + */ + @JsonProperty(value = "sourceUrl") + private String sourceUrl; + + /* + * The new path to the directory after the rename operation. + */ + @JsonProperty(value = "destinationUrl") + private String destinationUrl; + + /* + * An opaque string value representing the logical sequence of events for + * any particular directory name. Users can use standard string comparison + * to understand the relative sequence of two events on the same directory + * name. + */ + @JsonProperty(value = "sequencer") + private String sequencer; + + /* + * The identity of the requester that triggered this event. + */ + @JsonProperty(value = "identity") + private String identity; + + /* + * For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + */ + @JsonProperty(value = "storageDiagnostics") + private Object storageDiagnostics; + + /** + * Get the api property: The name of the API/operation that triggered this event. + * + * @return the api value. + */ + public String getApi() { + return this.api; + } + + /** + * Set the api property: The name of the API/operation that triggered this event. + * + * @param api the api value to set. + * @return the StorageDirectoryRenamedEventData object itself. + */ + public StorageDirectoryRenamedEventData setApi(String api) { + this.api = api; + return this; + } + + /** + * Get the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the StorageDirectoryRenamedEventData object itself. + */ + public StorageDirectoryRenamedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the storage service for the storage API operation that + * triggered this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the storage service for the storage API operation that + * triggered this event. + * + * @param requestId the requestId value to set. + * @return the StorageDirectoryRenamedEventData object itself. + */ + public StorageDirectoryRenamedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the sourceUrl property: The path to the directory that was renamed. + * + * @return the sourceUrl value. + */ + public String getSourceUrl() { + return this.sourceUrl; + } + + /** + * Set the sourceUrl property: The path to the directory that was renamed. + * + * @param sourceUrl the sourceUrl value to set. + * @return the StorageDirectoryRenamedEventData object itself. + */ + public StorageDirectoryRenamedEventData setSourceUrl(String sourceUrl) { + this.sourceUrl = sourceUrl; + return this; + } + + /** + * Get the destinationUrl property: The new path to the directory after the rename operation. + * + * @return the destinationUrl value. + */ + public String getDestinationUrl() { + return this.destinationUrl; + } + + /** + * Set the destinationUrl property: The new path to the directory after the rename operation. + * + * @param destinationUrl the destinationUrl value to set. + * @return the StorageDirectoryRenamedEventData object itself. + */ + public StorageDirectoryRenamedEventData setDestinationUrl(String destinationUrl) { + this.destinationUrl = destinationUrl; + return this; + } + + /** + * Get the sequencer property: An opaque string value representing the logical sequence of events for any particular + * directory name. Users can use standard string comparison to understand the relative sequence of two events on the + * same directory name. + * + * @return the sequencer value. + */ + public String getSequencer() { + return this.sequencer; + } + + /** + * Set the sequencer property: An opaque string value representing the logical sequence of events for any particular + * directory name. Users can use standard string comparison to understand the relative sequence of two events on the + * same directory name. + * + * @param sequencer the sequencer value to set. + * @return the StorageDirectoryRenamedEventData object itself. + */ + public StorageDirectoryRenamedEventData setSequencer(String sequencer) { + this.sequencer = sequencer; + return this; + } + + /** + * Get the identity property: The identity of the requester that triggered this event. + * + * @return the identity value. + */ + public String getIdentity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the requester that triggered this event. + * + * @param identity the identity value to set. + * @return the StorageDirectoryRenamedEventData object itself. + */ + public StorageDirectoryRenamedEventData setIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @return the storageDiagnostics value. + */ + public Object getStorageDiagnostics() { + return this.storageDiagnostics; + } + + /** + * Set the storageDiagnostics property: For service use only. Diagnostic data occasionally included by the Azure + * Storage service. This property should be ignored by event consumers. + * + * @param storageDiagnostics the storageDiagnostics value to set. + * @return the StorageDirectoryRenamedEventData object itself. + */ + public StorageDirectoryRenamedEventData setStorageDiagnostics(Object storageDiagnostics) { + this.storageDiagnostics = storageDiagnostics; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyActionSummaryDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyActionSummaryDetail.java new file mode 100644 index 0000000000000..fc16e81b4c6f9 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyActionSummaryDetail.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StorageLifecyclePolicyActionSummaryDetail model. */ +@Fluent +public final class StorageLifecyclePolicyActionSummaryDetail { + /* + * Total number of objects to be acted on by this action. + */ + @JsonProperty(value = "totalObjectsCount") + private Long totalObjectsCount; + + /* + * Number of success operations of this action. + */ + @JsonProperty(value = "successCount") + private Long successCount; + + /* + * Error messages of this action if any. + */ + @JsonProperty(value = "errorList") + private String errorList; + + /** + * Get the totalObjectsCount property: Total number of objects to be acted on by this action. + * + * @return the totalObjectsCount value. + */ + public Long getTotalObjectsCount() { + return this.totalObjectsCount; + } + + /** + * Set the totalObjectsCount property: Total number of objects to be acted on by this action. + * + * @param totalObjectsCount the totalObjectsCount value to set. + * @return the StorageLifecyclePolicyActionSummaryDetail object itself. + */ + public StorageLifecyclePolicyActionSummaryDetail setTotalObjectsCount(Long totalObjectsCount) { + this.totalObjectsCount = totalObjectsCount; + return this; + } + + /** + * Get the successCount property: Number of success operations of this action. + * + * @return the successCount value. + */ + public Long getSuccessCount() { + return this.successCount; + } + + /** + * Set the successCount property: Number of success operations of this action. + * + * @param successCount the successCount value to set. + * @return the StorageLifecyclePolicyActionSummaryDetail object itself. + */ + public StorageLifecyclePolicyActionSummaryDetail setSuccessCount(Long successCount) { + this.successCount = successCount; + return this; + } + + /** + * Get the errorList property: Error messages of this action if any. + * + * @return the errorList value. + */ + public String getErrorList() { + return this.errorList; + } + + /** + * Set the errorList property: Error messages of this action if any. + * + * @param errorList the errorList value to set. + * @return the StorageLifecyclePolicyActionSummaryDetail object itself. + */ + public StorageLifecyclePolicyActionSummaryDetail setErrorList(String errorList) { + this.errorList = errorList; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyCompletedEventData.java new file mode 100644 index 0000000000000..e353f7e3caed3 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyCompletedEventData.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StorageLifecyclePolicyCompletedEventData model. */ +@Fluent +public final class StorageLifecyclePolicyCompletedEventData { + /* + * The time the policy task was scheduled. + */ + @JsonProperty(value = "scheduleTime") + private String scheduleTime; + + /* + * Execution statistics of a specific policy action in a Blob Management + * cycle. + */ + @JsonProperty(value = "deleteSummary") + private StorageLifecyclePolicyActionSummaryDetail deleteSummary; + + /* + * Execution statistics of a specific policy action in a Blob Management + * cycle. + */ + @JsonProperty(value = "tierToCoolSummary") + private StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary; + + /* + * Execution statistics of a specific policy action in a Blob Management + * cycle. + */ + @JsonProperty(value = "tierToArchiveSummary") + private StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary; + + /** + * Get the scheduleTime property: The time the policy task was scheduled. + * + * @return the scheduleTime value. + */ + public String getScheduleTime() { + return this.scheduleTime; + } + + /** + * Set the scheduleTime property: The time the policy task was scheduled. + * + * @param scheduleTime the scheduleTime value to set. + * @return the StorageLifecyclePolicyCompletedEventData object itself. + */ + public StorageLifecyclePolicyCompletedEventData setScheduleTime(String scheduleTime) { + this.scheduleTime = scheduleTime; + return this; + } + + /** + * Get the deleteSummary property: Execution statistics of a specific policy action in a Blob Management cycle. + * + * @return the deleteSummary value. + */ + public StorageLifecyclePolicyActionSummaryDetail getDeleteSummary() { + return this.deleteSummary; + } + + /** + * Set the deleteSummary property: Execution statistics of a specific policy action in a Blob Management cycle. + * + * @param deleteSummary the deleteSummary value to set. + * @return the StorageLifecyclePolicyCompletedEventData object itself. + */ + public StorageLifecyclePolicyCompletedEventData setDeleteSummary( + StorageLifecyclePolicyActionSummaryDetail deleteSummary) { + this.deleteSummary = deleteSummary; + return this; + } + + /** + * Get the tierToCoolSummary property: Execution statistics of a specific policy action in a Blob Management cycle. + * + * @return the tierToCoolSummary value. + */ + public StorageLifecyclePolicyActionSummaryDetail getTierToCoolSummary() { + return this.tierToCoolSummary; + } + + /** + * Set the tierToCoolSummary property: Execution statistics of a specific policy action in a Blob Management cycle. + * + * @param tierToCoolSummary the tierToCoolSummary value to set. + * @return the StorageLifecyclePolicyCompletedEventData object itself. + */ + public StorageLifecyclePolicyCompletedEventData setTierToCoolSummary( + StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary) { + this.tierToCoolSummary = tierToCoolSummary; + return this; + } + + /** + * Get the tierToArchiveSummary property: Execution statistics of a specific policy action in a Blob Management + * cycle. + * + * @return the tierToArchiveSummary value. + */ + public StorageLifecyclePolicyActionSummaryDetail getTierToArchiveSummary() { + return this.tierToArchiveSummary; + } + + /** + * Set the tierToArchiveSummary property: Execution statistics of a specific policy action in a Blob Management + * cycle. + * + * @param tierToArchiveSummary the tierToArchiveSummary value to set. + * @return the StorageLifecyclePolicyCompletedEventData object itself. + */ + public StorageLifecyclePolicyCompletedEventData setTierToArchiveSummary( + StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary) { + this.tierToArchiveSummary = tierToArchiveSummary; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java new file mode 100644 index 0000000000000..616b48febe443 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SubscriptionDeletedEventData model. */ +@Immutable +public final class SubscriptionDeletedEventData { + /* + * The Azure resource ID of the deleted event subscription. + */ + @JsonProperty(value = "eventSubscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String eventSubscriptionId; + + /** + * Get the eventSubscriptionId property: The Azure resource ID of the deleted event subscription. + * + * @return the eventSubscriptionId value. + */ + public String getEventSubscriptionId() { + return this.eventSubscriptionId; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java new file mode 100644 index 0000000000000..9ed9697d820fc --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SubscriptionValidationEventData model. */ +@Immutable +public final class SubscriptionValidationEventData { + /* + * The validation code sent by Azure Event Grid to validate an event + * subscription. To complete the validation handshake, the subscriber must + * either respond with this validation code as part of the validation + * response, or perform a GET request on the validationUrl (available + * starting version 2018-05-01-preview). + */ + @JsonProperty(value = "validationCode", access = JsonProperty.Access.WRITE_ONLY) + private String validationCode; + + /* + * The validation URL sent by Azure Event Grid (available starting version + * 2018-05-01-preview). To complete the validation handshake, the + * subscriber must either respond with the validationCode as part of the + * validation response, or perform a GET request on the validationUrl + * (available starting version 2018-05-01-preview). + */ + @JsonProperty(value = "validationUrl", access = JsonProperty.Access.WRITE_ONLY) + private String validationUrl; + + /** + * Get the validationCode property: The validation code sent by Azure Event Grid to validate an event subscription. + * To complete the validation handshake, the subscriber must either respond with this validation code as part of the + * validation response, or perform a GET request on the validationUrl (available starting version + * 2018-05-01-preview). + * + * @return the validationCode value. + */ + public String getValidationCode() { + return this.validationCode; + } + + /** + * Get the validationUrl property: The validation URL sent by Azure Event Grid (available starting version + * 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond with the + * validationCode as part of the validation response, or perform a GET request on the validationUrl (available + * starting version 2018-05-01-preview). + * + * @return the validationUrl value. + */ + public String getValidationUrl() { + return this.validationUrl; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java new file mode 100644 index 0000000000000..0e56f78769296 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SubscriptionValidationResponse model. */ +@Fluent +public final class SubscriptionValidationResponse { + /* + * The validation response sent by the subscriber to Azure Event Grid to + * complete the validation of an event subscription. + */ + @JsonProperty(value = "validationResponse") + private String validationResponse; + + /** + * Get the validationResponse property: The validation response sent by the subscriber to Azure Event Grid to + * complete the validation of an event subscription. + * + * @return the validationResponse value. + */ + public String getValidationResponse() { + return this.validationResponse; + } + + /** + * Set the validationResponse property: The validation response sent by the subscriber to Azure Event Grid to + * complete the validation of an event subscription. + * + * @param validationResponse the validationResponse value to set. + * @return the SubscriptionValidationResponse object itself. + */ + public SubscriptionValidationResponse setValidationResponse(String validationResponse) { + this.validationResponse = validationResponse; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java new file mode 100644 index 0000000000000..0a79c14d3a739 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebAppServicePlanUpdatedEventData model. */ +@Fluent +public final class WebAppServicePlanUpdatedEventData { + /* + * Detail of action on the app service plan. + */ + @JsonProperty(value = "appServicePlanEventTypeDetail") + private AppServicePlanEventTypeDetail appServicePlanEventTypeDetail; + + /* + * sku of app service plan. + */ + @JsonProperty(value = "sku") + private WebAppServicePlanUpdatedEventDataSku sku; + + /* + * name of the app service plan that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the app service + * plan API operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the app + * service plan API operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the app service plan API + * operation that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appServicePlanEventTypeDetail property: Detail of action on the app service plan. + * + * @return the appServicePlanEventTypeDetail value. + */ + public AppServicePlanEventTypeDetail getAppServicePlanEventTypeDetail() { + return this.appServicePlanEventTypeDetail; + } + + /** + * Set the appServicePlanEventTypeDetail property: Detail of action on the app service plan. + * + * @param appServicePlanEventTypeDetail the appServicePlanEventTypeDetail value to set. + * @return the WebAppServicePlanUpdatedEventData object itself. + */ + public WebAppServicePlanUpdatedEventData setAppServicePlanEventTypeDetail( + AppServicePlanEventTypeDetail appServicePlanEventTypeDetail) { + this.appServicePlanEventTypeDetail = appServicePlanEventTypeDetail; + return this; + } + + /** + * Get the sku property: sku of app service plan. + * + * @return the sku value. + */ + public WebAppServicePlanUpdatedEventDataSku getSku() { + return this.sku; + } + + /** + * Set the sku property: sku of app service plan. + * + * @param sku the sku value to set. + * @return the WebAppServicePlanUpdatedEventData object itself. + */ + public WebAppServicePlanUpdatedEventData setSku(WebAppServicePlanUpdatedEventDataSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the name property: name of the app service plan that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the app service plan that had this event. + * + * @param name the name value to set. + * @return the WebAppServicePlanUpdatedEventData object itself. + */ + public WebAppServicePlanUpdatedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the app service plan API + * operation that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the app service plan API + * operation that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebAppServicePlanUpdatedEventData object itself. + */ + public WebAppServicePlanUpdatedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the app + * service plan API operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the app + * service plan API operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebAppServicePlanUpdatedEventData object itself. + */ + public WebAppServicePlanUpdatedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the app service plan API operation + * that triggered this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the app service plan API operation + * that triggered this event. + * + * @param requestId the requestId value to set. + * @return the WebAppServicePlanUpdatedEventData object itself. + */ + public WebAppServicePlanUpdatedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebAppServicePlanUpdatedEventData object itself. + */ + public WebAppServicePlanUpdatedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebAppServicePlanUpdatedEventData object itself. + */ + public WebAppServicePlanUpdatedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java new file mode 100644 index 0000000000000..549cc2b2ae781 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebAppServicePlanUpdatedEventDataSku model. */ +@Fluent +public final class WebAppServicePlanUpdatedEventDataSku { + /* + * name of app service plan sku. + */ + @JsonProperty(value = "name") + private String name; + + /* + * tier of app service plan sku. + */ + @JsonProperty(value = "Tier") + private String tier; + + /* + * size of app service plan sku. + */ + @JsonProperty(value = "Size") + private String size; + + /* + * family of app service plan sku. + */ + @JsonProperty(value = "Family") + private String family; + + /* + * capacity of app service plan sku. + */ + @JsonProperty(value = "Capacity") + private String capacity; + + /** + * Get the name property: name of app service plan sku. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of app service plan sku. + * + * @param name the name value to set. + * @return the WebAppServicePlanUpdatedEventDataSku object itself. + */ + public WebAppServicePlanUpdatedEventDataSku setName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier property: tier of app service plan sku. + * + * @return the tier value. + */ + public String getTier() { + return this.tier; + } + + /** + * Set the tier property: tier of app service plan sku. + * + * @param tier the tier value to set. + * @return the WebAppServicePlanUpdatedEventDataSku object itself. + */ + public WebAppServicePlanUpdatedEventDataSku setTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the size property: size of app service plan sku. + * + * @return the size value. + */ + public String getSize() { + return this.size; + } + + /** + * Set the size property: size of app service plan sku. + * + * @param size the size value to set. + * @return the WebAppServicePlanUpdatedEventDataSku object itself. + */ + public WebAppServicePlanUpdatedEventDataSku setSize(String size) { + this.size = size; + return this; + } + + /** + * Get the family property: family of app service plan sku. + * + * @return the family value. + */ + public String getFamily() { + return this.family; + } + + /** + * Set the family property: family of app service plan sku. + * + * @param family the family value to set. + * @return the WebAppServicePlanUpdatedEventDataSku object itself. + */ + public WebAppServicePlanUpdatedEventDataSku setFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the capacity property: capacity of app service plan sku. + * + * @return the capacity value. + */ + public String getCapacity() { + return this.capacity; + } + + /** + * Set the capacity property: capacity of app service plan sku. + * + * @param capacity the capacity value to set. + * @return the WebAppServicePlanUpdatedEventDataSku object itself. + */ + public WebAppServicePlanUpdatedEventDataSku setCapacity(String capacity) { + this.capacity = capacity; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java new file mode 100644 index 0000000000000..de23838299f14 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebAppUpdatedEventData model. */ +@Fluent +public final class WebAppUpdatedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebAppUpdatedEventData object itself. + */ + public WebAppUpdatedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebAppUpdatedEventData object itself. + */ + public WebAppUpdatedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebAppUpdatedEventData object itself. + */ + public WebAppUpdatedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebAppUpdatedEventData object itself. + */ + public WebAppUpdatedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebAppUpdatedEventData object itself. + */ + public WebAppUpdatedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebAppUpdatedEventData object itself. + */ + public WebAppUpdatedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebAppUpdatedEventData object itself. + */ + public WebAppUpdatedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java new file mode 100644 index 0000000000000..fec8feccb4bad --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebBackupOperationCompletedEventData model. */ +@Fluent +public final class WebBackupOperationCompletedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebBackupOperationCompletedEventData object itself. + */ + public WebBackupOperationCompletedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebBackupOperationCompletedEventData object itself. + */ + public WebBackupOperationCompletedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebBackupOperationCompletedEventData object itself. + */ + public WebBackupOperationCompletedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebBackupOperationCompletedEventData object itself. + */ + public WebBackupOperationCompletedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebBackupOperationCompletedEventData object itself. + */ + public WebBackupOperationCompletedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebBackupOperationCompletedEventData object itself. + */ + public WebBackupOperationCompletedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebBackupOperationCompletedEventData object itself. + */ + public WebBackupOperationCompletedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java new file mode 100644 index 0000000000000..cb929a1c9261c --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebBackupOperationFailedEventData model. */ +@Fluent +public final class WebBackupOperationFailedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebBackupOperationFailedEventData object itself. + */ + public WebBackupOperationFailedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebBackupOperationFailedEventData object itself. + */ + public WebBackupOperationFailedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebBackupOperationFailedEventData object itself. + */ + public WebBackupOperationFailedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebBackupOperationFailedEventData object itself. + */ + public WebBackupOperationFailedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebBackupOperationFailedEventData object itself. + */ + public WebBackupOperationFailedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebBackupOperationFailedEventData object itself. + */ + public WebBackupOperationFailedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebBackupOperationFailedEventData object itself. + */ + public WebBackupOperationFailedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java new file mode 100644 index 0000000000000..228372f504b56 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebBackupOperationStartedEventData model. */ +@Fluent +public final class WebBackupOperationStartedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebBackupOperationStartedEventData object itself. + */ + public WebBackupOperationStartedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebBackupOperationStartedEventData object itself. + */ + public WebBackupOperationStartedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebBackupOperationStartedEventData object itself. + */ + public WebBackupOperationStartedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebBackupOperationStartedEventData object itself. + */ + public WebBackupOperationStartedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebBackupOperationStartedEventData object itself. + */ + public WebBackupOperationStartedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebBackupOperationStartedEventData object itself. + */ + public WebBackupOperationStartedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebBackupOperationStartedEventData object itself. + */ + public WebBackupOperationStartedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java new file mode 100644 index 0000000000000..78d4f55837638 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebRestoreOperationCompletedEventData model. */ +@Fluent +public final class WebRestoreOperationCompletedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebRestoreOperationCompletedEventData object itself. + */ + public WebRestoreOperationCompletedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebRestoreOperationCompletedEventData object itself. + */ + public WebRestoreOperationCompletedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebRestoreOperationCompletedEventData object itself. + */ + public WebRestoreOperationCompletedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebRestoreOperationCompletedEventData object itself. + */ + public WebRestoreOperationCompletedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebRestoreOperationCompletedEventData object itself. + */ + public WebRestoreOperationCompletedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebRestoreOperationCompletedEventData object itself. + */ + public WebRestoreOperationCompletedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebRestoreOperationCompletedEventData object itself. + */ + public WebRestoreOperationCompletedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java new file mode 100644 index 0000000000000..be076e29fd659 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebRestoreOperationFailedEventData model. */ +@Fluent +public final class WebRestoreOperationFailedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebRestoreOperationFailedEventData object itself. + */ + public WebRestoreOperationFailedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebRestoreOperationFailedEventData object itself. + */ + public WebRestoreOperationFailedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebRestoreOperationFailedEventData object itself. + */ + public WebRestoreOperationFailedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebRestoreOperationFailedEventData object itself. + */ + public WebRestoreOperationFailedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebRestoreOperationFailedEventData object itself. + */ + public WebRestoreOperationFailedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebRestoreOperationFailedEventData object itself. + */ + public WebRestoreOperationFailedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebRestoreOperationFailedEventData object itself. + */ + public WebRestoreOperationFailedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java new file mode 100644 index 0000000000000..7e0ad558b3e63 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebRestoreOperationStartedEventData model. */ +@Fluent +public final class WebRestoreOperationStartedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebRestoreOperationStartedEventData object itself. + */ + public WebRestoreOperationStartedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebRestoreOperationStartedEventData object itself. + */ + public WebRestoreOperationStartedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebRestoreOperationStartedEventData object itself. + */ + public WebRestoreOperationStartedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebRestoreOperationStartedEventData object itself. + */ + public WebRestoreOperationStartedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebRestoreOperationStartedEventData object itself. + */ + public WebRestoreOperationStartedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebRestoreOperationStartedEventData object itself. + */ + public WebRestoreOperationStartedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebRestoreOperationStartedEventData object itself. + */ + public WebRestoreOperationStartedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java new file mode 100644 index 0000000000000..38d10f7ad0ee1 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebSlotSwapCompletedEventData model. */ +@Fluent +public final class WebSlotSwapCompletedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebSlotSwapCompletedEventData object itself. + */ + public WebSlotSwapCompletedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebSlotSwapCompletedEventData object itself. + */ + public WebSlotSwapCompletedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebSlotSwapCompletedEventData object itself. + */ + public WebSlotSwapCompletedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebSlotSwapCompletedEventData object itself. + */ + public WebSlotSwapCompletedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebSlotSwapCompletedEventData object itself. + */ + public WebSlotSwapCompletedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebSlotSwapCompletedEventData object itself. + */ + public WebSlotSwapCompletedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebSlotSwapCompletedEventData object itself. + */ + public WebSlotSwapCompletedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java new file mode 100644 index 0000000000000..9c82b19250e17 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebSlotSwapFailedEventData model. */ +@Fluent +public final class WebSlotSwapFailedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebSlotSwapFailedEventData object itself. + */ + public WebSlotSwapFailedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebSlotSwapFailedEventData object itself. + */ + public WebSlotSwapFailedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebSlotSwapFailedEventData object itself. + */ + public WebSlotSwapFailedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebSlotSwapFailedEventData object itself. + */ + public WebSlotSwapFailedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebSlotSwapFailedEventData object itself. + */ + public WebSlotSwapFailedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebSlotSwapFailedEventData object itself. + */ + public WebSlotSwapFailedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebSlotSwapFailedEventData object itself. + */ + public WebSlotSwapFailedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java new file mode 100644 index 0000000000000..980356502bcde --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebSlotSwapStartedEventData model. */ +@Fluent +public final class WebSlotSwapStartedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebSlotSwapStartedEventData object itself. + */ + public WebSlotSwapStartedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebSlotSwapStartedEventData object itself. + */ + public WebSlotSwapStartedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebSlotSwapStartedEventData object itself. + */ + public WebSlotSwapStartedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebSlotSwapStartedEventData object itself. + */ + public WebSlotSwapStartedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebSlotSwapStartedEventData object itself. + */ + public WebSlotSwapStartedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebSlotSwapStartedEventData object itself. + */ + public WebSlotSwapStartedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebSlotSwapStartedEventData object itself. + */ + public WebSlotSwapStartedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java new file mode 100644 index 0000000000000..697c983d0d562 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebSlotSwapWithPreviewCancelledEventData model. */ +@Fluent +public final class WebSlotSwapWithPreviewCancelledEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebSlotSwapWithPreviewCancelledEventData object itself. + */ + public WebSlotSwapWithPreviewCancelledEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebSlotSwapWithPreviewCancelledEventData object itself. + */ + public WebSlotSwapWithPreviewCancelledEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebSlotSwapWithPreviewCancelledEventData object itself. + */ + public WebSlotSwapWithPreviewCancelledEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebSlotSwapWithPreviewCancelledEventData object itself. + */ + public WebSlotSwapWithPreviewCancelledEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebSlotSwapWithPreviewCancelledEventData object itself. + */ + public WebSlotSwapWithPreviewCancelledEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebSlotSwapWithPreviewCancelledEventData object itself. + */ + public WebSlotSwapWithPreviewCancelledEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebSlotSwapWithPreviewCancelledEventData object itself. + */ + public WebSlotSwapWithPreviewCancelledEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java new file mode 100644 index 0000000000000..bd308fb3a3ffb --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WebSlotSwapWithPreviewStartedEventData model. */ +@Fluent +public final class WebSlotSwapWithPreviewStartedEventData { + /* + * Detail of action on the app. + */ + @JsonProperty(value = "appEventTypeDetail") + private AppEventTypeDetail appEventTypeDetail; + + /* + * name of the web site that had this event. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The client request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "clientRequestId") + private String clientRequestId; + + /* + * The correlation request id generated by the app service for the site API + * operation that triggered this event. + */ + @JsonProperty(value = "correlationRequestId") + private String correlationRequestId; + + /* + * The request id generated by the app service for the site API operation + * that triggered this event. + */ + @JsonProperty(value = "requestId") + private String requestId; + + /* + * HTTP request URL of this operation. + */ + @JsonProperty(value = "address") + private String address; + + /* + * HTTP verb of this operation. + */ + @JsonProperty(value = "verb") + private String verb; + + /** + * Get the appEventTypeDetail property: Detail of action on the app. + * + * @return the appEventTypeDetail value. + */ + public AppEventTypeDetail getAppEventTypeDetail() { + return this.appEventTypeDetail; + } + + /** + * Set the appEventTypeDetail property: Detail of action on the app. + * + * @param appEventTypeDetail the appEventTypeDetail value to set. + * @return the WebSlotSwapWithPreviewStartedEventData object itself. + */ + public WebSlotSwapWithPreviewStartedEventData setAppEventTypeDetail(AppEventTypeDetail appEventTypeDetail) { + this.appEventTypeDetail = appEventTypeDetail; + return this; + } + + /** + * Get the name property: name of the web site that had this event. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: name of the web site that had this event. + * + * @param name the name value to set. + * @return the WebSlotSwapWithPreviewStartedEventData object itself. + */ + public WebSlotSwapWithPreviewStartedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @return the clientRequestId value. + */ + public String getClientRequestId() { + return this.clientRequestId; + } + + /** + * Set the clientRequestId property: The client request id generated by the app service for the site API operation + * that triggered this event. + * + * @param clientRequestId the clientRequestId value to set. + * @return the WebSlotSwapWithPreviewStartedEventData object itself. + */ + public WebSlotSwapWithPreviewStartedEventData setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + return this; + } + + /** + * Get the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @return the correlationRequestId value. + */ + public String getCorrelationRequestId() { + return this.correlationRequestId; + } + + /** + * Set the correlationRequestId property: The correlation request id generated by the app service for the site API + * operation that triggered this event. + * + * @param correlationRequestId the correlationRequestId value to set. + * @return the WebSlotSwapWithPreviewStartedEventData object itself. + */ + public WebSlotSwapWithPreviewStartedEventData setCorrelationRequestId(String correlationRequestId) { + this.correlationRequestId = correlationRequestId; + return this; + } + + /** + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @return the requestId value. + */ + public String getRequestId() { + return this.requestId; + } + + /** + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. + * + * @param requestId the requestId value to set. + * @return the WebSlotSwapWithPreviewStartedEventData object itself. + */ + public WebSlotSwapWithPreviewStartedEventData setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Get the address property: HTTP request URL of this operation. + * + * @return the address value. + */ + public String getAddress() { + return this.address; + } + + /** + * Set the address property: HTTP request URL of this operation. + * + * @param address the address value to set. + * @return the WebSlotSwapWithPreviewStartedEventData object itself. + */ + public WebSlotSwapWithPreviewStartedEventData setAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the verb property: HTTP verb of this operation. + * + * @return the verb value. + */ + public String getVerb() { + return this.verb; + } + + /** + * Set the verb property: HTTP verb of this operation. + * + * @param verb the verb value to set. + * @return the WebSlotSwapWithPreviewStartedEventData object itself. + */ + public WebSlotSwapWithPreviewStartedEventData setVerb(String verb) { + this.verb = verb; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/package-info.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/package-info.java new file mode 100644 index 0000000000000..b5f8062753d38 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for EventGridPublisherClient. EventGrid Publisher Client. */ +package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java new file mode 100644 index 0000000000000..4163d0de69df5 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +package com.azure.messaging.eventgrid; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.test.TestBase; +import com.azure.messaging.eventgrid.implementation.EventGridPublisherClientImpl; +import com.azure.messaging.eventgrid.implementation.EventGridPublisherClientImplBuilder; +import com.azure.messaging.eventgrid.implementation.models.CloudEvent; +import com.azure.messaging.eventgrid.implementation.models.EventGridEvent; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +import java.net.MalformedURLException; +import java.net.URL; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.*; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + + +public class EventGridPublisherImplTests extends TestBase { + + private HttpPipelineBuilder pipelineBuilder; + + private EventGridPublisherClientImplBuilder clientBuilder; + + // Event Grid endpoint for a topic accepting EventGrid schema events + private static final String EVENTGRID_ENDPOINT = "AZURE_EVENTGRID_EVENTGRID_ENDPOINT"; + + // Event Grid endpoint for a topic accepting CloudEvents schema events + private static final String CLOUD_ENDPOINT = "AZURE_EVENTGRID_CLOUD_ENDPOINT"; + + // Event Grid endpoint for a topic accepting custom schema events + private static final String CUSTOM_ENDPOINT = "AZURE_EVENTGRID_CUSTOM_ENDPOINT"; + + // Event Grid access key for a topic accepting EventGrid schema events + private static final String EVENTGRID_KEY = "AZURE_EVENTGRID_EVENTGRID_KEY"; + + // Event Grid access key for a topic accepting CloudEvents schema events + private static final String CLOUD_KEY = "AZURE_EVENTGRID_CLOUD_KEY"; + + // Event Grid access key for a topic accepting custom schema events + private static final String CUSTOM_KEY = "AZURE_EVENTGRID_CUSTOM_KEY"; + + private static final String DUMMY_ENDPOINT = "https://www.dummyEndpoint.com"; + + private static final String DUMMY_KEY = "dummyKey"; + + @Override + protected void beforeTest() { + StepVerifier.setDefaultTimeout(Duration.ofSeconds(30)); + + pipelineBuilder = new HttpPipelineBuilder(); + + clientBuilder = new EventGridPublisherClientImplBuilder(); + + if (interceptorManager.isPlaybackMode()) { + pipelineBuilder.httpClient(interceptorManager.getPlaybackClient()); + } else { + pipelineBuilder.policies(interceptorManager.getRecordPolicy(), new RetryPolicy()); + } + } + + @Override + protected void afterTest() { + StepVerifier.resetDefaultTimeout(); + } + + @Test + public void publishEventGridEventsImpl() throws MalformedURLException { + EventGridPublisherClientImpl egClient = clientBuilder + .pipeline(pipelineBuilder.policies( + new AddHeadersPolicy(new HttpHeaders().put("aeg-sas-key", getKey(EVENTGRID_KEY)))) + .build()) + .buildClient(); + + List events = Collections.singletonList( + new EventGridEvent() + .setId(UUID.randomUUID().toString()) + .setSubject("Test") + .setEventType("Microsoft.MockPublisher.TestEvent") + .setData(new HashMap() {{ + put("Field1", "Value1"); + put("Field2", "Value2"); + put("Field3", "Value3"); + }}) + .setDataVersion("1.0") + .setEventTime(OffsetDateTime.now()) + ); + + String hostname = new URL(getEndpoint(EVENTGRID_ENDPOINT)).getHost(); + + StepVerifier.create(egClient.publishEventsWithResponseAsync(hostname, events)) + .expectNextMatches(voidResponse -> voidResponse.getStatusCode() == 200) + .verifyComplete(); + } + + @Test + public void publishCloudEventsImpl() throws MalformedURLException { + EventGridPublisherClientImpl egClient = clientBuilder + .pipeline(pipelineBuilder.policies( + new AddHeadersPolicy(new HttpHeaders().put("aeg-sas-key", getKey(CLOUD_KEY)))) + .build()) + .buildClient(); + + List events = Collections.singletonList( + new CloudEvent() + .setId(UUID.randomUUID().toString()) + .setSubject("Test") + .setType("Microsoft.MockPublisher.TestEvent") + .setData(new HashMap() {{ + put("Field1", "Value1"); + put("Field2", "Value2"); + put("Field3", "Value3"); + }}) + .setSpecversion("1.0") + .setTime(OffsetDateTime.now()) + ); + + String hostname = new URL(getEndpoint(CLOUD_ENDPOINT)).getHost(); + + StepVerifier.create(egClient.publishCloudEventEventsWithResponseAsync(hostname, events)) + .expectNextMatches(voidResponse -> voidResponse.getStatusCode() == 200) + .verifyComplete(); + } + + @Test + public void publishCustomEventsImpl() throws MalformedURLException { + EventGridPublisherClientImpl egClient = clientBuilder + .pipeline(pipelineBuilder.policies( + new AddHeadersPolicy(new HttpHeaders().put("aeg-sas-key", getKey(CUSTOM_KEY)))) + .build()) + .buildClient(); + + List events = new ArrayList<>(); + for (int i = 0; i < 5; i++) { + events.add(new HashMap() {{ + put("id", UUID.randomUUID().toString()); + put("subject", "Test"); + put("foo", "bar"); + put("type", "Microsoft.MockPublisher.TestEvent"); + }}); + } + + String hostname = new URL(getEndpoint(CUSTOM_ENDPOINT)).getHost(); + + StepVerifier.create(egClient.publishCustomEventEventsWithResponseAsync(hostname, events)) + .expectNextMatches(voidResponse -> voidResponse.getStatusCode() == 200) + .verifyComplete(); + } + + + private String getEndpoint(String liveEnvName) { + if (interceptorManager.isPlaybackMode()) { + return DUMMY_ENDPOINT; + } + String endpoint = System.getenv(liveEnvName); + assertNotNull(endpoint, "System environment variable " + liveEnvName + "is null"); + return endpoint; + } + + private String getKey(String liveEnvName) { + if (interceptorManager.isPlaybackMode()) { + return DUMMY_KEY; + } + String key = System.getenv(liveEnvName); + assertNotNull(key, "System environment variable " + liveEnvName + "is null"); + return key; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsImpl.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsImpl.json new file mode 100644 index 0000000000000..2a637d570f864 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsImpl.json @@ -0,0 +1,21 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "Content-Type" : "application/cloudevents-batch+json; charset=utf-8" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "28f39f04-5f7c-4e77-b9b5-7a2617797a43", + "Date" : "Tue, 11 Aug 2020 17:44:23 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEventsImpl.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEventsImpl.json new file mode 100644 index 0000000000000..4e53aefeef2f7 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEventsImpl.json @@ -0,0 +1,21 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b53f39a3-c15a-4182-bfa2-109938bd70ab", + "Date" : "Tue, 11 Aug 2020 17:44:22 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEventsImpl.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEventsImpl.json new file mode 100644 index 0000000000000..8e907ba09c91c --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEventsImpl.json @@ -0,0 +1,21 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "60773b4e-3405-454e-97d9-0b588435f3f6", + "Date" : "Tue, 11 Aug 2020 17:48:05 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md new file mode 100644 index 0000000000000..e303a67cb0ea6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md @@ -0,0 +1,62 @@ +# Instructions for Generation +This file is used to generate the OpenAPI files for track 2 EventGrid +## Requirements/Installation +You need the following to start generating code +> NodeJS v10.x - v13.x +> +> Java 8+ +> +> Maven 3.x + +Install Autorest beta with NPM: + +`npm i -g @autorest/autorest` + +## 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=` + +If you are adding or updating swagger files, please make sure that they are included +in the input file list. + +``` yaml $(java) +title: EventGridPublisherClient +description: EventGrid Publisher Client +openapi-type: data-plane +output-folder: ../ +namespace: com.azure.messaging.eventgrid +license-header: MICROSOFT_MIT_NO_CODEGEN +generate-client-as-impl: true +context-client-method-parameter: true +models-subpackage: systemevents +custom-types-subpackage: implementation.models +custom-types: CloudEvent,EventGridEvent +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 +``` + + + diff --git a/sdk/eventgrid/pom.xml b/sdk/eventgrid/pom.xml index 74589c55c2717..6570b3d267b4f 100644 --- a/sdk/eventgrid/pom.xml +++ b/sdk/eventgrid/pom.xml @@ -9,6 +9,7 @@ pom 1.0.0 + azure-messaging-eventgrid microsoft-azure-eventgrid From 2e2087d890940e7ded53cc831df10aa2b92fb03f Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Mon, 31 Aug 2020 14:33:23 -0700 Subject: [PATCH 021/168] Add offset and length to SentenceSentiment (#14599) * add offset and length for SentenceSentiment --- .../azure-ai-textanalytics/CHANGELOG.md | 2 +- .../AnalyzeSentimentAsyncClient.java | 7 ++- .../RecognizeLinkedEntityAsyncClient.java | 2 +- .../models/CategorizedEntity.java | 53 ++++++----------- .../models/LinkedEntityMatch.java | 48 +++++---------- .../ai/textanalytics/models/PiiEntity.java | 2 +- .../models/SentenceSentiment.java | 58 ++++++++++++++----- .../com/azure/ai/textanalytics/TestUtils.java | 21 ++++--- .../TextAnalyticsAsyncClientTest.java | 4 +- .../TextAnalyticsClientTest.java | 4 +- .../TextAnalyticsClientTestBase.java | 3 + 11 files changed, 104 insertions(+), 100 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index c2f904541e273..c083a82b5be12 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History ## 5.1.0-beta.1 (Unreleased) -- Added `offset` and `length` properties for `CategorizedEntity` and `LinkedEntityMatch`. +- Added `offset` and `length` properties for `CategorizedEntity`, `LinkedEntityMatch` and `SentenceSentiment` - `length` is the number of characters in the text of these models - `offset` is the offset of the text from the start of the document diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java index 176c441ec8478..7423d2d107e4f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java @@ -44,7 +44,6 @@ import static com.azure.ai.textanalytics.TextAnalyticsAsyncClient.COGNITIVE_TRACING_NAMESPACE_VALUE; import static com.azure.ai.textanalytics.implementation.Utility.inputDocumentsValidation; -import static com.azure.ai.textanalytics.implementation.Utility.mapToHttpResponseExceptionIfExist; import static com.azure.ai.textanalytics.implementation.Utility.toBatchStatistics; import static com.azure.ai.textanalytics.implementation.Utility.toMultiLanguageInput; import static com.azure.ai.textanalytics.implementation.Utility.toTextAnalyticsError; @@ -160,9 +159,11 @@ private AnalyzeSentimentResult convertToAnalyzeSentimentResult(DocumentSentiment final SentenceSentimentValue sentenceSentimentValue = sentenceSentiment.getSentiment(); return new SentenceSentiment(sentenceSentiment.getText(), TextSentiment.fromString(sentenceSentimentValue == null ? null : sentenceSentimentValue.toString()), - toMinedOpinionList(sentenceSentiment, documentSentimentList), new SentimentConfidenceScores(confidenceScorePerSentence.getNegative(), - confidenceScorePerSentence.getNeutral(), confidenceScorePerSentence.getPositive()) + confidenceScorePerSentence.getNeutral(), confidenceScorePerSentence.getPositive()), + toMinedOpinionList(sentenceSentiment, documentSentimentList), + sentenceSentiment.getOffset(), + sentenceSentiment.getLength() ); }).collect(Collectors.toList()); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java index 500c5a769897b..d0b2e6b176c27 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java @@ -178,7 +178,7 @@ private IterableStream mapLinkedEntity( linkedEntitiesList.add(new LinkedEntity( linkedEntity.getName(), new IterableStream<>(linkedEntity.getMatches().stream().map(match -> new LinkedEntityMatch( - match.getText(), match.getOffset(), match.getLength(), match.getConfidenceScore())) + match.getText(), match.getConfidenceScore(), match.getOffset(), match.getLength())) .collect(Collectors.toList())), linkedEntity.getLanguage(), linkedEntity.getId(), linkedEntity.getUrl(), linkedEntity.getDataSource())); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/CategorizedEntity.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/CategorizedEntity.java index ac8e3566c83f8..3eecf35853b48 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/CategorizedEntity.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/CategorizedEntity.java @@ -10,43 +10,21 @@ */ @Immutable public final class CategorizedEntity { - /* - * CategorizedEntity text as appears in the request. - */ private final String text; - - /* - * CategorizedEntity category, such as Person/Location/Org/SSN etc. - */ private final EntityCategory category; - - /* - * CategorizedEntity sub category, such as Age/Year/TimeRange etc. - */ private final String subcategory; - - /* - * Start position for the entity text. - */ + private final double confidenceScore; private final int offset; - - /* - * Length for the entity text. - */ private final int length; - /* - * Confidence score between 0 and 1 of the extracted entity. - */ - private final double confidenceScore; - /** * Creates a {@link CategorizedEntity} model that describes entity. * * @param text The entity text as appears in the request. * @param category The entity category, such as Person/Location/Org/SSN etc. * @param subcategory The entity subcategory, such as Age/Year/TimeRange etc. - * @param confidenceScore A confidence score between 0 and 1 of the extracted entity. + * @param confidenceScore If a well-known item is recognized, a decimal number denoting the confidence level + * between 0 and 1 will be returned. */ public CategorizedEntity(String text, EntityCategory category, String subcategory, double confidenceScore) { this.text = text; @@ -59,10 +37,12 @@ public CategorizedEntity(String text, EntityCategory category, String subcategor /** * Creates a {@link CategorizedEntity} model that describes entity. + * * @param text The entity text as appears in the request. * @param category The entity category, such as Person/Location/Org/SSN etc. * @param subcategory The entity subcategory, such as Age/Year/TimeRange etc. - * @param confidenceScore A confidence score between 0 and 1 of the extracted entity. + * @param confidenceScore If a well-known item is recognized, a decimal number denoting the confidence level + * between 0 and 1 will be returned. * @param offset The start position for the entity text. * @param length The length for the entity text. */ @@ -104,7 +84,17 @@ public String getSubcategory() { } /** - * Get the offset of entity text. + * Get the score property: If a well-known item is recognized, a decimal + * number denoting the confidence level between 0 and 1 will be returned. + * + * @return The score value. + */ + public double getConfidenceScore() { + return this.confidenceScore; + } + + /** + * Get the offset of entity text. The start position for the entity text in a document. * * @return The offset of entity text. */ @@ -120,13 +110,4 @@ public int getOffset() { public int getLength() { return length; } - - /** - * Get the score property: Confidence score between 0 and 1 of the extracted entity. - * - * @return The score value. - */ - public double getConfidenceScore() { - return this.confidenceScore; - } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/LinkedEntityMatch.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/LinkedEntityMatch.java index fee189c271386..613f64bfdf75d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/LinkedEntityMatch.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/LinkedEntityMatch.java @@ -10,31 +10,15 @@ */ @Immutable public final class LinkedEntityMatch { - /* - * If a well-known item is recognized, a decimal number denoting the - * confidence level between 0 and 1 will be returned. - */ - private final double confidenceScore; - - /* - * Linked entity match text as appears in the request. - */ private final String text; - - /* - * Start position for the linked entity match text. - */ + private final double confidenceScore; private final int offset; - - /* - * Length for the linked entity match text. - */ private final int length; /** * Creates a {@link LinkedEntityMatch} model that describes linked entity match. * - * @param text The entity text as appears in the request. + * @param text The linked entity match text as appears in the request. * @param confidenceScore If a well-known item is recognized, a decimal number denoting the * confidence level between 0 and 1 will be returned. */ @@ -48,13 +32,13 @@ public LinkedEntityMatch(String text, double confidenceScore) { /** * Creates a {@link LinkedEntityMatch} model that describes linked entity match. * - * @param text The entity text as appears in the request. - * @param offset The start position for the entity text. - * @param length The length for the entity text. + * @param text The linked entity match text as appears in the request. * @param confidenceScore If a well-known item is recognized, a decimal number denoting the * confidence level between 0 and 1 will be returned. + * @param offset The start position for the linked entity match text in a document. + * @param length The length of linked entity match text. */ - public LinkedEntityMatch(String text, int offset, int length, double confidenceScore) { + public LinkedEntityMatch(String text, double confidenceScore, int offset, int length) { this.text = text; this.offset = offset; this.length = length; @@ -62,26 +46,26 @@ public LinkedEntityMatch(String text, int offset, int length, double confidenceS } /** - * Get the score property: If a well-known item is recognized, a decimal - * number denoting the confidence level between 0 and 1 will be returned. + * Get the linked entity match text property: linked entity text as appears in the request. * - * @return The score value. + * @return The text value. */ - public double getConfidenceScore() { - return this.confidenceScore; + public String getText() { + return this.text; } /** - * Get the linked entity match text property: Entity text as appears in the request. + * Get the score property: If a well-known item is recognized, a decimal + * number denoting the confidence level between 0 and 1 will be returned. * - * @return The text value. + * @return The score value. */ - public String getText() { - return this.text; + public double getConfidenceScore() { + return this.confidenceScore; } /** - * Get the offset of linked entity match text. + * Get the offset of linked entity match text. The start position for the linked entity match text in a document. * * @return The offset of linked entity match text. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntity.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntity.java index 626f79204590a..839fb46cf2764 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntity.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntity.java @@ -55,9 +55,9 @@ public PiiEntity(String text, EntityCategory category, String subcategory, doubl this.text = text; this.category = category; this.subcategory = subcategory; + this.confidenceScore = confidenceScore; this.offset = offset; this.length = length; - this.confidenceScore = confidenceScore; } /** diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/SentenceSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/SentenceSentiment.java index 67c550c41d5c7..8f0feafa34853 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/SentenceSentiment.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/SentenceSentiment.java @@ -7,51 +7,61 @@ import com.azure.core.util.IterableStream; /** - * The {@link SentenceSentiment} model that contains a sentiment label of a sentence, confidence score of the - * sentiment label, length of the sentence and offset of the sentence within a document. + * The {@link SentenceSentiment} model that contains a sentiment label of a sentence, confidence scores of the + * sentiment label, mined opinions, offset of sentence, and length of sentence within a document. */ @Immutable public final class SentenceSentiment { private final String text; - private final SentimentConfidenceScores confidenceScores; private final TextSentiment sentiment; + private final SentimentConfidenceScores confidenceScores; private final IterableStream minedOpinions; + private final int offset; + private final int length; /** * Creates a {@link SentenceSentiment} model that describes the sentiment analysis of sentence. + * * @param text The sentence text. * @param sentiment The sentiment label of the sentence. * @param confidenceScores The sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label. - * Higher values signify higher confidence. + * Higher values signify higher confidence. */ public SentenceSentiment(String text, TextSentiment sentiment, SentimentConfidenceScores confidenceScores) { this.text = text; this.sentiment = sentiment; - this.minedOpinions = null; this.confidenceScores = confidenceScores; + this.minedOpinions = null; + this.offset = 0; + this.length = 0; } /** * Creates a {@link SentenceSentiment} model that describes the sentiment analysis of sentence. + * * @param text The sentence text. * @param sentiment The sentiment label of the sentence. + * @param confidenceScores The sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label. + * Higher values signify higher confidence. * @param minedOpinions The mined opinions of the sentence sentiment. This is only returned if you pass the * opinion mining parameter to the analyze sentiment APIs. - * @param confidenceScores The sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label. - * Higher values signify higher confidence. + * @param offset The start position for the sentence in a document. + * @param length The length of sentence. */ - public SentenceSentiment(String text, TextSentiment sentiment, IterableStream minedOpinions, - SentimentConfidenceScores confidenceScores) { + public SentenceSentiment(String text, TextSentiment sentiment, SentimentConfidenceScores confidenceScores, + IterableStream minedOpinions, int offset, int length) { this.text = text; this.sentiment = sentiment; this.minedOpinions = minedOpinions; this.confidenceScores = confidenceScores; + this.offset = offset; + this.length = length; } /** * Get the sentence text property. * - * @return the text property value. + * @return The text property value. */ public String getText() { return this.text; @@ -66,6 +76,16 @@ public TextSentiment getSentiment() { return sentiment; } + /** + * Get the confidence score of the sentiment label. All score values sum up to 1, the higher the score, the + * higher the confidence in the sentiment. + * + * @return The {@link SentimentConfidenceScores}. + */ + public SentimentConfidenceScores getConfidenceScores() { + return confidenceScores; + } + /** * Get the mined opinions of sentence sentiment. * This is only returned if you pass the opinion mining parameter to the analyze sentiment APIs. @@ -77,12 +97,20 @@ public IterableStream getMinedOpinions() { } /** - * Get the confidence score of the sentiment label. All score values sum up to 1, the higher the score, the - * higher the confidence in the sentiment. + * Get the offset of sentence. The start position for the sentence in a document. * - * @return The {@link SentimentConfidenceScores}. + * @return The offset of sentence. */ - public SentimentConfidenceScores getConfidenceScores() { - return confidenceScores; + public int getOffset() { + return offset; + } + + /** + * Get the length of sentence. + * + * @return The length of sentence. + */ + public int getLength() { + return length; } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java index f364077e39e69..fdb82da76b261 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java @@ -283,7 +283,7 @@ static RecognizeLinkedEntitiesResultCollection getExpectedBatchLinkedEntities() * Helper method to get the expected linked Entities List 1 */ static List getLinkedEntitiesList1() { - final LinkedEntityMatch linkedEntityMatch = new LinkedEntityMatch("Seattle", 26, 7, 0.0); + final LinkedEntityMatch linkedEntityMatch = new LinkedEntityMatch("Seattle", 0.0, 26, 7); LinkedEntity linkedEntity = new LinkedEntity( "Seattle", new IterableStream<>(Collections.singletonList(linkedEntityMatch)), "en", "Seattle", "https://en.wikipedia.org/wiki/Seattle", @@ -295,7 +295,7 @@ static List getLinkedEntitiesList1() { * Helper method to get the expected linked Entities List 2 */ static List getLinkedEntitiesList2() { - LinkedEntityMatch linkedEntityMatch = new LinkedEntityMatch("Microsoft", 10, 9, 0.0); + LinkedEntityMatch linkedEntityMatch = new LinkedEntityMatch("Microsoft", 0.0, 10, 9); LinkedEntity linkedEntity = new LinkedEntity( "Microsoft", new IterableStream<>(Collections.singletonList(linkedEntityMatch)), "en", "Microsoft", "https://en.wikipedia.org/wiki/Microsoft", @@ -342,20 +342,24 @@ static DocumentSentiment getExpectedDocumentSentiment() { new SentimentConfidenceScores(0.0, 0.0, 0.0), new IterableStream<>(asList( new SentenceSentiment("The hotel was dark and unclean.", TextSentiment.NEGATIVE, + new SentimentConfidenceScores(0.0, 0.0, 0.0), new IterableStream<>(asList(new MinedOpinion( new AspectSentiment("hotel", TextSentiment.NEGATIVE, 4, 5, new SentimentConfidenceScores(0.0, 0.0, 0.0)), new IterableStream<>(asList( new OpinionSentiment("dark", TextSentiment.NEGATIVE, 14, 4, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)), new OpinionSentiment("unclean", TextSentiment.NEGATIVE, 23, 7, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)) ))))), - new SentimentConfidenceScores(0.0, 0.0, 0.0)), + 0, 31 + ), new SentenceSentiment("The restaurant had amazing gnocchi.", TextSentiment.POSITIVE, + new SentimentConfidenceScores(0.0, 0.0, 0.0), new IterableStream<>(asList(new MinedOpinion( new AspectSentiment("gnocchi", TextSentiment.POSITIVE, 59, 7, new SentimentConfidenceScores(0.0, 0.0, 0.0)), new IterableStream<>(asList( new OpinionSentiment("amazing", TextSentiment.POSITIVE, 51, 7, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)) ))))), - new SentimentConfidenceScores(0.0, 0.0, 0.0)) + 32, 35 + ) )), null); } @@ -367,20 +371,23 @@ static DocumentSentiment getExpectedDocumentSentiment2() { new SentimentConfidenceScores(0.0, 0.0, 0.0), new IterableStream<>(asList( new SentenceSentiment("The restaurant had amazing gnocchi.", TextSentiment.POSITIVE, + new SentimentConfidenceScores(0.0, 0.0, 0.0), new IterableStream<>(asList(new MinedOpinion( new AspectSentiment("gnocchi", TextSentiment.POSITIVE, 27, 7, new SentimentConfidenceScores(0.0, 0.0, 0.0)), new IterableStream<>(asList( new OpinionSentiment("amazing", TextSentiment.POSITIVE, 19, 7, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)) ))))), - new SentimentConfidenceScores(0.0, 0.0, 0.0)), + 0, 35 + ), new SentenceSentiment("The hotel was dark and unclean.", TextSentiment.NEGATIVE, - new IterableStream<>(asList(new MinedOpinion( + new SentimentConfidenceScores(0.0, 0.0, 0.0), new IterableStream<>(asList(new MinedOpinion( new AspectSentiment("hotel", TextSentiment.NEGATIVE, 40, 5, new SentimentConfidenceScores(0.0, 0.0, 0.0)), new IterableStream<>(asList( new OpinionSentiment("dark", TextSentiment.NEGATIVE, 50, 4, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)), new OpinionSentiment("unclean", TextSentiment.NEGATIVE, 59, 7, false, new SentimentConfidenceScores(0.0, 0.0, 0.0)) ))))), - new SentimentConfidenceScores(0.0, 0.0, 0.0)) + 36, 31 + ) )), null); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java index 6c04ff9158fc5..b2653227b10a3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java @@ -857,8 +857,8 @@ public void analyzeSentimentForFaultyText(HttpClient httpClient, TextAnalyticsSe TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0), new IterableStream<>(Arrays.asList( - new SentenceSentiment("!", TextSentiment.NEUTRAL, null, new SentimentConfidenceScores(0.0, 0.0, 0.0)), - new SentenceSentiment("@#%%", TextSentiment.NEUTRAL, null, new SentimentConfidenceScores(0.0, 0.0, 0.0)) + new SentenceSentiment("!", TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0), null, 0, 1), + new SentenceSentiment("@#%%", TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0), null, 1, 4) )), null); StepVerifier.create(client.analyzeSentiment(input)) .assertNext(response -> validateAnalyzedSentiment(false, expectedDocumentSentiment, response)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java index fc573227a3423..edad61d208b73 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java @@ -790,8 +790,8 @@ public void analyzeSentimentForFaultyText(HttpClient httpClient, TextAnalyticsSe TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0), new IterableStream<>(Arrays.asList( - new SentenceSentiment("!", TextSentiment.NEUTRAL, null, new SentimentConfidenceScores(0.0, 0.0, 0.0)), - new SentenceSentiment("@#%%", TextSentiment.NEUTRAL, null, new SentimentConfidenceScores(0.0, 0.0, 0.0)) + new SentenceSentiment("!", TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0), null, 0, 1), + new SentenceSentiment("@#%%", TextSentiment.NEUTRAL, new SentimentConfidenceScores(0.0, 0.0, 0.0), null, 1, 4) )), null); validateAnalyzedSentiment(false, expectedDocumentSentiment, client.analyzeSentiment(input)); }); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java index 8ae36b15d0b5b..dc7225f499fe1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java @@ -817,6 +817,9 @@ static void validateAnalyzedSentenceSentiment(boolean includeOpinionMining, List static void validateSentenceSentiment(boolean includeOpinionMining, SentenceSentiment expectedSentiment, SentenceSentiment actualSentiment) { assertEquals(expectedSentiment.getSentiment(), actualSentiment.getSentiment()); assertEquals(expectedSentiment.getText(), actualSentiment.getText()); + assertEquals(expectedSentiment.getOffset(), actualSentiment.getOffset()); + assertEquals(expectedSentiment.getLength(), actualSentiment.getLength()); + if (includeOpinionMining) { validateSentenceMinedOpinions(expectedSentiment.getMinedOpinions().stream().collect(Collectors.toList()), actualSentiment.getMinedOpinions().stream().collect(Collectors.toList())); From b9d2ea7a0a3887ca43f102ff38120de590898c0f Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Mon, 31 Aug 2020 15:07:09 -0700 Subject: [PATCH 022/168] Azure Search Documents Performance Tests (#14383) * azure-search-documents performance tests for autocomplete, search, suggest, and document indexing * Update performance test names and add validation to tests --- eng/versioning/version_client.txt | 1 + sdk/search/azure-search-perf/CHANGELOG.md | 3 + sdk/search/azure-search-perf/README.md | 32 +++++ sdk/search/azure-search-perf/pom.xml | 68 +++++++++++ .../main/java/com/azure/search/perf/App.java | 29 +++++ .../azure/search/perf/AutocompleteTest.java | 46 +++++++ .../azure/search/perf/IndexDocumentsTest.java | 48 ++++++++ .../search/perf/SearchDocumentsTest.java | 51 ++++++++ .../com/azure/search/perf/SuggestTest.java | 51 ++++++++ .../com/azure/search/perf/core/Address.java | 32 +++++ .../search/perf/core/DocumentGenerator.java | 110 +++++++++++++++++ .../azure/search/perf/core/DocumentSize.java | 12 ++ .../com/azure/search/perf/core/Hotel.java | 54 +++++++++ .../perf/core/SearchPerfStressOptions.java | 24 ++++ .../azure/search/perf/core/ServiceTest.java | 113 ++++++++++++++++++ sdk/search/pom.xml | 1 + 16 files changed, 675 insertions(+) create mode 100644 sdk/search/azure-search-perf/CHANGELOG.md create mode 100644 sdk/search/azure-search-perf/README.md create mode 100644 sdk/search/azure-search-perf/pom.xml create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/App.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/AutocompleteTest.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/IndexDocumentsTest.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/SearchDocumentsTest.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/SuggestTest.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Address.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/DocumentGenerator.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/DocumentSize.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Hotel.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/SearchPerfStressOptions.java create mode 100644 sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/ServiceTest.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 4dd0135aea4f5..e17a453911ff5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -36,6 +36,7 @@ com.azure:azure-messaging-eventhubs;5.1.2;5.2.0-beta.3 com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.1.2;1.2.0-beta.3 com.azure:azure-messaging-servicebus;7.0.0-beta.5;7.0.0-beta.6 com.azure:azure-search-documents;11.0.0;11.1.0-beta.2 +com.azure:azure-search-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-security-keyvault-certificates;4.1.0;4.2.0-beta.1 com.azure:azure-security-keyvault-keys;4.2.0;4.3.0-beta.1 com.azure:azure-security-keyvault-secrets;4.2.0;4.3.0-beta.1 diff --git a/sdk/search/azure-search-perf/CHANGELOG.md b/sdk/search/azure-search-perf/CHANGELOG.md new file mode 100644 index 0000000000000..4144f75694a03 --- /dev/null +++ b/sdk/search/azure-search-perf/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) diff --git a/sdk/search/azure-search-perf/README.md b/sdk/search/azure-search-perf/README.md new file mode 100644 index 0000000000000..bf1c97cc1acf3 --- /dev/null +++ b/sdk/search/azure-search-perf/README.md @@ -0,0 +1,32 @@ +# Azure Search Performance test client library for Java + +Represents Performance tests for Azure Search SDK for Java. + +## Getting started + +### Prerequisites + +- Java Development Kit (JDK) with version 8 or above + +### Adding the package to your product + + +## Key concepts + + +## Examples + +## Troubleshooting + +## Next steps + +## Contributing + +If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft +Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request diff --git a/sdk/search/azure-search-perf/pom.xml b/sdk/search/azure-search-perf/pom.xml new file mode 100644 index 0000000000000..b4977a8f70c98 --- /dev/null +++ b/sdk/search/azure-search-perf/pom.xml @@ -0,0 +1,68 @@ + + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-search-perf + 1.0.0-beta.1 + jar + + + UTF-8 + UTF-8 + 1.8 + 1.8 + + + + + com.azure + perf-test-core + 1.0.0-beta.1 + + + com.azure + azure-search-documents + 11.1.0-beta.2 + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.2.0 + + + package + + single + + + + + + com.azure.search.perf.App + + + + + jar-with-dependencies + + + + + + + + diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/App.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/App.java new file mode 100644 index 0000000000000..8dc19fa3adaa9 --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/App.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf; + +import com.azure.perf.test.core.PerfStressProgram; + +/** + * Runs Azure Search performance tests. + *

+ * Test scenarios: + *

    + *
  • Search documents
  • + *
  • Autocomplete
  • + *
  • Suggest
  • + *
  • Index documents
  • + *
+ * To run performance tests from the command line, package the project into an uber jar using {@code mvn clean + * package}. Then run the program using {@code java -jar compiled-jar-with-dependencies-path} + *

+ * To run performance tests in IntelliJ, set all the required environment variables via {@code Run -> Edit + * Configurations} section. Then run the App's main method. + */ +public class App { + public static void main(String[] args) { + PerfStressProgram.run( + new Class[]{AutocompleteTest.class, IndexDocumentsTest.class, SearchDocumentsTest.class, SuggestTest.class}, args); + } +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/AutocompleteTest.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/AutocompleteTest.java new file mode 100644 index 0000000000000..983e16f087813 --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/AutocompleteTest.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf; + +import com.azure.search.perf.core.SearchPerfStressOptions; +import com.azure.search.perf.core.ServiceTest; +import reactor.core.publisher.Mono; + +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Performs autocomplete operations. + */ +public class AutocompleteTest extends ServiceTest { + public AutocompleteTest(SearchPerfStressOptions options) { + super(options); + } + + @Override + public Mono globalSetupAsync() { + /* + * First, run the global setup in the super class. That will create the index to be used for performance + * testing. Then populate the index with a given number of documents. + */ + return super.globalSetupAsync().then(populateIndex(options.getCount(), options.getDocumentSize())); + } + + @Override + public void run() { + AtomicInteger count = new AtomicInteger(); + searchClient.autocomplete("historic", SUGGESTER_NAME).iterator() + .forEachRemaining(ignored -> count.incrementAndGet()); + + assert count.get() > 0; + } + + @Override + public Mono runAsync() { + return searchAsyncClient.autocomplete("historic", SUGGESTER_NAME) + .count() + .flatMap(count -> count > 0 + ? Mono.empty() + : Mono.error(new RuntimeException("Expected autocomplete results."))); + } +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/IndexDocumentsTest.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/IndexDocumentsTest.java new file mode 100644 index 0000000000000..e446a753c4dfe --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/IndexDocumentsTest.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf; + +import com.azure.search.documents.indexes.models.IndexDocumentsBatch; +import com.azure.search.perf.core.DocumentGenerator; +import com.azure.search.perf.core.DocumentSize; +import com.azure.search.perf.core.Hotel; +import com.azure.search.perf.core.SearchPerfStressOptions; +import com.azure.search.perf.core.ServiceTest; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +/** + * Performs document indexing operations. + */ +public class IndexDocumentsTest extends ServiceTest { + private static volatile AtomicInteger ID_COUNT = new AtomicInteger(); + private final List hotels; + + public IndexDocumentsTest(SearchPerfStressOptions options) { + super(options); + + this.hotels = DocumentGenerator.generateHotels(options.getCount(), + DocumentSize.valueOf(options.getDocumentSize())); + } + + @Override + public void run() { + int[] idOffset = new int[] { ID_COUNT.getAndAdd(options.getCount()) }; + searchClient.indexDocuments(new IndexDocumentsBatch<>().addUploadActions(hotels.stream() + .peek(hotel -> hotel.hotelId = String.valueOf(idOffset[0]++)) + .collect(Collectors.toList()))); + } + + @Override + public Mono runAsync() { + int[] idOffset = new int[] { ID_COUNT.getAndAdd(options.getCount()) }; + return searchAsyncClient.indexDocuments(new IndexDocumentsBatch<>().addUploadActions(hotels.stream() + .peek(hotel -> hotel.hotelId = String.valueOf(idOffset[0]++)) + .collect(Collectors.toList()))) + .then(); + } +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/SearchDocumentsTest.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/SearchDocumentsTest.java new file mode 100644 index 0000000000000..a257dc3091f2f --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/SearchDocumentsTest.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf; + +import com.azure.search.perf.core.Hotel; +import com.azure.search.perf.core.SearchPerfStressOptions; +import com.azure.search.perf.core.ServiceTest; +import reactor.core.publisher.Mono; + +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Performs searching operations. + */ +public class SearchDocumentsTest extends ServiceTest { + public SearchDocumentsTest(SearchPerfStressOptions options) { + super(options); + } + + @Override + public Mono globalSetupAsync() { + /* + * First, run the global setup in the super class. That will create the index to be used for performance + * testing. Then populate the index with a given number of documents. + */ + return super.globalSetupAsync().then(populateIndex(options.getCount(), options.getDocumentSize())); + } + + @Override + public void run() { + AtomicInteger count = new AtomicInteger(); + searchClient.search("").iterator() + .forEachRemaining(result -> { + result.getDocument(Hotel.class); + count.incrementAndGet(); + }); + + assert count.get() > 0; + } + + @Override + public Mono runAsync() { + return searchAsyncClient.search("") + .map(result -> result.getDocument(Hotel.class)) + .count() + .flatMap(count -> count > 0 + ? Mono.empty() + : Mono.error(new RuntimeException("Expected autocomplete results."))); + } +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/SuggestTest.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/SuggestTest.java new file mode 100644 index 0000000000000..1b509bfc774f1 --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/SuggestTest.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf; + +import com.azure.search.perf.core.Hotel; +import com.azure.search.perf.core.SearchPerfStressOptions; +import com.azure.search.perf.core.ServiceTest; +import reactor.core.publisher.Mono; + +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Performs suggestion operations. + */ +public class SuggestTest extends ServiceTest { + public SuggestTest(SearchPerfStressOptions options) { + super(options); + } + + @Override + public Mono globalSetupAsync() { + /* + * First, run the global setup in the super class. That will create the index to be used for performance + * testing. Then populate the index with a given number of documents. + */ + return super.globalSetupAsync().then(populateIndex(options.getCount(), options.getDocumentSize())); + } + + @Override + public void run() { + AtomicInteger count = new AtomicInteger(); + searchClient.suggest("historic", SUGGESTER_NAME).iterator() + .forEachRemaining(result -> { + result.getDocument(Hotel.class); + count.incrementAndGet(); + }); + + assert count.get() > 0; + } + + @Override + public Mono runAsync() { + return searchAsyncClient.suggest("historic", SUGGESTER_NAME) + .map(result -> result.getDocument(Hotel.class)) + .count() + .flatMap(count -> count > 0 + ? Mono.empty() + : Mono.error(new RuntimeException("Expected autocomplete results."))); + } +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Address.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Address.java new file mode 100644 index 0000000000000..2b3f0d696d40d --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Address.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf.core; + +import com.azure.search.documents.indexes.SearchableFieldProperty; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Model class representing an address. + */ +public class Address { + @JsonProperty("StreetAddress") + @SearchableFieldProperty + public String streetAddress; + + @JsonProperty("City") + @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + public String city; + + @JsonProperty("StateProvince") + @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + public String stateProvince; + + @JsonProperty("PostalCode") + @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + public String postalCode; + + @JsonProperty("Country") + @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + public String country; +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/DocumentGenerator.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/DocumentGenerator.java new file mode 100644 index 0000000000000..2590f0d3cc14b --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/DocumentGenerator.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf.core; + +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.ArrayList; +import java.util.List; + +/** + * Generates Search documents. + */ +public final class DocumentGenerator { + /** + * Creates a number of documents of the given size. + * + * @param count Number of documents. + * @param documentSize Size of the documents. + * @return A list of documents. + */ + public static List generateHotels(int count, DocumentSize documentSize) { + List hotels = new ArrayList<>(count * 2); + + for (int i = 0; i < count; i++) { + hotels.add(createHotel(i, documentSize)); + } + + return hotels; + } + + private static Hotel createHotel(int id, DocumentSize documentSize) { + Hotel hotel = new Hotel(); + + hotel.hotelId = String.valueOf(id); + + if (documentSize == DocumentSize.SMALL) { + hotel.hotelName = "Secret Point Motel"; + hotel.description = "The hotel is ideally located on the main commercial artery of the city in the heart " + + "of New York. A few minutes away is Time's Square and the historic centre of the city, as well " + + "as other places of interest that make New York one of America's most attractive and cosmopolitan " + + "cities."; + hotel.descriptionFr = "L'hôtel est idéalement situé sur la principale artère commerciale de la ville " + + "en plein cœur de New York. A quelques minutes se trouve la place du temps et le centre historique " + + "de la ville, ainsi que d'autres lieux d'intérêt qui font de New York l'une des villes les plus " + + "attractives et cosmopolites de l'Amérique."; + hotel.category = "Boutique"; + hotel.tags = new String[]{"pool", "air conditioning", "concierge"}; + hotel.parkingIncluded = false; + hotel.lastRenovationDate = OffsetDateTime.of(1970, 1, 18, 0, 0, 0, 0, ZoneOffset.UTC); + hotel.rating = 3.6D; + + Address address = new Address(); + address.streetAddress = "677 5th Ave"; + address.city = "New York"; + address.stateProvince = "NY"; + address.postalCode = "10022"; + address.country = "USA"; + + hotel.address = address; + } else { + hotel.hotelName = "Mount Rainier Lodge"; + hotel.description = "Mount Rainier Lodge is a historic lodge located in Ashford, Washington just a couple " + + "of miles outside of Mount Rainier National Park. To complement your trip to the great outdoors, the " + + "lodge offers queen rooms, suites, and standalone cabins with an outdoorsy theme. Amenities include " + + "a continental breakfast, high speed wi-fi, a gift shop, basic cable, an outdoor jacuzzi and free " + + "national park maps. With only a few hundred residents, Ashford has that quintessential outdoorsy " + + "small town feel while offering restaurants, gas stations, and convenience stores to keep you well " + + "supplied for your trip. Located to the east of the park, this lodge is just a few hours from both " + + "Mount St. Helens and Mount Adams so you can explore much of what the pacific northwest has to " + + "offer. If you choose to stay near Rainier, you’ll still get to take advantage of the tremendous " + + "view. Whether you’re looking to summit Mount Rainier, hiking all of Wonderland Trail, hoping to " + + "see a grizzly bear, or just exploring the park, Mount Rainier Lodge can be the perfect resting " + + "place for your adventure. We hope to see you soon!"; + hotel.descriptionFr = "Mount Rainier Lodge est un lodge historique situé à Ashford, Washington à quelques " + + "miles à l’extérieur du parc national du Mont Rainier. Pour compléter votre voyage en plein air, le " + + "lodge propose des chambres reines, des suites et des cabines autonomes avec un thème extérieur. " + + "Les commodités comprennent un petit déjeuner continental, wi-fi haute vitesse, une boutique de " + + "cadeaux, un câble de base, un jacuzzi extérieur et des cartes gratuites du parc national. Avec " + + "seulement quelques centaines de résidents, Ashford a cette quintessence en plein air petite ville " + + "se sentent tout en offrant des restaurants, stations-service, et des dépanneurs pour vous garder " + + "bien fourni pour votre voyage. Situé à l’est du parc, ce lodge est à quelques heures du mont St. " + + "Helens et du mont Adams afin que vous puissiez explorer une grande partie de ce que le nord-ouest " + + "du Pacifique a à offrir. Si vous choisissez de rester près de Rainier, vous aurez toujours la " + + "chance de profiter de la vue imprenable. Que vous cherchiez au sommet du mont Rainier, que vous " + + "randonnées sur l’ensemble du sentier Wonderland, que vous espériez voir un grizzli ou que vous " + + "exploriez simplement le parc, le Mount Rainier Lodge peut être le lieu de repos idéal pour votre " + + "aventure. Nous espérons vous voir bientôt!"; + hotel.category = "Lodge"; + hotel.tags = new String[]{ + "jacuzzi", "air conditioning", "gift shop", "basic cable", "continental breakfast", "free wi-fi", + "national park", "cabin", "outdoors", "pacific northwest", "mountain" + }; + hotel.parkingIncluded = true; + hotel.lastRenovationDate = OffsetDateTime.of(1985, 3, 30, 0, 0, 0, 0, ZoneOffset.UTC); + hotel.rating = 4.2D; + + Address address = new Address(); + address.streetAddress = "35708 Sr 706 E"; + address.city = "Ashford"; + address.stateProvince = "WA"; + address.postalCode = "98304"; + address.country = "USA"; + + hotel.address = address; + } + + return hotel; + } +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/DocumentSize.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/DocumentSize.java new file mode 100644 index 0000000000000..4fad01ba532ca --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/DocumentSize.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf.core; + +/** + * Represents the size of a document. + */ +public enum DocumentSize { + SMALL, + LARGE +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Hotel.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Hotel.java new file mode 100644 index 0000000000000..8250958ce0d14 --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Hotel.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf.core; + +import com.azure.search.documents.indexes.SearchableFieldProperty; +import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.time.OffsetDateTime; + +/** + * Model class representing a hotel. + */ +public class Hotel { + @JsonProperty("HotelId") + @SimpleFieldProperty(isKey = true) + public String hotelId; + + @JsonProperty("HotelName") + @SearchableFieldProperty(isSortable = true) + public String hotelName; + + @JsonProperty("Description") + @SearchableFieldProperty(analyzerName = "en.microsoft") + public String description; + + @JsonProperty("DescriptionFr") + @SearchableFieldProperty(analyzerName = "fr.lucene") + public String descriptionFr; + + @JsonProperty("Category") + @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + public String category; + + @JsonProperty("Tags") + @SearchableFieldProperty(isFilterable = true, isFacetable = true) + public String[] tags; + + @JsonProperty("ParkingIncluded") + @SimpleFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + public Boolean parkingIncluded; + + @JsonProperty("LastRenovationDate") + @SimpleFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + public OffsetDateTime lastRenovationDate; + + @JsonProperty("Rating") + @SimpleFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + public Double rating; + + @JsonProperty("Address") + public Address address; +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/SearchPerfStressOptions.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/SearchPerfStressOptions.java new file mode 100644 index 0000000000000..7d8bc0bb89639 --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/SearchPerfStressOptions.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf.core; + +import com.azure.perf.test.core.PerfStressOptions; +import com.beust.jcommander.Parameter; + +/** + * Azure Search specific performance test configuration options. + */ +public class SearchPerfStressOptions extends PerfStressOptions { + @Parameter(names = {"-ds", "--documentSize"}, description = "Size of Search documents (SMALL, LARGE)") + private String documentSize = DocumentSize.SMALL.name(); + + /** + * Get the configured document size option for performance test. + * + * @return The document size. + */ + public String getDocumentSize() { + return documentSize; + } +} diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/ServiceTest.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/ServiceTest.java new file mode 100644 index 0000000000000..f9141b1c98f67 --- /dev/null +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/ServiceTest.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.perf.core; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.ProxyOptions; +import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.perf.test.core.PerfStressOptions; +import com.azure.perf.test.core.PerfStressTest; +import com.azure.search.documents.SearchAsyncClient; +import com.azure.search.documents.SearchClient; +import com.azure.search.documents.indexes.SearchIndexAsyncClient; +import com.azure.search.documents.indexes.SearchIndexClientBuilder; +import com.azure.search.documents.indexes.models.IndexDocumentsBatch; +import com.azure.search.documents.indexes.models.SearchIndex; +import com.azure.search.documents.indexes.models.SearchSuggester; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.net.InetSocketAddress; +import java.time.Duration; +import java.util.Arrays; +import java.util.List; +import java.util.Random; + +/** + * Base class for Azure Search performance tests. + */ +public abstract class ServiceTest extends PerfStressTest { + private static final String CONFIGURATION_ERROR = "Configuration %s must be set in either environment variables " + + "or system properties.%n"; + private static final String ALLOWED_INDEX_CHARACTERS = "abcdefghijklmnopqrstuvwxyz0123456789"; + private static final int INDEX_NAME_LENGTH = 24; + + protected static final String SUGGESTER_NAME = "sg"; + + protected final SearchClient searchClient; + protected final SearchAsyncClient searchAsyncClient; + + private final SearchIndexAsyncClient searchIndexAsyncClient; + private final String indexName; + + public ServiceTest(TOptions options) { + super(options); + + String searchEndpoint = Configuration.getGlobalConfiguration().get("SEARCH_ENDPOINT"); + if (CoreUtils.isNullOrEmpty(searchEndpoint)) { + System.out.printf(CONFIGURATION_ERROR, "SEARCH_ENDPOINT"); + System.exit(1); + } + + String searchApiKey = Configuration.getGlobalConfiguration().get("SEARCH_API_KEY"); + if (CoreUtils.isNullOrEmpty(searchApiKey)) { + System.out.printf(CONFIGURATION_ERROR, "SEARCH_API_KEY"); + System.exit(1); + } + + SearchIndexClientBuilder builder = new SearchIndexClientBuilder() + .endpoint(searchEndpoint) + .credential(new AzureKeyCredential(searchApiKey)) + .httpClient(new NettyAsyncHttpClientBuilder() + .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888))) + .build()); + //.httpClient(PerfStressHttpClient.create(options)); + + this.searchIndexAsyncClient = builder.buildAsyncClient(); + + this.indexName = new Random().ints(INDEX_NAME_LENGTH, 0, ALLOWED_INDEX_CHARACTERS.length()) + .mapToObj(ALLOWED_INDEX_CHARACTERS::charAt) + .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append) + .toString(); + + this.searchClient = builder.buildClient().getSearchClient(this.indexName); + this.searchAsyncClient = this.searchIndexAsyncClient.getSearchAsyncClient(this.indexName); + } + + @Override + public Mono globalSetupAsync() { + return searchIndexAsyncClient + .createIndex(new SearchIndex(indexName, SearchIndexAsyncClient.buildSearchFields(Hotel.class, null)) + .setSuggesters(new SearchSuggester(SUGGESTER_NAME, Arrays.asList("Description", "HotelName")))) + .then(); + } + + @Override + public Mono globalCleanupAsync() { + return searchIndexAsyncClient.deleteIndex(indexName); + } + + protected Mono populateIndex(int documentCount, String documentSize) { + /* + * Generate the count of documents using the given size. Then, upload the documents in batches of 100, this + * prevents the batch from triggering the services request size limit to fail. Finally, continuously poll the + * index for its document count until it is equal to the count passed. + */ + return Mono.defer(() -> { + List hotels = DocumentGenerator.generateHotels(documentCount, DocumentSize.valueOf(documentSize)); + + return Flux.range(0, (int) Math.ceil(hotels.size() / 100D)) + .map(i -> hotels.subList(i * 100, Math.min((i + 1) * 100, hotels.size()))) + .flatMap(hotelDocuments -> searchAsyncClient.indexDocuments(new IndexDocumentsBatch() + .addUploadActions(hotelDocuments))) + .then(); + }).then(Mono.defer(() -> searchAsyncClient.getDocumentCount() + .delaySubscription(Duration.ofSeconds(1)) + .filter(count -> count == documentCount) + .repeatWhenEmpty(Flux::repeat) + .then())); + } +} diff --git a/sdk/search/pom.xml b/sdk/search/pom.xml index fa4a3706d4468..8bd7a3e38ab50 100644 --- a/sdk/search/pom.xml +++ b/sdk/search/pom.xml @@ -10,5 +10,6 @@ 1.0.0 azure-search-documents + azure-search-perf From 7b1e380393579cc69e144b4d37eb7a5e5f141ad4 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Mon, 31 Aug 2020 16:11:25 -0700 Subject: [PATCH 023/168] Adding Subscription rules (#14633) * Adding create rules. * Adding RuleAction and RuleFilter. * Adding overloads in ServiceBusAdministrationClient and ServiceBusAdministrationAsyncClient. * Regenerate swagger. KeyValue names are changed. * Renaming generated swagger classes to `*Impl` to avoid name conflicts. --- .../checkstyle/checkstyle-suppressions.xml | 1 + .../ServiceBusAdministrationAsyncClient.java | 530 +++++++++++++++++- .../ServiceBusAdministrationClient.java | 255 ++++++++- .../models/CorrelationRuleFilter.java | 294 ++++++++++ .../models/CreateRuleOptions.java | 87 +++ .../models/EmptyRuleAction.java | 15 + .../models/FalseRuleFilter.java | 37 ++ .../administration/models/RuleAction.java | 21 + .../administration/models/RuleFilter.java | 26 + .../administration/models/RuleProperties.java | 270 +++++++++ .../administration/models/SqlRuleAction.java | 93 +++ .../administration/models/SqlRuleFilter.java | 99 ++++ .../administration/models/TrueRuleFilter.java | 37 ++ .../implementation/EntityHelper.java | 188 ++++++- ...Filter.java => CorrelationFilterImpl.java} | 28 +- ...leAction.java => EmptyRuleActionImpl.java} | 2 +- ...{FalseFilter.java => FalseFilterImpl.java} | 2 +- .../{KeyValue.java => KeyValueImpl.java} | 18 +- .../{RuleAction.java => RuleActionImpl.java} | 8 +- .../models/RuleDescription.java | 12 +- .../{RuleFilter.java => RuleFilterImpl.java} | 8 +- .../{SqlFilter.java => SqlFilterImpl.java} | 24 +- ...RuleAction.java => SqlRuleActionImpl.java} | 18 +- .../{TrueFilter.java => TrueFilterImpl.java} | 2 +- ...inistrationAsyncClientIntegrationTest.java | 65 +++ .../models/CorrelationRuleFilterTest.java | 141 +++++ .../ServiceBusManagementSerializerTest.java | 284 ++++++++++ .../resources/session-records/getRule.json | 22 + .../resources/session-records/listRules.json | 22 + .../resources/xml/CorrelationRuleFilter.xml | 18 + .../resources/xml/RuleDescriptionFeed.xml | 67 +++ .../src/test/resources/xml/SqlRuleFilter.xml | 19 + .../resources/xml/SqlRuleFilterWithAction.xml | 21 + .../swagger/README.md | 4 +- 34 files changed, 2633 insertions(+), 105 deletions(-) create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilter.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateRuleOptions.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/EmptyRuleAction.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/FalseRuleFilter.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleAction.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleFilter.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleProperties.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SqlRuleAction.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SqlRuleFilter.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TrueRuleFilter.java rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{CorrelationFilter.java => CorrelationFilterImpl.java} (89%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{EmptyRuleAction.java => EmptyRuleActionImpl.java} (91%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{FalseFilter.java => FalseFilterImpl.java} (91%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{KeyValue.java => KeyValueImpl.java} (80%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{RuleAction.java => RuleActionImpl.java} (89%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{RuleFilter.java => RuleFilterImpl.java} (84%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{SqlFilter.java => SqlFilterImpl.java} (87%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{SqlRuleAction.java => SqlRuleActionImpl.java} (88%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/{TrueFilter.java => TrueFilterImpl.java} (92%) create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilterTest.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getRule.json create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/listRules.json create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/CorrelationRuleFilter.xml create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/RuleDescriptionFeed.xml create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/SqlRuleFilter.xml create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/SqlRuleFilterWithAction.xml diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index bf3ae5d9ef5e5..bf5ae0bed99ee 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -525,6 +525,7 @@ + diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClient.java index ec0991da6c9c7..c6575fc3f3789 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClient.java @@ -23,21 +23,26 @@ import com.azure.core.util.IterableStream; import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.servicebus.administration.models.CreateQueueOptions; +import com.azure.messaging.servicebus.administration.models.CreateRuleOptions; import com.azure.messaging.servicebus.administration.models.CreateSubscriptionOptions; import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; import com.azure.messaging.servicebus.administration.models.NamespaceProperties; import com.azure.messaging.servicebus.administration.models.QueueProperties; import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.RuleProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeInfo; import com.azure.messaging.servicebus.administration.models.TopicProperties; import com.azure.messaging.servicebus.administration.models.TopicRuntimeInfo; import com.azure.messaging.servicebus.implementation.EntitiesImpl; import com.azure.messaging.servicebus.implementation.EntityHelper; +import com.azure.messaging.servicebus.implementation.RulesImpl; import com.azure.messaging.servicebus.implementation.ServiceBusManagementClientImpl; import com.azure.messaging.servicebus.implementation.ServiceBusManagementSerializer; import com.azure.messaging.servicebus.implementation.models.CreateQueueBody; import com.azure.messaging.servicebus.implementation.models.CreateQueueBodyContent; +import com.azure.messaging.servicebus.implementation.models.CreateRuleBody; +import com.azure.messaging.servicebus.implementation.models.CreateRuleBodyContent; import com.azure.messaging.servicebus.implementation.models.CreateSubscriptionBody; import com.azure.messaging.servicebus.implementation.models.CreateSubscriptionBodyContent; import com.azure.messaging.servicebus.implementation.models.CreateTopicBody; @@ -47,6 +52,11 @@ import com.azure.messaging.servicebus.implementation.models.QueueDescriptionEntry; import com.azure.messaging.servicebus.implementation.models.QueueDescriptionFeed; import com.azure.messaging.servicebus.implementation.models.ResponseLink; +import com.azure.messaging.servicebus.implementation.models.RuleActionImpl; +import com.azure.messaging.servicebus.implementation.models.RuleDescription; +import com.azure.messaging.servicebus.implementation.models.RuleDescriptionEntry; +import com.azure.messaging.servicebus.implementation.models.RuleDescriptionFeed; +import com.azure.messaging.servicebus.implementation.models.RuleFilterImpl; import com.azure.messaging.servicebus.implementation.models.ServiceBusManagementError; import com.azure.messaging.servicebus.implementation.models.ServiceBusManagementErrorException; import com.azure.messaging.servicebus.implementation.models.SubscriptionDescription; @@ -102,6 +112,7 @@ public final class ServiceBusAdministrationAsyncClient { private final EntitiesImpl entityClient; private final ClientLogger logger = new ClientLogger(ServiceBusAdministrationAsyncClient.class); private final ServiceBusManagementSerializer serializer; + private final RulesImpl rulesClient; /** * Creates a new instance with the given management client and serializer. @@ -111,9 +122,10 @@ public final class ServiceBusAdministrationAsyncClient { */ ServiceBusAdministrationAsyncClient(ServiceBusManagementClientImpl managementClient, ServiceBusManagementSerializer serializer) { + this.serializer = Objects.requireNonNull(serializer, "'serializer' cannot be null."); this.managementClient = Objects.requireNonNull(managementClient, "'managementClient' cannot be null."); this.entityClient = managementClient.getEntities(); - this.serializer = serializer; + this.rulesClient = managementClient.getRules(); } /** @@ -182,6 +194,82 @@ public Mono> createQueueWithResponse(String queueName, return withContext(context -> createQueueWithResponse(queueName, queueOptions, context)); } + /** + * Creates a rule under the given topic and subscription + * + * @param topicName Name of the topic associated with rule. + * @param subscriptionName Name of the subscription associated with the rule. + * @param ruleName Name of the rule. + * + * @return A Mono that completes with information about the created rule. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the quota is exceeded, or an error occurred + * processing the request. + * @throws IllegalArgumentException if {@code topicName} or {@code ruleName} are are empty strings. + * @throws NullPointerException if {@code topicName} or {@code ruleName} are are null. + * @throws ResourceExistsException if a rule exists with the same topic, subscription, and rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRule(String topicName, String subscriptionName, String ruleName) { + try { + return createRule(topicName, subscriptionName, ruleName, new CreateRuleOptions()); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + /** + * Creates a rule with the {@link CreateRuleOptions}. + * + * @param topicName Name of the topic associated with rule. + * @param subscriptionName Name of the subscription associated with the rule. + * @param ruleName Name of the rule. + * @param ruleOptions Information about the rule to create. + * + * @return A Mono that completes with information about the created rule. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the quota is exceeded, or an error occurred + * processing the request. + * @throws IllegalArgumentException if {@code topicName} or {@code ruleName} are are empty strings. + * @throws NullPointerException if {@code topicName}, {@code ruleName}, or {@code ruleOptions} + * are are null. + * @throws ResourceExistsException if a rule exists with the same topic and rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRule(String topicName, String subscriptionName, String ruleName, + CreateRuleOptions ruleOptions) { + + return createRuleWithResponse(topicName, subscriptionName, ruleName, ruleOptions) + .map(Response::getValue); + } + + /** + * Creates a rule and returns the created rule in addition to the HTTP response. + * + * @param topicName Name of the topic associated with rule. + * @param subscriptionName Name of the subscription associated with the rule. + * @param ruleName Name of the rule. + * @param ruleOptions Information about the rule to create. + * + * @return A Mono that returns the created rule in addition to the HTTP response. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the quota is exceeded, or an error occurred + * processing the request. + * @throws IllegalArgumentException if {@code topicName} or {@code ruleName} are are empty strings. + * @throws NullPointerException if {@code topicName}, {@code ruleName}, or {@code ruleOptions} + * are are null. + * @throws ResourceExistsException if a rule exists with the same topic and rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createRuleWithResponse(String topicName, String subscriptionName, + String ruleName, CreateRuleOptions ruleOptions) { + return withContext(context -> createRuleWithResponse(topicName, subscriptionName, ruleName, ruleOptions, + context)); + } + /** * Creates a subscription with the given topic and subscription names. * @@ -208,7 +296,7 @@ public Mono createSubscription(String topicName, String } /** - * Creates a subscription with the {@link SubscriptionProperties}. + * Creates a subscription with the {@link CreateSubscriptionOptions}. * * @param topicName Name of the topic associated with subscription. * @param subscriptionName Name of the subscription. @@ -228,17 +316,19 @@ public Mono createSubscription(String topicName, String @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSubscription(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions) { - return createSubscriptionWithResponse(topicName, subscriptionName, subscriptionOptions).map(Response::getValue); + + return createSubscriptionWithResponse(topicName, subscriptionName, subscriptionOptions) + .map(Response::getValue); } /** - * Creates a queue and returns the created queue in addition to the HTTP response. + * Creates a subscription and returns the created subscription in addition to the HTTP response. * * @param topicName Name of the topic associated with subscription. * @param subscriptionName Name of the subscription. * @param subscriptionOptions Information about the subscription to create. * - * @return A Mono that returns the created queue in addition to the HTTP response. + * @return A Mono that returns the created subscription in addition to the HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If the request body was invalid, the quota is exceeded, or an error occurred @@ -361,6 +451,48 @@ public Mono> deleteQueueWithResponse(String queueName) { return withContext(context -> deleteQueueWithResponse(queueName, context)); } + /** + * Deletes a rule the matching {@code ruleName}. + * + * @param topicName Name of topic associated with rule to delete. + * @param subscriptionName Name of the subscription associated with the rule to delete. + * @param ruleName Name of rule to delete. + * + * @return A Mono that completes when the rule is deleted. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If error occurred processing the request. + * @throws IllegalArgumentException if {@code topicName} or {@code ruleName} is an empty string. + * @throws NullPointerException if {@code topicName} or {@code ruleName} is null. + * @throws ResourceNotFoundException if the {@code ruleName} does not exist. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRule(String topicName, String subscriptionName, String ruleName) { + return deleteRuleWithResponse(topicName, subscriptionName, ruleName).then(); + } + + /** + * Deletes a rule the matching {@code ruleName} and returns the HTTP response. + * + * @param topicName Name of topic associated with rule to delete. + * @param subscriptionName Name of the subscription associated with the rule to delete. + * @param ruleName Name of rule to delete. + * + * @return A Mono that completes when the rule is deleted and returns the HTTP response. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If error occurred processing the request. + * @throws IllegalArgumentException if {@code topicName}, {@code subscriptionName}, or {@code ruleName} is an + * empty string. + * @throws NullPointerException if {@code topicName}, {@code subscriptionName}, or {@code ruleName} is null. + * @throws ResourceNotFoundException if the {@code ruleName} does not exist. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteRuleWithResponse(String topicName, String subscriptionName, + String ruleName) { + return withContext(context -> deleteRuleWithResponse(topicName, subscriptionName, ruleName, context)); + } + /** * Deletes a subscription the matching {@code subscriptionName}. * @@ -574,6 +706,41 @@ public Mono> getNamespacePropertiesWithResponse() return withContext(this::getNamespacePropertiesWithResponse); } + /** + * Gets a rule from the service namespace. + * + * Only following data types are deserialized in Filters and Action parameters - string, int, long, boolean, double, + * and OffsetDateTime. Other data types would return its string value. + * + * @param topicName The name of the topic relative to service bus namespace. + * @param subscriptionName The subscription name the rule belongs to. + * @param ruleName The name of the rule to retrieve. + * + * @return The associated rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRule(String topicName, String subscriptionName, String ruleName) { + return getRuleWithResponse(topicName, subscriptionName, ruleName).map(response -> response.getValue()); + } + + /** + * Gets a rule from the service namespace. + * + * Only following data types are deserialized in Filters and Action parameters - string, int, long, bool, double, + * and OffsetDateTime. Other data types would return its string value. + * + * @param topicName The name of the topic relative to service bus namespace. + * @param subscriptionName The subscription name the rule belongs to. + * @param ruleName The name of the rule to retrieve. + * + * @return The associated rule with the corresponding HTTP response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRuleWithResponse(String topicName, String subscriptionName, + String ruleName) { + return withContext(context -> getRuleWithResponse(topicName, subscriptionName, ruleName, context)); + } + /** * Gets information about the queue. * @@ -822,6 +989,33 @@ public PagedFlux listQueues() { token -> withContext(context -> listQueuesNextPage(token, context))); } + /** + * Fetches all the rules for a topic and subscription. + * + * @param topicName The topic name under which all the rules need to be retrieved. + * @param subscriptionName The name of the subscription for which all rules need to be retrieved. + * + * @return A Flux of {@link RuleProperties rules} for the {@code topicName} and {@code subscriptionName}. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws NullPointerException if {@code topicName} or {@code subscriptionName} is null. + * @throws IllegalArgumentException if {@code topicName} or {@code subscriptionName} is an empty string. + * @see List entities, rules, or + * authorization rules + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRules(String topicName, String subscriptionName) { + if (topicName == null) { + return pagedFluxError(logger, new NullPointerException("'topicName' cannot be null.")); + } else if (topicName.isEmpty()) { + return pagedFluxError(logger, new IllegalArgumentException("'topicName' cannot be an empty string.")); + } + + return new PagedFlux<>( + () -> withContext(context -> listRulesFirstPage(topicName, subscriptionName, context)), + token -> withContext(context -> listRulesNextPage(topicName, subscriptionName, token, context))); + } + /** * Fetches all the subscriptions for a topic. * @@ -940,6 +1134,67 @@ public Mono> updateQueueWithResponse(QueueProperties q return withContext(context -> updateQueueWithResponse(queue, context)); } + /** + * Updates a rule with the given {@link RuleProperties}. The {@link RuleProperties} must be fully populated as all + * of the properties are replaced. If a property is not set the service default value is used. + * + * The suggested flow is: + *

    + *
  1. {@link #getRule(String, String, String) Get rule description.}
  2. + *
  3. Update the required elements.
  4. + *
  5. Pass the updated description into this method.
  6. + *
+ * + * @param topicName The topic name under which the rule is updated. + * @param subscriptionName The name of the subscription for which the rule is updated. + * @param rule Information about the rule to update. You must provide all the property values that are desired + * on the updated entity. Any values not provided are set to the service default values. + * + * @return A Mono that returns the updated rule. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the rule quota is exceeded, or an error + * occurred processing the request. + * @throws IllegalArgumentException if {@link RuleProperties#getName()} is null or an empty string. + * @throws NullPointerException if {@code rule} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateRule(String topicName, String subscriptionName, RuleProperties rule) { + return updateRuleWithResponse(topicName, subscriptionName, rule).map(Response::getValue); + } + + /** + * Updates a rule with the given {@link RuleProperties}. The {@link RuleProperties} must be fully populated as all + * of the properties are replaced. If a property is not set the service default value is used. + * + * The suggested flow is: + *
    + *
  1. {@link #getRule(String, String, String) Get rule description.}
  2. + *
  3. Update the required elements.
  4. + *
  5. Pass the updated description into this method.
  6. + *
+ * + * @param topicName The topic name under which the rule is updated. + * @param subscriptionName The name of the subscription for which the rule is updated. + * @param rule Information about the rule to update. You must provide all the property values that are desired + * on the updated entity. Any values not provided are set to the service default values. + * + * @return A Mono that returns the updated rule in addition to the HTTP response. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the rule quota is exceeded, or an error + * occurred processing the request. + * @throws IllegalArgumentException if {@link RuleProperties#getName()} is null or an empty string. + * @throws NullPointerException if {@code rule} is null. + * @see Create or Update Entity + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateRuleWithResponse(String topicName, String subscriptionName, + RuleProperties rule) { + + return withContext(context -> updateRuleWithResponse(topicName, subscriptionName, rule, context)); + } + /** * Updates a subscription with the given {@link SubscriptionProperties}. The {@link SubscriptionProperties} must be * fully populated as all of the properties are replaced. If a property is not set the service default value is @@ -1134,17 +1389,76 @@ Mono> createQueueWithResponse(String queueName, Create } } + /** + * Creates a rule with its context. + * + * @param ruleOptions Rule to create. + * @param context Context to pass into request. + * + * @return A Mono that completes with the created {@link RuleProperties}. + */ + Mono> createRuleWithResponse(String topicName, String subscriptionName, String ruleName, + CreateRuleOptions ruleOptions, Context context) { + if (topicName == null) { + return monoError(logger, new NullPointerException("'topicName' cannot be null.")); + } else if (topicName.isEmpty()) { + return monoError(logger, new IllegalArgumentException("'topicName' cannot be empty.")); + } + + if (subscriptionName == null) { + return monoError(logger, new NullPointerException("'subscriptionName' cannot be null.")); + } else if (subscriptionName.isEmpty()) { + return monoError(logger, new IllegalArgumentException("'subscriptionName' cannot be empty.")); + } + + if (ruleName == null) { + return monoError(logger, new NullPointerException("'ruleName' cannot be null.")); + } else if (ruleName.isEmpty()) { + return monoError(logger, new IllegalArgumentException("'ruleName' cannot be empty.")); + } + + if (ruleOptions == null) { + return monoError(logger, new NullPointerException("'rule' cannot be null.")); + } + + final RuleActionImpl action = ruleOptions.getAction() != null + ? EntityHelper.toImplementation(ruleOptions.getAction()) + : null; + final RuleFilterImpl filter = ruleOptions.getFilter() != null + ? EntityHelper.toImplementation(ruleOptions.getFilter()) + : null; + final RuleDescription rule = new RuleDescription() + .setAction(action) + .setFilter(filter) + .setName(ruleName); + + final CreateRuleBodyContent content = new CreateRuleBodyContent() + .setType(CONTENT_TYPE) + .setRuleDescription(rule); + final CreateRuleBody createEntity = new CreateRuleBody().setContent(content); + + final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, SERVICE_BUS_TRACING_NAMESPACE_VALUE); + + try { + return managementClient.getRules().putWithResponseAsync(topicName, subscriptionName, ruleName, createEntity, + null, withTracing) + .onErrorMap(ServiceBusAdministrationAsyncClient::mapException) + .map(response -> deserializeRule(response)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + /** * Creates a subscription with its context. * - * @param options Subscription to create. + * @param subscriptionOptions Subscription to create. * @param context Context to pass into request. * * @return A Mono that completes with the created {@link SubscriptionProperties}. */ Mono> createSubscriptionWithResponse(String topicName, String subscriptionName, - CreateSubscriptionOptions options, - Context context) { + CreateSubscriptionOptions subscriptionOptions, Context context) { if (topicName == null) { return monoError(logger, new NullPointerException("'topicName' cannot be null.")); } else if (topicName.isEmpty()) { @@ -1157,11 +1471,11 @@ Mono> createSubscriptionWithResponse(String top return monoError(logger, new IllegalArgumentException("'subscriptionName' cannot be empty.")); } - if (options == null) { + if (subscriptionOptions == null) { return monoError(logger, new NullPointerException("'subscription' cannot be null.")); } - final SubscriptionDescription subscription = EntityHelper.getSubscriptionDescription(options); + final SubscriptionDescription subscription = EntityHelper.getSubscriptionDescription(subscriptionOptions); final CreateSubscriptionBodyContent content = new CreateSubscriptionBodyContent() .setType(CONTENT_TYPE) .setSubscriptionDescription(subscription); @@ -1225,7 +1539,7 @@ Mono> createTopicWithResponse(String topicName, Create * @param queueName Name of queue to delete. * @param context Context to pass into request. * - * @return A Mono that completes with the created {@link QueueProperties}. + * @return A Mono that completes when the queue is deleted. */ Mono> deleteQueueWithResponse(String queueName, Context context) { if (queueName == null) { @@ -1250,6 +1564,46 @@ Mono> deleteQueueWithResponse(String queueName, Context context) } } + /** + * Deletes a queue with its context. + * + * @param topicName Name of topic to delete. + * @param subscriptionName Name of the subscription for the rule. + * @param ruleName Name of the rule. + * @param context Context to pass into request. + * + * @return A Mono that completes with the created {@link QueueProperties}. + */ + Mono> deleteRuleWithResponse(String topicName, String subscriptionName, String ruleName, + Context context) { + if (topicName == null) { + return monoError(logger, new NullPointerException("'topicName' cannot be null")); + } else if (topicName.isEmpty()) { + return monoError(logger, new IllegalArgumentException("'topicName' cannot be an empty string.")); + } else if (subscriptionName == null) { + return monoError(logger, new NullPointerException("'subscriptionName' cannot be null")); + } else if (subscriptionName.isEmpty()) { + return monoError(logger, new IllegalArgumentException("'subscriptionName' cannot be an empty string.")); + } else if (ruleName == null) { + return monoError(logger, new NullPointerException("'ruleName' cannot be null")); + } else if (ruleName.isEmpty()) { + return monoError(logger, new IllegalArgumentException("'ruleName' cannot be an empty string.")); + } else if (context == null) { + return monoError(logger, new NullPointerException("'context' cannot be null.")); + } + + final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, SERVICE_BUS_TRACING_NAMESPACE_VALUE); + + try { + return rulesClient.deleteWithResponseAsync(topicName, subscriptionName, ruleName, withTracing) + .onErrorMap(ServiceBusAdministrationAsyncClient::mapException) + .map(response -> new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), null)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + /** * Deletes a subscription with its context. * @@ -1381,6 +1735,19 @@ Mono> getQueueWithResponse(String queueName, Context context, } } + Mono> getRuleWithResponse(String topicName, String subscriptionName, + String ruleName, Context context) { + final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, SERVICE_BUS_TRACING_NAMESPACE_VALUE); + + try { + return rulesClient.getWithResponseAsync(topicName, subscriptionName, ruleName, true, withTracing) + .onErrorMap(ServiceBusAdministrationAsyncClient::mapException) + .map(this::deserializeRule); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + /** * Gets a subscription with its context. * @@ -1536,6 +1903,47 @@ Mono> listQueuesNextPage(String continuationToken } } + /** + * Gets the first page of rules with context. + * + * @param context Context to pass into request. + * + * @return A Mono that completes with a page of rules. + */ + Mono> listRulesFirstPage(String topicName, String subscriptionName, Context context) { + final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, SERVICE_BUS_TRACING_NAMESPACE_VALUE); + + try { + return listRules(topicName, subscriptionName, 0, withTracing); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + /** + * Gets the next page of rules with context. + * + * @param continuationToken Number of items to skip in feed. + * @param context Context to pass into request. + * + * @return A Mono that completes with a page of rules or empty if there are no items left. + */ + Mono> listRulesNextPage(String topicName, String subscriptionName, + String continuationToken, Context context) { + if (continuationToken == null || continuationToken.isEmpty()) { + return Mono.empty(); + } + + try { + final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, SERVICE_BUS_TRACING_NAMESPACE_VALUE); + final int skip = Integer.parseInt(continuationToken); + + return listRules(topicName, subscriptionName, skip, withTracing); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + /** * Gets the first page of subscriptions with context. * @@ -1651,6 +2059,42 @@ Mono> updateQueueWithResponse(QueueProperties queue, C } } + /** + * Updates a rule with its context. + * + * @param rule Information about the rule to update. You must provide all the property values that are desired + * on the updated entity. Any values not provided are set to the service default values. + * @param context Context to pass into request. + * + * @return A Mono that completes with the updated {@link RuleProperties}. + */ + Mono> updateRuleWithResponse(String topicName, String subscriptionName, + RuleProperties rule, Context context) { + if (rule == null) { + return monoError(logger, new NullPointerException("'rule' cannot be null")); + } else if (context == null) { + return monoError(logger, new NullPointerException("'context' cannot be null.")); + } + + final RuleDescription implementation = EntityHelper.toImplementation(rule); + final CreateRuleBodyContent content = new CreateRuleBodyContent() + .setType(CONTENT_TYPE) + .setRuleDescription(implementation); + final CreateRuleBody ruleBody = new CreateRuleBody() + .setContent(content); + final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, SERVICE_BUS_TRACING_NAMESPACE_VALUE); + + try { + // If-Match == "*" to unconditionally update. This is in line with the existing client library behaviour. + return managementClient.getRules().putWithResponseAsync(topicName, subscriptionName, rule.getName(), + ruleBody, "*", withTracing) + .onErrorMap(ServiceBusAdministrationAsyncClient::mapException) + .map(response -> deserializeRule(response)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + /** * Updates a subscription with its context. * @@ -1783,6 +2227,30 @@ private Response deserializeQueue(Response response) { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), result); } + /** + * Converts a Response into its corresponding {@link RuleDescriptionEntry} then mapped into {@link RuleProperties}. + * + * @param response HTTP Response to deserialize. + * + * @return The corresponding HTTP response with convenience properties set. + */ + private Response deserializeRule(Response response) { + final RuleDescriptionEntry entry = deserialize(response.getValue(), RuleDescriptionEntry.class); + + // This was an empty response (ie. 204). + if (entry == null) { + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null); + } else if (entry.getContent() == null) { + logger.info("entry.getContent() is null. The entity may not exist. {}", entry); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null); + } + + final RuleDescription description = entry.getContent().getRuleDescription(); + final RuleProperties result = EntityHelper.toModel(description); + + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), result); + } + /** * Converts a Response into its corresponding {@link SubscriptionDescriptionEntry} then mapped into {@link * SubscriptionProperties}. @@ -1917,6 +2385,46 @@ private Mono> listQueues(int skip, Context contex }); } + + /** + * Helper method that invokes the service method, extracts the data and translates it to a PagedResponse. + * + * @param skip Number of elements to skip. + * @param context Context for the query. + * + * @return A Mono that completes with a paged response of rules. + */ + private Mono> listRules(String topicName, String subscriptionName, int skip, + Context context) { + return managementClient.listRulesWithResponseAsync(topicName, subscriptionName, skip, NUMBER_OF_ELEMENTS, + context) + .onErrorMap(ServiceBusAdministrationAsyncClient::mapException) + .flatMap(response -> { + final Response feedResponse = deserialize(response, + RuleDescriptionFeed.class); + + final RuleDescriptionFeed feed = feedResponse.getValue(); + if (feed == null) { + logger.warning("Could not deserialize RuleDescriptionFeed. skip {}, top: {}", skip, + NUMBER_OF_ELEMENTS); + return Mono.empty(); + } + + final List entities = feed.getEntry().stream() + .filter(e -> e.getContent() != null && e.getContent().getRuleDescription() != null) + .map(e -> { + return EntityHelper.toModel(e.getContent().getRuleDescription()); + }) + .collect(Collectors.toList()); + try { + return Mono.just(extractPage(feedResponse, entities, feed.getLink())); + } catch (MalformedURLException | UnsupportedEncodingException error) { + return Mono.error(new RuntimeException( + "Could not parse response into FeedPage", error)); + } + }); + } + /** * Helper method that invokes the service method, extracts the data and translates it to a PagedResponse. * diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClient.java index d0334be730f04..1af995b296b85 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClient.java @@ -15,11 +15,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.messaging.servicebus.administration.models.CreateQueueOptions; +import com.azure.messaging.servicebus.administration.models.CreateRuleOptions; import com.azure.messaging.servicebus.administration.models.CreateSubscriptionOptions; import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; import com.azure.messaging.servicebus.administration.models.NamespaceProperties; import com.azure.messaging.servicebus.administration.models.QueueProperties; import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.RuleProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeInfo; import com.azure.messaging.servicebus.administration.models.TopicProperties; @@ -80,8 +82,7 @@ public QueueProperties createQueue(String queueName) { * @throws HttpResponseException If the request body was invalid, the queue quota is exceeded, or an error * occurred processing the request. * @throws NullPointerException if {@code queue} is null. - * @throws ResourceExistsException if a queue exists with the same {@link QueueProperties#getName() - * queueName}. + * @throws ResourceExistsException if a queue exists with the same {@link QueueProperties#getName() queueName}. * @see Create or Update Entity */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -102,8 +103,7 @@ public QueueProperties createQueue(String queueName, CreateQueueOptions queueOpt * @throws HttpResponseException If the request body was invalid, the queue quota is exceeded, or an error * occurred processing the request. * @throws NullPointerException if {@code queue} is null. - * @throws ResourceExistsException if a queue exists with the same {@link QueueProperties#getName() - * queueName}. + * @throws ResourceExistsException if a queue exists with the same {@link QueueProperties#getName() queueName}. * @see Create or Update Entity */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -113,6 +113,74 @@ public Response createQueueWithResponse(String queueName, Creat .block(); } + /** + * Creates a rule under the given topic and subscription + * + * @param topicName Name of the topic associated with rule. + * @param subscriptionName Name of the subscription associated with the rule. + * @param ruleName Name of the rule. + * + * @return Information about the created rule. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the quota is exceeded, or an error occurred + * processing the request. + * @throws IllegalArgumentException if {@code topicName} or {@code ruleName} are are empty strings. + * @throws NullPointerException if {@code topicName} or {@code ruleName} are are null. + * @throws ResourceExistsException if a rule exists with the same topic, subscription, and rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleProperties createRule(String topicName, String subscriptionName, String ruleName) { + return asyncClient.createRule(topicName, subscriptionName, ruleName).block(); + } + + /** + * Creates a rule with the {@link CreateRuleOptions}. + * + * @param topicName Name of the topic associated with rule. + * @param subscriptionName Name of the subscription associated with the rule. + * @param ruleName Name of the rule. + * @param ruleOptions Information about the rule to create. + * + * @return Information about the created rule. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the quota is exceeded, or an error occurred + * processing the request. + * @throws IllegalArgumentException if {@code topicName} or {@code ruleName} are are empty strings. + * @throws NullPointerException if {@code topicName}, {@code ruleName}, or {@code ruleOptions} are are null. + * @throws ResourceExistsException if a rule exists with the same topic and rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleProperties createRule(String topicName, String ruleName, String subscriptionName, + CreateRuleOptions ruleOptions) { + return asyncClient.createRule(topicName, subscriptionName, ruleName, ruleOptions).block(); + } + + /** + * Creates a rule and returns the created rule in addition to the HTTP response. + * + * @param topicName Name of the topic associated with rule. + * @param subscriptionName Name of the subscription associated with the rule. + * @param ruleName Name of the rule. + * @param ruleOptions Information about the rule to create. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * + * @return The created rule in addition to the HTTP response. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the quota is exceeded, or an error occurred + * processing the request. + * @throws IllegalArgumentException if {@code topicName} or {@code ruleName} are are empty strings. + * @throws NullPointerException if {@code topicName}, {@code ruleName}, or {@code ruleOptions} are are null. + * @throws ResourceExistsException if a rule exists with the same topic and rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createRuleWithResponse(String topicName, String subscriptionName, + String ruleName, CreateRuleOptions ruleOptions, Context context) { + return asyncClient.createRuleWithResponse(topicName, subscriptionName, ruleName, ruleOptions, context).block(); + } + /** * Creates a subscription with the given topic and subscription names. * @@ -166,7 +234,7 @@ public SubscriptionProperties createSubscription(String topicName, String subscr * @param subscriptionOptions Information about the subscription to create. * @param context Additional context that is passed through the HTTP pipeline during the service call. * - * @return The created queue in addition to the HTTP response. + * @return The created subscription in addition to the HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If the request body was invalid, the quota is exceeded, or an error occurred @@ -285,6 +353,49 @@ public Response deleteQueueWithResponse(String queueName, Context context) return asyncClient.deleteQueueWithResponse(queueName, context != null ? context : Context.NONE).block(); } + /** + * Deletes a rule the matching {@code ruleName}. + * + * @param topicName Name of topic associated with rule to delete. + * @param subscriptionName Name of the subscription associated with the rule to delete. + * @param ruleName Name of rule to delete. + * + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If error occurred processing the request. + * @throws IllegalArgumentException if {@code topicName} or {@code ruleName} is an empty string. + * @throws NullPointerException if {@code topicName} or {@code ruleName} is null. + * @throws ResourceNotFoundException if the {@code ruleName} does not exist. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRule(String topicName, String subscriptionName, String ruleName) { + asyncClient.deleteRule(topicName, subscriptionName, ruleName).block(); + } + + /** + * Deletes a rule the matching {@code ruleName} and returns the HTTP response. + * + * @param topicName Name of topic associated with rule to delete. + * @param subscriptionName Name of the subscription associated with the rule to delete. + * @param ruleName Name of rule to delete. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * + * @return The HTTP response. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If error occurred processing the request. + * @throws IllegalArgumentException if {@code topicName}, {@code subscriptionName}, or {@code ruleName} is an + * empty string. + * @throws NullPointerException if {@code topicName}, {@code subscriptionName}, or {@code ruleName} is null. + * @throws ResourceNotFoundException if the {@code ruleName} does not exist. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRuleWithResponse(String topicName, String subscriptionName, + String ruleName, Context context) { + return asyncClient.deleteRuleWithResponse(topicName, subscriptionName, ruleName, + context != null ? context : Context.NONE).block(); + } + /** * Deletes a subscription the matching {@code subscriptionName}. * @@ -485,7 +596,7 @@ public Response getQueueRuntimeInfoWithResponse(String queueNa /** * Gets information about the Service Bus namespace. * - * @return A Mono that completes with information about the Service Bus namespace. + * @return Information about the Service Bus namespace. * @throws ClientAuthenticationException if the client's credentials do not have access to the namespace. * @throws HttpResponseException If error occurred processing the request. */ @@ -499,7 +610,7 @@ public NamespaceProperties getNamespaceProperties() { * * @param context Additional context that is passed through the HTTP pipeline during the service call. * - * @return A Mono that completes with information about the namespace and the associated HTTP response. + * @return Information about the namespace and the associated HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -509,6 +620,43 @@ public Response getNamespacePropertiesWithResponse(Context return asyncClient.getNamespacePropertiesWithResponse(context).block(); } + /** + * Gets a rule from the service namespace. + * + * Only following data types are deserialized in Filters and Action parameters - string, int, long, boolean, double, + * and OffsetDateTime. Other data types would return its string value. + * + * @param topicName The name of the topic relative to service bus namespace. + * @param subscriptionName The subscription name the rule belongs to. + * @param ruleName The name of the rule to retrieve. + * + * @return The associated rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleProperties getRule(String topicName, String subscriptionName, String ruleName) { + return asyncClient.getRule(topicName, subscriptionName, ruleName).block(); + } + + /** + * Gets a rule from the service namespace. + * + * Only following data types are deserialized in Filters and Action parameters - string, int, long, bool, double, + * and OffsetDateTime. Other data types would return its string value. + * + * @param topicName The name of the topic relative to service bus namespace. + * @param subscriptionName The subscription name the rule belongs to. + * @param ruleName The name of the rule to retrieve. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * + * @return The associated rule with the corresponding HTTP response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRuleWithResponse(String topicName, String subscriptionName, + String ruleName, Context context) { + return asyncClient.getRuleWithResponse(topicName, subscriptionName, ruleName, + context != null ? context : Context.NONE).block(); + } + /** * Gets information about the queue. * @@ -790,6 +938,25 @@ public PagedIterable listQueues(Context context) { return new PagedIterable<>(pagedFlux); } + /** + * Fetches all the rules for a topic and subscription. + * + * @param topicName The topic name under which all the rules need to be retrieved. + * @param subscriptionName The name of the subscription for which all rules need to be retrieved. + * + * @return An iterable of {@link RuleProperties rules} for the {@code topicName} and {@code subscriptionName}. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws NullPointerException if {@code topicName} or {@code subscriptionName} is null. + * @throws IllegalArgumentException if {@code topicName} or {@code subscriptionName} is an empty string. + * @see List entities, rules, or + * authorization rules + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRules(String topicName, String subscriptionName) { + return new PagedIterable<>(asyncClient.listRules(topicName, subscriptionName)); + } + /** * Fetches all the subscriptions for a topic. * @@ -945,8 +1112,70 @@ public Response updateQueueWithResponse(QueueProperties queue, } /** - * Updates a subscription with the given {@link SubscriptionProperties}. The {@link SubscriptionProperties} must - * be fully populated as all of the properties are replaced. If a property is not set the service default value is + * Updates a rule with the given {@link RuleProperties}. The {@link RuleProperties} must be fully populated as all + * of the properties are replaced. If a property is not set the service default value is used. + * + * The suggested flow is: + *
    + *
  1. {@link #getRule(String, String, String) Get rule description.}
  2. + *
  3. Update the required elements.
  4. + *
  5. Pass the updated description into this method.
  6. + *
+ * + * @param topicName The topic name under which the rule is updated. + * @param subscriptionName The name of the subscription for which the rule is updated. + * @param rule Information about the rule to update. You must provide all the property values that are desired + * on the updated entity. Any values not provided are set to the service default values. + * + * @return The updated rule. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the rule quota is exceeded, or an error + * occurred processing the request. + * @throws IllegalArgumentException if {@link RuleProperties#getName()} is null or an empty string. + * @throws NullPointerException if {@code rule} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleProperties updateRule(String topicName, String subscriptionName, RuleProperties rule) { + return asyncClient.updateRule(topicName, subscriptionName, rule).block(); + } + + /** + * Updates a rule with the given {@link RuleProperties}. The {@link RuleProperties} must be fully populated as all + * of the properties are replaced. If a property is not set the service default value is used. + * + * The suggested flow is: + *
    + *
  1. {@link #getRule(String, String, String) Get rule description.}
  2. + *
  3. Update the required elements.
  4. + *
  5. Pass the updated description into this method.
  6. + *
+ * + * @param topicName The topic name under which the rule is updated. + * @param subscriptionName The name of the subscription for which the rule is updated. + * @param rule Information about the rule to update. You must provide all the property values that are desired + * on the updated entity. Any values not provided are set to the service default values. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * + * @return A Mono that returns the updated rule in addition to the HTTP response. + * @throws ClientAuthenticationException if the client's credentials do not have access to modify the + * namespace. + * @throws HttpResponseException If the request body was invalid, the rule quota is exceeded, or an error + * occurred processing the request. + * @throws IllegalArgumentException if {@link RuleProperties#getName()} is null or an empty string. + * @throws NullPointerException if {@code rule} is null. + * @see Create or Update Entity + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateRuleWithResponse(String topicName, String subscriptionName, + RuleProperties rule, Context context) { + return asyncClient.updateRuleWithResponse(topicName, subscriptionName, rule, + context != null ? context : Context.NONE).block(); + } + + /** + * Updates a subscription with the given {@link SubscriptionProperties}. The {@link SubscriptionProperties} must be + * fully populated as all of the properties are replaced. If a property is not set the service default value is * used. * * The suggested flow is: @@ -967,7 +1196,7 @@ public Response updateQueueWithResponse(QueueProperties queue, * @param subscription Information about the subscription to update. You must provide all the property values * that are desired on the updated entity. Any values not provided are set to the service default values. * - * @return A Mono that returns the updated subscription in addition to the HTTP response. + * @return Updated subscription in addition to the HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If the request body was invalid, the subscription quota is exceeded, or an @@ -983,8 +1212,8 @@ public SubscriptionProperties updateSubscription(SubscriptionProperties subscrip } /** - * Updates a subscription with the given {@link SubscriptionProperties}. The {@link SubscriptionProperties} must - * be fully populated as all of the properties are replaced. If a property is not set the service default value is + * Updates a subscription with the given {@link SubscriptionProperties}. The {@link SubscriptionProperties} must be + * fully populated as all of the properties are replaced. If a property is not set the service default value is * used. * * The suggested flow is: @@ -1006,7 +1235,7 @@ public SubscriptionProperties updateSubscription(SubscriptionProperties subscrip * that are desired on the updated entity. Any values not provided are set to the service default values. * @param context Additional context that is passed through the HTTP pipeline during the service call. * - * @return A Mono that returns the updated subscription in addition to the HTTP response. + * @return Updated subscription in addition to the HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If the request body was invalid, the subscription quota is exceeded, or an diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilter.java new file mode 100644 index 0000000000000..da66d912e9add --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilter.java @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.messaging.servicebus.ServiceBusMessage; + +import java.util.HashMap; +import java.util.Map; + +/** + * Represents the correlation rule filter expression. + *

+ * A CorrelationRuleFilter holds a set of conditions that are matched against one of more of an arriving message's user + * and system properties. A common use is a match against the {@link ServiceBusMessage#getCorrelationId()} property, but + * the application can also choose to match against {@link ServiceBusMessage#getContentType()}, {@link + * ServiceBusMessage#getLabel()}, {@link ServiceBusMessage#getMessageId()}, {@link ServiceBusMessage#getReplyTo()}, + * {@link ServiceBusMessage#getReplyToSessionId()}, {@link ServiceBusMessage#getSessionId()}, {@link + * ServiceBusMessage#getTo()}, and any user-defined properties. A match exists when an arriving message's value for a + * property is equal to the value specified in the correlation filter. For string expressions, the comparison is + * case-sensitive. When specifying multiple match properties, the filter combines them as a logical AND condition, + * meaning all conditions must match for the filter to match. + *

+ *

+ * The CorrelationRuleFilter provides an efficient shortcut for declarations of filters that deal only with correlation + * equality. In this case the cost of the lexigraphical analysis of the expression can be avoided. Not only will + * correlation filters be optimized at declaration time, but they will also be optimized at runtime. Correlation filter + * matching can be reduced to a hashtable lookup, which aggregates the complexity of the set of defined correlation + * filters to O(1). + *

+ */ +@Fluent +public class CorrelationRuleFilter extends RuleFilter { + private final Map properties = new HashMap<>(); + private String correlationId; + private String contentType; + private String label; + private String messageId; + private String replyTo; + private String replyToSessionId; + private String sessionId; + private String to; + + /** + * Initializes a new instance of {@link CorrelationRuleFilter} with default values. + */ + public CorrelationRuleFilter() { + this.correlationId = null; + } + + /** + * Initializes a new instance of {@link CorrelationRuleFilter} with default values with the specified correlation + * identifier. + * + * @param correlationId The identifier for the correlation. + * + * @throws IllegalArgumentException If {@code correlationId} is an empty string. + * @throws NullPointerException If {@code correlationId} is null. + */ + public CorrelationRuleFilter(String correlationId) { + final ClientLogger logger = new ClientLogger(CorrelationRuleFilter.class); + if (correlationId == null) { + throw logger.logExceptionAsError(new NullPointerException("'correlationId' cannot be null")); + } else if (correlationId.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'correlationId' cannot be empty.")); + } + + this.correlationId = correlationId; + } + + /** + * Gets the content type of the message. + * + * @return The content type of the message. + */ + public String getContentType() { + return contentType; + } + + /** + * Sets the content type of the message. + * + * @param contentType The content type of the message. + * + * @return The updated {@link CorrelationRuleFilter} itself. + */ + public CorrelationRuleFilter setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Gets the correlation identifier. + * + * @return The correlation identifier. + */ + public String getCorrelationId() { + return correlationId; + } + + /** + * Sets the correlation identifier. + * + * @param correlationId The correlation identifier. + * + * @return The updated {@link CorrelationRuleFilter} itself. + */ + public CorrelationRuleFilter setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Gets the application specific label. + * + * @return The application specific label. + */ + public String getLabel() { + return label; + } + + /** + * Sets the application specific label. + * + * @param label The application specific label. + * + * @return The updated {@link CorrelationRuleFilter} itself. + */ + public CorrelationRuleFilter setLabel(String label) { + this.label = label; + return this; + } + + /** + * Gets the identifier for the message. + * + * @return The identifier for the message. + */ + public String getMessageId() { + return messageId; + } + + /** + * Sets the identifier for the message. + * + * @param messageId The identifier for the message. + * + * @return The updated {@link CorrelationRuleFilter} itself. + */ + public CorrelationRuleFilter setMessageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Gets application specific properties of the message. + * + * @return The application specific properties of the message. + */ + public Map getProperties() { + return properties; + } + + /** + * Gets the address of the queue or subscription to reply to. + * + * @return The address of the queue or subscription to reply to. + */ + public String getReplyTo() { + return replyTo; + } + + /** + * Sets the address of the queue or subscription to reply to. + * + * @param replyTo The address of the queue or subscription to reply to. + * + * @return The updated {@link CorrelationRuleFilter} itself. + */ + public CorrelationRuleFilter setReplyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Gets the session identifier to reply to. + * + * @return The session identifier to reply to. + */ + public String getReplyToSessionId() { + return replyToSessionId; + } + + /** + * Sets the session identifier to reply to. Max size of {@code replyToSessionId} is 128. + * + * @param replyToSessionId The session identifier to reply to. + * + * @return The updated {@link CorrelationRuleFilter} itself. + */ + public CorrelationRuleFilter setReplyToSessionId(String replyToSessionId) { + this.replyToSessionId = replyToSessionId; + return this; + } + + /** + * Gets the session identifier. + * + * @return The session identifier. + */ + public String getSessionId() { + return sessionId; + } + + /** + * Sets the session identifier. Max size of {@code sessionId} is 128 chars. + * + * @param sessionId The session identifier. + * + * @return The updated {@link CorrelationRuleFilter} itself. + */ + public CorrelationRuleFilter setSessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Gets the address to send to. + * + * @return The address to send to. + */ + public String getTo() { + return to; + } + + /** + * Sets the address to send to. + * + * @param to The address to send to. + * + * @return The updated {@link CorrelationRuleFilter} itself. + */ + public CorrelationRuleFilter setTo(String to) { + this.to = to; + return this; + } + + /** + * Converts the value of the current instance to its equivalent string representation. + * + * @return A string representation of the current instance. + */ + @Override + public String toString() { + final StringBuilder builder = new StringBuilder("CorrelationRuleFilter: "); + + boolean isFirstExpression = appendPropertyExpression(true, builder, "sys.CorrelationId", + correlationId); + isFirstExpression = appendPropertyExpression(isFirstExpression, builder, "sys.MessageId", + messageId); + isFirstExpression = appendPropertyExpression(isFirstExpression, builder, "sys.To", to); + isFirstExpression = appendPropertyExpression(isFirstExpression, builder, "sys.ReplyTo", replyTo); + isFirstExpression = appendPropertyExpression(isFirstExpression, builder, "sys.Label", label); + isFirstExpression = appendPropertyExpression(isFirstExpression, builder, "sys.SessionId", sessionId); + isFirstExpression = appendPropertyExpression(isFirstExpression, builder, "sys.ReplyToSessionId", + replyToSessionId); + isFirstExpression = appendPropertyExpression(isFirstExpression, builder, "sys.ContentType", + contentType); + + for (Map.Entry entry : properties.entrySet()) { + isFirstExpression = appendPropertyExpression(isFirstExpression, builder, entry.getKey(), + entry.getValue().toString()); + } + + return builder.toString(); + } + + private static boolean appendPropertyExpression(boolean isFirstExpression, StringBuilder builder, String display, + String value) { + + if (value == null) { + return true; + } + + if (!isFirstExpression) { + builder.append(" AND "); + } + + builder.append(String.format("%s = '%s'", display, value)); + return false; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateRuleOptions.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateRuleOptions.java new file mode 100644 index 0000000000000..f293788cec932 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateRuleOptions.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +import com.azure.core.annotation.Fluent; + +import java.util.Objects; + +/** + * A set of options for creating a rule. + */ +@Fluent +public class CreateRuleOptions { + private RuleFilter filter; + private RuleAction action; + + /** + * Initializes a new instance with the {@link TrueRuleFilter}. + */ + public CreateRuleOptions() { + this(TrueRuleFilter.getInstance()); + } + + /** + * Initializes a new instance with the given rule {@code name} and {@code filter}. + * + * @param filter Filter expression used to match messages. + * @throws NullPointerException if {@code filter} is null. + */ + public CreateRuleOptions(RuleFilter filter) { + this.filter = Objects.requireNonNull(filter, "'filter' cannot be null."); + } + + /** + * Initializes a new instance with the given rule properties. + * + * @param ruleProperties Rule properties to create new rule from. + * @throws NullPointerException if {@code ruleProperties} is null. + */ + public CreateRuleOptions(RuleProperties ruleProperties) { + Objects.requireNonNull(ruleProperties, "'ruleProperties' cannot be null."); + + this.filter = ruleProperties.getFilter(); + this.action = ruleProperties.getAction(); + } + + /** + * Gets the action to perform if the message satisfies the filtering expression. + * + * @return The action to perform if the message satisfies the filtering expression. + */ + public RuleAction getAction() { + return action; + } + + /** + * Sets the action to perform if the message satisfies the filtering expression. + * + * @param action The action to perform if the message satisfies the filtering expression. + * @return The updated {@link CreateRuleOptions} object. + */ + public CreateRuleOptions setAction(RuleAction action) { + this.action = action; + return this; + } + + /** + * Gets the filter expression used to match messages. + * + * @return The filter expression used to match messages. + */ + public RuleFilter getFilter() { + return filter; + } + + /** + * Sets the filter expression used to match messages. + * + * @param filter The filter expression used to match messages. + * @return The updated {@link CreateRuleOptions} object. + */ + public CreateRuleOptions setFilter(RuleFilter filter) { + this.filter = Objects.requireNonNull(filter, "'filter' cannot be null."); + return this; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/EmptyRuleAction.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/EmptyRuleAction.java new file mode 100644 index 0000000000000..e79d2b62254c6 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/EmptyRuleAction.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +/** + * Represents a rule action that does nothing. + */ +public class EmptyRuleAction extends RuleAction { + private static final EmptyRuleAction INSTANCE = new EmptyRuleAction(); + + static EmptyRuleAction getInstance() { + return INSTANCE; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/FalseRuleFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/FalseRuleFilter.java new file mode 100644 index 0000000000000..33cda84c0cb75 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/FalseRuleFilter.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +/** + * Matches none the messages arriving to be selected for the subscription. + */ +public class FalseRuleFilter extends SqlRuleFilter { + private static final FalseRuleFilter INSTANCE = new FalseRuleFilter(); + + /** + * Gets an instance of the {@link FalseRuleFilter}. + * + * @return an instance of the {@link FalseRuleFilter}. + */ + static FalseRuleFilter getInstance() { + return INSTANCE; + } + + /** + * Initializes a new instance. + */ + public FalseRuleFilter() { + super("1=0"); + } + + /** + * Converts the current instance to its string representation. + * + * @return The string representation. + */ + @Override + public String toString() { + return "FalseRuleFilter"; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleAction.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleAction.java new file mode 100644 index 0000000000000..1b5735fe1ba6b --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleAction.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +/** + * Represents the filter actions which are allowed for the transformation of a message that have been matched by a + * filter expression. + * + *

+ * Filter actions allow for the transformation of a message that have been matched by a filter expression. The typical + * use case for filter actions is to append or update the properties that are attached to a message, for example + * assigning a group ID based on the correlation ID of a message. + *

+ */ +public class RuleAction { + RuleAction() { + // This is intentionally left blank. This constructor exists + // only to prevent external assemblies inheriting from it. + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleFilter.java new file mode 100644 index 0000000000000..a5158119f7cd1 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleFilter.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +import com.azure.messaging.servicebus.ServiceBusMessage; + +/** + * Describes a filter expression that is evaluated against a {@link ServiceBusMessage}. Filter is an abstract class with + * the following concrete implementations: + *
    + *
  • {@link SqlRuleFilter} that represents a filter using SQL syntax.
  • + *
  • {@link CorrelationRuleFilter} that provides an optimisation for correlation equality expressions.
  • + *
+ * + * @see SqlRuleFilter + * @see CorrelationRuleFilter + * @see TrueRuleFilter + * @see FalseRuleFilter + */ +public abstract class RuleFilter { + RuleFilter() { + // This is intentionally left blank. This constructor exists + // only to prevent external assemblies inheriting from it. + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleProperties.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleProperties.java new file mode 100644 index 0000000000000..73bdc8178230d --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/RuleProperties.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +import com.azure.core.annotation.Fluent; +import com.azure.messaging.servicebus.implementation.EntityHelper; +import com.azure.messaging.servicebus.implementation.models.CorrelationFilterImpl; +import com.azure.messaging.servicebus.implementation.models.EmptyRuleActionImpl; +import com.azure.messaging.servicebus.implementation.models.FalseFilterImpl; +import com.azure.messaging.servicebus.implementation.models.KeyValueImpl; +import com.azure.messaging.servicebus.implementation.models.RuleActionImpl; +import com.azure.messaging.servicebus.implementation.models.RuleDescription; +import com.azure.messaging.servicebus.implementation.models.RuleFilterImpl; +import com.azure.messaging.servicebus.implementation.models.SqlFilterImpl; +import com.azure.messaging.servicebus.implementation.models.SqlRuleActionImpl; +import com.azure.messaging.servicebus.implementation.models.TrueFilterImpl; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Represents the properties of a rule. + */ +@Fluent +public class RuleProperties { + private final String name; + private RuleFilter filter; + private RuleAction action; + + static { + EntityHelper.setRuleAccessor(new EntityHelper.RuleAccessor() { + private final EmptyRuleActionImpl emptyRuleAction = new EmptyRuleActionImpl(); + private final SqlFilterImpl trueFilter = new TrueFilterImpl().setSqlExpression("1=1"); + private final SqlFilterImpl falseFilter = new TrueFilterImpl().setSqlExpression("1=0"); + + @Override + public RuleProperties toModel(RuleDescription description) { + final RuleFilter filter = description.getFilter() != null + ? toModel(description.getFilter()) + : null; + final RuleAction action = description.getAction() != null + ? toModel(description.getAction()) + : null; + + return new RuleProperties(description.getName(), filter, action); + } + + @Override + public RuleAction toModel(RuleActionImpl implementation) { + if (implementation instanceof EmptyRuleActionImpl) { + return EmptyRuleAction.getInstance(); + } else if (implementation instanceof SqlRuleActionImpl) { + final SqlRuleActionImpl action = (SqlRuleActionImpl) implementation; + final SqlRuleAction returned = new SqlRuleAction(action.getSqlExpression(), + action.getCompatibilityLevel(), action.isRequiresPreprocessing()); + + if (action.getParameters() != null) { + for (KeyValueImpl parameter : action.getParameters()) { + returned.getProperties().put(parameter.getKey(), parameter.getValue()); + } + } + + return returned; + } else { + return null; + } + } + + @Override + public RuleFilter toModel(RuleFilterImpl implementation) { + if (implementation instanceof TrueFilterImpl) { + return TrueRuleFilter.getInstance(); + } else if (implementation instanceof FalseFilterImpl) { + return FalseRuleFilter.getInstance(); + } else if (implementation instanceof CorrelationFilterImpl) { + final CorrelationFilterImpl filter = (CorrelationFilterImpl) implementation; + final CorrelationRuleFilter returned = new CorrelationRuleFilter() + .setContentType(filter.getContentType()) + .setCorrelationId(filter.getCorrelationId()) + .setLabel(filter.getLabel()) + .setMessageId(filter.getMessageId()) + .setTo(filter.getTo()) + .setSessionId(filter.getSessionId()) + .setReplyTo(filter.getReplyTo()) + .setReplyToSessionId(filter.getReplyToSessionId()); + + if (filter.getProperties() != null) { + filter.getProperties().forEach(keyValue -> + returned.getProperties().put(keyValue.getKey(), keyValue.getValue())); + } + + return returned; + } else if (implementation instanceof SqlFilterImpl) { + final SqlFilterImpl filter = (SqlFilterImpl) implementation; + final SqlRuleFilter returned = new SqlRuleFilter(filter.getSqlExpression(), + filter.getCompatibilityLevel(), filter.isRequiresPreprocessing()); + + if (filter.getParameters() != null) { + filter.getParameters().forEach(keyValue -> + returned.getProperties().put(keyValue.getKey(), keyValue.getValue())); + } + + return returned; + } else { + return null; + } + } + + @Override + public RuleDescription toImplementation(RuleProperties ruleProperties) { + final RuleFilterImpl filter = ruleProperties.getFilter() != null + ? toImplementation(ruleProperties.getFilter()) + : null; + final RuleActionImpl action = ruleProperties.getAction() != null + ? toImplementation(ruleProperties.getAction()) + : null; + + return new RuleDescription() + .setName(ruleProperties.getName()) + .setAction(action) + .setFilter(filter); + } + + @Override + public RuleActionImpl toImplementation(RuleAction model) { + if (model instanceof EmptyRuleAction) { + return emptyRuleAction; + } else if (model instanceof SqlRuleAction) { + final SqlRuleAction action = (SqlRuleAction) model; + final SqlRuleActionImpl returned = new SqlRuleActionImpl() + .setSqlExpression(action.getSqlExpression()) + .setCompatibilityLevel(action.getCompatibilityLevel()) + .setRequiresPreprocessing(action.getRequiresPreprocessing()); + + if (!action.getProperties().isEmpty()) { + final List parameters = action.getProperties().entrySet().stream() + .map(entry -> new KeyValueImpl() + .setKey(entry.getKey()).setValue(entry.getValue().toString())) + .collect(Collectors.toList()); + + returned.setParameters(parameters); + } + + return returned; + } else { + return null; + } + } + + @Override + public RuleFilterImpl toImplementation(RuleFilter model) { + if (model instanceof TrueRuleFilter) { + return trueFilter; + } else if (model instanceof FalseRuleFilter) { + return falseFilter; + } else if (model instanceof CorrelationRuleFilter) { + final CorrelationRuleFilter filter = (CorrelationRuleFilter) model; + final CorrelationFilterImpl returned = new CorrelationFilterImpl() + .setContentType(filter.getContentType()) + .setCorrelationId(filter.getCorrelationId()) + .setLabel(filter.getLabel()) + .setMessageId(filter.getMessageId()) + .setTo(filter.getTo()) + .setSessionId(filter.getSessionId()) + .setReplyTo(filter.getReplyTo()) + .setReplyToSessionId(filter.getReplyToSessionId()); + + if (!filter.getProperties().isEmpty()) { + final List parameters = filter.getProperties().entrySet() + .stream() + .map(entry -> new KeyValueImpl() + .setKey(entry.getKey()).setValue(entry.getValue().toString())) + .collect(Collectors.toList()); + + returned.setProperties(parameters); + } + + return returned; + } else if (model instanceof SqlRuleFilter) { + final SqlRuleFilter filter = (SqlRuleFilter) model; + final SqlFilterImpl returned = new SqlFilterImpl() + .setSqlExpression(filter.getSqlExpression()) + .setCompatibilityLevel(filter.getCompatibilityLevel()) + .setRequiresPreprocessing(filter.getRequiresPreprocessing()); + + if (!filter.getProperties().isEmpty()) { + final List parameters = filter.getProperties().entrySet() + .stream() + .map(entry -> new KeyValueImpl() + .setKey(entry.getKey()).setValue(entry.getValue().toString())) + .collect(Collectors.toList()); + + returned.setParameters(parameters); + } + + return returned; + } else { + return null; + } + } + }); + } + + /** + * Initializes a new instance with the given rule {@code name}, {@code filter}, and {@code action}. + * + * @param name Name of the rule. + * @param filter Filter for the rule. + * @param action Action for the rule. + */ + RuleProperties(String name, RuleFilter filter, RuleAction action) { + this.name = name; + this.filter = filter; + this.action = action; + } + + /** + * Gets the filter expression used to match messages. + * + * @return The filter expression used to match messages. + */ + public RuleFilter getFilter() { + return filter; + } + + /** + * Sets the filter expression used to match messages. + * + * @param filter the filter expression used to match messages. + * + * @return The updated {@link RuleProperties} object itself. + * @throws NullPointerException if {@code filter} is null. + */ + public RuleProperties setFilter(RuleFilter filter) { + this.filter = Objects.requireNonNull(filter, "'filter' cannot be null."); + return this; + } + + /** + * Gets the name of the rule. + * + * @return The name of the rule. + */ + public String getName() { + return name; + } + + /** + * Gets the action to perform if the message satisfies the filtering expression. + * + * @return The action to perform if the message satisfies the filtering expression. + */ + public RuleAction getAction() { + return action; + } + + /** + * Sets the action to perform if the message satisfies the filtering expression. + * + * @param action The action to perform if the message satisfies the filtering expression. + * + * @return The updated {@link RuleProperties} object itself. + */ + public RuleProperties setAction(RuleAction action) { + this.action = action; + return this; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SqlRuleAction.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SqlRuleAction.java new file mode 100644 index 0000000000000..ecfe30598dab4 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SqlRuleAction.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.messaging.servicebus.ServiceBusMessage; + +import java.util.HashMap; +import java.util.Map; + +/** + * Represents set of actions written in SQL language-based syntax that is performed against a {@link + * ServiceBusMessage}. + */ +public class SqlRuleAction extends RuleAction { + private final Map properties = new HashMap<>(); + private final String sqlExpression; + private final String compatibilityLevel; + private final Boolean requiresPreprocessing; + + /** + * Creates a new instance with the given SQL expression. + * + * @param sqlExpression SQL expression for the action. + * + * @throws NullPointerException if {@code sqlExpression} is null. + * @throws IllegalArgumentException if {@code sqlExpression} is an empty string. + */ + public SqlRuleAction(String sqlExpression) { + final ClientLogger logger = new ClientLogger(SqlRuleAction.class); + + if (sqlExpression == null) { + throw logger.logExceptionAsError(new NullPointerException("'sqlExpression' cannot be null.")); + } else if (sqlExpression.isEmpty()) { + throw logger.logExceptionAsError( + new IllegalArgumentException("'sqlExpression' cannot be an empty string.")); + } + + this.sqlExpression = sqlExpression; + this.compatibilityLevel = null; + this.requiresPreprocessing = null; + } + + /** + * Package private constructor for creating a model deserialised from the service. + * + * @param sqlExpression SQL expression for the action. + * @param compatibilityLevel The compatibility level. + * @param requiresPreprocessing Whether or not it requires preprocessing + */ + SqlRuleAction(String sqlExpression, String compatibilityLevel, Boolean requiresPreprocessing) { + this.sqlExpression = sqlExpression; + this.compatibilityLevel = compatibilityLevel; + this.requiresPreprocessing = requiresPreprocessing; + } + + /** + * Gets the compatibility level. + * + * @return The compatibility level. + */ + String getCompatibilityLevel() { + return compatibilityLevel; + } + + /** + * Gets whether or not requires preprocessing. + * + * @return Whether or not requires preprocessing. + */ + Boolean getRequiresPreprocessing() { + return requiresPreprocessing; + } + + /** + * Gets the properties for this action. + * + * @return the properties for this action. + */ + public Map getProperties() { + return properties; + } + + /** + * Gets the SQL expression. + * + * @return the SQL expression. + */ + public String getSqlExpression() { + return sqlExpression; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SqlRuleFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SqlRuleFilter.java new file mode 100644 index 0000000000000..32630779325c0 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SqlRuleFilter.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.messaging.servicebus.ServiceBusMessage; + +import java.util.HashMap; +import java.util.Map; + +/** + * Represents a filter which is a composition of an expression and an action that is executed in the pub/sub pipeline. + *

+ * A {@link SqlRuleFilter} holds a SQL-like condition expression that is evaluated in the broker against the arriving + * messages' user-defined properties and system properties. All system properties (which are all properties explicitly + * listed on the {@link ServiceBusMessage} class) must be prefixed with {@code sys.} in the condition expression. The + * SQL subset implements testing for existence of properties (EXISTS), testing for null-values (IS NULL), logical + * NOT/AND/OR, relational operators, numeric arithmetic, and simple text pattern matching with LIKE. + *

+ */ +public class SqlRuleFilter extends RuleFilter { + private final Map properties = new HashMap<>(); + private final String sqlExpression; + private final String compatibilityLevel; + private final Boolean requiresPreprocessing; + + /** + * Creates a new instance with the given SQL expression. + * + * @param sqlExpression SQL expression for the filter. + * + * @throws NullPointerException if {@code sqlExpression} is null. + * @throws IllegalArgumentException if {@code sqlExpression} is an empty string. + */ + public SqlRuleFilter(String sqlExpression) { + final ClientLogger logger = new ClientLogger(SqlRuleFilter.class); + + if (sqlExpression == null) { + throw logger.logExceptionAsError(new NullPointerException("'sqlExpression' cannot be null.")); + } else if (sqlExpression.isEmpty()) { + throw logger.logExceptionAsError( + new IllegalArgumentException("'sqlExpression' cannot be an empty string.")); + } + + this.sqlExpression = sqlExpression; + this.compatibilityLevel = null; + this.requiresPreprocessing = null; + } + + /** + * Package private constructor for creating a model deserialised from the service. + * + * @param sqlExpression SQL expression for the filter. + * @param compatibilityLevel The compatibility level. + * @param requiresPreprocessing Whether or not it requires preprocessing + */ + SqlRuleFilter(String sqlExpression, String compatibilityLevel, Boolean requiresPreprocessing) { + this.sqlExpression = sqlExpression; + this.compatibilityLevel = compatibilityLevel; + this.requiresPreprocessing = requiresPreprocessing; + } + + /** + * Gets the compatibility level. + * + * @return The compatibility level. + */ + String getCompatibilityLevel() { + return compatibilityLevel; + } + + /** + * Gets whether or not requires preprocessing. + * + * @return Whether or not requires preprocessing. + */ + Boolean getRequiresPreprocessing() { + return requiresPreprocessing; + } + + /** + * Gets the value of a filter expression. Allowed types: string, int, long, bool, double + * + * @return Gets the value of a filter expression. + */ + public Map getProperties() { + return properties; + } + + /** + * Gets the SQL expression. + * + * @return The SQL expression. + */ + public String getSqlExpression() { + return sqlExpression; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TrueRuleFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TrueRuleFilter.java new file mode 100644 index 0000000000000..ffec93754f815 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TrueRuleFilter.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +/** + * Matches all the messages arriving to be selected for the subscription. + */ +public final class TrueRuleFilter extends SqlRuleFilter { + private static final TrueRuleFilter INSTANCE = new TrueRuleFilter(); + + /** + * Gets an instance of the {@link TrueRuleFilter}. + * + * @return an instance of the {@link TrueRuleFilter}. + */ + static TrueRuleFilter getInstance() { + return INSTANCE; + } + + /** + * Initializes a new instance. + */ + public TrueRuleFilter() { + super("1=1"); + } + + /** + * Converts the current instance to its string representation. + * + * @return The string representation. + */ + @Override + public String toString() { + return "TrueRuleFilter"; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java index 57ac39a9bbe66..f92bc31b5169a 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java @@ -8,9 +8,15 @@ import com.azure.messaging.servicebus.administration.models.CreateSubscriptionOptions; import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; import com.azure.messaging.servicebus.administration.models.QueueProperties; +import com.azure.messaging.servicebus.administration.models.RuleAction; +import com.azure.messaging.servicebus.administration.models.RuleFilter; +import com.azure.messaging.servicebus.administration.models.RuleProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionProperties; import com.azure.messaging.servicebus.administration.models.TopicProperties; import com.azure.messaging.servicebus.implementation.models.QueueDescription; +import com.azure.messaging.servicebus.implementation.models.RuleActionImpl; +import com.azure.messaging.servicebus.implementation.models.RuleDescription; +import com.azure.messaging.servicebus.implementation.models.RuleFilterImpl; import com.azure.messaging.servicebus.implementation.models.SubscriptionDescription; import com.azure.messaging.servicebus.implementation.models.TopicDescription; @@ -23,6 +29,7 @@ public final class EntityHelper { private static QueueAccessor queueAccessor; private static SubscriptionAccessor subscriptionAccessor; private static TopicAccessor topicAccessor; + private static RuleAccessor ruleAccessor; static { try { @@ -30,33 +37,17 @@ public final class EntityHelper { Class.forName(SubscriptionProperties.class.getName(), true, SubscriptionProperties.class.getClassLoader()); Class.forName(TopicProperties.class.getName(), true, TopicProperties.class.getClassLoader()); + Class.forName(RuleProperties.class.getName(), true, RuleProperties.class.getClassLoader()); } catch (ClassNotFoundException e) { throw new ClientLogger(EntityHelper.class).logExceptionAsError(new IllegalStateException(e)); } } - /** - * Creates a new topic given the options. - * - * @param description Options to create topic with. - * - * @return A new {@link TopicProperties} with the set options. - */ - public static TopicProperties toModel(TopicDescription description) { - Objects.requireNonNull(description, "'description' cannot be null."); - - if (topicAccessor == null) { - throw new ClientLogger(EntityHelper.class).logExceptionAsError( - new IllegalStateException("'topicAccessor' should not be null.")); - } - - return topicAccessor.toModel(description); - } - /** * Gets a queue description given the options. * * @param options The options. + * * @return The corresponding queue. */ public static QueueDescription getQueueDescription(CreateQueueOptions options) { @@ -115,6 +106,7 @@ public static TopicDescription getTopicDescription(CreateTopicOptions options) { * Creates a new queue given the existing queue. * * @param description Options to create queue with. + * * @return A new {@link QueueProperties} with the set options. */ public static QueueDescription toImplementation(QueueProperties description) { @@ -128,10 +120,62 @@ public static QueueDescription toImplementation(QueueProperties description) { return queueAccessor.toImplementation(description); } + /** + * Creates a new rule action given an existing rule action. + * + * @param properties Rule properties. + * @return A new instance of {@link RuleActionImpl}. + */ + public static RuleActionImpl toImplementation(RuleAction properties) { + Objects.requireNonNull(properties, "'properties' cannot be null."); + + if (ruleAccessor == null) { + throw new ClientLogger(EntityHelper.class).logExceptionAsError( + new IllegalStateException("'ruleAccessor' should not be null.")); + } + + return ruleAccessor.toImplementation(properties); + } + + /** + * Creates a new rule description given an existing rule. + * + * @param properties Rule properties. + * @return A new instance of {@link RuleDescription}. + */ + public static RuleDescription toImplementation(RuleProperties properties) { + Objects.requireNonNull(properties, "'properties' cannot be null."); + + if (ruleAccessor == null) { + throw new ClientLogger(EntityHelper.class).logExceptionAsError( + new IllegalStateException("'ruleAccessor' should not be null.")); + } + + return ruleAccessor.toImplementation(properties); + } + + /** + * Creates a new rule filter given an existing rule filter. + * + * @param properties Rule filter. + * @return A new instance of {@link RuleFilter}. + */ + public static RuleFilterImpl toImplementation(RuleFilter properties) { + Objects.requireNonNull(properties, "'properties' cannot be null."); + + if (ruleAccessor == null) { + throw new ClientLogger(EntityHelper.class).logExceptionAsError( + new IllegalStateException("'ruleAccessor' should not be null.")); + } + + return ruleAccessor.toImplementation(properties); + } + /** * Creates a new queue given the existing queue. * * @param description Options to create queue with. + * * @return A new {@link SubscriptionProperties} with the set options. */ public static SubscriptionDescription toImplementation(SubscriptionProperties description) { @@ -149,6 +193,7 @@ public static SubscriptionDescription toImplementation(SubscriptionProperties de * Creates a new queue given the existing queue. * * @param properties Options to create queue with. + * * @return A new {@link TopicProperties} with the set options. */ public static TopicDescription toImplementation(TopicProperties properties) { @@ -166,6 +211,7 @@ public static TopicDescription toImplementation(TopicProperties properties) { * Creates a new queue given the existing queue. * * @param description Options to create queue with. + * * @return A new {@link QueueProperties} with the set options. */ public static QueueProperties toModel(QueueDescription description) { @@ -179,6 +225,57 @@ public static QueueProperties toModel(QueueDescription description) { return queueAccessor.toModel(description); } + /** + * Gets a new rule action based on the existing rule description. + * + * @param description The implementation type. + * @return A new {@link RuleProperties} with the set options. + */ + public static RuleAction toModel(RuleActionImpl description) { + Objects.requireNonNull(description, "'description' cannot be null."); + + if (ruleAccessor == null) { + throw new ClientLogger(EntityHelper.class).logExceptionAsError( + new IllegalStateException("'ruleAccessor' should not be null.")); + } + + return ruleAccessor.toModel(description); + } + + /** + * Gets a new rule action based on the existing rule description. + * + * @param description The implementation type. + * @return A new {@link RuleProperties} with the set options. + */ + public static RuleFilter toModel(RuleFilterImpl description) { + Objects.requireNonNull(description, "'description' cannot be null."); + + if (ruleAccessor == null) { + throw new ClientLogger(EntityHelper.class).logExceptionAsError( + new IllegalStateException("'ruleAccessor' should not be null.")); + } + + return ruleAccessor.toModel(description); + } + + /** + * Gets a new rule based on the existing rule description. + * + * @param description The implementation type. + * @return A new {@link RuleProperties} with the set options. + */ + public static RuleProperties toModel(RuleDescription description) { + Objects.requireNonNull(description, "'description' cannot be null."); + + if (ruleAccessor == null) { + throw new ClientLogger(EntityHelper.class).logExceptionAsError( + new IllegalStateException("'ruleAccessor' should not be null.")); + } + + return ruleAccessor.toModel(description); + } + /** * Creates a new subscription given the options. * @@ -197,6 +294,24 @@ public static SubscriptionProperties toModel(SubscriptionDescription options) { return subscriptionAccessor.toModel(options); } + /** + * Creates a new topic given the options. + * + * @param description Options to create topic with. + * + * @return A new {@link TopicProperties} with the set options. + */ + public static TopicProperties toModel(TopicDescription description) { + Objects.requireNonNull(description, "'description' cannot be null."); + + if (topicAccessor == null) { + throw new ClientLogger(EntityHelper.class).logExceptionAsError( + new IllegalStateException("'topicAccessor' should not be null.")); + } + + return topicAccessor.toModel(description); + } + /** * Sets the queue accessor. * @@ -228,6 +343,22 @@ public static void setQueueName(QueueProperties queueProperties, String name) { queueAccessor.setName(queueProperties, name); } + /** + * Sets the rule accessor. + * + * @param accessor The rule accessor. + */ + public static void setRuleAccessor(RuleAccessor accessor) { + Objects.requireNonNull(accessor, "'accessor' cannot be null."); + + if (EntityHelper.ruleAccessor != null) { + throw new ClientLogger(EntityHelper.class).logExceptionAsError(new IllegalStateException( + "'ruleAccessor' is already set.")); + } + + EntityHelper.ruleAccessor = accessor; + } + /** * Sets the subscription accessor. * @@ -313,6 +444,7 @@ public interface QueueAccessor { * Creates a new queue from the given {@code queueDescription}. * * @param queueDescription Queue description to use. + * * @return A new queue with the properties set. */ QueueDescription toImplementation(QueueProperties queueDescription); @@ -321,6 +453,7 @@ public interface QueueAccessor { * Creates a new queue from the given {@code queueDescription}. * * @param queueDescription Queue description to use. + * * @return A new queue with the properties set. */ QueueProperties toModel(QueueDescription queueDescription); @@ -334,6 +467,23 @@ public interface QueueAccessor { void setName(QueueProperties queueProperties, String name); } + /** + * Interface for accessing methods on a rule. + */ + public interface RuleAccessor { + RuleProperties toModel(RuleDescription ruleDescription); + + RuleAction toModel(RuleActionImpl implementation); + + RuleFilter toModel(RuleFilterImpl implementation); + + RuleDescription toImplementation(RuleProperties ruleProperties); + + RuleActionImpl toImplementation(RuleAction model); + + RuleFilterImpl toImplementation(RuleFilter model); + } + /** * Interface for accessing methods on a subscription. */ @@ -342,6 +492,7 @@ public interface SubscriptionAccessor { * Creates a model subscription with the given implementation. * * @param subscription Options used to create subscription. + * * @return A new subscription. */ SubscriptionProperties toModel(SubscriptionDescription subscription); @@ -350,6 +501,7 @@ public interface SubscriptionAccessor { * Creates the implementation subscription with the given subscription. * * @param subscription Options used to create subscription. + * * @return A new subscription. */ SubscriptionDescription toImplementation(SubscriptionProperties subscription); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/CorrelationFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/CorrelationFilterImpl.java similarity index 89% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/CorrelationFilter.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/CorrelationFilterImpl.java index 251fa2c67607f..fdcf4f72f73ed 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/CorrelationFilter.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/CorrelationFilterImpl.java @@ -19,7 +19,7 @@ @JsonTypeName("CorrelationFilter") @JacksonXmlRootElement(localName = "CorrelationFilter") @Fluent -public final class CorrelationFilter extends RuleFilter { +public final class CorrelationFilterImpl extends RuleFilterImpl { /* * The correlationId property. */ @@ -86,10 +86,10 @@ public final class CorrelationFilter extends RuleFilter { private static final class PropertiesWrapper { @JacksonXmlProperty(localName = "KeyValueOfstringanyType") - private final List items; + private final List items; @JsonCreator - private PropertiesWrapper(@JacksonXmlProperty(localName = "KeyValueOfstringanyType") List items) { + private PropertiesWrapper(@JacksonXmlProperty(localName = "KeyValueOfstringanyType") List items) { this.items = items; } } @@ -117,7 +117,7 @@ public String getCorrelationId() { * @param correlationId the correlationId value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setCorrelationId(String correlationId) { + public CorrelationFilterImpl setCorrelationId(String correlationId) { this.correlationId = correlationId; return this; } @@ -137,7 +137,7 @@ public String getMessageId() { * @param messageId the messageId value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setMessageId(String messageId) { + public CorrelationFilterImpl setMessageId(String messageId) { this.messageId = messageId; return this; } @@ -157,7 +157,7 @@ public String getTo() { * @param to the to value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setTo(String to) { + public CorrelationFilterImpl setTo(String to) { this.to = to; return this; } @@ -177,7 +177,7 @@ public String getReplyTo() { * @param replyTo the replyTo value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setReplyTo(String replyTo) { + public CorrelationFilterImpl setReplyTo(String replyTo) { this.replyTo = replyTo; return this; } @@ -197,7 +197,7 @@ public String getLabel() { * @param label the label value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setLabel(String label) { + public CorrelationFilterImpl setLabel(String label) { this.label = label; return this; } @@ -217,7 +217,7 @@ public String getSessionId() { * @param sessionId the sessionId value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setSessionId(String sessionId) { + public CorrelationFilterImpl setSessionId(String sessionId) { this.sessionId = sessionId; return this; } @@ -237,7 +237,7 @@ public String getReplyToSessionId() { * @param replyToSessionId the replyToSessionId value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setReplyToSessionId(String replyToSessionId) { + public CorrelationFilterImpl setReplyToSessionId(String replyToSessionId) { this.replyToSessionId = replyToSessionId; return this; } @@ -257,7 +257,7 @@ public String getContentType() { * @param contentType the contentType value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setContentType(String contentType) { + public CorrelationFilterImpl setContentType(String contentType) { this.contentType = contentType; return this; } @@ -267,9 +267,9 @@ public CorrelationFilter setContentType(String contentType) { * * @return the properties value. */ - public List getProperties() { + public List getProperties() { if (this.properties == null) { - this.properties = new PropertiesWrapper(new ArrayList()); + this.properties = new PropertiesWrapper(new ArrayList()); } return this.properties.items; } @@ -280,7 +280,7 @@ public List getProperties() { * @param properties the properties value to set. * @return the CorrelationFilter object itself. */ - public CorrelationFilter setProperties(List properties) { + public CorrelationFilterImpl setProperties(List properties) { this.properties = new PropertiesWrapper(properties); return this; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/EmptyRuleAction.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/EmptyRuleActionImpl.java similarity index 91% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/EmptyRuleAction.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/EmptyRuleActionImpl.java index 2abb4f7214b92..13a2393fbbc3d 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/EmptyRuleAction.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/EmptyRuleActionImpl.java @@ -14,5 +14,5 @@ @JsonTypeName("EmptyRuleAction") @JacksonXmlRootElement(localName = "EmptyRuleAction") @Immutable -public final class EmptyRuleAction extends RuleAction { +public final class EmptyRuleActionImpl extends RuleActionImpl { } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/FalseFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/FalseFilterImpl.java similarity index 91% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/FalseFilter.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/FalseFilterImpl.java index 24098a84eb74b..522d582ffa445 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/FalseFilter.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/FalseFilterImpl.java @@ -14,5 +14,5 @@ @JsonTypeName("FalseFilter") @JacksonXmlRootElement(localName = "FalseFilter") @Immutable -public final class FalseFilter extends SqlFilter { +public final class FalseFilterImpl extends SqlFilterImpl { } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/KeyValue.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/KeyValueImpl.java similarity index 80% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/KeyValue.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/KeyValueImpl.java index 25385249652b5..dba97a407cc43 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/KeyValue.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/KeyValueImpl.java @@ -13,9 +13,9 @@ localName = "KeyValueOfstringanyType", namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") @Fluent -public final class KeyValue { +public final class KeyValueImpl { /* - * The Key property. + * The key property. */ @JacksonXmlProperty( localName = "Key", @@ -23,7 +23,7 @@ public final class KeyValue { private String key; /* - * The Value property. + * The value property. */ @JacksonXmlProperty( localName = "Value", @@ -31,7 +31,7 @@ public final class KeyValue { private String value; /** - * Get the key property: The Key property. + * Get the key property: The key property. * * @return the key value. */ @@ -40,18 +40,18 @@ public String getKey() { } /** - * Set the key property: The Key property. + * Set the key property: The key property. * * @param key the key value to set. * @return the KeyValue object itself. */ - public KeyValue setKey(String key) { + public KeyValueImpl setKey(String key) { this.key = key; return this; } /** - * Get the value property: The Value property. + * Get the value property: The value property. * * @return the value value. */ @@ -60,12 +60,12 @@ public String getValue() { } /** - * Set the value property: The Value property. + * Set the value property: The value property. * * @param value the value value to set. * @return the KeyValue object itself. */ - public KeyValue setValue(String value) { + public KeyValueImpl setValue(String value) { this.value = value; return this; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleAction.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleActionImpl.java similarity index 89% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleAction.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleActionImpl.java index e5e8861291bec..d2434e6ae00b5 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleAction.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleActionImpl.java @@ -15,15 +15,15 @@ use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", - defaultImpl = RuleAction.class) + defaultImpl = RuleActionImpl.class) @JsonTypeName("RuleAction") @JsonSubTypes({ - @JsonSubTypes.Type(name = "SqlRuleAction", value = SqlRuleAction.class), - @JsonSubTypes.Type(name = "EmptyRuleAction", value = EmptyRuleAction.class) + @JsonSubTypes.Type(name = "SqlRuleAction", value = SqlRuleActionImpl.class), + @JsonSubTypes.Type(name = "EmptyRuleAction", value = EmptyRuleActionImpl.class) }) @JacksonXmlRootElement( localName = "Action", namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") @Immutable -public class RuleAction { +public class RuleActionImpl { } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleDescription.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleDescription.java index 5c7b98013c132..dbc7c2a419d26 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleDescription.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleDescription.java @@ -22,7 +22,7 @@ public final class RuleDescription { @JacksonXmlProperty( localName = "Filter", namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private RuleFilter filter; + private RuleFilterImpl filter; /* * The action property. @@ -30,7 +30,7 @@ public final class RuleDescription { @JacksonXmlProperty( localName = "Action", namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private RuleAction action; + private RuleActionImpl action; /* * The exact time the rule was created. @@ -53,7 +53,7 @@ public final class RuleDescription { * * @return the filter value. */ - public RuleFilter getFilter() { + public RuleFilterImpl getFilter() { return this.filter; } @@ -63,7 +63,7 @@ public RuleFilter getFilter() { * @param filter the filter value to set. * @return the RuleDescription object itself. */ - public RuleDescription setFilter(RuleFilter filter) { + public RuleDescription setFilter(RuleFilterImpl filter) { this.filter = filter; return this; } @@ -73,7 +73,7 @@ public RuleDescription setFilter(RuleFilter filter) { * * @return the action value. */ - public RuleAction getAction() { + public RuleActionImpl getAction() { return this.action; } @@ -83,7 +83,7 @@ public RuleAction getAction() { * @param action the action value to set. * @return the RuleDescription object itself. */ - public RuleDescription setAction(RuleAction action) { + public RuleDescription setAction(RuleActionImpl action) { this.action = action; return this; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleFilterImpl.java similarity index 84% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleFilter.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleFilterImpl.java index 2197d41b2f0c0..96ba6dd77eeea 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleFilter.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/RuleFilterImpl.java @@ -15,15 +15,15 @@ use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", - defaultImpl = RuleFilter.class) + defaultImpl = RuleFilterImpl.class) @JsonTypeName("RuleFilter") @JsonSubTypes({ - @JsonSubTypes.Type(name = "CorrelationFilter", value = CorrelationFilter.class), - @JsonSubTypes.Type(name = "SqlFilter", value = SqlFilter.class) + @JsonSubTypes.Type(name = "CorrelationFilter", value = CorrelationFilterImpl.class), + @JsonSubTypes.Type(name = "SqlFilter", value = SqlFilterImpl.class) }) @JacksonXmlRootElement( localName = "Filter", namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") @Immutable -public class RuleFilter { +public class RuleFilterImpl { } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlFilterImpl.java similarity index 87% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlFilter.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlFilterImpl.java index fe4efde431b86..236ada8a9ccd0 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlFilter.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlFilterImpl.java @@ -20,15 +20,15 @@ use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", - defaultImpl = SqlFilter.class) + defaultImpl = SqlFilterImpl.class) @JsonTypeName("SqlFilter") @JsonSubTypes({ - @JsonSubTypes.Type(name = "TrueFilter", value = TrueFilter.class), - @JsonSubTypes.Type(name = "FalseFilter", value = FalseFilter.class) + @JsonSubTypes.Type(name = "TrueFilter", value = TrueFilterImpl.class), + @JsonSubTypes.Type(name = "FalseFilter", value = FalseFilterImpl.class) }) @JacksonXmlRootElement(localName = "SqlFilter") @Fluent -public class SqlFilter extends RuleFilter { +public class SqlFilterImpl extends RuleFilterImpl { /* * The sqlExpression property. */ @@ -47,10 +47,10 @@ public class SqlFilter extends RuleFilter { private static final class ParametersWrapper { @JacksonXmlProperty(localName = "KeyValueOfstringanyType") - private final List items; + private final List items; @JsonCreator - private ParametersWrapper(@JacksonXmlProperty(localName = "KeyValueOfstringanyType") List items) { + private ParametersWrapper(@JacksonXmlProperty(localName = "KeyValueOfstringanyType") List items) { this.items = items; } } @@ -86,7 +86,7 @@ public String getSqlExpression() { * @param sqlExpression the sqlExpression value to set. * @return the SqlFilter object itself. */ - public SqlFilter setSqlExpression(String sqlExpression) { + public SqlFilterImpl setSqlExpression(String sqlExpression) { this.sqlExpression = sqlExpression; return this; } @@ -106,7 +106,7 @@ public String getCompatibilityLevel() { * @param compatibilityLevel the compatibilityLevel value to set. * @return the SqlFilter object itself. */ - public SqlFilter setCompatibilityLevel(String compatibilityLevel) { + public SqlFilterImpl setCompatibilityLevel(String compatibilityLevel) { this.compatibilityLevel = compatibilityLevel; return this; } @@ -116,9 +116,9 @@ public SqlFilter setCompatibilityLevel(String compatibilityLevel) { * * @return the parameters value. */ - public List getParameters() { + public List getParameters() { if (this.parameters == null) { - this.parameters = new ParametersWrapper(new ArrayList()); + this.parameters = new ParametersWrapper(new ArrayList()); } return this.parameters.items; } @@ -129,7 +129,7 @@ public List getParameters() { * @param parameters the parameters value to set. * @return the SqlFilter object itself. */ - public SqlFilter setParameters(List parameters) { + public SqlFilterImpl setParameters(List parameters) { this.parameters = new ParametersWrapper(parameters); return this; } @@ -149,7 +149,7 @@ public Boolean isRequiresPreprocessing() { * @param requiresPreprocessing the requiresPreprocessing value to set. * @return the SqlFilter object itself. */ - public SqlFilter setRequiresPreprocessing(Boolean requiresPreprocessing) { + public SqlFilterImpl setRequiresPreprocessing(Boolean requiresPreprocessing) { this.requiresPreprocessing = requiresPreprocessing; return this; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlRuleAction.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlRuleActionImpl.java similarity index 88% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlRuleAction.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlRuleActionImpl.java index fe3c87073078e..c4ab9eeb0b9eb 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlRuleAction.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/SqlRuleActionImpl.java @@ -19,7 +19,7 @@ @JsonTypeName("SqlRuleAction") @JacksonXmlRootElement(localName = "SqlRuleAction") @Fluent -public final class SqlRuleAction extends RuleAction { +public final class SqlRuleActionImpl extends RuleActionImpl { /* * The sqlExpression property. */ @@ -38,10 +38,10 @@ public final class SqlRuleAction extends RuleAction { private static final class ParametersWrapper { @JacksonXmlProperty(localName = "KeyValueOfstringanyType") - private final List items; + private final List items; @JsonCreator - private ParametersWrapper(@JacksonXmlProperty(localName = "KeyValueOfstringanyType") List items) { + private ParametersWrapper(@JacksonXmlProperty(localName = "KeyValueOfstringanyType") List items) { this.items = items; } } @@ -77,7 +77,7 @@ public String getSqlExpression() { * @param sqlExpression the sqlExpression value to set. * @return the SqlRuleAction object itself. */ - public SqlRuleAction setSqlExpression(String sqlExpression) { + public SqlRuleActionImpl setSqlExpression(String sqlExpression) { this.sqlExpression = sqlExpression; return this; } @@ -97,7 +97,7 @@ public String getCompatibilityLevel() { * @param compatibilityLevel the compatibilityLevel value to set. * @return the SqlRuleAction object itself. */ - public SqlRuleAction setCompatibilityLevel(String compatibilityLevel) { + public SqlRuleActionImpl setCompatibilityLevel(String compatibilityLevel) { this.compatibilityLevel = compatibilityLevel; return this; } @@ -107,9 +107,9 @@ public SqlRuleAction setCompatibilityLevel(String compatibilityLevel) { * * @return the parameters value. */ - public List getParameters() { + public List getParameters() { if (this.parameters == null) { - this.parameters = new ParametersWrapper(new ArrayList()); + this.parameters = new ParametersWrapper(new ArrayList()); } return this.parameters.items; } @@ -120,7 +120,7 @@ public List getParameters() { * @param parameters the parameters value to set. * @return the SqlRuleAction object itself. */ - public SqlRuleAction setParameters(List parameters) { + public SqlRuleActionImpl setParameters(List parameters) { this.parameters = new ParametersWrapper(parameters); return this; } @@ -140,7 +140,7 @@ public Boolean isRequiresPreprocessing() { * @param requiresPreprocessing the requiresPreprocessing value to set. * @return the SqlRuleAction object itself. */ - public SqlRuleAction setRequiresPreprocessing(Boolean requiresPreprocessing) { + public SqlRuleActionImpl setRequiresPreprocessing(Boolean requiresPreprocessing) { this.requiresPreprocessing = requiresPreprocessing; return this; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TrueFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TrueFilterImpl.java similarity index 92% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TrueFilter.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TrueFilterImpl.java index d28423a2c771f..92fa8bbcb7677 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TrueFilter.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TrueFilterImpl.java @@ -14,5 +14,5 @@ @JsonTypeName("TrueFilter") @JacksonXmlRootElement(localName = "TrueFilter") @Immutable -public final class TrueFilter extends SqlFilter { +public final class TrueFilterImpl extends SqlFilterImpl { } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java index 86b97304a0581..21d0678f55981 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java @@ -15,11 +15,14 @@ import com.azure.messaging.servicebus.administration.models.CreateQueueOptions; import com.azure.messaging.servicebus.administration.models.CreateSubscriptionOptions; import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; +import com.azure.messaging.servicebus.administration.models.EmptyRuleAction; import com.azure.messaging.servicebus.administration.models.NamespaceType; import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.RuleProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeInfo; import com.azure.messaging.servicebus.administration.models.TopicProperties; import com.azure.messaging.servicebus.administration.models.TopicRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.TrueRuleFilter; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Tag; @@ -35,6 +38,7 @@ import static com.azure.messaging.servicebus.TestUtils.getEntityName; import static com.azure.messaging.servicebus.TestUtils.getSessionSubscriptionBaseName; +import static com.azure.messaging.servicebus.TestUtils.getSubscriptionBaseName; import static com.azure.messaging.servicebus.TestUtils.getTopicBaseName; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -356,6 +360,39 @@ void getQueueRuntimeInfo(HttpClient httpClient) { .verifyComplete(); } + @ParameterizedTest + @MethodSource("createHttpClients") + void getRule(HttpClient httpClient) { + // Arrange + final ServiceBusAdministrationAsyncClient client = createClient(httpClient); + + // There is a single default rule created. + final String ruleName = "$Default"; + final String topicName = interceptorManager.isPlaybackMode() + ? "topic-13" + : getEntityName(getTopicBaseName(), 13); + final String subscriptionName = interceptorManager.isPlaybackMode() + ? "subscription" + : getSubscriptionBaseName(); + + // Act & Assert + StepVerifier.create(client.getRuleWithResponse(topicName, subscriptionName, ruleName)) + .assertNext(response -> { + assertEquals(200, response.getStatusCode()); + + final RuleProperties contents = response.getValue(); + + assertNotNull(contents); + assertEquals(ruleName, contents.getName()); + assertNotNull(contents.getFilter()); + assertTrue(contents.getFilter() instanceof TrueRuleFilter); + + assertNotNull(contents.getAction()); + assertTrue(contents.getAction() instanceof EmptyRuleAction); + }) + .verifyComplete(); + } + @ParameterizedTest @MethodSource("createHttpClients") void getSubscription(HttpClient httpClient) { @@ -570,6 +607,34 @@ void getTopicRuntimeInfo(HttpClient httpClient) { .verifyComplete(); } + @ParameterizedTest + @MethodSource("createHttpClients") + void listRules(HttpClient httpClient) { + // Arrange + final ServiceBusAdministrationAsyncClient client = createClient(httpClient); + + // There is a single default rule created. + final String ruleName = "$Default"; + final String topicName = interceptorManager.isPlaybackMode() + ? "topic-13" + : getEntityName(getTopicBaseName(), 13); + final String subscriptionName = interceptorManager.isPlaybackMode() + ? "subscription" + : getSubscriptionBaseName(); + + // Act & Assert + StepVerifier.create(client.listRules(topicName, subscriptionName)) + .assertNext(response -> { + assertEquals(ruleName, response.getName()); + assertNotNull(response.getFilter()); + assertTrue(response.getFilter() instanceof TrueRuleFilter); + + assertNotNull(response.getAction()); + assertTrue(response.getAction() instanceof EmptyRuleAction); + }) + .verifyComplete(); + } + @ParameterizedTest @MethodSource("createHttpClients") void listQueues(HttpClient httpClient) { diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilterTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilterTest.java new file mode 100644 index 0000000000000..2537a8e5f5a63 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilterTest.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +import org.junit.jupiter.api.Test; + +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.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Tests for {@link CorrelationRuleFilter}. + */ +class CorrelationRuleFilterTest { + @Test + void constructorDefault() { + // Arrange + final String expectedToString = "CorrelationRuleFilter: "; + + // Act + final CorrelationRuleFilter actual = new CorrelationRuleFilter(); + + // Assert + assertNull(actual.getCorrelationId()); + assertNull(actual.getContentType()); + assertNull(actual.getLabel()); + assertNull(actual.getMessageId()); + assertNull(actual.getReplyTo()); + assertNull(actual.getReplyToSessionId()); + assertNull(actual.getSessionId()); + assertNull(actual.getTo()); + + final String toString = actual.toString(); + assertNotNull(toString); + assertEquals(expectedToString, toString); + } + + @Test + void constructor() { + // Arrange + final String expected = "some-id"; + + // Act + final CorrelationRuleFilter actual = new CorrelationRuleFilter(expected); + + // Assert + assertEquals(expected, actual.getCorrelationId()); + assertNull(actual.getContentType()); + assertNull(actual.getLabel()); + assertNull(actual.getMessageId()); + assertNull(actual.getReplyTo()); + assertNull(actual.getReplyToSessionId()); + assertNull(actual.getSessionId()); + assertNull(actual.getTo()); + } + + @Test + void setValues() { + // Arrange + final String correlationId = "some-id"; + final String contentType = "some-content-type"; + final String label = "some-label"; + final String messageId = "some-message-id"; + final String replyId = "some-reply-id"; + final String replyIdSessionId = "some-reply-session-id"; + final String sessionId = "some-session-id"; + final String to = "some-to"; + + final CorrelationRuleFilter actual = new CorrelationRuleFilter("fake"); + + // Act + actual.setCorrelationId(correlationId); + actual.setContentType(contentType); + actual.setLabel(label); + actual.setMessageId(messageId); + actual.setReplyTo(replyId); + actual.setReplyToSessionId(replyIdSessionId); + actual.setSessionId(sessionId); + actual.setTo(to); + + // Assert + assertEquals(correlationId, actual.getCorrelationId()); + assertEquals(contentType, actual.getContentType()); + assertEquals(label, actual.getLabel()); + assertEquals(messageId, actual.getMessageId()); + assertEquals(replyId, actual.getReplyTo()); + assertEquals(replyIdSessionId, actual.getReplyToSessionId()); + assertEquals(sessionId, actual.getSessionId()); + assertEquals(to, actual.getTo()); + + final String toString = actual.toString(); + assertNotNull(toString); + assertFalse(toString.isEmpty()); + assertTrue(toString.contains(correlationId)); + assertTrue(toString.contains(contentType)); + assertTrue(toString.contains(label)); + assertTrue(toString.contains(messageId)); + assertTrue(toString.contains(replyId)); + assertTrue(toString.contains(replyIdSessionId)); + assertTrue(toString.contains(sessionId)); + assertTrue(toString.contains(to)); + } + + @Test + void setProperties() { + // Arrange + final String key1 = "some-key1"; + final String value1 = "some-value1"; + final String key2 = "some-key2"; + final String value2 = "some-value2"; + final String correlationId = "some-id"; + final String contentType = "some-content-type"; + final String label = "some-label"; + + final CorrelationRuleFilter actual = new CorrelationRuleFilter("fake"); + + // Act + actual.setCorrelationId(correlationId); + actual.setContentType(contentType); + actual.setLabel(label); + + actual.getProperties().put(key1, value1); + actual.getProperties().put(key2, value2); + + // Assert + assertEquals(correlationId, actual.getCorrelationId()); + assertEquals(contentType, actual.getContentType()); + assertEquals(label, actual.getLabel()); + + final String toString = actual.toString(); + assertNotNull(toString); + assertFalse(toString.isEmpty()); + assertTrue(toString.contains(key1)); + assertTrue(toString.contains(value1)); + assertTrue(toString.contains(key2)); + assertTrue(toString.contains(value2)); + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java index ed842ee3e1034..f91baa2e6fe3d 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java @@ -12,6 +12,10 @@ import com.azure.messaging.servicebus.administration.models.QueueProperties; import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeInfo; +import com.azure.messaging.servicebus.implementation.models.CorrelationFilterImpl; +import com.azure.messaging.servicebus.implementation.models.EmptyRuleActionImpl; +import com.azure.messaging.servicebus.implementation.models.FalseFilterImpl; +import com.azure.messaging.servicebus.implementation.models.KeyValueImpl; import com.azure.messaging.servicebus.implementation.models.MessageCountDetails; import com.azure.messaging.servicebus.implementation.models.NamespacePropertiesEntry; import com.azure.messaging.servicebus.implementation.models.QueueDescription; @@ -20,10 +24,17 @@ import com.azure.messaging.servicebus.implementation.models.QueueDescriptionFeed; import com.azure.messaging.servicebus.implementation.models.ResponseAuthor; import com.azure.messaging.servicebus.implementation.models.ResponseLink; +import com.azure.messaging.servicebus.implementation.models.RuleDescription; +import com.azure.messaging.servicebus.implementation.models.RuleDescriptionEntry; +import com.azure.messaging.servicebus.implementation.models.RuleDescriptionEntryContent; +import com.azure.messaging.servicebus.implementation.models.RuleDescriptionFeed; +import com.azure.messaging.servicebus.implementation.models.SqlFilterImpl; +import com.azure.messaging.servicebus.implementation.models.SqlRuleActionImpl; import com.azure.messaging.servicebus.implementation.models.SubscriptionDescription; import com.azure.messaging.servicebus.implementation.models.SubscriptionDescriptionEntry; import com.azure.messaging.servicebus.implementation.models.SubscriptionDescriptionEntryContent; import com.azure.messaging.servicebus.implementation.models.SubscriptionDescriptionFeed; +import com.azure.messaging.servicebus.implementation.models.TrueFilterImpl; import org.junit.jupiter.api.Test; import java.io.File; @@ -41,9 +52,12 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; 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.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -478,6 +492,171 @@ void deserializeSubscriptionDescriptionFeed() throws IOException { } } + /** + * Verify we can deserialize XML from a GET rule. + */ + @Test + void deserializeSqlRule() throws IOException { + // Arrange + final String contents = getContents("SqlRuleFilter.xml"); + final RuleDescription expectedRule = new RuleDescription() + .setName("foo") + .setCreatedAt(OffsetDateTime.parse("2020-08-28T04:32:20.9387321Z")) + .setAction(new EmptyRuleActionImpl()) + .setFilter(new SqlFilterImpl() + .setCompatibilityLevel("20") + .setSqlExpression("type = \"TestType\"")); + final RuleDescriptionEntry expected = new RuleDescriptionEntry() + .setId("sb://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/Rules/foo?api-version=2017-04&enrich=false") + .setPublished(OffsetDateTime.parse("2020-08-28T04:32:20Z")) + .setUpdated(OffsetDateTime.parse("2020-08-28T04:34:20Z")) + .setContent(new RuleDescriptionEntryContent() + .setRuleDescription(expectedRule) + .setType("application/xml")); + + // Act + final RuleDescriptionEntry actual = serializer.deserialize(contents, RuleDescriptionEntry.class); + + // Assert + assertRuleEntryEquals(expected, actual); + } + + /** + * Verify we can deserialize XML from a GET rule that includes an action. + */ + @Test + void deserializeSqlRuleWithAction() throws IOException { + // Arrange + final String contents = getContents("SqlRuleFilterWithAction.xml"); + final RuleDescription expectedRule = new RuleDescription() + .setName("foo") + .setCreatedAt(OffsetDateTime.parse("2020-08-28T04:51:24.9967451Z")) + .setAction(new SqlRuleActionImpl() + .setCompatibilityLevel("20") + .setSqlExpression("set FilterTag = 'true'")) + .setFilter(new SqlFilterImpl() + .setCompatibilityLevel("20") + .setSqlExpression("type = \"TestType\"")); + final RuleDescriptionEntry expected = new RuleDescriptionEntry() + .setId("https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/Rules/foo?api-version=2017-04") + .setPublished(OffsetDateTime.parse("2020-08-28T04:51:24Z")) + .setUpdated(OffsetDateTime.parse("2020-08-28T04:54:24Z")) + .setContent(new RuleDescriptionEntryContent() + .setRuleDescription(expectedRule) + .setType("application/xml")); + + // Act + final RuleDescriptionEntry actual = serializer.deserialize(contents, RuleDescriptionEntry.class); + + // Assert + assertRuleEntryEquals(expected, actual); + } + + /** + * Verify we can deserialize XML from a GET correlation filter rule that includes an action. + */ + @Test + void deserializeCorrelationFilterRule() throws IOException { + // Arrange + final String contents = getContents("CorrelationRuleFilter.xml"); + final RuleDescription expectedRule = new RuleDescription() + .setName("correlation-test") + .setCreatedAt(OffsetDateTime.parse("2020-08-28T04:32:50.7697024Z")) + .setAction(new EmptyRuleActionImpl()) + .setFilter(new CorrelationFilterImpl() + .setLabel("matching-label")); + final RuleDescriptionEntry expected = new RuleDescriptionEntry() + .setId("sb://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/Rules/correl?api-version=2017-04&enrich=false") + .setPublished(OffsetDateTime.parse("2020-08-28T04:32:50Z")) + .setUpdated(OffsetDateTime.parse("2020-08-28T04:34:50Z")) + .setContent(new RuleDescriptionEntryContent() + .setRuleDescription(expectedRule) + .setType("application/xml")); + + // Act + final RuleDescriptionEntry actual = serializer.deserialize(contents, RuleDescriptionEntry.class); + + // Assert + assertRuleEntryEquals(expected, actual); + } + + /** + * Verify we can deserialize XML from a GET rule that includes an action. + */ + @Test + void deserializeRulesFeed() throws IOException { + // Arrange + final String contents = getContents("RuleDescriptionFeed.xml"); + + final RuleDescription defaultRule = new RuleDescription() + .setName("$Default") + .setCreatedAt(OffsetDateTime.parse("2020-08-12T18:48:00.1005312Z")) + .setAction(new EmptyRuleActionImpl()) + .setFilter(new TrueFilterImpl().setCompatibilityLevel("20").setSqlExpression("1=1")); + final RuleDescriptionEntry defaultRuleEntry = new RuleDescriptionEntry() + .setId("https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/rules/$Default?api-version=2017-04") + .setPublished(OffsetDateTime.parse("2020-08-12T18:48:00Z")) + .setUpdated(OffsetDateTime.parse("2020-08-12T18:48:00Z")) + .setContent(new RuleDescriptionEntryContent() + .setRuleDescription(defaultRule) + .setType("application/xml")); + + final RuleDescription correlation = new RuleDescription() + .setName("correl") + .setCreatedAt(OffsetDateTime.parse("2020-08-28T04:32:50.7697024Z")) + .setAction(new EmptyRuleActionImpl()) + .setFilter(new CorrelationFilterImpl() + .setLabel("matching-label")); + final RuleDescriptionEntry correlationEntry = new RuleDescriptionEntry() + .setId("https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/rules/correl?api-version=2017-04") + .setPublished(OffsetDateTime.parse("2020-08-28T04:32:50Z")) + .setUpdated(OffsetDateTime.parse("2020-08-28T04:32:50Z")) + .setContent(new RuleDescriptionEntryContent() + .setRuleDescription(correlation) + .setType("application/xml")); + + final RuleDescription sqlRule = new RuleDescription() + .setName("foo") + .setCreatedAt(OffsetDateTime.parse("2020-08-28T04:51:24.9967451Z")) + .setAction(new SqlRuleActionImpl() + .setCompatibilityLevel("20") + .setSqlExpression("set FilterTag = 'true'")) + .setFilter(new SqlFilterImpl() + .setCompatibilityLevel("20") + .setSqlExpression("type = \"TestType\"")); + final RuleDescriptionEntry sqlRuleEntry = new RuleDescriptionEntry() + .setId("https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/rules/foo?api-version=2017-04") + .setPublished(OffsetDateTime.parse("2020-08-28T04:32:20Z")) + .setUpdated(OffsetDateTime.parse("2020-08-28T04:32:20Z")) + .setContent(new RuleDescriptionEntryContent() + .setRuleDescription(sqlRule) + .setType("application/xml")); + + final List expectedEntries = Arrays.asList(defaultRuleEntry, correlationEntry, sqlRuleEntry); + final RuleDescriptionFeed expected = new RuleDescriptionFeed() + .setEntry(expectedEntries) + .setId("https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/rules?api-version=2017-04&enrich=false&$skip=0&$top=100") + .setUpdated(OffsetDateTime.parse("2020-08-28T14:59:16Z")); + + // Act + final RuleDescriptionFeed actual = serializer.deserialize(contents, RuleDescriptionFeed.class); + + // Assert + assertNotNull(actual); + assertEquals(expected.getId(), actual.getId()); + + final List actualEntries = actual.getEntry(); + assertNotNull(actualEntries); + assertEquals(expectedEntries.size(), actualEntries.size()); + + for (int i = 0; i < expected.getEntry().size(); i++) { + final RuleDescriptionEntry expectedRule = expectedEntries.get(i); + final RuleDescriptionEntry actualRule = actualEntries.get(i); + + assertRuleEntryEquals(expectedRule, actualRule); + } + } + /** * Given a file name, gets the corresponding resource and its contents as a string. * @@ -538,6 +717,111 @@ private static void assertSubscriptionEquals(SubscriptionDescription expected, E assertEquals(expectedStatus, actual.getStatus()); } + private static void assertRuleEntryEquals(RuleDescriptionEntry expected, RuleDescriptionEntry actual) { + if (expected == null) { + assertNull(actual); + return; + } + + assertNotNull(actual); + assertEquals(expected.getId(), actual.getId()); + + if (expected.getContent() == null) { + assertNull(actual.getContent()); + return; + } + + assertNotNull(actual.getContent()); + assertEquals(expected.getContent().getType(), actual.getContent().getType()); + + final RuleDescription expectedRule = expected.getContent().getRuleDescription(); + final RuleDescription actualRule = actual.getContent().getRuleDescription(); + assertNotNull(actualRule); + assertRuleEquals(expectedRule, actualRule); + } + + private static void assertRuleEquals(RuleDescription expected, RuleDescription actual) { + if (expected == null) { + assertNull(actual); + return; + } + + assertNotNull(actual); + assertEquals(expected.getName(), actual.getName()); + + // Rule action assertions. + if (expected.getAction() instanceof EmptyRuleActionImpl) { + assertTrue(actual.getAction() instanceof EmptyRuleActionImpl); + } else if (expected.getAction() instanceof SqlRuleActionImpl) { + assertTrue(actual.getAction() instanceof SqlRuleActionImpl); + + final SqlRuleActionImpl expectedAction = (SqlRuleActionImpl) expected.getAction(); + final SqlRuleActionImpl actualAction = (SqlRuleActionImpl) actual.getAction(); + + assertEquals(expectedAction.getCompatibilityLevel(), actualAction.getCompatibilityLevel()); + assertEquals(expectedAction.getSqlExpression(), actualAction.getSqlExpression()); + assertEquals(expectedAction.isRequiresPreprocessing(), actualAction.isRequiresPreprocessing()); + + assertParameters(expectedAction.getParameters(), actualAction.getParameters()); + } + + // Rule filter assertions. + if (expected.getFilter() instanceof TrueFilterImpl) { + assertTrue(actual.getFilter() instanceof TrueFilterImpl); + } else if (expected.getFilter() instanceof FalseFilterImpl) { + assertTrue(actual.getFilter() instanceof FalseFilterImpl); + } + + if (expected.getFilter() instanceof SqlFilterImpl) { + assertTrue(actual.getFilter() instanceof SqlFilterImpl); + + final SqlFilterImpl expectedFilter = (SqlFilterImpl) expected.getFilter(); + final SqlFilterImpl actualFilter = (SqlFilterImpl) actual.getFilter(); + + assertEquals(expectedFilter.getCompatibilityLevel(), actualFilter.getCompatibilityLevel()); + assertEquals(expectedFilter.getSqlExpression(), actualFilter.getSqlExpression()); + + assertParameters(expectedFilter.getParameters(), actualFilter.getParameters()); + } else if (expected.getFilter() instanceof CorrelationFilterImpl) { + assertTrue(actual.getFilter() instanceof CorrelationFilterImpl); + + final CorrelationFilterImpl expectedFilter = (CorrelationFilterImpl) expected.getFilter(); + final CorrelationFilterImpl actualFilter = (CorrelationFilterImpl) actual.getFilter(); + + assertEquals(expectedFilter.getCorrelationId(), actualFilter.getCorrelationId()); + assertEquals(expectedFilter.getMessageId(), actualFilter.getMessageId()); + assertEquals(expectedFilter.getTo(), actualFilter.getTo()); + assertEquals(expectedFilter.getReplyTo(), actualFilter.getReplyTo()); + assertEquals(expectedFilter.getReplyToSessionId(), actualFilter.getReplyToSessionId()); + assertEquals(expectedFilter.getSessionId(), actualFilter.getSessionId()); + assertEquals(expectedFilter.getContentType(), actualFilter.getContentType()); + + assertParameters(expectedFilter.getProperties(), actualFilter.getProperties()); + } + } + + private static void assertParameters(List expected, List actual) { + if (expected == null) { + assertNull(actual); + return; + } + + assertNotNull(actual); + assertEquals(expected.size(), actual.size()); + + final Map actualMap = actual.stream() + .collect(Collectors.toMap(KeyValueImpl::getKey, Function.identity())); + + for (KeyValueImpl item : expected) { + final KeyValueImpl removed = actualMap.remove(item.getKey()); + + assertNotNull(removed); + assertEquals(item.getValue(), removed.getValue()); + } + + assertTrue(actualMap.isEmpty()); + } + @SuppressWarnings("unchecked") private static void assertTitle(String expectedTitle, Object responseTitle) { assertTrue(responseTitle instanceof LinkedHashMap); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getRule.json b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getRule.json new file mode 100644 index 0000000000000..a4dc847f3d6b6 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getRule.json @@ -0,0 +1,22 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.servicebus.windows.net/topic-13/subscriptions/subscription/rules/$Default?enrich=true&api-version=2017-04", + "Headers" : { + "User-Agent" : "azsdk-java-azure-messaging-servicebus/7.0.0-beta.6 (11.0.5; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Strict-Transport-Security" : "max-age=31536000", + "Server" : "Microsoft-HTTPAPI/2.0", + "ETag" : "637328573900600000", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "sb://sb-java-conniey-3.servicebus.windows.net/topic-13/subscriptions/subscription/rules/$Default?enrich=true&api-version=2017-04$Default2020-08-12T18:48:00Z2020-08-12T18:48:00Z1=1202020-08-12T18:48:00.3923954Z$Default", + "Date" : "Mon, 31 Aug 2020 22:15:11 GMT", + "Content-Type" : "application/atom+xml;type=entry;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/listRules.json b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/listRules.json new file mode 100644 index 0000000000000..9f9c4427b805b --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/listRules.json @@ -0,0 +1,22 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.servicebus.windows.net/topic-13/subscriptions/subscription/rules?$skip=0&$top=100&api-version=2017-04", + "Headers" : { + "User-Agent" : "azsdk-java-azure-messaging-servicebus/7.0.0-beta.6 (11.0.5; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Strict-Transport-Security" : "max-age=31536000", + "Server" : "Microsoft-HTTPAPI/2.0", + "ETag" : "637328573900600000", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "Ruleshttps://sb-java-conniey-3.servicebus.windows.net/topic-13/subscriptions/subscription/rules?$skip=0&$top=100&api-version=2017-042020-08-31T22:15:19Zhttps://sb-java-conniey-3.servicebus.windows.net/topic-13/subscriptions/subscription/rules/$Default?api-version=2017-04$Default2020-08-12T18:48:00Z2020-08-12T18:48:00Z1=1202020-08-12T18:48:00.3923954Z$Default", + "Date" : "Mon, 31 Aug 2020 22:15:19 GMT", + "Content-Type" : "application/atom+xml;type=feed;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/CorrelationRuleFilter.xml b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/CorrelationRuleFilter.xml new file mode 100644 index 0000000000000..8b146963356d0 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/CorrelationRuleFilter.xml @@ -0,0 +1,18 @@ + + sb://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/Rules/correl?api-version=2017-04&enrich=false + correlation-test + 2020-08-28T04:32:50Z + 2020-08-28T04:34:50Z + + + + + + + + + 2020-08-28T04:32:50.7697024Z + correlation-test + + + diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/RuleDescriptionFeed.xml b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/RuleDescriptionFeed.xml new file mode 100644 index 0000000000000..22655e704392c --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/RuleDescriptionFeed.xml @@ -0,0 +1,67 @@ + + Rules + https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/rules?api-version=2017-04&enrich=false&$skip=0&$top=100 + 2020-08-28T14:59:16Z + + + https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/rules/$Default?api-version=2017-04 + $Default + 2020-08-12T18:48:00Z + 2020-08-12T18:48:00Z + + + + + 1=1 + 20 + + + 2020-08-12T18:48:00.1005312Z + $Default + + + + + https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/rules/correl?api-version=2017-04 + correl + 2020-08-28T04:32:50Z + 2020-08-28T04:32:50Z + + + + + + + + + 2020-08-28T04:32:50.7697024Z + correl + + + + + https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/rules/foo?api-version=2017-04 + foo + 2020-08-28T04:32:20Z + 2020-08-28T04:32:20Z + + + + + type = "TestType" + 20 + + + set FilterTag = 'true' + 20 + + 2020-08-28T04:32:20.9387321Z + foo + + + + diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/SqlRuleFilter.xml b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/SqlRuleFilter.xml new file mode 100644 index 0000000000000..0919bf15fcfec --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/SqlRuleFilter.xml @@ -0,0 +1,19 @@ + + sb://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/Rules/foo?api-version=2017-04&enrich=false + foo + 2020-08-28T04:32:20Z + 2020-08-28T04:34:20Z + + + + + type = "TestType" + 20 + + + + 2020-08-28T04:32:20.9387321Z + foo + + + diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/SqlRuleFilterWithAction.xml b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/SqlRuleFilterWithAction.xml new file mode 100644 index 0000000000000..0517521fd050c --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/SqlRuleFilterWithAction.xml @@ -0,0 +1,21 @@ + + https://sb-java-conniey-3.servicebus.windows.net/topic-10/Subscriptions/subscription/Rules/foo?api-version=2017-04 + foo + 2020-08-28T04:51:24Z + 2020-08-28T04:54:24Z + + + + + type = "TestType" + 20 + + + set FilterTag = 'true' + 20 + + 2020-08-28T04:51:24.9967451Z + foo + + + diff --git a/sdk/servicebus/azure-messaging-servicebus/swagger/README.md b/sdk/servicebus/azure-messaging-servicebus/swagger/README.md index 84d097dc6a0e2..82e8d7b824eac 100644 --- a/sdk/servicebus/azure-messaging-servicebus/swagger/README.md +++ b/sdk/servicebus/azure-messaging-servicebus/swagger/README.md @@ -31,13 +31,13 @@ input-file: E:\git\conniey\azure-rest-api-specs-pr\specification\servicebus\data java: true output-folder: ..\ generate-client-as-impl: true -namespace: com.azure.messaging.servicebus +namespace: com.azure.messaging.servicebus.administration generate-client-interfaces: false sync-methods: none license-header: MICROSOFT_MIT_SMALL add-context-parameter: true models-subpackage: implementation.models -custom-types: AccessRights,AuthorizationRule,EntityAvailabilityStatus,EntityStatus,MessageCountDetails,NamespaceProperties,MessagingSku +custom-types: AccessRights,AuthorizationRule,EntityStatus,NamespaceProperties,MessagingSku custom-types-subpackage: models context-client-method-parameter: true enable-xml: true From 4a748496dfe96144f31d6b23c2a3ef568855628c Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Mon, 31 Aug 2020 16:30:32 -0700 Subject: [PATCH 024/168] Initial test framework (#14660) --- .gitignore | 3 + sdk/digitaltwins/Print-MyEnvData.ps1 | 5 + .../azure-digitaltwins-core/pom.xml | 49 ++++++- .../core/DigitalTwinsTestBase.java | 110 +++++++++++++++ .../azure/digitaltwins/core/SampleTest.java | 41 ++++++ .../prerequisite/prerequisite readme.md | 26 ++++ .../src/test/resources/prerequisite/setup.ps1 | 131 ++++++++++++++++++ .../resources/session-records/ListTest.json | 21 +++ sdk/digitaltwins/test-resources.json | 2 +- sdk/digitaltwins/tests.yml | 5 +- 10 files changed, 382 insertions(+), 11 deletions(-) create mode 100644 sdk/digitaltwins/Print-MyEnvData.ps1 create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/prerequisite/prerequisite readme.md create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/prerequisite/setup.ps1 create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json diff --git a/.gitignore b/.gitignore index 0160ec82cf1ff..08f1238124660 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ temp/ # Spring **/*packageOutputDirectory* +# Sensitive files +*.json.env + #javadoc overview files generated from README.md readme_overview.html **/javadocTemp/** diff --git a/sdk/digitaltwins/Print-MyEnvData.ps1 b/sdk/digitaltwins/Print-MyEnvData.ps1 new file mode 100644 index 0000000000000..9c03422e3e87f --- /dev/null +++ b/sdk/digitaltwins/Print-MyEnvData.ps1 @@ -0,0 +1,5 @@ +param( + [Parameter()] + [string] $fileName = "test-resources.json.env" +) +([System.Text.Encoding]::UTF8).GetString([Security.Cryptography.ProtectedData]::Unprotect([IO.File]::ReadAllBytes((Resolve-path $fileName)), $null, [Security.Cryptography.DataProtectionScope]::CurrentUser)) \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml index 01c52fa892309..04dc54125c671 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml +++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml @@ -15,6 +15,12 @@ azure-digitaltwins-core 1.0.0-beta.1 + + + 0.01 + 0.01 + + com.azure @@ -22,7 +28,24 @@ 1.7.0 - + com.azure + azure-core-http-netty + 1.5.4 + + + com.fasterxml.jackson.core + jackson-annotations + 2.11.2 + + + + + com.azure + azure-core-test + 1.4.0 + test + + com.azure azure-identity 1.1.0 @@ -30,13 +53,27 @@ com.azure - azure-core-http-netty - 1.5.4 + azure-core-http-okhttp + 1.2.5 + test - com.fasterxml.jackson.core - jackson-annotations - 2.11.2 + org.junit.jupiter + junit-jupiter-api + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-params + 5.6.2 + test diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java new file mode 100644 index 0000000000000..4f9396d5be0e7 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java @@ -0,0 +1,110 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.credential.AccessToken; +import com.azure.core.credential.TokenCredential; +import com.azure.core.credential.TokenRequestContext; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.test.TestBase; +import com.azure.core.test.TestMode; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.identity.ClientSecretCredentialBuilder; +import reactor.core.publisher.Mono; + +import java.util.Locale; + +public class DigitalTwinsTestBase extends TestBase +{ + protected static final String TENANT_ID = Configuration.getGlobalConfiguration() + .get("TENANT_ID", "tenantId"); + + protected static final String CLIENT_SECRET = Configuration.getGlobalConfiguration() + .get("CLIENT_SECRET", "clientSecret"); + + protected static final String CLIENT_ID = Configuration.getGlobalConfiguration() + .get("CLIENT_ID", "clientId"); + + protected static final String DIGITALTWINS_URL = Configuration.getGlobalConfiguration() + .get("DIGITALTWINS_URL", "https://playback.api.wus2.digitaltwins.azure.net"); + + protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder() { + DigitalTwinsClientBuilder builder = new DigitalTwinsClientBuilder() + .endpoint(DIGITALTWINS_URL); + + if (interceptorManager.isPlaybackMode()){ + builder.httpClient(interceptorManager.getPlaybackClient()); + // Use fake credentials for playback mode. + builder.tokenCredential(new FakeCredentials()); + return builder; + } + + // TODO: investigate whether or not we need to add a retry policy. + + // If it is record mode, we add record mode policies to the builder. + // There is no isRecordMode method on interceptorManger. + if (!interceptorManager.isLiveMode()){ + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + // Only get valid live token when running live tests. + builder.tokenCredential(new ClientSecretCredentialBuilder() + .tenantId(TENANT_ID) + .clientId(CLIENT_ID) + .clientSecret(CLIENT_SECRET) + .build()); + + return builder; + } + + protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder(HttpPipelinePolicy... policies) { + DigitalTwinsClientBuilder builder = new DigitalTwinsClientBuilder() + .endpoint(DIGITALTWINS_URL); + + if (interceptorManager.isPlaybackMode()){ + builder.httpClient(interceptorManager.getPlaybackClient()); + // Use fake credentials for playback mode. + builder.tokenCredential(new FakeCredentials()); + addPolicies(builder, policies); + return builder; + } + + addPolicies(builder, policies); + + // TODO: investigate whether or not we need to add a retry policy. + + // If it is record mode, we add record mode policies to the builder. + // There is no isRecordMode method on interceptorManger. + if (!interceptorManager.isLiveMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + // Only get valid live token when running live tests. + builder.tokenCredential(new ClientSecretCredentialBuilder() + .tenantId(TENANT_ID) + .clientId(CLIENT_ID) + .clientSecret(CLIENT_SECRET) + .build()); + + return builder; + } + + private static void addPolicies(DigitalTwinsClientBuilder builder, HttpPipelinePolicy... policies) { + if (policies == null) { + return; + } + + for (HttpPipelinePolicy policy : policies) { + builder.addPolicy(policy); + } + } + + static class FakeCredentials implements TokenCredential + { + @Override + public Mono getToken(TokenRequestContext tokenRequestContext) { + return Mono.empty(); + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java new file mode 100644 index 0000000000000..fdec1b94937a6 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java @@ -0,0 +1,41 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.digitaltwins.core.models.ModelData; +import org.junit.jupiter.api.Test; + +public class SampleTest extends DigitalTwinsTestBase { + + private static DigitalTwinsClient client; + + @Override + protected void beforeTest(){ + super.beforeTest(); + client = setupClient(); + } + + @Override + protected void afterTest() + { + super.afterTest(); + } + + private DigitalTwinsClient setupClient(){ + return getDigitalTwinsClientBuilder() + .buildClient(); + } + + @Test + public void ListTest(){ + PagedIterable models = client.listModels(); + + // Process using the Stream interface by iterating over each page + models + // You can also subscribe to pages by specifying the preferred page size or the associated continuation token to start the processing from. + .streamByPage() + .forEach(page -> { + System.out.println("Response headers status code is " + page.getStatusCode()); + page.getValue().forEach(item -> System.out.println("Model retrieved: " + item.getId())); + }); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/prerequisite/prerequisite readme.md b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/prerequisite/prerequisite readme.md new file mode 100644 index 0000000000000..4729abf44bee1 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/prerequisite/prerequisite readme.md @@ -0,0 +1,26 @@ +# Prerequisites + +## Install + +### Install the latest Powershell 7 + +- Make sure you run the script using the latest stable version of [powershell 7](https://github.com/PowerShell/PowerShell/releases) + +### Install the latest Azure CLI package + +- If already installed, check latest version: + - Run `az --version` to make sure `azure-cli` is at least **version 2.3.1** + - If it isn't, update it +- Use this link to install [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest]) + +## Delete + +To delete the digital twins instance, you need to first delete the endpoint added by the script (the service doesn't yet support cascading delete). + +1. To do this, run the command `az dt endpoint delete -n
-g --en someEventHubEndpoint`. +1. If you have other endpoints that have been added outside this script, you can discover them with the command `az dt endpoint list -n
-g `. +1. Then delete them with the same command in step 1. + +## Maintenance + +In order to maintain the functionality of the Setup.ps1 file, make sure this document stays updated with all the required changes if you run/alter this script. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/prerequisite/setup.ps1 b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/prerequisite/setup.ps1 new file mode 100644 index 0000000000000..086f7bbce370b --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/prerequisite/setup.ps1 @@ -0,0 +1,131 @@ +param( + [Parameter(Mandatory)] + [string] $Region, + + [Parameter(Mandatory)] + [string] $ResourceGroup, + + [Parameter(Mandatory)] + [string] $SubscriptionId, + + [Parameter(Mandatory)] + [ValidateLength(6, 50)] + [string] $DigitalTwinName, + + [Parameter()] + [string] $AppRegistrationName +) + +Function Connect-AzureSubscription +{ + # Ensure the user is logged in + try + { + $azureContext = az account show + } + catch { } + + if (-not $azureContext) + { + Write-Host "`nPlease login to Azure..." + az login + $azureContext = az account show + } + + # Ensure the desired subscription is selected + $sub = az account show --output tsv --query id + if ($sub -ne $SubscriptionId) + { + Write-Host "`nSelecting subscription $SubscriptionId" + az account set --subscription $SubscriptionId + } + + return $azureContext +} + +$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") +if (-not $isAdmin) +{ + throw "This script must be run in administrative mode." +} + +Connect-AzureSubscription + +$Region = $Region.Replace(' ', '') + +if (-not $AppRegistrationName) +{ + $AppRegistrationName = $ResourceGroup +} + +$appId = az ad app list --show-mine --query "[?displayName=='$AppRegistrationName'].appId" --output tsv +if (-not $appId) +{ + Write-Host "`nCreating App Registration $AppRegistrationName`n" + $appId = az ad app create --display-name $AppRegistrationName --native-app --query 'appId' --output tsv +} + +$sp = az ad sp list --show-mine --query "[?appId=='$appId'].appId" --output tsv +if (-not $sp) +{ + Write-Host "`nCreating service principal for app $appId`n" + az ad sp create --id $appId --output none +} + +# Get test application OID from the service principal +$applicationOId = az ad sp show --id $sp --query "objectId" --output tsv + +$rgExists = az group exists --name $ResourceGroup +if ($rgExists -eq "False") +{ + Write-Host "`nCreating Resource Group $ResourceGroup in $Region`n" + az group create --name $ResourceGroup --location $Region --output none +} + +Write-Host "`nDeploying resources to $ResourceGroup in $Region`n" + +$armTemplateFile = Join-Path -Path $PSScriptRoot -ChildPath "../../../../../test-resources.json"; + +if (-not (Test-Path $armTemplateFile -PathType leaf)) +{ + throw "`nARM template was not found. Please make sure you have an ARM template file named test-resources.json in the root of the service directory`n" +} + +# Deploy test-resources.json ARM template. +az deployment group create --resource-group $ResourceGroup --name $($DigitalTwinName.ToLower()) --template-file $armTemplateFile --parameters ` + baseName=$($DigitalTwinName.ToLower()) ` + testApplicationOid=$applicationOId ` + location=$Region + +# Even though the output variable names are all capital letters in the script, ARM turns them into a strange casing +# and we have to use that casing in order to get them from the deployment outputs. +$dtHostName = az deployment group show -g $ResourceGroup -n $($DigitalTwinName.ToLower()) --query 'properties.outputs.digitaltwinS_URL.value' --output tsv + +Write-Host("`nSet a new client secret for $appId`n") +$appSecret = az ad app credential reset --id $appId --years 2 --query 'password' --output tsv + +$outputfileDir = (Get-Item -Path $PSScriptRoot).Parent.Parent.Parent.Parent.Parent.Fullname +$outputFile = Join-Path -Path $outputfileDir -ChildPath "test-resources.json.env" +$tenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47" + +Add-Type -AssemblyName System.Security + +$appSecretJsonEscaped = ConvertTo-Json $appSecret +$environmentText = @" +{ + "DIGITALTWINS_URL": "$dtHostName", + "DIGITALTWINS_CLIENT_ID": "$appId", + "DIGITALTWINS_CLIENT_SECRET": $appSecretJsonEscaped, + "DIGITALTWINS_TENANT_ID": "$tenantId" +} +"@ + +Write-Host "`n$environmentText`n" + +Write-Host "`nEnvironment variables set, this will now be encrypted. Copy these values for future reference.`n" +$bytes = ([System.Text.Encoding]::UTF8).GetBytes($environmentText) +$protectedBytes = [Security.Cryptography.ProtectedData]::Protect($bytes, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser) +Set-Content $outputFile -Value $protectedBytes -AsByteStream -Force +Write-Host "`nTest environment settings stored into encrypted $outputFile`n" + +Write-Host "Done!" diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json new file mode 100644 index 0000000000000..0fbc08187eead --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json @@ -0,0 +1,21 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c291200-e7dc-4262-89bc-7b9d33e0cf08" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "8404", + "StatusCode" : "200", + "Body" : "{\"value\":[{\"id\":\"dtmi:example:Ward;114653809\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:35:57.0043855+00:00\"},{\"id\":\"dtmi:example:Ward;111815882\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:35:57.3524717+00:00\"},{\"id\":\"dtmi:example:Ward;189947004\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:04.264631+00:00\"},{\"id\":\"dtmi:example:Ward;134000272\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:05.0983867+00:00\"},{\"id\":\"dtmi:example:Ward;192739528\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:11.4816322+00:00\"},{\"id\":\"dtmi:example:Ward;116332842\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:11.7749519+00:00\"},{\"id\":\"dtmi:example:Ward;116238422\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:29.4055305+00:00\"},{\"id\":\"dtmi:example:Ward;198163867\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:29.8807133+00:00\"},{\"id\":\"dtmi:example:Ward;121159740\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:51.8135839+00:00\"},{\"id\":\"dtmi:example:Ward;121200167\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:52.3203982+00:00\"},{\"id\":\"dtmi:example:Ward;112162783\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:08.6579838+00:00\"},{\"id\":\"dtmi:example:Ward;147373991\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:09.529767+00:00\"},{\"id\":\"dtmi:example:Ward;161147759\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:15.2200393+00:00\"},{\"id\":\"dtmi:example:Ward;120708472\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:15.2352591+00:00\"},{\"id\":\"dtmi:example:Ward;110887268\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:22.2311573+00:00\"},{\"id\":\"dtmi:example:Ward;118301577\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:22.3667165+00:00\"},{\"id\":\"dtmi:example:Ward;139439832\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:40:48.8947652+00:00\"},{\"id\":\"dtmi:example:Ward;111263086\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:40:54.0431308+00:00\"},{\"id\":\"dtmi:example:Ward;168646450\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:05.1032132+00:00\"},{\"id\":\"dtmi:example:Ward;115143769\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:06.4744458+00:00\"},{\"id\":\"dtmi:example:Ward;128072960\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:10.0981475+00:00\"},{\"id\":\"dtmi:example:Ward;110184439\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:10.1085481+00:00\"},{\"id\":\"dtmi:example:Ward;116847374\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:16.6955258+00:00\"},{\"id\":\"dtmi:example:Ward;155773321\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:17.7553908+00:00\"},{\"id\":\"dtmi:example:Ward;114761833\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:37.6566323+00:00\"},{\"id\":\"dtmi:example:Ward;120391613\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:48.012186+00:00\"},{\"id\":\"dtmi:example:Ward;159816443\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:53.8412956+00:00\"},{\"id\":\"dtmi:example:Ward;112440549\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:58.1808299+00:00\"},{\"id\":\"dtmi:example:Ward;186622131\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:01.9623456+00:00\"},{\"id\":\"dtmi:example:Ward;145075813\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:02.2606087+00:00\"},{\"id\":\"dtmi:example:Ward;145121366\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:09.2690772+00:00\"},{\"id\":\"dtmi:example:Ward;116421010\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:09.6711432+00:00\"},{\"id\":\"dtmi:example:wifiroom;14907\",\"description\":{},\"displayName\":{\"en\":\"RoomWithWifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:44:42.3445106+00:00\"},{\"id\":\"dtmi:example:wifi;117599647\",\"description\":{},\"displayName\":{\"en\":\"Wifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:44:42.3447161+00:00\"},{\"id\":\"dtmi:example:Ward;115429255\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:26.6388005+00:00\"},{\"id\":\"dtmi:example:Ward;189540703\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:26.7312243+00:00\"},{\"id\":\"dtmi:example:Ward;144568920\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:30.5678849+00:00\"},{\"id\":\"dtmi:example:Ward;110855032\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:30.7037839+00:00\"}],\"nextLink\":null}", + "Date" : "Mon, 31 Aug 2020 20:27:27 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/digitaltwins/test-resources.json b/sdk/digitaltwins/test-resources.json index 90b11322185f5..5d830cf1169de 100644 --- a/sdk/digitaltwins/test-resources.json +++ b/sdk/digitaltwins/test-resources.json @@ -147,7 +147,7 @@ } ], "outputs": { - "DIGITALTWINS_ADT_INSTANCE_ENDPOINT_URL": { + "DIGITALTWINS_URL": { "type": "string", "value": "[concat('https://', reference(variables('digitalTwinInstanceResourceId'), '2020-03-01-preview').hostName)]" } diff --git a/sdk/digitaltwins/tests.yml b/sdk/digitaltwins/tests.yml index b07ab1f79b184..2f799c176aa1e 100644 --- a/sdk/digitaltwins/tests.yml +++ b/sdk/digitaltwins/tests.yml @@ -5,7 +5,4 @@ extends: parameters: ServiceDirectory: digitaltwins Location: westus2 - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) - EnvVars: - # Runs live tests. - AZURE_IOT_TEST_MODE: Live \ No newline at end of file + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) \ No newline at end of file From 1b106449d4926d04732ed07220568f7fb26751bb Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Mon, 31 Aug 2020 18:20:01 -0700 Subject: [PATCH 025/168] Implement decommission APIs for Models (#14670) --- .../azure-digitaltwins-core/API design.md | 32 ----------------- .../core/DigitalTwinsAsyncClient.java | 36 ++++++++++++++++--- .../digitaltwins/core/DigitalTwinsClient.java | 22 +++++++++--- .../core/DigitalTwinsTestBase.java | 6 ---- 4 files changed, 49 insertions(+), 47 deletions(-) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/API design.md b/sdk/digitaltwins/azure-digitaltwins-core/API design.md index cb386611f147d..5f024005ca117 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/API design.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/API design.md @@ -802,43 +802,11 @@ When updating a model, the payload for a multi-operation json patch follows the Async APIs ```java - - /** - * Decommissions a model. - * @param modelId The Id of the model to decommission. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono decommissionModel(String modelId) { } - - /** - * Decommissions a model. - * @param modelId The Id of the model to decommission. - * @return The http response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono decommissionModelWithResponse(String modelId) { } ``` Sync APIs ```java - /** - - /** - * Decommissions a model. - * @param modelId The Id of the model to decommission. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Void decommissionModel(String modelId) { } - - /** - * Decommissions a model. - * @param modelId The Id of the model to decommission. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return The http response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response decommissionModelWithResponse(String modelId, Context context) { } ``` diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 45139226e5ba6..8f54858ee3233 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -20,6 +20,7 @@ import com.azure.digitaltwins.core.util.DigitalTwinsResponse; import com.azure.digitaltwins.core.util.DigitalTwinsResponseHeaders; import com.azure.digitaltwins.core.util.ListModelOptions; +import com.azure.digitaltwins.core.util.UpdateOperationUtility; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; @@ -593,8 +594,8 @@ Mono> createModelsSinglePageAsync(List models, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getModel(String modelId) { - return withContext(context -> getModelWithResponse(modelId, context)) - .flatMap(response -> Mono.just(response.getValue())); + return getModelWithResponse(modelId) + .map(Response::getValue); } /** @@ -665,8 +666,8 @@ Mono> listModelsNextSinglePageAsync(String nextLink, Co */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteModel(String modelId) { - return withContext(context -> deleteModelWithResponse(modelId, context)) - .flatMap(response -> Mono.just(response.getValue())); + return deleteModelWithResponse(modelId) + .map(Response::getValue); } /** @@ -683,11 +684,36 @@ Mono> deleteModelWithResponse(String modelId, Context context){ return protocolLayer.getDigitalTwinModels().deleteWithResponseAsync(modelId, context); } - //TODO: Decommission Model APIs (waiting for Abhipsa's change to come in) PagedFlux listRelationships(String digitalTwinId, String relationshipName, Context context) { return new PagedFlux<>( () -> listRelationshipsFirstPage(digitalTwinId, relationshipName, context), nextLink -> listRelationshipsNextPage(nextLink, context)); } + /** + * Decommissions a model. + * @param modelId The Id of the model to decommission. + * @return an empty Mono + */ + public Mono decommissionModel(String modelId) { + return decommissionModelWithResponse(modelId) + .map(Response::getValue); + } + + /** + * Decommissions a model. + * @param modelId The Id of the model to decommission. + * @return The http response. + */ + public Mono> decommissionModelWithResponse(String modelId) { + return withContext(context -> decommissionModelWithResponse(modelId, context)); + } + + Mono> decommissionModelWithResponse(String modelId, Context context) { + List updateOperation = new UpdateOperationUtility() + .appendReplaceOperation("/decommissioned", true) + .getUpdateOperations(); + + return protocolLayer.getDigitalTwinModels().updateWithResponseAsync(modelId, updateOperation, context); + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 671484f6e5f88..8cfb8965635c8 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -347,11 +347,10 @@ public PagedIterable listModels() { /** * Deletes a model. * @param modelId The Id for the model. The Id is globally unique and case sensitive. - * @return Void */ @ServiceMethod(returns = ReturnType.SINGLE) - public Void deleteModel(String modelId) { - return digitalTwinsAsyncClient.deleteModel(modelId).block(); + public void deleteModel(String modelId) { + deleteModelWithResponse(modelId, Context.NONE); } /** @@ -365,6 +364,21 @@ public Response deleteModelWithResponse(String modelId, Context context) { return digitalTwinsAsyncClient.deleteModelWithResponse(modelId, context).block(); } - //TODO: Decommission Model APIs (waiting for Abhipsa's change to come in) + /** + * Decommissions a model. + * @param modelId The Id of the model to decommission. + */ + public void decommissionModel(String modelId) { + decommissionModelWithResponse(modelId, Context.NONE); + } + /** + * Decommissions a model. + * @param modelId The Id of the model to decommission. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The http response. + */ + public Response decommissionModelWithResponse(String modelId, Context context) { + return digitalTwinsAsyncClient.decommissionModelWithResponse(modelId, context).block(); + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java index 4f9396d5be0e7..258df31566766 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java @@ -3,18 +3,12 @@ import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; import com.azure.core.credential.TokenRequestContext; -import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.test.TestBase; -import com.azure.core.test.TestMode; import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; import com.azure.identity.ClientSecretCredentialBuilder; import reactor.core.publisher.Mono; -import java.util.Locale; - public class DigitalTwinsTestBase extends TestBase { protected static final String TENANT_ID = Configuration.getGlobalConfiguration() From 8baef5d98835e30b73b1fd4ac154ad4cfbdfd328 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Tue, 1 Sep 2020 10:42:41 +0800 Subject: [PATCH 026/168] generate package-2020-08-02 (#14674) --- sdk/hybridcompute/mgmt-v2020_08_02/pom.xml | 135 ++ .../v2020_08_02/AzureEntityResource.java | 34 + .../v2020_08_02/ErrorDetail.java | 122 ++ .../v2020_08_02/ErrorResponse.java | 44 + .../v2020_08_02/ErrorResponseException.java | 44 + .../hybridcompute/v2020_08_02/Identity.java | 73 ++ .../v2020_08_02/InstanceViewTypes.java | 38 + .../v2020_08_02/LocationData.java | 121 ++ .../hybridcompute/v2020_08_02/Machine.java | 126 ++ .../v2020_08_02/MachineExtension.java | 360 ++++++ .../MachineExtensionInstanceView.java | 122 ++ .../MachineExtensionInstanceViewStatus.java | 148 +++ ...achineExtensionPropertiesInstanceView.java | 16 + .../MachineExtensionPropertiesModel.java | 246 ++++ .../v2020_08_02/MachineExtensionUpdate.java | 207 ++++ ...MachineExtensionUpdatePropertiesModel.java | 205 +++ .../v2020_08_02/MachineExtensions.java | 53 + .../v2020_08_02/MachineIdentity.java | 16 + .../v2020_08_02/MachineProperties.java | 361 ++++++ .../MachinePropertiesOsProfile.java | 16 + .../v2020_08_02/MachineUpdate.java | 101 ++ .../v2020_08_02/MachineUpdateProperties.java | 43 + .../hybridcompute/v2020_08_02/Machines.java | 24 + .../hybridcompute/v2020_08_02/OSProfile.java | 32 + .../v2020_08_02/OperationValue.java | 50 + .../OperationValueDisplayModel.java | 77 ++ .../hybridcompute/v2020_08_02/Operations.java | 27 + .../v2020_08_02/StatusLevelTypes.java | 44 + .../v2020_08_02/StatusTypes.java | 44 + .../v2020_08_02/UpdateResource.java | 44 + .../HybridComputeManagementClientImpl.java | 224 ++++ .../implementation/HybridComputeManager.java | 123 ++ .../implementation/IdParsingUtils.java | 57 + .../implementation/MachineExtensionImpl.java | 267 ++++ .../implementation/MachineExtensionInner.java | 250 ++++ .../implementation/MachineExtensionsImpl.java | 85 ++ .../MachineExtensionsInner.java | 1094 +++++++++++++++++ .../implementation/MachineImpl.java | 148 +++ .../implementation/MachineInner.java | 396 ++++++ .../implementation/MachinesImpl.java | 133 ++ .../implementation/MachinesInner.java | 791 ++++++++++++ .../implementation/OperationValueImpl.java | 56 + .../implementation/OperationValueInner.java | 109 ++ .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 134 ++ .../v2020_08_02/implementation/PageImpl.java | 75 ++ .../v2020_08_02/implementation/PageImpl1.java | 75 ++ .../implementation/package-info.java | 11 + .../v2020_08_02/package-info.java | 11 + sdk/hybridcompute/pom.mgmt.xml | 1 + 50 files changed, 7062 insertions(+) create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/pom.xml create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/AzureEntityResource.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorDetail.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorResponse.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorResponseException.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Identity.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/InstanceViewTypes.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/LocationData.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Machine.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtension.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionInstanceView.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionInstanceViewStatus.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionPropertiesInstanceView.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionPropertiesModel.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionUpdate.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionUpdatePropertiesModel.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensions.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineIdentity.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineProperties.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachinePropertiesOsProfile.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineUpdate.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineUpdateProperties.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Machines.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OSProfile.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OperationValue.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OperationValueDisplayModel.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Operations.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/StatusLevelTypes.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/StatusTypes.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/UpdateResource.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/HybridComputeManagementClientImpl.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/HybridComputeManager.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/IdParsingUtils.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionImpl.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionInner.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionsImpl.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionsInner.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineImpl.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineInner.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachinesImpl.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachinesInner.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationValueImpl.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationValueInner.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationsImpl.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationsInner.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/PageImpl.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/PageImpl1.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/package-info.java create mode 100644 sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/package-info.java diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/pom.xml b/sdk/hybridcompute/mgmt-v2020_08_02/pom.xml new file mode 100644 index 0000000000000..9bf37ccbfbbab --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.hybridcompute.v2020_08_02 + + com.microsoft.azure + azure-arm-parent + 1.3.2 + ../../parents/azure-arm-parent/pom.xml + + azure-mgmt-hybridcompute + 1.0.0-beta + jar + Microsoft Azure SDK for HybridCompute Management + This package contains Microsoft HybridCompute Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + 1.6.5 + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/AzureEntityResource.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/AzureEntityResource.java new file mode 100644 index 0000000000000..41c40560a2542 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/AzureEntityResource.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * The resource model definition for a Azure Resource Manager resource with an + * etag. + */ +public class AzureEntityResource extends ProxyResource { + /** + * Resource Etag. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource Etag. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorDetail.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorDetail.java new file mode 100644 index 0000000000000..57f08095ab05d --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorDetail.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error details. + */ +public class ErrorDetail { + /** + * The error's code. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * A human readable error message. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * Indicates which property in the request is responsible for the error. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Additional error details. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get the error's code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the error's code. + * + * @param code the code value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a human readable error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a human readable error message. + * + * @param message the message value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get indicates which property in the request is responsible for the error. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set indicates which property in the request is responsible for the error. + * + * @param target the target value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get additional error details. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set additional error details. + * + * @param details the details value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorResponse.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorResponse.java new file mode 100644 index 0000000000000..ec7940822ad1e --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorResponse.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error response. + * Contains details when the response code indicates an error. + */ +public class ErrorResponse { + /** + * The error details. + */ + @JsonProperty(value = "error", required = true) + private ErrorDetail error; + + /** + * Get the error details. + * + * @return the error value + */ + public ErrorDetail error() { + return this.error; + } + + /** + * Set the error details. + * + * @param error the error value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withError(ErrorDetail error) { + this.error = error; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorResponseException.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorResponseException.java new file mode 100644 index 0000000000000..3429e377d3b0e --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/ErrorResponseException.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Identity.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Identity.java new file mode 100644 index 0000000000000..45a95f2b4c454 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Identity.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Managed Identity. + */ +public class Identity { + /** + * The identity type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The identity's principal id. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The identity's tenant id. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * Get the identity type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the identity type. + * + * @param type the type value to set + * @return the Identity object itself. + */ + public Identity withType(String type) { + this.type = type; + return this; + } + + /** + * Get the identity's principal id. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the identity's tenant id. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/InstanceViewTypes.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/InstanceViewTypes.java new file mode 100644 index 0000000000000..987fed9376647 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/InstanceViewTypes.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for InstanceViewTypes. + */ +public final class InstanceViewTypes extends ExpandableStringEnum { + /** Static value instanceView for InstanceViewTypes. */ + public static final InstanceViewTypes INSTANCE_VIEW = fromString("instanceView"); + + /** + * Creates or finds a InstanceViewTypes from its string representation. + * @param name a name to look for + * @return the corresponding InstanceViewTypes + */ + @JsonCreator + public static InstanceViewTypes fromString(String name) { + return fromString(name, InstanceViewTypes.class); + } + + /** + * @return known InstanceViewTypes values + */ + public static Collection values() { + return values(InstanceViewTypes.class); + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/LocationData.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/LocationData.java new file mode 100644 index 0000000000000..3488409711d02 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/LocationData.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metadata pertaining to the geographic location of the resource. + */ +public class LocationData { + /** + * A canonical name for the geographic or physical location. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The city or locality where the resource is located. + */ + @JsonProperty(value = "city") + private String city; + + /** + * The district, state, or province where the resource is located. + */ + @JsonProperty(value = "district") + private String district; + + /** + * The country or region where the resource is located. + */ + @JsonProperty(value = "countryOrRegion") + private String countryOrRegion; + + /** + * Get a canonical name for the geographic or physical location. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set a canonical name for the geographic or physical location. + * + * @param name the name value to set + * @return the LocationData object itself. + */ + public LocationData withName(String name) { + this.name = name; + return this; + } + + /** + * Get the city or locality where the resource is located. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set the city or locality where the resource is located. + * + * @param city the city value to set + * @return the LocationData object itself. + */ + public LocationData withCity(String city) { + this.city = city; + return this; + } + + /** + * Get the district, state, or province where the resource is located. + * + * @return the district value + */ + public String district() { + return this.district; + } + + /** + * Set the district, state, or province where the resource is located. + * + * @param district the district value to set + * @return the LocationData object itself. + */ + public LocationData withDistrict(String district) { + this.district = district; + return this; + } + + /** + * Get the country or region where the resource is located. + * + * @return the countryOrRegion value + */ + public String countryOrRegion() { + return this.countryOrRegion; + } + + /** + * Set the country or region where the resource is located. + * + * @param countryOrRegion the countryOrRegion value to set + * @return the LocationData object itself. + */ + public LocationData withCountryOrRegion(String countryOrRegion) { + this.countryOrRegion = countryOrRegion; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Machine.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Machine.java new file mode 100644 index 0000000000000..e2625c5d0a86c --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Machine.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.HybridComputeManager; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.MachineInner; + +/** + * Type representing Machine. + */ +public interface Machine extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, HasManager { + /** + * @return the adFqdn value. + */ + String adFqdn(); + + /** + * @return the agentVersion value. + */ + String agentVersion(); + + /** + * @return the clientPublicKey value. + */ + String clientPublicKey(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the dnsFqdn value. + */ + String dnsFqdn(); + + /** + * @return the domainName value. + */ + String domainName(); + + /** + * @return the errorDetails value. + */ + List errorDetails(); + + /** + * @return the extensions value. + */ + List extensions(); + + /** + * @return the identity value. + */ + MachineIdentity identity(); + + /** + * @return the lastStatusChange value. + */ + DateTime lastStatusChange(); + + /** + * @return the locationData value. + */ + LocationData locationData(); + + /** + * @return the machineFqdn value. + */ + String machineFqdn(); + + /** + * @return the osName value. + */ + String osName(); + + /** + * @return the osProfile value. + */ + MachinePropertiesOsProfile osProfile(); + + /** + * @return the osSku value. + */ + String osSku(); + + /** + * @return the osVersion value. + */ + String osVersion(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the status value. + */ + StatusTypes status(); + + /** + * @return the vmId value. + */ + String vmId(); + + /** + * @return the vmUuid value. + */ + String vmUuid(); + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtension.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtension.java new file mode 100644 index 0000000000000..83eb1ca3dab6d --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtension.java @@ -0,0 +1,360 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.MachineExtensionInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.HybridComputeManager; +import java.util.Map; + +/** + * Type representing MachineExtension. + */ +public interface MachineExtension extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the autoUpgradeMinorVersion value. + */ + Boolean autoUpgradeMinorVersion(); + + /** + * @return the forceUpdateTag value. + */ + String forceUpdateTag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the instanceView value. + */ + MachineExtensionPropertiesInstanceView instanceView(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the machineExtensionType value. + */ + String machineExtensionType(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the protectedSettings value. + */ + Object protectedSettings(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the publisher value. + */ + String publisher(); + + /** + * @return the settings value. + */ + Object settings(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the typeHandlerVersion value. + */ + String typeHandlerVersion(); + + /** + * The entirety of the MachineExtension definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithMachine, DefinitionStages.WithLocation, DefinitionStages.WithCreate { + } + + /** + * Grouping of MachineExtension definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a MachineExtension definition. + */ + interface Blank extends WithMachine { + } + + /** + * The stage of the machineextension definition allowing to specify Machine. + */ + interface WithMachine { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName The name of the resource group + * @param name The name of the machine where the extension should be created or updated + * @return the next definition stage + */ + WithLocation withExistingMachine(String resourceGroupName, String name); + } + + /** + * The stage of the machineextension definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location The geo-location where the resource lives + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the machineextension definition allowing to specify AutoUpgradeMinorVersion. + */ + interface WithAutoUpgradeMinorVersion { + /** + * Specifies autoUpgradeMinorVersion. + * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true + * @return the next definition stage + */ + WithCreate withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion); + } + + /** + * The stage of the machineextension definition allowing to specify ForceUpdateTag. + */ + interface WithForceUpdateTag { + /** + * Specifies forceUpdateTag. + * @param forceUpdateTag How the extension handler should be forced to update even if the extension configuration has not changed + * @return the next definition stage + */ + WithCreate withForceUpdateTag(String forceUpdateTag); + } + + /** + * The stage of the machineextension definition allowing to specify InstanceView. + */ + interface WithInstanceView { + /** + * Specifies instanceView. + * @param instanceView The machine extension instance view + * @return the next definition stage + */ + WithCreate withInstanceView(MachineExtensionPropertiesInstanceView instanceView); + } + + /** + * The stage of the machineextension definition allowing to specify MachineExtensionType. + */ + interface WithMachineExtensionType { + /** + * Specifies machineExtensionType. + * @param machineExtensionType Specifies the type of the extension; an example is "CustomScriptExtension" + * @return the next definition stage + */ + WithCreate withMachineExtensionType(String machineExtensionType); + } + + /** + * The stage of the machineextension definition allowing to specify ProtectedSettings. + */ + interface WithProtectedSettings { + /** + * Specifies protectedSettings. + * @param protectedSettings The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all + * @return the next definition stage + */ + WithCreate withProtectedSettings(Object protectedSettings); + } + + /** + * The stage of the machineextension definition allowing to specify Publisher. + */ + interface WithPublisher { + /** + * Specifies publisher. + * @param publisher The name of the extension handler publisher + * @return the next definition stage + */ + WithCreate withPublisher(String publisher); + } + + /** + * The stage of the machineextension definition allowing to specify Settings. + */ + interface WithSettings { + /** + * Specifies settings. + * @param settings Json formatted public settings for the extension + * @return the next definition stage + */ + WithCreate withSettings(Object settings); + } + + /** + * The stage of the machineextension definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the machineextension definition allowing to specify TypeHandlerVersion. + */ + interface WithTypeHandlerVersion { + /** + * Specifies typeHandlerVersion. + * @param typeHandlerVersion Specifies the version of the script handler + * @return the next definition stage + */ + WithCreate withTypeHandlerVersion(String typeHandlerVersion); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithAutoUpgradeMinorVersion, DefinitionStages.WithForceUpdateTag, DefinitionStages.WithInstanceView, DefinitionStages.WithMachineExtensionType, DefinitionStages.WithProtectedSettings, DefinitionStages.WithPublisher, DefinitionStages.WithSettings, DefinitionStages.WithTags, DefinitionStages.WithTypeHandlerVersion { + } + } + /** + * The template for a MachineExtension update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAutoUpgradeMinorVersion, UpdateStages.WithForceUpdateTag, UpdateStages.WithProtectedSettings, UpdateStages.WithPublisher, UpdateStages.WithSettings, UpdateStages.WithTags, UpdateStages.WithType, UpdateStages.WithTypeHandlerVersion { + } + + /** + * Grouping of MachineExtension update stages. + */ + interface UpdateStages { + /** + * The stage of the machineextension update allowing to specify AutoUpgradeMinorVersion. + */ + interface WithAutoUpgradeMinorVersion { + /** + * Specifies autoUpgradeMinorVersion. + * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true + * @return the next update stage + */ + Update withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion); + } + + /** + * The stage of the machineextension update allowing to specify ForceUpdateTag. + */ + interface WithForceUpdateTag { + /** + * Specifies forceUpdateTag. + * @param forceUpdateTag How the extension handler should be forced to update even if the extension configuration has not changed + * @return the next update stage + */ + Update withForceUpdateTag(String forceUpdateTag); + } + + /** + * The stage of the machineextension update allowing to specify ProtectedSettings. + */ + interface WithProtectedSettings { + /** + * Specifies protectedSettings. + * @param protectedSettings The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all + * @return the next update stage + */ + Update withProtectedSettings(Object protectedSettings); + } + + /** + * The stage of the machineextension update allowing to specify Publisher. + */ + interface WithPublisher { + /** + * Specifies publisher. + * @param publisher The name of the extension handler publisher + * @return the next update stage + */ + Update withPublisher(String publisher); + } + + /** + * The stage of the machineextension update allowing to specify Settings. + */ + interface WithSettings { + /** + * Specifies settings. + * @param settings Json formatted public settings for the extension + * @return the next update stage + */ + Update withSettings(Object settings); + } + + /** + * The stage of the machineextension update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + /** + * The stage of the machineextension update allowing to specify Type. + */ + interface WithType { + /** + * Specifies type. + * @param type Specifies the type of the extension; an example is "CustomScriptExtension" + * @return the next update stage + */ + Update withType(String type); + } + + /** + * The stage of the machineextension update allowing to specify TypeHandlerVersion. + */ + interface WithTypeHandlerVersion { + /** + * Specifies typeHandlerVersion. + * @param typeHandlerVersion Specifies the version of the script handler + * @return the next update stage + */ + Update withTypeHandlerVersion(String typeHandlerVersion); + } + + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionInstanceView.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionInstanceView.java new file mode 100644 index 0000000000000..e6918f041aeb6 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionInstanceView.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the Machine Extension Instance View. + */ +public class MachineExtensionInstanceView { + /** + * The machine extension name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Specifies the type of the extension; an example is + * "CustomScriptExtension". + */ + @JsonProperty(value = "type") + private String type; + + /** + * Specifies the version of the script handler. + */ + @JsonProperty(value = "typeHandlerVersion") + private String typeHandlerVersion; + + /** + * Instance view status. + */ + @JsonProperty(value = "status") + private MachineExtensionInstanceViewStatus status; + + /** + * Get the machine extension name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the machine extension name. + * + * @param name the name value to set + * @return the MachineExtensionInstanceView object itself. + */ + public MachineExtensionInstanceView withName(String name) { + this.name = name; + return this; + } + + /** + * Get specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param type the type value to set + * @return the MachineExtensionInstanceView object itself. + */ + public MachineExtensionInstanceView withType(String type) { + this.type = type; + return this; + } + + /** + * Get specifies the version of the script handler. + * + * @return the typeHandlerVersion value + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set specifies the version of the script handler. + * + * @param typeHandlerVersion the typeHandlerVersion value to set + * @return the MachineExtensionInstanceView object itself. + */ + public MachineExtensionInstanceView withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get instance view status. + * + * @return the status value + */ + public MachineExtensionInstanceViewStatus status() { + return this.status; + } + + /** + * Set instance view status. + * + * @param status the status value to set + * @return the MachineExtensionInstanceView object itself. + */ + public MachineExtensionInstanceView withStatus(MachineExtensionInstanceViewStatus status) { + this.status = status; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionInstanceViewStatus.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionInstanceViewStatus.java new file mode 100644 index 0000000000000..5e68917a294bd --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionInstanceViewStatus.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Instance view status. + */ +public class MachineExtensionInstanceViewStatus { + /** + * The status code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The level code. Possible values include: 'Info', 'Warning', 'Error'. + */ + @JsonProperty(value = "level") + private StatusLevelTypes level; + + /** + * The short localizable label for the status. + */ + @JsonProperty(value = "displayStatus") + private String displayStatus; + + /** + * The detailed status message, including for alerts and error messages. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The time of the status. + */ + @JsonProperty(value = "time") + private DateTime time; + + /** + * Get the status code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the status code. + * + * @param code the code value to set + * @return the MachineExtensionInstanceViewStatus object itself. + */ + public MachineExtensionInstanceViewStatus withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the level code. Possible values include: 'Info', 'Warning', 'Error'. + * + * @return the level value + */ + public StatusLevelTypes level() { + return this.level; + } + + /** + * Set the level code. Possible values include: 'Info', 'Warning', 'Error'. + * + * @param level the level value to set + * @return the MachineExtensionInstanceViewStatus object itself. + */ + public MachineExtensionInstanceViewStatus withLevel(StatusLevelTypes level) { + this.level = level; + return this; + } + + /** + * Get the short localizable label for the status. + * + * @return the displayStatus value + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Set the short localizable label for the status. + * + * @param displayStatus the displayStatus value to set + * @return the MachineExtensionInstanceViewStatus object itself. + */ + public MachineExtensionInstanceViewStatus withDisplayStatus(String displayStatus) { + this.displayStatus = displayStatus; + return this; + } + + /** + * Get the detailed status message, including for alerts and error messages. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the detailed status message, including for alerts and error messages. + * + * @param message the message value to set + * @return the MachineExtensionInstanceViewStatus object itself. + */ + public MachineExtensionInstanceViewStatus withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the time of the status. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Set the time of the status. + * + * @param time the time value to set + * @return the MachineExtensionInstanceViewStatus object itself. + */ + public MachineExtensionInstanceViewStatus withTime(DateTime time) { + this.time = time; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionPropertiesInstanceView.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionPropertiesInstanceView.java new file mode 100644 index 0000000000000..a7fbafd29be33 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionPropertiesInstanceView.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + + +/** + * The machine extension instance view. + */ +public class MachineExtensionPropertiesInstanceView extends MachineExtensionInstanceView { +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionPropertiesModel.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionPropertiesModel.java new file mode 100644 index 0000000000000..91410feba3ff6 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionPropertiesModel.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a Machine Extension. + */ +public class MachineExtensionPropertiesModel { + /** + * How the extension handler should be forced to update even if the + * extension configuration has not changed. + */ + @JsonProperty(value = "forceUpdateTag") + private String forceUpdateTag; + + /** + * The name of the extension handler publisher. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * Specifies the type of the extension; an example is + * "CustomScriptExtension". + */ + @JsonProperty(value = "type") + private String type; + + /** + * Specifies the version of the script handler. + */ + @JsonProperty(value = "typeHandlerVersion") + private String typeHandlerVersion; + + /** + * Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension + * will not upgrade minor versions unless redeployed, even with this + * property set to true. + */ + @JsonProperty(value = "autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /** + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "settings") + private Object settings; + + /** + * The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + */ + @JsonProperty(value = "protectedSettings") + private Object protectedSettings; + + /** + * The provisioning state, which only appears in the response. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The machine extension instance view. + */ + @JsonProperty(value = "instanceView") + private MachineExtensionPropertiesInstanceView instanceView; + + /** + * Get how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @return the forceUpdateTag value + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set + * @return the MachineExtensionPropertiesModel object itself. + */ + public MachineExtensionPropertiesModel withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the name of the extension handler publisher. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the name of the extension handler publisher. + * + * @param publisher the publisher value to set + * @return the MachineExtensionPropertiesModel object itself. + */ + public MachineExtensionPropertiesModel withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param type the type value to set + * @return the MachineExtensionPropertiesModel object itself. + */ + public MachineExtensionPropertiesModel withType(String type) { + this.type = type; + return this; + } + + /** + * Get specifies the version of the script handler. + * + * @return the typeHandlerVersion value + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set specifies the version of the script handler. + * + * @param typeHandlerVersion the typeHandlerVersion value to set + * @return the MachineExtensionPropertiesModel object itself. + */ + public MachineExtensionPropertiesModel withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set + * @return the MachineExtensionPropertiesModel object itself. + */ + public MachineExtensionPropertiesModel withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get json formatted public settings for the extension. + * + * @return the settings value + */ + public Object settings() { + return this.settings; + } + + /** + * Set json formatted public settings for the extension. + * + * @param settings the settings value to set + * @return the MachineExtensionPropertiesModel object itself. + */ + public MachineExtensionPropertiesModel withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @return the protectedSettings value + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @param protectedSettings the protectedSettings value to set + * @return the MachineExtensionPropertiesModel object itself. + */ + public MachineExtensionPropertiesModel withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + + /** + * Get the provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the machine extension instance view. + * + * @return the instanceView value + */ + public MachineExtensionPropertiesInstanceView instanceView() { + return this.instanceView; + } + + /** + * Set the machine extension instance view. + * + * @param instanceView the instanceView value to set + * @return the MachineExtensionPropertiesModel object itself. + */ + public MachineExtensionPropertiesModel withInstanceView(MachineExtensionPropertiesInstanceView instanceView) { + this.instanceView = instanceView; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionUpdate.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionUpdate.java new file mode 100644 index 0000000000000..4da02ef426a3e --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionUpdate.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes a Machine Extension Update. + */ +@JsonFlatten +public class MachineExtensionUpdate extends UpdateResource { + /** + * How the extension handler should be forced to update even if the + * extension configuration has not changed. + */ + @JsonProperty(value = "properties.forceUpdateTag") + private String forceUpdateTag; + + /** + * The name of the extension handler publisher. + */ + @JsonProperty(value = "properties.publisher") + private String publisher; + + /** + * Specifies the type of the extension; an example is + * "CustomScriptExtension". + */ + @JsonProperty(value = "properties.type") + private String type; + + /** + * Specifies the version of the script handler. + */ + @JsonProperty(value = "properties.typeHandlerVersion") + private String typeHandlerVersion; + + /** + * Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension + * will not upgrade minor versions unless redeployed, even with this + * property set to true. + */ + @JsonProperty(value = "properties.autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /** + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "properties.settings") + private Object settings; + + /** + * The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + */ + @JsonProperty(value = "properties.protectedSettings") + private Object protectedSettings; + + /** + * Get how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @return the forceUpdateTag value + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set + * @return the MachineExtensionUpdate object itself. + */ + public MachineExtensionUpdate withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the name of the extension handler publisher. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the name of the extension handler publisher. + * + * @param publisher the publisher value to set + * @return the MachineExtensionUpdate object itself. + */ + public MachineExtensionUpdate withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param type the type value to set + * @return the MachineExtensionUpdate object itself. + */ + public MachineExtensionUpdate withType(String type) { + this.type = type; + return this; + } + + /** + * Get specifies the version of the script handler. + * + * @return the typeHandlerVersion value + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set specifies the version of the script handler. + * + * @param typeHandlerVersion the typeHandlerVersion value to set + * @return the MachineExtensionUpdate object itself. + */ + public MachineExtensionUpdate withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set + * @return the MachineExtensionUpdate object itself. + */ + public MachineExtensionUpdate withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get json formatted public settings for the extension. + * + * @return the settings value + */ + public Object settings() { + return this.settings; + } + + /** + * Set json formatted public settings for the extension. + * + * @param settings the settings value to set + * @return the MachineExtensionUpdate object itself. + */ + public MachineExtensionUpdate withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @return the protectedSettings value + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @param protectedSettings the protectedSettings value to set + * @return the MachineExtensionUpdate object itself. + */ + public MachineExtensionUpdate withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionUpdatePropertiesModel.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionUpdatePropertiesModel.java new file mode 100644 index 0000000000000..4d566b9397cc3 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensionUpdatePropertiesModel.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a Machine Extension. + */ +public class MachineExtensionUpdatePropertiesModel { + /** + * How the extension handler should be forced to update even if the + * extension configuration has not changed. + */ + @JsonProperty(value = "forceUpdateTag") + private String forceUpdateTag; + + /** + * The name of the extension handler publisher. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * Specifies the type of the extension; an example is + * "CustomScriptExtension". + */ + @JsonProperty(value = "type") + private String type; + + /** + * Specifies the version of the script handler. + */ + @JsonProperty(value = "typeHandlerVersion") + private String typeHandlerVersion; + + /** + * Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension + * will not upgrade minor versions unless redeployed, even with this + * property set to true. + */ + @JsonProperty(value = "autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /** + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "settings") + private Object settings; + + /** + * The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + */ + @JsonProperty(value = "protectedSettings") + private Object protectedSettings; + + /** + * Get how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @return the forceUpdateTag value + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set + * @return the MachineExtensionUpdatePropertiesModel object itself. + */ + public MachineExtensionUpdatePropertiesModel withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the name of the extension handler publisher. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the name of the extension handler publisher. + * + * @param publisher the publisher value to set + * @return the MachineExtensionUpdatePropertiesModel object itself. + */ + public MachineExtensionUpdatePropertiesModel withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param type the type value to set + * @return the MachineExtensionUpdatePropertiesModel object itself. + */ + public MachineExtensionUpdatePropertiesModel withType(String type) { + this.type = type; + return this; + } + + /** + * Get specifies the version of the script handler. + * + * @return the typeHandlerVersion value + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set specifies the version of the script handler. + * + * @param typeHandlerVersion the typeHandlerVersion value to set + * @return the MachineExtensionUpdatePropertiesModel object itself. + */ + public MachineExtensionUpdatePropertiesModel withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set + * @return the MachineExtensionUpdatePropertiesModel object itself. + */ + public MachineExtensionUpdatePropertiesModel withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get json formatted public settings for the extension. + * + * @return the settings value + */ + public Object settings() { + return this.settings; + } + + /** + * Set json formatted public settings for the extension. + * + * @param settings the settings value to set + * @return the MachineExtensionUpdatePropertiesModel object itself. + */ + public MachineExtensionUpdatePropertiesModel withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @return the protectedSettings value + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @param protectedSettings the protectedSettings value to set + * @return the MachineExtensionUpdatePropertiesModel object itself. + */ + public MachineExtensionUpdatePropertiesModel withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensions.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensions.java new file mode 100644 index 0000000000000..cb6137eb7d5af --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineExtensions.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.MachineExtensionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing MachineExtensions. + */ +public interface MachineExtensions extends SupportsCreating, HasInner { + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String name, String extensionName); + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String name); + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String name, String extensionName); + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineIdentity.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineIdentity.java new file mode 100644 index 0000000000000..db54e0f754bad --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineIdentity.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + + +/** + * The MachineIdentity model. + */ +public class MachineIdentity extends Identity { +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineProperties.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineProperties.java new file mode 100644 index 0000000000000..22cf25ae58506 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineProperties.java @@ -0,0 +1,361 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a hybrid machine. + */ +public class MachineProperties { + /** + * The locationData property. + */ + @JsonProperty(value = "locationData") + private LocationData locationData; + + /** + * Specifies the operating system settings for the hybrid machine. + */ + @JsonProperty(value = "osProfile") + private MachinePropertiesOsProfile osProfile; + + /** + * The provisioning state, which only appears in the response. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The status of the hybrid machine agent. Possible values include: + * 'Connected', 'Disconnected', 'Error'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private StatusTypes status; + + /** + * The time of the last status change. + */ + @JsonProperty(value = "lastStatusChange", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastStatusChange; + + /** + * Details about the error state. + */ + @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY) + private List errorDetails; + + /** + * The hybrid machine agent full version. + */ + @JsonProperty(value = "agentVersion", access = JsonProperty.Access.WRITE_ONLY) + private String agentVersion; + + /** + * Specifies the hybrid machine unique ID. + */ + @JsonProperty(value = "vmId") + private String vmId; + + /** + * Specifies the hybrid machine display name. + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /** + * Specifies the hybrid machine FQDN. + */ + @JsonProperty(value = "machineFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String machineFqdn; + + /** + * Public Key that the client provides to be used during initial resource + * onboarding. + */ + @JsonProperty(value = "clientPublicKey") + private String clientPublicKey; + + /** + * The Operating System running on the hybrid machine. + */ + @JsonProperty(value = "osName", access = JsonProperty.Access.WRITE_ONLY) + private String osName; + + /** + * The version of Operating System running on the hybrid machine. + */ + @JsonProperty(value = "osVersion", access = JsonProperty.Access.WRITE_ONLY) + private String osVersion; + + /** + * Specifies the Arc Machine's unique SMBIOS ID. + */ + @JsonProperty(value = "vmUuid", access = JsonProperty.Access.WRITE_ONLY) + private String vmUuid; + + /** + * Machine Extensions information. + */ + @JsonProperty(value = "extensions") + private List extensions; + + /** + * Specifies the Operating System product SKU. + */ + @JsonProperty(value = "osSku", access = JsonProperty.Access.WRITE_ONLY) + private String osSku; + + /** + * Specifies the Windows domain name. + */ + @JsonProperty(value = "domainName", access = JsonProperty.Access.WRITE_ONLY) + private String domainName; + + /** + * Specifies the AD fully qualified display name. + */ + @JsonProperty(value = "adFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String adFqdn; + + /** + * Specifies the DNS fully qualified display name. + */ + @JsonProperty(value = "dnsFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String dnsFqdn; + + /** + * Get the locationData value. + * + * @return the locationData value + */ + public LocationData locationData() { + return this.locationData; + } + + /** + * Set the locationData value. + * + * @param locationData the locationData value to set + * @return the MachineProperties object itself. + */ + public MachineProperties withLocationData(LocationData locationData) { + this.locationData = locationData; + return this; + } + + /** + * Get specifies the operating system settings for the hybrid machine. + * + * @return the osProfile value + */ + public MachinePropertiesOsProfile osProfile() { + return this.osProfile; + } + + /** + * Set specifies the operating system settings for the hybrid machine. + * + * @param osProfile the osProfile value to set + * @return the MachineProperties object itself. + */ + public MachineProperties withOsProfile(MachinePropertiesOsProfile osProfile) { + this.osProfile = osProfile; + return this; + } + + /** + * Get the provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the status of the hybrid machine agent. Possible values include: 'Connected', 'Disconnected', 'Error'. + * + * @return the status value + */ + public StatusTypes status() { + return this.status; + } + + /** + * Get the time of the last status change. + * + * @return the lastStatusChange value + */ + public DateTime lastStatusChange() { + return this.lastStatusChange; + } + + /** + * Get details about the error state. + * + * @return the errorDetails value + */ + public List errorDetails() { + return this.errorDetails; + } + + /** + * Get the hybrid machine agent full version. + * + * @return the agentVersion value + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Get specifies the hybrid machine unique ID. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set specifies the hybrid machine unique ID. + * + * @param vmId the vmId value to set + * @return the MachineProperties object itself. + */ + public MachineProperties withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get specifies the hybrid machine display name. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get specifies the hybrid machine FQDN. + * + * @return the machineFqdn value + */ + public String machineFqdn() { + return this.machineFqdn; + } + + /** + * Get public Key that the client provides to be used during initial resource onboarding. + * + * @return the clientPublicKey value + */ + public String clientPublicKey() { + return this.clientPublicKey; + } + + /** + * Set public Key that the client provides to be used during initial resource onboarding. + * + * @param clientPublicKey the clientPublicKey value to set + * @return the MachineProperties object itself. + */ + public MachineProperties withClientPublicKey(String clientPublicKey) { + this.clientPublicKey = clientPublicKey; + return this; + } + + /** + * Get the Operating System running on the hybrid machine. + * + * @return the osName value + */ + public String osName() { + return this.osName; + } + + /** + * Get the version of Operating System running on the hybrid machine. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Get specifies the Arc Machine's unique SMBIOS ID. + * + * @return the vmUuid value + */ + public String vmUuid() { + return this.vmUuid; + } + + /** + * Get machine Extensions information. + * + * @return the extensions value + */ + public List extensions() { + return this.extensions; + } + + /** + * Set machine Extensions information. + * + * @param extensions the extensions value to set + * @return the MachineProperties object itself. + */ + public MachineProperties withExtensions(List extensions) { + this.extensions = extensions; + return this; + } + + /** + * Get specifies the Operating System product SKU. + * + * @return the osSku value + */ + public String osSku() { + return this.osSku; + } + + /** + * Get specifies the Windows domain name. + * + * @return the domainName value + */ + public String domainName() { + return this.domainName; + } + + /** + * Get specifies the AD fully qualified display name. + * + * @return the adFqdn value + */ + public String adFqdn() { + return this.adFqdn; + } + + /** + * Get specifies the DNS fully qualified display name. + * + * @return the dnsFqdn value + */ + public String dnsFqdn() { + return this.dnsFqdn; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachinePropertiesOsProfile.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachinePropertiesOsProfile.java new file mode 100644 index 0000000000000..5b46196143606 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachinePropertiesOsProfile.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + + +/** + * Specifies the operating system settings for the hybrid machine. + */ +public class MachinePropertiesOsProfile extends OSProfile { +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineUpdate.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineUpdate.java new file mode 100644 index 0000000000000..0900a0fd1a947 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineUpdate.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes a hybrid machine Update. + */ +@JsonFlatten +public class MachineUpdate extends UpdateResource { + /** + * The identity type. + */ + @JsonProperty(value = "identity.type") + private String type; + + /** + * The identity's principal id. + */ + @JsonProperty(value = "identity.principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The identity's tenant id. + */ + @JsonProperty(value = "identity.tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * The locationData property. + */ + @JsonProperty(value = "properties.locationData") + private LocationData locationData; + + /** + * Get the identity type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the identity type. + * + * @param type the type value to set + * @return the MachineUpdate object itself. + */ + public MachineUpdate withType(String type) { + this.type = type; + return this; + } + + /** + * Get the identity's principal id. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the identity's tenant id. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the locationData value. + * + * @return the locationData value + */ + public LocationData locationData() { + return this.locationData; + } + + /** + * Set the locationData value. + * + * @param locationData the locationData value to set + * @return the MachineUpdate object itself. + */ + public MachineUpdate withLocationData(LocationData locationData) { + this.locationData = locationData; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineUpdateProperties.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineUpdateProperties.java new file mode 100644 index 0000000000000..aab053589affe --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/MachineUpdateProperties.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the ARM updatable properties of a hybrid machine. + */ +public class MachineUpdateProperties { + /** + * The locationData property. + */ + @JsonProperty(value = "locationData") + private LocationData locationData; + + /** + * Get the locationData value. + * + * @return the locationData value + */ + public LocationData locationData() { + return this.locationData; + } + + /** + * Set the locationData value. + * + * @param locationData the locationData value to set + * @return the MachineUpdateProperties object itself. + */ + public MachineUpdateProperties withLocationData(LocationData locationData) { + this.locationData = locationData; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Machines.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Machines.java new file mode 100644 index 0000000000000..0e273ac89ebe4 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Machines.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.MachinesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Machines. + */ +public interface Machines extends SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OSProfile.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OSProfile.java new file mode 100644 index 0000000000000..fc98855609262 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OSProfile.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifies the operating system settings for the hybrid machine. + */ +public class OSProfile { + /** + * Specifies the host OS name of the hybrid machine. + */ + @JsonProperty(value = "computerName", access = JsonProperty.Access.WRITE_ONLY) + private String computerName; + + /** + * Get specifies the host OS name of the hybrid machine. + * + * @return the computerName value + */ + public String computerName() { + return this.computerName; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OperationValue.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OperationValue.java new file mode 100644 index 0000000000000..8a51adc4eeb2e --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OperationValue.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.HybridComputeManager; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.OperationValueInner; + +/** + * Type representing OperationValue. + */ +public interface OperationValue extends HasInner, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the operation value. + */ + String operation(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the provider value. + */ + String provider(); + + /** + * @return the resource value. + */ + String resource(); + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OperationValueDisplayModel.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OperationValueDisplayModel.java new file mode 100644 index 0000000000000..506a891b6b994 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/OperationValueDisplayModel.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a Hybrid Compute Operation Value Display. + */ +public class OperationValueDisplayModel { + /** + * The display name of the compute operation. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * The display name of the resource the operation applies to. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * The description of the operation. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * The resource provider for the operation. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Get the display name of the compute operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get the display name of the resource the operation applies to. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get the description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get the resource provider for the operation. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Operations.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Operations.java new file mode 100644 index 0000000000000..a6a930bc38ba8 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/Operations.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import rx.Observable; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Gets a list of hybrid compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/StatusLevelTypes.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/StatusLevelTypes.java new file mode 100644 index 0000000000000..5cc425f0726e6 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/StatusLevelTypes.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for StatusLevelTypes. + */ +public final class StatusLevelTypes extends ExpandableStringEnum { + /** Static value Info for StatusLevelTypes. */ + public static final StatusLevelTypes INFO = fromString("Info"); + + /** Static value Warning for StatusLevelTypes. */ + public static final StatusLevelTypes WARNING = fromString("Warning"); + + /** Static value Error for StatusLevelTypes. */ + public static final StatusLevelTypes ERROR = fromString("Error"); + + /** + * Creates or finds a StatusLevelTypes from its string representation. + * @param name a name to look for + * @return the corresponding StatusLevelTypes + */ + @JsonCreator + public static StatusLevelTypes fromString(String name) { + return fromString(name, StatusLevelTypes.class); + } + + /** + * @return known StatusLevelTypes values + */ + public static Collection values() { + return values(StatusLevelTypes.class); + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/StatusTypes.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/StatusTypes.java new file mode 100644 index 0000000000000..46bc29c2199e4 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/StatusTypes.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for StatusTypes. + */ +public final class StatusTypes extends ExpandableStringEnum { + /** Static value Connected for StatusTypes. */ + public static final StatusTypes CONNECTED = fromString("Connected"); + + /** Static value Disconnected for StatusTypes. */ + public static final StatusTypes DISCONNECTED = fromString("Disconnected"); + + /** Static value Error for StatusTypes. */ + public static final StatusTypes ERROR = fromString("Error"); + + /** + * Creates or finds a StatusTypes from its string representation. + * @param name a name to look for + * @return the corresponding StatusTypes + */ + @JsonCreator + public static StatusTypes fromString(String name) { + return fromString(name, StatusTypes.class); + } + + /** + * @return known StatusTypes values + */ + public static Collection values() { + return values(StatusTypes.class); + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/UpdateResource.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/UpdateResource.java new file mode 100644 index 0000000000000..7bc6876aa9f67 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/UpdateResource.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Update Resource model definition. + */ +public class UpdateResource { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the UpdateResource object itself. + */ + public UpdateResource withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/HybridComputeManagementClientImpl.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/HybridComputeManagementClientImpl.java new file mode 100644 index 0000000000000..244b3d59aff4f --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/HybridComputeManagementClientImpl.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the HybridComputeManagementClientImpl class. + */ +public class HybridComputeManagementClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public HybridComputeManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public HybridComputeManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public HybridComputeManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public HybridComputeManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The MachinesInner object to access its operations. + */ + private MachinesInner machines; + + /** + * Gets the MachinesInner object to access its operations. + * @return the MachinesInner object. + */ + public MachinesInner machines() { + return this.machines; + } + + /** + * The MachineExtensionsInner object to access its operations. + */ + private MachineExtensionsInner machineExtensions; + + /** + * Gets the MachineExtensionsInner object to access its operations. + * @return the MachineExtensionsInner object. + */ + public MachineExtensionsInner machineExtensions() { + return this.machineExtensions; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * Initializes an instance of HybridComputeManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public HybridComputeManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of HybridComputeManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public HybridComputeManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of HybridComputeManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public HybridComputeManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2020-08-02"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.machines = new MachinesInner(restClient().retrofit(), this); + this.machineExtensions = new MachineExtensionsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "HybridComputeManagementClient", "2020-08-02"); + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/HybridComputeManager.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/HybridComputeManager.java new file mode 100644 index 0000000000000..aa0a565c1a516 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/HybridComputeManager.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.Machines; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.Operations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure HybridCompute resource management. + */ +public final class HybridComputeManager extends ManagerCore { + private Machines machines; + private MachineExtensions machineExtensions; + private Operations operations; + /** + * Get a Configurable instance that can be used to create HybridComputeManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new HybridComputeManager.ConfigurableImpl(); + } + /** + * Creates an instance of HybridComputeManager that exposes HybridCompute resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the HybridComputeManager + */ + public static HybridComputeManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new HybridComputeManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of HybridComputeManager that exposes HybridCompute resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the HybridComputeManager + */ + public static HybridComputeManager authenticate(RestClient restClient, String subscriptionId) { + return new HybridComputeManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of HybridComputeManager that exposes HybridCompute management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing HybridCompute management API entry points that work across subscriptions + */ + HybridComputeManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Machines. + */ + public Machines machines() { + if (this.machines == null) { + this.machines = new MachinesImpl(this); + } + return this.machines; + } + + /** + * @return Entry point to manage MachineExtensions. + */ + public MachineExtensions machineExtensions() { + if (this.machineExtensions == null) { + this.machineExtensions = new MachineExtensionsImpl(this); + } + return this.machineExtensions; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public HybridComputeManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return HybridComputeManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private HybridComputeManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new HybridComputeManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/IdParsingUtils.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..8d3499ff7cc97 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionImpl.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionImpl.java new file mode 100644 index 0000000000000..2df159b71f132 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionImpl.java @@ -0,0 +1,267 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtension; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensionUpdate; +import java.util.Map; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensionPropertiesInstanceView; +import rx.functions.Func1; + +class MachineExtensionImpl extends CreatableUpdatableImpl implements MachineExtension, MachineExtension.Definition, MachineExtension.Update { + private final HybridComputeManager manager; + private String resourceGroupName; + private String name; + private String extensionName; + private MachineExtensionUpdate updateParameter; + + MachineExtensionImpl(String name, HybridComputeManager manager) { + super(name, new MachineExtensionInner()); + this.manager = manager; + // Set resource name + this.extensionName = name; + // + this.updateParameter = new MachineExtensionUpdate(); + } + + MachineExtensionImpl(MachineExtensionInner inner, HybridComputeManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.extensionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "machines"); + this.extensionName = IdParsingUtils.getValueFromIdByName(inner.id(), "extensions"); + // + this.updateParameter = new MachineExtensionUpdate(); + } + + @Override + public HybridComputeManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + MachineExtensionsInner client = this.manager().inner().machineExtensions(); + return client.createOrUpdateAsync(this.resourceGroupName, this.name, this.extensionName, this.inner()) + .map(new Func1() { + @Override + public MachineExtensionInner call(MachineExtensionInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + MachineExtensionsInner client = this.manager().inner().machineExtensions(); + return client.updateAsync(this.resourceGroupName, this.name, this.extensionName, this.updateParameter) + .map(new Func1() { + @Override + public MachineExtensionInner call(MachineExtensionInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + MachineExtensionsInner client = this.manager().inner().machineExtensions(); + return client.getAsync(this.resourceGroupName, this.name, this.extensionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new MachineExtensionUpdate(); + } + + @Override + public Boolean autoUpgradeMinorVersion() { + return this.inner().autoUpgradeMinorVersion(); + } + + @Override + public String forceUpdateTag() { + return this.inner().forceUpdateTag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public MachineExtensionPropertiesInstanceView instanceView() { + return this.inner().instanceView(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String machineExtensionType() { + return this.inner().machineExtensionType(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Object protectedSettings() { + return this.inner().protectedSettings(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String publisher() { + return this.inner().publisher(); + } + + @Override + public Object settings() { + return this.inner().settings(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String typeHandlerVersion() { + return this.inner().typeHandlerVersion(); + } + + @Override + public MachineExtensionImpl withExistingMachine(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public MachineExtensionImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public MachineExtensionImpl withInstanceView(MachineExtensionPropertiesInstanceView instanceView) { + this.inner().withInstanceView(instanceView); + return this; + } + + @Override + public MachineExtensionImpl withMachineExtensionType(String machineExtensionType) { + this.inner().withMachineExtensionType(machineExtensionType); + return this; + } + + @Override + public MachineExtensionImpl withType(String type) { + this.updateParameter.withType(type); + return this; + } + + @Override + public MachineExtensionImpl withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + if (isInCreateMode()) { + this.inner().withAutoUpgradeMinorVersion(autoUpgradeMinorVersion); + } else { + this.updateParameter.withAutoUpgradeMinorVersion(autoUpgradeMinorVersion); + } + return this; + } + + @Override + public MachineExtensionImpl withForceUpdateTag(String forceUpdateTag) { + if (isInCreateMode()) { + this.inner().withForceUpdateTag(forceUpdateTag); + } else { + this.updateParameter.withForceUpdateTag(forceUpdateTag); + } + return this; + } + + @Override + public MachineExtensionImpl withProtectedSettings(Object protectedSettings) { + if (isInCreateMode()) { + this.inner().withProtectedSettings(protectedSettings); + } else { + this.updateParameter.withProtectedSettings(protectedSettings); + } + return this; + } + + @Override + public MachineExtensionImpl withPublisher(String publisher) { + if (isInCreateMode()) { + this.inner().withPublisher(publisher); + } else { + this.updateParameter.withPublisher(publisher); + } + return this; + } + + @Override + public MachineExtensionImpl withSettings(Object settings) { + if (isInCreateMode()) { + this.inner().withSettings(settings); + } else { + this.updateParameter.withSettings(settings); + } + return this; + } + + @Override + public MachineExtensionImpl withTags(Map tags) { + if (isInCreateMode()) { + this.inner().withTags(tags); + } else { + this.updateParameter.withTags(tags); + } + return this; + } + + @Override + public MachineExtensionImpl withTypeHandlerVersion(String typeHandlerVersion) { + if (isInCreateMode()) { + this.inner().withTypeHandlerVersion(typeHandlerVersion); + } else { + this.updateParameter.withTypeHandlerVersion(typeHandlerVersion); + } + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionInner.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionInner.java new file mode 100644 index 0000000000000..88fb779be56ba --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionInner.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensionPropertiesInstanceView; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Describes a Machine Extension. + */ +@JsonFlatten +public class MachineExtensionInner extends Resource { + /** + * How the extension handler should be forced to update even if the + * extension configuration has not changed. + */ + @JsonProperty(value = "properties.forceUpdateTag") + private String forceUpdateTag; + + /** + * The name of the extension handler publisher. + */ + @JsonProperty(value = "properties.publisher") + private String publisher; + + /** + * Specifies the type of the extension; an example is + * "CustomScriptExtension". + */ + @JsonProperty(value = "properties.type") + private String machineExtensionType; + + /** + * Specifies the version of the script handler. + */ + @JsonProperty(value = "properties.typeHandlerVersion") + private String typeHandlerVersion; + + /** + * Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension + * will not upgrade minor versions unless redeployed, even with this + * property set to true. + */ + @JsonProperty(value = "properties.autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /** + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "properties.settings") + private Object settings; + + /** + * The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + */ + @JsonProperty(value = "properties.protectedSettings") + private Object protectedSettings; + + /** + * The provisioning state, which only appears in the response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The machine extension instance view. + */ + @JsonProperty(value = "properties.instanceView") + private MachineExtensionPropertiesInstanceView instanceView; + + /** + * Get how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @return the forceUpdateTag value + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set + * @return the MachineExtensionInner object itself. + */ + public MachineExtensionInner withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the name of the extension handler publisher. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the name of the extension handler publisher. + * + * @param publisher the publisher value to set + * @return the MachineExtensionInner object itself. + */ + public MachineExtensionInner withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the machineExtensionType value + */ + public String machineExtensionType() { + return this.machineExtensionType; + } + + /** + * Set specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param machineExtensionType the machineExtensionType value to set + * @return the MachineExtensionInner object itself. + */ + public MachineExtensionInner withMachineExtensionType(String machineExtensionType) { + this.machineExtensionType = machineExtensionType; + return this; + } + + /** + * Get specifies the version of the script handler. + * + * @return the typeHandlerVersion value + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set specifies the version of the script handler. + * + * @param typeHandlerVersion the typeHandlerVersion value to set + * @return the MachineExtensionInner object itself. + */ + public MachineExtensionInner withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set + * @return the MachineExtensionInner object itself. + */ + public MachineExtensionInner withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get json formatted public settings for the extension. + * + * @return the settings value + */ + public Object settings() { + return this.settings; + } + + /** + * Set json formatted public settings for the extension. + * + * @param settings the settings value to set + * @return the MachineExtensionInner object itself. + */ + public MachineExtensionInner withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @return the protectedSettings value + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @param protectedSettings the protectedSettings value to set + * @return the MachineExtensionInner object itself. + */ + public MachineExtensionInner withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + + /** + * Get the provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the machine extension instance view. + * + * @return the instanceView value + */ + public MachineExtensionPropertiesInstanceView instanceView() { + return this.instanceView; + } + + /** + * Set the machine extension instance view. + * + * @param instanceView the instanceView value to set + * @return the MachineExtensionInner object itself. + */ + public MachineExtensionInner withInstanceView(MachineExtensionPropertiesInstanceView instanceView) { + this.instanceView = instanceView; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionsImpl.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionsImpl.java new file mode 100644 index 0000000000000..f99b6133c59b3 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtension; + +class MachineExtensionsImpl extends WrapperImpl implements MachineExtensions { + private final HybridComputeManager manager; + + MachineExtensionsImpl(HybridComputeManager manager) { + super(manager.inner().machineExtensions()); + this.manager = manager; + } + + public HybridComputeManager manager() { + return this.manager; + } + + @Override + public MachineExtensionImpl define(String name) { + return wrapModel(name); + } + + private MachineExtensionImpl wrapModel(MachineExtensionInner inner) { + return new MachineExtensionImpl(inner, manager()); + } + + private MachineExtensionImpl wrapModel(String name) { + return new MachineExtensionImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String name) { + MachineExtensionsInner client = this.inner(); + return client.listAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public MachineExtension call(MachineExtensionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String name, String extensionName) { + MachineExtensionsInner client = this.inner(); + return client.getAsync(resourceGroupName, name, extensionName) + .flatMap(new Func1>() { + @Override + public Observable call(MachineExtensionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((MachineExtension)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String name, String extensionName) { + MachineExtensionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name, extensionName).toCompletable(); + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionsInner.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionsInner.java new file mode 100644 index 0000000000000..2743bb2b571eb --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineExtensionsInner.java @@ -0,0 +1,1094 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensionUpdate; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MachineExtensions. + */ +public class MachineExtensionsInner { + /** The Retrofit service to perform REST calls. */ + private MachineExtensionsService service; + /** The service client containing this operation class. */ + private HybridComputeManagementClientImpl client; + + /** + * Initializes an instance of MachineExtensionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MachineExtensionsInner(Retrofit retrofit, HybridComputeManagementClientImpl client) { + this.service = retrofit.create(MachineExtensionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for MachineExtensions to be + * used by Retrofit to perform actually REST calls. + */ + interface MachineExtensionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("extensionName") String extensionName, @Path("subscriptionId") String subscriptionId, @Body MachineExtensionInner extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("extensionName") String extensionName, @Path("subscriptionId") String subscriptionId, @Body MachineExtensionInner extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("extensionName") String extensionName, @Path("subscriptionId") String subscriptionId, @Body MachineExtensionUpdate extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("extensionName") String extensionName, @Path("subscriptionId") String subscriptionId, @Body MachineExtensionUpdate extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("extensionName") String extensionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("extensionName") String extensionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("extensionName") String extensionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensions listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MachineExtensionInner object if successful. + */ + public MachineExtensionInner createOrUpdate(String resourceGroupName, String name, String extensionName, MachineExtensionInner extensionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters).toBlocking().last().body(); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, String extensionName, MachineExtensionInner extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String name, String extensionName, MachineExtensionInner extensionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters).map(new Func1, MachineExtensionInner>() { + @Override + public MachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, String extensionName, MachineExtensionInner extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (extensionName == null) { + throw new IllegalArgumentException("Parameter extensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(extensionParameters); + Observable> observable = service.createOrUpdate(resourceGroupName, name, extensionName, this.client.subscriptionId(), extensionParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MachineExtensionInner object if successful. + */ + public MachineExtensionInner beginCreateOrUpdate(String resourceGroupName, String name, String extensionName, MachineExtensionInner extensionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters).toBlocking().single().body(); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String name, String extensionName, MachineExtensionInner extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineExtensionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, String extensionName, MachineExtensionInner extensionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters).map(new Func1, MachineExtensionInner>() { + @Override + public MachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineExtensionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, String extensionName, MachineExtensionInner extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (extensionName == null) { + throw new IllegalArgumentException("Parameter extensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(extensionParameters); + return service.beginCreateOrUpdate(resourceGroupName, name, extensionName, this.client.subscriptionId(), extensionParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MachineExtensionInner object if successful. + */ + public MachineExtensionInner update(String resourceGroupName, String name, String extensionName, MachineExtensionUpdate extensionParameters) { + return updateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters).toBlocking().last().body(); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String name, String extensionName, MachineExtensionUpdate extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String name, String extensionName, MachineExtensionUpdate extensionParameters) { + return updateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters).map(new Func1, MachineExtensionInner>() { + @Override + public MachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, String extensionName, MachineExtensionUpdate extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (extensionName == null) { + throw new IllegalArgumentException("Parameter extensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(extensionParameters); + Observable> observable = service.update(resourceGroupName, name, extensionName, this.client.subscriptionId(), extensionParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MachineExtensionInner object if successful. + */ + public MachineExtensionInner beginUpdate(String resourceGroupName, String name, String extensionName, MachineExtensionUpdate extensionParameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters).toBlocking().single().body(); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String name, String extensionName, MachineExtensionUpdate extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineExtensionInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String name, String extensionName, MachineExtensionUpdate extensionParameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, name, extensionName, extensionParameters).map(new Func1, MachineExtensionInner>() { + @Override + public MachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to create or update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineExtensionInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String name, String extensionName, MachineExtensionUpdate extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (extensionName == null) { + throw new IllegalArgumentException("Parameter extensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(extensionParameters); + return service.beginUpdate(resourceGroupName, name, extensionName, this.client.subscriptionId(), extensionParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String name, String extensionName) { + deleteWithServiceResponseAsync(resourceGroupName, name, extensionName).toBlocking().last().body(); + } + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String name, String extensionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name, extensionName), serviceCallback); + } + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String name, String extensionName) { + return deleteWithServiceResponseAsync(resourceGroupName, name, extensionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name, String extensionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (extensionName == null) { + throw new IllegalArgumentException("Parameter extensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, name, extensionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String name, String extensionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, name, extensionName).toBlocking().single().body(); + } + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String name, String extensionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, name, extensionName), serviceCallback); + } + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String name, String extensionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, name, extensionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to delete the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String name, String extensionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (extensionName == null) { + throw new IllegalArgumentException("Parameter extensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, name, extensionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MachineExtensionInner object if successful. + */ + public MachineExtensionInner get(String resourceGroupName, String name, String extensionName) { + return getWithServiceResponseAsync(resourceGroupName, name, extensionName).toBlocking().single().body(); + } + + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String name, String extensionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, name, extensionName), serviceCallback); + } + + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineExtensionInner object + */ + public Observable getAsync(String resourceGroupName, String name, String extensionName) { + return getWithServiceResponseAsync(resourceGroupName, name, extensionName).map(new Func1, MachineExtensionInner>() { + @Override + public MachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineExtensionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String name, String extensionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (extensionName == null) { + throw new IllegalArgumentException("Parameter extensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, name, extensionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MachineExtensionInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String name) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineExtensionInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String name) { + return listWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineExtensionInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MachineExtensionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String expand = null; + return service.list(resourceGroupName, name, this.client.subscriptionId(), expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MachineExtensionInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String name, final String expand) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, name, expand).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String name, final String expand, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, name, expand), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineExtensionInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String name, final String expand) { + return listWithServiceResponseAsync(resourceGroupName, name, expand) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineExtensionInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String name, final String expand) { + return listSinglePageAsync(resourceGroupName, name, expand) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param name The name of the machine containing the extension. + ServiceResponse> * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MachineExtensionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String name, final String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(resourceGroupName, name, this.client.subscriptionId(), expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MachineExtensionInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineExtensionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineExtensionInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The operation to get all extensions of a non-Azure machine. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MachineExtensionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineImpl.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineImpl.java new file mode 100644 index 0000000000000..0395519e120be --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineImpl.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.Machine; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.ErrorDetail; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensionInstanceView; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineIdentity; +import org.joda.time.DateTime; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.LocationData; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachinePropertiesOsProfile; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.StatusTypes; + +class MachineImpl extends GroupableResourceCoreImpl implements Machine { + MachineImpl(String name, MachineInner inner, HybridComputeManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + MachinesInner client = this.manager().inner().machines(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + MachinesInner client = this.manager().inner().machines(); + return null; // NOP updateResourceAsync implementation as update is not supported + } + + @Override + protected Observable getInnerAsync() { + MachinesInner client = this.manager().inner().machines(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + + + @Override + public String adFqdn() { + return this.inner().adFqdn(); + } + + @Override + public String agentVersion() { + return this.inner().agentVersion(); + } + + @Override + public String clientPublicKey() { + return this.inner().clientPublicKey(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String dnsFqdn() { + return this.inner().dnsFqdn(); + } + + @Override + public String domainName() { + return this.inner().domainName(); + } + + @Override + public List errorDetails() { + return this.inner().errorDetails(); + } + + @Override + public List extensions() { + return this.inner().extensions(); + } + + @Override + public MachineIdentity identity() { + return this.inner().identity(); + } + + @Override + public DateTime lastStatusChange() { + return this.inner().lastStatusChange(); + } + + @Override + public LocationData locationData() { + return this.inner().locationData(); + } + + @Override + public String machineFqdn() { + return this.inner().machineFqdn(); + } + + @Override + public String osName() { + return this.inner().osName(); + } + + @Override + public MachinePropertiesOsProfile osProfile() { + return this.inner().osProfile(); + } + + @Override + public String osSku() { + return this.inner().osSku(); + } + + @Override + public String osVersion() { + return this.inner().osVersion(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public StatusTypes status() { + return this.inner().status(); + } + + @Override + public String vmId() { + return this.inner().vmId(); + } + + @Override + public String vmUuid() { + return this.inner().vmUuid(); + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineInner.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineInner.java new file mode 100644 index 0000000000000..a10aa02c025ef --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachineInner.java @@ -0,0 +1,396 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.management.hybridcompute.v2020_08_02.LocationData; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachinePropertiesOsProfile; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.StatusTypes; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.ErrorDetail; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineExtensionInstanceView; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.MachineIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Describes a hybrid machine. + */ +@JsonFlatten +public class MachineInner extends Resource { + /** + * The locationData property. + */ + @JsonProperty(value = "properties.locationData") + private LocationData locationData; + + /** + * Specifies the operating system settings for the hybrid machine. + */ + @JsonProperty(value = "properties.osProfile") + private MachinePropertiesOsProfile osProfile; + + /** + * The provisioning state, which only appears in the response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The status of the hybrid machine agent. Possible values include: + * 'Connected', 'Disconnected', 'Error'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private StatusTypes status; + + /** + * The time of the last status change. + */ + @JsonProperty(value = "properties.lastStatusChange", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastStatusChange; + + /** + * Details about the error state. + */ + @JsonProperty(value = "properties.errorDetails", access = JsonProperty.Access.WRITE_ONLY) + private List errorDetails; + + /** + * The hybrid machine agent full version. + */ + @JsonProperty(value = "properties.agentVersion", access = JsonProperty.Access.WRITE_ONLY) + private String agentVersion; + + /** + * Specifies the hybrid machine unique ID. + */ + @JsonProperty(value = "properties.vmId") + private String vmId; + + /** + * Specifies the hybrid machine display name. + */ + @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /** + * Specifies the hybrid machine FQDN. + */ + @JsonProperty(value = "properties.machineFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String machineFqdn; + + /** + * Public Key that the client provides to be used during initial resource + * onboarding. + */ + @JsonProperty(value = "properties.clientPublicKey") + private String clientPublicKey; + + /** + * The Operating System running on the hybrid machine. + */ + @JsonProperty(value = "properties.osName", access = JsonProperty.Access.WRITE_ONLY) + private String osName; + + /** + * The version of Operating System running on the hybrid machine. + */ + @JsonProperty(value = "properties.osVersion", access = JsonProperty.Access.WRITE_ONLY) + private String osVersion; + + /** + * Specifies the Arc Machine's unique SMBIOS ID. + */ + @JsonProperty(value = "properties.vmUuid", access = JsonProperty.Access.WRITE_ONLY) + private String vmUuid; + + /** + * Machine Extensions information. + */ + @JsonProperty(value = "properties.extensions") + private List extensions; + + /** + * Specifies the Operating System product SKU. + */ + @JsonProperty(value = "properties.osSku", access = JsonProperty.Access.WRITE_ONLY) + private String osSku; + + /** + * Specifies the Windows domain name. + */ + @JsonProperty(value = "properties.domainName", access = JsonProperty.Access.WRITE_ONLY) + private String domainName; + + /** + * Specifies the AD fully qualified display name. + */ + @JsonProperty(value = "properties.adFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String adFqdn; + + /** + * Specifies the DNS fully qualified display name. + */ + @JsonProperty(value = "properties.dnsFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String dnsFqdn; + + /** + * The identity property. + */ + @JsonProperty(value = "identity") + private MachineIdentity identity; + + /** + * Get the locationData value. + * + * @return the locationData value + */ + public LocationData locationData() { + return this.locationData; + } + + /** + * Set the locationData value. + * + * @param locationData the locationData value to set + * @return the MachineInner object itself. + */ + public MachineInner withLocationData(LocationData locationData) { + this.locationData = locationData; + return this; + } + + /** + * Get specifies the operating system settings for the hybrid machine. + * + * @return the osProfile value + */ + public MachinePropertiesOsProfile osProfile() { + return this.osProfile; + } + + /** + * Set specifies the operating system settings for the hybrid machine. + * + * @param osProfile the osProfile value to set + * @return the MachineInner object itself. + */ + public MachineInner withOsProfile(MachinePropertiesOsProfile osProfile) { + this.osProfile = osProfile; + return this; + } + + /** + * Get the provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the status of the hybrid machine agent. Possible values include: 'Connected', 'Disconnected', 'Error'. + * + * @return the status value + */ + public StatusTypes status() { + return this.status; + } + + /** + * Get the time of the last status change. + * + * @return the lastStatusChange value + */ + public DateTime lastStatusChange() { + return this.lastStatusChange; + } + + /** + * Get details about the error state. + * + * @return the errorDetails value + */ + public List errorDetails() { + return this.errorDetails; + } + + /** + * Get the hybrid machine agent full version. + * + * @return the agentVersion value + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Get specifies the hybrid machine unique ID. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Set specifies the hybrid machine unique ID. + * + * @param vmId the vmId value to set + * @return the MachineInner object itself. + */ + public MachineInner withVmId(String vmId) { + this.vmId = vmId; + return this; + } + + /** + * Get specifies the hybrid machine display name. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get specifies the hybrid machine FQDN. + * + * @return the machineFqdn value + */ + public String machineFqdn() { + return this.machineFqdn; + } + + /** + * Get public Key that the client provides to be used during initial resource onboarding. + * + * @return the clientPublicKey value + */ + public String clientPublicKey() { + return this.clientPublicKey; + } + + /** + * Set public Key that the client provides to be used during initial resource onboarding. + * + * @param clientPublicKey the clientPublicKey value to set + * @return the MachineInner object itself. + */ + public MachineInner withClientPublicKey(String clientPublicKey) { + this.clientPublicKey = clientPublicKey; + return this; + } + + /** + * Get the Operating System running on the hybrid machine. + * + * @return the osName value + */ + public String osName() { + return this.osName; + } + + /** + * Get the version of Operating System running on the hybrid machine. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Get specifies the Arc Machine's unique SMBIOS ID. + * + * @return the vmUuid value + */ + public String vmUuid() { + return this.vmUuid; + } + + /** + * Get machine Extensions information. + * + * @return the extensions value + */ + public List extensions() { + return this.extensions; + } + + /** + * Set machine Extensions information. + * + * @param extensions the extensions value to set + * @return the MachineInner object itself. + */ + public MachineInner withExtensions(List extensions) { + this.extensions = extensions; + return this; + } + + /** + * Get specifies the Operating System product SKU. + * + * @return the osSku value + */ + public String osSku() { + return this.osSku; + } + + /** + * Get specifies the Windows domain name. + * + * @return the domainName value + */ + public String domainName() { + return this.domainName; + } + + /** + * Get specifies the AD fully qualified display name. + * + * @return the adFqdn value + */ + public String adFqdn() { + return this.adFqdn; + } + + /** + * Get specifies the DNS fully qualified display name. + * + * @return the dnsFqdn value + */ + public String dnsFqdn() { + return this.dnsFqdn; + } + + /** + * Get the identity value. + * + * @return the identity value + */ + public MachineIdentity identity() { + return this.identity; + } + + /** + * Set the identity value. + * + * @param identity the identity value to set + * @return the MachineInner object itself. + */ + public MachineInner withIdentity(MachineIdentity identity) { + this.identity = identity; + return this; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachinesImpl.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachinesImpl.java new file mode 100644 index 0000000000000..b18365fe78a46 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachinesImpl.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.Machines; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.Machine; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class MachinesImpl extends GroupableResourcesCoreImpl implements Machines { + protected MachinesImpl(HybridComputeManager manager) { + super(manager.inner().machines(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + MachinesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + MachinesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + MachinesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + MachinesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Machine call(MachineInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + MachinesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + MachinesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Machine call(MachineInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + protected MachineImpl wrapModel(MachineInner inner) { + return new MachineImpl(inner.name(), inner, manager()); + } + + @Override + protected MachineImpl wrapModel(String name) { + return null; // Model is not creatable + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachinesInner.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachinesInner.java new file mode 100644 index 0000000000000..64fb59dd017bd --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/MachinesInner.java @@ -0,0 +1,791 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.ErrorResponseException; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.InstanceViewTypes; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Machines. + */ +public class MachinesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private MachinesService service; + /** The service client containing this operation class. */ + private HybridComputeManagementClientImpl client; + + /** + * Initializes an instance of MachinesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MachinesInner(Retrofit retrofit, HybridComputeManagementClientImpl client) { + this.service = retrofit.create(MachinesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Machines to be + * used by Retrofit to perform actually REST calls. + */ + interface MachinesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.Machines delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.Machines getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Query("api-version") String apiVersion, @Query("$expand") InstanceViewTypes expand, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.Machines listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.Machines list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.Machines listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.Machines listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * The operation to remove a hybrid machine identity in Azure. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @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 + */ + public void delete(String resourceGroupName, String name) { + deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * The operation to remove a hybrid machine identity in Azure. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * The operation to remove a hybrid machine identity in Azure. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to remove a hybrid machine identity in Azure. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @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 the MachineInner object if successful. + */ + public MachineInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, MachineInner>() { + @Override + public MachineInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String name) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final InstanceViewTypes expand = null; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' + * @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 the MachineInner object if successful. + */ + public MachineInner getByResourceGroup(String resourceGroupName, String name, InstanceViewTypes expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand).toBlocking().single().body(); + } + + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, InstanceViewTypes expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand), serviceCallback); + } + + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String name, InstanceViewTypes expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name, expand).map(new Func1, MachineInner>() { + @Override + public MachineInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MachineInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String name, InstanceViewTypes expand) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, name, this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. + * @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 the PagedList<MachineInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MachineInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @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 the PagedList<MachineInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MachineInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<MachineInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MachineInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<MachineInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MachineInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MachineInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationValueImpl.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationValueImpl.java new file mode 100644 index 0000000000000..03d3e984f219d --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationValueImpl.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.management.hybridcompute.v2020_08_02.OperationValue; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class OperationValueImpl extends WrapperImpl implements OperationValue { + private final HybridComputeManager manager; + OperationValueImpl(OperationValueInner inner, HybridComputeManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public HybridComputeManager manager() { + return this.manager; + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String operation() { + return this.inner().operation(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public String provider() { + return this.inner().provider(); + } + + @Override + public String resource() { + return this.inner().resource(); + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationValueInner.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationValueInner.java new file mode 100644 index 0000000000000..81c9bc0878de9 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationValueInner.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes the properties of a Compute Operation value. + */ +@JsonFlatten +public class OperationValueInner { + /** + * The origin of the compute operation. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private String origin; + + /** + * The name of the compute operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The display name of the compute operation. + */ + @JsonProperty(value = "display.operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * The display name of the resource the operation applies to. + */ + @JsonProperty(value = "display.resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * The description of the operation. + */ + @JsonProperty(value = "display.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * The resource provider for the operation. + */ + @JsonProperty(value = "display.provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Get the origin of the compute operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Get the name of the compute operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the display name of the compute operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get the display name of the resource the operation applies to. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get the description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get the resource provider for the operation. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationsImpl.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..d4f3358725f1e --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.Operations; +import rx.functions.Func1; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.OperationValue; + +class OperationsImpl extends WrapperImpl implements Operations { + private final HybridComputeManager manager; + + OperationsImpl(HybridComputeManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public HybridComputeManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public OperationValue call(OperationValueInner inner) { + return new OperationValueImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationsInner.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationsInner.java new file mode 100644 index 0000000000000..e94f6feaa1ef5 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/OperationsInner.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.hybridcompute.v2020_08_02.ErrorResponseException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private HybridComputeManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, HybridComputeManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hybridcompute.v2020_08_02.Operations list" }) + @GET("providers/Microsoft.HybridCompute/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of hybrid compute operations. + * + * @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 the List<OperationValueInner> object if successful. + */ + public List list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Gets a list of hybrid compute operations. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets a list of hybrid compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationValueInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of hybrid compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationValueInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/PageImpl.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/PageImpl.java new file mode 100644 index 0000000000000..fc3cfe5359a70 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/PageImpl1.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/PageImpl1.java new file mode 100644 index 0000000000000..4f4a8be4a3006 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/PageImpl1.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl1 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/package-info.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/package-info.java new file mode 100644 index 0000000000000..035c3a328c48a --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for HybridComputeManagementClient. + * The Hybrid Compute Management Client. + */ +package com.microsoft.azure.management.hybridcompute.v2020_08_02.implementation; diff --git a/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/package-info.java b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/package-info.java new file mode 100644 index 0000000000000..82c87b4e83d27 --- /dev/null +++ b/sdk/hybridcompute/mgmt-v2020_08_02/src/main/java/com/microsoft/azure/management/hybridcompute/v2020_08_02/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for HybridComputeManagementClient. + * The Hybrid Compute Management Client. + */ +package com.microsoft.azure.management.hybridcompute.v2020_08_02; diff --git a/sdk/hybridcompute/pom.mgmt.xml b/sdk/hybridcompute/pom.mgmt.xml index 5628c46ac670d..4582c5133f4b0 100644 --- a/sdk/hybridcompute/pom.mgmt.xml +++ b/sdk/hybridcompute/pom.mgmt.xml @@ -10,5 +10,6 @@ 1.0.0 mgmt-v2019_12_12 + mgmt-v2020_08_02 From 50297c76887c6e7e02561194ab23e89cbbea030e Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Tue, 1 Sep 2020 11:22:03 +0800 Subject: [PATCH 027/168] mgmt update test base by azure-resourcemanager-test (#14654) * refactor tests in resources * refactor tests in storage * refactor tests in authorization * refactor tests in keyvault * refactor tests in msi * refactor tests in network * refactor tests in compute * refactor tests in sql * refactor tests in dns * refactor tests in appservice * refactor tests in cosmos * refactor tests in containerservice * refactor tests in monitor * refactor tests in containerregistry * refactor tests in appplatform * refactor tests in containerinstance * refactor tests in privatedns * refactor tests in redis * refactor tests in eventhubs * refactor tests in azure resourcemanager * update azure resourcemanager samples * update dns manager and test deplay provider * reformat code --- .../azure-resourcemanager-appplatform/pom.xml | 6 +- .../appplatform/AppPlatformManager.java | 6 +- .../appplatform/AppPlatformTest.java | 47 ++- .../appplatform/SpringCloudLiveOnlyTest.java | 15 +- .../appplatform/SpringCloudTest.java | 2 +- .../azure-resourcemanager-appservice/pom.xml | 6 +- .../appservice/AppServiceManager.java | 6 +- .../appservice/AppServicePlansTests.java | 2 +- .../appservice/AppServiceTest.java | 49 ++- .../appservice/AuthenticationTests.java | 2 +- .../appservice/DeploymentSlotsTests.java | 2 +- .../appservice/DiagnosticLogsTests.java | 2 +- .../appservice/FunctionAppsTests.java | 4 +- .../FunctionDeploymentSlotsTests.java | 2 +- .../appservice/HostnameSslTests.java | 2 +- .../appservice/LinuxWebAppsTests.java | 2 +- .../appservice/SourceControlTests.java | 2 +- .../appservice/WarDeployTests.java | 2 +- .../appservice/WebAppConfigTests.java | 2 +- .../appservice/WebAppsMsiTests.java | 6 +- .../appservice/WebAppsTests.java | 2 +- .../appservice/WebAppsWebDeployTests.java | 2 +- .../appservice/ZipDeployTests.java | 13 +- .../pom.xml | 10 +- .../authorization/AuthorizationManager.java | 12 +- .../authorization/ApplicationsTests.java | 2 +- .../GraphRbacManagementTest.java | 41 ++- .../authorization/GroupsTests.java | 8 +- .../authorization/RoleAssignmentTests.java | 4 +- .../authorization/ServicePrincipalsTests.java | 6 +- .../authorization/UsersTests.java | 4 +- .../azure-resourcemanager-compute/pom.xml | 6 +- .../compute/ComputeManager.java | 4 +- .../implementation/VirtualMachineImpl.java | 6 +- .../VirtualMachineScaleSetImpl.java | 6 +- .../compute/ComputeManagementTest.java | 52 ++- .../compute/ComputeSkuTests.java | 2 +- .../compute/ManagedDiskOperationsTests.java | 2 +- .../compute/SharedGalleryImageTests.java | 2 +- ...achineAvailabilityZoneOperationsTests.java | 2 +- .../VirtualMachineBootDiagnosticsTests.java | 10 +- ...rtualMachineCustomImageOperationsTest.java | 2 +- ...VirtualMachineEMSILMSIOperationsTests.java | 23 +- ...rtualMachineEncryptionOperationsTests.java | 2 +- ...irtualMachineExtensionOperationsTests.java | 2 +- ...tualMachineManagedDiskOperationsTests.java | 2 +- ...ManagedServiceIdentityOperationsTests.java | 2 +- .../VirtualMachineOperationsTests.java | 4 +- .../VirtualMachinePopularImageTests.java | 14 +- ...lMachineRelatedResourcesDeletionTests.java | 24 +- ...alMachineScaleSetBootDiagnosticsTests.java | 10 +- ...achineScaleSetEMSILMSIOperationsTests.java | 88 +---- ...ineScaleSetManagedDiskOperationsTests.java | 2 +- ...VirtualMachineScaleSetOperationsTests.java | 2 +- .../pom.xml | 6 +- .../ContainerInstanceManager.java | 6 +- .../ContainerInstanceManagementTest.java | 45 ++- .../pom.xml | 6 +- .../ContainerRegistryManager.java | 6 +- .../containerregistry/RegistryTest.java | 39 +- .../pom.xml | 6 +- .../ContainerServiceManager.java | 6 +- .../ContainerServiceManagementTest.java | 39 +- .../KubernetesClustersTests.java | 6 +- .../azure-resourcemanager-cosmos/pom.xml | 6 +- .../resourcemanager/cosmos/CosmosManager.java | 6 +- .../resourcemanager/cosmos/CosmosDBTests.java | 62 ++-- .../azure-resourcemanager-dns/pom.xml | 6 +- .../resourcemanager/dns/DnsZoneManager.java | 5 +- .../dns/DnsZoneRecordSetETagTests.java | 44 ++- .../azure-resourcemanager-eventhubs/pom.xml | 6 +- .../eventhubs/EventHubsManager.java | 6 +- .../eventhubs/EventHubTests.java | 34 +- .../azure-resourcemanager-keyvault/pom.xml | 6 +- .../keyvault/KeyVaultManager.java | 8 +- .../resourcemanager/keyvault/KeyTests.java | 50 ++- .../keyvault/KeyVaultManagementTest.java | 48 ++- .../resourcemanager/keyvault/SecretTests.java | 15 +- .../resourcemanager/keyvault/VaultTests.java | 12 +- .../azure-resourcemanager-monitor/pom.xml | 6 +- .../monitor/MonitorManager.java | 6 +- .../monitor/ActionGroupsTests.java | 2 +- .../resourcemanager/monitor/AlertsTests.java | 2 +- .../monitor/AutoscaleTests.java | 2 +- .../monitor/DiagnosticSettingsTests.java | 2 +- .../MonitorActivityAndMetricsTests.java | 2 +- .../monitor/MonitorManagementTest.java | 52 ++- .../azure-resourcemanager-msi/pom.xml | 6 +- .../azure/resourcemanager/msi/MSIManager.java | 6 +- .../msi/MSIIdentityManagementTests.java | 39 +- .../azure-resourcemanager-network/pom.xml | 6 +- .../network/NetworkManager.java | 6 +- .../implementation/NetworkInterfaceImpl.java | 6 +- .../network/ApplicationGatewayTests.java | 14 +- .../ApplicationSecurityGroupTests.java | 2 +- .../network/DdosProtectionPlanTests.java | 2 +- .../network/LoadBalancerTests.java | 4 +- .../NetworkInterfaceOperationsTests.java | 4 +- .../network/NetworkManagementTest.java | 49 ++- .../network/NetworkWatcherTests.java | 2 +- .../network/RouteFilterTests.java | 4 +- .../azure-resourcemanager-privatedns/pom.xml | 6 +- .../privatedns/PrivateDnsZoneManager.java | 5 +- .../PrivateDnsZoneRecordSetETagTests.java | 44 ++- .../VirtualNetworkLinkETagTests.java | 46 ++- .../azure-resourcemanager-redis/pom.xml | 22 +- .../resourcemanager/redis/RedisManager.java | 6 +- .../redis/RedisCacheOperationsTests.java | 2 +- .../redis/RedisManagementTest.java | 44 ++- .../azure-resourcemanager-resources/pom.xml | 6 +- .../resources/ResourceManager.java | 24 +- .../implementation/AzureConfigurableImpl.java | 4 +- .../arm/implementation/Manager.java | 2 +- .../arm/implementation/ManagerBase.java | 6 +- .../policy/ProviderRegistrationPolicy.java | 2 +- .../fluentcore/utils/DelayProvider.java | 67 ---- .../fluentcore/utils/FileProvider.java | 32 -- .../utils/HttpPipelineProvider.java | 4 +- .../utils/ResourceDelayProvider.java | 17 + .../fluentcore/utils/ResourceNamer.java | 37 +- .../utils/ResourceNamerFactory.java | 18 - .../fluentcore/utils/SdkContext.java | 65 ++-- .../resources/DeploymentsTests.java | 8 +- .../resources/GenericResourcesTests.java | 6 +- .../resources/PolicyTests.java | 42 +-- .../resources/ProvidersTests.java | 26 +- .../resources/ResourceGroupsTests.java | 6 +- .../resources/ResourceManagementTest.java | 57 +++ .../resources/ResourceManagerTestBase.java | 29 -- .../resources/SubscriptionsTests.java | 11 +- .../resources/TenantsTests.java | 11 +- .../TooManyRequestsRetryInterceptorTests.java | 2 +- .../resources/core/AuthFile.java | 227 ------------ .../resources/core/InterceptorManager.java | 345 ------------------ .../resources/core/NetworkCallRecord.java | 52 --- .../resources/core/RecordedData.java | 25 -- .../resources/core/RecordedHttpResponse.java | 83 ----- .../core/ResourceGroupTaggingPolicy.java | 84 ----- .../resources/core/TestBase.java | 341 ----------------- .../resources/core/TestDelayProvider.java | 33 -- .../resources/core/TestFileProvider.java | 34 -- .../resources/core/TestResourceNamer.java | 72 ---- .../core/TestResourceNamerFactory.java | 20 - .../azure-resourcemanager-samples/pom.xml | 8 +- .../samples/ManageSpringCloud.java | 2 +- .../samples/ManageFunctionAppBasic.java | 2 +- .../samples/ManageFunctionAppLogs.java | 2 +- .../ManageFunctionAppSourceControl.java | 2 +- .../ManageFunctionAppWithAuthentication.java | 2 +- .../ManageFunctionAppWithDomainSsl.java | 2 +- .../ManageLinuxFunctionAppSourceControl.java | 2 +- .../samples/ManageLinuxWebAppBasic.java | 2 +- .../ManageLinuxWebAppCosmosDbByMsi.java | 2 +- .../ManageLinuxWebAppSourceControl.java | 2 +- .../ManageLinuxWebAppSqlConnection.java | 2 +- ...geLinuxWebAppStorageAccountConnection.java | 2 +- ...anageLinuxWebAppWithContainerRegistry.java | 2 +- .../ManageLinuxWebAppWithDomainSsl.java | 2 +- .../appservice/samples/ManageWebAppBasic.java | 2 +- .../samples/ManageWebAppCosmosDbByMsi.java | 2 +- .../ManageWebAppCosmosDbThroughKeyVault.java | 2 +- .../appservice/samples/ManageWebAppLogs.java | 2 +- .../appservice/samples/ManageWebAppSlots.java | 2 +- .../samples/ManageWebAppSourceControl.java | 2 +- .../ManageWebAppSourceControlAsync.java | 2 +- .../samples/ManageWebAppSqlConnection.java | 2 +- .../ManageWebAppStorageAccountConnection.java | 2 +- .../ManageWebAppWithAuthentication.java | 2 +- .../samples/ManageWebAppWithDomainSsl.java | 2 +- .../ManageServicePrincipalCredentials.java | 14 +- .../samples/ManageUsersGroupsAndRoles.java | 8 +- .../ConvertVirtualMachineToManagedDisks.java | 2 +- ...VirtualMachineUsingCustomImageFromVHD.java | 2 +- ...eVirtualMachineUsingCustomImageFromVM.java | 2 +- ...chineUsingSpecializedDiskFromSnapshot.java | 2 +- ...ualMachineUsingSpecializedDiskFromVhd.java | 2 +- ...MachinesAsyncTrackingRelatedResources.java | 2 +- .../CreateVirtualMachinesInParallel.java | 2 +- ...hinesUsingCustomImageOrSpecializedVHD.java | 2 +- .../compute/samples/ListComputeSkus.java | 2 +- .../ListVirtualMachineExtensionImages.java | 2 +- .../samples/ListVirtualMachineImages.java | 2 +- .../samples/ManageAvailabilitySet.java | 2 +- .../compute/samples/ManageManagedDisks.java | 2 +- ...nabledVirtualMachineBelongsToAADGroup.java | 2 +- ...etUserAssignedMSIFromServicePrincipal.java | 2 +- ...geStorageFromMSIEnabledVirtualMachine.java | 2 +- ...eUserAssignedMSIEnabledVirtualMachine.java | 2 +- .../compute/samples/ManageVirtualMachine.java | 2 +- .../samples/ManageVirtualMachineAsync.java | 2 +- .../ManageVirtualMachineExtension.java | 2 +- .../samples/ManageVirtualMachineScaleSet.java | 2 +- .../ManageVirtualMachineScaleSetAsync.java | 2 +- ...tualMachineScaleSetWithUnmanagedDisks.java | 2 +- .../samples/ManageVirtualMachineWithDisk.java | 2 +- ...anageVirtualMachineWithUnmanagedDisks.java | 2 +- .../ManageVirtualMachinesInParallel.java | 2 +- .../samples/ManageZonalVirtualMachine.java | 2 +- .../ManageZonalVirtualMachineScaleSet.java | 2 +- ...tainerInstanceWithAzureFileShareMount.java | 2 +- ...WithManualAzureFileShareMountCreation.java | 2 +- ...erInstanceWithMultipleContainerImages.java | 2 +- ...ManyUsingContainerServiceOrchestrator.java | 2 +- .../samples/ManageContainerRegistry.java | 2 +- .../ManageContainerRegistryWithWebhooks.java | 2 +- ...teCosmosDBTableWithVirtualNetworkRule.java | 2 +- ...CreateCosmosDBWithEventualConsistency.java | 2 +- .../samples/CreateCosmosDBWithIPRange.java | 2 +- .../CreateCosmosDBWithKindMongoDB.java | 2 +- .../cosmos/samples/ManageHACosmosDB.java | 2 +- .../dns/samples/ManageDns.java | 2 +- .../eventhubs/samples/ManageEventHub.java | 2 +- .../samples/ManageEventHubEvents.java | 2 +- .../ManageEventHubGeoDisasterRecovery.java | 2 +- .../keyvault/samples/ManageKeyVault.java | 2 +- ...mageFromContainerRegistryToKubernetes.java | 2 +- .../samples/ManageKubernetesCluster.java | 2 +- ...bernetesClusterWithAdvancedNetworking.java | 2 +- ...eSettingsBasedOnPerformanceOrSchedule.java | 2 +- .../samples/QueryMetricsAndActivityLogs.java | 2 +- ...SecurityBreachOrRiskActivityLogAlerts.java | 4 +- .../WebAppPerformanceMonitoringAlerts.java | 2 +- ...reateSimpleInternetFacingLoadBalancer.java | 2 +- .../samples/ManageApplicationGateway.java | 2 +- .../network/samples/ManageExpressRoute.java | 2 +- .../ManageExpressRouteCrossConnection.java | 2 +- .../network/samples/ManageIPAddress.java | 2 +- .../samples/ManageInternalLoadBalancer.java | 2 +- .../ManageInternetFacingLoadBalancer.java | 2 +- .../samples/ManageNetworkInterface.java | 2 +- ...anageNetworkPeeringInSameSubscription.java | 2 +- .../samples/ManageNetworkSecurityGroup.java | 2 +- .../network/samples/ManageNetworkWatcher.java | 2 +- .../ManageSimpleApplicationGateway.java | 2 +- ...eVirtualMachinesInParallelWithNetwork.java | 2 +- .../network/samples/ManageVirtualNetwork.java | 2 +- .../samples/ManageVirtualNetworkAsync.java | 2 +- .../ManageVpnGatewayPoint2SiteConnection.java | 2 +- .../ManageVpnGatewaySite2SiteConnection.java | 2 +- .../ManageVpnGatewayVNet2VNetConnection.java | 2 +- ...erifyNetworkPeeringWithNetworkWatcher.java | 2 +- .../privatedns/samples/ManagePrivateDns.java | 2 +- .../rediscache/samples/ManageRedisCache.java | 2 +- .../samples/DeployUsingARMTemplate.java | 2 +- .../samples/DeployUsingARMTemplateAsync.java | 2 +- ...ngARMTemplateWithDeploymentOperations.java | 2 +- .../DeployUsingARMTemplateWithProgress.java | 2 +- .../DeployUsingARMTemplateWithTags.java | 2 +- .../DeployVirtualMachineUsingARMTemplate.java | 2 +- .../resources/samples/ManageResource.java | 2 +- .../samples/ManageResourceGroup.java | 2 +- .../azure/resourcemanager/samples/Utils.java | 1 - .../sql/samples/GettingSqlServerMetrics.java | 2 +- .../sql/samples/ManageSqlDatabase.java | 2 +- .../ManageSqlDatabaseInElasticPool.java | 2 +- ...qlDatabasesAcrossDifferentDataCenters.java | 2 +- .../sql/samples/ManageSqlFailoverGroups.java | 2 +- .../sql/samples/ManageSqlFirewallRules.java | 2 +- .../ManageSqlImportExportDatabase.java | 2 +- .../samples/ManageSqlServerDnsAliases.java | 2 +- ...nageSqlServerKeysWithAzureKeyVaultKey.java | 2 +- .../ManageSqlServerSecurityAlertPolicy.java | 2 +- .../samples/ManageSqlVirtualNetworkRules.java | 2 +- ...ageSqlWithRecoveredOrRestoredDatabase.java | 2 +- .../storage/samples/ManageStorageAccount.java | 2 +- .../samples/ManageStorageAccountAsync.java | 2 +- .../ManageStorageAccountNetworkRules.java | 2 +- .../samples/AppPlatformLiveOnlyTests.java | 10 +- .../AppServiceSampleLiveOnlyTests.java | 85 ++++- .../samples/ContainerRegistryTests.java | 16 +- .../samples/GraphRbacTests.java | 48 ++- .../NetworkWatcherSampleLiveOnlyTests.java | 10 +- .../samples/SamplesTestBase.java | 49 ++- .../azure-resourcemanager-sql/pom.xml | 6 +- .../resourcemanager/sql/SqlServerManager.java | 8 +- .../sql/SqlServerOperationsTests.java | 33 +- .../resourcemanager/sql/SqlServerTest.java | 45 ++- .../azure-resourcemanager-storage/pom.xml | 6 +- .../storage/StorageManager.java | 6 +- .../StorageAccountNetworkRuleTests.java | 2 +- .../StorageAccountOperationsTests.java | 2 +- .../storage/StorageBlobContainersTests.java | 2 +- .../storage/StorageBlobServicesTests.java | 2 +- .../StorageManagementPoliciesTests.java | 2 +- .../storage/StorageManagementTest.java | 41 ++- .../test/utils/TestDelayProvider.java | 2 +- .../azure-resourcemanager/pom.xml | 6 +- .../java/com/azure/resourcemanager/Azure.java | 12 +- .../ApplicationGatewayTests.java | 38 +- .../com/azure/resourcemanager/AzureTests.java | 41 ++- .../com/azure/resourcemanager/TestUtils.java | 9 + .../resourcemanager/TestVirtualMachine.java | 4 +- .../TestVirtualMachineCustomData.java | 3 +- .../TestVirtualMachineSsh.java | 3 +- .../TestVirtualMachineSyncPoller.java | 4 +- .../VirtualNetworkGatewayTests.java | 44 ++- 296 files changed, 1632 insertions(+), 2396 deletions(-) delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/DelayProvider.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/FileProvider.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceDelayProvider.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceNamerFactory.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceManagementTest.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceManagerTestBase.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/AuthFile.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/InterceptorManager.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/NetworkCallRecord.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/RecordedData.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/RecordedHttpResponse.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/ResourceGroupTaggingPolicy.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestBase.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestDelayProvider.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestFileProvider.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestResourceNamer.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestResourceNamerFactory.java diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml index b9b001b7dc493..474e87b6d9ce6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml @@ -84,9 +84,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java index 8a2f0b7b1b939..0b99ba99d4c8c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -87,8 +87,8 @@ private AppPlatformManager(HttpPipeline httpPipeline, AzureProfile profile, SdkC profile, new AppPlatformManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java index d4fb6dcf3191b..8c6c5f4dc8791 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java @@ -3,39 +3,60 @@ package com.azure.resourcemanager.appplatform; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.appservice.AppServiceManager; import com.azure.resourcemanager.dns.DnsZoneManager; import com.azure.resourcemanager.keyvault.KeyVaultManager; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; +import java.time.temporal.ChronoUnit; +import java.util.List; -public class AppPlatformTest extends TestBase { +public class AppPlatformTest extends ResourceManagerTestBase { protected AppPlatformManager appPlatformManager; protected AppServiceManager appServiceManager; protected DnsZoneManager dnsZoneManager; protected KeyVaultManager keyVaultManager; protected String rgName = ""; - public AppPlatformTest() { - } - - AppPlatformTest(RunCondition runCondition) { - super(runCondition); + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); } @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) throws IOException { + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); rgName = generateRandomResourceName("rg", 20); - appPlatformManager = AppPlatformManager.authenticate(httpPipeline, profile, sdkContext); - appServiceManager = AppServiceManager.authenticate(httpPipeline, profile, sdkContext); - dnsZoneManager = DnsZoneManager.authenticate(httpPipeline, profile, sdkContext); - keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile, sdkContext); + appPlatformManager = AppPlatformManager.authenticate(httpPipeline, profile); + appServiceManager = AppServiceManager.authenticate(httpPipeline, profile); + dnsZoneManager = DnsZoneManager.authenticate(httpPipeline, profile); + keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudLiveOnlyTest.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudLiveOnlyTest.java index 830e2a34e670b..e74fdd4d8421e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudLiveOnlyTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudLiveOnlyTest.java @@ -3,6 +3,7 @@ package com.azure.resourcemanager.appplatform; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.appplatform.models.RuntimeVersion; import com.azure.resourcemanager.appplatform.models.SpringApp; import com.azure.resourcemanager.appplatform.models.SpringAppDeployment; @@ -48,12 +49,13 @@ public class SpringCloudLiveOnlyTest extends AppPlatformTest { private static final String SPRING_CLOUD_SERVICE_PRINCIPAL = "03b39d0f-4213-4864-a245-b1476ec03169"; - SpringCloudLiveOnlyTest() { - super(RunCondition.LIVE_ONLY); // need storage data-plane and url check - } - @Test + @DoNotRecord public void canCRUDDeployment() throws Exception { + if (skipInPlayback()) { + return; + } + String serviceName = generateRandomResourceName("springsvc", 15); String appName = "gateway"; String deploymentName = generateRandomResourceName("deploy", 15); @@ -134,7 +136,12 @@ public void canCRUDDeployment() throws Exception { } @Test + @DoNotRecord public void canCreateCustomDomainWithSsl() throws Exception { + if (skipInPlayback()) { + return; + } + String domainName = generateRandomResourceName("jsdkdemo-", 20) + ".com"; String certOrderName = generateRandomResourceName("cert", 15); String vaultName = generateRandomResourceName("vault", 15); diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java index e4b1e98e75b26..78152155eeebe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java @@ -84,7 +84,7 @@ public void canCRUDApp() throws Exception { Assertions.assertEquals("/tmp", app.temporaryDisk().mountPath()); Assertions.assertEquals(4, app.temporaryDisk().sizeInGB()); - if (isRecordMode()) { + if (!isPlaybackMode()) { Assertions.assertTrue(requestSuccess(app.url())); } diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml index 6e2161f921f51..1c48300d3d250 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml @@ -99,9 +99,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java index c52bda6f70da8..092d7bacda61c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java @@ -23,7 +23,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.StorageManager; @@ -112,8 +112,8 @@ private AppServiceManager(HttpPipeline httpPipeline, AzureProfile profile, SdkCo profile, new WebSiteManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile, sdkContext); diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AppServicePlansTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AppServicePlansTests.java index aca05ae1cc6f7..6abf7cda1b9b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AppServicePlansTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AppServicePlansTests.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.appservice.models.OperatingSystem; import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AppServiceTest.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AppServiceTest.java index a7cfd3991bafd..79be50ab9a5ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AppServiceTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AppServiceTest.java @@ -11,11 +11,14 @@ import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; import com.azure.core.annotation.ServiceInterface; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; @@ -25,11 +28,11 @@ import com.azure.resourcemanager.appservice.models.AppServiceDomain; import com.azure.resourcemanager.appservice.models.PublishingProfile; import com.azure.resourcemanager.keyvault.KeyVaultManager; -import com.azure.resourcemanager.resources.core.TestBase; +import com.azure.resourcemanager.msi.MSIManager; import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; import java.io.IOException; import java.io.InputStream; @@ -37,8 +40,14 @@ import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.temporal.ChronoUnit; +import java.util.List; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTPClient; import org.junit.jupiter.api.Assertions; @@ -46,33 +55,45 @@ import reactor.core.publisher.Mono; /** The base for app service tests. */ -public class AppServiceTest extends TestBase { +public class AppServiceTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected KeyVaultManager keyVaultManager; protected AppServiceManager appServiceManager; + protected MSIManager msiManager; protected AppServiceDomain domain; protected AppServiceCertificateOrder certificateOrder; protected String rgName = ""; - // private static OkHttpClient httpClient = new OkHttpClient.Builder().readTimeout(3, TimeUnit.MINUTES).build(); - - public AppServiceTest() { - } - - AppServiceTest(RunCondition runCondition) { - super(runCondition); + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); } @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { rgName = generateRandomResourceName("javacsmrg", 20); + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - - keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile, sdkContext); - + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile); appServiceManager = AppServiceManager.authenticate(httpPipeline, profile, sdkContext); + msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); // useExistingDomainAndCertificate(); // createNewDomainAndCertificate(); diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AuthenticationTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AuthenticationTests.java index 5826ca9cece53..afecce089a279 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AuthenticationTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/AuthenticationTests.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/DeploymentSlotsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/DeploymentSlotsTests.java index e5052b5c03f85..860cd751d4b7d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/DeploymentSlotsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/DeploymentSlotsTests.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/DiagnosticLogsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/DiagnosticLogsTests.java index 915236727dd43..d91f85184cd33 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/DiagnosticLogsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/DiagnosticLogsTests.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionAppsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionAppsTests.java index c115693271cc6..6dc89c3618080 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionAppsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionAppsTests.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.appservice.models.SkuName; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.models.StorageAccountSkuType; @@ -53,7 +53,7 @@ protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile rgName1 = generateRandomResourceName("javacsmrg", 20); rgName2 = generateRandomResourceName("javacsmrg", 20); - storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); + storageManager = StorageManager.authenticate(httpPipeline, profile); super.initializeClients(httpPipeline, profile); } diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionDeploymentSlotsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionDeploymentSlotsTests.java index 9f0181b57c6c3..0195c1822b4a5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionDeploymentSlotsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionDeploymentSlotsTests.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import java.util.Map; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/HostnameSslTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/HostnameSslTests.java index 970936b02f079..d0418d269dd28 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/HostnameSslTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/HostnameSslTests.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import javax.net.ssl.SSLPeerUnverifiedException; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/LinuxWebAppsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/LinuxWebAppsTests.java index 0cc3789be7d72..eb11a1fce1e1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/LinuxWebAppsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/LinuxWebAppsTests.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.appservice.models.RuntimeStack; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import java.io.ByteArrayInputStream; import java.util.zip.ZipInputStream; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/SourceControlTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/SourceControlTests.java index be84ab6fc8b08..fb8e3aaaeabca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/SourceControlTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/SourceControlTests.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WarDeployTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WarDeployTests.java index 7b3f0ce8994ed..3b77076ccb099 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WarDeployTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WarDeployTests.java @@ -14,7 +14,7 @@ import java.io.FileInputStream; import java.io.InputStream; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppConfigTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppConfigTests.java index a58e09b2dfff8..a7785734ba800 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppConfigTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppConfigTests.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import java.util.Map; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsMsiTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsMsiTests.java index 830091300a150..62125f4eadd8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsMsiTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsMsiTests.java @@ -13,18 +13,16 @@ import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.authorization.models.BuiltInRole; import com.azure.resourcemanager.msi.models.Identity; -import com.azure.resourcemanager.msi.MSIManager; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import java.util.Set; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class WebAppsMsiTests extends AppServiceTest { - private MSIManager msiManager; private String rgName1 = ""; private String webappName1 = ""; private String vaultName = ""; @@ -34,8 +32,6 @@ protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile webappName1 = generateRandomResourceName("java-webapp-", 20); rgName1 = generateRandomResourceName("javacsmrg", 20); vaultName = generateRandomResourceName("java-vault-", 20); - this.msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); - super.initializeClients(httpPipeline, profile); } diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java index bb92bfcc331b3..9583fab9a4be5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.appservice.models.WebAppRuntimeStack; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsWebDeployTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsWebDeployTests.java index 6af1f5e3d3856..b62bf790eb958 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsWebDeployTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsWebDeployTests.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.appservice.models.WebDeployment; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/ZipDeployTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/ZipDeployTests.java index e3dbe07b85492..1ecf6426bdf7c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/ZipDeployTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/ZipDeployTests.java @@ -4,12 +4,12 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.appservice.models.FunctionApp; import com.azure.resourcemanager.appservice.models.FunctionEnvelope; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import java.io.File; import org.junit.jupiter.api.Assertions; @@ -18,10 +18,6 @@ public class ZipDeployTests extends AppServiceTest { private String webappName4 = ""; - public ZipDeployTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } - @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { webappName4 = generateRandomResourceName("java-func-", 20); @@ -30,7 +26,12 @@ protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile } @Test + @DoNotRecord public void canZipDeployFunction() { + if (skipInPlayback()) { + return; + } + // Create function app FunctionApp functionApp = appServiceManager diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml index 9de6e4b7dfb06..0936f8a871176 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml @@ -17,8 +17,8 @@ 2.0.0-beta.4 jar - Microsoft Azure SDK for Graph RBAC Management - This package contains Microsoft Azure Graph RBAC Management SDK. For documentation on how to use this package, please see https://aka.ms/azure-sdk-java-mgmt + Microsoft Azure SDK for Authorization Management + This package contains Microsoft Azure Authorization Management SDK. For documentation on how to use this package, please see https://aka.ms/azure-sdk-java-mgmt https://github.com/Azure/azure-sdk-for-java @@ -79,9 +79,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManager.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManager.java index b405b44aee4ee..d751f814a5cfb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManager.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -112,16 +112,16 @@ private AuthorizationManager(HttpPipeline httpPipeline, AzureProfile profile, Sd this.graphRbacManagementClient = new GraphRbacManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getGraphEndpoint()) - .tenantId(profile.tenantId()) + .endpoint(profile.getEnvironment().getGraphEndpoint()) + .tenantId(profile.getTenantId()) .buildClient(); this.authorizationManagementClient = new AuthorizationManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(); - this.tenantId = profile.tenantId(); + this.tenantId = profile.getTenantId(); this.sdkContext = sdkContext; } diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/ApplicationsTests.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/ApplicationsTests.java index d71488d53bc16..261768a6f9c17 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/ApplicationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/ApplicationsTests.java @@ -12,7 +12,7 @@ public class ApplicationsTests extends GraphRbacManagementTest { @Test public void canCRUDApplication() throws Exception { - String name = sdkContext.randomResourceName("javasdkapp", 20); + String name = generateRandomResourceName("javasdkapp", 20); ActiveDirectoryApplication application = null; try { diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/GraphRbacManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/GraphRbacManagementTest.java index 4866774457a1b..47523ee6211cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/GraphRbacManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/GraphRbacManagementTest.java @@ -3,26 +3,57 @@ package com.azure.resourcemanager.authorization; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import java.time.temporal.ChronoUnit; +import java.util.List; /** The base for storage manager tests. */ -public abstract class GraphRbacManagementTest extends TestBase { +public abstract class GraphRbacManagementTest extends ResourceManagerTestBase { protected AuthorizationManager authorizationManager; protected ResourceManager resourceManager; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { - authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile, sdkContext); + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); } + @Override protected void cleanUpResources() { } diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/GroupsTests.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/GroupsTests.java index dcbe47fdeaa18..0ee3d0b51bca4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/GroupsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/GroupsTests.java @@ -18,10 +18,10 @@ public class GroupsTests extends GraphRbacManagementTest { @Test public void canCRUDGroup() throws Exception { - String userName = sdkContext.randomResourceName("user", 16); - String spName = sdkContext.randomResourceName("sp", 16); - String group1Name = sdkContext.randomResourceName("group", 16); - String group2Name = sdkContext.randomResourceName("group", 16); + String userName = generateRandomResourceName("user", 16); + String spName = generateRandomResourceName("sp", 16); + String group1Name = generateRandomResourceName("group", 16); + String group2Name = generateRandomResourceName("group", 16); ActiveDirectoryUser user = null; ServicePrincipal servicePrincipal = null; ActiveDirectoryGroup group1 = null; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/RoleAssignmentTests.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/RoleAssignmentTests.java index 2e3ef9e25498b..374f4f7566cae 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/RoleAssignmentTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/RoleAssignmentTests.java @@ -13,8 +13,8 @@ public class RoleAssignmentTests extends GraphRbacManagementTest { @Test public void canCRUDRoleAssignment() throws Exception { - String roleAssignmentName = sdkContext.randomUuid(); - String spName = sdkContext.randomResourceName("sp", 20); + String roleAssignmentName = generateRandomUuid(); + String spName = generateRandomResourceName("sp", 20); ServicePrincipal sp = authorizationManager.servicePrincipals().define(spName).withNewApplication("http://" + spName).create(); diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/ServicePrincipalsTests.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/ServicePrincipalsTests.java index 842d9c42dfba1..ed6bd0091a551 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/ServicePrincipalsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/ServicePrincipalsTests.java @@ -22,7 +22,7 @@ public class ServicePrincipalsTests extends GraphRbacManagementTest { @Test public void canCRUDServicePrincipal() throws Exception { - String name = sdkContext.randomResourceName("ssp", 21); + String name = generateRandomResourceName("ssp", 21); ServicePrincipal servicePrincipal = null; try { // Create @@ -80,8 +80,8 @@ public void canCRUDServicePrincipal() throws Exception { @Test @Disabled("Do not record - recorded JSON may contain auth info") public void canCRUDServicePrincipalWithRole() throws Exception { - String name = sdkContext.randomResourceName("ssp", 21); - String rgName = sdkContext.randomResourceName("rg", 22); + String name = generateRandomResourceName("ssp", 21); + String rgName = generateRandomResourceName("rg", 22); ServicePrincipal servicePrincipal = null; String authFile = "/Users/jianghlu/Downloads/graphtestapp.azureauth"; String subscription = "0b1f6471-1bf0-4dda-aec3-cb9272f09590"; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/UsersTests.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/UsersTests.java index fb380ddcfc077..b2f74b1266cba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/UsersTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/java/com/azure/resourcemanager/authorization/UsersTests.java @@ -33,7 +33,7 @@ public void canGetUserByDisplayName() throws Exception { @Test public void canCreateUser() throws Exception { - String name = sdkContext.randomResourceName("user", 16); + String name = generateRandomResourceName("user", 16); ActiveDirectoryUser user = authorizationManager .users() @@ -49,7 +49,7 @@ public void canCreateUser() throws Exception { @Test public void canUpdateUser() throws Exception { - String name = sdkContext.randomResourceName("user", 16); + String name = generateRandomResourceName("user", 16); ActiveDirectoryUser user = authorizationManager .users() diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml index 74f7a8f98e52d..bf1c11ec94dd0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml @@ -99,9 +99,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java index 066f095b187fb..a31143964a538 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java @@ -37,7 +37,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.StorageManager; @@ -133,7 +133,7 @@ private ComputeManager(HttpPipeline httpPipeline, AzureProfile profile, SdkConte profile, new ComputeManagementClientBuilder() .pipeline(httpPipeline) - .subscriptionId(profile.subscriptionId()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImpl.java index fbf0535be3643..1d9c6ae808667 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImpl.java @@ -5,6 +5,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.SubResource; +import com.azure.core.management.provider.IdentifierProvider; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.compute.ComputeManager; import com.azure.resourcemanager.compute.models.AvailabilitySet; @@ -76,7 +77,6 @@ import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; import com.azure.resourcemanager.resources.fluentcore.model.implementation.AcceptedImpl; -import com.azure.resourcemanager.resources.fluentcore.utils.ResourceNamer; import com.azure.resourcemanager.resources.fluentcore.utils.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.StorageManager; @@ -118,7 +118,7 @@ class VirtualMachineImpl // the name of the virtual machine private final String vmName; // used to generate unique name for any dependency resources - private final ResourceNamer namer; + private final IdentifierProvider namer; // unique key of a creatable storage account to be used for virtual machine child resources that // requires storage [OS disk, data disk, boot diagnostics etc..] private String creatableStorageAccountKey; @@ -194,7 +194,7 @@ public JsonProperty.Access findPropertyAccess(Annotated annotated) { this.authorizationManager = authorizationManager; this.vmName = name; this.isMarketplaceLinuxImage = false; - this.namer = this.manager().sdkContext().getResourceNamerFactory().createResourceNamer(this.vmName); + this.namer = this.manager().sdkContext().createIdentifierProvider(this.vmName); this.creatableSecondaryNetworkInterfaceKeys = new ArrayList<>(); this.existingSecondaryNetworkInterfacesToAssociate = new ArrayList<>(); this.virtualMachineExtensions = diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetImpl.java index f5e00bf8dc5ec..a9561db7fe70e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetImpl.java @@ -6,6 +6,7 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.SubResource; +import com.azure.core.management.provider.IdentifierProvider; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.compute.ComputeManager; import com.azure.resourcemanager.compute.models.AdditionalCapabilities; @@ -77,7 +78,6 @@ import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.GroupableParentResourceImpl; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.utils.ResourceNamer; import com.azure.resourcemanager.resources.fluentcore.utils.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.StorageManager; @@ -114,7 +114,7 @@ public class VirtualMachineScaleSetImpl private final StorageManager storageManager; private final NetworkManager networkManager; // used to generate unique name for any dependency resources - private final ResourceNamer namer; + private final IdentifierProvider namer; private boolean isMarketplaceLinuxImage = false; // name of an existing subnet in the primary network to use private String existingPrimaryNetworkSubnetNameToAssociate; @@ -168,7 +168,7 @@ public class VirtualMachineScaleSetImpl super(name, innerModel, computeManager); this.storageManager = storageManager; this.networkManager = networkManager; - this.namer = this.manager().sdkContext().getResourceNamerFactory().createResourceNamer(this.name()); + this.namer = this.manager().sdkContext().createIdentifierProvider(this.name()); this.managedDataDisks = new ManagedDataDiskCollection(this); this.virtualMachineScaleSetMsiHandler = new VirtualMachineScaleSetMsiHandler(authorizationManager, this); this.bootDiagnosticsHandler = new BootDiagnosticsHandler(this); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeManagementTest.java index 69c2041a220a9..f0265d6b25a9b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeManagementTest.java @@ -3,9 +3,15 @@ package com.azure.resourcemanager.compute; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.authorization.AuthorizationManager; import com.azure.resourcemanager.keyvault.KeyVaultManager; +import com.azure.resourcemanager.msi.MSIManager; import com.azure.resourcemanager.network.models.LoadBalancer; import com.azure.resourcemanager.network.models.LoadBalancerSkuType; import com.azure.resourcemanager.network.models.Network; @@ -13,27 +19,25 @@ import com.azure.resourcemanager.network.models.PublicIPSkuType; import com.azure.resourcemanager.network.models.TransportProtocol; import com.azure.resourcemanager.network.NetworkManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; import com.azure.resourcemanager.storage.StorageManager; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException; import java.io.IOException; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Assertions; -public abstract class ComputeManagementTest extends TestBase { - public ComputeManagementTest() { - super(TestBase.RunCondition.BOTH); - } - - public ComputeManagementTest(TestBase.RunCondition runCondition) { - super(runCondition); - } +public abstract class ComputeManagementTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected ComputeManager computeManager; @@ -41,21 +45,39 @@ public ComputeManagementTest(TestBase.RunCondition runCondition) { protected StorageManager storageManager; protected AuthorizationManager authorizationManager; protected KeyVaultManager keyVaultManager; + protected MSIManager msiManager; + + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); resourceManager = ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - computeManager = ComputeManager.authenticate(httpPipeline, profile, sdkContext); - networkManager = NetworkManager.authenticate(httpPipeline, profile, sdkContext); - storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); - keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile, sdkContext); - authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile, sdkContext); + msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeSkuTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeSkuTests.java index 8865870d62247..298fe5abf0d20 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeSkuTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeSkuTests.java @@ -15,7 +15,7 @@ import java.util.Map; import java.util.Set; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ManagedDiskOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ManagedDiskOperationsTests.java index b486cc8186367..935e3a9ba7e05 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ManagedDiskOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ManagedDiskOperationsTests.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/SharedGalleryImageTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/SharedGalleryImageTests.java index 2bd96e2ef58fd..f4ce90d18c140 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/SharedGalleryImageTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/SharedGalleryImageTests.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineUnmanagedDataDisk; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineAvailabilityZoneOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineAvailabilityZoneOperationsTests.java index d71b93438a864..f29b4581e5a8c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineAvailabilityZoneOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineAvailabilityZoneOperationsTests.java @@ -29,7 +29,7 @@ import java.util.Iterator; import java.util.Map; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineBootDiagnosticsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineBootDiagnosticsTests.java index 2e49ac258ef9c..3624f6f426092 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineBootDiagnosticsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineBootDiagnosticsTests.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -54,7 +54,7 @@ public void canEnableBootDiagnosticsWithImplicitStorageOnManagedVMCreation() { @Test public void canEnableBootDiagnosticsWithCreatableStorageOnManagedVMCreation() { - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); Creatable creatableStorageAccount = storageManager.storageAccounts().define(storageName).withRegion(region).withNewResourceGroup(rgName); @@ -80,7 +80,7 @@ public void canEnableBootDiagnosticsWithCreatableStorageOnManagedVMCreation() { @Test public void canEnableBootDiagnosticsWithExplicitStorageOnManagedVMCreation() { - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); StorageAccount storageAccount = storageManager .storageAccounts() @@ -171,7 +171,7 @@ public void bootDiagnosticsShouldUsesOSUnManagedDiskImplicitStorage() { @Test public void bootDiagnosticsShouldUseUnManagedDisksExplicitStorage() { - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); StorageAccount storageAccount = storageManager .storageAccounts() @@ -252,7 +252,7 @@ public void canEnableBootDiagnosticsWithImplicitStorageOnUnManagedVMCreation() { @Test public void canEnableBootDiagnosticsWithCreatableStorageOnUnManagedVMCreation() { - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); Creatable creatableStorageAccount = storageManager.storageAccounts().define(storageName).withRegion(region).withNewResourceGroup(rgName); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineCustomImageOperationsTest.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineCustomImageOperationsTest.java index f31287abee339..6c39d0cbc8dd5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineCustomImageOperationsTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineCustomImageOperationsTest.java @@ -19,7 +19,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineUnmanagedDataDisk; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import java.io.IOException; import java.util.Map; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineEMSILMSIOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineEMSILMSIOperationsTests.java index 7965dbd478c8e..c97c5548fa11d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineEMSILMSIOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineEMSILMSIOperationsTests.java @@ -3,7 +3,6 @@ package com.azure.resourcemanager.compute; -import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.ResourceIdentityType; @@ -11,41 +10,21 @@ import com.azure.resourcemanager.authorization.models.BuiltInRole; import com.azure.resourcemanager.authorization.models.RoleAssignment; import com.azure.resourcemanager.msi.models.Identity; -import com.azure.resourcemanager.msi.MSIManager; import com.azure.resourcemanager.network.models.Network; -import com.azure.resourcemanager.network.NetworkManager; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; -import com.azure.resourcemanager.resources.ResourceManager; -import java.io.IOException; import java.util.Iterator; import java.util.Set; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public class VirtualMachineEMSILMSIOperationsTests extends TestBase { +public class VirtualMachineEMSILMSIOperationsTests extends ComputeManagementTest { private String rgName = ""; private Region region = Region.fromName("West Central US"); private final String vmName = "javavm"; - private ComputeManager computeManager; - private MSIManager msiManager; - private ResourceManager resourceManager; - private NetworkManager networkManager; - - @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) - throws IOException { - this.msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); - this.resourceManager = msiManager.resourceManager(); - this.computeManager = ComputeManager.authenticate(httpPipeline, profile, sdkContext); - this.networkManager = NetworkManager.authenticate(httpPipeline, profile, sdkContext); - } - @Override protected void cleanUpResources() { this.resourceManager.resourceGroups().deleteByName(rgName); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineEncryptionOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineEncryptionOperationsTests.java index a96a75e5afd21..48951f9e42c6f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineEncryptionOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineEncryptionOperationsTests.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionOperationsTests.java index d67e7bb66b782..2a9092be371ea 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionOperationsTests.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineExtension; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.InputStream; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineManagedDiskOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineManagedDiskOperationsTests.java index c72a906bf7633..f2b23fbc35327 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineManagedDiskOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineManagedDiskOperationsTests.java @@ -22,7 +22,7 @@ import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import java.util.Map; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineManagedServiceIdentityOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineManagedServiceIdentityOperationsTests.java index c45c71adf9bcd..39f1e25d21f83 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineManagedServiceIdentityOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineManagedServiceIdentityOperationsTests.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.dag.TaskGroup; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java index 1bf08a91f2754..1bb37a0505da9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java @@ -38,7 +38,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.SkuName; import com.azure.resourcemanager.storage.models.StorageAccount; import java.util.ArrayList; @@ -655,7 +655,7 @@ public void canStreamParallelCreatedVirtualMachinesAndRelatedResources() throws @Test public void canSetStorageAccountForUnmanagedDisk() { - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); // Create a premium storage account for virtual machine data disk // StorageAccount storageAccount = diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachinePopularImageTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachinePopularImageTests.java index 4bd9b2e4627c1..46ba95052f9a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachinePopularImageTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachinePopularImageTests.java @@ -3,10 +3,10 @@ package com.azure.resourcemanager.compute; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.KnownWindowsVirtualMachineImage; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; import org.junit.jupiter.api.Test; @@ -16,14 +16,16 @@ import java.util.List; public class VirtualMachinePopularImageTests extends ComputeManagementTest { - private final String rgName = generateRandomResourceName("rg", 10); - - public VirtualMachinePopularImageTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } + private String rgName = ""; @Test + @DoNotRecord public void canCreateAllPopularImageVM() { + if (skipInPlayback()) { + return; + } + + rgName = generateRandomResourceName("rg", 10); List> vmFluxes = new ArrayList<>(); for (KnownWindowsVirtualMachineImage image : KnownWindowsVirtualMachineImage.values()) { Flux flux = computeManager.virtualMachines() diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineRelatedResourcesDeletionTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineRelatedResourcesDeletionTests.java index 969fccbfede2b..7405d6b9397c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineRelatedResourcesDeletionTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineRelatedResourcesDeletionTests.java @@ -5,6 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.management.exception.ManagementException; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.compute.models.AvailabilitySet; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.VirtualMachine; @@ -13,12 +14,11 @@ import com.azure.resourcemanager.network.models.NetworkInterface; import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import java.util.ArrayList; import java.util.Collection; @@ -31,9 +31,6 @@ import reactor.core.publisher.Mono; public class VirtualMachineRelatedResourcesDeletionTests extends ComputeManagementTest { - public VirtualMachineRelatedResourcesDeletionTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } private String rgName = ""; @@ -51,7 +48,12 @@ protected void cleanUpResources() { } @Test + @DoNotRecord public void canDeleteRelatedResourcesFromFailedParallelVMCreations() { + if (skipInPlayback()) { + return; + } + final int desiredVMCount = 40; final Region region = Region.US_EAST; final String resourceGroupName = rgName; @@ -73,7 +75,7 @@ public void canDeleteRelatedResourcesFromFailedParallelVMCreations() { Collection> relatedDefinitions = new ArrayList<>(); // Define a network for each VM - String networkName = sdkContext.randomResourceName("net", 14); + String networkName = generateRandomResourceName("net", 14); Creatable networkDefinition = networkManager .networks() @@ -84,7 +86,7 @@ public void canDeleteRelatedResourcesFromFailedParallelVMCreations() { relatedDefinitions.add(networkDefinition); // Define a PIP for each VM - String pipName = sdkContext.randomResourceName("pip", 14); + String pipName = generateRandomResourceName("pip", 14); PublicIpAddress.DefinitionStages.WithCreate pipDefinition = this .networkManager @@ -95,7 +97,7 @@ public void canDeleteRelatedResourcesFromFailedParallelVMCreations() { relatedDefinitions.add(pipDefinition); // Define a NIC for each VM - String nicName = sdkContext.randomResourceName("nic", 14); + String nicName = generateRandomResourceName("nic", 14); Creatable nicDefinition = networkManager .networkInterfaces() @@ -107,7 +109,7 @@ public void canDeleteRelatedResourcesFromFailedParallelVMCreations() { .withNewPrimaryPublicIPAddress(pipDefinition); // Define a storage account for each VM - String storageAccountName = sdkContext.randomResourceName("st", 14); + String storageAccountName = generateRandomResourceName("st", 14); Creatable storageAccountDefinition = storageManager .storageAccounts() @@ -117,7 +119,7 @@ public void canDeleteRelatedResourcesFromFailedParallelVMCreations() { relatedDefinitions.add(storageAccountDefinition); // Define an availability set for each VM - String availabilitySetName = sdkContext.randomResourceName("as", 14); + String availabilitySetName = generateRandomResourceName("as", 14); Creatable availabilitySetDefinition = computeManager .availabilitySets() @@ -126,7 +128,7 @@ public void canDeleteRelatedResourcesFromFailedParallelVMCreations() { .withExistingResourceGroup(resourceGroup); relatedDefinitions.add(availabilitySetDefinition); - String vmName = sdkContext.randomResourceName("vm", 14); + String vmName = generateRandomResourceName("vm", 14); // Define a VM String userName; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetBootDiagnosticsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetBootDiagnosticsTests.java index 3c671ac65b06a..9ac7c585e1f3e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetBootDiagnosticsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetBootDiagnosticsTests.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import java.util.ArrayList; import java.util.List; @@ -89,7 +89,7 @@ public void canEnableBootDiagnosticsWithImplicitStorageOnManagedVMSSCreation() t @Test public void canEnableBootDiagnosticsWithCreatableStorageOnManagedVMSSCreation() throws Exception { final String vmssName = generateRandomResourceName("vmss", 10); - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); ResourceGroup resourceGroup = this.resourceManager.resourceGroups().define(rgName).withRegion(region).create(); @@ -143,7 +143,7 @@ public void canEnableBootDiagnosticsWithCreatableStorageOnManagedVMSSCreation() @Test public void canEnableBootDiagnosticsWithExplicitStorageOnManagedVMSSCreation() throws Exception { final String vmssName = generateRandomResourceName("vmss", 10); - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); ResourceGroup resourceGroup = this.resourceManager.resourceGroups().define(rgName).withRegion(region).create(); @@ -325,7 +325,7 @@ public void bootDiagnosticsShouldUsesVMSSOSUnManagedDiskImplicitStorage() throws @Test public void bootDiagnosticsShouldUseVMSSUnManagedDisksExplicitStorage() throws Exception { - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); final String vmssName = generateRandomResourceName("vmss", 10); ResourceGroup resourceGroup = this.resourceManager.resourceGroups().define(rgName).withRegion(region).create(); @@ -395,7 +395,7 @@ public void bootDiagnosticsShouldUseVMSSUnManagedDisksExplicitStorage() throws E @Test public void canEnableBootDiagnosticsWithCreatableStorageOnUnManagedVMSSCreation() throws Exception { - final String storageName = sdkContext.randomResourceName("st", 14); + final String storageName = generateRandomResourceName("st", 14); final String vmssName = generateRandomResourceName("vmss", 10); ResourceGroup resourceGroup = this.resourceManager.resourceGroups().define(rgName).withRegion(region).create(); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetEMSILMSIOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetEMSILMSIOperationsTests.java index f840c615165cb..8576d7a8b03cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetEMSILMSIOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetEMSILMSIOperationsTests.java @@ -3,7 +3,6 @@ package com.azure.resourcemanager.compute; -import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.ResourceIdentityType; @@ -12,43 +11,23 @@ import com.azure.resourcemanager.authorization.models.BuiltInRole; import com.azure.resourcemanager.authorization.models.RoleAssignment; import com.azure.resourcemanager.msi.models.Identity; -import com.azure.resourcemanager.msi.MSIManager; import com.azure.resourcemanager.network.models.LoadBalancer; import com.azure.resourcemanager.network.models.Network; -import com.azure.resourcemanager.network.models.TransportProtocol; -import com.azure.resourcemanager.network.NetworkManager; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; -import com.azure.resourcemanager.resources.ResourceManager; -import java.io.IOException; import java.util.Iterator; import java.util.Set; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public class VirtualMachineScaleSetEMSILMSIOperationsTests extends TestBase { +public class VirtualMachineScaleSetEMSILMSIOperationsTests extends ComputeManagementTest { private String rgName = ""; private Region region = Region.fromName("West Central US"); private final String vmssName = "javavmss"; - private ComputeManager computeManager; - private MSIManager msiManager; - private ResourceManager resourceManager; - private NetworkManager networkManager; - - @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) - throws IOException { - this.msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); - this.resourceManager = msiManager.resourceManager(); - this.computeManager = ComputeManager.authenticate(httpPipeline, profile, sdkContext); - this.networkManager = NetworkManager.authenticate(httpPipeline, profile, sdkContext); - } - @Override protected void cleanUpResources() { this.resourceManager.resourceGroups().deleteByName(rgName); @@ -571,69 +550,6 @@ public void canUpdateVirtualMachineScaleSetWithEMSIAndLMSI() throws Exception { Assertions.assertNotNull(virtualMachineScaleSet.systemAssignedManagedServiceIdentityTenantId()); } - private LoadBalancer createInternalLoadBalancer( - Region region, ResourceGroup resourceGroup, Network network, String id) throws Exception { - final String loadBalancerName = generateRandomResourceName("InternalLb" + id + "-", 18); - final String privateFrontEndName = loadBalancerName + "-FE1"; - final String backendPoolName1 = loadBalancerName + "-BAP1"; - final String backendPoolName2 = loadBalancerName + "-BAP2"; - final String natPoolName1 = loadBalancerName + "-INP1"; - final String natPoolName2 = loadBalancerName + "-INP2"; - final String subnetName = "subnet1"; - - LoadBalancer loadBalancer = - this - .networkManager - .loadBalancers() - .define(loadBalancerName) - .withRegion(region) - .withExistingResourceGroup(resourceGroup) - // Add two rules that uses above backend and probe - .defineLoadBalancingRule("httpRule") - .withProtocol(TransportProtocol.TCP) - .fromFrontend(privateFrontEndName) - .fromFrontendPort(1000) - .toBackend(backendPoolName1) - .withProbe("httpProbe") - .attach() - .defineLoadBalancingRule("httpsRule") - .withProtocol(TransportProtocol.TCP) - .fromFrontend(privateFrontEndName) - .fromFrontendPort(1001) - .toBackend(backendPoolName2) - .withProbe("httpsProbe") - .attach() - - // Add two NAT pools to enable direct VM connectivity to port 44 and 45 - .defineInboundNatPool(natPoolName1) - .withProtocol(TransportProtocol.TCP) - .fromFrontend(privateFrontEndName) - .fromFrontendPortRange(8000, 8099) - .toBackendPort(44) - .attach() - .defineInboundNatPool(natPoolName2) - .withProtocol(TransportProtocol.TCP) - .fromFrontend(privateFrontEndName) - .fromFrontendPortRange(9000, 9099) - .toBackendPort(45) - .attach() - - // Explicitly define the frontend - .definePrivateFrontend(privateFrontEndName) - .withExistingSubnet(network, subnetName) // Frontend with VNET means internal load-balancer - .attach() - - // Add two probes one per rule - .defineHttpProbe("httpProbe") - .withRequestPath("/") - .attach() - .defineHttpProbe("httpsProbe") - .withRequestPath("/") - .attach() - .create(); - return loadBalancer; - } - private Mono lookupRoleAssignmentUsingScopeAndRoleAsync( final String scope, BuiltInRole role, final String principalId) { return this diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetManagedDiskOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetManagedDiskOperationsTests.java index 277f7757115e9..0bd121a3e4454 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetManagedDiskOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetManagedDiskOperationsTests.java @@ -22,7 +22,7 @@ import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import java.util.Iterator; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java index 16e98bc1035dd..236b8030c2ca5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java @@ -49,7 +49,7 @@ import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.models.StorageAccountKey; import com.microsoft.azure.storage.CloudStorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml index b1235453a41d5..8158cf7d4bb98 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml @@ -94,9 +94,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java index 91a2faed93a9b..8ddf37199dbfb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.StorageManager; @@ -97,8 +97,8 @@ private ContainerInstanceManager(HttpPipeline httpPipeline, AzureProfile profile profile, new ContainerInstanceManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/test/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/test/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementTest.java index 71335df27ad00..f9e51ceca9350 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/test/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/test/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementTest.java @@ -3,25 +3,50 @@ package com.azure.resourcemanager.containerinstance; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; -import java.io.IOException; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; -public class ContainerInstanceManagementTest extends TestBase { +import java.time.temporal.ChronoUnit; +import java.util.List; + +public class ContainerInstanceManagementTest extends ResourceManagerTestBase { protected ContainerInstanceManager containerInstanceManager; protected String rgName = ""; - public ContainerInstanceManagementTest() { - } - - ContainerInstanceManagementTest(RunCondition runCondition) { - super(runCondition); + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); } @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) throws IOException { + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { rgName = generateRandomResourceName("rg", 20); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); containerInstanceManager = ContainerInstanceManager.authenticate(httpPipeline, profile, sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml index 086446361d698..34b968a338b5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml @@ -80,9 +80,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java index a738f860d392d..4496c74009c53 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.StorageManager; @@ -105,8 +105,8 @@ private ContainerRegistryManager(HttpPipeline httpPipeline, AzureProfile profile profile, new ContainerRegistryManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); this.storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryTest.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryTest.java index a6fc511eb639b..b05b223b49132 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryTest.java @@ -3,24 +3,49 @@ package com.azure.resourcemanager.containerregistry; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.test.ResourceManagerTestBase; + +import java.time.temporal.ChronoUnit; +import java.util.List; /** The base for storage manager tests. */ -public abstract class RegistryTest extends TestBase { +public abstract class RegistryTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected ContainerRegistryManager registryManager; protected String rgName; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - - registryManager = ContainerRegistryManager.authenticate(httpPipeline, profile, sdkContext); - + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + registryManager = ContainerRegistryManager.authenticate(httpPipeline, profile); rgName = generateRandomResourceName("rgacr", 10); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml index f29cbaa759878..93e979909fdf6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml @@ -75,9 +75,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java index b550a5ecb435f..ebaa0c6ff847c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -90,9 +90,9 @@ private ContainerServiceManager(HttpPipeline httpPipeline, AzureProfile profile, httpPipeline, profile, new ContainerServiceManagementClientBuilder() - .endpoint(profile.environment().getResourceManagerEndpoint()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .pipeline(httpPipeline) - .subscriptionId(profile.subscriptionId()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementTest.java index 1045832e5270e..91bd9cdf2ebe0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementTest.java @@ -3,25 +3,52 @@ package com.azure.resourcemanager.containerservice; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; -import com.azure.resourcemanager.resources.core.TestBase; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; -public class ContainerServiceManagementTest extends TestBase { +import java.time.temporal.ChronoUnit; +import java.util.List; + +public class ContainerServiceManagementTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected ContainerServiceManager containerServiceManager; protected String rgName = ""; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); rgName = generateRandomResourceName("javaacsrg", 15); - resourceManager = ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); - containerServiceManager = ContainerServiceManager.authenticate(httpPipeline, profile); - resourceManager.resourceGroups().define(rgName).withRegion(Region.US_EAST).create(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java index 156312ef9bb97..f9f9e940c8489 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java @@ -27,9 +27,9 @@ public class KubernetesClustersTests extends ContainerServiceManagementTest { @Test public void canCRUDKubernetesCluster() throws Exception { - String aksName = sdkContext.randomResourceName("aks", 15); - String dnsPrefix = sdkContext.randomResourceName("dns", 10); - String agentPoolName = sdkContext.randomResourceName("ap0", 10); + String aksName = generateRandomResourceName("aks", 15); + String dnsPrefix = generateRandomResourceName("dns", 10); + String agentPoolName = generateRandomResourceName("ap0", 10); String servicePrincipalClientId = "spId"; String servicePrincipalSecret = "spSecret"; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml index 8640c6875002c..7ec4aca7a4fd6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml @@ -87,9 +87,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java index 1024c9c808ce7..974efd141866a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -85,9 +85,9 @@ private CosmosManager(HttpPipeline httpPipeline, AzureProfile profile, SdkContex httpPipeline, profile, new CosmosDBManagementClientBuilder() - .endpoint(profile.environment().getResourceManagerEndpoint()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .pipeline(httpPipeline) - .subscriptionId(profile.subscriptionId()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java index bb39c23d67a9d..59e2bc426d8cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java @@ -3,7 +3,12 @@ package com.azure.resourcemanager.cosmos; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.cosmos.models.ConnectorOffer; import com.azure.resourcemanager.cosmos.models.CosmosDBAccount; import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind; @@ -15,37 +20,52 @@ import com.azure.resourcemanager.network.models.ServiceEndpointType; import com.azure.resourcemanager.network.NetworkManager; import com.azure.resourcemanager.network.fluent.inner.PrivateEndpointInner; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import java.io.IOException; +import java.time.temporal.ChronoUnit; import java.util.Arrays; +import java.util.List; import java.util.Map; -public class CosmosDBTests extends TestBase { +public class CosmosDBTests extends ResourceManagerTestBase { private String rgName = ""; protected ResourceManager resourceManager; protected CosmosManager cosmosManager; protected NetworkManager networkManager; - // final String sqlPrimaryServerName = sdkContext.randomResourceName("sqlpri", 22); - public CosmosDBTests() { - super(TestBase.RunCondition.BOTH); + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); } @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) - throws IOException { + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); rgName = generateRandomResourceName("rgcosmosdb", 20); resourceManager = ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); - cosmosManager = CosmosManager.authenticate(httpPipeline, profile); - networkManager = NetworkManager.authenticate(httpPipeline, profile); } @@ -56,7 +76,7 @@ protected void cleanUpResources() { @Test public void canCreateCosmosDbSqlAccount() { - final String cosmosDbAccountName = sdkContext.randomResourceName("cosmosdb", 22); + final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22); CosmosDBAccount cosmosDBAccount = cosmosManager @@ -83,11 +103,11 @@ public void canCreateCosmosDbSqlAccount() { @Test public void canCreateSqlPrivateEndpoint() { - final String cosmosDbAccountName = sdkContext.randomResourceName("cosmosdb", 22); - final String networkName = sdkContext.randomResourceName("network", 22); - final String subnetName = sdkContext.randomResourceName("subnet", 22); - final String plsConnectionName = sdkContext.randomResourceName("plsconnect", 22); - final String pedName = sdkContext.randomResourceName("ped", 22); + final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22); + final String networkName = generateRandomResourceName("network", 22); + final String subnetName = generateRandomResourceName("subnet", 22); + final String plsConnectionName = generateRandomResourceName("plsconnect", 22); + final String pedName = generateRandomResourceName("ped", 22); final Region region = Region.US_WEST; cosmosManager.resourceManager().resourceGroups().define(rgName).withRegion(region).create(); @@ -170,7 +190,7 @@ public void canCreateSqlPrivateEndpoint() { @Test public void canCreateCosmosDbMongoDBAccount() { - final String cosmosDbAccountName = sdkContext.randomResourceName("cosmosdb", 22); + final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22); CosmosDBAccount cosmosDBAccount = cosmosManager @@ -195,7 +215,7 @@ public void canCreateCosmosDbMongoDBAccount() { @Test public void canCreateCosmosDbCassandraAccount() { - final String cosmosDbAccountName = sdkContext.randomResourceName("cosmosdb", 22); + final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22); CosmosDBAccount cosmosDBAccount = cosmosManager @@ -221,7 +241,7 @@ public void canCreateCosmosDbCassandraAccount() { @Test public void canUpdateCosmosDbCassandraConnector() { - final String cosmosDbAccountName = sdkContext.randomResourceName("cosmosdb", 22); + final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22); // CassandraConnector could only be used in West US and South Central US. CosmosDBAccount cosmosDBAccount = @@ -247,7 +267,7 @@ public void canUpdateCosmosDbCassandraConnector() { @Test public void canCreateCosmosDbAzureTableAccount() { - final String cosmosDbAccountName = sdkContext.randomResourceName("cosmosdb", 22); + final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22); CosmosDBAccount cosmosDBAccount = cosmosManager diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml index e6cf75cc79174..b51f000f884e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml @@ -85,9 +85,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java index 7a6ca304d8ae9..d8e051dced9ea 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -88,7 +88,8 @@ private DnsZoneManager(HttpPipeline httpPipeline, AzureProfile profile, SdkConte profile, new DnsManagementClientBuilder() .pipeline(httpPipeline) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/test/java/com/azure/resourcemanager/dns/DnsZoneRecordSetETagTests.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/test/java/com/azure/resourcemanager/dns/DnsZoneRecordSetETagTests.java index a6a6f3d0275c0..0e4362bc5cf96 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/test/java/com/azure/resourcemanager/dns/DnsZoneRecordSetETagTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/test/java/com/azure/resourcemanager/dns/DnsZoneRecordSetETagTests.java @@ -3,7 +3,12 @@ package com.azure.resourcemanager.dns; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; @@ -13,29 +18,50 @@ import com.azure.resourcemanager.dns.models.CaaRecordSet; import com.azure.resourcemanager.dns.models.DnsZone; import com.azure.resourcemanager.dns.models.ZoneType; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class DnsZoneRecordSetETagTests extends TestBase { - private String rgName = ""; +import java.time.temporal.ChronoUnit; +import java.util.List; - public DnsZoneRecordSetETagTests() { - super(TestBase.RunCondition.BOTH); - } +public class DnsZoneRecordSetETagTests extends ResourceManagerTestBase { + private String rgName = ""; protected ResourceManager resourceManager; protected DnsZoneManager zoneManager; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - zoneManager = DnsZoneManager.authenticate(httpPipeline, profile, sdkContext); + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + zoneManager = DnsZoneManager.authenticate(httpPipeline, profile); rgName = generateRandomResourceName("dnsetagtest", 15); } diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml index 2a1ce1af63f82..8bc0234f55447 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml @@ -78,9 +78,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java index 6941b51a29272..38a464f49588e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java @@ -22,7 +22,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.StorageManager; @@ -112,8 +112,8 @@ private EventHubsManager(HttpPipeline httpPipeline, AzureProfile profile, SdkCon profile, new EventHubManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext ); diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java index 755053ce109c5..4b4a0fc52581e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java @@ -3,7 +3,12 @@ package com.azure.resourcemanager.eventhubs; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.eventhubs.models.AccessRights; import com.azure.resourcemanager.eventhubs.models.DisasterRecoveryPairingAuthorizationKey; @@ -18,33 +23,56 @@ import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceSkuType; import com.azure.resourcemanager.eventhubs.models.ProvisioningStateDR; import com.azure.resourcemanager.resources.ResourceManager; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.StorageManager; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.models.StorageAccountSkuType; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.Exceptions; +import java.time.temporal.ChronoUnit; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -public class EventHubTests extends TestBase { +public class EventHubTests extends ResourceManagerTestBase { protected EventHubsManager eventHubsManager; protected StorageManager storageManager; protected ResourceManager resourceManager; private String rgName = ""; private final Region region = Region.US_EAST; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); eventHubsManager = EventHubsManager.authenticate(httpPipeline, profile); storageManager = StorageManager.authenticate(httpPipeline, profile); resourceManager = ResourceManager diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml index 5150d2458af80..75b96fff9410b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml @@ -88,9 +88,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java index 7437f3a900ce0..593633e4622ad 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -97,12 +97,12 @@ private KeyVaultManager( profile, new KeyVaultManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile, sdkContext); - this.tenantId = profile.tenantId(); + this.tenantId = profile.getTenantId(); } /** @return the KeyVault account management API entry point */ diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyTests.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyTests.java index 032e5acec18c9..4ab0165e3b344 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyTests.java @@ -4,9 +4,9 @@ package com.azure.resourcemanager.keyvault; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.keyvault.models.Key; import com.azure.resourcemanager.keyvault.models.Vault; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -30,14 +30,15 @@ public class KeyTests extends KeyVaultManagementTest { - public KeyTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } - @Test + @DoNotRecord public void canCRUDKey() throws Exception { + if (skipInPlayback()) { + return; + } + Vault vault = createVault(); - String keyName = sdkContext.randomResourceName("key", 20); + String keyName = generateRandomResourceName("key", 20); // Create Key key = @@ -105,9 +106,14 @@ public void canCRUDKey() throws Exception { } @Test + @DoNotRecord public void canImportKey() throws Exception { + if (skipInPlayback()) { + return; + } + Vault vault = createVault(); - String keyName = sdkContext.randomResourceName("key", 20); + String keyName = generateRandomResourceName("key", 20); Key key = vault @@ -121,9 +127,14 @@ public void canImportKey() throws Exception { } @Test + @DoNotRecord public void canBackupAndRestore() throws Exception { + if (skipInPlayback()) { + return; + } + Vault vault = createVault(); - String keyName = sdkContext.randomResourceName("key", 20); + String keyName = generateRandomResourceName("key", 20); Key key = vault @@ -147,9 +158,14 @@ public void canBackupAndRestore() throws Exception { } @Test + @DoNotRecord public void canEncryptAndDecrypt() throws Exception { + if (skipInPlayback()) { + return; + } + Vault vault = createVault(); - String keyName = sdkContext.randomResourceName("key", 20); + String keyName = generateRandomResourceName("key", 20); KeyPair keyPair = KeyPairGenerator.getInstance("RSA").generateKeyPair(); @@ -177,9 +193,14 @@ public void canEncryptAndDecrypt() throws Exception { } @Test + @DoNotRecord public void canSignAndVerify() throws Exception { + if (skipInPlayback()) { + return; + } + Vault vault = createVault(); - String keyName = sdkContext.randomResourceName("key", 20); + String keyName = generateRandomResourceName("key", 20); KeyPair keyPair = KeyPairGenerator.getInstance("RSA").generateKeyPair(); @@ -204,9 +225,14 @@ public void canSignAndVerify() throws Exception { } @Test + @DoNotRecord public void canWrapAndUnwrap() throws Exception { + if (skipInPlayback()) { + return; + } + Vault vault = createVault(); - String keyName = sdkContext.randomResourceName("key", 20); + String keyName = generateRandomResourceName("key", 20); Key key = vault @@ -226,7 +252,7 @@ public void canWrapAndUnwrap() throws Exception { } private Vault createVault() throws Exception { - String vaultName = sdkContext.randomResourceName("vault", 20); + String vaultName = generateRandomResourceName("vault", 20); Vault vault = keyVaultManager diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyVaultManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyVaultManagementTest.java index 2ef8912fe7b8e..385495935688f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyVaultManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyVaultManagementTest.java @@ -3,26 +3,47 @@ package com.azure.resourcemanager.keyvault; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.authorization.AuthorizationManager; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; + +import java.time.temporal.ChronoUnit; +import java.util.List; /** The base for KeyVault manager tests. */ -public class KeyVaultManagementTest extends TestBase { +public class KeyVaultManagementTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected KeyVaultManager keyVaultManager; protected AuthorizationManager authorizationManager; protected String rgName = ""; protected String vaultName = ""; - public KeyVaultManagementTest() { - super(); - } - - public KeyVaultManagementTest(RunCondition runCondition) { - super(runCondition); + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); } @Override @@ -30,12 +51,11 @@ protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile rgName = generateRandomResourceName("javacsmrg", 15); vaultName = generateRandomResourceName("java-keyvault-", 20); + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - - authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile, sdkContext); - - keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile, sdkContext); + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile); + keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/SecretTests.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/SecretTests.java index 71c8460b8a486..cf427019a1b6a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/SecretTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/SecretTests.java @@ -3,9 +3,9 @@ package com.azure.resourcemanager.keyvault; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.keyvault.models.Secret; import com.azure.resourcemanager.keyvault.models.Vault; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import org.junit.jupiter.api.Assertions; @@ -13,14 +13,15 @@ public class SecretTests extends KeyVaultManagementTest { - public SecretTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } - @Test + @DoNotRecord public void canCRUDSecret() throws Exception { - String vaultName = sdkContext.randomResourceName("vault", 20); - String secretName = sdkContext.randomResourceName("secret", 20); + if (skipInPlayback()) { + return; + } + + String vaultName = generateRandomResourceName("vault", 20); + String secretName = generateRandomResourceName("secret", 20); Vault vault = keyVaultManager diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/VaultTests.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/VaultTests.java index b60b9409ee5aa..b744a712a6c92 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/VaultTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/VaultTests.java @@ -22,8 +22,8 @@ public class VaultTests extends KeyVaultManagementTest { @Test public void canCRUDVault() throws Exception { // Create user service principal - String sp = sdkContext.randomResourceName("sp", 20); - String us = sdkContext.randomResourceName("us", 20); + String sp = generateRandomResourceName("sp", 20); + String us = generateRandomResourceName("us", 20); ServicePrincipal servicePrincipal = authorizationManager.servicePrincipals().define(sp).withNewApplication("http://" + sp).create(); @@ -121,8 +121,8 @@ public void canCRUDVault() throws Exception { @Test public void canCRUDVaultAsync() throws Exception { // Create user service principal - String sp = sdkContext.randomResourceName("sp", 20); - String us = sdkContext.randomResourceName("us", 20); + String sp = generateRandomResourceName("sp", 20); + String us = generateRandomResourceName("us", 20); ServicePrincipal servicePrincipal = authorizationManager.servicePrincipals().define(sp).withNewApplication("http://" + sp).create(); @@ -216,8 +216,8 @@ public void canCRUDVaultAsync() throws Exception { @Test public void canEnableSoftDeleteAndPurge() throws InterruptedException { String otherVaultName = vaultName + "other"; - String sp = sdkContext.randomResourceName("sp", 20); - String us = sdkContext.randomResourceName("us", 20); + String sp = generateRandomResourceName("sp", 20); + String us = generateRandomResourceName("us", 20); ServicePrincipal servicePrincipal = authorizationManager.servicePrincipals().define(sp).withNewApplication("http://" + sp).create(); diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml index 55915ef154633..86fcf43ddc985 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml @@ -69,9 +69,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java index 96c911678a5b3..67a2ec3390e0e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -148,8 +148,8 @@ private MonitorManager(HttpPipeline httpPipeline, AzureProfile profile, SdkConte profile, new MonitorClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java index 80e2b5b42d64b..66024a7827afd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.monitor.models.ActionGroup; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java index ed61e2e5bbc62..2dcbd037c9249 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.monitor.models.MetricDynamicAlertCondition; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import java.time.Duration; import java.time.OffsetDateTime; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java index 6b6aff487af39..b0ccaee46dd56 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.monitor.models.TimeAggregationType; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java index 0d02c06e44f7f..e4fb62f534d60 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java @@ -5,7 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.monitor.models.DiagnosticSetting; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; public class DiagnosticSettingsTests extends MonitorManagementTest { diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java index a17bc007151b8..515757d3a4fe3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java @@ -20,7 +20,7 @@ public class MonitorActivityAndMetricsTests extends MonitorManagementTest { @Test public void canListEventsAndMetrics() throws Exception { - OffsetDateTime recordDateTime = sdkContext.dateTimeNow().minusDays(40); + OffsetDateTime recordDateTime = OffsetDateTime.parse("2020-06-22T21:44:57.424+08:00").minusDays(40); VirtualMachine vm = computeManager.virtualMachines().list().iterator().next(); // Metric Definition diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorManagementTest.java index 592e9ab387fae..c13801338d22c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorManagementTest.java @@ -3,17 +3,29 @@ package com.azure.resourcemanager.monitor; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.appservice.AppServiceManager; import com.azure.resourcemanager.compute.ComputeManager; // import com.azure.management.eventhub.implementation.EventHubManager; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.StorageManager; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; + +import java.time.temporal.ChronoUnit; +import java.util.List; /** The base for Monitor manager tests. */ -public class MonitorManagementTest extends TestBase { +public class MonitorManagementTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected MonitorManager monitorManager; protected ComputeManager computeManager; @@ -22,18 +34,34 @@ public class MonitorManagementTest extends TestBase { protected AppServiceManager appServiceManager; @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { - - appServiceManager = AppServiceManager.authenticate(httpPipeline, profile, sdkContext); + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); + appServiceManager = AppServiceManager.authenticate(httpPipeline, profile); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - - monitorManager = MonitorManager.authenticate(httpPipeline, profile, sdkContext); - + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + monitorManager = MonitorManager.authenticate(httpPipeline, profile); computeManager = ComputeManager.authenticate(httpPipeline, profile, sdkContext); - - storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); + storageManager = StorageManager.authenticate(httpPipeline, profile); // eventHubManager = EventHubManager // .authenticate(restClient, defaultSubscription, sdkContext); diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml index 142dbb6d26235..2b6e3173eb2e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml @@ -68,9 +68,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java index b613b03cddc93..141a9f3c466d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -96,8 +96,8 @@ public MSIManager authenticate(TokenCredential credential, AzureProfile profile) private MSIManager(HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { super(httpPipeline, profile, new ManagedServiceIdentityClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); authorizationManager = AuthorizationManager.authenticate(httpPipeline, diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/test/java/com/azure/resourcemanager/msi/MSIIdentityManagementTests.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/test/java/com/azure/resourcemanager/msi/MSIIdentityManagementTests.java index 1f2e5d8926a04..dfa8d0ae6a7b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/test/java/com/azure/resourcemanager/msi/MSIIdentityManagementTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/test/java/com/azure/resourcemanager/msi/MSIIdentityManagementTests.java @@ -3,27 +3,35 @@ package com.azure.resourcemanager.msi; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.authorization.models.BuiltInRole; import com.azure.resourcemanager.authorization.models.RoleAssignment; import com.azure.resourcemanager.msi.models.Identity; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import java.io.IOException; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; -public class MSIIdentityManagementTests extends TestBase { +public class MSIIdentityManagementTests extends ResourceManagerTestBase { private String rgName = ""; private Region region = Region.fromName("West Central US"); @@ -31,7 +39,28 @@ public class MSIIdentityManagementTests extends TestBase { private ResourceManager resourceManager; @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) throws IOException { + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + + @Override + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); this.msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); this.resourceManager = msiManager.resourceManager(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml index b76e9f4becb46..e7099afae1c1f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml @@ -73,9 +73,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java index 27406c0c22506..a1b2dcf764c1c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java @@ -41,7 +41,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -136,8 +136,8 @@ private NetworkManager(HttpPipeline httpPipeline, AzureProfile profile, SdkConte profile, new NetworkManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceImpl.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceImpl.java index 35fbc4b453ed2..ee8291e1f68b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceImpl.java @@ -3,6 +3,7 @@ package com.azure.resourcemanager.network.implementation; +import com.azure.core.management.provider.IdentifierProvider; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.network.NetworkManager; import com.azure.resourcemanager.network.models.IpAllocationMethod; @@ -22,7 +23,6 @@ import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.utils.ResourceNamer; import com.azure.resourcemanager.resources.fluentcore.utils.Utils; import java.util.ArrayList; import java.util.Collections; @@ -44,7 +44,7 @@ class NetworkInterfaceImpl /** the name of the network interface. */ private final String nicName; /** used to generate unique name for any dependency resources. */ - protected final ResourceNamer namer; + protected final IdentifierProvider namer; /** references to all ip configuration. */ private Map nicIPConfigurations; /** unique key of a creatable network security group to be associated with the network interface. */ @@ -57,7 +57,7 @@ class NetworkInterfaceImpl NetworkInterfaceImpl(String name, NetworkInterfaceInner innerModel, final NetworkManager networkManager) { super(name, innerModel, networkManager); this.nicName = name; - this.namer = this.manager().sdkContext().getResourceNamerFactory().createResourceNamer(this.nicName); + this.namer = this.manager().sdkContext().createIdentifierProvider(this.nicName); initializeChildrenFromInner(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationGatewayTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationGatewayTests.java index 1607c685e969e..0e6e9245d03e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationGatewayTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationGatewayTests.java @@ -38,8 +38,8 @@ public class ApplicationGatewayTests extends NetworkManagementTest { @Test public void canCRUDApplicationGatewayWithWAF() throws Exception { - String appGatewayName = sdkContext.randomResourceName("agwaf", 15); - String appPublicIp = sdkContext.randomResourceName("pip", 15); + String appGatewayName = generateRandomResourceName("agwaf", 15); + String appPublicIp = generateRandomResourceName("pip", 15); PublicIpAddress pip = networkManager .publicIpAddresses() @@ -132,9 +132,9 @@ public void canCRUDApplicationGatewayWithWAF() throws Exception { @Test @Disabled("Need client id for key vault usage") public void canCreateApplicationGatewayWithSecret() throws Exception { - String appGatewayName = sdkContext.randomResourceName("agwaf", 15); - String appPublicIp = sdkContext.randomResourceName("pip", 15); - String identityName = sdkContext.randomResourceName("id", 10); + String appGatewayName = generateRandomResourceName("agwaf", 15); + String appPublicIp = generateRandomResourceName("pip", 15); + String identityName = generateRandomResourceName("id", 10); PublicIpAddress pip = networkManager @@ -200,8 +200,8 @@ public void canCreateApplicationGatewayWithSecret() throws Exception { } private Secret createKeyVaultSecret(String servicePrincipal, String identityPrincipal) throws Exception { - String vaultName = sdkContext.randomResourceName("vlt", 10); - String secretName = sdkContext.randomResourceName("srt", 10); + String vaultName = generateRandomResourceName("vlt", 10); + String secretName = generateRandomResourceName("srt", 10); String secretValue = Files .readFirstLine( diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationSecurityGroupTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationSecurityGroupTests.java index e92818266fb89..11405e7ea3c3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationSecurityGroupTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationSecurityGroupTests.java @@ -14,7 +14,7 @@ public class ApplicationSecurityGroupTests extends NetworkManagementTest { @Test public void canCRUDApplicationSecurityGroup() throws Exception { - String asgName = sdkContext.randomResourceName("asg", 15); + String asgName = generateRandomResourceName("asg", 15); ApplicationSecurityGroup applicationSecurityGroup = networkManager diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java index 01142f01e0e39..e7736985fbd6f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java @@ -13,7 +13,7 @@ public class DdosProtectionPlanTests extends NetworkManagementTest { @Test public void canCRUDDdosProtectionPlan() throws Exception { - String ppName = sdkContext.randomResourceName("ddosplan", 15); + String ppName = generateRandomResourceName("ddosplan", 15); DdosProtectionPlan pPlan = networkManager diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/LoadBalancerTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/LoadBalancerTests.java index b07c9d7ff2336..a872cafd4c615 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/LoadBalancerTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/LoadBalancerTests.java @@ -22,8 +22,8 @@ public class LoadBalancerTests extends NetworkManagementTest { @Test public void canCRUDProbe() throws Exception { - String vmName = sdkContext.randomResourceName("vm", 8); - String lbName = sdkContext.randomResourceName("lb", 8); + String vmName = generateRandomResourceName("vm", 8); + String lbName = generateRandomResourceName("lb", 8); ResourceGroup resourceGroup = resourceManager.resourceGroups().define(rgName).withRegion(Region.US_EAST).create(); diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkInterfaceOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkInterfaceOperationsTests.java index 774094b87b73b..fabff572230b3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkInterfaceOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkInterfaceOperationsTests.java @@ -31,10 +31,10 @@ public class NetworkInterfaceOperationsTests extends NetworkManagementTest { @Test @SuppressWarnings({"unchecked", "rawtypes"}) public void canUseMultipleIPConfigs() throws Exception { - String networkName = sdkContext.randomResourceName("net", 15); + String networkName = generateRandomResourceName("net", 15); String[] nicNames = new String[3]; for (int i = 0; i < nicNames.length; i++) { - nicNames[i] = sdkContext.randomResourceName("nic", 15); + nicNames[i] = generateRandomResourceName("nic", 15); } Network network = diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkManagementTest.java index 629458265ffcb..2ae87b6a38298 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkManagementTest.java @@ -3,32 +3,61 @@ package com.azure.resourcemanager.network; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.keyvault.KeyVaultManager; import com.azure.resourcemanager.msi.MSIManager; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; -public class NetworkManagementTest extends TestBase { +import java.time.temporal.ChronoUnit; +import java.util.List; + +public class NetworkManagementTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected NetworkManager networkManager; protected KeyVaultManager keyVaultManager; protected MSIManager msiManager; protected String rgName = ""; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); rgName = generateRandomResourceName("javanwmrg", 15); - resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); networkManager = NetworkManager.authenticate(httpPipeline, profile, sdkContext); - - keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile, sdkContext); - - msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); + keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile); + msiManager = MSIManager.authenticate(httpPipeline, profile); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkWatcherTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkWatcherTests.java index 6b75d6f4809e8..0dc30386035aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkWatcherTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkWatcherTests.java @@ -17,7 +17,7 @@ public class NetworkWatcherTests extends NetworkManagementTest { @Test @Disabled("https://github.com/Azure/azure-rest-api-specs/issues/7579") public void canListProvidersAndGetReachabilityReport() throws Exception { - String nwName = sdkContext.randomResourceName("nw", 8); + String nwName = generateRandomResourceName("nw", 8); Region region = Region.US_WEST; // make sure Network Watcher is disabled in current subscription and region as only one can exist PagedIterable nwList = networkManager.networkWatchers().list(); diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/RouteFilterTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/RouteFilterTests.java index be5ea51af22dc..ec9aab5b15a87 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/RouteFilterTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/RouteFilterTests.java @@ -15,7 +15,7 @@ public class RouteFilterTests extends NetworkManagementTest { @Test public void canCRUDRouteFilter() throws Exception { - String rfName = sdkContext.randomResourceName("rf", 15); + String rfName = generateRandomResourceName("rf", 15); RouteFilter routeFilter = networkManager @@ -40,7 +40,7 @@ public void canCRUDRouteFilter() throws Exception { @Test public void canCreateRouteFilterRule() throws Exception { - String rfName = sdkContext.randomResourceName("rf", 15); + String rfName = generateRandomResourceName("rf", 15); String ruleName = "mynewrule"; RouteFilter routeFilter = networkManager diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml index a12cafcf01404..2b1242f3ac55b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml @@ -79,9 +79,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java index 4cd6d06188b42..a6428a0ebca61 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -87,7 +87,8 @@ private PrivateDnsZoneManager(HttpPipeline httpPipeline, AzureProfile profile, S profile, new PrivateDnsManagementClientBuilder() .pipeline(httpPipeline) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext ); diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneRecordSetETagTests.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneRecordSetETagTests.java index 30be80fc39f69..f40f0bd874477 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneRecordSetETagTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneRecordSetETagTests.java @@ -2,7 +2,12 @@ // Licensed under the MIT License. package com.azure.resourcemanager.privatedns; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; @@ -10,29 +15,50 @@ import com.azure.resourcemanager.privatedns.models.AaaaRecordSet; import com.azure.resourcemanager.privatedns.models.CnameRecordSet; import com.azure.resourcemanager.privatedns.models.PrivateDnsZone; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class PrivateDnsZoneRecordSetETagTests extends TestBase { - private String rgName = ""; +import java.time.temporal.ChronoUnit; +import java.util.List; - public PrivateDnsZoneRecordSetETagTests() { - super(TestBase.RunCondition.BOTH); - } +public class PrivateDnsZoneRecordSetETagTests extends ResourceManagerTestBase { + private String rgName = ""; protected ResourceManager resourceManager; protected PrivateDnsZoneManager privateZoneManager; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - privateZoneManager = PrivateDnsZoneManager.authenticate(httpPipeline, profile, sdkContext); + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + privateZoneManager = PrivateDnsZoneManager.authenticate(httpPipeline, profile); rgName = generateRandomResourceName("prdnsrstest", 15); } diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/VirtualNetworkLinkETagTests.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/VirtualNetworkLinkETagTests.java index 20cdaf3fbd740..8301ac875c706 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/VirtualNetworkLinkETagTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/VirtualNetworkLinkETagTests.java @@ -2,7 +2,12 @@ // Licensed under the MIT License. package com.azure.resourcemanager.privatedns; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; @@ -12,14 +17,20 @@ import com.azure.resourcemanager.privatedns.models.PrivateDnsZone; import com.azure.resourcemanager.privatedns.models.VirtualNetworkLink; import com.azure.resourcemanager.resources.ResourceManager; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class VirtualNetworkLinkETagTests extends TestBase { +import java.time.temporal.ChronoUnit; +import java.util.List; + +public class VirtualNetworkLinkETagTests extends ResourceManagerTestBase { private final Region region = Region.US_WEST; private String rgName = ""; @@ -28,20 +39,35 @@ public class VirtualNetworkLinkETagTests extends TestBase { private String vnetLinkName = ""; private String nsgName = ""; - public VirtualNetworkLinkETagTests() { - super(TestBase.RunCondition.BOTH); - } - protected ResourceManager resourceManager; protected PrivateDnsZoneManager privateZoneManager; protected NetworkManager networkManager; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - privateZoneManager = PrivateDnsZoneManager.authenticate(httpPipeline, profile, sdkContext); - networkManager = NetworkManager.authenticate(httpPipeline, profile, sdkContext); + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + privateZoneManager = PrivateDnsZoneManager.authenticate(httpPipeline, profile); + networkManager = NetworkManager.authenticate(httpPipeline, profile); rgName = generateRandomResourceName("prdnsvnltest", 15); topLevelDomain = "www.contoso" + generateRandomResourceName("z", 10) + ".com"; vnetName = generateRandomResourceName("prdnsvnet", 15); diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml index b52a01953002b..8959971c9396c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml @@ -11,16 +11,16 @@ 1.7.0 ../../parents/azure-client-sdk-parent - + com.azure.resourcemanager azure-resourcemanager-redis 2.0.0-beta.4 jar - + Microsoft Azure SDK for Redis Cache Management This package contains Microsoft Azure Redis Cache SDK. https://github.com/Azure/azure-sdk-for-java - + The MIT License (MIT) @@ -28,26 +28,26 @@ repo - + https://github.com/Azure/azure-sdk-for-java scm:git:git@github.com:Azure/azure-sdk-for-java.git HEAD - + 0.10 0.10 - + microsoft Microsoft - + com.azure.resourcemanager @@ -73,9 +73,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test @@ -125,7 +125,7 @@ - + org.jacoco jacoco-maven-plugin diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java index 5a45482a200f8..4f6700ee73400 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; @@ -88,8 +88,8 @@ private RedisManager(HttpPipeline httpPipeline, AzureProfile profile, SdkContext profile, new RedisManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java index c43bb652d86cd..c85431972ae93 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java @@ -123,7 +123,7 @@ public void canCRUDRedisCache() throws Exception { Assertions.assertNotNull(oldKeys); Assertions.assertNotNull(updatedPrimaryKey); Assertions.assertNotNull(updatedSecondaryKey); - if (isRecordMode()) { + if (!isPlaybackMode()) { Assertions.assertNotEquals(oldKeys.primaryKey(), updatedPrimaryKey.primaryKey()); Assertions.assertEquals(oldKeys.secondaryKey(), updatedPrimaryKey.secondaryKey()); Assertions.assertNotEquals(oldKeys.secondaryKey(), updatedSecondaryKey.secondaryKey()); diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisManagementTest.java index 56bc1139def29..0f529067e1733 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisManagementTest.java @@ -3,14 +3,25 @@ package com.azure.resourcemanager.redis; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.resources.ResourceManager; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.StorageManager; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; + +import java.time.temporal.ChronoUnit; +import java.util.List; /** The base for Redis cache manager tests. */ -public class RedisManagementTest extends TestBase { +public class RedisManagementTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected RedisManager redisManager; protected StorageManager storageManager; @@ -21,6 +32,24 @@ public class RedisManagementTest extends TestBase { protected String rrNameThird = ""; protected String saName = ""; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { rgName = generateRandomResourceName("javacsmrg", 15); @@ -30,12 +59,11 @@ protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile rrNameThird = rrName + "Third"; saName = generateRandomResourceName("javacsmsa", 15); + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - - redisManager = RedisManager.authenticate(httpPipeline, profile, sdkContext); - - storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + redisManager = RedisManager.authenticate(httpPipeline, profile); + storageManager = StorageManager.authenticate(httpPipeline, profile); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml index 6e0a3ea267689..1ddb5ed862065 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml @@ -84,9 +84,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java index 43b8cab8a817e..f10da5212547f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java @@ -27,7 +27,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.fluentcore.utils.Utils; @@ -166,7 +166,7 @@ private static final class AuthenticatedImpl implements Authenticated { this.sdkContext = new SdkContext(); this.subscriptionClient = new SubscriptionClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .buildClient(); } @@ -193,15 +193,15 @@ public AuthenticatedImpl withSdkContext(SdkContext sdkContext) { @Override public ResourceManager withSubscription(String subscriptionId) { Objects.requireNonNull(subscriptionId); - profile = new AzureProfile(profile.tenantId(), subscriptionId, profile.environment()); + profile = new AzureProfile(profile.getTenantId(), subscriptionId, profile.getEnvironment()); return new ResourceManager(httpPipeline, profile, sdkContext); } @Override public ResourceManager withDefaultSubscription() { - if (profile.subscriptionId() == null) { + if (profile.getSubscriptionId() == null) { String subscriptionId = Utils.defaultSubscription(this.subscriptions().list()); - profile = new AzureProfile(profile.tenantId(), subscriptionId, profile.environment()); + profile = new AzureProfile(profile.getTenantId(), subscriptionId, profile.getEnvironment()); } return new ResourceManager(httpPipeline, profile, sdkContext); } @@ -212,25 +212,25 @@ private ResourceManager(HttpPipeline httpPipeline, AzureProfile profile, SdkCont super.withResourceManager(this); this.resourceManagementClient = new ResourceManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(); this.featureClient = new FeatureClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(); this.subscriptionClient = new SubscriptionClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .buildClient(); this.policyClient = new PolicyClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/AzureConfigurableImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/AzureConfigurableImpl.java index 6218623a3fa50..0b0df7533f8f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/AzureConfigurableImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/AzureConfigurableImpl.java @@ -13,7 +13,7 @@ import com.azure.core.util.Configuration; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.policy.AuxiliaryAuthenticationPolicy; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import java.time.temporal.ChronoUnit; @@ -129,7 +129,7 @@ protected HttpPipeline buildHttpPipeline(TokenCredential credential, AzureProfil Objects.requireNonNull(credential); if (!tokens.isEmpty()) { policies.add( - new AuxiliaryAuthenticationPolicy(profile.environment(), tokens.toArray(new TokenCredential[0]))); + new AuxiliaryAuthenticationPolicy(profile.getEnvironment(), tokens.toArray(new TokenCredential[0]))); } return HttpPipelineProvider.buildHttpPipeline(credential, profile, scopes(), httpLogOptions, configuration, retryPolicy, policies, httpClient); diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/Manager.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/Manager.java index 267c02ebc358c..999ef43791651 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/Manager.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/Manager.java @@ -5,7 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java index a6febdbd21caa..372cea97abfe4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java @@ -5,7 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.ResourceManager; @@ -27,8 +27,8 @@ protected ManagerBase(HttpPipeline httpPipeline, AzureProfile profile, SdkContex .withSdkContext(sdkContext) .withDefaultSubscription(); } - this.subscriptionId = profile.subscriptionId(); - this.environment = profile.environment(); + this.subscriptionId = profile.getSubscriptionId(); + this.environment = profile.getEnvironment(); this.sdkContext = sdkContext; } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/ProviderRegistrationPolicy.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/ProviderRegistrationPolicy.java index 1e8b74a3c0f83..172a31a2f94ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/ProviderRegistrationPolicy.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/ProviderRegistrationPolicy.java @@ -13,7 +13,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.resources.models.Provider; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.ResourceManager; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/DelayProvider.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/DelayProvider.java deleted file mode 100644 index feec6ec3234b5..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/DelayProvider.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.fluentcore.utils; - -import java.time.Duration; -import java.time.OffsetDateTime; - -/** - * A wrapper class for thread sleep. - */ -public class DelayProvider { - /** - * Puts current thread on sleep for passed milliseconds. - * - * @param milliseconds time to sleep for - */ - - private int longRunningOperationRetryTimeout = 30; - - /** - * Wrapper for long-running operation retry timeout. - * - * @param lroRetryTimeout timeout value in seconds - */ - public void setLroRetryTimeout(int lroRetryTimeout) { - this.longRunningOperationRetryTimeout = lroRetryTimeout; - } - - /** - * Thread sleep. - * - * @param milliseconds time for sleep - */ - public void sleep(int milliseconds) { - try { - Thread.sleep(milliseconds); - } catch (InterruptedException e) { - } - } - - /** - * @return the current time. - */ - public OffsetDateTime now() { - return OffsetDateTime.now(); - } - - /** - * Creates an observable that emits the given item after the specified time in milliseconds. - * - * @return delayed observable - */ - public Duration getLroRetryTimeout() { - return Duration.ofSeconds(this.longRunningOperationRetryTimeout); - } - - /** - * Wrapper for the duration for delay. - * - * @param delay the duration of proposed delay. - * @return the duration of delay. - */ - public Duration getDelayDuration(Duration delay) { - return delay; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/FileProvider.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/FileProvider.java deleted file mode 100644 index ee876103f43c0..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/FileProvider.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.fluentcore.utils; - -import java.io.File; -import java.io.IOException; - -/** - * The wrapper class for file related operations. - */ -public class FileProvider { - /** - * Prepares the location for file to be created. - * @param file the file to be created. - * @throws IOException thrown when failed on IO. - */ - public void prepareFileLocation(File file) throws IOException { - // do nothing - } - - /** - * Prepares the location for file to be created. - * @param files the files to be created. - * @throws IOException thrown when failed on IO. - */ - public void prepareFileLocation(File... files) throws IOException { - for (File file : files) { - prepareFileLocation(file); - } - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/HttpPipelineProvider.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/HttpPipelineProvider.java index 1fdc512f72c71..d18ec649f6dc0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/HttpPipelineProvider.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/HttpPipelineProvider.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.resources.fluentcore.policy.ReturnRequestIdHeaderPolicy; import com.azure.resourcemanager.resources.fluentcore.policy.UserAgentPolicy; import com.azure.resourcemanager.resources.fluentcore.policy.ProviderRegistrationPolicy; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -71,7 +71,7 @@ public static HttpPipeline buildHttpPipeline( policies.add(retryPolicy); policies.add(new AddDatePolicy()); if (credential != null) { - policies.add(new AuthenticationPolicy(credential, profile.environment(), scopes)); + policies.add(new AuthenticationPolicy(credential, profile.getEnvironment(), scopes)); } policies.add(new ProviderRegistrationPolicy(credential, profile)); if (additionalPolicies != null && !additionalPolicies.isEmpty()) { diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceDelayProvider.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceDelayProvider.java new file mode 100644 index 0000000000000..474ab32b07c32 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceDelayProvider.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.resources.fluentcore.utils; + +import com.azure.core.management.provider.DelayProvider; + +import java.time.Duration; + +/** + * The ResourceDelayProvider to help thread sleep. + */ +public class ResourceDelayProvider implements DelayProvider { + @Override + public Duration getDelayDuration(Duration delay) { + return delay; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceNamer.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceNamer.java index 77050020666da..657ca1ce7e6f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceNamer.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceNamer.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - package com.azure.resourcemanager.resources.fluentcore.utils; +import com.azure.core.management.provider.IdentifierProvider; -import java.time.OffsetDateTime; import java.util.Locale; import java.util.Random; import java.util.UUID; @@ -12,27 +11,22 @@ /** * The ResourceNamer to generate random name. */ -public class ResourceNamer { +public class ResourceNamer implements IdentifierProvider { + private final String randName; private static final Random RANDOM = new Random(); /** - * Creates ResourceNamer. + * Constructs a ResourceNamer * - * @param name the randName + * @param name the name */ public ResourceNamer(String name) { this.randName = name.toLowerCase(Locale.ROOT) + UUID.randomUUID().toString().replace("-", "").substring(0, 3).toLowerCase(Locale.ROOT); } - /** - * Gets a random name. - * - * @param prefix the prefix to be used if possible - * @param maxLen the max length for the random generated name - * @return the random name - */ + @Override public String randomName(String prefix, int maxLen) { prefix = prefix.toLowerCase(Locale.ROOT); int minRandomnessLength = 5; @@ -55,29 +49,18 @@ public String randomName(String prefix, int maxLen) { return str + randomString((maxLen - str.length()) / 2); } - /** - * Creates a random UUID. - * - * @return the UUID string. - */ + @Override public String randomUuid() { return UUID.randomUUID().toString(); } - /** - * @return the current time offset. - */ - public OffsetDateTime dateTimeNow() { - return OffsetDateTime.now(); - } - private String randomString(int length) { StringBuilder str = new StringBuilder(); while (str.length() < length) { str.append(UUID.randomUUID() - .toString() - .replace("-", "") - .substring(0, Math.min(32, length)).toLowerCase(Locale.ROOT)); + .toString() + .replace("-", "") + .substring(0, Math.min(32, length)).toLowerCase(Locale.ROOT)); } return str.toString(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceNamerFactory.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceNamerFactory.java deleted file mode 100644 index 96a3193bf72e5..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceNamerFactory.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.fluentcore.utils; - -/** - * The ResourceNamerFactory to generate ResourceNamer. - */ -public class ResourceNamerFactory { - /** - * Factory method to generate instance of ResourceNamer. - * @param name prefix for the names. - * @return instance of ResourceNamer - */ - public ResourceNamer createResourceNamer(String name) { - return new ResourceNamer(name); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java index 8ebb2edaf7a94..5f0cd94f9e964 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java @@ -3,22 +3,23 @@ package com.azure.resourcemanager.resources.fluentcore.utils; +import com.azure.core.management.provider.DelayProvider; +import com.azure.core.management.provider.IdentifierProvider; import reactor.core.scheduler.Scheduler; import reactor.core.scheduler.Schedulers; -import java.io.File; -import java.io.IOException; import java.time.Duration; import java.time.OffsetDateTime; +import java.util.function.Function; /** * The class to contain the common factory methods required for SDK framework. */ public class SdkContext { - private ResourceNamerFactory resourceNamerFactory = new ResourceNamerFactory(); - private static DelayProvider delayProvider = new DelayProvider(); - private static FileProvider fileProvider = new FileProvider(); + private Function identifierFunction = name -> new ResourceNamer(name); + private static DelayProvider delayProvider = new ResourceDelayProvider(); private static Scheduler reactorScheduler = Schedulers.boundedElastic(); + private static int longRunningOperationRetryTimeout = 30; /** * Default constructor for SdkContext. @@ -26,21 +27,22 @@ public class SdkContext { public SdkContext() { } /** - * Function to override the ResourceNamerFactory. + * Sets the resource namer * - * @param resourceNamerFactory factory to override. + * @param identifierFunction the function. */ - public void setResourceNamerFactory(ResourceNamerFactory resourceNamerFactory) { - this.resourceNamerFactory = resourceNamerFactory; + public void setIdentifierFunction(Function identifierFunction) { + this.identifierFunction = identifierFunction; } /** - * Gets the current factory for ResourceNamer. + * Creates a resource namer * - * @return resourceNamer factory. + * @param name the name value. + * @return the new resource namer */ - public ResourceNamerFactory getResourceNamerFactory() { - return this.resourceNamerFactory; + public IdentifierProvider createIdentifierProvider(String name) { + return identifierFunction.apply(name); } /** @@ -51,8 +53,7 @@ public ResourceNamerFactory getResourceNamerFactory() { * @return the random name */ public String randomResourceName(String prefix, int maxLen) { - ResourceNamer resourceNamer = getResourceNamerFactory().createResourceNamer(""); - return resourceNamer.randomName(prefix, maxLen); + return identifierFunction.apply("").randomName(prefix, maxLen); } /** @@ -65,7 +66,7 @@ public String randomResourceName(String prefix, int maxLen) { */ public String[] randomResourceNames(String prefix, int maxLen, int count) { String[] names = new String[count]; - ResourceNamer resourceNamer = getResourceNamerFactory().createResourceNamer(""); + IdentifierProvider resourceNamer = identifierFunction.apply(""); for (int i = 0; i < count; i++) { names[i] = resourceNamer.randomName(prefix, maxLen); } @@ -78,8 +79,7 @@ public String[] randomResourceNames(String prefix, int maxLen, int count) { * @return the random UUID. */ public String randomUuid() { - ResourceNamer resourceNamer = getResourceNamerFactory().createResourceNamer(""); - return resourceNamer.randomUuid(); + return identifierFunction.apply("").randomUuid(); } /** @@ -97,7 +97,10 @@ public static void setDelayProvider(DelayProvider delayProvider) { * @param milliseconds number of millisecond for which thread should put on sleep. */ public static void sleep(int milliseconds) { - delayProvider.sleep(milliseconds); + try { + Thread.sleep(delayProvider.getDelayDuration(Duration.ofMillis(milliseconds)).toMillis()); + } catch (InterruptedException e) { + } } /** @@ -106,7 +109,7 @@ public static void sleep(int milliseconds) { * @param lroRetryTimeout timeout value in seconds */ public static void setLroRetryTimeOut(int lroRetryTimeout) { - delayProvider.setLroRetryTimeout(lroRetryTimeout); + longRunningOperationRetryTimeout = lroRetryTimeout; } /** @@ -125,15 +128,14 @@ public static Duration getDelayDuration(Duration delay) { * @return the duration */ public static Duration getLroRetryDuration() { - return delayProvider.getLroRetryTimeout(); + return delayProvider.getDelayDuration(Duration.ofSeconds(longRunningOperationRetryTimeout)); } /** * @return the current date time. */ public OffsetDateTime dateTimeNow() { - ResourceNamer resourceNamer = getResourceNamerFactory().createResourceNamer(""); - return resourceNamer.dateTimeNow(); + return OffsetDateTime.now(); } @@ -154,21 +156,4 @@ public static Scheduler getReactorScheduler() { public static void setReactorScheduler(Scheduler reactorScheduler) { SdkContext.reactorScheduler = reactorScheduler; } - - /** - * Sets the FileProvider for SDK framework, by default it does nothing. - * @param fileProvider the FileProvider to override. - */ - public static void setFileProvider(FileProvider fileProvider) { - SdkContext.fileProvider = fileProvider; - } - - /** - * Prepares the location for file to be created. - * @param files the files to be created. - * @throws IOException thrown when failed on IO. - */ - public static void prepareFileLocation(File... files) throws IOException { - fileProvider.prepareFileLocation(files); - } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java index b845966201f4d..8d59653d56453 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Accepted; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.Deployment; import com.azure.resourcemanager.resources.models.DeploymentMode; @@ -28,7 +28,7 @@ import java.util.Optional; -public class DeploymentsTests extends ResourceManagerTestBase { +public class DeploymentsTests extends ResourceManagementTest { private ResourceGroups resourceGroups; private ResourceGroup resourceGroup; @@ -44,7 +44,7 @@ public class DeploymentsTests extends ResourceManagerTestBase { @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { super.initializeClients(httpPipeline, profile); - testId = sdkContext.randomResourceName("", 9); + testId = generateRandomResourceName("", 9); resourceGroups = resourceClient.resourceGroups(); rgName = "rg" + testId; resourceGroup = resourceGroups.define(rgName) @@ -300,7 +300,7 @@ public void canDeployVirtualNetworkSyncPollWithFailure() throws Exception { Deployment deployment = acceptedDeployment.getFinalResult(); Assertions.assertEquals("Succeeded", deployment.provisioningState()); - final String newRgName = sdkContext.randomResourceName("rg", 10); + final String newRgName = generateRandomResourceName("rg", 10); try { final String dp2 = "dpF" + testId; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java index bc5a4fd92d3dc..5d4019432b3ae 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.model.Accepted; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.models.GenericResources; @@ -23,7 +23,7 @@ import java.util.Arrays; import java.util.Optional; -public class GenericResourcesTests extends ResourceManagerTestBase { +public class GenericResourcesTests extends ResourceManagementTest { private ResourceGroups resourceGroups; private GenericResources genericResources; @@ -33,7 +33,7 @@ public class GenericResourcesTests extends ResourceManagerTestBase { @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { - testId = sdkContext.randomResourceName("", 9); + testId = generateRandomResourceName("", 9); rgName = "rg" + testId; newRgName = "rgB" + testId; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java index 2c74b45231c4e..bac87781c2e31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java @@ -3,11 +3,8 @@ package com.azure.resourcemanager.resources; -import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.models.PolicyAssignment; import com.azure.resourcemanager.resources.models.PolicyDefinition; @@ -18,18 +15,9 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class PolicyTests extends TestBase { - protected ResourceManager resourceManager; +public class PolicyTests extends ResourceManagementTest { private String policyRule = "{\"if\":{\"not\":{\"field\":\"location\",\"in\":[\"southcentralus\",\"westeurope\"]}},\"then\":{\"effect\":\"deny\"}}"; - @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { - resourceManager = ResourceManager - .authenticate(httpPipeline, profile) - .withSdkContext(sdkContext) - .withDefaultSubscription(); - } - @Override protected void cleanUpResources() { @@ -41,7 +29,7 @@ public void canCRUDPolicyDefinition() throws Exception { String displayName = generateRandomResourceName("mypolicy", 15); try { // Create - PolicyDefinition definition = resourceManager.policyDefinitions().define(policyName) + PolicyDefinition definition = resourceClient.policyDefinitions().define(policyName) .withPolicyRuleJson(policyRule) .withPolicyType(PolicyType.CUSTOM) .withDisplayName(displayName) @@ -52,7 +40,7 @@ public void canCRUDPolicyDefinition() throws Exception { Assertions.assertEquals(displayName, definition.displayName()); Assertions.assertEquals("This is my policy", definition.description()); // List - PagedIterable definitions = resourceManager.policyDefinitions().list(); + PagedIterable definitions = resourceClient.policyDefinitions().list(); boolean found = false; for (PolicyDefinition def : definitions) { if (definition.id().equalsIgnoreCase(def.id())) { @@ -61,12 +49,12 @@ public void canCRUDPolicyDefinition() throws Exception { } Assertions.assertTrue(found); // Get - definition = resourceManager.policyDefinitions().getByName(policyName); + definition = resourceClient.policyDefinitions().getByName(policyName); Assertions.assertNotNull(definition); Assertions.assertEquals(displayName, definition.displayName()); } finally { // Delete - resourceManager.policyDefinitions().deleteByName(policyName); + resourceClient.policyDefinitions().deleteByName(policyName); } } @@ -80,17 +68,17 @@ public void canCRUDPolicyAssignment() throws Exception { String resourceName = generateRandomResourceName("webassignment", 15); try { // Create definition - PolicyDefinition definition = resourceManager.policyDefinitions().define(policyName) + PolicyDefinition definition = resourceClient.policyDefinitions().define(policyName) .withPolicyRuleJson(policyRule) .withPolicyType(PolicyType.CUSTOM) .withDisplayName(displayName) .withDescription("This is my policy") .create(); // Create assignment - ResourceGroup group = resourceManager.resourceGroups().define(rgName) + ResourceGroup group = resourceClient.resourceGroups().define(rgName) .withRegion(Region.UK_WEST) .create(); - PolicyAssignment assignment1 = resourceManager.policyAssignments().define(assignmentName1) + PolicyAssignment assignment1 = resourceClient.policyAssignments().define(assignmentName1) .forResourceGroup(group) .withPolicyDefinition(definition) .withDisplayName("My Assignment") @@ -99,7 +87,7 @@ public void canCRUDPolicyAssignment() throws Exception { Assertions.assertNotNull(assignment1); Assertions.assertEquals("My Assignment", assignment1.displayName()); - GenericResource resource = resourceManager.genericResources().define(resourceName) + GenericResource resource = resourceClient.genericResources().define(resourceName) .withRegion(Region.US_SOUTH_CENTRAL) .withExistingResourceGroup(group) .withResourceType("sites") @@ -110,7 +98,7 @@ public void canCRUDPolicyAssignment() throws Exception { .withProperties(new ObjectMapper().readTree("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Shared\"}")) .create(); - PolicyAssignment assignment2 = resourceManager.policyAssignments().define(assignmentName2) + PolicyAssignment assignment2 = resourceClient.policyAssignments().define(assignmentName2) .forResource(resource) .withPolicyDefinition(definition) .withDisplayName("My Assignment 2") @@ -119,7 +107,7 @@ public void canCRUDPolicyAssignment() throws Exception { Assertions.assertNotNull(assignment2); Assertions.assertEquals("My Assignment 2", assignment2.displayName()); - PagedIterable assignments = resourceManager.policyAssignments().listByResourceGroup(rgName); + PagedIterable assignments = resourceClient.policyAssignments().listByResourceGroup(rgName); Assertions.assertTrue(TestUtilities.getSize(assignments) >= 2); boolean foundAssignment1 = false; @@ -135,11 +123,11 @@ public void canCRUDPolicyAssignment() throws Exception { Assertions.assertTrue(foundAssignment2); // Delete - resourceManager.policyAssignments().deleteById(assignment1.id()); - resourceManager.policyAssignments().deleteById(assignment2.id()); - resourceManager.policyDefinitions().deleteByName(policyName); + resourceClient.policyAssignments().deleteById(assignment1.id()); + resourceClient.policyAssignments().deleteById(assignment2.id()); + resourceClient.policyDefinitions().deleteByName(policyName); } finally { - resourceManager.resourceGroups().deleteByName(rgName); + resourceClient.resourceGroups().deleteByName(rgName); } } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ProvidersTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ProvidersTests.java index 21180a44e3182..324be2fa6a68a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ProvidersTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ProvidersTests.java @@ -3,11 +3,8 @@ package com.azure.resourcemanager.resources; -import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.Provider; import com.azure.resourcemanager.resources.models.ProviderResourceType; @@ -16,16 +13,7 @@ import java.util.List; -public class ProvidersTests extends TestBase { - protected ResourceManager resourceManager; - - @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { - resourceManager = ResourceManager - .authenticate(httpPipeline, profile) - .withSdkContext(sdkContext) - .withDefaultSubscription(); - } +public class ProvidersTests extends ResourceManagementTest { @Override protected void cleanUpResources() { @@ -33,21 +21,21 @@ protected void cleanUpResources() { @Test public void canUnregisterAndRegisterProvider() throws Exception { - PagedIterable providers = resourceManager.providers().list(); + PagedIterable providers = resourceClient.providers().list(); int size = TestUtilities.getSize(providers); Assertions.assertTrue(size > 0); Provider provider = providers.iterator().next(); - resourceManager.providers().unregister(provider.namespace()); - provider = resourceManager.providers().getByName(provider.namespace()); + resourceClient.providers().unregister(provider.namespace()); + provider = resourceClient.providers().getByName(provider.namespace()); while (provider.registrationState().equals("Unregistering")) { SdkContext.sleep(5000); - provider = resourceManager.providers().getByName(provider.namespace()); + provider = resourceClient.providers().getByName(provider.namespace()); } - resourceManager.providers().register(provider.namespace()); + resourceClient.providers().register(provider.namespace()); while (provider.registrationState().equals("Unregistered") || provider.registrationState().equalsIgnoreCase("Registering")) { SdkContext.sleep(5 * 1000); - provider = resourceManager.providers().getByName(provider.namespace()); + provider = resourceClient.providers().getByName(provider.namespace()); } Assertions.assertEquals("Registered", provider.registrationState()); List resourceTypes = provider.resourceTypes(); diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceGroupsTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceGroupsTests.java index 9e25f5ab16c50..da2009a5789c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceGroupsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceGroupsTests.java @@ -5,13 +5,13 @@ import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.models.ResourceGroups; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class ResourceGroupsTests extends ResourceManagerTestBase { +public class ResourceGroupsTests extends ResourceManagementTest { private ResourceGroups resourceGroups; @Override @@ -22,7 +22,7 @@ protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile @Test public void canCreateResourceGroup() throws Exception { - final String rgName = sdkContext.randomResourceName("rg", 9); + final String rgName = generateRandomResourceName("rg", 9); Region region = Region.US_SOUTH_CENTRAL; // Create resourceGroups.define(rgName) diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceManagementTest.java new file mode 100644 index 0000000000000..fb157e0bc672f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceManagementTest.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.resources; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; + +import java.time.temporal.ChronoUnit; +import java.util.List; + +/** + * The base for resource manager tests. + */ +class ResourceManagementTest extends ResourceManagerTestBase { + protected ResourceManager resourceClient; + + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + + @Override + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + resourceClient = ResourceManager + .authenticate(httpPipeline, profile) + .withDefaultSubscription(); + } + + @Override + protected void cleanUpResources() { + + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceManagerTestBase.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceManagerTestBase.java deleted file mode 100644 index 09bab3d2b3dbc..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ResourceManagerTestBase.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources; - -import com.azure.core.http.HttpPipeline; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; - -/** - * The base for resource manager tests. - */ -class ResourceManagerTestBase extends TestBase { - protected ResourceManager resourceClient; - - @Override - protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { - resourceClient = ResourceManager - .authenticate(httpPipeline, profile) - .withSdkContext(sdkContext) - .withDefaultSubscription(); - - } - - @Override - protected void cleanUpResources() { - - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/SubscriptionsTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/SubscriptionsTests.java index fb66619bfba61..0324ac2b9a5bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/SubscriptionsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/SubscriptionsTests.java @@ -5,22 +5,23 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.Location; import com.azure.resourcemanager.resources.models.Subscription; +import com.azure.resourcemanager.test.utils.TestDelayProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class SubscriptionsTests extends TestBase { +public class SubscriptionsTests extends ResourceManagementTest { protected ResourceManager.Authenticated resourceManager; @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); resourceManager = ResourceManager - .authenticate(httpPipeline, profile) - .withSdkContext(sdkContext); + .authenticate(httpPipeline, profile); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TenantsTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TenantsTests.java index db2a30319ae45..6c2b3618eac39 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TenantsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TenantsTests.java @@ -5,21 +5,22 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluent.inner.TenantIdDescriptionInner; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.utils.TestDelayProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class TenantsTests extends TestBase { +public class TenantsTests extends ResourceManagementTest { protected ResourceManager.Authenticated resourceManager; @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); resourceManager = ResourceManager - .authenticate(httpPipeline, profile) - .withSdkContext(sdkContext); + .authenticate(httpPipeline, profile); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TooManyRequestsRetryInterceptorTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TooManyRequestsRetryInterceptorTests.java index 8a0c2afc87a42..6b4cfee586d68 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TooManyRequestsRetryInterceptorTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TooManyRequestsRetryInterceptorTests.java @@ -18,7 +18,7 @@ //import rx.functions.Func1; //import rx.schedulers.Schedulers; // -//public class TooManyRequestsRetryInterceptorTests extends ResourceManagerTestBase { +//public class TooManyRequestsRetryInterceptorTests extends ResourceManagementTest { // private static ResourceGroups resourceGroups; // // private String rgName; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/AuthFile.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/AuthFile.java deleted file mode 100644 index 8810229e9c20d..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/AuthFile.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.implementation.TypeUtil; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.AzureJacksonAdapter; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.identity.ClientCertificateCredentialBuilder; -import com.azure.identity.ClientSecretCredentialBuilder; -import com.fasterxml.jackson.annotation.JsonIgnore; - -import java.io.File; -import java.io.IOException; -import java.io.StringReader; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -/** - * This class describes the information from a .azureauth file. - */ - -final class AuthFile { - private String clientId; - private String tenantId; - private String clientSecret; - private String clientCertificate; - private String clientCertificatePassword; - private String subscriptionId; - private TokenCredential credential; - - @JsonIgnore - private final AzureEnvironment environment; - @JsonIgnore - private static final SerializerAdapter ADAPTER = new AzureJacksonAdapter(); - - private AuthFile() { - environment = new AzureEnvironment(new HashMap<>()); - environment.endpoints().putAll(AzureEnvironment.AZURE.endpoints()); - } - - /** - * Parses an auth file and read into an AuthFile object. - * - * @param file the auth file to read - * @return the AuthFile object created - * @throws IOException thrown when the auth file or the certificate file cannot be read or parsed - */ - static AuthFile parse(File file) throws IOException { - String content = new String(Files.readAllBytes(Paths.get(file.getPath())), StandardCharsets.UTF_8); - AuthFile authFile; - if (isJsonBased(content)) { - authFile = ADAPTER.deserialize(content, AuthFile.class, SerializerEncoding.JSON); - Map endpoints = ADAPTER.deserialize(content, - TypeUtil.createParameterizedType(Map.class, String.class, String.class), - SerializerEncoding.JSON); - authFile.environment.endpoints().putAll(endpoints); - } else { - // Set defaults - Properties authSettings = new Properties(); - authSettings.put(AuthFile.CredentialSettings.AUTH_URL.toString(), - AzureEnvironment.AZURE.getActiveDirectoryEndpoint()); - authSettings.put(AuthFile.CredentialSettings.BASE_URL.toString(), - AzureEnvironment.AZURE.getResourceManagerEndpoint()); - authSettings.put(AuthFile.CredentialSettings.MANAGEMENT_URI.toString(), - AzureEnvironment.AZURE.getManagementEndpoint()); - authSettings.put(AuthFile.CredentialSettings.GRAPH_URL.toString(), - AzureEnvironment.AZURE.getGraphEndpoint()); - authSettings.put(AuthFile.CredentialSettings.VAULT_SUFFIX.toString(), - AzureEnvironment.AZURE.getKeyVaultDnsSuffix()); - - // Load the credentials from the file - StringReader credentialsReader = new StringReader(content); - authSettings.load(credentialsReader); - credentialsReader.close(); - - authFile = new AuthFile(); - authFile.clientId = authSettings.getProperty(AuthFile.CredentialSettings.CLIENT_ID.toString()); - authFile.tenantId = authSettings.getProperty(AuthFile.CredentialSettings.TENANT_ID.toString()); - authFile.clientSecret = authSettings.getProperty(AuthFile.CredentialSettings.CLIENT_KEY.toString()); - authFile.clientCertificate = authSettings.getProperty(AuthFile.CredentialSettings.CLIENT_CERT.toString()); - authFile.clientCertificatePassword = - authSettings.getProperty(AuthFile.CredentialSettings.CLIENT_CERT_PASS.toString()); - authFile.subscriptionId = authSettings.getProperty(AuthFile.CredentialSettings.SUBSCRIPTION_ID.toString()); - - authFile.environment.endpoints().put(AzureEnvironment.Endpoint.MANAGEMENT.identifier(), - authSettings.getProperty(AuthFile.CredentialSettings.MANAGEMENT_URI.toString())); - authFile.environment.endpoints().put(AzureEnvironment.Endpoint.ACTIVE_DIRECTORY.identifier(), - authSettings.getProperty(AuthFile.CredentialSettings.AUTH_URL.toString())); - authFile.environment.endpoints().put(AzureEnvironment.Endpoint.RESOURCE_MANAGER.identifier(), - authSettings.getProperty(AuthFile.CredentialSettings.BASE_URL.toString())); - authFile.environment.endpoints().put(AzureEnvironment.Endpoint.GRAPH.identifier(), - authSettings.getProperty(AuthFile.CredentialSettings.GRAPH_URL.toString())); - authFile.environment.endpoints().put(AzureEnvironment.Endpoint.KEYVAULT.identifier(), - authSettings.getProperty(AuthFile.CredentialSettings.VAULT_SUFFIX.toString())); - } - return authFile; - } - - private static boolean isJsonBased(String content) { - return content.startsWith("{"); - } - - /** - * @return an ApplicationTokenCredentials object from the information in this class - */ - private TokenCredential generateCredential() { - if (clientSecret != null) { - return new ClientSecretCredentialBuilder() - .tenantId(tenantId) - .clientId(clientId) - .clientSecret(clientSecret) - .authorityHost(environment.getActiveDirectoryEndpoint()) - .build(); - } else if (clientCertificate != null) { - ClientCertificateCredentialBuilder builder = new ClientCertificateCredentialBuilder() - .tenantId(tenantId) - .clientId(clientId) - .authorityHost(environment.getActiveDirectoryEndpoint()); - if (clientCertificatePassword != null) { - builder.pfxCertificate(clientCertificate, clientCertificatePassword); - } else { - builder.pemCertificate(clientCertificate); - } - return builder.build(); - } else { - ClientLogger logger = new ClientLogger(this.getClass()); - throw logger.logExceptionAsError( - new IllegalArgumentException("Please specify either a client key or a client certificate.")); - } - } - - String subscriptionId() { - return this.subscriptionId; - } - - String tenantId() { - return this.tenantId; - } - - AzureEnvironment environment() { - return this.environment; - } - - String clientId() { - return this.clientId; - } - - TokenCredential credential() { - if (this.credential == null) { - this.credential = generateCredential(); - } - return credential; - } - - /** - * Contains the keys of the settings in a Properties file to read credentials from. - */ - private enum CredentialSettings { - /** - * The subscription GUID. - */ - SUBSCRIPTION_ID("subscription"), - /** - * The tenant GUID or domain. - */ - TENANT_ID("tenant"), - /** - * The client id for the client application. - */ - CLIENT_ID("client"), - /** - * The client secret for the service principal. - */ - CLIENT_KEY("key"), - /** - * The client certificate for the service principal. - */ - CLIENT_CERT("certificate"), - /** - * The password for the client certificate for the service principal. - */ - CLIENT_CERT_PASS("certificatePassword"), - /** - * The management endpoint. - */ - MANAGEMENT_URI("managementURI"), - /** - * The base URL to the current Azure environment. - */ - BASE_URL("baseURL"), - /** - * The URL to Active Directory authentication. - */ - AUTH_URL("authURL"), - /** - * The URL to Active Directory Graph. - */ - GRAPH_URL("graphURL"), - /** - * The suffix of Key Vaults. - */ - VAULT_SUFFIX("vaultSuffix"); - - /** - * The name of the key in the properties file. - */ - private final String name; - - CredentialSettings(String name) { - this.name = name; - } - - @Override - public String toString() { - return this.name; - } - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/InterceptorManager.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/InterceptorManager.java deleted file mode 100644 index f0c6cd236f72b..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/InterceptorManager.java +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.resourcemanager.resources.core; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipelineCallContext; -import com.azure.core.http.HttpPipelineNextPolicy; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.nimbusds.jose.util.IOUtils; -import reactor.core.publisher.Mono; -import reactor.core.scheduler.Schedulers; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.zip.GZIPInputStream; - -/** - * Created by vlashch on 7/13/2017. - */ -public final class InterceptorManager { - - private static final String RECORD_FOLDER = "session-records/"; - private static final String BODY_LOGGING = "x-ms-body-logging"; - private static final int HTTP_TEMPORARY_REDIRECT = 307; // HTTP Status Code - - private Map textReplacementRules = new HashMap<>(); - // Stores a map of all the HTTP properties in a session - // A state machine ensuring a test is always reset before another one is setup - - protected RecordedData recordedData = new RecordedData(); - - private final String testName; - - private final TestBase.TestMode testMode; - - private InterceptorManager(String testName, TestBase.TestMode testMode) { - this.testName = testName; - this.testMode = testMode; - } - - public void addTextReplacementRule(String regex, String replacement) { - textReplacementRules.put(regex, replacement); - } - - // factory method - public static InterceptorManager create(String testName, TestBase.TestMode testMode) throws IOException { - InterceptorManager interceptorManager = new InterceptorManager(testName, testMode); - SdkContext.setDelayProvider(new TestDelayProvider(interceptorManager.isRecordMode() || interceptorManager.isNoneMode())); - SdkContext.setFileProvider(new TestFileProvider(interceptorManager.isRecordMode())); - if (!interceptorManager.isNoneMode()) { - SdkContext.setReactorScheduler(Schedulers.boundedElastic()); - } - return interceptorManager; - } - - public boolean isRecordMode() { - return testMode == TestBase.TestMode.RECORD; - } - - public boolean isNoneMode() { - return testMode == TestBase.TestMode.NONE; - } - - public boolean isPlaybackMode() { - return testMode == TestBase.TestMode.PLAYBACK; - } - - public HttpPipelinePolicy initInterceptor() throws IOException { - switch (testMode) { - case RECORD: - recordedData = new RecordedData(); - return (context, next) -> record(context, next); - case PLAYBACK: - readDataFromFile(); - return (context, next) -> playback(context, next); - case NONE: - System.out.println("==> No interceptor defined for AZURE_TEST_MODE: " + testMode); - break; - default: - System.out.println("==> Unknown AZURE_TEST_MODE: " + testMode); - } - return null; - } - - public void finalizeInterceptor() throws IOException { - switch (testMode) { - case RECORD: - writeDataToFile(); - break; - case PLAYBACK: - case NONE: - // Do nothing - break; - default: - System.out.println("==> Unknown AZURE_TEST_MODE: " + testMode); - } - } - - private Mono record(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { - HttpRequest request = context.getHttpRequest(); - HttpHeaders headers = request.getHeaders(); - - NetworkCallRecord networkCallRecord = new NetworkCallRecord(); - networkCallRecord.setHeaders(new HashMap<>()); - - if (headers.get("Content-Type") != null) { - networkCallRecord.headers().put("Content-Type", headers.getValue("Content-Type")); - } - if (headers.get("x-ms-version") != null) { - networkCallRecord.headers().put("x-ms-version", headers.getValue("x-ms-version")); - } - if (headers.get("User-Agent") != null) { - networkCallRecord.headers().put("User-Agent", headers.getValue("User-Agent")); - } - - networkCallRecord.setMethod(request.getHttpMethod().toString()); - networkCallRecord.setUri(applyReplacementRule(request.getUrl().toString().replaceAll("\\?$", ""))); - - return next.process().flatMap(response -> { - networkCallRecord.setResponse(new HashMap<>()); - networkCallRecord.response().put("StatusCode", Integer.toString(response.getStatusCode())); - Mono bufferResponse = extractResponseData(networkCallRecord.response(), response); - - // remove pre-added header if this is a waiting or redirection - if (networkCallRecord.response().containsKey("Body") - && networkCallRecord.response().get("Body").contains("InProgress") - || Integer.parseInt(networkCallRecord.response().get("StatusCode")) == HTTP_TEMPORARY_REDIRECT) { - // Do nothing - return bufferResponse; - } else { - synchronized (recordedData.getNetworkCallRecords()) { - recordedData.getNetworkCallRecords().add(networkCallRecord); - } - } - - return bufferResponse; - }); - } - - private Mono playback(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { - HttpRequest request = context.getHttpRequest(); - String incomingUrl = applyReplacementRule(request.getUrl().toString()); - String incomingMethod = request.getHttpMethod().toString(); - - incomingUrl = removeHost(incomingUrl); - NetworkCallRecord networkCallRecord = null; - synchronized (recordedData) { - for (Iterator iterator = recordedData.getNetworkCallRecords().iterator(); iterator.hasNext();) { - NetworkCallRecord record = iterator.next(); - if (record.method().equalsIgnoreCase(incomingMethod) && removeHost(record.uri()).equalsIgnoreCase(incomingUrl)) { - networkCallRecord = record; - iterator.remove(); - break; - } - } - } - - if (networkCallRecord == null) { - System.out.println("NOT FOUND - " + incomingMethod + " " + incomingUrl); - System.out.println("Remaining records " + recordedData.getNetworkCallRecords().size()); - return Mono.error(new IOException("==> Unexpected request: " + incomingMethod + " " + incomingUrl)); - } - - int recordStatusCode = Integer.parseInt(networkCallRecord.response().get("StatusCode")); - - final NetworkCallRecord finalNetworkCallRecord = networkCallRecord; - - RecordedHttpResponse response = new RecordedHttpResponse(recordStatusCode, context.getHttpRequest()); - - for (Map.Entry pair : finalNetworkCallRecord.response().entrySet()) { - if (!pair.getKey().equals("StatusCode") && !pair.getKey().equals("Body") && !pair.getKey().equals("Content-Length")) { - String rawHeader = pair.getValue(); - for (Map.Entry rule : textReplacementRules.entrySet()) { - if (rule.getValue() != null) { - rawHeader = rawHeader.replaceAll(rule.getKey(), rule.getValue()); - } - } - response.getHeaders().put(pair.getKey(), rawHeader); - } - } - - try { - String rawBody = finalNetworkCallRecord.response().get("Body"); - if (rawBody != null) { - for (Map.Entry rule : textReplacementRules.entrySet()) { - if (rule.getValue() != null) { - rawBody = rawBody.replaceAll(rule.getKey(), rule.getValue()); - } - } - - String rawContentType = finalNetworkCallRecord.response().get("content-type"); - String contentType = rawContentType == null - ? "application/json; charset=utf-8" - : rawContentType; - - response.setBody(rawBody.getBytes()); - response.getHeaders().put("Content-Length", String.valueOf(rawBody.getBytes("UTF-8").length)); - } - } catch (Exception e) { - return Mono.error(e); - } - - return Mono.just(response); - } - - private Mono extractResponseData(Map responseData, final HttpResponse response) { - Map headers = response.getHeaders().toMap(); - boolean addedRetryAfter = false; - for (Map.Entry header : headers.entrySet()) { - String headerValueToStore = header.getValue(); - - if (header.getKey().equalsIgnoreCase("location") || header.getKey().equalsIgnoreCase("azure-asyncoperation")) { - headerValueToStore = applyReplacementRule(headerValueToStore); - } - if (header.getKey().equalsIgnoreCase("retry-after")) { - headerValueToStore = "0"; - addedRetryAfter = true; - } - responseData.put(header.getKey().toLowerCase(), headerValueToStore); - } - - if (!addedRetryAfter) { - responseData.put("retry-after", "0"); - } - - String bodyLoggingHeader = response.getRequest().getHeaders().getValue(BODY_LOGGING); - boolean bodyLogging = bodyLoggingHeader == null || Boolean.parseBoolean(bodyLoggingHeader); - if (bodyLogging) { - HttpResponse bufferedResponse = response.buffer(); - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - return bufferedResponse.getBody() - .doOnNext(byteBuffer -> { - for (int i = byteBuffer.position(); i < byteBuffer.limit(); i++) { - outputStream.write(byteBuffer.get(i)); - } - }) - .doFinally(ignored -> { - try { - String encoding = response.getHeaderValue("Content-Encoding"); - String content = null; - if (encoding == null || encoding == "") { - content = new String(outputStream.toByteArray(), StandardCharsets.UTF_8); - } else if (encoding.equalsIgnoreCase("gzip")) { - GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(outputStream.toByteArray())); - content = IOUtils.readInputStreamToString(gis, StandardCharsets.UTF_8); - responseData.remove("Content-Encoding".toLowerCase()); - responseData.put("Content-Length".toLowerCase(), Integer.toString(content.length())); - } - - if (content != null) { - content = applyReplacementRule(content); - responseData.put("Body", content); - } - } catch (IOException e) { - e.printStackTrace(); - } - }) - .then(Mono.just(bufferedResponse)); - } - return Mono.just(response); - } - - private long getContentLength(HttpHeaders headers) { - long contentLength = 0; - - String contentLengthString = headers.getValue("Content-Length"); - if (contentLengthString == null || contentLengthString.isEmpty()) { - return contentLength; - } - - try { - contentLength = Long.parseLong(contentLengthString); - } catch (NumberFormatException e) { } - - return contentLength; - } - - private void readDataFromFile() throws IOException { - File recordFile = getRecordFile(testName); - ObjectMapper mapper = new ObjectMapper(); - mapper.enable(SerializationFeature.INDENT_OUTPUT); - recordedData = mapper.readValue(recordFile, RecordedData.class); - System.out.println("Total records " + recordedData.getNetworkCallRecords().size()); - } - - private void writeDataToFile() throws IOException { - ObjectMapper mapper = new ObjectMapper(); - mapper.enable(SerializationFeature.INDENT_OUTPUT); - File recordFile = getRecordFile(testName); - recordFile.createNewFile(); - mapper.writeValue(recordFile, recordedData); - } - - private File getRecordFile(String testName) { - URL folderUrl = InterceptorManager.class.getClassLoader().getResource("."); - File folderFile = new File(folderUrl.getPath() + RECORD_FOLDER); - if (!folderFile.exists()) { - folderFile.mkdir(); - } - String filePath = folderFile.getPath() + "/" + testName + ".json"; - System.out.println("==> Playback file path: " + filePath); - return new File(filePath); - } - - private String applyReplacementRule(String text) { - for (Map.Entry rule : textReplacementRules.entrySet()) { - if (rule.getValue() != null) { - text = text.replaceAll(rule.getKey(), rule.getValue()); - } - } - return text; - } - - private String removeHost(String url) { - URI uri = URI.create(url); - return String.format("%s?%s", uri.getPath(), uri.getQuery()); - } - - public void pushVariable(String variable) { - if (isRecordMode()) { - synchronized (recordedData.getVariables()) { - recordedData.getVariables().add(variable); - } - } - } - - public String popVariable() { - synchronized (recordedData.getVariables()) { - return recordedData.getVariables().remove(); - } - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/NetworkCallRecord.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/NetworkCallRecord.java deleted file mode 100644 index 5a15b1f330626..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/NetworkCallRecord.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Map; - -public class NetworkCallRecord { - @JsonProperty("Method") - private String method; - @JsonProperty("Uri") - private String uri; - - @JsonProperty("Headers") - private Map headers; - @JsonProperty("Response") - private Map response; - - public String method() { - return method; - } - - public void setMethod(String method) { - this.method = method; - } - - public String uri() { - return uri; - } - - public void setUri(String uri) { - this.uri = uri; - } - - public Map headers() { - return headers; - } - - public void setHeaders(Map headers) { - this.headers = headers; - } - - public Map response() { - return response; - } - - public void setResponse(Map response) { - this.response = response; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/RecordedData.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/RecordedData.java deleted file mode 100644 index 8f979b33d5e2f..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/RecordedData.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import java.util.LinkedList; - -public class RecordedData { - private LinkedList networkCallRecords; - - private LinkedList variables; - - public RecordedData() { - networkCallRecords = new LinkedList<>(); - variables = new LinkedList<>(); - } - - public LinkedList getNetworkCallRecords() { - return networkCallRecords; - } - - public LinkedList getVariables() { - return variables; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/RecordedHttpResponse.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/RecordedHttpResponse.java deleted file mode 100644 index e70e0ea06d49e..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/RecordedHttpResponse.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.implementation.http.BufferedHttpResponse; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; - -/** - * HTTP response which will cache the response's body when/if it is read. - */ -public class RecordedHttpResponse extends HttpResponse { - private final HttpHeaders headers; - private final int statusCode; - private Flux cachedBody; - - public RecordedHttpResponse(int statusCode, HttpRequest request) { - super(request); - this.headers = new HttpHeaders(); - this.statusCode = statusCode; - } - - public RecordedHttpResponse setBody(byte[] body) { - this.cachedBody = Flux.just(ByteBuffer.wrap(body)); - return this; - } - - public RecordedHttpResponse setBody(ByteBuffer body) { - this.cachedBody = Flux.just(body); - return this; - } - - @Override - public int getStatusCode() { - return statusCode; - } - - @Override - public String getHeaderValue(String name) { - return headers.getValue(name); - } - - @Override - public HttpHeaders getHeaders() { - return headers; - } - - @Override - public Flux getBody() { - return cachedBody; - } - - @Override - public Mono getBodyAsByteArray() { - return FluxUtil.collectBytesInByteBufferStream(cachedBody.map(ByteBuffer::duplicate)); - } - - @Override - public Mono getBodyAsString() { - return getBodyAsByteArray() - .map(bytes -> bytes == null ? null : new String(bytes, StandardCharsets.UTF_8)); - } - - @Override - public Mono getBodyAsString(Charset charset) { - return getBodyAsByteArray() - .map(bytes -> bytes == null ? null : new String(bytes, charset)); - } - - @Override - public BufferedHttpResponse buffer() { - return new BufferedHttpResponse(this); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/ResourceGroupTaggingPolicy.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/ResourceGroupTaggingPolicy.java deleted file mode 100644 index 3dd4fed47f90d..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/ResourceGroupTaggingPolicy.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.azure.core.http.HttpPipelineCallContext; -import com.azure.core.http.HttpPipelineNextPolicy; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.management.serializer.AzureJacksonAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.resources.fluent.ResourceGroupsClient; -import com.azure.resourcemanager.resources.fluent.inner.ResourceGroupInner; -import reactor.core.publisher.Mono; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.time.Instant; -import java.util.HashMap; -import java.util.Map; - -/** - * Http Pipeline Policy for tagging resource groups created in tests. - */ -public class ResourceGroupTaggingPolicy implements HttpPipelinePolicy { -// private static final String LOGGING_CONTEXT = "com.microsoft.azure.management.resources.ResourceGroups createOrUpdate"; - private static final String CALLER_METHOD = String.format("%s$ResourceGroupsService.createOrUpdate", ResourceGroupsClient.class.getName()); - private AzureJacksonAdapter adapter = new AzureJacksonAdapter(); - - @Override - public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { - if ("PUT".equals(context.getHttpRequest().getHttpMethod().name()) - && context.getHttpRequest().getUrl().toString().contains("/resourcegroups/") - && CALLER_METHOD.equals(context.getData("caller-method").orElse("").toString())) { - return context.getHttpRequest().copy().getBody().flatMap( - byteBuffer -> { - byte[] body = new byte[byteBuffer.remaining()]; - byteBuffer.get(body); - String bodyStr = new String(body, StandardCharsets.UTF_8); - - ResourceGroupInner resourceGroupInner; - try { - resourceGroupInner = adapter.deserialize(bodyStr, ResourceGroupInner.class, SerializerEncoding.JSON); - } catch (IOException e) { - return Mono.error(e); - } - if (resourceGroupInner == null) { - return Mono.error(new RuntimeException("Failed to deserialize " + bodyStr)); - } - - Map tags = resourceGroupInner.tags(); - if (tags == null) { - tags = new HashMap<>(); - } - tags.put("product", "javasdk"); - tags.put("cause", "automation"); - tags.put("date", Instant.now().toString()); - if (System.getenv("ENV_JOB_NAME") != null) { - tags.put("job", System.getenv("ENV_JOB_NAME")); - } - resourceGroupInner.withTags(tags); - String newBody; - try { - newBody = adapter.serialize(resourceGroupInner, SerializerEncoding.JSON); - } catch (IOException e) { - return Mono.error(e); - } - - if (newBody == null) { - return Mono.error(new RuntimeException("Failed to serialize after resource group tagging.\nOriginal body: " + bodyStr)); - } - - HttpRequest newRequest = context.getHttpRequest().copy() - .setBody(newBody) - .setHeader("Content-Length", String.valueOf(newBody.length())); - context.setHttpRequest(newRequest); - return next.process(); - } - ).last(); - } - return next.process(); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestBase.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestBase.java deleted file mode 100644 index c8ca23a787476..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestBase.java +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.ProxyOptions; -import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.HostPolicy; -import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.TimeoutPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.LogLevel; -import com.azure.identity.ClientSecretCredentialBuilder; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; -import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; -import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assumptions; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.TestInfo; - -import java.io.File; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.net.InetSocketAddress; -import java.net.Proxy; -import java.net.ProxySelector; -import java.net.URI; -import java.net.URISyntaxException; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -public abstract class TestBase { - private PrintStream out; - private String baseUri; - protected SdkContext sdkContext = new SdkContext(); - private AuthFile authFile; - private AzureProfile profile; - - public String generateRandomResourceName(String prefix, int maxLen) { - return sdkContext.randomResourceName(prefix, maxLen); - } - - public static String password() { - // do not record - String password = new SdkContext().randomResourceName("Pa5$", 12); - System.out.printf("Password: %s%n", password); - return password; - } - - protected enum RunCondition { - MOCK_ONLY, - LIVE_ONLY, - BOTH - } - - public enum TestMode { - PLAYBACK, - RECORD, - NONE - } - - protected static final String ZERO_SUBSCRIPTION = "00000000-0000-0000-0000-000000000000"; - protected static final String ZERO_TENANT = "00000000-0000-0000-0000-000000000000"; - private static final String PLAYBACK_URI_BASE = "http://localhost:"; - protected static String playbackUri = null; - - private final RunCondition runCondition; - - protected TestBase() { - this(RunCondition.BOTH); - } - - protected TestBase(RunCondition runCondition) { - this.runCondition = runCondition; - } - - private String shouldCancelTest(boolean isPlaybackMode) { - // Determine whether to run the test based on the condition the test has been configured with - switch (this.runCondition) { - case MOCK_ONLY: - return (!isPlaybackMode) ? "Test configured to run only as mocked, not live." : null; - case LIVE_ONLY: - return (isPlaybackMode) ? "Test configured to run only as live, not mocked." : null; - default: - return null; - } - } - - private static TestMode testMode = null; - protected TestInfo testInfo; - - private static void initTestMode() throws IOException { - Configuration.getGlobalConfiguration().put(Configuration.PROPERTY_AZURE_LOG_LEVEL, String.valueOf(LogLevel.INFORMATIONAL)); - String azureTestMode = System.getenv("AZURE_TEST_MODE"); - if (azureTestMode != null) { - if (azureTestMode.equalsIgnoreCase("Record")) { - testMode = TestMode.RECORD; - } else if (azureTestMode.equalsIgnoreCase("Playback")) { - testMode = TestMode.PLAYBACK; - } else if (azureTestMode.equalsIgnoreCase("None")) { - testMode = TestMode.NONE; - } else { - throw new IOException("Unknown AZURE_TEST_MODE: " + azureTestMode); - } - } else { - //System.out.print("Environment variable 'AZURE_TEST_MODE' has not been set yet. Using 'Playback' mode."); - testMode = TestMode.PLAYBACK; - } - } - - private static void initPlaybackUri() throws IOException { - playbackUri = PLAYBACK_URI_BASE + "1234"; - } - - public static boolean isPlaybackMode() { - if (testMode == null) { - try { - initTestMode(); - } catch (IOException e) { - e.printStackTrace(); - throw new RuntimeException("Can't init test mode."); - } - } - return testMode == TestMode.PLAYBACK; - } - - public static boolean isRecordMode() { - return !isPlaybackMode(); - } - - protected InterceptorManager interceptorManager = null; - - private static void printThreadInfo(String what) { - long id = Thread.currentThread().getId(); - String name = Thread.currentThread().getName(); - System.out.println(String.format("\n***\n*** [%s:%s] - %s\n***\n", name, id, what)); - } - - @BeforeAll - public static void beforeClass() throws IOException { - printThreadInfo("beforeClass"); - initTestMode(); - initPlaybackUri(); - } - - @BeforeEach - public void beforeTest(TestInfo testInfo) throws IOException { - this.testInfo = testInfo; - String testMothodName = testInfo.getTestMethod().get().getName(); - printThreadInfo(String.format("%s: %s", "beforeTest", testMothodName)); - final String skipMessage = shouldCancelTest(isPlaybackMode()); - Assumptions.assumeTrue(skipMessage == null, skipMessage); - - String showOutput = Configuration.getGlobalConfiguration().get("showOutput"); - if (!isPlaybackMode() || (showOutput != null && showOutput.equalsIgnoreCase("true"))) { - System.out.println("------------------------------------------------------------ Show Output"); - } else { - System.out.println("------------------------------------------------------------ Skip Output"); - System.setOut(new PrintStream(new OutputStream() { - @Override - public void write(int b) throws IOException { - - } - })); - - System.setErr(new PrintStream(new OutputStream() { - @Override - public void write(int b) throws IOException { - - } - })); - } - - interceptorManager = InterceptorManager.create(testMothodName, testMode); - sdkContext.setResourceNamerFactory(new TestResourceNamerFactory(interceptorManager)); - - TokenCredential credential; - HttpPipeline httpPipeline; - - if (isPlaybackMode()) { - profile = new AzureProfile( - ZERO_TENANT, ZERO_SUBSCRIPTION, - new AzureEnvironment( - new HashMap() { - { - put("managementEndpointUrl", playbackUri); - put("resourceManagerEndpointUrl", playbackUri); - put("sqlManagementEndpointUrl", playbackUri); - put("galleryEndpointUrl", playbackUri); - put("activeDirectoryEndpointUrl", playbackUri); - put("activeDirectoryResourceId", playbackUri); - put("activeDirectoryGraphResourceId", playbackUri); - }})); - - List policies = new ArrayList<>(); - policies.add(interceptorManager.initInterceptor()); - policies.add(new HostPolicy(playbackUri + "/")); - policies.add(new ResourceGroupTaggingPolicy()); - policies.add(new CookiePolicy()); - httpPipeline = HttpPipelineProvider.buildHttpPipeline( - null, profile, null, new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS), - null, new RetryPolicy("Retry-After", ChronoUnit.SECONDS), policies, null); - - interceptorManager.addTextReplacementRule(PLAYBACK_URI_BASE + "1234", playbackUri); - System.out.println(playbackUri); - } else { - if (System.getenv("AZURE_AUTH_LOCATION") != null) { // Record mode - final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); - AuthFile authFile = buildAuthFile(credFile); - credential = authFile.credential(); - profile = new AzureProfile(authFile.tenantId(), authFile.subscriptionId(), authFile.environment()); - } else { - String clientId = System.getenv("AZURE_CLIENT_ID"); - String tenantId = System.getenv("AZURE_TENANT_ID"); - String clientSecret = System.getenv("AZURE_CLIENT_SECRET"); - String subscriptionId = System.getenv("AZURE_SUBSCRIPTION_ID"); - if (clientId == null || tenantId == null || clientSecret == null || subscriptionId == null) { - throw new IllegalArgumentException("When running tests in record mode either 'AZURE_AUTH_LOCATION' or 'AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET and AZURE_SUBSCRIPTION_ID' needs to be set"); - } - - credential = new ClientSecretCredentialBuilder() - .tenantId(tenantId) - .clientId(clientId) - .clientSecret(clientSecret) - .authorityHost(AzureEnvironment.AZURE.getActiveDirectoryEndpoint()) - .build(); - profile = new AzureProfile(tenantId, subscriptionId, AzureEnvironment.AZURE); - - } - - List policies = new ArrayList<>(); - policies.add(new ResourceGroupTaggingPolicy()); - policies.add(new TimeoutPolicy(Duration.ofMinutes(1))); - policies.add(new CookiePolicy()); - if (!interceptorManager.isNoneMode()) { - policies.add(interceptorManager.initInterceptor()); - } - httpPipeline = HttpPipelineProvider.buildHttpPipeline( - credential, profile, null, new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS), - null, new RetryPolicy("Retry-After", ChronoUnit.SECONDS), policies, generateHttpClientWithProxy(null)); - - interceptorManager.addTextReplacementRule(profile.subscriptionId(), ZERO_SUBSCRIPTION); - interceptorManager.addTextReplacementRule(profile.tenantId(), ZERO_TENANT); - interceptorManager.addTextReplacementRule(baseUri(), playbackUri + "/"); - interceptorManager.addTextReplacementRule("https://graph.windows.net/", playbackUri + "/"); - } - initializeClients(httpPipeline, profile); - } - - @AfterEach - public void afterTest() throws IOException { - if (shouldCancelTest(isPlaybackMode()) != null) { - return; - } - cleanUpResources(); - interceptorManager.finalizeInterceptor(); - } - - protected HttpClient generateHttpClientWithProxy(ProxyOptions proxyOptions) { - NettyAsyncHttpClientBuilder clientBuilder = new NettyAsyncHttpClientBuilder(); - if (proxyOptions != null) { - clientBuilder.proxy(proxyOptions); - } else { - try { - System.setProperty("java.net.useSystemProxies", "true"); - List proxies = ProxySelector.getDefault().select(new URI(AzureEnvironment.AZURE.getResourceManagerEndpoint())); - if (!proxies.isEmpty()) { - for (Proxy proxy : proxies) { - if (proxy.address() instanceof InetSocketAddress) { - String host = ((InetSocketAddress) proxy.address()).getHostName(); - int port = ((InetSocketAddress) proxy.address()).getPort(); - switch (proxy.type()) { - case HTTP: - return clientBuilder.proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress(host, port))).build(); - case SOCKS: - return clientBuilder.proxy(new ProxyOptions(ProxyOptions.Type.SOCKS5, new InetSocketAddress(host, port))).build(); - default: - } - } - } - } - String host = null; - int port = 0; - if (System.getProperty("https.proxyHost") != null && System.getProperty("https.proxyPort") != null) { - host = System.getProperty("https.proxyHost"); - port = Integer.parseInt(System.getProperty("https.proxyPort")); - } else if (System.getProperty("http.proxyHost") != null && System.getProperty("http.proxyPort") != null) { - host = System.getProperty("http.proxyHost"); - port = Integer.parseInt(System.getProperty("http.proxyPort")); - } - if (host != null) { - clientBuilder.proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress(host, port))); - } - } catch (URISyntaxException e) { } - } - return clientBuilder.build(); - } - - protected String baseUri() { - if (this.baseUri != null) { - return this.baseUri; - } else { - return AzureEnvironment.AZURE.url(AzureEnvironment.Endpoint.RESOURCE_MANAGER); - } - } - - protected AuthFile buildAuthFile(File credFile) throws IOException { - this.authFile = AuthFile.parse(credFile); - return this.authFile; - } - - protected TokenCredential credentialFromFile() { - return this.authFile.credential(); - } - - protected String clientIdFromFile() { - return authFile.clientId(); - } - - protected AzureProfile profile() { - return this.profile; - } - - protected abstract void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) throws IOException; - - protected abstract void cleanUpResources(); -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestDelayProvider.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestDelayProvider.java deleted file mode 100644 index 0988cd041ebfe..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestDelayProvider.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.azure.resourcemanager.resources.fluentcore.utils.DelayProvider; - -import java.time.Duration; - -public class TestDelayProvider extends DelayProvider { - private boolean isLiveMode; - - public TestDelayProvider(boolean isLiveMode) { - this.isLiveMode = isLiveMode; - } - - @Override - public void sleep(int milliseconds) { - if (isLiveMode) { - super.sleep(milliseconds); - } - } - - @Override - public Duration getLroRetryTimeout() { - return isLiveMode ? super.getLroRetryTimeout() : Duration.ofMillis(1); - } - - @Override - public Duration getDelayDuration(Duration delay) { - return isLiveMode ? delay : Duration.ofMillis(1); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestFileProvider.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestFileProvider.java deleted file mode 100644 index f88377a8ab770..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestFileProvider.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.azure.resourcemanager.resources.fluentcore.utils.FileProvider; - -import java.io.File; -import java.io.IOException; - -/** - * - */ -public class TestFileProvider extends FileProvider { - - private boolean isRecordMode; - - /** - * Constructor. - * @param isRecordMode whether test case is in recording mode. - */ - public TestFileProvider(boolean isRecordMode) { - this.isRecordMode = isRecordMode; - } - - @Override - public void prepareFileLocation(File file) throws IOException { - if (isRecordMode) { - // delete existing file so new file can be recorded during recording. - file.delete(); - } - super.prepareFileLocation(file); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestResourceNamer.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestResourceNamer.java deleted file mode 100644 index dd9b110dc3983..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestResourceNamer.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.azure.resourcemanager.resources.fluentcore.utils.ResourceNamer; - -import java.time.OffsetDateTime; -import java.util.NoSuchElementException; - -public class TestResourceNamer extends ResourceNamer { - private final InterceptorManager interceptorManager; - - public TestResourceNamer(String name, InterceptorManager interceptorManager) { - super(name); - this.interceptorManager = interceptorManager; - } - - /** - * Gets a random name. - * - * @param prefix the prefix to be used if possible - * @param maxLen the max length for the random generated name - * @return the random name - */ - @Override - public String randomName(String prefix, int maxLen) { - if (interceptorManager.isPlaybackMode()) { - try { - return interceptorManager.popVariable(); - } catch (NoSuchElementException e) { - return super.randomName(prefix, maxLen); - } - } - String randomName = super.randomName(prefix, maxLen); - - interceptorManager.pushVariable(randomName); - - return randomName; - } - - @Override - public String randomUuid() { - if (interceptorManager.isPlaybackMode()) { - try { - return interceptorManager.popVariable(); - } catch (NoSuchElementException e) { - return super.randomUuid(); - } - } - String randomName = super.randomUuid(); - - interceptorManager.pushVariable(randomName); - - return randomName; - } - - @Override - public OffsetDateTime dateTimeNow() { - if (interceptorManager.isPlaybackMode()) { - try { - return OffsetDateTime.parse(interceptorManager.popVariable()); - } catch (NoSuchElementException e) { - return super.dateTimeNow(); - } - } - OffsetDateTime dateTime = super.dateTimeNow(); - interceptorManager.pushVariable(dateTime.toString()); - - return dateTime; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestResourceNamerFactory.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestResourceNamerFactory.java deleted file mode 100644 index 61f21d70586cf..0000000000000 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestResourceNamerFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.resources.core; - -import com.azure.resourcemanager.resources.fluentcore.utils.ResourceNamer; -import com.azure.resourcemanager.resources.fluentcore.utils.ResourceNamerFactory; - -public class TestResourceNamerFactory extends ResourceNamerFactory { - - private final InterceptorManager interceptorManager; - - TestResourceNamerFactory(InterceptorManager mockIntegrationTestBase) { - this.interceptorManager = mockIntegrationTestBase; - } - @Override - public ResourceNamer createResourceNamer(String name) { - return new TestResourceNamer(name, interceptorManager); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index edb98a60726c7..2c55fc7dcefba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -13,7 +13,7 @@ 1.7.0 ../../parents/azure-client-sdk-parent - + com.azure.resourcemanager azure-resourcemanager-samples 2.0.0-beta.4 @@ -49,6 +49,12 @@ azure-resourcemanager 2.0.0-beta.4 + + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 + test + com.azure azure-identity diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java index 6ffaec5f4f500..30345e115e459 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java @@ -21,7 +21,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.security.keyvault.certificates.CertificateClient; import com.azure.security.keyvault.certificates.CertificateClientBuilder; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppBasic.java index b4190bb74e5d6..933d0f2f36d96 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppBasic.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppBasic.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.appservice.models.FunctionApp; import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java index 0125068651c98..79abc6ffdadd4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.appservice.models.FunctionApp; import com.azure.resourcemanager.appservice.models.LogLevel; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import org.apache.commons.lang.time.StopWatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppSourceControl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppSourceControl.java index 4dc7cd2680f37..892208440ede7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppSourceControl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppSourceControl.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.appservice.models.FunctionApp; import com.azure.resourcemanager.appservice.models.PublishingProfile; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import org.eclipse.jgit.api.Git; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithAuthentication.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithAuthentication.java index a153757dc5113..ee1759d9bf6fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithAuthentication.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithAuthentication.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.appservice.models.NameValuePair; import com.azure.resourcemanager.appservice.models.PublishingProfile; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithDomainSsl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithDomainSsl.java index 7b7e614724f00..d0b96fd75cc41 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithDomainSsl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithDomainSsl.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.io.File; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxFunctionAppSourceControl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxFunctionAppSourceControl.java index 43abeb301b87f..7a9d3076dec55 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxFunctionAppSourceControl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxFunctionAppSourceControl.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.appservice.models.FunctionRuntimeStack; import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccountSkuType; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppBasic.java index 76bfa3c9c72ec..2cf8a74f3c98d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppBasic.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppBasic.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppCosmosDbByMsi.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppCosmosDbByMsi.java index 88916036a0ebe..003d09fccbfc6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppCosmosDbByMsi.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppCosmosDbByMsi.java @@ -11,7 +11,7 @@ //import com.azure.management.containerregistry.Registry; //import com.azure.management.containerregistry.RegistryCredentials; import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; /** * Azure App Service basic sample for managing web apps. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSourceControl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSourceControl.java index 688136953f199..535cb83ca3198 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSourceControl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSourceControl.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.appservice.models.RuntimeStack; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSqlConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSqlConnection.java index 7fdfaa9256cdd..9a5a90dc060ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSqlConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSqlConnection.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.appservice.models.RuntimeStack; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SqlDatabase; import com.azure.resourcemanager.sql.models.SqlServer; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java index 5ee82506f9a54..26496f254c7b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.appservice.models.RuntimeStack; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithContainerRegistry.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithContainerRegistry.java index 379f99837a88a..a58289fee708e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithContainerRegistry.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithContainerRegistry.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.containerregistry.models.Registry; import com.azure.resourcemanager.containerregistry.models.RegistryCredentials; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.DockerUtils; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithDomainSsl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithDomainSsl.java index 5f43a687038fb..d1dfcc2b2123a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithDomainSsl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithDomainSsl.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppBasic.java index 9114e02725e30..b10bf6dc2914f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppBasic.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppBasic.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbByMsi.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbByMsi.java index 7c0c2cce04c6a..94c89484ca7ce 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbByMsi.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbByMsi.java @@ -7,7 +7,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.util.Configuration; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.security.keyvault.secrets.SecretClient; import com.azure.security.keyvault.secrets.SecretClientBuilder; import com.azure.security.keyvault.secrets.models.KeyVaultSecret; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java index bb2e71081f145..02e2548b7f9cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind; import com.azure.resourcemanager.keyvault.models.Vault; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppLogs.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppLogs.java index f8650226352e3..d671574ac9e1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppLogs.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppLogs.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.appservice.models.LogLevel; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import org.apache.commons.lang.time.StopWatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSlots.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSlots.java index bff1cfb0a2bbe..093b1eb11a6b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSlots.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSlots.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControl.java index fb93e9f03b022..4a47287401427 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControl.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControlAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControlAsync.java index 0bb93dfc3af81..37e3bd57e2961 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControlAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControlAsync.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSqlConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSqlConnection.java index e0ce885a15504..d7d12f92561b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSqlConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSqlConnection.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SqlDatabase; import com.azure.resourcemanager.sql.models.SqlServer; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java index 1b207ba9e5a94..38630657abf5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithAuthentication.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithAuthentication.java index 4ae90a57c50ca..23a65d3e8aa7b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithAuthentication.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithAuthentication.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebContainer; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithDomainSsl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithDomainSsl.java index 883e2df1aef40..dcc9858020ed2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithDomainSsl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithDomainSsl.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.core.http.policy.HttpLogDetailLevel; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageServicePrincipalCredentials.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageServicePrincipalCredentials.java index 9f6695fb1968c..0a341d963bdf7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageServicePrincipalCredentials.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageServicePrincipalCredentials.java @@ -9,7 +9,7 @@ import com.azure.identity.ClientCertificateCredentialBuilder; import com.azure.identity.ClientSecretCredentialBuilder; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.google.common.io.ByteStreams; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.authorization.models.BuiltInRole; @@ -86,7 +86,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile .define(raName) .forServicePrincipal(servicePrincipal) .withBuiltInRole(BuiltInRole.CONTRIBUTOR) - .withSubscriptionScope(profile.subscriptionId()) + .withSubscriptionScope(profile.getSubscriptionId()) .create(); System.out.println("Created role assignment " + raName + "."); @@ -101,7 +101,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile .tenantId(authenticated.tenantId()) .clientId(servicePrincipal.applicationId()) .clientSecret(password1) - .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); try { Azure.authenticate(testCredential, profile).withDefaultSubscription(); @@ -117,7 +117,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile .tenantId(authenticated.tenantId()) .clientId(servicePrincipal.applicationId()) .clientSecret(password2) - .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); try { Azure.authenticate(testCredential, profile).withDefaultSubscription(); @@ -133,7 +133,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile .tenantId(authenticated.tenantId()) .clientId(servicePrincipal.applicationId()) .pfxCertificate(ManageServicePrincipalCredentials.class.getResource("/myTest.pfx").toString(), "Abc123") - .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); try { Azure.authenticate(testCredential, profile).withDefaultSubscription(); @@ -164,7 +164,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile .tenantId(authenticated.tenantId()) .clientId(servicePrincipal.applicationId()) .clientSecret(password1) - .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); try { Azure.authenticate(testCredential, profile).withDefaultSubscription(); @@ -192,7 +192,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile .tenantId(authenticated.tenantId()) .clientId(servicePrincipal.applicationId()) .clientSecret(password2) - .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); try { Azure.authenticate(testCredential, profile).withDefaultSubscription() diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageUsersGroupsAndRoles.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageUsersGroupsAndRoles.java index 29811ebcd2089..65d60d6d8e9d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageUsersGroupsAndRoles.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageUsersGroupsAndRoles.java @@ -7,7 +7,7 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.management.AzureEnvironment; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.authorization.models.ActiveDirectoryGroup; import com.azure.resourcemanager.authorization.models.ActiveDirectoryUser; @@ -70,7 +70,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile .define(raName1) .forUser(user) .withBuiltInRole(BuiltInRole.READER) - .withSubscriptionScope(profile.subscriptionId()) + .withSubscriptionScope(profile.getSubscriptionId()) .create(); System.out.println("Created Role Assignment:"); Utils.print(roleAssignment1); @@ -85,7 +85,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile // Get role by scope and role name RoleDefinition roleDefinition = authenticated.roleDefinitions() - .getByScopeAndRoleName("subscriptions/" + profile.subscriptionId(), "Contributor"); + .getByScopeAndRoleName("subscriptions/" + profile.getSubscriptionId(), "Contributor"); Utils.print(roleDefinition); // ============================================================ @@ -107,7 +107,7 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile .define(raName2) .forServicePrincipal(sp) .withBuiltInRole(BuiltInRole.CONTRIBUTOR) - .withSubscriptionScope(profile.subscriptionId()) + .withSubscriptionScope(profile.getSubscriptionId()) .create(); System.out.println("Created Role Assignment:"); Utils.print(roleAssignment2); diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ConvertVirtualMachineToManagedDisks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ConvertVirtualMachineToManagedDisks.java index 3fd6e732de67b..e216d398c910e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ConvertVirtualMachineToManagedDisks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ConvertVirtualMachineToManagedDisks.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVHD.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVHD.java index 663479e373710..2356dfde6f108 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVHD.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVHD.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.jcraft.jsch.JSchException; import com.azure.resourcemanager.compute.models.CachingTypes; import com.azure.resourcemanager.compute.models.Disk; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVM.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVM.java index b331089210d7b..7b1cc6d788c65 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVM.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVM.java @@ -7,7 +7,7 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.management.AzureEnvironment; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.jcraft.jsch.JSchException; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.compute.models.CachingTypes; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromSnapshot.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromSnapshot.java index b8fc033f9b2eb..d56dbddd12ac5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromSnapshot.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromSnapshot.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineDataDisk; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java index 438f7d023a98d..a8f24bb138919 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.compute.models.VirtualMachineUnmanagedDataDisk; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesAsyncTrackingRelatedResources.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesAsyncTrackingRelatedResources.java index 73dd162aaf942..54907b1db76f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesAsyncTrackingRelatedResources.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesAsyncTrackingRelatedResources.java @@ -21,7 +21,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import reactor.core.publisher.Flux; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesInParallel.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesInParallel.java index d036b85e46bf4..52a73bd5d74e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesInParallel.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesInParallel.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import org.apache.commons.lang.time.StopWatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesUsingCustomImageOrSpecializedVHD.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesUsingCustomImageOrSpecializedVHD.java index fa86dc8cf2583..92353e49b7a21 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesUsingCustomImageOrSpecializedVHD.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesUsingCustomImageOrSpecializedVHD.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.SSHShell; import com.azure.resourcemanager.samples.Utils; import com.fasterxml.jackson.databind.JsonNode; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListComputeSkus.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListComputeSkus.java index 6e55849ac071a..481c3262a77e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListComputeSkus.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListComputeSkus.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.compute.models.ComputeSku; import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import java.util.Map; import java.util.Set; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListVirtualMachineExtensionImages.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListVirtualMachineExtensionImages.java index 3cb6a8a0e1720..edafa4d741cbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListVirtualMachineExtensionImages.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListVirtualMachineExtensionImages.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineExtensionImageVersion; import com.azure.resourcemanager.compute.models.VirtualMachinePublisher; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; /** * List all virtual machine extension image publishers and diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListVirtualMachineImages.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListVirtualMachineImages.java index eac14210c7ca7..d3f4d02814d23 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListVirtualMachineImages.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ListVirtualMachineImages.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachinePublisher; import com.azure.resourcemanager.compute.models.VirtualMachineSku; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; /** * List all virtual machine image publishers and diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageAvailabilitySet.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageAvailabilitySet.java index 2cfe6a2e29b50..84f971bb22775 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageAvailabilitySet.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageAvailabilitySet.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageManagedDisks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageManagedDisks.java index 64e90a06f1c06..1993894201e93 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageManagedDisks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageManagedDisks.java @@ -7,7 +7,7 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.management.AzureEnvironment; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.jcraft.jsch.JSchException; import com.azure.resourcemanager.Azure; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageResourceFromMSIEnabledVirtualMachineBelongsToAADGroup.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageResourceFromMSIEnabledVirtualMachineBelongsToAADGroup.java index 881f9d8484a26..5f1bd6d889086 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageResourceFromMSIEnabledVirtualMachineBelongsToAADGroup.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageResourceFromMSIEnabledVirtualMachineBelongsToAADGroup.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.authorization.models.BuiltInRole; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageScaleSetUserAssignedMSIFromServicePrincipal.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageScaleSetUserAssignedMSIFromServicePrincipal.java index 7223a120fb0cf..7c43e2ccb12ab 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageScaleSetUserAssignedMSIFromServicePrincipal.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageScaleSetUserAssignedMSIFromServicePrincipal.java @@ -21,7 +21,7 @@ import com.azure.resourcemanager.msi.models.Identity; import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageStorageFromMSIEnabledVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageStorageFromMSIEnabledVirtualMachine.java index 9ff62758c6114..65f938266f481 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageStorageFromMSIEnabledVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageStorageFromMSIEnabledVirtualMachine.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.authorization.models.BuiltInRole; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageUserAssignedMSIEnabledVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageUserAssignedMSIEnabledVirtualMachine.java index 304ea4a2c3c1a..8435e61ae2244 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageUserAssignedMSIEnabledVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageUserAssignedMSIEnabledVirtualMachine.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.msi.models.Identity; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachine.java index 90cd14f655a0e..af04eef9dde3e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachine.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.Date; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineAsync.java index a679965bdbfb8..34601e63ab44f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineAsync.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java index c7487c163af24..dcff0252c22b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSet.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSet.java index fe563af545547..a112bd87ebf6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSet.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSet.java @@ -23,7 +23,7 @@ import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNetworkInterface; import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNicIpConfiguration; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java index e99c6101073c6..e42f3a270b6b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java @@ -21,7 +21,7 @@ import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNicIpConfiguration; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import reactor.core.publisher.Flux; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetWithUnmanagedDisks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetWithUnmanagedDisks.java index 969a7f08f9f4c..6bb7735af54d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetWithUnmanagedDisks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetWithUnmanagedDisks.java @@ -21,7 +21,7 @@ import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNetworkInterface; import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNicIpConfiguration; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithDisk.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithDisk.java index 426f3d0fbe6f0..4e52a23bd480a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithDisk.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithDisk.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithUnmanagedDisks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithUnmanagedDisks.java index 9fddc0f98677a..604b8af365fac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithUnmanagedDisks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithUnmanagedDisks.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.Date; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachinesInParallel.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachinesInParallel.java index 2e2ef70f838d0..5b2effcbb42c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachinesInParallel.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachinesInParallel.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachine.java index 6d929e0386068..2bc72499e8d1d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachine.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.network.models.PublicIPSkuType; import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachineScaleSet.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachineScaleSet.java index 69699d444b394..866f19e67c04e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachineScaleSet.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachineScaleSet.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java index c14a2519ec726..ca4a3c4e5c895 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.containerinstance.models.ContainerGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java index 6ae81dbeda7b2..1776fa8ff2749 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.containerinstance.models.ContainerGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java index 25b235a6b55bf..8be0b67d59ab2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.containerinstance.models.ContainerGroup; import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java index ab5c4e11dae7c..989e82045f308 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.containerservice.models.ContainerServiceVMSizeTypes; import com.azure.resourcemanager.containerservice.models.KubernetesCluster; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.DockerUtils; import com.azure.resourcemanager.samples.SSHShell; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistry.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistry.java index 015a6df00bb16..cde98263cdc18 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistry.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistry.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.containerregistry.models.Registry; import com.azure.resourcemanager.containerregistry.models.RegistryCredentials; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.DockerUtils; import com.azure.resourcemanager.samples.Utils; import com.github.dockerjava.api.DockerClient; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistryWithWebhooks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistryWithWebhooks.java index 067512ca146b0..56cc2c2e0f9f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistryWithWebhooks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistryWithWebhooks.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.containerregistry.models.WebhookAction; import com.azure.resourcemanager.containerregistry.models.WebhookEventInfo; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.DockerUtils; import com.azure.resourcemanager.samples.Utils; import com.github.dockerjava.api.DockerClient; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBTableWithVirtualNetworkRule.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBTableWithVirtualNetworkRule.java index f1a11bf584d66..d81da01b32d3f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBTableWithVirtualNetworkRule.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBTableWithVirtualNetworkRule.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.network.models.ServiceEndpointType; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.List; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithEventualConsistency.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithEventualConsistency.java index 578a128a9873a..0a2e8c6db8205 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithEventualConsistency.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithEventualConsistency.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind; import com.azure.resourcemanager.cosmos.models.DatabaseAccountListKeysResult; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java index cb2ede54b1fcb..9638ab8c027ef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.cosmos.models.CosmosDBAccount; import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithKindMongoDB.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithKindMongoDB.java index 88bd91e3cee9a..792c0455e73ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithKindMongoDB.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithKindMongoDB.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind; import com.azure.resourcemanager.cosmos.models.DatabaseAccountListConnectionStringsResult; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/ManageHACosmosDB.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/ManageHACosmosDB.java index 6be11e0c9f7f0..375aa06f3761b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/ManageHACosmosDB.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/ManageHACosmosDB.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind; import com.azure.resourcemanager.cosmos.models.DatabaseAccountListKeysResult; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/dns/samples/ManageDns.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/dns/samples/ManageDns.java index aebea037a436a..cc01cf82a1446 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/dns/samples/ManageDns.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/dns/samples/ManageDns.java @@ -22,7 +22,7 @@ import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java index dae848ecb8da8..ca8c9be6d3bcc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.models.StorageAccountSkuType; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java index 3570ce08736c7..d3b0e067de962 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRule; import com.azure.resourcemanager.monitor.models.DiagnosticSetting; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java index a472257cd6d3f..11b3fc9f1c421 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; import com.azure.resourcemanager.eventhubs.models.ProvisioningStateDR; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/keyvault/samples/ManageKeyVault.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/keyvault/samples/ManageKeyVault.java index 5abed88a01bb3..a84e8d9d0bc6f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/keyvault/samples/ManageKeyVault.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/keyvault/samples/ManageKeyVault.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.keyvault.models.SecretPermissions; import com.azure.resourcemanager.keyvault.models.Vault; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java index bf925c6fee058..ced9675f88ac3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.containerservice.models.ContainerServiceVMSizeTypes; import com.azure.resourcemanager.containerservice.models.KubernetesCluster; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.DockerUtils; import com.azure.resourcemanager.samples.SSHShell; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManageKubernetesCluster.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManageKubernetesCluster.java index 1bd9af62ed927..5859b1dd6a3e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManageKubernetesCluster.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManageKubernetesCluster.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.containerservice.models.ContainerServiceVMSizeTypes; import com.azure.resourcemanager.containerservice.models.KubernetesCluster; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.SSHShell; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManagedKubernetesClusterWithAdvancedNetworking.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManagedKubernetesClusterWithAdvancedNetworking.java index c4ca722e497b1..f64cb84d1e1c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManagedKubernetesClusterWithAdvancedNetworking.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManagedKubernetesClusterWithAdvancedNetworking.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.containerservice.models.NetworkPlugin; import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.SSHShell; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/AutoscaleSettingsBasedOnPerformanceOrSchedule.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/AutoscaleSettingsBasedOnPerformanceOrSchedule.java index 6f4a90ed9d262..f1af5f5fbb0ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/AutoscaleSettingsBasedOnPerformanceOrSchedule.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/AutoscaleSettingsBasedOnPerformanceOrSchedule.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.monitor.models.ScaleType; import com.azure.resourcemanager.monitor.models.TimeAggregationType; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java index 3e54d0d49c0ab..c46f4c256e8e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.monitor.models.TimeSeriesElement; import com.azure.resourcemanager.monitor.fluent.inner.MetadataValueInner; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.AccessTier; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/SecurityBreachOrRiskActivityLogAlerts.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/SecurityBreachOrRiskActivityLogAlerts.java index 5d4bca1d2e316..2bc5c7bedfebd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/SecurityBreachOrRiskActivityLogAlerts.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/SecurityBreachOrRiskActivityLogAlerts.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.monitor.models.ActivityLogAlert; import com.azure.resourcemanager.monitor.models.EventData; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.AccessTier; @@ -96,7 +96,7 @@ public static boolean runSample(Azure azure) { // for near real time monitoring. SdkContext.sleep(6 * 60000); - OffsetDateTime recordDateTime = azure.sdkContext().dateTimeNow(); + OffsetDateTime recordDateTime = OffsetDateTime.parse("2020-08-03T16:34:27.009944500+08:00"); // get activity logs for the same period. PagedIterable logs = azure.activityLogs().defineQuery() .startingFrom(recordDateTime.minusDays(7)) diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/WebAppPerformanceMonitoringAlerts.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/WebAppPerformanceMonitoringAlerts.java index 534f8cd0c761c..86300bc65a4ec 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/WebAppPerformanceMonitoringAlerts.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/WebAppPerformanceMonitoringAlerts.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.monitor.models.MetricAlertRuleCondition; import com.azure.resourcemanager.monitor.models.MetricAlertRuleTimeAggregation; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/CreateSimpleInternetFacingLoadBalancer.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/CreateSimpleInternetFacingLoadBalancer.java index 1fc3ed757388c..c2f2845a16893 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/CreateSimpleInternetFacingLoadBalancer.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/CreateSimpleInternetFacingLoadBalancer.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.network.models.HasNetworkInterfaces; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import org.apache.commons.lang.time.StopWatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageApplicationGateway.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageApplicationGateway.java index 25567a07c6bc8..8fbf05043687b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageApplicationGateway.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageApplicationGateway.java @@ -19,7 +19,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; import org.apache.commons.lang.time.StopWatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRoute.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRoute.java index e4201c51d1192..2685eea31d70c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRoute.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRoute.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.network.models.VirtualNetworkGateway; import com.azure.resourcemanager.network.models.VirtualNetworkGatewaySkuName; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; /** * Azure Network sample for managing express route circuits. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRouteCrossConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRouteCrossConnection.java index 3d9952f12772f..890ea991e05c8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRouteCrossConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRouteCrossConnection.java @@ -9,7 +9,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.network.models.ExpressRouteCrossConnection; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; /** * Azure Network sample for managing express route cross connections. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageIPAddress.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageIPAddress.java index 3813ac4c23969..d8f86e4cdf082 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageIPAddress.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageIPAddress.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.network.models.NetworkInterface; import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.Date; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternalLoadBalancer.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternalLoadBalancer.java index ed11259ae33f6..587ea990accb8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternalLoadBalancer.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternalLoadBalancer.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.network.models.TransportProtocol; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import org.apache.commons.lang.time.StopWatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternetFacingLoadBalancer.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternetFacingLoadBalancer.java index e30d21c7339b7..59226fae78c4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternetFacingLoadBalancer.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternetFacingLoadBalancer.java @@ -21,7 +21,7 @@ import com.azure.resourcemanager.network.models.TransportProtocol; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import org.apache.commons.lang.time.StopWatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkInterface.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkInterface.java index 43ea16c6d84bc..9175221c902ad 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkInterface.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkInterface.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.network.models.NetworkInterface; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.Date; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkPeeringInSameSubscription.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkPeeringInSameSubscription.java index de264acc8ecf7..9fd1920b3ef42 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkPeeringInSameSubscription.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkPeeringInSameSubscription.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.Arrays; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkSecurityGroup.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkSecurityGroup.java index 33bbc20bccdfd..7c9a9ca3961f5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkSecurityGroup.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkSecurityGroup.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.network.models.NetworkSecurityGroup; import com.azure.resourcemanager.network.models.SecurityRuleProtocol; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.SSHShell; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java index f2cee51b70bcc..b11f7d4c1bb6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java @@ -25,7 +25,7 @@ import com.azure.resourcemanager.network.models.VerificationIPFlow; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageSimpleApplicationGateway.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageSimpleApplicationGateway.java index c79d368c2d879..7e3bca5d7b88a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageSimpleApplicationGateway.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageSimpleApplicationGateway.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.network.models.ApplicationGateway; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.io.File; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualMachinesInParallelWithNetwork.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualMachinesInParallelWithNetwork.java index 87e9d515441b5..8a9ad7e310896 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualMachinesInParallelWithNetwork.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualMachinesInParallelWithNetwork.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; import org.apache.commons.lang.time.StopWatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetwork.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetwork.java index 795991b27c6b0..dd1b8874ed1b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetwork.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetwork.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.network.models.NetworkSecurityGroup; import com.azure.resourcemanager.network.models.SecurityRuleProtocol; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.Date; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetworkAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetworkAsync.java index 72e1cafa48d6a..73951e352d5e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetworkAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetworkAsync.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.network.models.SecurityRuleProtocol; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import reactor.core.publisher.Flux; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayPoint2SiteConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayPoint2SiteConnection.java index 2248c1a21dc2f..6e79488140c3c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayPoint2SiteConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayPoint2SiteConnection.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.network.models.VirtualNetworkGateway; import com.azure.resourcemanager.network.models.VirtualNetworkGatewaySkuName; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.io.File; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewaySite2SiteConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewaySite2SiteConnection.java index d839005c97967..9868c60a57a9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewaySite2SiteConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewaySite2SiteConnection.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.network.models.VirtualNetworkGateway; import com.azure.resourcemanager.network.models.VirtualNetworkGatewaySkuName; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayVNet2VNetConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayVNet2VNetConnection.java index ac38080005c8f..5305865194351 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayVNet2VNetConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayVNet2VNetConnection.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/VerifyNetworkPeeringWithNetworkWatcher.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/VerifyNetworkPeeringWithNetworkWatcher.java index 504ac5f6e6d43..9759f45a3c91a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/VerifyNetworkPeeringWithNetworkWatcher.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/VerifyNetworkPeeringWithNetworkWatcher.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; import com.azure.resourcemanager.resources.fluentcore.model.Executable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import java.util.ArrayList; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/privatedns/samples/ManagePrivateDns.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/privatedns/samples/ManagePrivateDns.java index 251c663bcb31f..b6e9a768973b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/privatedns/samples/ManagePrivateDns.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/privatedns/samples/ManagePrivateDns.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.privatedns.models.PrivateDnsZone; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.samples.Utils; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/rediscache/samples/ManageRedisCache.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/rediscache/samples/ManageRedisCache.java index 332f99789fd2b..4d3374e22a12a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/rediscache/samples/ManageRedisCache.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/rediscache/samples/ManageRedisCache.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplate.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplate.java index d509bc43b88e0..c1f9a4fb05018 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplate.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplate.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.resources.models.DeploymentMode; import com.azure.resourcemanager.resources.models.DeploymentOperation; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateAsync.java index ca8c7bc0c88ab..41c9b30f9112a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateAsync.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.resources.models.Deployment; import com.azure.resourcemanager.resources.models.DeploymentMode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.io.ByteStreams; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithDeploymentOperations.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithDeploymentOperations.java index b4fb0dd7b4807..9d340d853e026 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithDeploymentOperations.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithDeploymentOperations.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.resources.models.DeploymentMode; import com.azure.resourcemanager.resources.models.DeploymentOperation; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.io.ByteStreams; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithProgress.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithProgress.java index 8cb31ff9ed02b..0850c6a092a3d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithProgress.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithProgress.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.resources.models.Deployment; import com.azure.resourcemanager.resources.models.DeploymentMode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithTags.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithTags.java index c184d1d1a649c..c3b48f27bb030 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithTags.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithTags.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.resources.models.DeploymentOperation; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployVirtualMachineUsingARMTemplate.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployVirtualMachineUsingARMTemplate.java index a2899f263dff2..8130671de695f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployVirtualMachineUsingARMTemplate.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployVirtualMachineUsingARMTemplate.java @@ -8,7 +8,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.Deployment; import com.azure.resourcemanager.resources.models.DeploymentMode; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResource.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResource.java index 99e03d4abde9f..168bd815d99d3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResource.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResource.java @@ -9,7 +9,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.SkuName; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResourceGroup.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResourceGroup.java index 8ea843c66078c..e59c71bc0045d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResourceGroup.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResourceGroup.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; /** * Azure Resource sample for managing resource groups - diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java index 911334e89d5a0..5795a550e6706 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java @@ -1549,7 +1549,6 @@ public static String getSecondaryServicePrincipalSecret(String envSecondaryServi */ public static void createCertificate(String certPath, String pfxPath, String alias, String password, String cnName) throws Exception { - SdkContext.prepareFileLocation(new File(pfxPath), new File(certPath)); if (new File(pfxPath).exists()) { return; } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/GettingSqlServerMetrics.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/GettingSqlServerMetrics.java index 6bb44815baa3c..bd01546667e54 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/GettingSqlServerMetrics.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/GettingSqlServerMetrics.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.monitor.models.MetricValue; import com.azure.resourcemanager.monitor.models.TimeSeriesElement; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SampleName; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabase.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabase.java index 6cc6e326c348a..aee34da87a22e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabase.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabase.java @@ -10,7 +10,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.DatabaseEdition; import com.azure.resourcemanager.sql.models.ServiceObjectiveName; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabaseInElasticPool.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabaseInElasticPool.java index 3abca97de38ca..8d9cb4c76876a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabaseInElasticPool.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabaseInElasticPool.java @@ -10,7 +10,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.DatabaseEdition; import com.azure.resourcemanager.sql.models.ElasticPoolActivity; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabasesAcrossDifferentDataCenters.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabasesAcrossDifferentDataCenters.java index 5b6395614c454..a72fb3d9ea9d3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabasesAcrossDifferentDataCenters.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabasesAcrossDifferentDataCenters.java @@ -16,7 +16,7 @@ import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.CreateMode; import com.azure.resourcemanager.sql.models.DatabaseEdition; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFailoverGroups.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFailoverGroups.java index d2245ee57e9f4..81c969d730310 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFailoverGroups.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFailoverGroups.java @@ -8,7 +8,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SampleName; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFirewallRules.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFirewallRules.java index 2b4c837991f74..853c2194b0f3c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFirewallRules.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFirewallRules.java @@ -10,7 +10,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SqlFirewallRule; import com.azure.resourcemanager.sql.models.SqlServer; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlImportExportDatabase.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlImportExportDatabase.java index 0625a27c1a270..835e7c5bc0579 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlImportExportDatabase.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlImportExportDatabase.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SampleName; import com.azure.resourcemanager.sql.models.SqlDatabase; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerDnsAliases.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerDnsAliases.java index d585bf1aabe03..6b754bce9317e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerDnsAliases.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerDnsAliases.java @@ -9,7 +9,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SqlServer; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerKeysWithAzureKeyVaultKey.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerKeysWithAzureKeyVaultKey.java index daf17dc54d0b9..d5446b556c8cf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerKeysWithAzureKeyVaultKey.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerKeysWithAzureKeyVaultKey.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.keyvault.models.SkuName; import com.azure.resourcemanager.keyvault.models.Vault; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SqlServer; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerSecurityAlertPolicy.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerSecurityAlertPolicy.java index 474b500475c99..2ccf2261d16bd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerSecurityAlertPolicy.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerSecurityAlertPolicy.java @@ -8,7 +8,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SampleName; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlVirtualNetworkRules.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlVirtualNetworkRules.java index e3a254943e600..388dcad214898 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlVirtualNetworkRules.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlVirtualNetworkRules.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.network.models.ServiceEndpointType; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.SqlServer; import com.azure.resourcemanager.sql.models.SqlVirtualNetworkRule; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlWithRecoveredOrRestoredDatabase.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlWithRecoveredOrRestoredDatabase.java index b993fbcbfcc97..c8a222b060ab6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlWithRecoveredOrRestoredDatabase.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlWithRecoveredOrRestoredDatabase.java @@ -9,7 +9,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.sql.models.RestorePoint; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccount.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccount.java index 0acd5244df886..68a9dfb72dfb8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccount.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccount.java @@ -11,7 +11,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.models.StorageAccountEncryptionStatus; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountAsync.java index 3f49db22a9ad8..0abe475919d34 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountAsync.java @@ -10,7 +10,7 @@ import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.models.StorageAccounts; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountNetworkRules.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountNetworkRules.java index 5b285bfc298a0..af614641db3bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountNetworkRules.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountNetworkRules.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.network.models.ServiceEndpointType; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.Utils; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java index c9e6e594062ce..85f2c2393a187 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java @@ -3,18 +3,20 @@ package com.azure.resourcemanager.samples; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.appplatform.samples.ManageSpringCloud; -import com.azure.resourcemanager.resources.core.TestBase; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class AppPlatformLiveOnlyTests extends SamplesTestBase { - public AppPlatformLiveOnlyTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } @Test + @DoNotRecord public void testSpringCloud() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageSpringCloud.runSample(azure, clientIdFromFile())); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java index 6e6d3d874b5b8..b6be28910ba38 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java @@ -3,6 +3,7 @@ package com.azure.resourcemanager.samples; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.appservice.samples.ManageFunctionAppLogs; import com.azure.resourcemanager.appservice.samples.ManageFunctionAppSourceControl; import com.azure.resourcemanager.appservice.samples.ManageFunctionAppWithAuthentication; @@ -19,82 +20,148 @@ import com.azure.resourcemanager.appservice.samples.ManageWebAppSourceControl; import com.azure.resourcemanager.appservice.samples.ManageWebAppStorageAccountConnection; import com.azure.resourcemanager.appservice.samples.ManageWebAppWithDomainSsl; -import com.azure.resourcemanager.resources.core.TestBase; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class AppServiceSampleLiveOnlyTests extends SamplesTestBase { - public AppServiceSampleLiveOnlyTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } @Test + @DoNotRecord public void testManageWebAppSourceControl() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageWebAppSourceControl.runSample(azure)); } @Test + @DoNotRecord public void testManageWebAppStorageAccountConnection() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageWebAppStorageAccountConnection.runSample(azure)); } @Test + @DoNotRecord public void testManageLinuxWebAppSourceControl() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageLinuxWebAppSourceControl.runSample(azure)); } @Test + @DoNotRecord public void testManageLinuxWebAppStorageAccountConnection() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageLinuxWebAppStorageAccountConnection.runSample(azure)); } @Test + @DoNotRecord public void testManageLinuxWebAppWithContainerRegistry() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageLinuxWebAppWithContainerRegistry.runSample(azure)); } @Test + @DoNotRecord public void testManageFunctionAppWithAuthentication() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageFunctionAppWithAuthentication.runSample(azure)); } @Test + @DoNotRecord public void testManageFunctionAppSourceControl() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageFunctionAppSourceControl.runSample(azure)); } @Test + @DoNotRecord public void testManageLinuxWebAppCosmosDbByMsi() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageLinuxWebAppCosmosDbByMsi.runSample(azure)); } @Test + @DoNotRecord public void testManageWebAppCosmosDbByMsi() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageWebAppCosmosDbByMsi.runSample(azure, credentialFromFile(), clientIdFromFile())); } @Test + @DoNotRecord public void testManageWebAppCosmosDbThroughKeyVault() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageWebAppCosmosDbThroughKeyVault.runSample(azure, clientIdFromFile())); } @Test + @DoNotRecord public void testManageFunctionAppLogs() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageFunctionAppLogs.runSample(azure)); } @Test + @DoNotRecord public void testManageWebAppLogs() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageWebAppLogs.runSample(azure)); } @Test + @DoNotRecord public void testManageLinuxFunctionAppSourceControl() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageLinuxFunctionAppSourceControl.runSample(azure)); } @Test + @DoNotRecord public void testManageWebAppWithDomainSsl() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageWebAppWithDomainSsl.runSample(azure)); } @@ -104,7 +171,12 @@ public void testManageWebAppWithDomainSsl() { // } @Test + @DoNotRecord public void testManageLinuxWebAppWithDomainSsl() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageLinuxWebAppWithDomainSsl.runSample(azure)); } @@ -114,7 +186,12 @@ public void testManageLinuxWebAppWithDomainSsl() { // } @Test + @DoNotRecord public void testManageFunctionAppWithDomainSsl() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageFunctionAppWithDomainSsl.runSample(azure)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerRegistryTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerRegistryTests.java index 60eca26799820..0edabedc43674 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerRegistryTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerRegistryTests.java @@ -3,25 +3,31 @@ package com.azure.resourcemanager.samples; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.containerregistry.samples.ManageContainerRegistry; import com.azure.resourcemanager.containerregistry.samples.ManageContainerRegistryWithWebhooks; -import com.azure.resourcemanager.resources.core.TestBase; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class ContainerRegistryTests extends SamplesTestBase { - public ContainerRegistryTests() { - // Failing in playback - dependent on Docker client/glassfish jersey library which is expecting a real connection - super(TestBase.RunCondition.LIVE_ONLY); - } @Test + @DoNotRecord public void testManageContainerRegistry() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageContainerRegistry.runSample(azure)); } @Test + @DoNotRecord public void testManageContainerRegistryWithWebhooks() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageContainerRegistryWithWebhooks.runSample(azure)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/GraphRbacTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/GraphRbacTests.java index 58be30fa20194..ef88f37531b36 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/GraphRbacTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/GraphRbacTests.java @@ -3,25 +3,36 @@ package com.azure.resourcemanager.samples; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.Azure; import com.azure.resourcemanager.authorization.samples.ManageServicePrincipalCredentials; import com.azure.resourcemanager.authorization.samples.ManageUsersGroupsAndRoles; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.test.ResourceManagerTestBase; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class GraphRbacTests extends TestBase { +import java.time.temporal.ChronoUnit; +import java.util.List; + +public class GraphRbacTests extends ResourceManagerTestBase { private Azure.Authenticated authenticated; private AzureProfile profile; - public GraphRbacTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } - @Test + @DoNotRecord public void testManageUsersGroupsAndRoles() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageUsersGroupsAndRoles.runSample(authenticated, profile)); } @@ -31,10 +42,33 @@ public void testManageUsersGroupsAndRoles() { // } @Test + @DoNotRecord public void testManageServicePrincipalCredentials() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageServicePrincipalCredentials.runSample(authenticated, profile)); } + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { authenticated = Azure.authenticate(httpPipeline, profile); diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/NetworkWatcherSampleLiveOnlyTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/NetworkWatcherSampleLiveOnlyTests.java index 55594ad1e1811..7540e3f135368 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/NetworkWatcherSampleLiveOnlyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/NetworkWatcherSampleLiveOnlyTests.java @@ -2,18 +2,20 @@ // Licensed under the MIT License. package com.azure.resourcemanager.samples; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.network.samples.ManageNetworkWatcher; -import com.azure.resourcemanager.resources.core.TestBase; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class NetworkWatcherSampleLiveOnlyTests extends SamplesTestBase { - public NetworkWatcherSampleLiveOnlyTests() { - super(TestBase.RunCondition.LIVE_ONLY); - } @Test + @DoNotRecord public void testManageNetworkWatcher() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ManageNetworkWatcher.runSample(azure)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/SamplesTestBase.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/SamplesTestBase.java index 5f0c9f6e1854f..950e155859b67 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/SamplesTestBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/SamplesTestBase.java @@ -3,28 +3,53 @@ package com.azure.resourcemanager.samples; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.Azure; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; -public class SamplesTestBase extends TestBase { - protected Azure azure; +import java.time.temporal.ChronoUnit; +import java.util.List; - public SamplesTestBase() { - super(RunCondition.BOTH); - } +public class SamplesTestBase extends ResourceManagerTestBase { + protected Azure azure; - public SamplesTestBase(RunCondition runCondition) { - super(runCondition); + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); } @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); azure = Azure - .authenticate(httpPipeline, profile) - .withSdkContext(sdkContext) - .withDefaultSubscription(); + .authenticate(httpPipeline, profile) + .withSdkContext(sdkContext) + .withDefaultSubscription(); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml index b2ac0ba20261d..82cc6c748cb13 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml @@ -84,9 +84,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java index 3d0cf17b71e98..79da2778885e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.sql.implementation.SqlServersImpl; @@ -28,12 +28,12 @@ protected SqlServerManager(HttpPipeline httpPipeline, AzureProfile profile, SdkC profile, new SqlManagementClientBuilder() .pipeline(httpPipeline) - .subscriptionId(profile.subscriptionId()) - .endpoint(profile.environment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .buildClient(), sdkContext); this.storageManager = StorageManager.authenticate(httpPipeline, profile); - this.tenantId = profile.tenantId(); + this.tenantId = profile.getTenantId(); } /** @return the storage manager in sql manager */ diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/java/com/azure/resourcemanager/sql/SqlServerOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/java/com/azure/resourcemanager/sql/SqlServerOperationsTests.java index f2ea7b64762e8..197ec4d047899 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/java/com/azure/resourcemanager/sql/SqlServerOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/java/com/azure/resourcemanager/sql/SqlServerOperationsTests.java @@ -5,7 +5,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.exception.ManagementException; -import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; @@ -219,8 +218,8 @@ public void canCRUDSqlSyncGroup() throws Exception { @Test public void canCopySqlDatabase() throws Exception { - final String sqlPrimaryServerName = sdkContext.randomResourceName("sqlpri", 22); - final String sqlSecondaryServerName = sdkContext.randomResourceName("sqlsec", 22); + final String sqlPrimaryServerName = generateRandomResourceName("sqlpri", 22); + final String sqlSecondaryServerName = generateRandomResourceName("sqlsec", 22); final String epName = "epSample"; final String dbName = "dbSample"; final String administratorLogin = "sqladmin"; @@ -270,11 +269,11 @@ public void canCopySqlDatabase() throws Exception { @Test public void canCRUDSqlFailoverGroup() throws Exception { - final String sqlPrimaryServerName = sdkContext.randomResourceName("sqlpri", 22); - final String sqlSecondaryServerName = sdkContext.randomResourceName("sqlsec", 22); - final String sqlOtherServerName = sdkContext.randomResourceName("sql000", 22); - final String failoverGroupName = sdkContext.randomResourceName("fg", 22); - final String failoverGroupName2 = sdkContext.randomResourceName("fg2", 22); + final String sqlPrimaryServerName = generateRandomResourceName("sqlpri", 22); + final String sqlSecondaryServerName = generateRandomResourceName("sqlsec", 22); + final String sqlOtherServerName = generateRandomResourceName("sql000", 22); + final String failoverGroupName = generateRandomResourceName("fg", 22); + final String failoverGroupName2 = generateRandomResourceName("fg2", 22); final String dbName = "dbSample"; final String administratorLogin = "sqladmin"; final String administratorPassword = password(); @@ -414,8 +413,8 @@ public void canChangeSqlServerAndDatabaseAutomaticTuning() throws Exception { String sqlServerAdminName = "sqladmin"; String sqlServerAdminPassword = password(); String databaseName = "db-from-sample"; - String id = sdkContext.randomUuid(); - String storageName = sdkContext.randomResourceName(sqlServerName, 22); + String id = generateRandomUuid(); + String storageName = generateRandomResourceName(sqlServerName, 22); // Create SqlServer sqlServer = @@ -631,8 +630,8 @@ public void canCRUDSqlServerWithImportDatabase() throws Exception { String sqlServerAdminName = "sqladmin"; String sqlServerAdminPassword = password(); - String id = sdkContext.randomUuid(); - String storageName = sdkContext.randomResourceName(sqlServerName, 22); + String id = generateRandomUuid(); + String storageName = generateRandomResourceName(sqlServerName, 22); SqlServer sqlServer = sqlServerManager @@ -711,7 +710,7 @@ public void canCRUDSqlServerWithImportDatabase() throws Exception { public void canCRUDSqlServerWithFirewallRule() throws Exception { // Create String sqlServerAdminName = "sqladmin"; - String id = sdkContext.randomUuid(); + String id = generateRandomUuid(); SqlServer sqlServer = sqlServerManager @@ -996,7 +995,7 @@ public void canCRUDSqlDatabase() throws Exception { transparentDataEncryptionActivities = transparentDataEncryption.listActivities(); Assertions.assertNotNull(transparentDataEncryptionActivities); - TestUtilities.sleep(10000, isRecordMode()); + SdkContext.sleep(10000); transparentDataEncryption = sqlDatabase.getTransparentDataEncryption().updateStatus(TransparentDataEncryptionStatus.DISABLED); Assertions.assertNotNull(transparentDataEncryption); @@ -1094,7 +1093,7 @@ public void canManageReplicationLinks() throws Exception { .withSourceDatabase(databaseInServer1.id()) .withMode(CreateMode.ONLINE_SECONDARY) .create(); - TestUtilities.sleep(2000, isRecordMode()); + SdkContext.sleep(2000); List replicationLinksInDb1 = new ArrayList<>(databaseInServer1.listReplicationLinks().values()); @@ -1114,12 +1113,12 @@ public void canManageReplicationLinks() throws Exception { // Failover replicationLinksInDb2.get(0).failover(); replicationLinksInDb2.get(0).refresh(); - TestUtilities.sleep(30000, isRecordMode()); + SdkContext.sleep(30000); // Force failover replicationLinksInDb1.get(0).forceFailoverAllowDataLoss(); replicationLinksInDb1.get(0).refresh(); - TestUtilities.sleep(30000, isRecordMode()); + SdkContext.sleep(30000); replicationLinksInDb2.get(0).delete(); Assertions.assertEquals(databaseInServer2.listReplicationLinks().size(), 0); diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/java/com/azure/resourcemanager/sql/SqlServerTest.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/java/com/azure/resourcemanager/sql/SqlServerTest.java index 5b3f9a86bfe52..c86aeab0f7a13 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/java/com/azure/resourcemanager/sql/SqlServerTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/java/com/azure/resourcemanager/sql/SqlServerTest.java @@ -3,31 +3,60 @@ package com.azure.resourcemanager.sql; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.ResourceManager; import com.azure.resourcemanager.storage.StorageManager; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; -public abstract class SqlServerTest extends TestBase { +import java.time.temporal.ChronoUnit; +import java.util.List; + +public abstract class SqlServerTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected SqlServerManager sqlServerManager; protected StorageManager storageManager; protected String rgName = ""; protected String sqlServerName = ""; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { rgName = generateRandomResourceName("rgsql", 20); sqlServerName = generateRandomResourceName("javasqlserver", 20); - + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); sqlServerManager = SqlServerManager.authenticate(httpPipeline, profile, sdkContext); - - storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); + storageManager = StorageManager.authenticate(httpPipeline, profile); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml index 197fb93d83d12..46eef75819927 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml @@ -80,9 +80,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java index 18acea0ec2519..3a4d7374234b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.implementation.BlobContainersImpl; @@ -102,8 +102,8 @@ private StorageManager(HttpPipeline httpPipeline, AzureProfile profile, SdkConte profile, new StorageManagementClientBuilder() .pipeline(httpPipeline) - .endpoint(profile.environment().getResourceManagerEndpoint()) - .subscriptionId(profile.subscriptionId()) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) .buildClient(), sdkContext); } diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountNetworkRuleTests.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountNetworkRuleTests.java index 5c6d230374e90..d01d869f66b3b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountNetworkRuleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountNetworkRuleTests.java @@ -6,7 +6,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.DefaultAction; import com.azure.resourcemanager.storage.models.StorageAccount; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java index 39e189649865f..af605db0dc36a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java @@ -7,7 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.Utils; import java.util.List; import java.util.Map; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageBlobContainersTests.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageBlobContainersTests.java index fe09d979079c0..2796d5681cb80 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageBlobContainersTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageBlobContainersTests.java @@ -8,7 +8,7 @@ import java.util.HashMap; import java.util.Map; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.BlobContainer; import com.azure.resourcemanager.storage.models.BlobContainers; import com.azure.resourcemanager.storage.models.PublicAccess; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageBlobServicesTests.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageBlobServicesTests.java index db028202be1ae..8174e665bebf9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageBlobServicesTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageBlobServicesTests.java @@ -5,7 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.BlobServiceProperties; import com.azure.resourcemanager.storage.models.BlobServices; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageManagementPoliciesTests.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageManagementPoliciesTests.java index 2745982b0b7f5..3bf3700341709 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageManagementPoliciesTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageManagementPoliciesTests.java @@ -9,7 +9,7 @@ import java.util.Collections; import java.util.List; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.AccessTier; import com.azure.resourcemanager.storage.models.BlobTypes; import com.azure.resourcemanager.storage.models.ManagementPolicies; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageManagementTest.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageManagementTest.java index d67b867465a73..5d33d82937a39 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageManagementTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageManagementTest.java @@ -3,21 +3,50 @@ package com.azure.resourcemanager.storage; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; -import com.azure.resourcemanager.resources.core.TestBase; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; + +import java.time.temporal.ChronoUnit; +import java.util.List; /** The base for storage manager tests. */ -public abstract class StorageManagementTest extends TestBase { +public abstract class StorageManagementTest extends ResourceManagerTestBase { protected ResourceManager resourceManager; protected StorageManager storageManager; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); resourceManager = - ResourceManager.authenticate(httpPipeline, profile).withSdkContext(sdkContext).withDefaultSubscription(); - - storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); + ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + storageManager = StorageManager.authenticate(httpPipeline, profile); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/utils/TestDelayProvider.java b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/utils/TestDelayProvider.java index 45fc43fc22f23..a3e010c04b76c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/utils/TestDelayProvider.java +++ b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/utils/TestDelayProvider.java @@ -24,6 +24,6 @@ public TestDelayProvider(boolean isLiveMode) { @Override public Duration getDelayDuration(Duration delay) { - return isLiveMode ? delay : Duration.ofSeconds(1); + return isLiveMode ? delay : Duration.ofMillis(1); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index d189150b90b1c..5f21fe6392f15 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -176,9 +176,9 @@ test - com.azure - azure-identity - 1.1.0 + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java index d5161edc64689..76bbddd163d8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java @@ -87,7 +87,7 @@ import com.azure.resourcemanager.resources.ResourceManager; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.fluentcore.utils.Utils; @@ -274,9 +274,9 @@ private AuthenticatedImpl(HttpPipeline httpPipeline, AzureProfile profile) { this.resourceManagerAuthenticated = ResourceManager.authenticate(httpPipeline, profile); this.authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile); this.httpPipeline = httpPipeline; - this.tenantId = profile.tenantId(); - this.subscriptionId = profile.subscriptionId(); - this.environment = profile.environment(); + this.tenantId = profile.getTenantId(); + this.subscriptionId = profile.getSubscriptionId(); + this.environment = profile.getEnvironment(); this.sdkContext = new SdkContext(); } @@ -389,8 +389,8 @@ private Azure(HttpPipeline httpPipeline, AzureProfile profile, Authenticated aut this.appPlatformManager = AppPlatformManager.authenticate(httpPipeline, profile, sdkContext); this.privateDnsZoneManager = PrivateDnsZoneManager.authenticate(httpPipeline, profile, sdkContext); this.authenticated = authenticated; - this.subscriptionId = profile.subscriptionId(); - this.tenantId = profile.tenantId(); + this.subscriptionId = profile.getSubscriptionId(); + this.tenantId = profile.getTenantId(); } /** @return the currently selected subscription ID this client is authenticated to work with */ diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/ApplicationGatewayTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/ApplicationGatewayTests.java index d7c347dba8ced..ea97b474b2bc8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/ApplicationGatewayTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/ApplicationGatewayTests.java @@ -2,7 +2,12 @@ // Licensed under the MIT License. package com.azure.resourcemanager; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.VirtualMachine; @@ -16,24 +21,51 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.network.models.NetworkInterface; import com.azure.resourcemanager.network.models.NicIpConfiguration; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; + +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; import java.util.Map; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -public class ApplicationGatewayTests extends TestBase { +public class ApplicationGatewayTests extends ResourceManagerTestBase { private Azure azure; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); Azure.Authenticated azureAuthed = Azure.authenticate(httpPipeline, profile).withSdkContext(sdkContext); azure = azureAuthed.withDefaultSubscription(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java index 080198af4f074..3fd0f2dcd198a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java @@ -2,7 +2,12 @@ // Licensed under the MIT License. package com.azure.resourcemanager; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.authorization.models.BuiltInRole; @@ -39,12 +44,12 @@ import com.azure.resourcemanager.network.models.SecurityGroupView; import com.azure.resourcemanager.network.models.Topology; import com.azure.resourcemanager.network.models.VerificationIPFlow; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.Deployment; import com.azure.resourcemanager.resources.models.DeploymentMode; @@ -56,6 +61,7 @@ import com.azure.resourcemanager.storage.models.StorageAccount; import java.io.IOException; import java.text.MessageFormat; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -65,16 +71,41 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; + +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -public class AzureTests extends TestBase { +public class AzureTests extends ResourceManagerTestBase { private Azure azure; private MSIManager msiManager; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); Azure.Authenticated azureAuthed = Azure.authenticate(httpPipeline, profile).withSdkContext(sdkContext); azure = azureAuthed.withDefaultSubscription(); this.msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); @@ -979,6 +1010,10 @@ public void testVirtualMachineInAvailabilitySet() throws Exception { @Test public void testVirtualMachineSyncPoller() throws Exception { + if (skipInPlayback()) { + return; // skip now as taking too long time for PLAYBACK + } + new TestVirtualMachineSyncPoller(azure.networks().manager()) .runTest(azure.virtualMachines(), azure.resourceGroups()); } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestUtils.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestUtils.java index 0ee51c801b805..129aad57cab5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestUtils.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestUtils.java @@ -3,6 +3,7 @@ package com.azure.resourcemanager; +import com.azure.core.util.Configuration; import com.azure.resourcemanager.compute.models.DataDisk; import com.azure.resourcemanager.compute.models.VirtualMachine; @@ -11,6 +12,14 @@ public final class TestUtils { private TestUtils() { } + /** + * @return whether it it RECORD mode + */ + public static boolean isRecordMode() { + String azureTestMode = Configuration.getGlobalConfiguration().get("AZURE_TEST_MODE"); + return "RECORD".equalsIgnoreCase(azureTestMode); + } + // public static void print(ManagementLock lock) { // StringBuffer info = new StringBuffer(); // info.append("\nLock ID: ").append(lock.id()) diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachine.java index 85fd581a0cc99..fc9fe7b4ab217 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachine.java @@ -9,9 +9,9 @@ import com.azure.resourcemanager.compute.models.VirtualMachineDataDisk; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.compute.models.VirtualMachines; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; +import com.azure.resourcemanager.test.ResourceManagerTestBase; import com.google.common.util.concurrent.SettableFuture; import org.junit.jupiter.api.Assertions; import reactor.core.publisher.Flux; @@ -34,7 +34,7 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc .withoutPrimaryPublicIPAddress() .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2012_R2_DATACENTER) .withAdminUsername("testuser") - .withAdminPassword(TestBase.password()) + .withAdminPassword(ResourceManagerTestBase.password()) .withNewDataDisk(150) .withSize(VirtualMachineSizeTypes.STANDARD_D1_V2) .createAsync(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineCustomData.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineCustomData.java index f4f75739e215d..930cfec3f0b18 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineCustomData.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineCustomData.java @@ -9,7 +9,6 @@ import com.azure.resourcemanager.compute.models.VirtualMachines; import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.network.models.PublicIpAddresses; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.jcraft.jsch.ChannelExec; import com.jcraft.jsch.JSch; @@ -67,7 +66,7 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc pip.refresh(); Assertions.assertTrue(pip.hasAssignedNetworkInterface()); - if (TestBase.isRecordMode()) { + if (TestUtils.isRecordMode()) { JSch jsch = new JSch(); Session session = null; ChannelExec channel = null; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSsh.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSsh.java index bfe28e73dcb7f..a0475c66e85f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSsh.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSsh.java @@ -9,7 +9,6 @@ import com.azure.resourcemanager.compute.models.VirtualMachines; import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.network.models.PublicIpAddresses; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.jcraft.jsch.JSch; import com.jcraft.jsch.Session; @@ -59,7 +58,7 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc JSch jsch = new JSch(); Session session = null; - if (TestBase.isRecordMode()) { + if (TestUtils.isRecordMode()) { try { java.util.Properties config = new java.util.Properties(); config.put("StrictHostKeyChecking", "no"); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java index bd62e15d8b416..12e6b7e76b007 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java @@ -15,9 +15,9 @@ import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.network.models.NetworkInterface; import com.azure.resourcemanager.network.models.PublicIpAddress; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Accepted; +import com.azure.resourcemanager.test.ResourceManagerTestBase; import org.junit.jupiter.api.Assertions; import java.time.Duration; @@ -112,7 +112,7 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc .withExistingPrimaryNetworkInterface(networkInterface) .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername("testuser") - .withRootPassword(TestBase.password()) + .withRootPassword(ResourceManagerTestBase.password()) .withExistingDataDisk(disk) .withSize(VirtualMachineSizeTypes.STANDARD_A9) .beginCreate(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java index 522bc11c139cb..5778eb0880204 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java @@ -3,26 +3,58 @@ package com.azure.resourcemanager; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; import com.azure.resourcemanager.network.models.NetworkWatcher; import com.azure.resourcemanager.network.models.Troubleshooting; import com.azure.resourcemanager.network.models.VirtualNetworkGateway; import com.azure.resourcemanager.network.models.VirtualNetworkGatewayConnection; import com.azure.resourcemanager.network.models.VirtualNetworkGatewaySkuName; -import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.arm.Region; -import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.storage.models.StorageAccount; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestIdentifierProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -public class VirtualNetworkGatewayTests extends TestBase { +import java.time.temporal.ChronoUnit; +import java.util.List; + +public class VirtualNetworkGatewayTests extends ResourceManagerTestBase { private Azure azure; + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + SdkContext sdkContext = new SdkContext(); + sdkContext.setIdentifierFunction(name -> new TestIdentifierProvider(testResourceNamer)); Azure.Authenticated azureAuthed = Azure.authenticate(httpPipeline, profile).withSdkContext(sdkContext); azure = azureAuthed.withDefaultSubscription(); @@ -35,8 +67,8 @@ protected void cleanUpResources() { @Test @Disabled("Service has bug that cause 'InternalServerError' - record this once service is fixed") public void testNetworkWatcherTroubleshooting() throws Exception { - String gatewayName = sdkContext.randomResourceName("vngw", 8); - String connectionName = sdkContext.randomResourceName("vngwc", 8); + String gatewayName = generateRandomResourceName("vngw", 8); + String connectionName = generateRandomResourceName("vngwc", 8); TestNetworkWatcher tnw = new TestNetworkWatcher(); NetworkWatcher nw = tnw.createResource(azure.networkWatchers()); @@ -77,7 +109,7 @@ public void testNetworkWatcherTroubleshooting() throws Exception { StorageAccount storageAccount = azure .storageAccounts() - .define("sa" + sdkContext.randomResourceName("", 8)) + .define("sa" + generateRandomResourceName("", 8)) .withRegion(region) .withExistingResourceGroup(resourceGroup) .create(); From 4ebe57b9520b410f40b33b05d09756568064a071 Mon Sep 17 00:00:00 2001 From: Hemant Tanwar Date: Mon, 31 Aug 2020 22:46:42 -0700 Subject: [PATCH 028/168] ConnectionString : Default scheme to SB:// in Endpoint if not specified (#14600) * Default scheme to SB:// if no scheme is provided in endpoint --- eng/versioning/version_client.txt | 1 + .../ConnectionStringProperties.java | 36 +++++++++++++++++-- .../ConnectionStringPropertiesTest.java | 12 +++++++ .../azure-messaging-eventhubs/CHANGELOG.md | 1 + .../azure-messaging-eventhubs/pom.xml | 2 +- .../azure-messaging-servicebus/pom.xml | 2 +- 6 files changed, 50 insertions(+), 4 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e17a453911ff5..601428983a0e9 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -129,6 +129,7 @@ com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;1.2.8-beta.1;1.2. # unreleased_:;dependency-version # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. unreleased_com.azure:azure-core;1.8.0-beta.1 +unreleased_com.azure:azure-core-amqp;1.5.0-beta.1 unreleased_com.azure:azure-messaging-servicebus;7.0.0-beta.5 unreleased_com.azure:azure-security-keyvault-keys;4.3.0-beta.1 diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionStringProperties.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionStringProperties.java index a55dcc4c75cf9..2d2a2f1dc8905 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionStringProperties.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionStringProperties.java @@ -3,6 +3,9 @@ package com.azure.core.amqp.implementation; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; + import java.net.URI; import java.net.URISyntaxException; import java.util.Locale; @@ -12,7 +15,12 @@ * The set of properties that comprise a connection string from the Azure portal. */ public class ConnectionStringProperties { + private final ClientLogger logger = new ClientLogger(ConnectionStringProperties.class); + private static final String TOKEN_VALUE_SEPARATOR = "="; + private static final String ENDPOINT_SCHEME_SB_PREFIX = "sb://"; + private static final String ENDPOINT_SCHEME_HTTP_PREFIX = "http://"; + private static final String ENDPOINT_SCHEME_HTTPS_PREFIX = "https://"; private static final String TOKEN_VALUE_PAIR_DELIMITER = ";"; private static final String ENDPOINT = "Endpoint"; private static final String SHARED_ACCESS_KEY_NAME = "SharedAccessKeyName"; @@ -20,7 +28,9 @@ public class ConnectionStringProperties { private static final String ENTITY_PATH = "EntityPath"; private static final String ERROR_MESSAGE_FORMAT = "Could not parse 'connectionString'. Expected format: " + "'Endpoint={endpoint};SharedAccessKeyName={sharedAccessKeyName};" - + "SharedAccessKey={sharedAccessKey};EntityPath={eventHubName}'. Actual: %s"; + + "SharedAccessKey={sharedAccessKey};EntityPath={entityPath}'. Actual: %s"; + private static final String ERROR_MESSAGE_ENDPOINT_FORMAT = "'Endpoint' must be provided in 'connectionString'." + + " Actual: %s"; private final URI endpoint; private final String entityPath; @@ -60,8 +70,9 @@ public ConnectionStringProperties(String connectionString) { final String value = pair[1].trim(); if (key.equalsIgnoreCase(ENDPOINT)) { + final String endpointUri = validateAndUpdateDefaultScheme(value, connectionString); try { - endpoint = new URI(value); + endpoint = new URI(endpointUri); } catch (URISyntaxException e) { throw new IllegalArgumentException( String.format(Locale.US, "Invalid endpoint: %s", tokenValuePair), e); @@ -123,4 +134,25 @@ public String getSharedAccessKeyName() { public String getSharedAccessKey() { return sharedAccessKey; } + + /* + * The function checks for pre existing scheme of "sb://" , "http://" or "https://". If the scheme is not provided + * in endpoint, it will set the default scheme to "sb://". + */ + private String validateAndUpdateDefaultScheme(final String endpoint, final String connectionString) { + String updatedEndpoint = endpoint.trim(); + + if (CoreUtils.isNullOrEmpty(endpoint)) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format(Locale.US, + ERROR_MESSAGE_ENDPOINT_FORMAT, connectionString))); + + } + final String endpointLowerCase = endpoint.toLowerCase(Locale.getDefault()); + if (!endpointLowerCase.startsWith(ENDPOINT_SCHEME_SB_PREFIX) + && !endpointLowerCase.startsWith(ENDPOINT_SCHEME_HTTP_PREFIX) + && !endpointLowerCase.startsWith(ENDPOINT_SCHEME_HTTPS_PREFIX)) { + updatedEndpoint = ENDPOINT_SCHEME_SB_PREFIX + endpoint; + } + return updatedEndpoint; + } } diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionStringPropertiesTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionStringPropertiesTest.java index 3060ee9dd92bc..e203b8c42940d 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionStringPropertiesTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionStringPropertiesTest.java @@ -69,6 +69,18 @@ public void differentEndpointScheme() { Assertions.assertEquals(EVENT_HUB, properties.getEntityPath()); } + @Test + public void noEndpointSchemeDefault() { + // Arrange + final String connectionString = getConnectionString(HOST, EVENT_HUB, SAS_KEY, SAS_VALUE); + + // Act + ConnectionStringProperties properties = new ConnectionStringProperties(connectionString); + + // Assert + Assertions.assertEquals("sb", properties.getEndpoint().getScheme()); + } + /** * Verifies we can create ConnectionStringProperties even if there is an extraneous component. */ diff --git a/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md b/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md index 60a91ceb27c50..cb97f6d20f69d 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md +++ b/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md @@ -1,6 +1,7 @@ # Release History ## 5.2.0-beta.3 (Unreleased) +- Default scheme to 'sb://' if no scheme is set in 'Endpoint'. ## 5.2.0-beta.2 (2020-08-14) - Support for object serializer to send and receive strongly-typed objects. diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml index 4717d047cc622..a655e18055e14 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml @@ -42,7 +42,7 @@ com.azure azure-core-amqp - 1.4.0 + 1.5.0-beta.1 diff --git a/sdk/servicebus/azure-messaging-servicebus/pom.xml b/sdk/servicebus/azure-messaging-servicebus/pom.xml index b16e0d672c0d8..13d7b6f29d9ee 100644 --- a/sdk/servicebus/azure-messaging-servicebus/pom.xml +++ b/sdk/servicebus/azure-messaging-servicebus/pom.xml @@ -47,7 +47,7 @@ com.azure azure-core-amqp - 1.4.0 + 1.5.0-beta.1 com.azure From 4886fc85f5bd22066304276af09b20f2f808502a Mon Sep 17 00:00:00 2001 From: Rujun Chen Date: Tue, 1 Sep 2020 16:20:28 +0800 Subject: [PATCH 029/168] Add integration test for AAD User Group count (#14638) * No logic change, just make code easier to read. * Fix error reported by maven-checkstyle-plugin. * Add integration test: AADGroupsCountIT. * No logic change, just make code easier to read. (#14638) Co-authored-by: Rujun Chen --- .../aad/controller/TodoListController.java | 23 +++-- .../test/aad/groups/AADGroupsCountIT.java | 94 +++++++++++++++++++ .../aad/AADAuthenticationProperties.java | 2 +- .../aad/AADGraphApiObjectType.java | 11 +++ .../autoconfigure/aad/AzureADGraphClient.java | 67 +++++-------- .../spring/autoconfigure/aad/UserGroup.java | 6 +- .../aad/AzureADGraphClientTest.java | 10 +- .../autoconfigure/aad/UserGroupTest.java | 8 +- 8 files changed, 157 insertions(+), 64 deletions(-) create mode 100644 sdk/spring/azure-spring-boot-test-aad/src/test/java/com/microsoft/azure/test/aad/groups/AADGroupsCountIT.java create mode 100644 sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADGraphApiObjectType.java diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java index e972685eada77..7e7bac126a99d 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java @@ -4,6 +4,7 @@ package com.microsoft.azure.aad.controller; import com.microsoft.azure.aad.model.TodoItem; +import com.microsoft.azure.spring.autoconfigure.aad.AADGraphApiObjectType; import com.microsoft.azure.spring.autoconfigure.aad.UserGroup; import com.microsoft.azure.spring.autoconfigure.aad.UserPrincipal; import org.springframework.http.HttpStatus; @@ -91,15 +92,19 @@ public ResponseEntity updateTodoItem(@RequestBody TodoItem item) { public ResponseEntity deleteTodoItem(@PathVariable("id") int id, PreAuthenticatedAuthenticationToken authToken) { final UserPrincipal current = (UserPrincipal) authToken.getPrincipal(); - - if (current.isMemberOf( - new UserGroup("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Group", "group1"))) { - final List find = todoList.stream().filter(i -> i.getID() == id).collect(Collectors.toList()); - if (!find.isEmpty()) { - todoList.remove(todoList.indexOf(find.get(0))); - return new ResponseEntity<>("OK", HttpStatus.OK); - } - return new ResponseEntity<>("Entity not found", HttpStatus.OK); + UserGroup userGroup = new UserGroup( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + AADGraphApiObjectType.GROUP, + "group1"); + if (current.isMemberOf(userGroup)) { + return todoList.stream() + .filter(i -> i.getID() == id) + .findFirst() + .map(item -> { + todoList.remove(item); + return new ResponseEntity<>("OK", HttpStatus.OK); + }) + .orElseGet(() -> new ResponseEntity<>("Entity not found", HttpStatus.OK)); } else { return new ResponseEntity<>("Access is denied", HttpStatus.OK); } diff --git a/sdk/spring/azure-spring-boot-test-aad/src/test/java/com/microsoft/azure/test/aad/groups/AADGroupsCountIT.java b/sdk/spring/azure-spring-boot-test-aad/src/test/java/com/microsoft/azure/test/aad/groups/AADGroupsCountIT.java new file mode 100644 index 0000000000000..5696171a86b39 --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-aad/src/test/java/com/microsoft/azure/test/aad/groups/AADGroupsCountIT.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.test.aad.groups; + +import com.microsoft.azure.spring.autoconfigure.aad.AADAuthenticationFilter; +import com.microsoft.azure.spring.autoconfigure.aad.UserPrincipal; +import com.microsoft.azure.test.oauth.OAuthResponse; +import com.microsoft.azure.test.oauth.OAuthUtils; +import com.microsoft.azure.test.utils.AppRunner; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.client.RestTemplate; + +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +import static com.microsoft.azure.test.oauth.OAuthUtils.AAD_SINGLE_TENANT_CLIENT_ID; +import static com.microsoft.azure.test.oauth.OAuthUtils.AAD_SINGLE_TENANT_CLIENT_SECRET; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public class AADGroupsCountIT { + + private final RestTemplate restTemplate = new RestTemplate(); + + @Test + public void testGroupsCount() { + final String clientId = System.getenv(AAD_SINGLE_TENANT_CLIENT_ID); + final String clientSecret = System.getenv(AAD_SINGLE_TENANT_CLIENT_SECRET); + final OAuthResponse authResponse = OAuthUtils.executeOAuth2ROPCFlow(clientId, clientSecret); + assertNotNull(authResponse); + String idToken = authResponse.getIdToken(); + try (AppRunner app = new AppRunner(DumbApp.class)) { + app.property("azure.activedirectory.client-id", clientId); + app.property("azure.activedirectory.client-secret", clientSecret); + app.property("azure.activedirectory.user-group.allowed-groups", "group1,group2"); + app.start(); + final HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", String.format("Bearer %s", idToken)); + HttpEntity entity = new HttpEntity<>(headers); + final ResponseEntity response = restTemplate.exchange( + app.root() + "api/groupsCount", + HttpMethod.GET, + entity, + String.class, + new HashMap<>() + ); + assertEquals(HttpStatus.OK, response.getStatusCode()); + assertEquals("111", response.getBody()); + } + } + + @EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true) + @SpringBootApplication + @RestController + public static class DumbApp extends WebSecurityConfigurerAdapter { + + @Autowired + private AADAuthenticationFilter aadAuthenticationFilter; + + @Override + protected void configure(HttpSecurity http) { + http.addFilterBefore(aadAuthenticationFilter, UsernamePasswordAuthenticationFilter.class); + } + + @GetMapping(value = "api/groupsCount") + public ResponseEntity groupsCount(PreAuthenticatedAuthenticationToken authToken) { + String groupsCount = Optional.of(authToken) + .map(PreAuthenticatedAuthenticationToken::getPrincipal) + .map(p -> (UserPrincipal) p) + .map(UserPrincipal::getUserGroups) + .map(List::size) + .map(String::valueOf) + .orElse(""); + return new ResponseEntity<>(groupsCount, HttpStatus.OK); + } + } + +} diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADAuthenticationProperties.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADAuthenticationProperties.java index a9e2f0ae6d80e..e0b31ad445fd5 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADAuthenticationProperties.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADAuthenticationProperties.java @@ -121,7 +121,7 @@ public static class UserGroupProperties { * Node is a UserGroup. */ @NotEmpty - private String value = "Group"; + private String value = AADGraphApiObjectType.GROUP; /** * Key of the JSON Node containing the Azure Object ID for the {@code UserGroup}. diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADGraphApiObjectType.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADGraphApiObjectType.java new file mode 100644 index 0000000000000..4b92dedb16948 --- /dev/null +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADGraphApiObjectType.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.spring.autoconfigure.aad; + +public class AADGraphApiObjectType { + + public static final String GROUP = "Group"; +} + + diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java index 571d2bb88ed6d..7dbafc27aca81 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java @@ -32,6 +32,7 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; +import java.util.Optional; import java.util.Set; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -75,11 +76,10 @@ private void initAADMicrosoftGraphApiBool(String endpointEnv) { this.aadMicrosoftGraphApiBool = endpointEnv.contains(V2_VERSION_ENV_FLAG); } - private String getUserMemberships(String accessToken, String odataNextLink) throws IOException { - final URL url = buildUrl(odataNextLink); + private String getUserMemberships(String accessToken, String urlString) throws IOException { + URL url = new URL(urlString); final HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // Set the appropriate header fields in the request header. - if (this.aadMicrosoftGraphApiBool) { conn.setRequestMethod(HttpMethod.GET.toString()); conn.setRequestProperty(HttpHeaders.AUTHORIZATION, String.format("Bearer %s", accessToken)); @@ -101,24 +101,13 @@ private String getUserMemberships(String accessToken, String odataNextLink) thro } } - private String getSkipTokenFromLink(String odataNextLink) { - String[] parts = odataNextLink.split("/memberOf\\?"); - return parts[1]; - } - - private URL buildUrl(String odataNextLink) throws MalformedURLException { - URL url; - if (odataNextLink != null) { - if (this.aadMicrosoftGraphApiBool) { - url = new URL(odataNextLink); - } else { - String skipToken = getSkipTokenFromLink(odataNextLink); - url = new URL(serviceEndpoints.getAadMembershipRestUri() + "&" + skipToken); - } + private String getUrlStringFromODataNextLink(String odataNextLink) { + if (this.aadMicrosoftGraphApiBool) { + return odataNextLink; } else { - url = new URL(serviceEndpoints.getAadMembershipRestUri()); + String skipToken = odataNextLink.split("/memberOf\\?")[1]; + return serviceEndpoints.getAadMembershipRestUri() + "&" + skipToken; } - return url; } private static String getResponseStringFromConn(HttpURLConnection conn) throws IOException { @@ -135,38 +124,32 @@ private static String getResponseStringFromConn(HttpURLConnection conn) throws I } public List getGroups(String graphApiToken) throws IOException { - return loadUserGroups(graphApiToken); - } - - private List loadUserGroups(String graphApiToken) throws IOException { - String responseInJson = getUserMemberships(graphApiToken, null); - final List lUserGroups = new ArrayList<>(); + final List userGroupList = new ArrayList<>(); final ObjectMapper objectMapper = JacksonObjectMapperFactory.getInstance(); - UserGroups groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); - - if (groupsFromJson.getValue() != null) { - lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) - .collect(Collectors.toList())); + String urlString = serviceEndpoints.getAadMembershipRestUri(); + while (urlString != null) { + String responseInJson = getUserMemberships(graphApiToken, urlString); + UserGroups userGroups = objectMapper.readValue(responseInJson, UserGroups.class); + userGroups.getValue() + .stream() + .filter(this::isMatchingUserGroupKey) + .forEach(userGroupList::add); + urlString = Optional.of(userGroups) + .map(UserGroups::getOdataNextLink) + .map(this::getUrlStringFromODataNextLink) + .orElse(null); } - while (groupsFromJson.getOdataNextLink() != null) { - responseInJson = getUserMemberships(graphApiToken, groupsFromJson.getOdataNextLink()); - groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); - lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) - .collect(Collectors.toList())); - } - - return lUserGroups; + return userGroupList; } /** * Checks that the UserGroup has a Group object type. * - * @param node - json node to look for a key/value to equate against the - * {@link AADAuthenticationProperties.UserGroupProperties} + * @param userGroup - userGroup * @return true if the json node contains the correct key, and expected value to identify a user group. */ - private boolean isMatchingUserGroupKey(final UserGroup group) { - return group.getObjectType().equals(aadAuthenticationProperties.getUserGroup().getValue()); + private boolean isMatchingUserGroupKey(final UserGroup userGroup) { + return userGroup.getObjectType().equals(aadAuthenticationProperties.getUserGroup().getValue()); } public Set getGrantedAuthorities(String graphApiToken) throws IOException { diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java index 6d1857bcfb0d2..2813b9f621c7b 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java @@ -15,9 +15,9 @@ public class UserGroup implements Serializable { private static final long serialVersionUID = 9064197572478554735L; - private String objectID; - private String objectType; - private String displayName; + private final String objectID; + private final String objectType; + private final String displayName; @JsonCreator public UserGroup( diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java index e2a5c429fb8e3..fd897122f2ff5 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java @@ -16,7 +16,7 @@ import java.util.List; import java.util.Set; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @RunWith(MockitoJUnitRunner.class) public class AzureADGraphClientTest { @@ -33,7 +33,7 @@ public void setup() { final List activeDirectoryGroups = new ArrayList<>(); activeDirectoryGroups.add("Test_Group"); aadAuthProps = new AADAuthenticationProperties(); - aadAuthProps.setActiveDirectoryGroups(activeDirectoryGroups); + aadAuthProps.getUserGroup().setAllowedGroups(activeDirectoryGroups); adGraphClient = new AzureADGraphClient("client", "pass", aadAuthProps, endpointsProps); } @@ -41,7 +41,7 @@ public void setup() { public void testConvertGroupToGrantedAuthorities() { final List userGroups = Collections.singletonList( - new UserGroup("testId", "Group", "Test_Group")); + new UserGroup("testId", AADGraphApiObjectType.GROUP, "Test_Group")); final Set authorities = adGraphClient.convertGroupsToGrantedAuthorities(userGroups); assertThat(authorities).hasSize(1).extracting(GrantedAuthority::getAuthority) @@ -51,8 +51,8 @@ public void testConvertGroupToGrantedAuthorities() { @Test public void testConvertGroupToGrantedAuthoritiesUsingAllowedGroups() { final List userGroups = Arrays - .asList(new UserGroup("testId", "Group", "Test_Group"), - new UserGroup("testId", "Group", "Another_Group")); + .asList(new UserGroup("testId", AADGraphApiObjectType.GROUP, "Test_Group"), + new UserGroup("testId", AADGraphApiObjectType.GROUP, "Another_Group")); aadAuthProps.getUserGroup().getAllowedGroups().add("Another_Group"); final Set authorities = adGraphClient.convertGroupsToGrantedAuthorities(userGroups); assertThat(authorities).hasSize(2).extracting(GrantedAuthority::getAuthority) diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java index 8851acc5af144..db8fd3ae9454f 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java @@ -7,7 +7,7 @@ import org.junit.Test; public class UserGroupTest { - private static final UserGroup GROUP_1 = new UserGroup("12345", "Group", "test"); + private static final UserGroup GROUP_1 = new UserGroup("12345", AADGraphApiObjectType.GROUP, "test"); @Test public void getDisplayName() { @@ -16,7 +16,7 @@ public void getDisplayName() { @Test public void getObjectType() { - Assert.assertEquals("Group", GROUP_1.getObjectType()); + Assert.assertEquals(AADGraphApiObjectType.GROUP, GROUP_1.getObjectType()); } @Test @@ -26,13 +26,13 @@ public void getObjectID() { @Test public void equals() { - final UserGroup group2 = new UserGroup("12345", "Group", "test"); + final UserGroup group2 = new UserGroup("12345", AADGraphApiObjectType.GROUP, "test"); Assert.assertEquals(GROUP_1, group2); } @Test public void hashCodeTest() { - final UserGroup group2 = new UserGroup("12345", "Group", "test"); + final UserGroup group2 = new UserGroup("12345", AADGraphApiObjectType.GROUP, "test"); Assert.assertEquals(GROUP_1.hashCode(), group2.hashCode()); } } From 0d591ec7540d1e9af67865794e937e4d9526b254 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 1 Sep 2020 18:23:40 +0800 Subject: [PATCH 030/168] mgmt traffic manager (#14676) --- eng/versioning/version_client.txt | 1 + sdk/resourcemanager/api-specs.json | 2 +- .../fluentcore/AzureServiceClient.java | 16 +- .../arm/implementation/ManagerBase.java | 2 +- .../fluentcore/utils/SdkContext.java | 28 - .../ManageLinuxWebAppWithTrafficManager.java | 557 ++- .../ManageWebAppWithTrafficManager.java | 553 ++- .../samples/QueryMetricsAndActivityLogs.java | 2 +- .../azure/resourcemanager/samples/Utils.java | 152 +- .../samples/ManageSimpleTrafficManager.java | 187 + .../samples/ManageTrafficManager.java | 277 ++ .../trafficmanager/samples/package-info.java | 7 + .../AppServiceSampleLiveOnlyTests.java | 28 +- .../samples/TrafficManagerSampleTests.java | 27 + ...stManageLinuxWebAppWithTrafficManager.json | 2986 ++++++++++++ .../testManageSimpleTrafficManager.json | 4198 +++++++++-------- .../testManageTrafficManager.json | 2717 ++++++++++- .../testManageWebAppWithTrafficManager.json | 2747 +++++++++++ .../CHANGELOG.md | 5 + .../README.md | 42 + .../pom.xml | 136 + .../trafficmanager/TrafficManager.java | 103 + .../TrafficManagerManagementClient.java | 189 + ...TrafficManagerManagementClientBuilder.java | 149 + .../fluent/EndpointsClient.java | 1026 ++++ .../fluent/GeographicHierarchiesClient.java | 172 + .../trafficmanager/fluent/HeatMapsClient.java | 319 ++ .../trafficmanager/fluent/ProfilesClient.java | 1288 +++++ .../TrafficManagerUserMetricsKeysClient.java | 481 ++ .../inner/DeleteOperationResultInner.java | 39 + .../fluent/inner/EndpointInner.java | 443 ++ .../fluent/inner/HeatMapModelInner.java | 220 + .../fluent/inner/ProfileInner.java | 228 + ...rafficManagerGeographicHierarchyInner.java | 139 + .../TrafficManagerNameAvailabilityInner.java | 153 + .../fluent/inner/UserMetricsModelInner.java | 132 + .../fluent/inner/package-info.java | 6 + .../trafficmanager/fluent/package-info.java | 6 + .../GeographicHierarchiesImpl.java | 35 + .../GeographicLocationImpl.java | 51 + .../implementation/ProxyResourceInner.java | 84 + .../TrafficManagerAzureEndpointImpl.java | 30 + .../TrafficManagerEndpointImpl.java | 436 ++ .../TrafficManagerEndpointsImpl.java | 221 + .../TrafficManagerExternalEndpointImpl.java | 27 + ...afficManagerNestedProfileEndpointImpl.java | 34 + .../TrafficManagerProfileImpl.java | 278 ++ .../TrafficManagerProfilesImpl.java | 88 + ...CheckProfileDnsNameAvailabilityResult.java | 38 + ...RelativeDnsNameAvailabilityParameters.java | 76 + .../trafficmanager/models/DnsConfig.java | 102 + .../models/EndpointMonitorStatus.java | 46 + .../EndpointPropertiesCustomHeadersItem.java | 74 + .../models/EndpointPropertiesSubnetsItem.java | 100 + .../trafficmanager/models/EndpointStatus.java | 34 + .../trafficmanager/models/EndpointType.java | 51 + .../models/GeographicHierarchies.java | 15 + .../models/GeographicLocation.java | 18 + .../models/HeatMapEndpoint.java | 74 + .../trafficmanager/models/MonitorConfig.java | 277 ++ .../MonitorConfigCustomHeadersItem.java | 74 + ...torConfigExpectedStatusCodeRangesItem.java | 74 + .../models/MonitorProtocol.java | 37 + .../ProfileDnsNameUnavailableReason.java | 48 + .../models/ProfileListResult.java | 53 + .../models/ProfileMonitorStatus.java | 43 + .../trafficmanager/models/ProfileStatus.java | 34 + .../models/QueryExperience.java | 103 + .../trafficmanager/models/Region.java | 105 + .../models/TargetAzureResourceType.java | 53 + .../trafficmanager/models/TrafficFlow.java | 130 + .../models/TrafficManagerAzureEndpoint.java | 13 + .../models/TrafficManagerEndpoint.java | 920 ++++ .../TrafficManagerExternalEndpoint.java | 15 + .../TrafficManagerNestedProfileEndpoint.java | 18 + .../models/TrafficManagerProfile.java | 471 ++ .../models/TrafficManagerProfiles.java | 54 + .../models/TrafficRoutingMethod.java | 46 + .../models/TrafficViewEnrollmentStatus.java | 34 + .../trafficmanager/models/package-info.java | 6 + .../trafficmanager/package-info.java | 6 + .../azure/management/TrafficManagerTests.java | 220 + ...CreateTrafficManagerWithSubnetRouting.json | 244 + ...teUpdateProfileWithGeographicEndpoint.json | 244 + .../canGetGeographicHierarchy.json | 31 + .../azure-resourcemanager/pom.xml | 5 + .../java/com/azure/resourcemanager/Azure.java | 18 +- .../com/azure/resourcemanager/AzureTests.java | 10 +- .../resourcemanager/TestTrafficManager.java | 768 +-- .../session-records/testTrafficManager.json | 1308 ++--- sdk/resourcemanager/docs/SAMPLE.md | 8 + sdk/resourcemanager/package.json | 6 +- sdk/resourcemanager/pom.xml | 1 + 93 files changed, 23469 insertions(+), 3683 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageSimpleTrafficManager.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageTrafficManager.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageLinuxWebAppWithTrafficManager.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppWithTrafficManager.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/README.md create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClientBuilder.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/DeleteOperationResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/EndpointInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/HeatMapModelInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/ProfileInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerGeographicHierarchyInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerNameAvailabilityInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/UserMetricsModelInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicLocationImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProxyResourceInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerAzureEndpointImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointsImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerExternalEndpointImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerNestedProfileEndpointImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerProfileImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerProfilesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckProfileDnsNameAvailabilityResult.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointType.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/GeographicHierarchies.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/GeographicLocation.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileDnsNameUnavailableReason.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TargetAzureResourceType.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerAzureEndpoint.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerEndpoint.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerExternalEndpoint.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerNestedProfileEndpoint.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerProfile.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerProfiles.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/java/com/microsoft/azure/management/TrafficManagerTests.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canCreateTrafficManagerWithSubnetRouting.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canCreateUpdateProfileWithGeographicEndpoint.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canGetGeographicHierarchy.json diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 601428983a0e9..b6399c5c996ff 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -85,6 +85,7 @@ com.azure.resourcemanager:azure-resourcemanager-redis;2.0.0-beta.3;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.3;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-sql;2.0.0-beta.3;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-storage;2.0.0-beta.3;2.0.0-beta.4 +com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.0.0-beta.4;2.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.4;2.0.0-beta.4 com.microsoft.azure:azure-active-directory-b2c-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.3;2.4.0-beta.1 diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 06a1104b68d6e..08edb3b44cc70 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -337,7 +337,7 @@ "trafficmanager": { "dir": "azure-resourcemanager-trafficmanager", "source": "specification/trafficmanager/resource-manager/readme.md", - "package": "com.microsoft.azure.resourcemanager.trafficmanager", + "package": "com.azure.resourcemanager.trafficmanager", "args": "--payload-flattening-threshold=1 --tag=package-2018-04" }, "msi": { diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/AzureServiceClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/AzureServiceClient.java index c822ea1dc1606..78ccb031725c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/AzureServiceClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/AzureServiceClient.java @@ -69,15 +69,6 @@ public SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return SdkContext.getLroRetryDuration(); - } - /** * Gets The HTTP pipeline to send requests through. * @@ -87,6 +78,13 @@ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public abstract Duration getDefaultPollInterval(); + /** * Gets default client context. * diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java index 372cea97abfe4..ea572a70e5664 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java @@ -18,7 +18,7 @@ public abstract class ManagerBase { private final String subscriptionId; private final AzureEnvironment environment; protected final HttpPipeline httpPipeline; - private SdkContext sdkContext; + private final SdkContext sdkContext; protected ManagerBase(HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { this.httpPipeline = httpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java index 5f0cd94f9e964..03a299a9fcda7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java @@ -9,7 +9,6 @@ import reactor.core.scheduler.Schedulers; import java.time.Duration; -import java.time.OffsetDateTime; import java.util.function.Function; /** @@ -19,7 +18,6 @@ public class SdkContext { private Function identifierFunction = name -> new ResourceNamer(name); private static DelayProvider delayProvider = new ResourceDelayProvider(); private static Scheduler reactorScheduler = Schedulers.boundedElastic(); - private static int longRunningOperationRetryTimeout = 30; /** * Default constructor for SdkContext. @@ -103,15 +101,6 @@ public static void sleep(int milliseconds) { } } - /** - * Wrapper for long-running operation retry timeout. - * - * @param lroRetryTimeout timeout value in seconds - */ - public static void setLroRetryTimeOut(int lroRetryTimeout) { - longRunningOperationRetryTimeout = lroRetryTimeout; - } - /** * Wrapper for the duration for delay, based on delayProvider. * @@ -122,23 +111,6 @@ public static Duration getDelayDuration(Duration delay) { return delayProvider.getDelayDuration(delay); } - /** - * Get long-running operation retry timeout. - * - * @return the duration - */ - public static Duration getLroRetryDuration() { - return delayProvider.getDelayDuration(Duration.ofSeconds(longRunningOperationRetryTimeout)); - } - - /** - * @return the current date time. - */ - public OffsetDateTime dateTimeNow() { - return OffsetDateTime.now(); - } - - /** * Gets the current Rx Scheduler for the SDK framework. * diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithTrafficManager.java index febb456be14df..321bb4c5d0a7e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithTrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithTrafficManager.java @@ -1,260 +1,301 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// -//package com.azure.management.appservice.samples; -// -//import com.azure.core.credential.TokenCredential; -//import com.azure.core.http.policy.HttpLogDetailLevel; -//import com.azure.core.management.AzureEnvironment; -//import com.azure.identity.DefaultAzureCredentialBuilder; -//import com.azure.management.Azure; -//import com.azure.management.resources.fluentcore.profile.AzureProfile; -// -//import com.azure.management.trafficmanager.TrafficManagerProfile; -//import com.azure.management.trafficmanager.TrafficRoutingMethod; -// -// -///** -// * Azure App Service sample for managing web apps. -// * - Create a domain -// * - Create a self-signed certificate for the domain -// * - Create 3 app service plans in 3 different regions -// * - Create 5 web apps under the 3 plans, bound to the domain and the certificate -// * - Create a traffic manager in front of the web apps -// * - Scale up the app service plans to twice the capacity -// */ -//public final class ManageLinuxWebAppWithTrafficManager { -// private static String rgName; -// [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Serves as an example, not for deployment. Please change when using this in your code.")] -// private static final String CERT_PASSWORD = "StrongPass!12"; -// -// private static Azure azure; -// private static AppServiceDomain domain; -// private static String pfxPath; - -// /** -// * Main function which runs the actual sample. -// * @param azure instance of the azure client -// * @return true if sample runs successfully -// */ -// public static boolean runSample(Azure azure) { -// System.out.println("removed later"); -// return true; -// RG_NAME = azure.sdkContext().randomResourceName("rgNEMV_", 24); -// -// if (ManageLinuxWebAppWithTrafficManager.azure == null) { -// ManageLinuxWebAppWithTrafficManager.azure = azure; -// } -// -// // New resources -// final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); -// final String app2Name = azure.sdkContext().randomResourceName("webapp2-", 20); -// final String app3Name = azure.sdkContext().randomResourceName("webapp3-", 20); -// final String app4Name = azure.sdkContext().randomResourceName("webapp4-", 20); -// final String app5Name = azure.sdkContext().randomResourceName("webapp5-", 20); -// final String plan1Name = azure.sdkContext().randomResourceName("jplan1_", 15); -// final String plan2Name = azure.sdkContext().randomResourceName("jplan2_", 15); -// final String plan3Name = azure.sdkContext().randomResourceName("jplan3_", 15); -// final String domainName = azure.sdkContext().randomResourceName("jsdkdemo-", 20) + ".com"; -// final String tmName = azure.sdkContext().randomResourceName("jsdktm-", 20); -// -// try { -// -// //============================================================ -// // Purchase a domain (will be canceled for a full refund) -// -// System.out.println("Purchasing a domain " + domainName + "..."); -// -// azure.resourceGroups().define(RG_NAME) -// .withRegion(Region.US_WEST) -// .create(); -// -// domain = azure.appServices().domains().define(domainName) -// .withExistingResourceGroup(RG_NAME) -// .defineRegistrantContact() -// .withFirstName("Jon") -// .withLastName("Doe") -// .withEmail("jondoe@contoso.com") -// .withAddressLine1("123 4th Ave") -// .withCity("Redmond") -// .withStateOrProvince("WA") -// .withCountry(CountryIsoCode.UNITED_STATES) -// .withPostalCode("98052") -// .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) -// .withPhoneNumber("4258828080") -// .attach() -// .withDomainPrivacyEnabled(true) -// .withAutoRenewEnabled(false) -// .create(); -// System.out.println("Purchased domain " + domain.name()); -// Utils.print(domain); -// -// //============================================================ -// // Create a self-singed SSL certificate -// -// pfxPath = ManageLinuxWebAppWithTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageLinuxWebAppWithTrafficManager.class.getSimpleName().toLowerCase() + ".pfx"; -// String cerPath = ManageLinuxWebAppWithTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageLinuxWebAppWithTrafficManager.class.getSimpleName().toLowerCase() + ".cer"; -// -// System.out.println("Creating a self-signed certificate " + pfxPath + "..."); -// -// Utils.createCertificate(cerPath, pfxPath, domainName, CERT_PASSWORD, "*." + domainName); -// -// //============================================================ -// // Create 3 app service plans in 3 regions -// -// System.out.println("Creating app service plan " + plan1Name + " in US West..."); -// -// AppServicePlan plan1 = createAppServicePlan(plan1Name, Region.US_WEST); -// -// System.out.println("Created app service plan " + plan1.name()); -// Utils.print(plan1); -// -// System.out.println("Creating app service plan " + plan2Name + " in Europe West..."); -// -// AppServicePlan plan2 = createAppServicePlan(plan2Name, Region.EUROPE_WEST); -// -// System.out.println("Created app service plan " + plan2.name()); -// Utils.print(plan1); -// -// System.out.println("Creating app service plan " + plan3Name + " in Asia East..."); -// -// AppServicePlan plan3 = createAppServicePlan(plan3Name, Region.ASIA_SOUTHEAST); -// -// System.out.println("Created app service plan " + plan2.name()); -// Utils.print(plan1); -// -// //============================================================ -// // Create 5 web apps under these 3 app service plans -// -// System.out.println("Creating web app " + app1Name + "..."); -// -// WebApp app1 = createWebApp(app1Name, plan1); -// -// System.out.println("Created web app " + app1.name()); -// Utils.print(app1); -// -// System.out.println("Creating another web app " + app2Name + "..."); -// WebApp app2 = createWebApp(app2Name, plan2); -// -// System.out.println("Created web app " + app2.name()); -// Utils.print(app2); -// -// System.out.println("Creating another web app " + app3Name + "..."); -// WebApp app3 = createWebApp(app3Name, plan3); -// -// System.out.println("Created web app " + app3.name()); -// Utils.print(app3); -// -// System.out.println("Creating another web app " + app3Name + "..."); -// WebApp app4 = createWebApp(app4Name, plan1); -// -// System.out.println("Created web app " + app4.name()); -// Utils.print(app4); -// -// System.out.println("Creating another web app " + app3Name + "..."); -// WebApp app5 = createWebApp(app5Name, plan1); -// -// System.out.println("Created web app " + app5.name()); -// Utils.print(app5); -// -// //============================================================ -// // Create a traffic manager -// -// System.out.println("Creating a traffic manager " + tmName + " for the web apps..."); -// -// TrafficManagerProfile trafficManager = azure.trafficManagerProfiles().define(tmName) -// .withExistingResourceGroup(RG_NAME) -// .withLeafDomainLabel(tmName) -// .withTrafficRoutingMethod(TrafficRoutingMethod.PRIORITY) -// .defineAzureTargetEndpoint("endpoint1") -// .toResourceId(app1.id()) -// .withRoutingPriority(1) -// .attach() -// .defineAzureTargetEndpoint("endpoint2") -// .toResourceId(app2.id()) -// .withRoutingPriority(2) -// .attach() -// .defineAzureTargetEndpoint("endpoint3") -// .toResourceId(app3.id()) -// .withRoutingPriority(3) -// .attach() -// .create(); -// -// System.out.println("Created traffic manager " + trafficManager.name()); -// Utils.print(trafficManager); -// -// //============================================================ -// // Scale up the app service plans -// -// System.out.println("Scaling up app service plan " + plan1Name + "..."); -// -// plan1.update() -// .withCapacity(plan1.capacity() * 2) -// .apply(); -// -// System.out.println("Scaled up app service plan " + plan1Name); -// Utils.print(plan1); -// -// System.out.println("Scaling up app service plan " + plan2Name + "..."); -// -// plan2.update() -// .withCapacity(plan2.capacity() * 2) -// .apply(); -// -// System.out.println("Scaled up app service plan " + plan2Name); -// Utils.print(plan2); -// -// System.out.println("Scaling up app service plan " + plan3Name + "..."); -// -// plan3.update() -// .withCapacity(plan3.capacity() * 2) -// .apply(); -// -// System.out.println("Scaled up app service plan " + plan3Name); -// Utils.print(plan3); -// -// return true; -// } catch (Exception e) { -// System.err.println(e.getMessage()); -// e.printStackTrace(); -// } finally { -// try { -// System.out.println("Deleting Resource Group: " + RG_NAME); -// azure.resourceGroups().beginDeleteByName(RG_NAME); -// System.out.println("Deleted Resource Group: " + RG_NAME); -// } catch (NullPointerException npe) { -// System.out.println("Did not create any resources in Azure. No clean up is necessary"); -// } catch (Exception g) { -// g.printStackTrace(); -// } -// } -// -// return false; -// -// private static AppServicePlan createAppServicePlan(String name, Region region) { -// return azure.appServicePlans().define(name) -// .withRegion(region) -// .withExistingResourceGroup(rgName) -// .withPricingTier(PricingTier.STANDARD_S2) -// .withOperatingSystem(OperatingSystem.LINUX) -// .create(); -// } -// -// private static WebApp createWebApp(String name, AppServicePlan plan) { -// return azure.webApps().define(name) -// .withExistingLinuxPlan(plan) -// .withExistingResourceGroup(rgName) -// .withBuiltInImage(RuntimeStack.NODEJS_4_5) -// .withManagedHostnameBindings(domain, name) -// .defineSslBinding() -// .forHostname(name + "." + domain.name()) -// .withPfxCertificateToUpload(new File(pfxPath), CERT_PASSWORD) -// .withSniBasedSsl() -// .attach() -// .defineSourceControl() -// .withPublicGitRepository("https://github.com/jianghaolu/azure-site-test") -// .withBranch("master") -// .attach() -// .create(); -// } -//} + +package com.azure.resourcemanager.appservice.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.appservice.models.AppServiceDomain; +import com.azure.resourcemanager.appservice.models.AppServicePlan; +import com.azure.resourcemanager.appservice.models.OperatingSystem; +import com.azure.resourcemanager.appservice.models.PricingTier; +import com.azure.resourcemanager.appservice.models.RuntimeStack; +import com.azure.resourcemanager.appservice.models.WebApp; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; + +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import com.azure.resourcemanager.trafficmanager.models.TrafficRoutingMethod; + +import java.io.File; +import java.util.Locale; + + +/** + * Azure App Service sample for managing web apps. + * - Create a domain + * - Create a self-signed certificate for the domain + * - Create 3 app service plans in 3 different regions + * - Create 5 web apps under the 3 plans, bound to the domain and the certificate + * - Create a traffic manager in front of the web apps + * - Scale up the app service plans to twice the capacity + */ +public final class ManageLinuxWebAppWithTrafficManager { + private static String rgName; + + private static final String CERT_PASSWORD = "StrongPass!12"; + + private static Azure azure; + private static AppServiceDomain domain; + private static String pfxPath; + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); + + if (ManageLinuxWebAppWithTrafficManager.azure == null) { + ManageLinuxWebAppWithTrafficManager.azure = azure; + } + + // New resources + final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); + final String app2Name = azure.sdkContext().randomResourceName("webapp2-", 20); + final String app3Name = azure.sdkContext().randomResourceName("webapp3-", 20); + final String app4Name = azure.sdkContext().randomResourceName("webapp4-", 20); + final String app5Name = azure.sdkContext().randomResourceName("webapp5-", 20); + final String plan1Name = azure.sdkContext().randomResourceName("jplan1_", 15); + final String plan2Name = azure.sdkContext().randomResourceName("jplan2_", 15); + final String plan3Name = azure.sdkContext().randomResourceName("jplan3_", 15); + final String domainName = azure.sdkContext().randomResourceName("jsdkdemo-", 20) + ".com"; + final String tmName = azure.sdkContext().randomResourceName("jsdktm-", 20); + + try { + + //============================================================ + // Purchase a domain (will be canceled for a full refund) + + System.out.println("Purchasing a domain " + domainName + "..."); + + azure.resourceGroups().define(rgName) + .withRegion(Region.US_WEST) + .create(); + + domain = azure.appServiceDomains().define(domainName) + .withExistingResourceGroup(rgName) + .defineRegistrantContact() + .withFirstName("Jon") + .withLastName("Doe") + .withEmail("jondoe@contoso.com") + .withAddressLine1("123 4th Ave") + .withCity("Redmond") + .withStateOrProvince("WA") + .withCountry(CountryIsoCode.UNITED_STATES) + .withPostalCode("98052") + .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) + .withPhoneNumber("4258828080") + .attach() + .withDomainPrivacyEnabled(true) + .withAutoRenewEnabled(false) + .create(); + System.out.println("Purchased domain " + domain.name()); + Utils.print(domain); + + //============================================================ + // Create a self-singed SSL certificate + + pfxPath = ManageLinuxWebAppWithTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageLinuxWebAppWithTrafficManager.class.getSimpleName().toLowerCase(Locale.ROOT) + ".pfx"; + String cerPath = ManageLinuxWebAppWithTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageLinuxWebAppWithTrafficManager.class.getSimpleName().toLowerCase(Locale.ROOT) + ".cer"; + + System.out.println("Creating a self-signed certificate " + pfxPath + "..."); + + Utils.createCertificate(cerPath, pfxPath, domainName, CERT_PASSWORD, "*." + domainName); + + //============================================================ + // Create 3 app service plans in 3 regions + + System.out.println("Creating app service plan " + plan1Name + " in US West..."); + + AppServicePlan plan1 = createAppServicePlan(plan1Name, Region.US_WEST); + + System.out.println("Created app service plan " + plan1.name()); + Utils.print(plan1); + + System.out.println("Creating app service plan " + plan2Name + " in Europe West..."); + + AppServicePlan plan2 = createAppServicePlan(plan2Name, Region.EUROPE_WEST); + + System.out.println("Created app service plan " + plan2.name()); + Utils.print(plan1); + + System.out.println("Creating app service plan " + plan3Name + " in Asia East..."); + + AppServicePlan plan3 = createAppServicePlan(plan3Name, Region.ASIA_SOUTHEAST); + + System.out.println("Created app service plan " + plan2.name()); + Utils.print(plan1); + + //============================================================ + // Create 5 web apps under these 3 app service plans + + System.out.println("Creating web app " + app1Name + "..."); + + WebApp app1 = createWebApp(app1Name, plan1); + + System.out.println("Created web app " + app1.name()); + Utils.print(app1); + + System.out.println("Creating another web app " + app2Name + "..."); + WebApp app2 = createWebApp(app2Name, plan2); + + System.out.println("Created web app " + app2.name()); + Utils.print(app2); + + System.out.println("Creating another web app " + app3Name + "..."); + WebApp app3 = createWebApp(app3Name, plan3); + + System.out.println("Created web app " + app3.name()); + Utils.print(app3); + + System.out.println("Creating another web app " + app3Name + "..."); + WebApp app4 = createWebApp(app4Name, plan1); + + System.out.println("Created web app " + app4.name()); + Utils.print(app4); + + System.out.println("Creating another web app " + app3Name + "..."); + WebApp app5 = createWebApp(app5Name, plan1); + + System.out.println("Created web app " + app5.name()); + Utils.print(app5); + + //============================================================ + // Create a traffic manager + + System.out.println("Creating a traffic manager " + tmName + " for the web apps..."); + + TrafficManagerProfile trafficManager = azure.trafficManagerProfiles().define(tmName) + .withExistingResourceGroup(rgName) + .withLeafDomainLabel(tmName) + .withTrafficRoutingMethod(TrafficRoutingMethod.PRIORITY) + .defineAzureTargetEndpoint("endpoint1") + .toResourceId(app1.id()) + .withRoutingPriority(1) + .attach() + .defineAzureTargetEndpoint("endpoint2") + .toResourceId(app2.id()) + .withRoutingPriority(2) + .attach() + .defineAzureTargetEndpoint("endpoint3") + .toResourceId(app3.id()) + .withRoutingPriority(3) + .attach() + .create(); + + System.out.println("Created traffic manager " + trafficManager.name()); + Utils.print(trafficManager); + + //============================================================ + // Scale up the app service plans + + System.out.println("Scaling up app service plan " + plan1Name + "..."); + + plan1.update() + .withCapacity(plan1.capacity() * 2) + .apply(); + + System.out.println("Scaled up app service plan " + plan1Name); + Utils.print(plan1); + + System.out.println("Scaling up app service plan " + plan2Name + "..."); + + plan2.update() + .withCapacity(plan2.capacity() * 2) + .apply(); + + System.out.println("Scaled up app service plan " + plan2Name); + Utils.print(plan2); + + System.out.println("Scaling up app service plan " + plan3Name + "..."); + + plan3.update() + .withCapacity(plan3.capacity() * 2) + .apply(); + + System.out.println("Scaled up app service plan " + plan3Name); + Utils.print(plan3); + + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + + return false; + } + + private static AppServicePlan createAppServicePlan(String name, Region region) { + return azure.appServicePlans().define(name) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withPricingTier(PricingTier.STANDARD_S2) + .withOperatingSystem(OperatingSystem.LINUX) + .create(); + } + + private static WebApp createWebApp(String name, AppServicePlan plan) { + return azure.webApps().define(name) + .withExistingLinuxPlan(plan) + .withExistingResourceGroup(rgName) + .withBuiltInImage(RuntimeStack.NODEJS_4_5) + .withManagedHostnameBindings(domain, name) + .defineSslBinding() + .forHostname(name + "." + domain.name()) + .withPfxCertificateToUpload(new File(pfxPath), CERT_PASSWORD) + .withSniBasedSsl() + .attach() + .defineSourceControl() + .withPublicGitRepository("https://github.com/jianghaolu/azure-site-test") + .withBranch("master") + .attach() + .create(); + } + + /** + * Main entry point. + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + // + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithTrafficManager.java index 58d97c58bcdbc..4fb9e6d930c0b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithTrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithTrafficManager.java @@ -1,259 +1,298 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// -//package com.azure.management.appservice.samples; -// -//import com.azure.core.credential.TokenCredential; -//import com.azure.core.http.policy.HttpLogDetailLevel; -//import com.azure.core.management.AzureEnvironment; -//import com.azure.identity.DefaultAzureCredentialBuilder; -//import com.azure.management.Azure; -//import com.azure.management.resources.fluentcore.profile.AzureProfile; -// -//import com.azure.management.trafficmanager.TrafficManagerProfile; -//import com.azure.management.trafficmanager.TrafficRoutingMethod; -// -// -///** -// * Azure App Service sample for managing web apps. -// * - Create a domain -// * - Create a self-signed certificate for the domain -// * - Create 3 app service plans in 3 different regions -// * - Create 5 web apps under the 3 plans, bound to the domain and the certificate -// * - Create a traffic manager in front of the web apps -// * - Scale up the app service plans to twice the capacity -// */ -//public final class ManageWebAppWithTrafficManager { -// private static String rgName; -// [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Serves as an example, not for deployment. Please change when using this in your code.")] -// private static final String CERT_PASSWORD = "StrongPass!12"; -// -// private static Azure azure; -// private static AppServiceDomain domain; -// private static String pfxPath; -// -// /** -// * Main function which runs the actual sample. -// * @param azure instance of the azure client -// * @return true if sample runs successfully -// */ -// public static boolean runSample(Azure azure) { -// System.out.println("removed later"); -// return true; -// RG_NAME = azure.sdkContext().randomResourceName("rgNEMV_", 24); -// -// if (ManageWebAppWithTrafficManager.azure == null) { -// ManageWebAppWithTrafficManager.azure = azure; -// } -// -// // New resources -// final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); -// final String app2Name = azure.sdkContext().randomResourceName("webapp2-", 20); -// final String app3Name = azure.sdkContext().randomResourceName("webapp3-", 20); -// final String app4Name = azure.sdkContext().randomResourceName("webapp4-", 20); -// final String app5Name = azure.sdkContext().randomResourceName("webapp5-", 20); -// final String plan1Name = azure.sdkContext().randomResourceName("jplan1_", 15); -// final String plan2Name = azure.sdkContext().randomResourceName("jplan2_", 15); -// final String plan3Name = azure.sdkContext().randomResourceName("jplan3_", 15); -// final String domainName = azure.sdkContext().randomResourceName("jsdkdemo-", 20) + ".com"; -// final String tmName = azure.sdkContext().randomResourceName("jsdktm-", 20); -// -// try { -// -// //============================================================ -// // Purchase a domain (will be canceled for a full refund) -// -// System.out.println("Purchasing a domain " + domainName + "..."); -// -// azure.resourceGroups().define(RG_NAME) -// .withRegion(Region.US_WEST) -// .create(); -// -// domain = azure.appServices().domains().define(domainName) -// .withExistingResourceGroup(RG_NAME) -// .defineRegistrantContact() -// .withFirstName("Jon") -// .withLastName("Doe") -// .withEmail("jondoe@contoso.com") -// .withAddressLine1("123 4th Ave") -// .withCity("Redmond") -// .withStateOrProvince("WA") -// .withCountry(CountryIsoCode.UNITED_STATES) -// .withPostalCode("98052") -// .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) -// .withPhoneNumber("4258828080") -// .attach() -// .withDomainPrivacyEnabled(true) -// .withAutoRenewEnabled(false) -// .create(); -// System.out.println("Purchased domain " + domain.name()); -// Utils.print(domain); -// -// //============================================================ -// // Create a self-singed SSL certificate -// -// pfxPath = ManageWebAppWithTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageWebAppWithTrafficManager.class.getSimpleName().toLowerCase() + ".pfx"; -// String cerPath = ManageWebAppWithTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageWebAppWithTrafficManager.class.getSimpleName().toLowerCase() + ".cer"; -// -// System.out.println("Creating a self-signed certificate " + pfxPath + "..."); -// -// Utils.createCertificate(cerPath, pfxPath, domainName, CERT_PASSWORD, "*." + domainName); -// -// //============================================================ -// // Create 3 app service plans in 3 regions -// -// System.out.println("Creating app service plan " + plan1Name + " in US West..."); -// -// AppServicePlan plan1 = createAppServicePlan(plan1Name, Region.US_WEST); -// -// System.out.println("Created app service plan " + plan1.name()); -// Utils.print(plan1); -// -// System.out.println("Creating app service plan " + plan2Name + " in Europe West..."); -// -// AppServicePlan plan2 = createAppServicePlan(plan2Name, Region.EUROPE_WEST); -// -// System.out.println("Created app service plan " + plan2.name()); -// Utils.print(plan1); -// -// System.out.println("Creating app service plan " + plan3Name + " in Asia East..."); -// -// AppServicePlan plan3 = createAppServicePlan(plan3Name, Region.ASIA_EAST); -// -// System.out.println("Created app service plan " + plan2.name()); -// Utils.print(plan1); -// -// //============================================================ -// // Create 5 web apps under these 3 app service plans -// -// System.out.println("Creating web app " + app1Name + "..."); -// -// WebApp app1 = createWebApp(app1Name, plan1); -// -// System.out.println("Created web app " + app1.name()); -// Utils.print(app1); -// -// System.out.println("Creating another web app " + app2Name + "..."); -// WebApp app2 = createWebApp(app2Name, plan2); -// -// System.out.println("Created web app " + app2.name()); -// Utils.print(app2); -// -// System.out.println("Creating another web app " + app3Name + "..."); -// WebApp app3 = createWebApp(app3Name, plan3); -// -// System.out.println("Created web app " + app3.name()); -// Utils.print(app3); -// -// System.out.println("Creating another web app " + app3Name + "..."); -// WebApp app4 = createWebApp(app4Name, plan1); -// -// System.out.println("Created web app " + app4.name()); -// Utils.print(app4); -// -// System.out.println("Creating another web app " + app3Name + "..."); -// WebApp app5 = createWebApp(app5Name, plan1); -// -// System.out.println("Created web app " + app5.name()); -// Utils.print(app5); -// -// //============================================================ -// // Create a traffic manager -// -// System.out.println("Creating a traffic manager " + tmName + " for the web apps..."); -// -// TrafficManagerProfile trafficManager = azure.trafficManagerProfiles().define(tmName) -// .withExistingResourceGroup(RG_NAME) -// .withLeafDomainLabel(tmName) -// .withTrafficRoutingMethod(TrafficRoutingMethod.PRIORITY) -// .defineAzureTargetEndpoint("endpoint1") -// .toResourceId(app1.id()) -// .withRoutingPriority(1) -// .attach() -// .defineAzureTargetEndpoint("endpoint2") -// .toResourceId(app2.id()) -// .withRoutingPriority(2) -// .attach() -// .defineAzureTargetEndpoint("endpoint3") -// .toResourceId(app3.id()) -// .withRoutingPriority(3) -// .attach() -// .create(); -// -// System.out.println("Created traffic manager " + trafficManager.name()); -// Utils.print(trafficManager); -// -// //============================================================ -// // Scale up the app service plans -// -// System.out.println("Scaling up app service plan " + plan1Name + "..."); -// -// plan1.update() -// .withCapacity(plan1.capacity() * 2) -// .apply(); -// -// System.out.println("Scaled up app service plan " + plan1Name); -// Utils.print(plan1); -// -// System.out.println("Scaling up app service plan " + plan2Name + "..."); -// -// plan2.update() -// .withCapacity(plan2.capacity() * 2) -// .apply(); -// -// System.out.println("Scaled up app service plan " + plan2Name); -// Utils.print(plan2); -// -// System.out.println("Scaling up app service plan " + plan3Name + "..."); -// -// plan3.update() -// .withCapacity(plan3.capacity() * 2) -// .apply(); -// -// System.out.println("Scaled up app service plan " + plan3Name); -// Utils.print(plan3); -// -// return true; -// } catch (Exception e) { -// System.err.println(e.getMessage()); -// e.printStackTrace(); -// } finally { -// try { -// System.out.println("Deleting Resource Group: " + RG_NAME); -// azure.resourceGroups().beginDeleteByName(RG_NAME); -// System.out.println("Deleted Resource Group: " + RG_NAME); -// } catch (NullPointerException npe) { -// System.out.println("Did not create any resources in Azure. No clean up is necessary"); -// } catch (Exception g) { -// g.printStackTrace(); -// } -// } -// -// return false; -// -// private static AppServicePlan createAppServicePlan(String name, Region region) { -// return azure.appServicePlans().define(name) -// .withRegion(region) -// .withExistingResourceGroup(rgName) -// .withPricingTier(PricingTier.STANDARD_S1) -// .withOperatingSystem(OperatingSystem.WINDOWS) -// .create(); -// } -// -// private static WebApp createWebApp(String name, AppServicePlan plan) { -// return azure.webApps().define(name) -// .withExistingWindowsPlan(plan) -// .withExistingResourceGroup(rgName) -// .withManagedHostnameBindings(domain, name) -// .defineSslBinding() -// .forHostname(name + "." + domain.name()) -// .withPfxCertificateToUpload(new File(pfxPath), CERT_PASSWORD) -// .withSniBasedSsl() -// .attach() -// .defineSourceControl() -// .withPublicGitRepository("https://github.com/jianghaolu/azure-site-test") -// .withBranch("master") -// .attach() -// .create(); -// } -//} + +package com.azure.resourcemanager.appservice.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.appservice.models.AppServiceDomain; +import com.azure.resourcemanager.appservice.models.AppServicePlan; +import com.azure.resourcemanager.appservice.models.OperatingSystem; +import com.azure.resourcemanager.appservice.models.PricingTier; +import com.azure.resourcemanager.appservice.models.WebApp; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; + +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import com.azure.resourcemanager.trafficmanager.models.TrafficRoutingMethod; + +import java.io.File; +import java.util.Locale; + +/** + * Azure App Service sample for managing web apps. + * - Create a domain + * - Create a self-signed certificate for the domain + * - Create 3 app service plans in 3 different regions + * - Create 5 web apps under the 3 plans, bound to the domain and the certificate + * - Create a traffic manager in front of the web apps + * - Scale up the app service plans to twice the capacity + */ +public final class ManageWebAppWithTrafficManager { + private static String rgName; + + private static final String CERT_PASSWORD = "StrongPass!12"; + + private static Azure azure; + private static AppServiceDomain domain; + private static String pfxPath; + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); + + if (ManageWebAppWithTrafficManager.azure == null) { + ManageWebAppWithTrafficManager.azure = azure; + } + + // New resources + final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); + final String app2Name = azure.sdkContext().randomResourceName("webapp2-", 20); + final String app3Name = azure.sdkContext().randomResourceName("webapp3-", 20); + final String app4Name = azure.sdkContext().randomResourceName("webapp4-", 20); + final String app5Name = azure.sdkContext().randomResourceName("webapp5-", 20); + final String plan1Name = azure.sdkContext().randomResourceName("jplan1_", 15); + final String plan2Name = azure.sdkContext().randomResourceName("jplan2_", 15); + final String plan3Name = azure.sdkContext().randomResourceName("jplan3_", 15); + final String domainName = azure.sdkContext().randomResourceName("jsdkdemo-", 20) + ".com"; + final String tmName = azure.sdkContext().randomResourceName("jsdktm-", 20); + + try { + + //============================================================ + // Purchase a domain (will be canceled for a full refund) + + System.out.println("Purchasing a domain " + domainName + "..."); + + azure.resourceGroups().define(rgName) + .withRegion(Region.US_WEST) + .create(); + + domain = azure.appServiceDomains().define(domainName) + .withExistingResourceGroup(rgName) + .defineRegistrantContact() + .withFirstName("Jon") + .withLastName("Doe") + .withEmail("jondoe@contoso.com") + .withAddressLine1("123 4th Ave") + .withCity("Redmond") + .withStateOrProvince("WA") + .withCountry(CountryIsoCode.UNITED_STATES) + .withPostalCode("98052") + .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) + .withPhoneNumber("4258828080") + .attach() + .withDomainPrivacyEnabled(true) + .withAutoRenewEnabled(false) + .create(); + System.out.println("Purchased domain " + domain.name()); + Utils.print(domain); + + //============================================================ + // Create a self-singed SSL certificate + + pfxPath = ManageWebAppWithTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageWebAppWithTrafficManager.class.getSimpleName().toLowerCase(Locale.ROOT) + ".pfx"; + String cerPath = ManageWebAppWithTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageWebAppWithTrafficManager.class.getSimpleName().toLowerCase(Locale.ROOT) + ".cer"; + + System.out.println("Creating a self-signed certificate " + pfxPath + "..."); + + Utils.createCertificate(cerPath, pfxPath, domainName, CERT_PASSWORD, "*." + domainName); + + //============================================================ + // Create 3 app service plans in 3 regions + + System.out.println("Creating app service plan " + plan1Name + " in US West..."); + + AppServicePlan plan1 = createAppServicePlan(plan1Name, Region.US_WEST); + + System.out.println("Created app service plan " + plan1.name()); + Utils.print(plan1); + + System.out.println("Creating app service plan " + plan2Name + " in Europe West..."); + + AppServicePlan plan2 = createAppServicePlan(plan2Name, Region.EUROPE_WEST); + + System.out.println("Created app service plan " + plan2.name()); + Utils.print(plan1); + + System.out.println("Creating app service plan " + plan3Name + " in Asia East..."); + + AppServicePlan plan3 = createAppServicePlan(plan3Name, Region.ASIA_EAST); + + System.out.println("Created app service plan " + plan2.name()); + Utils.print(plan1); + + //============================================================ + // Create 5 web apps under these 3 app service plans + + System.out.println("Creating web app " + app1Name + "..."); + + WebApp app1 = createWebApp(app1Name, plan1); + + System.out.println("Created web app " + app1.name()); + Utils.print(app1); + + System.out.println("Creating another web app " + app2Name + "..."); + WebApp app2 = createWebApp(app2Name, plan2); + + System.out.println("Created web app " + app2.name()); + Utils.print(app2); + + System.out.println("Creating another web app " + app3Name + "..."); + WebApp app3 = createWebApp(app3Name, plan3); + + System.out.println("Created web app " + app3.name()); + Utils.print(app3); + + System.out.println("Creating another web app " + app3Name + "..."); + WebApp app4 = createWebApp(app4Name, plan1); + + System.out.println("Created web app " + app4.name()); + Utils.print(app4); + + System.out.println("Creating another web app " + app3Name + "..."); + WebApp app5 = createWebApp(app5Name, plan1); + + System.out.println("Created web app " + app5.name()); + Utils.print(app5); + + //============================================================ + // Create a traffic manager + + System.out.println("Creating a traffic manager " + tmName + " for the web apps..."); + + TrafficManagerProfile trafficManager = azure.trafficManagerProfiles().define(tmName) + .withExistingResourceGroup(rgName) + .withLeafDomainLabel(tmName) + .withTrafficRoutingMethod(TrafficRoutingMethod.PRIORITY) + .defineAzureTargetEndpoint("endpoint1") + .toResourceId(app1.id()) + .withRoutingPriority(1) + .attach() + .defineAzureTargetEndpoint("endpoint2") + .toResourceId(app2.id()) + .withRoutingPriority(2) + .attach() + .defineAzureTargetEndpoint("endpoint3") + .toResourceId(app3.id()) + .withRoutingPriority(3) + .attach() + .create(); + + System.out.println("Created traffic manager " + trafficManager.name()); + Utils.print(trafficManager); + + //============================================================ + // Scale up the app service plans + + System.out.println("Scaling up app service plan " + plan1Name + "..."); + + plan1.update() + .withCapacity(plan1.capacity() * 2) + .apply(); + + System.out.println("Scaled up app service plan " + plan1Name); + Utils.print(plan1); + + System.out.println("Scaling up app service plan " + plan2Name + "..."); + + plan2.update() + .withCapacity(plan2.capacity() * 2) + .apply(); + + System.out.println("Scaled up app service plan " + plan2Name); + Utils.print(plan2); + + System.out.println("Scaling up app service plan " + plan3Name + "..."); + + plan3.update() + .withCapacity(plan3.capacity() * 2) + .apply(); + + System.out.println("Scaled up app service plan " + plan3Name); + Utils.print(plan3); + + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + + return false; + } + + private static AppServicePlan createAppServicePlan(String name, Region region) { + return azure.appServicePlans().define(name) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withPricingTier(PricingTier.STANDARD_S1) + .withOperatingSystem(OperatingSystem.WINDOWS) + .create(); + } + + private static WebApp createWebApp(String name, AppServicePlan plan) { + return azure.webApps().define(name) + .withExistingWindowsPlan(plan) + .withExistingResourceGroup(rgName) + .withManagedHostnameBindings(domain, name) + .defineSslBinding() + .forHostname(name + "." + domain.name()) + .withPfxCertificateToUpload(new File(pfxPath), CERT_PASSWORD) + .withSniBasedSsl() + .attach() + .defineSourceControl() + .withPublicGitRepository("https://github.com/jianghaolu/azure-site-test") + .withBranch("master") + .attach() + .create(); + } + + /** + * Main entry point. + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + // + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java index c46f4c256e8e7..4a3229f4d4d12 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java @@ -87,7 +87,7 @@ public static boolean runSample(Azure azure) { // Add some blob transaction events addBlobTransactions(storageConnectionString, storageAccount.manager().httpPipeline().getHttpClient()); - OffsetDateTime recordDateTime = azure.sdkContext().dateTimeNow(); + OffsetDateTime recordDateTime = OffsetDateTime.now(); // get metric definitions for storage account. for (MetricDefinition metricDefinition : azure.metricDefinitions().listByResource(storageAccount.id())) { // find metric definition for Transactions diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java index 5795a550e6706..790842c4c3f39 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java @@ -186,6 +186,10 @@ import com.azure.resourcemanager.storage.models.StorageAccountEncryptionStatus; import com.azure.resourcemanager.storage.models.StorageAccountKey; import com.azure.resourcemanager.storage.models.StorageService; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerAzureEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerExternalEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerNestedProfileEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTPClient; import reactor.core.publisher.Flux; @@ -1067,80 +1071,80 @@ public static void print(WebAppBase resource) { System.out.println(builder.toString()); } -// /** -// * Print a traffic manager profile. -// * -// * @param profile a traffic manager profile -// */ -// public static void print(TrafficManagerProfile profile) { -// StringBuilder info = new StringBuilder(); -// info.append("Traffic Manager Profile: ").append(profile.id()) -// .append("\n\tName: ").append(profile.name()) -// .append("\n\tResource group: ").append(profile.resourceGroupName()) -// .append("\n\tRegion: ").append(profile.regionName()) -// .append("\n\tTags: ").append(profile.tags()) -// .append("\n\tDNSLabel: ").append(profile.dnsLabel()) -// .append("\n\tFQDN: ").append(profile.fqdn()) -// .append("\n\tTTL: ").append(profile.timeToLive()) -// .append("\n\tEnabled: ").append(profile.isEnabled()) -// .append("\n\tRoutingMethod: ").append(profile.trafficRoutingMethod()) -// .append("\n\tMonitor status: ").append(profile.monitorStatus()) -// .append("\n\tMonitoring port: ").append(profile.monitoringPort()) -// .append("\n\tMonitoring path: ").append(profile.monitoringPath()); -// -// Map azureEndpoints = profile.azureEndpoints(); -// if (!azureEndpoints.isEmpty()) { -// info.append("\n\tAzure endpoints:"); -// int idx = 1; -// for (TrafficManagerAzureEndpoint endpoint : azureEndpoints.values()) { -// info.append("\n\t\tAzure endpoint: #").append(idx++) -// .append("\n\t\t\tId: ").append(endpoint.id()) -// .append("\n\t\t\tType: ").append(endpoint.endpointType()) -// .append("\n\t\t\tTarget resourceId: ").append(endpoint.targetAzureResourceId()) -// .append("\n\t\t\tTarget resourceType: ").append(endpoint.targetResourceType()) -// .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) -// .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) -// .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) -// .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); -// } -// } -// -// Map externalEndpoints = profile.externalEndpoints(); -// if (!externalEndpoints.isEmpty()) { -// info.append("\n\tExternal endpoints:"); -// int idx = 1; -// for (TrafficManagerExternalEndpoint endpoint : externalEndpoints.values()) { -// info.append("\n\t\tExternal endpoint: #").append(idx++) -// .append("\n\t\t\tId: ").append(endpoint.id()) -// .append("\n\t\t\tType: ").append(endpoint.endpointType()) -// .append("\n\t\t\tFQDN: ").append(endpoint.fqdn()) -// .append("\n\t\t\tSource Traffic Location: ").append(endpoint.sourceTrafficLocation()) -// .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) -// .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) -// .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) -// .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); -// } -// } -// -// Map nestedProfileEndpoints = profile.nestedProfileEndpoints(); -// if (!nestedProfileEndpoints.isEmpty()) { -// info.append("\n\tNested profile endpoints:"); -// int idx = 1; -// for (TrafficManagerNestedProfileEndpoint endpoint : nestedProfileEndpoints.values()) { -// info.append("\n\t\tNested profile endpoint: #").append(idx++) -// .append("\n\t\t\tId: ").append(endpoint.id()) -// .append("\n\t\t\tType: ").append(endpoint.endpointType()) -// .append("\n\t\t\tNested profileId: ").append(endpoint.nestedProfileId()) -// .append("\n\t\t\tMinimum child threshold: ").append(endpoint.minimumChildEndpointCount()) -// .append("\n\t\t\tSource Traffic Location: ").append(endpoint.sourceTrafficLocation()) -// .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) -// .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) -// .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) -// .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); -// } -// } -// System.out.println(info.toString()); -// } + /** + * Print a traffic manager profile. + * + * @param profile a traffic manager profile + */ + public static void print(TrafficManagerProfile profile) { + StringBuilder info = new StringBuilder(); + info.append("Traffic Manager Profile: ").append(profile.id()) + .append("\n\tName: ").append(profile.name()) + .append("\n\tResource group: ").append(profile.resourceGroupName()) + .append("\n\tRegion: ").append(profile.regionName()) + .append("\n\tTags: ").append(profile.tags()) + .append("\n\tDNSLabel: ").append(profile.dnsLabel()) + .append("\n\tFQDN: ").append(profile.fqdn()) + .append("\n\tTTL: ").append(profile.timeToLive()) + .append("\n\tEnabled: ").append(profile.isEnabled()) + .append("\n\tRoutingMethod: ").append(profile.trafficRoutingMethod()) + .append("\n\tMonitor status: ").append(profile.monitorStatus()) + .append("\n\tMonitoring port: ").append(profile.monitoringPort()) + .append("\n\tMonitoring path: ").append(profile.monitoringPath()); + + Map azureEndpoints = profile.azureEndpoints(); + if (!azureEndpoints.isEmpty()) { + info.append("\n\tAzure endpoints:"); + int idx = 1; + for (TrafficManagerAzureEndpoint endpoint : azureEndpoints.values()) { + info.append("\n\t\tAzure endpoint: #").append(idx++) + .append("\n\t\t\tId: ").append(endpoint.id()) + .append("\n\t\t\tType: ").append(endpoint.endpointType()) + .append("\n\t\t\tTarget resourceId: ").append(endpoint.targetAzureResourceId()) + .append("\n\t\t\tTarget resourceType: ").append(endpoint.targetResourceType()) + .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) + .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) + .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) + .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); + } + } + + Map externalEndpoints = profile.externalEndpoints(); + if (!externalEndpoints.isEmpty()) { + info.append("\n\tExternal endpoints:"); + int idx = 1; + for (TrafficManagerExternalEndpoint endpoint : externalEndpoints.values()) { + info.append("\n\t\tExternal endpoint: #").append(idx++) + .append("\n\t\t\tId: ").append(endpoint.id()) + .append("\n\t\t\tType: ").append(endpoint.endpointType()) + .append("\n\t\t\tFQDN: ").append(endpoint.fqdn()) + .append("\n\t\t\tSource Traffic Location: ").append(endpoint.sourceTrafficLocation()) + .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) + .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) + .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) + .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); + } + } + + Map nestedProfileEndpoints = profile.nestedProfileEndpoints(); + if (!nestedProfileEndpoints.isEmpty()) { + info.append("\n\tNested profile endpoints:"); + int idx = 1; + for (TrafficManagerNestedProfileEndpoint endpoint : nestedProfileEndpoints.values()) { + info.append("\n\t\tNested profile endpoint: #").append(idx++) + .append("\n\t\t\tId: ").append(endpoint.id()) + .append("\n\t\t\tType: ").append(endpoint.endpointType()) + .append("\n\t\t\tNested profileId: ").append(endpoint.nestedProfileId()) + .append("\n\t\t\tMinimum child threshold: ").append(endpoint.minimumChildEndpointCount()) + .append("\n\t\t\tSource Traffic Location: ").append(endpoint.sourceTrafficLocation()) + .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) + .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) + .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) + .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); + } + } + System.out.println(info.toString()); + } /** * Print a dns zone. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageSimpleTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageSimpleTrafficManager.java new file mode 100644 index 0000000000000..505b752521e5f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageSimpleTrafficManager.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; +import com.azure.resourcemanager.compute.models.VirtualMachine; +import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.models.ResourceGroup; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import org.apache.commons.lang.time.StopWatch; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * Simple Azure traffic manager sample. + * - Create 4 VMs spread across 2 regions + * - Create a traffic manager in front of the VMs + * - Change/configure traffic manager routing method + */ +public final class ManageSimpleTrafficManager { + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + final String rgName = azure.sdkContext().randomResourceName("rgCOPD", 24); + final String userName = "tirekicker"; + final String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com"; + final int vmCountPerRegion = 2; + Set regions = new HashSet<>(Arrays.asList( + Region.US_EAST2, + Region.ASIA_SOUTHEAST + )); + + try { + //============================================================= + // Create a shared resource group for all the resources so they can all be deleted together + // + ResourceGroup resourceGroup = azure.resourceGroups() + .define(rgName) + .withRegion(Region.US_EAST2) + .create(); + + System.out.println("Created a new resource group - " + resourceGroup.id()); + + // Prepare a batch of creatable VM definitions to put behind the traffic manager + // + List> creatableVirtualMachines = new ArrayList<>(); + + for (Region region : regions) { + String linuxVMNamePrefix = azure.sdkContext().randomResourceName("vm", 15); + for (int i = 0; i < vmCountPerRegion; i++) { + //============================================================= + // Create a virtual machine in its own virtual network + String vmName = String.format("%s-%d", linuxVMNamePrefix, i); + Creatable vmDefinition = azure.virtualMachines().define(vmName) + .withRegion(region) + .withExistingResourceGroup(resourceGroup) + .withNewPrimaryNetwork("10.0.0.0/29") + .withPrimaryPrivateIPAddressDynamic() + .withNewPrimaryPublicIPAddress(vmName) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS) + .withRootUsername(userName) + .withSsh(sshKey) + .withSize(VirtualMachineSizeTypes.STANDARD_A1); + creatableVirtualMachines.add(vmDefinition); + } + } + + + //============================================================= + // Create the VMs !! + + StopWatch stopwatch = new StopWatch(); + System.out.println("Creating the virtual machines..."); + stopwatch.start(); + + Collection virtualMachines = azure.virtualMachines().create(creatableVirtualMachines).values(); + + stopwatch.stop(); + System.out.println(String.format("Created virtual machines in %d seconds.", stopwatch.getTime() / 1000)); + + //============================================================= + // Create 1 traffic manager profile + // + String trafficManagerName = azure.sdkContext().randomResourceName("tra", 15); + TrafficManagerProfile.DefinitionStages.WithEndpoint profileWithEndpoint = azure.trafficManagerProfiles() + .define(trafficManagerName) + .withExistingResourceGroup(resourceGroup) + .withLeafDomainLabel(trafficManagerName) + .withPerformanceBasedRouting(); + + TrafficManagerProfile.DefinitionStages.WithCreate profileWithCreate = null; + int routingPriority = 1; + for (VirtualMachine vm : virtualMachines) { + String endpointName = azure.sdkContext().randomResourceName("ep", 15); + profileWithCreate = profileWithEndpoint.defineAzureTargetEndpoint(endpointName) + .toResourceId(vm.getPrimaryPublicIPAddressId()) + .withRoutingPriority(routingPriority++) + .attach(); + } + + stopwatch.reset(); + stopwatch.start(); + + TrafficManagerProfile trafficManagerProfile = profileWithCreate.create(); + + stopwatch.stop(); + System.out.printf("Created a traffic manager profile %s in %d seconds.%n", trafficManagerProfile.id(), stopwatch.getTime() / 1000); + + //============================================================= + // Modify the traffic manager to use priority based routing + // + + trafficManagerProfile.update() + .withPriorityBasedRouting() + .apply(); + + System.out.println("Modified the traffic manager to use priority-based routing."); + return true; + } catch (Exception f) { + + System.out.println(f.getMessage()); + f.printStackTrace(); + + } finally { + + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().deleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + /** + * Main entry point. + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + // + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } + + private ManageSimpleTrafficManager() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageTrafficManager.java new file mode 100644 index 0000000000000..1cedbea9cc5aa --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageTrafficManager.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.appservice.models.AppServiceDomain; +import com.azure.resourcemanager.appservice.models.AppServicePlan; +import com.azure.resourcemanager.appservice.models.OperatingSystem; +import com.azure.resourcemanager.appservice.models.PricingTier; +import com.azure.resourcemanager.appservice.models.WebApp; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +/** + * Azure traffic manager sample for managing profiles. + * - Create a domain + * - Create a self-signed certificate for the domain + * - Create 5 app service plans in 5 different regions + * - Create 5 web apps under the each plan, bound to the domain and the certificate + * - Create a traffic manager in front of the web apps + * - Disable an endpoint + * - Delete an endpoint + * - Enable an endpoint + * - Change/configure traffic manager routing method + * - Disable traffic manager profile + * - Enable traffic manager profile + */ +public final class ManageTrafficManager { + + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + final String rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); + final String domainName = azure.sdkContext().randomResourceName("jsdkdemo-", 20) + ".com"; + // [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Serves as an example, not for deployment. Please change when using this in your code.")] + final String certPassword = "StrongPass!12"; + final String appServicePlanNamePrefix = azure.sdkContext().randomResourceName("jplan1_", 15); + final String webAppNamePrefix = azure.sdkContext().randomResourceName("webapp1-", 20); + final String tmName = azure.sdkContext().randomResourceName("jsdktm-", 20); + final List regions = new ArrayList<>(); + // The regions in which web app needs to be created + // + regions.add(Region.US_WEST2); + regions.add(Region.US_EAST2); + regions.add(Region.ASIA_EAST); + regions.add(Region.US_CENTRAL); + + try { + azure.resourceGroups().define(rgName) + .withRegion(Region.US_WEST) + .create(); + + //============================================================ + // Purchase a domain (will be canceled for a full refund) + + System.out.println("Purchasing a domain " + domainName + "..."); + AppServiceDomain domain = azure.appServiceDomains().define(domainName) + .withExistingResourceGroup(rgName) + .defineRegistrantContact() + .withFirstName("Jon") + .withLastName("Doe") + .withEmail("jondoe@contoso.com") + .withAddressLine1("123 4th Ave") + .withCity("Redmond") + .withStateOrProvince("WA") + .withCountry(CountryIsoCode.UNITED_STATES) + .withPostalCode("98052") + .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) + .withPhoneNumber("4258828080") + .attach() + .withDomainPrivacyEnabled(true) + .withAutoRenewEnabled(false) + .create(); + System.out.println("Purchased domain " + domain.name()); + Utils.print(domain); + + //============================================================ + // Create a self-singed SSL certificate + + String pfxPath = ManageTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageTrafficManager.class.getSimpleName().toLowerCase(Locale.ROOT) + ".pfx"; + String cerPath = ManageTrafficManager.class.getResource("/").getPath() + "webapp_" + ManageTrafficManager.class.getSimpleName().toLowerCase(Locale.ROOT) + ".cer"; + + System.out.println("Creating a self-signed certificate " + pfxPath + "..."); + + Utils.createCertificate(cerPath, pfxPath, domainName, certPassword, "*." + domainName); + + //============================================================ + // Creates app service in 5 different region + + List appServicePlans = new ArrayList<>(); + int id = 0; + for (Region region : regions) { + String planName = appServicePlanNamePrefix + id; + System.out.println("Creating an app service plan " + planName + " in region " + region + "..."); + AppServicePlan appServicePlan = azure.appServicePlans().define(planName) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withPricingTier(PricingTier.BASIC_B1) + .withOperatingSystem(OperatingSystem.WINDOWS) + .create(); + System.out.println("Created app service plan " + planName); + Utils.print(appServicePlan); + appServicePlans.add(appServicePlan); + id++; + } + + //============================================================ + // Creates websites using previously created plan + List webApps = new ArrayList<>(); + id = 0; + for (AppServicePlan appServicePlan : appServicePlans) { + String webAppName = webAppNamePrefix + id; + System.out.println("Creating a web app " + webAppName + " using the plan " + appServicePlan.name() + "..."); + WebApp webApp = azure.webApps().define(webAppName) + .withExistingWindowsPlan(appServicePlan) + .withExistingResourceGroup(rgName) + .withManagedHostnameBindings(domain, webAppName) + .defineSslBinding() + .forHostname(webAppName + "." + domain.name()) + .withPfxCertificateToUpload(new File(pfxPath), certPassword) + .withSniBasedSsl() + .attach() + .defineSourceControl() + .withPublicGitRepository("https://github.com/jianghaolu/azure-site-test") + .withBranch("master") + .attach() + .create(); + System.out.println("Created web app " + webAppName); + Utils.print(webApp); + webApps.add(webApp); + id++; + } + + //============================================================ + // Creates a traffic manager profile + + System.out.println("Creating a traffic manager profile " + tmName + " for the web apps..."); + TrafficManagerProfile.DefinitionStages.WithEndpoint tmDefinition = azure.trafficManagerProfiles() + .define(tmName) + .withExistingResourceGroup(rgName) + .withLeafDomainLabel(tmName) + .withPriorityBasedRouting(); + Creatable tmCreatable = null; + int priority = 1; + for (WebApp webApp : webApps) { + tmCreatable = tmDefinition.defineAzureTargetEndpoint("endpoint-" + priority) + .toResourceId(webApp.id()) + .withRoutingPriority(priority) + .attach(); + priority++; + } + TrafficManagerProfile trafficManagerProfile = tmCreatable.create(); + System.out.println("Created traffic manager " + trafficManagerProfile.name()); + Utils.print(trafficManagerProfile); + + //============================================================ + // Disables one endpoint and removes another endpoint + + System.out.println("Disabling and removing endpoint..."); + trafficManagerProfile = trafficManagerProfile.update() + .updateAzureTargetEndpoint("endpoint-1") + .withTrafficDisabled() + .parent() + .withoutEndpoint("endpoint-2") + .apply(); + System.out.println("Endpoints updated"); + + //============================================================ + // Enables an endpoint + + System.out.println("Enabling endpoint..."); + trafficManagerProfile = trafficManagerProfile.update() + .updateAzureTargetEndpoint("endpoint-1") + .withTrafficEnabled() + .parent() + .apply(); + System.out.println("Endpoint updated"); + Utils.print(trafficManagerProfile); + + //============================================================ + // Change/configure traffic manager routing method + + System.out.println("Changing traffic manager profile routing method..."); + trafficManagerProfile = trafficManagerProfile.update() + .withPerformanceBasedRouting() + .apply(); + System.out.println("Changed traffic manager profile routing method"); + + //============================================================ + // Disables the traffic manager profile + + System.out.println("Disabling traffic manager profile..."); + trafficManagerProfile.update() + .withProfileStatusDisabled() + .apply(); + System.out.println("Traffic manager profile disabled"); + + //============================================================ + // Enables the traffic manager profile + + System.out.println("Enabling traffic manager profile..."); + trafficManagerProfile.update() + .withProfileStatusDisabled() + .apply(); + System.out.println("Traffic manager profile enabled"); + + //============================================================ + // Deletes the traffic manager profile + + System.out.println("Deleting the traffic manger profile..."); + azure.trafficManagerProfiles().deleteById(trafficManagerProfile.id()); + System.out.println("Traffic manager profile deleted"); + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + /** + * Main entry point. + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + // + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/package-info.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/package-info.java new file mode 100644 index 0000000000000..8e5d1d232f6bd --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * This package contains the classes for traffic manager samples. + */ +package com.azure.resourcemanager.trafficmanager.samples; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java index b6be28910ba38..8fa7237137b4d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java @@ -14,12 +14,14 @@ import com.azure.resourcemanager.appservice.samples.ManageLinuxWebAppStorageAccountConnection; import com.azure.resourcemanager.appservice.samples.ManageLinuxWebAppWithContainerRegistry; import com.azure.resourcemanager.appservice.samples.ManageLinuxWebAppWithDomainSsl; +import com.azure.resourcemanager.appservice.samples.ManageLinuxWebAppWithTrafficManager; import com.azure.resourcemanager.appservice.samples.ManageWebAppCosmosDbByMsi; import com.azure.resourcemanager.appservice.samples.ManageWebAppCosmosDbThroughKeyVault; import com.azure.resourcemanager.appservice.samples.ManageWebAppLogs; import com.azure.resourcemanager.appservice.samples.ManageWebAppSourceControl; import com.azure.resourcemanager.appservice.samples.ManageWebAppStorageAccountConnection; import com.azure.resourcemanager.appservice.samples.ManageWebAppWithDomainSsl; +import com.azure.resourcemanager.appservice.samples.ManageWebAppWithTrafficManager; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -165,10 +167,15 @@ public void testManageWebAppWithDomainSsl() { Assertions.assertTrue(ManageWebAppWithDomainSsl.runSample(azure)); } -// @Test -// public void testManageWebAppWithTrafficManager() { -// Assertions.assertTrue(ManageWebAppWithTrafficManager.runSample(azure)); -// } + @Test + @DoNotRecord + public void testManageWebAppWithTrafficManager() { + if (skipInPlayback()) { + return; + } + + Assertions.assertTrue(ManageWebAppWithTrafficManager.runSample(azure)); + } @Test @DoNotRecord @@ -180,10 +187,15 @@ public void testManageLinuxWebAppWithDomainSsl() { Assertions.assertTrue(ManageLinuxWebAppWithDomainSsl.runSample(azure)); } -// @Test -// public void testManageLinuxWebAppWithTrafficManager() { -// Assertions.assertTrue(ManageLinuxWebAppWithTrafficManager.runSample(azure)); -// } + @Test + @DoNotRecord + public void testManageLinuxWebAppWithTrafficManager() { + if (skipInPlayback()) { + return; + } + + Assertions.assertTrue(ManageLinuxWebAppWithTrafficManager.runSample(azure)); + } @Test @DoNotRecord diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java new file mode 100644 index 0000000000000..688cd31c9c807 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.samples; + +import com.azure.core.test.annotation.DoNotRecord; +import com.azure.resourcemanager.trafficmanager.samples.ManageSimpleTrafficManager; +import com.azure.resourcemanager.trafficmanager.samples.ManageTrafficManager; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class TrafficManagerSampleTests extends SamplesTestBase { + @Test + public void testManageSimpleTrafficManager() { + Assertions.assertTrue(ManageSimpleTrafficManager.runSample(azure)); + } + + @Test + @DoNotRecord + public void testManageTrafficManager() { + if (this.skipInPlayback()) { + // sample creates certificate + return; + } + Assertions.assertTrue(ManageTrafficManager.runSample(azure)); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageLinuxWebAppWithTrafficManager.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageLinuxWebAppWithTrafficManager.json new file mode 100644 index 0000000000000..c3ead870347b8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageLinuxWebAppWithTrafficManager.json @@ -0,0 +1,2986 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_128188e1c1c?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb17305b-196e-4940-915a-5192d3bac980", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:51:48 GMT", + "x-ms-correlation-request-id" : "f2971840-0b89-4395-bcf8-8e9975d9120a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065148Z:f2971840-0b89-4395-bcf8-8e9975d9120a", + "Expires" : "-1", + "Content-Length" : "233", + "x-ms-request-id" : "f2971840-0b89-4395-bcf8-8e9975d9120a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c\",\"name\":\"rgnemv_128188e1c1c\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Network/dnsZones/jsdkdemo-31319136.com?api-version=2018-03-01-preview", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.dns/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6125ad92-8ba5-46c6-978d-8d1a38278b5d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:51:56 GMT", + "x-ms-correlation-request-id" : "ee3ec0d0-d75b-46b1-bd4a-47e9639056b1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "private", + "ETag" : "00000002-0000-0000-a6ab-75602c80d601", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065156Z:ee3ec0d0-d75b-46b1-bd4a-47e9639056b1", + "Content-Length" : "544", + "x-ms-request-id" : "6125ad92-8ba5-46c6-978d-8d1a38278b5d", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/dnszones\\/jsdkdemo-31319136.com\",\"name\":\"jsdkdemo-31319136.com\",\"type\":\"Microsoft.Network\\/dnszones\",\"etag\":\"00000002-0000-0000-a6ab-75602c80d601\",\"location\":\"global\",\"tags\":{},\"properties\":{\"maxNumberOfRecordSets\":10000,\"maxNumberOfRecordsPerRecordSet\":null,\"nameServers\":[\"ns1-01.azure-dns.com.\",\"ns2-01.azure-dns.net.\",\"ns3-01.azure-dns.org.\",\"ns4-01.azure-dns.info.\"],\"numberOfRecordSets\":2,\"zoneType\":\"Public\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DomainRegistration/topLevelDomains/com/listAgreements?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "64bde29a-cda6-40f4-a849-6ed73be31da8", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:51:57 GMT", + "x-ms-correlation-request-id" : "2af1a44e-a11b-4c89-8900-7744f2884bae", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065157Z:2af1a44e-a11b-4c89-8900-7744f2884bae", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "94535", + "x-ms-request-id" : "6304fd75-9878-41ac-8817-3335751c6420", + "Body" : "{\"value\":[{\"agreementKey\":\"DNRA\",\"title\":\"Domain Registration Agreement\",\"content\":\"\\r\\n\\r\\n\",\"url\":\"http://www.secureserver.net/agreements/ShowDoc.aspx?pageid=reg_sa&pl_id=510456\"}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.DomainRegistration/domains/jsdkdemo-31319136.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "280cb921-d717-4469-b6b8-6b134d2ba426", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 06:52:06 GMT", + "x-ms-correlation-request-id" : "693f63e7-fde5-49fc-b387-d9b9b80ac398", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065207Z:693f63e7-fde5-49fc-b387-d9b9b80ac398", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "693f63e7-fde5-49fc-b387-d9b9b80ac398", + "X-Powered-By" : "ASP.NET", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.DomainRegistration/domains/jsdkdemo-31319136.com/operationresults/7d70bfde-a0ce-4ac0-8d8b-0cdef2ec6dbf?api-version=2019-08-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.DomainRegistration/domains/jsdkdemo-31319136.com/operationresults/7d70bfde-a0ce-4ac0-8d8b-0cdef2ec6dbf?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "61c223dc-0cc5-407b-b3d9-7abe2d3d1b8b" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:53:32 GMT", + "x-ms-correlation-request-id" : "7821b9f5-3129-4999-a75d-6a13ca079b71", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065332Z:7821b9f5-3129-4999-a75d-6a13ca079b71", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "864", + "x-ms-request-id" : "85e07d8e-b0ce-4111-83ea-bc72b8a1b26e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.DomainRegistration/domains/jsdkdemo-31319136.com\",\"name\":\"jsdkdemo-31319136.com\",\"type\":\"Microsoft.DomainRegistration/domains\",\"location\":\"global\",\"tags\":{},\"properties\":{\"registrationStatus\":\"Active\",\"provisioningState\":\"Succeeded\",\"nameServers\":[\"ns1-01.azure-dns.com\",\"ns2-01.azure-dns.net\",\"ns3-01.azure-dns.org\",\"ns4-01.azure-dns.info\"],\"privacy\":true,\"createdTime\":\"2020-09-01T01:52:13\",\"expirationTime\":\"2021-09-01T01:52:13\",\"autoRenew\":true,\"readyForDnsRecordManagement\":true,\"managedHostNames\":[],\"domainNotRenewableReasons\":[\"ExpirationNotInRenewalTimeRange\"],\"dnsType\":\"AzureDns\",\"dnsZoneId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Network/dnszones/jsdkdemo-31319136.com\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d800ca2e-3ddf-4b41-9d93-cb6b5a381119", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:53:58 GMT", + "x-ms-correlation-request-id" : "6fd034cb-5290-4d59-b1a0-7e99d244b476", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065358Z:6fd034cb-5290-4d59-b1a0-7e99d244b476", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1333", + "x-ms-request-id" : "273a21a8-eb72-49a1-b443-fe3995c59d3b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"name\":\"jplan1_59689b\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"serverFarmId\":47932,\"name\":\"jplan1_59689b\",\"workerSize\":\"Medium\",\"workerSizeId\":1,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Medium\",\"currentWorkerSizeId\":1,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West US\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"linux\",\"resourceGroup\":\"rgnemv_128188e1c1c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-bay-081_47932\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"family\":\"S\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan2_90073c?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "87ba4bf4-dbe4-4ae0-9263-8d1b4ecb907c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:54:11 GMT", + "x-ms-correlation-request-id" : "695a4aa0-eb80-4708-b46e-ed8d2c07b1e7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065411Z:695a4aa0-eb80-4708-b46e-ed8d2c07b1e7", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1343", + "x-ms-request-id" : "8260d293-49cb-4a00-88b6-454d93721789", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan2_90073c\",\"name\":\"jplan2_90073c\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"linux\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"serverFarmId\":3572,\"name\":\"jplan2_90073c\",\"workerSize\":\"Medium\",\"workerSizeId\":1,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Medium\",\"currentWorkerSizeId\":1,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_128188e1c1c-WestEuropewebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West Europe\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"linux\",\"resourceGroup\":\"rgnemv_128188e1c1c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-am2-331_3572\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"family\":\"S\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan3_55937b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2810520f-e2bc-4865-873d-7bdae24cb8cf", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:54:28 GMT", + "x-ms-correlation-request-id" : "c66b277f-6ffc-4cda-b480-a1479ca2bc71", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065428Z:c66b277f-6ffc-4cda-b480-a1479ca2bc71", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1352", + "x-ms-request-id" : "45fbc6a5-0c6f-4ac4-87e9-c704bf5c0b33", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan3_55937b\",\"name\":\"jplan3_55937b\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"linux\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"serverFarmId\":5274,\"name\":\"jplan3_55937b\",\"workerSize\":\"Medium\",\"workerSizeId\":1,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Medium\",\"currentWorkerSizeId\":1,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_128188e1c1c-SoutheastAsiawebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"Southeast Asia\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"linux\",\"resourceGroup\":\"rgnemv_128188e1c1c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-sg1-051_5274\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"family\":\"S\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2205b17c-45ef-4945-ad5e-a75ecb74ee93", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:54:48 GMT", + "x-ms-correlation-request-id" : "dc3ce9ef-07d8-47ea-a30f-717445f3f19e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CBF9A86E0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065449Z:dc3ce9ef-07d8-47ea-a30f-717445f3f19e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5457", + "x-ms-request-id" : "e4c666cb-76bc-4fd5-865a-151cfa7841cf", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a\",\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-6035344a\",\"state\":\"Running\",\"hostNames\":[\"webapp1-6035344a.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp1-6035344a\",\"repositorySiteName\":\"webapp1-6035344a\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-6035344a.azurewebsites.net\",\"webapp1-6035344a.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-6035344a.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-6035344a.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:54:33.04\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-6035344a\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp1-6035344a\\\\$webapp1-6035344a\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp1-6035344a.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/hostNameBindings/webapp1-6035344a.jsdkdemo-31319136.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "daa00420-bb19-4bac-a08b-24706256f8af", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:54:55 GMT", + "x-ms-correlation-request-id" : "0cca8333-a1f3-4e17-9781-ade5ecb0b7de", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CBF9A86E0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065456Z:0cca8333-a1f3-4e17-9781-ade5ecb0b7de", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "522", + "x-ms-request-id" : "23af0d13-da51-43eb-8604-83fc75830c15", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/hostNameBindings/webapp1-6035344a.jsdkdemo-31319136.com\",\"name\":\"webapp1-6035344a/webapp1-6035344a.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp1-6035344a\",\"domainId\":null,\"azureResourceName\":\"webapp1-6035344a\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f813e4a-e82b-45f4-8436-f5dec627d966", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:54:55 GMT", + "x-ms-correlation-request-id" : "7984c899-50c9-4d85-8042-1096dbd208f7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CCBF8B9C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065456Z:7984c899-50c9-4d85-8042-1096dbd208f7", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5567", + "x-ms-request-id" : "04b6e256-f431-40bf-b073-1d610f2bb5b4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a\",\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-6035344a\",\"state\":\"Running\",\"hostNames\":[\"webapp1-6035344a.jsdkdemo-31319136.com\",\"webapp1-6035344a.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp1-6035344a\",\"repositorySiteName\":\"webapp1-6035344a\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-6035344a.jsdkdemo-31319136.com\",\"webapp1-6035344a.azurewebsites.net\",\"webapp1-6035344a.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-6035344a.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-6035344a.jsdkdemo-31319136.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-6035344a.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:54:54.3\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-6035344a\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp1-6035344a\\\\$webapp1-6035344a\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp1-6035344a.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7244a243-994f-41ff-8740-f59430be32cb", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:54:56 GMT", + "x-ms-correlation-request-id" : "a36d43fb-1668-45b7-9bac-a82ef7884dc1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065457Z:a36d43fb-1668-45b7-9bac-a82ef7884dc1", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3571", + "x-ms-request-id" : "636121ae-24f5-46ea-9bb5-f17e24361e95", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/web\",\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-6035344a\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842%23%23West%20US%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a3f852a-ce1c-49d9-9dd7-2bacb1a3b4d6", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:55:10 GMT", + "x-ms-correlation-request-id" : "94bbe668-6f39-47d3-967a-adf2d04b4265", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065510Z:94bbe668-6f39-47d3-967a-adf2d04b4265", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "922", + "x-ms-request-id" : "3c1e6e39-a250-4277-a86a-14b3b807b801", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##West US#\",\"name\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##West US#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-31319136.com\",\"subjectName\":\"*.jsdkdemo-31319136.com\",\"hostNames\":[\"*.jsdkdemo-31319136.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-31319136.com\",\"issueDate\":\"2020-09-01T06:53:33+00:00\",\"expirationDate\":\"2030-08-30T06:53:33+00:00\",\"password\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a48c99ca-b6b4-49a4-b9ec-969ebfad7d21", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:55:17 GMT", + "x-ms-correlation-request-id" : "e7214fae-d34f-49ac-a73d-02db8f667414", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CCBF8B9C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065517Z:e7214fae-d34f-49ac-a73d-02db8f667414", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5808", + "x-ms-request-id" : "fb7763cd-da87-4457-aa3b-e7b4a67533de", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a\",\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-6035344a\",\"state\":\"Running\",\"hostNames\":[\"webapp1-6035344a.jsdkdemo-31319136.com\",\"webapp1-6035344a.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp1-6035344a\",\"repositorySiteName\":\"webapp1-6035344a\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-6035344a.jsdkdemo-31319136.com\",\"webapp1-6035344a.azurewebsites.net\",\"webapp1-6035344a.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-6035344a.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-6035344a.jsdkdemo-31319136.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-6035344a.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:55:15.83\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-6035344a\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp1-6035344a\\\\$webapp1-6035344a\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp1-6035344a.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9372bf1f-baf6-413e-a161-abe6eac59a5a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:55:18 GMT", + "x-ms-correlation-request-id" : "cf27fc11-b2aa-4685-b81b-474f33abadcf", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CD8CDF160\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065519Z:cf27fc11-b2aa-4685-b81b-474f33abadcf", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3557", + "x-ms-request-id" : "a2342a50-52e8-414c-bb10-381e4a9f0cb4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a\",\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-6035344a\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b93c985-23d4-4c91-b76d-8f1ddd506d76", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:55:18 GMT", + "x-ms-correlation-request-id" : "9e6448bb-0e4b-4d5c-ac64-3b142585d8c1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065519Z:9e6448bb-0e4b-4d5c-ac64-3b142585d8c1", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "201dedf8-baf9-470e-8043-59d1a5341698", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/appsettings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "440cf94b-17f0-4f3d-8949-752fcbe61d75", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:55:21 GMT", + "x-ms-correlation-request-id" : "89d21f0c-938a-4a60-b444-d68b7bd10f39", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CDC02DDA0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065522Z:89d21f0c-938a-4a60-b444-d68b7bd10f39", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "c932cf5c-446a-4f8e-820c-f2e01494db78", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "36e9683a-15b7-4859-8517-7a7a951003d2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:55:42 GMT", + "x-ms-correlation-request-id" : "7d94d59a-c6dd-4f0d-8e75-8e85582d6eb9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CE8B88C55\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065542Z:7d94d59a-c6dd-4f0d-8e75-8e85582d6eb9", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "489", + "x-ms-request-id" : "f29d7612-be6b-46ec-a856-3df3a67f925e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/sourcecontrols/web\",\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "70e594ad-d3bf-4e5d-909b-139dca385325" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:56:13 GMT", + "x-ms-correlation-request-id" : "f5f36eb9-51f2-48db-8aa3-46ab8965e65d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CE8B88C55\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065613Z:f5f36eb9-51f2-48db-8aa3-46ab8965e65d", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "655", + "x-ms-request-id" : "f3494d86-3199-434a-92aa-06a7664e49cd", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/sourcecontrols/web\",\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T06:56:04.2226518 http://webapp1-6035344a.scm.azurewebsites.net:80/api/deployments/latest?deployer=GitHub&time=2020-09-01_06-55-53Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e1a6b04-7c84-408b-b7ff-38b831ecd20a" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:56:44 GMT", + "x-ms-correlation-request-id" : "6fb9b3ce-33dc-4fc8-974c-7300740359a1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CE8B88C55\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065645Z:6fb9b3ce-33dc-4fc8-974c-7300740359a1", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "488", + "x-ms-request-id" : "d28c68c6-d8cd-4a07-b26c-ccf4700e3624", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/sourcecontrols/web\",\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "55061bcd-66b2-4935-b38f-9945f8e465e6", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:15 GMT", + "x-ms-correlation-request-id" : "1d290b85-01d7-4cc9-89e6-05ad9ad581a9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802CE8B88C55\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065715Z:1d290b85-01d7-4cc9-89e6-05ad9ad581a9", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1049", + "x-ms-request-id" : "5deaee22-48f2-465b-8b4e-576587cbadcc", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/hostNameBindings/webapp1-6035344a.azurewebsites.net\",\"name\":\"webapp1-6035344a/webapp1-6035344a.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp1-6035344a\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/hostNameBindings/webapp1-6035344a.jsdkdemo-31319136.com\",\"name\":\"webapp1-6035344a/webapp1-6035344a.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp1-6035344a\",\"domainId\":null,\"azureResourceName\":\"webapp1-6035344a\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab528e9d-3706-47b7-9598-ba54bc0b2df6", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:15 GMT", + "x-ms-correlation-request-id" : "afef4159-ffdd-4918-9611-af029fe95a17", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065715Z:afef4159-ffdd-4918-9611-af029fe95a17", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "d6bb7c3d-c57d-49c4-8cda-adfe9e12273f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "21c1a593-a601-4780-822e-81401e58b70d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:15 GMT", + "x-ms-correlation-request-id" : "31e67817-9e66-48c7-986b-bcd34d87b563", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065716Z:31e67817-9e66-48c7-986b-bcd34d87b563", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "efc25cdb-852f-43ee-8f78-ee55276fc299", + "Body" : "{\"id\":null,\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1138ad2-fe21-4e5b-bae6-eb84d7f72b42", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:15 GMT", + "x-ms-correlation-request-id" : "eb1392e6-3c93-411c-934a-ee947ae857f9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065716Z:eb1392e6-3c93-411c-934a-ee947ae857f9", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "42fbdd8f-ae25-43b4-bc06-0454313fa86a", + "Body" : "{\"id\":null,\"name\":\"webapp1-6035344a\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc7f0429-6794-4660-bda0-200a8e561daf", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:15 GMT", + "x-ms-correlation-request-id" : "b8636618-9fd1-4d34-843b-28ad2557afc2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11997", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065716Z:b8636618-9fd1-4d34-843b-28ad2557afc2", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "276", + "x-ms-request-id" : "10ccf356-32bf-471e-9287-471d771b8780", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp1-6035344a/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9516e91-cdbb-461d-867b-d1090f4f4735", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:40 GMT", + "x-ms-correlation-request-id" : "a3756043-ec6d-4d4a-bf3e-65f5681196dd", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D24D48740\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065741Z:a3756043-ec6d-4d4a-bf3e-65f5681196dd", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5546", + "x-ms-request-id" : "aaf864d3-49ec-4d4f-953e-7b26af979c4f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9\",\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"name\":\"webapp2-178729c9\",\"state\":\"Running\",\"hostNames\":[\"webapp2-178729c9.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestEuropewebspace\",\"selfLink\":\"https://waws-prod-am2-331.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestEuropewebspace/sites/webapp2-178729c9\",\"repositorySiteName\":\"webapp2-178729c9\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp2-178729c9.azurewebsites.net\",\"webapp2-178729c9.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp2-178729c9.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-178729c9.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan2_90073c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:57:23.0933333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp2-178729c9\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"20.50.2.2\",\"possibleInboundIpAddresses\":\"20.50.2.2\",\"ftpUsername\":\"webapp2-178729c9\\\\$webapp2-178729c9\",\"ftpsHostName\":\"ftps://waws-prod-am2-331.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"20.50.249.217,20.50.249.232,20.50.249.255,20.50.250.49,20.50.250.58,20.50.153.49\",\"possibleOutboundIpAddresses\":\"20.50.249.217,20.50.249.232,20.50.249.255,20.50.250.49,20.50.250.58,20.50.153.49,20.50.156.59,20.50.157.109,20.50.159.176,20.50.159.227,20.50.176.100,20.50.176.128\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-am2-331\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp2-178729c9.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/hostNameBindings/webapp2-178729c9.jsdkdemo-31319136.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0f539e4-6284-4583-bee6-036bc1e936d5", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:45 GMT", + "x-ms-correlation-request-id" : "4d7c721a-0258-46a4-917e-01cf59d0c4aa", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D24D48740\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065746Z:4d7c721a-0258-46a4-917e-01cf59d0c4aa", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "526", + "x-ms-request-id" : "b5647740-1fe4-413e-8bfb-d3e2a5bc88ee", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/hostNameBindings/webapp2-178729c9.jsdkdemo-31319136.com\",\"name\":\"webapp2-178729c9/webapp2-178729c9.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West Europe\",\"properties\":{\"siteName\":\"webapp2-178729c9\",\"domainId\":null,\"azureResourceName\":\"webapp2-178729c9\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa6057f2-bcf0-4c99-bbaa-b15580630440", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:46 GMT", + "x-ms-correlation-request-id" : "1a290210-a4ec-4f44-af29-a0f5ca7dc3c4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D324B7D20\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065747Z:1a290210-a4ec-4f44-af29-a0f5ca7dc3c4", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5652", + "x-ms-request-id" : "e08e711d-cc15-4a9e-824d-985459a2158d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9\",\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"name\":\"webapp2-178729c9\",\"state\":\"Running\",\"hostNames\":[\"webapp2-178729c9.jsdkdemo-31319136.com\",\"webapp2-178729c9.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestEuropewebspace\",\"selfLink\":\"https://waws-prod-am2-331.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestEuropewebspace/sites/webapp2-178729c9\",\"repositorySiteName\":\"webapp2-178729c9\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp2-178729c9.jsdkdemo-31319136.com\",\"webapp2-178729c9.azurewebsites.net\",\"webapp2-178729c9.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp2-178729c9.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-178729c9.jsdkdemo-31319136.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-178729c9.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan2_90073c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:57:45.97\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp2-178729c9\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"20.50.2.2\",\"possibleInboundIpAddresses\":\"20.50.2.2\",\"ftpUsername\":\"webapp2-178729c9\\\\$webapp2-178729c9\",\"ftpsHostName\":\"ftps://waws-prod-am2-331.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"20.50.249.217,20.50.249.232,20.50.249.255,20.50.250.49,20.50.250.58,20.50.153.49\",\"possibleOutboundIpAddresses\":\"20.50.249.217,20.50.249.232,20.50.249.255,20.50.250.49,20.50.250.58,20.50.153.49,20.50.156.59,20.50.157.109,20.50.159.176,20.50.159.227,20.50.176.100,20.50.176.128\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-am2-331\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp2-178729c9.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "85d0eca4-97c6-4bdf-bc4c-b909a353b0f2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:46 GMT", + "x-ms-correlation-request-id" : "b4bf2526-4cb5-4d3c-b0a3-9f00ee08b284", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065747Z:b4bf2526-4cb5-4d3c-b0a3-9f00ee08b284", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3575", + "x-ms-request-id" : "bcf403e4-d2e8-4e13-b568-166fbe40dca8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/web\",\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp2-178729c9\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842%23%23West%20Europe%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e2f80916-640e-4268-a3d2-f1db328d0d26", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:51 GMT", + "x-ms-correlation-request-id" : "1fd3bf96-ecc1-4784-98b9-984793020963", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065752Z:1fd3bf96-ecc1-4784-98b9-984793020963", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "938", + "x-ms-request-id" : "c738caaa-910f-415c-b1e8-1c0ed5d14b26", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##West Europe#\",\"name\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##West Europe#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-31319136.com\",\"subjectName\":\"*.jsdkdemo-31319136.com\",\"hostNames\":[\"*.jsdkdemo-31319136.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-31319136.com\",\"issueDate\":\"2020-09-01T06:53:33+00:00\",\"expirationDate\":\"2030-08-30T06:53:33+00:00\",\"password\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_128188e1c1c-WestEuropewebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7261685-5f67-4d7c-9685-100cda63d43e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:53 GMT", + "x-ms-correlation-request-id" : "ec17166a-e2bb-4886-91dd-c585e0d86e13", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D324B7D20\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065754Z:ec17166a-e2bb-4886-91dd-c585e0d86e13", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5892", + "x-ms-request-id" : "05739d2a-9ebf-4645-a499-4020f3e028ef", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9\",\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"name\":\"webapp2-178729c9\",\"state\":\"Running\",\"hostNames\":[\"webapp2-178729c9.jsdkdemo-31319136.com\",\"webapp2-178729c9.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestEuropewebspace\",\"selfLink\":\"https://waws-prod-am2-331.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestEuropewebspace/sites/webapp2-178729c9\",\"repositorySiteName\":\"webapp2-178729c9\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp2-178729c9.jsdkdemo-31319136.com\",\"webapp2-178729c9.azurewebsites.net\",\"webapp2-178729c9.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp2-178729c9.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-178729c9.jsdkdemo-31319136.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-178729c9.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan2_90073c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:57:53.48\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp2-178729c9\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"20.50.2.2\",\"possibleInboundIpAddresses\":\"20.50.2.2\",\"ftpUsername\":\"webapp2-178729c9\\\\$webapp2-178729c9\",\"ftpsHostName\":\"ftps://waws-prod-am2-331.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"20.50.249.217,20.50.249.232,20.50.249.255,20.50.250.49,20.50.250.58,20.50.153.49\",\"possibleOutboundIpAddresses\":\"20.50.249.217,20.50.249.232,20.50.249.255,20.50.250.49,20.50.250.58,20.50.153.49,20.50.156.59,20.50.157.109,20.50.159.176,20.50.159.227,20.50.176.100,20.50.176.128\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-am2-331\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp2-178729c9.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "046ff672-08bf-48f5-be41-3166d49b3c98", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:54 GMT", + "x-ms-correlation-request-id" : "fdf66dfc-10ec-4679-bb07-ae5b108c0505", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D36C56C80\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065755Z:fdf66dfc-10ec-4679-bb07-ae5b108c0505", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3561", + "x-ms-request-id" : "7c4481e3-72e7-4748-b2e7-c8093044856b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9\",\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp2-178729c9\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f4babb1-1c9f-43a0-9a47-5e630eb2d589", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:54 GMT", + "x-ms-correlation-request-id" : "21340235-7d4f-42e4-b08d-b758a0babc8b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11996", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065755Z:21340235-7d4f-42e4-b08d-b758a0babc8b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "268", + "x-ms-request-id" : "3b56c527-7158-4edd-adf6-157fe0f4eca3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/appsettings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e665356a-84f3-45fa-bb55-9ef1db3d657d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:57:55 GMT", + "x-ms-correlation-request-id" : "de719d40-b54f-4e51-98af-7ec1ce3c7a37", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D384F19C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065756Z:de719d40-b54f-4e51-98af-7ec1ce3c7a37", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "268", + "x-ms-request-id" : "0e858733-771a-4e76-bafe-295868cb4dd9", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f408a6d1-cb13-4ff8-ab79-b3a8b6eeb19d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:58:22 GMT", + "x-ms-correlation-request-id" : "82c5dd1b-17aa-484c-8eab-6255593628f0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D4800BD60\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065822Z:82c5dd1b-17aa-484c-8eab-6255593628f0", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "493", + "x-ms-request-id" : "c39ddfcd-e245-469b-840f-ef02b82e9e35", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/sourcecontrols/web\",\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6ec8a52-879d-49dd-b3d1-c150879f3979" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:58:52 GMT", + "x-ms-correlation-request-id" : "d35e5c64-bb40-471b-a258-281a7cde4065", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D4800BD60\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065853Z:d35e5c64-bb40-471b-a258-281a7cde4065", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "659", + "x-ms-request-id" : "d371c6b0-a38b-4abe-95fe-99e0d10783ee", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/sourcecontrols/web\",\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T06:58:46.9045777 http://webapp2-178729c9.scm.azurewebsites.net:80/api/deployments/latest?deployer=GitHub&time=2020-09-01_06-58-36Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2f2bd8b-bf58-4c20-845a-479151bbabac" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:59:22 GMT", + "x-ms-correlation-request-id" : "f5d45dd8-d987-4e7c-ba05-514bff1509cc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D4800BD60\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065923Z:f5d45dd8-d987-4e7c-ba05-514bff1509cc", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "492", + "x-ms-request-id" : "3e3c5504-645d-4878-9aa9-8cf130ce9988", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/sourcecontrols/web\",\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a12c03e-913d-4132-9e31-b1e8c1b58d9d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:59:53 GMT", + "x-ms-correlation-request-id" : "0642e63f-d3f5-4223-8539-ad05f974f664", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D4800BD60\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065953Z:0642e63f-d3f5-4223-8539-ad05f974f664", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1057", + "x-ms-request-id" : "1eef5621-f8a0-48e2-9051-fcd21e9bc822", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/hostNameBindings/webapp2-178729c9.azurewebsites.net\",\"name\":\"webapp2-178729c9/webapp2-178729c9.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West Europe\",\"properties\":{\"siteName\":\"webapp2-178729c9\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/hostNameBindings/webapp2-178729c9.jsdkdemo-31319136.com\",\"name\":\"webapp2-178729c9/webapp2-178729c9.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West Europe\",\"properties\":{\"siteName\":\"webapp2-178729c9\",\"domainId\":null,\"azureResourceName\":\"webapp2-178729c9\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "21e53b9d-297e-4bf7-b41f-06852836c465", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:59:53 GMT", + "x-ms-correlation-request-id" : "447987e5-1dbf-4249-800d-2ba1084a4461", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065954Z:447987e5-1dbf-4249-800d-2ba1084a4461", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "199", + "x-ms-request-id" : "35b55677-0fd6-401c-843a-4e99c379c60c", + "Body" : "{\"id\":null,\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b80e3c2-e3dd-48ed-9ac4-68ca8ec78d7c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:59:53 GMT", + "x-ms-correlation-request-id" : "db1645cd-6762-4c69-a057-afd9cc19b09c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11995", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065954Z:db1645cd-6762-4c69-a057-afd9cc19b09c", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "268", + "x-ms-request-id" : "e9ee9f3c-d896-480d-9bcf-95428eda5260", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c228c24c-0313-4a59-b8a0-7ee009078e6b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:59:53 GMT", + "x-ms-correlation-request-id" : "404b702c-57ac-4fc2-ad9d-13eff9ade245", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065954Z:404b702c-57ac-4fc2-ad9d-13eff9ade245", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "199", + "x-ms-request-id" : "e63156c5-7814-4d72-a0f4-8dd47cd5498a", + "Body" : "{\"id\":null,\"name\":\"webapp2-178729c9\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "845d3b54-c521-450c-9ca4-88079e14a11a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:59:54 GMT", + "x-ms-correlation-request-id" : "aa5b4bf4-2072-4c99-8d0c-410020b6f26b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065954Z:aa5b4bf4-2072-4c99-8d0c-410020b6f26b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "280", + "x-ms-request-id" : "9ab63f55-e1fe-4b3e-9433-28d211ccf537", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp2-178729c9/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6378db21-59fc-4d3e-9b7a-906d74c000ed", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:24 GMT", + "x-ms-correlation-request-id" : "ae122277-baba-4548-b8eb-9ec009c05541", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D847F64B5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070024Z:ae122277-baba-4548-b8eb-9ec009c05541", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5509", + "x-ms-request-id" : "813b8f9e-d750-4718-ade5-c22d4ec17c86", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8\",\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp3-007954e8\",\"state\":\"Running\",\"hostNames\":[\"webapp3-007954e8.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-SoutheastAsiawebspace\",\"selfLink\":\"https://waws-prod-sg1-051.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-SoutheastAsiawebspace/sites/webapp3-007954e8\",\"repositorySiteName\":\"webapp3-007954e8\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp3-007954e8.azurewebsites.net\",\"webapp3-007954e8.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp3-007954e8.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-007954e8.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan3_55937b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:00:03.3666667\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp3-007954e8\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.67.9.5\",\"possibleInboundIpAddresses\":\"13.67.9.5\",\"ftpUsername\":\"webapp3-007954e8\\\\$webapp3-007954e8\",\"ftpsHostName\":\"ftps://waws-prod-sg1-051.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.67.9.5,104.43.19.189,13.76.208.109,13.76.231.65,13.76.138.204\",\"possibleOutboundIpAddresses\":\"13.67.9.5,104.43.19.189,13.76.208.109,13.76.231.65,13.76.138.204,13.67.70.243,13.76.100.162,52.187.130.238,52.187.131.4,52.187.14.194\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-sg1-051\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp3-007954e8.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/hostNameBindings/webapp3-007954e8.jsdkdemo-31319136.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8dcf0d81-8fd8-464c-acba-59112d2017f2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:30 GMT", + "x-ms-correlation-request-id" : "2b9a07d9-b107-4e4d-b364-6ae6ded17dea", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D847F64B5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070031Z:2b9a07d9-b107-4e4d-b364-6ae6ded17dea", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "529", + "x-ms-request-id" : "5eef5a73-653c-48ec-8a16-f6b4acfbdde0", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/hostNameBindings/webapp3-007954e8.jsdkdemo-31319136.com\",\"name\":\"webapp3-007954e8/webapp3-007954e8.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"Southeast Asia\",\"properties\":{\"siteName\":\"webapp3-007954e8\",\"domainId\":null,\"azureResourceName\":\"webapp3-007954e8\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "13f37660-c98b-423e-a873-11c2e5374a2d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:31 GMT", + "x-ms-correlation-request-id" : "eae49cf9-290a-4107-ab9f-9893bd03dc54", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D9492B055\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070031Z:eae49cf9-290a-4107-ab9f-9893bd03dc54", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5620", + "x-ms-request-id" : "686e8158-8e90-4248-acad-6f252e365da1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8\",\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp3-007954e8\",\"state\":\"Running\",\"hostNames\":[\"webapp3-007954e8.jsdkdemo-31319136.com\",\"webapp3-007954e8.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-SoutheastAsiawebspace\",\"selfLink\":\"https://waws-prod-sg1-051.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-SoutheastAsiawebspace/sites/webapp3-007954e8\",\"repositorySiteName\":\"webapp3-007954e8\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp3-007954e8.jsdkdemo-31319136.com\",\"webapp3-007954e8.azurewebsites.net\",\"webapp3-007954e8.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp3-007954e8.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-007954e8.jsdkdemo-31319136.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-007954e8.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan3_55937b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:00:30.8533333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp3-007954e8\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.67.9.5\",\"possibleInboundIpAddresses\":\"13.67.9.5\",\"ftpUsername\":\"webapp3-007954e8\\\\$webapp3-007954e8\",\"ftpsHostName\":\"ftps://waws-prod-sg1-051.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.67.9.5,104.43.19.189,13.76.208.109,13.76.231.65,13.76.138.204\",\"possibleOutboundIpAddresses\":\"13.67.9.5,104.43.19.189,13.76.208.109,13.76.231.65,13.76.138.204,13.67.70.243,13.76.100.162,52.187.130.238,52.187.131.4,52.187.14.194\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-sg1-051\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp3-007954e8.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1581f378-cac9-47a9-8f4c-0a60ff9660fd", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:31 GMT", + "x-ms-correlation-request-id" : "6c8bc4fd-840b-4ed0-8413-f8a7b831605a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070031Z:6c8bc4fd-840b-4ed0-8413-f8a7b831605a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3578", + "x-ms-request-id" : "17d5a2ab-6e23-49fb-8b84-5a5c56d0d9a4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/web\",\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp3-007954e8\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842%23%23South%20East%20Asia%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "19b37243-96e5-472d-b2e3-ac831b494a44", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1187", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:38 GMT", + "x-ms-correlation-request-id" : "767c6744-97ca-4576-a9d0-f1e33455b393", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070038Z:767c6744-97ca-4576-a9d0-f1e33455b393", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "952", + "x-ms-request-id" : "34698392-4230-4720-9013-1e42ae272612", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##South East Asia#\",\"name\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##South East Asia#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"southeastasia\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-31319136.com\",\"subjectName\":\"*.jsdkdemo-31319136.com\",\"hostNames\":[\"*.jsdkdemo-31319136.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-31319136.com\",\"issueDate\":\"2020-09-01T06:53:33+00:00\",\"expirationDate\":\"2030-08-30T06:53:33+00:00\",\"password\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_128188e1c1c-SoutheastAsiawebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9877ada9-da83-496d-8dfc-7f200154a35b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:40 GMT", + "x-ms-correlation-request-id" : "d1bdd227-97d8-4b5a-b861-e1f2b4e133fd", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D9492B055\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070041Z:d1bdd227-97d8-4b5a-b861-e1f2b4e133fd", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5855", + "x-ms-request-id" : "e1ee9832-3723-45a9-ad4b-0874595c4327", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8\",\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp3-007954e8\",\"state\":\"Running\",\"hostNames\":[\"webapp3-007954e8.jsdkdemo-31319136.com\",\"webapp3-007954e8.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-SoutheastAsiawebspace\",\"selfLink\":\"https://waws-prod-sg1-051.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-SoutheastAsiawebspace/sites/webapp3-007954e8\",\"repositorySiteName\":\"webapp3-007954e8\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp3-007954e8.jsdkdemo-31319136.com\",\"webapp3-007954e8.azurewebsites.net\",\"webapp3-007954e8.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp3-007954e8.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-007954e8.jsdkdemo-31319136.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-007954e8.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan3_55937b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:00:40.05\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp3-007954e8\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.67.9.5\",\"possibleInboundIpAddresses\":\"13.67.9.5\",\"ftpUsername\":\"webapp3-007954e8\\\\$webapp3-007954e8\",\"ftpsHostName\":\"ftps://waws-prod-sg1-051.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.67.9.5,104.43.19.189,13.76.208.109,13.76.231.65,13.76.138.204\",\"possibleOutboundIpAddresses\":\"13.67.9.5,104.43.19.189,13.76.208.109,13.76.231.65,13.76.138.204,13.67.70.243,13.76.100.162,52.187.130.238,52.187.131.4,52.187.14.194\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-sg1-051\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp3-007954e8.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b1946ac-f870-4f42-89af-0d2ef13cba4f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1186", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:42 GMT", + "x-ms-correlation-request-id" : "a5a17d74-66eb-4441-90e0-b9fc6da41992", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D9A0DFD20\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070042Z:a5a17d74-66eb-4441-90e0-b9fc6da41992", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3564", + "x-ms-request-id" : "e389cbed-c366-4d18-ad60-2095ce3e5a9c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8\",\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp3-007954e8\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "904e62db-3d96-46cf-adf3-f71629783da1", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:41 GMT", + "x-ms-correlation-request-id" : "6691db00-bc99-4e05-873f-25c54e0124ed", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070042Z:6691db00-bc99-4e05-873f-25c54e0124ed", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "271", + "x-ms-request-id" : "829bb8c4-4aae-4b79-9e56-af098131beb6", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/appsettings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a8c3e3e5-c9c0-41fc-8d66-8073d1708566", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1185", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:00:43 GMT", + "x-ms-correlation-request-id" : "71cf3d49-aff6-4956-a8ac-935b69d7d93a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802D9BBAC2C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070043Z:71cf3d49-aff6-4956-a8ac-935b69d7d93a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "271", + "x-ms-request-id" : "c06ad352-9235-4650-b919-328e2d389a7e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "78549ad6-659c-40c7-a04d-93384fb9712d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 07:01:03 GMT", + "x-ms-correlation-request-id" : "d08d4e41-9fd0-4718-a308-4757a108822e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DA84535C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070104Z:d08d4e41-9fd0-4718-a308-4757a108822e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "496", + "x-ms-request-id" : "50e14945-0334-4346-9d4b-0b925fb8aa0a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/sourcecontrols/web\",\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c1a937d7-64bd-4205-8e47-a63f6045867a" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:01:33 GMT", + "x-ms-correlation-request-id" : "7e863b3c-88d4-4458-ab0b-26deffce47dc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DA84535C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070134Z:7e863b3c-88d4-4458-ab0b-26deffce47dc", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "662", + "x-ms-request-id" : "91bb4c0b-c390-43bb-9aab-d41fb0eef3be", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/sourcecontrols/web\",\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T07:01:29.2700363 http://webapp3-007954e8.scm.azurewebsites.net:80/api/deployments/latest?deployer=GitHub&time=2020-09-01_07-01-17Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e327518c-6cc3-4fcb-aa51-a8b00948cff6" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:02:04 GMT", + "x-ms-correlation-request-id" : "7d90c2c0-f32c-488d-ba36-b25e05a616e7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DA84535C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070204Z:7d90c2c0-f32c-488d-ba36-b25e05a616e7", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "495", + "x-ms-request-id" : "dc5793e3-a4cb-4982-b18c-a78eed43dd43", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/sourcecontrols/web\",\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2a84cdb-43c6-4217-9948-5f1f2476d330", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:02:34 GMT", + "x-ms-correlation-request-id" : "5296d218-d799-4bd0-acb1-7bed2b95f1bf", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DA84535C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070235Z:5296d218-d799-4bd0-acb1-7bed2b95f1bf", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1063", + "x-ms-request-id" : "4ad8a228-fc70-46c8-ac6b-9c703195f54d", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/hostNameBindings/webapp3-007954e8.azurewebsites.net\",\"name\":\"webapp3-007954e8/webapp3-007954e8.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"Southeast Asia\",\"properties\":{\"siteName\":\"webapp3-007954e8\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/hostNameBindings/webapp3-007954e8.jsdkdemo-31319136.com\",\"name\":\"webapp3-007954e8/webapp3-007954e8.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"Southeast Asia\",\"properties\":{\"siteName\":\"webapp3-007954e8\",\"domainId\":null,\"azureResourceName\":\"webapp3-007954e8\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6859730c-575b-434b-b9f9-61d72c3c2526", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:02:34 GMT", + "x-ms-correlation-request-id" : "d5a0f582-a07e-4246-a221-2a80087be2c3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070235Z:d5a0f582-a07e-4246-a221-2a80087be2c3", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "202", + "x-ms-request-id" : "5eecec94-12fc-4b4b-bbac-cbc7cf648d77", + "Body" : "{\"id\":null,\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a4e8df0-e071-4c6f-968e-399463b5ab1e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:02:34 GMT", + "x-ms-correlation-request-id" : "8e6f32bf-a166-4868-b4cb-9e2dbc814221", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11997", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070235Z:8e6f32bf-a166-4868-b4cb-9e2dbc814221", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "271", + "x-ms-request-id" : "db6507e6-251b-4d32-9a62-e3e4e0136b5a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed0d5a31-c844-4cd5-b927-7f8b7b3cbabe", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:02:34 GMT", + "x-ms-correlation-request-id" : "af88897e-6f5e-4382-b6cc-8a2d584e6d52", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070235Z:af88897e-6f5e-4382-b6cc-8a2d584e6d52", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "202", + "x-ms-request-id" : "b416a8c0-9aca-4ad3-857f-c91694f8ad44", + "Body" : "{\"id\":null,\"name\":\"webapp3-007954e8\",\"type\":\"Microsoft.Web/sites\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd35fa76-ab4a-49b7-bd8f-854afe44cb77", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:02:35 GMT", + "x-ms-correlation-request-id" : "a7d4f041-7b7a-4008-ac00-769c452d9fe7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11994", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070235Z:a7d4f041-7b7a-4008-ac00-769c452d9fe7", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "283", + "x-ms-request-id" : "4ca8b15f-a70f-4474-83eb-2512ef80d50e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp3-007954e8/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e006765-58ef-4c3c-8981-24dd7f8e9c35", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:02:58 GMT", + "x-ms-correlation-request-id" : "5f4dc1a8-8511-4824-80cc-b3668dfa1b00", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DE26EBC80\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070259Z:5f4dc1a8-8511-4824-80cc-b3668dfa1b00", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5462", + "x-ms-request-id" : "46a0e06b-4f2b-45d4-b7d6-fe5091d3f5da", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b\",\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp4-94463b6b\",\"state\":\"Running\",\"hostNames\":[\"webapp4-94463b6b.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp4-94463b6b\",\"repositorySiteName\":\"webapp4-94463b6b\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp4-94463b6b.azurewebsites.net\",\"webapp4-94463b6b.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp4-94463b6b.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-94463b6b.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:02:40.8066667\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp4-94463b6b\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp4-94463b6b\\\\$webapp4-94463b6b\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp4-94463b6b.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/hostNameBindings/webapp4-94463b6b.jsdkdemo-31319136.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "14c7b5e2-f680-44c2-a0be-94dad1297956", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1184", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:03:05 GMT", + "x-ms-correlation-request-id" : "bc409170-cb29-4527-ae3d-61766b00876b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DE26EBC80\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070305Z:bc409170-cb29-4527-ae3d-61766b00876b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "522", + "x-ms-request-id" : "7c2e647a-8739-49c6-83b4-527e407a72e3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/hostNameBindings/webapp4-94463b6b.jsdkdemo-31319136.com\",\"name\":\"webapp4-94463b6b/webapp4-94463b6b.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp4-94463b6b\",\"domainId\":null,\"azureResourceName\":\"webapp4-94463b6b\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b582cb8c-7229-4f15-b445-77fd07eca070", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:03:05 GMT", + "x-ms-correlation-request-id" : "5fc77499-ddff-4991-9afe-6fdbf9ad267a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DF04B6C0B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070306Z:5fc77499-ddff-4991-9afe-6fdbf9ad267a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5573", + "x-ms-request-id" : "70d2003c-6750-4acf-91a1-0084255f1b45", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b\",\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp4-94463b6b\",\"state\":\"Running\",\"hostNames\":[\"webapp4-94463b6b.jsdkdemo-31319136.com\",\"webapp4-94463b6b.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp4-94463b6b\",\"repositorySiteName\":\"webapp4-94463b6b\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp4-94463b6b.jsdkdemo-31319136.com\",\"webapp4-94463b6b.azurewebsites.net\",\"webapp4-94463b6b.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp4-94463b6b.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-94463b6b.jsdkdemo-31319136.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-94463b6b.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:03:04.7366667\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp4-94463b6b\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp4-94463b6b\\\\$webapp4-94463b6b\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp4-94463b6b.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "277f393d-52c0-4c6b-a896-7dcf94517b43", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:03:06 GMT", + "x-ms-correlation-request-id" : "c4757bf7-0ec5-4a2c-933d-48d52bacb55c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070306Z:c4757bf7-0ec5-4a2c-933d-48d52bacb55c", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3571", + "x-ms-request-id" : "ee44df60-c812-466d-b177-82d7e7135b09", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/web\",\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp4-94463b6b\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842%23%23West%20US%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb4a8e62-7e11-4127-8901-41855eed92e7", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:03:10 GMT", + "x-ms-correlation-request-id" : "7e23a580-40ec-481a-9549-6d3117f3bd0f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070311Z:7e23a580-40ec-481a-9549-6d3117f3bd0f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "922", + "x-ms-request-id" : "f9b4baab-e241-4bd3-a7e2-a05eee4b80f5", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##West US#\",\"name\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##West US#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-31319136.com\",\"subjectName\":\"*.jsdkdemo-31319136.com\",\"hostNames\":[\"*.jsdkdemo-31319136.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-31319136.com\",\"issueDate\":\"2020-09-01T06:53:33+00:00\",\"expirationDate\":\"2030-08-30T06:53:33+00:00\",\"password\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "766a0fb1-3d8b-4fe4-bb6a-07e454322537", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:03:15 GMT", + "x-ms-correlation-request-id" : "be1dda2d-0565-46a8-98e7-0df955313cf9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "496", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DF04B6C0B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070316Z:be1dda2d-0565-46a8-98e7-0df955313cf9", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5813", + "x-ms-request-id" : "9cd4b5c1-4034-4a30-8565-5b17f9dacd17", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b\",\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp4-94463b6b\",\"state\":\"Running\",\"hostNames\":[\"webapp4-94463b6b.jsdkdemo-31319136.com\",\"webapp4-94463b6b.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp4-94463b6b\",\"repositorySiteName\":\"webapp4-94463b6b\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp4-94463b6b.jsdkdemo-31319136.com\",\"webapp4-94463b6b.azurewebsites.net\",\"webapp4-94463b6b.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp4-94463b6b.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-94463b6b.jsdkdemo-31319136.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-94463b6b.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:03:14.4533333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp4-94463b6b\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp4-94463b6b\\\\$webapp4-94463b6b\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp4-94463b6b.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c142a43e-3b9d-4ffa-b650-9e354250d20a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:03:16 GMT", + "x-ms-correlation-request-id" : "800db91c-898d-4827-bf47-80911f9499d6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DF6161155\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070317Z:800db91c-898d-4827-bf47-80911f9499d6", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3557", + "x-ms-request-id" : "dd3009f9-70cb-430e-bf26-e932afa077ac", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b\",\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp4-94463b6b\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fa903e0-ba7f-44bb-9666-446632c7c57b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:03:17 GMT", + "x-ms-correlation-request-id" : "33f68647-4ca2-4883-9f89-d72650c886b6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11993", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070318Z:33f68647-4ca2-4883-9f89-d72650c886b6", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "8fc94d39-976b-4ba1-9eab-5b4dd90ba4eb", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/appsettings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2fd39a6-e226-4df0-9e3c-b1650fd0feff", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:03:17 GMT", + "x-ms-correlation-request-id" : "eec8a78d-0e12-4ef0-9f5a-5f4e96ee12cb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802DF86824AB\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070318Z:eec8a78d-0e12-4ef0-9f5a-5f4e96ee12cb", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "49749166-5cfb-4382-a33c-ea45bbb0152a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f6ed5b89-0ce3-4163-8995-d649fd46d28f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1183", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 07:03:31 GMT", + "x-ms-correlation-request-id" : "21c885b5-5eb8-4d4c-a1c6-e4238ad23652", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E0062C955\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070332Z:21c885b5-5eb8-4d4c-a1c6-e4238ad23652", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "489", + "x-ms-request-id" : "5342b5d4-098a-4d35-a8fe-26f44eda2809", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/sourcecontrols/web\",\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba41817d-8260-4edf-a751-6b66ea3f26ca" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:04:02 GMT", + "x-ms-correlation-request-id" : "9c642f9d-68a9-4abe-9ee5-12001cd566ee", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E0062C955\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070403Z:9c642f9d-68a9-4abe-9ee5-12001cd566ee", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "655", + "x-ms-request-id" : "52106cf9-42ee-4f94-bd50-e5c29cdbaf31", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/sourcecontrols/web\",\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T07:03:59.7296692 http://webapp4-94463b6b.scm.azurewebsites.net:80/api/deployments/latest?deployer=GitHub&time=2020-09-01_07-03-48Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "27b8940b-50ae-4b3b-8f0d-31af20d54a8c" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:04:34 GMT", + "x-ms-correlation-request-id" : "25e9a2ab-0797-44cd-a235-b7918e21d374", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E0062C955\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070434Z:25e9a2ab-0797-44cd-a235-b7918e21d374", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "488", + "x-ms-request-id" : "3363b3f1-57b3-4b92-b1ed-c857afa48baf", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/sourcecontrols/web\",\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f524a8a7-98db-4efd-99d5-06fcb3c69f5e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:05 GMT", + "x-ms-correlation-request-id" : "c6579bd2-ce42-43d1-aa1c-fed5383a8a07", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E0062C955\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070505Z:c6579bd2-ce42-43d1-aa1c-fed5383a8a07", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1049", + "x-ms-request-id" : "658590a4-f0f4-4521-ac84-5c737bbe5ade", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/hostNameBindings/webapp4-94463b6b.azurewebsites.net\",\"name\":\"webapp4-94463b6b/webapp4-94463b6b.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp4-94463b6b\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/hostNameBindings/webapp4-94463b6b.jsdkdemo-31319136.com\",\"name\":\"webapp4-94463b6b/webapp4-94463b6b.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp4-94463b6b\",\"domainId\":null,\"azureResourceName\":\"webapp4-94463b6b\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "633f2740-4ce2-41b0-a72c-8bfa8b5bcc76", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:05 GMT", + "x-ms-correlation-request-id" : "13a4aef5-002b-4c73-b14b-0833dd806e72", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11996", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070506Z:13a4aef5-002b-4c73-b14b-0833dd806e72", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "07b1ea42-4eb2-4ad2-9ed7-a02fc12fba24", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a53c1a9-dbc0-43a8-819c-ed31365b0fb1", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:06 GMT", + "x-ms-correlation-request-id" : "1ae438e1-e568-4d1b-bd02-0a77852ba76d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070507Z:1ae438e1-e568-4d1b-bd02-0a77852ba76d", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "c219de51-d84c-462b-b6ab-fd4642569e1b", + "Body" : "{\"id\":null,\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "af58aacc-c9de-4871-a01f-0ee9a2d80b64", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:06 GMT", + "x-ms-correlation-request-id" : "31e5872e-6d74-4349-90ef-17b6f7d2aed5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070507Z:31e5872e-6d74-4349-90ef-17b6f7d2aed5", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "f703b382-ce04-457b-89f7-35b3b3c44db6", + "Body" : "{\"id\":null,\"name\":\"webapp4-94463b6b\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad384352-eea5-4c16-8c60-71e5f48dd1ea", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:07 GMT", + "x-ms-correlation-request-id" : "dca77129-e402-40cc-9510-ce69fc876456", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11995", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070507Z:dca77129-e402-40cc-9510-ce69fc876456", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "276", + "x-ms-request-id" : "c3d40cdf-e83e-4532-9486-1b31ee4a5c5d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp4-94463b6b/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc908492-cc80-4d51-babc-a844a06414b6", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:31 GMT", + "x-ms-correlation-request-id" : "7c7f0912-b40f-4dfd-850f-d25dbf77086b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E3EDC082B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070532Z:7c7f0912-b40f-4dfd-850f-d25dbf77086b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5457", + "x-ms-request-id" : "99d86abe-3a49-49c4-bb59-1fd027dce76d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce\",\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp5-43523fce\",\"state\":\"Running\",\"hostNames\":[\"webapp5-43523fce.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp5-43523fce\",\"repositorySiteName\":\"webapp5-43523fce\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp5-43523fce.azurewebsites.net\",\"webapp5-43523fce.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp5-43523fce.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-43523fce.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:05:15.61\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp5-43523fce\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp5-43523fce\\\\$webapp5-43523fce\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp5-43523fce.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/hostNameBindings/webapp5-43523fce.jsdkdemo-31319136.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "698d30ff-3d37-4237-8076-45f58d85d6fc", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:36 GMT", + "x-ms-correlation-request-id" : "971bf07f-7fac-4f86-910f-d7b7111d77bc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E3EDC082B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070537Z:971bf07f-7fac-4f86-910f-d7b7111d77bc", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "522", + "x-ms-request-id" : "5ab23377-19ba-487a-9575-fe0636bfdcbc", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/hostNameBindings/webapp5-43523fce.jsdkdemo-31319136.com\",\"name\":\"webapp5-43523fce/webapp5-43523fce.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp5-43523fce\",\"domainId\":null,\"azureResourceName\":\"webapp5-43523fce\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "918c3364-595f-443f-ab0a-c23861b8ab6f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:36 GMT", + "x-ms-correlation-request-id" : "8d6363dc-4574-44f0-8718-71ba5278a2be", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E4A15C540\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070537Z:8d6363dc-4574-44f0-8718-71ba5278a2be", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5568", + "x-ms-request-id" : "9b82496d-4eac-4f88-b31b-8a2bc427fd6d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce\",\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp5-43523fce\",\"state\":\"Running\",\"hostNames\":[\"webapp5-43523fce.jsdkdemo-31319136.com\",\"webapp5-43523fce.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp5-43523fce\",\"repositorySiteName\":\"webapp5-43523fce\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp5-43523fce.jsdkdemo-31319136.com\",\"webapp5-43523fce.azurewebsites.net\",\"webapp5-43523fce.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp5-43523fce.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-43523fce.jsdkdemo-31319136.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-43523fce.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:05:35.38\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp5-43523fce\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp5-43523fce\\\\$webapp5-43523fce\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp5-43523fce.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd38800a-37e1-45a9-adc5-a9ba9fec9f4c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:36 GMT", + "x-ms-correlation-request-id" : "beb12f7a-d3e9-4936-8630-243ba8bbe28a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070537Z:beb12f7a-d3e9-4936-8630-243ba8bbe28a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3571", + "x-ms-request-id" : "70f8e336-1439-4dbf-9dde-5aaf9cf523f6", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/web\",\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp5-43523fce\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842%23%23West%20US%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fecd9685-fd94-4a80-9bd2-52363eda37c8", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1182", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:41 GMT", + "x-ms-correlation-request-id" : "92639180-276e-4aae-9023-0171390cc5e4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070541Z:92639180-276e-4aae-9023-0171390cc5e4", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "922", + "x-ms-request-id" : "10204986-17d4-49bd-a9e7-a5cb3de5179b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/certificates/ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##West US#\",\"name\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842##West US#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-31319136.com\",\"subjectName\":\"*.jsdkdemo-31319136.com\",\"hostNames\":[\"*.jsdkdemo-31319136.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-31319136.com\",\"issueDate\":\"2020-09-01T06:53:33+00:00\",\"expirationDate\":\"2030-08-30T06:53:33+00:00\",\"password\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "db527b63-1a1a-4264-b15f-7d0242e01ae2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:44 GMT", + "x-ms-correlation-request-id" : "f57a96b1-1e5f-49c8-8ca2-ee10a821ed14", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E4A15C540\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070545Z:f57a96b1-1e5f-49c8-8ca2-ee10a821ed14", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5808", + "x-ms-request-id" : "a8e2e866-1346-4d02-9744-a0530e60f71e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce\",\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app,linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp5-43523fce\",\"state\":\"Running\",\"hostNames\":[\"webapp5-43523fce.jsdkdemo-31319136.com\",\"webapp5-43523fce.azurewebsites.net\"],\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-081.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_128188e1c1c-WestUSwebspace/sites/webapp5-43523fce\",\"repositorySiteName\":\"webapp5-43523fce\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp5-43523fce.jsdkdemo-31319136.com\",\"webapp5-43523fce.azurewebsites.net\",\"webapp5-43523fce.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp5-43523fce.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-43523fce.jsdkdemo-31319136.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-43523fce.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T07:05:43.29\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp5-43523fce\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app,linux\",\"inboundIpAddress\":\"13.64.73.110\",\"possibleInboundIpAddresses\":\"13.64.73.110\",\"ftpUsername\":\"webapp5-43523fce\\\\$webapp5-43523fce\",\"ftpsHostName\":\"ftps://waws-prod-bay-081.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140\",\"possibleOutboundIpAddresses\":\"13.64.73.110,40.118.133.8,40.118.169.141,40.118.253.162,13.64.147.140,52.160.85.217,13.93.238.69\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-081\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_128188e1c1c\",\"defaultHostName\":\"webapp5-43523fce.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "874a506f-c84b-482c-92fa-355450b13c18", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1181", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:48 GMT", + "x-ms-correlation-request-id" : "d0321bce-3bf8-4a13-8d73-ddea70ce70ef", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E4ECCBDA0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070548Z:d0321bce-3bf8-4a13-8d73-ddea70ce70ef", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3557", + "x-ms-request-id" : "37225bba-4aab-4137-b22b-80e2d57bb3fb", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce\",\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp5-43523fce\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f18f5e11-df98-42fd-b192-ce6ff1a301d1", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:48 GMT", + "x-ms-correlation-request-id" : "d9a52bd3-9519-455b-be9a-997a22496d18", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11994", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070548Z:d9a52bd3-9519-455b-be9a-997a22496d18", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "ad8a6dc8-4750-497f-8d20-908c0b83fc60", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/appsettings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2c28e2e-105c-4404-89c4-d26338d228cf", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1180", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:05:49 GMT", + "x-ms-correlation-request-id" : "672d2d90-7ae6-4ee3-8f32-dbf637b8c555", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E524BEC4B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070549Z:672d2d90-7ae6-4ee3-8f32-dbf637b8c555", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "d97a78f3-70da-415f-874d-ffb94fc47215", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1250cbef-8ed7-4e0b-9f33-54b01bd62847", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 07:06:03 GMT", + "x-ms-correlation-request-id" : "72980d18-5766-4561-b0eb-3472f890901d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E5AD0E9A0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070604Z:72980d18-5766-4561-b0eb-3472f890901d", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "489", + "x-ms-request-id" : "dd0f18ec-9ee6-4fff-906f-1a6aef1ac7aa", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/sourcecontrols/web\",\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "18ef395a-7a91-45de-9059-6d9d14a8873c" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:06:33 GMT", + "x-ms-correlation-request-id" : "9fa62438-a3f9-49c8-b13b-cd065f5d65a3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E5AD0E9A0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070634Z:9fa62438-a3f9-49c8-b13b-cd065f5d65a3", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "655", + "x-ms-request-id" : "d2fee080-fd60-48d1-9088-084b941e74c4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/sourcecontrols/web\",\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T07:06:25.1622123 http://webapp5-43523fce.scm.azurewebsites.net:80/api/deployments/latest?deployer=GitHub&time=2020-09-01_07-06-14Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0364d4b-2066-48b1-87bc-b3d8d37a9298" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:07:05 GMT", + "x-ms-correlation-request-id" : "30fc5d32-4b2e-4c50-92c5-73874de19e38", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E5AD0E9A0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070705Z:30fc5d32-4b2e-4c50-92c5-73874de19e38", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "488", + "x-ms-request-id" : "c23d1bf3-6487-4e15-a508-9485dd5571d2", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/sourcecontrols/web\",\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ad492fa-f6b0-436a-863a-f82c6d8fba96", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:07:35 GMT", + "x-ms-correlation-request-id" : "a92ec07c-4da9-4a64-bef5-153461b39987", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802E5AD0E9A0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070736Z:a92ec07c-4da9-4a64-bef5-153461b39987", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1049", + "x-ms-request-id" : "63d22cd1-6fe2-4ecd-ac7c-55362aae2626", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/hostNameBindings/webapp5-43523fce.azurewebsites.net\",\"name\":\"webapp5-43523fce/webapp5-43523fce.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp5-43523fce\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/hostNameBindings/webapp5-43523fce.jsdkdemo-31319136.com\",\"name\":\"webapp5-43523fce/webapp5-43523fce.jsdkdemo-31319136.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp5-43523fce\",\"domainId\":null,\"azureResourceName\":\"webapp5-43523fce\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"ABCEA4143E15EF3DDAE1C2D00A72BE66A60D0842\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1647d91e-258c-4b60-bf79-489bf5fd93e3", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:07:35 GMT", + "x-ms-correlation-request-id" : "91ff50c8-6616-4a04-a6a9-545260a04c52", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070736Z:91ff50c8-6616-4a04-a6a9-545260a04c52", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "d4eb34f4-f1bf-464f-8090-4339e8cf529b", + "Body" : "{\"id\":null,\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6cf8d777-2ab0-43e2-8e63-b26f3d5456fd", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:07:35 GMT", + "x-ms-correlation-request-id" : "86f55510-9f7b-4b9a-8654-51b55db17246", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11993", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070736Z:86f55510-9f7b-4b9a-8654-51b55db17246", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "264", + "x-ms-request-id" : "e0a47ca0-804e-43ac-9710-076dd6941cca", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "93ab1791-9ed5-48da-9a22-bba54a6eb77c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:07:36 GMT", + "x-ms-correlation-request-id" : "0a7cc193-3cd4-4741-9468-fbb6f00fdde2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070737Z:0a7cc193-3cd4-4741-9468-fbb6f00fdde2", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "efd62863-7d01-4499-b56e-85b4ffe7a286", + "Body" : "{\"id\":null,\"name\":\"webapp5-43523fce\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e07838ca-9972-485b-b87a-9dd5be47f3df", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:07:37 GMT", + "x-ms-correlation-request-id" : "476c98ed-a38f-4ed5-92b2-0cf2a35af768", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11992", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070737Z:476c98ed-a38f-4ed5-92b2-0cf2a35af768", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "276", + "x-ms-request-id" : "e52a1154-e70b-440b-9d29-dd1822e2a642", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/sites/webapp5-43523fce/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-33675bbe2?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9075bfc6-3315-4dc7-ac5c-e750a5c9e9ed", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 07:07:43 GMT", + "x-ms-correlation-request-id" : "052c0a9d-961d-4d1e-9c0f-9e35f6808d4d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070744Z:052c0a9d-961d-4d1e-9c0f-9e35f6808d4d", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "678", + "x-ms-request-id" : "9075bfc6-3315-4dc7-ac5c-e750a5c9e9ed", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-33675bbe2\",\"name\":\"jsdktm-33675bbe2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-33675bbe2\",\"fqdn\":\"jsdktm-33675bbe2.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-33675bbe2/azureEndpoints/endpoint1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dbdf07ab-336f-4e70-b0b7-b9d045c1acfb", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1179", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 07:07:49 GMT", + "x-ms-correlation-request-id" : "1fd2736c-d621-4118-a4b2-720ffa5d8171", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070749Z:1fd2736c-d621-4118-a4b2-720ffa5d8171", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "650", + "x-ms-request-id" : "dbdf07ab-336f-4e70-b0b7-b9d045c1acfb", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-33675bbe2\\/azureEndpoints\\/endpoint1\",\"name\":\"endpoint1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Web\\/sites\\/webapp1-6035344a\",\"target\":\"webapp1-6035344a.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-33675bbe2/azureEndpoints/endpoint2?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc3ccd1e-21e4-429e-9afc-3c99cdd2a8dd", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 07:07:56 GMT", + "x-ms-correlation-request-id" : "01ca6e99-4a0a-4113-a2a3-ab126e4fccd5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070757Z:01ca6e99-4a0a-4113-a2a3-ab126e4fccd5", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "654", + "x-ms-request-id" : "fc3ccd1e-21e4-429e-9afc-3c99cdd2a8dd", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-33675bbe2\\/azureEndpoints\\/endpoint2\",\"name\":\"endpoint2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Web\\/sites\\/webapp2-178729c9\",\"target\":\"webapp2-178729c9.azurewebsites.net\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"West Europe\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-33675bbe2/azureEndpoints/endpoint3?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc0aec42-505c-496f-a7d4-cb4bdd667fa7", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 07:08:05 GMT", + "x-ms-correlation-request-id" : "4a6b5cb4-89c1-42f9-8222-e9de0f72e1a2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070805Z:4a6b5cb4-89c1-42f9-8222-e9de0f72e1a2", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "657", + "x-ms-request-id" : "fc0aec42-505c-496f-a7d4-cb4bdd667fa7", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-33675bbe2\\/azureEndpoints\\/endpoint3\",\"name\":\"endpoint3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Web\\/sites\\/webapp3-007954e8\",\"target\":\"webapp3-007954e8.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-33675bbe2?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f2263bf-ae1f-4ade-adad-b73d2b369146", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:08:05 GMT", + "x-ms-correlation-request-id" : "490fbc40-8bc0-4002-87a5-43c956515775", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070805Z:490fbc40-8bc0-4002-87a5-43c956515775", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2650", + "x-ms-request-id" : "9f2263bf-ae1f-4ade-adad-b73d2b369146", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-33675bbe2\",\"name\":\"jsdktm-33675bbe2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-33675bbe2\",\"fqdn\":\"jsdktm-33675bbe2.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-33675bbe2\\/azureEndpoints\\/endpoint1\",\"name\":\"endpoint1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Web\\/sites\\/webapp1-6035344a\",\"target\":\"webapp1-6035344a.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-33675bbe2\\/azureEndpoints\\/endpoint2\",\"name\":\"endpoint2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Web\\/sites\\/webapp2-178729c9\",\"target\":\"webapp2-178729c9.azurewebsites.net\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"West Europe\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-33675bbe2\\/azureEndpoints\\/endpoint3\",\"name\":\"endpoint3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_128188e1c1c\\/providers\\/Microsoft.Web\\/sites\\/webapp3-007954e8\",\"target\":\"webapp3-007954e8.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7dcfd6d9-754b-40a6-920a-ef39ad55d90c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:08:12 GMT", + "x-ms-correlation-request-id" : "e4ce492a-39a6-42cc-befa-2a178778729e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070812Z:e4ce492a-39a6-42cc-befa-2a178778729e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1376", + "x-ms-request-id" : "187cf5d2-bef2-48a8-849d-5fa7167c151a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan1_59689b\",\"name\":\"jplan1_59689b\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"linux\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"serverFarmId\":47932,\"name\":\"jplan1_59689b\",\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"capacity\":2},\"workerSize\":\"Medium\",\"workerSizeId\":1,\"workerTierName\":null,\"numberOfWorkers\":2,\"currentWorkerSize\":\"Medium\",\"currentWorkerSizeId\":1,\"currentNumberOfWorkers\":2,\"status\":\"Ready\",\"webSpace\":\"rgnemv_128188e1c1c-WestUSwebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West US\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":3,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"linux\",\"resourceGroup\":\"rgnemv_128188e1c1c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-bay-081_47932\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":null,\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"capacity\":2}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan2_90073c?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7acaa5e-fbff-4b2d-a536-f5146810704f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:08:21 GMT", + "x-ms-correlation-request-id" : "5bfe5797-3ac7-4cd7-ba51-951823173148", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070821Z:5bfe5797-3ac7-4cd7-ba51-951823173148", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1386", + "x-ms-request-id" : "7f1b13c0-1d7e-4862-8482-0e726803be45", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan2_90073c\",\"name\":\"jplan2_90073c\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"linux\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"serverFarmId\":3572,\"name\":\"jplan2_90073c\",\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"capacity\":2},\"workerSize\":\"Medium\",\"workerSizeId\":1,\"workerTierName\":null,\"numberOfWorkers\":2,\"currentWorkerSize\":\"Medium\",\"currentWorkerSizeId\":1,\"currentNumberOfWorkers\":2,\"status\":\"Ready\",\"webSpace\":\"rgnemv_128188e1c1c-WestEuropewebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West Europe\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":1,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"linux\",\"resourceGroup\":\"rgnemv_128188e1c1c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-am2-331_3572\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":null,\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"capacity\":2}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan3_55937b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f4ea235-2b08-4965-854c-bc9915a196c3", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1178", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 07:08:34 GMT", + "x-ms-correlation-request-id" : "c944dd92-59ff-4274-8496-0316951c1c73", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070835Z:c944dd92-59ff-4274-8496-0316951c1c73", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1395", + "x-ms-request-id" : "e00a705c-1434-4146-9b67-edceabec2a71", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_128188e1c1c/providers/Microsoft.Web/serverfarms/jplan3_55937b\",\"name\":\"jplan3_55937b\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"linux\",\"location\":\"Southeast Asia\",\"tags\":{},\"properties\":{\"serverFarmId\":5274,\"name\":\"jplan3_55937b\",\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"capacity\":2},\"workerSize\":\"Medium\",\"workerSizeId\":1,\"workerTierName\":null,\"numberOfWorkers\":2,\"currentWorkerSize\":\"Medium\",\"currentWorkerSizeId\":1,\"currentNumberOfWorkers\":2,\"status\":\"Ready\",\"webSpace\":\"rgnemv_128188e1c1c-SoutheastAsiawebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"Southeast Asia\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":1,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"linux\",\"resourceGroup\":\"rgnemv_128188e1c1c\",\"reserved\":true,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-sg1-051_5274\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":null,\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"size\":\"S2\",\"capacity\":2}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_128188e1c1c?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "63eb31cd-92cc-4474-92d1-424b58d62797", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 07:08:40 GMT", + "x-ms-correlation-request-id" : "699df8aa-9179-4839-aa38-1a6b5de5104a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T070841Z:699df8aa-9179-4839-aa38-1a6b5de5104a", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "699df8aa-9179-4839-aa38-1a6b5de5104a", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYxMjgxODhFMUMxQy1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null + } ], + "variables" : [ "rgnemv_128188e1c1c", "webapp1-6035344a", "webapp2-178729c9", "webapp3-007954e8", "webapp4-94463b6b", "webapp5-43523fce", "jplan1_59689b", "jplan2_90073c", "jplan3_55937b", "jsdkdemo-31319136", "jsdktm-33675bbe2" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageSimpleTrafficManager.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageSimpleTrafficManager.json index 43daca52da47c..95ffb720437fd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageSimpleTrafficManager.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageSimpleTrafficManager.json @@ -1,2336 +1,2550 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgcopd0eb7813168c32?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgcopd29340739181?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7792b02e-2994-47e9-ba22-79f6caa467ed", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:33 GMT", - "content-length" : "320", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "314ee437-2af3-4afb-ae49-b4ceac289bc4", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091233Z:314ee437-2af3-4afb-ae49-b4ceac289bc4", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "314ee437-2af3-4afb-ae49-b4ceac289bc4", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32\",\"name\":\"rgcopd0eb7813168c32\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus2\",\"tags\":{\"date\":\"2020-02-04T09:12:28.697Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } + "Date" : "Tue, 01 Sep 2020 05:13:50 GMT", + "x-ms-correlation-request-id" : "5972d397-dcc1-4721-8ab9-63d3964dd05a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051350Z:5972d397-dcc1-4721-8ab9-63d3964dd05a", + "Expires" : "-1", + "Content-Length" : "232", + "x-ms-request-id" : "5972d397-dcc1-4721-8ab9-63d3964dd05a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181\",\"name\":\"rgcopd29340739181\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus2\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet47107aa0d6?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f067a675-a462-4d07-86b9-c0e6e68f6f65", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:13:59 GMT", + "x-ms-correlation-request-id" : "12e84c6f-aa59-45f8-8374-3d8c4f2ec244", + "x-ms-arm-service-request-id" : "d82e26ba-9b58-4ce6-813b-4e82659f1b17", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051359Z:12e84c6f-aa59-45f8-8374-3d8c4f2ec244", + "Expires" : "-1", + "Content-Length" : "1355", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/3a34c604-0a93-4ad9-b911-0cdb425199de?api-version=2020-05-01", + "x-ms-request-id" : "3a34c604-0a93-4ad9-b911-0cdb425199de", + "Body" : "{\r\n \"name\": \"vnet2497705074\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074\",\r\n \"etag\": \"W/\\\"23c91d84-1099-4415-9f1e-2475842450ae\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"c5d82322-7d67-4350-8b47-bbb66505e384\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074/subnets/subnet1\",\r\n \"etag\": \"W/\\\"23c91d84-1099-4415-9f1e-2475842450ae\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "f067a675-a462-4d07-86b9-c0e6e68f6f65", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip1757754b?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1da654e9-7c4c-4b65-a7a9-de6af2ced083", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:39 GMT", - "content-length" : "1359", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", - "retry-after" : "0", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:13:59 GMT", + "x-ms-correlation-request-id" : "b6a9f298-c16b-47dc-91e1-8ad8eaccf246", + "x-ms-arm-service-request-id" : "0492c704-ccdd-4c3c-bd60-3d8e833ee883", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051400Z:b6a9f298-c16b-47dc-91e1-8ad8eaccf246", + "Expires" : "-1", + "Content-Length" : "759", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/2c7eb710-0a6b-4d66-8b13-8363b2d96671?api-version=2020-05-01", + "x-ms-request-id" : "2c7eb710-0a6b-4d66-8b13-8363b2d96671", + "Body" : "{\r\n \"name\": \"pip1757754b\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip1757754b\",\r\n \"etag\": \"W/\\\"64a239aa-dc49-44f3-9124-da61cc89660d\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"1be7480f-f629-49ea-93bb-66a6f097ab9f\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm98492dccf-0\",\r\n \"fqdn\": \"vm98492dccf-0.eastus2.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "1da654e9-7c4c-4b65-a7a9-de6af2ced083", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip67108470?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fda23a1e-7fba-4a3e-9460-ddf38dfd7a76", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:13:59 GMT", + "x-ms-correlation-request-id" : "4dc6b0e9-ea42-45b8-ae41-7a62bfd4983b", + "x-ms-arm-service-request-id" : "75f40166-95cf-438e-87f1-26b240c6a31e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051400Z:4dc6b0e9-ea42-45b8-ae41-7a62bfd4983b", + "Expires" : "-1", + "Content-Length" : "759", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/8851cb9b-7fbb-4cfd-b2a7-1a4e2ce2b73f?api-version=2020-05-01", + "x-ms-request-id" : "8851cb9b-7fbb-4cfd-b2a7-1a4e2ce2b73f", + "Body" : "{\r\n \"name\": \"pip67108470\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip67108470\",\r\n \"etag\": \"W/\\\"62040635-05e4-465b-819b-83b8dd83daeb\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"f0d8d406-7b83-4045-b81f-2b1044a393a4\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm98492dccf-1\",\r\n \"fqdn\": \"vm98492dccf-1.eastus2.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "fda23a1e-7fba-4a3e-9460-ddf38dfd7a76", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip90102aed?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9abffdd-5cd9-4d83-95c8-b0e5e47ff8e7", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:00 GMT", + "x-ms-correlation-request-id" : "f2e236c8-ddc1-4c40-8535-5340154bae8f", + "x-ms-arm-service-request-id" : "eb204a9d-366d-4654-99f4-e679c4eadd65", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051400Z:f2e236c8-ddc1-4c40-8535-5340154bae8f", + "Expires" : "-1", + "Content-Length" : "771", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/b44c0a00-48d7-45a6-af0b-a61b077b9843?api-version=2020-05-01", + "x-ms-request-id" : "b44c0a00-48d7-45a6-af0b-a61b077b9843", + "Body" : "{\r\n \"name\": \"pip90102aed\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip90102aed\",\r\n \"etag\": \"W/\\\"f51d37a5-e90c-4ba1-a5a7-9ea7b6cf3750\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"e2782fe7-bbd1-4f27-a15c-493e1698b6e6\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm91232ff3d-1\",\r\n \"fqdn\": \"vm91232ff3d-1.southeastasia.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "a9abffdd-5cd9-4d83-95c8-b0e5e47ff8e7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip01956e98?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d6797bc-ae9c-4e31-beda-11a40d6fbc44", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:00 GMT", + "x-ms-correlation-request-id" : "0dabc5ea-4c86-45f3-ac21-66eb408f3568", + "x-ms-arm-service-request-id" : "a572f102-3666-40bc-80fd-37c7301cc42d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051401Z:0dabc5ea-4c86-45f3-ac21-66eb408f3568", + "Expires" : "-1", + "Content-Length" : "771", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/cfdbcb5f-91bc-4e1b-bd0c-418e4511f577?api-version=2020-05-01", + "x-ms-request-id" : "cfdbcb5f-91bc-4e1b-bd0c-418e4511f577", + "Body" : "{\r\n \"name\": \"pip01956e98\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip01956e98\",\r\n \"etag\": \"W/\\\"ad29362b-bbd0-4b44-953b-b4b4be1a1e04\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"26c1a9e9-b671-43c2-9ddd-87fb3f8413c1\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm91232ff3d-0\",\r\n \"fqdn\": \"vm91232ff3d-0.southeastasia.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "2d6797bc-ae9c-4e31-beda-11a40d6fbc44", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ed51e86-2d37-4b5e-9548-fb8846bf73af", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "6f51b85b-fe81-44bf-9161-a32b6a560d13", - "x-ms-arm-service-request-id" : "6f5f9516-ea3b-4b32-a899-bda1df6a0410", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091239Z:6f51b85b-fe81-44bf-9161-a32b6a560d13", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "54b8821e-12fc-4a6e-9361-95e70bb1461a", - "Body" : "{\r\n \"name\": \"vnet47107aa0d6\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet47107aa0d6\",\r\n \"etag\": \"W/\\\"d6602673-cfdc-428a-9cbb-ae53842fa7a5\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"531d3f77-e9bf-4d08-83f3-5a7cee2d28b3\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet47107aa0d6/subnets/subnet1\",\r\n \"etag\": \"W/\\\"d6602673-cfdc-428a-9cbb-ae53842fa7a5\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/54b8821e-12fc-4a6e-9361-95e70bb1461a?api-version=2019-11-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/54b8821e-12fc-4a6e-9361-95e70bb1461a?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:39 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:00 GMT", + "x-ms-correlation-request-id" : "01d9e7c8-4091-40be-984c-fcc47210d1f4", + "x-ms-arm-service-request-id" : "ac9d48ba-66f6-4346-84ab-9825ddaad3b7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051401Z:01d9e7c8-4091-40be-984c-fcc47210d1f4", + "Expires" : "-1", + "Content-Length" : "1355", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/ccb435ba-80b4-4284-a2ec-59a227441d21?api-version=2020-05-01", + "x-ms-request-id" : "ccb435ba-80b4-4284-a2ec-59a227441d21", + "Body" : "{\r\n \"name\": \"vnet3925821a73\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73\",\r\n \"etag\": \"W/\\\"3b249e0e-bec1-4504-822d-2d1bc7f8c226\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"3b1b07b3-23ca-4064-af0a-37c5892507df\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73/subnets/subnet1\",\r\n \"etag\": \"W/\\\"3b249e0e-bec1-4504-822d-2d1bc7f8c226\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "3ed51e86-2d37-4b5e-9548-fb8846bf73af", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c23a8dd9-8ee7-4711-8a96-d86d15cc5ba5", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:01 GMT", + "x-ms-correlation-request-id" : "d748f6bd-a514-4904-8694-d59f8560775d", + "x-ms-arm-service-request-id" : "8ee0d563-0c36-46ac-b5f9-f4c0bc52fb04", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051401Z:d748f6bd-a514-4904-8694-d59f8560775d", + "Expires" : "-1", + "Content-Length" : "1349", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/8717c9f0-eeff-448b-bb51-24513572104b?api-version=2020-05-01", + "x-ms-request-id" : "8717c9f0-eeff-448b-bb51-24513572104b", + "Body" : "{\r\n \"name\": \"vnet1724365103\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103\",\r\n \"etag\": \"W/\\\"0bf4795e-e587-42b9-a37d-602a5c769d65\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"622a14ce-d4f3-4018-b8a1-9720bb3c97f6\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103/subnets/subnet1\",\r\n \"etag\": \"W/\\\"0bf4795e-e587-42b9-a37d-602a5c769d65\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "c23a8dd9-8ee7-4711-8a96-d86d15cc5ba5", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/2c7eb710-0a6b-4d66-8b13-8363b2d96671?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "69bb9886-06af-45aa-8fdc-bdba9728733e" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "afc4eb9a-dc69-44fe-885c-4b301f7ea2e0", - "x-ms-arm-service-request-id" : "f94dc5b9-7b05-413c-904a-a34a498d8a13", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091239Z:afc4eb9a-dc69-44fe-885c-4b301f7ea2e0", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "ab0d68fa-babf-4b09-93db-18ecc7ed5939", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet47107aa0d6?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:39 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "1361", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:00 GMT", + "x-ms-correlation-request-id" : "b85d7940-884d-4737-9a1f-ec5aa920b294", + "x-ms-arm-service-request-id" : "41d8bf16-9857-4d57-bad9-6416ab2ff5ff", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051401Z:b85d7940-884d-4737-9a1f-ec5aa920b294", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "4a67b1b9-46a1-40b2-b0e8-768a462e26cb", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "69bb9886-06af-45aa-8fdc-bdba9728733e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/b44c0a00-48d7-45a6-af0b-a61b077b9843?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc489cd7-2ec3-436e-8f88-c739352e7bba" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d43beaa5-3743-4597-bc39-4952cac72408", - "x-ms-arm-service-request-id" : "b7dd8369-4387-41c9-ba53-e150248de73f", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091240Z:d43beaa5-3743-4597-bc39-4952cac72408", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"ae8c10bc-72e6-48aa-b433-98f953caeb63\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "a4113c73-4dc9-4f37-bc2d-497b81ffb5f6", - "Body" : "{\r\n \"name\": \"vnet47107aa0d6\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet47107aa0d6\",\r\n \"etag\": \"W/\\\"ae8c10bc-72e6-48aa-b433-98f953caeb63\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"531d3f77-e9bf-4d08-83f3-5a7cee2d28b3\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet47107aa0d6/subnets/subnet1\",\r\n \"etag\": \"W/\\\"ae8c10bc-72e6-48aa-b433-98f953caeb63\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:14:01 GMT", + "x-ms-correlation-request-id" : "ae2d1050-b553-4039-a23b-0d73ff623e61", + "x-ms-arm-service-request-id" : "ea04a95d-a685-4b93-9cc4-989958b54237", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051401Z:ae2d1050-b553-4039-a23b-0d73ff623e61", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "ae5d9a24-06f6-4c4e-b0e7-c951b3a14316", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "dc489cd7-2ec3-436e-8f88-c739352e7bba", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip27977947?api-version=2019-11-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip1757754b?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "790e888a-2aa0-40f2-9ea7-61d66495a7a7" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:01 GMT", + "x-ms-correlation-request-id" : "c1e8b365-85c6-41f1-a5c7-f5f06ae14183", + "x-ms-arm-service-request-id" : "7c94cc78-bc5c-4780-9e22-a3428d5b33d9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"0dd24e5e-c678-4a63-b2e5-1b593c456e6c\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051401Z:c1e8b365-85c6-41f1-a5c7-f5f06ae14183", + "Expires" : "-1", + "Content-Length" : "760", + "x-ms-request-id" : "1352cd5a-6eb0-4813-953a-062f4df46d94", + "Body" : "{\r\n \"name\": \"pip1757754b\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip1757754b\",\r\n \"etag\": \"W/\\\"0dd24e5e-c678-4a63-b2e5-1b593c456e6c\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"1be7480f-f629-49ea-93bb-66a6f097ab9f\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm98492dccf-0\",\r\n \"fqdn\": \"vm98492dccf-0.eastus2.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "790e888a-2aa0-40f2-9ea7-61d66495a7a7", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip90102aed?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae5633e4-4ca6-45e2-aaa8-b5fb312ab06a" + }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:43 GMT", - "content-length" : "775", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4cd94002-f280-4e13-9690-389e1a0b4911", - "x-ms-arm-service-request-id" : "32a32976-0979-4e5b-8bff-8025a41892c5", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091243Z:4cd94002-f280-4e13-9690-389e1a0b4911", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "abeb37a0-9f2f-4332-836f-ab2e93046b10", - "Body" : "{\r\n \"name\": \"pip27977947\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip27977947\",\r\n \"etag\": \"W/\\\"c705358e-16a3-437d-bced-472d6a607f2b\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"43c3b8ff-7e9a-4866-b595-f771e169da8e\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm869086102d-0\",\r\n \"fqdn\": \"vm869086102d-0.southeastasia.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/abeb37a0-9f2f-4332-836f-ab2e93046b10?api-version=2019-11-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/abeb37a0-9f2f-4332-836f-ab2e93046b10?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:43 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "30", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:01 GMT", + "x-ms-correlation-request-id" : "0bee5f4f-9113-4245-b7d5-07fba6eabe6b", + "x-ms-arm-service-request-id" : "26c99e67-0c11-4266-aa60-270a7f64c98a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"22feb517-42b5-461a-a333-77fee4109219\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051401Z:0bee5f4f-9113-4245-b7d5-07fba6eabe6b", + "Expires" : "-1", + "Content-Length" : "772", + "x-ms-request-id" : "095bb88b-83fa-4b1b-ac4c-ed8a2026f56c", + "Body" : "{\r\n \"name\": \"pip90102aed\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip90102aed\",\r\n \"etag\": \"W/\\\"22feb517-42b5-461a-a333-77fee4109219\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"e2782fe7-bbd1-4f27-a15c-493e1698b6e6\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm91232ff3d-1\",\r\n \"fqdn\": \"vm91232ff3d-1.southeastasia.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "ae5633e4-4ca6-45e2-aaa8-b5fb312ab06a", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/cfdbcb5f-91bc-4e1b-bd0c-418e4511f577?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1716bd93-89e2-4845-976e-34299b3269e5" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "1f7e78b4-474d-4abd-b25d-771f3ee749a9", - "x-ms-arm-service-request-id" : "4f5e63e0-d617-4863-8c98-f58f6a4a9806", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091244Z:1f7e78b4-474d-4abd-b25d-771f3ee749a9", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "f584e4dc-ee82-49f5-ae12-7a850c0bb235", - "Body" : "{\r\n \"status\": \"InProgress\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/abeb37a0-9f2f-4332-836f-ab2e93046b10?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:45 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:01 GMT", + "x-ms-correlation-request-id" : "4bed4b27-3325-4ec6-af07-2fe9850ad042", + "x-ms-arm-service-request-id" : "9f090c2f-3502-4086-867e-69397de7bf92", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051402Z:4bed4b27-3325-4ec6-af07-2fe9850ad042", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "474d23d4-fbf3-48e0-8676-4c9a12caea99", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "1716bd93-89e2-4845-976e-34299b3269e5", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip01956e98?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f75d3cd8-bc27-4ba8-be6f-bac67f75c0e7" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "dd7423b5-d7fa-40ba-9db5-bd97ae4f53d3", - "x-ms-arm-service-request-id" : "12c7243b-1d4e-4c55-b5e5-70cbead33d1d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091246Z:dd7423b5-d7fa-40ba-9db5-bd97ae4f53d3", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "b188bb7a-abc3-4f27-bc0f-663648669e0b", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip27977947?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:46 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "776", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:02 GMT", + "x-ms-correlation-request-id" : "2396980f-6fea-4403-87f9-262a138a698c", + "x-ms-arm-service-request-id" : "6c926fb6-9f75-4264-9141-db1552e6463f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"203a8402-1e5f-47af-bdfd-352372f7d3bf\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051402Z:2396980f-6fea-4403-87f9-262a138a698c", + "Expires" : "-1", + "Content-Length" : "772", + "x-ms-request-id" : "735ab42d-5aeb-41e1-8488-a2a31ff708dd", + "Body" : "{\r\n \"name\": \"pip01956e98\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip01956e98\",\r\n \"etag\": \"W/\\\"203a8402-1e5f-47af-bdfd-352372f7d3bf\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"26c1a9e9-b671-43c2-9ddd-87fb3f8413c1\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm91232ff3d-0\",\r\n \"fqdn\": \"vm91232ff3d-0.southeastasia.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "f75d3cd8-bc27-4ba8-be6f-bac67f75c0e7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/8851cb9b-7fbb-4cfd-b2a7-1a4e2ce2b73f?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "415f3494-691e-4d7e-a4de-16cd1ed7d6b6" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "407dd7b6-728b-4c09-a2b4-e7f6641088a8", - "x-ms-arm-service-request-id" : "57f3a994-d5d2-498f-9dd0-d045d941c9c5", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091246Z:407dd7b6-728b-4c09-a2b4-e7f6641088a8", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"dd438f84-2b6b-4244-a337-662617aafd6a\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "f692363b-31d9-4152-b91e-6d8e55f39f11", - "Body" : "{\r\n \"name\": \"pip27977947\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip27977947\",\r\n \"etag\": \"W/\\\"dd438f84-2b6b-4244-a337-662617aafd6a\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"43c3b8ff-7e9a-4866-b595-f771e169da8e\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm869086102d-0\",\r\n \"fqdn\": \"vm869086102d-0.southeastasia.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:14:01 GMT", + "x-ms-correlation-request-id" : "4ddb0443-2d45-4100-9da7-306241a538b0", + "x-ms-arm-service-request-id" : "9d9d48cc-afc6-4c23-9c90-38ec6f5b8699", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051402Z:4ddb0443-2d45-4100-9da7-306241a538b0", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "8e507a61-86ce-467f-a638-a08b521350c0", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "415f3494-691e-4d7e-a4de-16cd1ed7d6b6", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic96935d4545a?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "14db7c97-c634-4a4f-8e44-220775509dec", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:49 GMT", - "content-length" : "1869", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1196", - "retry-after" : "0", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "bef621a8-8422-440a-acd3-2154ff2ad3be", - "x-ms-arm-service-request-id" : "4d74494a-6043-4ad6-96d1-152ebeeab9a2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091249Z:bef621a8-8422-440a-acd3-2154ff2ad3be", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "aae9bfbc-144b-45d4-a557-10cf39a531b0", - "Body" : "{\r\n \"name\": \"nic96935d4545a\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic96935d4545a\",\r\n \"etag\": \"W/\\\"ccd56d7a-fec8-4e1b-a23e-4e8b7d833746\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"6096f1b7-2597-4cea-8ae3-bcd5ffe06fe3\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic96935d4545a/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"ccd56d7a-fec8-4e1b-a23e-4e8b7d833746\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip27977947\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet47107aa0d6/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"o25r0u353eee1a5tlj4o2ljiwd.ix.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/aae9bfbc-144b-45d4-a557-10cf39a531b0?api-version=2019-11-01" - } + "Date" : "Tue, 01 Sep 2020 05:14:02 GMT", + "x-ms-correlation-request-id" : "6b56a697-6b8d-4ca9-9d07-84b82a68225f", + "x-ms-arm-service-request-id" : "1791e510-9323-4092-8485-19de1d2de5ab", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051402Z:6b56a697-6b8d-4ca9-9d07-84b82a68225f", + "Expires" : "-1", + "Content-Length" : "1349", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/5adba9b7-972f-4b01-89b7-f4572db0a913?api-version=2020-05-01", + "x-ms-request-id" : "5adba9b7-972f-4b01-89b7-f4572db0a913", + "Body" : "{\r\n \"name\": \"vnet599069ddb5\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5\",\r\n \"etag\": \"W/\\\"93c55505-e3ad-46ce-a9eb-e302190e7ee5\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"7d22385e-e360-4fd0-871e-31193d7e66b1\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5/subnets/subnet1\",\r\n \"etag\": \"W/\\\"93c55505-e3ad-46ce-a9eb-e302190e7ee5\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "14db7c97-c634-4a4f-8e44-220775509dec", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-0?api-version=2019-03-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/3a34c604-0a93-4ad9-b911-0cdb425199de?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "18933073-565d-4aac-87ce-b255f05d712d" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:52 GMT", - "azure-asyncnotification" : "Enabled", - "content-length" : "2090", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3589bc6b-e270-42e3-80f4-8f08a5165329", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1199", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091253Z:3589bc6b-e270-42e3-80f4-8f08a5165329", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "46e4b376-d917-4427-b8f3-f3c202145c51", - "Body" : "{\r\n \"name\": \"vm869086102d-0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-0\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"d4293704-4aba-4bc7-b3c5-7300522c566a\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm869086102d-0\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic96935d4545a\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/46e4b376-d917-4427-b8f3-f3c202145c51?api-version=2019-03-01" - } + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:02 GMT", + "x-ms-correlation-request-id" : "ef698abb-0fb9-466f-9484-f07102f434a1", + "x-ms-arm-service-request-id" : "7d5e6532-15a0-4972-94ae-d5d17cbf711d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051403Z:ef698abb-0fb9-466f-9484-f07102f434a1", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "d76ef7cf-a367-4f2e-9d34-95cbdab037ce", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "18933073-565d-4aac-87ce-b255f05d712d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/46e4b376-d917-4427-b8f3-f3c202145c51?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c590346-603a-4369-984c-9976d6f1d03c" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:12:53 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "73cbfb48-a4ca-4d20-8a22-8523b0d761d7", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29996", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091253Z:73cbfb48-a4ca-4d20-8a22-8523b0d761d7", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "0ed1487e-93f3-4564-a4b7-c0076dbb56f5", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:12:52.1306181+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"46e4b376-d917-4427-b8f3-f3c202145c51\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/46e4b376-d917-4427-b8f3-f3c202145c51?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:13:23 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:02 GMT", + "x-ms-correlation-request-id" : "ed883825-beed-4710-a698-c5dcffa8e34c", + "x-ms-arm-service-request-id" : "eb074878-1947-40b9-83bd-82fdd40d3feb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"6d4a216f-9a85-4ee8-a41d-a5898eaa6269\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051403Z:ed883825-beed-4710-a698-c5dcffa8e34c", + "Expires" : "-1", + "Content-Length" : "1357", + "x-ms-request-id" : "d4078421-e89d-4f56-889f-42a2f7b36d59", + "Body" : "{\r\n \"name\": \"vnet2497705074\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074\",\r\n \"etag\": \"W/\\\"6d4a216f-9a85-4ee8-a41d-a5898eaa6269\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"c5d82322-7d67-4350-8b47-bbb66505e384\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074/subnets/subnet1\",\r\n \"etag\": \"W/\\\"6d4a216f-9a85-4ee8-a41d-a5898eaa6269\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "4c590346-603a-4369-984c-9976d6f1d03c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip67108470?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d1f80b7e-d7aa-44a2-b13e-3da262bee95a" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "101dd998-14b1-4205-bb57-34167a57acfc", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29995", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091323Z:101dd998-14b1-4205-bb57-34167a57acfc", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "61a29f03-9677-4bf7-8e69-69b471f592c5", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:12:52.1306181+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"46e4b376-d917-4427-b8f3-f3c202145c51\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/46e4b376-d917-4427-b8f3-f3c202145c51?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:13:53 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:02 GMT", + "x-ms-correlation-request-id" : "78af121b-01db-4c84-82aa-53d99b30e30d", + "x-ms-arm-service-request-id" : "cffb8ab6-eadf-44ab-9a9f-f1330dc2aa5c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"bee0bf14-0116-4680-a7e5-1ebe0ceb7fa3\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051403Z:78af121b-01db-4c84-82aa-53d99b30e30d", + "Expires" : "-1", + "Content-Length" : "760", + "x-ms-request-id" : "feb85594-e7eb-43b3-8292-38cb3e06a6a5", + "Body" : "{\r\n \"name\": \"pip67108470\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip67108470\",\r\n \"etag\": \"W/\\\"bee0bf14-0116-4680-a7e5-1ebe0ceb7fa3\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"f0d8d406-7b83-4045-b81f-2b1044a393a4\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm98492dccf-1\",\r\n \"fqdn\": \"vm98492dccf-1.eastus2.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "d1f80b7e-d7aa-44a2-b13e-3da262bee95a", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/ccb435ba-80b4-4284-a2ec-59a227441d21?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "049dfa40-575a-4b2d-bb53-9ac51d30f735" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:03 GMT", + "x-ms-correlation-request-id" : "0d63ecab-1d62-4a94-8ea8-c8fcc263d0e0", + "x-ms-arm-service-request-id" : "592d3cc4-8955-482e-b6d1-89dd1da3251e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051404Z:0d63ecab-1d62-4a94-8ea8-c8fcc263d0e0", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "11b5bb92-0c94-4764-8faa-5037a0da7654", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "049dfa40-575a-4b2d-bb53-9ac51d30f735", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f7bceed-bd97-463e-9413-76271847a8f8" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:03 GMT", + "x-ms-correlation-request-id" : "24ef02a7-3dd0-4983-9e5c-fa0fd54fc3b1", + "x-ms-arm-service-request-id" : "07fcb7a6-8237-4863-b85d-9f77ebe841ae", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"d417052e-ff05-439a-8edc-592829155891\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051404Z:24ef02a7-3dd0-4983-9e5c-fa0fd54fc3b1", + "Expires" : "-1", + "Content-Length" : "1357", + "x-ms-request-id" : "6902cc5b-39f7-4a55-a3a9-a6f78ca7cdbc", + "Body" : "{\r\n \"name\": \"vnet3925821a73\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73\",\r\n \"etag\": \"W/\\\"d417052e-ff05-439a-8edc-592829155891\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"3b1b07b3-23ca-4064-af0a-37c5892507df\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73/subnets/subnet1\",\r\n \"etag\": \"W/\\\"d417052e-ff05-439a-8edc-592829155891\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "2f7bceed-bd97-463e-9413-76271847a8f8", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/8717c9f0-eeff-448b-bb51-24513572104b?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e26c4694-dcd8-4704-a683-e070c204ab99" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:04 GMT", + "x-ms-correlation-request-id" : "86844054-058a-4a4d-9bf8-efc7902ae973", + "x-ms-arm-service-request-id" : "91668c95-3c09-424f-8a00-57f2d91e0d9f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051404Z:86844054-058a-4a4d-9bf8-efc7902ae973", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "f868650d-1992-492b-a088-a9bb80df87e7", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "e26c4694-dcd8-4704-a683-e070c204ab99", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3c30039-0ca4-4012-8784-020100ef6fd2" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "51957842-561f-45b4-acd4-0657ec3afd75", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29994", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091354Z:51957842-561f-45b4-acd4-0657ec3afd75", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "59d33eeb-8a66-47ca-84fc-833855afe6b1", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:12:52.1306181+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"46e4b376-d917-4427-b8f3-f3c202145c51\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/46e4b376-d917-4427-b8f3-f3c202145c51?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:14:24 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:04 GMT", + "x-ms-correlation-request-id" : "26271f7e-f712-40cb-b43d-f3a7b902b79a", + "x-ms-arm-service-request-id" : "e99e10f7-305c-43b0-841e-fc4022783f23", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"f4e174da-9275-439d-b494-b766996fe7d8\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051405Z:26271f7e-f712-40cb-b43d-f3a7b902b79a", + "Expires" : "-1", + "Content-Length" : "1351", + "x-ms-request-id" : "877d5947-cf78-40f0-9463-7542f40d4acf", + "Body" : "{\r\n \"name\": \"vnet1724365103\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103\",\r\n \"etag\": \"W/\\\"f4e174da-9275-439d-b494-b766996fe7d8\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"622a14ce-d4f3-4018-b8a1-9720bb3c97f6\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103/subnets/subnet1\",\r\n \"etag\": \"W/\\\"f4e174da-9275-439d-b494-b766996fe7d8\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "a3c30039-0ca4-4012-8784-020100ef6fd2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/5adba9b7-972f-4b01-89b7-f4572db0a913?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8bfa4809-158e-421f-b520-84e20c6aec1b" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5f2b429d-43d0-4a83-9073-77b1a0242566", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29993", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091424Z:5f2b429d-43d0-4a83-9073-77b1a0242566", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "16948952-d286-4b9e-823f-8005556f7b2f", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:12:52.1306181+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"46e4b376-d917-4427-b8f3-f3c202145c51\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/46e4b376-d917-4427-b8f3-f3c202145c51?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:14:54 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "184", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:05 GMT", + "x-ms-correlation-request-id" : "d8de5473-537c-4175-b4ba-a9188336e7e2", + "x-ms-arm-service-request-id" : "1f8f014f-307d-4e27-ae2c-25dacbf22068", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051406Z:d8de5473-537c-4175-b4ba-a9188336e7e2", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "5fd0cc94-4a32-4f19-a308-babea5c7369a", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "8bfa4809-158e-421f-b520-84e20c6aec1b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "38cdfe65-5ca2-4711-9339-48212b779413" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "26369ad9-0e39-42b6-aae5-9a4b6ca2e4f4", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29991", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091454Z:26369ad9-0e39-42b6-aae5-9a4b6ca2e4f4", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "3683cda8-39e9-4751-afcf-4474707d3f74", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:12:52.1306181+00:00\",\r\n \"endTime\": \"2020-02-04T09:14:44.8800162+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"46e4b376-d917-4427-b8f3-f3c202145c51\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-0?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:14:54 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2366", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:05 GMT", + "x-ms-correlation-request-id" : "1f95c0c4-1cb4-4af2-92ff-0d5dac60ba1c", + "x-ms-arm-service-request-id" : "bd8a2a41-d5b5-47dc-8ba6-cbd08af1c400", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"00ab432a-4f8d-4de6-a3a0-373c04765e04\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051406Z:1f95c0c4-1cb4-4af2-92ff-0d5dac60ba1c", + "Expires" : "-1", + "Content-Length" : "1351", + "x-ms-request-id" : "89b06384-8742-4b3b-a503-3b2c4f42424c", + "Body" : "{\r\n \"name\": \"vnet599069ddb5\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5\",\r\n \"etag\": \"W/\\\"00ab432a-4f8d-4de6-a3a0-373c04765e04\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"7d22385e-e360-4fd0-871e-31193d7e66b1\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5/subnets/subnet1\",\r\n \"etag\": \"W/\\\"00ab432a-4f8d-4de6-a3a0-373c04765e04\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "38cdfe65-5ca2-4711-9339-48212b779413", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fade07ac-6362-4d8c-ae75-10c7e6334790", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11988", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f5a4b8d6-a10d-4b46-a4e6-67d9d9cf6c57", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/LowCostGet3Min;3998,Microsoft.Compute/LowCostGet30Min;31997", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091454Z:f5a4b8d6-a10d-4b46-a4e6-67d9d9cf6c57", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "b18d77be-65aa-4588-865d-bd963d0e34ff", - "Body" : "{\r\n \"name\": \"vm869086102d-0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-0\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"d4293704-4aba-4bc7-b3c5-7300522c566a\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm869086102d-0_OsDisk_1_c53aa91eb6bc458eafc5d30c54f3820f\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGCOPD0EB7813168C32/providers/Microsoft.Compute/disks/vm869086102d-0_OsDisk_1_c53aa91eb6bc458eafc5d30c54f3820f\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm869086102d-0\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic96935d4545a\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - } + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:06 GMT", + "x-ms-correlation-request-id" : "6ea520a6-d0a1-47b8-be8f-82b68709be0d", + "x-ms-arm-service-request-id" : "455957e6-83a5-47a8-9488-e0ef4ba881ff", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051407Z:6ea520a6-d0a1-47b8-be8f-82b68709be0d", + "Expires" : "-1", + "Content-Length" : "1889", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/27d69066-395a-4e8a-bfbf-64a166f58608?api-version=2020-05-01", + "x-ms-request-id" : "27d69066-395a-4e8a-bfbf-64a166f58608", + "Body" : "{\r\n \"name\": \"nic261800897dd\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd\",\r\n \"etag\": \"W/\\\"021e505a-9ae7-498d-bda0-814c46565253\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"112e015c-11c3-45cb-8ed6-3debeaa52810\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"021e505a-9ae7-498d-bda0-814c46565253\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip90102aed\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"eir3rrlhpviehc0hxo1gkbpdqe.ix.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "fade07ac-6362-4d8c-ae75-10c7e6334790", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip535321af?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "974eec53-3445-4a74-8f0f-a34e18084357", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "Pragma" : "no-cache", + "retry-after" : "0", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:06 GMT", + "x-ms-correlation-request-id" : "c22ee6a2-a851-4c73-beca-08a9849fe0a5", + "x-ms-arm-service-request-id" : "a67110fe-e77d-4a6b-9be7-6041421170da", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051407Z:c22ee6a2-a851-4c73-beca-08a9849fe0a5", + "Expires" : "-1", + "Content-Length" : "1889", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/9046efa7-4d8f-4c36-b070-a90539d7618a?api-version=2020-05-01", + "x-ms-request-id" : "9046efa7-4d8f-4c36-b070-a90539d7618a", + "Body" : "{\r\n \"name\": \"nic686692629ee\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee\",\r\n \"etag\": \"W/\\\"fd1e3f71-8142-409f-85b1-be4084cfe004\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"c34d4d8d-bbd4-40ca-97c6-aeaddba9319d\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"fd1e3f71-8142-409f-85b1-be4084cfe004\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip01956e98\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"wmdrwo4kenseblykg5cysjih1h.ix.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "974eec53-3445-4a74-8f0f-a34e18084357", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "19dd7873-49ab-496e-a7e7-11fd59dd1c67", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:00 GMT", - "content-length" : "775", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", "retry-after" : "0", + "Azure-AsyncNotification" : "Enabled", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2c9edd0f-c60a-4ad3-985b-5859000e9ed9", - "x-ms-arm-service-request-id" : "6f22a821-6c52-463f-addf-62c57750a8a9", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091500Z:2c9edd0f-c60a-4ad3-985b-5859000e9ed9", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "1a336974-9015-40d5-8254-990656053a7f", - "Body" : "{\r\n \"name\": \"pip535321af\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip535321af\",\r\n \"etag\": \"W/\\\"bc4112ce-ba93-43b4-b37c-c7a1506e99b2\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"5bdfc33e-7e27-47b1-9bf8-e143838b5d7e\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm869086102d-1\",\r\n \"fqdn\": \"vm869086102d-1.southeastasia.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/1a336974-9015-40d5-8254-990656053a7f?api-version=2019-11-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/1a336974-9015-40d5-8254-990656053a7f?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:00 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "30", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:07 GMT", + "x-ms-correlation-request-id" : "d5766998-b196-4039-935a-883a931d61d5", + "x-ms-arm-service-request-id" : "6b6663ad-6f54-46ea-b52f-e013bea0aa54", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051408Z:d5766998-b196-4039-935a-883a931d61d5", + "Expires" : "-1", + "Content-Length" : "1883", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6d2323f1-c4fe-42cd-8c4e-f770aa015995?api-version=2020-05-01", + "x-ms-request-id" : "6d2323f1-c4fe-42cd-8c4e-f770aa015995", + "Body" : "{\r\n \"name\": \"nic90473d31e06\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06\",\r\n \"etag\": \"W/\\\"b06ed369-0377-4d11-b0d3-bc49bb0a3a69\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"0277489b-763e-4e76-9321-661e86c96cc0\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"b06ed369-0377-4d11-b0d3-bc49bb0a3a69\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip67108470\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"zykcuyxt0qmebofbs2qlwpex4g.cx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "19dd7873-49ab-496e-a7e7-11fd59dd1c67", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0726742-23ff-4232-9a5c-4e7bda3fb56e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11987", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c9721937-cdda-48b6-ba37-a1286318769f", - "x-ms-arm-service-request-id" : "5a1f324e-0090-4406-b503-1ba7a3449b30", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091501Z:c9721937-cdda-48b6-ba37-a1286318769f", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "c4889082-c7fb-4bfc-843c-08f741f1e879", - "Body" : "{\r\n \"status\": \"InProgress\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/1a336974-9015-40d5-8254-990656053a7f?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:02 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:11 GMT", + "x-ms-correlation-request-id" : "9a027c50-c3ec-420d-a71c-0f8c10cb0fd6", + "x-ms-arm-service-request-id" : "acf67573-c516-405f-a4a8-c7fe06dc5bbb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051411Z:9a027c50-c3ec-420d-a71c-0f8c10cb0fd6", + "Expires" : "-1", + "Content-Length" : "1883", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/30d26d98-24d2-4130-bf79-e6568b6e052d?api-version=2020-05-01", + "x-ms-request-id" : "30d26d98-24d2-4130-bf79-e6568b6e052d", + "Body" : "{\r\n \"name\": \"nic1896387a6bb\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb\",\r\n \"etag\": \"W/\\\"e69f7f50-87cc-4d78-bd17-1d4129aff78f\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"51d92643-1d63-415b-81fc-619dd993c723\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"e69f7f50-87cc-4d78-bd17-1d4129aff78f\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip1757754b\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"ly2ce5la2pie5by4gemt05tgwb.cx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "c0726742-23ff-4232-9a5c-4e7bda3fb56e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/27d69066-395a-4e8a-bfbf-64a166f58608?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd33889a-f493-450e-ac84-843b8ecd28c5" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "dd4cdec8-64f0-40e4-8f41-9c7d5bfd7e06", - "x-ms-arm-service-request-id" : "8e998425-bdf7-4670-9b26-409931fa60b8", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091503Z:dd4cdec8-64f0-40e4-8f41-9c7d5bfd7e06", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "2532d09c-01bf-4e6d-bcfd-ea4f98fdf3cb", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip535321af?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:03 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "776", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:37 GMT", + "x-ms-correlation-request-id" : "0cf7bf92-c182-429e-b6f5-c7a94c1ab89b", + "x-ms-arm-service-request-id" : "f7a3ddc3-734e-4343-822f-283ca6be410d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051437Z:0cf7bf92-c182-429e-b6f5-c7a94c1ab89b", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "b0c70542-20e3-4233-9756-d015a914d119", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "fd33889a-f493-450e-ac84-843b8ecd28c5", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c71fb14b-2db1-46d9-9882-4929b88c12b4" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "66b9da14-9933-4955-93fa-ebc912bcefbf", - "x-ms-arm-service-request-id" : "1dedcaed-7f22-4981-825d-cbef60cf0642", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091503Z:66b9da14-9933-4955-93fa-ebc912bcefbf", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"e8710826-da97-473a-9189-bb8906541748\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "5c1c01c5-df6d-4490-9036-8da280ad5aed", - "Body" : "{\r\n \"name\": \"pip535321af\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip535321af\",\r\n \"etag\": \"W/\\\"e8710826-da97-473a-9189-bb8906541748\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"5bdfc33e-7e27-47b1-9bf8-e143838b5d7e\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vm869086102d-1\",\r\n \"fqdn\": \"vm869086102d-1.southeastasia.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:14:36 GMT", + "x-ms-correlation-request-id" : "491324c0-ab49-433d-adae-b1efa5b749e8", + "x-ms-arm-service-request-id" : "b2c109f6-e187-4de9-a880-dd1dd45908e6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"021e505a-9ae7-498d-bda0-814c46565253\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051437Z:491324c0-ab49-433d-adae-b1efa5b749e8", + "Expires" : "-1", + "Content-Length" : "1889", + "x-ms-request-id" : "8e5379fc-742b-4621-bea9-4412752ccb08", + "Body" : "{\r\n \"name\": \"nic261800897dd\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd\",\r\n \"etag\": \"W/\\\"021e505a-9ae7-498d-bda0-814c46565253\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"112e015c-11c3-45cb-8ed6-3debeaa52810\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"021e505a-9ae7-498d-bda0-814c46565253\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip90102aed\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"eir3rrlhpviehc0hxo1gkbpdqe.ix.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "c71fb14b-2db1-46d9-9882-4929b88c12b4", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet32647bf713?api-version=2019-11-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/9046efa7-4d8f-4c36-b070-a90539d7618a?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "720b1f17-fd8a-44c5-a1a7-08250f4daa70" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:37 GMT", + "x-ms-correlation-request-id" : "f7262de5-f41b-4691-8238-2646dd81939f", + "x-ms-arm-service-request-id" : "614995b0-c4c6-4d70-8efa-7d2045110640", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051437Z:f7262de5-f41b-4691-8238-2646dd81939f", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "171f888e-105c-40d5-804b-8efd7eaf53ec", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "720b1f17-fd8a-44c5-a1a7-08250f4daa70", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6bb6b4e-5a87-4101-b7f4-a76d455c661d" + }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:06 GMT", - "content-length" : "1353", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fa5e5c67-f181-4760-9ebf-79f644f048b4", - "x-ms-arm-service-request-id" : "fa4f529c-c042-4a0c-9936-2cf1f59cb2aa", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091507Z:fa5e5c67-f181-4760-9ebf-79f644f048b4", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "6ee02c38-a7e9-4613-8bc7-56633bf0bb8c", - "Body" : "{\r\n \"name\": \"vnet32647bf713\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet32647bf713\",\r\n \"etag\": \"W/\\\"ab65243f-ff6b-440b-930f-a1c2071c710d\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"7cc4d9e9-6f7c-45fa-af1a-230d9111d132\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet32647bf713/subnets/subnet1\",\r\n \"etag\": \"W/\\\"ab65243f-ff6b-440b-930f-a1c2071c710d\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ee02c38-a7e9-4613-8bc7-56633bf0bb8c?api-version=2019-11-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ee02c38-a7e9-4613-8bc7-56633bf0bb8c?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:07 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "30", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:37 GMT", + "x-ms-correlation-request-id" : "ae93f061-444c-4f40-aa5f-3ad2062275f1", + "x-ms-arm-service-request-id" : "c4b594f1-050b-4773-b431-543265f62d18", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"fd1e3f71-8142-409f-85b1-be4084cfe004\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051437Z:ae93f061-444c-4f40-aa5f-3ad2062275f1", + "Expires" : "-1", + "Content-Length" : "1889", + "x-ms-request-id" : "08709d66-8b9c-490e-8ab7-82c5758a5e38", + "Body" : "{\r\n \"name\": \"nic686692629ee\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee\",\r\n \"etag\": \"W/\\\"fd1e3f71-8142-409f-85b1-be4084cfe004\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"c34d4d8d-bbd4-40ca-97c6-aeaddba9319d\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"fd1e3f71-8142-409f-85b1-be4084cfe004\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip01956e98\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"wmdrwo4kenseblykg5cysjih1h.ix.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "b6bb6b4e-5a87-4101-b7f4-a76d455c661d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6d2323f1-c4fe-42cd-8c4e-f770aa015995?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "db26db39-cc6f-4a7b-ae69-e5fe970b1ec5" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "24b9138e-7f8b-41be-be70-4b203a44c61a", - "x-ms-arm-service-request-id" : "f5589d9d-6b95-4b0c-a47d-c8ec1b34711b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091508Z:24b9138e-7f8b-41be-be70-4b203a44c61a", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "733d0729-e45f-4e0e-a935-e4137f85a2a6", - "Body" : "{\r\n \"status\": \"InProgress\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ee02c38-a7e9-4613-8bc7-56633bf0bb8c?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:18 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "30", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:39 GMT", + "x-ms-correlation-request-id" : "b0887757-2378-4f35-9f9d-7a71ab75d7b4", + "x-ms-arm-service-request-id" : "e8c6588e-700d-4329-8b3c-c5b8c3721ba1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051439Z:b0887757-2378-4f35-9f9d-7a71ab75d7b4", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "807d3146-320b-4d9a-a3ca-3658f387bcc1", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "db26db39-cc6f-4a7b-ae69-e5fe970b1ec5", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d01bafe-dcfb-41bb-8daa-a8dc22d203c2" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a988e733-4c5f-4171-a712-ddf71de79e9d", - "x-ms-arm-service-request-id" : "e467b49b-ab27-4adc-bc66-b502be103ab9", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091518Z:a988e733-4c5f-4171-a712-ddf71de79e9d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "0e32ca57-4cbf-4a97-b488-7c3186a614ac", - "Body" : "{\r\n \"status\": \"InProgress\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ee02c38-a7e9-4613-8bc7-56633bf0bb8c?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:28 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "30", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:39 GMT", + "x-ms-correlation-request-id" : "a47e9baf-4c86-4b35-8277-f74ac3bc6ab3", + "x-ms-arm-service-request-id" : "3ce80705-2276-4eeb-9808-c84abf920944", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"b06ed369-0377-4d11-b0d3-bc49bb0a3a69\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051439Z:a47e9baf-4c86-4b35-8277-f74ac3bc6ab3", + "Expires" : "-1", + "Content-Length" : "1883", + "x-ms-request-id" : "f89aaf2a-91cf-4c05-b439-f266b879a7f7", + "Body" : "{\r\n \"name\": \"nic90473d31e06\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06\",\r\n \"etag\": \"W/\\\"b06ed369-0377-4d11-b0d3-bc49bb0a3a69\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"0277489b-763e-4e76-9321-661e86c96cc0\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"b06ed369-0377-4d11-b0d3-bc49bb0a3a69\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip67108470\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"zykcuyxt0qmebofbs2qlwpex4g.cx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "2d01bafe-dcfb-41bb-8daa-a8dc22d203c2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-0?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.compute/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "88afaffd-cf0c-4ab6-9454-fb32573aed91", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:40 GMT", + "x-ms-correlation-request-id" : "deed4bdb-1d11-4c27-8ee1-12f7c73ee601", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/PutVM3Min;238,Microsoft.Compute/PutVM30Min;1198", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051441Z:deed4bdb-1d11-4c27-8ee1-12f7c73ee601", + "Expires" : "-1", + "Content-Length" : "2127", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/33addac1-5bc6-4307-a5e8-6cf9c202c3dd?api-version=2019-12-01", + "x-ms-request-id" : "33addac1-5bc6-4307-a5e8-6cf9c202c3dd", + "Body" : "{\r\n \"name\": \"vm91232ff3d-0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-0\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"a6290d20-5ab8-44eb-b775-bdebd6693846\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"16.04.202008070\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm91232ff3d-0\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", + "x-ms-client-request-id" : "88afaffd-cf0c-4ab6-9454-fb32573aed91", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/30d26d98-24d2-4130-bf79-e6568b6e052d?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4297b648-0cb3-4bd1-be88-7ed89c7e56cc" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "894fc1da-4dd4-4f5f-8905-4b8647de965c", - "x-ms-arm-service-request-id" : "e9ddf1c3-a6b4-4a19-aef9-256e24e796ef", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091529Z:894fc1da-4dd4-4f5f-8905-4b8647de965c", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "08ebbf35-2f65-402f-a96e-0aef44c922e1", - "Body" : "{\r\n \"status\": \"InProgress\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ee02c38-a7e9-4613-8bc7-56633bf0bb8c?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:39 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "30", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:40 GMT", + "x-ms-correlation-request-id" : "e05c597e-7bd3-45ed-a5b7-6c71fbdeb3bd", + "x-ms-arm-service-request-id" : "36873b59-7bfe-473a-87ae-60afcd487349", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051441Z:e05c597e-7bd3-45ed-a5b7-6c71fbdeb3bd", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "741ffd5f-f34d-4da1-a396-b44fde8f50cb", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "4297b648-0cb3-4bd1-be88-7ed89c7e56cc", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-1?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.compute/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9fbf2d2c-3cba-4e4a-92ba-91d287b6d41b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:40 GMT", + "x-ms-correlation-request-id" : "d3a3cd2a-4310-4124-b405-dedd0a06bde2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1199", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051441Z:d3a3cd2a-4310-4124-b405-dedd0a06bde2", + "Expires" : "-1", + "Content-Length" : "2127", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/ce2f1cbe-c75c-4aed-8472-d1a541dfd767?api-version=2019-12-01", + "x-ms-request-id" : "ce2f1cbe-c75c-4aed-8472-d1a541dfd767", + "Body" : "{\r\n \"name\": \"vm91232ff3d-1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-1\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"f6540795-c37b-4164-8c6a-359cb51803a9\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"16.04.202008070\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm91232ff3d-1\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", + "x-ms-client-request-id" : "9fbf2d2c-3cba-4e4a-92ba-91d287b6d41b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb?api-version=2020-05-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8889d47d-9897-4b58-98e9-218f7c88de26" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "426d53eb-2952-44d9-b708-835ef1a8a64a", - "x-ms-arm-service-request-id" : "3aa630c0-799f-4a51-8231-2c83cc157378", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091539Z:426d53eb-2952-44d9-b708-835ef1a8a64a", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "65d04f00-f25c-4412-9d47-48dec8bd58e5", - "Body" : "{\r\n \"status\": \"InProgress\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ee02c38-a7e9-4613-8bc7-56633bf0bb8c?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:49 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:14:41 GMT", + "x-ms-correlation-request-id" : "2f65e322-0f52-4339-ba33-d7fd7eab11ac", + "x-ms-arm-service-request-id" : "f007ed55-a926-49a0-8ab1-bbfc654f869c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"e69f7f50-87cc-4d78-bd17-1d4129aff78f\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051442Z:2f65e322-0f52-4339-ba33-d7fd7eab11ac", + "Expires" : "-1", + "Content-Length" : "1883", + "x-ms-request-id" : "51bf6ea5-ea03-4d00-a85d-854016b91176", + "Body" : "{\r\n \"name\": \"nic1896387a6bb\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb\",\r\n \"etag\": \"W/\\\"e69f7f50-87cc-4d78-bd17-1d4129aff78f\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"51d92643-1d63-415b-81fc-619dd993c723\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"e69f7f50-87cc-4d78-bd17-1d4129aff78f\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip1757754b\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"ly2ce5la2pie5by4gemt05tgwb.cx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "8889d47d-9897-4b58-98e9-218f7c88de26", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-1?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.compute/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "eaeb82ae-6e7f-4555-8a47-75524c583cc2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:44 GMT", + "x-ms-correlation-request-id" : "f58391d5-edb9-498e-b368-ce1255f305e8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1199", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051444Z:f58391d5-edb9-498e-b368-ce1255f305e8", + "Expires" : "-1", + "Content-Length" : "2121", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/b9d0c047-5914-4402-a424-96bcc5e3d342?api-version=2019-12-01", + "x-ms-request-id" : "b9d0c047-5914-4402-a424-96bcc5e3d342", + "Body" : "{\r\n \"name\": \"vm98492dccf-1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-1\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"c46244bb-fa5c-4558-85db-cb782df7dc04\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"16.04.202008070\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm98492dccf-1\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", + "x-ms-client-request-id" : "eaeb82ae-6e7f-4555-8a47-75524c583cc2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-0?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.compute/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5fb1401-40b0-4692-af75-56462bd16da3", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:14:49 GMT", + "x-ms-correlation-request-id" : "bf9153e3-987e-468c-910d-0477b83dd1fe", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/PutVM3Min;238,Microsoft.Compute/PutVM30Min;1198", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051449Z:bf9153e3-987e-468c-910d-0477b83dd1fe", + "Expires" : "-1", + "Content-Length" : "2121", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/b1e9373f-0105-465b-a028-709df11db4de?api-version=2019-12-01", + "x-ms-request-id" : "b1e9373f-0105-465b-a028-709df11db4de", + "Body" : "{\r\n \"name\": \"vm98492dccf-0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-0\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"d2fe13c4-7b5e-4c17-9802-b6712273a98c\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"16.04.202008070\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm98492dccf-0\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", + "x-ms-client-request-id" : "e5fb1401-40b0-4692-af75-56462bd16da3", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/ce2f1cbe-c75c-4aed-8472-d1a541dfd767?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce811363-db5b-4acf-a32d-ca6790ca46e5" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:51 GMT", + "x-ms-correlation-request-id" : "da696aef-b71c-42ea-8476-5e3d88928181", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29999", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051452Z:da696aef-b71c-42ea-8476-5e3d88928181", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "c4978d36-f8cc-433a-ae86-a0d9406b7516", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:40.0473466+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"ce2f1cbe-c75c-4aed-8472-d1a541dfd767\"\r\n}", + "x-ms-client-request-id" : "ce811363-db5b-4acf-a32d-ca6790ca46e5", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/33addac1-5bc6-4307-a5e8-6cf9c202c3dd?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d85518ea-a610-4843-9b16-6d5560eaff3b" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:51 GMT", + "x-ms-correlation-request-id" : "4ccb1945-95d5-4059-bfdd-b56ca8818843", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29998", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051452Z:4ccb1945-95d5-4059-bfdd-b56ca8818843", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "7ee7c611-c60c-47bf-b433-1cf96828386e", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:40.2973335+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"33addac1-5bc6-4307-a5e8-6cf9c202c3dd\"\r\n}", + "x-ms-client-request-id" : "d85518ea-a610-4843-9b16-6d5560eaff3b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/b9d0c047-5914-4402-a424-96bcc5e3d342?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fadfa68e-8fc1-47c5-9f58-81d4e04447ce" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:54 GMT", + "x-ms-correlation-request-id" : "908f65e6-df89-41b0-9604-7b852a304c2c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29999", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051454Z:908f65e6-df89-41b0-9604-7b852a304c2c", + "Expires" : "-1", + "Content-Length" : "133", + "x-ms-request-id" : "3707af30-4a48-43b0-8bd3-7103ecf29597", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:42.955209+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"b9d0c047-5914-4402-a424-96bcc5e3d342\"\r\n}", + "x-ms-client-request-id" : "fadfa68e-8fc1-47c5-9f58-81d4e04447ce", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/b1e9373f-0105-465b-a028-709df11db4de?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "80ab9ac9-3cb5-4a58-8ee8-bc36825f9f0b" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:14:59 GMT", + "x-ms-correlation-request-id" : "7dd6d44d-63e9-499e-b707-7e375713cc57", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29998", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051459Z:7dd6d44d-63e9-499e-b707-7e375713cc57", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "34bc5366-2c71-4581-a85a-7d3095fb978b", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:46.4865894+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"b1e9373f-0105-465b-a028-709df11db4de\"\r\n}", + "x-ms-client-request-id" : "80ab9ac9-3cb5-4a58-8ee8-bc36825f9f0b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/ce2f1cbe-c75c-4aed-8472-d1a541dfd767?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a87b4d4-5dbc-447b-8c47-2e4c683002bf" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9b0390af-e512-46f1-8132-f05a3d4bd920", - "x-ms-arm-service-request-id" : "6fd3032f-b898-48a7-859b-c3403e58b625", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091549Z:9b0390af-e512-46f1-8132-f05a3d4bd920", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "657182ef-b1a1-42e2-8828-c94d9c494ced", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet32647bf713?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:49 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "1355", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:15:26 GMT", + "x-ms-correlation-request-id" : "53eb4426-89c8-4f92-8f31-3b61b2140bd1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29997", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051527Z:53eb4426-89c8-4f92-8f31-3b61b2140bd1", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "fd7170d7-faf9-488e-a463-82faf4d89daa", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:40.0473466+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"ce2f1cbe-c75c-4aed-8472-d1a541dfd767\"\r\n}", + "x-ms-client-request-id" : "7a87b4d4-5dbc-447b-8c47-2e4c683002bf", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/33addac1-5bc6-4307-a5e8-6cf9c202c3dd?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "277d401e-f46e-461b-a9fb-d348d5e95492" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c8ba0bdc-8686-488d-b681-44cc2efe6345", - "x-ms-arm-service-request-id" : "9231161a-e22f-4ea9-ba2a-2bee5554714a", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091550Z:c8ba0bdc-8686-488d-b681-44cc2efe6345", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"201e97b2-fdec-48be-8dd1-312eff781ec2\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "5a2a839f-6d6e-4684-ad24-05212fc47958", - "Body" : "{\r\n \"name\": \"vnet32647bf713\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet32647bf713\",\r\n \"etag\": \"W/\\\"201e97b2-fdec-48be-8dd1-312eff781ec2\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"7cc4d9e9-6f7c-45fa-af1a-230d9111d132\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet32647bf713/subnets/subnet1\",\r\n \"etag\": \"W/\\\"201e97b2-fdec-48be-8dd1-312eff781ec2\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:15:26 GMT", + "x-ms-correlation-request-id" : "3ded260c-2fe9-4136-bc57-f515af9101f9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29996", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051527Z:3ded260c-2fe9-4136-bc57-f515af9101f9", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "89eb21b2-bcba-42d5-b839-c3d38208db3c", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:40.2973335+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"33addac1-5bc6-4307-a5e8-6cf9c202c3dd\"\r\n}", + "x-ms-client-request-id" : "277d401e-f46e-461b-a9fb-d348d5e95492", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip61896564?api-version=2019-11-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/b9d0c047-5914-4402-a424-96bcc5e3d342?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "46fb522b-52cc-444d-9c65-b061e21a6112" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:15:29 GMT", + "x-ms-correlation-request-id" : "027b149b-530d-4f2b-8778-55b74a221c4d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29997", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051530Z:027b149b-530d-4f2b-8778-55b74a221c4d", + "Expires" : "-1", + "Content-Length" : "133", + "x-ms-request-id" : "bd515c88-fdc2-4f55-895e-b9af0ec07065", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:42.955209+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"b9d0c047-5914-4402-a424-96bcc5e3d342\"\r\n}", + "x-ms-client-request-id" : "46fb522b-52cc-444d-9c65-b061e21a6112", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/b1e9373f-0105-465b-a028-709df11db4de?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "11d54c5b-c095-4e9f-a328-d15adf83cb98" + }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:53 GMT", - "content-length" : "763", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c43e1066-27a6-4e06-9a51-bfa7e09d2e5c", - "x-ms-arm-service-request-id" : "dafb87e6-fc99-48a2-b004-56390e2da35f", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091554Z:c43e1066-27a6-4e06-9a51-bfa7e09d2e5c", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "132875ce-41e5-4db2-8b53-a1fecad0c9b8", - "Body" : "{\r\n \"name\": \"pip61896564\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip61896564\",\r\n \"etag\": \"W/\\\"5fdd58d4-cc16-47d2-bf91-d19c979850d3\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"50f99f2e-fd82-4f6d-a297-b74ed62ac1b9\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vmf883699159-1\",\r\n \"fqdn\": \"vmf883699159-1.eastus2.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/132875ce-41e5-4db2-8b53-a1fecad0c9b8?api-version=2019-11-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/132875ce-41e5-4db2-8b53-a1fecad0c9b8?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:53 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:15:34 GMT", + "x-ms-correlation-request-id" : "922f4315-2543-455a-962f-37a117e02835", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29996", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051535Z:922f4315-2543-455a-962f-37a117e02835", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "e4f20f43-65f0-4b0e-ae67-255891388d9e", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:46.4865894+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"b1e9373f-0105-465b-a028-709df11db4de\"\r\n}", + "x-ms-client-request-id" : "11d54c5b-c095-4e9f-a328-d15adf83cb98", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/ce2f1cbe-c75c-4aed-8472-d1a541dfd767?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2188784-d7a6-4412-ad13-25c081866758" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b4ced022-abac-4cff-8c0e-b6fa162eb378", - "x-ms-arm-service-request-id" : "263329cb-9404-4a27-a945-b172bad09666", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091554Z:b4ced022-abac-4cff-8c0e-b6fa162eb378", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "e1f4ad03-29e1-4c11-8cdd-977a21c76ce1", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip61896564?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:54 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "764", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Date" : "Tue, 01 Sep 2020 05:15:57 GMT", + "x-ms-correlation-request-id" : "5a7773b4-f52d-485c-bb3f-01bf4f092b3b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29994", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051557Z:5a7773b4-f52d-485c-bb3f-01bf4f092b3b", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "7a2529bc-2f28-4adb-b4d5-1d91edee1e51", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:40.0473466+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"ce2f1cbe-c75c-4aed-8472-d1a541dfd767\"\r\n}", + "x-ms-client-request-id" : "f2188784-d7a6-4412-ad13-25c081866758", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/33addac1-5bc6-4307-a5e8-6cf9c202c3dd?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "539e9e6b-6216-4029-a412-fc4d64ccbaeb" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "dbfe806d-5443-431d-81a1-2a7fcce857d9", - "x-ms-arm-service-request-id" : "027ff0e7-0608-4c77-9b7b-b19144b36989", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091554Z:dbfe806d-5443-431d-81a1-2a7fcce857d9", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"43a5a6cc-c4f6-41f5-aae3-a2270922ff64\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "8d2da9e3-0f49-426c-a581-28970f3ed6a2", - "Body" : "{\r\n \"name\": \"pip61896564\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip61896564\",\r\n \"etag\": \"W/\\\"43a5a6cc-c4f6-41f5-aae3-a2270922ff64\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"50f99f2e-fd82-4f6d-a297-b74ed62ac1b9\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vmf883699159-1\",\r\n \"fqdn\": \"vmf883699159-1.eastus2.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:15:56 GMT", + "x-ms-correlation-request-id" : "3cda7169-5007-45ca-bead-9a9a012ca9e2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29993", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051557Z:3cda7169-5007-45ca-bead-9a9a012ca9e2", + "Expires" : "-1", + "Content-Length" : "184", + "x-ms-request-id" : "98298860-f8e9-4195-9ee3-7f3794d0cdea", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:40.2973335+00:00\",\r\n \"endTime\": \"2020-09-01T05:15:50.8606177+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"33addac1-5bc6-4307-a5e8-6cf9c202c3dd\"\r\n}", + "x-ms-client-request-id" : "539e9e6b-6216-4029-a412-fc4d64ccbaeb", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic80559d910c2?api-version=2019-11-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-0?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "08006819-7efe-496b-a265-d2c3b1d7e7f8" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:15:57 GMT", - "content-length" : "1863", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "585d7ed0-f65e-4f31-9bf3-b742324aae0f", - "x-ms-arm-service-request-id" : "9f37add5-a22a-47b4-b418-c43cdd483718", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091557Z:585d7ed0-f65e-4f31-9bf3-b742324aae0f", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "3e11e87f-6774-44df-a9d7-77b043129105", - "Body" : "{\r\n \"name\": \"nic80559d910c2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic80559d910c2\",\r\n \"etag\": \"W/\\\"f8f77e07-f366-448c-8be1-40e6048d4240\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"85aa84ad-b599-4d11-aa9a-53ce173064b5\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic80559d910c2/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"f8f77e07-f366-448c-8be1-40e6048d4240\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip61896564\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet32647bf713/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"3hm2i5d2n53elly0emgzceorgc.cx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3e11e87f-6774-44df-a9d7-77b043129105?api-version=2019-11-01" - } + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:15:56 GMT", + "x-ms-correlation-request-id" : "b533d2a9-484a-4fa6-8afd-e3df31a26dcf", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/LowCostGet3Min;3998,Microsoft.Compute/LowCostGet30Min;31993", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051557Z:b533d2a9-484a-4fa6-8afd-e3df31a26dcf", + "Expires" : "-1", + "Content-Length" : "2399", + "x-ms-request-id" : "391290de-438e-420a-94bd-514d2713b4fd", + "Body" : "{\r\n \"name\": \"vm91232ff3d-0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-0\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"a6290d20-5ab8-44eb-b775-bdebd6693846\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"16.04.202008070\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm91232ff3d-0_OsDisk_1_249d8ffb6f1c419f83a887528e53797d\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGCOPD29340739181/providers/Microsoft.Compute/disks/vm91232ff3d-0_OsDisk_1_249d8ffb6f1c419f83a887528e53797d\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm91232ff3d-0\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "x-ms-client-request-id" : "08006819-7efe-496b-a265-d2c3b1d7e7f8", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-1?api-version=2019-03-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/b9d0c047-5914-4402-a424-96bcc5e3d342?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4bc9f166-b907-4236-8185-14b0369a0ed2" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:16:01 GMT", - "azure-asyncnotification" : "Enabled", - "content-length" : "2084", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "91874cea-d8af-4bf4-b832-e4be7169d29d", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1199", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091601Z:91874cea-d8af-4bf4-b832-e4be7169d29d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "9d0a821f-3154-48a0-8a40-2d0c6a00d6f7", - "Body" : "{\r\n \"name\": \"vmf883699159-1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-1\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"e9611dd4-9a00-451d-88f2-3ce2a0a50197\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vmf883699159-1\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic80559d910c2\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/9d0a821f-3154-48a0-8a40-2d0c6a00d6f7?api-version=2019-03-01" - } + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:16:00 GMT", + "x-ms-correlation-request-id" : "a76fe9e6-35ee-45b2-8966-4ce7648a16c7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29993", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051600Z:a76fe9e6-35ee-45b2-8966-4ce7648a16c7", + "Expires" : "-1", + "Content-Length" : "183", + "x-ms-request-id" : "8d018f25-055b-453c-805f-e3337bd4317b", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:42.955209+00:00\",\r\n \"endTime\": \"2020-09-01T05:15:54.5047575+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"b9d0c047-5914-4402-a424-96bcc5e3d342\"\r\n}", + "x-ms-client-request-id" : "4bc9f166-b907-4236-8185-14b0369a0ed2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/9d0a821f-3154-48a0-8a40-2d0c6a00d6f7?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-1?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1c7661d-12ee-41f3-810c-72594d9e886b" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:16:01 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "64a38bc4-ff9e-4e8d-b13c-7c0891182cc2", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29999", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091602Z:64a38bc4-ff9e-4e8d-b13c-7c0891182cc2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "69e1a899-2ad3-4666-a03e-e80970f18750", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:16:00.4554518+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9d0a821f-3154-48a0-8a40-2d0c6a00d6f7\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:16:00 GMT", + "x-ms-correlation-request-id" : "fc10913b-f8d9-4bfc-bcc3-af94b80c1524", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/LowCostGet3Min;3996,Microsoft.Compute/LowCostGet30Min;31996", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051600Z:fc10913b-f8d9-4bfc-bcc3-af94b80c1524", + "Expires" : "-1", + "Content-Length" : "2393", + "x-ms-request-id" : "7f5177f9-5c26-479b-aa7f-3225b0487c07", + "Body" : "{\r\n \"name\": \"vm98492dccf-1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-1\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"c46244bb-fa5c-4558-85db-cb782df7dc04\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"16.04.202008070\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm98492dccf-1_OsDisk_1_2b4a82ecd98442e7bb7566e8cdacdb42\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGCOPD29340739181/providers/Microsoft.Compute/disks/vm98492dccf-1_OsDisk_1_2b4a82ecd98442e7bb7566e8cdacdb42\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm98492dccf-1\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "x-ms-client-request-id" : "b1c7661d-12ee-41f3-810c-72594d9e886b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/9d0a821f-3154-48a0-8a40-2d0c6a00d6f7?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/b1e9373f-0105-465b-a028-709df11db4de?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6aa211a8-da9c-45c0-8c68-fa79eb81144d" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:16:32 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11975", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b5021c27-0387-47ab-9e75-c6a18bdcda06", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29998", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091632Z:b5021c27-0387-47ab-9e75-c6a18bdcda06", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "2053887b-6b5e-4597-8077-611e5e95f742", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:16:00.4554518+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9d0a821f-3154-48a0-8a40-2d0c6a00d6f7\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:16:04 GMT", + "x-ms-correlation-request-id" : "6b29b968-c8c7-43c8-b833-a7729239097f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29992", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051605Z:6b29b968-c8c7-43c8-b833-a7729239097f", + "Expires" : "-1", + "Content-Length" : "184", + "x-ms-request-id" : "83f1275f-6174-4bc4-89fd-2751d512654b", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:46.4865894+00:00\",\r\n \"endTime\": \"2020-09-01T05:15:39.3948047+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"b1e9373f-0105-465b-a028-709df11db4de\"\r\n}", + "x-ms-client-request-id" : "6aa211a8-da9c-45c0-8c68-fa79eb81144d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/9d0a821f-3154-48a0-8a40-2d0c6a00d6f7?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-0?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c80ed9a9-5d8c-46f9-9627-326b58e18df6" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:17:02 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4bc86bb3-e58d-457c-91ae-a1383a11b701", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29997", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091702Z:4bc86bb3-e58d-457c-91ae-a1383a11b701", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "1adfeaff-2458-457f-a519-70eac6bab5d6", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:16:00.4554518+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9d0a821f-3154-48a0-8a40-2d0c6a00d6f7\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:16:05 GMT", + "x-ms-correlation-request-id" : "6b5d8b78-6006-448b-ad51-d7d841f574f5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/LowCostGet3Min;3994,Microsoft.Compute/LowCostGet30Min;31994", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051605Z:6b5d8b78-6006-448b-ad51-d7d841f574f5", + "Expires" : "-1", + "Content-Length" : "2393", + "x-ms-request-id" : "dff7580e-798a-4e19-80ae-cd15089a2349", + "Body" : "{\r\n \"name\": \"vm98492dccf-0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-0\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"d2fe13c4-7b5e-4c17-9802-b6712273a98c\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"16.04.202008070\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm98492dccf-0_OsDisk_1_2691cb82e8284840af89d3c9fc19f497\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGCOPD29340739181/providers/Microsoft.Compute/disks/vm98492dccf-0_OsDisk_1_2691cb82e8284840af89d3c9fc19f497\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm98492dccf-0\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "x-ms-client-request-id" : "c80ed9a9-5d8c-46f9-9627-326b58e18df6", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/9d0a821f-3154-48a0-8a40-2d0c6a00d6f7?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/ce2f1cbe-c75c-4aed-8472-d1a541dfd767?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8a538c3-61d0-45c1-ab8d-ce657e8ee1af" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:17:33 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11973", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "603904db-b5c9-430e-a108-5e719e94f51f", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29996", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091733Z:603904db-b5c9-430e-a108-5e719e94f51f", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "b32e81fc-edf3-4324-b820-c887bd7d5c21", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:16:00.4554518+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9d0a821f-3154-48a0-8a40-2d0c6a00d6f7\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:16:26 GMT", + "x-ms-correlation-request-id" : "7a964f14-0942-45c8-a0d5-98383628ea24", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14991,Microsoft.Compute/GetOperation30Min;29991", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051627Z:7a964f14-0942-45c8-a0d5-98383628ea24", + "Expires" : "-1", + "Content-Length" : "184", + "x-ms-request-id" : "65a017a2-c2b6-4972-89b8-db530a0d26ee", + "Body" : "{\r\n \"startTime\": \"2020-09-01T05:14:40.0473466+00:00\",\r\n \"endTime\": \"2020-09-01T05:15:57.9231948+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"ce2f1cbe-c75c-4aed-8472-d1a541dfd767\"\r\n}", + "x-ms-client-request-id" : "f8a538c3-61d0-45c1-ab8d-ce657e8ee1af", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/9d0a821f-3154-48a0-8a40-2d0c6a00d6f7?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-1?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4bfe569-0ced-4b6a-8c8d-587a0aeba309" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:03 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "184", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11972", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d32f0e28-7728-48ba-99c2-36c107413af9", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29994", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091804Z:d32f0e28-7728-48ba-99c2-36c107413af9", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "3ef1cc5f-7a3f-438a-ba48-ce169234e9f1", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:16:00.4554518+00:00\",\r\n \"endTime\": \"2020-02-04T09:17:54.0059916+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"9d0a821f-3154-48a0-8a40-2d0c6a00d6f7\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:16:27 GMT", + "x-ms-correlation-request-id" : "c809c686-0d03-4402-8f86-dc5dfe4c1074", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/LowCostGet3Min;3994,Microsoft.Compute/LowCostGet30Min;31989", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051627Z:c809c686-0d03-4402-8f86-dc5dfe4c1074", + "Expires" : "-1", + "Content-Length" : "2399", + "x-ms-request-id" : "ae5614e5-2e78-490b-b1a5-8ffa654b1421", + "Body" : "{\r\n \"name\": \"vm91232ff3d-1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-1\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"f6540795-c37b-4164-8c6a-359cb51803a9\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"16.04.202008070\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm91232ff3d-1_OsDisk_1_7aacccd693834301a0944b3fb58834f8\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGCOPD29340739181/providers/Microsoft.Compute/disks/vm91232ff3d-1_OsDisk_1_7aacccd693834301a0944b3fb58834f8\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm91232ff3d-1\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "x-ms-client-request-id" : "c4bfe569-0ced-4b6a-8c8d-587a0aeba309", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-1?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "35201417-610e-4daa-aabe-2c2e02c6b716", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:03 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2360", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11971", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2e14f58c-d2f3-44ab-aab1-7857abc01e0f", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/LowCostGet3Min;3998,Microsoft.Compute/LowCostGet30Min;31998", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091804Z:2e14f58c-d2f3-44ab-aab1-7857abc01e0f", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "9cdfd8ec-93db-4787-b701-af1431f84d30", - "Body" : "{\r\n \"name\": \"vmf883699159-1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-1\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"e9611dd4-9a00-451d-88f2-3ce2a0a50197\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vmf883699159-1_OsDisk_1_797da5b9953c437786c3bd6efd0abc39\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGCOPD0EB7813168C32/providers/Microsoft.Compute/disks/vmf883699159-1_OsDisk_1_797da5b9953c437786c3bd6efd0abc39\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vmf883699159-1\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic80559d910c2\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:16:26 GMT", + "x-ms-correlation-request-id" : "3be8804d-e1eb-4dba-891c-6291af0e4a05", + "x-ms-arm-service-request-id" : "b54076e6-2807-48fd-a47d-4aba69ee6ba3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"a2b91ca1-3644-4a33-bff3-308e4878a9bf\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051627Z:3be8804d-e1eb-4dba-891c-6291af0e4a05", + "Expires" : "-1", + "Content-Length" : "2142", + "x-ms-request-id" : "c9c88636-33a3-4d23-9662-fc23fcdf1b35", + "Body" : "{\r\n \"name\": \"nic261800897dd\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd\",\r\n \"etag\": \"W/\\\"a2b91ca1-3644-4a33-bff3-308e4878a9bf\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"112e015c-11c3-45cb-8ed6-3debeaa52810\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic261800897dd/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"a2b91ca1-3644-4a33-bff3-308e4878a9bf\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip90102aed\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet2497705074/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"eir3rrlhpviehc0hxo1gkbpdqe.ix.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": \"00-22-48-56-CA-59\",\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-1\"\r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "35201417-610e-4daa-aabe-2c2e02c6b716", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip821670ee?api-version=2019-11-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "236124b4-7e36-4851-9a6f-f83ba2663f4a", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:09 GMT", - "content-length" : "763", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1189", - "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "09fac177-06b8-40ea-9c58-50d32b745d84", - "x-ms-arm-service-request-id" : "0e17c818-c210-4c57-bade-cceb094e7702", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091810Z:09fac177-06b8-40ea-9c58-50d32b745d84", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "5a208396-8df7-4a0d-9c5a-c331fa3ec399", - "Body" : "{\r\n \"name\": \"pip821670ee\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip821670ee\",\r\n \"etag\": \"W/\\\"4c675b56-9c38-49a8-9832-2c21a5a83fb5\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"d9d2f971-277d-4f9f-a028-afd55f6ab93d\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vmf883699159-0\",\r\n \"fqdn\": \"vmf883699159-0.eastus2.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/5a208396-8df7-4a0d-9c5a-c331fa3ec399?api-version=2019-11-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/5a208396-8df7-4a0d-9c5a-c331fa3ec399?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:10 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11970", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "25bf05ff-b2c4-42a0-9a9f-e3d26bd23c9b", - "x-ms-arm-service-request-id" : "87aa9035-5e53-400a-9bb5-c1047d345436", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091811Z:25bf05ff-b2c4-42a0-9a9f-e3d26bd23c9b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "88a02899-2217-4c37-8cae-dc731d833865", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip821670ee?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:11 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "764", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11969", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "24395e3a-067e-4a94-b204-748df7b8c411", - "x-ms-arm-service-request-id" : "9cf8863e-3e82-4665-b3c0-b32bde0d8d56", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091812Z:24395e3a-067e-4a94-b204-748df7b8c411", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"c3c3021c-cce9-47be-9aa1-657c17945ab6\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "050f66fc-2d8b-4121-addd-70d6299b23a0", - "Body" : "{\r\n \"name\": \"pip821670ee\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip821670ee\",\r\n \"etag\": \"W/\\\"c3c3021c-cce9-47be-9aa1-657c17945ab6\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"d9d2f971-277d-4f9f-a028-afd55f6ab93d\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"vmf883699159-0\",\r\n \"fqdn\": \"vmf883699159-0.eastus2.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:16:27 GMT", + "x-ms-correlation-request-id" : "a6b6ff51-a806-4e46-a54e-c33d55e2a57f", + "x-ms-arm-service-request-id" : "85cf906d-44d8-4b91-a1b8-682bb5ef1fcc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"56be0e4a-dfd4-4cd3-add7-a70416818629\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051628Z:a6b6ff51-a806-4e46-a54e-c33d55e2a57f", + "Expires" : "-1", + "Content-Length" : "2136", + "x-ms-request-id" : "0fbddcfa-0fb7-4998-b6c2-2993b0bdc58a", + "Body" : "{\r\n \"name\": \"nic90473d31e06\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06\",\r\n \"etag\": \"W/\\\"56be0e4a-dfd4-4cd3-add7-a70416818629\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"0277489b-763e-4e76-9321-661e86c96cc0\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic90473d31e06/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"56be0e4a-dfd4-4cd3-add7-a70416818629\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip67108470\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet1724365103/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"zykcuyxt0qmebofbs2qlwpex4g.cx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": \"00-0D-3A-02-C2-EA\",\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-1\"\r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "236124b4-7e36-4851-9a6f-f83ba2663f4a", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet10365ca777?api-version=2019-11-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "10d5863f-3957-4766-90d4-793e4e72de10", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:14 GMT", - "content-length" : "1353", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1188", - "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e4d0cb30-5732-40b2-be83-9cc072bbacb3", - "x-ms-arm-service-request-id" : "2a77ecee-36fb-40d6-9cfc-9e3a5bec752f", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091814Z:e4d0cb30-5732-40b2-be83-9cc072bbacb3", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "4cb1e0ee-412b-4861-ba09-c95618c0e491", - "Body" : "{\r\n \"name\": \"vnet10365ca777\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet10365ca777\",\r\n \"etag\": \"W/\\\"40009b86-06c2-437d-8395-0bda877d7982\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"20d39017-3fb9-48c0-825d-067a069a99bb\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet10365ca777/subnets/subnet1\",\r\n \"etag\": \"W/\\\"40009b86-06c2-437d-8395-0bda877d7982\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/4cb1e0ee-412b-4861-ba09-c95618c0e491?api-version=2019-11-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/4cb1e0ee-412b-4861-ba09-c95618c0e491?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:14 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "30", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11968", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "af5a5c63-6d31-40e2-8bfb-7fc27c22e7c6", - "x-ms-arm-service-request-id" : "f9e389a4-923a-4d6d-b9c2-95b7c24b28dd", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091815Z:af5a5c63-6d31-40e2-8bfb-7fc27c22e7c6", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eba8c53d-e7e5-45e3-8c4a-2e644bf7eef2", - "Body" : "{\r\n \"status\": \"InProgress\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/4cb1e0ee-412b-4861-ba09-c95618c0e491?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:24 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11967", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9072b00a-5acf-4d53-b306-8c768f1a11e0", - "x-ms-arm-service-request-id" : "628cda30-02a5-4913-b723-09c05b721fa5", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091825Z:9072b00a-5acf-4d53-b306-8c768f1a11e0", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "64cd0e1c-e9c9-43db-baf0-e5134e351c7c", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet10365ca777?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:24 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "1355", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11966", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d7397d90-cc9a-4b7a-94fc-134fdf342946", - "x-ms-arm-service-request-id" : "3dcf9330-1c3e-46ab-9da6-12139ed89ea1", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091825Z:d7397d90-cc9a-4b7a-94fc-134fdf342946", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"e8bdcea4-5759-49c8-b18d-2f672ec2af70\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "c9e0971c-ad68-4fe4-b246-eb46b0286907", - "Body" : "{\r\n \"name\": \"vnet10365ca777\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet10365ca777\",\r\n \"etag\": \"W/\\\"e8bdcea4-5759-49c8-b18d-2f672ec2af70\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"20d39017-3fb9-48c0-825d-067a069a99bb\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet10365ca777/subnets/subnet1\",\r\n \"etag\": \"W/\\\"e8bdcea4-5759-49c8-b18d-2f672ec2af70\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:16:27 GMT", + "x-ms-correlation-request-id" : "5248e31c-908a-4331-8442-de358d1f9cb7", + "x-ms-arm-service-request-id" : "ecf97db7-dbcf-4e17-8168-26504f78e927", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"49a0598f-e491-41a1-ad60-85adcfa29599\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051628Z:5248e31c-908a-4331-8442-de358d1f9cb7", + "Expires" : "-1", + "Content-Length" : "2136", + "x-ms-request-id" : "aa8bcb74-6bdf-46e5-a98e-1d664a21b4c0", + "Body" : "{\r\n \"name\": \"nic1896387a6bb\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb\",\r\n \"etag\": \"W/\\\"49a0598f-e491-41a1-ad60-85adcfa29599\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"51d92643-1d63-415b-81fc-619dd993c723\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic1896387a6bb/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"49a0598f-e491-41a1-ad60-85adcfa29599\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip1757754b\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet599069ddb5/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"ly2ce5la2pie5by4gemt05tgwb.cx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": \"00-0D-3A-0D-7F-16\",\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm98492dccf-0\"\r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "10d5863f-3957-4766-90d4-793e4e72de10", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic062355aed37?api-version=2019-11-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe9d5b9d-01fb-49ae-a018-55d8c0c38cbe", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:28 GMT", - "content-length" : "1863", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1187", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b305ba50-3f13-4651-9bed-7830d281fc27", - "x-ms-arm-service-request-id" : "19717dfa-54f9-48f3-b000-a6b4e4fabfc2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091828Z:b305ba50-3f13-4651-9bed-7830d281fc27", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "d3bc2424-4bf1-4267-a290-e51df34f05b8", - "Body" : "{\r\n \"name\": \"nic062355aed37\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic062355aed37\",\r\n \"etag\": \"W/\\\"68af5f6d-0e2a-4c6f-a1c4-d37ae149dacf\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"4b324838-096d-4c5c-b480-1c7ff3755529\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic062355aed37/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"68af5f6d-0e2a-4c6f-a1c4-d37ae149dacf\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip821670ee\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet10365ca777/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"c4ingifzh5aeras3az3anguzxd.cx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/d3bc2424-4bf1-4267-a290-e51df34f05b8?api-version=2019-11-01" - } + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:16:27 GMT", + "x-ms-correlation-request-id" : "eef4e615-fdaf-4c1e-ad8e-f660dcd62012", + "x-ms-arm-service-request-id" : "a29d4bb8-c680-4f95-b5e1-ef496cd90b92", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"14f7a721-051f-40c8-92ca-528af5494d48\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051628Z:eef4e615-fdaf-4c1e-ad8e-f660dcd62012", + "Expires" : "-1", + "Content-Length" : "2142", + "x-ms-request-id" : "295c96b4-6c05-40c5-8623-c0f3b574d3e5", + "Body" : "{\r\n \"name\": \"nic686692629ee\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee\",\r\n \"etag\": \"W/\\\"14f7a721-051f-40c8-92ca-528af5494d48\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"c34d4d8d-bbd4-40ca-97c6-aeaddba9319d\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/networkInterfaces/nic686692629ee/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"14f7a721-051f-40c8-92ca-528af5494d48\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/publicIPAddresses/pip01956e98\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/virtualNetworks/vnet3925821a73/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"wmdrwo4kenseblykg5cysjih1h.ix.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": \"00-22-48-56-C5-2A\",\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Compute/virtualMachines/vm91232ff3d-0\"\r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", + "x-ms-client-request-id" : "fe9d5b9d-01fb-49ae-a018-55d8c0c38cbe", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-0?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/trafficmanagerprofiles/tra273017d8?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1bc1405c-6034-46d7-b3c4-3a993590c271", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:31 GMT", - "azure-asyncnotification" : "Enabled", - "content-length" : "2084", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1186", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4334751d-2385-480b-8b53-6a34e94c04aa", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/PutVM3Min;238,Microsoft.Compute/PutVM30Min;1198", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091832Z:4334751d-2385-480b-8b53-6a34e94c04aa", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "978a9cfe-f296-40be-abda-f1191e33525e", - "Body" : "{\r\n \"name\": \"vmf883699159-0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-0\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"827d7e2e-5bad-4477-86dd-3e71097e0519\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vmf883699159-0\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic062355aed37\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/978a9cfe-f296-40be-abda-f1191e33525e?api-version=2019-03-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/978a9cfe-f296-40be-abda-f1191e33525e?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "Date" : "Tue, 01 Sep 2020 05:16:41 GMT", + "x-ms-correlation-request-id" : "d0aac7c5-817b-4218-bba0-5a3326e64625", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051641Z:d0aac7c5-817b-4218-bba0-5a3326e64625", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "660", + "x-ms-request-id" : "1bc1405c-6034-46d7-b3c4-3a993590c271", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\",\"name\":\"tra273017d8\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"tra273017d8\",\"fqdn\":\"tra273017d8.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:18:31 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11965", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "453d139e-42f5-4265-8445-b8cc19770c19", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29993", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091832Z:453d139e-42f5-4265-8445-b8cc19770c19", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "a794eb6b-e8ce-4c3d-ab4c-618a8e4e3aef", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:18:30.9759259+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"978a9cfe-f296-40be-abda-f1191e33525e\"\r\n}" - } + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/978a9cfe-f296-40be-abda-f1191e33525e?api-version=2019-03-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/trafficmanagerprofiles/tra273017d8/azureEndpoints/ep450185675?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fcc73f09-6ae8-41db-a596-bea4d2eab683", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:19:02 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11964", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ec41b17a-508f-4cc6-9313-28bc03863ab2", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29992", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091902Z:ec41b17a-508f-4cc6-9313-28bc03863ab2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "52e283d4-ba33-4a27-bbda-8cbccfb8b354", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:18:30.9759259+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"978a9cfe-f296-40be-abda-f1191e33525e\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/978a9cfe-f296-40be-abda-f1191e33525e?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:19:32 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11963", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "89d3c54c-5b4e-4743-abc4-9593408f946e", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29991", - "x-ms-routing-request-id" : "JAPANEAST:20200204T091933Z:89d3c54c-5b4e-4743-abc4-9593408f946e", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "329c999a-b403-44b6-85ba-ee0821536032", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:18:30.9759259+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"978a9cfe-f296-40be-abda-f1191e33525e\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus2/operations/978a9cfe-f296-40be-abda-f1191e33525e?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:03 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "184", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11962", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f9ff6218-586f-41b5-9a79-00830871e7e6", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29989", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092004Z:f9ff6218-586f-41b5-9a79-00830871e7e6", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "502eb424-fa14-43ba-bba5-99da8e7745c4", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:18:30.9759259+00:00\",\r\n \"endTime\": \"2020-02-04T09:19:50.1660054+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"978a9cfe-f296-40be-abda-f1191e33525e\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-0?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:04 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2360", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11961", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ee99160f-ee38-4a3e-942a-0006f30c261b", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/LowCostGet3Min;3996,Microsoft.Compute/LowCostGet30Min;31996", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092004Z:ee99160f-ee38-4a3e-942a-0006f30c261b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "4194f54a-7301-4b04-88db-6660483d2b9d", - "Body" : "{\r\n \"name\": \"vmf883699159-0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-0\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"827d7e2e-5bad-4477-86dd-3e71097e0519\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vmf883699159-0_OsDisk_1_cb0d404069154ca1b78e4ffd30a839ab\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGCOPD0EB7813168C32/providers/Microsoft.Compute/disks/vmf883699159-0_OsDisk_1_cb0d404069154ca1b78e4ffd30a839ab\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vmf883699159-0\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic062355aed37\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - } + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:16:57 GMT", + "x-ms-correlation-request-id" : "3e2d1524-8af8-4eed-a28d-02c696d6c835", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051658Z:3e2d1524-8af8-4eed-a28d-02c696d6c835", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "666", + "x-ms-request-id" : "fcc73f09-6ae8-41db-a596-bea4d2eab683", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep450185675\",\"name\":\"ep450185675\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip1757754b\",\"target\":\"vm98492dccf-0.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet4141424f18?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/trafficmanagerprofiles/tra273017d8/azureEndpoints/ep40257510f?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1dbd9221-b6fc-4206-8f56-afeb307fb37c", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:10 GMT", - "content-length" : "1359", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1185", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a59b3859-49cb-49ad-a481-c72ac5b2de17", - "x-ms-arm-service-request-id" : "02c67f3b-036e-40fc-82ce-083dc7c8016f", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092010Z:a59b3859-49cb-49ad-a481-c72ac5b2de17", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "a5f28539-344c-42a7-bf6d-d57a9aa3a1e2", - "Body" : "{\r\n \"name\": \"vnet4141424f18\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet4141424f18\",\r\n \"etag\": \"W/\\\"fcf103f5-5a8c-44f2-bd66-935c5057be58\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"e7c8a23a-2345-475a-95ea-ae03b4301c1c\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet4141424f18/subnets/subnet1\",\r\n \"etag\": \"W/\\\"fcf103f5-5a8c-44f2-bd66-935c5057be58\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/a5f28539-344c-42a7-bf6d-d57a9aa3a1e2?api-version=2019-11-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/a5f28539-344c-42a7-bf6d-d57a9aa3a1e2?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:10 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11960", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "919a6c8b-277e-4433-ba1d-1f52aacc7837", - "x-ms-arm-service-request-id" : "2ca4ece4-97f1-4b4d-949a-cf8ad13ecc5d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092010Z:919a6c8b-277e-4433-ba1d-1f52aacc7837", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "b4cea57c-cea7-430e-96f2-65bdeb75343c", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet4141424f18?api-version=2019-11-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:10 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "1361", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11959", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "59303412-62de-497e-8164-929f02f8f99f", - "x-ms-arm-service-request-id" : "59c21cf4-079d-4212-a0b4-788b30c616d1", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092011Z:59303412-62de-497e-8164-929f02f8f99f", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"3f7fd606-6d98-46fd-bab2-82db4e0ff700\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "eeb40f3e-c5a8-488c-9b50-5b102049f930", - "Body" : "{\r\n \"name\": \"vnet4141424f18\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet4141424f18\",\r\n \"etag\": \"W/\\\"3f7fd606-6d98-46fd-bab2-82db4e0ff700\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"e7c8a23a-2345-475a-95ea-ae03b4301c1c\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/29\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet4141424f18/subnets/subnet1\",\r\n \"etag\": \"W/\\\"3f7fd606-6d98-46fd-bab2-82db4e0ff700\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/29\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:17:13 GMT", + "x-ms-correlation-request-id" : "7e131817-7b35-49a5-a9e1-63d7022bbf90", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051713Z:7e131817-7b35-49a5-a9e1-63d7022bbf90", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "677", + "x-ms-request-id" : "1dbd9221-b6fc-4206-8f56-afeb307fb37c", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep40257510f\",\"name\":\"ep40257510f\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip90102aed\",\"target\":\"vm91232ff3d-1.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic77953f5d742?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/trafficmanagerprofiles/tra273017d8/azureEndpoints/ep435797c1c?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ee10343-f181-4302-ad77-182b49edc71d", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:14 GMT", - "content-length" : "1869", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1184", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "bf3dd80b-4b97-48a9-8455-60607a5ac15a", - "x-ms-arm-service-request-id" : "185e1dab-0f1a-4856-b74f-03989eb736cc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092014Z:bf3dd80b-4b97-48a9-8455-60607a5ac15a", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "b45c1212-6b2b-49f1-9f9d-6150586692b2", - "Body" : "{\r\n \"name\": \"nic77953f5d742\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic77953f5d742\",\r\n \"etag\": \"W/\\\"7cfac033-2366-48cf-934a-d0c57113b40f\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"dc816b7f-07de-4b05-8557-b5f1c1f4dac3\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic77953f5d742/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"7cfac033-2366-48cf-934a-d0c57113b40f\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip535321af\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet4141424f18/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"hkrmrz0fennepfpkvyb1ima2de.ix.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southeastasia/operations/b45c1212-6b2b-49f1-9f9d-6150586692b2?api-version=2019-11-01" - } + "Date" : "Tue, 01 Sep 2020 05:17:29 GMT", + "x-ms-correlation-request-id" : "6503d314-b0ba-4cdf-9678-c74284a0591c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051730Z:6503d314-b0ba-4cdf-9678-c74284a0591c", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "677", + "x-ms-request-id" : "3ee10343-f181-4302-ad77-182b49edc71d", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep435797c1c\",\"name\":\"ep435797c1c\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip01956e98\",\"target\":\"vm91232ff3d-0.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-1?api-version=2019-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/trafficmanagerprofiles/tra273017d8/azureEndpoints/ep86846064b?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4a078ca-243c-4311-a67a-5a22908fc6d2", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:17 GMT", - "azure-asyncnotification" : "Enabled", - "content-length" : "2090", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1183", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "342ddcd1-d9b3-4bfe-b7d3-80742e9d9f34", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1198", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092017Z:342ddcd1-d9b3-4bfe-b7d3-80742e9d9f34", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "655becf9-53dc-4521-a146-d1a1a9f45533", - "Body" : "{\r\n \"name\": \"vm869086102d-1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-1\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"cae7460a-7fd5-4ac9-9d77-e5b0f9ed47c1\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm869086102d-1\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic77953f5d742\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/655becf9-53dc-4521-a146-d1a1a9f45533?api-version=2019-03-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/655becf9-53dc-4521-a146-d1a1a9f45533?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:17 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11958", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "187dc348-9cb7-4c6c-a4f8-1b97957b0fa8", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29993", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092017Z:187dc348-9cb7-4c6c-a4f8-1b97957b0fa8", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "17d4be44-7ada-4ce5-973b-4b004e631c84", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:20:16.5643773+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"655becf9-53dc-4521-a146-d1a1a9f45533\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/655becf9-53dc-4521-a146-d1a1a9f45533?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:20:47 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11957", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9c78783e-347d-4347-8365-b164add76588", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29992", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092048Z:9c78783e-347d-4347-8365-b164add76588", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "241ef4a8-af7b-4ce2-bd45-da7f4a52df15", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:20:16.5643773+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"655becf9-53dc-4521-a146-d1a1a9f45533\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/655becf9-53dc-4521-a146-d1a1a9f45533?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:21:18 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11956", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4694e443-4cc7-48d6-b8ee-701e774c705c", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29991", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092118Z:4694e443-4cc7-48d6-b8ee-701e774c705c", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "dcb8ca05-6664-4ee4-8163-e8e0ead46cee", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:20:16.5643773+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"655becf9-53dc-4521-a146-d1a1a9f45533\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/655becf9-53dc-4521-a146-d1a1a9f45533?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:21:48 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11955", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f17d10e5-17db-4914-8b69-a55b0ce34076", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29990", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092148Z:f17d10e5-17db-4914-8b69-a55b0ce34076", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "281e969e-4809-4bed-951b-8b13afbe2b72", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:20:16.5643773+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"655becf9-53dc-4521-a146-d1a1a9f45533\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/southeastasia/operations/655becf9-53dc-4521-a146-d1a1a9f45533?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:18 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "184", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11954", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "45baf2cc-f78a-4a91-ba4a-84891deb5506", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29988", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092218Z:45baf2cc-f78a-4a91-ba4a-84891deb5506", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "b5cd3b49-8211-4ff6-ad86-44fc26c3a4ab", - "Body" : "{\r\n \"startTime\": \"2020-02-04T09:20:16.5643773+00:00\",\r\n \"endTime\": \"2020-02-04T09:22:05.1099329+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"655becf9-53dc-4521-a146-d1a1a9f45533\"\r\n}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-1?api-version=2019-03-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ComputeManagementClient)" - }, - "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:19 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2366", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11953", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3f25d457-d9c7-45ae-adc5-b7b653d373e1", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/LowCostGet3Min;3998,Microsoft.Compute/LowCostGet30Min;31996", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092219Z:3f25d457-d9c7-45ae-adc5-b7b653d373e1", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "20c738f5-13aa-43f0-8e81-d1cc55f81483", - "Body" : "{\r\n \"name\": \"vm869086102d-1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-1\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"cae7460a-7fd5-4ac9-9d77-e5b0f9ed47c1\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A1\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm869086102d-1_OsDisk_1_6dc06b3f482f4c2487b1621f867a2ed3\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RGCOPD0EB7813168C32/providers/Microsoft.Compute/disks/vm869086102d-1_OsDisk_1_6dc06b3f482f4c2487b1621f867a2ed3\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm869086102d-1\",\r\n \"adminUsername\": \"tirekicker\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/tirekicker/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.com\"\r\n }\r\n ]\r\n },\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic77953f5d742\",\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:17:30 GMT", + "x-ms-correlation-request-id" : "2a4c48b3-d917-40a4-9def-988b765c0586", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051731Z:2a4c48b3-d917-40a4-9def-988b765c0586", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "666", + "x-ms-request-id" : "d4a078ca-243c-4311-a67a-5a22908fc6d2", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep86846064b\",\"name\":\"ep86846064b\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip67108470\",\"target\":\"vm98492dccf-1.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic80559d910c2?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/trafficmanagerprofiles/tra273017d8?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f41e62de-b7c6-40f0-ac53-ecbd480ff623", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:19 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2119", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11952", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3e179386-bb7f-473d-85a7-07d05dab34b3", - "x-ms-arm-service-request-id" : "29a13b64-5ea6-47c7-955b-d95422bb4a0b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092219Z:3e179386-bb7f-473d-85a7-07d05dab34b3", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"73db8033-4305-47e7-af27-8498687ce7a2\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "a1a6b081-009e-4ce9-a3e8-a3664d081f73", - "Body" : "{\r\n \"name\": \"nic80559d910c2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic80559d910c2\",\r\n \"etag\": \"W/\\\"73db8033-4305-47e7-af27-8498687ce7a2\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"85aa84ad-b599-4d11-aa9a-53ce173064b5\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic80559d910c2/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"73db8033-4305-47e7-af27-8498687ce7a2\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip61896564\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet32647bf713/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"3hm2i5d2n53elly0emgzceorgc.cx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": \"00-0D-3A-02-4F-CB\",\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-1\"\r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:17:33 GMT", + "x-ms-correlation-request-id" : "444b84d0-9498-4b99-840a-8239ecf04cb8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10794", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051733Z:444b84d0-9498-4b99-840a-8239ecf04cb8", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "3358", + "x-ms-request-id" : "f41e62de-b7c6-40f0-ac53-ecbd480ff623", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\",\"name\":\"tra273017d8\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"tra273017d8\",\"fqdn\":\"tra273017d8.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep40257510f\",\"name\":\"ep40257510f\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip90102aed\",\"target\":\"vm91232ff3d-1.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep86846064b\",\"name\":\"ep86846064b\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip67108470\",\"target\":\"vm98492dccf-1.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep450185675\",\"name\":\"ep450185675\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip1757754b\",\"target\":\"vm98492dccf-0.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep435797c1c\",\"name\":\"ep435797c1c\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip01956e98\",\"target\":\"vm91232ff3d-0.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic77953f5d742?api-version=2019-11-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/trafficmanagerprofiles/tra273017d8?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "35fe27ea-6357-4bdc-b12a-90fdf7ce1f94", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:20 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2125", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11951", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "be76c492-c7b2-43b1-82ca-16ef27af50b1", - "x-ms-arm-service-request-id" : "bfbb785a-ffd2-42a2-af36-e755bb9b9691", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092220Z:be76c492-c7b2-43b1-82ca-16ef27af50b1", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"e6190f23-62cc-4d3d-ad66-f0c03059b8e7\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "472612de-6a95-4baf-acfb-a75a9c0b6396", - "Body" : "{\r\n \"name\": \"nic77953f5d742\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic77953f5d742\",\r\n \"etag\": \"W/\\\"e6190f23-62cc-4d3d-ad66-f0c03059b8e7\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"dc816b7f-07de-4b05-8557-b5f1c1f4dac3\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic77953f5d742/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"e6190f23-62cc-4d3d-ad66-f0c03059b8e7\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip535321af\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet4141424f18/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"hkrmrz0fennepfpkvyb1ima2de.ix.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": \"00-0D-3A-A0-56-FC\",\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-1\"\r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:17:38 GMT", + "x-ms-correlation-request-id" : "d5f474da-5b35-4395-be19-277c9bc0a496", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10795", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051738Z:d5f474da-5b35-4395-be19-277c9bc0a496", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "3355", + "x-ms-request-id" : "35fe27ea-6357-4bdc-b12a-90fdf7ce1f94", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\",\"name\":\"tra273017d8\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"tra273017d8\",\"fqdn\":\"tra273017d8.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep40257510f\",\"name\":\"ep40257510f\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip90102aed\",\"target\":\"vm91232ff3d-1.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep86846064b\",\"name\":\"ep86846064b\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip67108470\",\"target\":\"vm98492dccf-1.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep450185675\",\"name\":\"ep450185675\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip1757754b\",\"target\":\"vm98492dccf-0.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep435797c1c\",\"name\":\"ep435797c1c\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip01956e98\",\"target\":\"vm91232ff3d-0.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic062355aed37?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd29340739181/providers/Microsoft.Network/trafficmanagerprofiles/tra273017d8?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "646af23f-ad34-411a-a7be-11fbdea2a158", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:20 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2119", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11950", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d924fc5b-bc4b-41d5-af90-24515fafaab5", - "x-ms-arm-service-request-id" : "61f8dd2f-3f8b-4d0f-a536-30113deca72b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092220Z:d924fc5b-bc4b-41d5-af90-24515fafaab5", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"2339ce23-742c-44bd-9f60-6e679c1a968f\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "f2212233-9ba0-40e6-b481-1960ab67b1ec", - "Body" : "{\r\n \"name\": \"nic062355aed37\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic062355aed37\",\r\n \"etag\": \"W/\\\"2339ce23-742c-44bd-9f60-6e679c1a968f\\\"\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"4b324838-096d-4c5c-b480-1c7ff3755529\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic062355aed37/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"2339ce23-742c-44bd-9f60-6e679c1a968f\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip821670ee\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet10365ca777/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"c4ingifzh5aeras3az3anguzxd.cx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": \"00-0D-3A-02-47-FE\",\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vmf883699159-0\"\r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 05:17:46 GMT", + "x-ms-correlation-request-id" : "03c3be4f-b48a-4192-9d61-6c485aa548d7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10793", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051746Z:03c3be4f-b48a-4192-9d61-6c485aa548d7", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "3355", + "x-ms-request-id" : "646af23f-ad34-411a-a7be-11fbdea2a158", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\",\"name\":\"tra273017d8\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"tra273017d8\",\"fqdn\":\"tra273017d8.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep40257510f\",\"name\":\"ep40257510f\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip90102aed\",\"target\":\"vm91232ff3d-1.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep86846064b\",\"name\":\"ep86846064b\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip67108470\",\"target\":\"vm98492dccf-1.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep450185675\",\"name\":\"ep450185675\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip1757754b\",\"target\":\"vm98492dccf-0.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra273017d8\\/azureEndpoints\\/ep435797c1c\",\"name\":\"ep435797c1c\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd29340739181\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip01956e98\",\"target\":\"vm91232ff3d-0.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Southeast Asia\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic96935d4545a?api-version=2019-11-01", + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgcopd29340739181?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "92b0e604-ccf7-4824-a3bb-42716ce58149", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:20 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2125", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11949", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "167ce57f-846f-44aa-a75b-474599e7de34", - "x-ms-arm-service-request-id" : "f2d0ccfb-befc-4d85-b9e5-d18cec9cd7d3", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092220Z:167ce57f-846f-44aa-a75b-474599e7de34", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"1608efcb-a6a3-403b-8f84-d41241566929\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "ec913dfa-367a-4d2c-b19e-c97b854ba8e8", - "Body" : "{\r\n \"name\": \"nic96935d4545a\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic96935d4545a\",\r\n \"etag\": \"W/\\\"1608efcb-a6a3-403b-8f84-d41241566929\\\"\",\r\n \"location\": \"southeastasia\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"6096f1b7-2597-4cea-8ae3-bcd5ffe06fe3\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"primary\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/networkInterfaces/nic96935d4545a/ipConfigurations/primary\",\r\n \"etag\": \"W/\\\"1608efcb-a6a3-403b-8f84-d41241566929\\\"\",\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/publicIPAddresses/pip27977947\"\r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/virtualNetworks/vnet47107aa0d6/subnets/subnet1\"\r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": \"o25r0u353eee1a5tlj4o2ljiwd.ix.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": \"00-0D-3A-A3-77-CA\",\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\": false,\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Compute/virtualMachines/vm869086102d-0\"\r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - } + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:17:50 GMT", + "x-ms-correlation-request-id" : "c9350946-34e8-48ef-9b35-7edb0b7329bb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051751Z:c9350946-34e8-48ef-9b35-7edb0b7329bb", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "c9350946-34e8-48ef-9b35-7edb0b7329bb", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/trafficmanagerprofiles/tra2c87017577?api-version=2018-04-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f49ae847-733e-4fdf-9325-87dae106013c" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:26 GMT", - "content-length" : "670", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "retry-after" : "0", - "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9839a28a-0923-4e97-ac0f-93da1dd560d1", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092226Z:9839a28a-0923-4e97-ac0f-93da1dd560d1", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "560c2b91-895e-49b6-a9a9-8bac75e6c56c", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\",\"name\":\"tra2c87017577\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"tra2c87017577\",\"fqdn\":\"tra2c87017577.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:18:07 GMT", + "x-ms-correlation-request-id" : "cc75425b-9991-41da-9eac-6751bdbda015", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051807Z:cc75425b-9991-41da-9eac-6751bdbda015", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "cc75425b-9991-41da-9eac-6751bdbda015", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/trafficmanagerprofiles/tra2c87017577/azureEndpoints/epb0e6850387?api-version=2018-04-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8e14dee5-bebf-4e87-84e1-e8be6a881df3" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:27 GMT", - "content-length" : "665", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1182", - "retry-after" : "0", - "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "cfd6e768-f266-4c09-a9ac-f3dab218c354", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092227Z:cfd6e768-f266-4c09-a9ac-f3dab218c354", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "38c12ae7-be13-45c3-b1d9-a20de02fcf9b", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/epb0e6850387\",\"name\":\"epb0e6850387\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip27977947\",\"target\":\"vm869086102d-0.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Southeast Asia\"}}" - } + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:18:23 GMT", + "x-ms-correlation-request-id" : "15a0a260-2686-4eef-9457-7681a47f8a66", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051823Z:15a0a260-2686-4eef-9457-7681a47f8a66", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "15a0a260-2686-4eef-9457-7681a47f8a66", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/trafficmanagerprofiles/tra2c87017577/azureEndpoints/epa9a8942124?api-version=2018-04-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d51f8788-8779-457c-9e55-f1a52d7d179a" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:28 GMT", - "content-length" : "654", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1181", - "retry-after" : "0", - "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "239a4744-3248-419c-8bc9-58a91da6c85a", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092228Z:239a4744-3248-419c-8bc9-58a91da6c85a", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "f86e4038-7a4c-48d0-b8a4-e036e719c04e", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/epa9a8942124\",\"name\":\"epa9a8942124\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip61896564\",\"target\":\"vmf883699159-1.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US 2\"}}" - } + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:18:39 GMT", + "x-ms-correlation-request-id" : "bb6ae8d3-a3a3-45ac-a889-c3a33ee201d6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051840Z:bb6ae8d3-a3a3-45ac-a889-c3a33ee201d6", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "bb6ae8d3-a3a3-45ac-a889-c3a33ee201d6", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/trafficmanagerprofiles/tra2c87017577/azureEndpoints/ep2e49198391?api-version=2018-04-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "28b1ec4c-0aca-4f46-baf0-d4bcc9e30bdb" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:29 GMT", - "content-length" : "654", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1180", - "retry-after" : "0", - "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8bedb9af-42a9-4768-ada1-0a54c066b6a3", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092229Z:8bedb9af-42a9-4768-ada1-0a54c066b6a3", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "6d626e40-97a2-4d87-9415-5e8ff410456a", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/ep2e49198391\",\"name\":\"ep2e49198391\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip821670ee\",\"target\":\"vmf883699159-0.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US 2\"}}" - } + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:18:55 GMT", + "x-ms-correlation-request-id" : "ad87aca0-63ab-4d4d-9409-6761a66ced2c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051856Z:ad87aca0-63ab-4d4d-9409-6761a66ced2c", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "ad87aca0-63ab-4d4d-9409-6761a66ced2c", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/trafficmanagerprofiles/tra2c87017577/azureEndpoints/ep5403480653?api-version=2018-04-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8452e0e-9011-4b8a-9360-2cb9c1550759" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:29 GMT", - "content-length" : "665", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1179", - "retry-after" : "0", - "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "dfa60964-2a10-4eee-ad6d-f3fe24e5da97", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092230Z:dfa60964-2a10-4eee-ad6d-f3fe24e5da97", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "e00d2d7b-81d4-440b-88e4-9d5e7fcccc46", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/ep5403480653\",\"name\":\"ep5403480653\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip535321af\",\"target\":\"vm869086102d-1.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"Southeast Asia\"}}" - } + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:19:12 GMT", + "x-ms-correlation-request-id" : "b0afa721-275b-421a-8bb2-365afdfe502b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051912Z:b0afa721-275b-421a-8bb2-365afdfe502b", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "b0afa721-275b-421a-8bb2-365afdfe502b", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/trafficmanagerprofiles/tra2c87017577?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c1037f3-7f2d-4a43-a30b-de86c5579d20" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:30 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "3320", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", - "retry-after" : "0", - "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "798580cd-a125-406e-a9d3-3f691cf6823a", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092230Z:798580cd-a125-406e-a9d3-3f691cf6823a", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "41ca697e-c068-4e68-9b74-8c3f2c876ea9", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\",\"name\":\"tra2c87017577\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"tra2c87017577\",\"fqdn\":\"tra2c87017577.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/epa9a8942124\",\"name\":\"epa9a8942124\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip61896564\",\"target\":\"vmf883699159-1.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/ep5403480653\",\"name\":\"ep5403480653\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip535321af\",\"target\":\"vm869086102d-1.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"Southeast Asia\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/ep2e49198391\",\"name\":\"ep2e49198391\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip821670ee\",\"target\":\"vmf883699159-0.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/epb0e6850387\",\"name\":\"epb0e6850387\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip27977947\",\"target\":\"vm869086102d-0.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Southeast Asia\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:19:27 GMT", + "x-ms-correlation-request-id" : "bbb4cb1f-a87b-4a25-92e3-d2adc5a70140", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051928Z:bbb4cb1f-a87b-4a25-92e3-d2adc5a70140", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "bbb4cb1f-a87b-4a25-92e3-d2adc5a70140", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/trafficmanagerprofiles/tra2c87017577?api-version=2018-04-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2e7437e-a3ff-4bdf-b835-aa8371a180ba" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:32 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "3317", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", - "retry-after" : "0", - "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ffeee4c1-1f0a-4748-8f45-004ac00a94e4", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092233Z:ffeee4c1-1f0a-4748-8f45-004ac00a94e4", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "a519afe0-ed6f-4e52-834d-5b20ec2b121d", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\",\"name\":\"tra2c87017577\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"tra2c87017577\",\"fqdn\":\"tra2c87017577.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/epa9a8942124\",\"name\":\"epa9a8942124\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip61896564\",\"target\":\"vmf883699159-1.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/ep5403480653\",\"name\":\"ep5403480653\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip535321af\",\"target\":\"vm869086102d-1.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"Southeast Asia\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/ep2e49198391\",\"name\":\"ep2e49198391\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip821670ee\",\"target\":\"vmf883699159-0.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/epb0e6850387\",\"name\":\"epb0e6850387\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip27977947\",\"target\":\"vm869086102d-0.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Southeast Asia\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:19:43 GMT", + "x-ms-correlation-request-id" : "d8ba952f-f0a5-4be4-9329-c6048e367eec", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051943Z:d8ba952f-f0a5-4be4-9329-c6048e367eec", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "d8ba952f-f0a5-4be4-9329-c6048e367eec", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcopd0eb7813168c32/providers/Microsoft.Network/trafficmanagerprofiles/tra2c87017577?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a65c1d79-767d-4ca6-9366-bab69723a2cb" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:33 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "3317", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", - "retry-after" : "0", - "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e0703c9f-139b-4a22-a1fe-94bbb0300150", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092233Z:e0703c9f-139b-4a22-a1fe-94bbb0300150", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "91ec41eb-c564-4035-b164-18ad010f9302", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\",\"name\":\"tra2c87017577\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"tra2c87017577\",\"fqdn\":\"tra2c87017577.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/epa9a8942124\",\"name\":\"epa9a8942124\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip61896564\",\"target\":\"vmf883699159-1.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/ep5403480653\",\"name\":\"ep5403480653\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip535321af\",\"target\":\"vm869086102d-1.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"Southeast Asia\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/ep2e49198391\",\"name\":\"ep2e49198391\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip821670ee\",\"target\":\"vmf883699159-0.eastus2.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tra2c87017577\\/azureEndpoints\\/epb0e6850387\",\"name\":\"epb0e6850387\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgcopd0eb7813168c32\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip27977947\",\"target\":\"vm869086102d-0.southeastasia.cloudapp.azure.com\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Southeast Asia\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:19:59 GMT", + "x-ms-correlation-request-id" : "b20c8f82-4110-4d64-a1ae-c9162772df6c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T051959Z:b20c8f82-4110-4d64-a1ae-c9162772df6c", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "b20c8f82-4110-4d64-a1ae-c9162772df6c", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { - "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgcopd0eb7813168c32?api-version=2019-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8fff3311-9a7b-463c-af61-dfe7c2e3fca8" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:36 GMT", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14999", - "retry-after" : "0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "df2d91a4-a89e-4eb4-86b1-12ea14770c64", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092236Z:df2d91a4-a89e-4eb4-86b1-12ea14770c64", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "df2d91a4-a89e-4eb4-86b1-12ea14770c64", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:20:15 GMT", + "x-ms-correlation-request-id" : "d305e589-318e-47e9-9d50-5d68fe5efd0e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052016Z:d305e589-318e-47e9-9d50-5d68fe5efd0e", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "d305e589-318e-47e9-9d50-5d68fe5efd0e", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a69fa06-1084-4df2-96b5-188600ace4a1" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:36 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11948", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "38e25b11-f9d2-4b66-9d30-182cffa509f5", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092236Z:38e25b11-f9d2-4b66-9d30-182cffa509f5", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "38e25b11-f9d2-4b66-9d30-182cffa509f5", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:20:32 GMT", + "x-ms-correlation-request-id" : "afbbd187-1451-4d01-9068-61e8d9223ac5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052032Z:afbbd187-1451-4d01-9068-61e8d9223ac5", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "afbbd187-1451-4d01-9068-61e8d9223ac5", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8afdfbc3-3c6a-491a-96da-225f37774b12" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:22:51 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11947", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4f102a74-b0c5-4f37-94a8-2247fe6edd67", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092252Z:4f102a74-b0c5-4f37-94a8-2247fe6edd67", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "4f102a74-b0c5-4f37-94a8-2247fe6edd67", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:20:47 GMT", + "x-ms-correlation-request-id" : "8a81feae-3afc-41b5-84dd-33b056535f56", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052048Z:8a81feae-3afc-41b5-84dd-33b056535f56", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "8a81feae-3afc-41b5-84dd-33b056535f56", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3714d710-15ab-4da7-8f3e-1a252fa2f50a" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:23:07 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11946", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11976", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a6a6f46f-8d6e-4b6b-8754-23506f93cf91", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092307Z:a6a6f46f-8d6e-4b6b-8754-23506f93cf91", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "a6a6f46f-8d6e-4b6b-8754-23506f93cf91", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:21:04 GMT", + "x-ms-correlation-request-id" : "c9cf6d80-dbf1-498a-8ff4-d40a82dd589b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052104Z:c9cf6d80-dbf1-498a-8ff4-d40a82dd589b", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "c9cf6d80-dbf1-498a-8ff4-d40a82dd589b", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc0f9d5a-591c-4b40-b492-7499a5ad6cbd" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:23:22 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11945", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11975", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "0c18aeef-029c-42ae-ae0b-cc0a9e7a747c", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092323Z:0c18aeef-029c-42ae-ae0b-cc0a9e7a747c", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "0c18aeef-029c-42ae-ae0b-cc0a9e7a747c", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:21:20 GMT", + "x-ms-correlation-request-id" : "1ded289c-9212-41a2-a4bb-f8a5d191d93a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052120Z:1ded289c-9212-41a2-a4bb-f8a5d191d93a", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "1ded289c-9212-41a2-a4bb-f8a5d191d93a", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf0d5850-0ef6-4cf1-8ba9-4e1cf5e58c87" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:23:38 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11944", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11974", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2d47e260-41e5-4baa-878b-a627684152df", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092338Z:2d47e260-41e5-4baa-878b-a627684152df", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "2d47e260-41e5-4baa-878b-a627684152df", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:21:35 GMT", + "x-ms-correlation-request-id" : "bee7cd16-fa89-4db3-bcdd-831ae9e00f04", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052135Z:bee7cd16-fa89-4db3-bcdd-831ae9e00f04", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "bee7cd16-fa89-4db3-bcdd-831ae9e00f04", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c59b5208-626f-40f9-8e65-09a4f43672c8" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:23:53 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11943", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f1865176-72a3-4ae5-9821-e6295c5eac58", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092354Z:f1865176-72a3-4ae5-9821-e6295c5eac58", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "f1865176-72a3-4ae5-9821-e6295c5eac58", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:21:52 GMT", + "x-ms-correlation-request-id" : "d2aa5e63-38cc-4601-93ef-3ef4185020c6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052152Z:d2aa5e63-38cc-4601-93ef-3ef4185020c6", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "d2aa5e63-38cc-4601-93ef-3ef4185020c6", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf078783-081a-4d84-bc25-54167730fdd3" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:24:09 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11942", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "1f72d5a6-e712-45e2-9000-b1510df40fdd", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092409Z:1f72d5a6-e712-45e2-9000-b1510df40fdd", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "1f72d5a6-e712-45e2-9000-b1510df40fdd", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:22:07 GMT", + "x-ms-correlation-request-id" : "813ea5e7-4977-487d-b6ca-2c5e41064cd5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052208Z:813ea5e7-4977-487d-b6ca-2c5e41064cd5", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "813ea5e7-4977-487d-b6ca-2c5e41064cd5", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "5bbaf007-e7bd-495d-9a4c-8bef74e75691" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:24:24 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11941", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fd4b3baf-a13c-4a41-89d1-2d83003f9447", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092425Z:fd4b3baf-a13c-4a41-89d1-2d83003f9447", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "fd4b3baf-a13c-4a41-89d1-2d83003f9447", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:22:24 GMT", + "x-ms-correlation-request-id" : "c32ed0da-a520-45ec-811c-e54cba733fe6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052224Z:c32ed0da-a520-45ec-811c-e54cba733fe6", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "c32ed0da-a520-45ec-811c-e54cba733fe6", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e89dbdb8-f000-446b-b928-4e5b0554c636" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:24:40 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11940", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "13ffe7df-7c1c-495b-9fac-1b036f40af9c", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092440Z:13ffe7df-7c1c-495b-9fac-1b036f40af9c", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "13ffe7df-7c1c-495b-9fac-1b036f40af9c", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:22:40 GMT", + "x-ms-correlation-request-id" : "7a4fd70b-8324-4eb1-9d25-c022ce699945", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052240Z:7a4fd70b-8324-4eb1-9d25-c022ce699945", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "7a4fd70b-8324-4eb1-9d25-c022ce699945", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e219da8e-5137-49e9-a700-7f0487d997d9" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:24:55 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11939", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11973", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5434f7b0-92a4-4e3e-a5a7-8b9a335f7a56", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092456Z:5434f7b0-92a4-4e3e-a5a7-8b9a335f7a56", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "5434f7b0-92a4-4e3e-a5a7-8b9a335f7a56", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:22:55 GMT", + "x-ms-correlation-request-id" : "d45a5ed3-634d-4a46-b753-909b1cb49e9a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052256Z:d45a5ed3-634d-4a46-b753-909b1cb49e9a", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "d45a5ed3-634d-4a46-b753-909b1cb49e9a", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f26d328b-3bf3-49c3-b135-4c0c0f60d2fc" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:25:11 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11938", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11972", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2740307c-6d8c-4547-add2-7c61e24a52ca", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092511Z:2740307c-6d8c-4547-add2-7c61e24a52ca", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "2740307c-6d8c-4547-add2-7c61e24a52ca", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 05:23:11 GMT", + "x-ms-correlation-request-id" : "2ff19b9a-e631-475f-9ac1-c48cb0064a78", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052311Z:2ff19b9a-e631-475f-9ac1-c48cb0064a78", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "2ff19b9a-e631-475f-9ac1-c48cb0064a78", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQyOTM0MDczOTE4MS1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc1b958d-5f9e-49b7-bd7f-e2acc5003a03" }, "Response" : { - "date" : "Tue, 04 Feb 2020 09:25:26 GMT", - "content-length" : "0", - "expires" : "-1", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11937", - "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "04367846-5109-4629-bb4b-1e91bdb4e118", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200204T092527Z:04367846-5109-4629-bb4b-1e91bdb4e118", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0NPUEQwRUI3ODEzMTY4QzMyLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "04367846-5109-4629-bb4b-1e91bdb4e118", - "Body" : "" - } + "x-ms-ratelimit-remaining-subscription-reads" : "11971", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:23:26 GMT", + "x-ms-correlation-request-id" : "0490810a-d18f-4ce8-a412-1817ffc7fd36", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T052327Z:0490810a-d18f-4ce8-a412-1817ffc7fd36", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "0490810a-d18f-4ce8-a412-1817ffc7fd36" + }, + "Exception" : null } ], - "variables" : [ "rgcopd0eb7813168c32", "10ef522b-df4d-4bdf-a129-d9d7ab647d0d", "vmf883699159", "c8703a8e-af5d-47b5-8a60-2a806d9a05e6", "nic062355aed37", "3ededa03-d53a-4edd-937d-0b50c1b0f173", "vnet10365ca777", "ddb13e91-0575-469b-903a-49e5826ced45", "pip821670ee", "d8a6d3cc-4a53-452e-83a5-f2fe7f01db29", "d67ef75e-1a29-4b99-a84f-bb9db5e3dc39", "nic80559d910c2", "c9ecea98-7345-468e-ab25-26532692cd5e", "vnet32647bf713", "92d9950c-f338-43d9-8818-0b9a03fe85b0", "pip61896564", "d3a3c7f3-2d78-4cc8-8ba3-d40aa71524d9", "vm869086102d", "76104e28-a1e7-44aa-a547-a0a71c68c235", "nic96935d4545a", "c3179de8-f18b-4fbf-b4ed-564b0cfc616d", "vnet47107aa0d6", "05d255d9-ce41-42c8-9873-545356eb66a4", "pip27977947", "343038e3-618a-4168-a309-d94936fa8f9b", "b3786aa9-32ca-41f0-b041-aa1e9f344487", "nic77953f5d742", "c530bdff-6452-4f08-b6fa-fb5a3a928287", "vnet4141424f18", "e1c76e03-3bd9-46d5-98fb-ad989fb9be58", "pip535321af", "6ad79880-c15a-40eb-9ce3-0e0a38f7ef95", "90c200b4-86bf-4369-bcd3-851ab54a85ad", "tra2c87017577", "b2c8b0d0-1843-4aaa-b632-42a92a63b62d", "epa9a8942124", "2bf9cf07-deb9-4032-8efc-dbf50fe5a35a", "2be6a8a3-2a35-4d3f-9f19-17807cd9a300", "ep5403480653", "cac3933b-a98d-4f07-baf6-6fbe8ea2d332", "7a55c2a0-e2c3-4ee2-8a27-b900f8a012b3", "ep2e49198391", "8b3ece42-99b2-4474-b81d-32fb11a1fc21", "d1f4e2ae-9cd4-4f5a-a023-1e91d4d1e6e3", "epb0e6850387", "2469c7e1-7f45-4304-82cb-79c148e8e37b", "f87d1c53-c862-48cd-8548-9a6af22f9ed4", "d263f381-675b-4d68-a9fc-0d035d319762", "eaff84d5-f8a8-4c03-b902-6aa5c887fd6f", "4c6b6649-7dae-455c-b4ef-3923ebc43a27", "593a9302-d0c8-4158-bc58-f8e2b206e211", "5114e2c1-baa4-4b9d-a2da-f7f3a2570a00", "b3eeb5d8-c13b-4a53-9aeb-93ddcc755fbb", "989ed751-0b16-4469-ac90-5a979d8f5408", "a8a5db4c-32b1-485c-a1f1-d61a9e2df01f" ] + "variables" : [ "rgcopd29340739181", "vm98492dccf", "nic1896387a6bb", "vnet599069ddb5", "pip1757754b", "nic90473d31e06", "vnet1724365103", "pip67108470", "vm91232ff3d", "nic686692629ee", "vnet3925821a73", "pip01956e98", "nic261800897dd", "vnet2497705074", "pip90102aed", "tra273017d8", "ep40257510f", "ep86846064b", "ep450185675", "ep435797c1c" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageTrafficManager.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageTrafficManager.json index 722508de4aa34..2d8b88b8c8de3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageTrafficManager.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageTrafficManager.json @@ -1,101 +1,2678 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:2074/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_b5e1366440b5?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_972013d55b6?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null (ResourceManagementClient, 2017-05-10)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "69122d42-ef2e-4d4e-bf19-3d9346fd1fd1", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1186", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:36:56 GMT", + "x-ms-correlation-request-id" : "9f88d79e-9cd4-492e-823c-8dfbccc57653", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053656Z:9f88d79e-9cd4-492e-823c-8dfbccc57653", + "Expires" : "-1", + "Content-Length" : "233", + "x-ms-request-id" : "9f88d79e-9cd4-492e-823c-8dfbccc57653", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6\",\"name\":\"rgnemv_972013d55b6\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/dnsZones/jsdkdemo-50726f3d.com?api-version=2018-03-01-preview", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.dns/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "679b41ba-bf29-456e-bdb9-83c5d37e62f4", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:37:04 GMT", + "x-ms-correlation-request-id" : "a712c994-934f-4fa2-bbbb-cda50829b7d9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "Cache-Control" : "private", + "ETag" : "00000002-0000-0000-4ded-6ceb2180d601", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053705Z:a712c994-934f-4fa2-bbbb-cda50829b7d9", + "Content-Length" : "544", + "x-ms-request-id" : "679b41ba-bf29-456e-bdb9-83c5d37e62f4", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/dnszones\\/jsdkdemo-50726f3d.com\",\"name\":\"jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Network\\/dnszones\",\"etag\":\"00000002-0000-0000-4ded-6ceb2180d601\",\"location\":\"global\",\"tags\":{},\"properties\":{\"maxNumberOfRecordSets\":10000,\"maxNumberOfRecordsPerRecordSet\":null,\"nameServers\":[\"ns1-05.azure-dns.com.\",\"ns2-05.azure-dns.net.\",\"ns3-05.azure-dns.org.\",\"ns4-05.azure-dns.info.\"],\"numberOfRecordSets\":2,\"zoneType\":\"Public\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DomainRegistration/topLevelDomains/com/listAgreements?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "73826547-f58e-4ed1-9bd0-19582b5e6a4c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:37:05 GMT", + "x-ms-correlation-request-id" : "658880fd-785f-4faf-a44f-63dd64aab1bb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053706Z:658880fd-785f-4faf-a44f-63dd64aab1bb", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "94535", + "x-ms-request-id" : "7dafe3bb-ea74-4329-a149-66b2f60cf256", + "Body" : "{\"value\":[{\"agreementKey\":\"DNRA\",\"title\":\"Domain Registration Agreement\",\"content\":\"\\r\\n\\r\\n\",\"url\":\"http://www.secureserver.net/agreements/ShowDoc.aspx?pageid=reg_sa&pl_id=510456\"}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.DomainRegistration/domains/jsdkdemo-50726f3d.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef9b926e-f5ff-4ffa-8f92-223689164d95", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1185", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:37:13 GMT", + "x-ms-correlation-request-id" : "aff24414-64f9-45d5-9564-2562b525f28c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053714Z:aff24414-64f9-45d5-9564-2562b525f28c", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "aff24414-64f9-45d5-9564-2562b525f28c", + "X-Powered-By" : "ASP.NET", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.DomainRegistration/domains/jsdkdemo-50726f3d.com/operationresults/49a9df5b-1a23-4843-b986-e2d19ad18b41?api-version=2019-08-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.DomainRegistration/domains/jsdkdemo-50726f3d.com/operationresults/49a9df5b-1a23-4843-b986-e2d19ad18b41?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "07c13b95-3904-4759-a3d0-3c6ee29d0957" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 05:38:41 GMT", + "x-ms-correlation-request-id" : "74f8808c-30d9-4cc6-b0f8-3d83ec0fadb7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053841Z:74f8808c-30d9-4cc6-b0f8-3d83ec0fadb7", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "74f8808c-30d9-4cc6-b0f8-3d83ec0fadb7", + "X-Powered-By" : "ASP.NET", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.DomainRegistration/domains/jsdkdemo-50726f3d.com/operationresults/49a9df5b-1a23-4843-b986-e2d19ad18b41?api-version=2019-08-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.DomainRegistration/domains/jsdkdemo-50726f3d.com/operationresults/49a9df5b-1a23-4843-b986-e2d19ad18b41?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c2d95fed-f093-453b-8b06-3a55ec8f9f07" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:39:11 GMT", + "x-ms-correlation-request-id" : "f354435c-ba17-4ab9-8e7a-bda9bba551b0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053912Z:f354435c-ba17-4ab9-8e7a-bda9bba551b0", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "864", + "x-ms-request-id" : "0a8568e0-2f33-4ca7-ada3-06c14baf1192", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.DomainRegistration/domains/jsdkdemo-50726f3d.com\",\"name\":\"jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.DomainRegistration/domains\",\"location\":\"global\",\"tags\":{},\"properties\":{\"registrationStatus\":\"Active\",\"provisioningState\":\"Succeeded\",\"nameServers\":[\"ns1-05.azure-dns.com\",\"ns2-05.azure-dns.net\",\"ns3-05.azure-dns.org\",\"ns4-05.azure-dns.info\"],\"privacy\":true,\"createdTime\":\"2020-09-01T00:37:19\",\"expirationTime\":\"2021-09-01T00:37:19\",\"autoRenew\":true,\"readyForDnsRecordManagement\":true,\"managedHostNames\":[],\"domainNotRenewableReasons\":[\"ExpirationNotInRenewalTimeRange\"],\"dnsType\":\"AzureDns\",\"dnsZoneId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/dnszones/jsdkdemo-50726f3d.com\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f0?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f611d565-5f93-4e0d-8885-9be3ab92f8e3", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1184", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:39:24 GMT", + "x-ms-correlation-request-id" : "d3f38648-e8eb-44d0-b38c-f1c6c2b1d580", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053924Z:d3f38648-e8eb-44d0-b38c-f1c6c2b1d580", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1336", + "x-ms-request-id" : "0acfe148-6644-437c-a811-9bd815954a75", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f0\",\"name\":\"jplan1_23137f0\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"serverFarmId\":33375,\"name\":\"jplan1_23137f0\",\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_972013d55b6-WestUS2webspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":3,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West US 2\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_972013d55b6\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-mwh-037_33375\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"B1\",\"tier\":\"Basic\",\"size\":\"B1\",\"family\":\"B\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f1?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e514f422-d0be-485c-bed5-3428a3283544", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1183", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:39:32 GMT", + "x-ms-correlation-request-id" : "8bb14107-19ed-49fd-860b-0691b04811d8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053932Z:8bb14107-19ed-49fd-860b-0691b04811d8", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1336", + "x-ms-request-id" : "114b84d7-545d-448d-bacf-8f60b0aba9ed", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f1\",\"name\":\"jplan1_23137f1\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"serverFarmId\":30108,\"name\":\"jplan1_23137f1\",\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_972013d55b6-EastUS2webspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":3,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"East US 2\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_972013d55b6\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-bn1-011_30108\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"B1\",\"tier\":\"Basic\",\"size\":\"B1\",\"family\":\"B\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f2?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2356c2e6-d29d-4918-ba07-c7175deb474d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1182", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:39:41 GMT", + "x-ms-correlation-request-id" : "ae0abbf4-9f4d-4bd0-8705-6d866393e9b9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053942Z:ae0abbf4-9f4d-4bd0-8705-6d866393e9b9", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1337", + "x-ms-request-id" : "b11e18df-32b9-4fa9-ac45-38d6063053ec", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f2\",\"name\":\"jplan1_23137f2\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"serverFarmId\":67160,\"name\":\"jplan1_23137f2\",\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_972013d55b6-EastAsiawebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":3,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"East Asia\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_972013d55b6\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-hk1-003_67160\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"B1\",\"tier\":\"Basic\",\"size\":\"B1\",\"family\":\"B\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f3?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "47e33e2f-84c2-48b5-b4fb-a9b216634ffc", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1181", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:39:49 GMT", + "x-ms-correlation-request-id" : "2040a638-5393-4192-a761-cec36bd56f1c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T053950Z:2040a638-5393-4192-a761-cec36bd56f1c", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1340", + "x-ms-request-id" : "1f6a73d4-f30a-43b0-a4ad-2fa816baf747", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f3\",\"name\":\"jplan1_23137f3\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"serverFarmId\":33669,\"name\":\"jplan1_23137f3\",\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_972013d55b6-CentralUSwebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":3,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"Central US\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_972013d55b6\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-dm1-011_33669\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"B1\",\"tier\":\"Basic\",\"size\":\"B1\",\"family\":\"B\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f5095516-1a78-41ec-af81-79e18f1ad6f4", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:40:10 GMT", + "x-ms-correlation-request-id" : "87f917b8-0e60-4bab-816a-add0f1de6fb0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802251DEAF00\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054011Z:87f917b8-0e60-4bab-816a-add0f1de6fb0", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5510", + "x-ms-request-id" : "76068c54-68cd-44d7-a291-f404b3d49ab7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0\",\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed0\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed0.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-WestUS2webspace\",\"selfLink\":\"https://waws-prod-mwh-037.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-WestUS2webspace/sites/webapp1-776220ed0\",\"repositorySiteName\":\"webapp1-776220ed0\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed0.azurewebsites.net\",\"webapp1-776220ed0.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed0.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed0.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f0\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:39:54.0766667\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed0\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"13.66.138.102\",\"possibleInboundIpAddresses\":\"13.66.138.102\",\"ftpUsername\":\"webapp1-776220ed0\\\\$webapp1-776220ed0\",\"ftpsHostName\":\"ftps://waws-prod-mwh-037.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.66.138.102,51.143.17.179,20.190.41.114,13.66.215.29,52.247.205.127\",\"possibleOutboundIpAddresses\":\"13.66.138.102,51.143.17.179,20.190.41.114,13.66.215.29,52.247.205.127,51.143.19.29,13.66.213.237,13.77.182.110,52.250.112.28,13.66.213.54\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-mwh-037\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed0.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/hostNameBindings/webapp1-776220ed0.jsdkdemo-50726f3d.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "16d4dcc0-f01a-41e3-8f99-afe5f080257a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1180", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:40:16 GMT", + "x-ms-correlation-request-id" : "6713b668-cf7c-427a-85a1-7b2f9120f7c4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802251DEAF00\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054017Z:6713b668-cf7c-427a-85a1-7b2f9120f7c4", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "530", + "x-ms-request-id" : "2338fca4-c1f9-4b8e-bf88-34266bd8d124", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/hostNameBindings/webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"name\":\"webapp1-776220ed0/webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US 2\",\"properties\":{\"siteName\":\"webapp1-776220ed0\",\"domainId\":null,\"azureResourceName\":\"webapp1-776220ed0\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6293ecc-9e99-4bab-91f7-40d9dbf68cbc", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:40:16 GMT", + "x-ms-correlation-request-id" : "4d9afe8b-5ebf-49ee-b5c9-ebd1fd2f4925", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680225ED26B20\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054017Z:4d9afe8b-5ebf-49ee-b5c9-ebd1fd2f4925", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5619", + "x-ms-request-id" : "38eff395-0404-498f-9826-d10e555105c7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0\",\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed0\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"webapp1-776220ed0.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-WestUS2webspace\",\"selfLink\":\"https://waws-prod-mwh-037.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-WestUS2webspace/sites/webapp1-776220ed0\",\"repositorySiteName\":\"webapp1-776220ed0\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"webapp1-776220ed0.azurewebsites.net\",\"webapp1-776220ed0.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed0.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed0.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f0\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:40:16.21\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed0\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"13.66.138.102\",\"possibleInboundIpAddresses\":\"13.66.138.102\",\"ftpUsername\":\"webapp1-776220ed0\\\\$webapp1-776220ed0\",\"ftpsHostName\":\"ftps://waws-prod-mwh-037.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.66.138.102,51.143.17.179,20.190.41.114,13.66.215.29,52.247.205.127\",\"possibleOutboundIpAddresses\":\"13.66.138.102,51.143.17.179,20.190.41.114,13.66.215.29,52.247.205.127,51.143.19.29,13.66.213.237,13.77.182.110,52.250.112.28,13.66.213.54\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-mwh-037\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed0.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e339541f-2fe9-466d-b56e-6308e2c7b764", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:40:17 GMT", + "x-ms-correlation-request-id" : "f92580c9-0d3a-4f9f-9b7b-d0b722fe21af", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054017Z:f92580c9-0d3a-4f9f-9b7b-d0b722fe21af", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3579", + "x-ms-request-id" : "9e36d529-114c-4591-9653-d05199cfe7b4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/web\",\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-776220ed0\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/certificates/89997591E66BF732F1EBE7299909A8BA642D98D4%23%23West%20US%202%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "90bcd8a7-40b3-46a5-8d36-2ff41d713918", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1179", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:40:23 GMT", + "x-ms-correlation-request-id" : "bf3aee08-1acd-44d8-81d2-8e86ada9c7d3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054024Z:bf3aee08-1acd-44d8-81d2-8e86ada9c7d3", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "928", + "x-ms-request-id" : "7709ea29-2206-4df2-9572-76aa42469ac5", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/certificates/89997591E66BF732F1EBE7299909A8BA642D98D4##West US 2#\",\"name\":\"89997591E66BF732F1EBE7299909A8BA642D98D4##West US 2#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-50726f3d.com\",\"subjectName\":\"*.jsdkdemo-50726f3d.com\",\"hostNames\":[\"*.jsdkdemo-50726f3d.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-50726f3d.com\",\"issueDate\":\"2020-09-01T05:39:10+00:00\",\"expirationDate\":\"2030-08-30T05:39:10+00:00\",\"password\":null,\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_972013d55b6-WestUS2webspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "22ee7712-09e6-4795-9e8f-8573fe9bf60c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:40:25 GMT", + "x-ms-correlation-request-id" : "9105533e-1ced-406a-9cac-98770bf5d072", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680225ED26B20\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054026Z:9105533e-1ced-406a-9cac-98770bf5d072", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5864", + "x-ms-request-id" : "50dc2cb4-ff32-4e75-a762-13ea915c3537", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0\",\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed0\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"webapp1-776220ed0.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-WestUS2webspace\",\"selfLink\":\"https://waws-prod-mwh-037.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-WestUS2webspace/sites/webapp1-776220ed0\",\"repositorySiteName\":\"webapp1-776220ed0\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"webapp1-776220ed0.azurewebsites.net\",\"webapp1-776220ed0.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed0.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed0.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f0\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:40:25.2433333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed0\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"13.66.138.102\",\"possibleInboundIpAddresses\":\"13.66.138.102\",\"ftpUsername\":\"webapp1-776220ed0\\\\$webapp1-776220ed0\",\"ftpsHostName\":\"ftps://waws-prod-mwh-037.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"13.66.138.102,51.143.17.179,20.190.41.114,13.66.215.29,52.247.205.127\",\"possibleOutboundIpAddresses\":\"13.66.138.102,51.143.17.179,20.190.41.114,13.66.215.29,52.247.205.127,51.143.19.29,13.66.213.237,13.77.182.110,52.250.112.28,13.66.213.54\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-mwh-037\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed0.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "85e5d1b5-df0b-4d3c-88d7-f4d778423adf", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1178", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:40:27 GMT", + "x-ms-correlation-request-id" : "b8211d19-001e-42a2-bd5e-70eb886d2d0e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680226434CBB5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054028Z:b8211d19-001e-42a2-bd5e-70eb886d2d0e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3565", + "x-ms-request-id" : "a31fd97f-fd1a-437e-acf1-01bf90c7a886", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0\",\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-776220ed0\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfef9c6a-133b-42e1-9395-d54cd418f95c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1177", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:40:37 GMT", + "x-ms-correlation-request-id" : "a2f81fd0-4f31-42d3-b0c3-8d431b82597e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680226BCECCCB\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054038Z:a2f81fd0-4f31-42d3-b0c3-8d431b82597e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "493", + "x-ms-request-id" : "91170962-4dd8-4f46-8dc0-3bd5f813d938", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/sourcecontrols/web\",\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "761225ca-4fb2-45e5-b799-17f981521468" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:41:17 GMT", + "x-ms-correlation-request-id" : "38dcd916-8866-4801-93fa-811555d8c56b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680226BCECCCB\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054118Z:38dcd916-8866-4801-93fa-811555d8c56b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "658", + "x-ms-request-id" : "1dada7c1-1ca9-47ea-b37f-ec2d2eb1972f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/sourcecontrols/web\",\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T05:41:17.5656178 https://webapp1-776220ed0.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_05-40-50Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2d0db7b-1231-4d23-85fa-ff0fd2b78245" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:41:48 GMT", + "x-ms-correlation-request-id" : "3878ade1-7242-4e48-b584-f3b3c7cb4c19", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680226BCECCCB\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054149Z:3878ade1-7242-4e48-b584-f3b3c7cb4c19", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "492", + "x-ms-request-id" : "43b26ca7-7c46-4bad-bd7f-560901db5a2b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/sourcecontrols/web\",\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd2a09f0-1cf5-4b21-bfed-47c6ccfe3e21", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:19 GMT", + "x-ms-correlation-request-id" : "f259efc9-2811-4a6e-b5f5-ef5122958d1f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680226BCECCCB\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054219Z:f259efc9-2811-4a6e-b5f5-ef5122958d1f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1064", + "x-ms-request-id" : "f5f14009-cf14-45ef-bc6f-801de3166ad5", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/hostNameBindings/webapp1-776220ed0.azurewebsites.net\",\"name\":\"webapp1-776220ed0/webapp1-776220ed0.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US 2\",\"properties\":{\"siteName\":\"webapp1-776220ed0\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/hostNameBindings/webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"name\":\"webapp1-776220ed0/webapp1-776220ed0.jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US 2\",\"properties\":{\"siteName\":\"webapp1-776220ed0\",\"domainId\":null,\"azureResourceName\":\"webapp1-776220ed0\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1e8c6251-9d94-4810-8a0d-8b87241a73b6", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:19 GMT", + "x-ms-correlation-request-id" : "1f5efcf7-7103-477f-a675-ad2e6bbbafb1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054219Z:1f5efcf7-7103-477f-a675-ad2e6bbbafb1", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "305", + "x-ms-request-id" : "9db8a0ed-d2e3-4000-b1ff-0bd9b558ef36", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a1c344c-1ec2-4a16-a6be-eee4a6ec69db", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:20 GMT", + "x-ms-correlation-request-id" : "80967f29-d788-407b-99b4-9ff86e3c8840", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054220Z:80967f29-d788-407b-99b4-9ff86e3c8840", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "198", + "x-ms-request-id" : "bad936a1-ed51-4b2d-87a4-3ee9f5ddb669", + "Body" : "{\"id\":null,\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9507df7-c4aa-469a-b1f5-45a6c8d46feb", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:20 GMT", + "x-ms-correlation-request-id" : "18ffbae6-dbd5-4d93-a5ac-2f2992ff1be7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054221Z:18ffbae6-dbd5-4d93-a5ac-2f2992ff1be7", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "198", + "x-ms-request-id" : "2a78ced6-c264-4879-9b4c-2ad4fa7698aa", + "Body" : "{\"id\":null,\"name\":\"webapp1-776220ed0\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "22ca2155-5c99-43ae-9ffc-e0e17ef7c997", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:20 GMT", + "x-ms-correlation-request-id" : "822db00e-935e-4dd8-9e02-f3ea22608956", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054221Z:822db00e-935e-4dd8-9e02-f3ea22608956", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "279", + "x-ms-request-id" : "702bb9e2-2164-4c40-9641-a671467f534e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed0/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US 2\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "66364f2e-12bf-4f04-9f0f-394370bf251e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:44 GMT", + "x-ms-correlation-request-id" : "4a0e554c-45e6-4787-b67c-bd9db1c34e1c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022AD3C6C70\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054244Z:4a0e554c-45e6-4787-b67c-bd9db1c34e1c", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5503", + "x-ms-request-id" : "10d7b01f-6b99-40ba-8f01-ba04c6400421", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1\",\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed1\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed1.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-EastUS2webspace\",\"selfLink\":\"https://waws-prod-bn1-011.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-EastUS2webspace/sites/webapp1-776220ed1\",\"repositorySiteName\":\"webapp1-776220ed1\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed1.azurewebsites.net\",\"webapp1-776220ed1.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed1.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed1.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f1\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:42:27.137\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed1\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.84.59.174\",\"possibleInboundIpAddresses\":\"40.84.59.174,40.70.147.24\",\"ftpUsername\":\"webapp1-776220ed1\\\\$webapp1-776220ed1\",\"ftpsHostName\":\"ftps://waws-prod-bn1-011.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.84.61.229,40.79.45.187,40.79.43.90,40.79.46.129\",\"possibleOutboundIpAddresses\":\"40.84.61.229,40.79.45.187,40.79.43.90,40.79.46.129,40.79.248.194,20.44.104.22,20.44.104.28,20.44.104.33,20.44.104.34,40.84.59.174,40.70.147.24\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bn1-011\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed1.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/hostNameBindings/webapp1-776220ed1.jsdkdemo-50726f3d.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f43ba67b-2191-4e81-9578-229a5a3e0fc1", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1176", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:50 GMT", + "x-ms-correlation-request-id" : "9b17f28a-b6e6-41aa-bbe5-1bc7b0ac3d5a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022AD3C6C70\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054250Z:9b17f28a-b6e6-41aa-bbe5-1bc7b0ac3d5a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "530", + "x-ms-request-id" : "28cfe12b-fffe-4486-874e-13f1b6b3aa20", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/hostNameBindings/webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"name\":\"webapp1-776220ed1/webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East US 2\",\"properties\":{\"siteName\":\"webapp1-776220ed1\",\"domainId\":null,\"azureResourceName\":\"webapp1-776220ed1\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "25899164-b945-4178-bd00-76ab29b7b70b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:51 GMT", + "x-ms-correlation-request-id" : "f0a07ee8-b98b-4335-8230-08272e399ae8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022BA734C10\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054251Z:f0a07ee8-b98b-4335-8230-08272e399ae8", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5617", + "x-ms-request-id" : "33bfebcb-75e5-437a-b272-4a0ed5962ed1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1\",\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed1\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"webapp1-776220ed1.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-EastUS2webspace\",\"selfLink\":\"https://waws-prod-bn1-011.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-EastUS2webspace/sites/webapp1-776220ed1\",\"repositorySiteName\":\"webapp1-776220ed1\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"webapp1-776220ed1.azurewebsites.net\",\"webapp1-776220ed1.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed1.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed1.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f1\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:42:49.937\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed1\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.84.59.174\",\"possibleInboundIpAddresses\":\"40.84.59.174,40.70.147.24\",\"ftpUsername\":\"webapp1-776220ed1\\\\$webapp1-776220ed1\",\"ftpsHostName\":\"ftps://waws-prod-bn1-011.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.84.61.229,40.79.45.187,40.79.43.90,40.79.46.129\",\"possibleOutboundIpAddresses\":\"40.84.61.229,40.79.45.187,40.79.43.90,40.79.46.129,40.79.248.194,20.44.104.22,20.44.104.28,20.44.104.33,20.44.104.34,40.84.59.174,40.70.147.24\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bn1-011\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed1.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c1b4ce1a-1849-43c8-affb-b3c55555280b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:51 GMT", + "x-ms-correlation-request-id" : "345078db-521c-4a0c-bee4-204b44122424", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054251Z:345078db-521c-4a0c-bee4-204b44122424", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3579", + "x-ms-request-id" : "6f81afad-6dd4-4eb2-aaf1-172638ff2a33", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/web\",\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-776220ed1\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/certificates/89997591E66BF732F1EBE7299909A8BA642D98D4%23%23East%20US%202%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "54669aff-17dd-4051-8c23-800733002f76", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:42:58 GMT", + "x-ms-correlation-request-id" : "54ff71d6-862b-442e-b92f-a7a6b5c0f6d2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054259Z:54ff71d6-862b-442e-b92f-a7a6b5c0f6d2", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "928", + "x-ms-request-id" : "39f91fa8-5402-43c9-bb7b-e020f660b3df", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/certificates/89997591E66BF732F1EBE7299909A8BA642D98D4##East US 2#\",\"name\":\"89997591E66BF732F1EBE7299909A8BA642D98D4##East US 2#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-50726f3d.com\",\"subjectName\":\"*.jsdkdemo-50726f3d.com\",\"hostNames\":[\"*.jsdkdemo-50726f3d.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-50726f3d.com\",\"issueDate\":\"2020-09-01T05:39:10+00:00\",\"expirationDate\":\"2030-08-30T05:39:10+00:00\",\"password\":null,\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_972013d55b6-EastUS2webspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "bab52c76-00f1-4c87-95a0-83ac9f80af3c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:43:01 GMT", + "x-ms-correlation-request-id" : "a4a890c2-672a-418e-a5e6-761d96764980", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022BA734C10\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054301Z:a4a890c2-672a-418e-a5e6-761d96764980", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5857", + "x-ms-request-id" : "f778b199-4278-4c55-a443-d3e119544c23", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1\",\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed1\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"webapp1-776220ed1.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-EastUS2webspace\",\"selfLink\":\"https://waws-prod-bn1-011.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-EastUS2webspace/sites/webapp1-776220ed1\",\"repositorySiteName\":\"webapp1-776220ed1\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"webapp1-776220ed1.azurewebsites.net\",\"webapp1-776220ed1.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed1.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed1.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f1\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:43:00.683\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed1\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.84.59.174\",\"possibleInboundIpAddresses\":\"40.84.59.174,40.70.147.24\",\"ftpUsername\":\"webapp1-776220ed1\\\\$webapp1-776220ed1\",\"ftpsHostName\":\"ftps://waws-prod-bn1-011.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.84.61.229,40.79.45.187,40.79.43.90,40.79.46.129\",\"possibleOutboundIpAddresses\":\"40.84.61.229,40.79.45.187,40.79.43.90,40.79.46.129,40.79.248.194,20.44.104.22,20.44.104.28,20.44.104.33,20.44.104.34,40.84.59.174,40.70.147.24\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bn1-011\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed1.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "10e99b53-48f9-431e-bc1e-0f46c065e896", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:43:02 GMT", + "x-ms-correlation-request-id" : "d3e5fa45-62f4-4a9b-a6ff-68e84be07635", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022C0DB01B0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054303Z:d3e5fa45-62f4-4a9b-a6ff-68e84be07635", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3565", + "x-ms-request-id" : "c4443ed9-3da8-403f-aee7-27059dd5d45e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1\",\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-776220ed1\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d3f606da-9d80-4790-9c5e-e46d7a561c44", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1175", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:43:09 GMT", + "x-ms-correlation-request-id" : "e8dc75ab-5844-4c8f-84ae-b3cb94626e78", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022C63FED50\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054310Z:e8dc75ab-5844-4c8f-84ae-b3cb94626e78", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "493", + "x-ms-request-id" : "34fe2044-387d-431f-ada1-1fe0a2685c93", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/sourcecontrols/web\",\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fd4ff5f-4474-4c8e-b257-59909fb32128" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:43:39 GMT", + "x-ms-correlation-request-id" : "b9fae1ad-762a-4d14-87fc-a5cadc7f4327", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022C63FED50\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054340Z:b9fae1ad-762a-4d14-87fc-a5cadc7f4327", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "658", + "x-ms-request-id" : "7a8903e3-eee0-4994-b83e-41cb280ecf9a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/sourcecontrols/web\",\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T05:43:40.3797487 https://webapp1-776220ed1.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_05-43-18Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "28c04fdc-d34b-4b59-82b9-38d661373707" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:44:10 GMT", + "x-ms-correlation-request-id" : "ae043629-f4de-4a3f-8770-a1426b4284ac", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022C63FED50\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054411Z:ae043629-f4de-4a3f-8770-a1426b4284ac", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "492", + "x-ms-request-id" : "93b9ae0c-83c0-41c0-9a45-b18ce2237b32", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/sourcecontrols/web\",\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "35fdcd66-3bc3-41f2-a349-e445d7c73438", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:44:41 GMT", + "x-ms-correlation-request-id" : "5cdc6a1c-471c-4add-8ee2-2db319ac4613", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68022C63FED50\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054442Z:5cdc6a1c-471c-4add-8ee2-2db319ac4613", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1064", + "x-ms-request-id" : "6e22c463-0f9f-43c8-a9c1-f13a13b2db2d", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/hostNameBindings/webapp1-776220ed1.azurewebsites.net\",\"name\":\"webapp1-776220ed1/webapp1-776220ed1.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East US 2\",\"properties\":{\"siteName\":\"webapp1-776220ed1\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/hostNameBindings/webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"name\":\"webapp1-776220ed1/webapp1-776220ed1.jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East US 2\",\"properties\":{\"siteName\":\"webapp1-776220ed1\",\"domainId\":null,\"azureResourceName\":\"webapp1-776220ed1\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6676ac3d-751f-443b-8937-60036adbce4d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:44:42 GMT", + "x-ms-correlation-request-id" : "ba37fbeb-dbd9-485a-8469-b2b822066d76", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054442Z:ba37fbeb-dbd9-485a-8469-b2b822066d76", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "198", + "x-ms-request-id" : "b28963d8-3008-473e-8843-63f132578c10", + "Body" : "{\"id\":null,\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "25c900f4-798d-4212-a0ff-8835842fa7b3", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:44:42 GMT", + "x-ms-correlation-request-id" : "d68dd3f8-a2ba-4f23-aac9-8b20eb3ff450", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11997", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054442Z:d68dd3f8-a2ba-4f23-aac9-8b20eb3ff450", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "305", + "x-ms-request-id" : "d8432c1b-9164-4d4c-bee6-ca1d5f561c83", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "49abd240-7a72-45c8-bcc8-43d7bb784d30", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:44:43 GMT", + "x-ms-correlation-request-id" : "2884bec3-9b80-43f1-94a4-ff9c0c96c13f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054443Z:2884bec3-9b80-43f1-94a4-ff9c0c96c13f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "198", + "x-ms-request-id" : "c39c4d50-19ba-46ad-afe9-f792c934c0b0", + "Body" : "{\"id\":null,\"name\":\"webapp1-776220ed1\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "efb1d273-53df-4acd-b735-38a02f3fb456", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:44:42 GMT", + "x-ms-correlation-request-id" : "17084cf8-5953-4895-8de8-6d02193b8a1d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054443Z:17084cf8-5953-4895-8de8-6d02193b8a1d", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "279", + "x-ms-request-id" : "c9cd2674-f382-445e-a41d-ba3e87b2e6b6", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed1/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East US 2\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "37a7c394-b2a3-4b66-b5dd-6f125098a58b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:45:09 GMT", + "x-ms-correlation-request-id" : "362f2e84-9989-4ed7-bbae-a25ffd936317", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802302C23120\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054510Z:362f2e84-9989-4ed7-bbae-a25ffd936317", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5520", + "x-ms-request-id" : "ba74075c-cb03-47d5-be83-4c1ce9b2e796", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2\",\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed2\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed2.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-EastAsiawebspace\",\"selfLink\":\"https://waws-prod-hk1-003.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-EastAsiawebspace/sites/webapp1-776220ed2\",\"repositorySiteName\":\"webapp1-776220ed2\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed2.azurewebsites.net\",\"webapp1-776220ed2.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed2.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed2.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f2\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:44:50.483\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed2\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"207.46.147.148\",\"possibleInboundIpAddresses\":\"207.46.147.148,13.75.34.168\",\"ftpUsername\":\"webapp1-776220ed2\\\\$webapp1-776220ed2\",\"ftpsHostName\":\"ftps://waws-prod-hk1-003.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"207.46.144.46,207.46.144.85,207.46.144.91,207.46.148.246\",\"possibleOutboundIpAddresses\":\"207.46.144.46,207.46.144.85,207.46.144.91,207.46.148.246,23.101.0.123,40.83.98.184,40.83.99.149,40.83.100.1,13.75.65.55,207.46.147.148,13.75.34.168\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-hk1-003\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed2.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/hostNameBindings/webapp1-776220ed2.jsdkdemo-50726f3d.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "df09b13b-8c47-4a91-b6ee-7c0746c07b01", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:45:17 GMT", + "x-ms-correlation-request-id" : "f4bed137-4b54-44d4-bd57-0904f97df378", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802302C23120\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054518Z:f4bed137-4b54-44d4-bd57-0904f97df378", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "530", + "x-ms-request-id" : "34573162-f543-46a8-a426-a0078c4a8e5a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/hostNameBindings/webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"name\":\"webapp1-776220ed2/webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East Asia\",\"properties\":{\"siteName\":\"webapp1-776220ed2\",\"domainId\":null,\"azureResourceName\":\"webapp1-776220ed2\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "34c32773-1d2d-4dce-8ecd-caf833f25422", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:45:18 GMT", + "x-ms-correlation-request-id" : "a879786a-a47b-4ede-a2eb-edf6a431f61b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68023126BBE70\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054519Z:a879786a-a47b-4ede-a2eb-edf6a431f61b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5634", + "x-ms-request-id" : "4c283114-999a-4549-a969-14f647d6b8ff", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2\",\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed2\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"webapp1-776220ed2.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-EastAsiawebspace\",\"selfLink\":\"https://waws-prod-hk1-003.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-EastAsiawebspace/sites/webapp1-776220ed2\",\"repositorySiteName\":\"webapp1-776220ed2\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"webapp1-776220ed2.azurewebsites.net\",\"webapp1-776220ed2.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed2.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed2.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f2\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:45:17.527\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed2\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"207.46.147.148\",\"possibleInboundIpAddresses\":\"207.46.147.148,13.75.34.168\",\"ftpUsername\":\"webapp1-776220ed2\\\\$webapp1-776220ed2\",\"ftpsHostName\":\"ftps://waws-prod-hk1-003.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"207.46.144.46,207.46.144.85,207.46.144.91,207.46.148.246\",\"possibleOutboundIpAddresses\":\"207.46.144.46,207.46.144.85,207.46.144.91,207.46.148.246,23.101.0.123,40.83.98.184,40.83.99.149,40.83.100.1,13.75.65.55,207.46.147.148,13.75.34.168\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-hk1-003\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed2.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d25ce1d-b30b-4c82-a5bb-4c1ec1dc8f98", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:45:18 GMT", + "x-ms-correlation-request-id" : "4c7f0cf7-fa4a-4b0d-87ae-707edd8ebf90", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054519Z:4c7f0cf7-fa4a-4b0d-87ae-707edd8ebf90", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3578", + "x-ms-request-id" : "6b41ef4c-79ea-46e3-95f4-850832f5ce8c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/web\",\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-776220ed2\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":true,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/certificates/89997591E66BF732F1EBE7299909A8BA642D98D4%23%23East%20Asia%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "728a60a4-f6f4-44d4-a81f-8a958c807e21", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1174", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:45:25 GMT", + "x-ms-correlation-request-id" : "bfb676f7-61b8-41ab-b0e3-3c3f7c8498fd", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054525Z:bfb676f7-61b8-41ab-b0e3-3c3f7c8498fd", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "930", + "x-ms-request-id" : "6cd78491-a2b5-4cd8-a91d-cacb990126b1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/certificates/89997591E66BF732F1EBE7299909A8BA642D98D4##East Asia#\",\"name\":\"89997591E66BF732F1EBE7299909A8BA642D98D4##East Asia#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"eastasia\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-50726f3d.com\",\"subjectName\":\"*.jsdkdemo-50726f3d.com\",\"hostNames\":[\"*.jsdkdemo-50726f3d.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-50726f3d.com\",\"issueDate\":\"2020-09-01T05:39:10+00:00\",\"expirationDate\":\"2030-08-30T05:39:10+00:00\",\"password\":null,\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_972013d55b6-EastAsiawebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "038101a7-ca01-4eb3-ae35-4f210058e2db", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:45:29 GMT", + "x-ms-correlation-request-id" : "ed7ada3d-c85b-4c44-bd98-733d62753db3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68023126BBE70\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054529Z:ed7ada3d-c85b-4c44-bd98-733d62753db3", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5873", + "x-ms-request-id" : "e3177b2a-277c-4b2b-9451-557bf58bd4b8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2\",\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed2\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"webapp1-776220ed2.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-EastAsiawebspace\",\"selfLink\":\"https://waws-prod-hk1-003.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-EastAsiawebspace/sites/webapp1-776220ed2\",\"repositorySiteName\":\"webapp1-776220ed2\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"webapp1-776220ed2.azurewebsites.net\",\"webapp1-776220ed2.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed2.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed2.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f2\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:45:27.58\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed2\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"207.46.147.148\",\"possibleInboundIpAddresses\":\"207.46.147.148,13.75.34.168\",\"ftpUsername\":\"webapp1-776220ed2\\\\$webapp1-776220ed2\",\"ftpsHostName\":\"ftps://waws-prod-hk1-003.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"207.46.144.46,207.46.144.85,207.46.144.91,207.46.148.246\",\"possibleOutboundIpAddresses\":\"207.46.144.46,207.46.144.85,207.46.144.91,207.46.148.246,23.101.0.123,40.83.98.184,40.83.99.149,40.83.100.1,13.75.65.55,207.46.147.148,13.75.34.168\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-hk1-003\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed2.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8211f724-643b-438e-80bb-4e14d136c987", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1173", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:45:30 GMT", + "x-ms-correlation-request-id" : "a186e1f2-0d78-4f0f-a764-68e2da0993c5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680231869B5C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054531Z:a186e1f2-0d78-4f0f-a764-68e2da0993c5", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3564", + "x-ms-request-id" : "6ba18ba7-26c8-4fa6-a0cb-4dfdb5dd99ae", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2\",\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-776220ed2\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":true,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "305fcffb-ab60-4b86-8a54-f820c2d8146a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:45:44 GMT", + "x-ms-correlation-request-id" : "f35c0dc2-ab82-4f49-9bd9-3bfd34faa809", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680232292E030\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054544Z:f35c0dc2-ab82-4f49-9bd9-3bfd34faa809", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "493", + "x-ms-request-id" : "01b0310b-bfa1-4096-89df-4b619098faf7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/sourcecontrols/web\",\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "280e6af1-51b2-486c-a88a-ebd4dd1dccba" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:46:14 GMT", + "x-ms-correlation-request-id" : "0e7ab67e-efb7-4fe0-86dc-274dbef71005", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680232292E030\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054615Z:0e7ab67e-efb7-4fe0-86dc-274dbef71005", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "658", + "x-ms-request-id" : "7c95905f-2b1e-4851-b348-bdc0044ed76a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/sourcecontrols/web\",\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T05:46:14.7833942 https://webapp1-776220ed2.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_05-45-53Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3b8ffdc-78eb-45c4-b63d-8ca303c218d7" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:46:45 GMT", + "x-ms-correlation-request-id" : "bf2852d9-0c74-4ecd-8ac9-e10669ece4ac", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680232292E030\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054645Z:bf2852d9-0c74-4ecd-8ac9-e10669ece4ac", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "492", + "x-ms-request-id" : "bb6dcfb3-f37f-49ed-bec8-c8d0556f16ac", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/sourcecontrols/web\",\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "5085471a-0b9b-498c-a118-a5c51bd702b6", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:47:15 GMT", + "x-ms-correlation-request-id" : "a38f0438-83ef-47c4-9659-f9a8b6234bfb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680232292E030\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054716Z:a38f0438-83ef-47c4-9659-f9a8b6234bfb", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1064", + "x-ms-request-id" : "f4f89f7a-c10d-4299-a2e9-5329513a3c8e", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/hostNameBindings/webapp1-776220ed2.azurewebsites.net\",\"name\":\"webapp1-776220ed2/webapp1-776220ed2.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East Asia\",\"properties\":{\"siteName\":\"webapp1-776220ed2\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/hostNameBindings/webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"name\":\"webapp1-776220ed2/webapp1-776220ed2.jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East Asia\",\"properties\":{\"siteName\":\"webapp1-776220ed2\",\"domainId\":null,\"azureResourceName\":\"webapp1-776220ed2\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd01978d-14d0-4edc-926d-9f074879001d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:47:16 GMT", + "x-ms-correlation-request-id" : "0d3d8f9e-ff3b-41bc-b8c9-ca70b02422e4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054716Z:0d3d8f9e-ff3b-41bc-b8c9-ca70b02422e4", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "198", + "x-ms-request-id" : "8cb29cee-b144-4b75-9aab-4cc4bb646e4d", + "Body" : "{\"id\":null,\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc04bd18-f850-4c66-96a2-db8a9c4f6ed0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:47:15 GMT", + "x-ms-correlation-request-id" : "695259f6-3be5-4234-a04a-95d56009fe96", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054716Z:695259f6-3be5-4234-a04a-95d56009fe96", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "305", + "x-ms-request-id" : "c3cee4f3-805e-41dd-98bc-ce3c606e0d45", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2b8ea37-fcf3-4133-b3cf-c2704c64dac3", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:47:16 GMT", + "x-ms-correlation-request-id" : "b166d01c-d162-4aa6-a883-5031fabc1e9d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054716Z:b166d01c-d162-4aa6-a883-5031fabc1e9d", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "198", + "x-ms-request-id" : "758a38bc-1d98-4c36-8f33-3b79fb8005f3", + "Body" : "{\"id\":null,\"name\":\"webapp1-776220ed2\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f09299f9-af32-4b17-bd58-f9ea355537b9", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:47:16 GMT", + "x-ms-correlation-request-id" : "2a3972c1-2d33-4c42-8dca-2f5d5ba934c6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11997", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054716Z:2a3972c1-2d33-4c42-8dca-2f5d5ba934c6", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "279", + "x-ms-request-id" : "902bdb44-29e6-4bb3-aeea-a748ca53e43f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed2/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2977ad7e-e799-4504-b312-7d4979df81a2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Connection" : "close", + "Pragma" : "no-cache", + "StatusCode" : "429", + "Date" : "Tue, 01 Sep 2020 05:48:19 GMT", + "x-ms-correlation-request-id" : "b6cc9b52-7689-4873-bba5-d32d40534638", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054820Z:b6cc9b52-7689-4873-bba5-d32d40534638", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "577", + "x-ms-request-id" : "b6cc9b52-7689-4873-bba5-d32d40534638", + "Body" : "{\"Code\":\"429\",\"Message\":\"Cannot acquire exclusive lock to create, update or delete this site. Retry the request later.\",\"Target\":null,\"Details\":[{\"Message\":\"Cannot acquire exclusive lock to create, update or delete this site. Retry the request later.\"},{\"Code\":\"429\"},{\"ErrorEntity\":{\"ExtendedCode\":\"59206\",\"MessageTemplate\":\"Cannot acquire exclusive lock to create, update or delete this site. Retry the request later.\",\"Parameters\":[],\"Code\":\"429\",\"Message\":\"Cannot acquire exclusive lock to create, update or delete this site. Retry the request later.\"}}],\"Innererror\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2977ad7e-e799-4504-b312-7d4979df81a2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Connection" : "close", + "Pragma" : "no-cache", + "StatusCode" : "429", + "Date" : "Tue, 01 Sep 2020 05:48:28 GMT", + "x-ms-correlation-request-id" : "c456ee10-75b5-421d-abb2-98bebfe4d8eb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054829Z:c456ee10-75b5-421d-abb2-98bebfe4d8eb", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "577", + "x-ms-request-id" : "c456ee10-75b5-421d-abb2-98bebfe4d8eb", + "Body" : "{\"Code\":\"429\",\"Message\":\"Cannot acquire exclusive lock to create, update or delete this site. Retry the request later.\",\"Target\":null,\"Details\":[{\"Message\":\"Cannot acquire exclusive lock to create, update or delete this site. Retry the request later.\"},{\"Code\":\"429\"},{\"ErrorEntity\":{\"ExtendedCode\":\"59206\",\"MessageTemplate\":\"Cannot acquire exclusive lock to create, update or delete this site. Retry the request later.\",\"Parameters\":[],\"Code\":\"429\",\"Message\":\"Cannot acquire exclusive lock to create, update or delete this site. Retry the request later.\"}}],\"Innererror\":null}", + "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2977ad7e-e799-4504-b312-7d4979df81a2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:48:40 GMT", + "x-ms-correlation-request-id" : "1cad0b46-9047-4385-b575-c47acf432be3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680235D58F510\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054841Z:1cad0b46-9047-4385-b575-c47acf432be3", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5506", + "x-ms-request-id" : "fc7db683-b92b-4bcc-a51f-d7d944e0f5af", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3\",\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed3\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed3.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-CentralUSwebspace\",\"selfLink\":\"https://waws-prod-dm1-011.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-CentralUSwebspace/sites/webapp1-776220ed3\",\"repositorySiteName\":\"webapp1-776220ed3\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed3.azurewebsites.net\",\"webapp1-776220ed3.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed3.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed3.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f3\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:48:36.517\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed3\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.77.56.174\",\"possibleInboundIpAddresses\":\"40.77.56.174,13.89.172.19\",\"ftpUsername\":\"webapp1-776220ed3\\\\$webapp1-776220ed3\",\"ftpsHostName\":\"ftps://waws-prod-dm1-011.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.77.62.8,40.77.60.234,40.77.61.61,40.77.63.70\",\"possibleOutboundIpAddresses\":\"40.77.62.8,40.77.60.234,40.77.61.61,40.77.63.70,104.43.131.104,104.43.132.40,104.43.140.18,104.43.140.94,40.122.29.20,40.77.56.174,13.89.172.19\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-dm1-011\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed3.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/hostNameBindings/webapp1-776220ed3.jsdkdemo-50726f3d.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "050e7c2f-6565-452a-9b65-1a76a68cb6d9", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:48:45 GMT", + "x-ms-correlation-request-id" : "3e21705e-0b35-4f75-a76a-660d66f4f325", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802389073550\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054846Z:3e21705e-0b35-4f75-a76a-660d66f4f325", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "531", + "x-ms-request-id" : "8af6cfd5-6253-4e66-8ab2-acaa9a72c5ab", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/hostNameBindings/webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"name\":\"webapp1-776220ed3/webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"Central US\",\"properties\":{\"siteName\":\"webapp1-776220ed3\",\"domainId\":null,\"azureResourceName\":\"webapp1-776220ed3\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c438746-69c9-4d0f-b710-16406c9fa92a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:48:46 GMT", + "x-ms-correlation-request-id" : "e35b9b61-1395-463c-acd2-87e7ba1a486f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680238E4B0460\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054846Z:e35b9b61-1395-463c-acd2-87e7ba1a486f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5619", + "x-ms-request-id" : "e189aacd-4781-470c-b188-be7229af2450", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3\",\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed3\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"webapp1-776220ed3.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-CentralUSwebspace\",\"selfLink\":\"https://waws-prod-dm1-011.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-CentralUSwebspace/sites/webapp1-776220ed3\",\"repositorySiteName\":\"webapp1-776220ed3\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"webapp1-776220ed3.azurewebsites.net\",\"webapp1-776220ed3.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed3.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed3.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f3\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:48:45.35\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed3\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.77.56.174\",\"possibleInboundIpAddresses\":\"40.77.56.174,13.89.172.19\",\"ftpUsername\":\"webapp1-776220ed3\\\\$webapp1-776220ed3\",\"ftpsHostName\":\"ftps://waws-prod-dm1-011.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.77.62.8,40.77.60.234,40.77.61.61,40.77.63.70\",\"possibleOutboundIpAddresses\":\"40.77.62.8,40.77.60.234,40.77.61.61,40.77.63.70,104.43.131.104,104.43.132.40,104.43.140.18,104.43.140.94,40.122.29.20,40.77.56.174,13.89.172.19\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-dm1-011\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed3.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b260b27-1ac2-45fd-9ae7-ee2d1a1c82e3", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:48:46 GMT", + "x-ms-correlation-request-id" : "0b10f471-fdf4-4971-914d-ec455110bcdd", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054847Z:0b10f471-fdf4-4971-914d-ec455110bcdd", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3580", + "x-ms-request-id" : "c3ab4b8f-027f-4cef-a014-8053ad241717", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/web\",\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-776220ed3\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/certificates/89997591E66BF732F1EBE7299909A8BA642D98D4%23%23Central%20US%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dffe5f75-1ce9-42c2-8e96-f4f883af3509", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:48:56 GMT", + "x-ms-correlation-request-id" : "187e3581-59fe-4252-a07e-00e085314597", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054856Z:187e3581-59fe-4252-a07e-00e085314597", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "934", + "x-ms-request-id" : "a47f0fc3-54fe-4044-a693-5c1a553fb559", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/certificates/89997591E66BF732F1EBE7299909A8BA642D98D4##Central US#\",\"name\":\"89997591E66BF732F1EBE7299909A8BA642D98D4##Central US#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-50726f3d.com\",\"subjectName\":\"*.jsdkdemo-50726f3d.com\",\"hostNames\":[\"*.jsdkdemo-50726f3d.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-50726f3d.com\",\"issueDate\":\"2020-09-01T05:39:10+00:00\",\"expirationDate\":\"2030-08-30T05:39:10+00:00\",\"password\":null,\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_972013d55b6-CentralUSwebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2ca819e-3794-4bae-beee-4381ee3984b6", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:48:59 GMT", + "x-ms-correlation-request-id" : "7bf14ddf-587d-4679-9b2e-1851a48a105a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680238E4B0460\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054859Z:7bf14ddf-587d-4679-9b2e-1851a48a105a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5859", + "x-ms-request-id" : "e5d81b14-3ef5-4781-a7b3-7d55604c2511", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3\",\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-776220ed3\",\"state\":\"Running\",\"hostNames\":[\"webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"webapp1-776220ed3.azurewebsites.net\"],\"webSpace\":\"rgnemv_972013d55b6-CentralUSwebspace\",\"selfLink\":\"https://waws-prod-dm1-011.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_972013d55b6-CentralUSwebspace/sites/webapp1-776220ed3\",\"repositorySiteName\":\"webapp1-776220ed3\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"webapp1-776220ed3.azurewebsites.net\",\"webapp1-776220ed3.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-776220ed3.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-776220ed3.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/serverfarms/jplan1_23137f3\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T05:48:58.21\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-776220ed3\",\"trafficManagerHostNames\":null,\"sku\":\"Basic\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.77.56.174\",\"possibleInboundIpAddresses\":\"40.77.56.174,13.89.172.19\",\"ftpUsername\":\"webapp1-776220ed3\\\\$webapp1-776220ed3\",\"ftpsHostName\":\"ftps://waws-prod-dm1-011.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.77.62.8,40.77.60.234,40.77.61.61,40.77.63.70\",\"possibleOutboundIpAddresses\":\"40.77.62.8,40.77.60.234,40.77.61.61,40.77.63.70,104.43.131.104,104.43.132.40,104.43.140.18,104.43.140.94,40.122.29.20,40.77.56.174,13.89.172.19\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-dm1-011\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_972013d55b6\",\"defaultHostName\":\"webapp1-776220ed3.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ecdf2c4-c007-430f-a4a1-5542c6b8a65f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:49:01 GMT", + "x-ms-correlation-request-id" : "6f7b5e8f-d62b-4efe-af93-ac9729d9e44a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802395F54C20\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054901Z:6f7b5e8f-d62b-4efe-af93-ac9729d9e44a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3566", + "x-ms-request-id" : "9425c363-ab37-4646-b49b-06b374afc41e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3\",\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-776220ed3\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3b6f3a7-271b-405a-9b80-3506da3faa77", + "Content-Type" : "application/json" + }, "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", "StatusCode" : "201", - "content-type" : "application/json; charset=utf-8", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_b5e1366440b5\",\"name\":\"rgnemv_b5e1366440b5\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", - "x-ms-routing-request-id" : "CENTRALUS:20170124T234716Z:b3adb7a8-95a2-4ff5-81f5-e7ba6636739c", - "date" : "Tue, 24 Jan 2017 23:47:15 GMT", - "pragma" : "no-cache", - "retry-after" : "0", - "cache-control" : "no-cache", - "expires" : "-1", - "x-ms-request-id" : "b3adb7a8-95a2-4ff5-81f5-e7ba6636739c", - "content-length" : "191", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b3adb7a8-95a2-4ff5-81f5-e7ba6636739c" - } + "Date" : "Tue, 01 Sep 2020 05:49:09 GMT", + "x-ms-correlation-request-id" : "8a5cad53-1f54-4734-a113-0d85a6e435c4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D680239CCD01A0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054910Z:8a5cad53-1f54-4734-a113-0d85a6e435c4", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "494", + "x-ms-request-id" : "8a43a2a6-2e46-4f32-9bf2-452db02c173f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/sourcecontrols/web\",\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a62d2d0-cc08-437b-b5e5-6d503155092b" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:49:39 GMT", + "x-ms-correlation-request-id" : "aabe31c2-feaa-45c4-a7eb-19e13257ce6b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68023ABE59990\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T054940Z:aabe31c2-feaa-45c4-a7eb-19e13257ce6b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "659", + "x-ms-request-id" : "2bf8a153-688e-4087-b43e-4b020a73ce93", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/sourcecontrols/web\",\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T05:49:32.6491006 https://webapp1-776220ed3.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_05-49-21Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b32a6c31-33d2-479f-b27a-e0b37cb09fd5" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:50:10 GMT", + "x-ms-correlation-request-id" : "cc365ad4-812e-4177-a6fd-23aa38d35692", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68023ABE59990\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055011Z:cc365ad4-812e-4177-a6fd-23aa38d35692", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "493", + "x-ms-request-id" : "b5f47b7f-95b4-4b43-b44c-105d1f34a686", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/sourcecontrols/web\",\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad0aff43-f3b5-4254-9a19-f7dd4e63d7af", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:50:41 GMT", + "x-ms-correlation-request-id" : "743a7d51-5318-4661-a179-ec88d1192fce", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D68023ABE59990\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055041Z:743a7d51-5318-4661-a179-ec88d1192fce", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1066", + "x-ms-request-id" : "80738d62-d9e1-4f68-af82-5fe04ef431b9", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/hostNameBindings/webapp1-776220ed3.azurewebsites.net\",\"name\":\"webapp1-776220ed3/webapp1-776220ed3.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"Central US\",\"properties\":{\"siteName\":\"webapp1-776220ed3\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/hostNameBindings/webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"name\":\"webapp1-776220ed3/webapp1-776220ed3.jsdkdemo-50726f3d.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"Central US\",\"properties\":{\"siteName\":\"webapp1-776220ed3\",\"domainId\":null,\"azureResourceName\":\"webapp1-776220ed3\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"89997591E66BF732F1EBE7299909A8BA642D98D4\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:2074/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DomainRegistration/topLevelDomains/com/listAgreements?api-version=2015-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/appsettings/list?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null (WebSiteManagementClient, )", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "424af19b-4135-4913-96f6-087c7543d12b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:50:41 GMT", + "x-ms-correlation-request-id" : "0d94ec80-6667-49a2-861e-6b87927cc18b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055041Z:0d94ec80-6667-49a2-861e-6b87927cc18b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "306", + "x-ms-request-id" : "404bad5a-4a30-4b40-b5f7-6ab854f30a13", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fe35d13-61d7-4c97-b8ab-0617bb50209a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:50:41 GMT", + "x-ms-correlation-request-id" : "e1287b35-2ec6-49ab-b52b-d0733915a4ef", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055042Z:e1287b35-2ec6-49ab-b52b-d0733915a4ef", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "199", + "x-ms-request-id" : "78700123-bbe4-46fa-a018-d7f7f4bb165d", + "Body" : "{\"id\":null,\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "59a7db93-f5b8-440f-bdbc-c31440ada640", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:50:41 GMT", + "x-ms-correlation-request-id" : "05da70f9-a623-4db3-b0cc-453749794878", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055042Z:05da70f9-a623-4db3-b0cc-453749794878", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "199", + "x-ms-request-id" : "e0143951-d72f-4c78-ade5-e9353e17bdac", + "Body" : "{\"id\":null,\"name\":\"webapp1-776220ed3\",\"type\":\"Microsoft.Web/sites\",\"location\":\"Central US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "02ec7611-080d-42c0-98ee-a47637b3f945", + "Content-Type" : "application/json" }, "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", "StatusCode" : "200", - "content-type" : "application/json", - "Body" : "{\"value\":[{\"agreementKey\":\"DNRA\",\"title\":\"Domain Name Registration Agreement\",\"content\":\"

\\n\\n\\n\\n\\n
\\n\\n\\n\\n\\n\\n\\n
\\nDomain Name Registration Agreement\\n
\\n

Last Revised: November 29, 2016

\\n

PLEASE READ THIS AGREEMENT CAREFULLY, AS IT CONTAINS IMPORTANT INFORMATION REGARDING YOUR LEGAL RIGHTS AND REMEDIES.

\\r\\n

1. OVERVIEW

\\r\\n

This Domain Name Registration Agreement (this \\\"Agreement\\\") is entered into by and between 510456, an individual (\\\"Azure\\\") and you, and is made effective as of the date of electronic acceptance.  This Agreement sets forth the terms and conditions of your use of Azure's Domain Name Registration services (the \\\"Domain Name Registration Services\\\" or the \\\"Services\\\"). The terms \\\"we\\\", \\\"us\\\" or \\\"our\\\" shall refer to Azure.  The terms \\\"you\\\", \\\"your\\\", \\\"User\\\" or \\\"customer\\\" shall refer to any individual or entity who accepts this Agreement.  Unless otherwise specified, nothing in this Agreement shall be deemed to confer any third-party rights or benefits.

\\r\\n

Your electronic acceptance of this Agreement signifies that you have read, understand, acknowledge and agree to be bound by this Agreement, which incorporates by reference each of (i) Azure’s Universal Terms of Service Agreement (\\\"UTOS\\\"), (ii) all agreements, guidelines, policies, practices, procedures, registration requirements or operational standards of the top-level domain (\\\"TLD\\\") in which you register any domain (“Registry Policies”), and (iii) any plan limits, product disclaimers or other restrictions presented to you on the Domain Name Registration Services landing page of the Azure website (this “Site”). 

\\r\\n

TO LINK TO AND REVIEW THE REGISTRY POLICIES FOR THE TLD IN WHICH YOU WISH TO REGISTER A DOMAIN NAME, PLEASE CLICK HERE   

\\r\\n

You acknowledge and agree that (i) Azure, in its sole and absolute discretion, may change or modify this Agreement, and any policies or agreements which are incorporated herein, at any time, and such changes or modifications shall be effective immediately upon posting to this Site, and (ii) your use of this Site or the Services found at this Site after such changes or modifications have been made shall constitute your acceptance of this Agreement as last revised.  If you do not agree to be bound by this Agreement as last revised, do not use (or continue to use) this Site or the Services found at this Site.  In addition, Azure may occasionally notify you of changes or modifications to this Agreement by email.  It is therefore very important that you keep your shopper account (“Shopper Account”) information, including your email address, current.  Azure assumes no liability or responsibility for your failure to receive an email notification if such failure results from an inaccurate or out-of-date email address.    Azure is not an Internet Corporation for Assigned Names and Numbers (\\\"ICANN\\\") accredited registrar; it is an authorized reseller of domain name registration services.  Accordingly, you acknowledge and agree that Azure may modify this Agreement in order to comply with any terms and conditions set forth by (i) the sponsoring registrar, (ii) ICANN, and/or (iii) the registry applicable to the TLD or country code top level domain (\\\"ccTLD\\\") in question.  As used herein, the terms \\\"registry\\\", \\\"Registry\\\", \\\"registry operator\\\" or \\\"Registry Operator\\\" shall refer to the registry applicable to the TLD or ccTLD in question.  To identify the sponsoring registrar, click here

\\r\\n

2. PROVISIONS SPECIFIC TO ALL REGISTRATIONS

\\r\\n

Unless otherwise noted, the provisions below in this Section 2 are generally applicable to all TLDs that we offer.  Special provisions specific to any TLD or ccTLD (those in addition to posted Registry Policies) are identified elsewhere below in this Agreement. 

\\r\\n
    \\r\\n
  1. \\r\\n
    Registry Policies. You agree to be bound by all Registry Policies (defined above in this Agreement) applicable to your domain name registration (at any level). IT IS YOUR RESPONSIBILITY TO VISIT THE APPLICABLE TLD SITE AND READ AND REVIEW ALL APPLICABLE REGISTRY POLICIES PRIOR TO YOUR REGISTRATION IN THE TLD.  REGISTRY POLICIES FOR EACH TLD CAN BE FOUND BY VISITING THE CORRESPONDING TLD LINK LISTED HERE.  Notwithstanding anything in this Agreement to the contrary, the Registry Operator of the TLD in which the domain name registration is made is and shall be an intended third party beneficiary of this Agreement. As such the parties to this agreement acknowledge and agree that the third party beneficiary rights of the Registry Operator have vested and that the Registry Operator has relied on its third party beneficiary rights under this Agreement in agreeing to Azure being a registrar for the respective TLD. The third party beneficiary rights of the Registry Operator will survive any termination of this Agreement.    
    \\r\\n
  2. \\r\\n
  3. \\r\\n
    Registration Requirements.  To the extent any TLD or ccTLD requires you meet eligibility (e.g., residency for .JP, .EU, etc.), validation (e.g., DNS validation) or other authentication requirements as a condition to registering a domain name in the TLD, you agree that by submitting an application or registering or renewing your domain name, you represent and warrant that: (a) all information provided to register or renew the domain name (including all supporting documents, if any) is true, complete and correct, and is not misleading in any way, and the application is made in good faith; (b) you meet, and will continue to meet, the eligibility criteria prescribed in the Registry Policies for the applicable TLD for the duration of the domain name registration; (c) you have not previously submitted an application for the domain name with another registrar using the same eligibility criteria, and the other registrar has rejected the application (if applicable); (d) you acknowledge and agree that even if the domain name is accepted for registration, your entitlement to register the domain name may be challenged by others who claim to have an entitlement to the domain name; and (e) you acknowledge and agree that the Registry or the registrar can cancel the registration of the domain name if any of the warranties required are found to be untrue, incomplete, incorrect or misleading.
    \\r\\n
  4. \\r\\n
  5. \\r\\n
    Ownership.  You acknowledge and agree that registration of a domain name does not create any proprietary right for you, the registrar, or any other person in the name used as a domain name or the domain name registration and that the entry of a domain name in the Registry shall not be construed as evidence or ownership of the domain name registered as a domain name. You shall not in any way transfer or purport to transfer a proprietary right in any domain name registration or grant or purport to grant as security or in any other manner encumber or purport to encumber a domain name registration.
    \\r\\n
  6. \\r\\n
  7. \\r\\n
    ICANN Requirements. You agree to comply with the ICANN requirements, standards, policies, procedures, and practices for which each applicable Registry Operator has monitoring responsibility in accordance with the Registry Agreement between ICANN and itself or any other arrangement with ICANN.
    \\r\\n
  8. \\r\\n
  9. \\r\\n
    Indemnification of Registry.  You agree to indemnify, defend and hold harmless (within 30 days of demand) the Registry Operator and Registry Service Provider and their subcontractors, subsidiaries, affiliates, divisions, shareholders, directors, officers, employees, accountants, attorneys, insurers, agents, predecessors, successors and assigns, from and against any and all claims, demands, damages, losses, costs, expenses, causes of action or other liabilities of any kind, whether known or unknown, including reasonable legal and attorney’s fees and expenses, in any way arising out of, relating to, or otherwise in connection with the your domain name registration, including, without limitation, the use, registration, extension, renewal, deletion, and/or transfer thereof and/or the violation of any applicable terms or conditions governing the registration. You shall not enter into any settlement or compromise of any such indemnifiable claim without Registrar’s or Registry Operator’s prior written consent, which consent shall not be unreasonably withheld, and you agree that these indemnification obligations shall survive the termination or expiration of the Agreement for any reason.  IN NO EVENT SHALL THE REGISTRY OPERATOR BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, EXEMPLARY OR PUNITIVE DAMAGES, INCLUDING LOSS OF PROFIT OR GOODWILL, FOR ANY MATTER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE), BREACH OF WARRANTIES, EITHER EXPRESS OR IMPLIED, ANY BREACH OF THIS AGREEMENT OR ITS INCORPORATED AGREEMENTS AND POLICIES YOUR INABILITY TO USE THE DOMAIN NAME, YOUR LOSS OF DATA OR FILES OR OTHERWISE, EVEN IF THE REGISTRY OPERATOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    \\r\\n
  10. \\r\\n
  11. \\r\\n
    Regulated TLDs.   For domain name registration in any “Regulated” TLD, you acknowledge and agree your registration is subject to the following additional requirements: (a) comply with all applicable laws, including those that relate to privacy, data collection, consumer protection (including in relation to misleading and deceptive conduct), fair lending, debt collection, organic farming, disclosure of data, and financial disclosures; (b) if you collect and maintain sensitive health and financial data you must implement reasonable and appropriate security measures commensurate with the offering of those services, as defined by applicable law.  Regulated TLDs include: .games, .juegos, .school, .schule, .toys, .eco, .care, .diet, .fitness, .health, .clinic, .dental, .healthcare, .capital, .cash, .broker, .claims, .exchange, .finance, .financial, .fund, .investments, .lease, .loans, .market, .money, .trading, .credit, .insure, .tax, .mortgage, .degree, .mba, .audio, .book, .broadway, .film, .movie, .music, .software, .fashion, .video, .app, .art, .band, .cloud, .data, .digital, .fan, .free, .gratis, .discount, .sale, .media, .news, .online, .pictures, .radio, .show, .theater, .tours, .accountants, .architect, .associates, .broker, .legal, .realty, .vet, .engineering, .law, .limited, .show; .theater; .town, .city, .reise, and .reisen
    \\r\\n
  12. \\r\\n
  13. \\r\\n
    Highly Regulated TLDs. In addition to the requirements for Regulated TLDs, domain name registration in any Highly-Regulated TLD is subject to the following requirements: (a) you will provide administrative contact information, which must be kept up‐to‐date, for the notification of complaints or reports of registration abuse, as well as the contact details of the relevant regulatory, or Industry self‐regulatory, bodies in their main place of business; (b) you represent that you possess any necessary authorizations, charters, licenses and/or other related credentials for participation in the sector associated with such Highly‐regulated TLD; and (c) you will report any material changes to the validity of you authorizations, charters, licenses and/or other related credentials for participation in the sector associated with the Highly‐regulated TLD to ensure you continue to conform to the appropriate regulations and licensing requirements and generally conduct your activities in the interests of the consumers they serve.  Highly Regulated TLDs include: .abogado, .attorney, .bank, .bet, .bingo, .casino .charity (and IDN equivalent xn--30rr7y), .cpa, .corp, creditcard, .creditunion .dds, .dentist, .doctor, .fail, .gmbh, .gripe, .hospital, .inc, .insurance, .lawyer, .lifeinsurance, .llc, .llp, .ltda, .medical, .mutuelle, .pharmacy, .poker, .university, .sarl, .spreadbetting, .srl, .sucks, .surgery .university, .vermogensberater, .vesicherung,  and .wtf.  For .doctor, registrants who hold themselves out to be licensed medical practitioners must be able to demonstrate to the Registrar and Registry, upon request, that they hold the applicable license.
    \\r\\n
  14. \\r\\n
  15. \\r\\n
    Special Safeguard TLDs.  In addition to the requirements for Regulated and Highly-Regulated TLDs, by registering a domain name in any “Special-Safeguard” TLD, you agree to take reasonable steps to avoid misrepresenting or falsely implying that you or your business is affiliated with, sponsored or endorsed by one or more country's or government's military forces if such affiliation, sponsorship or endorsement does not exist.  Special Safeguard TLDs include:  .army, .navy, .airforce
    \\r\\n
  16. \\r\\n
  17. \\r\\n
    Third Party Beneficiary.  Notwithstanding anything in this Agreement to the contrary, the Registry Operator for any TLD in which your register a domain name is and shall be an intended third party beneficiary of this Agreement. As such the parties to this agreement acknowledge and agree that the third party beneficiary rights of the Registry Operator have vested and that the Registry Operator has relied on its third party beneficiary rights under this Agreement in agreeing to Azure being a registrar for the TLD. Third party beneficiary rights of the Registry Operator shall survive any termination of this Agreement.
    \\r\\n
  18. \\r\\n
  19. \\r\\n
    Variable and Non-Uniform Pricing.  You acknowledge, understand and agree that certain domain names in certain TLDs are established by Registry Policies to be variably priced (i.e., standard v. premium names) and/or may have non-uniform renewal registration pricing (such that the Fee for a domain name registration renewal may differ from other domain names in the same TLD, e.g., renewal registration for one domain may be $100.00 and $33.00 for a different domain name).
    \\r\\n
  20. \\r\\n
  21. \\r\\n
    Restriction on Availability of Privacy or Proxy.  You acknowledge and agree that, as dictated by the Registry Policies, for certain TLDs you may not be permitted to purchase private or proxy TLD registrations. In such case, you must register for any and all TLD registrations using your personal information, which information you represent and warrant is current, accurate and complete.
    \\r\\n
  22. \\r\\n
\\r\\n

3. FEES AND PAYMENTS

\\r\\n

(A) GENERAL TERMS, INCLUDING AUTOMATIC RENEWAL TERMS

\\r\\n

You agree to pay any and all prices and fees due for Services purchased or obtained at this Site at the time you order the Services.  Azure expressly reserves the right to change or modify its prices and fees at any time, and such changes or modifications shall be posted online at this Site and effective immediately without need for further notice to you.  If you have purchased or obtained Services for a period of months or years, changes or modifications in prices and fees shall be effective when the Services in question come up for renewal as further described below. 

\\r\\n

Unless otherwise specifically noted (for reasons such as those highlighted in Section 2(x) above), the renewal price for any domain name in any TLD will be the same as the list (non-sale) price shown when you search for and select a domain, and again in the cart prior to purchase.  For example, if the list price is $9.99, and a different renewal price is not specifically identified, then the renewal price is also $9.99.  Likewise, if a domain name has a sale price of $8.99, with the list (non-sale) price shown (as a strike-through) at $9.99, the renewal price will be $9.99*.  

\\r\\n

*Renewal price subject to change prior to actual date of renewal. 

\\r\\n

For all other terms and conditions relating to fees, payment, refund and billing, etc. applicable to the Services offered under the scope of this Agreement, please refer to the “Fees and Payments” section of our UTOS

\\r\\n

(B) DOMAIN NAME RENEWAL TERMS

\\r\\n

When you register a domain name, you will have two renewal options: (i) \\\"Automatic Renewal\\\" (ii) \\\"Extended Automatic Renewal\\\", and (iii) \\\"Manual Renewal\\\": 

\\r\\n
    \\r\\n
  1. Automatic Renewal.  Automatic Renewal is the default setting. Therefore, unless you select Extended Automatic Renewal, Azure will enroll you in Automatic Renewal.  Domain names will automatically renew, for a period equivalent to the length of your original domain name registration, any domain name that is up for renewal and will take payment from the Payment Method you have on file with Azure, at Azure's then current rates. Thus, if you have chosen to register your domain name for one (1) year, Azure will automatically renew it for one (1) year. If you have chosen to register your domain name for two (2) years, Azure will automatically renew it for two (2) years, and so on.
  2. \\r\\n
  3. Extended Automatic Renewal.  If you enroll in the Extended Automatic Renewal plan, Azure will automatically renew any domain name that is up for renewal for an additional one-year period on each and every anniversary of your domain name registration, so the initial registration period will always remain intact.  Thus, if you have chosen to register your domain name for two (2) years, Azure will automatically renew it for one (1) additional year on each and every anniversary of your domain name registration so your two (2) year registration period will always remain intact. If you have chosen to register your domain name for five (5) years, Azure will automatically renew it for one (1) additional year on each and every anniversary of your domain name registration so your five (5) year registration period will always remain intact, and so on.  Azure will take payment from the Payment Method you have on file with Azure, at Azure's then current one-year domain name registration rate.
  4. \\r\\n
  5. Manual Renewal.  If you have elected to turn off automatic renewal and cancel the product (i.e., cancel the domain name registration) efefctive at expiration of the then current term, you may nonetheless elect to manually renew the domain name at anytime prior to its expiration date by logging into your Account Manager and manually implementing the renewal or by calling customer service (should you in fact want the domain name to be renewed). If you fail to manually implement the renewal before the expiration date, the domain name will be cancelled and you will no longer have use of that name.
  6. \\r\\n
\\r\\n

All renewals will be subject to the terms of this Agreement, as it may be amended from time to time, and you acknowledge and agree to be bound by the terms of this Agreement (as amended) for all renewed domains.  Domain name renewals will be non-refundable. In the event that we are unable to automatically renew your domain name for the renewal option selected for any reason, we may automatically renew your domain name for a period less than your original registration period to the extent necessary for the transaction to succeed. If for any reason Azure is not able to take the payment from the Payment Method you have on file, and you fail to respond to our notices, your domain name registration will expire. It is your responsibility to keep your Payment Method information current, which includes the expiration date if you are using a credit card.

\\r\\n

For certain ccTLDs (.am, .at, .be, .br, .ca, .cn, .com.cn, .net.cn, .org.cn, .de, .eu, .fm, .gs, .it, .jp, .ms, .nu, .nz, .co.nz, .net.nz, .org.nz, .tc, .tk, .tw, .com.tw, .org.tw, .idv.tw, .uk, and .vg), renewal billing will occur on the first day of the month prior to the month of expiration.

\\r\\n

For certain ccTLDs (.am, .at, .be, .ca, .cn, .com.cn, .net.cn, .org.cn, .de, .eu, .fm, .gs, .it, .jp, .ms, .nu, .nz, .co.nz, .net.nz, .org.nz, .tc, .tk, .tw, .com.tw, .org.tw, .idv.tw, .uk, and .vg), renewal will occur, or must occur manually if the product was previously cancelled, no later than the 20th of the month prior to the expiration date, or your domain name will be placed in non-renewal status. For some ccTLDs (.es) renewal must be processed no later than seven days before the expiration date, or your domain name will be placed in non-renewal status.  When the domain name is in non-renewal status, you can renew the domain name only by calling Azure and requesting that the domain name be renewed. You cannot renew the domain name through your Account Manager. If you fail to manually implement the renewal of any cancelled product before the expiration date, the domain name will be cancelled and you will no longer have use of that name.

\\r\\n

You agree that Azure will not be responsible for cancelled domain names that you fail to renew in the timeframes indicated in this Agreement. In any case, if you fail to renew your domain name in a timely fashion, additional charges may apply. If you signed up for privacy services, protected registration, or any other similar service, with your domain name registration, these services will automatically be renewed when your domain name registration is up for renewal, and you will incur the applicable additional renewal fee unless you cancel in advance. 

\\r\\n

If you fail to renew your domain name in the timeframes indicated in this Agreement, you agree that Azure may, in its sole discretion, renew your expired domain name on your behalf. If Azure decides to renew your expired domain name on your behalf, you will have a Renewal Grace Period during which you may reimburse Azure for the renewal and keep your domain name. The Renewal Grace Period is currently twelve (12) days but subject to change under the terms of this Agreement. For certain ccTLDs (.am, .at, .be, .cn, .com.cn, .net.cn, .org.cn, .de, .eu, .fm, .gs, .it, .jp, .ms, .nu, .nz, .co.nz, .net.nz, .org.nz, .tc, .tk, .tw, .com.tw, .org.tw, .idv.tw, .uk, and .vg) there is no Renewal Grace Period after the expiration date of the domain name. If you do not reimburse Azure for the renewal during the Renewal Grace Period your domain name will be placed on Hold and flagged for deletion after which you will have a 30-day redemption period during which you may pay Azure a Redemption fee and redeem your domain name. The Redemption fee is currently $80.00 USD and is subject to change under the terms of this Agreement. If you do not redeem your domain name prior to the end of the 30-day redemption period Azure may, in its sole discretion, delete your domain name or transfer it to another registrant on your behalf.  During the redemption period your domain name may be parked. 

\\r\\n

If your domain name is deleted, the Registry also provides a 30-day Redemption Grace Period during which you may pay Azure a redemption fee and redeem your domain name. The redemption fee is currently $80.00 USD and is subject to change under the terms of this Agreement. If you do not redeem your domain name prior to the end of the Registry's Redemption Grace Period the Registry will release your name and it will become available for registration on a first-come-first-served basis.

\\r\\n

Renewal Grace Periods and Redemption Grace Periods vary for different ccTLDs. Please refer to the specific terms for the applicable TLD. In the event there is a conflict between the provisions of this paragraph and the ccTLD terms, the ccTLD terms shall control.

\\r\\n

\\r\\n

Our registration expiration notification policy and associated fees are described here.

\\r\\n

\\r\\n

\\r\\n

(C) FREE PRODUCT TERMS

\\r\\n

In the event you are provided with free products with the registration of a domain name, you acknowledge and agree that such free products will only be available with a valid purchase and may be terminated in the event the domain name is deleted or cancelled.  For free domain names, you acknowledge and agree that you may not change the account associated with such free domain for the first five (5) days after registration.  In the event a free domain name is offered with the registration of another domain and if the paid domain name registered fails, then we may, in its sole discretion, either delete the registration of the free domain or refund the difference between the amount paid and the value of the free domain.  Failed registrations associated with promotionals offers may result in the deletion of the free or discounted item or an adjustment between the registered domain price and the value of the discounted item, in our sole discretion.

\\r\\n

4. TERM OF AGREEMENT; TRANSFERS; DOMAIN TASTING

\\r\\n

The term of this Agreement shall continue in full force and effect as long as you have any domain name registered through Azure.

\\r\\n

You agree that you will not transfer any domain name registered through Azure to another domain name registrar during the first sixty (60) days after its initial registration date.  You agree that you may not transfer any domain name for ten (10) days after a Change of Account.

\\r\\n

You further agree that you will not engage in \\\"domain tasting\\\" by using the five (5) day grace period in which a registrant may choose to cancel a domain name and get a full refund of the registration fee as a vehicle to test the marketability or viability of a domain name.  If Azure determines (which determination shall be made by Azure in its sole and absolute discretion) that you have been engaging in \\\"domain tasting\\\", then Azure reserves the right to (a) charge you a small fee (which fee shall be deducted from any refund issued) or (b) refuse your cancellation/refund request altogether. Azure will not charge you a fee if Azure cancels your domain name during the five (5) day grace period due to fraud or other activity outside of your control. The five (5) day grace period does not apply to Premium Domains, which are non-refundable.

\\r\\n

You agree that Azure shall not be bound by (i) any representations made by third parties who you may use to purchase services from Azure, or (ii) any statements of a general nature, which may be posted on Azure's website or contained in Azure's promotional materials.

\\r\\n

5. UP TO DATE INFORMATION; USE OF INFORMATION AND EXPIRATION

\\r\\n

You agree to notify Azure within five (5) business days when any of the information you provided as part of the application and/or registration process changes. It is your responsibility to keep this information in a current and accurate status. Failure by you, for whatever reason, to provide Azure with accurate and reliable information on an initial and continual basis, shall be considered to be a material breach of this Agreement and a basis for suspension and/or cancellation of the domain name. Failure by you, for whatever reason, to respond within five (5) business days to any inquiries made by Azure to determine the validity of information provided by you, shall also be considered to be a material breach of this Agreement and a basis for suspension and/or cancellation of the domain name. You agree to retain a copy for your record of the receipt for purchase of your domain name.

\\r\\n

You agree that for each domain name registered by you, the following contact data is required: postal address, email address, telephone number, and if available, a facsimile number for the Registered Name Holder and, if different from the Registered Name Holder, the same contact information for, a technical contact, an administrative contact and a billing contact.

\\r\\n

You acknowledge and agree that domain name registration requires that this contact information, in whole or in part, be shared with the registry operator, for their use, copying, distribution, publication, modification and other processing  for (among other uses in accordance with our Privacy Policy) the purpose of administration of the domain name registration, which may require such information be transferred back and forth across international borders, to and from the U.S. to the EU, for example. As required by ICANN, this information must also be made publicly available by means of Whois, and that the registry operator may also be required to make this information publicly available by Whois. Both Azure and the registry operator may be required to archive this information with a third-party escrow service. You hereby consent and give permission for all such requirements and disclosures. Further, you represent and warrant that, if you are providing information about a third party, you have notified the third party of the disclosure and the purpose for the disclosure and you have obtained the third party's consent to such disclosure.  Registrar will not process data in a way that is incompatible with this Agreement.  Registrar will take reasonable precautions to protect data from loss or misuse.

\\r\\n

You agree that for each domain name registered by you the following information will be made publicly available in the Whois directory as determined by ICANN Policy and may be sold in bulk as set forth in the ICANN agreement:

\\r\\n
    \\r\\n
  • The domain name;
  • \\r\\n
  • Your name and postal address;
  • \\r\\n
  • The name, email address, postal address, voice and fax numbers for technical and administrative contacts;
  • \\r\\n
  • The Internet protocol numbers for the primary and secondary name servers;
  • \\r\\n
  • The corresponding names of the name servers; and
  • \\r\\n
  • The original date of registration and expiration date.
  • \\r\\n
  • Name of primary name server and secondary name server.
  • \\r\\n
  • Identity of the registrar.
  • \\r\\n
\\r\\n

You agree that, to the extent permitted by ICANN, Azure may make use of the publicly available information you provided during the registration process. If you engage in the reselling of domain names you agree to provide any individuals whose personal information you've obtained, information about the possible uses of their personal information pursuant to ICANN policy. You also agree to obtain consent, and evidence of consent, from those individuals for such use of the personal information they provide.

\\r\\n

\\r\\n

In order for us to comply with any current or future rules and policies for domain name systems including any rules or policies established by the CIRA or any provincial or federal government or by other organization having control or authority to establish rules or policies, you hereby grant to us the right to disclose to third parties through an interactive publicly accessible registration database the following information that you are required to provide when applying for a domain name:

\\r\\n
    \\r\\n
  1. The domain or sub-domain name(s) registered by you;
  2. \\r\\n
  3. Your organization name, type and postal address;
  4. \\r\\n
  5. The name(s), position(s), postal address(es), e-mail address(es), voice telephone number(s) and where available the fax number(s) of the technical and administrative contacts for your domain or sub-domain name(s);
  6. \\r\\n
  7. The full hostnames and Internet protocol (IP) addresses of at least two (2) name server hosts (one primary and at least one secondary) for your domain or sub-domain name. Up to six (6) name servers may be specified. If a host has more than one (1) IP address, use a comma-separated list;
  8. \\r\\n
  9. The corresponding names of those name servers;
  10. \\r\\n
  11. The original creation date of the registration; and
  12. \\r\\n
  13. The expiration date of the registration.
  14. \\r\\n
\\r\\n

We may be required to make this information available in bulk form to third parties. We may also transfer or assign this information to CIRA or such other third party as we may decide, in our sole discretion.

\\r\\n

6. DISPUTE RESOLUTION POLICY

\\r\\n

You agree to be bound by our current Dispute Resolution Policy. This policy is incorporated herein and made a part of this Agreement. You can view the Uniform Domain Name Dispute Resolution Policy online. You agree that Azure may from time to time modify its Dispute Resolution Policy. Azure will post any changes to its Dispute Resolution Policy at least thirty (30) days before they become effective. You agree that by maintaining your domain name registrations with Azure after the updated policy becomes effective that you agree to the Dispute Resolution policy as amended. You agree to review Azure's website periodically to determine if changes have been made to the Dispute Resolution Policy. If you cancel or terminate your Services with Azure as a result of the modified Dispute Resolution policy, no fees will be refunded to you. You also agree to submit to proceedings commenced under ICANN's Uniform Rapid Suspension System, if applicable. 

\\r\\n

You agree that if a dispute arises as a result of one (1) or more domain names you have registered using Azure, you will indemnify, defend and hold Azure harmless as provided for in this Agreement. You also agree that if Azure is notified that a complaint has been filed with a governmental, administrative or judicial body, regarding a domain name registered by you using Azure, that Azure, in its sole discretion, may take whatever action Azure deems necessary regarding further modification, assignment of and/or control of the domain name deemed necessary to comply with the actions or requirements of the governmental, administrative or judicial body until such time as the dispute is settled. In this event you agree to hold Azure harmless for any action taken by Azure.

\\r\\n

You agree to submit, without prejudice to other potentially applicable jurisdictions, to the jurisdiction of the courts (1) of your domicile, (2) where registrar is located or (3) where the registry operator is located (e.g., China for .CN, Columbia for .CO, UK for .EU, etc.).

\\r\\n

\\r\\n

In the case of .ca domain names, you agree that, if your use of the service or the registration of a .ca domain name is challenged by a third party, you will be subject to the provisions specified by CIRA in their dispute resolution policy, in effect at the time of the dispute.

\\r\\n

\\r\\n

7. TRANSFER OF DOMAIN NAMES; RESALE PRACTICES

\\r\\n

If you transfer any domain name, you agree to provide the information required by, and to abide by, the procedures and conditions set forth in our Domain Name Transfer Agreement and Change of Registrant Agreement. You may view the latest versions of our Domain Name Transfer Agreement and Change of Registrant Agreementonline. In order to further protect your domain name, any domain name registered with Azure or transferred to Azure shall be placed on lock status, unless an opted-out has occurred as defined in our Change of Registrant Agreement or Domain Name Proxy Agreement. The domain name must be placed on unlock status in order to initiate a transfer of the domain name away from Azure to a new Registrar. You may log into your account with Azure at any time after your domain name has been successfully transferred to Azure, and change the status to unlock.

\\r\\n

In the event you are purchasing a domain name on behalf of a third party, you agree to inform any customer of yours, who may be acquiring a domain name through you using Azure's registration services, that they are in fact registering their domain name through Azure and that Azure or its licensor is an accredited registrar with ICANN. You agree not to represent that you are an ICANN-accredited registrar or that you are in any way providing superior access to the ICANN Domain Name Registry. You also agree not to use the ICANN trademark logo in any of your promotional materials including your website.

\\r\\n

You agree to obtain each of your customers' acceptances to the then current version of this Agreement, and to retain evidence of their acceptance for a period of not less than three (3) years. Should you require that your customers accept additional terms and conditions that are not required by Azure, you agree that such additional terms and conditions shall not conflict with this Agreement and the policies and procedures adopted by ICANN.

\\r\\n

You agree that Azure is not lending you access to its registrar connections or its registry access, nor will you be deemed to be a registrar in your own right. Furthermore, you agree you will not attempt to gain access to Azure's registrar connections or registry access. You agree to provide complete, accurate and current data for each registrant to be added to a registry in accordance with ICANN requirements for inclusion in the Whois database.

\\r\\n

You agree to provide your customers with adequate customer support, and to maintain contact with them with regard to providing a medium for them to communicate changes in the information they provided as part of the domain name registration process. Upon receiving corrected or updated information you will, within five (5) business days, provide such information to Azure so Azure may update its registration records. You will retain copies of all communications between you and your customers and will upon request provide Azure copies of same.

\\r\\n

8. YOUR OBLIGATIONS; SUSPENSION OF SERVICES; BREACH OF AGREEMENT

\\r\\n

You represent and warrant to the best of your knowledge that, neither the registration of the domain nor the manner it is directly or indirectly used, infringes the legal rights of any third party.  You will comply with all applicable laws, including, but not limited to those relating to privacy, data collection, consumer protection, fair lending, debt collection, organic farming, and disclosure of data and financial disclosures.  If you collect and maintain sensitive health and financial data, you must implement reasonable and appropriate security measures commensurate with the offering of those services, as defined by applicable law.  You represent that you possess any necessary authorization, charter, license, and/or other related credential for participation in the sector associated with the associated registry tld string.  You will report any material changes to the validity of your authorization, charter, license, and/or other related credential. You will indemnify and hold harmless the registrar and registry operator, and their directors, officers, employees and agents, from and against any and all claims, damages, liabilities, costs and expenses (including reasonable legal fees and expenses) arising out of or related to the domain name registration.  This obligation shall survive expiration or termination of this Agreement or the domain name registration.

\\r\\n

You agree that, in addition to other events set forth in this Agreement:

\\r\\n
    \\r\\n
  1. Your ability to use any of the services provided by Azure is subject to cancellation or suspension in the event there is an unresolved breach of this Agreement and/or suspension or cancellation is required by any policy now in effect or adopted later by ICANN;
  2. \\r\\n
  3. Your registration of any domain names shall be subject to suspension, cancellation or transfer pursuant to any ICANN adopted specification or policy, or pursuant to any Azure procedure not inconsistent with an ICANN adopted specification or policy (a) to correct mistakes by Azure or the registry operator in registering any domain name; or (b) for the resolution of disputes concerning any domain name.
  4. \\r\\n
\\r\\n

You acknowledge and agree that Azure and registry reserve the right to deny, cancel or transfer any registration or transaction, or place any domain name(s) on registry lock, hold or similar status, as either deems necessary, in the unlimited and sole discretion of either Azure or the registry: (i) to comply with specifications adopted by any industry group generally recognized as authoritative with respect to the Internet (e.g., RFCs), (ii) to correct mistakes made by registry or any registrar in connection with a domain name registration, (iii) for the non-payment of fees to registry, (iv) to protect the integrity and stability of the registry, (v) to comply with any applicable court orders, laws, government rules or requirements, requests of law enforcement, or any dispute resolution process, (vi) to comply with any applicable ICANN rules or regulations, including without limitation, the registry agreement, (vii) to avoid any liability, civil or criminal, on the part of registry operator, as well as its affiliates, subsidiaries, officers, directors, and employees, (viii) per the terms of this Agreement, (ix) following an occurrence of any of the prohibited activities described in Section 8 below, or (x) during the resolution of a dispute.

\\r\\n

You agree that your failure to comply completely with the terms and conditions of this Agreement and any Azure rule or policy may be considered by Azure to be a material breach of this Agreement and Azure may provide you with notice of such breach either in writing or electronically (i.e. email). In the event you do not provide Azure with material evidence that you have not breached your obligations to Azure within ten (10) business days, Azure may terminate its relationship with you and take any remedial action available to Azure under the applicable laws. Such remedial action may be implemented without notice to you and may include, but is not limited to, cancelling the registration of any of your domain names and discontinuing any services provided by Azure to you. No fees will be refunded to you should your Services be cancelled or terminated because of a breach.

\\r\\n

Azure's failure to act upon or notify you of any event, which may constitute a breach, shall not relieve you from or excuse you of the fact that you have committed a breach.

\\r\\n

9. RESTRICTION OF SERVICES; RIGHT OF REFUSAL

\\r\\n

You agree not to use the services provided by Azure, or to allow or enable others, to use the services provided by Azure for the purposes of:

\\r\\n
    \\r\\n
  • The transmission of unsolicited email (Spam); and
  • \\r\\n
  • Repetitive, high volume inquires into any of the services provided by Azure (i.e. domain name availability, etc.).
  • \\r\\n
\\r\\n

You acknowledge and agree that you are prohibited from distributing malware, abusively operating botnets, phishing, piracy, trademark or copyright infringement, fraudulent or deceptive practices, counterfeiting or otherwise engaging in activity contrary to applicable law, and you acknowledge and agree that the consequences for such activities include suspension of the domain name.

\\r\\n

If you are hosting your domain name system (“DNS”) on Azure’s servers, or are using our systems to forward a domain name, URL, or otherwise to a system or site hosted elsewhere, or if you have your domain name registered with Azure, you are responsible for ensuring there is no excessive overloading on Azure’s servers. You may not use Azure’s servers and your domain name as a source, intermediary, reply to address, or destination address for mail bombs, Internet packet flooding, packet corruption, or other abusive attack. Server hacking or other perpetration of security breaches is prohibited. You agree that Azure reserves the right to deactivate your domain name from its DNS if Azure deems it is the recipient of activities caused by your site that threaten the stability of its network.

\\r\\n

You agree that Azure, in its sole discretion and without liability to you, may refuse to accept the registration of any domain name. Azure also may in its sole discretion and without liability to you delete the registration of any domain name during the first thirty (30) days after registration has taken place. Azure may also cancel the registration of a domain name, after thirty (30) days, if that name is being used, as determined by Azure in its sole discretion, in association with spam or morally objectionable activities. Morally objectionable activities will include, but not be limited to:

\\r\\n
    \\r\\n
  • Activities prohibited by the laws of the United States and/or foreign territories in which you conduct business;
  • \\r\\n
  • Activities designed to encourage unlawful behavior by others, such as hate crimes, terrorism and child pornography; and
  • \\r\\n
  • Activities designed to harm or use unethically minors in any way.
  • \\r\\n
\\r\\n

In the event Azure refuses a registration or deletes an existing registration during the first thirty (30) days after registration, you will receive a refund of any fees paid to Azure in connection with the registration either being cancelled or refused. In the event Azure deletes the registration of a domain name being used in association with spam or morally objectionable activities, no refund will be issued.

\\r\\n

10. DEFAULT SETTINGS; PARKED PAGE

\\r\\n

Choosing Your Domain Name Settings.  When you register a domain name with Azure, you will be prompted to choose your domain name settings during the checkout process.  If you plan on using another provider for your website or hosting needs, then you should enter the name servers of such provider when you choose your domain name settings.  This will direct your domain name away from Azure’s name servers.  If you are an existing Azure customer and have already set up a customer profile designating your domain name settings for new domain name registrations, you will not need to complete this step again during the checkout process.   

\\r\\n

Azure’s Default Settings.  If you do not direct your domain name away from Azure’s name servers as described above, Azure will direct your domain name to a “Parked Page” (“Default Setting”).  You acknowledge and agree that Azure has the right to set the Default Setting. 

\\r\\n

Parked Page Default Setting.  Azure’s Parked Page service is an online domain monetization system designed to generate revenue (through the use of pay per click advertising) from domain names that are not actively being used as websites.  If your domain name is directed to a Parked Page, you acknowledge and agree that Azure may display both (a) in-house advertising (which includes links to Azure products and services) and (b) third-party advertising (which includes links to third-party products and services) on your Parked Page through the use of pop-up or pop-under browser windows, banner advertisements, audio or video streams, or any other advertising means, and we may aggregate for our own use, related usage data by means of cookies and other similar means.  In addition, you acknowledge and agree that all in-house and third-party advertising will be selected by Azure and its advertising partners, as appropriate, and you will not be permitted to customize the advertising, or entitled to any compensation in exchange therefor.  Please note that the third-party advertising displayed on Azure’s Parked Pages may contain content offensive to you, including but not limited to links to adult content.  Azure makes no effort to edit, control, monitor, or restrict the content and third-party advertising displayed on Azure’s Parked Pages, and expressly disclaims any liability or responsibility to you or any third party in connection therewith.

\\r\\n

Changing Azure’s Default Settings.  You may change Azure’s Default Settings at any time during the term of your domain name registration.

\\r\\n
    \\r\\n
  1. Content Displaying On Your Parked Page.  You can not modify the content displaying on your Parked Page.  You may select one of the other options listed below.
  2. \\r\\n
  3. Participating In Domain Name Monetization.  If you wish to participate in the domain monetization potential presented by Azure’s Parked Page service, please review and consider purchasing our CashParking® service.   
  4. \\r\\n
  5. No Content.  If the options listed above are not acceptable to you, please contact customer support to learn what other options might be available to you.
  6. \\r\\n
\\r\\n

Return To Parked Page Default Setting Upon Domain Name Expiration.  Upon domain name expiration, and regardless of how you use your domain name during the term of your domain name registration, your domain name will automatically return to the Parked Page Default Setting described above.  As used in this paragraph, “expiration” is deemed to include any “renewal period” or “redemption period” immediately after the domain name expires, but before the domain name is returned to the registry.  Once your domain name has returned to the Parked Page Default Setting described above, the only way to opt out of the Parked Page service is to renew, redeem, or re-register your domain name in accordance with Section 2(B), Domain Name Renewal Terms, of this Agreement.   

\\r\\n

11. DOMAIN ADD-ONS

\\r\\n

Business Registration:  Business registration allows You to display additional information about the business that is the basis of Your domain name, including, but not limited to, such information as Your fax number, street address, and hours of operation.

\\r\\n

Certified Domains.  The certified domain service generally allow You to: (i) put a Certified Domain Validation seal on Your website; and (ii) have Your domain name listed as \\\"Certified\\\", in WHOIS lookups on our website.   The Certified Domain Validation seal renews independently of Your domain. When You renew Your domain, You must also, when necessary, separately renew Your Certified Validation seal. However, the Certified Domain Validation seal can be cancelled independently of Your domain. If the domain is cancelled, the Certified Domain associated with the cancelled domain will automatically cancel.  The Certified Domain seal is a trademark and is protected by copyright, trademark and other intellectual property laws. You may use the Certified Domain seal only in conjunction with the purchase of the Services set forth in the Agreement, and subject to the terms and conditions hereof. Other than provided for in this Agreement, You may not otherwise use, reproduce, or modify the mark for any additional promotional use, without our prior written approval. Your right to the use of the Certified Domain seal is immediately terminated upon expiration or termination of this Agreement.

\\r\\n

Expiration Consolidation.  You understand and acknowledge the expiration consolidation service may only be used to consolidate the expiration of .com and .net domain names. The service may not be used to consolidate domains that are on Registrar HOLD, Registry HOLD, or pending Transfer status. You acknowledge the service may only be used to push the expiration date of Your domains forward in time, at least one (1) month forward and no more than ten (10) years forward, and then, only for a period lasting less than twelve (12) months. Once the service has been used to consolidate domains, the new expiration date may not be reversed. To ensure the service is not abused or used as an alternative to renewals, you may only use the service on each domain once in any 12-month period. The service may only be used on domain names that have not passed their expiration date. In order to change the expiration date again, You will be required to renew the domain name first.  You further understand and acknowledge the service may only be used to coordinate domains where we are the registrar of record. Domains not registered with us must be transferred before we can perform the Service. 

\\r\\n

\\r\\n

Backordering/Monitoring.  You agree a domain name that has expired shall be subject first to a grace period of twelve (12) days, followed by the ICANN-mandated redemption grace period of thirty (30) days. During this period of time, the current domain name registrant may renew the domain name and retain ownership. We do not guarantee your backorder will result in you obtaining the domain name and expressly reserves the right to (a) refuse additional backorders or (b) cancel existing backorders at any time for any reason.  If your backorder is refused or cancelled, we agree to promptly refund any fees paid for such domain name backorder. The domain name may also be placed in a secondary market for resale through the Auctions® service.  After your first year of Auctions membership, you agree that unless otherwise advised, we will automatically renew your Auctions membership using the payment method you have on file for so long as your backorder credit is active. You may learn more about Auctions by visiting the Auctions website. The domain name may also be subject to a drop pool process before it is available for purchasing. You understand we and our registrar affiliates use our services, including backordering.  Therefore, the domain name may be registered with a different registrar, but can be managed through your account.  By using the Services, you will be able to, among other things:

\\r\\n
    \\r\\n
  1. Backorder any domain name under the top level domains .COM, .NET, .US, .BIZ, .INFO, .ORG, .MOBI. A backorder for a domain name will include the price of up to a one-year domain name registration. Should you successfully backorder any domain name, you will be subject to the terms and conditions of the Domain Name Registration and related agreements, which are incorporated herein by reference.
  2. \\r\\n
  3. Change your backorder until you obtain a domain name. You will have the opportunity to change the credit to a different domain name until you successfully capture one. After three (3) years, if the credit is not used, we reserves the right to remove the credit.
  4. \\r\\n
  5. Subscribe monthly to an expiring domain name list. You may also choose to purchase a subscription to a list of domain names expiring within the next five (5) days. If you subscribe to the expiring domain name list, you agree the payment method you have on file may be charged on a monthly subscription basis for the term of the Services you purchase.
  6. \\r\\n
  7. Select domain names off the expiring domain name list you would like to register. Each domain name you attempt to backorder will include the price of up to a one-year domain name registration, as set forth in subsection (i) above.
  8. \\r\\n
  9. Monitor your currently registered domain names for changes in registrar, status, expiration date or name servers at no additional cost.
  10. \\r\\n
  11. Subscribe to Domain Alert Pro or monitoring, which enables you to monitor any currently registered domain name, regardless of registrar, for historical tracking of status changes and designation of multiple email notification addresses.
  12. \\r\\n
\\r\\n

\\r\\n

\\r\\n

Transfer Validation. The transfer validation service is provided to help You keep Your domain name secure. By choosing to use the service, You are making an explicit and voluntary request to us to deny all attempts to transfer Your domain name to another registrar, or to move Your domain name to another account, unless You verify each request as described herein. You will provide us with a contact name, phone number and PIN for domain transfer validations. You will be contacted by us when a domain transfer is requested for a domain name in Your account. When we receive a transfer request, we will call You to verify the transfer request. If we cannot reach You with seventy-two (72) hours of receipt of the transfer request, the transfer will be denied. If You do not provide the proper PIN, the transfer will be denied. When we receive a change of account request, we will call You to verify the change request. If we cannot reach You with seventy-two (72) hours of receipt of the change request, the change will be denied. If You do not provide the proper PIN, the change will be denied. Availability of Services are subject to the terms and conditions of this Agreement and each of our policies and procedures. We shall use commercially reasonable efforts to attempt to provide certain portions of the Services on a twenty-four (24) hours a day, seven (7) days a week basis throughout the term of this Agreement and other portions of the service, during normal business hours. You acknowledge and agree that from time to time the Services may be inaccessible or inoperable for any reason, including, without limitation: (i) equipment malfunctions; (ii) periodic maintenance procedures or repairs that we may undertake from time to time; or (iii) causes beyond the reasonable control of us or that are not reasonably foreseeable by us, including, without limitation, interruption or failure of telecommunication or digital transmission links, hostile network attacks, network congestion or other failures. You acknowledge and agree that we has no control over the availability of the service on a continuous or uninterrupted basis.

\\r\\n

\\r\\n

12. PRE-REGISTRATIONS

\\r\\n

If you submit an application for pre-registration of a domain name, Azure does not guarantee that the name will be secured for you, or that you will have immediate access to the domain name if secured.  Azure may use third-party service providers for the pre-registration services.

\\r\\n

13. PROVISIONS SPECIFIC TO .BIZ REGISTRATIONS

\\r\\n

Domain Name Dispute Policy.  If you reserved or registered a .BIZ domain name through us, in addition to our Dispute Resolution Policy, you hereby acknowledge that you have read and understood and agree to be bound by the terms and conditions of the Restrictions Dispute Resolution Policy applicable to the .biz TLD.

\\r\\n

The RDRP sets forth the terms under which any allegation that a domain name is not used primarily for business or commercial purposes shall be enforced on a case-by-case basis by an independent ICANN-accredited dispute provider. Registry Operator will not review, monitor, or otherwise verify that any particular domain name is being used primarily for business or commercial purposes or that a domain name is being used in compliance with the SUDRP or UDRP processes.

\\r\\n

One Year Registration.  If you are registering a .BIZ domain name and you elect to take advantage of special pricing applicable to one-year registrations, we will automatically renew your domain name for an additional one-year period at the end of the first year term by taking payment from the Payment Method you have on file, unless you notify us that you do not wish to renew. You will be notified and given the opportunity to accept or decline the one-year renewal prior to your domain name expiration date. In the event you decide not to renew your one-year .BIZ domain name for a second year, your domain name registration will automatically revert back to us and we will gain full rights of registration to such domain name. You agree that if you delete or transfer your .BIZ domain name during the first year, you will automatically be charged the second year renewal fees.

\\r\\n

\\r\\n

14. PROVISIONS SPECIFIC TO .INFO REGISTRATIONS 

\\r\\n

One Year Registration.  If you are registering a .INFO domain name and you elect to take advantage of special pricing applicable to one-year registrations, we will automatically renew your domain name for an additional one-year period at the end of the first year term by taking payment from the Payment Method you have on file, unless you notify us that you do not wish to renew. You will be notified and given the opportunity to accept or decline the one-year renewal prior to your domain name expiration date. In the event you decide not to renew your one-year .INFO domain name for a second year, your domain name registration will automatically revert back to us and we will gain full rights of registration to such domain name. You agree that if you delete or transfer your .INFO domain name during the first year, you will automatically be charged the second year renewal fees.

\\r\\n

15. PROVISIONS SPECIFIC TO .MOBI REGISTRATIONS 

\\r\\n

Instant Mobilizer. You are hereby granted a personal, revocable, non-exclusive, non-transferable, non-assignable, non-sublicensable license to use the Instant Mobilizer service (“Service”), provided, however, You abide by the terms and conditions set forth. You shall not alter, modify, adapt or translate the whole or part of the Service in any way whatsoever. You may not create derivative works based on the Service. You may not rent, lease, assign, dispose of, novate, sub-license or otherwise transfer any of its rights to use the Service to any third party.  In the event that the volume of traffic to You from Your use of the Service is sufficient so as to jeopardize the provision of Service for other end users, we and our licensors reserve the right to, at its sole discretion, permanently or temporarily, discontinue Your use of the Service. For the avoidance of doubt, the volume of traffic generated by You should not exceed two thousand (2,000) page views per day.  You acknowledge and agree the text \\\"Instant Mobilizer from dotMobi\\\" or equivalent, will be inserted at the footer of Your site.  In the event a dotMobi domain to which the Service is being provided is transferred to another domain name registrar, the Service will be interrupted on that dotMobi domain, and Service will not be restored if the new registrar does not offer the Service. 

\\r\\n

\\r\\n

16. PROVISIONS SPECIFIC TO .NAME REGISTRATIONS 

\\r\\n

\\r\\n

17. PROVISIONS SPECIFIC TO .REISE REGISTRATIONS

\\r\\n

Domain Names registered in .REISE should be used for purposes dedicated to travel topics within six months following initial Registration, e.g. utilized on the Internet or otherwise used to perform a function.

\\r\\n

18. PROVISIONS SPECIFIC TO .SEXY REGISTRATIONS

\\r\\n

You shall not permit content unsuitable for viewing by a minor to be viewed from the main or top-level directory of a .SEXY domain name. For purposes of clarity, content viewed at the main or top-level directory of a .SEXY domain name is the content immediately visible if a user navigates to http://example.sexy or http://www.example.sexy. No restrictions apply to the content at any other page or subdirectory addressed by a .SEXY Registered Name. 

\\r\\n

19. COUNTRY CODE TOP LEVEL DOMAINS

\\r\\n

You represent and warrant that you meet the eligibility requirements of each ccTLD you apply for. You further agree to be bound by any registry rules, policies, and agreements for that particular ccTLD. These may include, but are not limited to, agreeing to indemnify the ccTLD provider, limiting the liability of the ccTLD provider, and requirements that any disputes be resolved under that particular country's laws.

\\r\\n

(A) PROVISIONS SPECIFIC TO .AU REGISTRATIONS 

\\r\\n

.au Registrations (to include com.au, net.au and org.au) are governed by the following additional terms and conditions:

\\r\\n

auDA. auDA means .au Domain Administration Limited ACN 079 009 340, the .au domain names administrator.  The Registrar acts as agent for auDA for the sole purpose, but only to the extent necessary, to enable auDA to receive the benefit of rights and covenants conferred to it under this Agreement. auDA is an intended third party beneficiary of this agreement.

\\r\\n

auDA Published Policy.  auDA Published Policies means those specifications and policies established and published by auDA from time to time at http://www.auda.org.au.  You must comply with all auDA Published Policies, as if they were incorporated into, and form part of, this Agreement. In the event of any inconsistency between any auDA Published Policy and this Agreement, then the auDA Published Policy will prevail to the extent of such inconsistency.  You acknowledge that under the auDA Published Policies: (1) there are mandatory terms and conditions that apply to all domain names; (2) licences, and such terms and conditions are incorporated into, and form part of, this Agreement; (3) You are bound by, and must submit to, the .au Dispute Resolution Policy; and (4) auDA may delete or cancel the registration of a .au domain name. 

\\r\\n

auDA's Liabilities and Indemnity.  To the fullest extent permitted by law, auDA will not be liable to Registrant for any direct, indirect, consequential, special, punitive or exemplary losses or damages of any kind (including, without limitation, loss of use, loss or profit, loss or corruption of data, business interruption or indirect costs) suffered by Registrant arising from, as a result of, or otherwise in connection with, any act or omission whatsoever of auDA, its employees, agents or contractors. Registrant agrees to indemnify, keep indemnified and hold auDA, its employees, agents and contractors harmless from all and any claims or liabilities, arising from, as a result of, or otherwise in connection with, Registrant's registration or use of its .au domain name. Nothing in this document is intended to exclude the operation of Trade Practices Act 1974.

\\r\\n

(B) PROVISIONS SPECIFIC TO .CA REGISTRATIONS

\\r\\n

You acknowledge and agree that registration of your selected domain name in your first application to CIRA shall not be effective until you have entered into and agreed to be bound by CIRA's Registrant Agreement.

\\r\\n

CIRA Certified Registrar.  The registrar shall immediately give notice to you in the event that it is no longer a CIRA Certified Registrar, has had its certification as a CIRA Certified Registrar suspended or terminated, or the Registrar Agreement between CIRA and the Registrar is terminated or expires. CIRA may post notice of such suspension, termination, or expiry on its website and may, if CIRA deems appropriate, give notice to the registrants thereof. In the event that the registrar is no longer a CIRA Certified Registrar, has had its certification as a CIRA Certified Registrar suspended or terminated or in the event the Registrar Agreement between CIRA and the Registrar is terminated or expires, you shall be responsible for changing your Registrar of Record to a new CIRA Certified Registrar within thirty (30) days of the earlier of notice thereof being given to you by (i) the Registrar or (ii) CIRA in accordance with CIRA's then current Registry PRP; provided, however, that if any of your domain name registrations are scheduled to expire within thirty (30) days of the giving of such notice, then you shall have thirty (30) days from the anniversary date of the registration(s), to register with a new CIRA certified registrar and to renew such domain name registration(s) in accordance with the Registry PRP.

\\r\\n

You acknowledge and agree that should there be insufficient funds prepaid by the registrar in the CIRA Deposit Account to be applied in payment of any fees, CIRA may in its sole discretion stop accepting applications for domain name registrations from the registrar, stop effecting registrations of domain names and transfers, renewals, modifications, and cancellations requested by the registrar and stop performing other billable transactions requested by the registrar not paid in full and CIRA may terminate the Registrar Agreement between CIRA and the Registrar.

\\r\\n

.CA ASCII and IDN domain variants are bundled and reserved for a single registrant.  Registrants are not required to register all variants in a bundle, but all registered variants must be registered and managed at a single registrar. Each variant registered will incur a registration fee.  In addition, when registering multiple .CA domain (ASCII and IDN) variants in a bundle, your registrant information must be identical.  If variants are registered at other registrars or if registrant information does not match, it may result in an \\\"unavailable\\\" search result, delayed or failed registration. If information does not match, validation is required and may take up to seven business days and delay availability of domain. 

\\r\\n

(C) PROVISIONS SPECIFIC TO .CN REGISTRATIONS 

\\r\\n

.CN is a restricted TLD – applications are subject to both a domain name check and real name verification as required by the People’s Republic of China.  Registrations in .CN are therefore subject to the following additional terms:

\\r\\n

Verification, Registration and Activation.  If a domain name is not permitted to be registered by the Chinese government, as determined by us, the Registry Operator and/or a 3rd party provider utilized for such services and determinations, in either party’s discretion, the application for registration will not be successful.  In such event, the name will be deleted and you will be eligible for a refund as further described below.

\\r\\n

If permitted, then the Registration may proceed, but a .CN domain name may not be activated (i.e., it will not resolve in the Internet) unless and until you have submitted (via the process described during registration) valid documents required of us and the Registry to perform real name verification.  The following are acceptable forms of documents for the purpose of verification:

\\r\\n
    \\r\\n
  • China: Resident ID, temporary resident ID, business license or organization code certificate
  • \\r\\n
  • Hong Kong/Macau: Resident ID, driver’s license, passport or business license
  • \\r\\n
  • Singapore: Driver’s license, passport or business license
  • \\r\\n
  • Taiwan: Resident ID, driver’s license or business license
  • \\r\\n
  • Other Countries/Regions: Driver’s license or passport
  • \\r\\n
\\r\\n

Documents submitted to us are used by us and shared with the Registry solely for the purpose of real name verification, and are otherwise subject to our Privacy Policy.  By registering a .CN domain, you expressly agree that your data may be stored on servers in the U.S., or otherwise outside of the People's Republic of China.

\\r\\n

Refunds.  Refunds for .CN Registrations will only be allowed where (i) registration of the applied for domain name is not permitted by the Chinese government; or (ii) you notify us of your intent to cancel for any reason within the first five (5) days after the Registration (i.e., after it is deemed permissible by the Chinese government).  For the avoidance of doubt, refunds will not be permitted under any circumstances after five (5) days from the date of Registration, including, for example, in the event real name verification is not successful or if the Chinese government determines after Registration that the domain name should not have been registered (and directs us to delete).

\\r\\n

(D) PROVISIONS SPECIFIC TO .JP REGISTRATIONS

\\r\\n

Registration Restrictions.  You represent and warrant that you have a local presence in Japan with a home or office address. You agree that certain domain names are reserved and can only be registered by certain parties. These include: (i) TLDs, other than ccTLDs, as determined by ICANN; (ii) geographical-type .JP domain names that are defined as metropolitan, prefectural, and municipal labels; (iii) names of primary and secondary educational organizations; (iv) names of organizations related to Internet management; (v) names required for .JP domain name operations; and (vi) character strings which may be confused with ASCII-converted Japanese domain names. The complete list of .JP Reserved Domains is available here

\\r\\n

20. ENGLISH LANGUAGE CONTROLS

\\r\\n

This Agreement, along with all policies and the applicable product agreements identified above and incorporated herein by reference (collectively, the “Agreement”), is executed in the English language. To the extent any translation is provided to you, it is provided for convenience purposes only, and in the event of any conflict between the English and translated version, where permitted by law, the English version will control and prevail. Where the translated version is required to be provided to you and is to be considered binding by law (i) both language versions shall have equal validity, (ii) each party acknowledges that it has reviewed both language versions and that they are substantially the same in all material respects, and (iii) in the event of any discrepancy between these two versions, the translated version may prevail, provided that the intent of the Parties has been fully taken into consideration. 

\\n
\\n
\\n\\nRevised: 11/29/16
\\nCopyright © 2000-2016 All Rights Reserved.\\n
\\n
\\n
\",\"url\":\"http://www.secureserver.net/agreements/ShowDoc.aspx?pageid=reg_sa&pl_id=510456\"},{\"agreementKey\":\"DNPA\",\"title\":\"Domain Name Proxy Agreement\",\"content\":\"\\n\\n\\n\\n\\n
\\n\\n\\n\\n\\n\\n\\n
\\nDomain Name Proxy Agreement\\n
\\n

Last Revised: November 23, 2016

\\n

Please read this Domain Name Proxy Agreement (\\\"Agreement\\\") carefully. By using the Services and/or website of Domains By Proxy, LLC, a Delaware limited liability company (\\\"DBP\\\"), You (as defined below) agree to all the terms and conditions set forth both herein and in the DBP privacy policy, which is incorporated by reference and can be found by clicking here.  You acknowledge that DBP may amend this Agreement at any time upon posting the amended terms on its website, and that any new, different or additional features changing the services provided by DBP will automatically be subject to this Agreement. If You do not agree to be bound by, or if You object to, the terms and conditions of this Agreement and any amendments hereto, do not use or access DBP's services. Continued use of DBP's services and its website after any such changes to this Agreement have been posted, constitutes Your acceptance of those changes.

\\r\\n

This Agreement is by and between DBP and you, your heirs, assigns, agents and contractors (\\\"You\\\") and is made effective as of the date of electronic execution. This Agreement sets forth the terms and conditions of Your relationship with DBP and Your use of DBP's services and represents the entire Agreement between You and DBP. By using DBP's Services, You acknowledge that You have read, understand and agree to be bound by all the terms and conditions of this Agreement, and You further agree to be bound by the terms of this Agreement for transactions entered into by:

\\r\\n
    \\r\\n
  1. You on Your behalf;
  2. \\r\\n
  3. Anyone acting as Your agent; and
  4. \\r\\n
  5. Anyone who uses the account You have established with DBP, whether or not the transactions were on Your behalf and/or authorized by You.
  6. \\r\\n
\\r\\n

You agree You will be bound by representations made by third parties acting on Your behalf, which either use or purchase services from DBP. You further agree that DBP will not be bound by statements of a general nature on DBP's website or DBP promotional materials. You further agree to abide by the terms and conditions promulgated by the Internet Corporation for Assigned Names and Numbers (\\\"ICANN\\\") (including the Uniform Domain Name Dispute Resolution Policy (\\\"Dispute Resolution Policy\\\") and Your Registrar (i.e., the ICANN-accredited person or entity through which You register a domain name).

\\r\\n

1. description of DBP's private registration services

\\r\\n

When You subscribe to DBP's private registration service through a DBP-affiliated Registrar, each available domain name registration You designate will thereafter be registered in the name of DBP, as Registrant. In exchange for DBP becoming the Registrant of each domain name registration on Your behalf, DBP shall keep Your name, postal address, email address, phone and fax numbers confidential, subject to Section 4 of this Agreement. When DBP becomes the Registrant of Your domain name registration, the following information (and not Your personal information) will be made publicly available in the \\\"Whois\\\" directory as determined by ICANN policy:

\\r\\n
    \\r\\n
  1. DBP's name as the Registrant of the domain name and a proxy email address, phone number and postal address for the Registrant's contact information;
  2. \\r\\n
  3. A proxy postal address and phone number for the domain name registration's technical contact;
  4. \\r\\n
  5. A proxy email address, postal address and phone number for the domain name registration's administrative contact;
  6. \\r\\n
  7. A proxy email address, postal address and phone number for the domain's name registration's billing contact;
  8. \\r\\n
  9. The primary and secondary domain name servers You designate for the domain name;
  10. \\r\\n
  11. The domain name's original date of registration and expiration date of the registration; and
  12. \\r\\n
  13. The identity of the Registrar.
  14. \\r\\n
\\r\\n

2. full benefits of domain registration retained by you

\\r\\n

Although DBP will show in the \\\"Whois\\\" directory as the Registrant of each domain name registration You designate, You will retain the full benefits of domain name registration with respect to each such domain name registration, including, subject to Section 4 below:

\\r\\n
    \\r\\n
  1. The right to sell, transfer or assign each domain name registration, which shall require cancellation of the DBP services associated with each such domain name registration;
  2. \\r\\n
  3. The right to control the use of each domain name registration, including designating the primary and secondary domain name servers to which each domain name points;
  4. \\r\\n
  5. The right to cancel each domain name registration;
  6. \\r\\n
  7. The right to cancel the DBP services associated with each domain name registration and/or Your privacy services with DBP so that Your contract information is listed in the \\\"Whois\\\" directory; and
  8. \\r\\n
  9. The right to renew each domain name registration upon its expiration, subject to Your Registrar's applicable rules and policies.
  10. \\r\\n
\\r\\n

3. PERSONAL INFORMATION AND your notification obligations; representation and warranties; ACCOUNT SECURITY

\\r\\n

Personal Information and Your Notification Obligations 

\\r\\n

You agree that for each domain name for which DBP becomes the Registrant on Your behalf, You will provide accurate and current information as to:

\\r\\n
    \\r\\n
  1. Your name, the email address, postal address, phone and fax numbers for the domain name registration's Registrant contact;
  2. \\r\\n
  3. The email address, postal address, phone and fax numbers for the domain name registration's technical contact;
  4. \\r\\n
  5. The email address, postal address, phone and fax numbers for the domain name registration's administrative contact;
  6. \\r\\n
  7. The email address, postal address, phone and fax numbers for the domain name registration's billing contact; and
  8. \\r\\n
  9. You agree to provide government issued photo identification and/or government issued business identification as required for verification of identity when requested.
  10. \\r\\n
\\r\\n

You agree to:

\\r\\n
    \\r\\n
  1. Notify DBP within three (3) calendar days when any of the personal information You provided upon subscribing to DBP's services, changes;
  2. \\r\\n
  3. Respond within three (3) calendar days to any inquiries made by DBP to determine the validity of personal information provided by You; and
  4. \\r\\n
  5. Timely respond to email messages DBP sends to You regarding correspondence DBP has received that is either addressed to or involves You and/or Your domain name registration, as more fully set forth in Section 5(c) below.
  6. \\r\\n
  7. To allow DBP to act as your Designated Agent (as that term is defined below) in instances when DBP services are added to or cancelled from your domain name and for the purpose of facilitating a change of registrant request (as further described below). 
  8. \\r\\n
\\r\\n

It is Your responsibility to keep Your personal information current and accurate at all times.

\\r\\n

Renewals

\\r\\n

You agree DBP, as Registrant, will arrange for Your Registrar to charge the credit card You have on file with the Registrar, at the Registrar's then current rates.

\\r\\n

If for any reason DBP and/or the Registrar for Your domain name is unable to charge Your credit card for the full amount of the service provided, or if DBP and/or the Registrar is charged back for any fee it previously charged to the credit card You provided, You agree that DBP and/or the Registrar may, without notice to You, pursue all available remedies in order to obtain payment, including but not limited to immediate cancellation of all services DBP provides to You.

\\r\\n

Representations and Warranties

\\r\\n

You warrant that all information provided by You to DBP is truthful, complete, current and accurate. You also warrant that You are using DBP's private registration services in good faith and You have no knowledge of Your domain name infringing upon or conflicting with the legal rights of a third party or a third party's trademark or trade name. You also warrant the domain name being registered by DBP on Your behalf will not be used in connection with any illegal or morally objectionable activity (as defined below in Section 4), or, in connection with the transmission of Spam, or that contains or installs any viruses, worms, bugs, Trojan horses or other code, files or programs designed to, or capable or, disrupting, damaging or limiting the functionality of any software or hardware.

\\r\\n

Account Security

\\r\\n

You agree You are entirely responsible for maintaining the confidentiality of Your customer number/login ID and password (\\\"Account Access Information\\\").  You agree to notify DBP immediately of any unauthorized use of Your account or any other breach of security.  You agree DBP will not be liable for any loss that You may incur as a result of someone else using Your Account Access Information, either with or without Your knowledge.  You further agree You could be held liable for losses incurred by DBP or another party due to someone else using Your Account Access Information.  For security purposes, You should keep Account Access Information in a secure location and take precautions to prevent others from gaining access to Your Account Access Information.  You agree that You are entirely responsible for all activity in Your account, whether initiated by You, or by others.  DBP specifically disclaims liability for any activity in Your account, regardless of whether You authorized the activity.

\\r\\n

Designated Agency and Change of Registrant Information

\\r\\n

“DESIGNATED AGENT” MEANS AN INDIVIDUAL OR ENTITY THAT THE PRIOR REGISTRANT OR NEW REGISTRANT EXPLICITLY AUTHORIZES TO APPROVE A CHANGE OF REGISTRANT REQUEST ON ITS BEHALF.  IN THE CASE OF DBP SERVICES, A CHANGE OF REGISTRANT REQUEST MAY ALSO ARISE DUE TO INSTANCES WHERE DBP SERVICES ARE ADDED, OR REMOVED, FROM A DOMAIN NAME.  FOR THE PURPOSE OF FACILITATING ANY SUCH CHANGE REQUEST, AND IN ACCORDANCE WITH ICANN'S CHANGE OF REGISTRANT POLICY, YOU AGREE TO APPOINT DBP AS YOUR DESIGNATED AGENT FOR THE SOLE PURPOSE OF EXPLICITLY CONSENTING TO MATERIAL CHANGES OF REGISTRATION CONTACT INFORMATION ON YOUR BEHALF.

\\r\\n

4. DBP's rights to deny, suspend, terminate service and to disclose your personal information

\\r\\n

You understand and agree that DBP has the absolute right and power, in its sole discretion and without any liability to You whatsoever, to:

\\r\\n
    \\r\\n
  1. Cancel the privacy service (which means that Your information will be available in the \\\"Whois\\\" directory) and/or reveal Your name and personal information that You provided to DBP:  
    A. When required by law, in the good faith belief that such action is necessary in order to conform to the edicts of the law or in the interest of public safety;
    B. To comply with legal process served upon DBP or in response to a reasonable threat of litigation against DBP (as determined by DBP in its sole and absolute discretion); or
    C. To comply with ICANN rules, policies, or procedures.
  2. \\r\\n
  3. Resolve any and all third party claims, whether threatened or made, arising out of Your use of a domain name for which DBP is the registrant listed in the \\\"Whois\\\" directory on Your behalf; or
  4. \\r\\n
  5. Take any other action DBP deems necessary:
    A. In the event you breach any provision of this Agreement or the DBP Anti-Spam Policy;
    B. To protect the integrity and stability of, and to comply with registration requirements, terms, conditions and policies of, the applicable domain name Registry and/or Registry Provider;
        C. To comply with any applicable laws, government rules or requirements, subpoenas, court orders or requests of law enforcement; 
    D. To comply with ICANN's Dispute Resolution Policy or ICANN's Change of Registrant Policy;
    E. To avoid any financial loss or legal liability (civil or criminal) on the part of DBP, its parent companies, subsidiaries, affiliates, shareholders, agents, officers, directors and employees;
    F. If the domain name for which DBP is the registrant on Your behalf violates or infringes a third party's trademark, trade name or other legal rights; and
    G. If it comes to DBP's attention that You are using DBP's services for purposes of engaging in, participating in, sponsoring or hiding Your involvement in, illegal or morally objectionable activities, including but not limited to, activities which are designed, intended to or otherwise:
  6. \\r\\n
\\r\\n
1. Appeal purely to the prurient interests of third parties;
2. Defame, embarrass, harm, abuse, threaten, or harass third parties;
3. Violate state, federal or international law;
4. Involve hate crimes, terrorism and child pornography;
5. Are tortious, vulgar, obscene, invasive of a third party's privacy, racially, ethnically, or otherwise objectionable;
6. Impersonate the identity of a third party;
7. Harm minors in any way; or
8. Relate to or transmit viruses, Trojan Horses, access codes, backdoors, worms, timebombs or any other code, routine, mechanism, device or item that corrupts, damages, impairs, interferes with, intercepts or misappropriates any software, hardware, firmware, network, system, data or personally identifiable information.
\\r\\n

You further understand and agree that if DBP is named as a defendant in, or investigated in anticipation of, any legal or administrative proceeding arising out of Your domain name registration or Your use of DBP's services, Your private registration service may be canceled, which means the domain name registration will revert back to You and Your identity will therefore be revealed in the Whois directory as Registrant.

\\r\\n

In the event:

\\r\\n
    \\r\\n
  1. DBP takes any of the actions set forth in subsection i, ii, or iii above or section 5; and/or
  2. \\r\\n
  3. You elect to cancel DBP's services for any reason --
  4. \\r\\n
\\r\\n

Neither DBP nor your Registrar will refund any fees paid by You whatsoever.

\\r\\n

5. communications forwarding

\\r\\n

a. Correspondence Forwarding

\\r\\n

Inasmuch as DBP's name, postal address and phone number will be listed in the Whois directory, You agree DBP will review and forward communications addressed to Your domain name that are received via email, certified or traceable courier mail (such as UPS, FedEx, or DHL), or first class U.S. postal mail. You specifically acknowledge DBP will not forward to You first class postal mail (other than legal notices), \\\"junk\\\" mail or other unsolicited communications (whether delivered through email, fax, postal mail or telephone), and You further authorize DBP to either discard all such communications or return all such communications to sender unopened. You agree to waive any and all claims arising from Your failure to receive communications directed to Your domain name but not forwarded to You by DBP.

\\r\\n

b. Email Forwarding

\\r\\n

The Whois directory requires an email address for every purchased domain name registration. When You purchase a private domain registration, DBP creates a private email address for that domain name, \\\"@domainsbyproxy.com\\\". Thereafter, when messages are sent to that private email address, DBP handles them according to the email preference You selected for that particular domain name. You have three (3) email preferences from which to choose. You can elect to:

\\r\\n
    \\r\\n
  1. Have all of the messages forwarded;
  2. \\r\\n
  3. Have all of the messages filtered for Spam and then forwarded; or
  4. \\r\\n
  5. Have none of the messages forwarded.
  6. \\r\\n
\\r\\n

As with all communications, You agree to waive any and all claims arising from Your failure to receive email directed to Your domain name but not forwarded to You by DBP.

\\r\\n

c. Notifications Regarding Correspondence and Your Obligation to Respond

\\r\\n

When DBP receives certified or traceable courier mail or legal notices addressed to Your domain name, in most cases, DBP will attempt to forward the mail to you via email. If You do not respond to the DBP email and/or the correspondence DBP has received regarding Your domain name registration concerns a dispute of any kind or otherwise requires immediate disposition, DBP may immediately reveal Your identity and/or cancel the DBP private registration service regarding either the domain name registration(s) in question. This means the Whois directory will revert to displaying Your name, postal address, email address and phone number that you provided to DBP.

\\r\\n

d. Additional Administrative Fees

\\r\\n

DBP reserves the right to charge You reasonable \\\"administrative fees\\\" or \\\"processing fees\\\" for (i)  tasks DBP may perform outside the normal scope of its Services, (ii) additional time and/or costs DBP may incur in providing its Services, and/or (iii) Your non-compliance with the Agreement (as determined by DBP in its sole and absolute discretion). Typical administrative or processing fee scenarios include, but are not limited to, (i) customer service issues that require additional personal time and attention; (ii) disputes that require accounting or legal services, whether performed by DBP staff or by outside firms retained by DBP; (iii) recouping any and all costs and fees, including the cost of Services, incurred by DBP as the result of chargebacks or other payment disputes brought by You, Your bank or Payment Method processor.  These administrative fees or processing fees will be billed to the Payment Method You have on file with Your Registrar.

\\r\\n

You agree to waive the right to trial by jury in any proceeding that takes place relating to or arising out of this Agreement.

\\r\\n

6. limitations of liability

\\r\\n

UNDER NO CIRCUMSTANCES SHALL DBP BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, SPECIAL, OR CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER RELATED TO THIS AGREEMENT, YOUR DOMAIN NAME REGISTRATION, DBP'S SERVICES, USE OR INABILITY TO USE THE DBP WEBSITE OR THE MATERIALS AND CONTENT OF THE WEBSITE OR ANY OTHER WEBSITES LINKED TO THE DBP WEBSITE OR YOUR PROVISION OF ANY PERSONALLY IDENTIFIABLE INFORMATION TO DBP OR ANY THIRD PARTY. THIS LIMITATION APPLIES REGARDLESS OF WHETHER THE ALLEGED LIABILITY IS BASED ON CONTRACT, TORT, WARRANTY, NEGLIGENCE, STRICT LIABILITY OR ANY OTHER BASIS, EVEN IF DBP HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR SUCH DAMAGES WERE REASONABLY FORESEEABLE. BECAUSE CERTAIN JURISDICTIONS DO NOT PERMIT THE LIMITATION OR ELIMINATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, DBP'S LIABILITY IN SUCH JURISDICTIONS SHALL BE LIMITED TO THE SMALLEST AMOUNT PERMITTED BY LAW.

\\r\\n

YOU FURTHER UNDERSTAND AND AGREE THAT DBP DISCLAIMS ANY LOSS OR LIABILITY RESULTING FROM:

\\r\\n
    \\r\\n
  1. THE INADVERTENT DISCLOSURE OR THEFT OF YOUR PERSONAL INFORMATION;
  2. \\r\\n
  3. ACCESS DELAYS OR INTERRUPTIONS TO OUR WEBSITE OR THE WEBSITES OF OUR AFFILIATED REGISTRARS;
  4. \\r\\n
  5. DATA NON-DELIVERY OF MIS-DELIVERY BETWEEN YOU AND DBP;
  6. \\r\\n
  7. THE FAILURE FOR WHATEVER REASON TO RENEW A PRIVATE DOMAIN NAME REGISTRATION;
  8. \\r\\n
  9. THE UNAUTHORIZED USE OF YOUR DBP ACCOUNT OR ANY OF DBP'S SERVICES;
  10. \\r\\n
  11. ERRORS, OMISSIONS OR MISSTATEMENTS BY DBP;
  12. \\r\\n
  13. DELETION OF, FAILURE TO STORE, FAILURE TO PROCESS OR ACT UPON EMAIL MESSAGES FORWARDED TO EITHER YOU OR YOUR PRIVATE DOMAIN NAME REGISTRATION;
  14. \\r\\n
  15. PROCESSING OF UPDATED INFORMATION REGARDING YOUR DBP ACCOUNT; AND/OR
  16. \\r\\n
  17. ANY ACT OR OMISSION CAUSED BY YOU OR YOUR AGENTS (WHETHER AUTHORIZED BY YOU OR NOT).
  18. \\r\\n
\\r\\n

7. indemnity

\\r\\n

You agree to release, defend, indemnify and hold harmless DBP, its parent companies, subsidiaries, affiliates, shareholders, agents, directors, officers and employees and Your Registrar, from and against any and all claims, demands, liabilities, losses, damages or costs, including reasonable attorneys' fees, arising out of or related in any way to this Agreement, the services provided hereunder by DBP, the DBP website, Your account with DBP, Your use of Your domain name registration, and/or disputes arising in connection with the dispute policy.

\\r\\n

8. DBP warranty disclaimer

\\r\\n

DBP, ITS PARENT COMPANIES, SUBSIDIARIES, AFFILIATES, SHAREHOLDERS, AGENTS, DIRECTORS, OFFICERS, AND EMPLOYEES EXPRESSLY DISCLAIM ALL REPRESENTATIONS AND WARRANTIES OF ANY KIND IN CONNECTION WITH THIS AGREEMENT, THE SERVICE PROVIDED HEREUNDER, THE DBP WEBSITE OR ANY WEBSITES LINKED TO THE DBP WEBSITE, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL DBP SERVICES, AS WELL AS THE DBP WEBSITE, ARE PROVIDED \\\"AS IS\\\". YOUR SUBSCRIPTION TO AND USE OF DBP'S SERVICES AND ITS WEBSITE ARE ENTIRELY AT YOUR RISK. SOME JURISDICTIONS DO NOT ALLOW THE DISCLAIMER OF IMPLIED WARRANTIES, IN WHICH EVENT THE FOREGOING DISCLAIMER MAY NOT APPLY TO YOU.

\\r\\n

9. copyright and trademark

\\r\\n

You understand and agree that all content and materials contained in this Agreement, the Privacy Policy and the DBP website found here , are protected by the various copyright, patent, trademark, service mark and trade secret laws of the United States, as well as any other applicable proprietary rights and laws, and that DBP expressly reserves its rights in and to all such content and materials.

\\r\\n

You further understand and agree You are prohibited from using, in any manner whatsoever, any of the afore-described content and materials without the express written permission of DBP. No license or right under any copyright, patent, trademark, service mark or other proprietary right or license is granted to You or conferred upon You by this Agreement or otherwise.

\\r\\n

10. miscellaneous provisions

\\r\\n

a. Severability; Construction; Entire Agreement

\\r\\n

If any part of this Agreement shall be held to be illegal, unenforceable or invalid, in whole or in part, such provision shall be modified to the minimum extent necessary to make it legal, enforceable and valid, and the legality, enforceability and validity of the remaining provisions of this Agreement shall not be affected or impaired. The headings herein will not be considered a part of this Agreement. You agree this Agreement, including the policies it incorporates by reference, constitute the complete and only Agreement between You and DBP regarding the services contemplated herein.

\\r\\n

b. Governing Law; Venue; Waiver Of Trial By Jury

\\r\\n

This Agreement shall be governed in all respects by the laws and judicial decisions of Maricopa County, Arizona, excluding its conflicts of laws rules. Except as provided immediately below, You agree that any action relating to or arising out of this Agreement, shall be brought exclusively in the courts of Maricopa County, Arizona. For the adjudication of domain name registration disputes, you agree to submit to the exclusive jurisdiction and venue of the U.S. District Court for the District of Arizona located in Phoenix, Arizona. You agree to waive the right to trial by jury in any proceeding, regardless of venue, that takes place relating to or arising out of this Agreement.

\\r\\n

c. Notices

\\r\\n

All notices from DBP to You will be sent to the email address You provided to DBP. Notices by email shall be deemed effective twenty-four (24) hours after the email is sent by DBP, unless DBP receives notice that the email address is invalid, in which event DBP may give You notice via first class or certified mail, return receipt requested. All notices from You to DBP shall be sent via certified mail, return receipt requested or traceable courier to:

\\r\\n
      Domains By Proxy, LLC
      Attn: General Counsel
      14455 North Hayden Rd.
      Suite 219
      Scottsdale, AZ 85260
\\r\\n

Notices sent via certified mail or traceable courier shall be deemed effective five (5) days after the date of mailing.

\\r\\n

d. Insurance

\\r\\n

In the unlikely event You lose Your domain name registration to a third party solely as a result of DBP's negligent actions (and absent fraud or other negligent or willful misconduct committed by a third party), You may be insured against such loss through DBP's Professional Liability Insurance Policy, which is currently underwritten by American International Insurance Company. Of course, every claim is subject to the then-carrier's investigation into the facts and circumstances surrounding such claim. In the event You have reason to believe that circumstances exist which warrant the filing of an insurance claim, please send a written notice (specifying the basis for such claim), via certified mail, return receipt requested, to:

\\r\\n
      Domains By Proxy, LLC
      Attn: Insurance Claims
      14455 North Hayden Rd.
      Suite 219
      Scottsdale, AZ 85260
\\r\\n

e. Indemnification

\\r\\n

In the unlikely event You lose Your domain name registration to a third party solely as a result of DBP's willful misconduct, Your Registrar (the \\\"Indemnifying Party\\\") will indemnify and hold You harmless against any losses, damages or costs (including reasonable attorneys' fees) resulting from any claim, action, proceeding, suit or demand arising out of or related to the loss of Your domain name registration. Such indemnification obligations under this Section 10(e) are conditioned upon the following:

\\r\\n
    \\r\\n
  1. That You promptly give both DBP and the Indemnifying Party written notice of the claim, demand, or action and provide reasonable assistance to the Indemnifying Party, at its cost and expense, in connection therewith, and
  2. \\r\\n
  3. That the Indemnifying Party has the right, at its option, to control and direct the defense to any settlement of such claim, demand, or action.
  4. \\r\\n
\\r\\n

Any notice concerning indemnification shall, with respect to DBP, be sent in accordance with Section 10(c) of this Agreement. With respect to Your Registrar, notices regarding indemnification should be sent in accordance with the notification provisions contained in Your Registrar's Domain Name Registration Agreement.

\\r\\n

f. Term of Agreement; Survival

\\r\\n

The terms of this Agreement shall continue in full force and effect as long as DBP is the Registrant for any domain name on Your behalf. Sections 5 (Communications Forwarding), 6 (Limitation of Liability), 7 (Indemnity), 8 (Warranty Disclaimer) and 10 (Miscellaneous Provisions) shall survive any termination or expiration of this Agreement.

\\n
\\n
\\n\\nRevised: 11/23/16
\\nCopyright © 2003-2016 All Rights Reserved.\\n
\\n
\\n
\",\"url\":\"http://www.secureserver.net/agreements/ShowDoc.aspx?pageid=domain_nameproxy&pl_id=510456\"}],\"nextLink\":null,\"id\":null}", - "x-ms-ratelimit-remaining-subscription-writes" : "1191", - "transfer-encoding" : "chunked", - "x-ms-routing-request-id" : "CENTRALUS:20170124T234718Z:e3538123-38ef-4485-bdef-03be09db6ee2", - "date" : "Tue, 24 Jan 2017 23:47:17 GMT", - "vary" : "Accept-Encoding", - "pragma" : "no-cache", + "Date" : "Tue, 01 Sep 2020 05:50:42 GMT", + "x-ms-correlation-request-id" : "cb9bd7c2-e36b-467b-a6a1-fc474e627867", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055042Z:cb9bd7c2-e36b-467b-a6a1-fc474e627867", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "280", + "x-ms-request-id" : "6595972c-f258-48c0-a4e6-69c419379d80", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Web/sites/webapp1-776220ed3/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"Central US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7cd271ec-85c2-46bb-a786-0264096c723c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:50:49 GMT", + "x-ms-correlation-request-id" : "9138cf71-9692-42b3-8d64-bab4a4ba15eb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055050Z:9138cf71-9692-42b3-8d64-bab4a4ba15eb", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "678", + "x-ms-request-id" : "7cd271ec-85c2-46bb-a786-0264096c723c", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce/azureEndpoints/endpoint-4?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e304ed54-bf51-43c8-a63f-55d8d27f861f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:50:53 GMT", + "x-ms-correlation-request-id" : "6e7dbe82-a122-450c-b0bd-9abef583048a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055054Z:6e7dbe82-a122-450c-b0bd-9abef583048a", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "657", + "x-ms-request-id" : "e304ed54-bf51-43c8-a63f-55d8d27f861f", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce/azureEndpoints/endpoint-2?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9693c1a-1bdb-4f7c-8f32-e37746ef4394", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:50:57 GMT", + "x-ms-correlation-request-id" : "4dd1750a-93f6-4981-8a39-5fd391549f9b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055058Z:4dd1750a-93f6-4981-8a39-5fd391549f9b", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "656", + "x-ms-request-id" : "d9693c1a-1bdb-4f7c-8f32-e37746ef4394", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-2\",\"name\":\"endpoint-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed1\",\"target\":\"webapp1-776220ed1.azurewebsites.net\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce/azureEndpoints/endpoint-1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "31be38ed-1302-42ad-bd38-0c0392ff96ec", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", - "cache-control" : "no-cache", - "expires" : "-1", - "x-powered-by" : "ASP.NET", - "x-ms-request-id" : "6d7e6246-8e30-4be6-8ff1-5b50551e96e6", - "x-aspnet-version" : "4.0.30319", - "content-length" : "113930", - "server" : "Microsoft-IIS/8.0", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e3538123-38ef-4485-bdef-03be09db6ee2" - } + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:51:00 GMT", + "x-ms-correlation-request-id" : "166bd72e-0c83-4ed0-81ab-b0cd0de884ea", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055101Z:166bd72e-0c83-4ed0-81ab-b0cd0de884ea", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "656", + "x-ms-request-id" : "31be38ed-1302-42ad-bd38-0c0392ff96ec", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:2074/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_b5e1366440b5/providers/Microsoft.DomainRegistration/domains/jsdkdemo-6b6568170.com?api-version=2015-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce/azureEndpoints/endpoint-3?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null (WebSiteManagementClient, )", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d906cb34-1b47-45d2-9362-4f26c70a584d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:51:12 GMT", + "x-ms-correlation-request-id" : "66588704-0abb-4094-afb9-4a03bad6944e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055113Z:66588704-0abb-4094-afb9-4a03bad6944e", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "656", + "x-ms-request-id" : "d906cb34-1b47-45d2-9362-4f26c70a584d", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d3e2a70-18ad-4983-a819-7b17f097db63", + "Content-Type" : "application/json" + }, "Response" : { - "StatusCode" : "409", - "content-type" : "application/json; charset=utf-8", - "Body" : "{\"error\":{\"code\":\"MissingSubscriptionRegistration\",\"message\":\"The subscription is not registered to use namespace 'Microsoft.DomainRegistration'. See https://aka.ms/rps-not-found for how to register subscriptions.\"}}", - "x-ms-routing-request-id" : "CENTRALUS:20170124T234718Z:08cc98c7-d67e-4012-9b73-ae8d8dcf66ee", - "date" : "Tue, 24 Jan 2017 23:47:17 GMT", - "pragma" : "no-cache", - "x-ms-failure-cause" : "gateway", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", - "cache-control" : "no-cache", - "expires" : "-1", - "x-ms-request-id" : "08cc98c7-d67e-4012-9b73-ae8d8dcf66ee", - "content-length" : "216", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "08cc98c7-d67e-4012-9b73-ae8d8dcf66ee" - } + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:13 GMT", + "x-ms-correlation-request-id" : "5a1e950a-f6e3-4c34-b063-e0db6cf360f6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055113Z:5a1e950a-f6e3-4c34-b063-e0db6cf360f6", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "3315", + "x-ms-request-id" : "6d3e2a70-18ad-4983-a819-7b17f097db63", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-2\",\"name\":\"endpoint-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed1\",\"target\":\"webapp1-776220ed1.azurewebsites.net\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:2074/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_b5e1366440b5?api-version=2017-05-10", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce/azureEndpoints/endpoint-2?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a2fca27-3414-42d1-97dc-f423b8d2ef35", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:14 GMT", + "x-ms-correlation-request-id" : "1c5ddc17-8bc9-42c1-9ebf-541eeaa14fd5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055115Z:1c5ddc17-8bc9-42c1-9ebf-541eeaa14fd5", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "0", + "x-ms-request-id" : "3a2fca27-3414-42d1-97dc-f423b8d2ef35", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce/azureEndpoints/endpoint-1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "89bfdcd1-6e56-4de1-a323-11fe0ae1c988", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:51:17 GMT", + "x-ms-correlation-request-id" : "632e2c6d-e77c-498f-9ea2-661369ef8a5c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055118Z:632e2c6d-e77c-498f-9ea2-661369ef8a5c", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "649", + "x-ms-request-id" : "89bfdcd1-6e56-4de1-a323-11fe0ae1c988", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "386365f4-82dc-434a-9a33-20fd4161535d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:22 GMT", + "x-ms-correlation-request-id" : "13a45a3f-ba0c-42f3-84d2-d9321a15a538", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055122Z:13a45a3f-ba0c-42f3-84d2-d9321a15a538", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2651", + "x-ms-request-id" : "386365f4-82dc-434a-9a33-20fd4161535d", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e8e26ad-0173-49f5-ab76-3d252160093a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:22 GMT", + "x-ms-correlation-request-id" : "7526ec1f-5ce7-4191-931d-0d0d5264355b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055122Z:7526ec1f-5ce7-4191-931d-0d0d5264355b", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2651", + "x-ms-request-id" : "9e8e26ad-0173-49f5-ab76-3d252160093a", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce/azureEndpoints/endpoint-1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "74b4de11-edd7-4b15-b3c6-9d5292eff804", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 05:51:24 GMT", + "x-ms-correlation-request-id" : "9a68d536-8975-43bf-a2b6-df4f5dee9025", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055125Z:9a68d536-8975-43bf-a2b6-df4f5dee9025", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "656", + "x-ms-request-id" : "74b4de11-edd7-4b15-b3c6-9d5292eff804", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "373317fd-0563-454a-8268-dc420f53d50b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:30 GMT", + "x-ms-correlation-request-id" : "e7f1d0bc-08d5-4a2c-b44c-bb995405c4d2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055130Z:e7f1d0bc-08d5-4a2c-b44c-bb995405c4d2", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2658", + "x-ms-request-id" : "373317fd-0563-454a-8268-dc420f53d50b", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d16b0686-2413-4b16-9fa0-92d2e9944ba9", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:30 GMT", + "x-ms-correlation-request-id" : "730cf3ca-9383-46a7-bd0b-5696a05c4d37", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055131Z:730cf3ca-9383-46a7-bd0b-5696a05c4d37", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2658", + "x-ms-request-id" : "d16b0686-2413-4b16-9fa0-92d2e9944ba9", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3897d750-b6a8-45e2-9bde-cb58bccc26e5", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:35 GMT", + "x-ms-correlation-request-id" : "68269854-87fc-41bf-be39-cb635135d661", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055135Z:68269854-87fc-41bf-be39-cb635135d661", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2661", + "x-ms-request-id" : "3897d750-b6a8-45e2-9bde-cb58bccc26e5", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4227f1e-ddc7-4578-b98f-dd9f4f1fa900", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:35 GMT", + "x-ms-correlation-request-id" : "965d51d1-267d-4ecd-8e66-669fdef539b2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055135Z:965d51d1-267d-4ecd-8e66-669fdef539b2", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2661", + "x-ms-request-id" : "b4227f1e-ddc7-4578-b98f-dd9f4f1fa900", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ba9ed48-166e-4ac9-a47c-ac132382d267", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:37 GMT", + "x-ms-correlation-request-id" : "6c4ce5e9-d510-4737-8c15-dbb5c60d82ea", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055138Z:6c4ce5e9-d510-4737-8c15-dbb5c60d82ea", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2629", + "x-ms-request-id" : "2ba9ed48-166e-4ac9-a47c-ac132382d267", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Disabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Disabled\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "93ff97d0-602a-41a8-b6bf-cab65e144f40", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:38 GMT", + "x-ms-correlation-request-id" : "363cffc3-c590-45e5-aa8b-4bbd2459af5c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055138Z:363cffc3-c590-45e5-aa8b-4bbd2459af5c", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2629", + "x-ms-request-id" : "93ff97d0-602a-41a8-b6bf-cab65e144f40", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Disabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Disabled\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfc83d6e-db43-41ec-92bc-2a49e34f0d69", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:41 GMT", + "x-ms-correlation-request-id" : "d35f5b2d-0854-4543-a677-5cf3bc457269", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10797", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055141Z:d35f5b2d-0854-4543-a677-5cf3bc457269", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2629", + "x-ms-request-id" : "dfc83d6e-db43-41ec-92bc-2a49e34f0d69", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Disabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Disabled\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null (ResourceManagementClient, 2017-05-10)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac139093-0ebb-4099-b314-c89f38d12168", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:41 GMT", + "x-ms-correlation-request-id" : "bfb75839-c6f8-4409-bb3b-5ba8401cd135", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055141Z:bfb75839-c6f8-4409-bb3b-5ba8401cd135", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2629", + "x-ms-request-id" : "ac139093-0ebb-4099-b314-c89f38d12168", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\",\"name\":\"jsdktm-12286fcce\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Disabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"jsdktm-12286fcce\",\"fqdn\":\"jsdktm-12286fcce.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Disabled\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-1\",\"name\":\"endpoint-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed0\",\"target\":\"webapp1-776220ed0.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-3\",\"name\":\"endpoint-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed2\",\"target\":\"webapp1-776220ed2.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-12286fcce\\/azureEndpoints\\/endpoint-4\",\"name\":\"endpoint-4\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"Inactive\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_972013d55b6\\/providers\\/Microsoft.Web\\/sites\\/webapp1-776220ed3\",\"target\":\"webapp1-776220ed3.azurewebsites.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_972013d55b6/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-12286fcce?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae1ccc0a-8c07-43ba-8663-3cb68c106221", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 05:51:50 GMT", + "x-ms-correlation-request-id" : "6c79341f-7f99-4e02-a34d-f44b605bfec6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055150Z:6c79341f-7f99-4e02-a34d-f44b605bfec6", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "0", + "x-ms-request-id" : "ae1ccc0a-8c07-43ba-8663-3cb68c106221", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_972013d55b6?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a1e1e4f1-5f17-4eb6-aac9-932247dbb5a7", + "Content-Type" : "application/json" + }, "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "StatusCode" : "202", - "Body" : "", - "x-ms-ratelimit-remaining-subscription-writes" : "1189", - "location" : "http://localhost:2074/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUZCNUUxMzY2NDQwQjUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10", - "x-ms-routing-request-id" : "CENTRALUS:20170124T234719Z:7dd77739-321c-4f2a-a503-178b87afcb1c", - "date" : "Tue, 24 Jan 2017 23:47:18 GMT", - "pragma" : "no-cache", - "cache-control" : "no-cache", - "retry-after" : "0", - "expires" : "-1", - "x-ms-request-id" : "7dd77739-321c-4f2a-a503-178b87afcb1c", - "content-length" : "0", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7dd77739-321c-4f2a-a503-178b87afcb1c" - } + "Date" : "Tue, 01 Sep 2020 05:51:52 GMT", + "x-ms-correlation-request-id" : "8fcd921f-be5f-40e8-a2a5-f069bff05e4b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T055152Z:8fcd921f-be5f-40e8-a2a5-f069bff05e4b", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "8fcd921f-be5f-40e8-a2a5-f069bff05e4b", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUY5NzIwMTNENTVCNi1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null } ], - "variables" : [ "rgnemv_b5e1366440b5", "jsdkdemo-6b6568170", "jplan1_898077", "webapp1-97d30108e3", "jsdktm-94a412064a" ] + "variables" : [ "rgnemv_972013d55b6", "jsdkdemo-50726f3d", "jplan1_23137f", "webapp1-776220ed", "jsdktm-12286fcce" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppWithTrafficManager.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppWithTrafficManager.json new file mode 100644 index 0000000000000..8a952e11e5982 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testManageWebAppWithTrafficManager.json @@ -0,0 +1,2747 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_34984669300?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "61fe579f-a479-49e8-baf8-2409e604d1dd", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:33:19 GMT", + "x-ms-correlation-request-id" : "9d6fd346-dcf7-4a96-9722-31740ad323f9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063319Z:9d6fd346-dcf7-4a96-9722-31740ad323f9", + "Expires" : "-1", + "Content-Length" : "233", + "x-ms-request-id" : "9d6fd346-dcf7-4a96-9722-31740ad323f9", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300\",\"name\":\"rgnemv_34984669300\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Network/dnsZones/jsdkdemo-493851ec.com?api-version=2018-03-01-preview", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.dns/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ab49a3b-a235-4c65-97fa-c1028031cc2f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:33:28 GMT", + "x-ms-correlation-request-id" : "913d5bf1-171f-43d1-9724-90300453eeee", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "private", + "ETag" : "00000002-0000-0000-d40d-6acc2980d601", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063328Z:913d5bf1-171f-43d1-9724-90300453eeee", + "Content-Length" : "544", + "x-ms-request-id" : "9ab49a3b-a235-4c65-97fa-c1028031cc2f", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/dnszones\\/jsdkdemo-493851ec.com\",\"name\":\"jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Network\\/dnszones\",\"etag\":\"00000002-0000-0000-d40d-6acc2980d601\",\"location\":\"global\",\"tags\":{},\"properties\":{\"maxNumberOfRecordSets\":10000,\"maxNumberOfRecordsPerRecordSet\":null,\"nameServers\":[\"ns1-08.azure-dns.com.\",\"ns2-08.azure-dns.net.\",\"ns3-08.azure-dns.org.\",\"ns4-08.azure-dns.info.\"],\"numberOfRecordSets\":2,\"zoneType\":\"Public\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DomainRegistration/topLevelDomains/com/listAgreements?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d836dc7f-e348-4418-b195-16fb2c10e36d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:33:29 GMT", + "x-ms-correlation-request-id" : "26492b6e-a266-48a2-ac33-e54102f5d88c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063329Z:26492b6e-a266-48a2-ac33-e54102f5d88c", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "94535", + "x-ms-request-id" : "c673b20a-8173-4974-8a50-5d3e63bf5dd8", + "Body" : "{\"value\":[{\"agreementKey\":\"DNRA\",\"title\":\"Domain Registration Agreement\",\"content\":\"\\r\\n\\r\\n\",\"url\":\"http://www.secureserver.net/agreements/ShowDoc.aspx?pageid=reg_sa&pl_id=510456\"}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.DomainRegistration/domains/jsdkdemo-493851ec.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d064568a-14d9-47db-82b4-1204c261f35a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 06:33:36 GMT", + "x-ms-correlation-request-id" : "773ba56a-a72c-4336-b165-d1ab9ea7b090", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063336Z:773ba56a-a72c-4336-b165-d1ab9ea7b090", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "773ba56a-a72c-4336-b165-d1ab9ea7b090", + "X-Powered-By" : "ASP.NET", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.DomainRegistration/domains/jsdkdemo-493851ec.com/operationresults/257284d3-9ad2-41fa-81b2-0a9b416592c6?api-version=2019-08-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.DomainRegistration/domains/jsdkdemo-493851ec.com/operationresults/257284d3-9ad2-41fa-81b2-0a9b416592c6?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e03e2850-6f72-46f4-a203-190c76748b4b" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 06:35:05 GMT", + "x-ms-correlation-request-id" : "e877ef89-a54e-4e6a-822f-ca1ce510b389", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063505Z:e877ef89-a54e-4e6a-822f-ca1ce510b389", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "e877ef89-a54e-4e6a-822f-ca1ce510b389", + "X-Powered-By" : "ASP.NET", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.DomainRegistration/domains/jsdkdemo-493851ec.com/operationresults/257284d3-9ad2-41fa-81b2-0a9b416592c6?api-version=2019-08-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.DomainRegistration/domains/jsdkdemo-493851ec.com/operationresults/257284d3-9ad2-41fa-81b2-0a9b416592c6?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6d96694-29b1-4b87-9a6a-dfd32f5f6f2f" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:35:35 GMT", + "x-ms-correlation-request-id" : "684d7b7b-4108-449a-9368-9beeb4b54391", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063536Z:684d7b7b-4108-449a-9368-9beeb4b54391", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "864", + "x-ms-request-id" : "3f7618b2-d294-4d0d-9131-40ea5ba49612", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.DomainRegistration/domains/jsdkdemo-493851ec.com\",\"name\":\"jsdkdemo-493851ec.com\",\"type\":\"Microsoft.DomainRegistration/domains\",\"location\":\"global\",\"tags\":{},\"properties\":{\"registrationStatus\":\"Active\",\"provisioningState\":\"Succeeded\",\"nameServers\":[\"ns1-08.azure-dns.com\",\"ns2-08.azure-dns.net\",\"ns3-08.azure-dns.org\",\"ns4-08.azure-dns.info\"],\"privacy\":true,\"createdTime\":\"2020-09-01T01:33:42\",\"expirationTime\":\"2021-09-01T01:33:42\",\"autoRenew\":true,\"readyForDnsRecordManagement\":true,\"managedHostNames\":[],\"domainNotRenewableReasons\":[\"ExpirationNotInRenewalTimeRange\"],\"dnsType\":\"AzureDns\",\"dnsZoneId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Network/dnszones/jsdkdemo-493851ec.com\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "85cec61e-0444-4301-92b7-02fe6a1b1d55", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:36:26 GMT", + "x-ms-correlation-request-id" : "489c6604-e3d3-41ce-bd03-5f9c203fee9b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063626Z:489c6604-e3d3-41ce-bd03-5f9c203fee9b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1332", + "x-ms-request-id" : "92668e53-034a-423b-84cd-69ed5e6cd2e3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"name\":\"jplan1_846419\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"serverFarmId\":35657,\"name\":\"jplan1_846419\",\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West US\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_34984669300\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-bay-089_35657\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"family\":\"S\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan2_371327?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1aecc621-6aa1-4f45-86fb-2a53dd6e1c94", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:36:37 GMT", + "x-ms-correlation-request-id" : "cf6b9716-2582-490a-a104-3b4ad2c440d8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063638Z:cf6b9716-2582-490a-a104-3b4ad2c440d8", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1344", + "x-ms-request-id" : "9ebf992a-53e8-450b-8f5c-01a16f6f9ca0", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan2_371327\",\"name\":\"jplan2_371327\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"serverFarmId\":12313,\"name\":\"jplan2_371327\",\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_34984669300-WestEuropewebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West Europe\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_34984669300\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-am2-329_12313\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"family\":\"S\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan3_85750a?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b0d52bf-a96b-486f-b6c3-29e37287f813", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:36:46 GMT", + "x-ms-correlation-request-id" : "40b65735-bdcf-43fe-abe9-42e3dcff2952", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063647Z:40b65735-bdcf-43fe-abe9-42e3dcff2952", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1340", + "x-ms-request-id" : "8a214a1c-b194-4230-b5e7-6359f4563227", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan3_85750a\",\"name\":\"jplan3_85750a\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"serverFarmId\":118138,\"name\":\"jplan3_85750a\",\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":1,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":1,\"status\":\"Ready\",\"webSpace\":\"rgnemv_34984669300-EastAsiawebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"East Asia\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":0,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_34984669300\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-hk1-001_118138\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":\"Succeeded\",\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"family\":\"S\",\"capacity\":1}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f5a66174-610a-44d9-af2b-a8203503aeda", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:37:08 GMT", + "x-ms-correlation-request-id" : "aced9671-afb6-41f0-a9fd-bbcb9fe76efb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A46FE62EB\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063708Z:aced9671-afb6-41f0-a9fd-bbcb9fe76efb", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5443", + "x-ms-request-id" : "5e2c5258-7911-40a8-818f-adcfffdb5c11", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d\",\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-1661603d\",\"state\":\"Running\",\"hostNames\":[\"webapp1-1661603d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp1-1661603d\",\"repositorySiteName\":\"webapp1-1661603d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-1661603d.azurewebsites.net\",\"webapp1-1661603d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-1661603d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-1661603d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:36:51.59\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-1661603d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp1-1661603d\\\\$webapp1-1661603d\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp1-1661603d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/hostNameBindings/webapp1-1661603d.jsdkdemo-493851ec.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f0fdc05f-93f7-41df-9e8f-f794e87b88cf", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:37:13 GMT", + "x-ms-correlation-request-id" : "e543ffb5-6418-4e51-9b4d-b58b0ac23580", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A46FE62EB\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063713Z:e543ffb5-6418-4e51-9b4d-b58b0ac23580", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "522", + "x-ms-request-id" : "ccd26fe0-eab8-41ac-9343-4e61a4bf95e4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/hostNameBindings/webapp1-1661603d.jsdkdemo-493851ec.com\",\"name\":\"webapp1-1661603d/webapp1-1661603d.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp1-1661603d\",\"domainId\":null,\"azureResourceName\":\"webapp1-1661603d\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac07832b-3f09-4f44-9459-ca387d1a25a0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:37:13 GMT", + "x-ms-correlation-request-id" : "36084768-7983-4810-b6da-0167b6453ad4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A53387900\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063714Z:36084768-7983-4810-b6da-0167b6453ad4", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5554", + "x-ms-request-id" : "40a8b0ef-98bc-454b-b462-90bc8b07415c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d\",\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-1661603d\",\"state\":\"Running\",\"hostNames\":[\"webapp1-1661603d.jsdkdemo-493851ec.com\",\"webapp1-1661603d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp1-1661603d\",\"repositorySiteName\":\"webapp1-1661603d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-1661603d.jsdkdemo-493851ec.com\",\"webapp1-1661603d.azurewebsites.net\",\"webapp1-1661603d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-1661603d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-1661603d.jsdkdemo-493851ec.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-1661603d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:37:12.72\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-1661603d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp1-1661603d\\\\$webapp1-1661603d\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp1-1661603d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "96f685ea-20d5-4a6a-a2ab-ffd04e3bc050", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:37:14 GMT", + "x-ms-correlation-request-id" : "42a73af7-e892-47e0-94bb-6e05a85580aa", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063714Z:42a73af7-e892-47e0-94bb-6e05a85580aa", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3574", + "x-ms-request-id" : "edb97439-b7b4-4df0-8c73-f08ca98dbd8a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/web\",\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-1661603d\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3%23%23West%20US%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a1d17ce-a09c-4f63-9118-c37a92bf4808", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:37:20 GMT", + "x-ms-correlation-request-id" : "045ee366-1840-46d1-bb7e-f4a63a320925", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063720Z:045ee366-1840-46d1-bb7e-f4a63a320925", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "922", + "x-ms-request-id" : "32f987f9-611c-4a8e-8317-45c739ddd55d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##West US#\",\"name\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##West US#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-493851ec.com\",\"subjectName\":\"*.jsdkdemo-493851ec.com\",\"hostNames\":[\"*.jsdkdemo-493851ec.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-493851ec.com\",\"issueDate\":\"2020-09-01T06:35:34+00:00\",\"expirationDate\":\"2030-08-30T06:35:34+00:00\",\"password\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "acb070b1-d0fe-4725-8ae0-3c76bff41598", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:37:22 GMT", + "x-ms-correlation-request-id" : "66c13c92-a42b-43b3-af73-587d28734164", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A53387900\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063722Z:66c13c92-a42b-43b3-af73-587d28734164", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5799", + "x-ms-request-id" : "f295c17d-82fe-4995-99d7-ae0e4d166d11", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d\",\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp1-1661603d\",\"state\":\"Running\",\"hostNames\":[\"webapp1-1661603d.jsdkdemo-493851ec.com\",\"webapp1-1661603d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp1-1661603d\",\"repositorySiteName\":\"webapp1-1661603d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp1-1661603d.jsdkdemo-493851ec.com\",\"webapp1-1661603d.azurewebsites.net\",\"webapp1-1661603d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp1-1661603d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-1661603d.jsdkdemo-493851ec.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp1-1661603d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:37:21.4533333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp1-1661603d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp1-1661603d\\\\$webapp1-1661603d\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp1-1661603d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "262de10f-784e-44b6-a267-f9a898c35935", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:37:24 GMT", + "x-ms-correlation-request-id" : "08c4a6b6-da69-419c-832d-b2ae10668940", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A586D12D5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063724Z:08c4a6b6-da69-419c-832d-b2ae10668940", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3560", + "x-ms-request-id" : "05fb98c6-ead7-4644-8d29-bf8b166bf4b5", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d\",\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp1-1661603d\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3cf3414d-01d3-4df6-8fb5-6d4451f9b5d9", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:37:32 GMT", + "x-ms-correlation-request-id" : "23706539-21d6-4fd7-b089-a7935342a62d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A5EDB7F35\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063732Z:23706539-21d6-4fd7-b089-a7935342a62d", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "489", + "x-ms-request-id" : "222648dd-f017-4ba8-bae6-67775404b416", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/sourcecontrols/web\",\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "31f54dda-24cc-4874-8255-b124e67994a5" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:38:02 GMT", + "x-ms-correlation-request-id" : "48ceabf9-aea6-47a9-8c27-8989aa4d3e62", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A5EDB7F35\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063803Z:48ceabf9-aea6-47a9-8c27-8989aa4d3e62", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "653", + "x-ms-request-id" : "0357f305-05b4-4467-95fb-917961a19abb", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/sourcecontrols/web\",\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T06:38:01.9374598 https://webapp1-1661603d.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_06-37-41Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4113a0ae-2a31-4963-8666-a7eb15c991e5" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:38:33 GMT", + "x-ms-correlation-request-id" : "f91fb2da-570b-4c21-ad9e-6f35f54c52c0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A5EDB7F35\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063833Z:f91fb2da-570b-4c21-ad9e-6f35f54c52c0", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "488", + "x-ms-request-id" : "d42abc7a-d159-487b-82f0-e595fb405c22", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/sourcecontrols/web\",\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca9b707a-27e5-44e2-ba01-64fcdd5f0a0c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:03 GMT", + "x-ms-correlation-request-id" : "ff957955-7714-453c-b529-5690bcda6a9a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A5EDB7F35\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063904Z:ff957955-7714-453c-b529-5690bcda6a9a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1049", + "x-ms-request-id" : "c8e44584-6902-435a-9ae2-e9d58c35ac43", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/hostNameBindings/webapp1-1661603d.azurewebsites.net\",\"name\":\"webapp1-1661603d/webapp1-1661603d.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp1-1661603d\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/hostNameBindings/webapp1-1661603d.jsdkdemo-493851ec.com\",\"name\":\"webapp1-1661603d/webapp1-1661603d.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp1-1661603d\",\"domainId\":null,\"azureResourceName\":\"webapp1-1661603d\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7decbaeb-7664-4e2a-914c-a1c105168e4d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:03 GMT", + "x-ms-correlation-request-id" : "3101282d-b608-4d2c-8222-7c342ae38657", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063904Z:3101282d-b608-4d2c-8222-7c342ae38657", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "302", + "x-ms-request-id" : "92591bcd-f273-401f-ab19-059a858048c8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f5a7f25d-8374-4515-bd36-ae5a037fe2da", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:05 GMT", + "x-ms-correlation-request-id" : "6067addd-ee6b-4a9f-99cb-8190bd24f36f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063905Z:6067addd-ee6b-4a9f-99cb-8190bd24f36f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "4dde0f5c-03c6-4c2b-9413-bdb1c237f1cd", + "Body" : "{\"id\":null,\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4d72be70-54f5-4e0a-9ad8-6f80d762aa19", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:05 GMT", + "x-ms-correlation-request-id" : "8da0a997-4632-4756-92c9-884f365a1a87", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063906Z:8da0a997-4632-4756-92c9-884f365a1a87", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "8dd7af24-bca7-4cc8-9ac4-3f68deddcb8f", + "Body" : "{\"id\":null,\"name\":\"webapp1-1661603d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6dcdc4e8-6a0d-45f5-885c-55f85319216e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:05 GMT", + "x-ms-correlation-request-id" : "29a99b32-5b38-4ca7-a16a-726fe8eb4270", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063906Z:29a99b32-5b38-4ca7-a16a-726fe8eb4270", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "276", + "x-ms-request-id" : "94422165-bd5a-4e0b-a4df-b677195866bf", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp1-1661603d/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "147c22fe-120c-4548-a0fd-68f5f68f86e0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:32 GMT", + "x-ms-correlation-request-id" : "f6fbdeaf-7a8e-4123-ae01-10dfade46445", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A9BC47415\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063933Z:f6fbdeaf-7a8e-4123-ae01-10dfade46445", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5614", + "x-ms-request-id" : "070f311c-f322-4787-bf84-16574c3b5ea7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d\",\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"name\":\"webapp2-8045721d\",\"state\":\"Running\",\"hostNames\":[\"webapp2-8045721d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestEuropewebspace\",\"selfLink\":\"https://waws-prod-am2-329.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestEuropewebspace/sites/webapp2-8045721d\",\"repositorySiteName\":\"webapp2-8045721d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp2-8045721d.azurewebsites.net\",\"webapp2-8045721d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp2-8045721d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-8045721d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan2_371327\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:39:14.16\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp2-8045721d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"20.50.2.4\",\"possibleInboundIpAddresses\":\"20.50.2.4\",\"ftpUsername\":\"webapp2-8045721d\\\\$webapp2-8045721d\",\"ftpsHostName\":\"ftps://waws-prod-am2-329.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"51.137.21.195,51.137.20.11,51.137.22.116,51.137.22.194,51.137.23.0,51.137.23.25,40.114.162.30,40.114.162.35,40.114.162.47\",\"possibleOutboundIpAddresses\":\"51.137.21.195,51.137.20.11,51.137.22.116,51.137.22.194,51.137.23.0,51.137.23.25,40.114.162.30,40.114.162.35,40.114.162.47,51.137.23.69,51.137.23.137,51.137.23.220,40.114.161.106,40.114.161.207,40.114.162.10\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-am2-329\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp2-8045721d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/hostNameBindings/webapp2-8045721d.jsdkdemo-493851ec.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "27b0e6dd-a382-41f0-974c-2bf7acf14f1b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:40 GMT", + "x-ms-correlation-request-id" : "ba48598c-0f68-48af-9069-c93e3d45c18f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802A9BC47415\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063940Z:ba48598c-0f68-48af-9069-c93e3d45c18f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "526", + "x-ms-request-id" : "3a1e89cb-1478-4480-a0c4-7db0ae57a729", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/hostNameBindings/webapp2-8045721d.jsdkdemo-493851ec.com\",\"name\":\"webapp2-8045721d/webapp2-8045721d.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West Europe\",\"properties\":{\"siteName\":\"webapp2-8045721d\",\"domainId\":null,\"azureResourceName\":\"webapp2-8045721d\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "09766a68-ef25-43b7-9b14-7ecb9cf428ea", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:40 GMT", + "x-ms-correlation-request-id" : "f6cd350e-8da7-483a-b316-d4d9bdb5b3be", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802AAB03A6D5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063941Z:f6cd350e-8da7-483a-b316-d4d9bdb5b3be", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5730", + "x-ms-request-id" : "ca58ba19-1b8e-44b2-bf2a-fc4871b755f3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d\",\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"name\":\"webapp2-8045721d\",\"state\":\"Running\",\"hostNames\":[\"webapp2-8045721d.jsdkdemo-493851ec.com\",\"webapp2-8045721d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestEuropewebspace\",\"selfLink\":\"https://waws-prod-am2-329.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestEuropewebspace/sites/webapp2-8045721d\",\"repositorySiteName\":\"webapp2-8045721d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp2-8045721d.jsdkdemo-493851ec.com\",\"webapp2-8045721d.azurewebsites.net\",\"webapp2-8045721d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp2-8045721d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-8045721d.jsdkdemo-493851ec.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-8045721d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan2_371327\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:39:40.0133333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp2-8045721d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"20.50.2.4\",\"possibleInboundIpAddresses\":\"20.50.2.4\",\"ftpUsername\":\"webapp2-8045721d\\\\$webapp2-8045721d\",\"ftpsHostName\":\"ftps://waws-prod-am2-329.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"51.137.21.195,51.137.20.11,51.137.22.116,51.137.22.194,51.137.23.0,51.137.23.25,40.114.162.30,40.114.162.35,40.114.162.47\",\"possibleOutboundIpAddresses\":\"51.137.21.195,51.137.20.11,51.137.22.116,51.137.22.194,51.137.23.0,51.137.23.25,40.114.162.30,40.114.162.35,40.114.162.47,51.137.23.69,51.137.23.137,51.137.23.220,40.114.161.106,40.114.161.207,40.114.162.10\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-am2-329\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp2-8045721d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2de6e5c6-8caa-4541-843c-27c461095831", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:41 GMT", + "x-ms-correlation-request-id" : "396043a1-0f94-460a-a9eb-6613ac0d1580", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063941Z:396043a1-0f94-460a-a9eb-6613ac0d1580", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3578", + "x-ms-request-id" : "6e299a57-5fba-4392-aa2b-a757507355f5", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/web\",\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp2-8045721d\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3%23%23West%20Europe%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4bcdded-29ff-4e02-8e70-68cf410fe57f", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:46 GMT", + "x-ms-correlation-request-id" : "b63a173d-69fa-4295-82f3-aa74304ba62b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063946Z:b63a173d-69fa-4295-82f3-aa74304ba62b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "938", + "x-ms-request-id" : "c60ac63d-8692-4066-86ed-e4c059c0b378", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##West Europe#\",\"name\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##West Europe#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-493851ec.com\",\"subjectName\":\"*.jsdkdemo-493851ec.com\",\"hostNames\":[\"*.jsdkdemo-493851ec.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-493851ec.com\",\"issueDate\":\"2020-09-01T06:35:34+00:00\",\"expirationDate\":\"2030-08-30T06:35:34+00:00\",\"password\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_34984669300-WestEuropewebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac3eb6fa-2f12-4d96-a1ca-75321a5af60b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:48 GMT", + "x-ms-correlation-request-id" : "4314ebb7-fa6c-4b87-b268-9edffd04264f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802AAB03A6D5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063948Z:4314ebb7-fa6c-4b87-b268-9edffd04264f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5970", + "x-ms-request-id" : "e0a66503-e12c-41c7-a4a6-df43daef9bf2", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d\",\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"name\":\"webapp2-8045721d\",\"state\":\"Running\",\"hostNames\":[\"webapp2-8045721d.jsdkdemo-493851ec.com\",\"webapp2-8045721d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestEuropewebspace\",\"selfLink\":\"https://waws-prod-am2-329.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestEuropewebspace/sites/webapp2-8045721d\",\"repositorySiteName\":\"webapp2-8045721d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp2-8045721d.jsdkdemo-493851ec.com\",\"webapp2-8045721d.azurewebsites.net\",\"webapp2-8045721d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp2-8045721d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-8045721d.jsdkdemo-493851ec.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp2-8045721d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan2_371327\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:39:47.5333333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp2-8045721d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"20.50.2.4\",\"possibleInboundIpAddresses\":\"20.50.2.4\",\"ftpUsername\":\"webapp2-8045721d\\\\$webapp2-8045721d\",\"ftpsHostName\":\"ftps://waws-prod-am2-329.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"51.137.21.195,51.137.20.11,51.137.22.116,51.137.22.194,51.137.23.0,51.137.23.25,40.114.162.30,40.114.162.35,40.114.162.47\",\"possibleOutboundIpAddresses\":\"51.137.21.195,51.137.20.11,51.137.22.116,51.137.22.194,51.137.23.0,51.137.23.25,40.114.162.30,40.114.162.35,40.114.162.47,51.137.23.69,51.137.23.137,51.137.23.220,40.114.161.106,40.114.161.207,40.114.162.10\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-am2-329\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp2-8045721d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8e5e3095-a507-405a-ba7b-ac6c779e2f52", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:39:50 GMT", + "x-ms-correlation-request-id" : "d8317cfd-259c-42d9-99ff-4c444a78d08a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802AAF7F1CD5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T063950Z:d8317cfd-259c-42d9-99ff-4c444a78d08a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3564", + "x-ms-request-id" : "440d7447-1ca8-4264-8454-06e215f46578", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d\",\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp2-8045721d\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc6ef693-2e69-444a-b0d3-cd3640e476db", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:40:14 GMT", + "x-ms-correlation-request-id" : "8070b719-d1cb-40d8-9ecf-a9fff192516c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802ABF797C40\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064014Z:8070b719-d1cb-40d8-9ecf-a9fff192516c", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "493", + "x-ms-request-id" : "11139c86-bbe0-47b6-8a07-7df4581801c5", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/sourcecontrols/web\",\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b76faf6b-f372-430c-a43b-e6f621bb4458" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:40:54 GMT", + "x-ms-correlation-request-id" : "154371a2-8b7f-43d2-9bd5-5af83b46ffa5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802ABF797C40\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064055Z:154371a2-8b7f-43d2-9bd5-5af83b46ffa5", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "657", + "x-ms-request-id" : "bab7b723-0183-4df9-af16-0c8c0821856e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/sourcecontrols/web\",\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T06:40:55.1998967 https://webapp2-8045721d.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_06-40-30Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "87ce52b5-d44c-4b9f-87ca-794acb234ec7" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:41:24 GMT", + "x-ms-correlation-request-id" : "1e5a9dc4-b42d-4fdb-8270-7728ed96bf08", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802ABF797C40\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064125Z:1e5a9dc4-b42d-4fdb-8270-7728ed96bf08", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "492", + "x-ms-request-id" : "566149f8-e3b0-4a50-85fe-d7ffdd3f38c2", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/sourcecontrols/web\",\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e903fc0-4a86-42f9-b3ee-0b458eca49e6", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:41:55 GMT", + "x-ms-correlation-request-id" : "3c956934-cd35-49e8-a24d-6ac294901efe", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802ABF797C40\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064156Z:3c956934-cd35-49e8-a24d-6ac294901efe", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1057", + "x-ms-request-id" : "4a348504-dd62-422b-bba0-63c277a3bfe0", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/hostNameBindings/webapp2-8045721d.azurewebsites.net\",\"name\":\"webapp2-8045721d/webapp2-8045721d.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West Europe\",\"properties\":{\"siteName\":\"webapp2-8045721d\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/hostNameBindings/webapp2-8045721d.jsdkdemo-493851ec.com\",\"name\":\"webapp2-8045721d/webapp2-8045721d.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West Europe\",\"properties\":{\"siteName\":\"webapp2-8045721d\",\"domainId\":null,\"azureResourceName\":\"webapp2-8045721d\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "492a2b97-0775-4ed8-b21c-f19c9b9694e2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:41:55 GMT", + "x-ms-correlation-request-id" : "0dd0297f-c5be-4933-aeeb-218361dd0678", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064156Z:0dd0297f-c5be-4933-aeeb-218361dd0678", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "199", + "x-ms-request-id" : "044fd28c-1490-44d4-8c39-1ed359b0287e", + "Body" : "{\"id\":null,\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b4fd3c5-ca40-4955-bec3-59ac18383c39", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:41:57 GMT", + "x-ms-correlation-request-id" : "5f76796d-4498-4596-83f6-e98a454aa92a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11997", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064157Z:5f76796d-4498-4596-83f6-e98a454aa92a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "306", + "x-ms-request-id" : "3fe4f807-63f0-432d-818c-eaadcf80b496", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "59f37527-6c11-4222-a9b1-669aa946b9e2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:41:57 GMT", + "x-ms-correlation-request-id" : "509b1179-1034-4ec4-83a8-188b3dccea4d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064157Z:509b1179-1034-4ec4-83a8-188b3dccea4d", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "199", + "x-ms-request-id" : "66c2d47d-f4b0-4c10-8c0e-4d662712f87c", + "Body" : "{\"id\":null,\"name\":\"webapp2-8045721d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "679ebc2d-334e-4f77-b581-7182be96a18c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:41:56 GMT", + "x-ms-correlation-request-id" : "eaf42ca7-7d4d-417a-956a-cd5158d4fb2b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064157Z:eaf42ca7-7d4d-417a-956a-cd5158d4fb2b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "280", + "x-ms-request-id" : "9d403101-7e0a-47dc-be71-eca3a88651e1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp2-8045721d/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f840d4c-a236-4c87-ab60-f494c51710e2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:42:23 GMT", + "x-ms-correlation-request-id" : "c4aa5f45-50bb-4503-a599-4db2a2ffcb79", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "496", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B0155FD50\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064223Z:c4aa5f45-50bb-4503-a599-4db2a2ffcb79", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5495", + "x-ms-request-id" : "ca3a6b26-11b3-44ed-875f-49745c0e5c0c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp3-75985ca8\",\"state\":\"Running\",\"hostNames\":[\"webapp3-75985ca8.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-EastAsiawebspace\",\"selfLink\":\"https://waws-prod-hk1-001.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-EastAsiawebspace/sites/webapp3-75985ca8\",\"repositorySiteName\":\"webapp3-75985ca8\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp3-75985ca8.azurewebsites.net\",\"webapp3-75985ca8.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp3-75985ca8.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-75985ca8.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan3_85750a\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:42:04.11\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp3-75985ca8\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"65.52.168.70\",\"possibleInboundIpAddresses\":\"65.52.168.70,13.75.34.164\",\"ftpUsername\":\"webapp3-75985ca8\\\\$webapp3-75985ca8\",\"ftpsHostName\":\"ftps://waws-prod-hk1-001.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"65.52.168.77,65.52.168.81,65.52.168.84,65.52.160.98\",\"possibleOutboundIpAddresses\":\"65.52.168.77,65.52.168.81,65.52.168.84,65.52.160.98,65.52.164.201,23.101.5.134,23.101.2.147,23.101.13.150,65.52.187.69,65.52.168.70,13.75.34.164\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-hk1-001\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp3-75985ca8.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/hostNameBindings/webapp3-75985ca8.jsdkdemo-493851ec.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8fe07b0f-5913-46bd-80fd-96322eff0d20", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:42:30 GMT", + "x-ms-correlation-request-id" : "87da7d29-45ef-4880-ab06-f9badc4f31fc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B0155FD50\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064231Z:87da7d29-45ef-4880-ab06-f9badc4f31fc", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "524", + "x-ms-request-id" : "0983a101-71d9-408a-9d15-f53607964369", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/hostNameBindings/webapp3-75985ca8.jsdkdemo-493851ec.com\",\"name\":\"webapp3-75985ca8/webapp3-75985ca8.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East Asia\",\"properties\":{\"siteName\":\"webapp3-75985ca8\",\"domainId\":null,\"azureResourceName\":\"webapp3-75985ca8\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "55b8ab72-1b3d-439c-9699-cbfa76a0bd1f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:42:31 GMT", + "x-ms-correlation-request-id" : "91c02351-13d8-4ef0-b80f-ac61c8e11876", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B1087E9A0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064231Z:91c02351-13d8-4ef0-b80f-ac61c8e11876", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5606", + "x-ms-request-id" : "31d967b0-10dd-43a6-aa9d-e7b93b59a2c7", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp3-75985ca8\",\"state\":\"Running\",\"hostNames\":[\"webapp3-75985ca8.jsdkdemo-493851ec.com\",\"webapp3-75985ca8.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-EastAsiawebspace\",\"selfLink\":\"https://waws-prod-hk1-001.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-EastAsiawebspace/sites/webapp3-75985ca8\",\"repositorySiteName\":\"webapp3-75985ca8\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp3-75985ca8.jsdkdemo-493851ec.com\",\"webapp3-75985ca8.azurewebsites.net\",\"webapp3-75985ca8.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp3-75985ca8.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-75985ca8.jsdkdemo-493851ec.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-75985ca8.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan3_85750a\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:42:30.33\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp3-75985ca8\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"65.52.168.70\",\"possibleInboundIpAddresses\":\"65.52.168.70,13.75.34.164\",\"ftpUsername\":\"webapp3-75985ca8\\\\$webapp3-75985ca8\",\"ftpsHostName\":\"ftps://waws-prod-hk1-001.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"65.52.168.77,65.52.168.81,65.52.168.84,65.52.160.98\",\"possibleOutboundIpAddresses\":\"65.52.168.77,65.52.168.81,65.52.168.84,65.52.160.98,65.52.164.201,23.101.5.134,23.101.2.147,23.101.13.150,65.52.187.69,65.52.168.70,13.75.34.164\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-hk1-001\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp3-75985ca8.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d5b9897-8131-4a13-8997-d3eccaf92e24", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:42:32 GMT", + "x-ms-correlation-request-id" : "3b7706f8-4c99-4d3d-8e24-738f243c5d02", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064232Z:3b7706f8-4c99-4d3d-8e24-738f243c5d02", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3575", + "x-ms-request-id" : "aae65e9c-094f-4b15-aaf4-dec1cd2a1e7b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/web\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp3-75985ca8\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":true,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3%23%23East%20Asia%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d455c46-da32-4b62-9da0-664e79142c19", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:42:39 GMT", + "x-ms-correlation-request-id" : "1450d819-5c8a-4ef1-aa94-949d3de0fbcc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064239Z:1450d819-5c8a-4ef1-aa94-949d3de0fbcc", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "930", + "x-ms-request-id" : "8ee31d28-7ee2-4fbd-b71f-c4ad7e99b268", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##East Asia#\",\"name\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##East Asia#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"eastasia\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-493851ec.com\",\"subjectName\":\"*.jsdkdemo-493851ec.com\",\"hostNames\":[\"*.jsdkdemo-493851ec.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-493851ec.com\",\"issueDate\":\"2020-09-01T06:35:34+00:00\",\"expirationDate\":\"2030-08-30T06:35:34+00:00\",\"password\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_34984669300-EastAsiawebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a827f7d-47be-47f0-8993-e92dccf36b2d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:42:42 GMT", + "x-ms-correlation-request-id" : "280f6384-358e-4ce2-8dba-86cd6c6a7505", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B1087E9A0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064242Z:280f6384-358e-4ce2-8dba-86cd6c6a7505", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5846", + "x-ms-request-id" : "816510ed-a25c-42c5-8872-d0f2d00a6638", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"name\":\"webapp3-75985ca8\",\"state\":\"Running\",\"hostNames\":[\"webapp3-75985ca8.jsdkdemo-493851ec.com\",\"webapp3-75985ca8.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-EastAsiawebspace\",\"selfLink\":\"https://waws-prod-hk1-001.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-EastAsiawebspace/sites/webapp3-75985ca8\",\"repositorySiteName\":\"webapp3-75985ca8\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp3-75985ca8.jsdkdemo-493851ec.com\",\"webapp3-75985ca8.azurewebsites.net\",\"webapp3-75985ca8.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp3-75985ca8.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-75985ca8.jsdkdemo-493851ec.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp3-75985ca8.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan3_85750a\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:42:41.25\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp3-75985ca8\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"65.52.168.70\",\"possibleInboundIpAddresses\":\"65.52.168.70,13.75.34.164\",\"ftpUsername\":\"webapp3-75985ca8\\\\$webapp3-75985ca8\",\"ftpsHostName\":\"ftps://waws-prod-hk1-001.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"65.52.168.77,65.52.168.81,65.52.168.84,65.52.160.98\",\"possibleOutboundIpAddresses\":\"65.52.168.77,65.52.168.81,65.52.168.84,65.52.160.98,65.52.164.201,23.101.5.134,23.101.2.147,23.101.13.150,65.52.187.69,65.52.168.70,13.75.34.164\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-hk1-001\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp3-75985ca8.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "53a935d6-cf77-4e6d-a974-e4654608f0ad", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1187", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:42:43 GMT", + "x-ms-correlation-request-id" : "4d0df036-c513-419b-92ad-bb1b9e9db2cf", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B170A2C20\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064244Z:4d0df036-c513-419b-92ad-bb1b9e9db2cf", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3561", + "x-ms-request-id" : "3281c363-cbba-46c2-a6f5-283bfcde7d05", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp3-75985ca8\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":true,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a36b8137-6f9a-4a28-9aa1-78e0cc1f540a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:42:56 GMT", + "x-ms-correlation-request-id" : "7af89c56-24d9-4f14-8fe3-54f9fbcf4145", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B2042B500\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064256Z:7af89c56-24d9-4f14-8fe3-54f9fbcf4145", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "491", + "x-ms-request-id" : "9ac53bba-e9bb-4ddf-9c56-d6bcf187ca0f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/sourcecontrols/web\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "78d7c631-20bd-4b76-9e0b-b7548f59a53c" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:43:28 GMT", + "x-ms-correlation-request-id" : "434c15e3-74db-4e41-9439-f031164ab688", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B2042B500\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064329Z:434c15e3-74db-4e41-9439-f031164ab688", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "655", + "x-ms-request-id" : "c97af43e-5a9a-4d59-9cbc-d476fcebbc2a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/sourcecontrols/web\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T06:43:29.2343899 https://webapp3-75985ca8.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_06-43-14Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4dec1b42-6645-4c29-9dae-c45f47fb3995" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:43:59 GMT", + "x-ms-correlation-request-id" : "90ac5de2-237b-4afe-8888-7cdd3512c0b4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B2042B500\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064359Z:90ac5de2-237b-4afe-8888-7cdd3512c0b4", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "655", + "x-ms-request-id" : "2ffa3840-a799-45fb-be4a-ba4e201896b3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/sourcecontrols/web\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T06:43:50.6403553 https://webapp3-75985ca8.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_06-43-14Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "53851951-fc59-471f-aaa8-9e55f625225d" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:44:30 GMT", + "x-ms-correlation-request-id" : "e6cfd2a1-dcb4-400c-8c2d-f8fb5dc22d33", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B2042B500\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064430Z:e6cfd2a1-dcb4-400c-8c2d-f8fb5dc22d33", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "490", + "x-ms-request-id" : "8cf8ae73-e43f-4d26-ba4b-cc1f2f0b3a55", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/sourcecontrols/web\",\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "23df7c2f-7219-4b7a-9081-7a49026cf703", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:00 GMT", + "x-ms-correlation-request-id" : "3d839204-70dc-42b2-91da-083e7ca726a9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B2042B500\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064500Z:3d839204-70dc-42b2-91da-083e7ca726a9", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1053", + "x-ms-request-id" : "109dd1cc-a462-47a1-84ef-d5f2a619db11", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/hostNameBindings/webapp3-75985ca8.azurewebsites.net\",\"name\":\"webapp3-75985ca8/webapp3-75985ca8.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East Asia\",\"properties\":{\"siteName\":\"webapp3-75985ca8\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/hostNameBindings/webapp3-75985ca8.jsdkdemo-493851ec.com\",\"name\":\"webapp3-75985ca8/webapp3-75985ca8.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"East Asia\",\"properties\":{\"siteName\":\"webapp3-75985ca8\",\"domainId\":null,\"azureResourceName\":\"webapp3-75985ca8\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a28c4cad-36e6-423d-98b9-c3c4fa32e045", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:01 GMT", + "x-ms-correlation-request-id" : "563e80ee-b947-480d-90ee-3f3963eee052", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064501Z:563e80ee-b947-480d-90ee-3f3963eee052", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "197", + "x-ms-request-id" : "953f5aaf-e4fc-45c1-9802-ba91d865e444", + "Body" : "{\"id\":null,\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fece263-d86c-45e1-b3fa-7bd2c543ba95", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:00 GMT", + "x-ms-correlation-request-id" : "3a983666-24a3-4b8d-9c16-4d6b4d9c3322", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11996", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064501Z:3a983666-24a3-4b8d-9c16-4d6b4d9c3322", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "304", + "x-ms-request-id" : "97bb0510-8ddf-4897-af41-d78bd6fd2201", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff807b3d-fa40-4dec-a806-a208cff92b8a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:00 GMT", + "x-ms-correlation-request-id" : "fdedf805-64d1-40de-86c7-780229ebd137", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064501Z:fdedf805-64d1-40de-86c7-780229ebd137", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "197", + "x-ms-request-id" : "dc54d2c4-038a-4950-958c-f4b30622f926", + "Body" : "{\"id\":null,\"name\":\"webapp3-75985ca8\",\"type\":\"Microsoft.Web/sites\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8f7db58c-623a-4aff-9617-229878f55c2e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:01 GMT", + "x-ms-correlation-request-id" : "14e111c3-0708-40f7-a2fc-4ac9c0703559", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11998", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064501Z:14e111c3-0708-40f7-a2fc-4ac9c0703559", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "278", + "x-ms-request-id" : "3fa373f8-16d3-46ad-aa7b-12155b459b42", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp3-75985ca8/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "32e3dd76-d690-4281-9b6b-e9f2387620bc", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:24 GMT", + "x-ms-correlation-request-id" : "9a602a9c-0d5b-441d-a450-e4b8dbef313b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B6EB9E2B5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064524Z:9a602a9c-0d5b-441d-a450-e4b8dbef313b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5448", + "x-ms-request-id" : "3d8d6825-71f7-42a2-bb5e-fd93eba31aa9", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58\",\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp4-10006d58\",\"state\":\"Running\",\"hostNames\":[\"webapp4-10006d58.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp4-10006d58\",\"repositorySiteName\":\"webapp4-10006d58\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp4-10006d58.azurewebsites.net\",\"webapp4-10006d58.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp4-10006d58.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-10006d58.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:45:07.4266667\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp4-10006d58\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp4-10006d58\\\\$webapp4-10006d58\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp4-10006d58.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/hostNameBindings/webapp4-10006d58.jsdkdemo-493851ec.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "23fd9761-07a0-4663-9388-a5b685d9e3fd", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:29 GMT", + "x-ms-correlation-request-id" : "0ee65801-edea-4b26-83a1-453d12a7e4ab", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B6EB9E2B5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064530Z:0ee65801-edea-4b26-83a1-453d12a7e4ab", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "522", + "x-ms-request-id" : "4d132840-2e9c-485e-9944-d508ab88e16c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/hostNameBindings/webapp4-10006d58.jsdkdemo-493851ec.com\",\"name\":\"webapp4-10006d58/webapp4-10006d58.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp4-10006d58\",\"domainId\":null,\"azureResourceName\":\"webapp4-10006d58\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6478fb8b-11af-41cf-a842-94e6e4768c63", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:29 GMT", + "x-ms-correlation-request-id" : "61835706-44a9-4ef2-ab0b-89f0cd82bc03", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B7B1B22D5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064530Z:61835706-44a9-4ef2-ab0b-89f0cd82bc03", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5559", + "x-ms-request-id" : "b9dfb022-29bc-4492-bf6a-792fb7d55778", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58\",\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp4-10006d58\",\"state\":\"Running\",\"hostNames\":[\"webapp4-10006d58.jsdkdemo-493851ec.com\",\"webapp4-10006d58.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp4-10006d58\",\"repositorySiteName\":\"webapp4-10006d58\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp4-10006d58.jsdkdemo-493851ec.com\",\"webapp4-10006d58.azurewebsites.net\",\"webapp4-10006d58.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp4-10006d58.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-10006d58.jsdkdemo-493851ec.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-10006d58.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:45:29.1333333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp4-10006d58\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp4-10006d58\\\\$webapp4-10006d58\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp4-10006d58.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ddb8f86-a82f-4b01-8577-c09a7bcc09d0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:30 GMT", + "x-ms-correlation-request-id" : "46c3b4d0-4ff6-4dc9-a517-b84894589a89", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064530Z:46c3b4d0-4ff6-4dc9-a517-b84894589a89", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3574", + "x-ms-request-id" : "101c40aa-4c6a-46ac-83f6-492ae62bf552", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/web\",\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp4-10006d58\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3%23%23West%20US%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd1081a7-5100-4507-a1ac-9b54ba928227", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1186", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:33 GMT", + "x-ms-correlation-request-id" : "75bed234-c7b3-44de-9768-d437e61ea210", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064534Z:75bed234-c7b3-44de-9768-d437e61ea210", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "922", + "x-ms-request-id" : "03f91a90-83dd-42be-be84-504c31d7945f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##West US#\",\"name\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##West US#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-493851ec.com\",\"subjectName\":\"*.jsdkdemo-493851ec.com\",\"hostNames\":[\"*.jsdkdemo-493851ec.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-493851ec.com\",\"issueDate\":\"2020-09-01T06:35:34+00:00\",\"expirationDate\":\"2030-08-30T06:35:34+00:00\",\"password\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "92ca687d-dd47-49be-a860-5c2da8193060", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:36 GMT", + "x-ms-correlation-request-id" : "0e5f85be-46b8-4256-abfd-5ca012a8543d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "498", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B7B1B22D5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064537Z:0e5f85be-46b8-4256-abfd-5ca012a8543d", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5794", + "x-ms-request-id" : "b89ea608-5b1d-4ef4-9a97-1f73be6b6465", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58\",\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp4-10006d58\",\"state\":\"Running\",\"hostNames\":[\"webapp4-10006d58.jsdkdemo-493851ec.com\",\"webapp4-10006d58.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp4-10006d58\",\"repositorySiteName\":\"webapp4-10006d58\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp4-10006d58.jsdkdemo-493851ec.com\",\"webapp4-10006d58.azurewebsites.net\",\"webapp4-10006d58.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp4-10006d58.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-10006d58.jsdkdemo-493851ec.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp4-10006d58.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:45:36.25\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp4-10006d58\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp4-10006d58\\\\$webapp4-10006d58\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp4-10006d58.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f17af594-dedb-4ef8-851b-b7330e812599", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1185", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:45:38 GMT", + "x-ms-correlation-request-id" : "e78874a0-f40f-4ae7-afb7-e62163a97047", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B7F590DA0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064538Z:e78874a0-f40f-4ae7-afb7-e62163a97047", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3560", + "x-ms-request-id" : "2d14b157-8659-4c3c-9762-3c9344af4ea6", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58\",\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp4-10006d58\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff43ab91-88b2-4d62-8ca4-844351c4d999", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:45:46 GMT", + "x-ms-correlation-request-id" : "0ba1bfb8-86c5-46ba-b038-7e1644db087b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B855C280B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064546Z:0ba1bfb8-86c5-46ba-b038-7e1644db087b", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "489", + "x-ms-request-id" : "89e3492a-b76d-4f33-ae26-469f7adb3c58", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/sourcecontrols/web\",\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7589b38-1fa4-45a1-a75d-a42505b70e92" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:46:16 GMT", + "x-ms-correlation-request-id" : "597bd3d9-abe9-492f-bb16-3b26bf1f21b4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B855C280B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064617Z:597bd3d9-abe9-492f-bb16-3b26bf1f21b4", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "653", + "x-ms-request-id" : "5484fff4-dc69-4f6a-b436-c2b1666fdeaa", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/sourcecontrols/web\",\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T06:46:13.4248961 https://webapp4-10006d58.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_06-45-57Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "faa05ef5-6be1-42dc-9c1e-cab8c0e0631f" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:46:47 GMT", + "x-ms-correlation-request-id" : "d7eea149-0e5f-4d16-bacd-93a3f0a3c85f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B855C280B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064647Z:d7eea149-0e5f-4d16-bacd-93a3f0a3c85f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "488", + "x-ms-request-id" : "8e1182f6-59e7-4fe4-8ce1-522a7afe4462", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/sourcecontrols/web\",\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "15b76434-84a7-483f-87ca-f28a9a791e07", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:18 GMT", + "x-ms-correlation-request-id" : "df731b71-4e63-4064-989b-4f8d32081898", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802B855C280B\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064718Z:df731b71-4e63-4064-989b-4f8d32081898", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1049", + "x-ms-request-id" : "5cb62308-9b78-46a2-88da-b6049a67b4e2", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/hostNameBindings/webapp4-10006d58.azurewebsites.net\",\"name\":\"webapp4-10006d58/webapp4-10006d58.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp4-10006d58\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/hostNameBindings/webapp4-10006d58.jsdkdemo-493851ec.com\",\"name\":\"webapp4-10006d58/webapp4-10006d58.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp4-10006d58\",\"domainId\":null,\"azureResourceName\":\"webapp4-10006d58\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e2fcc291-a346-4aad-98fe-2d8aa0b65544", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:17 GMT", + "x-ms-correlation-request-id" : "722b1ef9-8856-4995-b54a-ab1d35ae1807", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064718Z:722b1ef9-8856-4995-b54a-ab1d35ae1807", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "f6dfc826-579d-46be-b373-84f26fba4a09", + "Body" : "{\"id\":null,\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c489007-92f8-486c-8df3-15cc82cc7a62", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:18 GMT", + "x-ms-correlation-request-id" : "9cb3f922-eedf-417f-9292-3140f55dd922", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11995", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064718Z:9cb3f922-eedf-417f-9292-3140f55dd922", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "302", + "x-ms-request-id" : "dede96c1-53cc-44ed-bcdf-feadb15f4763", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "51933fcd-7fe1-4f7a-9f6d-49743636ceb7", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:18 GMT", + "x-ms-correlation-request-id" : "7ac7c56a-53eb-465d-b4a1-fd271e678148", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064718Z:7ac7c56a-53eb-465d-b4a1-fd271e678148", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "a05098dd-f3f2-4c0a-9529-643eb61d9f42", + "Body" : "{\"id\":null,\"name\":\"webapp4-10006d58\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "312ff246-7e82-4a51-9b38-44a188b7a45d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:18 GMT", + "x-ms-correlation-request-id" : "bf12ae4a-5d2e-4170-bc40-3b0c9ff11e48", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11994", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064719Z:bf12ae4a-5d2e-4170-bc40-3b0c9ff11e48", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "276", + "x-ms-request-id" : "7b4cb939-4d8d-4b81-ae3e-d2af5e6c80e1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp4-10006d58/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b81e2298-eaee-4632-979e-784164906320", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:45 GMT", + "x-ms-correlation-request-id" : "449953d4-77d4-457d-be7e-3383aaf4b851", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BC5C242C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064745Z:449953d4-77d4-457d-be7e-3383aaf4b851", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5448", + "x-ms-request-id" : "f16e6ad5-6132-4534-916a-08be69d9e1d8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d\",\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp5-6922383d\",\"state\":\"Running\",\"hostNames\":[\"webapp5-6922383d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp5-6922383d\",\"repositorySiteName\":\"webapp5-6922383d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp5-6922383d.azurewebsites.net\",\"webapp5-6922383d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp5-6922383d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-6922383d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:47:28.2133333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp5-6922383d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp5-6922383d\\\\$webapp5-6922383d\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp5-6922383d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/hostNameBindings/webapp5-6922383d.jsdkdemo-493851ec.com?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b30b3708-221c-4cf4-807d-cf95dd89246d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1184", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:54 GMT", + "x-ms-correlation-request-id" : "8de3a69f-4f68-4b46-b82b-0a1dfb164827", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BC5C242C0\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064754Z:8de3a69f-4f68-4b46-b82b-0a1dfb164827", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "522", + "x-ms-request-id" : "33b39b0f-ee91-431e-a74e-6d3d1d6b83af", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/hostNameBindings/webapp5-6922383d.jsdkdemo-493851ec.com\",\"name\":\"webapp5-6922383d/webapp5-6922383d.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp5-6922383d\",\"domainId\":null,\"azureResourceName\":\"webapp5-6922383d\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d2fb006-2713-4a59-a9c6-c81a5ee90cae", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:55 GMT", + "x-ms-correlation-request-id" : "b53179c3-e18f-41d2-a5ce-64b466634768", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BD1283FF5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064755Z:b53179c3-e18f-41d2-a5ce-64b466634768", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5559", + "x-ms-request-id" : "f2559870-b930-460d-810d-a3bc98baf901", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d\",\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp5-6922383d\",\"state\":\"Running\",\"hostNames\":[\"webapp5-6922383d.jsdkdemo-493851ec.com\",\"webapp5-6922383d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp5-6922383d\",\"repositorySiteName\":\"webapp5-6922383d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp5-6922383d.jsdkdemo-493851ec.com\",\"webapp5-6922383d.azurewebsites.net\",\"webapp5-6922383d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp5-6922383d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-6922383d.jsdkdemo-493851ec.com\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-6922383d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:47:53.5033333\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":null,\"scmIpSecurityRestrictions\":null,\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp5-6922383d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp5-6922383d\\\\$webapp5-6922383d\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp5-6922383d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":[],\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "81b1adb2-311b-4ae1-ae0f-70e3c7c0bd59", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:55 GMT", + "x-ms-correlation-request-id" : "cdf4c226-3f6a-4bd7-b558-68510ac5ac8e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064755Z:cdf4c226-3f6a-4bd7-b558-68510ac5ac8e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3574", + "x-ms-request-id" : "bbf886bb-7418-4468-a612-a3b7fd5f55c8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/web\",\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp5-6922383d\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3%23%23West%20US%23?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8db42378-623d-40fb-9813-cfad5122df46", + "Content-Type" : "application/json" + }, + "Response" : { + "Warning" : "199 Some of the uploaded certificates are either self-signed or expired.,199 Some of the uploaded certificates cannot be validated to a trusted CA", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:47:59 GMT", + "x-ms-correlation-request-id" : "90e149fa-c1b8-4f7b-979c-d7faf01b193e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064759Z:90e149fa-c1b8-4f7b-979c-d7faf01b193e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "922", + "x-ms-request-id" : "7a05b231-0039-4dba-b393-c2c476a7964f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/certificates/9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##West US#\",\"name\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3##West US#\",\"type\":\"Microsoft.Web/certificates\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"friendlyName\":\"jsdkdemo-493851ec.com\",\"subjectName\":\"*.jsdkdemo-493851ec.com\",\"hostNames\":[\"*.jsdkdemo-493851ec.com\"],\"pfxBlob\":null,\"siteName\":null,\"selfLink\":null,\"issuer\":\"*.jsdkdemo-493851ec.com\",\"issueDate\":\"2020-09-01T06:35:34+00:00\",\"expirationDate\":\"2030-08-30T06:35:34+00:00\",\"password\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"valid\":null,\"toDelete\":null,\"cerBlob\":null,\"publicKeyHash\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"keyVaultId\":\"\",\"keyVaultSecretName\":\"\",\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"serverFarmId\":null,\"tags\":{}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba222544-4c46-42b1-899b-65d992400ada", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:48:01 GMT", + "x-ms-correlation-request-id" : "0fa83d91-5ded-47fd-90c3-4758b3b7d12e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "497", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BD1283FF5\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064802Z:0fa83d91-5ded-47fd-90c3-4758b3b7d12e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "5794", + "x-ms-request-id" : "696369e7-ad13-4841-b333-4116da070cce", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d\",\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"name\":\"webapp5-6922383d\",\"state\":\"Running\",\"hostNames\":[\"webapp5-6922383d.jsdkdemo-493851ec.com\",\"webapp5-6922383d.azurewebsites.net\"],\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"selfLink\":\"https://waws-prod-bay-089.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rgnemv_34984669300-WestUSwebspace/sites/webapp5-6922383d\",\"repositorySiteName\":\"webapp5-6922383d\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"webapp5-6922383d.jsdkdemo-493851ec.com\",\"webapp5-6922383d.azurewebsites.net\",\"webapp5-6922383d.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"webapp5-6922383d.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-6922383d.jsdkdemo-493851ec.com\",\"sslState\":\"SniEnabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\",\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"webapp5-6922383d.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-09-01T06:48:01.06\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"vnetRouteAllEnabled\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"scmMinTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"functionAppScaleLimit\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"webapp5-6922383d\",\"trafficManagerHostNames\":null,\"sku\":\"Standard\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"40.83.150.233\",\"possibleInboundIpAddresses\":\"40.83.150.233\",\"ftpUsername\":\"webapp5-6922383d\\\\$webapp5-6922383d\",\"ftpsHostName\":\"ftps://waws-prod-bay-089.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184\",\"possibleOutboundIpAddresses\":\"40.83.150.233,13.64.108.67,13.64.104.203,13.64.109.86,13.64.107.184,13.64.105.5,13.64.108.146\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-bay-089\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rgnemv_34984669300\",\"defaultHostName\":\"webapp5-6922383d.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null,\"migrationState\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "5cbd6831-36e9-4a9f-8848-cf3fe5e778eb", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:48:03 GMT", + "x-ms-correlation-request-id" : "4cc60e88-c3a6-4f1c-b64a-d0b225f43997", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BD5A94E40\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064803Z:4cc60e88-c3a6-4f1c-b64a-d0b225f43997", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "3560", + "x-ms-request-id" : "38fe3115-aaf8-4880-9da3-c5df32f2f705", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d\",\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"numberOfWorkers\":1,\"defaultDocuments\":[\"Default.htm\",\"Default.html\",\"Default.asp\",\"index.htm\",\"index.html\",\"iisstart.htm\",\"default.aspx\",\"index.php\",\"hostingstart.html\"],\"netFrameworkVersion\":\"v4.0\",\"phpVersion\":\"5.6\",\"pythonVersion\":\"\",\"nodeVersion\":\"\",\"powerShellVersion\":\"\",\"linuxFxVersion\":\"\",\"windowsFxVersion\":null,\"requestTracingEnabled\":false,\"remoteDebuggingEnabled\":false,\"remoteDebuggingVersion\":\"VS2019\",\"httpLoggingEnabled\":false,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":35,\"detailedErrorLoggingEnabled\":false,\"publishingUsername\":\"$webapp5-6922383d\",\"publishingPassword\":null,\"appSettings\":null,\"azureStorageAccounts\":{},\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":\"None\",\"use32BitWorkerProcess\":true,\"webSocketsEnabled\":false,\"alwaysOn\":false,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":\"\",\"managedPipelineMode\":\"Integrated\",\"virtualApplications\":[{\"virtualPath\":\"/\",\"physicalPath\":\"site\\\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null}],\"winAuthAdminState\":0,\"winAuthTenantState\":0,\"customAppPoolIdentityAdminState\":false,\"customAppPoolIdentityTenantState\":false,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":\"LeastRequests\",\"routingRules\":[],\"experiments\":{\"rampUpRules\":[]},\"limits\":null,\"autoHealEnabled\":false,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":\"\",\"vnetRouteAllEnabled\":false,\"siteAuthEnabled\":false,\"siteAuthSettings\":{\"enabled\":null,\"unauthenticatedClientAction\":null,\"tokenStoreEnabled\":null,\"allowedExternalRedirectUrls\":null,\"defaultProvider\":null,\"clientId\":null,\"clientSecret\":null,\"clientSecretSettingName\":null,\"clientSecretCertificateThumbprint\":null,\"issuer\":null,\"allowedAudiences\":null,\"additionalLoginParams\":null,\"isAadAutoProvisioned\":false,\"aadClaimsAuthorization\":null,\"googleClientId\":null,\"googleClientSecret\":null,\"googleClientSecretSettingName\":null,\"googleOAuthScopes\":null,\"facebookAppId\":null,\"facebookAppSecret\":null,\"facebookAppSecretSettingName\":null,\"facebookOAuthScopes\":null,\"gitHubClientId\":null,\"gitHubClientSecret\":null,\"gitHubClientSecretSettingName\":null,\"gitHubOAuthScopes\":null,\"twitterConsumerKey\":null,\"twitterConsumerSecret\":null,\"twitterConsumerSecretSettingName\":null,\"microsoftAccountClientId\":null,\"microsoftAccountClientSecret\":null,\"microsoftAccountClientSecretSettingName\":null,\"microsoftAccountOAuthScopes\":null},\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":false,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":false,\"http20Enabled\":false,\"minTlsVersion\":\"1.2\",\"scmMinTlsVersion\":\"1.0\",\"ftpsState\":\"AllAllowed\",\"preWarmedInstanceCount\":0,\"functionAppScaleLimit\":0,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":false,\"functionsRuntimeScaleMonitoringEnabled\":false,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a1d29791-2d2c-4888-85e2-e63b6af8525f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1183", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:48:11 GMT", + "x-ms-correlation-request-id" : "72eac0e3-b42d-4238-8347-9de9c901462a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BDBD92B00\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064811Z:72eac0e3-b42d-4238-8347-9de9c901462a", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "489", + "x-ms-request-id" : "46f6fd8d-2d06-4b22-88a7-2d61d57da8dc", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/sourcecontrols/web\",\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3937416-11c1-4821-8575-614644f0e8d4" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:48:42 GMT", + "x-ms-correlation-request-id" : "f9cae276-8fa0-4e45-924b-18217d48c965", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BDBD92B00\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064843Z:f9cae276-8fa0-4e45-924b-18217d48c965", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "653", + "x-ms-request-id" : "12fca3d5-f021-4660-827e-ac0c8596398a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/sourcecontrols/web\",\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"InProgress\",\"provisioningDetails\":\"2020-09-01T06:48:39.0733612 https://webapp5-6922383d.scm.azurewebsites.net/api/deployments/latest?deployer=GitHub&time=2020-09-01_06-48-23Z\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/sourcecontrols/web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "440dd1c2-e824-4378-a1b8-f0d211b0f5d8" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:49:12 GMT", + "x-ms-correlation-request-id" : "27183fff-1133-4d88-807c-1f8b429fd225", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BDBD92B00\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064913Z:27183fff-1133-4d88-807c-1f8b429fd225", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "488", + "x-ms-request-id" : "8e16c585-d63b-4e96-ba18-5501ce71f186", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/sourcecontrols/web\",\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites/sourcecontrols\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"repoUrl\":\"https://github.com/jianghaolu/azure-site-test\",\"branch\":\"master\",\"isManualIntegration\":true,\"isGitHubAction\":false,\"deploymentRollbackEnabled\":false,\"isMercurial\":false,\"provisioningState\":\"Succeeded\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/hostNameBindings?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca7cc719-0601-4910-9bae-1a2fa8228eaf", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:49:44 GMT", + "x-ms-correlation-request-id" : "82a2a89c-34f5-460b-8e92-ad79e8e5ceba", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "\"1D6802BDBD92B00\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064944Z:82a2a89c-34f5-460b-8e92-ad79e8e5ceba", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1049", + "x-ms-request-id" : "44f6f654-9536-4117-a6e3-3ddb3ecdb6c4", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/hostNameBindings/webapp5-6922383d.azurewebsites.net\",\"name\":\"webapp5-6922383d/webapp5-6922383d.azurewebsites.net\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp5-6922383d\",\"domainId\":null,\"hostNameType\":\"Verified\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/hostNameBindings/webapp5-6922383d.jsdkdemo-493851ec.com\",\"name\":\"webapp5-6922383d/webapp5-6922383d.jsdkdemo-493851ec.com\",\"type\":\"Microsoft.Web/sites/hostNameBindings\",\"location\":\"West US\",\"properties\":{\"siteName\":\"webapp5-6922383d\",\"domainId\":null,\"azureResourceName\":\"webapp5-6922383d\",\"azureResourceType\":\"Website\",\"customHostNameDnsRecordType\":\"CName\",\"hostNameType\":\"Managed\",\"sslState\":\"SniEnabled\",\"thumbprint\":\"9483F71EE30AB13FBBEF944A7B8D6E23A0BECDB3\"}}],\"nextLink\":null,\"id\":null}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "88acd48b-8fe5-432c-a4eb-6e0073914307", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:49:44 GMT", + "x-ms-correlation-request-id" : "4fe05b4d-5668-4a4e-885f-fb927528861e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064945Z:4fe05b4d-5668-4a4e-885f-fb927528861e", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "d4d72891-5f9a-4550-be4f-29d2188c1822", + "Body" : "{\"id\":null,\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/appsettings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f729cfa-2558-422d-b727-d6daec4945ee", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:49:45 GMT", + "x-ms-correlation-request-id" : "67b99cdb-b3c0-4908-827c-3f86368e1a4f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11993", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064945Z:67b99cdb-b3c0-4908-827c-3f86368e1a4f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "302", + "x-ms-request-id" : "773f18cc-8ff1-47db-b0e7-5e39a52bf2e6", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/appsettings\",\"name\":\"appsettings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"WEBSITE_NODE_DEFAULT_VERSION\":\"6.9.1\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/connectionstrings/list?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "af6efa78-4d04-424a-88b0-00546e29e15a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:49:45 GMT", + "x-ms-correlation-request-id" : "460a0858-57f5-4581-85e0-1bfcf7c8d1ec", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064945Z:460a0858-57f5-4581-85e0-1bfcf7c8d1ec", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "276", + "x-ms-request-id" : "15871196-3ef5-4c8c-99c9-d03d0c399a05", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/connectionstrings\",\"name\":\"connectionstrings\",\"type\":\"Microsoft.Web/sites/config\",\"location\":\"West US\",\"tags\":{},\"properties\":{}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/sites/webapp5-6922383d/config/slotConfigNames?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ef27bda-776e-44da-9ca2-ca2f30173070", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:49:45 GMT", + "x-ms-correlation-request-id" : "bcf0cadf-164b-45fc-bcd3-296b55a64d5c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064945Z:bcf0cadf-164b-45fc-bcd3-296b55a64d5c", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "195", + "x-ms-request-id" : "e5da918a-e161-477b-961c-831d2aae7157", + "Body" : "{\"id\":null,\"name\":\"webapp5-6922383d\",\"type\":\"Microsoft.Web/sites\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"connectionStringNames\":null,\"appSettingNames\":null,\"azureStorageConfigNames\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-497831fca?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "efdbb2d0-3dc6-40a5-8a32-5ae72d24be45", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:49:55 GMT", + "x-ms-correlation-request-id" : "d3803ec0-61cb-4b79-ba2d-b6b47e5df78b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T064956Z:d3803ec0-61cb-4b79-ba2d-b6b47e5df78b", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "678", + "x-ms-request-id" : "efdbb2d0-3dc6-40a5-8a32-5ae72d24be45", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-497831fca\",\"name\":\"jsdktm-497831fca\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-497831fca\",\"fqdn\":\"jsdktm-497831fca.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-497831fca/azureEndpoints/endpoint1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8045fe02-544d-42cd-8791-ed9aa75f45a7", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:49:59 GMT", + "x-ms-correlation-request-id" : "8d4b4d69-2a50-40db-856f-93d48442524e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065000Z:8d4b4d69-2a50-40db-856f-93d48442524e", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "650", + "x-ms-request-id" : "8045fe02-544d-42cd-8791-ed9aa75f45a7", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-497831fca\\/azureEndpoints\\/endpoint1\",\"name\":\"endpoint1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Web\\/sites\\/webapp1-1661603d\",\"target\":\"webapp1-1661603d.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-497831fca/azureEndpoints/endpoint3?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e9f63749-3c99-4c36-96e9-1fbc9ed703e8", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1182", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:50:09 GMT", + "x-ms-correlation-request-id" : "b04e23ce-e560-436b-b94e-9465b6bdbc7b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065009Z:b04e23ce-e560-436b-b94e-9465b6bdbc7b", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "652", + "x-ms-request-id" : "e9f63749-3c99-4c36-96e9-1fbc9ed703e8", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-497831fca\\/azureEndpoints\\/endpoint3\",\"name\":\"endpoint3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Web\\/sites\\/webapp3-75985ca8\",\"target\":\"webapp3-75985ca8.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-497831fca/azureEndpoints/endpoint2?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d120b63-afad-4852-8805-40e0c000e46c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 06:50:17 GMT", + "x-ms-correlation-request-id" : "1c2e8445-c8d2-412b-9fb0-adc71fb05994", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065017Z:1c2e8445-c8d2-412b-9fb0-adc71fb05994", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "654", + "x-ms-request-id" : "5d120b63-afad-4852-8805-40e0c000e46c", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-497831fca\\/azureEndpoints\\/endpoint2\",\"name\":\"endpoint2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Web\\/sites\\/webapp2-8045721d\",\"target\":\"webapp2-8045721d.azurewebsites.net\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"West Europe\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Network/trafficmanagerprofiles/jsdktm-497831fca?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd638bb6-10f6-4018-a1b3-508286285318", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:50:17 GMT", + "x-ms-correlation-request-id" : "a9e5e3ac-f751-4767-b8ed-afdc18591590", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065017Z:a9e5e3ac-f751-4767-b8ed-afdc18591590", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2645", + "x-ms-request-id" : "cd638bb6-10f6-4018-a1b3-508286285318", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-497831fca\",\"name\":\"jsdktm-497831fca\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"jsdktm-497831fca\",\"fqdn\":\"jsdktm-497831fca.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-497831fca\\/azureEndpoints\\/endpoint1\",\"name\":\"endpoint1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Web\\/sites\\/webapp1-1661603d\",\"target\":\"webapp1-1661603d.azurewebsites.net\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"West US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-497831fca\\/azureEndpoints\\/endpoint2\",\"name\":\"endpoint2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Web\\/sites\\/webapp2-8045721d\",\"target\":\"webapp2-8045721d.azurewebsites.net\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"West Europe\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/jsdktm-497831fca\\/azureEndpoints\\/endpoint3\",\"name\":\"endpoint3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rgnemv_34984669300\\/providers\\/Microsoft.Web\\/sites\\/webapp3-75985ca8\",\"target\":\"webapp3-75985ca8.azurewebsites.net\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East Asia\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "61f8a6d1-215a-4154-a4a2-84928e9c0a9d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1181", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:50:24 GMT", + "x-ms-correlation-request-id" : "926b5b7f-4771-4ea2-9f85-b00ec96ae16f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065024Z:926b5b7f-4771-4ea2-9f85-b00ec96ae16f", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1375", + "x-ms-request-id" : "e0056ab7-15a4-4ce5-8f79-ac1bed148b96", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan1_846419\",\"name\":\"jplan1_846419\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"West US\",\"tags\":{},\"properties\":{\"serverFarmId\":35657,\"name\":\"jplan1_846419\",\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"capacity\":2},\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":2,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":2,\"status\":\"Ready\",\"webSpace\":\"rgnemv_34984669300-WestUSwebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West US\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":3,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_34984669300\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-bay-089_35657\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":null,\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"capacity\":2}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan2_371327?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3710992-e9fc-4dc9-b428-8c1235b38cbd", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:50:29 GMT", + "x-ms-correlation-request-id" : "2066748e-bf9a-490b-a614-bd3a837fdc80", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065029Z:2066748e-bf9a-490b-a614-bd3a837fdc80", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1387", + "x-ms-request-id" : "f88b9de1-9904-470f-9fb3-f11a80b6c3e4", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan2_371327\",\"name\":\"jplan2_371327\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"West Europe\",\"tags\":{},\"properties\":{\"serverFarmId\":12313,\"name\":\"jplan2_371327\",\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"capacity\":2},\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":2,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":2,\"status\":\"Ready\",\"webSpace\":\"rgnemv_34984669300-WestEuropewebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"West Europe\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":1,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_34984669300\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-am2-329_12313\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":null,\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"capacity\":2}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan3_85750a?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "50895ae4-2a07-4acd-9ee8-752499d419b5", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 06:50:34 GMT", + "x-ms-correlation-request-id" : "a296b41e-f0f6-4ae4-94f9-7567acf4be39", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065035Z:a296b41e-f0f6-4ae4-94f9-7567acf4be39", + "X-AspNet-Version" : "4.0.30319", + "Expires" : "-1", + "Content-Length" : "1383", + "x-ms-request-id" : "5d8f1a44-8554-4a17-a072-217680978536", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgnemv_34984669300/providers/Microsoft.Web/serverfarms/jplan3_85750a\",\"name\":\"jplan3_85750a\",\"type\":\"Microsoft.Web/serverfarms\",\"kind\":\"app\",\"location\":\"East Asia\",\"tags\":{},\"properties\":{\"serverFarmId\":118138,\"name\":\"jplan3_85750a\",\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"capacity\":2},\"workerSize\":\"Default\",\"workerSizeId\":0,\"workerTierName\":null,\"numberOfWorkers\":2,\"currentWorkerSize\":\"Default\",\"currentWorkerSizeId\":0,\"currentNumberOfWorkers\":2,\"status\":\"Ready\",\"webSpace\":\"rgnemv_34984669300-EastAsiawebspace\",\"subscription\":\"00000000-0000-0000-0000-000000000000\",\"adminSiteName\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"maximumNumberOfWorkers\":10,\"planName\":\"VirtualDedicatedPlan\",\"adminRuntimeSiteName\":null,\"computeMode\":\"Dedicated\",\"siteMode\":null,\"geoRegion\":\"East Asia\",\"perSiteScaling\":false,\"maximumElasticWorkerCount\":1,\"numberOfSites\":1,\"hostingEnvironmentId\":null,\"isSpot\":false,\"spotExpirationTime\":null,\"freeOfferExpirationTime\":null,\"tags\":{},\"kind\":\"app\",\"resourceGroup\":\"rgnemv_34984669300\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"mdmId\":\"waws-prod-hk1-001_118138\",\"targetWorkerCount\":0,\"targetWorkerSizeId\":0,\"provisioningState\":null,\"webSiteId\":null,\"existingServerFarmIds\":null},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\",\"size\":\"S1\",\"capacity\":2}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgnemv_34984669300?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "7cfbc6f7-4d7f-438b-93c0-5bb579938700", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 06:50:37 GMT", + "x-ms-correlation-request-id" : "e20f183f-6b06-417d-a845-74f3d9aec18a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T065038Z:e20f183f-6b06-417d-a845-74f3d9aec18a", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "e20f183f-6b06-417d-a845-74f3d9aec18a", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR05FTVY6NUYzNDk4NDY2OTMwMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null + } ], + "variables" : [ "rgnemv_34984669300", "webapp1-1661603d", "webapp2-8045721d", "webapp3-75985ca8", "webapp4-10006d58", "webapp5-6922383d", "jplan1_846419", "jplan2_371327", "jplan3_85750a", "jsdkdemo-493851ec", "jsdktm-497831fca" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md new file mode 100644 index 0000000000000..003c434ede62c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 2.0.0-beta.4 (Unreleased) + +- TODO diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/README.md b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/README.md new file mode 100644 index 0000000000000..3b4b3653a3a0d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/README.md @@ -0,0 +1,42 @@ +# Azure Resource Manager traffic manager client library for Java + +Azure Resource Manager traffic manager client library for Java + +For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azure-sdk-java-mgmt). + +## Getting started + +### Prerequisites + +- Java Development Kit (JDK) with version 8 or above + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-trafficmanager;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-trafficmanager + 2.0.0-beta.4 + +``` +[//]: # ({x-version-update-end}) + +## Key concepts + +## Examples + +## Troubleshooting + +## Next steps + +## Contributing + +If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft +Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml new file mode 100644 index 0000000000000..6fefad1bcf51b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml @@ -0,0 +1,136 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-trafficmanager + 2.0.0-beta.4 + jar + + Microsoft Azure SDK for Traffic Manager Management + This package contains Microsoft Azure Traffic Manager Management SDK. For documentation on how to use this package, please see https://aka.ms/azure-sdk-java-mgmt + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + 0.10 + 0.10 + + + + + microsoft + Microsoft + + + + + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.0.0-beta.4 + + + org.slf4j + slf4j-simple + 1.7.30 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.6.2 + test + + + + com.google.guava + guava + 29.0-jre + test + + + com.azure + azure-core-http-netty + 1.5.4 + test + + + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 + test + + + + + azure-mgmt-sdk-test-jar + + + !maven.test.skip + + + + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.0.0-beta.4 + test-jar + test + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + true + true + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + com/azure/resourcemanager/**/fluent/**/* + com/azure/resourcemanager/**/models/**/* + + + + + + diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java new file mode 100644 index 0000000000000..0e71a0d093822 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpPipeline; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; +import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; +import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.trafficmanager.implementation.TrafficManagerProfilesImpl; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfiles; + +/** Entry point to Azure traffic manager management. */ +public final class TrafficManager extends Manager { + // Collections + private TrafficManagerProfiles profiles; + + /** + * Get a Configurable instance that can be used to create {@link TrafficManager} with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new TrafficManager.ConfigurableImpl(); + } + + /** + * Creates an instance of TrafficManager that exposes traffic manager management API entry points. + * + * @param credential the credentials to use + * @param profile the profile to use + * @return the TrafficManager + */ + public static TrafficManager authenticate(TokenCredential credential, AzureProfile profile) { + return authenticate(HttpPipelineProvider.buildHttpPipeline(credential, profile), profile); + } + + /** + * Creates an instance of TrafficManager that exposes traffic manager management API entry points. + * + * @param httpPipeline the RestClient to be used for API calls. + * @param profile the profile to use + * @return the TrafficManager + */ + public static TrafficManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + return authenticate(httpPipeline, profile, new SdkContext()); + } + + /** + * Creates an instance of TrafficManager that exposes traffic manager resource management API entry points. + * + * @param httpPipeline the RestClient to be used for API calls. + * @param profile the profile to use + * @param sdkContext the sdk context + * @return the TrafficManager + */ + public static TrafficManager authenticate(HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { + return new TrafficManager(httpPipeline, profile, sdkContext); + } + + /** The interface allowing configurations to be set. */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of TrafficManager that exposes traffic manager management API entry points. + * + * @param credential the credential to use + * @param profile the profile to use + * @return the interface exposing traffic manager management API entry points that work across subscriptions + */ + TrafficManager authenticate(TokenCredential credential, AzureProfile profile); + } + + /** The implementation for Configurable interface. */ + private static class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { + public TrafficManager authenticate(TokenCredential credential, AzureProfile profile) { + return TrafficManager.authenticate(buildHttpPipeline(credential, profile), profile); + } + } + + private TrafficManager(HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { + super( + httpPipeline, + profile, + new TrafficManagerManagementClientBuilder() + .pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .buildClient(), + sdkContext); + } + + /** @return entry point to traffic manager profile management */ + public TrafficManagerProfiles profiles() { + if (this.profiles == null) { + this.profiles = new TrafficManagerProfilesImpl(this); + } + return this.profiles; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClient.java new file mode 100644 index 0000000000000..c3feae1d074c2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClient.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; +import com.azure.resourcemanager.trafficmanager.fluent.EndpointsClient; +import com.azure.resourcemanager.trafficmanager.fluent.GeographicHierarchiesClient; +import com.azure.resourcemanager.trafficmanager.fluent.HeatMapsClient; +import com.azure.resourcemanager.trafficmanager.fluent.ProfilesClient; +import com.azure.resourcemanager.trafficmanager.fluent.TrafficManagerUserMetricsKeysClient; +import java.time.Duration; + +/** Initializes a new instance of the TrafficManagerManagementClient type. */ +@ServiceClient(builder = TrafficManagerManagementClientBuilder.class) +public final class TrafficManagerManagementClient extends AzureServiceClient { + private final ClientLogger logger = new ClientLogger(TrafficManagerManagementClient.class); + + /** + * Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + */ + private final String subscriptionId; + + /** + * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID + * forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The EndpointsClient object to access its operations. */ + private final EndpointsClient endpoints; + + /** + * Gets the EndpointsClient object to access its operations. + * + * @return the EndpointsClient object. + */ + public EndpointsClient getEndpoints() { + return this.endpoints; + } + + /** The ProfilesClient object to access its operations. */ + private final ProfilesClient profiles; + + /** + * Gets the ProfilesClient object to access its operations. + * + * @return the ProfilesClient object. + */ + public ProfilesClient getProfiles() { + return this.profiles; + } + + /** The GeographicHierarchiesClient object to access its operations. */ + private final GeographicHierarchiesClient geographicHierarchies; + + /** + * Gets the GeographicHierarchiesClient object to access its operations. + * + * @return the GeographicHierarchiesClient object. + */ + public GeographicHierarchiesClient getGeographicHierarchies() { + return this.geographicHierarchies; + } + + /** The HeatMapsClient object to access its operations. */ + private final HeatMapsClient heatMaps; + + /** + * Gets the HeatMapsClient object to access its operations. + * + * @return the HeatMapsClient object. + */ + public HeatMapsClient getHeatMaps() { + return this.heatMaps; + } + + /** The TrafficManagerUserMetricsKeysClient object to access its operations. */ + private final TrafficManagerUserMetricsKeysClient trafficManagerUserMetricsKeys; + + /** + * Gets the TrafficManagerUserMetricsKeysClient object to access its operations. + * + * @return the TrafficManagerUserMetricsKeysClient object. + */ + public TrafficManagerUserMetricsKeysClient getTrafficManagerUserMetricsKeys() { + return this.trafficManagerUserMetricsKeys; + } + + /** + * Initializes an instance of TrafficManagerManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + */ + TrafficManagerManagementClient( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + super(httpPipeline, serializerAdapter, environment); + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2018-04-01"; + this.endpoints = new EndpointsClient(this); + this.profiles = new ProfilesClient(this); + this.geographicHierarchies = new GeographicHierarchiesClient(this); + this.heatMaps = new HeatMapsClient(this); + this.trafficManagerUserMetricsKeys = new TrafficManagerUserMetricsKeysClient(this); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClientBuilder.java new file mode 100644 index 0000000000000..962377c8c5d11 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClientBuilder.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.AzureJacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the TrafficManagerManagementClient type. */ +@ServiceClientBuilder(serviceClients = {TrafficManagerManagementClient.class}) +public final class TrafficManagerManagementClientBuilder { + /* + * Gets subscription credentials which uniquely identify Microsoft Azure + * subscription. The subscription ID forms part of the URI for every + * service call. + */ + private String subscriptionId; + + /** + * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID + * forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the TrafficManagerManagementClientBuilder. + */ + public TrafficManagerManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the TrafficManagerManagementClientBuilder. + */ + public TrafficManagerManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the TrafficManagerManagementClientBuilder. + */ + public TrafficManagerManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the TrafficManagerManagementClientBuilder. + */ + public TrafficManagerManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the TrafficManagerManagementClientBuilder. + */ + public TrafficManagerManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the TrafficManagerManagementClientBuilder. + */ + public TrafficManagerManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /** + * Builds an instance of TrafficManagerManagementClient with the provided parameters. + * + * @return an instance of TrafficManagerManagementClient. + */ + public TrafficManagerManagementClient buildClient() { + if (endpoint == null) { + this.endpoint = "https://management.azure.com"; + } + if (environment == null) { + this.environment = AzureEnvironment.AZURE; + } + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = new AzureJacksonAdapter(); + } + if (defaultPollInterval == null) { + this.defaultPollInterval = Duration.ofSeconds(30); + } + TrafficManagerManagementClient client = + new TrafficManagerManagementClient( + pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + return client; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java new file mode 100644 index 0000000000000..14b424bacd2d5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java @@ -0,0 +1,1026 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.DeleteOperationResultInner; +import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Endpoints. */ +public final class EndpointsClient { + private final ClientLogger logger = new ClientLogger(EndpointsClient.class); + + /** The proxy service used to perform REST calls. */ + private final EndpointsService service; + + /** The service client containing this operation class. */ + private final TrafficManagerManagementClient client; + + /** + * Initializes an instance of EndpointsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public EndpointsClient(TrafficManagerManagementClient client) { + this.service = + RestProxy.create(EndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for TrafficManagerManagementClientEndpoints to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "TrafficManagerManage") + private interface EndpointsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @PathParam("endpointType") String endpointType, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") EndpointInner parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @PathParam("endpointType") String endpointType, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @PathParam("endpointType") String endpointType, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") EndpointInner parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @PathParam("endpointType") String endpointType, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + } + + /** + * Update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointName The name of the Traffic Manager endpoint to be updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + profileName, + endpointType, + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointName The name of the Traffic Manager endpoint to be updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + profileName, + endpointType, + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointName The name of the Traffic Manager endpoint to be updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters) { + return updateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointName The name of the Traffic Manager endpoint to be updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointName The name of the Traffic Manager endpoint to be updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointInner update( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters) { + return updateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).block(); + } + + /** + * Update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointName The name of the Traffic Manager endpoint to be updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, context) + .block(); + } + + /** + * Gets a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @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 Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String profileName, String endpointType, String endpointName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + resourceGroupName, + profileName, + endpointType, + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @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 Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String profileName, String endpointType, String endpointName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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.")); + } + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + resourceGroupName, + profileName, + endpointType, + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @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 Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String profileName, String endpointType, String endpointName) { + return getWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @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 Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String profileName, String endpointType, String endpointName, Context context) { + return getWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @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 Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointInner get(String resourceGroupName, String profileName, String endpointType, String endpointName) { + return getAsync(resourceGroupName, profileName, endpointType, endpointName).block(); + } + + /** + * Gets a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @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 Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String profileName, String endpointType, String endpointName, Context context) { + return getWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, context).block(); + } + + /** + * Create or update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or + * updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointName The name of the Traffic Manager endpoint to be created or updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + profileName, + endpointType, + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Create or update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or + * updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointName The name of the Traffic Manager endpoint to be created or updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + profileName, + endpointType, + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Create or update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or + * updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointName The name of the Traffic Manager endpoint to be created or updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or + * updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointName The name of the Traffic Manager endpoint to be created or updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, profileName, endpointType, endpointName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or + * updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointName The name of the Traffic Manager endpoint to be created or updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointInner createOrUpdate( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters) { + return createOrUpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).block(); + } + + /** + * Create or update a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or + * updated. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointName The name of the Traffic Manager endpoint to be created or updated. + * @param parameters Class representing a Traffic Manager endpoint. + * @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 class representing a Traffic Manager endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String profileName, + String endpointType, + String endpointName, + EndpointInner parameters, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, profileName, endpointType, endpointName, parameters, context) + .block(); + } + + /** + * Deletes a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String profileName, String endpointType, String endpointName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + profileName, + endpointType, + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String profileName, String endpointType, String endpointName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + profileName, + endpointType, + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync( + String resourceGroupName, String profileName, String endpointType, String endpointName) { + return deleteWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Deletes a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync( + String resourceGroupName, String profileName, String endpointType, String endpointName, Context context) { + return deleteWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Deletes a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeleteOperationResultInner delete( + String resourceGroupName, String profileName, String endpointType, String endpointName) { + return deleteAsync(resourceGroupName, profileName, endpointType, endpointName).block(); + } + + /** + * Deletes a Traffic Manager endpoint. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted. + * @param profileName The name of the Traffic Manager profile. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String profileName, String endpointType, String endpointName, Context context) { + return deleteWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, context).block(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java new file mode 100644 index 0000000000000..903fe5ee4b469 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.TrafficManagerGeographicHierarchyInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in GeographicHierarchies. */ +public final class GeographicHierarchiesClient { + private final ClientLogger logger = new ClientLogger(GeographicHierarchiesClient.class); + + /** The proxy service used to perform REST calls. */ + private final GeographicHierarchiesService service; + + /** The service client containing this operation class. */ + private final TrafficManagerManagementClient client; + + /** + * Initializes an instance of GeographicHierarchiesClient. + * + * @param client the instance of the service client containing this operation class. + */ + public GeographicHierarchiesClient(TrafficManagerManagementClient client) { + this.service = + RestProxy + .create(GeographicHierarchiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for TrafficManagerManagementClientGeographicHierarchies to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "TrafficManagerManage") + private interface GeographicHierarchiesService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDefault( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, Context context); + } + + /** + * Gets the default Geographic Hierarchy used by the Geographic traffic routing method. + * + * @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 the default Geographic Hierarchy used by the Geographic traffic routing method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDefaultWithResponseAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.getDefault(this.client.getEndpoint(), this.client.getApiVersion(), context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the default Geographic Hierarchy used by the Geographic traffic routing method. + * + * @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 the default Geographic Hierarchy used by the Geographic traffic routing method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDefaultWithResponseAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.getDefault(this.client.getEndpoint(), this.client.getApiVersion(), context); + } + + /** + * Gets the default Geographic Hierarchy used by the Geographic traffic routing method. + * + * @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 the default Geographic Hierarchy used by the Geographic traffic routing method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getDefaultAsync() { + return getDefaultWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the default Geographic Hierarchy used by the Geographic traffic routing method. + * + * @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 the default Geographic Hierarchy used by the Geographic traffic routing method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getDefaultAsync(Context context) { + return getDefaultWithResponseAsync(context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the default Geographic Hierarchy used by the Geographic traffic routing method. + * + * @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 the default Geographic Hierarchy used by the Geographic traffic routing method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrafficManagerGeographicHierarchyInner getDefault() { + return getDefaultAsync().block(); + } + + /** + * Gets the default Geographic Hierarchy used by the Geographic traffic routing method. + * + * @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 the default Geographic Hierarchy used by the Geographic traffic routing method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDefaultWithResponse(Context context) { + return getDefaultWithResponseAsync(context).block(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java new file mode 100644 index 0000000000000..09c28e79181be --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.CollectionFormat; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.HeatMapModelInner; +import java.util.List; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in HeatMaps. */ +public final class HeatMapsClient { + private final ClientLogger logger = new ClientLogger(HeatMapsClient.class); + + /** The proxy service used to perform REST calls. */ + private final HeatMapsService service; + + /** The service client containing this operation class. */ + private final TrafficManagerManagementClient client; + + /** + * Initializes an instance of HeatMapsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public HeatMapsClient(TrafficManagerManagementClient client) { + this.service = RestProxy.create(HeatMapsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for TrafficManagerManagementClientHeatMaps to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "TrafficManagerManage") + private interface HeatMapsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @PathParam("heatMapType") String heatMapType, + @QueryParam("topLeft") String topLeft, + @QueryParam("botRight") String botRight, + @QueryParam("api-version") String apiVersion, + Context context); + } + + /** + * Gets latest heatmap for Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param topLeft Array of Get4ItemsItem. + * @param botRight Array of Get5ItemsItem. + * @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 latest heatmap for Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String profileName, List topLeft, List botRight) { + 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 (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + final String heatMapType = "default"; + String topLeftConverted = + JacksonAdapter.createDefaultSerializerAdapter().serializeList(topLeft, CollectionFormat.CSV); + String botRightConverted = + JacksonAdapter.createDefaultSerializerAdapter().serializeList(botRight, CollectionFormat.CSV); + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + profileName, + heatMapType, + topLeftConverted, + botRightConverted, + this.client.getApiVersion(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets latest heatmap for Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param topLeft Array of Get4ItemsItem. + * @param botRight Array of Get5ItemsItem. + * @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 latest heatmap for Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String profileName, List topLeft, List botRight, 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 (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + final String heatMapType = "default"; + String topLeftConverted = + JacksonAdapter.createDefaultSerializerAdapter().serializeList(topLeft, CollectionFormat.CSV); + String botRightConverted = + JacksonAdapter.createDefaultSerializerAdapter().serializeList(botRight, CollectionFormat.CSV); + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + profileName, + heatMapType, + topLeftConverted, + botRightConverted, + this.client.getApiVersion(), + context); + } + + /** + * Gets latest heatmap for Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param topLeft Array of Get4ItemsItem. + * @param botRight Array of Get5ItemsItem. + * @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 latest heatmap for Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String profileName, List topLeft, List botRight) { + return getWithResponseAsync(resourceGroupName, profileName, topLeft, botRight) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets latest heatmap for Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param topLeft Array of Get4ItemsItem. + * @param botRight Array of Get5ItemsItem. + * @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 latest heatmap for Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String profileName, List topLeft, List botRight, Context context) { + return getWithResponseAsync(resourceGroupName, profileName, topLeft, botRight, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets latest heatmap for Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @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 latest heatmap for Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String profileName) { + final List topLeft = null; + final List botRight = null; + final Context context = null; + return getWithResponseAsync(resourceGroupName, profileName, topLeft, botRight) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets latest heatmap for Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param topLeft Array of Get4ItemsItem. + * @param botRight Array of Get5ItemsItem. + * @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 latest heatmap for Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HeatMapModelInner get( + String resourceGroupName, String profileName, List topLeft, List botRight) { + return getAsync(resourceGroupName, profileName, topLeft, botRight).block(); + } + + /** + * Gets latest heatmap for Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @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 latest heatmap for Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HeatMapModelInner get(String resourceGroupName, String profileName) { + final List topLeft = null; + final List botRight = null; + final Context context = null; + return getAsync(resourceGroupName, profileName, topLeft, botRight).block(); + } + + /** + * Gets latest heatmap for Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. + * @param profileName The name of the Traffic Manager profile. + * @param topLeft Array of Get4ItemsItem. + * @param botRight Array of Get5ItemsItem. + * @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 latest heatmap for Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String profileName, List topLeft, List botRight, Context context) { + return getWithResponseAsync(resourceGroupName, profileName, topLeft, botRight, context).block(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java new file mode 100644 index 0000000000000..4927cca89580a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java @@ -0,0 +1,1288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.DeleteOperationResultInner; +import com.azure.resourcemanager.trafficmanager.fluent.inner.ProfileInner; +import com.azure.resourcemanager.trafficmanager.fluent.inner.TrafficManagerNameAvailabilityInner; +import com.azure.resourcemanager.trafficmanager.models.CheckTrafficManagerRelativeDnsNameAvailabilityParameters; +import com.azure.resourcemanager.trafficmanager.models.ProfileListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Profiles. */ +public final class ProfilesClient + implements InnerSupportsGet, + InnerSupportsListing, + InnerSupportsDelete { + private final ClientLogger logger = new ClientLogger(ProfilesClient.class); + + /** The proxy service used to perform REST calls. */ + private final ProfilesService service; + + /** The service client containing this operation class. */ + private final TrafficManagerManagementClient client; + + /** + * Initializes an instance of ProfilesClient. + * + * @param client the instance of the service client containing this operation class. + */ + public ProfilesClient(TrafficManagerManagementClient client) { + this.service = RestProxy.create(ProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for TrafficManagerManagementClientProfiles to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "TrafficManagerManage") + private interface ProfilesService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post("/providers/Microsoft.Network/checkTrafficManagerNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkTrafficManagerRelativeDnsNameAvailability( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ProfileInner parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network" + + "/trafficmanagerprofiles/{profileName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("profileName") String profileName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ProfileInner parameters, + Context context); + } + + /** + * Checks the availability of a Traffic Manager Relative DNS name. + * + * @param parameters Parameters supplied to check Traffic Manager name 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 class representing a Traffic Manager Name Availability response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .checkTrafficManagerRelativeDnsNameAvailability( + this.client.getEndpoint(), this.client.getApiVersion(), parameters, context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Checks the availability of a Traffic Manager Relative DNS name. + * + * @param parameters Parameters supplied to check Traffic Manager name operation. + * @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 class representing a Traffic Manager Name Availability response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .checkTrafficManagerRelativeDnsNameAvailability( + this.client.getEndpoint(), this.client.getApiVersion(), parameters, context); + } + + /** + * Checks the availability of a Traffic Manager Relative DNS name. + * + * @param parameters Parameters supplied to check Traffic Manager name 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 class representing a Traffic Manager Name Availability response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkTrafficManagerRelativeDnsNameAvailabilityAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks the availability of a Traffic Manager Relative DNS name. + * + * @param parameters Parameters supplied to check Traffic Manager name operation. + * @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 class representing a Traffic Manager Name Availability response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkTrafficManagerRelativeDnsNameAvailabilityAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { + return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks the availability of a Traffic Manager Relative DNS name. + * + * @param parameters Parameters supplied to check Traffic Manager name 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 class representing a Traffic Manager Name Availability response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + return checkTrafficManagerRelativeDnsNameAvailabilityAsync(parameters).block(); + } + + /** + * Checks the availability of a Traffic Manager Relative DNS name. + * + * @param parameters Parameters supplied to check Traffic Manager name operation. + * @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 class representing a Traffic Manager Name Availability response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkTrafficManagerRelativeDnsNameAvailabilityWithResponse( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { + return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(parameters, context).block(); + } + + /** + * Lists all Traffic Manager profiles within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profiles to be listed. + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Lists all Traffic Manager profiles within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profiles to be listed. + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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.")); + } + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Lists all Traffic Manager profiles within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profiles to be listed. + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName)); + } + + /** + * Lists all Traffic Manager profiles within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profiles to be listed. + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context)); + } + + /** + * Lists all Traffic Manager profiles within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profiles to be listed. + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists all Traffic Manager profiles within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profiles to be listed. + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Lists all Traffic Manager profiles within a subscription. + * + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + 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.")); + } + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Lists all Traffic Manager profiles within a subscription. + * + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(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.")); + } + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Lists all Traffic Manager profiles within a subscription. + * + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync()); + } + + /** + * Lists all Traffic Manager profiles within a subscription. + * + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context)); + } + + /** + * Lists all Traffic Manager profiles within a subscription. + * + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all Traffic Manager profiles within a subscription. + * + * @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 the list Traffic Manager profiles operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Gets a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @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 Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String profileName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + profileName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @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 Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String profileName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName 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.")); + } + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + profileName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @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 Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String profileName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, profileName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @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 Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String profileName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, profileName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @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 Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProfileInner getByResourceGroup(String resourceGroupName, String profileName) { + return getByResourceGroupAsync(resourceGroupName, profileName).block(); + } + + /** + * Gets a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @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 Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String profileName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, profileName, context).block(); + } + + /** + * Create or update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String profileName, ProfileInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + profileName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Create or update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String profileName, ProfileInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + profileName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Create or update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String profileName, ProfileInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, profileName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String profileName, ProfileInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, profileName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters) { + return createOrUpdateAsync(resourceGroupName, profileName, parameters).block(); + } + + /** + * Create or update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, String profileName, ProfileInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, profileName, parameters, context).block(); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile to be deleted. + * @param profileName The name of the Traffic Manager profile to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String profileName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + profileName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile to be deleted. + * @param profileName The name of the Traffic Manager profile to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String profileName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + profileName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile to be deleted. + * @param profileName The name of the Traffic Manager profile to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String profileName) { + return deleteWithResponseAsync(resourceGroupName, profileName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile to be deleted. + * @param profileName The name of the Traffic Manager profile to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String profileName, Context context) { + return deleteWithResponseAsync(resourceGroupName, profileName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile to be deleted. + * @param profileName The name of the Traffic Manager profile to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeleteOperationResultInner delete(String resourceGroupName, String profileName) { + return deleteAsync(resourceGroupName, profileName).block(); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile to be deleted. + * @param profileName The name of the Traffic Manager profile to be deleted. + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String profileName, Context context) { + return deleteWithResponseAsync(resourceGroupName, profileName, context).block(); + } + + /** + * Update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, String profileName, ProfileInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + profileName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, String profileName, ProfileInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + profileName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String profileName, ProfileInner parameters) { + return updateWithResponseAsync(resourceGroupName, profileName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, String profileName, ProfileInner parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, profileName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProfileInner update(String resourceGroupName, String profileName, ProfileInner parameters) { + return updateAsync(resourceGroupName, profileName, parameters).block(); + } + + /** + * Update a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group containing the Traffic Manager profile. + * @param profileName The name of the Traffic Manager profile. + * @param parameters Class representing a Traffic Manager profile. + * @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 class representing a Traffic Manager profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String profileName, ProfileInner parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, profileName, parameters, context).block(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java new file mode 100644 index 0000000000000..d3ef3be9212bc --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent; + +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.DeleteOperationResultInner; +import com.azure.resourcemanager.trafficmanager.fluent.inner.UserMetricsModelInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in TrafficManagerUserMetricsKeys. */ +public final class TrafficManagerUserMetricsKeysClient { + private final ClientLogger logger = new ClientLogger(TrafficManagerUserMetricsKeysClient.class); + + /** The proxy service used to perform REST calls. */ + private final TrafficManagerUserMetricsKeysService service; + + /** The service client containing this operation class. */ + private final TrafficManagerManagementClient client; + + /** + * Initializes an instance of TrafficManagerUserMetricsKeysClient. + * + * @param client the instance of the service client containing this operation class. + */ + public TrafficManagerUserMetricsKeysClient(TrafficManagerManagementClient client) { + this.service = + RestProxy + .create( + TrafficManagerUserMetricsKeysService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for TrafficManagerManagementClientTrafficManagerUserMetricsKeys to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "TrafficManagerManage") + private interface TrafficManagerUserMetricsKeysService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + } + + /** + * Get the subscription-level key used for Real User Metrics collection. + * + * @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 the subscription-level key used for Real User Metrics collection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync() { + 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.")); + } + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the subscription-level key used for Real User Metrics collection. + * + * @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 the subscription-level key used for Real User Metrics collection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(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.")); + } + context = this.client.mergeContext(context); + return service + .get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), context); + } + + /** + * Get the subscription-level key used for Real User Metrics collection. + * + * @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 the subscription-level key used for Real User Metrics collection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync() { + return getWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the subscription-level key used for Real User Metrics collection. + * + * @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 the subscription-level key used for Real User Metrics collection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(Context context) { + return getWithResponseAsync(context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the subscription-level key used for Real User Metrics collection. + * + * @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 the subscription-level key used for Real User Metrics collection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserMetricsModelInner get() { + return getAsync().block(); + } + + /** + * Get the subscription-level key used for Real User Metrics collection. + * + * @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 the subscription-level key used for Real User Metrics collection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(Context context) { + return getWithResponseAsync(context).block(); + } + + /** + * Create or update a subscription-level key used for Real User Metrics collection. + * + * @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 class representing Traffic Manager User Metrics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync() { + 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.")); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Create or update a subscription-level key used for Real User Metrics collection. + * + * @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 class representing Traffic Manager User Metrics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(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.")); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), context); + } + + /** + * Create or update a subscription-level key used for Real User Metrics collection. + * + * @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 class representing Traffic Manager User Metrics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync() { + return createOrUpdateWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update a subscription-level key used for Real User Metrics collection. + * + * @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 class representing Traffic Manager User Metrics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(Context context) { + return createOrUpdateWithResponseAsync(context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update a subscription-level key used for Real User Metrics collection. + * + * @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 class representing Traffic Manager User Metrics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserMetricsModelInner createOrUpdate() { + return createOrUpdateAsync().block(); + } + + /** + * Create or update a subscription-level key used for Real User Metrics collection. + * + * @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 class representing Traffic Manager User Metrics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(Context context) { + return createOrUpdateWithResponseAsync(context).block(); + } + + /** + * Delete a subscription-level key used for Real User Metrics collection. + * + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync() { + 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Delete a subscription-level key used for Real User Metrics collection. + * + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(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.")); + } + context = this.client.mergeContext(context); + return service + .delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), context); + } + + /** + * Delete a subscription-level key used for Real User Metrics collection. + * + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync() { + return deleteWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Delete a subscription-level key used for Real User Metrics collection. + * + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(Context context) { + return deleteWithResponseAsync(context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Delete a subscription-level key used for Real User Metrics collection. + * + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeleteOperationResultInner delete() { + return deleteAsync().block(); + } + + /** + * Delete a subscription-level key used for Real User Metrics collection. + * + * @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 the result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(Context context) { + return deleteWithResponseAsync(context).block(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/DeleteOperationResultInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/DeleteOperationResultInner.java new file mode 100644 index 0000000000000..1eadccad6f003 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/DeleteOperationResultInner.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent.inner; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeleteOperationResult model. */ +@Immutable +public final class DeleteOperationResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeleteOperationResultInner.class); + + /* + * The result of the operation or request. + */ + @JsonProperty(value = "boolean", access = JsonProperty.Access.WRITE_ONLY) + private Boolean operationResult; + + /** + * Get the operationResult property: The result of the operation or request. + * + * @return the operationResult value. + */ + public Boolean operationResult() { + return this.operationResult; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/EndpointInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/EndpointInner.java new file mode 100644 index 0000000000000..e685c184b6ffd --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/EndpointInner.java @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent.inner; + +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.trafficmanager.models.EndpointMonitorStatus; +import com.azure.resourcemanager.trafficmanager.models.EndpointPropertiesCustomHeadersItem; +import com.azure.resourcemanager.trafficmanager.models.EndpointPropertiesSubnetsItem; +import com.azure.resourcemanager.trafficmanager.models.EndpointStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Endpoint model. */ +@JsonFlatten +public class EndpointInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointInner.class); + + /* + * The Azure Resource URI of the of the endpoint. Not applicable to + * endpoints of type 'ExternalEndpoints'. + */ + @JsonProperty(value = "properties.targetResourceId") + private String targetResourceId; + + /* + * The fully-qualified DNS name or IP address of the endpoint. Traffic + * Manager returns this value in DNS responses to direct traffic to this + * endpoint. + */ + @JsonProperty(value = "properties.target") + private String target; + + /* + * The status of the endpoint. If the endpoint is Enabled, it is probed for + * endpoint health and is included in the traffic routing method. + */ + @JsonProperty(value = "properties.endpointStatus") + private EndpointStatus endpointStatus; + + /* + * The weight of this endpoint when using the 'Weighted' traffic routing + * method. Possible values are from 1 to 1000. + */ + @JsonProperty(value = "properties.weight") + private Long weight; + + /* + * The priority of this endpoint when using the 'Priority' traffic routing + * method. Possible values are from 1 to 1000, lower values represent + * higher priority. This is an optional parameter. If specified, it must + * be specified on all endpoints, and no two endpoints can share the same + * priority value. + */ + @JsonProperty(value = "properties.priority") + private Long priority; + + /* + * Specifies the location of the external or nested endpoints when using + * the 'Performance' traffic routing method. + */ + @JsonProperty(value = "properties.endpointLocation") + private String endpointLocation; + + /* + * The monitoring status of the endpoint. + */ + @JsonProperty(value = "properties.endpointMonitorStatus") + private EndpointMonitorStatus endpointMonitorStatus; + + /* + * The minimum number of endpoints that must be available in the child + * profile in order for the parent profile to be considered available. Only + * applicable to endpoint of type 'NestedEndpoints'. + */ + @JsonProperty(value = "properties.minChildEndpoints") + private Long minChildEndpoints; + + /* + * The list of countries/regions mapped to this endpoint when using the + * 'Geographic' traffic routing method. Please consult Traffic Manager + * Geographic documentation for a full list of accepted values. + */ + @JsonProperty(value = "properties.geoMapping") + private List geoMapping; + + /* + * The list of subnets, IP addresses, and/or address ranges mapped to this + * endpoint when using the 'Subnet' traffic routing method. An empty list + * will match all ranges not covered by other endpoints. + */ + @JsonProperty(value = "properties.subnets") + private List subnets; + + /* + * List of custom headers. + */ + @JsonProperty(value = "properties.customHeaders") + private List customHeaders; + + /* + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + */ + @JsonProperty(value = "id") + private String id; + + /* + * The name of the resource + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the targetResourceId property: The Azure Resource URI of the of the endpoint. Not applicable to endpoints of + * type 'ExternalEndpoints'. + * + * @return the targetResourceId value. + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the targetResourceId property: The Azure Resource URI of the of the endpoint. Not applicable to endpoints of + * type 'ExternalEndpoints'. + * + * @param targetResourceId the targetResourceId value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the target property: The fully-qualified DNS name or IP address of the endpoint. Traffic Manager returns this + * value in DNS responses to direct traffic to this endpoint. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: The fully-qualified DNS name or IP address of the endpoint. Traffic Manager returns this + * value in DNS responses to direct traffic to this endpoint. + * + * @param target the target value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the endpointStatus property: The status of the endpoint. If the endpoint is Enabled, it is probed for + * endpoint health and is included in the traffic routing method. + * + * @return the endpointStatus value. + */ + public EndpointStatus endpointStatus() { + return this.endpointStatus; + } + + /** + * Set the endpointStatus property: The status of the endpoint. If the endpoint is Enabled, it is probed for + * endpoint health and is included in the traffic routing method. + * + * @param endpointStatus the endpointStatus value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withEndpointStatus(EndpointStatus endpointStatus) { + this.endpointStatus = endpointStatus; + return this; + } + + /** + * Get the weight property: The weight of this endpoint when using the 'Weighted' traffic routing method. Possible + * values are from 1 to 1000. + * + * @return the weight value. + */ + public Long weight() { + return this.weight; + } + + /** + * Set the weight property: The weight of this endpoint when using the 'Weighted' traffic routing method. Possible + * values are from 1 to 1000. + * + * @param weight the weight value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withWeight(Long weight) { + this.weight = weight; + return this; + } + + /** + * Get the priority property: The priority of this endpoint when using the 'Priority' traffic routing method. + * Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If + * specified, it must be specified on all endpoints, and no two endpoints can share the same priority value. + * + * @return the priority value. + */ + public Long priority() { + return this.priority; + } + + /** + * Set the priority property: The priority of this endpoint when using the 'Priority' traffic routing method. + * Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If + * specified, it must be specified on all endpoints, and no two endpoints can share the same priority value. + * + * @param priority the priority value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withPriority(Long priority) { + this.priority = priority; + return this; + } + + /** + * Get the endpointLocation property: Specifies the location of the external or nested endpoints when using the + * 'Performance' traffic routing method. + * + * @return the endpointLocation value. + */ + public String endpointLocation() { + return this.endpointLocation; + } + + /** + * Set the endpointLocation property: Specifies the location of the external or nested endpoints when using the + * 'Performance' traffic routing method. + * + * @param endpointLocation the endpointLocation value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withEndpointLocation(String endpointLocation) { + this.endpointLocation = endpointLocation; + return this; + } + + /** + * Get the endpointMonitorStatus property: The monitoring status of the endpoint. + * + * @return the endpointMonitorStatus value. + */ + public EndpointMonitorStatus endpointMonitorStatus() { + return this.endpointMonitorStatus; + } + + /** + * Set the endpointMonitorStatus property: The monitoring status of the endpoint. + * + * @param endpointMonitorStatus the endpointMonitorStatus value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withEndpointMonitorStatus(EndpointMonitorStatus endpointMonitorStatus) { + this.endpointMonitorStatus = endpointMonitorStatus; + return this; + } + + /** + * Get the minChildEndpoints property: The minimum number of endpoints that must be available in the child profile + * in order for the parent profile to be considered available. Only applicable to endpoint of type + * 'NestedEndpoints'. + * + * @return the minChildEndpoints value. + */ + public Long minChildEndpoints() { + return this.minChildEndpoints; + } + + /** + * Set the minChildEndpoints property: The minimum number of endpoints that must be available in the child profile + * in order for the parent profile to be considered available. Only applicable to endpoint of type + * 'NestedEndpoints'. + * + * @param minChildEndpoints the minChildEndpoints value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withMinChildEndpoints(Long minChildEndpoints) { + this.minChildEndpoints = minChildEndpoints; + return this; + } + + /** + * Get the geoMapping property: The list of countries/regions mapped to this endpoint when using the 'Geographic' + * traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted + * values. + * + * @return the geoMapping value. + */ + public List geoMapping() { + return this.geoMapping; + } + + /** + * Set the geoMapping property: The list of countries/regions mapped to this endpoint when using the 'Geographic' + * traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted + * values. + * + * @param geoMapping the geoMapping value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withGeoMapping(List geoMapping) { + this.geoMapping = geoMapping; + return this; + } + + /** + * Get the subnets property: The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when + * using the 'Subnet' traffic routing method. An empty list will match all ranges not covered by other endpoints. + * + * @return the subnets value. + */ + public List subnets() { + return this.subnets; + } + + /** + * Set the subnets property: The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when + * using the 'Subnet' traffic routing method. An empty list will match all ranges not covered by other endpoints. + * + * @param subnets the subnets value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withSubnets(List subnets) { + this.subnets = subnets; + return this; + } + + /** + * Get the customHeaders property: List of custom headers. + * + * @return the customHeaders value. + */ + public List customHeaders() { + return this.customHeaders; + } + + /** + * Set the customHeaders property: List of custom headers. + * + * @param customHeaders the customHeaders value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withCustomHeaders(List customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + * + * @param id the id value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the resource. + * + * @param name the name value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + * + * @param type the type value to set. + * @return the EndpointInner object itself. + */ + public EndpointInner withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnets() != null) { + subnets().forEach(e -> e.validate()); + } + if (customHeaders() != null) { + customHeaders().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/HeatMapModelInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/HeatMapModelInner.java new file mode 100644 index 0000000000000..292855219a0c4 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/HeatMapModelInner.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent.inner; + +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.trafficmanager.models.HeatMapEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficFlow; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The HeatMapModel model. */ +@JsonFlatten +public class HeatMapModelInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HeatMapModelInner.class); + + /* + * The beginning of the time window for this HeatMap, inclusive. + */ + @JsonProperty(value = "properties.startTime") + private OffsetDateTime startTime; + + /* + * The ending of the time window for this HeatMap, exclusive. + */ + @JsonProperty(value = "properties.endTime") + private OffsetDateTime endTime; + + /* + * The endpoints used in this HeatMap calculation. + */ + @JsonProperty(value = "properties.endpoints") + private List endpoints; + + /* + * The traffic flows produced in this HeatMap calculation. + */ + @JsonProperty(value = "properties.trafficFlows") + private List trafficFlows; + + /* + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + */ + @JsonProperty(value = "id") + private String id; + + /* + * The name of the resource + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the startTime property: The beginning of the time window for this HeatMap, inclusive. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The beginning of the time window for this HeatMap, inclusive. + * + * @param startTime the startTime value to set. + * @return the HeatMapModelInner object itself. + */ + public HeatMapModelInner withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The ending of the time window for this HeatMap, exclusive. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: The ending of the time window for this HeatMap, exclusive. + * + * @param endTime the endTime value to set. + * @return the HeatMapModelInner object itself. + */ + public HeatMapModelInner withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the endpoints property: The endpoints used in this HeatMap calculation. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The endpoints used in this HeatMap calculation. + * + * @param endpoints the endpoints value to set. + * @return the HeatMapModelInner object itself. + */ + public HeatMapModelInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the trafficFlows property: The traffic flows produced in this HeatMap calculation. + * + * @return the trafficFlows value. + */ + public List trafficFlows() { + return this.trafficFlows; + } + + /** + * Set the trafficFlows property: The traffic flows produced in this HeatMap calculation. + * + * @param trafficFlows the trafficFlows value to set. + * @return the HeatMapModelInner object itself. + */ + public HeatMapModelInner withTrafficFlows(List trafficFlows) { + this.trafficFlows = trafficFlows; + return this; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + * + * @param id the id value to set. + * @return the HeatMapModelInner object itself. + */ + public HeatMapModelInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the resource. + * + * @param name the name value to set. + * @return the HeatMapModelInner object itself. + */ + public HeatMapModelInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + * + * @param type the type value to set. + * @return the HeatMapModelInner object itself. + */ + public HeatMapModelInner withType(String type) { + this.type = type; + 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()); + } + if (trafficFlows() != null) { + trafficFlows().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/ProfileInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/ProfileInner.java new file mode 100644 index 0000000000000..54a2817524a14 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/ProfileInner.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent.inner; + +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.trafficmanager.models.DnsConfig; +import com.azure.resourcemanager.trafficmanager.models.MonitorConfig; +import com.azure.resourcemanager.trafficmanager.models.ProfileStatus; +import com.azure.resourcemanager.trafficmanager.models.TrafficRoutingMethod; +import com.azure.resourcemanager.trafficmanager.models.TrafficViewEnrollmentStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Profile model. */ +@JsonFlatten +public class ProfileInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProfileInner.class); + + /* + * The status of the Traffic Manager profile. + */ + @JsonProperty(value = "properties.profileStatus") + private ProfileStatus profileStatus; + + /* + * The traffic routing method of the Traffic Manager profile. + */ + @JsonProperty(value = "properties.trafficRoutingMethod") + private TrafficRoutingMethod trafficRoutingMethod; + + /* + * The DNS settings of the Traffic Manager profile. + */ + @JsonProperty(value = "properties.dnsConfig") + private DnsConfig dnsConfig; + + /* + * The endpoint monitoring settings of the Traffic Manager profile. + */ + @JsonProperty(value = "properties.monitorConfig") + private MonitorConfig monitorConfig; + + /* + * The list of endpoints in the Traffic Manager profile. + */ + @JsonProperty(value = "properties.endpoints") + private List endpoints; + + /* + * Indicates whether Traffic View is 'Enabled' or 'Disabled' for the + * Traffic Manager profile. Null, indicates 'Disabled'. Enabling this + * feature will increase the cost of the Traffic Manage profile. + */ + @JsonProperty(value = "properties.trafficViewEnrollmentStatus") + private TrafficViewEnrollmentStatus trafficViewEnrollmentStatus; + + /* + * Maximum number of endpoints to be returned for MultiValue routing type. + */ + @JsonProperty(value = "properties.maxReturn") + private Long maxReturn; + + /** + * Get the profileStatus property: The status of the Traffic Manager profile. + * + * @return the profileStatus value. + */ + public ProfileStatus profileStatus() { + return this.profileStatus; + } + + /** + * Set the profileStatus property: The status of the Traffic Manager profile. + * + * @param profileStatus the profileStatus value to set. + * @return the ProfileInner object itself. + */ + public ProfileInner withProfileStatus(ProfileStatus profileStatus) { + this.profileStatus = profileStatus; + return this; + } + + /** + * Get the trafficRoutingMethod property: The traffic routing method of the Traffic Manager profile. + * + * @return the trafficRoutingMethod value. + */ + public TrafficRoutingMethod trafficRoutingMethod() { + return this.trafficRoutingMethod; + } + + /** + * Set the trafficRoutingMethod property: The traffic routing method of the Traffic Manager profile. + * + * @param trafficRoutingMethod the trafficRoutingMethod value to set. + * @return the ProfileInner object itself. + */ + public ProfileInner withTrafficRoutingMethod(TrafficRoutingMethod trafficRoutingMethod) { + this.trafficRoutingMethod = trafficRoutingMethod; + return this; + } + + /** + * Get the dnsConfig property: The DNS settings of the Traffic Manager profile. + * + * @return the dnsConfig value. + */ + public DnsConfig dnsConfig() { + return this.dnsConfig; + } + + /** + * Set the dnsConfig property: The DNS settings of the Traffic Manager profile. + * + * @param dnsConfig the dnsConfig value to set. + * @return the ProfileInner object itself. + */ + public ProfileInner withDnsConfig(DnsConfig dnsConfig) { + this.dnsConfig = dnsConfig; + return this; + } + + /** + * Get the monitorConfig property: The endpoint monitoring settings of the Traffic Manager profile. + * + * @return the monitorConfig value. + */ + public MonitorConfig monitorConfig() { + return this.monitorConfig; + } + + /** + * Set the monitorConfig property: The endpoint monitoring settings of the Traffic Manager profile. + * + * @param monitorConfig the monitorConfig value to set. + * @return the ProfileInner object itself. + */ + public ProfileInner withMonitorConfig(MonitorConfig monitorConfig) { + this.monitorConfig = monitorConfig; + return this; + } + + /** + * Get the endpoints property: The list of endpoints in the Traffic Manager profile. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The list of endpoints in the Traffic Manager profile. + * + * @param endpoints the endpoints value to set. + * @return the ProfileInner object itself. + */ + public ProfileInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the trafficViewEnrollmentStatus property: Indicates whether Traffic View is 'Enabled' or 'Disabled' for the + * Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic + * Manage profile. + * + * @return the trafficViewEnrollmentStatus value. + */ + public TrafficViewEnrollmentStatus trafficViewEnrollmentStatus() { + return this.trafficViewEnrollmentStatus; + } + + /** + * Set the trafficViewEnrollmentStatus property: Indicates whether Traffic View is 'Enabled' or 'Disabled' for the + * Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic + * Manage profile. + * + * @param trafficViewEnrollmentStatus the trafficViewEnrollmentStatus value to set. + * @return the ProfileInner object itself. + */ + public ProfileInner withTrafficViewEnrollmentStatus(TrafficViewEnrollmentStatus trafficViewEnrollmentStatus) { + this.trafficViewEnrollmentStatus = trafficViewEnrollmentStatus; + return this; + } + + /** + * Get the maxReturn property: Maximum number of endpoints to be returned for MultiValue routing type. + * + * @return the maxReturn value. + */ + public Long maxReturn() { + return this.maxReturn; + } + + /** + * Set the maxReturn property: Maximum number of endpoints to be returned for MultiValue routing type. + * + * @param maxReturn the maxReturn value to set. + * @return the ProfileInner object itself. + */ + public ProfileInner withMaxReturn(Long maxReturn) { + this.maxReturn = maxReturn; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dnsConfig() != null) { + dnsConfig().validate(); + } + if (monitorConfig() != null) { + monitorConfig().validate(); + } + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerGeographicHierarchyInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerGeographicHierarchyInner.java new file mode 100644 index 0000000000000..24f11d14d1a87 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerGeographicHierarchyInner.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent.inner; + +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.trafficmanager.models.Region; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TrafficManagerGeographicHierarchy model. */ +@JsonFlatten +public class TrafficManagerGeographicHierarchyInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TrafficManagerGeographicHierarchyInner.class); + + /* + * The region at the root of the hierarchy from all the regions in the + * hierarchy can be retrieved. + */ + @JsonProperty(value = "properties.geographicHierarchy") + private Region geographicHierarchy; + + /* + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + */ + @JsonProperty(value = "id") + private String id; + + /* + * The name of the resource + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the geographicHierarchy property: The region at the root of the hierarchy from all the regions in the + * hierarchy can be retrieved. + * + * @return the geographicHierarchy value. + */ + public Region geographicHierarchy() { + return this.geographicHierarchy; + } + + /** + * Set the geographicHierarchy property: The region at the root of the hierarchy from all the regions in the + * hierarchy can be retrieved. + * + * @param geographicHierarchy the geographicHierarchy value to set. + * @return the TrafficManagerGeographicHierarchyInner object itself. + */ + public TrafficManagerGeographicHierarchyInner withGeographicHierarchy(Region geographicHierarchy) { + this.geographicHierarchy = geographicHierarchy; + return this; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + * + * @param id the id value to set. + * @return the TrafficManagerGeographicHierarchyInner object itself. + */ + public TrafficManagerGeographicHierarchyInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the resource. + * + * @param name the name value to set. + * @return the TrafficManagerGeographicHierarchyInner object itself. + */ + public TrafficManagerGeographicHierarchyInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + * + * @param type the type value to set. + * @return the TrafficManagerGeographicHierarchyInner object itself. + */ + public TrafficManagerGeographicHierarchyInner withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (geographicHierarchy() != null) { + geographicHierarchy().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerNameAvailabilityInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerNameAvailabilityInner.java new file mode 100644 index 0000000000000..76c9b87e5ba88 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerNameAvailabilityInner.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent.inner; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TrafficManagerNameAvailability model. */ +public final class TrafficManagerNameAvailabilityInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TrafficManagerNameAvailabilityInner.class); + + /* + * The relative name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Traffic Manager profile resource type. + */ + @JsonProperty(value = "type") + private String type; + + /* + * Describes whether the relative name is available or not. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /* + * The reason why the name is not available, when applicable. + */ + @JsonProperty(value = "reason") + private String reason; + + /* + * Descriptive message that explains why the name is not available, when + * applicable. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the name property: The relative name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The relative name. + * + * @param name the name value to set. + * @return the TrafficManagerNameAvailabilityInner object itself. + */ + public TrafficManagerNameAvailabilityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Traffic Manager profile resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Traffic Manager profile resource type. + * + * @param type the type value to set. + * @return the TrafficManagerNameAvailabilityInner object itself. + */ + public TrafficManagerNameAvailabilityInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the nameAvailable property: Describes whether the relative name is available or not. + * + * @return the nameAvailable value. + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set the nameAvailable property: Describes whether the relative name is available or not. + * + * @param nameAvailable the nameAvailable value to set. + * @return the TrafficManagerNameAvailabilityInner object itself. + */ + public TrafficManagerNameAvailabilityInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason property: The reason why the name is not available, when applicable. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Set the reason property: The reason why the name is not available, when applicable. + * + * @param reason the reason value to set. + * @return the TrafficManagerNameAvailabilityInner object itself. + */ + public TrafficManagerNameAvailabilityInner withReason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get the message property: Descriptive message that explains why the name is not available, when applicable. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Descriptive message that explains why the name is not available, when applicable. + * + * @param message the message value to set. + * @return the TrafficManagerNameAvailabilityInner object itself. + */ + public TrafficManagerNameAvailabilityInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/UserMetricsModelInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/UserMetricsModelInner.java new file mode 100644 index 0000000000000..498dc277bd492 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/UserMetricsModelInner.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.fluent.inner; + +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The UserMetricsModel model. */ +@JsonFlatten +public class UserMetricsModelInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UserMetricsModelInner.class); + + /* + * The key returned by the User Metrics operation. + */ + @JsonProperty(value = "properties.key") + private String key; + + /* + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + */ + @JsonProperty(value = "id") + private String id; + + /* + * The name of the resource + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the key property: The key returned by the User Metrics operation. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key returned by the User Metrics operation. + * + * @param key the key value to set. + * @return the UserMetricsModelInner object itself. + */ + public UserMetricsModelInner withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + * + * @param id the id value to set. + * @return the UserMetricsModelInner object itself. + */ + public UserMetricsModelInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the resource. + * + * @param name the name value to set. + * @return the UserMetricsModelInner object itself. + */ + public UserMetricsModelInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + * + * @param type the type value to set. + * @return the UserMetricsModelInner object itself. + */ + public UserMetricsModelInner withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/package-info.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/package-info.java new file mode 100644 index 0000000000000..32d3bc5ac7ee9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the inner classes for TrafficManagerManagementClient. null. */ +package com.azure.resourcemanager.trafficmanager.fluent.inner; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/package-info.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/package-info.java new file mode 100644 index 0000000000000..99e2c915ec6de --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the client classes for TrafficManagerManagementClient. null. */ +package com.azure.resourcemanager.trafficmanager.fluent; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesImpl.java new file mode 100644 index 0000000000000..da9b372c39ef0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesImpl.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import com.azure.resourcemanager.trafficmanager.TrafficManager; +import com.azure.resourcemanager.trafficmanager.fluent.GeographicHierarchiesClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.TrafficManagerGeographicHierarchyInner; +import com.azure.resourcemanager.trafficmanager.models.GeographicHierarchies; +import com.azure.resourcemanager.trafficmanager.models.GeographicLocation; + +/** Implementation for GeographicHierarchies. */ +class GeographicHierarchiesImpl extends WrapperImpl implements GeographicHierarchies { + private final TrafficManager manager; + + protected GeographicHierarchiesImpl(TrafficManager trafficManager, GeographicHierarchiesClient inner) { + super(inner); + this.manager = trafficManager; + } + + @Override + public TrafficManager manager() { + return this.manager; + } + + @Override + public GeographicLocation getRoot() { + TrafficManagerGeographicHierarchyInner defaultHierarchy = this.inner().getDefault(); + if (defaultHierarchy == null) { + return null; + } + return new GeographicLocationImpl(defaultHierarchy.geographicHierarchy()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicLocationImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicLocationImpl.java new file mode 100644 index 0000000000000..91462b506900b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicLocationImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import com.azure.resourcemanager.trafficmanager.models.GeographicLocation; +import com.azure.resourcemanager.trafficmanager.models.Region; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** Implementation for GeographicLocation. */ +class GeographicLocationImpl extends WrapperImpl implements GeographicLocation { + protected GeographicLocationImpl(Region innerRegion) { + super(innerRegion); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String code() { + return this.inner().code(); + } + + @Override + public List childLocations() { + if (this.inner().regions() == null || this.inner().regions().isEmpty()) { + return Collections.unmodifiableList(new ArrayList()); + } + ArrayList subLocations = new ArrayList<>(); + for (Region innerRegion : this.inner().regions()) { + subLocations.add(new GeographicLocationImpl(innerRegion)); + } + return Collections.unmodifiableList(subLocations); + } + + @Override + public List descendantLocations() { + ArrayList descendantsLocations = new ArrayList<>(); + List childLocations = childLocations(); + descendantsLocations.addAll(childLocations); + for (GeographicLocation childLocation : childLocations) { + descendantsLocations.addAll(childLocation.descendantLocations()); + } + return descendantsLocations; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProxyResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProxyResourceInner.java new file mode 100644 index 0000000000000..3f97e889f146b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProxyResourceInner.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than required location and + * tags. + */ +public class ProxyResourceInner { + /** Gets or sets the ID. */ + @JsonProperty(value = "id") + private String id; + + /** Gets or sets the name. */ + @JsonProperty(value = "name") + private String name; + + /** Gets or sets the type. */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the ProxyResourceInner object itself. + */ + public ProxyResourceInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the ProxyResourceInner object itself. + */ + public ProxyResourceInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the ProxyResourceInner object itself. + */ + public ProxyResourceInner withType(String type) { + this.type = type; + return this; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerAzureEndpointImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerAzureEndpointImpl.java new file mode 100644 index 0000000000000..d2a27ba0c2499 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerAzureEndpointImpl.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; +import com.azure.resourcemanager.trafficmanager.fluent.EndpointsClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; +import com.azure.resourcemanager.trafficmanager.models.TargetAzureResourceType; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerAzureEndpoint; + +/** Implementation for {@link TrafficManagerAzureEndpoint}. */ +class TrafficManagerAzureEndpointImpl extends TrafficManagerEndpointImpl implements TrafficManagerAzureEndpoint { + TrafficManagerAzureEndpointImpl( + String name, TrafficManagerProfileImpl parent, EndpointInner inner, EndpointsClient client) { + super(name, parent, inner, client); + } + + @Override + public String targetAzureResourceId() { + return inner().targetResourceId(); + } + + @Override + public TargetAzureResourceType targetResourceType() { + return new TargetAzureResourceType( + ResourceUtils.resourceProviderFromResourceId(targetAzureResourceId()), + ResourceUtils.resourceTypeFromResourceId(targetAzureResourceId())); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointImpl.java new file mode 100644 index 0000000000000..5e2d588466162 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointImpl.java @@ -0,0 +1,436 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.trafficmanager.fluent.EndpointsClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; +import com.azure.resourcemanager.trafficmanager.models.EndpointMonitorStatus; +import com.azure.resourcemanager.trafficmanager.models.EndpointPropertiesCustomHeadersItem; +import com.azure.resourcemanager.trafficmanager.models.EndpointPropertiesSubnetsItem; +import com.azure.resourcemanager.trafficmanager.models.EndpointStatus; +import com.azure.resourcemanager.trafficmanager.models.EndpointType; +import com.azure.resourcemanager.trafficmanager.models.GeographicLocation; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import reactor.core.publisher.Mono; + +/** Implementation for {@link TrafficManagerEndpoint}. */ +class TrafficManagerEndpointImpl + extends ExternalChildResourceImpl< + TrafficManagerEndpoint, EndpointInner, TrafficManagerProfileImpl, TrafficManagerProfile> + implements TrafficManagerEndpoint, + TrafficManagerEndpoint.Definition, + TrafficManagerEndpoint.UpdateDefinition, + TrafficManagerEndpoint.UpdateAzureEndpoint, + TrafficManagerEndpoint.UpdateExternalEndpoint, + TrafficManagerEndpoint.UpdateNestedProfileEndpoint { + private final EndpointsClient client; + private EndpointType endpointType; + + TrafficManagerEndpointImpl( + String name, TrafficManagerProfileImpl parent, EndpointInner inner, EndpointsClient client) { + super(name, parent, inner); + this.client = client; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public EndpointType endpointType() { + if (this.inner().type() != null) { + return EndpointType.fromValue(this.inner().type()); + } else { + return this.endpointType; + } + } + + @Override + public EndpointMonitorStatus monitorStatus() { + return this.inner().endpointMonitorStatus(); + } + + @Override + public boolean isEnabled() { + return this.inner().endpointStatus().equals(EndpointStatus.ENABLED); + } + + @Override + public long routingWeight() { + return Utils.toPrimitiveLong(this.inner().weight()); + } + + @Override + public long routingPriority() { + return Utils.toPrimitiveLong(this.inner().priority()); + } + + @Override + public Set geographicLocationCodes() { + if (this.inner().geoMapping() == null) { + return Collections.unmodifiableSet(new HashSet<>()); + } + return Collections.unmodifiableSet(new HashSet<>(this.inner().geoMapping())); + } + + @Override + public Collection subnets() { + if (this.inner().subnets() == null) { + return Collections.unmodifiableList(new ArrayList<>()); + } else { + return Collections.unmodifiableList(this.inner().subnets()); + } + } + + @Override + public Map customHeaders() { + if (this.inner().customHeaders() == null) { + return Collections.unmodifiableMap(new TreeMap<>()); + } else { + Map headers = new TreeMap<>(); + for (EndpointPropertiesCustomHeadersItem header : this.inner().customHeaders()) { + headers.put(header.name(), header.value()); + } + return Collections.unmodifiableMap(headers); + } + } + + @Override + public TrafficManagerEndpointImpl toResourceId(String resourceId) { + this.inner().withTargetResourceId(resourceId); + return this; + } + + @Override + public TrafficManagerEndpointImpl toFqdn(String externalFqdn) { + this.inner().withTarget(externalFqdn); + return this; + } + + @Override + public TrafficManagerEndpointImpl toProfile(TrafficManagerProfile nestedProfile) { + this.inner().withTargetResourceId(nestedProfile.id()); + this.inner().withMinChildEndpoints(1L); + return this; + } + + public TrafficManagerEndpointImpl fromRegion(Region location) { + this.inner().withEndpointLocation(location.toString()); + return this; + } + + @Override + public TrafficManagerEndpointImpl withMinimumEndpointsToEnableTraffic(int count) { + this.inner().withMinChildEndpoints((long) count); + return this; + } + + @Override + public TrafficManagerEndpointImpl withRoutingPriority(int priority) { + this.inner().withPriority((long) priority); + return this; + } + + @Override + public TrafficManagerEndpointImpl withTrafficDisabled() { + this.inner().withEndpointStatus(EndpointStatus.DISABLED); + return this; + } + + @Override + public TrafficManagerEndpointImpl withTrafficEnabled() { + this.inner().withEndpointStatus(EndpointStatus.ENABLED); + return this; + } + + @Override + public TrafficManagerEndpointImpl withRoutingWeight(int weight) { + this.inner().withWeight((long) weight); + return this; + } + + @Override + public TrafficManagerEndpointImpl withGeographicLocation(GeographicLocation geographicLocation) { + return this.withGeographicLocation(geographicLocation.code()); + } + + @Override + public TrafficManagerEndpointImpl withoutGeographicLocation(GeographicLocation geographicLocation) { + return this.withoutGeographicLocation(geographicLocation.code()); + } + + @Override + public TrafficManagerEndpointImpl withGeographicLocations(List geographicLocations) { + for (GeographicLocation location : geographicLocations) { + this.withGeographicLocation(location); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withGeographicLocation(String geographicLocationCode) { + if (this.inner().geoMapping() == null) { + this.inner().withGeoMapping(new ArrayList<>()); + } + boolean found = false; + for (String locationCode : this.inner().geoMapping()) { + if (locationCode.equalsIgnoreCase(geographicLocationCode)) { + found = true; + break; + } + } + if (!found) { + this.inner().geoMapping().add(geographicLocationCode); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withGeographicLocations(Collection geographicLocationCodes) { + for (String locationCode : geographicLocationCodes) { + this.withGeographicLocation(locationCode); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withoutGeographicLocation(String geographicLocationCode) { + if (this.inner().geoMapping() == null) { + return this; + } + int itemIndex = -1; + int i = 0; + for (String locationCode : this.inner().geoMapping()) { + if (locationCode.equalsIgnoreCase(geographicLocationCode)) { + itemIndex = i; + break; + } + i++; + } + if (itemIndex != -1) { + this.inner().geoMapping().remove(itemIndex); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withSubnet(String subnetStartIp, int mask) { + if (this.inner().subnets() == null) { + this.inner().withSubnets(new ArrayList<>()); + } + boolean found = false; + for (EndpointPropertiesSubnetsItem subnetItem : this.inner().subnets()) { + if (subnetItem.first() != null && subnetItem.scope() != null) { + if (subnetItem.first().equalsIgnoreCase(subnetStartIp) && subnetItem.scope() == mask) { + found = true; + break; + } + } + } + if (!found) { + this.inner().subnets().add(new EndpointPropertiesSubnetsItem().withFirst(subnetStartIp).withScope(mask)); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withSubnet(String subnetStartIp, String subnetEndIp) { + if (this.inner().subnets() == null) { + this.inner().withSubnets(new ArrayList<>()); + } + boolean found = false; + for (EndpointPropertiesSubnetsItem subnetItem : this.inner().subnets()) { + if (subnetItem.first() != null && subnetItem.last() != null) { + if (subnetItem.first().equalsIgnoreCase(subnetStartIp) + && subnetItem.last().equalsIgnoreCase(subnetEndIp)) { + found = true; + break; + } + } + } + if (!found) { + this + .inner() + .subnets() + .add(new EndpointPropertiesSubnetsItem().withFirst(subnetStartIp).withLast(subnetEndIp)); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withSubnets(List subnets) { + this.inner().withSubnets(new ArrayList<>()); + for (EndpointPropertiesSubnetsItem subnet : subnets) { + this + .inner() + .subnets() + .add( + new EndpointPropertiesSubnetsItem() + .withFirst(subnet.first()) + .withLast(subnet.last()) + .withScope(subnet.scope())); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withoutSubnet(String subnetStartIp, int mask) { + if (this.inner().subnets() == null) { + return this; + } + int foundIndex = -1; + int i = 0; + for (EndpointPropertiesSubnetsItem subnetItem : this.inner().subnets()) { + if (subnetItem.first() != null && subnetItem.scope() != null) { + if (subnetItem.first().equalsIgnoreCase(subnetStartIp) && subnetItem.scope() == mask) { + foundIndex = i; + break; + } + } + i++; + } + if (foundIndex != -1) { + this.inner().subnets().remove(foundIndex); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withoutSubnet(String subnetStartIp, String subnetEndIp) { + if (this.inner().subnets() == null) { + return this; + } + int foundIndex = -1; + int i = 0; + for (EndpointPropertiesSubnetsItem subnetItem : this.inner().subnets()) { + if (subnetItem.first() != null && subnetItem.last() != null) { + if (subnetItem.first().equalsIgnoreCase(subnetStartIp) + && subnetItem.last().equalsIgnoreCase(subnetEndIp)) { + foundIndex = i; + break; + } + } + i++; + } + if (foundIndex != -1) { + this.inner().subnets().remove(foundIndex); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withCustomHeader(String name, String value) { + if (this.inner().customHeaders() == null) { + this.inner().withCustomHeaders(new ArrayList<>()); + } + boolean found = false; + for (EndpointPropertiesCustomHeadersItem headersItem : this.inner().customHeaders()) { + if (headersItem.name() != null + && headersItem.name().equalsIgnoreCase(name) + && headersItem.value() != null + && headersItem.value().equalsIgnoreCase(value)) { + found = true; + break; + } + } + if (!found) { + this.inner().customHeaders().add(new EndpointPropertiesCustomHeadersItem().withName(name).withValue(value)); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withCustomHeaders(Map headers) { + this.inner().withCustomHeaders(new ArrayList<>()); + for (Map.Entry entry : headers.entrySet()) { + this + .inner() + .customHeaders() + .add(new EndpointPropertiesCustomHeadersItem().withName(entry.getKey()).withValue(entry.getValue())); + } + return this; + } + + @Override + public TrafficManagerEndpointImpl withoutCustomHeader(String name) { + if (this.inner().customHeaders() == null) { + return this; + } + + int foundIndex = -1; + int i = 0; + for (EndpointPropertiesCustomHeadersItem headersItem : this.inner().customHeaders()) { + if (headersItem.name() != null && headersItem.name().equalsIgnoreCase(name)) { + foundIndex = i; + break; + } + i++; + } + if (foundIndex != -1) { + this.inner().customHeaders().remove(foundIndex); + } + return this; + } + + @Override + public Mono createResourceAsync() { + return this + .client + .createOrUpdateAsync( + this.parent().resourceGroupName(), + this.parent().name(), + this.endpointType().localName(), + this.name(), + this.inner()) + .map( + inner -> { + setInner(inner); + return this; + }); + } + + @Override + public Mono updateResourceAsync() { + return createResourceAsync(); + } + + @Override + public Mono deleteResourceAsync() { + return this + .client + .deleteAsync( + this.parent().resourceGroupName(), this.parent().name(), this.endpointType().localName(), this.name()) + .then(); + } + + @Override + public TrafficManagerProfileImpl attach() { + return this.parent().withEndpoint(this); + } + + @Override + protected Mono getInnerAsync() { + return this + .client + .getAsync( + this.parent().resourceGroupName(), this.parent().name(), this.endpointType().toString(), this.name()); + } + + void withEndpointType(EndpointType endpointType) { + this.endpointType = endpointType; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointsImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointsImpl.java new file mode 100644 index 0000000000000..3cbf0bc384fac --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointsImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ExternalChildResourcesCachedImpl; +import com.azure.resourcemanager.trafficmanager.fluent.EndpointsClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; +import com.azure.resourcemanager.trafficmanager.models.EndpointType; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerAzureEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerExternalEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerNestedProfileEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import reactor.core.publisher.Flux; + +/** Represents an endpoint collection associated with a traffic manager profile. */ +class TrafficManagerEndpointsImpl + extends ExternalChildResourcesCachedImpl< + TrafficManagerEndpointImpl, + TrafficManagerEndpoint, + EndpointInner, + TrafficManagerProfileImpl, + TrafficManagerProfile> { + + private final ClientLogger logger = new ClientLogger(this.getClass()); + + private final EndpointsClient client; + + /** + * Creates new EndpointsImpl. + * + * @param client the client to perform REST calls on endpoints + * @param parent the parent traffic manager profile of the endpoints + */ + TrafficManagerEndpointsImpl(EndpointsClient client, TrafficManagerProfileImpl parent) { + super(parent, parent.taskGroup(), "Endpoint"); + this.client = client; + this.cacheCollection(); + } + + List allEndpointsInners() { + List allEndpoints = new ArrayList<>(); + for (TrafficManagerEndpointImpl epImpl : this.collection().values()) { + allEndpoints.add(epImpl.inner()); + } + return allEndpoints; + } + + /** @return the azure endpoints as a map indexed by name. */ + Map azureEndpointsAsMap() { + Map result = new HashMap<>(); + for (Map.Entry entry : this.collection().entrySet()) { + TrafficManagerEndpointImpl endpoint = entry.getValue(); + if (endpoint.endpointType() == EndpointType.AZURE) { + TrafficManagerAzureEndpoint azureEndpoint = + new TrafficManagerAzureEndpointImpl( + entry.getKey(), this.getParent(), endpoint.inner(), this.client); + result.put(entry.getKey(), azureEndpoint); + } + } + return Collections.unmodifiableMap(result); + } + + /** @return the external endpoints as a map indexed by name. */ + Map externalEndpointsAsMap() { + Map result = new HashMap<>(); + for (Map.Entry entry : this.collection().entrySet()) { + TrafficManagerEndpointImpl endpoint = entry.getValue(); + if (endpoint.endpointType() == EndpointType.EXTERNAL) { + TrafficManagerExternalEndpoint externalEndpoint = + new TrafficManagerExternalEndpointImpl( + entry.getKey(), this.getParent(), endpoint.inner(), this.client); + result.put(entry.getKey(), externalEndpoint); + } + } + return Collections.unmodifiableMap(result); + } + + /** @return the nested profile endpoints as a map indexed by name. */ + Map nestedProfileEndpointsAsMap() { + Map result = new HashMap<>(); + for (Map.Entry entry : this.collection().entrySet()) { + TrafficManagerEndpointImpl endpoint = entry.getValue(); + if (endpoint.endpointType() == EndpointType.NESTED_PROFILE) { + TrafficManagerNestedProfileEndpoint nestedProfileEndpoint = + new TrafficManagerNestedProfileEndpointImpl( + entry.getKey(), this.getParent(), endpoint.inner(), this.client); + result.put(entry.getKey(), nestedProfileEndpoint); + } + } + return Collections.unmodifiableMap(result); + } + + /** + * Starts an Azure endpoint definition chain. + * + * @param name the name of the endpoint to be added + * @return the endpoint + */ + public TrafficManagerEndpointImpl defineAzureTargetEndpoint(String name) { + TrafficManagerEndpointImpl endpoint = this.prepareInlineDefine(name); + endpoint.withEndpointType(EndpointType.AZURE); + return endpoint; + } + + /** + * Starts an external endpoint definition chain. + * + * @param name the name of the endpoint to be added + * @return the endpoint + */ + public TrafficManagerEndpointImpl defineExteralTargetEndpoint(String name) { + TrafficManagerEndpointImpl endpoint = this.prepareInlineDefine(name); + endpoint.withEndpointType(EndpointType.EXTERNAL); + return endpoint; + } + + /** + * Starts an nested profile endpoint definition chain. + * + * @param name the name of the endpoint to be added + * @return the endpoint + */ + public TrafficManagerEndpointImpl defineNestedProfileTargetEndpoint(String name) { + TrafficManagerEndpointImpl endpoint = this.prepareInlineDefine(name); + endpoint.withEndpointType(EndpointType.NESTED_PROFILE); + return endpoint; + } + + /** + * Starts an azure endpoint update chain. + * + * @param name the name of the endpoint to be updated + * @return the endpoint + */ + public TrafficManagerEndpointImpl updateAzureEndpoint(String name) { + TrafficManagerEndpointImpl endpoint = this.prepareInlineUpdate(name); + if (endpoint.endpointType() != EndpointType.AZURE) { + throw logger.logExceptionAsError( + new IllegalArgumentException("An azure endpoint with name " + name + " not found in the profile")); + } + return endpoint; + } + + /** + * Starts an external endpoint update chain. + * + * @param name the name of the endpoint to be updated + * @return the endpoint + */ + public TrafficManagerEndpointImpl updateExternalEndpoint(String name) { + TrafficManagerEndpointImpl endpoint = this.prepareInlineUpdate(name); + if (endpoint.endpointType() != EndpointType.EXTERNAL) { + throw logger.logExceptionAsError( + new IllegalArgumentException("An external endpoint with name " + name + " not found in the profile")); + } + return endpoint; + } + + /** + * Starts a nested profile endpoint update chain. + * + * @param name the name of the endpoint to be updated + * @return the endpoint + */ + public TrafficManagerEndpointImpl updateNestedProfileEndpoint(String name) { + TrafficManagerEndpointImpl endpoint = this.prepareInlineUpdate(name); + if (endpoint.endpointType() != EndpointType.NESTED_PROFILE) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "A nested profile endpoint with name " + name + " not found in the profile")); + } + return endpoint; + } + /** + * Mark the endpoint with given name as to be removed. + * + * @param name the name of the endpoint to be removed + */ + public void remove(String name) { + this.prepareInlineRemove(name); + } + + /** + * Adds the endpoint to the collection. + * + * @param endpoint the endpoint + */ + public void addEndpoint(TrafficManagerEndpointImpl endpoint) { + this.addChildResource(endpoint); + } + + @Override + protected List listChildResources() { + List childResources = new ArrayList<>(); + if (getParent().inner().endpoints() != null) { + for (EndpointInner inner : getParent().inner().endpoints()) { + childResources.add(new TrafficManagerEndpointImpl(inner.name(), this.getParent(), inner, this.client)); + } + } + return childResources; + } + + @Override + protected Flux listChildResourcesAsync() { + return Flux.fromIterable(listChildResources()); + } + + @Override + protected TrafficManagerEndpointImpl newChildResource(String name) { + TrafficManagerEndpointImpl endpoint = + new TrafficManagerEndpointImpl(name, this.getParent(), new EndpointInner(), this.client); + return endpoint.withRoutingWeight(1).withTrafficEnabled(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerExternalEndpointImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerExternalEndpointImpl.java new file mode 100644 index 0000000000000..0e216f8f4f1a6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerExternalEndpointImpl.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.trafficmanager.fluent.EndpointsClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerExternalEndpoint; + +/** Implementation for {@link TrafficManagerExternalEndpoint}. */ +class TrafficManagerExternalEndpointImpl extends TrafficManagerEndpointImpl implements TrafficManagerExternalEndpoint { + TrafficManagerExternalEndpointImpl( + String name, TrafficManagerProfileImpl parent, EndpointInner inner, EndpointsClient client) { + super(name, parent, inner, client); + } + + @Override + public String fqdn() { + return inner().target(); + } + + @Override + public Region sourceTrafficLocation() { + return Region.fromName((inner().endpointLocation())); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerNestedProfileEndpointImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerNestedProfileEndpointImpl.java new file mode 100644 index 0000000000000..df319a8367dbe --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerNestedProfileEndpointImpl.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.trafficmanager.fluent.EndpointsClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerNestedProfileEndpoint; + +/** Implementation for {@link TrafficManagerNestedProfileEndpoint}. */ +class TrafficManagerNestedProfileEndpointImpl extends TrafficManagerEndpointImpl + implements TrafficManagerNestedProfileEndpoint { + TrafficManagerNestedProfileEndpointImpl( + String name, TrafficManagerProfileImpl parent, EndpointInner inner, EndpointsClient client) { + super(name, parent, inner, client); + } + + @Override + public String nestedProfileId() { + return inner().targetResourceId(); + } + + @Override + public long minimumChildEndpointCount() { + return Utils.toPrimitiveLong(inner().minChildEndpoints()); + } + + @Override + public Region sourceTrafficLocation() { + return Region.fromName((inner().endpointLocation())); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerProfileImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerProfileImpl.java new file mode 100644 index 0000000000000..1fd580c264062 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerProfileImpl.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.GroupableResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.trafficmanager.TrafficManager; +import com.azure.resourcemanager.trafficmanager.fluent.ProfilesClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.ProfileInner; +import com.azure.resourcemanager.trafficmanager.models.MonitorProtocol; +import com.azure.resourcemanager.trafficmanager.models.ProfileMonitorStatus; +import com.azure.resourcemanager.trafficmanager.models.ProfileStatus; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerAzureEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerExternalEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerNestedProfileEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import com.azure.resourcemanager.trafficmanager.models.TrafficRoutingMethod; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** Implementation for TrafficManagerProfile. */ +class TrafficManagerProfileImpl + extends GroupableResourceImpl + implements TrafficManagerProfile, TrafficManagerProfile.Definition, TrafficManagerProfile.Update { + private TrafficManagerEndpointsImpl endpoints; + + TrafficManagerProfileImpl(String name, final ProfileInner innerModel, final TrafficManager trafficManager) { + super(name, innerModel, trafficManager); + this.endpoints = new TrafficManagerEndpointsImpl(trafficManager.inner().getEndpoints(), this); + this.endpoints.enablePostRunMode(); + } + + @Override + public String dnsLabel() { + return this.inner().dnsConfig().relativeName(); + } + + @Override + public String fqdn() { + return this.inner().dnsConfig().fqdn(); + } + + @Override + public long timeToLive() { + return Utils.toPrimitiveLong(this.inner().dnsConfig().ttl()); + } + + @Override + public boolean isEnabled() { + return this.inner().profileStatus().equals(ProfileStatus.ENABLED); + } + + @Override + public TrafficRoutingMethod trafficRoutingMethod() { + return this.inner().trafficRoutingMethod(); + } + + @Override + public ProfileMonitorStatus monitorStatus() { + return this.inner().monitorConfig().profileMonitorStatus(); + } + + @Override + public long monitoringPort() { + return Utils.toPrimitiveLong(this.inner().monitorConfig().port()); + } + + @Override + public String monitoringPath() { + return this.inner().monitorConfig().path(); + } + + @Override + public Map externalEndpoints() { + return this.endpoints.externalEndpointsAsMap(); + } + + @Override + public Map azureEndpoints() { + return this.endpoints.azureEndpointsAsMap(); + } + + @Override + public Map nestedProfileEndpoints() { + return this.endpoints.nestedProfileEndpointsAsMap(); + } + + @Override + public Mono refreshAsync() { + return super + .refreshAsync() + .map( + trafficManagerProfile -> { + TrafficManagerProfileImpl impl = (TrafficManagerProfileImpl) trafficManagerProfile; + impl.endpoints.refresh(); + return impl; + }); + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getProfiles().getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public TrafficManagerProfileImpl withLeafDomainLabel(String dnsLabel) { + this.inner().dnsConfig().withRelativeName(dnsLabel); + return this; + } + + @Override + public TrafficManagerProfileImpl withPriorityBasedRouting() { + return this.withTrafficRoutingMethod(TrafficRoutingMethod.PRIORITY); + } + + @Override + public TrafficManagerProfileImpl withWeightBasedRouting() { + return this.withTrafficRoutingMethod(TrafficRoutingMethod.WEIGHTED); + } + + @Override + public TrafficManagerProfileImpl withPerformanceBasedRouting() { + return this.withTrafficRoutingMethod(TrafficRoutingMethod.PERFORMANCE); + } + + @Override + public TrafficManagerProfileImpl withGeographicBasedRouting() { + return this.withTrafficRoutingMethod(TrafficRoutingMethod.GEOGRAPHIC); + } + + @Override + public TrafficManagerProfileImpl withMultiValueBasedRouting(long maxResult) { + this.inner().withMaxReturn(maxResult); + return this.withTrafficRoutingMethod(TrafficRoutingMethod.MULTI_VALUE); + } + + @Override + public TrafficManagerProfileImpl withSubnetBasedRouting() { + return this.withTrafficRoutingMethod(TrafficRoutingMethod.SUBNET); + } + + @Override + public TrafficManagerProfileImpl withTrafficRoutingMethod(TrafficRoutingMethod routingMethod) { + this.inner().withTrafficRoutingMethod(routingMethod); + return this; + } + + @Override + public TrafficManagerEndpointImpl defineAzureTargetEndpoint(String name) { + return this.endpoints.defineAzureTargetEndpoint(name); + } + + @Override + public TrafficManagerEndpointImpl defineExternalTargetEndpoint(String name) { + return this.endpoints.defineExteralTargetEndpoint(name); + } + + @Override + public TrafficManagerEndpointImpl defineNestedTargetEndpoint(String name) { + return this.endpoints.defineNestedProfileTargetEndpoint(name); + } + + @Override + public TrafficManagerEndpointImpl updateAzureTargetEndpoint(String name) { + return this.endpoints.updateAzureEndpoint(name); + } + + @Override + public TrafficManagerEndpointImpl updateExternalTargetEndpoint(String name) { + return this.endpoints.updateExternalEndpoint(name); + } + + @Override + public TrafficManagerEndpointImpl updateNestedProfileTargetEndpoint(String name) { + return this.endpoints.updateNestedProfileEndpoint(name); + } + + @Override + public TrafficManagerProfileImpl withoutEndpoint(String name) { + this.endpoints.remove(name); + return this; + } + + @Override + public TrafficManagerProfileImpl withHttpMonitoring() { + return this.withHttpMonitoring(80, "/"); + } + + @Override + public TrafficManagerProfileImpl withHttpsMonitoring() { + return this.withHttpsMonitoring(443, "/"); + } + + @Override + public TrafficManagerProfileImpl withHttpMonitoring(int port, String path) { + this.inner().monitorConfig().withPort((long) port).withPath(path).withProtocol(MonitorProtocol.HTTP); + return this; + } + + @Override + public TrafficManagerProfileImpl withHttpsMonitoring(int port, String path) { + this.inner().monitorConfig().withPort((long) port).withPath(path).withProtocol(MonitorProtocol.HTTPS); + return this; + } + + @Override + public TrafficManagerProfileImpl withProfileStatusDisabled() { + this.inner().withProfileStatus(ProfileStatus.DISABLED); + return this; + } + + @Override + public TrafficManagerProfileImpl withProfileStatusEnabled() { + this.inner().withProfileStatus(ProfileStatus.ENABLED); + return this; + } + + @Override + public TrafficManagerProfileImpl withTimeToLive(int ttlInSeconds) { + this.inner().dnsConfig().withTtl((long) ttlInSeconds); + return this; + } + + @Override + public TrafficManagerProfileImpl update() { + this.endpoints.enableCommitMode(); + return super.update(); + } + + @Override + public Mono createResourceAsync() { + return this + .manager() + .inner() + .getProfiles() + .createOrUpdateAsync(resourceGroupName(), name(), inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Mono updateResourceAsync() { + // In update we first commit the endpoints then update profile, the reason is through portal and direct API + // call one can create endpoints without properties those are not applicable for the profile's current routing + // method. We cannot update the routing method of the profile until existing endpoints contains the properties + // required for the new routing method. + final ProfilesClient innerCollection = this.manager().inner().getProfiles(); + return this + .endpoints + .commitAndGetAllAsync() + .flatMap( + endpoints -> { + inner().withEndpoints(this.endpoints.allEndpointsInners()); + return innerCollection + .createOrUpdateAsync(resourceGroupName(), name(), inner()) + .map( + profileInner -> { + this.setInner(profileInner); + return this; + }); + }); + } + + @Override + public Mono afterPostRunAsync(final boolean isGroupFaulted) { + this.endpoints.clear(); + if (isGroupFaulted) { + return Mono.empty(); + } else { + return this.refreshAsync().then(); + } + } + + TrafficManagerProfileImpl withEndpoint(TrafficManagerEndpointImpl endpoint) { + this.endpoints.addEndpoint(endpoint); + return this; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerProfilesImpl.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerProfilesImpl.java new file mode 100644 index 0000000000000..8e32fbfd5edb6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerProfilesImpl.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.TopLevelModifiableResourcesImpl; +import com.azure.resourcemanager.trafficmanager.TrafficManager; +import com.azure.resourcemanager.trafficmanager.fluent.ProfilesClient; +import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; +import com.azure.resourcemanager.trafficmanager.fluent.inner.ProfileInner; +import com.azure.resourcemanager.trafficmanager.models.CheckProfileDnsNameAvailabilityResult; +import com.azure.resourcemanager.trafficmanager.models.CheckTrafficManagerRelativeDnsNameAvailabilityParameters; +import com.azure.resourcemanager.trafficmanager.models.DnsConfig; +import com.azure.resourcemanager.trafficmanager.models.GeographicHierarchies; +import com.azure.resourcemanager.trafficmanager.models.GeographicLocation; +import com.azure.resourcemanager.trafficmanager.models.MonitorConfig; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfiles; +import java.util.ArrayList; +import reactor.core.publisher.Mono; + +/** Implementation for TrafficManagerProfiles. */ +public class TrafficManagerProfilesImpl + extends TopLevelModifiableResourcesImpl< + TrafficManagerProfile, TrafficManagerProfileImpl, ProfileInner, ProfilesClient, TrafficManager> + implements TrafficManagerProfiles { + private GeographicHierarchies geographicHierarchies; + + public TrafficManagerProfilesImpl(final TrafficManager trafficManager) { + super(trafficManager.inner().getProfiles(), trafficManager); + this.geographicHierarchies = + new GeographicHierarchiesImpl(trafficManager, trafficManager.inner().getGeographicHierarchies()); + } + + @Override + public CheckProfileDnsNameAvailabilityResult checkDnsNameAvailability(String dnsNameLabel) { + return this.checkDnsNameAvailabilityAsync(dnsNameLabel).block(); + } + + @Override + public Mono checkDnsNameAvailabilityAsync(String dnsNameLabel) { + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameter = + new CheckTrafficManagerRelativeDnsNameAvailabilityParameters() + .withName(dnsNameLabel) + .withType("Microsoft.Network/trafficManagerProfiles"); + return this + .inner() + .checkTrafficManagerRelativeDnsNameAvailabilityAsync(parameter) + .map(CheckProfileDnsNameAvailabilityResult::new); + } + + @Override + public GeographicLocation getGeographicHierarchyRoot() { + return this.geographicHierarchies.getRoot(); + } + + @Override + protected TrafficManagerProfileImpl wrapModel(String name) { + return new TrafficManagerProfileImpl(name, new ProfileInner(), this.manager()); + } + + @Override + protected TrafficManagerProfileImpl wrapModel(ProfileInner inner) { + if (inner == null) { + return null; + } + return new TrafficManagerProfileImpl(inner.name(), inner, this.manager()); + } + + @Override + public TrafficManagerProfileImpl define(String name) { + return setDefaults(wrapModel(name)); + } + + private TrafficManagerProfileImpl setDefaults(TrafficManagerProfileImpl profile) { + // MonitorConfig is required + profile.inner().withMonitorConfig(new MonitorConfig()); + profile.withHttpMonitoring(); // Default to Http monitoring + // DnsConfig is required + profile.inner().withDnsConfig(new DnsConfig()); + profile.withTimeToLive(300); + // TM location must be 'global' irrespective of region of the resource group it resides. + profile.inner().withLocation("global"); + // Endpoints are external child resource still initializing it avoid null checks in the model impl. + profile.inner().withEndpoints(new ArrayList()); + return profile; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckProfileDnsNameAvailabilityResult.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckProfileDnsNameAvailabilityResult.java new file mode 100644 index 0000000000000..fcc3918f81ea9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckProfileDnsNameAvailabilityResult.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.resourcemanager.trafficmanager.fluent.inner.TrafficManagerNameAvailabilityInner; + +/** The result of checking for DNS name availability. */ +public class CheckProfileDnsNameAvailabilityResult { + private final TrafficManagerNameAvailabilityInner inner; + + /** + * Creates an instance of CheckProfileDnsNameAvailabilityResult. + * + * @param inner the inner object + */ + public CheckProfileDnsNameAvailabilityResult(TrafficManagerNameAvailabilityInner inner) { + this.inner = inner; + } + + /** + * @return true if the DNS name is available to use, false if the name has already been taken or invalid and cannot + * be used. + */ + public boolean isAvailable() { + return inner.nameAvailable(); + } + + /** @return the reason that the DNS name could not be used */ + public ProfileDnsNameUnavailableReason reason() { + return new ProfileDnsNameUnavailableReason(inner.reason()); + } + + /** @return an error message explaining the reason value in more detail */ + public String message() { + return inner.message(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java new file mode 100644 index 0000000000000..42d80888ff78d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CheckTrafficManagerRelativeDnsNameAvailabilityParameters model. */ +public final class CheckTrafficManagerRelativeDnsNameAvailabilityParameters { + @JsonIgnore + private final ClientLogger logger = + new ClientLogger(CheckTrafficManagerRelativeDnsNameAvailabilityParameters.class); + + /* + * The name of the resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the resource. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the resource. + * + * @param name the name value to set. + * @return the CheckTrafficManagerRelativeDnsNameAvailabilityParameters object itself. + */ + public CheckTrafficManagerRelativeDnsNameAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of the resource. + * + * @param type the type value to set. + * @return the CheckTrafficManagerRelativeDnsNameAvailabilityParameters object itself. + */ + public CheckTrafficManagerRelativeDnsNameAvailabilityParameters withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java new file mode 100644 index 0000000000000..ebc140707b75f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DnsConfig model. */ +public final class DnsConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DnsConfig.class); + + /* + * The relative DNS name provided by this Traffic Manager profile. This + * value is combined with the DNS domain name used by Azure Traffic Manager + * to form the fully-qualified domain name (FQDN) of the profile. + */ + @JsonProperty(value = "relativeName") + private String relativeName; + + /* + * The fully-qualified domain name (FQDN) of the Traffic Manager profile. + * This is formed from the concatenation of the RelativeName with the DNS + * domain used by Azure Traffic Manager. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * The DNS Time-To-Live (TTL), in seconds. This informs the local DNS + * resolvers and DNS clients how long to cache DNS responses provided by + * this Traffic Manager profile. + */ + @JsonProperty(value = "ttl") + private Long ttl; + + /** + * Get the relativeName property: The relative DNS name provided by this Traffic Manager profile. This value is + * combined with the DNS domain name used by Azure Traffic Manager to form the fully-qualified domain name (FQDN) of + * the profile. + * + * @return the relativeName value. + */ + public String relativeName() { + return this.relativeName; + } + + /** + * Set the relativeName property: The relative DNS name provided by this Traffic Manager profile. This value is + * combined with the DNS domain name used by Azure Traffic Manager to form the fully-qualified domain name (FQDN) of + * the profile. + * + * @param relativeName the relativeName value to set. + * @return the DnsConfig object itself. + */ + public DnsConfig withRelativeName(String relativeName) { + this.relativeName = relativeName; + return this; + } + + /** + * Get the fqdn property: The fully-qualified domain name (FQDN) of the Traffic Manager profile. This is formed from + * the concatenation of the RelativeName with the DNS domain used by Azure Traffic Manager. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the ttl property: The DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS + * clients how long to cache DNS responses provided by this Traffic Manager profile. + * + * @return the ttl value. + */ + public Long ttl() { + return this.ttl; + } + + /** + * Set the ttl property: The DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS + * clients how long to cache DNS responses provided by this Traffic Manager profile. + * + * @param ttl the ttl value to set. + * @return the DnsConfig object itself. + */ + public DnsConfig withTtl(Long ttl) { + this.ttl = ttl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java new file mode 100644 index 0000000000000..f09ffc6be03fe --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EndpointMonitorStatus. */ +public final class EndpointMonitorStatus extends ExpandableStringEnum { + /** Static value CheckingEndpoint for EndpointMonitorStatus. */ + public static final EndpointMonitorStatus CHECKING_ENDPOINT = fromString("CheckingEndpoint"); + + /** Static value Online for EndpointMonitorStatus. */ + public static final EndpointMonitorStatus ONLINE = fromString("Online"); + + /** Static value Degraded for EndpointMonitorStatus. */ + public static final EndpointMonitorStatus DEGRADED = fromString("Degraded"); + + /** Static value Disabled for EndpointMonitorStatus. */ + public static final EndpointMonitorStatus DISABLED = fromString("Disabled"); + + /** Static value Inactive for EndpointMonitorStatus. */ + public static final EndpointMonitorStatus INACTIVE = fromString("Inactive"); + + /** Static value Stopped for EndpointMonitorStatus. */ + public static final EndpointMonitorStatus STOPPED = fromString("Stopped"); + + /** + * Creates or finds a EndpointMonitorStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointMonitorStatus. + */ + @JsonCreator + public static EndpointMonitorStatus fromString(String name) { + return fromString(name, EndpointMonitorStatus.class); + } + + /** @return known EndpointMonitorStatus values. */ + public static Collection values() { + return values(EndpointMonitorStatus.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java new file mode 100644 index 0000000000000..8f64a9b2cdea8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The EndpointPropertiesCustomHeadersItem model. */ +public final class EndpointPropertiesCustomHeadersItem { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointPropertiesCustomHeadersItem.class); + + /* + * Header name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Header value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name property: Header name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Header name. + * + * @param name the name value to set. + * @return the EndpointPropertiesCustomHeadersItem object itself. + */ + public EndpointPropertiesCustomHeadersItem withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Header value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Header value. + * + * @param value the value value to set. + * @return the EndpointPropertiesCustomHeadersItem object itself. + */ + public EndpointPropertiesCustomHeadersItem withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java new file mode 100644 index 0000000000000..b0130832dc9c9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The EndpointPropertiesSubnetsItem model. */ +public final class EndpointPropertiesSubnetsItem { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointPropertiesSubnetsItem.class); + + /* + * First address in the subnet. + */ + @JsonProperty(value = "first") + private String first; + + /* + * Last address in the subnet. + */ + @JsonProperty(value = "last") + private String last; + + /* + * Block size (number of leading bits in the subnet mask). + */ + @JsonProperty(value = "scope") + private Integer scope; + + /** + * Get the first property: First address in the subnet. + * + * @return the first value. + */ + public String first() { + return this.first; + } + + /** + * Set the first property: First address in the subnet. + * + * @param first the first value to set. + * @return the EndpointPropertiesSubnetsItem object itself. + */ + public EndpointPropertiesSubnetsItem withFirst(String first) { + this.first = first; + return this; + } + + /** + * Get the last property: Last address in the subnet. + * + * @return the last value. + */ + public String last() { + return this.last; + } + + /** + * Set the last property: Last address in the subnet. + * + * @param last the last value to set. + * @return the EndpointPropertiesSubnetsItem object itself. + */ + public EndpointPropertiesSubnetsItem withLast(String last) { + this.last = last; + return this; + } + + /** + * Get the scope property: Block size (number of leading bits in the subnet mask). + * + * @return the scope value. + */ + public Integer scope() { + return this.scope; + } + + /** + * Set the scope property: Block size (number of leading bits in the subnet mask). + * + * @param scope the scope value to set. + * @return the EndpointPropertiesSubnetsItem object itself. + */ + public EndpointPropertiesSubnetsItem withScope(Integer scope) { + this.scope = scope; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java new file mode 100644 index 0000000000000..637869feb922c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EndpointStatus. */ +public final class EndpointStatus extends ExpandableStringEnum { + /** Static value Enabled for EndpointStatus. */ + public static final EndpointStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for EndpointStatus. */ + public static final EndpointStatus DISABLED = fromString("Disabled"); + + /** + * Creates or finds a EndpointStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointStatus. + */ + @JsonCreator + public static EndpointStatus fromString(String name) { + return fromString(name, EndpointStatus.class); + } + + /** @return known EndpointStatus values. */ + public static Collection values() { + return values(EndpointStatus.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointType.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointType.java new file mode 100644 index 0000000000000..53f47b4c3a271 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +/** Possible endpoint types supported in a Traffic manager profile. */ +public enum EndpointType { + /** Enum value Microsoft.Network/trafficManagerProfiles/azureEndpoints. */ + AZURE("Microsoft.Network/trafficManagerProfiles/azureEndpoints"), + + /** Enum value Microsoft.Network/trafficManagerProfiles/externalEndpoints. */ + EXTERNAL("Microsoft.Network/trafficManagerProfiles/externalEndpoints"), + + /** Enum value Microsoft.Network/trafficManagerProfiles/nestedEndpoints. */ + NESTED_PROFILE("Microsoft.Network/trafficManagerProfiles/nestedEndpoints"); + + private String value; + + EndpointType(String value) { + this.value = value; + } + + /** + * Parses a string value to a TrafficRoutingMethod instance. + * + * @param value the string value to parse. + * @return the parsed TrafficRoutingMethod object, or null if unable to parse. + */ + public static EndpointType fromValue(String value) { + EndpointType[] items = EndpointType.values(); + for (EndpointType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return this.value; + } + + /** @return the local name of the endpoint type */ + public String localName() { + if (this.value != null) { + return this.value.substring(this.value.lastIndexOf('/') + 1); + } + return null; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/GeographicHierarchies.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/GeographicHierarchies.java new file mode 100644 index 0000000000000..7ce507bd20b65 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/GeographicHierarchies.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.trafficmanager.TrafficManager; +import com.azure.resourcemanager.trafficmanager.fluent.GeographicHierarchiesClient; + +/** Entry point to Azure traffic manager geographic hierarchy management API in Azure. */ +public interface GeographicHierarchies extends HasManager, HasInner { + /** @return the root of the Geographic Hierarchy used by the Geographic traffic routing method. */ + GeographicLocation getRoot(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/GeographicLocation.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/GeographicLocation.java new file mode 100644 index 0000000000000..6361a9101c25d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/GeographicLocation.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasName; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import java.util.List; + +/** Type representing Geographic Hierarchy region (location). */ +public interface GeographicLocation extends HasName, HasInner { + /** @return the location code. */ + String code(); + /** @return list of immediate child locations grouped under this location in the Geographic Hierarchy. */ + List childLocations(); + /** @return list of all descendant locations grouped under this location in the Geographic Hierarchy. */ + List descendantLocations(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java new file mode 100644 index 0000000000000..bb33e2a6998b4 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The HeatMapEndpoint model. */ +public final class HeatMapEndpoint { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HeatMapEndpoint.class); + + /* + * The ARM Resource ID of this Traffic Manager endpoint. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * A number uniquely identifying this endpoint in query experiences. + */ + @JsonProperty(value = "endpointId") + private Integer endpointId; + + /** + * Get the resourceId property: The ARM Resource ID of this Traffic Manager endpoint. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The ARM Resource ID of this Traffic Manager endpoint. + * + * @param resourceId the resourceId value to set. + * @return the HeatMapEndpoint object itself. + */ + public HeatMapEndpoint withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the endpointId property: A number uniquely identifying this endpoint in query experiences. + * + * @return the endpointId value. + */ + public Integer endpointId() { + return this.endpointId; + } + + /** + * Set the endpointId property: A number uniquely identifying this endpoint in query experiences. + * + * @param endpointId the endpointId value to set. + * @return the HeatMapEndpoint object itself. + */ + public HeatMapEndpoint withEndpointId(Integer endpointId) { + this.endpointId = endpointId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java new file mode 100644 index 0000000000000..511229fd443d8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The MonitorConfig model. */ +public final class MonitorConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorConfig.class); + + /* + * The profile-level monitoring status of the Traffic Manager profile. + */ + @JsonProperty(value = "profileMonitorStatus") + private ProfileMonitorStatus profileMonitorStatus; + + /* + * The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. + */ + @JsonProperty(value = "protocol") + private MonitorProtocol protocol; + + /* + * The TCP port used to probe for endpoint health. + */ + @JsonProperty(value = "port") + private Long port; + + /* + * The path relative to the endpoint domain name used to probe for endpoint + * health. + */ + @JsonProperty(value = "path") + private String path; + + /* + * The monitor interval for endpoints in this profile. This is the interval + * at which Traffic Manager will check the health of each endpoint in this + * profile. + */ + @JsonProperty(value = "intervalInSeconds") + private Long intervalInSeconds; + + /* + * The monitor timeout for endpoints in this profile. This is the time that + * Traffic Manager allows endpoints in this profile to response to the + * health check. + */ + @JsonProperty(value = "timeoutInSeconds") + private Long timeoutInSeconds; + + /* + * The number of consecutive failed health check that Traffic Manager + * tolerates before declaring an endpoint in this profile Degraded after + * the next failed health check. + */ + @JsonProperty(value = "toleratedNumberOfFailures") + private Long toleratedNumberOfFailures; + + /* + * List of custom headers. + */ + @JsonProperty(value = "customHeaders") + private List customHeaders; + + /* + * List of expected status code ranges. + */ + @JsonProperty(value = "expectedStatusCodeRanges") + private List expectedStatusCodeRanges; + + /** + * Get the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile. + * + * @return the profileMonitorStatus value. + */ + public ProfileMonitorStatus profileMonitorStatus() { + return this.profileMonitorStatus; + } + + /** + * Set the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile. + * + * @param profileMonitorStatus the profileMonitorStatus value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withProfileMonitorStatus(ProfileMonitorStatus profileMonitorStatus) { + this.profileMonitorStatus = profileMonitorStatus; + return this; + } + + /** + * Get the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. + * + * @return the protocol value. + */ + public MonitorProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. + * + * @param protocol the protocol value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withProtocol(MonitorProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the port property: The TCP port used to probe for endpoint health. + * + * @return the port value. + */ + public Long port() { + return this.port; + } + + /** + * Set the port property: The TCP port used to probe for endpoint health. + * + * @param port the port value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withPort(Long port) { + this.port = port; + return this; + } + + /** + * Get the path property: The path relative to the endpoint domain name used to probe for endpoint health. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The path relative to the endpoint domain name used to probe for endpoint health. + * + * @param path the path value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the intervalInSeconds property: The monitor interval for endpoints in this profile. This is the interval at + * which Traffic Manager will check the health of each endpoint in this profile. + * + * @return the intervalInSeconds value. + */ + public Long intervalInSeconds() { + return this.intervalInSeconds; + } + + /** + * Set the intervalInSeconds property: The monitor interval for endpoints in this profile. This is the interval at + * which Traffic Manager will check the health of each endpoint in this profile. + * + * @param intervalInSeconds the intervalInSeconds value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withIntervalInSeconds(Long intervalInSeconds) { + this.intervalInSeconds = intervalInSeconds; + return this; + } + + /** + * Get the timeoutInSeconds property: The monitor timeout for endpoints in this profile. This is the time that + * Traffic Manager allows endpoints in this profile to response to the health check. + * + * @return the timeoutInSeconds value. + */ + public Long timeoutInSeconds() { + return this.timeoutInSeconds; + } + + /** + * Set the timeoutInSeconds property: The monitor timeout for endpoints in this profile. This is the time that + * Traffic Manager allows endpoints in this profile to response to the health check. + * + * @param timeoutInSeconds the timeoutInSeconds value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withTimeoutInSeconds(Long timeoutInSeconds) { + this.timeoutInSeconds = timeoutInSeconds; + return this; + } + + /** + * Get the toleratedNumberOfFailures property: The number of consecutive failed health check that Traffic Manager + * tolerates before declaring an endpoint in this profile Degraded after the next failed health check. + * + * @return the toleratedNumberOfFailures value. + */ + public Long toleratedNumberOfFailures() { + return this.toleratedNumberOfFailures; + } + + /** + * Set the toleratedNumberOfFailures property: The number of consecutive failed health check that Traffic Manager + * tolerates before declaring an endpoint in this profile Degraded after the next failed health check. + * + * @param toleratedNumberOfFailures the toleratedNumberOfFailures value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withToleratedNumberOfFailures(Long toleratedNumberOfFailures) { + this.toleratedNumberOfFailures = toleratedNumberOfFailures; + return this; + } + + /** + * Get the customHeaders property: List of custom headers. + * + * @return the customHeaders value. + */ + public List customHeaders() { + return this.customHeaders; + } + + /** + * Set the customHeaders property: List of custom headers. + * + * @param customHeaders the customHeaders value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withCustomHeaders(List customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + /** + * Get the expectedStatusCodeRanges property: List of expected status code ranges. + * + * @return the expectedStatusCodeRanges value. + */ + public List expectedStatusCodeRanges() { + return this.expectedStatusCodeRanges; + } + + /** + * Set the expectedStatusCodeRanges property: List of expected status code ranges. + * + * @param expectedStatusCodeRanges the expectedStatusCodeRanges value to set. + * @return the MonitorConfig object itself. + */ + public MonitorConfig withExpectedStatusCodeRanges( + List expectedStatusCodeRanges) { + this.expectedStatusCodeRanges = expectedStatusCodeRanges; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (customHeaders() != null) { + customHeaders().forEach(e -> e.validate()); + } + if (expectedStatusCodeRanges() != null) { + expectedStatusCodeRanges().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java new file mode 100644 index 0000000000000..db4b268dffb54 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MonitorConfigCustomHeadersItem model. */ +public final class MonitorConfigCustomHeadersItem { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorConfigCustomHeadersItem.class); + + /* + * Header name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Header value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name property: Header name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Header name. + * + * @param name the name value to set. + * @return the MonitorConfigCustomHeadersItem object itself. + */ + public MonitorConfigCustomHeadersItem withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Header value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Header value. + * + * @param value the value value to set. + * @return the MonitorConfigCustomHeadersItem object itself. + */ + public MonitorConfigCustomHeadersItem withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java new file mode 100644 index 0000000000000..af096ef2d2743 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MonitorConfigExpectedStatusCodeRangesItem model. */ +public final class MonitorConfigExpectedStatusCodeRangesItem { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorConfigExpectedStatusCodeRangesItem.class); + + /* + * Min status code. + */ + @JsonProperty(value = "min") + private Integer min; + + /* + * Max status code. + */ + @JsonProperty(value = "max") + private Integer max; + + /** + * Get the min property: Min status code. + * + * @return the min value. + */ + public Integer min() { + return this.min; + } + + /** + * Set the min property: Min status code. + * + * @param min the min value to set. + * @return the MonitorConfigExpectedStatusCodeRangesItem object itself. + */ + public MonitorConfigExpectedStatusCodeRangesItem withMin(Integer min) { + this.min = min; + return this; + } + + /** + * Get the max property: Max status code. + * + * @return the max value. + */ + public Integer max() { + return this.max; + } + + /** + * Set the max property: Max status code. + * + * @param max the max value to set. + * @return the MonitorConfigExpectedStatusCodeRangesItem object itself. + */ + public MonitorConfigExpectedStatusCodeRangesItem withMax(Integer max) { + this.max = max; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.java new file mode 100644 index 0000000000000..a95af28154565 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.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.resourcemanager.trafficmanager.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MonitorProtocol. */ +public final class MonitorProtocol extends ExpandableStringEnum { + /** Static value HTTP for MonitorProtocol. */ + public static final MonitorProtocol HTTP = fromString("HTTP"); + + /** Static value HTTPS for MonitorProtocol. */ + public static final MonitorProtocol HTTPS = fromString("HTTPS"); + + /** Static value TCP for MonitorProtocol. */ + public static final MonitorProtocol TCP = fromString("TCP"); + + /** + * Creates or finds a MonitorProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitorProtocol. + */ + @JsonCreator + public static MonitorProtocol fromString(String name) { + return fromString(name, MonitorProtocol.class); + } + + /** @return known MonitorProtocol values. */ + public static Collection values() { + return values(MonitorProtocol.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileDnsNameUnavailableReason.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileDnsNameUnavailableReason.java new file mode 100644 index 0000000000000..37bb93db787cf --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileDnsNameUnavailableReason.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +/** The reason for unavailability of traffic manager profile DNS name. */ +public class ProfileDnsNameUnavailableReason { + /** Static value Invalid for ProfileDnsNameUnavailableReason. */ + public static final ProfileDnsNameUnavailableReason INVALID = new ProfileDnsNameUnavailableReason("Invalid"); + + /** Static value AlreadyExists for ProfileDnsNameUnavailableReason. */ + public static final ProfileDnsNameUnavailableReason ALREADYEXISTS = + new ProfileDnsNameUnavailableReason("AlreadyExists"); + + private final String value; + + /** + * Creates ProfileDnsNameUnavailableReason. + * + * @param value the reason + */ + public ProfileDnsNameUnavailableReason(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @Override + public int hashCode() { + return this.value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + String value = this.toString(); + if (!(obj instanceof ProfileDnsNameUnavailableReason)) { + return false; + } + if (obj == this) { + return true; + } + ProfileDnsNameUnavailableReason rhs = (ProfileDnsNameUnavailableReason) obj; + return value.equals(rhs.value); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java new file mode 100644 index 0000000000000..a37847420ef8d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.trafficmanager.fluent.inner.ProfileInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ProfileListResult model. */ +public final class ProfileListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProfileListResult.class); + + /* + * Gets the list of Traffic manager profiles. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: Gets the list of Traffic manager profiles. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Gets the list of Traffic manager profiles. + * + * @param value the value value to set. + * @return the ProfileListResult object itself. + */ + public ProfileListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.java new file mode 100644 index 0000000000000..98d039c07d606 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.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.resourcemanager.trafficmanager.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProfileMonitorStatus. */ +public final class ProfileMonitorStatus extends ExpandableStringEnum { + /** Static value CheckingEndpoints for ProfileMonitorStatus. */ + public static final ProfileMonitorStatus CHECKING_ENDPOINTS = fromString("CheckingEndpoints"); + + /** Static value Online for ProfileMonitorStatus. */ + public static final ProfileMonitorStatus ONLINE = fromString("Online"); + + /** Static value Degraded for ProfileMonitorStatus. */ + public static final ProfileMonitorStatus DEGRADED = fromString("Degraded"); + + /** Static value Disabled for ProfileMonitorStatus. */ + public static final ProfileMonitorStatus DISABLED = fromString("Disabled"); + + /** Static value Inactive for ProfileMonitorStatus. */ + public static final ProfileMonitorStatus INACTIVE = fromString("Inactive"); + + /** + * Creates or finds a ProfileMonitorStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProfileMonitorStatus. + */ + @JsonCreator + public static ProfileMonitorStatus fromString(String name) { + return fromString(name, ProfileMonitorStatus.class); + } + + /** @return known ProfileMonitorStatus values. */ + public static Collection values() { + return values(ProfileMonitorStatus.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java new file mode 100644 index 0000000000000..4b2ed3a1d1aa8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProfileStatus. */ +public final class ProfileStatus extends ExpandableStringEnum { + /** Static value Enabled for ProfileStatus. */ + public static final ProfileStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for ProfileStatus. */ + public static final ProfileStatus DISABLED = fromString("Disabled"); + + /** + * Creates or finds a ProfileStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProfileStatus. + */ + @JsonCreator + public static ProfileStatus fromString(String name) { + return fromString(name, ProfileStatus.class); + } + + /** @return known ProfileStatus values. */ + public static Collection values() { + return values(ProfileStatus.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java new file mode 100644 index 0000000000000..8d8f8f50e4e3e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The QueryExperience model. */ +public final class QueryExperience { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryExperience.class); + + /* + * The id of the endpoint from the 'endpoints' array which these queries + * were routed to. + */ + @JsonProperty(value = "endpointId", required = true) + private int endpointId; + + /* + * The number of queries originating from this location. + */ + @JsonProperty(value = "queryCount", required = true) + private int queryCount; + + /* + * The latency experienced by queries originating from this location. + */ + @JsonProperty(value = "latency") + private Double latency; + + /** + * Get the endpointId property: The id of the endpoint from the 'endpoints' array which these queries were routed + * to. + * + * @return the endpointId value. + */ + public int endpointId() { + return this.endpointId; + } + + /** + * Set the endpointId property: The id of the endpoint from the 'endpoints' array which these queries were routed + * to. + * + * @param endpointId the endpointId value to set. + * @return the QueryExperience object itself. + */ + public QueryExperience withEndpointId(int endpointId) { + this.endpointId = endpointId; + return this; + } + + /** + * Get the queryCount property: The number of queries originating from this location. + * + * @return the queryCount value. + */ + public int queryCount() { + return this.queryCount; + } + + /** + * Set the queryCount property: The number of queries originating from this location. + * + * @param queryCount the queryCount value to set. + * @return the QueryExperience object itself. + */ + public QueryExperience withQueryCount(int queryCount) { + this.queryCount = queryCount; + return this; + } + + /** + * Get the latency property: The latency experienced by queries originating from this location. + * + * @return the latency value. + */ + public Double latency() { + return this.latency; + } + + /** + * Set the latency property: The latency experienced by queries originating from this location. + * + * @param latency the latency value to set. + * @return the QueryExperience object itself. + */ + public QueryExperience withLatency(Double latency) { + this.latency = latency; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java new file mode 100644 index 0000000000000..6592906d653fc --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Region model. */ +public final class Region { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Region.class); + + /* + * The code of the region + */ + @JsonProperty(value = "code") + private String code; + + /* + * The name of the region + */ + @JsonProperty(value = "name") + private String name; + + /* + * The list of Regions grouped under this Region in the Geographic + * Hierarchy. + */ + @JsonProperty(value = "regions") + private List regions; + + /** + * Get the code property: The code of the region. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: The code of the region. + * + * @param code the code value to set. + * @return the Region object itself. + */ + public Region withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the name property: The name of the region. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the region. + * + * @param name the name value to set. + * @return the Region object itself. + */ + public Region withName(String name) { + this.name = name; + return this; + } + + /** + * Get the regions property: The list of Regions grouped under this Region in the Geographic Hierarchy. + * + * @return the regions value. + */ + public List regions() { + return this.regions; + } + + /** + * Set the regions property: The list of Regions grouped under this Region in the Geographic Hierarchy. + * + * @param regions the regions value to set. + * @return the Region object itself. + */ + public Region withRegions(List regions) { + this.regions = regions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (regions() != null) { + regions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TargetAzureResourceType.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TargetAzureResourceType.java new file mode 100644 index 0000000000000..f377f68fefa50 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TargetAzureResourceType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +/** Target Azure resource types supported for an Azure endpoint in a traffic manager profile. */ +public class TargetAzureResourceType { + /** Static value Microsoft.Network/publicIPAddresses for TargetAzureResourceType. */ + public static final TargetAzureResourceType PUBLICIP = + new TargetAzureResourceType("Microsoft.Network", "publicIPAddresses"); + + /** Static value Microsoft.Web/sites for TargetAzureResourceType. */ + public static final TargetAzureResourceType WEBAPP = new TargetAzureResourceType("Microsoft.Web", "sites"); + + /** Static value Microsoft.ClassicCompute/domainNames for TargetAzureResourceType. */ + public static final TargetAzureResourceType CLOUDSERVICE = + new TargetAzureResourceType("Microsoft.ClassicCompute", "domainNames"); + + private final String value; + + /** + * Creates TargetAzureResourceType. + * + * @param resourceProviderName the resource provider name + * @param resourceType the resource type + */ + public TargetAzureResourceType(String resourceProviderName, String resourceType) { + this.value = resourceProviderName + "/" + resourceType; + } + + @Override + public String toString() { + return this.value; + } + + @Override + public int hashCode() { + return this.value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + String value = this.toString(); + if (!(obj instanceof TargetAzureResourceType)) { + return false; + } + if (obj == this) { + return true; + } + TargetAzureResourceType rhs = (TargetAzureResourceType) obj; + return value.equals(rhs.value); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java new file mode 100644 index 0000000000000..0d8a82dc0a212 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The TrafficFlow model. */ +public final class TrafficFlow { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TrafficFlow.class); + + /* + * The IP address that this query experience originated from. + */ + @JsonProperty(value = "sourceIp") + private String sourceIp; + + /* + * The approximate latitude that these queries originated from. + */ + @JsonProperty(value = "latitude") + private Double latitude; + + /* + * The approximate longitude that these queries originated from. + */ + @JsonProperty(value = "longitude") + private Double longitude; + + /* + * The query experiences produced in this HeatMap calculation. + */ + @JsonProperty(value = "queryExperiences") + private List queryExperiences; + + /** + * Get the sourceIp property: The IP address that this query experience originated from. + * + * @return the sourceIp value. + */ + public String sourceIp() { + return this.sourceIp; + } + + /** + * Set the sourceIp property: The IP address that this query experience originated from. + * + * @param sourceIp the sourceIp value to set. + * @return the TrafficFlow object itself. + */ + public TrafficFlow withSourceIp(String sourceIp) { + this.sourceIp = sourceIp; + return this; + } + + /** + * Get the latitude property: The approximate latitude that these queries originated from. + * + * @return the latitude value. + */ + public Double latitude() { + return this.latitude; + } + + /** + * Set the latitude property: The approximate latitude that these queries originated from. + * + * @param latitude the latitude value to set. + * @return the TrafficFlow object itself. + */ + public TrafficFlow withLatitude(Double latitude) { + this.latitude = latitude; + return this; + } + + /** + * Get the longitude property: The approximate longitude that these queries originated from. + * + * @return the longitude value. + */ + public Double longitude() { + return this.longitude; + } + + /** + * Set the longitude property: The approximate longitude that these queries originated from. + * + * @param longitude the longitude value to set. + * @return the TrafficFlow object itself. + */ + public TrafficFlow withLongitude(Double longitude) { + this.longitude = longitude; + return this; + } + + /** + * Get the queryExperiences property: The query experiences produced in this HeatMap calculation. + * + * @return the queryExperiences value. + */ + public List queryExperiences() { + return this.queryExperiences; + } + + /** + * Set the queryExperiences property: The query experiences produced in this HeatMap calculation. + * + * @param queryExperiences the queryExperiences value to set. + * @return the TrafficFlow object itself. + */ + public TrafficFlow withQueryExperiences(List queryExperiences) { + this.queryExperiences = queryExperiences; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (queryExperiences() != null) { + queryExperiences().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerAzureEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerAzureEndpoint.java new file mode 100644 index 0000000000000..05f60f333171f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerAzureEndpoint.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +/** An immutable client-side representation of an Azure traffic manager profile Azure endpoint. */ +public interface TrafficManagerAzureEndpoint extends TrafficManagerEndpoint { + /** @return the resource id of the target Azure resource. */ + String targetAzureResourceId(); + + /** @return the type of the target Azure resource. */ + TargetAzureResourceType targetResourceType(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerEndpoint.java new file mode 100644 index 0000000000000..7f5ae482e9808 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerEndpoint.java @@ -0,0 +1,920 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.Attachable; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.resources.fluentcore.model.Settable; +import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** An immutable client-side representation of an Azure traffic manager profile endpoint. */ +public interface TrafficManagerEndpoint + extends ExternalChildResource, HasInner { + /** @return the endpoint type */ + EndpointType endpointType(); + + /** @return the monitor status of the endpoint */ + EndpointMonitorStatus monitorStatus(); + + /** @return true if the endpoint is enabled, false otherwise */ + boolean isEnabled(); + + /** + * @return the weight of the endpoint which is used when traffic manager profile is configured with Weighted + * traffic-routing method + */ + long routingWeight(); + + /** + * @return the priority of the endpoint which is used when traffic manager profile is configured with Priority + * traffic-routing method + */ + long routingPriority(); + + /** @return the geographic location codes indicating the locations to which traffic will be distributed. */ + Set geographicLocationCodes(); + + /** @return the list of subnets, IP addresses, and/or address ranges mapped to this endpoint. */ + Collection subnets(); + + /** @return custom headers associated with the endpoint as key-value pair. */ + Map customHeaders(); + + /** + * The entirety of a traffic manager profile endpoint definition as a part of parent definition. + * + * @param the return type of the final {@link Attachable#attach()} + */ + interface Definition + extends DefinitionStages.AzureTargetEndpointBlank, + DefinitionStages.ExternalTargetEndpointBlank, + DefinitionStages.NestedProfileTargetEndpointBlank, + DefinitionStages.WithAzureResource, + DefinitionStages.WithFqdn, + DefinitionStages.WithSourceTrafficRegion, + DefinitionStages.WithSourceTrafficRegionThenThreshold, + DefinitionStages.WithEndpointThreshold, + DefinitionStages.WithAttach { + } + + /** + * Grouping of traffic manager profile endpoint definition stages as a part of parent traffic manager profile + * definition. + */ + interface DefinitionStages { + /** + * The first stage of a traffic manager profile Azure endpoint definition. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface AzureTargetEndpointBlank extends WithAzureResource { + } + + /** + * The first stage of a traffic manager profile external endpoint definition. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface ExternalTargetEndpointBlank extends WithFqdn { + } + + /** + * The first stage of a traffic manager profile nested profile endpoint definition. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface NestedProfileTargetEndpointBlank extends WithNestedProfile { + } + + /** + * The stage of the traffic manager profile Azure endpoint definition allowing to specify the ID of the target + * Azure resource. + * + * @param the return type of {@link UpdateDefinitionStages.WithAttach#attach()} + */ + interface WithAzureResource { + /** + * Specifies the resource ID of an Azure resource. + * + *

supported Azure resources are cloud service, web app or public ip + * + * @param resourceId the Azure resource id + * @return the next stage of the definition + */ + WithAttach toResourceId(String resourceId); + } + + /** + * The stage of the traffic manager profile external endpoint definition allowing to specify the FQDN. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithFqdn { + /** + * Specifies the FQDN of an external endpoint. + * + * @param externalFqdn the external FQDN + * @return the next stage of the definition + */ + WithSourceTrafficRegion toFqdn(String externalFqdn); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the location of the external + * endpoint. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithSourceTrafficRegion { + /** + * Specifies the location of the endpoint that will be used when the parent profile is configured with + * Performance routing method {@link TrafficRoutingMethod#PERFORMANCE}. + * + * @param region the location + * @return the next stage of the definition + */ + WithAttach fromRegion(Region region); + } + + /** + * The stage of the traffic manager nested profile endpoint definition allowing to specify the profile. + * + * @param the return type of {@link UpdateDefinitionStages.WithAttach#attach()} + */ + interface WithNestedProfile { + /** + * Specifies a nested traffic manager profile for the endpoint. + * + * @param profile the nested traffic manager profile + * @return the next stage of the definition + */ + WithSourceTrafficRegionThenThreshold toProfile(TrafficManagerProfile profile); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the location of the nested profile + * endpoint. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithSourceTrafficRegionThenThreshold { + /** + * Specifies the location of the endpoint that will be used when the parent profile is configured with + * Performance routing method {@link TrafficRoutingMethod#PERFORMANCE}. + * + * @param region the location + * @return the next stage of the definition + */ + WithEndpointThreshold fromRegion(Region region); + } + + /** + * The stage of the nested traffic manager profile endpoint definition allowing to specify the minimum endpoints + * to be online in the nested profile to consider it as not degraded. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithEndpointThreshold extends WithAttach { + /** + * Specifies the minimum number of endpoints to be online for the nested profile to be considered healthy. + * + * @param count the number of endpoints + * @return the next stage of the definition + */ + WithAttach withMinimumEndpointsToEnableTraffic(int count); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the endpoint weight. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithRoutingWeight { + /** + * Specifies the weight for the endpoint that will be used when the parent profile is configured with + * Weighted routing method {@link TrafficRoutingMethod#WEIGHTED}. + * + * @param weight the endpoint weight + * @return the next stage of the definition + */ + WithAttach withRoutingWeight(int weight); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the endpoint priority. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithRoutingPriority { + /** + * Specifies the priority for the endpoint that will be used when the parent profile is configured with + * Priority routing method {@link TrafficRoutingMethod#PRIORITY}. + * + * @param priority the endpoint priority + * @return the next stage of the definition + */ + WithAttach withRoutingPriority(int priority); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the geographic region. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithGeographicLocation { + /** + * Specifies the geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method {@link TrafficRoutingMethod#GEOGRAPHIC}. + * + * @param geographicLocation the geographic location + * @return the next stage of the definition + */ + WithAttach withGeographicLocation(GeographicLocation geographicLocation); + + /** + * Specifies the list of geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method {@link TrafficRoutingMethod#GEOGRAPHIC}. + * + * @param geographicLocations the geographic locations + * @return the next stage of the definition + */ + WithAttach withGeographicLocations(List geographicLocations); + /** + * Specifies the geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method {@link TrafficRoutingMethod#GEOGRAPHIC}. + * + * @param geographicLocationCode the geographic location code + * @return the next stage of the definition + */ + WithAttach withGeographicLocation(String geographicLocationCode); + /** + * Specifies the list of geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method {@link TrafficRoutingMethod#GEOGRAPHIC}. + * + * @param geographicLocationCodes the geographic location codes + * @return the next stage of the definition + */ + WithAttach withGeographicLocations(Collection geographicLocationCodes); + } + + /** + * The stage of the traffic manager endpoint definition allowing to disable the endpoint. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithTrafficDisabled { + /** + * Specifies that this endpoint should be excluded from receiving traffic. + * + * @return the next stage of the definition + */ + WithAttach withTrafficDisabled(); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify subnets. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithSubnet { + /** + * Specifies the subnets for the endpoint in CIDR format (start ip, mask). + * + * @param subnetStartIp the first ip in the subnet + * @param mask the subnet mask + * @return the next stage of the definition + */ + WithAttach withSubnet(String subnetStartIp, int mask); + + /** + * Specifies the subnets for the endpoint as ip range. + * + * @param subnetStartIp the first ip in the subnet + * @param subnetEndIp the last ip in the subnet + * @return the next stage of the definition + */ + WithAttach withSubnet(String subnetStartIp, String subnetEndIp); + + /** + * Specifies the subnets for this endpoint. This method replaces current subnets with the provided subnets. + * + * @param subnets the array of subnet descriptions + * @return the next stage of the definition + */ + WithAttach withSubnets(List subnets); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify custom headers. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithCustomHeader { + /** + * Add a custom header. + * + * @param name the header name + * @param value the header value + * @return the next stage of the definition + */ + WithAttach withCustomHeader(String name, String value); + + /** + * Add a custom header. This method replaces the current headers with the provided headers. + * + * @param headerValues the map containing header name and value pair + * @return the next stage of the definition + */ + WithAttach withCustomHeaders(Map headerValues); + } + + /** + * The final stage of the traffic manager profile endpoint definition. + * + *

At this stage, any remaining optional settings can be specified, or the traffic manager profile endpoint + * definition can be attached to the parent traffic manager profile definition using {@link + * TrafficManagerEndpoint.DefinitionStages.WithAttach#attach()}. + * + * @param the return type of {@link TrafficManagerEndpoint.DefinitionStages.WithAttach#attach()} + */ + interface WithAttach + extends Attachable.InDefinition, + DefinitionStages.WithRoutingWeight, + DefinitionStages.WithRoutingPriority, + DefinitionStages.WithGeographicLocation, + DefinitionStages.WithTrafficDisabled, + DefinitionStages.WithSubnet, + DefinitionStages.WithCustomHeader { + } + } + + /** + * The entirety of a traffic manager profile endpoint definition as a part of parent update. + * + * @param the return type of the final {@link Attachable#attach()} + */ + interface UpdateDefinition + extends UpdateDefinitionStages.AzureTargetEndpointBlank, + UpdateDefinitionStages.ExternalTargetEndpointBlank, + UpdateDefinitionStages.NestedProfileTargetEndpointBlank, + UpdateDefinitionStages.WithAzureResource, + UpdateDefinitionStages.WithFqdn, + UpdateDefinitionStages.WithSourceTrafficRegion, + UpdateDefinitionStages.WithSourceTrafficRegionThenThreshold, + UpdateDefinitionStages.WithEndpointThreshold, + UpdateDefinitionStages.WithAttach { + } + + /** + * Grouping of traffic manager profile endpoint definition stages as a part of parent traffic manager profile + * update. + */ + interface UpdateDefinitionStages { + /** + * The first stage of a traffic manager profile Azure endpoint definition. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface AzureTargetEndpointBlank extends WithAzureResource { + } + + /** + * The first stage of a traffic manager profile external endpoint definition. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface ExternalTargetEndpointBlank extends WithFqdn { + } + + /** + * The first stage of a traffic manager profile nested profile endpoint definition. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface NestedProfileTargetEndpointBlank extends WithNestedProfile { + } + + /** + * The stage of the traffic manager profile Azure endpoint definition allowing to specify the ID of the target + * Azure resource. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithAzureResource { + /** + * Specifies the resource ID of an Azure resource. + * + *

supported Azure resources are cloud service, web app or public ip + * + * @param resourceId the Azure resource id + * @return the next stage of the definition + */ + WithAttach toResourceId(String resourceId); + } + + /** + * The stage of the traffic manager profile external endpoint definition allowing to specify the FQDN. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithFqdn { + /** + * Specifies the FQDN of an external endpoint. + * + * @param externalFqdn the external FQDN + * @return the next stage of the definition + */ + WithSourceTrafficRegion toFqdn(String externalFqdn); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the location of the external + * endpoint. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithSourceTrafficRegion { + /** + * Specifies the location of the endpoint that will be used when the parent profile is configured with + * Performance routing method {@link TrafficRoutingMethod#PERFORMANCE}. + * + * @param region the location + * @return the next stage of the definition + */ + WithAttach fromRegion(Region region); + } + + /** + * The stage of the traffic manager nested profile endpoint definition allowing to specify the profile. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithNestedProfile { + /** + * Specifies a nested traffic manager profile for the endpoint. + * + * @param profile the nested traffic manager profile + * @return the next stage of the definition + */ + WithSourceTrafficRegionThenThreshold toProfile(TrafficManagerProfile profile); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the location of the nested endpoint. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithSourceTrafficRegionThenThreshold { + /** + * Specifies the location of the endpoint that will be used when the parent profile is configured with + * Performance routing method {@link TrafficRoutingMethod#PERFORMANCE}. + * + * @param region the location + * @return the next stage of the definition + */ + WithEndpointThreshold fromRegion(Region region); + } + + /** + * The stage of the nested traffic manager profile endpoint definition allowing to specify the minimum endpoints + * to be online in the nested profile to consider it as not degraded. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithEndpointThreshold extends WithAttach { + /** + * Specifies the minimum number of endpoints to be online for the nested profile to be considered healthy. + * + * @param count the number of endpoints + * @return the next stage of the definition + */ + WithAttach withMinimumEndpointsToEnableTraffic(int count); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the endpoint weight. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithRoutingWeight { + /** + * Specifies the weight for the endpoint that will be used when the weight-based routing method {@link + * TrafficRoutingMethod#WEIGHTED} is enabled on the profile. + * + * @param weight the endpoint weight + * @return the next stage of the definition + */ + WithAttach withRoutingWeight(int weight); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the endpoint priority. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithRoutingPriority { + /** + * Specifies the weight for the endpoint that will be used when priority-based routing method is {@link + * TrafficRoutingMethod#PRIORITY} enabled on the profile. + * + * @param priority priority of this endpoint. Possible values are from 1 to 1000, lower values represent + * higher priority. + * @return the next stage of the definition + */ + WithAttach withRoutingPriority(int priority); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify the geographic region. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithGeographicLocation { + /** + * Specifies the geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method. + * + * @param geographicLocation the geographic location + * @return the next stage of the definition + */ + WithAttach withGeographicLocation(GeographicLocation geographicLocation); + /** + * Specifies the list of geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method. + * + * @param geographicLocations the geographic locations + * @return the next stage of the definition + */ + WithAttach withGeographicLocations(List geographicLocations); + /** + * Specifies the geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method. + * + * @param geographicLocationCode the geographic location code + * @return the next stage of the definition + */ + WithAttach withGeographicLocation(String geographicLocationCode); + /** + * Specifies the list of geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method. + * + * @param geographicLocationCodes the geographic location codes + * @return the next stage of the definition + */ + WithAttach withGeographicLocations(Collection geographicLocationCodes); + } + + /** + * The stage of the traffic manager endpoint definition allowing to disable the endpoint. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithTrafficDisabled { + /** + * Specifies that this endpoint should be excluded from receiving traffic. + * + * @return the next stage of the definition + */ + WithAttach withTrafficDisabled(); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify subnets. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithSubnet { + /** + * Specifies the subnet for the endpoint in CIDR format (start ip, mask). + * + * @param subnetStartIp the first ip in the subnet + * @param mask the subnet scope + * @return the next stage of the definition + */ + WithAttach withSubnet(String subnetStartIp, int mask); + + /** + * Specifies the subnet for the endpoint as an ip range. + * + * @param subnetStartIp the first ip in the subnet + * @param subnetEndIp the last ip in the subnet + * @return the next stage of the definition + */ + WithAttach withSubnet(String subnetStartIp, String subnetEndIp); + + /** + * Specifies the usbnets for this endpoint. This method replaces the current subnets with the provided + * subnets. + * + * @param subnets the array of subnets description + * @return the next stage of the definition + */ + WithAttach withSubnets(List subnets); + } + + /** + * The stage of the traffic manager endpoint definition allowing to specify custom headers. + * + * @param the return type of {@link WithAttach#attach()} + */ + interface WithCustomHeader { + /** + * Add a custom header. + * + * @param name the header name + * @param value the header value + * @return the next stage of the definition + */ + WithAttach withCustomHeader(String name, String value); + + /** + * Add custom headers. This method replaces the current headers with the provided headers. + * + * @param headerValues the map containing header name and value pair + * @return the next stage of the definition + */ + WithAttach withCustomHeaders(Map headerValues); + } + + /** + * The final stage of the traffic manager profile endpoint definition. + * + *

At this stage, any remaining optional settings can be specified, or the traffic manager profile endpoint + * definition can be attached to the parent traffic manager profile update using {@link + * TrafficManagerEndpoint.DefinitionStages.WithAttach#attach()}. + * + * @param the return type of {@link TrafficManagerEndpoint.DefinitionStages.WithAttach#attach()} + */ + interface WithAttach + extends Attachable.InUpdate, + UpdateDefinitionStages.WithRoutingWeight, + UpdateDefinitionStages.WithRoutingPriority, + UpdateDefinitionStages.WithGeographicLocation, + UpdateDefinitionStages.WithTrafficDisabled, + UpdateDefinitionStages.WithSubnet, + UpdateDefinitionStages.WithCustomHeader { + } + } + + /** The entirety of an Azure endpoint update as a part of parent traffic manager profile profile update. */ + interface UpdateAzureEndpoint extends UpdateStages.WithAzureResource, Update { + } + + /** The entirety of an external endpoint update as a part of parent traffic manager profile profile update. */ + interface UpdateExternalEndpoint extends UpdateStages.WithFqdn, UpdateStages.WithSourceTrafficRegion, Update { + } + + /** The entirety of a nested profile endpoint update as a part of parent traffic manager profile profile update. */ + interface UpdateNestedProfileEndpoint + extends UpdateStages.WithNestedProfileConfig, UpdateStages.WithSourceTrafficRegion, Update { + } + + /** + * the set of configurations that can be updated for all endpoint irrespective of their type (Azure, external, + * nested profile). + */ + interface Update + extends Settable, + UpdateStages.WithRoutingWeight, + UpdateStages.WithRoutingPriority, + UpdateStages.WithGeographicLocation, + UpdateStages.WithTrafficDisabledOrEnabled, + UpdateStages.WithSubnet, + UpdateStages.WithCustomHeader { + } + + /** Grouping of traffic manager profile endpoint update stages. */ + interface UpdateStages { + /** The stage of an Azure endpoint update allowing to specify the target Azure resource. */ + interface WithAzureResource { + /** + * Specifies the resource ID of an Azure resource. + * + *

supported Azure resources are cloud service, web app or public ip + * + * @param resourceId the Azure resource id + * @return the next stage of the update + */ + Update toResourceId(String resourceId); + } + + /** The stage of an external endpoint update allowing to specify the FQDN. */ + interface WithFqdn { + /** + * Specifies the FQDN of an external endpoint that is not hosted in Azure. + * + * @param externalFqdn the external FQDN + * @return the next stage of the endpoint update + */ + UpdateExternalEndpoint toFqdn(String externalFqdn); + } + + /** The stage of an nested profile endpoint update allowing to specify profile and minimum child endpoint. */ + interface WithNestedProfileConfig { + /** + * Specifies a nested traffic manager profile for the endpoint. + * + * @param nestedProfile the nested traffic manager profile + * @return the next stage of the update + */ + UpdateNestedProfileEndpoint toProfile(TrafficManagerProfile nestedProfile); + + /** + * Specifies the minimum number of endpoints to be online for the nested profile to be considered healthy. + * + * @param count number of endpoints + * @return the next stage of the endpoint update + */ + UpdateNestedProfileEndpoint withMinimumEndpointsToEnableTraffic(int count); + } + + /** + * The stage of the traffic manager endpoint update allowing to specify the location of the external or nested + * profile endpoints. + */ + interface WithSourceTrafficRegion { + /** + * Specifies the region of the endpoint that will be used when the performance-based routing method {@link + * TrafficRoutingMethod#PERFORMANCE} is enabled on the profile. + * + * @param location the location + * @return the next stage of the endpoint update + */ + Update fromRegion(Region location); + } + + /** The stage of the traffic manager profile endpoint update allowing to specify the endpoint weight. */ + interface WithRoutingWeight { + /** + * Specifies the weight for the endpoint that will be used when the weight-based routing method {@link + * TrafficRoutingMethod#WEIGHTED} is enabled on the profile. + * + * @param weight the endpoint weight + * @return the next stage of the update + */ + Update withRoutingWeight(int weight); + } + + /** The stage of the traffic manager profile endpoint update allowing to specify the endpoint priority. */ + interface WithRoutingPriority { + /** + * Specifies the weight for the endpoint that will be used when priority-based routing method is {@link + * TrafficRoutingMethod#PRIORITY} enabled on the profile. + * + * @param priority the endpoint priority + * @return the next stage of the update + */ + Update withRoutingPriority(int priority); + } + + /** The stage of the traffic manager update definition allowing to specify the geographic region. */ + interface WithGeographicLocation { + /** + * Specifies the geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method. + * + * @param geographicLocation the geographic location + * @return the next stage of the update + */ + Update withGeographicLocation(GeographicLocation geographicLocation); + /** + * Specifies the list of geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method. + * + * @param geographicLocations the geographic locations + * @return the next stage of the update + */ + Update withGeographicLocations(List geographicLocations); + /** + * Specifies the geographic location to be removed from the endpoint's geographic location entries. + * + * @param geographicLocation the geographic location + * @return the next stage of the update + */ + Update withoutGeographicLocation(GeographicLocation geographicLocation); + /** + * Specifies the geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method. + * + * @param geographicLocationCode the geographic location code + * @return the next stage of the update + */ + Update withGeographicLocation(String geographicLocationCode); + + /** + * Specifies the list of geographic location for the endpoint that will be used when the parent profile is + * configured with geographic based routing method. + * + * @param geographicLocationCodes the geographic location codes + * @return the next stage of the update + */ + Update withGeographicLocations(Collection geographicLocationCodes); + /** + * Specifies the geographic location to be removed from the endpoint's geographic location entries. + * + * @param geographicLocationCode the geographic location code + * @return the next stage of the update + */ + Update withoutGeographicLocation(String geographicLocationCode); + } + + /** The stage of the traffic manager profile endpoint update allowing to enable or disable it. */ + interface WithTrafficDisabledOrEnabled { + /** + * Specifies that the endpoint should be excluded from receiving traffic. + * + * @return the next stage of the update + */ + Update withTrafficDisabled(); + + /** + * Specifies that the endpoint should receive the traffic. + * + * @return the next stage of the update + */ + Update withTrafficEnabled(); + } + + /** The stage of the traffic manager endpoint update allowing to specify subnets. */ + interface WithSubnet { + /** + * Specifies the subnets for the endpoint in CIDR format (start ip, mask). + * + * @param subnetStartIp the first ip in the subnet + * @param mask the subnet mask + * @return the next stage of the update + */ + Update withSubnet(String subnetStartIp, int mask); + + /** + * Specifies the subnets for the endpoint as an ip range. + * + * @param subnetStartIp the first ip in the subnet + * @param subnetEndIp the last ip in the subnet + * @return the next stage of the update + */ + Update withSubnet(String subnetStartIp, String subnetEndIp); + + /** + * Specifies the subnets for this endpoint. + * + * @param subnets the array of subnet descriptions + * @return the next stage of the update + */ + Update withSubnets(List subnets); + + /** + * Specifies that the given subnet CIDR (start ip, mask) should be removed. + * + * @param subnetStartIp the first ip in the subnet + * @param scope the subnet scope + * @return the next stage of the update + */ + Update withoutSubnet(String subnetStartIp, int scope); + + /** + * Specifies that subnet with the given range should be removed. + * + * @param subnetStartIp the first ip in the subnet + * @param subnetEndIp the last ip in the subnet + * @return the next stage of the update + */ + Update withoutSubnet(String subnetStartIp, String subnetEndIp); + } + + /** The stage of the traffic manager endpoint update allowing to specify custom headers. */ + interface WithCustomHeader { + /** + * Add a custom header. + * + * @param name the header name + * @param value the header value + * @return the next stage of the update + */ + Update withCustomHeader(String name, String value); + + /** + * Add custom headers. This method replaces the current headers with the provided headers. + * + * @param headers the map containing header name and value pair + * @return the next stage of the update + */ + Update withCustomHeaders(Map headers); + + /** + * Removes a custom header. + * + * @param name the name of the header to remove + * @return the next stage of the update + */ + Update withoutCustomHeader(String name); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerExternalEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerExternalEndpoint.java new file mode 100644 index 0000000000000..b3e6d07ceff78 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerExternalEndpoint.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; + +/** An immutable client-side representation of an Azure traffic manager profile external endpoint. */ +public interface TrafficManagerExternalEndpoint extends TrafficManagerEndpoint { + /** @return the fully qualified DNS name of the external endpoint */ + String fqdn(); + + /** @return the location of the traffic that the endpoint handles */ + Region sourceTrafficLocation(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerNestedProfileEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerNestedProfileEndpoint.java new file mode 100644 index 0000000000000..7eb68a27c576d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerNestedProfileEndpoint.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; + +/** An immutable client-side representation of an Azure traffic manager profile nested profile endpoint. */ +public interface TrafficManagerNestedProfileEndpoint extends TrafficManagerEndpoint { + /** @return the nested traffic manager profile resource id */ + String nestedProfileId(); + + /** @return the number of child endpoints to be online to consider nested profile as healthy */ + long minimumChildEndpointCount(); + + /** @return the location of the traffic that the endpoint handles */ + Region sourceTrafficLocation(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerProfile.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerProfile.java new file mode 100644 index 0000000000000..e14aa1a08ec1c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerProfile.java @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; +import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import com.azure.resourcemanager.trafficmanager.TrafficManager; +import com.azure.resourcemanager.trafficmanager.fluent.inner.ProfileInner; +import java.util.Map; + +/** An immutable client-side representation of an Azure traffic manager profile. */ +public interface TrafficManagerProfile + extends GroupableResource, + Refreshable, + Updatable { + /** @return the relative DNS name of the traffic manager profile */ + String dnsLabel(); + + /** @return fully qualified domain name (FQDN) of the traffic manager profile. */ + String fqdn(); + + /** @return the DNS Time-To-Live (TTL), in seconds */ + long timeToLive(); + + /** @return true if the traffic manager profile is enabled, false if enabled */ + boolean isEnabled(); + + /** @return the routing method used to route traffic to traffic manager profile endpoints */ + TrafficRoutingMethod trafficRoutingMethod(); + + /** + * @return profile monitor status which is combination of the endpoint monitor status values for all endpoints in + * the profile, and the configured profile status + */ + ProfileMonitorStatus monitorStatus(); + + /** @return the port that is monitored to check the health of traffic manager profile endpoints */ + long monitoringPort(); + + /** @return the path that is monitored to check the health of traffic manager profile endpoints */ + String monitoringPath(); + + /** @return external endpoints in the traffic manager profile, indexed by the name */ + Map externalEndpoints(); + + /** @return Azure endpoints in the traffic manager profile, indexed by the name */ + Map azureEndpoints(); + + /** @return nested traffic manager profile endpoints in this traffic manager profile, indexed by the name */ + Map nestedProfileEndpoints(); + + /** The entirety of the traffic manager profile definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLeafDomainLabel, + DefinitionStages.WithTrafficRoutingMethod, + DefinitionStages.WithCreate { + } + + /** Grouping of traffic manager profile definition stages. */ + interface DefinitionStages { + /** The stage of the traffic manager profile definition allowing to specify the resource group. */ + interface Blank extends GroupableResource.DefinitionStages.WithGroupAndRegion { + } + + /** The stage of the traffic manager profile definition allowing to specify the relative DNS name. */ + interface WithLeafDomainLabel { + /** + * Specify the relative DNS name of the profile. + * + *

The fully qualified domain name (FQDN) will be constructed automatically by appending the rest of the + * domain to this label. + * + * @param dnsLabel the relative DNS name of the profile + * @return the next stage of the definition + */ + WithTrafficRoutingMethod withLeafDomainLabel(String dnsLabel); + } + + /** + * The stage of the traffic manager profile definition allowing to specify the traffic routing method for the + * profile. + */ + interface WithTrafficRoutingMethod { + /** + * Specifies that end user traffic should be routed to the endpoint based on its priority i.e. use the + * endpoint with highest priority and if it is not available fallback to next highest priority endpoint. + * + * @return the next stage of the definition + */ + WithEndpoint withPriorityBasedRouting(); + + /** + * Specifies that end user traffic should be distributed to the endpoints based on the weight assigned to + * the endpoint. + * + * @return the next stage of the definition + */ + WithEndpoint withWeightBasedRouting(); + + /** + * Specifies that end user traffic should be routed based on the closest available endpoint in terms of the + * lowest network latency. + * + * @return the next stage of the definition + */ + WithEndpoint withPerformanceBasedRouting(); + + /** + * Specifies that end user traffic should be routed to the endpoint that is designated to serve users + * geographic region. + * + * @return the next stage of the definition + */ + WithEndpoint withGeographicBasedRouting(); + + /** + * Specifies that end user traffic should be routed to the endpoint that return multiple healthy endpoints. + * + * @param maxReturn the maximum number of result to return + * @return the next stage of the definition + */ + WithEndpoint withMultiValueBasedRouting(long maxReturn); + + /** + * Specifies that end user traffic should be routed to the endpoint which is decided based on the end-user + * ip address. + * + * @return the next stage of the definition + */ + WithEndpoint withSubnetBasedRouting(); + + /** + * Specify the traffic routing method for the profile. + * + * @param routingMethod the traffic routing method for the profile + * @return the next stage of the definition + */ + WithEndpoint withTrafficRoutingMethod(TrafficRoutingMethod routingMethod); + } + + /** The stage of the traffic manager profile definition allowing to specify endpoint. */ + interface WithEndpoint { + /** + * Specifies definition of an Azure endpoint to be attached to the traffic manager profile. + * + * @param name the name for the endpoint + * @return the stage representing configuration for the endpoint + */ + TrafficManagerEndpoint.DefinitionStages.AzureTargetEndpointBlank defineAzureTargetEndpoint( + String name); + + /** + * Specifies definition of an external endpoint to be attached to the traffic manager profile. + * + * @param name the name for the endpoint + * @return the stage representing configuration for the endpoint + */ + TrafficManagerEndpoint.DefinitionStages.ExternalTargetEndpointBlank + defineExternalTargetEndpoint(String name); + + /** + * Specifies definition of an nested profile endpoint to be attached to the traffic manager profile. + * + * @param name the name for the endpoint + * @return the stage representing configuration for the endpoint + */ + TrafficManagerEndpoint.DefinitionStages.NestedProfileTargetEndpointBlank + defineNestedTargetEndpoint(String name); + } + + /** + * The stage of the traffic manager profile definition allowing to specify the endpoint monitoring + * configuration. + */ + interface WithMonitoringConfiguration { + /** + * Specify to use HTTP monitoring for the endpoints that checks for HTTP 200 response from the path '/' at + * regular intervals, using port 80. + * + * @return the next stage of the definition + */ + WithCreate withHttpMonitoring(); + + /** + * Specify to use HTTPS monitoring for the endpoints that checks for HTTPS 200 response from the path '/' at + * regular intervals, using port 443. + * + * @return the next stage of the definition + */ + WithCreate withHttpsMonitoring(); + + /** + * Specify the HTTP monitoring for the endpoints that checks for HTTP 200 response from the specified path + * at regular intervals, using the specified port. + * + * @param port the monitoring port + * @param path the monitoring path + * @return the next stage of the definition + */ + WithCreate withHttpMonitoring(int port, String path); + + /** + * Specify the HTTPS monitoring for the endpoints that checks for HTTPS 200 response from the specified path + * at regular intervals, using the specified port. + * + * @param port the monitoring port + * @param path the monitoring path + * @return the next stage of the definition + */ + WithCreate withHttpsMonitoring(int port, String path); + } + + /** The stage of the traffic manager profile definition allowing to specify the DNS TTL. */ + interface WithTtl { + /** + * Specify the DNS TTL in seconds. + * + * @param ttlInSeconds DNS TTL in seconds + * @return the next stage of the definition + */ + WithCreate withTimeToLive(int ttlInSeconds); + } + + /** The stage of the traffic manager profile definition allowing to disable the profile. */ + interface WithProfileStatus { + /** + * Specify that the profile needs to be disabled. + * + *

Disabling the profile will disables traffic to all endpoints in the profile + * + * @return the next stage of the definition + */ + WithCreate withProfileStatusDisabled(); + } + + /** + * The stage of the definition which contains all the minimum required inputs for the resource to be created + * (via {@link WithCreate#create()}), but also allows for any other optional settings to be specified. + */ + interface WithCreate + extends Creatable, + Resource.DefinitionWithTags, + DefinitionStages.WithMonitoringConfiguration, + DefinitionStages.WithTtl, + DefinitionStages.WithProfileStatus, + DefinitionStages.WithEndpoint { + } + } + + /** Grouping of traffic manager update stages. */ + interface UpdateStages { + /** + * The stage of the traffic manager profile update allowing to specify the traffic routing method for the + * profile. + */ + interface WithTrafficRoutingMethod { + /** + * Specifies that end user traffic should be routed to the endpoint based on its priority i.e. use the + * endpoint with highest priority and if it is not available fallback to next highest priority endpoint. + * + * @return the next stage of the traffic manager profile update + */ + Update withPriorityBasedRouting(); + + /** + * Specifies that end user traffic should be distributed to the endpoints based on the weight assigned to + * the endpoint. + * + * @return the next stage of the traffic manager profile update + */ + Update withWeightBasedRouting(); + + /** + * Specifies that end user traffic should be routed based on the closest available endpoint in terms of the + * lowest network latency. + * + * @return the next stage of the update + */ + Update withPerformanceBasedRouting(); + + /** + * Specifies that end user traffic should be routed to the endpoint that is designated to serve users + * geographic region. + * + * @return the next stage of the update + */ + Update withGeographicBasedRouting(); + + /** + * Specifies that end user traffic should be routed to the endpoint that return multiple healthy endpoints. + * + * @param maxReturn the maximum number of result to return + * @return the next stage of the Update + */ + Update withMultiValueBasedRouting(long maxReturn); + + /** + * Specifies that end user traffic should be routed to the endpoint which is decided based on the end-user + * ip address. + * + * @return the next stage of the update + */ + Update withSubnetBasedRouting(); + + /** + * Specifies the traffic routing method for the profile. + * + * @param routingMethod the traffic routing method for the profile + * @return the next stage of the traffic manager profile update + */ + Update withTrafficRoutingMethod(TrafficRoutingMethod routingMethod); + } + + /** + * The stage of the traffic manager profile update allowing to specify the endpoint monitoring configuration. + */ + interface WithMonitoringConfiguration { + /** + * Specify to use HTTP monitoring for the endpoints that checks for HTTP 200 response from the path '/' at + * regular intervals, using port 80. + * + * @return the next stage of the traffic manager profile update + */ + Update withHttpMonitoring(); + + /** + * Specify to use HTTPS monitoring for the endpoints that checks for HTTPS 200 response from the path '/' at + * regular intervals, using port 443. + * + * @return the next stage of the traffic manager profile update + */ + Update withHttpsMonitoring(); + + /** + * Specify the HTTP monitoring for the endpoints that checks for HTTP 200 response from the specified path + * at regular intervals, using the specified port. + * + * @param port the monitoring port + * @param path the monitoring path + * @return the next stage of the traffic manager profile update + */ + Update withHttpMonitoring(int port, String path); + + /** + * Specify the HTTPS monitoring for the endpoints that checks for HTTPS 200 response from the specified path + * at regular intervals, using the specified port. + * + * @param port the monitoring port + * @param path the monitoring path + * @return the next stage of the traffic manager profile update + */ + Update withHttpsMonitoring(int port, String path); + } + + /** The stage of the traffic manager profile update allowing to specify endpoints. */ + interface WithEndpoint { + /** + * Begins the definition of an Azure endpoint to be attached to the traffic manager profile. + * + * @param name the name for the endpoint + * @return the stage representing configuration for the endpoint + */ + TrafficManagerEndpoint.UpdateDefinitionStages.AzureTargetEndpointBlank defineAzureTargetEndpoint( + String name); + + /** + * Begins the definition of an external endpoint to be attached to the traffic manager profile. + * + * @param name the name for the endpoint + * @return the stage representing configuration for the endpoint + */ + TrafficManagerEndpoint.UpdateDefinitionStages.ExternalTargetEndpointBlank + defineExternalTargetEndpoint(String name); + + /** + * Begins the definition of a nested profile endpoint to be attached to the traffic manager profile. + * + * @param name the name for the endpoint + * @return the stage representing configuration for the endpoint + */ + TrafficManagerEndpoint.UpdateDefinitionStages.NestedProfileTargetEndpointBlank + defineNestedTargetEndpoint(String name); + + /** + * Begins the description of an update of an existing Azure endpoint in this profile. + * + * @param name the name of the Azure endpoint + * @return the stage representing updating configuration for the Azure endpoint + */ + TrafficManagerEndpoint.UpdateAzureEndpoint updateAzureTargetEndpoint(String name); + + /** + * Begins the description of an update of an existing external endpoint in this profile. + * + * @param name the name of the external endpoint + * @return the stage representing updating configuration for the external endpoint + */ + TrafficManagerEndpoint.UpdateExternalEndpoint updateExternalTargetEndpoint(String name); + + /** + * Begins the description of an update of an existing nested traffic manager profile endpoint in this + * profile. + * + * @param name the name of the nested profile endpoint + * @return the stage representing updating configuration for the nested traffic manager profile endpoint + */ + TrafficManagerEndpoint.UpdateNestedProfileEndpoint updateNestedProfileTargetEndpoint(String name); + + /** + * Removes an endpoint in the profile. + * + * @param name the name of the endpoint + * @return the next stage of the traffic manager profile update + */ + Update withoutEndpoint(String name); + } + + /** The stage of the traffic manager profile update allowing to specify the DNS TTL. */ + interface WithTtl { + /** + * Specify the DNS TTL in seconds. + * + * @param ttlInSeconds DNS TTL in seconds + * @return the next stage of the traffic manager profile update + */ + Update withTimeToLive(int ttlInSeconds); + } + + /** The stage of the traffic manager profile update allowing to disable or enable the profile. */ + interface WithProfileStatus { + /** + * Specify that the profile needs to be disabled. + * + *

Disabling the profile will disables traffic to all endpoints in the profile + * + * @return the next stage of the traffic manager profile update + */ + Update withProfileStatusDisabled(); + + /** + * Specify that the profile needs to be enabled. + * + *

Enabling the profile will enables traffic to all endpoints in the profile + * + * @return the next stage of the traffic manager profile update + */ + Update withProfileStatusEnabled(); + } + } + + /** + * The template for an update operation, containing all the settings that can be modified. + * + *

Call {@link Update#apply()} to apply the changes to the resource in Azure. + */ + interface Update + extends Appliable, + UpdateStages.WithTrafficRoutingMethod, + UpdateStages.WithMonitoringConfiguration, + UpdateStages.WithEndpoint, + UpdateStages.WithTtl, + UpdateStages.WithProfileStatus, + Resource.UpdateWithTags { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerProfiles.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerProfiles.java new file mode 100644 index 0000000000000..59680ba9a69e8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficManagerProfiles.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsBatchCreation; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.trafficmanager.TrafficManager; +import com.azure.resourcemanager.trafficmanager.fluent.ProfilesClient; +import reactor.core.publisher.Mono; + +/** Entry point to traffic manager profile management API in Azure. */ +public interface TrafficManagerProfiles + extends SupportsCreating, + SupportsListing, + SupportsListingByResourceGroup, + SupportsGettingByResourceGroup, + SupportsGettingById, + SupportsDeletingById, + SupportsDeletingByResourceGroup, + SupportsBatchCreation, + SupportsBatchDeletion, + HasManager, + HasInner { + + /** + * Checks that the DNS name is valid for traffic manager profile and is not in use. + * + * @param dnsNameLabel the DNS name to check + * @return whether the DNS is available to be used for a traffic manager profile and other info if not + */ + CheckProfileDnsNameAvailabilityResult checkDnsNameAvailability(String dnsNameLabel); + + /** + * Asynchronously checks that the DNS name is valid for traffic manager profile and is not in use. + * + * @param dnsNameLabel the DNS name to check + * @return a representation of the deferred computation of this call, returning whether the DNS is available to be + * used for a traffic manager profile and other info if not + */ + Mono checkDnsNameAvailabilityAsync(String dnsNameLabel); + + /** @return the default geographic hierarchy used by the Geographic traffic routing method. */ + GeographicLocation getGeographicHierarchyRoot(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java new file mode 100644 index 0000000000000..0f137e1421092 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for TrafficRoutingMethod. */ +public final class TrafficRoutingMethod extends ExpandableStringEnum { + /** Static value Performance for TrafficRoutingMethod. */ + public static final TrafficRoutingMethod PERFORMANCE = fromString("Performance"); + + /** Static value Priority for TrafficRoutingMethod. */ + public static final TrafficRoutingMethod PRIORITY = fromString("Priority"); + + /** Static value Weighted for TrafficRoutingMethod. */ + public static final TrafficRoutingMethod WEIGHTED = fromString("Weighted"); + + /** Static value Geographic for TrafficRoutingMethod. */ + public static final TrafficRoutingMethod GEOGRAPHIC = fromString("Geographic"); + + /** Static value MultiValue for TrafficRoutingMethod. */ + public static final TrafficRoutingMethod MULTI_VALUE = fromString("MultiValue"); + + /** Static value Subnet for TrafficRoutingMethod. */ + public static final TrafficRoutingMethod SUBNET = fromString("Subnet"); + + /** + * Creates or finds a TrafficRoutingMethod from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrafficRoutingMethod. + */ + @JsonCreator + public static TrafficRoutingMethod fromString(String name) { + return fromString(name, TrafficRoutingMethod.class); + } + + /** @return known TrafficRoutingMethod values. */ + public static Collection values() { + return values(TrafficRoutingMethod.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java new file mode 100644 index 0000000000000..b1b14efb92b98 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.trafficmanager.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for TrafficViewEnrollmentStatus. */ +public final class TrafficViewEnrollmentStatus extends ExpandableStringEnum { + /** Static value Enabled for TrafficViewEnrollmentStatus. */ + public static final TrafficViewEnrollmentStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for TrafficViewEnrollmentStatus. */ + public static final TrafficViewEnrollmentStatus DISABLED = fromString("Disabled"); + + /** + * Creates or finds a TrafficViewEnrollmentStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrafficViewEnrollmentStatus. + */ + @JsonCreator + public static TrafficViewEnrollmentStatus fromString(String name) { + return fromString(name, TrafficViewEnrollmentStatus.class); + } + + /** @return known TrafficViewEnrollmentStatus values. */ + public static Collection values() { + return values(TrafficViewEnrollmentStatus.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java new file mode 100644 index 0000000000000..35c2b9ee893e0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for TrafficManagerManagementClient. null. */ +package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java new file mode 100644 index 0000000000000..b8070b05f4b09 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for TrafficManagerManagementClient. null. */ +package com.azure.resourcemanager.trafficmanager; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/java/com/microsoft/azure/management/TrafficManagerTests.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/java/com/microsoft/azure/management/TrafficManagerTests.java new file mode 100644 index 0000000000000..79ab364dd4cbe --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/java/com/microsoft/azure/management/TrafficManagerTests.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.management; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.trafficmanager.TrafficManager; +import com.azure.resourcemanager.trafficmanager.models.EndpointPropertiesSubnetsItem; +import com.azure.resourcemanager.trafficmanager.models.GeographicLocation; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerExternalEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import com.azure.resourcemanager.trafficmanager.models.TrafficRoutingMethod; +import java.time.temporal.ChronoUnit; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class TrafficManagerTests extends ResourceManagerTestBase { + private String rgName = null; + + protected ResourceManager resourceManager; + protected TrafficManager trafficManager; + + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider + .buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + + @Override + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + resourceManager = ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + trafficManager = TrafficManager.authenticate(httpPipeline, profile); + } + + @Override + protected void cleanUpResources() { + if (rgName != null) { + resourceManager.resourceGroups().beginDeleteByName(rgName); + } + } + + @Test + public void canGetGeographicHierarchy() { + GeographicLocation rootLocation = this.trafficManager.profiles().getGeographicHierarchyRoot(); + Assertions.assertNotNull(rootLocation); + Assertions.assertNotNull(rootLocation.code()); + Assertions.assertNotNull(rootLocation.name()); + Assertions.assertNotNull(rootLocation.childLocations()); + Assertions.assertNotNull(rootLocation.descendantLocations()); + Assertions.assertFalse(rootLocation.childLocations().isEmpty()); + Assertions.assertFalse(rootLocation.descendantLocations().isEmpty()); + } + + @Test + public void canCreateUpdateProfileWithGeographicEndpoint() { + rgName = generateRandomResourceName("tmergtest", 15); + final String tmProfileName = generateRandomResourceName("tmpr", 15); + final String tmProfileDnsLabel = generateRandomResourceName("tmdns", 15); + + GeographicLocation geographicLocation = this.trafficManager.profiles().getGeographicHierarchyRoot(); + + GeographicLocation california = null; + GeographicLocation bangladesh = null; + for (GeographicLocation location : geographicLocation.descendantLocations()) { + if (california == null && location.name().equalsIgnoreCase("California")) { + california = location; + } + if (bangladesh == null && location.name().equalsIgnoreCase("Bangladesh")) { + bangladesh = location; + } + if (california != null && bangladesh != null) { + break; + } + } + Assertions.assertNotNull(california); + Assertions.assertNotNull(bangladesh); + + TrafficManagerProfile profile = + this + .trafficManager + .profiles() + .define(tmProfileName) + .withNewResourceGroup(rgName, Region.US_EAST) + .withLeafDomainLabel(tmProfileDnsLabel) + .withGeographicBasedRouting() + .defineExternalTargetEndpoint("external-ep-1") + .toFqdn("www.gitbook.com") + .fromRegion(Region.ASIA_EAST) + .withGeographicLocation(california) + .withGeographicLocation(bangladesh) + .attach() + .withHttpsMonitoring() + .withTimeToLive(500) + .create(); + + Assertions.assertNotNull(profile.inner()); + Assertions.assertTrue(profile.trafficRoutingMethod().equals(TrafficRoutingMethod.GEOGRAPHIC)); + Assertions.assertTrue(profile.externalEndpoints().containsKey("external-ep-1")); + TrafficManagerExternalEndpoint endpoint = profile.externalEndpoints().get("external-ep-1"); + Assertions.assertNotNull(endpoint.geographicLocationCodes()); + Assertions.assertEquals(2, endpoint.geographicLocationCodes().size()); + + profile + .update() + .updateExternalTargetEndpoint("external-ep-1") + .withoutGeographicLocation(california) + .parent() + .apply(); + + Assertions.assertTrue(profile.trafficRoutingMethod().equals(TrafficRoutingMethod.GEOGRAPHIC)); + Assertions.assertTrue(profile.externalEndpoints().containsKey("external-ep-1")); + endpoint = profile.externalEndpoints().get("external-ep-1"); + Assertions.assertNotNull(endpoint.geographicLocationCodes()); + Assertions.assertEquals(1, endpoint.geographicLocationCodes().size()); + } + + @Test + public void canCreateTrafficManagerWithSubnetRouting() { + rgName = generateRandomResourceName("tmergtest", 15); + final String tmProfileName = generateRandomResourceName("tmpr", 15); + final String tmProfileDnsLabel = generateRandomResourceName("tmdns", 15); + + EndpointPropertiesSubnetsItem subnetCidr = new EndpointPropertiesSubnetsItem(); + subnetCidr.withFirst("80.83.228.0").withScope(22); + + EndpointPropertiesSubnetsItem subnetRange = new EndpointPropertiesSubnetsItem(); + subnetRange.withFirst("25.26.27.28").withLast("29.30.31.32"); + + TrafficManagerProfile profile = + this + .trafficManager + .profiles() + .define(tmProfileName) + .withNewResourceGroup(rgName, Region.US_EAST) + .withLeafDomainLabel(tmProfileDnsLabel) + .withTrafficRoutingMethod(TrafficRoutingMethod.SUBNET) + .defineExternalTargetEndpoint("external-ep-1") + .toFqdn("www.gitbook.com") + .fromRegion(Region.ASIA_EAST) + .withSubnet(subnetCidr.first(), subnetCidr.scope()) + .withSubnet(subnetRange.first(), subnetRange.last()) + .attach() + .create(); + + Assertions.assertNotNull(profile.inner()); + Assertions.assertEquals(TrafficRoutingMethod.SUBNET, profile.trafficRoutingMethod()); + Assertions.assertTrue(profile.externalEndpoints().containsKey("external-ep-1")); + TrafficManagerExternalEndpoint endpoint = profile.externalEndpoints().get("external-ep-1"); + Assertions.assertEquals(endpoint.subnets().size(), 2); + boolean foundCidr = false; + boolean foundRange = false; + for (EndpointPropertiesSubnetsItem subnet : endpoint.subnets()) { + if (subnet.first() != null && subnet.scope() != null) { + if (subnet.first().equalsIgnoreCase(subnetCidr.first()) && subnet.scope().equals(subnetCidr.scope())) { + foundCidr = true; + } + } + if (subnet.first() != null && subnet.last() != null) { + if (subnet.first().equalsIgnoreCase(subnetRange.first()) + && subnet.last().equalsIgnoreCase(subnetRange.last())) { + foundRange = true; + } + } + } + + Assertions + .assertTrue( + foundCidr, + String.format("The subnet %s/%d not found in the endpoint.", subnetCidr.first(), subnetCidr.scope())); + Assertions + .assertTrue( + foundRange, + String + .format( + "The subnet range %s-%s not found in the endpoint.", subnetCidr.first(), subnetCidr.last())); + + profile = + profile + .update() + .updateExternalTargetEndpoint("external-ep-1") + .withoutSubnet(subnetRange.first(), subnetRange.last()) + .parent() + .apply(); + + endpoint = profile.externalEndpoints().get("external-ep-1"); + Assertions.assertTrue(endpoint.subnets().size() == 1); + + profile = this.trafficManager.profiles().getById(profile.id()); + + endpoint = profile.externalEndpoints().get("external-ep-1"); + Assertions.assertTrue(endpoint.subnets().size() == 1); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canCreateTrafficManagerWithSubnetRouting.json b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canCreateTrafficManagerWithSubnetRouting.json new file mode 100644 index 0000000000000..d725ca6a0667c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canCreateTrafficManagerWithSubnetRouting.json @@ -0,0 +1,244 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/tmergtest91168?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c85a614-e814-426d-8088-b3caaf8394ae", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 04:36:24 GMT", + "x-ms-correlation-request-id" : "5d72de39-e8d2-4445-8938-35033f03e5a9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043625Z:5d72de39-e8d2-4445-8938-35033f03e5a9", + "Expires" : "-1", + "Content-Length" : "225", + "x-ms-request-id" : "5d72de39-e8d2-4445-8938-35033f03e5a9", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest91168\",\"name\":\"tmergtest91168\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest91168/providers/Microsoft.Network/trafficmanagerprofiles/tmpr988909e3?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "21e7e20e-bbbc-4c99-aada-206ad1703c0d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 04:36:32 GMT", + "x-ms-correlation-request-id" : "14ed57c8-ec00-4819-83ec-80612c20c0a4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043633Z:14ed57c8-ec00-4819-83ec-80612c20c0a4", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "656", + "x-ms-request-id" : "21e7e20e-bbbc-4c99-aada-206ad1703c0d", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\",\"name\":\"tmpr988909e3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Subnet\",\"dnsConfig\":{\"relativeName\":\"tmdns7911339\",\"fqdn\":\"tmdns7911339.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest91168/providers/Microsoft.Network/trafficmanagerprofiles/tmpr988909e3/externalEndpoints/external-ep-1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "0957f55c-0bae-467e-84ab-74c4a6c780b5", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 04:36:33 GMT", + "x-ms-correlation-request-id" : "6925a255-2337-4f1e-9f47-14beaa283567", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043634Z:6925a255-2337-4f1e-9f47-14beaa283567", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "569", + "x-ms-request-id" : "0957f55c-0bae-467e-84ab-74c4a6c780b5", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"subnets\":[{\"first\":\"80.83.228.0\",\"scope\":22},{\"first\":\"25.26.27.28\",\"last\":\"29.30.31.32\"}],\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest91168/providers/Microsoft.Network/trafficmanagerprofiles/tmpr988909e3?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "87a4d96f-6f50-4b8c-b22f-b8585896d6b0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:33 GMT", + "x-ms-correlation-request-id" : "58da8010-ccb0-4f8e-9dcf-40b21479ce19", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043634Z:58da8010-ccb0-4f8e-9dcf-40b21479ce19", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1234", + "x-ms-request-id" : "87a4d96f-6f50-4b8c-b22f-b8585896d6b0", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\",\"name\":\"tmpr988909e3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Subnet\",\"dnsConfig\":{\"relativeName\":\"tmdns7911339\",\"fqdn\":\"tmdns7911339.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"subnets\":[{\"first\":\"80.83.228.0\",\"scope\":22},{\"first\":\"25.26.27.28\",\"last\":\"29.30.31.32\"}],\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest91168/providers/Microsoft.Network/trafficmanagerprofiles/tmpr988909e3/externalEndpoints/external-ep-1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "193a82d7-9e2e-4c56-b6e5-b686e9b58089", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 04:36:34 GMT", + "x-ms-correlation-request-id" : "e379be39-d753-431a-b6f0-d861f1874b43", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043635Z:e379be39-d753-431a-b6f0-d861f1874b43", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "524", + "x-ms-request-id" : "193a82d7-9e2e-4c56-b6e5-b686e9b58089", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"subnets\":[{\"first\":\"80.83.228.0\",\"scope\":22}],\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest91168/providers/Microsoft.Network/trafficmanagerprofiles/tmpr988909e3?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b237b9cf-22a6-448d-961c-26bb177d879e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:37 GMT", + "x-ms-correlation-request-id" : "74be3fa9-55f2-426c-8b7a-07dfd6122f73", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10796", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043638Z:74be3fa9-55f2-426c-8b7a-07dfd6122f73", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1189", + "x-ms-request-id" : "b237b9cf-22a6-448d-961c-26bb177d879e", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\",\"name\":\"tmpr988909e3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Subnet\",\"dnsConfig\":{\"relativeName\":\"tmdns7911339\",\"fqdn\":\"tmdns7911339.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"subnets\":[{\"first\":\"80.83.228.0\",\"scope\":22}],\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest91168/providers/Microsoft.Network/trafficmanagerprofiles/tmpr988909e3?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d0a8c5f7-5029-495f-ae97-ec0aca63a612", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:37 GMT", + "x-ms-correlation-request-id" : "b13c80b1-42b5-4bf0-adfb-bd61c0cefba6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10796", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043638Z:b13c80b1-42b5-4bf0-adfb-bd61c0cefba6", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1189", + "x-ms-request-id" : "d0a8c5f7-5029-495f-ae97-ec0aca63a612", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\",\"name\":\"tmpr988909e3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Subnet\",\"dnsConfig\":{\"relativeName\":\"tmdns7911339\",\"fqdn\":\"tmdns7911339.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"subnets\":[{\"first\":\"80.83.228.0\",\"scope\":22}],\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest91168/providers/Microsoft.Network/trafficmanagerprofiles/tmpr988909e3?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "eda84d52-00ce-4a24-9aeb-32aef2d41099", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:38 GMT", + "x-ms-correlation-request-id" : "e4b41ce9-a79b-44f0-b041-f53dd47af077", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10795", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043639Z:e4b41ce9-a79b-44f0-b041-f53dd47af077", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1189", + "x-ms-request-id" : "eda84d52-00ce-4a24-9aeb-32aef2d41099", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\",\"name\":\"tmpr988909e3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Subnet\",\"dnsConfig\":{\"relativeName\":\"tmdns7911339\",\"fqdn\":\"tmdns7911339.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest91168\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr988909e3\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"subnets\":[{\"first\":\"80.83.228.0\",\"scope\":22}],\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/tmergtest91168?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "48022d88-939d-470e-b83e-f92f672116b7", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 04:36:39 GMT", + "x-ms-correlation-request-id" : "695a5991-c359-47b6-b3aa-49cb7476fc25", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043640Z:695a5991-c359-47b6-b3aa-49cb7476fc25", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "695a5991-c359-47b6-b3aa-49cb7476fc25", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1UTUVSR1RFU1Q5MTE2OC1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null + } ], + "variables" : [ "tmergtest91168", "tmpr988909e3", "tmdns7911339" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canCreateUpdateProfileWithGeographicEndpoint.json b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canCreateUpdateProfileWithGeographicEndpoint.json new file mode 100644 index 0000000000000..8ef10a0a18660 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canCreateUpdateProfileWithGeographicEndpoint.json @@ -0,0 +1,244 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "http://localhost:1234/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3fdeb7ac-ed66-45ff-9e01-4fb2f0d4df79", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:21 GMT", + "x-ms-correlation-request-id" : "71f05a96-d385-45ad-bbd8-541da4a00663", + "x-ms-ratelimit-remaining-tenant-reads" : "11998", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043621Z:71f05a96-d385-45ad-bbd8-541da4a00663", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "16124", + "x-ms-request-id" : "3fdeb7ac-ed66-45ff-9e01-4fb2f0d4df79", + "Body" : "{\"id\":\"\\/providers\\/Microsoft.Network\\/trafficManagerGeographicHierarchies\\/default\",\"name\":\"default\",\"type\":\"Microsoft.Network\\/trafficManagerGeographicHierarchies\",\"properties\":{\"geographicHierarchy\":{\"code\":\"WORLD\",\"name\":\"World\",\"regions\":[{\"code\":\"GEO-EU\",\"name\":\"Europe\",\"regions\":[{\"code\":\"AD\",\"name\":\"Andorra\",\"regions\":[]},{\"code\":\"AL\",\"name\":\"Albania\",\"regions\":[]},{\"code\":\"AT\",\"name\":\"Austria\",\"regions\":[]},{\"code\":\"AX\",\"name\":\"Åland Islands\",\"regions\":[]},{\"code\":\"BA\",\"name\":\"Bosnia and Herzegovina\",\"regions\":[]},{\"code\":\"BE\",\"name\":\"Belgium\",\"regions\":[]},{\"code\":\"BG\",\"name\":\"Bulgaria\",\"regions\":[]},{\"code\":\"BY\",\"name\":\"Belarus\",\"regions\":[]},{\"code\":\"CH\",\"name\":\"Switzerland\",\"regions\":[]},{\"code\":\"CY\",\"name\":\"Cyprus\",\"regions\":[]},{\"code\":\"CZ\",\"name\":\"Czech Republic\",\"regions\":[]},{\"code\":\"DE\",\"name\":\"Germany\",\"regions\":[]},{\"code\":\"DK\",\"name\":\"Denmark\",\"regions\":[]},{\"code\":\"EE\",\"name\":\"Estonia\",\"regions\":[]},{\"code\":\"ES\",\"name\":\"Spain\",\"regions\":[]},{\"code\":\"FI\",\"name\":\"Finland\",\"regions\":[]},{\"code\":\"FO\",\"name\":\"Faroe Islands\",\"regions\":[]},{\"code\":\"FR\",\"name\":\"France\",\"regions\":[]},{\"code\":\"GB\",\"name\":\"United Kingdom\",\"regions\":[]},{\"code\":\"GG\",\"name\":\"Guernsey\",\"regions\":[]},{\"code\":\"GI\",\"name\":\"Gibraltar\",\"regions\":[]},{\"code\":\"GR\",\"name\":\"Greece\",\"regions\":[]},{\"code\":\"HR\",\"name\":\"Croatia\",\"regions\":[]},{\"code\":\"HU\",\"name\":\"Hungary\",\"regions\":[]},{\"code\":\"IE\",\"name\":\"Ireland\",\"regions\":[]},{\"code\":\"IM\",\"name\":\"Isle of Man\",\"regions\":[]},{\"code\":\"IS\",\"name\":\"Iceland\",\"regions\":[]},{\"code\":\"IT\",\"name\":\"Italy\",\"regions\":[]},{\"code\":\"JE\",\"name\":\"Jersey\",\"regions\":[]},{\"code\":\"LI\",\"name\":\"Liechtenstein\",\"regions\":[]},{\"code\":\"LT\",\"name\":\"Lithuania\",\"regions\":[]},{\"code\":\"LU\",\"name\":\"Luxembourg\",\"regions\":[]},{\"code\":\"LV\",\"name\":\"Latvia\",\"regions\":[]},{\"code\":\"MC\",\"name\":\"Monaco\",\"regions\":[]},{\"code\":\"MD\",\"name\":\"Moldova\",\"regions\":[]},{\"code\":\"ME\",\"name\":\"Montenegro\",\"regions\":[]},{\"code\":\"MK\",\"name\":\"North Macedonia\",\"regions\":[]},{\"code\":\"MT\",\"name\":\"Malta\",\"regions\":[]},{\"code\":\"NL\",\"name\":\"Netherlands\",\"regions\":[]},{\"code\":\"NO\",\"name\":\"Norway\",\"regions\":[]},{\"code\":\"PL\",\"name\":\"Poland\",\"regions\":[]},{\"code\":\"PT\",\"name\":\"Portugal\",\"regions\":[]},{\"code\":\"RO\",\"name\":\"Romania\",\"regions\":[]},{\"code\":\"RS\",\"name\":\"Serbia\",\"regions\":[]},{\"code\":\"RU\",\"name\":\"Russia\",\"regions\":[]},{\"code\":\"SE\",\"name\":\"Sweden\",\"regions\":[]},{\"code\":\"SI\",\"name\":\"Slovenia\",\"regions\":[]},{\"code\":\"SJ\",\"name\":\"Svalbard\",\"regions\":[]},{\"code\":\"SK\",\"name\":\"Slovakia\",\"regions\":[]},{\"code\":\"SM\",\"name\":\"San Marino\",\"regions\":[]},{\"code\":\"UA\",\"name\":\"Ukraine\",\"regions\":[{\"code\":\"UA-CR\",\"name\":\"Region of Crimea\",\"regions\":[]}]},{\"code\":\"VA\",\"name\":\"Vatican City\",\"regions\":[]},{\"code\":\"XJ\",\"name\":\"Jan Mayen\",\"regions\":[]},{\"code\":\"XK\",\"name\":\"Kosovo\",\"regions\":[]}]},{\"code\":\"GEO-ME\",\"name\":\"Middle East\",\"regions\":[{\"code\":\"AE\",\"name\":\"United Arab Emirates\",\"regions\":[]},{\"code\":\"BH\",\"name\":\"Bahrain\",\"regions\":[]},{\"code\":\"IL\",\"name\":\"Israel\",\"regions\":[]},{\"code\":\"IQ\",\"name\":\"Iraq\",\"regions\":[]},{\"code\":\"IR\",\"name\":\"Iran\",\"regions\":[]},{\"code\":\"JO\",\"name\":\"Jordan\",\"regions\":[]},{\"code\":\"KW\",\"name\":\"Kuwait\",\"regions\":[]},{\"code\":\"LB\",\"name\":\"Lebanon\",\"regions\":[]},{\"code\":\"OM\",\"name\":\"Oman\",\"regions\":[]},{\"code\":\"PS\",\"name\":\"Palestinian Authority\",\"regions\":[]},{\"code\":\"QA\",\"name\":\"Qatar\",\"regions\":[]},{\"code\":\"SY\",\"name\":\"Syria\",\"regions\":[]},{\"code\":\"SA\",\"name\":\"Saudi Arabia\",\"regions\":[]},{\"code\":\"TR\",\"name\":\"Turkey\",\"regions\":[]},{\"code\":\"YE\",\"name\":\"Yemen\",\"regions\":[]}]},{\"code\":\"GEO-NA\",\"name\":\"North America \\/ Central America \\/ Caribbean\",\"regions\":[{\"code\":\"AG\",\"name\":\"Antigua and Barbuda\",\"regions\":[]},{\"code\":\"AI\",\"name\":\"Anguilla\",\"regions\":[]},{\"code\":\"AW\",\"name\":\"Aruba\",\"regions\":[]},{\"code\":\"BB\",\"name\":\"Barbados\",\"regions\":[]},{\"code\":\"BL\",\"name\":\"Saint Barthélemy\",\"regions\":[]},{\"code\":\"BM\",\"name\":\"Bermuda\",\"regions\":[]},{\"code\":\"BQ\",\"name\":\"Bonaire\",\"regions\":[]},{\"code\":\"BS\",\"name\":\"Bahamas\",\"regions\":[]},{\"code\":\"BZ\",\"name\":\"Belize\",\"regions\":[]},{\"code\":\"CA\",\"name\":\"Canada\",\"regions\":[{\"code\":\"CA-AB\",\"name\":\"Alberta\",\"regions\":[]},{\"code\":\"CA-BC\",\"name\":\"British Columbia\",\"regions\":[]},{\"code\":\"CA-MB\",\"name\":\"Manitoba\",\"regions\":[]},{\"code\":\"CA-NB\",\"name\":\"New Brunswick\",\"regions\":[]},{\"code\":\"CA-NL\",\"name\":\"Newfoundland and Labrador\",\"regions\":[]},{\"code\":\"CA-NS\",\"name\":\"Nova Scotia\",\"regions\":[]},{\"code\":\"CA-NT\",\"name\":\"Northwest Territories\",\"regions\":[]},{\"code\":\"CA-NU\",\"name\":\"Nunavut\",\"regions\":[]},{\"code\":\"CA-ON\",\"name\":\"Ontario\",\"regions\":[]},{\"code\":\"CA-PE\",\"name\":\"Prince Edward Island\",\"regions\":[]},{\"code\":\"CA-QC\",\"name\":\"Québec\",\"regions\":[]},{\"code\":\"CA-SK\",\"name\":\"Saskatchewan\",\"regions\":[]},{\"code\":\"CA-YT\",\"name\":\"Yukon Territory\",\"regions\":[]}]},{\"code\":\"CR\",\"name\":\"Costa Rica\",\"regions\":[]},{\"code\":\"CU\",\"name\":\"Cuba\",\"regions\":[]},{\"code\":\"CW\",\"name\":\"Curaçao\",\"regions\":[]},{\"code\":\"DM\",\"name\":\"Dominica\",\"regions\":[]},{\"code\":\"DO\",\"name\":\"Dominican Republic\",\"regions\":[]},{\"code\":\"GD\",\"name\":\"Grenada\",\"regions\":[]},{\"code\":\"GL\",\"name\":\"Greenland\",\"regions\":[]},{\"code\":\"GP\",\"name\":\"Guadeloupe\",\"regions\":[]},{\"code\":\"GT\",\"name\":\"Guatemala\",\"regions\":[]},{\"code\":\"HN\",\"name\":\"Honduras\",\"regions\":[]},{\"code\":\"HT\",\"name\":\"Haiti\",\"regions\":[]},{\"code\":\"JM\",\"name\":\"Jamaica\",\"regions\":[]},{\"code\":\"KN\",\"name\":\"Saint Kitts and Nevis\",\"regions\":[]},{\"code\":\"KY\",\"name\":\"Cayman Islands\",\"regions\":[]},{\"code\":\"LC\",\"name\":\"Saint Lucia\",\"regions\":[]},{\"code\":\"MF\",\"name\":\"Saint Martin\",\"regions\":[]},{\"code\":\"MQ\",\"name\":\"Martinique\",\"regions\":[]},{\"code\":\"MS\",\"name\":\"Montserrat\",\"regions\":[]},{\"code\":\"MX\",\"name\":\"Mexico\",\"regions\":[]},{\"code\":\"NI\",\"name\":\"Nicaragua\",\"regions\":[]},{\"code\":\"PA\",\"name\":\"Panama\",\"regions\":[]},{\"code\":\"PM\",\"name\":\"Saint Pierre and Miquelon\",\"regions\":[]},{\"code\":\"PR\",\"name\":\"Puerto Rico\",\"regions\":[]},{\"code\":\"SV\",\"name\":\"El Salvador\",\"regions\":[]},{\"code\":\"SX\",\"name\":\"Sint Maarten\",\"regions\":[]},{\"code\":\"TC\",\"name\":\"Turks and Caicos Islands\",\"regions\":[]},{\"code\":\"TT\",\"name\":\"Trinidad and Tobago\",\"regions\":[]},{\"code\":\"UM\",\"name\":\"U.S. Outlying Islands\",\"regions\":[]},{\"code\":\"US\",\"name\":\"United States\",\"regions\":[{\"code\":\"US-AK\",\"name\":\"Alaska\",\"regions\":[]},{\"code\":\"US-AL\",\"name\":\"Alabama\",\"regions\":[]},{\"code\":\"US-AR\",\"name\":\"Arkansas\",\"regions\":[]},{\"code\":\"US-AZ\",\"name\":\"Arizona\",\"regions\":[]},{\"code\":\"US-CA\",\"name\":\"California\",\"regions\":[]},{\"code\":\"US-CO\",\"name\":\"Colorado\",\"regions\":[]},{\"code\":\"US-CT\",\"name\":\"Connecticut\",\"regions\":[]},{\"code\":\"US-DC\",\"name\":\"District of Columbia\",\"regions\":[]},{\"code\":\"US-DE\",\"name\":\"Delaware\",\"regions\":[]},{\"code\":\"US-FL\",\"name\":\"Florida\",\"regions\":[]},{\"code\":\"US-GA\",\"name\":\"Georgia\",\"regions\":[]},{\"code\":\"US-HI\",\"name\":\"Hawaii\",\"regions\":[]},{\"code\":\"US-IA\",\"name\":\"Iowa\",\"regions\":[]},{\"code\":\"US-ID\",\"name\":\"Idaho\",\"regions\":[]},{\"code\":\"US-IL\",\"name\":\"Illinois\",\"regions\":[]},{\"code\":\"US-IN\",\"name\":\"Indiana\",\"regions\":[]},{\"code\":\"US-KS\",\"name\":\"Kansas\",\"regions\":[]},{\"code\":\"US-KY\",\"name\":\"Kentucky\",\"regions\":[]},{\"code\":\"US-LA\",\"name\":\"Louisiana\",\"regions\":[]},{\"code\":\"US-MA\",\"name\":\"Massachusetts\",\"regions\":[]},{\"code\":\"US-MD\",\"name\":\"Maryland\",\"regions\":[]},{\"code\":\"US-ME\",\"name\":\"Maine\",\"regions\":[]},{\"code\":\"US-MI\",\"name\":\"Michigan\",\"regions\":[]},{\"code\":\"US-MN\",\"name\":\"Minnesota\",\"regions\":[]},{\"code\":\"US-MO\",\"name\":\"Missouri\",\"regions\":[]},{\"code\":\"US-MS\",\"name\":\"Mississippi\",\"regions\":[]},{\"code\":\"US-MT\",\"name\":\"Montana\",\"regions\":[]},{\"code\":\"US-NC\",\"name\":\"North Carolina\",\"regions\":[]},{\"code\":\"US-ND\",\"name\":\"North Dakota\",\"regions\":[]},{\"code\":\"US-NE\",\"name\":\"Nebraska\",\"regions\":[]},{\"code\":\"US-NH\",\"name\":\"New Hampshire\",\"regions\":[]},{\"code\":\"US-NJ\",\"name\":\"New Jersey\",\"regions\":[]},{\"code\":\"US-NM\",\"name\":\"New Mexico\",\"regions\":[]},{\"code\":\"US-NV\",\"name\":\"Nevada\",\"regions\":[]},{\"code\":\"US-NY\",\"name\":\"New York\",\"regions\":[]},{\"code\":\"US-OH\",\"name\":\"Ohio\",\"regions\":[]},{\"code\":\"US-OK\",\"name\":\"Oklahoma\",\"regions\":[]},{\"code\":\"US-OR\",\"name\":\"Oregon\",\"regions\":[]},{\"code\":\"US-PA\",\"name\":\"Pennsylvania\",\"regions\":[]},{\"code\":\"US-RI\",\"name\":\"Rhode Island\",\"regions\":[]},{\"code\":\"US-SC\",\"name\":\"South Carolina\",\"regions\":[]},{\"code\":\"US-SD\",\"name\":\"South Dakota\",\"regions\":[]},{\"code\":\"US-TN\",\"name\":\"Tennessee\",\"regions\":[]},{\"code\":\"US-TX\",\"name\":\"Texas\",\"regions\":[]},{\"code\":\"US-UT\",\"name\":\"Utah\",\"regions\":[]},{\"code\":\"US-VA\",\"name\":\"Virginia\",\"regions\":[]},{\"code\":\"US-VT\",\"name\":\"Vermont\",\"regions\":[]},{\"code\":\"US-WA\",\"name\":\"Washington\",\"regions\":[]},{\"code\":\"US-WI\",\"name\":\"Wisconsin\",\"regions\":[]},{\"code\":\"US-WV\",\"name\":\"West Virginia\",\"regions\":[]},{\"code\":\"US-WY\",\"name\":\"Wyoming\",\"regions\":[]}]},{\"code\":\"VC\",\"name\":\"Saint Vincent and the Grenadines\",\"regions\":[]},{\"code\":\"VG\",\"name\":\"British Virgin Islands\",\"regions\":[]},{\"code\":\"VI\",\"name\":\"U.S. Virgin Islands\",\"regions\":[]},{\"code\":\"XE\",\"name\":\"Sint Eustatius\",\"regions\":[]},{\"code\":\"XS\",\"name\":\"Saba\",\"regions\":[]}]},{\"code\":\"GEO-AS\",\"name\":\"Asia\",\"regions\":[{\"code\":\"AF\",\"name\":\"Afghanistan\",\"regions\":[]},{\"code\":\"AM\",\"name\":\"Armenia\",\"regions\":[]},{\"code\":\"AZ\",\"name\":\"Azerbaijan\",\"regions\":[]},{\"code\":\"BD\",\"name\":\"Bangladesh\",\"regions\":[]},{\"code\":\"BN\",\"name\":\"Brunei\",\"regions\":[]},{\"code\":\"BT\",\"name\":\"Bhutan\",\"regions\":[]},{\"code\":\"CC\",\"name\":\"Cocos (Keeling) Islands\",\"regions\":[]},{\"code\":\"CN\",\"name\":\"China\",\"regions\":[]},{\"code\":\"CX\",\"name\":\"Christmas Island\",\"regions\":[]},{\"code\":\"GE\",\"name\":\"Georgia\",\"regions\":[]},{\"code\":\"HK\",\"name\":\"Hong Kong SAR\",\"regions\":[]},{\"code\":\"ID\",\"name\":\"Indonesia\",\"regions\":[]},{\"code\":\"IN\",\"name\":\"India\",\"regions\":[]},{\"code\":\"IO\",\"name\":\"British Indian Ocean Territory\",\"regions\":[]},{\"code\":\"JP\",\"name\":\"Japan\",\"regions\":[]},{\"code\":\"KG\",\"name\":\"Kyrgyzstan\",\"regions\":[]},{\"code\":\"KH\",\"name\":\"Cambodia\",\"regions\":[]},{\"code\":\"KP\",\"name\":\"North Korea\",\"regions\":[]},{\"code\":\"KR\",\"name\":\"Korea\",\"regions\":[]},{\"code\":\"KZ\",\"name\":\"Kazakhstan\",\"regions\":[]},{\"code\":\"LA\",\"name\":\"Laos\",\"regions\":[]},{\"code\":\"LK\",\"name\":\"Sri Lanka\",\"regions\":[]},{\"code\":\"MM\",\"name\":\"Myanmar\",\"regions\":[]},{\"code\":\"MN\",\"name\":\"Mongolia\",\"regions\":[]},{\"code\":\"MO\",\"name\":\"Macao SAR\",\"regions\":[]},{\"code\":\"MV\",\"name\":\"Maldives\",\"regions\":[]},{\"code\":\"MY\",\"name\":\"Malaysia\",\"regions\":[]},{\"code\":\"NP\",\"name\":\"Nepal\",\"regions\":[]},{\"code\":\"PH\",\"name\":\"Philippines\",\"regions\":[]},{\"code\":\"PK\",\"name\":\"Pakistan\",\"regions\":[]},{\"code\":\"SG\",\"name\":\"Singapore\",\"regions\":[]},{\"code\":\"TH\",\"name\":\"Thailand\",\"regions\":[]},{\"code\":\"TJ\",\"name\":\"Tajikistan\",\"regions\":[]},{\"code\":\"TL\",\"name\":\"Timor_Leste\",\"regions\":[]},{\"code\":\"TM\",\"name\":\"Turkmenistan\",\"regions\":[]},{\"code\":\"TW\",\"name\":\"Taiwan\",\"regions\":[]},{\"code\":\"UZ\",\"name\":\"Uzbekistan\",\"regions\":[]},{\"code\":\"VN\",\"name\":\"Vietnam\",\"regions\":[]}]},{\"code\":\"GEO-AF\",\"name\":\"Africa\",\"regions\":[{\"code\":\"AO\",\"name\":\"Angola\",\"regions\":[]},{\"code\":\"BF\",\"name\":\"Burkina Faso\",\"regions\":[]},{\"code\":\"BI\",\"name\":\"Burundi\",\"regions\":[]},{\"code\":\"BJ\",\"name\":\"Benin\",\"regions\":[]},{\"code\":\"BV\",\"name\":\"Bouvet Island\",\"regions\":[]},{\"code\":\"BW\",\"name\":\"Botswana\",\"regions\":[]},{\"code\":\"CD\",\"name\":\"Congo (DRC)\",\"regions\":[]},{\"code\":\"CF\",\"name\":\"Central African Republic\",\"regions\":[]},{\"code\":\"CG\",\"name\":\"Congo\",\"regions\":[]},{\"code\":\"CI\",\"name\":\"Côte d’Ivoire\",\"regions\":[]},{\"code\":\"CM\",\"name\":\"Cameroon\",\"regions\":[]},{\"code\":\"CV\",\"name\":\"Cabo Verde\",\"regions\":[]},{\"code\":\"DJ\",\"name\":\"Djibouti\",\"regions\":[]},{\"code\":\"DZ\",\"name\":\"Algeria\",\"regions\":[]},{\"code\":\"EG\",\"name\":\"Egypt\",\"regions\":[]},{\"code\":\"ER\",\"name\":\"Eritrea\",\"regions\":[]},{\"code\":\"ET\",\"name\":\"Ethiopia\",\"regions\":[]},{\"code\":\"GA\",\"name\":\"Gabon\",\"regions\":[]},{\"code\":\"GH\",\"name\":\"Ghana\",\"regions\":[]},{\"code\":\"GM\",\"name\":\"Gambia\",\"regions\":[]},{\"code\":\"GN\",\"name\":\"Guinea\",\"regions\":[]},{\"code\":\"GQ\",\"name\":\"Equatorial Guinea\",\"regions\":[]},{\"code\":\"GW\",\"name\":\"Guinea_Bissau\",\"regions\":[]},{\"code\":\"KE\",\"name\":\"Kenya\",\"regions\":[]},{\"code\":\"KM\",\"name\":\"Comoros\",\"regions\":[]},{\"code\":\"LR\",\"name\":\"Liberia\",\"regions\":[]},{\"code\":\"LS\",\"name\":\"Lesotho\",\"regions\":[]},{\"code\":\"LY\",\"name\":\"Libya\",\"regions\":[]},{\"code\":\"MA\",\"name\":\"Morocco\",\"regions\":[]},{\"code\":\"MG\",\"name\":\"Madagascar\",\"regions\":[]},{\"code\":\"ML\",\"name\":\"Mali\",\"regions\":[]},{\"code\":\"MR\",\"name\":\"Mauritania\",\"regions\":[]},{\"code\":\"MU\",\"name\":\"Mauritius\",\"regions\":[]},{\"code\":\"MW\",\"name\":\"Malawi\",\"regions\":[]},{\"code\":\"MZ\",\"name\":\"Mozambique\",\"regions\":[]},{\"code\":\"NA\",\"name\":\"Namibia\",\"regions\":[]},{\"code\":\"NE\",\"name\":\"Niger\",\"regions\":[]},{\"code\":\"NG\",\"name\":\"Nigeria\",\"regions\":[]},{\"code\":\"RE\",\"name\":\"Réunion\",\"regions\":[]},{\"code\":\"RW\",\"name\":\"Rwanda\",\"regions\":[]},{\"code\":\"SC\",\"name\":\"Seychelles\",\"regions\":[]},{\"code\":\"SD\",\"name\":\"Sudan\",\"regions\":[]},{\"code\":\"SH\",\"name\":\"St Helena, Ascension, Tristan da Cunha\",\"regions\":[]},{\"code\":\"SL\",\"name\":\"Sierra Leone\",\"regions\":[]},{\"code\":\"SN\",\"name\":\"Senegal\",\"regions\":[]},{\"code\":\"SO\",\"name\":\"Somalia\",\"regions\":[]},{\"code\":\"SS\",\"name\":\"South Sudan\",\"regions\":[]},{\"code\":\"ST\",\"name\":\"São Tomé and Príncipe\",\"regions\":[]},{\"code\":\"SZ\",\"name\":\"Swaziland\",\"regions\":[]},{\"code\":\"TD\",\"name\":\"Chad\",\"regions\":[]},{\"code\":\"TF\",\"name\":\"French Southern Territories\",\"regions\":[]},{\"code\":\"TG\",\"name\":\"Togo\",\"regions\":[]},{\"code\":\"TN\",\"name\":\"Tunisia\",\"regions\":[]},{\"code\":\"TZ\",\"name\":\"Tanzania\",\"regions\":[]},{\"code\":\"UG\",\"name\":\"Uganda\",\"regions\":[]},{\"code\":\"YT\",\"name\":\"Mayotte\",\"regions\":[]},{\"code\":\"ZA\",\"name\":\"South Africa\",\"regions\":[]},{\"code\":\"ZM\",\"name\":\"Zambia\",\"regions\":[]},{\"code\":\"ZW\",\"name\":\"Zimbabwe\",\"regions\":[]}]},{\"code\":\"GEO-AN\",\"name\":\"Antarctica\",\"regions\":[{\"code\":\"AQ\",\"name\":\"Antarctica\",\"regions\":[]}]},{\"code\":\"GEO-SA\",\"name\":\"South America\",\"regions\":[{\"code\":\"AR\",\"name\":\"Argentina\",\"regions\":[]},{\"code\":\"BO\",\"name\":\"Bolivia\",\"regions\":[]},{\"code\":\"BR\",\"name\":\"Brazil\",\"regions\":[]},{\"code\":\"CL\",\"name\":\"Chile\",\"regions\":[]},{\"code\":\"CO\",\"name\":\"Colombia\",\"regions\":[]},{\"code\":\"EC\",\"name\":\"Ecuador\",\"regions\":[]},{\"code\":\"FK\",\"name\":\"Falkland Islands\",\"regions\":[]},{\"code\":\"GF\",\"name\":\"French Guiana\",\"regions\":[]},{\"code\":\"GS\",\"name\":\"South Georgia and South Sandwich Islands\",\"regions\":[]},{\"code\":\"GY\",\"name\":\"Guyana\",\"regions\":[]},{\"code\":\"PE\",\"name\":\"Peru\",\"regions\":[]},{\"code\":\"PY\",\"name\":\"Paraguay\",\"regions\":[]},{\"code\":\"SR\",\"name\":\"Suriname\",\"regions\":[]},{\"code\":\"UY\",\"name\":\"Uruguay\",\"regions\":[]},{\"code\":\"VE\",\"name\":\"Venezuela\",\"regions\":[]}]},{\"code\":\"GEO-AP\",\"name\":\"Australia \\/ Pacific\",\"regions\":[{\"code\":\"AS\",\"name\":\"American Samoa\",\"regions\":[]},{\"code\":\"AU\",\"name\":\"Australia\",\"regions\":[{\"code\":\"AU-ACT\",\"name\":\"Australian Capital Territory\",\"regions\":[]},{\"code\":\"AU-NSW\",\"name\":\"New South Wales\",\"regions\":[]},{\"code\":\"AU-NT\",\"name\":\"Northern Territory\",\"regions\":[]},{\"code\":\"AU-QLD\",\"name\":\"Queensland\",\"regions\":[]},{\"code\":\"AU-SA\",\"name\":\"South Australia\",\"regions\":[]},{\"code\":\"AU-TAS\",\"name\":\"Tasmania\",\"regions\":[]},{\"code\":\"AU-VIC\",\"name\":\"Victoria\",\"regions\":[]},{\"code\":\"AU-WA\",\"name\":\"Western Australia\",\"regions\":[]}]},{\"code\":\"CK\",\"name\":\"Cook Islands\",\"regions\":[]},{\"code\":\"FJ\",\"name\":\"Fiji\",\"regions\":[]},{\"code\":\"FM\",\"name\":\"Micronesia\",\"regions\":[]},{\"code\":\"GU\",\"name\":\"Guam\",\"regions\":[]},{\"code\":\"HM\",\"name\":\"Heard Island and McDonald Islands\",\"regions\":[]},{\"code\":\"KI\",\"name\":\"Kiribati\",\"regions\":[]},{\"code\":\"MH\",\"name\":\"Marshall Islands\",\"regions\":[]},{\"code\":\"MP\",\"name\":\"Northern Mariana Islands\",\"regions\":[]},{\"code\":\"NC\",\"name\":\"New Caledonia\",\"regions\":[]},{\"code\":\"NF\",\"name\":\"Norfolk Island\",\"regions\":[]},{\"code\":\"NR\",\"name\":\"Nauru\",\"regions\":[]},{\"code\":\"NU\",\"name\":\"Niue\",\"regions\":[]},{\"code\":\"NZ\",\"name\":\"New Zealand\",\"regions\":[]},{\"code\":\"PF\",\"name\":\"French Polynesia\",\"regions\":[]},{\"code\":\"PG\",\"name\":\"Papua New Guinea\",\"regions\":[]},{\"code\":\"PN\",\"name\":\"Pitcairn Islands\",\"regions\":[]},{\"code\":\"PW\",\"name\":\"Palau\",\"regions\":[]},{\"code\":\"SB\",\"name\":\"Solomon Islands\",\"regions\":[]},{\"code\":\"TK\",\"name\":\"Tokelau\",\"regions\":[]},{\"code\":\"TO\",\"name\":\"Tonga\",\"regions\":[]},{\"code\":\"TV\",\"name\":\"Tuvalu\",\"regions\":[]},{\"code\":\"VU\",\"name\":\"Vanuatu\",\"regions\":[]},{\"code\":\"WF\",\"name\":\"Wallis and Futuna\",\"regions\":[]},{\"code\":\"WS\",\"name\":\"Samoa\",\"regions\":[]}]}]}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/tmergtest72756?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c0c60e8-d18c-424a-a8ed-98d5722c4e0d", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 04:36:24 GMT", + "x-ms-correlation-request-id" : "a5beab15-3126-4dcd-8464-46a002dc90a1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043625Z:a5beab15-3126-4dcd-8464-46a002dc90a1", + "Expires" : "-1", + "Content-Length" : "225", + "x-ms-request-id" : "a5beab15-3126-4dcd-8464-46a002dc90a1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest72756\",\"name\":\"tmergtest72756\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest72756/providers/Microsoft.Network/trafficmanagerprofiles/tmpr60541024?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2a858f3-1ac7-4841-b445-3ee5c8928df9", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 04:36:31 GMT", + "x-ms-correlation-request-id" : "57bbf334-06d2-45a4-b6a3-e5e345504201", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043632Z:57bbf334-06d2-45a4-b6a3-e5e345504201", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "662", + "x-ms-request-id" : "d2a858f3-1ac7-4841-b445-3ee5c8928df9", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\",\"name\":\"tmpr60541024\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Geographic\",\"dnsConfig\":{\"relativeName\":\"tmdns3195000\",\"fqdn\":\"tmdns3195000.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest72756/providers/Microsoft.Network/trafficmanagerprofiles/tmpr60541024/externalEndpoints/external-ep-1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e50170a2-3160-4fe8-84e6-06346b90797f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 04:36:32 GMT", + "x-ms-correlation-request-id" : "cbe474a0-3b8c-445b-af7c-4e66a526ba51", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043633Z:cbe474a0-3b8c-445b-af7c-4e66a526ba51", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "505", + "x-ms-request-id" : "e50170a2-3160-4fe8-84e6-06346b90797f", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"geoMapping\":[\"US-CA\",\"BD\"],\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest72756/providers/Microsoft.Network/trafficmanagerprofiles/tmpr60541024?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "156d97c5-5787-4a5a-b1ff-c9489624cc9f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:32 GMT", + "x-ms-correlation-request-id" : "3f640c64-f51d-47ee-9a34-5273afd05adf", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043633Z:3f640c64-f51d-47ee-9a34-5273afd05adf", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1176", + "x-ms-request-id" : "156d97c5-5787-4a5a-b1ff-c9489624cc9f", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\",\"name\":\"tmpr60541024\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Geographic\",\"dnsConfig\":{\"relativeName\":\"tmdns3195000\",\"fqdn\":\"tmdns3195000.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"geoMapping\":[\"US-CA\",\"BD\"],\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest72756/providers/Microsoft.Network/trafficmanagerprofiles/tmpr60541024/externalEndpoints/external-ep-1?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4acfb0bb-e689-40f1-abe2-80dc1e424346", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Tue, 01 Sep 2020 04:36:33 GMT", + "x-ms-correlation-request-id" : "26b34add-d655-4d86-a09a-afc046544ff1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043634Z:26b34add-d655-4d86-a09a-afc046544ff1", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "497", + "x-ms-request-id" : "4acfb0bb-e689-40f1-abe2-80dc1e424346", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"geoMapping\":[\"BD\"],\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest72756/providers/Microsoft.Network/trafficmanagerprofiles/tmpr60541024?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "21dd7c8d-978c-477a-a505-fc130544be89", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:37 GMT", + "x-ms-correlation-request-id" : "104db4c6-658b-4562-aac0-c9f5949488b4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10796", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043637Z:104db4c6-658b-4562-aac0-c9f5949488b4", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1168", + "x-ms-request-id" : "21dd7c8d-978c-477a-a505-fc130544be89", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\",\"name\":\"tmpr60541024\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Geographic\",\"dnsConfig\":{\"relativeName\":\"tmdns3195000\",\"fqdn\":\"tmdns3195000.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"geoMapping\":[\"BD\"],\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tmergtest72756/providers/Microsoft.Network/trafficmanagerprofiles/tmpr60541024?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "07220151-76e6-45ad-8540-fdc652ece03e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:37 GMT", + "x-ms-correlation-request-id" : "e0ea81fb-8030-4ff7-99c6-58205d9e9314", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10797", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043638Z:e0ea81fb-8030-4ff7-99c6-58205d9e9314", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1168", + "x-ms-request-id" : "07220151-76e6-45ad-8540-fdc652ece03e", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\",\"name\":\"tmpr60541024\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Geographic\",\"dnsConfig\":{\"relativeName\":\"tmdns3195000\",\"fqdn\":\"tmdns3195000.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/tmergtest72756\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tmpr60541024\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East Asia\",\"geoMapping\":[\"BD\"],\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/tmergtest72756?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "664466c2-edef-460c-946d-bacc63c1ed08", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Tue, 01 Sep 2020 04:36:39 GMT", + "x-ms-correlation-request-id" : "5d5f376d-cb77-4bf7-a3f5-dd8d5751b81a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043640Z:5d5f376d-cb77-4bf7-a3f5-dd8d5751b81a", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "5d5f376d-cb77-4bf7-a3f5-dd8d5751b81a", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1UTUVSR1RFU1Q3Mjc1Ni1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null + } ], + "variables" : [ "tmergtest72756", "tmpr60541024", "tmdns3195000" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canGetGeographicHierarchy.json b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canGetGeographicHierarchy.json new file mode 100644 index 0000000000000..689cbf093ac7c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/session-records/canGetGeographicHierarchy.json @@ -0,0 +1,31 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "http://localhost:1234/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3e2014e-9827-4aa0-9b6a-2e4b23ab19bf", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:36:21 GMT", + "x-ms-correlation-request-id" : "80be8f9d-14fd-4b81-8a3d-e92908be751e", + "x-ms-ratelimit-remaining-tenant-reads" : "11998", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T043621Z:80be8f9d-14fd-4b81-8a3d-e92908be751e", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "16124", + "x-ms-request-id" : "a3e2014e-9827-4aa0-9b6a-2e4b23ab19bf", + "Body" : "{\"id\":\"\\/providers\\/Microsoft.Network\\/trafficManagerGeographicHierarchies\\/default\",\"name\":\"default\",\"type\":\"Microsoft.Network\\/trafficManagerGeographicHierarchies\",\"properties\":{\"geographicHierarchy\":{\"code\":\"WORLD\",\"name\":\"World\",\"regions\":[{\"code\":\"GEO-EU\",\"name\":\"Europe\",\"regions\":[{\"code\":\"AD\",\"name\":\"Andorra\",\"regions\":[]},{\"code\":\"AL\",\"name\":\"Albania\",\"regions\":[]},{\"code\":\"AT\",\"name\":\"Austria\",\"regions\":[]},{\"code\":\"AX\",\"name\":\"Åland Islands\",\"regions\":[]},{\"code\":\"BA\",\"name\":\"Bosnia and Herzegovina\",\"regions\":[]},{\"code\":\"BE\",\"name\":\"Belgium\",\"regions\":[]},{\"code\":\"BG\",\"name\":\"Bulgaria\",\"regions\":[]},{\"code\":\"BY\",\"name\":\"Belarus\",\"regions\":[]},{\"code\":\"CH\",\"name\":\"Switzerland\",\"regions\":[]},{\"code\":\"CY\",\"name\":\"Cyprus\",\"regions\":[]},{\"code\":\"CZ\",\"name\":\"Czech Republic\",\"regions\":[]},{\"code\":\"DE\",\"name\":\"Germany\",\"regions\":[]},{\"code\":\"DK\",\"name\":\"Denmark\",\"regions\":[]},{\"code\":\"EE\",\"name\":\"Estonia\",\"regions\":[]},{\"code\":\"ES\",\"name\":\"Spain\",\"regions\":[]},{\"code\":\"FI\",\"name\":\"Finland\",\"regions\":[]},{\"code\":\"FO\",\"name\":\"Faroe Islands\",\"regions\":[]},{\"code\":\"FR\",\"name\":\"France\",\"regions\":[]},{\"code\":\"GB\",\"name\":\"United Kingdom\",\"regions\":[]},{\"code\":\"GG\",\"name\":\"Guernsey\",\"regions\":[]},{\"code\":\"GI\",\"name\":\"Gibraltar\",\"regions\":[]},{\"code\":\"GR\",\"name\":\"Greece\",\"regions\":[]},{\"code\":\"HR\",\"name\":\"Croatia\",\"regions\":[]},{\"code\":\"HU\",\"name\":\"Hungary\",\"regions\":[]},{\"code\":\"IE\",\"name\":\"Ireland\",\"regions\":[]},{\"code\":\"IM\",\"name\":\"Isle of Man\",\"regions\":[]},{\"code\":\"IS\",\"name\":\"Iceland\",\"regions\":[]},{\"code\":\"IT\",\"name\":\"Italy\",\"regions\":[]},{\"code\":\"JE\",\"name\":\"Jersey\",\"regions\":[]},{\"code\":\"LI\",\"name\":\"Liechtenstein\",\"regions\":[]},{\"code\":\"LT\",\"name\":\"Lithuania\",\"regions\":[]},{\"code\":\"LU\",\"name\":\"Luxembourg\",\"regions\":[]},{\"code\":\"LV\",\"name\":\"Latvia\",\"regions\":[]},{\"code\":\"MC\",\"name\":\"Monaco\",\"regions\":[]},{\"code\":\"MD\",\"name\":\"Moldova\",\"regions\":[]},{\"code\":\"ME\",\"name\":\"Montenegro\",\"regions\":[]},{\"code\":\"MK\",\"name\":\"North Macedonia\",\"regions\":[]},{\"code\":\"MT\",\"name\":\"Malta\",\"regions\":[]},{\"code\":\"NL\",\"name\":\"Netherlands\",\"regions\":[]},{\"code\":\"NO\",\"name\":\"Norway\",\"regions\":[]},{\"code\":\"PL\",\"name\":\"Poland\",\"regions\":[]},{\"code\":\"PT\",\"name\":\"Portugal\",\"regions\":[]},{\"code\":\"RO\",\"name\":\"Romania\",\"regions\":[]},{\"code\":\"RS\",\"name\":\"Serbia\",\"regions\":[]},{\"code\":\"RU\",\"name\":\"Russia\",\"regions\":[]},{\"code\":\"SE\",\"name\":\"Sweden\",\"regions\":[]},{\"code\":\"SI\",\"name\":\"Slovenia\",\"regions\":[]},{\"code\":\"SJ\",\"name\":\"Svalbard\",\"regions\":[]},{\"code\":\"SK\",\"name\":\"Slovakia\",\"regions\":[]},{\"code\":\"SM\",\"name\":\"San Marino\",\"regions\":[]},{\"code\":\"UA\",\"name\":\"Ukraine\",\"regions\":[{\"code\":\"UA-CR\",\"name\":\"Region of Crimea\",\"regions\":[]}]},{\"code\":\"VA\",\"name\":\"Vatican City\",\"regions\":[]},{\"code\":\"XJ\",\"name\":\"Jan Mayen\",\"regions\":[]},{\"code\":\"XK\",\"name\":\"Kosovo\",\"regions\":[]}]},{\"code\":\"GEO-ME\",\"name\":\"Middle East\",\"regions\":[{\"code\":\"AE\",\"name\":\"United Arab Emirates\",\"regions\":[]},{\"code\":\"BH\",\"name\":\"Bahrain\",\"regions\":[]},{\"code\":\"IL\",\"name\":\"Israel\",\"regions\":[]},{\"code\":\"IQ\",\"name\":\"Iraq\",\"regions\":[]},{\"code\":\"IR\",\"name\":\"Iran\",\"regions\":[]},{\"code\":\"JO\",\"name\":\"Jordan\",\"regions\":[]},{\"code\":\"KW\",\"name\":\"Kuwait\",\"regions\":[]},{\"code\":\"LB\",\"name\":\"Lebanon\",\"regions\":[]},{\"code\":\"OM\",\"name\":\"Oman\",\"regions\":[]},{\"code\":\"PS\",\"name\":\"Palestinian Authority\",\"regions\":[]},{\"code\":\"QA\",\"name\":\"Qatar\",\"regions\":[]},{\"code\":\"SY\",\"name\":\"Syria\",\"regions\":[]},{\"code\":\"SA\",\"name\":\"Saudi Arabia\",\"regions\":[]},{\"code\":\"TR\",\"name\":\"Turkey\",\"regions\":[]},{\"code\":\"YE\",\"name\":\"Yemen\",\"regions\":[]}]},{\"code\":\"GEO-NA\",\"name\":\"North America \\/ Central America \\/ Caribbean\",\"regions\":[{\"code\":\"AG\",\"name\":\"Antigua and Barbuda\",\"regions\":[]},{\"code\":\"AI\",\"name\":\"Anguilla\",\"regions\":[]},{\"code\":\"AW\",\"name\":\"Aruba\",\"regions\":[]},{\"code\":\"BB\",\"name\":\"Barbados\",\"regions\":[]},{\"code\":\"BL\",\"name\":\"Saint Barthélemy\",\"regions\":[]},{\"code\":\"BM\",\"name\":\"Bermuda\",\"regions\":[]},{\"code\":\"BQ\",\"name\":\"Bonaire\",\"regions\":[]},{\"code\":\"BS\",\"name\":\"Bahamas\",\"regions\":[]},{\"code\":\"BZ\",\"name\":\"Belize\",\"regions\":[]},{\"code\":\"CA\",\"name\":\"Canada\",\"regions\":[{\"code\":\"CA-AB\",\"name\":\"Alberta\",\"regions\":[]},{\"code\":\"CA-BC\",\"name\":\"British Columbia\",\"regions\":[]},{\"code\":\"CA-MB\",\"name\":\"Manitoba\",\"regions\":[]},{\"code\":\"CA-NB\",\"name\":\"New Brunswick\",\"regions\":[]},{\"code\":\"CA-NL\",\"name\":\"Newfoundland and Labrador\",\"regions\":[]},{\"code\":\"CA-NS\",\"name\":\"Nova Scotia\",\"regions\":[]},{\"code\":\"CA-NT\",\"name\":\"Northwest Territories\",\"regions\":[]},{\"code\":\"CA-NU\",\"name\":\"Nunavut\",\"regions\":[]},{\"code\":\"CA-ON\",\"name\":\"Ontario\",\"regions\":[]},{\"code\":\"CA-PE\",\"name\":\"Prince Edward Island\",\"regions\":[]},{\"code\":\"CA-QC\",\"name\":\"Québec\",\"regions\":[]},{\"code\":\"CA-SK\",\"name\":\"Saskatchewan\",\"regions\":[]},{\"code\":\"CA-YT\",\"name\":\"Yukon Territory\",\"regions\":[]}]},{\"code\":\"CR\",\"name\":\"Costa Rica\",\"regions\":[]},{\"code\":\"CU\",\"name\":\"Cuba\",\"regions\":[]},{\"code\":\"CW\",\"name\":\"Curaçao\",\"regions\":[]},{\"code\":\"DM\",\"name\":\"Dominica\",\"regions\":[]},{\"code\":\"DO\",\"name\":\"Dominican Republic\",\"regions\":[]},{\"code\":\"GD\",\"name\":\"Grenada\",\"regions\":[]},{\"code\":\"GL\",\"name\":\"Greenland\",\"regions\":[]},{\"code\":\"GP\",\"name\":\"Guadeloupe\",\"regions\":[]},{\"code\":\"GT\",\"name\":\"Guatemala\",\"regions\":[]},{\"code\":\"HN\",\"name\":\"Honduras\",\"regions\":[]},{\"code\":\"HT\",\"name\":\"Haiti\",\"regions\":[]},{\"code\":\"JM\",\"name\":\"Jamaica\",\"regions\":[]},{\"code\":\"KN\",\"name\":\"Saint Kitts and Nevis\",\"regions\":[]},{\"code\":\"KY\",\"name\":\"Cayman Islands\",\"regions\":[]},{\"code\":\"LC\",\"name\":\"Saint Lucia\",\"regions\":[]},{\"code\":\"MF\",\"name\":\"Saint Martin\",\"regions\":[]},{\"code\":\"MQ\",\"name\":\"Martinique\",\"regions\":[]},{\"code\":\"MS\",\"name\":\"Montserrat\",\"regions\":[]},{\"code\":\"MX\",\"name\":\"Mexico\",\"regions\":[]},{\"code\":\"NI\",\"name\":\"Nicaragua\",\"regions\":[]},{\"code\":\"PA\",\"name\":\"Panama\",\"regions\":[]},{\"code\":\"PM\",\"name\":\"Saint Pierre and Miquelon\",\"regions\":[]},{\"code\":\"PR\",\"name\":\"Puerto Rico\",\"regions\":[]},{\"code\":\"SV\",\"name\":\"El Salvador\",\"regions\":[]},{\"code\":\"SX\",\"name\":\"Sint Maarten\",\"regions\":[]},{\"code\":\"TC\",\"name\":\"Turks and Caicos Islands\",\"regions\":[]},{\"code\":\"TT\",\"name\":\"Trinidad and Tobago\",\"regions\":[]},{\"code\":\"UM\",\"name\":\"U.S. Outlying Islands\",\"regions\":[]},{\"code\":\"US\",\"name\":\"United States\",\"regions\":[{\"code\":\"US-AK\",\"name\":\"Alaska\",\"regions\":[]},{\"code\":\"US-AL\",\"name\":\"Alabama\",\"regions\":[]},{\"code\":\"US-AR\",\"name\":\"Arkansas\",\"regions\":[]},{\"code\":\"US-AZ\",\"name\":\"Arizona\",\"regions\":[]},{\"code\":\"US-CA\",\"name\":\"California\",\"regions\":[]},{\"code\":\"US-CO\",\"name\":\"Colorado\",\"regions\":[]},{\"code\":\"US-CT\",\"name\":\"Connecticut\",\"regions\":[]},{\"code\":\"US-DC\",\"name\":\"District of Columbia\",\"regions\":[]},{\"code\":\"US-DE\",\"name\":\"Delaware\",\"regions\":[]},{\"code\":\"US-FL\",\"name\":\"Florida\",\"regions\":[]},{\"code\":\"US-GA\",\"name\":\"Georgia\",\"regions\":[]},{\"code\":\"US-HI\",\"name\":\"Hawaii\",\"regions\":[]},{\"code\":\"US-IA\",\"name\":\"Iowa\",\"regions\":[]},{\"code\":\"US-ID\",\"name\":\"Idaho\",\"regions\":[]},{\"code\":\"US-IL\",\"name\":\"Illinois\",\"regions\":[]},{\"code\":\"US-IN\",\"name\":\"Indiana\",\"regions\":[]},{\"code\":\"US-KS\",\"name\":\"Kansas\",\"regions\":[]},{\"code\":\"US-KY\",\"name\":\"Kentucky\",\"regions\":[]},{\"code\":\"US-LA\",\"name\":\"Louisiana\",\"regions\":[]},{\"code\":\"US-MA\",\"name\":\"Massachusetts\",\"regions\":[]},{\"code\":\"US-MD\",\"name\":\"Maryland\",\"regions\":[]},{\"code\":\"US-ME\",\"name\":\"Maine\",\"regions\":[]},{\"code\":\"US-MI\",\"name\":\"Michigan\",\"regions\":[]},{\"code\":\"US-MN\",\"name\":\"Minnesota\",\"regions\":[]},{\"code\":\"US-MO\",\"name\":\"Missouri\",\"regions\":[]},{\"code\":\"US-MS\",\"name\":\"Mississippi\",\"regions\":[]},{\"code\":\"US-MT\",\"name\":\"Montana\",\"regions\":[]},{\"code\":\"US-NC\",\"name\":\"North Carolina\",\"regions\":[]},{\"code\":\"US-ND\",\"name\":\"North Dakota\",\"regions\":[]},{\"code\":\"US-NE\",\"name\":\"Nebraska\",\"regions\":[]},{\"code\":\"US-NH\",\"name\":\"New Hampshire\",\"regions\":[]},{\"code\":\"US-NJ\",\"name\":\"New Jersey\",\"regions\":[]},{\"code\":\"US-NM\",\"name\":\"New Mexico\",\"regions\":[]},{\"code\":\"US-NV\",\"name\":\"Nevada\",\"regions\":[]},{\"code\":\"US-NY\",\"name\":\"New York\",\"regions\":[]},{\"code\":\"US-OH\",\"name\":\"Ohio\",\"regions\":[]},{\"code\":\"US-OK\",\"name\":\"Oklahoma\",\"regions\":[]},{\"code\":\"US-OR\",\"name\":\"Oregon\",\"regions\":[]},{\"code\":\"US-PA\",\"name\":\"Pennsylvania\",\"regions\":[]},{\"code\":\"US-RI\",\"name\":\"Rhode Island\",\"regions\":[]},{\"code\":\"US-SC\",\"name\":\"South Carolina\",\"regions\":[]},{\"code\":\"US-SD\",\"name\":\"South Dakota\",\"regions\":[]},{\"code\":\"US-TN\",\"name\":\"Tennessee\",\"regions\":[]},{\"code\":\"US-TX\",\"name\":\"Texas\",\"regions\":[]},{\"code\":\"US-UT\",\"name\":\"Utah\",\"regions\":[]},{\"code\":\"US-VA\",\"name\":\"Virginia\",\"regions\":[]},{\"code\":\"US-VT\",\"name\":\"Vermont\",\"regions\":[]},{\"code\":\"US-WA\",\"name\":\"Washington\",\"regions\":[]},{\"code\":\"US-WI\",\"name\":\"Wisconsin\",\"regions\":[]},{\"code\":\"US-WV\",\"name\":\"West Virginia\",\"regions\":[]},{\"code\":\"US-WY\",\"name\":\"Wyoming\",\"regions\":[]}]},{\"code\":\"VC\",\"name\":\"Saint Vincent and the Grenadines\",\"regions\":[]},{\"code\":\"VG\",\"name\":\"British Virgin Islands\",\"regions\":[]},{\"code\":\"VI\",\"name\":\"U.S. Virgin Islands\",\"regions\":[]},{\"code\":\"XE\",\"name\":\"Sint Eustatius\",\"regions\":[]},{\"code\":\"XS\",\"name\":\"Saba\",\"regions\":[]}]},{\"code\":\"GEO-AS\",\"name\":\"Asia\",\"regions\":[{\"code\":\"AF\",\"name\":\"Afghanistan\",\"regions\":[]},{\"code\":\"AM\",\"name\":\"Armenia\",\"regions\":[]},{\"code\":\"AZ\",\"name\":\"Azerbaijan\",\"regions\":[]},{\"code\":\"BD\",\"name\":\"Bangladesh\",\"regions\":[]},{\"code\":\"BN\",\"name\":\"Brunei\",\"regions\":[]},{\"code\":\"BT\",\"name\":\"Bhutan\",\"regions\":[]},{\"code\":\"CC\",\"name\":\"Cocos (Keeling) Islands\",\"regions\":[]},{\"code\":\"CN\",\"name\":\"China\",\"regions\":[]},{\"code\":\"CX\",\"name\":\"Christmas Island\",\"regions\":[]},{\"code\":\"GE\",\"name\":\"Georgia\",\"regions\":[]},{\"code\":\"HK\",\"name\":\"Hong Kong SAR\",\"regions\":[]},{\"code\":\"ID\",\"name\":\"Indonesia\",\"regions\":[]},{\"code\":\"IN\",\"name\":\"India\",\"regions\":[]},{\"code\":\"IO\",\"name\":\"British Indian Ocean Territory\",\"regions\":[]},{\"code\":\"JP\",\"name\":\"Japan\",\"regions\":[]},{\"code\":\"KG\",\"name\":\"Kyrgyzstan\",\"regions\":[]},{\"code\":\"KH\",\"name\":\"Cambodia\",\"regions\":[]},{\"code\":\"KP\",\"name\":\"North Korea\",\"regions\":[]},{\"code\":\"KR\",\"name\":\"Korea\",\"regions\":[]},{\"code\":\"KZ\",\"name\":\"Kazakhstan\",\"regions\":[]},{\"code\":\"LA\",\"name\":\"Laos\",\"regions\":[]},{\"code\":\"LK\",\"name\":\"Sri Lanka\",\"regions\":[]},{\"code\":\"MM\",\"name\":\"Myanmar\",\"regions\":[]},{\"code\":\"MN\",\"name\":\"Mongolia\",\"regions\":[]},{\"code\":\"MO\",\"name\":\"Macao SAR\",\"regions\":[]},{\"code\":\"MV\",\"name\":\"Maldives\",\"regions\":[]},{\"code\":\"MY\",\"name\":\"Malaysia\",\"regions\":[]},{\"code\":\"NP\",\"name\":\"Nepal\",\"regions\":[]},{\"code\":\"PH\",\"name\":\"Philippines\",\"regions\":[]},{\"code\":\"PK\",\"name\":\"Pakistan\",\"regions\":[]},{\"code\":\"SG\",\"name\":\"Singapore\",\"regions\":[]},{\"code\":\"TH\",\"name\":\"Thailand\",\"regions\":[]},{\"code\":\"TJ\",\"name\":\"Tajikistan\",\"regions\":[]},{\"code\":\"TL\",\"name\":\"Timor_Leste\",\"regions\":[]},{\"code\":\"TM\",\"name\":\"Turkmenistan\",\"regions\":[]},{\"code\":\"TW\",\"name\":\"Taiwan\",\"regions\":[]},{\"code\":\"UZ\",\"name\":\"Uzbekistan\",\"regions\":[]},{\"code\":\"VN\",\"name\":\"Vietnam\",\"regions\":[]}]},{\"code\":\"GEO-AF\",\"name\":\"Africa\",\"regions\":[{\"code\":\"AO\",\"name\":\"Angola\",\"regions\":[]},{\"code\":\"BF\",\"name\":\"Burkina Faso\",\"regions\":[]},{\"code\":\"BI\",\"name\":\"Burundi\",\"regions\":[]},{\"code\":\"BJ\",\"name\":\"Benin\",\"regions\":[]},{\"code\":\"BV\",\"name\":\"Bouvet Island\",\"regions\":[]},{\"code\":\"BW\",\"name\":\"Botswana\",\"regions\":[]},{\"code\":\"CD\",\"name\":\"Congo (DRC)\",\"regions\":[]},{\"code\":\"CF\",\"name\":\"Central African Republic\",\"regions\":[]},{\"code\":\"CG\",\"name\":\"Congo\",\"regions\":[]},{\"code\":\"CI\",\"name\":\"Côte d’Ivoire\",\"regions\":[]},{\"code\":\"CM\",\"name\":\"Cameroon\",\"regions\":[]},{\"code\":\"CV\",\"name\":\"Cabo Verde\",\"regions\":[]},{\"code\":\"DJ\",\"name\":\"Djibouti\",\"regions\":[]},{\"code\":\"DZ\",\"name\":\"Algeria\",\"regions\":[]},{\"code\":\"EG\",\"name\":\"Egypt\",\"regions\":[]},{\"code\":\"ER\",\"name\":\"Eritrea\",\"regions\":[]},{\"code\":\"ET\",\"name\":\"Ethiopia\",\"regions\":[]},{\"code\":\"GA\",\"name\":\"Gabon\",\"regions\":[]},{\"code\":\"GH\",\"name\":\"Ghana\",\"regions\":[]},{\"code\":\"GM\",\"name\":\"Gambia\",\"regions\":[]},{\"code\":\"GN\",\"name\":\"Guinea\",\"regions\":[]},{\"code\":\"GQ\",\"name\":\"Equatorial Guinea\",\"regions\":[]},{\"code\":\"GW\",\"name\":\"Guinea_Bissau\",\"regions\":[]},{\"code\":\"KE\",\"name\":\"Kenya\",\"regions\":[]},{\"code\":\"KM\",\"name\":\"Comoros\",\"regions\":[]},{\"code\":\"LR\",\"name\":\"Liberia\",\"regions\":[]},{\"code\":\"LS\",\"name\":\"Lesotho\",\"regions\":[]},{\"code\":\"LY\",\"name\":\"Libya\",\"regions\":[]},{\"code\":\"MA\",\"name\":\"Morocco\",\"regions\":[]},{\"code\":\"MG\",\"name\":\"Madagascar\",\"regions\":[]},{\"code\":\"ML\",\"name\":\"Mali\",\"regions\":[]},{\"code\":\"MR\",\"name\":\"Mauritania\",\"regions\":[]},{\"code\":\"MU\",\"name\":\"Mauritius\",\"regions\":[]},{\"code\":\"MW\",\"name\":\"Malawi\",\"regions\":[]},{\"code\":\"MZ\",\"name\":\"Mozambique\",\"regions\":[]},{\"code\":\"NA\",\"name\":\"Namibia\",\"regions\":[]},{\"code\":\"NE\",\"name\":\"Niger\",\"regions\":[]},{\"code\":\"NG\",\"name\":\"Nigeria\",\"regions\":[]},{\"code\":\"RE\",\"name\":\"Réunion\",\"regions\":[]},{\"code\":\"RW\",\"name\":\"Rwanda\",\"regions\":[]},{\"code\":\"SC\",\"name\":\"Seychelles\",\"regions\":[]},{\"code\":\"SD\",\"name\":\"Sudan\",\"regions\":[]},{\"code\":\"SH\",\"name\":\"St Helena, Ascension, Tristan da Cunha\",\"regions\":[]},{\"code\":\"SL\",\"name\":\"Sierra Leone\",\"regions\":[]},{\"code\":\"SN\",\"name\":\"Senegal\",\"regions\":[]},{\"code\":\"SO\",\"name\":\"Somalia\",\"regions\":[]},{\"code\":\"SS\",\"name\":\"South Sudan\",\"regions\":[]},{\"code\":\"ST\",\"name\":\"São Tomé and Príncipe\",\"regions\":[]},{\"code\":\"SZ\",\"name\":\"Swaziland\",\"regions\":[]},{\"code\":\"TD\",\"name\":\"Chad\",\"regions\":[]},{\"code\":\"TF\",\"name\":\"French Southern Territories\",\"regions\":[]},{\"code\":\"TG\",\"name\":\"Togo\",\"regions\":[]},{\"code\":\"TN\",\"name\":\"Tunisia\",\"regions\":[]},{\"code\":\"TZ\",\"name\":\"Tanzania\",\"regions\":[]},{\"code\":\"UG\",\"name\":\"Uganda\",\"regions\":[]},{\"code\":\"YT\",\"name\":\"Mayotte\",\"regions\":[]},{\"code\":\"ZA\",\"name\":\"South Africa\",\"regions\":[]},{\"code\":\"ZM\",\"name\":\"Zambia\",\"regions\":[]},{\"code\":\"ZW\",\"name\":\"Zimbabwe\",\"regions\":[]}]},{\"code\":\"GEO-AN\",\"name\":\"Antarctica\",\"regions\":[{\"code\":\"AQ\",\"name\":\"Antarctica\",\"regions\":[]}]},{\"code\":\"GEO-SA\",\"name\":\"South America\",\"regions\":[{\"code\":\"AR\",\"name\":\"Argentina\",\"regions\":[]},{\"code\":\"BO\",\"name\":\"Bolivia\",\"regions\":[]},{\"code\":\"BR\",\"name\":\"Brazil\",\"regions\":[]},{\"code\":\"CL\",\"name\":\"Chile\",\"regions\":[]},{\"code\":\"CO\",\"name\":\"Colombia\",\"regions\":[]},{\"code\":\"EC\",\"name\":\"Ecuador\",\"regions\":[]},{\"code\":\"FK\",\"name\":\"Falkland Islands\",\"regions\":[]},{\"code\":\"GF\",\"name\":\"French Guiana\",\"regions\":[]},{\"code\":\"GS\",\"name\":\"South Georgia and South Sandwich Islands\",\"regions\":[]},{\"code\":\"GY\",\"name\":\"Guyana\",\"regions\":[]},{\"code\":\"PE\",\"name\":\"Peru\",\"regions\":[]},{\"code\":\"PY\",\"name\":\"Paraguay\",\"regions\":[]},{\"code\":\"SR\",\"name\":\"Suriname\",\"regions\":[]},{\"code\":\"UY\",\"name\":\"Uruguay\",\"regions\":[]},{\"code\":\"VE\",\"name\":\"Venezuela\",\"regions\":[]}]},{\"code\":\"GEO-AP\",\"name\":\"Australia \\/ Pacific\",\"regions\":[{\"code\":\"AS\",\"name\":\"American Samoa\",\"regions\":[]},{\"code\":\"AU\",\"name\":\"Australia\",\"regions\":[{\"code\":\"AU-ACT\",\"name\":\"Australian Capital Territory\",\"regions\":[]},{\"code\":\"AU-NSW\",\"name\":\"New South Wales\",\"regions\":[]},{\"code\":\"AU-NT\",\"name\":\"Northern Territory\",\"regions\":[]},{\"code\":\"AU-QLD\",\"name\":\"Queensland\",\"regions\":[]},{\"code\":\"AU-SA\",\"name\":\"South Australia\",\"regions\":[]},{\"code\":\"AU-TAS\",\"name\":\"Tasmania\",\"regions\":[]},{\"code\":\"AU-VIC\",\"name\":\"Victoria\",\"regions\":[]},{\"code\":\"AU-WA\",\"name\":\"Western Australia\",\"regions\":[]}]},{\"code\":\"CK\",\"name\":\"Cook Islands\",\"regions\":[]},{\"code\":\"FJ\",\"name\":\"Fiji\",\"regions\":[]},{\"code\":\"FM\",\"name\":\"Micronesia\",\"regions\":[]},{\"code\":\"GU\",\"name\":\"Guam\",\"regions\":[]},{\"code\":\"HM\",\"name\":\"Heard Island and McDonald Islands\",\"regions\":[]},{\"code\":\"KI\",\"name\":\"Kiribati\",\"regions\":[]},{\"code\":\"MH\",\"name\":\"Marshall Islands\",\"regions\":[]},{\"code\":\"MP\",\"name\":\"Northern Mariana Islands\",\"regions\":[]},{\"code\":\"NC\",\"name\":\"New Caledonia\",\"regions\":[]},{\"code\":\"NF\",\"name\":\"Norfolk Island\",\"regions\":[]},{\"code\":\"NR\",\"name\":\"Nauru\",\"regions\":[]},{\"code\":\"NU\",\"name\":\"Niue\",\"regions\":[]},{\"code\":\"NZ\",\"name\":\"New Zealand\",\"regions\":[]},{\"code\":\"PF\",\"name\":\"French Polynesia\",\"regions\":[]},{\"code\":\"PG\",\"name\":\"Papua New Guinea\",\"regions\":[]},{\"code\":\"PN\",\"name\":\"Pitcairn Islands\",\"regions\":[]},{\"code\":\"PW\",\"name\":\"Palau\",\"regions\":[]},{\"code\":\"SB\",\"name\":\"Solomon Islands\",\"regions\":[]},{\"code\":\"TK\",\"name\":\"Tokelau\",\"regions\":[]},{\"code\":\"TO\",\"name\":\"Tonga\",\"regions\":[]},{\"code\":\"TV\",\"name\":\"Tuvalu\",\"regions\":[]},{\"code\":\"VU\",\"name\":\"Vanuatu\",\"regions\":[]},{\"code\":\"WF\",\"name\":\"Wallis and Futuna\",\"regions\":[]},{\"code\":\"WS\",\"name\":\"Samoa\",\"regions\":[]}]}]}}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 5f21fe6392f15..1685593ce4f4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -145,6 +145,11 @@ azure-resourcemanager-eventhubs 2.0.0-beta.4 + + com.azure.resourcemanager + azure-resourcemanager-trafficmanager + 2.0.0-beta.4 + org.junit.jupiter junit-jupiter-engine diff --git a/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java index 76bbddd163d8e..d780045f40cfa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java @@ -110,6 +110,8 @@ import com.azure.resourcemanager.storage.models.StorageAccounts; import com.azure.resourcemanager.storage.models.StorageSkus; import com.azure.resourcemanager.storage.models.Usages; +import com.azure.resourcemanager.trafficmanager.TrafficManager; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfiles; import java.util.Objects; @@ -121,7 +123,7 @@ public final class Azure { private final NetworkManager networkManager; private final KeyVaultManager keyVaultManager; // private final BatchManager batchManager; - // private final TrafficManager trafficManager; + private final TrafficManager trafficManager; private final RedisManager redisManager; // private final CdnManager cdnManager; private final DnsZoneManager dnsZoneManager; @@ -370,7 +372,7 @@ private Azure(HttpPipeline httpPipeline, AzureProfile profile, Authenticated aut this.networkManager = NetworkManager.authenticate(httpPipeline, profile, sdkContext); this.keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile, sdkContext); // this.batchManager = BatchManager.authenticate(restClient, subscriptionId, sdkContext); - // this.trafficManager = TrafficManager.authenticate(restClient, subscriptionId, sdkContext); + this.trafficManager = TrafficManager.authenticate(httpPipeline, profile, sdkContext); this.redisManager = RedisManager.authenticate(httpPipeline, profile, sdkContext); // this.cdnManager = CdnManager.authenticate(restClient, subscriptionId, sdkContext); this.dnsZoneManager = DnsZoneManager.authenticate(httpPipeline, profile, sdkContext); @@ -622,12 +624,12 @@ public Vaults vaults() { // return batchManager.batchAccounts(); // } - // /** - // * @return entry point to managing traffic manager profiles. - // */ - // public TrafficManagerProfiles trafficManagerProfiles() { - // return trafficManager.profiles(); - // } + /** + * @return entry point to managing traffic manager profiles. + */ + public TrafficManagerProfiles trafficManagerProfiles() { + return trafficManager.profiles(); + } /** @return entry point to managing Redis Caches. */ public RedisCaches redisCaches() { diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java index 3fd0f2dcd198a..c42bdf8fc9cf1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java @@ -1096,11 +1096,11 @@ public void createStorageAccount() throws Exception { // new TestBatch().runTest(azure.batchAccounts(), azure.resourceGroups()); // } - // @Test - // public void testTrafficManager() throws Exception { - // new TestTrafficManager(azure.publicIPAddresses()) - // .runTest(azure.trafficManagerProfiles(), azure.resourceGroups()); - // } + @Test + public void testTrafficManager() throws Exception { + new TestTrafficManager(azure.publicIpAddresses()) + .runTest(azure.trafficManagerProfiles(), azure.resourceGroups()); + } @Test public void testRedis() throws Exception { diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTrafficManager.java index 7910bbe2b4041..7250c86cec4c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTrafficManager.java @@ -1,362 +1,410 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// -// package com.azure.management; -// -// import com.microsoft.azure.management.network.PublicIPAddress; -// import com.microsoft.azure.management.network.PublicIPAddresses; -// import com.microsoft.azure.management.resources.ResourceGroup; -// import com.microsoft.azure.management.resources.fluentcore.arm.Region; -// import com.microsoft.azure.management.resources.fluentcore.utils.SdkContext; -// import com.microsoft.azure.management.trafficmanager.EndpointType; -// import com.microsoft.azure.management.trafficmanager.TargetAzureResourceType; -// import com.microsoft.azure.management.trafficmanager.TrafficManagerAzureEndpoint; -// import com.microsoft.azure.management.trafficmanager.TrafficManagerExternalEndpoint; -// import com.microsoft.azure.management.trafficmanager.TrafficManagerNestedProfileEndpoint; -// import com.microsoft.azure.management.trafficmanager.TrafficManagerProfile; -// import com.microsoft.azure.management.trafficmanager.TrafficManagerProfiles; -// import org.junit.Assert; -// -// import java.util.Map; -// -/// ** -// * Test of traffic manager management. -// */ -// public class TestTrafficManager extends TestTemplate { -// -// private final PublicIPAddresses publicIPAddresses; -// -// private final String externalEndpointName21 = "external-ep-1"; -// private final String externalEndpointName22 = "external-ep-2"; -// private final String externalEndpointName23 = "external-ep-3"; -// -// private final String externalFqdn21 = "www.azure.microsoft.com"; -// private final String externalFqdn22 = "www.bing.com"; -// private final String externalFqdn23 = "www.github.com"; -// -// private final String azureEndpointName = "azure-ep-1"; -// private final String nestedProfileEndpointName = "nested-profile-ep-1"; -// -// public TestTrafficManager(PublicIPAddresses publicIPAddresses) { -// this.publicIPAddresses = publicIPAddresses; -// } -// -// @Override -// public TrafficManagerProfile createResource(TrafficManagerProfiles profiles) throws Exception { -// final Region region = Region.US_EAST; -// final String groupName = "rg" + this.testId; -// -// final String pipName = "pip" + this.testId; -// final String pipDnsLabel = SdkContext.randomResourceName("contoso", 15); -// -// final String tmProfileName = "tm" + this.testId; -// final String nestedTmProfileName = "nested" + tmProfileName; -// -// final String tmProfileDnsLabel = SdkContext.randomResourceName("tmdns", 15); -// final String nestedTmProfileDnsLabel = "nested" + tmProfileDnsLabel; -// -// ResourceGroup.DefinitionStages.WithCreate rgCreatable = -// profiles.manager().resourceManager().resourceGroups().define(groupName) -// .withRegion(region); -// -// // Creates a TM profile that will be used as a nested profile endpoint in parent TM profile -// // -// TrafficManagerProfile nestedProfile = profiles.define(nestedTmProfileName) -// .withNewResourceGroup(rgCreatable) -// .withLeafDomainLabel(nestedTmProfileDnsLabel) -// .withPriorityBasedRouting() -// .defineExternalTargetEndpoint(externalEndpointName21) -// .toFqdn("www.gitbook.com") -// .fromRegion(Region.INDIA_CENTRAL) -// .attach() -// .withHttpsMonitoring() -// .withTimeToLive(500) -// .create(); -// -// Assert.assertTrue(nestedProfile.isEnabled()); -// Assert.assertNotNull(nestedProfile.monitorStatus()); -// Assert.assertEquals(nestedProfile.monitoringPort(), 443); -// Assert.assertEquals(nestedProfile.monitoringPath(), "/"); -// Assert.assertEquals(nestedProfile.azureEndpoints().size(), 0); -// Assert.assertEquals(nestedProfile.nestedProfileEndpoints().size(), 0); -// Assert.assertEquals(nestedProfile.externalEndpoints().size(), 1); -// Assert.assertEquals(nestedProfile.fqdn(), nestedTmProfileDnsLabel + ".trafficmanager.net"); -// Assert.assertEquals(nestedProfile.timeToLive(), 500); -// -// // Creates a public ip to be used as an Azure endpoint -// // -// PublicIPAddress publicIPAddress = this.publicIPAddresses.define(pipName) -// .withRegion(region) -// .withNewResourceGroup(rgCreatable) -// .withLeafDomainLabel(pipDnsLabel) -// .create(); -// -// Assert.assertNotNull(publicIPAddress.fqdn()); -// // Creates a TM profile -// // -// -// // bugfix -// TrafficManagerProfile updatedProfile = nestedProfile.update() -// .defineAzureTargetEndpoint(azureEndpointName) -// .toResourceId(publicIPAddress.id()) -// .withTrafficDisabled() -// .withRoutingPriority(11) -// .attach() -// .apply(); -// -// Assert.assertEquals(1, updatedProfile.azureEndpoints().size()); -// Assert.assertTrue(updatedProfile.azureEndpoints().containsKey(azureEndpointName)); -// Assert.assertEquals(1, updatedProfile.externalEndpoints().size()); -// Assert.assertTrue(updatedProfile.externalEndpoints().containsKey(externalEndpointName21)); -// -// TrafficManagerProfile updatedProfileFromGet = profiles.getById(updatedProfile.id()); -// -// Assert.assertEquals(1, updatedProfileFromGet.azureEndpoints().size()); -// Assert.assertTrue(updatedProfileFromGet.azureEndpoints().containsKey(azureEndpointName)); -// Assert.assertEquals(1, updatedProfileFromGet.externalEndpoints().size()); -// Assert.assertTrue(updatedProfileFromGet.externalEndpoints().containsKey(externalEndpointName21)); -// -// nestedProfile.update() -// .withoutEndpoint(azureEndpointName) -// .apply(); -// -// Assert.assertEquals(0, nestedProfile.azureEndpoints().size()); -// Assert.assertEquals(1, nestedProfile.externalEndpoints().size()); -// Assert.assertTrue(nestedProfile.externalEndpoints().containsKey(externalEndpointName21)); -// -// updatedProfileFromGet = profiles.getById(updatedProfile.id()); -// Assert.assertEquals(0, updatedProfileFromGet.azureEndpoints().size()); -// Assert.assertEquals(nestedProfile.azureEndpoints().size(), updatedProfileFromGet.azureEndpoints().size()); -// Assert.assertEquals(1, updatedProfileFromGet.externalEndpoints().size()); -// Assert.assertTrue(updatedProfileFromGet.externalEndpoints().containsKey(externalEndpointName21)); -// // end of bugfix -// -// TrafficManagerProfile profile = profiles.define(tmProfileName) -// .withNewResourceGroup(rgCreatable) -// .withLeafDomainLabel(tmProfileDnsLabel) -// .withWeightBasedRouting() -// .defineExternalTargetEndpoint(externalEndpointName21) -// .toFqdn(externalFqdn21) -// .fromRegion(Region.US_EAST) -// .withRoutingPriority(1) -// .withRoutingWeight(1) -// .attach() -// .defineExternalTargetEndpoint(externalEndpointName22) -// .toFqdn(externalFqdn22) -// .fromRegion(Region.US_EAST2) -// .withRoutingPriority(2) -// .withRoutingWeight(1) -// .withTrafficDisabled() -// .attach() -// .defineAzureTargetEndpoint(azureEndpointName) -// .toResourceId(publicIPAddress.id()) -// .withRoutingPriority(3) -// .attach() -// .defineNestedTargetEndpoint(nestedProfileEndpointName) -// .toProfile(nestedProfile) -// .fromRegion(Region.INDIA_CENTRAL) -// .withMinimumEndpointsToEnableTraffic(1) -// .withRoutingPriority(4) -// .attach() -// .withHttpMonitoring() -// .create(); -// -// Assert.assertTrue(profile.isEnabled()); -// Assert.assertNotNull(profile.monitorStatus()); -// Assert.assertEquals(profile.monitoringPort(), 80); -// Assert.assertEquals(profile.monitoringPath(), "/"); -// Assert.assertEquals(profile.azureEndpoints().size(), 1); -// Assert.assertEquals(profile.nestedProfileEndpoints().size(), 1); -// Assert.assertEquals(profile.externalEndpoints().size(), 2); -// Assert.assertEquals(profile.fqdn(), tmProfileDnsLabel + ".trafficmanager.net"); -// Assert.assertEquals(profile.timeToLive(), 300); // Default -// -// profile = profile.refresh(); -// Assert.assertEquals(profile.azureEndpoints().size(), 1); -// Assert.assertEquals(profile.nestedProfileEndpoints().size(), 1); -// Assert.assertEquals(profile.externalEndpoints().size(), 2); -// -// int c = 0; -// for (TrafficManagerExternalEndpoint endpoint : profile.externalEndpoints().values()) { -// Assert.assertEquals(endpoint.endpointType(), EndpointType.EXTERNAL); -// if (endpoint.name().equalsIgnoreCase(externalEndpointName21)) { -// Assert.assertEquals(endpoint.routingPriority(), 1); -// Assert.assertEquals(endpoint.fqdn(), externalFqdn21); -// Assert.assertNotNull(endpoint.monitorStatus()); -// Assert.assertEquals(endpoint.sourceTrafficLocation(), Region.US_EAST); -// c++; -// } else if (endpoint.name().equalsIgnoreCase(externalEndpointName22)) { -// Assert.assertEquals(endpoint.routingPriority(), 2); -// Assert.assertEquals(endpoint.fqdn(), externalFqdn22); -// Assert.assertNotNull(endpoint.monitorStatus()); -// Assert.assertEquals(endpoint.sourceTrafficLocation(), Region.US_EAST2); -// c++; -// } -// } -// Assert.assertEquals(c, 2); -// -// c = 0; -// for (TrafficManagerAzureEndpoint endpoint : profile.azureEndpoints().values()) { -// Assert.assertEquals(endpoint.endpointType(), EndpointType.AZURE); -// if (endpoint.name().equalsIgnoreCase(azureEndpointName)) { -// Assert.assertEquals(endpoint.routingPriority(), 3); -// Assert.assertNotNull(endpoint.monitorStatus()); -// Assert.assertEquals(endpoint.targetAzureResourceId(), publicIPAddress.id()); -// Assert.assertEquals(endpoint.targetResourceType(), TargetAzureResourceType.PUBLICIP); -// c++; -// } -// } -// Assert.assertEquals(c, 1); -// -// c = 0; -// for (TrafficManagerNestedProfileEndpoint endpoint : profile.nestedProfileEndpoints().values()) { -// Assert.assertEquals(endpoint.endpointType(), EndpointType.NESTED_PROFILE); -// if (endpoint.name().equalsIgnoreCase(nestedProfileEndpointName)) { -// Assert.assertEquals(endpoint.routingPriority(), 4); -// Assert.assertNotNull(endpoint.monitorStatus()); -// Assert.assertEquals(endpoint.minimumChildEndpointCount(), 1); -// Assert.assertEquals(endpoint.nestedProfileId(), nestedProfile.id()); -// Assert.assertEquals(endpoint.sourceTrafficLocation(), Region.INDIA_CENTRAL); -// c++; -// } -// } -// Assert.assertEquals(c, 1); -// return profile; -// } -// -// @Override -// public TrafficManagerProfile updateResource(TrafficManagerProfile profile) throws Exception { -// // Remove an endpoint, update two endpoints and add new one -// // -// profile.update() -// .withTimeToLive(600) -// .withHttpMonitoring(8080, "/") -// .withPerformanceBasedRouting() -// .withoutEndpoint(externalEndpointName21) -// .updateAzureTargetEndpoint(azureEndpointName) -// .withRoutingPriority(5) -// .withRoutingWeight(2) -// .parent() -// .updateNestedProfileTargetEndpoint(nestedProfileEndpointName) -// .withTrafficDisabled() -// .parent() -// .defineExternalTargetEndpoint(externalEndpointName23) -// .toFqdn(externalFqdn23) -// .fromRegion(Region.US_CENTRAL) -// .withRoutingPriority(6) -// .attach() -// .apply(); -// -// Assert.assertEquals(profile.monitoringPort(), 8080); -// Assert.assertEquals(profile.monitoringPath(), "/"); -// Assert.assertEquals(profile.azureEndpoints().size(), 1); -// Assert.assertEquals(profile.nestedProfileEndpoints().size(), 1); -// Assert.assertEquals(profile.externalEndpoints().size(), 2); -// Assert.assertEquals(profile.timeToLive(), 600); -// -// int c = 0; -// for (TrafficManagerExternalEndpoint endpoint : profile.externalEndpoints().values()) { -// Assert.assertEquals(endpoint.endpointType(), EndpointType.EXTERNAL); -// if (endpoint.name().equalsIgnoreCase(externalEndpointName22)) { -// Assert.assertEquals(endpoint.routingPriority(), 2); -// Assert.assertEquals(endpoint.fqdn(), externalFqdn22); -// Assert.assertEquals(endpoint.sourceTrafficLocation(), Region.US_EAST2); -// Assert.assertNotNull(endpoint.monitorStatus()); -// c++; -// } else if (endpoint.name().equalsIgnoreCase(externalEndpointName23)) { -// Assert.assertEquals(endpoint.routingPriority(), 6); -// Assert.assertEquals(endpoint.fqdn(), externalFqdn23); -// Assert.assertNotNull(endpoint.monitorStatus()); -// Assert.assertEquals(endpoint.sourceTrafficLocation(), Region.US_CENTRAL); -// c++; -// } else { -// c++; -// } -// } -// Assert.assertEquals(c, 2); -// -// c = 0; -// for (TrafficManagerAzureEndpoint endpoint : profile.azureEndpoints().values()) { -// Assert.assertEquals(endpoint.endpointType(), EndpointType.AZURE); -// if (endpoint.name().equalsIgnoreCase(azureEndpointName)) { -// Assert.assertEquals(endpoint.routingPriority(), 5); -// Assert.assertEquals(endpoint.routingWeight(), 2); -// Assert.assertEquals(endpoint.targetResourceType(), TargetAzureResourceType.PUBLICIP); -// c++; -// } -// } -// Assert.assertEquals(c, 1); -// return profile; -// } -// -// @Override -// public void print(TrafficManagerProfile profile) { -// StringBuilder info = new StringBuilder(); -// info.append("Traffic Manager Profile: ").append(profile.id()) -// .append("\n\tName: ").append(profile.name()) -// .append("\n\tResource group: ").append(profile.resourceGroupName()) -// .append("\n\tRegion: ").append(profile.regionName()) -// .append("\n\tTags: ").append(profile.tags()) -// .append("\n\tDNSLabel: ").append(profile.dnsLabel()) -// .append("\n\tFQDN: ").append(profile.fqdn()) -// .append("\n\tTTL: ").append(profile.timeToLive()) -// .append("\n\tEnabled: ").append(profile.isEnabled()) -// .append("\n\tRoutingMethod: ").append(profile.trafficRoutingMethod()) -// .append("\n\tMonitor status: ").append(profile.monitorStatus()) -// .append("\n\tMonitoring port: ").append(profile.monitoringPort()) -// .append("\n\tMonitoring path: ").append(profile.monitoringPath()); -// -// Map azureEndpoints = profile.azureEndpoints(); -// if (!azureEndpoints.isEmpty()) { -// info.append("\n\tAzure endpoints:"); -// int idx = 1; -// for (TrafficManagerAzureEndpoint endpoint : azureEndpoints.values()) { -// info.append("\n\t\tAzure endpoint: #").append(idx++) -// .append("\n\t\t\tId: ").append(endpoint.id()) -// .append("\n\t\t\tType: ").append(endpoint.endpointType()) -// .append("\n\t\t\tTarget resourceId: ").append(endpoint.targetAzureResourceId()) -// .append("\n\t\t\tTarget resourceType: ").append(endpoint.targetResourceType()) -// .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) -// .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) -// .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) -// .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); -// } -// } -// -// Map externalEndpoints = profile.externalEndpoints(); -// if (!externalEndpoints.isEmpty()) { -// info.append("\n\tExternal endpoints:"); -// int idx = 1; -// for (TrafficManagerExternalEndpoint endpoint : externalEndpoints.values()) { -// info.append("\n\t\tExternal endpoint: #").append(idx++) -// .append("\n\t\t\tId: ").append(endpoint.id()) -// .append("\n\t\t\tType: ").append(endpoint.endpointType()) -// .append("\n\t\t\tFQDN: ").append(endpoint.fqdn()) -// .append("\n\t\t\tSource Traffic Location: ").append(endpoint.sourceTrafficLocation()) -// .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) -// .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) -// .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) -// .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); -// } -// } -// -// Map nestedProfileEndpoints = profile.nestedProfileEndpoints(); -// if (!nestedProfileEndpoints.isEmpty()) { -// info.append("\n\tNested profile endpoints:"); -// int idx = 1; -// for (TrafficManagerNestedProfileEndpoint endpoint : nestedProfileEndpoints.values()) { -// info.append("\n\t\tNested profile endpoint: #").append(idx++) -// .append("\n\t\t\tId: ").append(endpoint.id()) -// .append("\n\t\t\tType: ").append(endpoint.endpointType()) -// .append("\n\t\t\tNested profileId: ").append(endpoint.nestedProfileId()) -// .append("\n\t\t\tMinimum child threshold: ").append(endpoint.minimumChildEndpointCount()) -// .append("\n\t\t\tSource Traffic Location: ").append(endpoint.sourceTrafficLocation()) -// .append("\n\t\t\tMonitor status: ").append(endpoint.monitorStatus()) -// .append("\n\t\t\tEnabled: ").append(endpoint.isEnabled()) -// .append("\n\t\t\tRouting priority: ").append(endpoint.routingPriority()) -// .append("\n\t\t\tRouting weight: ").append(endpoint.routingWeight()); -// } -// } -// System.out.println(info.toString()); -// } -// } + +package com.azure.resourcemanager; + +import com.azure.resourcemanager.network.models.PublicIpAddress; +import com.azure.resourcemanager.network.models.PublicIpAddresses; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.models.ResourceGroup; +import com.azure.resourcemanager.trafficmanager.models.EndpointType; +import com.azure.resourcemanager.trafficmanager.models.TargetAzureResourceType; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerAzureEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerExternalEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerNestedProfileEndpoint; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; +import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfiles; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +/** Test of traffic manager management. */ +public class TestTrafficManager extends TestTemplate { + + private final PublicIpAddresses publicIpAddresses; + + private final String externalEndpointName21 = "external-ep-1"; + private final String externalEndpointName22 = "external-ep-2"; + private final String externalEndpointName23 = "external-ep-3"; + + private final String externalFqdn21 = "www.azure.com"; + private final String externalFqdn22 = "www.bing.com"; + private final String externalFqdn23 = "www.github.com"; + + private final String azureEndpointName = "azure-ep-1"; + private final String nestedProfileEndpointName = "nested-profile-ep-1"; + + public TestTrafficManager(PublicIpAddresses publicIpAddresses) { + this.publicIpAddresses = publicIpAddresses; + } + + @Override + public TrafficManagerProfile createResource(TrafficManagerProfiles profiles) throws Exception { + final Region region = Region.US_EAST; + final String groupName = profiles.manager().sdkContext().randomResourceName("rg", 10); + + final String pipName = profiles.manager().sdkContext().randomResourceName("pip", 10); + final String pipDnsLabel = profiles.manager().sdkContext().randomResourceName("contoso", 15); + + final String tmProfileName = profiles.manager().sdkContext().randomResourceName("tm", 10); + final String nestedTmProfileName = "nested" + tmProfileName; + + final String tmProfileDnsLabel = profiles.manager().sdkContext().randomResourceName("tmdns", 10); + final String nestedTmProfileDnsLabel = "nested" + tmProfileDnsLabel; + + ResourceGroup.DefinitionStages.WithCreate rgCreatable = + profiles.manager().resourceManager().resourceGroups().define(groupName).withRegion(region); + + // Creates a TM profile that will be used as a nested profile endpoint in parent TM profile + // + TrafficManagerProfile nestedProfile = + profiles + .define(nestedTmProfileName) + .withNewResourceGroup(rgCreatable) + .withLeafDomainLabel(nestedTmProfileDnsLabel) + .withPriorityBasedRouting() + .defineExternalTargetEndpoint(externalEndpointName21) + .toFqdn("www.gitbook.com") + .fromRegion(Region.INDIA_CENTRAL) + .attach() + .withHttpsMonitoring() + .withTimeToLive(500) + .create(); + + Assertions.assertTrue(nestedProfile.isEnabled()); + Assertions.assertNotNull(nestedProfile.monitorStatus()); + Assertions.assertEquals(nestedProfile.monitoringPort(), 443); + Assertions.assertEquals(nestedProfile.monitoringPath(), "/"); + Assertions.assertEquals(nestedProfile.azureEndpoints().size(), 0); + Assertions.assertEquals(nestedProfile.nestedProfileEndpoints().size(), 0); + Assertions.assertEquals(nestedProfile.externalEndpoints().size(), 1); + Assertions.assertEquals(nestedProfile.fqdn(), nestedTmProfileDnsLabel + ".trafficmanager.net"); + Assertions.assertEquals(nestedProfile.timeToLive(), 500); + + // Creates a public ip to be used as an Azure endpoint + // + PublicIpAddress publicIPAddress = + this + .publicIpAddresses + .define(pipName) + .withRegion(region) + .withNewResourceGroup(rgCreatable) + .withLeafDomainLabel(pipDnsLabel) + .create(); + + Assertions.assertNotNull(publicIPAddress.fqdn()); + // Creates a TM profile + // + + // bugfix + TrafficManagerProfile updatedProfile = + nestedProfile + .update() + .defineAzureTargetEndpoint(azureEndpointName) + .toResourceId(publicIPAddress.id()) + .withTrafficDisabled() + .withRoutingPriority(11) + .attach() + .apply(); + + Assertions.assertEquals(1, updatedProfile.azureEndpoints().size()); + Assertions.assertTrue(updatedProfile.azureEndpoints().containsKey(azureEndpointName)); + Assertions.assertEquals(1, updatedProfile.externalEndpoints().size()); + Assertions.assertTrue(updatedProfile.externalEndpoints().containsKey(externalEndpointName21)); + + TrafficManagerProfile updatedProfileFromGet = profiles.getById(updatedProfile.id()); + + Assertions.assertEquals(1, updatedProfileFromGet.azureEndpoints().size()); + Assertions.assertTrue(updatedProfileFromGet.azureEndpoints().containsKey(azureEndpointName)); + Assertions.assertEquals(1, updatedProfileFromGet.externalEndpoints().size()); + Assertions.assertTrue(updatedProfileFromGet.externalEndpoints().containsKey(externalEndpointName21)); + + nestedProfile.update().withoutEndpoint(azureEndpointName).apply(); + + Assertions.assertEquals(0, nestedProfile.azureEndpoints().size()); + Assertions.assertEquals(1, nestedProfile.externalEndpoints().size()); + Assertions.assertTrue(nestedProfile.externalEndpoints().containsKey(externalEndpointName21)); + + updatedProfileFromGet = profiles.getById(updatedProfile.id()); + Assertions.assertEquals(0, updatedProfileFromGet.azureEndpoints().size()); + Assertions.assertEquals(nestedProfile.azureEndpoints().size(), updatedProfileFromGet.azureEndpoints().size()); + Assertions.assertEquals(1, updatedProfileFromGet.externalEndpoints().size()); + Assertions.assertTrue(updatedProfileFromGet.externalEndpoints().containsKey(externalEndpointName21)); + // end of bugfix + + TrafficManagerProfile profile = + profiles + .define(tmProfileName) + .withNewResourceGroup(rgCreatable) + .withLeafDomainLabel(tmProfileDnsLabel) + .withWeightBasedRouting() + .defineExternalTargetEndpoint(externalEndpointName21) + .toFqdn(externalFqdn21) + .fromRegion(Region.US_EAST) + .withRoutingPriority(1) + .withRoutingWeight(1) + .attach() + .defineExternalTargetEndpoint(externalEndpointName22) + .toFqdn(externalFqdn22) + .fromRegion(Region.US_EAST2) + .withRoutingPriority(2) + .withRoutingWeight(1) + .withTrafficDisabled() + .attach() + .defineAzureTargetEndpoint(azureEndpointName) + .toResourceId(publicIPAddress.id()) + .withRoutingPriority(3) + .attach() + .defineNestedTargetEndpoint(nestedProfileEndpointName) + .toProfile(nestedProfile) + .fromRegion(Region.INDIA_CENTRAL) + .withMinimumEndpointsToEnableTraffic(1) + .withRoutingPriority(4) + .attach() + .withHttpMonitoring() + .create(); + + Assertions.assertTrue(profile.isEnabled()); + Assertions.assertNotNull(profile.monitorStatus()); + Assertions.assertEquals(profile.monitoringPort(), 80); + Assertions.assertEquals(profile.monitoringPath(), "/"); + Assertions.assertEquals(profile.azureEndpoints().size(), 1); + Assertions.assertEquals(profile.nestedProfileEndpoints().size(), 1); + Assertions.assertEquals(profile.externalEndpoints().size(), 2); + Assertions.assertEquals(profile.fqdn(), tmProfileDnsLabel + ".trafficmanager.net"); + Assertions.assertEquals(profile.timeToLive(), 300); // Default + + profile = profile.refresh(); + Assertions.assertEquals(profile.azureEndpoints().size(), 1); + Assertions.assertEquals(profile.nestedProfileEndpoints().size(), 1); + Assertions.assertEquals(profile.externalEndpoints().size(), 2); + + int c = 0; + for (TrafficManagerExternalEndpoint endpoint : profile.externalEndpoints().values()) { + Assertions.assertEquals(endpoint.endpointType(), EndpointType.EXTERNAL); + if (endpoint.name().equalsIgnoreCase(externalEndpointName21)) { + Assertions.assertEquals(endpoint.routingPriority(), 1); + Assertions.assertEquals(endpoint.fqdn(), externalFqdn21); + Assertions.assertNotNull(endpoint.monitorStatus()); + Assertions.assertEquals(endpoint.sourceTrafficLocation(), Region.US_EAST); + c++; + } else if (endpoint.name().equalsIgnoreCase(externalEndpointName22)) { + Assertions.assertEquals(endpoint.routingPriority(), 2); + Assertions.assertEquals(endpoint.fqdn(), externalFqdn22); + Assertions.assertNotNull(endpoint.monitorStatus()); + Assertions.assertEquals(endpoint.sourceTrafficLocation(), Region.US_EAST2); + c++; + } + } + Assertions.assertEquals(c, 2); + + c = 0; + for (TrafficManagerAzureEndpoint endpoint : profile.azureEndpoints().values()) { + Assertions.assertEquals(endpoint.endpointType(), EndpointType.AZURE); + if (endpoint.name().equalsIgnoreCase(azureEndpointName)) { + Assertions.assertEquals(endpoint.routingPriority(), 3); + Assertions.assertNotNull(endpoint.monitorStatus()); + Assertions.assertEquals(endpoint.targetAzureResourceId(), publicIPAddress.id()); + Assertions.assertEquals(endpoint.targetResourceType(), TargetAzureResourceType.PUBLICIP); + c++; + } + } + Assertions.assertEquals(c, 1); + + c = 0; + for (TrafficManagerNestedProfileEndpoint endpoint : profile.nestedProfileEndpoints().values()) { + Assertions.assertEquals(endpoint.endpointType(), EndpointType.NESTED_PROFILE); + if (endpoint.name().equalsIgnoreCase(nestedProfileEndpointName)) { + Assertions.assertEquals(endpoint.routingPriority(), 4); + Assertions.assertNotNull(endpoint.monitorStatus()); + Assertions.assertEquals(endpoint.minimumChildEndpointCount(), 1); + Assertions.assertEquals(endpoint.nestedProfileId(), nestedProfile.id()); + Assertions.assertEquals(endpoint.sourceTrafficLocation(), Region.INDIA_CENTRAL); + c++; + } + } + Assertions.assertEquals(c, 1); + return profile; + } + + @Override + public TrafficManagerProfile updateResource(TrafficManagerProfile profile) throws Exception { + // Remove an endpoint, update two endpoints and add new one + // + profile + .update() + .withTimeToLive(600) + .withHttpMonitoring(8080, "/") + .withPerformanceBasedRouting() + .withoutEndpoint(externalEndpointName21) + .updateAzureTargetEndpoint(azureEndpointName) + .withRoutingPriority(5) + .withRoutingWeight(2) + .parent() + .updateNestedProfileTargetEndpoint(nestedProfileEndpointName) + .withTrafficDisabled() + .parent() + .defineExternalTargetEndpoint(externalEndpointName23) + .toFqdn(externalFqdn23) + .fromRegion(Region.US_CENTRAL) + .withRoutingPriority(6) + .attach() + .apply(); + + Assertions.assertEquals(profile.monitoringPort(), 8080); + Assertions.assertEquals(profile.monitoringPath(), "/"); + Assertions.assertEquals(profile.azureEndpoints().size(), 1); + Assertions.assertEquals(profile.nestedProfileEndpoints().size(), 1); + Assertions.assertEquals(profile.externalEndpoints().size(), 2); + Assertions.assertEquals(profile.timeToLive(), 600); + + int c = 0; + for (TrafficManagerExternalEndpoint endpoint : profile.externalEndpoints().values()) { + Assertions.assertEquals(endpoint.endpointType(), EndpointType.EXTERNAL); + if (endpoint.name().equalsIgnoreCase(externalEndpointName22)) { + Assertions.assertEquals(endpoint.routingPriority(), 2); + Assertions.assertEquals(endpoint.fqdn(), externalFqdn22); + Assertions.assertEquals(endpoint.sourceTrafficLocation(), Region.US_EAST2); + Assertions.assertNotNull(endpoint.monitorStatus()); + c++; + } else if (endpoint.name().equalsIgnoreCase(externalEndpointName23)) { + Assertions.assertEquals(endpoint.routingPriority(), 6); + Assertions.assertEquals(endpoint.fqdn(), externalFqdn23); + Assertions.assertNotNull(endpoint.monitorStatus()); + Assertions.assertEquals(endpoint.sourceTrafficLocation(), Region.US_CENTRAL); + c++; + } else { + c++; + } + } + Assertions.assertEquals(c, 2); + + c = 0; + for (TrafficManagerAzureEndpoint endpoint : profile.azureEndpoints().values()) { + Assertions.assertEquals(endpoint.endpointType(), EndpointType.AZURE); + if (endpoint.name().equalsIgnoreCase(azureEndpointName)) { + Assertions.assertEquals(endpoint.routingPriority(), 5); + Assertions.assertEquals(endpoint.routingWeight(), 2); + Assertions.assertEquals(endpoint.targetResourceType(), TargetAzureResourceType.PUBLICIP); + c++; + } + } + Assertions.assertEquals(c, 1); + return profile; + } + + @Override + public void print(TrafficManagerProfile profile) { + StringBuilder info = new StringBuilder(); + info + .append("Traffic Manager Profile: ") + .append(profile.id()) + .append("\n\tName: ") + .append(profile.name()) + .append("\n\tResource group: ") + .append(profile.resourceGroupName()) + .append("\n\tRegion: ") + .append(profile.regionName()) + .append("\n\tTags: ") + .append(profile.tags()) + .append("\n\tDNSLabel: ") + .append(profile.dnsLabel()) + .append("\n\tFQDN: ") + .append(profile.fqdn()) + .append("\n\tTTL: ") + .append(profile.timeToLive()) + .append("\n\tEnabled: ") + .append(profile.isEnabled()) + .append("\n\tRoutingMethod: ") + .append(profile.trafficRoutingMethod()) + .append("\n\tMonitor status: ") + .append(profile.monitorStatus()) + .append("\n\tMonitoring port: ") + .append(profile.monitoringPort()) + .append("\n\tMonitoring path: ") + .append(profile.monitoringPath()); + + Map azureEndpoints = profile.azureEndpoints(); + if (!azureEndpoints.isEmpty()) { + info.append("\n\tAzure endpoints:"); + int idx = 1; + for (TrafficManagerAzureEndpoint endpoint : azureEndpoints.values()) { + info + .append("\n\t\tAzure endpoint: #") + .append(idx++) + .append("\n\t\t\tId: ") + .append(endpoint.id()) + .append("\n\t\t\tType: ") + .append(endpoint.endpointType()) + .append("\n\t\t\tTarget resourceId: ") + .append(endpoint.targetAzureResourceId()) + .append("\n\t\t\tTarget resourceType: ") + .append(endpoint.targetResourceType()) + .append("\n\t\t\tMonitor status: ") + .append(endpoint.monitorStatus()) + .append("\n\t\t\tEnabled: ") + .append(endpoint.isEnabled()) + .append("\n\t\t\tRouting priority: ") + .append(endpoint.routingPriority()) + .append("\n\t\t\tRouting weight: ") + .append(endpoint.routingWeight()); + } + } + + Map externalEndpoints = profile.externalEndpoints(); + if (!externalEndpoints.isEmpty()) { + info.append("\n\tExternal endpoints:"); + int idx = 1; + for (TrafficManagerExternalEndpoint endpoint : externalEndpoints.values()) { + info + .append("\n\t\tExternal endpoint: #") + .append(idx++) + .append("\n\t\t\tId: ") + .append(endpoint.id()) + .append("\n\t\t\tType: ") + .append(endpoint.endpointType()) + .append("\n\t\t\tFQDN: ") + .append(endpoint.fqdn()) + .append("\n\t\t\tSource Traffic Location: ") + .append(endpoint.sourceTrafficLocation()) + .append("\n\t\t\tMonitor status: ") + .append(endpoint.monitorStatus()) + .append("\n\t\t\tEnabled: ") + .append(endpoint.isEnabled()) + .append("\n\t\t\tRouting priority: ") + .append(endpoint.routingPriority()) + .append("\n\t\t\tRouting weight: ") + .append(endpoint.routingWeight()); + } + } + + Map nestedProfileEndpoints = profile.nestedProfileEndpoints(); + if (!nestedProfileEndpoints.isEmpty()) { + info.append("\n\tNested profile endpoints:"); + int idx = 1; + for (TrafficManagerNestedProfileEndpoint endpoint : nestedProfileEndpoints.values()) { + info + .append("\n\t\tNested profile endpoint: #") + .append(idx++) + .append("\n\t\t\tId: ") + .append(endpoint.id()) + .append("\n\t\t\tType: ") + .append(endpoint.endpointType()) + .append("\n\t\t\tNested profileId: ") + .append(endpoint.nestedProfileId()) + .append("\n\t\t\tMinimum child threshold: ") + .append(endpoint.minimumChildEndpointCount()) + .append("\n\t\t\tSource Traffic Location: ") + .append(endpoint.sourceTrafficLocation()) + .append("\n\t\t\tMonitor status: ") + .append(endpoint.monitorStatus()) + .append("\n\t\t\tEnabled: ") + .append(endpoint.isEnabled()) + .append("\n\t\t\tRouting priority: ") + .append(endpoint.routingPriority()) + .append("\n\t\t\tRouting weight: ") + .append(endpoint.routingWeight()); + } + } + System.out.println(info.toString()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testTrafficManager.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testTrafficManager.json index 6c43f7eb9f2e6..ad28f048322c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testTrafficManager.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/testTrafficManager.json @@ -3,857 +3,945 @@ "Method" : "GET", "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/trafficmanagerprofiles?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "bfd0af42-58e5-4014-9007-e8df2aa78a59", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:24:41 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "12", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "adc56f40-ebfd-49a8-8ba6-aecea39b053f", - "x-content-type-options" : "nosniff", + "Date" : "Tue, 01 Sep 2020 04:48:06 GMT", + "x-ms-correlation-request-id" : "3c6ff3e3-c56d-45ff-b68e-ca7180c73ee6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022441Z:adc56f40-ebfd-49a8-8ba6-aecea39b053f", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "017d155b-5154-43f6-91a0-06133b02d861", - "Body" : "{\"value\":[]}" - } + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044807Z:3c6ff3e3-c56d-45ff-b68e-ca7180c73ee6", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "5099", + "x-ms-request-id" : "bfd0af42-58e5-4014-9007-e8df2aa78a59", + "Body" : "{\"value\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg63450e\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm04378b\",\"name\":\"nestedtm04378b\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns19622\",\"fqdn\":\"nestedtmdns19622.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg63450e\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm04378b\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\",\"name\":\"nestedtm219938\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns10850\",\"fqdn\":\"nestedtmdns10850.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\",\"name\":\"tm219938\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns10850\",\"fqdn\":\"tmdns10850.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip586698\",\"target\":\"contoso427174.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\",\"target\":\"nestedtmdns10850.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}]}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg429676?api-version=2020-06-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/trafficmanagerprofiles?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "39d0fe63-e542-4813-97aa-328f29841059", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:48:06 GMT", + "x-ms-correlation-request-id" : "083a8897-9525-4ca8-b394-0f2d1ac654bb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044807Z:083a8897-9525-4ca8-b394-0f2d1ac654bb", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "5099", + "x-ms-request-id" : "39d0fe63-e542-4813-97aa-328f29841059", + "Body" : "{\"value\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg63450e\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm04378b\",\"name\":\"nestedtm04378b\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns19622\",\"fqdn\":\"nestedtmdns19622.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg63450e\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm04378b\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\",\"name\":\"nestedtm219938\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns10850\",\"fqdn\":\"nestedtmdns10850.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\",\"name\":\"tm219938\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns10850\",\"fqdn\":\"tmdns10850.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip586698\",\"target\":\"contoso427174.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\",\"target\":\"nestedtmdns10850.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}]}", + "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg014436?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "90c80de7-03cd-463e-90b6-ca3b22e7a08b", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:24:45 GMT", - "content-length" : "297", - "expires" : "-1", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5ca00fcc-f5ed-4963-9de4-471cfba72bfa", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022445Z:5ca00fcc-f5ed-4963-9de4-471cfba72bfa", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "5ca00fcc-f5ed-4963-9de4-471cfba72bfa", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676\",\"name\":\"rg429676\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-02-03T02:24:41.816Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:10 GMT", + "x-ms-correlation-request-id" : "79f14884-1abe-4d33-88e7-fc1b535f40ac", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044811Z:79f14884-1abe-4d33-88e7-fc1b535f40ac", + "Expires" : "-1", + "Content-Length" : "213", + "x-ms-request-id" : "79f14884-1abe-4d33-88e7-fc1b535f40ac", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436\",\"name\":\"rg014436\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d3738f0d-bbcc-48c5-9b32-5f3c6d30f0c9", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:24:51 GMT", - "content-length" : "674", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "94aab941-40c6-4c19-ac47-aeb45a96adc6", - "x-content-type-options" : "nosniff", + "Date" : "Tue, 01 Sep 2020 04:48:18 GMT", + "x-ms-correlation-request-id" : "782099ba-bbf3-49d5-9028-e3babe20f207", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022451Z:94aab941-40c6-4c19-ac47-aeb45a96adc6", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "c00cb221-04ce-4079-85ee-9e334d5f7d04", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044819Z:782099ba-bbf3-49d5-9028-e3babe20f207", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "666", + "x-ms-request-id" : "d3738f0d-bbcc-48c5-9b32-5f3c6d30f0c9", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676/externalEndpoints/external-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169/externalEndpoints/external-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "88841e94-d0e4-49fa-9515-d7ddbc5d9937", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:24:53 GMT", - "content-length" : "456", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "230002de-915c-4da1-b5ab-c641ebe3b74b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022454Z:230002de-915c-4da1-b5ab-c641ebe3b74b", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "024296b3-6ffb-417f-b31d-10b6285a54f5", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:18 GMT", + "x-ms-correlation-request-id" : "7a07ef95-533e-4bd0-b880-1dff5152cfa5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044819Z:7a07ef95-533e-4bd0-b880-1dff5152cfa5", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "477", + "x-ms-request-id" : "88841e94-d0e4-49fa-9515-d7ddbc5d9937", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "758916a6-f943-4e50-aac9-94bfeb7ce829", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:24:54 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1139", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9bc4027f-b130-4937-8615-d4f2a02b5cf5", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022454Z:9bc4027f-b130-4937-8615-d4f2a02b5cf5", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "b6a6cb4c-3686-477d-a36f-ca1a5b4a7f05", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:19 GMT", + "x-ms-correlation-request-id" : "5650b99b-034f-427c-8990-e73fa8bb835e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10797", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044820Z:5650b99b-034f-427c-8990-e73fa8bb835e", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1152", + "x-ms-request-id" : "758916a6-f943-4e50-aac9-94bfeb7ce829", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/publicIPAddresses/pip429676?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/publicIPAddresses/pip208738?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ea241d82-9f6b-4e46-b061-0a2c0a28f161", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:24:57 GMT", - "content-length" : "744", - "server" : "Microsoft-HTTPAPI/2.0", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1197", - "retry-after" : "0", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "bf7ba041-c259-4a8c-a933-60ce220b782b", - "x-ms-arm-service-request-id" : "fc9a69ac-aa70-4f34-bb64-f0c3c2ac9e6c", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022458Z:bf7ba041-c259-4a8c-a933-60ce220b782b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "df80d6da-7ae6-4996-8563-e8796ddc4d62", - "Body" : "{\r\n \"name\": \"pip429676\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/publicIPAddresses/pip429676\",\r\n \"etag\": \"W/\\\"ab4dc259-78bd-4fb6-8fae-1de3570210e7\\\"\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"39016c6d-c5c9-4e47-970c-13fc4310b702\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"contoso836241\",\r\n \"fqdn\": \"contoso836241.eastus.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/df80d6da-7ae6-4996-8563-e8796ddc4d62?api-version=2019-11-01" - } + "Date" : "Tue, 01 Sep 2020 04:48:24 GMT", + "x-ms-correlation-request-id" : "e9d55f8c-28b6-4456-872b-2b7b9d9e64e6", + "x-ms-arm-service-request-id" : "38c10ac3-aeb3-494b-ad42-23dd9995d72c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044825Z:e9d55f8c-28b6-4456-872b-2b7b9d9e64e6", + "Expires" : "-1", + "Content-Length" : "744", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2493e899-b97c-4211-8878-f4e1930cd17f?api-version=2020-05-01", + "x-ms-request-id" : "2493e899-b97c-4211-8878-f4e1930cd17f", + "Body" : "{\r\n \"name\": \"pip208738\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/publicIPAddresses/pip208738\",\r\n \"etag\": \"W/\\\"d7b64ac4-3bc3-459e-bc33-d689ef70e9a5\\\"\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"d1c1615a-14b5-4fed-b0b0-49d451d172b0\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"contoso599813\",\r\n \"fqdn\": \"contoso599813.eastus.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "ea241d82-9f6b-4e46-b061-0a2c0a28f161", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/df80d6da-7ae6-4996-8563-e8796ddc4d62?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2493e899-b97c-4211-8878-f4e1930cd17f?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "e416906b-a33d-49cc-b195-00402a3db200" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:24:58 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e586169b-bd4c-4371-ad39-d187524bead1", - "x-ms-arm-service-request-id" : "24f640b8-6f0c-4e6f-a79d-6e24f0c2df4e", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022459Z:e586169b-bd4c-4371-ad39-d187524bead1", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "bc0e7158-0ac0-4127-aed0-ab4d9eba976c", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } + "Date" : "Tue, 01 Sep 2020 04:48:26 GMT", + "x-ms-correlation-request-id" : "b5cb9757-5322-425c-aecd-5016152b948d", + "x-ms-arm-service-request-id" : "f06a74dc-eff5-4c45-883c-a0dc051618b5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044827Z:b5cb9757-5322-425c-aecd-5016152b948d", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "5c1910e3-9ea8-46b6-b0de-4cb2c21d2599", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "e416906b-a33d-49cc-b195-00402a3db200", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/publicIPAddresses/pip429676?api-version=2019-11-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/publicIPAddresses/pip208738?api-version=2020-05-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (NetworkManagementClient)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "85581f32-8023-4658-8ebb-f93197709da6" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:00 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "745", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "efdc926a-cd4f-4c51-a62f-015c6227b93a", - "x-ms-arm-service-request-id" : "25652c69-6976-47d6-8439-4e4fd0b04a9a", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022501Z:efdc926a-cd4f-4c51-a62f-015c6227b93a", - "content-type" : "application/json; charset=utf-8", - "etag" : "W/\"ca8b8ed3-e512-4694-b0e3-04676299ea6f\"", - "cache-control" : "no-cache", - "x-ms-request-id" : "34bd18be-279e-411c-88ec-1b626656cdfc", - "Body" : "{\r\n \"name\": \"pip429676\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/publicIPAddresses/pip429676\",\r\n \"etag\": \"W/\\\"ca8b8ed3-e512-4694-b0e3-04676299ea6f\\\"\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"39016c6d-c5c9-4e47-970c-13fc4310b702\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"contoso836241\",\r\n \"fqdn\": \"contoso836241.eastus.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" - } + "Date" : "Tue, 01 Sep 2020 04:48:26 GMT", + "x-ms-correlation-request-id" : "f96b79d0-f790-4a40-99f8-1003ad2402cd", + "x-ms-arm-service-request-id" : "0a041a36-ca3e-4b0d-848a-ee2fdfc1906e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"1c662843-15c7-437e-8959-0877f53f8f76\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044827Z:f96b79d0-f790-4a40-99f8-1003ad2402cd", + "Expires" : "-1", + "Content-Length" : "745", + "x-ms-request-id" : "4d38380f-ac74-489f-9bb5-87c69705054f", + "Body" : "{\r\n \"name\": \"pip208738\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/publicIPAddresses/pip208738\",\r\n \"etag\": \"W/\\\"1c662843-15c7-437e-8959-0877f53f8f76\\\"\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"d1c1615a-14b5-4fed-b0b0-49d451d172b0\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"dnsSettings\": {\r\n \"domainNameLabel\": \"contoso599813\",\r\n \"fqdn\": \"contoso599813.eastus.cloudapp.azure.com\"\r\n },\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}", + "x-ms-client-request-id" : "85581f32-8023-4658-8ebb-f93197709da6", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676/azureEndpoints/azure-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169/azureEndpoints/azure-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b16ef83-e3ee-4953-84e3-bcb418be7b56", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:02 GMT", - "content-length" : "617", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1196", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "21367e17-d45e-45a3-ab42-8d08829194bc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022502Z:21367e17-d45e-45a3-ab42-8d08829194bc", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "a5f4d721-2efb-46c1-8815-d86fcece3822", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":11,\"endpointLocation\":\"East US\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:27 GMT", + "x-ms-correlation-request-id" : "1ebd8115-95c0-4869-aaec-d3fea5fe9c7e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044828Z:1ebd8115-95c0-4869-aaec-d3fea5fe9c7e", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "638", + "x-ms-request-id" : "5b16ef83-e3ee-4953-84e3-bcb418be7b56", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":11,\"endpointLocation\":\"East US\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "55ce76a5-3a08-46e9-a122-3d236a84954c", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:05 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1757", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "0b01e06d-1fb0-40a2-8676-c0f0bad1fe2a", - "x-content-type-options" : "nosniff", + "Date" : "Tue, 01 Sep 2020 04:48:32 GMT", + "x-ms-correlation-request-id" : "2d0e376e-f7ee-40f1-b71e-013ebd69ccb9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022506Z:0b01e06d-1fb0-40a2-8676-c0f0bad1fe2a", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "3dc6ad0a-3b73-49e8-a717-22e9df4ce960", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":11,\"endpointLocation\":\"East US\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044832Z:2d0e376e-f7ee-40f1-b71e-013ebd69ccb9", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1791", + "x-ms-request-id" : "55ce76a5-3a08-46e9-a122-3d236a84954c", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":11,\"endpointLocation\":\"East US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "10924051-ff5c-4b5e-ac5b-26929a7f42f3", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:06 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1757", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b018c466-bbb7-466d-a0d2-e291d3b14173", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10797", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022507Z:b018c466-bbb7-466d-a0d2-e291d3b14173", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "b8e206df-1cc1-45fb-ac78-8afd5f76b6e3", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":11,\"endpointLocation\":\"East US\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:33 GMT", + "x-ms-correlation-request-id" : "3a96fb90-8c18-4b42-83a7-99d365be4a84", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10796", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044833Z:3a96fb90-8c18-4b42-83a7-99d365be4a84", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1791", + "x-ms-request-id" : "10924051-ff5c-4b5e-ac5b-26929a7f42f3", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":11,\"endpointLocation\":\"East US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "967aa59b-b518-4142-9e70-63d32fdaa936", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:08 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1757", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "57c0cb95-1962-4191-a87c-0d66ddae78cf", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10796", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022508Z:57c0cb95-1962-4191-a87c-0d66ddae78cf", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "07e14dab-c459-472e-b84f-f13213cc5320", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":11,\"endpointLocation\":\"East US\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:33 GMT", + "x-ms-correlation-request-id" : "2468361f-2b73-4a72-adf0-95bd0648e3a0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10795", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044833Z:2468361f-2b73-4a72-adf0-95bd0648e3a0", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1791", + "x-ms-request-id" : "967aa59b-b518-4142-9e70-63d32fdaa936", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":11,\"endpointLocation\":\"East US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676/azureEndpoints/azure-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169/azureEndpoints/azure-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c9c8cc5-f04a-46d7-a117-40c3d663a6df", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:10 GMT", - "content-length" : "0", - "server" : "Microsoft-IIS/10.0", "x-ms-ratelimit-remaining-subscription-deletes" : "14999", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e556ebce-5134-4a50-9c97-3380c88afe4c", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022510Z:e556ebce-5134-4a50-9c97-3380c88afe4c", - "x-powered-by" : "ASP.NET", - "cache-control" : "private", - "x-ms-request-id" : "51ad93e4-5156-4946-af70-d26f91084f40", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 04:48:34 GMT", + "x-ms-correlation-request-id" : "046534dc-fb4a-484c-a798-344e0192a501", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044834Z:046534dc-fb4a-484c-a798-344e0192a501", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "0", + "x-ms-request-id" : "3c9c8cc5-f04a-46d7-a117-40c3d663a6df", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a47c9d2-dd8f-4f64-8020-ca107905ba3d", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:11 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1139", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "258acf8d-0a1e-4c7f-bec9-abb97192e0b6", - "x-content-type-options" : "nosniff", + "Date" : "Tue, 01 Sep 2020 04:48:37 GMT", + "x-ms-correlation-request-id" : "0971a4da-4628-4604-b19e-90b8f0711a93", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", "x-ms-ratelimit-remaining-subscription-resource-requests" : "10797", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022512Z:258acf8d-0a1e-4c7f-bec9-abb97192e0b6", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "f896e69d-bf1d-4c96-b35f-117cbd14e7bf", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044837Z:0971a4da-4628-4604-b19e-90b8f0711a93", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1152", + "x-ms-request-id" : "9a47c9d2-dd8f-4f64-8020-ca107905ba3d", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6c98430f-329e-4844-b5c6-c3abb42e9c87", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:13 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1139", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "00e5a872-f21f-440f-b018-bd3afffdfa9b", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10795", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022514Z:00e5a872-f21f-440f-b018-bd3afffdfa9b", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "d9e6576b-a25e-4bc9-aa25-c8e8dc27e04b", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:37 GMT", + "x-ms-correlation-request-id" : "3ffd52f4-de89-4611-bf58-5004e613d94e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10794", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044837Z:3ffd52f4-de89-4611-bf58-5004e613d94e", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1152", + "x-ms-request-id" : "6c98430f-329e-4844-b5c6-c3abb42e9c87", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/nestedtm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "4757ba59-f957-485d-90c4-3c2e48f43090", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:14 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "1139", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "83e3ef8e-b736-4c9c-9d69-67e0587caad1", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10794", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022514Z:83e3ef8e-b736-4c9c-9d69-67e0587caad1", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "3e12b89a-a5d8-4b34-86c1-d7ecb40d2001", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:37 GMT", + "x-ms-correlation-request-id" : "584bfb64-94c0-426a-a6ca-1b49ca637166", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10793", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044837Z:584bfb64-94c0-426a-a6ca-1b49ca637166", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "1152", + "x-ms-request-id" : "4757ba59-f957-485d-90c4-3c2e48f43090", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "45840ecd-7026-40fa-8e60-19557f2830d9", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:17 GMT", - "content-length" : "648", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "79028abd-27ed-4ecb-b931-ae9cc2329ae9", - "x-content-type-options" : "nosniff", + "Date" : "Tue, 01 Sep 2020 04:48:41 GMT", + "x-ms-correlation-request-id" : "0a8c6ddf-ecb9-4a1b-9779-8be272fdeed9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", "x-ms-ratelimit-remaining-subscription-resource-requests" : "10796", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022518Z:79028abd-27ed-4ecb-b931-ae9cc2329ae9", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "f258e999-1b80-4ac1-ba3a-b815a1db9ef0", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\",\"name\":\"tm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns64b556268\",\"fqdn\":\"tmdns64b556268.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044841Z:0a8c6ddf-ecb9-4a1b-9779-8be272fdeed9", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "640", + "x-ms-request-id" : "45840ecd-7026-40fa-8e60-19557f2830d9", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\",\"name\":\"tm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns54236\",\"fqdn\":\"tmdns54236.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"Inactive\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676/nestedEndpoints/nested-profile-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169/externalEndpoints/external-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ec20733-0392-4ba7-becc-ae9925c3a44a", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:19 GMT", - "content-length" : "661", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1195", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b135c5eb-10b9-412c-8cf3-617e7e96effc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022520Z:b135c5eb-10b9-412c-8cf3-617e7e96effc", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "184fb0b5-a0e8-4da2-8124-d42b5e72f597", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"target\":\"nestedtmdns64b556268.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:42 GMT", + "x-ms-correlation-request-id" : "4de11cc5-9088-4467-ba15-02a444387f16", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044842Z:4de11cc5-9088-4467-ba15-02a444387f16", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "463", + "x-ms-request-id" : "9ec20733-0392-4ba7-becc-ae9925c3a44a", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676/externalEndpoints/external-ep-2?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169/externalEndpoints/external-ep-2?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "08090041-2557-4369-90ca-28b43a596f48", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:20 GMT", - "content-length" : "436", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c215020a-e7fc-440d-88a6-aac565195c6d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022521Z:c215020a-e7fc-440d-88a6-aac565195c6d", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "36887a66-d55a-4675-9ba8-a7e286c6c42e", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:42 GMT", + "x-ms-correlation-request-id" : "3f5f928d-16ed-46de-bc8d-ed1320effbb6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044843Z:3f5f928d-16ed-46de-bc8d-ed1320effbb6", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "457", + "x-ms-request-id" : "08090041-2557-4369-90ca-28b43a596f48", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676/azureEndpoints/azure-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169/azureEndpoints/azure-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3d19277-cd81-4d7a-bd6b-4e4e4c830d1e", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:22 GMT", - "content-length" : "617", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "03214818-13d4-4bcd-b0a5-e6f4c376fbd1", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022523Z:03214818-13d4-4bcd-b0a5-e6f4c376fbd1", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "7a4e1086-8294-4eef-9cb7-f3596e62b78a", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:45 GMT", + "x-ms-correlation-request-id" : "e0f51d26-f849-4d8e-bef5-87dd52ac9e8e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044845Z:e0f51d26-f849-4d8e-bef5-87dd52ac9e8e", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "638", + "x-ms-request-id" : "c3d19277-cd81-4d7a-bd6b-4e4e4c830d1e", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676/externalEndpoints/external-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169/nestedEndpoints/nested-profile-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "8fe7fb17-def2-4edc-abd2-9e680c875de6", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:24 GMT", - "content-length" : "452", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "35db4d71-b452-4291-8daa-9db4e7b26eb1", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022524Z:35db4d71-b452-4291-8daa-9db4e7b26eb1", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "5cba1a75-bf3c-4969-8557-88b015d9a5ca", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.microsoft.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:50 GMT", + "x-ms-correlation-request-id" : "eb31827d-c535-4060-be51-b7eccf501f8a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044850Z:eb31827d-c535-4060-be51-b7eccf501f8a", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "678", + "x-ms-request-id" : "8fe7fb17-def2-4edc-abd2-9e680c875de6", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d47c068-d37f-426b-9b07-b6105d8a15a5", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:24 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "2840", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e400c76f-88ca-41ce-b8b4-506ba8f55766", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10793", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022525Z:e400c76f-88ca-41ce-b8b4-506ba8f55766", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "1ab36d1c-87d6-401c-8cf6-bed9c3b852f0", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\",\"name\":\"tm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns64b556268\",\"fqdn\":\"tmdns64b556268.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.microsoft.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"target\":\"nestedtmdns64b556268.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:52 GMT", + "x-ms-correlation-request-id" : "75f80442-17d3-4c8b-a43a-3fe3c251f024", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10792", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044852Z:75f80442-17d3-4c8b-a43a-3fe3c251f024", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2902", + "x-ms-request-id" : "2d47c068-d37f-426b-9b07-b6105d8a15a5", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\",\"name\":\"tm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns54236\",\"fqdn\":\"tmdns54236.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce1ca757-125c-487a-a0e6-6b2517ad144b", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:25 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "2840", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3e8a0a65-d080-495a-aaef-9c0bca4aaf77", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10792", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022526Z:3e8a0a65-d080-495a-aaef-9c0bca4aaf77", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "9e4fca82-00df-40fc-80fe-74c4eccf9c88", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\",\"name\":\"tm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns64b556268\",\"fqdn\":\"tmdns64b556268.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.microsoft.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"target\":\"nestedtmdns64b556268.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:52 GMT", + "x-ms-correlation-request-id" : "cc18d719-9279-48d7-b405-63e65b660956", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044852Z:cc18d719-9279-48d7-b405-63e65b660956", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2902", + "x-ms-request-id" : "ce1ca757-125c-487a-a0e6-6b2517ad144b", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\",\"name\":\"tm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns54236\",\"fqdn\":\"tmdns54236.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/trafficmanagerprofiles?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "761a7d93-2389-45bc-b5e3-7989c744805f", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:26 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "3900", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e49bcb33-410e-4d49-b669-a93cf4e59aca", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10791", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022527Z:e49bcb33-410e-4d49-b669-a93cf4e59aca", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "00a11bd8-b401-4e61-bab3-3c67a7c576cb", - "Body" : "{\"value\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"name\":\"nestedtm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns64b556268\",\"fqdn\":\"nestedtmdns64b556268.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\",\"name\":\"tm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns64b556268\",\"fqdn\":\"tmdns64b556268.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.azure.microsoft.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"target\":\"nestedtmdns64b556268.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}]}" - } + "Date" : "Tue, 01 Sep 2020 04:48:53 GMT", + "x-ms-correlation-request-id" : "4583783f-acc9-42aa-9360-c1fa8042e4d1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044853Z:4583783f-acc9-42aa-9360-c1fa8042e4d1", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "9063", + "x-ms-request-id" : "761a7d93-2389-45bc-b5e3-7989c744805f", + "Body" : "{\"value\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\",\"name\":\"tm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns54236\",\"fqdn\":\"tmdns54236.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg63450e\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm04378b\",\"name\":\"nestedtm04378b\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns19622\",\"fqdn\":\"nestedtmdns19622.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg63450e\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm04378b\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\",\"name\":\"nestedtm219938\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns10850\",\"fqdn\":\"nestedtmdns10850.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\",\"name\":\"tm219938\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns10850\",\"fqdn\":\"tmdns10850.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip586698\",\"target\":\"contoso427174.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\",\"target\":\"nestedtmdns10850.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}]}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/trafficmanagerprofiles?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4f93c49-72aa-4c71-8c8e-b4288b2fae35", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:26 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "2840", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e1726f0f-c867-4764-8d29-8f8daad2e472", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10790", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022527Z:e1726f0f-c867-4764-8d29-8f8daad2e472", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "018a1901-c05d-4f16-90da-379093a5fdb7", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\",\"name\":\"tm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns64b556268\",\"fqdn\":\"tmdns64b556268.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.microsoft.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"target\":\"nestedtmdns64b556268.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:52 GMT", + "x-ms-correlation-request-id" : "0da8848d-878c-4732-b760-251b56b985c4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044853Z:0da8848d-878c-4732-b760-251b56b985c4", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "9063", + "x-ms-request-id" : "d4f93c49-72aa-4c71-8c8e-b4288b2fae35", + "Body" : "{\"value\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"name\":\"nestedtm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns54236\",\"fqdn\":\"nestedtmdns54236.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\",\"name\":\"tm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns54236\",\"fqdn\":\"tmdns54236.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg63450e\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm04378b\",\"name\":\"nestedtm04378b\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns19622\",\"fqdn\":\"nestedtmdns19622.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg63450e\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm04378b\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\",\"name\":\"nestedtm219938\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Priority\",\"dnsConfig\":{\"relativeName\":\"nestedtmdns10850\",\"fqdn\":\"nestedtmdns10850.trafficmanager.net\",\"ttl\":500},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTPS\",\"port\":443,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.gitbook.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"Central India\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\",\"name\":\"tm219938\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns10850\",\"fqdn\":\"tmdns10850.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":null,\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip586698\",\"target\":\"contoso427174.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm219938\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg832412\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm219938\",\"target\":\"nestedtmdns10850.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}]}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "b8022037-4687-4c9e-911e-af57b979ba13", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 04:48:54 GMT", + "x-ms-correlation-request-id" : "58b3ed1f-c417-4bbd-b972-26c1b46b4609", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10791", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044854Z:58b3ed1f-c417-4bbd-b972-26c1b46b4609", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2902", + "x-ms-request-id" : "b8022037-4687-4c9e-911e-af57b979ba13", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\",\"name\":\"tm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns54236\",\"fqdn\":\"tmdns54236.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169?api-version=2018-04-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "81f2892d-6442-46b3-a2af-8f98f623185d", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:28 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "2840", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "38a879b1-2b31-49af-8579-7fbd643ec795", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10789", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022529Z:38a879b1-2b31-49af-8579-7fbd643ec795", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "0f285b4a-1b2b-4ad9-95ab-f28dd1b8083e", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\",\"name\":\"tm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns64b556268\",\"fqdn\":\"tmdns64b556268.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.microsoft.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"target\":\"nestedtmdns64b556268.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:54 GMT", + "x-ms-correlation-request-id" : "6bfaedb1-fd2f-4b47-ab94-e0bd36f85c7a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044854Z:6bfaedb1-fd2f-4b47-ab94-e0bd36f85c7a", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2902", + "x-ms-request-id" : "81f2892d-6442-46b3-a2af-8f98f623185d", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\",\"name\":\"tm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Weighted\",\"dnsConfig\":{\"relativeName\":\"tmdns54236\",\"fqdn\":\"tmdns54236.trafficmanager.net\",\"ttl\":300},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":80,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-1\",\"name\":\"external-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.azure.com\",\"weight\":1,\"priority\":1,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":1,\"priority\":3,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676/externalEndpoints/external-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169/externalEndpoints/external-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fe1fe0b-b28a-41a8-8370-37d11d83c41e", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:29 GMT", - "content-length" : "0", - "server" : "Microsoft-IIS/10.0", - "x-ms-ratelimit-remaining-subscription-deletes" : "14998", - "x-aspnet-version" : "4.0.30319", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "032c394e-4454-4538-a2d2-635414f29237", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022530Z:032c394e-4454-4538-a2d2-635414f29237", - "x-powered-by" : "ASP.NET", - "cache-control" : "private", - "x-ms-request-id" : "ed4817ee-fb95-4954-b8e5-d410c3e4b88b", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 04:48:54 GMT", + "x-ms-correlation-request-id" : "114185d0-7a65-4d50-a751-62e7c566b7f9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044855Z:114185d0-7a65-4d50-a751-62e7c566b7f9", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "0", + "x-ms-request-id" : "6fe1fe0b-b28a-41a8-8370-37d11d83c41e", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676/externalEndpoints/external-ep-3?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169/externalEndpoints/external-ep-3?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed241669-801f-4d66-aaab-9c5bda52a040", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:30 GMT", - "content-length" : "446", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9fd81441-3a6f-49a4-a726-4a2af83a0efe", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022531Z:9fd81441-3a6f-49a4-a726-4a2af83a0efe", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "7aaa7274-ac8f-405a-96b2-8bbc3c07a701", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-3\",\"name\":\"external-ep-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.github.com\",\"weight\":1,\"priority\":6,\"endpointLocation\":\"Central US\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:48:55 GMT", + "x-ms-correlation-request-id" : "521fc746-d62c-4896-a17c-de9da98d01b8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044856Z:521fc746-d62c-4896-a17c-de9da98d01b8", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "467", + "x-ms-request-id" : "ed241669-801f-4d66-aaab-9c5bda52a040", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-3\",\"name\":\"external-ep-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.github.com\",\"weight\":1,\"priority\":6,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676/azureEndpoints/azure-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169/azureEndpoints/azure-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "2a8797ab-2af2-41ce-a788-14c20c1ce65a", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:33 GMT", - "content-length" : "617", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4d7466c9-6647-4b0a-ac76-593e6030e1dc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022533Z:4d7466c9-6647-4b0a-ac76-593e6030e1dc", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "a3bcb61e-4b9d-4e16-ab14-7ac46db143bc", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":2,\"priority\":5,\"endpointLocation\":\"East US\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:49:01 GMT", + "x-ms-correlation-request-id" : "23be13c5-a1cc-4c13-a3df-8531276f9ca1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044901Z:23be13c5-a1cc-4c13-a3df-8531276f9ca1", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "638", + "x-ms-request-id" : "2a8797ab-2af2-41ce-a788-14c20c1ce65a", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":2,\"priority\":5,\"endpointLocation\":\"East US\",\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676/nestedEndpoints/nested-profile-ep-1?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169/nestedEndpoints/nested-profile-ep-1?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "d17a936a-48c7-496f-8c9a-902a87d8d92f", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:35 GMT", - "content-length" : "662", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", - "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "11424d29-f8cd-4a90-9c5f-dbacd080c963", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022535Z:11424d29-f8cd-4a90-9c5f-dbacd080c963", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "1e85bcc8-a837-4e9b-9725-fb5d36f43fec", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"target\":\"nestedtmdns64b556268.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1}}" - } + "Date" : "Tue, 01 Sep 2020 04:49:03 GMT", + "x-ms-correlation-request-id" : "44e683b8-7d23-413e-b60c-f368f42543c9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044904Z:44e683b8-7d23-413e-b60c-f368f42543c9", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "679", + "x-ms-request-id" : "d17a936a-48c7-496f-8c9a-902a87d8d92f", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "1b4f2d33-7cd8-4e69-b6b8-912737dbe355", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:36 GMT", - "server" : "Microsoft-IIS/10.0", - "content-length" : "2826", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4d887ffe-9708-466a-a527-056c8ebb85b7", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "10795", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022536Z:4d887ffe-9708-466a-a527-056c8ebb85b7", - "x-powered-by" : "ASP.NET", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "private", - "x-ms-request-id" : "65864fc3-2503-43c8-b77c-779ad958aaa8", - "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\",\"name\":\"tm429676\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"tmdns64b556268\",\"fqdn\":\"tmdns64b556268.trafficmanager.net\",\"ttl\":600},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":8080,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm429676\",\"target\":\"nestedtmdns64b556268.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip429676\",\"target\":\"contoso836241.eastus.cloudapp.azure.com\",\"weight\":2,\"priority\":5,\"endpointLocation\":\"East US\"}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg429676\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm429676\\/externalEndpoints\\/external-ep-3\",\"name\":\"external-ep-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.github.com\",\"weight\":1,\"priority\":6,\"endpointLocation\":\"Central US\"}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}" - } + "Date" : "Tue, 01 Sep 2020 04:49:07 GMT", + "x-ms-correlation-request-id" : "0f3bdc0e-48d0-40dd-a96e-e1b76f210820", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "10798", + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044907Z:0f3bdc0e-48d0-40dd-a96e-e1b76f210820", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "2898", + "x-ms-request-id" : "1b4f2d33-7cd8-4e69-b6b8-912737dbe355", + "Body" : "{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\",\"name\":\"tm549169\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\",\"location\":\"global\",\"tags\":{},\"properties\":{\"profileStatus\":\"Enabled\",\"trafficRoutingMethod\":\"Performance\",\"dnsConfig\":{\"relativeName\":\"tmdns54236\",\"fqdn\":\"tmdns54236.trafficmanager.net\",\"ttl\":600},\"monitorConfig\":{\"profileMonitorStatus\":\"CheckingEndpoints\",\"protocol\":\"HTTP\",\"port\":8080,\"path\":\"\\/\",\"intervalInSeconds\":30,\"toleratedNumberOfFailures\":3,\"timeoutInSeconds\":10},\"endpoints\":[{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-2\",\"name\":\"external-ep-2\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":\"Disabled\",\"target\":\"www.bing.com\",\"weight\":1,\"priority\":2,\"endpointLocation\":\"East US 2\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/nestedEndpoints\\/nested-profile-ep-1\",\"name\":\"nested-profile-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/nestedEndpoints\",\"properties\":{\"endpointStatus\":\"Disabled\",\"endpointMonitorStatus\":null,\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/nestedtm549169\",\"target\":\"nestedtmdns54236.trafficmanager.net\",\"weight\":1,\"priority\":4,\"endpointLocation\":\"Central India\",\"minChildEndpoints\":1,\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/azureEndpoints\\/azure-ep-1\",\"name\":\"azure-ep-1\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/azureEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"targetResourceId\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/publicIPAddresses\\/pip208738\",\"target\":\"contoso599813.eastus.cloudapp.azure.com\",\"weight\":2,\"priority\":5,\"endpointLocation\":\"East US\",\"NestedProfile\":null}},{\"id\":\"\\/subscriptions\\/00000000-0000-0000-0000-000000000000\\/resourceGroups\\/rg014436\\/providers\\/Microsoft.Network\\/trafficManagerProfiles\\/tm549169\\/externalEndpoints\\/external-ep-3\",\"name\":\"external-ep-3\",\"type\":\"Microsoft.Network\\/trafficManagerProfiles\\/externalEndpoints\",\"properties\":{\"endpointStatus\":\"Enabled\",\"endpointMonitorStatus\":\"CheckingEndpoint\",\"target\":\"www.github.com\",\"weight\":1,\"priority\":6,\"endpointLocation\":\"Central US\",\"NestedProfile\":null}}],\"trafficViewEnrollmentStatus\":\"Disabled\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg429676/providers/Microsoft.Network/trafficmanagerprofiles/tm429676?api-version=2018-04-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg014436/providers/Microsoft.Network/trafficmanagerprofiles/tm549169?api-version=2018-04-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (TrafficManagerManagementClient, 2018-04-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.trafficmanager/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "638d47e1-7c0d-4706-a6aa-3fd63422a23c", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:39 GMT", - "content-length" : "0", - "server" : "Microsoft-IIS/10.0", - "x-aspnet-version" : "4.0.30319", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "cf8563b8-92ee-4e49-b18a-fb54ff5e696e", - "x-content-type-options" : "nosniff", + "Date" : "Tue, 01 Sep 2020 04:49:15 GMT", + "x-ms-correlation-request-id" : "e1514ebb-416b-457c-b0ad-69eab9732164", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", "x-ms-ratelimit-remaining-subscription-resource-requests" : "10799", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022539Z:cf8563b8-92ee-4e49-b18a-fb54ff5e696e", - "x-powered-by" : "ASP.NET", - "cache-control" : "private", - "x-ms-request-id" : "cc6a3ead-bb8c-4fb6-9c4c-83e2ac90b244", - "Body" : "" - } + "Cache-Control" : "private", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044916Z:e1514ebb-416b-457c-b0ad-69eab9732164", + "X-AspNet-Version" : "4.0.30319", + "Content-Length" : "0", + "x-ms-request-id" : "638d47e1-7c0d-4706-a6aa-3fd63422a23c", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg429676?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg014436?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (14.0.1; Windows 10; 10.0)", + "x-ms-client-request-id" : "dbec59d2-2aca-4129-8bb5-745079e514d7", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 03 Feb 2020 02:25:42 GMT", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14997", - "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8f8f0ae3-1d8a-44c4-8086-6b0b2ce91d24", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "JAPANEAST:20200203T022543Z:8f8f0ae3-1d8a-44c4-8086-6b0b2ce91d24", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzQyOTY3Ni1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "8f8f0ae3-1d8a-44c4-8086-6b0b2ce91d24", - "Body" : "" - } + "Date" : "Tue, 01 Sep 2020 04:49:30 GMT", + "x-ms-correlation-request-id" : "c0fc3da4-a9f6-4311-ba02-e5b71bebc5d4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200901T044931Z:c0fc3da4-a9f6-4311-ba02-e5b71bebc5d4", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "c0fc3da4-a9f6-4311-ba02-e5b71bebc5d4", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzAxNDQzNi1FQVNUVVMiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null } ], - "variables" : [ "429676", "contoso836241", "tmdns64b556268", "74274e1c-01db-4264-a510-b7dd8749ddaa", "c05ed1ab-572f-442a-8bca-77fbebb86f12", "ea407552-c6f9-4690-940f-9658284ad96c", "dd68f3bc-dd9d-4cc7-ba15-3df97d70d6cf", "7271841a-cc74-46df-9bbc-f2938e83d0ea", "fd5a385e-50bf-4640-afa4-3999180e2aaa", "13855b97-d259-4962-9618-5ee07208122f", "1fd80775-2e24-47c0-82f3-8ed812a363dd", "1ba9f3f2-34b6-4e58-8ee0-2eea561f9933", "b1091ba6-f153-4c8c-a1fa-1efb5a8b7739", "c498bfc8-4180-447e-a297-38a31375b63f", "3764ac21-ab9d-4111-8607-b55dbf839a70", "d4d0e96a-6f29-4a2b-90a6-0c8ec8397eca", "e9938ad6-180e-4ae5-bb2b-819021f26a50", "1d6a9b81-b0d7-4f0b-99b8-34e1ddf2008e", "4d0f74bc-e481-4fc1-9c80-63bb5f0d758f", "8df3ebaa-de95-4a4c-9328-d39fc4b48834", "efd92152-f9c5-48e6-a39b-0b204aa619c3", "eb903af3-3cba-4b79-a35f-1ad932f43429", "18ea3cff-e7b2-4876-9312-ecc55870b0de", "40ebb4a3-68d9-4594-bbcd-6cee38c2e1f7", "0fe34ae1-5a69-446e-93e2-07b51e377772", "970c3435-62a0-4718-8c25-27c36b52462f", "3b6e0494-befa-4ed9-98bc-a90671b85da9", "c9f8d960-5da9-496d-955c-f8fa57addd4e", "84e9bb99-ff41-40fc-abd3-899a43305294", "4d5674cc-3ded-43bf-96af-5043ae379f9c", "0ed29652-6e3a-4735-b9a8-f8d5ee8b818f", "b23bf504-fb33-4310-809f-c580be40585d", "64052064-4925-4d93-bfe9-9e320f1dce14", "a692b11f-235e-46f4-a9f1-63f03729546f", "3b3b8107-00ef-4bd4-aecf-7b39767171d1", "72a6a8a9-f63e-4311-a3b4-82b1f114599d", "440f6d52-2d2c-4c03-9add-55e2c6f438a8", "c8857aed-fe00-496f-8aa7-23c653c00f65", "0f9e74ea-533a-4d1f-b16d-214f4e3149e3", "d8a98899-b0f4-4888-b216-ffa1724a18bc", "1f290253-9e0a-41aa-b979-4fc9d235faa8", "e92eeb00-fb86-4f9c-a219-c97824bb27ca", "521f6b43-dedb-48d5-a6f4-7792f5f5e64e", "3a6d046b-7954-40e9-a967-f059d4e7f868", "3ecc8272-00e2-41a7-8e72-cb0f245e583b", "98c27643-a030-45a3-8b15-9b2537865f5d", "576bff64-8f99-441e-96c8-af295029da33", "c23d027d-fdfd-4a6e-b1bf-be6b56782af3", "f3c7c012-8608-4b5a-8b8d-6206309c8cca", "274149e7-89bd-4750-811a-aba33222b784", "61770498-1d50-4ff3-b604-5261ca4f2d28", "ed8779b7-8e2f-4f45-9cf0-98eeb740f77f", "31dde945-9d0f-4196-9b2e-37e79ee568a0", "aac3c052-2b4e-40b4-99f0-7f48f392cb2f", "6ab11400-e078-43b1-bf88-206ea21a35c3", "bb48d4bf-69a5-49b4-8155-17701e58b27f", "ae89e731-da51-4f77-a513-9a55c459da33", "f003ddf9-55bf-4f22-8397-aaf62c9d670e", "6dbb2411-2b2b-40f0-9a25-0730a4371337", "8e9fcd38-b8b7-4b1a-9f39-c325b8c83ffc", "ecb3564e-d5e5-45a7-a6b9-a39938feda85", "7134d0e7-a12c-434a-a843-607a79801042", "bbcb05a3-4ec5-4404-ac67-76f8ed5bee22", "bf77fffd-3b7f-4e8b-b4d6-b9527d7a1fd7", "16a90e8e-f1d4-4a8f-8e1f-fb02b669eec9", "f5f399a6-21ca-47fa-b96e-e9e721505965", "166ea5a8-253d-458c-959c-7ebe22c3545d", "392b7943-b09e-42a2-8fad-e50d68c76e73", "2da36dd4-4a9d-4390-b5f1-26c35b062f03", "949f2744-0b6e-4715-8644-d813c0f3a02f", "2cd171e7-2d85-46bb-9c1a-a3d4e1ec5d74", "d49ee4a3-fb19-4337-a9cf-7db91d0a4c12", "950b70fa-a00b-4c4f-bdbd-faf4ab5acf27", "f33c24d8-42e1-4a63-bf81-3b07577942e6", "6578239f-9442-451c-b835-258403b149c2", "704b22fd-d5ad-48f0-ada7-8cad9bd37597", "d4d217c2-c077-43b7-a627-4085adea1b82", "0baca7a3-f09a-4525-b055-4391c17b1339", "c7d1079a-bc66-4e60-819e-10871c58d860", "5a6644d2-ad70-4723-8842-30dd45e825ec", "8e063736-8bde-4644-b655-7cb2fa7d195d", "08cc962f-a1c1-4431-8cb1-229b9006f441", "fbddec07-b22a-4da8-9704-be7489f39b2f", "544a7588-d522-4062-86b5-5d93644952d8", "6a87a8ec-0787-487b-8668-bee180c0b0d4", "5d846ffa-feb9-46f5-bb88-bc00e66693d9", "00463f7a-9abf-40ac-a41d-609e773f7040", "a8eac2b3-8d1d-4acf-aa3c-785e06a94e4e", "9f1e1b08-be88-427b-9eb0-34c6e05de85e", "33f1b755-1cfe-47b2-8b19-5ea3eef0991a", "330ffd37-889a-43c4-a6fe-4285b896c09c", "03cad704-fab1-4972-abdf-971fcde64dfd" ] + "variables" : [ "rg014436", "pip208738", "contoso599813", "tm549169", "tmdns54236" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/docs/SAMPLE.md b/sdk/resourcemanager/docs/SAMPLE.md index 3deba3ee0b3cb..50c68e65d0830 100644 --- a/sdk/resourcemanager/docs/SAMPLE.md +++ b/sdk/resourcemanager/docs/SAMPLE.md @@ -314,6 +314,14 @@ WebApp webApp = azure.webApps()

  • Configure deployment sources for functions
  • Manage authentication for functions
  • Get function logs
  • + + + + + Traffic Manager + diff --git a/sdk/resourcemanager/package.json b/sdk/resourcemanager/package.json index 870373fcffbab..9460db0d57b13 100644 --- a/sdk/resourcemanager/package.json +++ b/sdk/resourcemanager/package.json @@ -31,9 +31,13 @@ "credcheck_resources": "node credcheck.js --path=./azure-resourcemanager-resources/src/test/resources/session-records/", "credcheck_sql": "node credcheck.js --path=./azure-resourcemanager-sql/src/test/resources/session-records/", "credcheck_storage": "node credcheck.js --path=./azure-resourcemanager-storage/src/test/resources/session-records/", + "credcheck_appplatform": "node credcheck.js --path=./azure-resourcemanager-appplatform/src/test/resources/session-records/", + "credcheck_redis": "node credcheck.js --path=./azure-resourcemanager-redis/src/test/resources/session-records/", + "credcheck_eventhubs": "node credcheck.js --path=./azure-resourcemanager-eventhubs/src/test/resources/session-records/", + "credcheck_trafficmanager": "node credcheck.js --path=./azure-resourcemanager-trafficmanager/src/test/resources/session-records/", "credcheck_azure": "node credcheck.js --path=./azure-resourcemanager/src/test/resources/session-records/", "credcheck_samples": "node credcheck.js --path=./azure-resourcemanager-samples/src/test/resources/session-records/", - "credcheck_all": "run-s credcheck_appservice credcheck_authorization credcheck_compute credcheck_containerregistry credcheck_containerservice credcheck_cosmos credcheck_dns credcheck_keyvault credcheck_msi credcheck_monitor credcheck_network credcheck_resources credcheck_sql credcheck_storage credcheck_azure credcheck_samples", + "credcheck_all": "run-s credcheck_appservice credcheck_authorization credcheck_compute credcheck_containerregistry credcheck_containerservice credcheck_cosmos credcheck_dns credcheck_keyvault credcheck_msi credcheck_monitor credcheck_network credcheck_resources credcheck_sql credcheck_storage credcheck_appplatform credcheck_redis credcheck_eventhubs credcheck_trafficmanager credcheck_azure credcheck_samples", "servcheck": "node servcheck.js" }, "devDependencies": { diff --git a/sdk/resourcemanager/pom.xml b/sdk/resourcemanager/pom.xml index fd6eef5755963..9b730d82bed25 100644 --- a/sdk/resourcemanager/pom.xml +++ b/sdk/resourcemanager/pom.xml @@ -30,6 +30,7 @@ azure-resourcemanager-samples azure-resourcemanager-sql azure-resourcemanager-storage + azure-resourcemanager-trafficmanager azure-resourcemanager-test From bd08b9fbe0e8dd2de30705d2cc9ae905cf327f5b Mon Sep 17 00:00:00 2001 From: "David R. Williamson" Date: Tue, 1 Sep 2020 10:09:15 -0700 Subject: [PATCH 031/168] Remove Priyanka as ADT code owner (#14688) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a310272305332..2c45cac5358ae 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -37,7 +37,7 @@ /sdk/cosmos/azure-spring-data-2-3-cosmos/ @kushagraThapar @saragluna @yiliuTo @chenrujun @zhoufenqin @jialindai @mbhaskar # PRLabel: %DigitalTwins -/sdk/digitaltwins/ @drwill-ms @timtay-microsoft @abhipsaMisra @vinagesh @azabbasi @prmathur-microsoft @bikamani @barustum +/sdk/digitaltwins/ @drwill-ms @timtay-microsoft @abhipsaMisra @vinagesh @azabbasi @bikamani @barustum # PRLabel: %Event Hubs /sdk/eventhubs/ @conniey @srnagar @mssfang @yijunxiems From bafca90a47d7e3ab45ed887ed0f3ac3d54580321 Mon Sep 17 00:00:00 2001 From: Yijun Xie <48257664+YijunXieMS@users.noreply.github.com> Date: Tue, 1 Sep 2020 10:30:33 -0700 Subject: [PATCH 032/168] [Service Bus] Misc API changes from API review (#14598) --- .../azure-messaging-servicebus/CHANGELOG.md | 7 +- .../servicebus/LockRenewalOperation.java | 32 +++---- .../messaging/servicebus/ReceiverOptions.java | 29 +----- .../servicebus/ServiceBusClientBuilder.java | 62 +++++-------- .../servicebus/ServiceBusMessage.java | 14 +-- .../ServiceBusMessageSerializer.java | 33 ++++++- .../servicebus/ServiceBusReceivedMessage.java | 56 +++++------ .../ServiceBusReceiverAsyncClient.java | 20 ++-- .../servicebus/ServiceBusReceiverClient.java | 6 +- .../ServiceBusSenderAsyncClient.java | 12 +-- .../servicebus/ServiceBusSenderClient.java | 10 +- .../servicebus/UnnamedSessionManager.java | 13 ++- .../servicebus/UnnamedSessionReceiver.java | 21 ++--- .../ServiceBusAdministrationAsyncClient.java | 58 ++++++------ .../ServiceBusAdministrationClient.java | 56 +++++------ ...eInfo.java => QueueRuntimeProperties.java} | 8 +- ...ava => SubscriptionRuntimeProperties.java} | 19 +--- ...eInfo.java => TopicRuntimeProperties.java} | 21 ++++- .../implementation/ManagementChannel.java | 3 +- .../ServiceBusManagementNode.java | 5 +- .../ReceiveMessageAutoLockRenewal.java | 2 +- ...dScheduledMessageAndCancelAsyncSample.java | 4 +- .../servicebus/LockRenewalOperationTest.java | 36 +++---- .../ServiceBusClientBuilderTest.java | 33 +++++++ ...BusReceiverAsyncClientIntegrationTest.java | 22 ++--- .../ServiceBusReceiverAsyncClientTest.java | 23 ++--- ...rviceBusReceiverClientIntegrationTest.java | 8 +- .../ServiceBusReceiverClientTest.java | 14 +-- ...ceBusSenderAsyncClientIntegrationTest.java | 88 ++++++++++++++++-- .../ServiceBusSenderAsyncClientTest.java | 6 +- ...ServiceBusSenderClientIntegrationTest.java | 6 +- .../ServiceBusSenderClientTest.java | 6 +- .../azure/messaging/servicebus/TestUtils.java | 6 +- .../UnnamedSessionManagerIntegrationTest.java | 5 +- .../servicebus/UnnamedSessionManagerTest.java | 8 +- ...inistrationAsyncClientIntegrationTest.java | 93 ++++++++++--------- ...rviceBusAdministrationAsyncClientTest.java | 12 +-- .../ServiceBusAdministrationClientTest.java | 24 ++--- .../ManagementChannelTests.java | 6 +- .../ServiceBusManagementSerializerTest.java | 17 ++-- .../session-records/createQueue.json | 4 +- ...fo.json => getQueueRuntimeProperties.json} | 0 ... => getSubscriptionRuntimeProperties.json} | 0 ...fo.json => getTopicRuntimeProperties.json} | 0 sdk/servicebus/test-resources.json | 2 +- 45 files changed, 508 insertions(+), 402 deletions(-) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/{QueueRuntimeInfo.java => QueueRuntimeProperties.java} (96%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/{SubscriptionRuntimeInfo.java => SubscriptionRuntimeProperties.java} (88%) rename sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/{TopicRuntimeInfo.java => TopicRuntimeProperties.java} (78%) rename sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/{getQueueRuntimeInfo.json => getQueueRuntimeProperties.json} (100%) rename sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/{getSubscriptionRuntimeInfo.json => getSubscriptionRuntimeProperties.json} (100%) rename sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/{getTopicRuntimeInfo.json => getTopicRuntimeProperties.json} (100%) diff --git a/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md b/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md index 96aaff165b667..c6e7114bad31a 100644 --- a/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md @@ -1,6 +1,11 @@ # Release History ## 7.0.0-beta.6 (Unreleased) - +- Removed `ServiceBusReceiverClientBuilder.maxAutoLockRenewalDuration`. Use method `getAutoRenewMessageLock` of classes `ServiceBusReceiverClient` + and `ServiceBusReceiverAsyncClient` to lock messages and sessions. +- Updated datetime related APIs to use `java.time.OffsetDateTime` instead of `java.time.Instant`. +- Removed `scheduledMessageCount` from `SubscriptionRuntimeInfo` and added it to `TopicRuntimeInfo`. +- Changed `QueueRuntimeInfo`, `TopicRuntimeInfo` and `SubscriptionRuntimeInfo` to `QueueRuntimeProperties`, `TopicRuntimeProperties` + and `SubscriptionRuntimeProperties` respectively. ## 7.0.0-beta.5 (2020-08-11) - Remove public constructor for QueueDescription, TopicDescription, SubscriptionDescription. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/LockRenewalOperation.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/LockRenewalOperation.java index 1e34c3b9b0ab7..353c422866387 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/LockRenewalOperation.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/LockRenewalOperation.java @@ -14,7 +14,7 @@ import reactor.core.publisher.MonoProcessor; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; @@ -26,14 +26,14 @@ public class LockRenewalOperation implements AutoCloseable { private final ClientLogger logger = new ClientLogger(LockRenewalOperation.class); private final AtomicBoolean isDisposed = new AtomicBoolean(); - private final AtomicReference lockedUntil = new AtomicReference<>(); + private final AtomicReference lockedUntil = new AtomicReference<>(); private final AtomicReference throwable = new AtomicReference<>(); private final AtomicReference status = new AtomicReference<>(LockRenewalStatus.RUNNING); private final MonoProcessor cancellationProcessor = MonoProcessor.create(); private final String lockToken; private final boolean isSession; - private final Function> renewalOperation; + private final Function> renewalOperation; private final Disposable subscription; /** @@ -45,8 +45,8 @@ public class LockRenewalOperation implements AutoCloseable { * @param renewalOperation The renewal operation to call. */ LockRenewalOperation(String lockToken, Duration maxLockRenewalDuration, boolean isSession, - Function> renewalOperation) { - this(lockToken, maxLockRenewalDuration, isSession, renewalOperation, Instant.now()); + Function> renewalOperation) { + this(lockToken, maxLockRenewalDuration, isSession, renewalOperation, OffsetDateTime.now()); } /** @@ -59,7 +59,7 @@ public class LockRenewalOperation implements AutoCloseable { * @param renewalOperation The renewal operation to call. */ LockRenewalOperation(String lockToken, Duration maxLockRenewalDuration, boolean isSession, - Function> renewalOperation, Instant lockedUntil) { + Function> renewalOperation, OffsetDateTime lockedUntil) { this.lockToken = Objects.requireNonNull(lockToken, "'lockToken' cannot be null."); this.renewalOperation = Objects.requireNonNull(renewalOperation, "'renewalOperation' cannot be null."); this.isSession = isSession; @@ -77,11 +77,11 @@ public class LockRenewalOperation implements AutoCloseable { } /** - * Gets the current instant the message or session is locked until. + * Gets the current datetime the message or session is locked until. * - * @return the instant the message or session is locked until. + * @return the datetime the message or session is locked until. */ - public Instant getLockedUntil() { + public OffsetDateTime getLockedUntil() { return lockedUntil.get(); } @@ -146,13 +146,13 @@ public void close() { * @param maxLockRenewalDuration Duration to renew lock for. * @return The subscription for the operation. */ - private Disposable getRenewLockOperation(Instant initialLockedUntil, Duration maxLockRenewalDuration) { + private Disposable getRenewLockOperation(OffsetDateTime initialLockedUntil, Duration maxLockRenewalDuration) { if (maxLockRenewalDuration.isZero()) { status.set(LockRenewalStatus.COMPLETE); return Disposables.single(); } - final Instant now = Instant.now(); + final OffsetDateTime now = OffsetDateTime.now(); Duration initialInterval = Duration.between(now, initialLockedUntil); if (initialInterval.isNegative()) { @@ -179,16 +179,16 @@ private Disposable getRenewLockOperation(Instant initialLockedUntil, Duration ma .thenReturn(Flux.create(s -> s.next(interval))))) .takeUntilOther(cancellationSignals) .flatMap(delay -> { - logger.info("token[{}]. now[{}]. Starting lock renewal.", lockToken, Instant.now()); + logger.info("token[{}]. now[{}]. Starting lock renewal.", lockToken, OffsetDateTime.now()); return renewalOperation.apply(lockToken); }) - .map(instant -> { - final Duration next = Duration.between(Instant.now(), instant); - logger.info("token[{}]. nextExpiration[{}]. next: [{}]. isSession[{}]", lockToken, instant, next, + .map(offsetDateTime -> { + final Duration next = Duration.between(OffsetDateTime.now(), offsetDateTime); + logger.info("token[{}]. nextExpiration[{}]. next: [{}]. isSession[{}]", lockToken, offsetDateTime, next, isSession); sink.next(MessageUtils.adjustServerTimeout(next)); - return instant; + return offsetDateTime; }) .subscribe(until -> lockedUntil.set(until), error -> { diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ReceiverOptions.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ReceiverOptions.java index 06a9a4ac643c6..94a9364fd1511 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ReceiverOptions.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ReceiverOptions.java @@ -5,8 +5,6 @@ import com.azure.messaging.servicebus.models.ReceiveMode; -import java.time.Duration; - /** * Options set when creating a service bus receiver. */ @@ -17,39 +15,26 @@ class ReceiverOptions { private final boolean isRollingSessionReceiver; private final Integer maxConcurrentSessions; private final boolean isSessionReceiver; - private final Duration maxAutoLockRenewalDuration; - ReceiverOptions(ReceiveMode receiveMode, int prefetchCount, Duration maxAutoLockRenewalDuration) { + ReceiverOptions(ReceiveMode receiveMode, int prefetchCount) { this.receiveMode = receiveMode; this.prefetchCount = prefetchCount; - this.maxAutoLockRenewalDuration = maxAutoLockRenewalDuration; this.sessionId = null; this.isRollingSessionReceiver = false; this.maxConcurrentSessions = null; this.isSessionReceiver = false; } - ReceiverOptions(ReceiveMode receiveMode, int prefetchCount, Duration maxAutoLockRenewalDuration, + ReceiverOptions(ReceiveMode receiveMode, int prefetchCount, String sessionId, boolean isRollingSessionReceiver, Integer maxConcurrentSessions) { this.receiveMode = receiveMode; this.prefetchCount = prefetchCount; - this.maxAutoLockRenewalDuration = maxAutoLockRenewalDuration; this.sessionId = sessionId; this.isRollingSessionReceiver = isRollingSessionReceiver; this.maxConcurrentSessions = maxConcurrentSessions; this.isSessionReceiver = true; } - /** - * Gets whether or not auto-lock renewal is enabled. If the receiver is a session aware receiver, it renews the lock - * for the entire session; otherwise, renews the lock for each message. - * - * @return true if it renews the session or message lock; false otherwise. - */ - boolean autoLockRenewalEnabled() { - return maxAutoLockRenewalDuration != null && maxAutoLockRenewalDuration != Duration.ZERO; - } - /** * Gets the receive mode for the message. * @@ -104,14 +89,4 @@ public boolean isRollingSessionReceiver() { public Integer getMaxConcurrentSessions() { return maxConcurrentSessions; } - - /** - * Gets the maximum Duration to renew the message or session lock. - * - * @return The maximum Duration to renew the message or session lock; {@code null} or {@link Duration#ZERO} - * if auto-lock renewal is disabled. - */ - public Duration getMaxAutoLockRenewalDuration() { - return maxAutoLockRenewalDuration; - } } 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 a97ef33132cda..6ac47b834d7f4 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 @@ -39,7 +39,6 @@ import java.net.InetSocketAddress; import java.net.Proxy; -import java.time.Duration; import java.util.Locale; import java.util.Map; import java.util.Objects; @@ -474,6 +473,7 @@ public final class ServiceBusSenderClientBuilder { private String queueName; private String topicName; private String viaQueueName; + private String viaTopicName; private ServiceBusSenderClientBuilder() { } @@ -504,6 +504,20 @@ public ServiceBusSenderClientBuilder viaQueueName(String viaQueueName) { return this; } + /** + * Sets the name of the initial destination Service Bus topic to publish messages to. + * + * @param viaTopicName The initial destination of the message. + * + * @return The modified {@link ServiceBusSenderClientBuilder} object. + * + * @see Send Via + */ + public ServiceBusSenderClientBuilder viaTopicName(String viaTopicName) { + this.viaTopicName = viaTopicName; + return this; + } + /** * Sets the name of the Service Bus topic to publish messages to. * @@ -536,9 +550,13 @@ public ServiceBusSenderAsyncClient buildAsyncClient() { if (!CoreUtils.isNullOrEmpty(viaQueueName) && entityType == MessagingEntityType.SUBSCRIPTION) { throw logger.logExceptionAsError(new IllegalStateException(String.format( "(%s), Via queue feature work only with a queue.", viaQueueName))); + } else if (!CoreUtils.isNullOrEmpty(viaTopicName) && entityType == MessagingEntityType.QUEUE) { + throw logger.logExceptionAsError(new IllegalStateException(String.format( + "(%s), Via topic feature work only with a topic.", viaTopicName))); } final String entityName; + final String viaEntityName = !CoreUtils.isNullOrEmpty(viaQueueName) ? viaQueueName : viaTopicName; switch (entityType) { case QUEUE: entityName = queueName; @@ -555,7 +573,7 @@ public ServiceBusSenderAsyncClient buildAsyncClient() { } return new ServiceBusSenderAsyncClient(entityName, entityType, connectionProcessor, retryOptions, - tracerProvider, messageSerializer, ServiceBusClientBuilder.this::onClientClose, viaQueueName); + tracerProvider, messageSerializer, ServiceBusClientBuilder.this::onClientClose, viaEntityName); } /** @@ -591,23 +609,10 @@ public final class ServiceBusSessionReceiverClientBuilder { private String sessionId; private String subscriptionName; private String topicName; - private Duration maxAutoLockRenewalDuration; private ServiceBusSessionReceiverClientBuilder() { } - /** - * Enables auto-lock renewal by renewing each session lock until the {@code maxAutoLockRenewalDuration} has - * elapsed. - * - * @param maxAutoLockRenewalDuration Maximum amount of time to renew the session lock. - * @return The modified {@link ServiceBusSessionReceiverClientBuilder} object. - */ - public ServiceBusSessionReceiverClientBuilder maxAutoLockRenewalDuration(Duration maxAutoLockRenewalDuration) { - this.maxAutoLockRenewalDuration = maxAutoLockRenewalDuration; - return this; - } - /** * Enables session processing roll-over by processing at most {@code maxConcurrentSessions}. * @@ -725,11 +730,11 @@ public ServiceBusReceiverAsyncClient buildAsyncClient() { final String entityPath = getEntityPath(logger, entityType, queueName, topicName, subscriptionName, SubQueue.NONE); - validateAndThrow(prefetchCount, maxAutoLockRenewalDuration); + validateAndThrow(prefetchCount); final ServiceBusConnectionProcessor connectionProcessor = getOrCreateConnectionProcessor(messageSerializer); final ReceiverOptions receiverOptions = new ReceiverOptions(receiveMode, prefetchCount, - maxAutoLockRenewalDuration, sessionId, isRollingSessionReceiver(), maxConcurrentSessions); + sessionId, isRollingSessionReceiver(), maxConcurrentSessions); if (CoreUtils.isNullOrEmpty(sessionId)) { final UnnamedSessionManager sessionManager = new UnnamedSessionManager(entityPath, entityType, @@ -798,23 +803,10 @@ public final class ServiceBusReceiverClientBuilder { private ReceiveMode receiveMode = ReceiveMode.PEEK_LOCK; private String subscriptionName; private String topicName; - private Duration maxAutoLockRenewalDuration; private ServiceBusReceiverClientBuilder() { } - /** - * Enables auto-lock renewal by renewing each message lock renewal until the {@code maxAutoLockRenewalDuration} - * has elapsed. - * - * @param maxAutoLockRenewalDuration Maximum amount of time to renew the session lock. - * @return The modified {@link ServiceBusReceiverClientBuilder} object. - */ - public ServiceBusReceiverClientBuilder maxAutoLockRenewalDuration(Duration maxAutoLockRenewalDuration) { - this.maxAutoLockRenewalDuration = maxAutoLockRenewalDuration; - return this; - } - /** * Sets the prefetch count of the receiver. For both {@link ReceiveMode#PEEK_LOCK PEEK_LOCK} and {@link * ReceiveMode#RECEIVE_AND_DELETE RECEIVE_AND_DELETE} modes the default value is 1. @@ -914,11 +906,10 @@ public ServiceBusReceiverAsyncClient buildAsyncClient() { queueName); final String entityPath = getEntityPath(logger, entityType, queueName, topicName, subscriptionName, subQueue); - validateAndThrow(prefetchCount, maxAutoLockRenewalDuration); + validateAndThrow(prefetchCount); final ServiceBusConnectionProcessor connectionProcessor = getOrCreateConnectionProcessor(messageSerializer); - final ReceiverOptions receiverOptions = new ReceiverOptions(receiveMode, prefetchCount, - maxAutoLockRenewalDuration); + final ReceiverOptions receiverOptions = new ReceiverOptions(receiveMode, prefetchCount); return new ServiceBusReceiverAsyncClient(connectionProcessor.getFullyQualifiedNamespace(), entityPath, entityType, receiverOptions, connectionProcessor, ServiceBusConstants.OPERATION_TIMEOUT, @@ -942,13 +933,10 @@ public ServiceBusReceiverClient buildClient() { } } - private void validateAndThrow(int prefetchCount, Duration maxAutoLockRenewalDuration) { + private void validateAndThrow(int prefetchCount) { if (prefetchCount < 1) { throw logger.logExceptionAsError(new IllegalArgumentException(String.format( "prefetchCount (%s) cannot be less than 1.", prefetchCount))); - } else if (maxAutoLockRenewalDuration != null && maxAutoLockRenewalDuration.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "maxAutoLockRenewalDuration (%s) cannot be negative.", maxAutoLockRenewalDuration))); } } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java index 71c3d937fafc0..aa54261b7dbd4 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java @@ -7,7 +7,7 @@ import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +44,7 @@ public class ServiceBusMessage { private String partitionKey; private String replyTo; private String replyToSessionId; - private Instant scheduledEnqueueTime; + private OffsetDateTime scheduledEnqueueTime; private String sessionId; private Duration timeToLive; private String to; @@ -332,27 +332,27 @@ public ServiceBusMessage setTimeToLive(Duration timeToLive) { *

    * This value is used for delayed message availability. The message is safely added to the queue, but is not * considered active and therefore not retrievable until the scheduled enqueue time. Mind that the message may not - * be activated (enqueued) at the exact given instant; the actual activation time depends on the queue's workload + * be activated (enqueued) at the exact given datetime; the actual activation time depends on the queue's workload * and its state. *

    * - * @return the instant at which the message will be enqueued in Azure Service Bus + * @return the datetime at which the message will be enqueued in Azure Service Bus * @see Message Sequencing and * Timestamps */ - public Instant getScheduledEnqueueTime() { + public OffsetDateTime getScheduledEnqueueTime() { return scheduledEnqueueTime; } /** * Sets the scheduled enqueue time of this message. * - * @param scheduledEnqueueTime the instant at which this message should be enqueued in Azure Service Bus. + * @param scheduledEnqueueTime the datetime at which this message should be enqueued in Azure Service Bus. * * @return The updated {@link ServiceBusMessage}. * @see #getScheduledEnqueueTime() */ - public ServiceBusMessage setScheduledEnqueueTime(Instant scheduledEnqueueTime) { + public ServiceBusMessage setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime) { this.scheduledEnqueueTime = scheduledEnqueueTime; return this; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageSerializer.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageSerializer.java index a8eac0e245a7c..9e06ac82c6748 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageSerializer.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageSerializer.java @@ -34,6 +34,8 @@ import java.lang.reflect.Array; import java.time.Duration; import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -154,7 +156,7 @@ public Message serialize(T object) { final Map messageAnnotationsMap = new HashMap<>(); if (brokeredMessage.getScheduledEnqueueTime() != null) { messageAnnotationsMap.put(Symbol.valueOf(SCHEDULED_ENQUEUE_TIME_NAME), - Date.from(brokeredMessage.getScheduledEnqueueTime())); + Date.from(brokeredMessage.getScheduledEnqueueTime().toInstant())); } final String partitionKey = brokeredMessage.getPartitionKey(); @@ -191,6 +193,8 @@ public T deserialize(Message message, Class clazz) { public List deserializeList(Message message, Class clazz) { if (clazz == ServiceBusReceivedMessage.class) { return (List) deserializeListOfMessages(message); + } else if (clazz == OffsetDateTime.class) { + return (List) deserializeListOfOffsetDateTime(message); } else if (clazz == Instant.class) { return (List) deserializeListOfInstant(message); } else if (clazz == Long.class) { @@ -219,8 +223,25 @@ private List deserializeListOfLong(Message amqpMessage) { return Collections.emptyList(); } - private List deserializeListOfInstant(Message amqpMessage) { + private List deserializeListOfOffsetDateTime(Message amqpMessage) { + if (amqpMessage.getBody() instanceof AmqpValue) { + AmqpValue amqpValue = ((AmqpValue) amqpMessage.getBody()); + if (amqpValue.getValue() instanceof Map) { + @SuppressWarnings("unchecked") + Map responseBody = (Map) amqpValue.getValue(); + Object expirationListObj = responseBody.get(ManagementConstants.EXPIRATIONS); + + if (expirationListObj instanceof Date[]) { + return Arrays.stream((Date[]) expirationListObj) + .map(date -> date.toInstant().atOffset(ZoneOffset.UTC)) + .collect(Collectors.toList()); + } + } + } + return Collections.emptyList(); + } + private List deserializeListOfInstant(Message amqpMessage) { if (amqpMessage.getBody() instanceof AmqpValue) { AmqpValue amqpValue = ((AmqpValue) amqpMessage.getBody()); if (amqpValue.getValue() instanceof Map) { @@ -365,16 +386,18 @@ private ServiceBusReceivedMessage deserializeMessage(Message amqpMessage) { switch (key) { case ENQUEUED_TIME_UTC_NAME: - brokeredMessage.setEnqueuedTime(((Date) value).toInstant()); + brokeredMessage.setEnqueuedTime(((Date) value).toInstant().atOffset(ZoneOffset.UTC)); + break; case SCHEDULED_ENQUEUE_TIME_NAME: - brokeredMessage.setScheduledEnqueueTime(((Date) value).toInstant()); + brokeredMessage.setScheduledEnqueueTime(((Date) value).toInstant() + .atOffset(ZoneOffset.UTC)); break; case SEQUENCE_NUMBER_NAME: brokeredMessage.setSequenceNumber((long) value); break; case LOCKED_UNTIL_NAME: - brokeredMessage.setLockedUntil(((Date) value).toInstant()); + brokeredMessage.setLockedUntil(((Date) value).toInstant().atOffset(ZoneOffset.UTC)); break; case PARTITION_KEY_NAME: brokeredMessage.setPartitionKey((String) value); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceivedMessage.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceivedMessage.java index 4e925c868369a..e709f04901e93 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceivedMessage.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceivedMessage.java @@ -6,7 +6,7 @@ import com.azure.messaging.servicebus.models.ReceiveMode; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,8 +21,8 @@ public final class ServiceBusReceivedMessage { private long sequenceNumber; private long enqueuedSequenceNumber; private long deliveryCount; - private Instant enqueuedTime; - private Instant lockedUntil; + private OffsetDateTime enqueuedTime; + private OffsetDateTime lockedUntil; private String deadLetterSource; private final Map properties; @@ -34,7 +34,7 @@ public final class ServiceBusReceivedMessage { private String partitionKey; private String replyTo; private String replyToSessionId; - private Instant scheduledEnqueueTime; + private OffsetDateTime scheduledEnqueueTime; private String sessionId; private Duration timeToLive; private String to; @@ -153,34 +153,34 @@ public long getEnqueuedSequenceNumber() { } /** - * Gets the instant at which this message was enqueued in Azure Service Bus. + * Gets the datetime at which this message was enqueued in Azure Service Bus. *

    - * The UTC instant at which the message has been accepted and stored in the entity. For scheduled messages, this + * The UTC datetime at which the message has been accepted and stored in the entity. For scheduled messages, this * reflects the time when the message was activated. This value can be used as an authoritative and neutral arrival * time indicator when the receiver does not want to trust the sender's clock. This property is read-only. * - * @return the instant at which the message was enqueued in Azure Service Bus + * @return the datetime at which the message was enqueued in Azure Service Bus * * @see Message Sequencing and * Timestamps */ - public Instant getEnqueuedTime() { + public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } /** - * Gets the instant at which this message will expire. + * Gets the datetime at which this message will expire. *

    - * The value is the UTC instant for when the message is scheduled for removal and will no longer available for + * The value is the UTC datetime for when the message is scheduled for removal and will no longer available for * retrieval from the entity due to expiration. Expiry is controlled by the {@link #getTimeToLive() TimeToLive} * property. This property is computed from {@link #getEnqueuedTime() EnqueuedTime} plus {@link #getTimeToLive() * TimeToLive}. * - * @return {@link Instant} at which this message expires + * @return {@link OffsetDateTime} at which this message expires * * @see Message Expiration */ - public Instant getExpiresAt() { + public OffsetDateTime getExpiresAt() { final Duration timeToLive = getTimeToLive(); return enqueuedTime != null && timeToLive != null ? enqueuedTime.plus(timeToLive) @@ -218,20 +218,20 @@ public String getLockToken() { } /** - * Gets the instant at which the lock of this message expires. + * Gets the datetime at which the lock of this message expires. *

    * For messages retrieved under a lock (peek-lock receive mode, not pre-settled) this property reflects the UTC - * instant until which the message is held locked in the queue/subscription. When the lock expires, the {@link + * datetime until which the message is held locked in the queue/subscription. When the lock expires, the {@link * #getDeliveryCount() DeliveryCount} is incremented and the message is again available for retrieval. This property * is read-only. * - * @return the instant at which the lock of this message expires if the message is received using {@link + * @return the datetime at which the lock of this message expires if the message is received using {@link * ReceiveMode#PEEK_LOCK} mode. Otherwise it returns null. * * @see Message * transfers, locks, and settlement */ - public Instant getLockedUntil() { + public OffsetDateTime getLockedUntil() { return lockedUntil; } @@ -308,16 +308,16 @@ public String getReplyToSessionId() { *

    * This value is used for delayed message availability. The message is safely added to the queue, but is not * considered active and therefore not retrievable until the scheduled enqueue time. Mind that the message may not - * be activated (enqueued) at the exact given instant; the actual activation time depends on the queue's workload + * be activated (enqueued) at the exact given datetime; the actual activation time depends on the queue's workload * and its state. *

    * - * @return the instant at which the message will be enqueued in Azure Service Bus + * @return the datetime at which the message will be enqueued in Azure Service Bus * * @see Message Sequencing and * Timestamps */ - public Instant getScheduledEnqueueTime() { + public OffsetDateTime getScheduledEnqueueTime() { return scheduledEnqueueTime; } @@ -350,7 +350,7 @@ public String getSessionId() { /** * Gets the duration before this message expires. *

    - * This value is the relative duration after which the message expires, starting from the instant the message has + * This value is the relative duration after which the message expires, starting from the datetime the message has * been accepted and stored by the broker, as captured in {@link #getScheduledEnqueueTime()}. When not set * explicitly, the assumed value is the DefaultTimeToLive set for the respective queue or topic. A message-level * TimeToLive value cannot be longer than the entity's DefaultTimeToLive setting and it is silently adjusted if it @@ -451,11 +451,11 @@ void setEnqueuedSequenceNumber(long enqueuedSequenceNumber) { } /** - * Sets the instant at which this message was enqueued in Azure Service Bus. + * Sets the datetime at which this message was enqueued in Azure Service Bus. * - * @param enqueuedTime the instant at which this message was enqueued in Azure Service Bus. + * @param enqueuedTime the datetime at which this message was enqueued in Azure Service Bus. */ - void setEnqueuedTime(Instant enqueuedTime) { + void setEnqueuedTime(OffsetDateTime enqueuedTime) { this.enqueuedTime = enqueuedTime; } @@ -478,11 +478,11 @@ void setLockToken(UUID lockToken) { } /** - * Sets the instant at which the lock of this message expires. + * Sets the datetime at which the lock of this message expires. * - * @param lockedUntil the instant at which the lock of this message expires. + * @param lockedUntil the datetime at which the lock of this message expires. */ - void setLockedUntil(Instant lockedUntil) { + void setLockedUntil(OffsetDateTime lockedUntil) { this.lockedUntil = lockedUntil; } @@ -509,11 +509,11 @@ void setPartitionKey(String partitionKey) { /** * Sets the scheduled enqueue time of this message. * - * @param scheduledEnqueueTime the instant at which this message should be enqueued in Azure Service Bus. + * @param scheduledEnqueueTime the datetime at which this message should be enqueued in Azure Service Bus. * * @see #getScheduledEnqueueTime() */ - void setScheduledEnqueueTime(Instant scheduledEnqueueTime) { + void setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime) { this.scheduledEnqueueTime = scheduledEnqueueTime; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java index b4b388e26ec4c..fe6941ba72756 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java @@ -29,6 +29,8 @@ import java.time.Duration; import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Collections; import java.util.Map; import java.util.Objects; @@ -90,7 +92,7 @@ public final class ServiceBusReceiverAsyncClient implements AutoCloseable { private final LockContainer renewalContainer; private final AtomicBoolean isDisposed = new AtomicBoolean(); - private final LockContainer managementNodeLocks; + private final LockContainer managementNodeLocks; private final ClientLogger logger = new ClientLogger(ServiceBusReceiverAsyncClient.class); private final String fullyQualifiedNamespace; private final String entityPath; @@ -1000,7 +1002,8 @@ sessionId, getLinkName(sessionId), Collections.singleton(sequenceNumber)).last() } if (receiverOptions.getReceiveMode() == ReceiveMode.PEEK_LOCK) { receivedMessage.setLockedUntil(managementNodeLocks.addOrUpdate(receivedMessage.getLockToken(), - receivedMessage.getLockedUntil(), receivedMessage.getLockedUntil())); + receivedMessage.getLockedUntil().toInstant(), + receivedMessage.getLockedUntil()).atOffset(ZoneOffset.UTC)); } return receivedMessage; @@ -1045,7 +1048,8 @@ sessionId, getLinkName(sessionId), sequenceNumbers)) } if (receiverOptions.getReceiveMode() == ReceiveMode.PEEK_LOCK) { receivedMessage.setLockedUntil(managementNodeLocks.addOrUpdate(receivedMessage.getLockToken(), - receivedMessage.getLockedUntil(), receivedMessage.getLockedUntil())); + receivedMessage.getLockedUntil().toInstant(), + receivedMessage.getLockedUntil()).atOffset(ZoneOffset.UTC)); } return receivedMessage; @@ -1068,7 +1072,7 @@ sessionId, getLinkName(sessionId), sequenceNumbers)) * @throws IllegalStateException if the receiver is a session receiver. * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public Mono renewMessageLock(String lockToken) { + public Mono renewMessageLock(String lockToken) { if (isDisposed.get()) { return monoError(logger, new IllegalStateException( String.format(INVALID_OPERATION_DISPOSED_RECEIVER, "renewMessageLock"))); @@ -1085,7 +1089,8 @@ public Mono renewMessageLock(String lockToken) { .flatMap(connection -> connection.getManagementNode(entityPath, entityType)) .flatMap(serviceBusManagementNode -> serviceBusManagementNode.renewMessageLock(lockToken, getLinkName(null))) - .map(instant -> managementNodeLocks.addOrUpdate(lockToken, instant, instant)); + .map(instant -> managementNodeLocks.addOrUpdate(lockToken, instant, + instant.atOffset(ZoneOffset.UTC)).atOffset(ZoneOffset.UTC)); } /** @@ -1096,7 +1101,7 @@ public Mono renewMessageLock(String lockToken) { * @return The next expiration time for the session lock. * @throws IllegalStateException if the receiver is a non-session receiver. */ - public Mono renewSessionLock(String sessionId) { + public Mono renewSessionLock(String sessionId) { if (isDisposed.get()) { return monoError(logger, new IllegalStateException( String.format(INVALID_OPERATION_DISPOSED_RECEIVER, "renewSessionLock"))); @@ -1110,7 +1115,8 @@ public Mono renewSessionLock(String sessionId) { return connectionProcessor .flatMap(connection -> connection.getManagementNode(entityPath, entityType)) - .flatMap(channel -> channel.renewSessionLock(sessionId, linkName)); + .flatMap(channel -> channel.renewSessionLock(sessionId, linkName) + .map(instant -> instant.atOffset(ZoneOffset.UTC))); } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java index 9e39b6fc0eebb..87bba9fb8eb67 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java @@ -13,7 +13,7 @@ import reactor.core.publisher.FluxSink; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.Map; import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; @@ -771,7 +771,7 @@ public IterableStream receiveDeferredMessageBatch(Ite * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @throws IllegalStateException if the receiver is a session receiver. */ - public Instant renewMessageLock(String lockToken) { + public OffsetDateTime renewMessageLock(String lockToken) { return asyncClient.renewMessageLock(lockToken).block(operationTimeout); } @@ -783,7 +783,7 @@ public Instant renewMessageLock(String lockToken) { * @return The next expiration time for the session lock. * @throws IllegalStateException if the receiver is a non-session receiver. */ - public Instant renewSessionLock(String sessionId) { + public OffsetDateTime renewSessionLock(String sessionId) { return asyncClient.renewSessionLock(sessionId).block(operationTimeout); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java index ac5905868293a..c4fde770c3fc2 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java @@ -27,7 +27,7 @@ import reactor.core.publisher.Mono; import reactor.core.publisher.Signal; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -291,7 +291,7 @@ public Mono createBatch(CreateBatchOptions options) { * enqueued and made available to receivers only at the scheduled enqueue time. * * @param message Message to be sent to the Service Bus Queue. - * @param scheduledEnqueueTime Instant at which the message should appear in the Service Bus queue or topic. + * @param scheduledEnqueueTime OffsetDateTime at which the message should appear in the Service Bus queue or topic. * @param transactionContext to be set on message before sending to Service Bus. * * @return The sequence number of the scheduled message which can be used to cancel the scheduling of the message. @@ -299,7 +299,7 @@ public Mono createBatch(CreateBatchOptions options) { * @throws NullPointerException if {@code message}, {@code scheduledEnqueueTime}, {@code transactionContext} or * {@code transactionContext.transactionID} is {@code null}. */ - public Mono scheduleMessage(ServiceBusMessage message, Instant scheduledEnqueueTime, + public Mono scheduleMessage(ServiceBusMessage message, OffsetDateTime scheduledEnqueueTime, ServiceBusTransactionContext transactionContext) { if (Objects.isNull(transactionContext)) { return monoError(logger, new NullPointerException("'transactionContext' cannot be null.")); @@ -316,13 +316,13 @@ public Mono scheduleMessage(ServiceBusMessage message, Instant scheduledEn * enqueued and made available to receivers only at the scheduled enqueue time. * * @param message Message to be sent to the Service Bus Queue. - * @param scheduledEnqueueTime Instant at which the message should appear in the Service Bus queue or topic. + * @param scheduledEnqueueTime OffsetDateTime at which the message should appear in the Service Bus queue or topic. * * @return The sequence number of the scheduled message which can be used to cancel the scheduling of the message. * * @throws NullPointerException if {@code message} or {@code scheduledEnqueueTime} is {@code null}. */ - public Mono scheduleMessage(ServiceBusMessage message, Instant scheduledEnqueueTime) { + public Mono scheduleMessage(ServiceBusMessage message, OffsetDateTime scheduledEnqueueTime) { return scheduleMessageInternal(message, scheduledEnqueueTime, null); } @@ -426,7 +426,7 @@ private Mono sendIterable(Iterable messages, ServiceBus }); } - private Mono scheduleMessageInternal(ServiceBusMessage message, Instant scheduledEnqueueTime, + private Mono scheduleMessageInternal(ServiceBusMessage message, OffsetDateTime scheduledEnqueueTime, ServiceBusTransactionContext transactionContext) { if (Objects.isNull(message)) { return monoError(logger, new NullPointerException("'message' cannot be null.")); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderClient.java index dea6431ea8789..ea978360464bc 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderClient.java @@ -8,7 +8,7 @@ import com.azure.messaging.servicebus.models.CreateBatchOptions; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.Objects; /** @@ -176,13 +176,13 @@ public void sendMessages(ServiceBusMessageBatch batch, ServiceBusTransactionCont * enqueued and made available to receivers only at the scheduled enqueue time. * * @param message Message to be sent to the Service Bus Queue or Topic. - * @param scheduledEnqueueTime Instant at which the message should appear in the Service Bus queue or topic. + * @param scheduledEnqueueTime Datetime at which the message should appear in the Service Bus queue or topic. * * @return The sequence number of the scheduled message which can be used to cancel the scheduling of the message. * * @throws NullPointerException if {@code message} or {@code scheduledEnqueueTime} is {@code null}. */ - public Long scheduleMessage(ServiceBusMessage message, Instant scheduledEnqueueTime) { + public Long scheduleMessage(ServiceBusMessage message, OffsetDateTime scheduledEnqueueTime) { return asyncClient.scheduleMessage(message, scheduledEnqueueTime).block(tryTimeout); } @@ -191,7 +191,7 @@ public Long scheduleMessage(ServiceBusMessage message, Instant scheduledEnqueueT * enqueued and made available to receivers only at the scheduled enqueue time. * * @param message Message to be sent to the Service Bus Queue or Topic. - * @param scheduledEnqueueTime Instant at which the message should appear in the Service Bus queue or topic. + * @param scheduledEnqueueTime Datetime at which the message should appear in the Service Bus queue or topic. * @param transactionContext to be set on message before sending to Service Bus. * * @return The sequence number of the scheduled message which can be used to cancel the scheduling of the message. @@ -200,7 +200,7 @@ public Long scheduleMessage(ServiceBusMessage message, Instant scheduledEnqueueT * {@code transactionContext.transactionId} is {@code null}. * @throws NullPointerException if is null. */ - public Long scheduleMessage(ServiceBusMessage message, Instant scheduledEnqueueTime, + public Long scheduleMessage(ServiceBusMessage message, OffsetDateTime scheduledEnqueueTime, ServiceBusTransactionContext transactionContext) { return asyncClient.scheduleMessage(message, scheduledEnqueueTime, transactionContext).block(tryTimeout); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/UnnamedSessionManager.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/UnnamedSessionManager.java index 8bac6d058ffc4..38a29130650ae 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/UnnamedSessionManager.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/UnnamedSessionManager.java @@ -27,7 +27,8 @@ import reactor.util.retry.Retry; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Collections; import java.util.Deque; import java.util.List; @@ -160,7 +161,7 @@ Flux receive() { * @return The next expiration time for the session lock. * @throws IllegalStateException if the receiver is a non-session receiver. */ - Mono renewSessionLock(String sessionId) { + Mono renewSessionLock(String sessionId) { return validateParameter(sessionId, "sessionId", "renewSessionLock").then( getManagementNode().flatMap(channel -> { final UnnamedSessionReceiver receiver = sessionReceivers.get(sessionId); @@ -168,10 +169,10 @@ Mono renewSessionLock(String sessionId) { return channel.renewSessionLock(sessionId, associatedLinkName).handle((instant, sink) -> { if (receiver != null) { - receiver.setSessionLockedUntil(instant); + receiver.setSessionLockedUntil(instant.atOffset(ZoneOffset.UTC)); } - sink.next(instant); + sink.next(instant.atOffset(ZoneOffset.UTC)); }); })); } @@ -283,9 +284,7 @@ private Flux getSession(Scheduler scheduler, b } return new UnnamedSessionReceiver(link, messageSerializer, connectionProcessor.getRetryOptions(), - receiverOptions.getPrefetchCount(), disposeOnIdle, scheduler, - receiverOptions.autoLockRenewalEnabled(), receiverOptions.getMaxAutoLockRenewalDuration(), - this::renewSessionLock); + receiverOptions.getPrefetchCount(), disposeOnIdle, scheduler, this::renewSessionLock); }))) .flatMapMany(session -> session.receive().doFinally(signalType -> { logger.verbose("Adding scheduler back to pool."); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/UnnamedSessionReceiver.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/UnnamedSessionReceiver.java index 7a7b12ef7f25b..cdd095b0b8353 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/UnnamedSessionReceiver.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/UnnamedSessionReceiver.java @@ -20,7 +20,8 @@ import reactor.core.scheduler.Scheduler; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; @@ -30,8 +31,8 @@ */ class UnnamedSessionReceiver implements AutoCloseable { private final AtomicBoolean isDisposed = new AtomicBoolean(); - private final LockContainer lockContainer; - private final AtomicReference sessionLockedUntil = new AtomicReference<>(); + private final LockContainer lockContainer; + private final AtomicReference sessionLockedUntil = new AtomicReference<>(); private final AtomicReference sessionId = new AtomicReference<>(); private final AtomicReference renewalOperation = new AtomicReference<>(); private final ClientLogger logger = new ClientLogger(UnnamedSessionReceiver.class); @@ -52,14 +53,11 @@ class UnnamedSessionReceiver implements AutoCloseable { * @param disposeOnIdle true to dispose the session receiver if there are no more messages and the receiver is * idle. * @param scheduler The scheduler to publish messages on. - * @param maxSessionLockRenewDuration Maximum time to renew the session lock for. {@code null} or {@link - * Duration#ZERO} to disable session lock renewal. * @param renewSessionLock Function to renew the session lock. */ UnnamedSessionReceiver(ServiceBusReceiveLink receiveLink, MessageSerializer messageSerializer, AmqpRetryOptions retryOptions, int prefetch, boolean disposeOnIdle, Scheduler scheduler, - boolean enableSessionLockRenewal, Duration maxSessionLockRenewDuration, - Function> renewSessionLock) { + Function> renewSessionLock) { this.receiveLink = receiveLink; this.lockContainer = new LockContainer<>(ServiceBusConstants.OPERATION_TIMEOUT); @@ -80,7 +78,7 @@ class UnnamedSessionReceiver implements AutoCloseable { //TODO (conniey): For session receivers, do they have a message lock token? if (!CoreUtils.isNullOrEmpty(deserialized.getLockToken()) && deserialized.getLockedUntil() != null) { - lockContainer.addOrUpdate(deserialized.getLockToken(), deserialized.getLockedUntil(), + lockContainer.addOrUpdate(deserialized.getLockToken(), deserialized.getLockedUntil().toInstant(), deserialized.getLockedUntil()); } else { logger.info("sessionId[{}] message[{}]. There is no lock token.", @@ -128,14 +126,13 @@ class UnnamedSessionReceiver implements AutoCloseable { } })); this.subscriptions.add(receiveLink.getSessionLockedUntil().subscribe(lockedUntil -> { - if (!sessionLockedUntil.compareAndSet(null, lockedUntil)) { + if (!sessionLockedUntil.compareAndSet(null, lockedUntil.atOffset(ZoneOffset.UTC))) { logger.info("SessionLockedUntil was already set: {}", sessionLockedUntil); return; } - final Duration maxRenewal = enableSessionLockRenewal ? maxSessionLockRenewDuration : Duration.ZERO; this.renewalOperation.compareAndSet(null, new LockRenewalOperation(sessionId.get(), - maxRenewal, true, renewSessionLock, lockedUntil)); + Duration.ZERO, true, renewSessionLock, lockedUntil.atOffset(ZoneOffset.UTC))); })); } @@ -181,7 +178,7 @@ Flux receive() { * * @param lockedUntil Gets the time when the session is locked until. */ - void setSessionLockedUntil(Instant lockedUntil) { + void setSessionLockedUntil(OffsetDateTime lockedUntil) { sessionLockedUntil.set(lockedUntil); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClient.java index c6575fc3f3789..2203d80f8b445 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClient.java @@ -28,12 +28,12 @@ import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; import com.azure.messaging.servicebus.administration.models.NamespaceProperties; import com.azure.messaging.servicebus.administration.models.QueueProperties; -import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; import com.azure.messaging.servicebus.administration.models.RuleProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionProperties; -import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeProperties; import com.azure.messaging.servicebus.administration.models.TopicProperties; -import com.azure.messaging.servicebus.administration.models.TopicRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.TopicRuntimeProperties; import com.azure.messaging.servicebus.implementation.EntitiesImpl; import com.azure.messaging.servicebus.implementation.EntityHelper; import com.azure.messaging.servicebus.implementation.RulesImpl; @@ -644,11 +644,11 @@ public Mono> getQueueExistsWithResponse(String queueName) { } /** - * Gets runtime information about the queue. + * Gets runtime properties about the queue. * * @param queueName Name of queue to get information about. * - * @return A Mono that completes with runtime information about the queue. + * @return A Mono that completes with runtime properties about the queue. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -658,16 +658,16 @@ public Mono> getQueueExistsWithResponse(String queueName) { * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getQueueRuntimeInfo(String queueName) { - return getQueueRuntimeInfoWithResponse(queueName).map(response -> response.getValue()); + public Mono getQueueRuntimeProperties(String queueName) { + return getQueueRuntimePropertiesWithResponse(queueName).map(response -> response.getValue()); } /** - * Gets runtime information about the queue along with its HTTP response. + * Gets runtime properties about the queue along with its HTTP response. * * @param queueName Name of queue to get information about. * - * @return A Mono that completes with runtime information about the queue and the associated HTTP response. + * @return A Mono that completes with runtime properties about the queue and the associated HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -677,8 +677,8 @@ public Mono getQueueRuntimeInfo(String queueName) { * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getQueueRuntimeInfoWithResponse(String queueName) { - return withContext(context -> getQueueWithResponse(queueName, context, QueueRuntimeInfo::new)); + public Mono> getQueueRuntimePropertiesWithResponse(String queueName) { + return withContext(context -> getQueueWithResponse(queueName, context, QueueRuntimeProperties::new)); } /** @@ -820,12 +820,12 @@ public Mono> getSubscriptionExistsWithResponse(String topicNam } /** - * Gets runtime information about the subscription. + * Gets runtime properties about the subscription. * * @param topicName Name of topic associated with subscription. * @param subscriptionName Name of subscription to get information about. * - * @return A Mono that completes with runtime information about the subscription. + * @return A Mono that completes with runtime properties about the subscription. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -835,18 +835,19 @@ public Mono> getSubscriptionExistsWithResponse(String topicNam * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSubscriptionRuntimeInfo(String topicName, String subscriptionName) { - return getSubscriptionRuntimeInfoWithResponse(topicName, subscriptionName) + public Mono getSubscriptionRuntimeProperties( + String topicName, String subscriptionName) { + return getSubscriptionRuntimePropertiesWithResponse(topicName, subscriptionName) .map(response -> response.getValue()); } /** - * Gets runtime information about the subscription. + * Gets runtime properties about the subscription. * * @param topicName Name of topic associated with subscription. * @param subscriptionName Name of subscription to get information about. * - * @return A Mono that completes with runtime information about the subscription. + * @return A Mono that completes with runtime properties about the subscription. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -856,11 +857,10 @@ public Mono getSubscriptionRuntimeInfo(String topicName * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSubscriptionRuntimeInfoWithResponse(String topicName, - String subscriptionName) { - + public Mono> getSubscriptionRuntimePropertiesWithResponse( + String topicName, String subscriptionName) { return withContext(context -> getSubscriptionWithResponse(topicName, subscriptionName, context, - SubscriptionRuntimeInfo::new)); + SubscriptionRuntimeProperties::new)); } /** @@ -936,11 +936,11 @@ public Mono> getTopicExistsWithResponse(String topicName) { } /** - * Gets runtime information about the topic. + * Gets runtime properties about the topic. * * @param topicName Name of topic to get information about. * - * @return A Mono that completes with runtime information about the topic. + * @return A Mono that completes with runtime properties about the topic. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -950,16 +950,16 @@ public Mono> getTopicExistsWithResponse(String topicName) { * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTopicRuntimeInfo(String topicName) { - return getTopicRuntimeInfoWithResponse(topicName).map(response -> response.getValue()); + public Mono getTopicRuntimeProperties(String topicName) { + return getTopicRuntimePropertiesWithResponse(topicName).map(response -> response.getValue()); } /** - * Gets runtime information about the topic with its HTTP response. + * Gets runtime properties about the topic with its HTTP response. * * @param topicName Name of topic to get information about. * - * @return A Mono that completes with runtime information about the topic and the associated HTTP response. + * @return A Mono that completes with runtime properties about the topic and the associated HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -969,8 +969,8 @@ public Mono getTopicRuntimeInfo(String topicName) { * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTopicRuntimeInfoWithResponse(String topicName) { - return withContext(context -> getTopicWithResponse(topicName, context, TopicRuntimeInfo::new)); + public Mono> getTopicRuntimePropertiesWithResponse(String topicName) { + return withContext(context -> getTopicWithResponse(topicName, context, TopicRuntimeProperties::new)); } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClient.java index 1af995b296b85..ae06c8a6ebde8 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClient.java @@ -20,12 +20,12 @@ import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; import com.azure.messaging.servicebus.administration.models.NamespaceProperties; import com.azure.messaging.servicebus.administration.models.QueueProperties; -import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; import com.azure.messaging.servicebus.administration.models.RuleProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionProperties; -import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeProperties; import com.azure.messaging.servicebus.administration.models.TopicProperties; -import com.azure.messaging.servicebus.administration.models.TopicRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.TopicRuntimeProperties; import reactor.core.publisher.Mono; import java.time.Duration; @@ -554,11 +554,11 @@ public Response getQueueExistsWithResponse(String queueName, Context co } /** - * Gets runtime information about the queue. + * Gets runtime properties about the queue. * * @param queueName Name of queue to get information about. * - * @return Runtime information about the queue. + * @return Runtime properties about the queue. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -568,17 +568,17 @@ public Response getQueueExistsWithResponse(String queueName, Context co * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public QueueRuntimeInfo getQueueRuntimeInfo(String queueName) { - return asyncClient.getQueueRuntimeInfo(queueName).block(); + public QueueRuntimeProperties getQueueRuntimeProperties(String queueName) { + return asyncClient.getQueueRuntimeProperties(queueName).block(); } /** - * Gets runtime information about the queue along with its HTTP response. + * Gets runtime properties about the queue along with its HTTP response. * * @param queueName Name of queue to get information about. * @param context Additional context that is passed through the HTTP pipeline during the service call. * - * @return Runtime information about the queue and the associated HTTP response. + * @return Runtime properties about the queue and the associated HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -588,9 +588,9 @@ public QueueRuntimeInfo getQueueRuntimeInfo(String queueName) { * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getQueueRuntimeInfoWithResponse(String queueName, Context context) { + public Response getQueueRuntimePropertiesWithResponse(String queueName, Context context) { return asyncClient.getQueueWithResponse(queueName, context != null ? context : Context.NONE, - QueueRuntimeInfo::new).block(); + QueueRuntimeProperties::new).block(); } /** @@ -743,12 +743,12 @@ public Response getSubscriptionExistsWithResponse(String topicName, Str } /** - * Gets runtime information about the subscription. + * Gets runtime properties about the subscription. * * @param topicName Name of topic associated with subscription. * @param subscriptionName Name of subscription to get information about. * - * @return Runtime information about the subscription. + * @return Runtime properties about the subscription. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -758,18 +758,18 @@ public Response getSubscriptionExistsWithResponse(String topicName, Str * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public SubscriptionRuntimeInfo getSubscriptionRuntimeInfo(String topicName, String subscriptionName) { - return asyncClient.getSubscriptionRuntimeInfo(topicName, subscriptionName).block(); + public SubscriptionRuntimeProperties getSubscriptionRuntimeProperties(String topicName, String subscriptionName) { + return asyncClient.getSubscriptionRuntimeProperties(topicName, subscriptionName).block(); } /** - * Gets runtime information about the subscription. + * Gets runtime properties about the subscription. * * @param topicName Name of topic associated with subscription. * @param subscriptionName Name of subscription to get information about. * @param context Additional context that is passed through the HTTP pipeline during the service call. * - * @return Runtime information about the subscription. + * @return Runtime properties about the subscription. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -779,10 +779,10 @@ public SubscriptionRuntimeInfo getSubscriptionRuntimeInfo(String topicName, Stri * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSubscriptionRuntimeInfoWithResponse(String topicName, - String subscriptionName, Context context) { + public Response getSubscriptionRuntimePropertiesWithResponse( + String topicName, String subscriptionName, Context context) { return asyncClient.getSubscriptionWithResponse(topicName, subscriptionName, - context != null ? context : Context.NONE, SubscriptionRuntimeInfo::new).block(); + context != null ? context : Context.NONE, SubscriptionRuntimeProperties::new).block(); } /** @@ -864,11 +864,11 @@ public Response getTopicExistsWithResponse(String topicName, Context co } /** - * Gets runtime information about the topic. + * Gets runtime properties about the topic. * * @param topicName Name of topic to get information about. * - * @return Runtime information about the topic. + * @return Runtime properties about the topic. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -878,17 +878,17 @@ public Response getTopicExistsWithResponse(String topicName, Context co * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public TopicRuntimeInfo getTopicRuntimeInfo(String topicName) { - return asyncClient.getTopicRuntimeInfo(topicName).block(); + public TopicRuntimeProperties getTopicRuntimeProperties(String topicName) { + return asyncClient.getTopicRuntimeProperties(topicName).block(); } /** - * Gets runtime information about the topic with its HTTP response. + * Gets runtime properties about the topic with its HTTP response. * * @param topicName Name of topic to get information about. * @param context Additional context that is passed through the HTTP pipeline during the service call. * - * @return Runtime information about the topic and the associated HTTP response. + * @return Runtime properties about the topic and the associated HTTP response. * @throws ClientAuthenticationException if the client's credentials do not have access to modify the * namespace. * @throws HttpResponseException If error occurred processing the request. @@ -898,9 +898,9 @@ public TopicRuntimeInfo getTopicRuntimeInfo(String topicName) { * @see Get Entity */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTopicRuntimeInfoWithResponse(String topicName, Context context) { + public Response getTopicRuntimePropertiesWithResponse(String topicName, Context context) { return asyncClient.getTopicWithResponse(topicName, context != null ? context : Context.NONE, - TopicRuntimeInfo::new).block(); + TopicRuntimeProperties::new).block(); } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueRuntimeInfo.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueRuntimeProperties.java similarity index 96% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueRuntimeInfo.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueRuntimeProperties.java index 9498fc4ce5687..53c287a1542b6 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueRuntimeInfo.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueRuntimeProperties.java @@ -10,10 +10,10 @@ import java.util.Objects; /** - * Runtime information about the queue. + * Runtime properties about the queue. */ @Immutable -public class QueueRuntimeInfo { +public class QueueRuntimeProperties { private final String name; private final long messageCount; private final long sizeInBytes; @@ -29,11 +29,11 @@ public class QueueRuntimeInfo { /** * Creates a new instance with runtime properties extracted from the given QueueDescription. * - * @param queueProperties Queue description to extract runtime information from. + * @param queueProperties Queue description to extract runtime properties from. * * @throws NullPointerException if {@code queueDescription} is null. */ - public QueueRuntimeInfo(QueueProperties queueProperties) { + public QueueRuntimeProperties(QueueProperties queueProperties) { Objects.requireNonNull(queueProperties, "'queueProperties' cannot be null."); this.name = queueProperties.getName(); this.messageCount = queueProperties.getMessageCount(); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SubscriptionRuntimeInfo.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SubscriptionRuntimeProperties.java similarity index 88% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SubscriptionRuntimeInfo.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SubscriptionRuntimeProperties.java index bc42d711e737b..829fae3995c6b 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SubscriptionRuntimeInfo.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SubscriptionRuntimeProperties.java @@ -10,10 +10,10 @@ import java.util.Objects; /** - * Runtime information about a subscription. + * Runtime properties about a subscription. */ @Immutable -public class SubscriptionRuntimeInfo { +public class SubscriptionRuntimeProperties { private final String subscriptionName; private final String topicName; private final long messageCount; @@ -22,7 +22,6 @@ public class SubscriptionRuntimeInfo { private final OffsetDateTime updatedAt; private final int activeMessageCount; private final int deadLetterMessageCount; - private final int scheduledMessageCount; private final int transferDeadLetterMessageCount; private final int transferMessageCount; @@ -30,11 +29,11 @@ public class SubscriptionRuntimeInfo { /** * Creates a new instance with runtime properties extracted from the given SubscriptionDescription. * - * @param subscriptionProperties Subscription description to extract runtime information from. + * @param subscriptionProperties Subscription description to extract runtime properties from. * * @throws NullPointerException if {@code subscriptionDescription} is null. */ - public SubscriptionRuntimeInfo(SubscriptionProperties subscriptionProperties) { + public SubscriptionRuntimeProperties(SubscriptionProperties subscriptionProperties) { Objects.requireNonNull(subscriptionProperties, "'subscriptionProperties' cannot be null."); this.subscriptionName = subscriptionProperties.getSubscriptionName(); this.topicName = subscriptionProperties.getTopicName(); @@ -46,7 +45,6 @@ public SubscriptionRuntimeInfo(SubscriptionProperties subscriptionProperties) { final MessageCountDetails details = subscriptionProperties.getMessageCountDetails(); this.activeMessageCount = details != null ? details.getActiveMessageCount() : 0; this.deadLetterMessageCount = details != null ? details.getDeadLetterMessageCount() : 0; - this.scheduledMessageCount = details != null ? details.getScheduledMessageCount() : 0; this.transferDeadLetterMessageCount = details != null ? details.getTransferDeadLetterMessageCount() : 0; this.transferMessageCount = details != null ? details.getTransferMessageCount() : 0; } @@ -96,15 +94,6 @@ public long getTotalMessageCount() { return messageCount; } - /** - * Get the scheduledMessageCount property: Number of scheduled messages. - * - * @return the scheduledMessageCount value. - */ - public int getScheduledMessageCount() { - return this.scheduledMessageCount; - } - /** * Get the transferDeadLetterMessageCount property: Number of messages transferred into dead letters. * diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicRuntimeInfo.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicRuntimeProperties.java similarity index 78% rename from sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicRuntimeInfo.java rename to sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicRuntimeProperties.java index 7cac4d0bb9e10..7b7dcf5b4215d 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicRuntimeInfo.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicRuntimeProperties.java @@ -4,30 +4,32 @@ package com.azure.messaging.servicebus.administration.models; import com.azure.core.annotation.Immutable; +import com.azure.messaging.servicebus.implementation.models.MessageCountDetails; import java.time.OffsetDateTime; import java.util.Objects; /** - * Runtime information about the topic. + * Runtime properties about the topic. */ @Immutable -public class TopicRuntimeInfo { +public class TopicRuntimeProperties { private final String name; private final int subscriptionCount; private final long sizeInBytes; private final OffsetDateTime accessedAt; private final OffsetDateTime createdAt; private final OffsetDateTime updatedAt; + private final int scheduledMessageCount; /** * Creates a new instance with runtime properties extracted from the given TopicDescription. * - * @param topicProperties Topic description to extract runtime information from. + * @param topicProperties Topic description to extract runtime properties from. * * @throws NullPointerException if {@code topicDescription} is null. */ - public TopicRuntimeInfo(TopicProperties topicProperties) { + public TopicRuntimeProperties(TopicProperties topicProperties) { Objects.requireNonNull(topicProperties, "'topicDescription' cannot be null."); this.name = topicProperties.getName(); @@ -36,6 +38,8 @@ public TopicRuntimeInfo(TopicProperties topicProperties) { this.accessedAt = topicProperties.getAccessedAt(); this.createdAt = topicProperties.getCreatedAt(); this.updatedAt = topicProperties.getUpdatedAt(); + final MessageCountDetails details = topicProperties.getMessageCountDetails(); + this.scheduledMessageCount = details != null ? details.getScheduledMessageCount() : 0; } /** @@ -74,6 +78,15 @@ public long getSizeInBytes() { return sizeInBytes; } + /** + * Get the scheduledMessageCount property: Number of scheduled messages. + * + * @return the scheduledMessageCount value. + */ + public int getScheduledMessageCount() { + return this.scheduledMessageCount; + } + /** * Gets the number of subscriptions to the topic. * diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ManagementChannel.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ManagementChannel.java index 78aa352f88bbf..a190f6ac64f47 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ManagementChannel.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ManagementChannel.java @@ -36,6 +36,7 @@ import java.nio.BufferOverflowException; import java.time.Duration; import java.time.Instant; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -286,7 +287,7 @@ public Mono renewSessionLock(String sessionId, String associatedLinkNam * {@inheritDoc} */ @Override - public Mono schedule(ServiceBusMessage message, Instant scheduledEnqueueTime, int maxLinkSize, + public Mono schedule(ServiceBusMessage message, OffsetDateTime scheduledEnqueueTime, int maxLinkSize, String associatedLinkName, ServiceBusTransactionContext transactionContext) { message.setScheduledEnqueueTime(scheduledEnqueueTime); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementNode.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementNode.java index 0eab5b3f8bdbb..2e9013600bd9c 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementNode.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementNode.java @@ -11,6 +11,7 @@ import reactor.core.publisher.Mono; import java.time.Instant; +import java.time.OffsetDateTime; import java.util.Map; /** @@ -93,13 +94,13 @@ Flux receiveDeferredMessages(ReceiveMode receiveMode, * the message. * * @param message The message to be sent to the entity. - * @param scheduledEnqueueTime The {@link Instant} at which the message should be enqueued in the entity. + * @param scheduledEnqueueTime The {@link OffsetDateTime} at which the message should be enqueued in the entity. * @param transactionContext to be set on message before sending to Service Bus. * * @return The sequence number representing the pending send, which returns the sequence number of the scheduled * message. This sequence number can be used to cancel the scheduling of the message. */ - Mono schedule(ServiceBusMessage message, Instant scheduledEnqueueTime, int maxSendLinkSize, + Mono schedule(ServiceBusMessage message, OffsetDateTime scheduledEnqueueTime, int maxSendLinkSize, String associatedLinkName, ServiceBusTransactionContext transactionContext); /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAutoLockRenewal.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAutoLockRenewal.java index 4e00223e93d79..7ff52c49e5755 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAutoLockRenewal.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAutoLockRenewal.java @@ -37,12 +37,12 @@ public static void main(String[] args) throws InterruptedException { ServiceBusReceiverAsyncClient receiver = new ServiceBusClientBuilder() .connectionString(connectionString) .receiver() - .maxAutoLockRenewalDuration(Duration.ofSeconds(120)) .queueName("<>") .buildAsyncClient(); Disposable subscription = receiver.receiveMessages() .flatMap(context -> { + receiver.getAutoRenewMessageLock(context.getMessage().getLockToken(), Duration.ofSeconds(120)); boolean messageProcessed = false; // Process the context and its message here. // Change the `messageProcessed` according to you business logic and if you are able to process the diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendScheduledMessageAndCancelAsyncSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendScheduledMessageAndCancelAsyncSample.java index 460feb585b284..ecea37ffe80d0 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendScheduledMessageAndCancelAsyncSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendScheduledMessageAndCancelAsyncSample.java @@ -3,7 +3,7 @@ package com.azure.messaging.servicebus; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; @@ -44,7 +44,7 @@ public static void main(String[] args) throws InterruptedException { // Scheduling the message to appear in the queue one minute from now. // Following call returns a Mono, which we subscribe to. It completes successfully when the message has // been scheduled. It completes with an error if an exception occurs while scheduling the message. - sender.scheduleMessage(message, Instant.now().plusSeconds(60)) + sender.scheduleMessage(message, OffsetDateTime.now().plusSeconds(60)) .subscribe(sequenceNumber -> { System.out.printf("Sequence number of scheduled message: %s%n", sequenceNumber); messageSequenceNumber.set(sequenceNumber); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/LockRenewalOperationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/LockRenewalOperationTest.java index f4875ece72212..467b5d23988f4 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/LockRenewalOperationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/LockRenewalOperationTest.java @@ -16,7 +16,7 @@ import reactor.core.publisher.Mono; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.ArrayDeque; import java.util.Deque; import java.util.concurrent.TimeUnit; @@ -42,7 +42,7 @@ class LockRenewalOperationTest { private LockRenewalOperation operation; @Mock - private Function> renewalOperation; + private Function> renewalOperation; @BeforeEach void beforeEach() { @@ -61,10 +61,10 @@ void afterEach() { void constructor(boolean isSession) { // Arrange final Duration renewalPeriod = Duration.ofSeconds(4); - final Instant lockedUntil = Instant.now().plus(renewalPeriod); + final OffsetDateTime lockedUntil = OffsetDateTime.now().plus(renewalPeriod); final Duration maxDuration = Duration.ofSeconds(20); when(renewalOperation.apply(A_LOCK_TOKEN)) - .thenReturn(Mono.fromCallable(() -> Instant.now().plus(renewalPeriod))); + .thenReturn(Mono.fromCallable(() -> OffsetDateTime.now().plus(renewalPeriod))); // Act operation = new LockRenewalOperation(A_LOCK_TOKEN, maxDuration, isSession, renewalOperation, lockedUntil); @@ -91,26 +91,26 @@ void errors() throws InterruptedException { // Arrange final boolean isSession = true; final Duration renewalPeriod = Duration.ofSeconds(2); - final Instant lockedUntil = Instant.now().plus(renewalPeriod); + final OffsetDateTime lockedUntil = OffsetDateTime.now().plus(renewalPeriod); final Duration maxDuration = Duration.ofSeconds(6); final Duration totalSleepPeriod = renewalPeriod.plus(renewalPeriod).plusMillis(500); final Throwable testError = new IllegalAccessException("A test error"); - final AtomicReference lastLockedUntil = new AtomicReference<>(); + final AtomicReference lastLockedUntil = new AtomicReference<>(); - final Deque> responses = new ArrayDeque<>(); + final Deque> responses = new ArrayDeque<>(); responses.add(Mono.fromCallable(() -> { - final Instant plus = Instant.now().plus(renewalPeriod); + final OffsetDateTime plus = OffsetDateTime.now().plus(renewalPeriod); lastLockedUntil.set(plus); return plus; })); responses.add(Mono.error(testError)); responses.add(Mono.fromCallable(() -> { fail("Should not have been called."); - return Instant.now(); + return OffsetDateTime.now(); })); when(renewalOperation.apply(A_LOCK_TOKEN)).thenAnswer(invocation -> { - final Mono instantMono = responses.pollFirst(); + final Mono instantMono = responses.pollFirst(); return instantMono != null ? instantMono : Mono.error(new IllegalStateException("Should have fetched an item.")); @@ -138,11 +138,11 @@ void completes() throws InterruptedException { // At most 4 times because we renew the lock before it expires (by some seconds). final int atMost = 4; - final Instant lockedUntil = Instant.now().plus(renewalPeriod); + final OffsetDateTime lockedUntil = OffsetDateTime.now().plus(renewalPeriod); final Duration totalSleepPeriod = maxDuration.plusMillis(500); when(renewalOperation.apply(A_LOCK_TOKEN)) - .thenReturn(Mono.fromCallable(() -> Instant.now().plus(renewalPeriod))); + .thenReturn(Mono.fromCallable(() -> OffsetDateTime.now().plus(renewalPeriod))); operation = new LockRenewalOperation(A_LOCK_TOKEN, maxDuration, false, renewalOperation, lockedUntil); @@ -172,11 +172,11 @@ void cancellation() throws InterruptedException { // At most 3 times because we renew the lock before it expires (by some seconds). final int atMost = 2; - final Instant lockedUntil = Instant.now().plus(renewalPeriod); + final OffsetDateTime lockedUntil = OffsetDateTime.now().plus(renewalPeriod); final Duration totalSleepPeriod = renewalPeriod.plusMillis(1000); when(renewalOperation.apply(A_LOCK_TOKEN)) - .thenReturn(Mono.fromCallable(() -> Instant.now().plus(renewalPeriod))); + .thenReturn(Mono.fromCallable(() -> OffsetDateTime.now().plus(renewalPeriod))); operation = new LockRenewalOperation(A_LOCK_TOKEN, maxDuration, false, renewalOperation, lockedUntil); @@ -205,10 +205,10 @@ void renewDurationZero() throws InterruptedException { // Arrange final Duration maxDuration = Duration.ZERO; final Duration renewalPeriod = Duration.ofSeconds(3); - final Instant lockedUntil = Instant.now().plus(renewalPeriod); + final OffsetDateTime lockedUntil = OffsetDateTime.now().plus(renewalPeriod); when(renewalOperation.apply(A_LOCK_TOKEN)) - .thenReturn(Mono.fromCallable(() -> Instant.now().plus(renewalPeriod))); + .thenReturn(Mono.fromCallable(() -> OffsetDateTime.now().plus(renewalPeriod))); operation = new LockRenewalOperation(A_LOCK_TOKEN, maxDuration, false, renewalOperation, lockedUntil); @@ -235,11 +235,11 @@ void completesRenewFirst() throws InterruptedException { // At most 4 times because we renew the lock before it expires (by some seconds). final int atLeast = 4; - final Instant lockedUntil = Instant.now(); + final OffsetDateTime lockedUntil = OffsetDateTime.now(); final Duration totalSleepPeriod = maxDuration.plusMillis(500); when(renewalOperation.apply(A_LOCK_TOKEN)) - .thenReturn(Mono.fromCallable(() -> Instant.now().plus(renewalPeriod))); + .thenReturn(Mono.fromCallable(() -> OffsetDateTime.now().plus(renewalPeriod))); operation = new LockRenewalOperation(A_LOCK_TOKEN, maxDuration, false, renewalOperation); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java index 996a668fd8434..675f296a51038 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java @@ -27,6 +27,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; class ServiceBusClientBuilderTest { private static final String NAMESPACE_NAME = "dummyNamespaceName"; @@ -35,6 +36,7 @@ class ServiceBusClientBuilderTest { private static final String QUEUE_NAME = "test-queue-name"; private static final String VIA_QUEUE_NAME = "test-via-queue-name"; private static final String TOPIC_NAME = "test-topic-name"; + private static final String VIA_TOPIC_NAME = "test-via-queue-name"; private static final String SHARED_ACCESS_KEY_NAME = "dummySasKeyName"; private static final String SHARED_ACCESS_KEY = "dummySasKey"; private static final String ENDPOINT = getUri(ENDPOINT_FORMAT, NAMESPACE_NAME, DEFAULT_DOMAIN_NAME).toString(); @@ -63,6 +65,19 @@ void viaQueueNameWithTopicNotAllowed() { assertThrows(IllegalStateException.class, () -> builder.buildAsyncClient()); } + @Test + void viaTopicNameWithQueueNotAllowed() { + // Arrange + ServiceBusSenderClientBuilder builder = new ServiceBusClientBuilder() + .connectionString(NAMESPACE_CONNECTION_STRING) + .sender() + .queueName(QUEUE_NAME) + .viaTopicName(VIA_TOPIC_NAME); + + // Act & Assert + assertThrows(IllegalStateException.class, () -> builder.buildAsyncClient()); + } + @Test void queueClientWithViaQueueName() { // Arrange @@ -77,6 +92,24 @@ void queueClientWithViaQueueName() { // Assert assertNotNull(client); + assertEquals(client.getEntityPath(), QUEUE_NAME); + } + + @Test + void topicClientWithViaTopicName() { + // Arrange + final ServiceBusSenderClientBuilder builder = new ServiceBusClientBuilder() + .connectionString(NAMESPACE_CONNECTION_STRING) + .sender() + .topicName(TOPIC_NAME) + .viaTopicName(VIA_TOPIC_NAME); + + // Act + final ServiceBusSenderAsyncClient client = builder.buildAsyncClient(); + + // Assert + assertNotNull(client); + assertEquals(client.getEntityPath(), TOPIC_NAME); } @Test diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java index 6926ce8a23060..a20bcd986d978 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java @@ -21,7 +21,7 @@ import reactor.test.StepVerifier; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -425,7 +425,7 @@ void sendScheduledMessageAndReceive(MessagingEntityType entityType, boolean isSe final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); - final Instant scheduledEnqueueTime = Instant.now().plusSeconds(2); + final OffsetDateTime scheduledEnqueueTime = OffsetDateTime.now().plusSeconds(2); sender.scheduleMessage(message, scheduledEnqueueTime).block(TIMEOUT); @@ -449,7 +449,7 @@ void cancelScheduledMessage(MessagingEntityType entityType, boolean isSessionEna final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); - final Instant scheduledEnqueueTime = Instant.now().plusSeconds(10); + final OffsetDateTime scheduledEnqueueTime = OffsetDateTime.now().plusSeconds(10); final Duration delayDuration = Duration.ofSeconds(3); final Long sequenceNumber = sender.scheduleMessage(message, scheduledEnqueueTime).block(TIMEOUT); @@ -653,7 +653,7 @@ void receiveAndRenewLock(MessagingEntityType entityType) { assertNotNull(receivedMessage); assertNotNull(receivedMessage.getLockedUntil()); - final Instant initialLock = receivedMessage.getLockedUntil(); + final OffsetDateTime initialLock = receivedMessage.getLockedUntil(); logger.info("Received message. Seq: {}. lockedUntil: {}", receivedMessage.getSequenceNumber(), initialLock); // Assert & Act @@ -699,16 +699,16 @@ void autoRenewLockOnReceiveMessage(MessagingEntityType entityType, boolean isSes assertNotNull(received.getLockToken()); logger.info("{}: lockToken[{}]. lockedUntil[{}]. now[{}]", received.getSequenceNumber(), - received.getLockToken(), received.getLockedUntil(), Instant.now()); + received.getLockToken(), received.getLockedUntil(), OffsetDateTime.now()); - final Instant initial = received.getLockedUntil(); - final Instant timeToStop = initial.plusSeconds(5); - Instant latest = Instant.MIN; + final OffsetDateTime initial = received.getLockedUntil(); + final OffsetDateTime timeToStop = initial.plusSeconds(5); + OffsetDateTime latest = OffsetDateTime.MIN; // Simulate some sort of long processing. final AtomicInteger iteration = new AtomicInteger(); - while (Instant.now().isBefore(timeToStop)) { - logger.info("Iteration {}: {}. Time to stop: {}", iteration.incrementAndGet(), Instant.now(), timeToStop); + while (OffsetDateTime.now().isBefore(timeToStop)) { + logger.info("Iteration {}: {}. Time to stop: {}", iteration.incrementAndGet(), OffsetDateTime.now(), timeToStop); try { TimeUnit.SECONDS.sleep(4); @@ -993,7 +993,7 @@ void renewMessageLock(MessagingEntityType entityType) throws InterruptedExceptio final ServiceBusReceivedMessage receivedMessage = receivedContext.getMessage(); assertNotNull(receivedMessage); - final Instant lockedUntil = receivedMessage.getLockedUntil(); + final OffsetDateTime lockedUntil = receivedMessage.getLockedUntil(); assertNotNull(lockedUntil); final LockRenewalOperation operation = receiver.getAutoRenewMessageLock( 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 120a512c89a00..cae2c70325189 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 @@ -50,6 +50,8 @@ import java.time.Duration; import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -124,7 +126,7 @@ class ServiceBusReceiverAsyncClientTest { @Mock private Runnable onClientClose; @Mock - private Function> renewalOperation; + private Function> renewalOperation; @BeforeAll static void beforeAll() { @@ -168,11 +170,11 @@ CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, new AmqpRe connectionOptions.getRetry())); receiver = new ServiceBusReceiverAsyncClient(NAMESPACE, ENTITY_PATH, MessagingEntityType.QUEUE, - new ReceiverOptions(ReceiveMode.PEEK_LOCK, PREFETCH, maxAutoLockRenewalDuration), connectionProcessor, CLEANUP_INTERVAL, + new ReceiverOptions(ReceiveMode.PEEK_LOCK, PREFETCH), connectionProcessor, CLEANUP_INTERVAL, tracerProvider, messageSerializer, onClientClose); sessionReceiver = new ServiceBusReceiverAsyncClient(NAMESPACE, ENTITY_PATH, MessagingEntityType.QUEUE, - new ReceiverOptions(ReceiveMode.PEEK_LOCK, PREFETCH, maxAutoLockRenewalDuration, "Some-Session", false, null), + new ReceiverOptions(ReceiveMode.PEEK_LOCK, PREFETCH, "Some-Session", false, null), connectionProcessor, CLEANUP_INTERVAL, tracerProvider, messageSerializer, onClientClose); } @@ -374,7 +376,7 @@ void completeNullMessage() { */ @Test void completeInReceiveAndDeleteMode() { - final ReceiverOptions options = new ReceiverOptions(ReceiveMode.RECEIVE_AND_DELETE, PREFETCH, maxAutoLockRenewalDuration); + final ReceiverOptions options = new ReceiverOptions(ReceiveMode.RECEIVE_AND_DELETE, PREFETCH); ServiceBusReceiverAsyncClient client = new ServiceBusReceiverAsyncClient(NAMESPACE, ENTITY_PATH, MessagingEntityType.QUEUE, options, connectionProcessor, CLEANUP_INTERVAL, tracerProvider, messageSerializer, onClientClose); @@ -442,7 +444,7 @@ void deadLetterWithDescription() { .setDeadLetterErrorDescription(description) .setPropertiesToModify(propertiesToModify); - final Instant expiration = Instant.now().plus(Duration.ofMinutes(5)); + final OffsetDateTime expiration = OffsetDateTime.now().plus(Duration.ofMinutes(5)); final MessageWithLockToken message = mock(MessageWithLockToken.class); @@ -473,7 +475,7 @@ void settleMessageOnManagement(DispositionStatus dispositionStatus) { // Arrange final String lockToken1 = UUID.randomUUID().toString(); final String lockToken2 = UUID.randomUUID().toString(); - final Instant expiration = Instant.now().plus(Duration.ofMinutes(5)); + final OffsetDateTime expiration = OffsetDateTime.now().plus(Duration.ofMinutes(5)); final long sequenceNumber = 10L; final long sequenceNumber2 = 15L; @@ -613,8 +615,7 @@ void receiveIllegalOptions() { ServiceBusReceiverClientBuilder builder = new ServiceBusClientBuilder() .connectionString(NAMESPACE_CONNECTION_STRING) .receiver() - .topicName("baz").subscriptionName("bar") - .maxAutoLockRenewalDuration(Duration.ofSeconds(-1)) + .topicName("baz").subscriptionName("bar").prefetchCount(-1) .receiveMode(ReceiveMode.PEEK_LOCK); // Act & Assert @@ -734,7 +735,7 @@ void renewSessionLock() { // Act & Assert StepVerifier.create(sessionReceiver.renewSessionLock(SESSION_ID)) - .expectNext(expiry) + .expectNext(expiry.atOffset(ZoneOffset.UTC)) .expectComplete() .verify(); } @@ -762,7 +763,7 @@ void autoRenewMessageLock() throws InterruptedException { final Duration maxDuration = Duration.ofSeconds(8); final Duration renewalPeriod = Duration.ofSeconds(3); final String lockToken = "some-token"; - final Instant startTime = Instant.now(); + final OffsetDateTime startTime = OffsetDateTime.now(); // At most 4 times because we renew the lock before it expires (by some seconds). final int atMost = 5; @@ -795,7 +796,7 @@ void autoRenewSessionLock() throws InterruptedException { final Duration maxDuration = Duration.ofSeconds(8); final Duration renewalPeriod = Duration.ofSeconds(3); final String sessionId = "some-token"; - final Instant startTime = Instant.now(); + final OffsetDateTime startTime = OffsetDateTime.now(); // At most 4 times because we renew the lock before it expires (by some seconds). final int atMost = 5; diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java index 78d287cc6b589..8f9ff62e23a6c 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java @@ -17,7 +17,7 @@ import org.junit.jupiter.params.provider.MethodSource; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -249,7 +249,7 @@ void parallelReceiveByOneSubscriber(MessagingEntityType entityType, boolean isSe void receiveTwoMessagesAndComplete(MessagingEntityType entityType, boolean isSessionEnabled) { // Arrange setSenderAndReceiver(entityType, TestUtils.USE_CASE_RECEIVE_MORE_AND_COMPLETE, isSessionEnabled); - int maxMessages = 5; + int maxMessages = 4; int messagesToSend = 4; final String messageId = UUID.randomUUID().toString(); @@ -604,12 +604,12 @@ void receiveAndRenewLock(MessagingEntityType entityType) { assertNotNull(receivedMessage); assertNotNull(receivedMessage.getLockedUntil()); - final Instant initialLock = receivedMessage.getLockedUntil(); + final OffsetDateTime initialLock = receivedMessage.getLockedUntil(); logger.info("Received message. Seq: {}. lockedUntil: {}", receivedMessage.getSequenceNumber(), initialLock); // Assert & Act try { - Instant lockedUntil = receiver.renewMessageLock(receivedMessage.getLockToken()); + OffsetDateTime lockedUntil = receiver.renewMessageLock(receivedMessage.getLockToken()); assertTrue(lockedUntil.isAfter(initialLock), String.format("Updated lock is not after the initial Lock. updated: [%s]. initial:[%s]", lockedUntil, initialLock)); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java index bfc6e973ae398..9acd797e0fece 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java @@ -18,6 +18,8 @@ import java.time.Duration; import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -51,7 +53,6 @@ class ServiceBusReceiverClientTest { private final ClientLogger logger = new ClientLogger(ServiceBusReceiverClientTest.class); - private Duration maxAutoLockRenewalDuration; private ServiceBusReceiverClient client; @Mock @@ -67,8 +68,7 @@ void setup() { when(asyncClient.getEntityPath()).thenReturn(ENTITY_PATH); when(asyncClient.getFullyQualifiedNamespace()).thenReturn(NAMESPACE); - when(asyncClient.getReceiverOptions()).thenReturn(new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1, - maxAutoLockRenewalDuration)); + when(asyncClient.getReceiverOptions()).thenReturn(new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1)); client = new ServiceBusReceiverClient(asyncClient, OPERATION_TIMEOUT); } @@ -612,11 +612,11 @@ void receiveDeferredMessageBatch() { @Test void renewMessageLock() { // Arrange - final Instant response = Instant.ofEpochSecond(1585259339); + final OffsetDateTime response = Instant.ofEpochSecond(1585259339).atOffset(ZoneOffset.UTC); when(asyncClient.renewMessageLock(LOCK_TOKEN)).thenReturn(Mono.just(response)); // Act - final Instant actual = client.renewMessageLock(LOCK_TOKEN); + final OffsetDateTime actual = client.renewMessageLock(LOCK_TOKEN); // Assert assertEquals(response, actual); @@ -626,11 +626,11 @@ void renewMessageLock() { void renewSessionLock() { // Arrange final String sessionId = "a-session-id"; - final Instant response = Instant.ofEpochSecond(1585259339); + final OffsetDateTime response = Instant.ofEpochSecond(1585259339).atOffset(ZoneOffset.UTC); when(asyncClient.renewSessionLock(sessionId)).thenReturn(Mono.just(response)); // Act - final Instant actual = client.renewSessionLock(sessionId); + final OffsetDateTime actual = client.renewSessionLock(sessionId); // Assert assertEquals(response, actual); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientIntegrationTest.java index 34d81c258099f..8451816b517ee 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientIntegrationTest.java @@ -17,7 +17,7 @@ import reactor.test.StepVerifier; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.List; import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; @@ -144,11 +144,11 @@ void nonSessionMessageBatch(MessagingEntityType entityType) { * Verifies that we can send message to final destination using via-queue. */ @Test - void viaMessageSendTest() { + void viaQueueMessageSendTest() { // Arrange final Duration shortTimeout = Duration.ofSeconds(15); - final int viaIntermediateEntity = TestUtils.USE_CASE_SEND_VIA_1; - final int destinationEntity = TestUtils.USE_CASE_SEND_VIA_2; + final int viaIntermediateEntity = TestUtils.USE_CASE_SEND_VIA_QUEUE_1; + final int destinationEntity = TestUtils.USE_CASE_SEND_VIA_QUEUE_2; final boolean shareConnection = true; final MessagingEntityType entityType = MessagingEntityType.QUEUE; final boolean isSessionEnabled = false; @@ -158,6 +158,7 @@ void viaMessageSendTest() { final List messages = TestUtils.getServiceBusMessages(total, messageId, CONTENTS_BYTES); final String viaQueueName = getQueueName(viaIntermediateEntity); + setSenderAndReceiver(entityType, viaIntermediateEntity, false, false, shareConnection); final ServiceBusReceiverAsyncClient intermediateReceiver = receiver; final ServiceBusSenderAsyncClient intermediateSender = sender; @@ -205,7 +206,82 @@ void viaMessageSendTest() { }) .verifyComplete(); - // Verify, intermediate-via queue has is delivered to intermediate Entity. + // Verify, intermediate-via queue has it delivered to intermediate Entity. + StepVerifier.create(intermediateReceiver.receiveMessages().take(total).timeout(shortTimeout)) + .assertNext(receivedMessage -> { + assertMessageEquals(receivedMessage, messageId, isSessionEnabled); + messagesPending.decrementAndGet(); + }) + .verifyComplete(); + } + + /** + * Verifies that we can send message to final destination using via-topic. + */ + @Test + void viaTopicMessageSendTest() { + // Arrange + final Duration shortTimeout = Duration.ofSeconds(15); + final int viaIntermediateEntity = TestUtils.USE_CASE_SEND_VIA_TOPIC_1; + final int destinationEntity = TestUtils.USE_CASE_SEND_VIA_TOPIC_2; + final boolean shareConnection = true; + final MessagingEntityType entityType = MessagingEntityType.SUBSCRIPTION; + final boolean isSessionEnabled = false; + final String messageId = UUID.randomUUID().toString(); + final int total = 1; + final int totalToDestination = 2; + final List messages = TestUtils.getServiceBusMessages(total, messageId, CONTENTS_BYTES); + final String viaTopicName = getTopicName(viaIntermediateEntity); + + + setSenderAndReceiver(entityType, viaIntermediateEntity, false, false, shareConnection); + final ServiceBusReceiverAsyncClient intermediateReceiver = receiver; + final ServiceBusSenderAsyncClient intermediateSender = sender; + + final ServiceBusSenderAsyncClient destination1ViaSender = getSenderBuilder(false, entityType, + destinationEntity, false, shareConnection) + .viaTopicName(viaTopicName) + .buildAsyncClient(); + + final ServiceBusReceiverAsyncClient destination1Receiver = getReceiverBuilder(false, entityType, destinationEntity, Function.identity(), shareConnection) + .receiveMode(ReceiveMode.RECEIVE_AND_DELETE) + .buildAsyncClient(); + + final AtomicReference transaction = new AtomicReference<>(); + + // Act + StepVerifier.create(destination1ViaSender.createTransaction()) + .assertNext(transactionContext -> { + transaction.set(transactionContext); + assertNotNull(transaction); + }) + .verifyComplete(); + assertNotNull(transaction.get()); + + StepVerifier.create(intermediateSender.sendMessages(messages, transaction.get())) + .verifyComplete(); + StepVerifier.create(destination1ViaSender.sendMessages(messages, transaction.get())) + .verifyComplete(); + StepVerifier.create(destination1ViaSender.sendMessages(messages, transaction.get())) + .verifyComplete(); + + StepVerifier.create(destination1ViaSender.commitTransaction(transaction.get()).delaySubscription(Duration.ofSeconds(1))) + .verifyComplete(); + + // Assert + // Verify message is received by final destination Entity + StepVerifier.create(destination1Receiver.receiveMessages().take(totalToDestination).timeout(shortTimeout)) + .assertNext(receivedMessage -> { + assertMessageEquals(receivedMessage, messageId, isSessionEnabled); + messagesPending.decrementAndGet(); + }) + .assertNext(receivedMessage -> { + assertMessageEquals(receivedMessage, messageId, isSessionEnabled); + messagesPending.decrementAndGet(); + }) + .verifyComplete(); + + // Verify, intermediate-via topic has it delivered to intermediate Entity. StepVerifier.create(intermediateReceiver.receiveMessages().take(total).timeout(shortTimeout)) .assertNext(receivedMessage -> { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); @@ -318,7 +394,7 @@ void transactionScheduleAndCommitTest(MessagingEntityType entityType) { assertNotNull(transaction); }) .verifyComplete(); - StepVerifier.create(sender.scheduleMessage(message, Instant.now().plusSeconds(5), transaction.get())) + StepVerifier.create(sender.scheduleMessage(message, OffsetDateTime.now().plusSeconds(5), transaction.get())) .assertNext(sequenceNumber -> { assertNotNull(sequenceNumber); assertTrue(sequenceNumber.intValue() > 0); 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 3541b4b8fb0ff..c7dc1b1461266 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 @@ -46,7 +46,7 @@ import java.nio.ByteBuffer; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; import java.util.UUID; @@ -483,7 +483,7 @@ void sendSingleMessage() { void scheduleMessage() { // Arrange long sequenceNumberReturned = 10; - Instant instant = mock(Instant.class); + OffsetDateTime instant = mock(OffsetDateTime.class); when(connection.createSendLink(eq(ENTITY_NAME), eq(ENTITY_NAME), any(AmqpRetryOptions.class), isNull())) .thenReturn(Mono.just(sendLink)); @@ -503,7 +503,7 @@ void scheduleMessage() { void scheduleMessageWithTransaction() { // Arrange final long sequenceNumberReturned = 10; - final Instant instant = mock(Instant.class); + final OffsetDateTime instant = mock(OffsetDateTime.class); when(connection.createSendLink(eq(ENTITY_NAME), eq(ENTITY_NAME), any(AmqpRetryOptions.class), isNull())) .thenReturn(Mono.just(sendLink)); when(sendLink.getLinkSize()).thenReturn(Mono.just(MAX_MESSAGE_LENGTH_BYTES)); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderClientIntegrationTest.java index 48f1ea92d7391..e4440492fc37c 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderClientIntegrationTest.java @@ -15,7 +15,7 @@ import reactor.core.publisher.Mono; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.List; import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; @@ -136,7 +136,7 @@ void nonSessionScheduleMessage(MessagingEntityType entityType) { // Arrange setSenderAndReceiver(entityType, 0); - final Instant scheduledEnqueueTime = Instant.now().plusSeconds(10); + final OffsetDateTime scheduledEnqueueTime = OffsetDateTime.now().plusSeconds(10); final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = TestUtils.getServiceBusMessage(CONTENTS_BYTES, messageId); @@ -158,7 +158,7 @@ void nonSessionCancelScheduleMessage(MessagingEntityType entityType) { // Arrange setSenderAndReceiver(entityType, 0); - final Instant scheduledEnqueueTime = Instant.now().plusSeconds(20); + final OffsetDateTime scheduledEnqueueTime = OffsetDateTime.now().plusSeconds(20); final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = TestUtils.getServiceBusMessage(CONTENTS_BYTES, messageId); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderClientTest.java index 4d0de0504004c..0e3b112ad94f4 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderClientTest.java @@ -17,7 +17,7 @@ import reactor.test.StepVerifier; import java.time.Duration; -import java.time.Instant; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.UUID; @@ -266,7 +266,7 @@ void scheduleMessage() { // Arrange final ServiceBusMessage testData = new ServiceBusMessage(TEST_CONTENTS.getBytes(UTF_8)); - final Instant scheduledEnqueueTime = Instant.now(); + final OffsetDateTime scheduledEnqueueTime = OffsetDateTime.now(); final long expected = 1; when(asyncSender.scheduleMessage(testData, scheduledEnqueueTime)).thenReturn(Mono.just(expected)); @@ -288,7 +288,7 @@ void scheduleMessageWithTransaction() { // Arrange final ServiceBusMessage testData = new ServiceBusMessage(TEST_CONTENTS.getBytes(UTF_8)); - final Instant scheduledEnqueueTime = Instant.now(); + final OffsetDateTime scheduledEnqueueTime = OffsetDateTime.now(); final long expected = 1; when(asyncSender.scheduleMessage(testData, scheduledEnqueueTime, transactionContext)).thenReturn(Mono.just(expected)); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java index 18bdcef63840b..a69b9efc6fada 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java @@ -51,8 +51,10 @@ public class TestUtils { static final int USE_CASE_PEEK_RECEIVE_AND_DEFER = 10; static final int USE_CASE_PEEK_TRANSACTION_SENDRECEIVE_AND_COMPLETE = 11; static final int USE_CASE_SINGLE_SESSION = 12; - static final int USE_CASE_SEND_VIA_1 = 13; - static final int USE_CASE_SEND_VIA_2 = 14; + static final int USE_CASE_SEND_VIA_QUEUE_1 = 13; + static final int USE_CASE_SEND_VIA_QUEUE_2 = 14; + static final int USE_CASE_SEND_VIA_TOPIC_1 = 15; + static final int USE_CASE_SEND_VIA_TOPIC_2 = 16; // An application property key to identify where in the stream this message was created. static final String MESSAGE_POSITION_ID = "message-position"; diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerIntegrationTest.java index 1e8f176135a24..64416f9b87c1b 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerIntegrationTest.java @@ -72,8 +72,7 @@ void singleUnnamedSession(MessagingEntityType entityType) { final int numberToSend = 5; final List lockTokens = new ArrayList<>(); - setSenderAndReceiver(entityType, entityIndex, TIMEOUT, - builder -> builder.maxAutoLockRenewalDuration(Duration.ofMinutes(2))); + setSenderAndReceiver(entityType, entityIndex, TIMEOUT, builder -> builder); final Disposable subscription = Flux.interval(Duration.ofMillis(500)) .take(numberToSend) @@ -130,7 +129,7 @@ void multipleSessions() { final Set set = new HashSet<>(); setSenderAndReceiver(MessagingEntityType.SUBSCRIPTION, entityIndex, Duration.ofSeconds(20), - builder -> builder.maxConcurrentSessions(maxConcurrency).maxAutoLockRenewalDuration(Duration.ofMinutes(2))); + builder -> builder.maxConcurrentSessions(maxConcurrency)); final Disposable subscription = Flux.interval(Duration.ofMillis(500)) .take(maxMessages) diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerTest.java index 5a2bc4fdb6305..d466ca7959166 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerTest.java @@ -140,7 +140,7 @@ void afterEach(TestInfo testInfo) { @Test void receiveNull() { // Arrange - ReceiverOptions receiverOptions = new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1, Duration.ZERO, null, true, 5); + ReceiverOptions receiverOptions = new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1, null, true, 5); sessionManager = new UnnamedSessionManager(ENTITY_PATH, ENTITY_TYPE, connectionProcessor, TIMEOUT, tracerProvider, messageSerializer, receiverOptions); @@ -156,8 +156,7 @@ void receiveNull() { @Test void singleUnnamedSession() { // Arrange - ReceiverOptions receiverOptions = new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1, - Duration.ofSeconds(20), null, false, null); + ReceiverOptions receiverOptions = new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1, null, false, null); sessionManager = new UnnamedSessionManager(ENTITY_PATH, ENTITY_TYPE, connectionProcessor, TIMEOUT, tracerProvider, messageSerializer, receiverOptions); @@ -209,8 +208,7 @@ void singleUnnamedSession() { @Test void multipleSessions() { // Arrange - final ReceiverOptions receiverOptions = new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1, - Duration.ofSeconds(8), null, true, 1); + final ReceiverOptions receiverOptions = new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1, null, true, 1); sessionManager = new UnnamedSessionManager(ENTITY_PATH, ENTITY_TYPE, connectionProcessor, TIMEOUT, tracerProvider, messageSerializer, receiverOptions); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java index 21d0678f55981..9838bc771c85c 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java @@ -17,11 +17,11 @@ import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; import com.azure.messaging.servicebus.administration.models.EmptyRuleAction; import com.azure.messaging.servicebus.administration.models.NamespaceType; -import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; -import com.azure.messaging.servicebus.administration.models.RuleProperties; -import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; +import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeProperties; import com.azure.messaging.servicebus.administration.models.TopicProperties; -import com.azure.messaging.servicebus.administration.models.TopicRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.TopicRuntimeProperties; +import com.azure.messaging.servicebus.administration.models.RuleProperties; import com.azure.messaging.servicebus.administration.models.TrueRuleFilter; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@ -73,7 +73,7 @@ void createQueue(HttpClient httpClient) { final ServiceBusAdministrationAsyncClient client = createClient(httpClient); final String queueName = testResourceNamer.randomName("test", 10); final CreateQueueOptions expected = new CreateQueueOptions() - .setMaxSizeInMegabytes(500) + .setMaxSizeInMegabytes(1024) .setMaxDeliveryCount(7) .setLockDuration(Duration.ofSeconds(45)) .setRequiresSession(true) @@ -96,10 +96,10 @@ void createQueue(HttpClient httpClient) { assertEquals(expected.requiresDuplicateDetection(), actual.requiresDuplicateDetection()); assertEquals(expected.requiresSession(), actual.requiresSession()); - final QueueRuntimeInfo runtimeInfo = new QueueRuntimeInfo(actual); - assertEquals(0, runtimeInfo.getTotalMessageCount()); - assertEquals(0, runtimeInfo.getSizeInBytes()); - assertNotNull(runtimeInfo.getCreatedAt()); + final QueueRuntimeProperties runtimeProperties = new QueueRuntimeProperties(actual); + assertEquals(0, runtimeProperties.getTotalMessageCount()); + assertEquals(0, runtimeProperties.getSizeInBytes()); + assertNotNull(runtimeProperties.getCreatedAt()); }) .verifyComplete(); } @@ -196,10 +196,10 @@ void createTopicWithResponse(HttpClient httpClient) { assertEquals(expected.enablePartitioning(), actual.enablePartitioning()); assertEquals(expected.requiresDuplicateDetection(), actual.requiresDuplicateDetection()); - final TopicRuntimeInfo runtimeInfo = new TopicRuntimeInfo(actual); - assertEquals(0, runtimeInfo.getSubscriptionCount()); - assertEquals(0, runtimeInfo.getSizeInBytes()); - assertNotNull(runtimeInfo.getCreatedAt()); + final TopicRuntimeProperties runtimeProperties = new TopicRuntimeProperties(actual); + assertEquals(0, runtimeProperties.getSubscriptionCount()); + assertEquals(0, runtimeProperties.getSizeInBytes()); + assertNotNull(runtimeProperties.getCreatedAt()); }) .verifyComplete(); } @@ -267,10 +267,10 @@ void getQueue(HttpClient httpClient) { assertFalse(queueDescription.requiresSession()); assertNotNull(queueDescription.getLockDuration()); - final QueueRuntimeInfo runtimeInfo = new QueueRuntimeInfo(queueDescription); - assertNotNull(runtimeInfo.getCreatedAt()); - assertTrue(nowUtc.isAfter(runtimeInfo.getCreatedAt())); - assertNotNull(runtimeInfo.getAccessedAt()); + final QueueRuntimeProperties runtimeProperties = new QueueRuntimeProperties(queueDescription); + assertNotNull(runtimeProperties.getCreatedAt()); + assertTrue(nowUtc.isAfter(runtimeProperties.getCreatedAt())); + assertNotNull(runtimeProperties.getAccessedAt()); }) .verifyComplete(); } @@ -340,7 +340,7 @@ void getQueueExistsFalse(HttpClient httpClient) { @ParameterizedTest @MethodSource("createHttpClients") - void getQueueRuntimeInfo(HttpClient httpClient) { + void getQueueRuntimeProperties(HttpClient httpClient) { // Arrange final ServiceBusAdministrationAsyncClient client = createClient(httpClient); final String queueName = interceptorManager.isPlaybackMode() @@ -349,13 +349,13 @@ void getQueueRuntimeInfo(HttpClient httpClient) { final OffsetDateTime nowUtc = OffsetDateTime.now(Clock.systemUTC()); // Act & Assert - StepVerifier.create(client.getQueueRuntimeInfo(queueName)) - .assertNext(runtimeInfo -> { - assertEquals(queueName, runtimeInfo.getName()); + StepVerifier.create(client.getQueueRuntimeProperties(queueName)) + .assertNext(RuntimeProperties -> { + assertEquals(queueName, RuntimeProperties.getName()); - assertNotNull(runtimeInfo.getCreatedAt()); - assertTrue(nowUtc.isAfter(runtimeInfo.getCreatedAt())); - assertNotNull(runtimeInfo.getAccessedAt()); + assertNotNull(RuntimeProperties.getCreatedAt()); + assertTrue(nowUtc.isAfter(RuntimeProperties.getCreatedAt())); + assertNotNull(RuntimeProperties.getAccessedAt()); }) .verifyComplete(); } @@ -413,10 +413,10 @@ void getSubscription(HttpClient httpClient) { assertTrue(description.requiresSession()); assertNotNull(description.getLockDuration()); - final SubscriptionRuntimeInfo runtimeInfo = new SubscriptionRuntimeInfo(description); - assertNotNull(runtimeInfo.getCreatedAt()); - assertTrue(nowUtc.isAfter(runtimeInfo.getCreatedAt())); - assertNotNull(runtimeInfo.getAccessedAt()); + final SubscriptionRuntimeProperties runtimeProperties = new SubscriptionRuntimeProperties(description); + assertNotNull(runtimeProperties.getCreatedAt()); + assertTrue(nowUtc.isAfter(runtimeProperties.getCreatedAt())); + assertNotNull(runtimeProperties.getAccessedAt()); }) .verifyComplete(); } @@ -469,7 +469,7 @@ void getSubscriptionExistsFalse(HttpClient httpClient) { @ParameterizedTest @MethodSource("createHttpClients") - void getSubscriptionRuntimeInfo(HttpClient httpClient) { + void getSubscriptionRuntimeProperties(HttpClient httpClient) { // Arrange final ServiceBusAdministrationAsyncClient client = createClient(httpClient); final String topicName = interceptorManager.isPlaybackMode() ? "topic-1" : getEntityName(getTopicBaseName(), 1); @@ -479,17 +479,16 @@ void getSubscriptionRuntimeInfo(HttpClient httpClient) { final OffsetDateTime nowUtc = OffsetDateTime.now(Clock.systemUTC()); // Act & Assert - StepVerifier.create(client.getSubscriptionRuntimeInfo(topicName, subscriptionName)) + StepVerifier.create(client.getSubscriptionRuntimeProperties(topicName, subscriptionName)) .assertNext(description -> { assertEquals(topicName, description.getTopicName()); assertEquals(subscriptionName, description.getSubscriptionName()); assertTrue(description.getTotalMessageCount() >= 0); assertEquals(0, description.getActiveMessageCount()); - assertEquals(0, description.getScheduledMessageCount()); assertEquals(0, description.getTransferDeadLetterMessageCount()); assertEquals(0, description.getTransferMessageCount()); - assertEquals(0, description.getDeadLetterMessageCount()); + assertTrue(description.getDeadLetterMessageCount() >= 0); assertNotNull(description.getCreatedAt()); assertTrue(nowUtc.isAfter(description.getCreatedAt())); @@ -519,10 +518,10 @@ void getTopic(HttpClient httpClient) { assertNotNull(topicDescription.getDefaultMessageTimeToLive()); assertFalse(topicDescription.enablePartitioning()); - final TopicRuntimeInfo runtimeInfo = new TopicRuntimeInfo(topicDescription); - assertNotNull(runtimeInfo.getCreatedAt()); - assertTrue(nowUtc.isAfter(runtimeInfo.getCreatedAt())); - assertNotNull(runtimeInfo.getAccessedAt()); + final TopicRuntimeProperties runtimeProperties = new TopicRuntimeProperties(topicDescription); + assertNotNull(runtimeProperties.getCreatedAt()); + assertTrue(nowUtc.isAfter(runtimeProperties.getCreatedAt())); + assertNotNull(runtimeProperties.getAccessedAt()); }) .verifyComplete(); } @@ -580,7 +579,7 @@ void getTopicExistsFalse(HttpClient httpClient) { @ParameterizedTest @MethodSource("createHttpClients") - void getTopicRuntimeInfo(HttpClient httpClient) { + void getTopicRuntimeProperties(HttpClient httpClient) { // Arrange final ServiceBusAdministrationAsyncClient client = createClient(httpClient); final String topicName = interceptorManager.isPlaybackMode() @@ -589,20 +588,22 @@ void getTopicRuntimeInfo(HttpClient httpClient) { final OffsetDateTime nowUtc = OffsetDateTime.now(Clock.systemUTC()); // Act & Assert - StepVerifier.create(client.getTopicRuntimeInfo(topicName)) - .assertNext(runtimeInfo -> { - assertEquals(topicName, runtimeInfo.getName()); + StepVerifier.create(client.getTopicRuntimeProperties(topicName)) + .assertNext(RuntimeProperties -> { + assertEquals(topicName, RuntimeProperties.getName()); if (interceptorManager.isPlaybackMode()) { - assertEquals(3, runtimeInfo.getSubscriptionCount()); + assertEquals(3, RuntimeProperties.getSubscriptionCount()); } else { - assertTrue(runtimeInfo.getSubscriptionCount() > 1); + assertTrue(RuntimeProperties.getSubscriptionCount() > 1); } - assertNotNull(runtimeInfo.getCreatedAt()); - assertTrue(nowUtc.isAfter(runtimeInfo.getCreatedAt())); - assertNotNull(runtimeInfo.getAccessedAt()); - assertTrue(nowUtc.isAfter(runtimeInfo.getAccessedAt())); + assertNotNull(RuntimeProperties.getCreatedAt()); + assertTrue(nowUtc.isAfter(RuntimeProperties.getCreatedAt())); + assertNotNull(RuntimeProperties.getAccessedAt()); + assertTrue(nowUtc.isAfter(RuntimeProperties.getAccessedAt())); + assertEquals(0, RuntimeProperties.getScheduledMessageCount()); + }) .verifyComplete(); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientTest.java index eb3d71e68c953..47318c3306701 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientTest.java @@ -10,7 +10,7 @@ import com.azure.core.util.Context; import com.azure.messaging.servicebus.administration.models.CreateQueueOptions; import com.azure.messaging.servicebus.administration.models.QueueProperties; -import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; import com.azure.messaging.servicebus.implementation.EntitiesImpl; import com.azure.messaging.servicebus.implementation.EntityHelper; import com.azure.messaging.servicebus.implementation.ServiceBusManagementClientImpl; @@ -240,7 +240,7 @@ void getQueueWithResponse() throws IOException { } @Test - void getQueueRuntimeInfo() throws IOException { + void getQueueRuntimeProperties() throws IOException { // Arrange final String contents = getContents("QueueDescriptionEntry.xml"); final ServiceBusManagementSerializer managementSerializer = new ServiceBusManagementSerializer(); @@ -265,7 +265,7 @@ void getQueueRuntimeInfo() throws IOException { when(serializer.deserialize(responseString, QueueDescriptionEntry.class)).thenReturn(entry); // Act & Assert - StepVerifier.create(client.getQueueRuntimeInfo(queueName)) + StepVerifier.create(client.getQueueRuntimeProperties(queueName)) .assertNext(info -> { assertEquals(name, info.getName()); assertEquals(messageCount, info.getTotalMessageCount()); @@ -284,7 +284,7 @@ void getQueueRuntimeInfo() throws IOException { } @Test - void getQueueRuntimeInfoWithResponse() throws IOException { + void getQueueRuntimePropertiesWithResponse() throws IOException { // Arrange final String contents = getContents("QueueDescriptionEntry.xml"); final ServiceBusManagementSerializer managementSerializer = new ServiceBusManagementSerializer(); @@ -309,11 +309,11 @@ void getQueueRuntimeInfoWithResponse() throws IOException { when(serializer.deserialize(responseString, QueueDescriptionEntry.class)).thenReturn(entry); // Act & Assert - StepVerifier.create(client.getQueueRuntimeInfoWithResponse(queueName)) + StepVerifier.create(client.getQueueRuntimePropertiesWithResponse(queueName)) .assertNext(response -> { assertResponse(objectResponse, response); - final QueueRuntimeInfo info = response.getValue(); + final QueueRuntimeProperties info = response.getValue(); assertEquals(name, info.getName()); assertEquals(messageCount, info.getTotalMessageCount()); assertEquals(sizeInBytes, info.getSizeInBytes()); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClientTest.java index b705321003eef..854034b642249 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClientTest.java @@ -12,7 +12,7 @@ import com.azure.core.util.IterableStream; import com.azure.messaging.servicebus.administration.models.CreateQueueOptions; import com.azure.messaging.servicebus.administration.models.QueueProperties; -import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; import com.azure.messaging.servicebus.implementation.EntityHelper; import com.azure.messaging.servicebus.implementation.models.QueueDescription; import org.junit.jupiter.api.AfterEach; @@ -43,7 +43,7 @@ class ServiceBusAdministrationClientTest { @Mock private Response queueDescriptionResponse; @Mock - private Response queueRuntimeInfoResponse; + private Response queueRuntimePropertiesResponse; @Mock private Response voidResponse; @Mock @@ -162,30 +162,30 @@ void getQueueWithResponse() { } @Test - void getQueueRuntimeInfo() { + void getQueueRuntimeProperties() { // Arrange - final QueueRuntimeInfo result = mock(QueueRuntimeInfo.class); + final QueueRuntimeProperties result = mock(QueueRuntimeProperties.class); - when(asyncClient.getQueueRuntimeInfo(queueName)).thenReturn(Mono.just(result)); + when(asyncClient.getQueueRuntimeProperties(queueName)).thenReturn(Mono.just(result)); // Act - final QueueRuntimeInfo actual = client.getQueueRuntimeInfo(queueName); + final QueueRuntimeProperties actual = client.getQueueRuntimeProperties(queueName); // Assert assertEquals(result, actual); } @Test - void getQueueRuntimeInfoWithResponse() { + void getQueueRuntimePropertiesWithResponse() { // Arrange - final QueueRuntimeInfo result = mock(QueueRuntimeInfo.class); + final QueueRuntimeProperties result = mock(QueueRuntimeProperties.class); - when(queueRuntimeInfoResponse.getValue()).thenReturn(result); - when(asyncClient.getQueueWithResponse(eq(queueName), eq(context), any())) - .thenReturn(Mono.just(queueRuntimeInfoResponse)); + when(queueRuntimePropertiesResponse.getValue()).thenReturn(result); + when(asyncClient.getQueueWithResponse(eq(queueName), eq(context), any())) + .thenReturn(Mono.just(queueRuntimePropertiesResponse)); // Act - final Response actual = client.getQueueRuntimeInfoWithResponse(queueName, context); + final Response actual = client.getQueueRuntimePropertiesWithResponse(queueName, context); // Assert assertEquals(result, actual.getValue()); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java index 08a55c7069e37..4f6f16c75efdd 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java @@ -395,14 +395,14 @@ void updateDisposition(String sessionId, String associatedLinkName) { void updateDispositionWithTransaction() { // Arrange final String associatedLinkName = "associatedLinkName"; - final String TXN_ID_STRING = "Transaction-ID"; + final String txnIdString = "Transaction-ID"; final DeadLetterOptions options = new DeadLetterOptions() .setDeadLetterErrorDescription("dlq-description") .setDeadLetterReason("dlq-reason"); final UUID lockToken = UUID.randomUUID(); final ServiceBusTransactionContext mockTransaction = mock(ServiceBusTransactionContext.class); - when(mockTransaction.getTransactionId()).thenReturn(ByteBuffer.wrap(TXN_ID_STRING.getBytes())); + when(mockTransaction.getTransactionId()).thenReturn(ByteBuffer.wrap(txnIdString.getBytes())); when(requestResponseChannel.sendWithAck(any(Message.class), any(DeliveryState.class))) .thenReturn(Mono.just(responseMessage)); @@ -418,7 +418,7 @@ void updateDispositionWithTransaction() { final DeliveryState delivery = amqpDeliveryStateCaptor.getValue(); Assertions.assertNotNull(delivery); Assertions.assertTrue(delivery instanceof TransactionalState); - Assertions.assertEquals(TXN_ID_STRING, ((TransactionalState) delivery).getTxnId().toString()); + Assertions.assertEquals(txnIdString, ((TransactionalState) delivery).getTxnId().toString()); } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java index f91baa2e6fe3d..3e75c548727cb 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java @@ -10,8 +10,8 @@ import com.azure.messaging.servicebus.administration.models.NamespaceProperties; import com.azure.messaging.servicebus.administration.models.NamespaceType; import com.azure.messaging.servicebus.administration.models.QueueProperties; -import com.azure.messaging.servicebus.administration.models.QueueRuntimeInfo; -import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeInfo; +import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; +import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeProperties; import com.azure.messaging.servicebus.implementation.models.CorrelationFilterImpl; import com.azure.messaging.servicebus.implementation.models.EmptyRuleActionImpl; import com.azure.messaging.servicebus.implementation.models.FalseFilterImpl; @@ -102,10 +102,10 @@ void deserializeQueueDescription() throws IOException { } /** - * Verify we can deserialize XML from a GET queue request and create convenience model, {@link QueueRuntimeInfo}. + * Verify we can deserialize XML from a GET queue request and create convenience model, {@link QueueRuntimeProperties}. */ @Test - void deserializeQueueRuntimeInfo() throws IOException { + void deserializeQueueRuntimeProperties() throws IOException { final String contents = getContents("QueueDescriptionEntry.xml"); final OffsetDateTime createdAt = OffsetDateTime.parse("2020-06-05T03:55:07.5Z"); @@ -123,7 +123,7 @@ void deserializeQueueRuntimeInfo() throws IOException { // Act final QueueDescriptionEntry entry = serializer.deserialize(contents, QueueDescriptionEntry.class); final QueueProperties properties = EntityHelper.toModel(entry.getContent().getQueueDescription()); - final QueueRuntimeInfo actual = new QueueRuntimeInfo(properties); + final QueueRuntimeProperties actual = new QueueRuntimeProperties(properties); // Assert assertEquals(sizeInBytes, actual.getSizeInBytes()); @@ -339,10 +339,10 @@ void deserializeCreateSubscription() throws IOException { /** * Verify we can deserialize XML from a GET subscription request and create convenience model, {@link - * SubscriptionRuntimeInfo}. + * SubscriptionRuntimeProperties}. */ @Test - void deserializeSubscriptionRuntimeInfo() throws IOException { + void deserializeSubscriptionRuntimeProperties() throws IOException { final String contents = getContents("SubscriptionDescriptionEntry.xml"); final OffsetDateTime createdAt = OffsetDateTime.parse("2020-06-22T23:47:54.0131447Z"); @@ -358,7 +358,7 @@ void deserializeSubscriptionRuntimeInfo() throws IOException { // Act final SubscriptionDescriptionEntry entry = serializer.deserialize(contents, SubscriptionDescriptionEntry.class); - final SubscriptionRuntimeInfo actual = new SubscriptionRuntimeInfo( + final SubscriptionRuntimeProperties actual = new SubscriptionRuntimeProperties( EntityHelper.toModel(entry.getContent().getSubscriptionDescription())); // Assert @@ -370,7 +370,6 @@ void deserializeSubscriptionRuntimeInfo() throws IOException { assertEquals(expectedCount.getActiveMessageCount(), actual.getActiveMessageCount()); assertEquals(expectedCount.getDeadLetterMessageCount(), actual.getDeadLetterMessageCount()); - assertEquals(expectedCount.getScheduledMessageCount(), actual.getScheduledMessageCount()); assertEquals(expectedCount.getTransferMessageCount(), actual.getTransferMessageCount()); assertEquals(expectedCount.getTransferDeadLetterMessageCount(), actual.getTransferDeadLetterMessageCount()); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/createQueue.json b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/createQueue.json index 3ace85d9edb25..be21497a31541 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/createQueue.json +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/createQueue.json @@ -12,11 +12,11 @@ "Server" : "Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "201", - "Body" : "https://sb-java-conniey-1.servicebus.windows.net/test18701?api-version=2017-04test187012020-07-02T22:49:08Z2020-07-02T22:49:08Zsb-java-conniey-1test18701PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2020-07-02T22:49:08.847Z2020-07-02T22:49:08.88ZtrueP10675199DT2H48M5.477SP10675199DT2H48M5.477SfalsePT2MtruefalsePT45S7500truetruesome-metadata-for-testingAvailablefalse", + "Body" : "https://sb-java-conniey-1.servicebus.windows.net/test18701?api-version=2017-04test187012020-07-02T22:49:08Z2020-07-02T22:49:08Zsb-java-conniey-1test18701PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2020-07-02T22:49:08.847Z2020-07-02T22:49:08.88ZtrueP10675199DT2H48M5.477SP10675199DT2H48M5.477SfalsePT2MtruefalsePT45S71024truetruesome-metadata-for-testingAvailablefalse", "Date" : "Thu, 02 Jul 2020 22:49:08 GMT", "Content-Type" : "application/atom+xml;type=entry;charset=utf-8" }, "Exception" : null } ], "variables" : [ "test18701" ] -} \ No newline at end of file +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getQueueRuntimeInfo.json b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getQueueRuntimeProperties.json similarity index 100% rename from sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getQueueRuntimeInfo.json rename to sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getQueueRuntimeProperties.json diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getSubscriptionRuntimeInfo.json b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getSubscriptionRuntimeProperties.json similarity index 100% rename from sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getSubscriptionRuntimeInfo.json rename to sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getSubscriptionRuntimeProperties.json diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getTopicRuntimeInfo.json b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getTopicRuntimeProperties.json similarity index 100% rename from sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getTopicRuntimeInfo.json rename to sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/getTopicRuntimeProperties.json diff --git a/sdk/servicebus/test-resources.json b/sdk/servicebus/test-resources.json index 998ed16a95981..ee1c184187f9b 100644 --- a/sdk/servicebus/test-resources.json +++ b/sdk/servicebus/test-resources.json @@ -56,7 +56,7 @@ "namespaceDomainNameSuffix": "servicebus.windows.net", "queueName": "queue", "queueSessionName": "queue-session", - "numberOfInstances": 15, + "numberOfInstances": 17, "subscriptionName": "subscription", "subscriptionSessionName": "subscription-session", "serviceBusDataOwnerRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419')]", From 2e13d83a854f0af135fdf160039e3d30688f1e0c Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Tue, 1 Sep 2020 12:07:10 -0700 Subject: [PATCH 033/168] Remove httpclient suffix from JDK 11 HTTP client module (#13338) * Remove httpclient suffix from JDK 11 HTTP client module * Revert some changes IntelliJ did automatically --- .../resources/checkstyle/checkstyle-suppressions.xml | 2 +- eng/jacoco-test-coverage/pom.xml | 4 ++-- eng/versioning/version_client.txt | 2 +- .../services/com.azure.core.http.HttpClientProvider | 1 - .../CHANGELOG.md | 0 .../README.md | 12 ++++++------ .../pom.xml | 4 ++-- .../com/azure/core/http/jdk}/JdkAsyncHttpClient.java | 2 +- .../core/http/jdk}/JdkAsyncHttpClientBuilder.java | 4 ++-- .../jdk}/implementation/JdkHttpClientProvider.java | 4 ++-- .../implementation/JdkHttpClientProxySelector.java | 2 +- .../java/com/azure/core/http/jdk}/package-info.java | 2 +- .../src/main/java/module-info.java | 6 +++--- .../services/com.azure.core.http.HttpClientProvider | 1 + ...JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java | 2 +- .../java/com/azure/core/http/jdk}/ReadmeSamples.java | 2 +- .../http/jdk}/JdkAsyncHttpClientBuilderTests.java | 2 +- .../core/http/jdk}/JdkAsyncHttpClientTests.java | 2 +- .../com/azure/core/http/jdk}/JdkHttpClientTests.java | 2 +- .../http/jdk}/SimpleBasicAuthHttpProxyServer.java | 2 +- .../RestProxyWithHttpProxyJdkHttpClientTests.java | 4 ++-- .../RestProxyWithJdkHttpClientTests.java | 4 ++-- .../src/test/resources/upload.txt | 0 sdk/core/ci.yml | 4 ++-- sdk/core/pom.xml | 2 +- 25 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider rename sdk/core/{azure-core-http-jdk-httpclient => azure-core-http-jdk}/CHANGELOG.md (100%) rename sdk/core/{azure-core-http-jdk-httpclient => azure-core-http-jdk}/README.md (80%) rename sdk/core/{azure-core-http-jdk-httpclient => azure-core-http-jdk}/pom.xml (98%) rename sdk/core/{azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/main/java/com/azure/core/http/jdk}/JdkAsyncHttpClient.java (99%) rename sdk/core/{azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/main/java/com/azure/core/http/jdk}/JdkAsyncHttpClientBuilder.java (98%) rename sdk/core/{azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/main/java/com/azure/core/http/jdk}/implementation/JdkHttpClientProvider.java (79%) rename sdk/core/{azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/main/java/com/azure/core/http/jdk}/implementation/JdkHttpClientProxySelector.java (96%) rename sdk/core/{azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/main/java/com/azure/core/http/jdk}/package-info.java (81%) rename sdk/core/{azure-core-http-jdk-httpclient => azure-core-http-jdk}/src/main/java/module-info.java (64%) create mode 100644 sdk/core/azure-core-http-jdk/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider rename sdk/core/{azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk}/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java (98%) rename sdk/core/{azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk}/ReadmeSamples.java (96%) rename sdk/core/{azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/test/java/com/azure/core/http/jdk}/JdkAsyncHttpClientBuilderTests.java (99%) rename sdk/core/{azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/test/java/com/azure/core/http/jdk}/JdkAsyncHttpClientTests.java (99%) rename sdk/core/{azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/test/java/com/azure/core/http/jdk}/JdkHttpClientTests.java (96%) rename sdk/core/{azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/test/java/com/azure/core/http/jdk}/SimpleBasicAuthHttpProxyServer.java (99%) rename sdk/core/{azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/test/java/com/azure/core/http/jdk}/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java (91%) rename sdk/core/{azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient => azure-core-http-jdk/src/test/java/com/azure/core/http/jdk}/implementation/RestProxyWithJdkHttpClientTests.java (90%) rename sdk/core/{azure-core-http-jdk-httpclient => azure-core-http-jdk}/src/test/resources/upload.txt (100%) diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index bf5ae0bed99ee..43a52eaf59d99 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -163,7 +163,7 @@ - + com.azure - azure-core-http-jdk-httpclient - 1.0.0-beta.1 + azure-core-http-jdk + 1.0.0-beta.1 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index b6399c5c996ff..9c7007456450b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -10,7 +10,7 @@ com.azure:azure-ai-textanalytics;5.0.0;5.1.0-beta.1 com.azure:azure-core;1.7.0;1.8.0-beta.1 com.azure:azure-core-amqp;1.4.0;1.5.0-beta.1 com.azure:azure-core-experimental;1.0.0-beta.2;1.0.0-beta.3 -com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1 +com.azure:azure-core-http-jdk;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-core-http-netty;1.5.4;1.6.0-beta.1 com.azure:azure-core-http-okhttp;1.2.5;1.3.0-beta.1 com.azure:azure-core-management;1.0.0-beta.3;1.0.0-beta.4 diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider b/sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider deleted file mode 100644 index ac348011337af..0000000000000 --- a/sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider +++ /dev/null @@ -1 +0,0 @@ -com.azure.core.http.jdk.httpclient.implementation.JdkHttpClientProvider diff --git a/sdk/core/azure-core-http-jdk-httpclient/CHANGELOG.md b/sdk/core/azure-core-http-jdk/CHANGELOG.md similarity index 100% rename from sdk/core/azure-core-http-jdk-httpclient/CHANGELOG.md rename to sdk/core/azure-core-http-jdk/CHANGELOG.md diff --git a/sdk/core/azure-core-http-jdk-httpclient/README.md b/sdk/core/azure-core-http-jdk/README.md similarity index 80% rename from sdk/core/azure-core-http-jdk-httpclient/README.md rename to sdk/core/azure-core-http-jdk/README.md index a2f9b6e647092..930f10f691f68 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/README.md +++ b/sdk/core/azure-core-http-jdk/README.md @@ -11,11 +11,11 @@ part of JDK 11. ### Adding the package to your product -[//]: # ({x-version-update-start;com.azure:azure-core-http-jdk-httpclient;current}) +[//]: # ({x-version-update-start;com.azure:azure-core-http-jdk;current}) ```xml com.azure - azure-core-http-jdk-httpclient + azure-core-http-jdk 1.0.0-beta.1 ``` @@ -34,14 +34,14 @@ The following sections provide several code snippets covering some of the most c Create a HttpClient. - + ```java HttpClient client = new JdkAsyncHttpClientBuilder().build(); ``` Create a HttpClient using a connection timeout of 60 seconds. - + ```java HttpClient client = new JdkAsyncHttpClientBuilder().connectionTimeout(Duration.ofSeconds(60)).build(); ``` @@ -50,7 +50,7 @@ HttpClient client = new JdkAsyncHttpClientBuilder().connectionTimeout(Duration.o Create a HttpClient that is using a proxy. - + ```java HttpClient client = new JdkAsyncHttpClientBuilder() .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("", 8888))) @@ -72,4 +72,4 @@ Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). 1. Push to the branch (`git push origin my-new-feature`) 1. Create new Pull Request -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcore%2Fazure-core-http-jdk-httpclient%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcore%2Fazure-core-http-jdk%2FREADME.png) diff --git a/sdk/core/azure-core-http-jdk-httpclient/pom.xml b/sdk/core/azure-core-http-jdk/pom.xml similarity index 98% rename from sdk/core/azure-core-http-jdk-httpclient/pom.xml rename to sdk/core/azure-core-http-jdk/pom.xml index 1c270690998b0..739b09265745d 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/pom.xml +++ b/sdk/core/azure-core-http-jdk/pom.xml @@ -13,9 +13,9 @@ com.azure - azure-core-http-jdk-httpclient + azure-core-http-jdk jar - 1.0.0-beta.1 + 1.0.0-beta.1 Microsoft Azure JDK HTTP Client Library This package contains the Azure HTTP client library using the JDK HttpClient API. diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClient.java b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClient.java similarity index 99% rename from sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClient.java rename to sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClient.java index 583d4a40e49bc..9b71a25976c8b 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClient.java +++ b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClient.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpHeader; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilder.java b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilder.java similarity index 98% rename from sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilder.java rename to sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilder.java index f29b9facc65e2..af913f8f9b410 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilder.java +++ b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilder.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; import com.azure.core.http.HttpClient; import com.azure.core.http.ProxyOptions; -import com.azure.core.http.jdk.httpclient.implementation.JdkHttpClientProxySelector; +import com.azure.core.http.jdk.implementation.JdkHttpClientProxySelector; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProvider.java b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProvider.java similarity index 79% rename from sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProvider.java rename to sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProvider.java index e9ce01b47368d..0118ab127e956 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProvider.java +++ b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProvider.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient.implementation; +package com.azure.core.http.jdk.implementation; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpClientProvider; -import com.azure.core.http.jdk.httpclient.JdkAsyncHttpClientBuilder; +import com.azure.core.http.jdk.JdkAsyncHttpClientBuilder; /** * A {@link HttpClientProvider} that provides an implementation of HttpClient based on native JDK HttpClient. diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProxySelector.java b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProxySelector.java similarity index 96% rename from sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProxySelector.java rename to sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProxySelector.java index 369eb8183860d..0c577d2c3b1a0 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProxySelector.java +++ b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProxySelector.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient.implementation; +package com.azure.core.http.jdk.implementation; import java.io.IOException; import java.net.Proxy; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/package-info.java b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/package-info.java similarity index 81% rename from sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/package-info.java rename to sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/package-info.java index 76afceb9f4a8f..e82d308c8db94 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/package-info.java +++ b/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/package-info.java @@ -4,4 +4,4 @@ /** * Package containing an HTTP client for azure-core using the JDK HttpClient APIs. */ -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/module-info.java b/sdk/core/azure-core-http-jdk/src/main/java/module-info.java similarity index 64% rename from sdk/core/azure-core-http-jdk-httpclient/src/main/java/module-info.java rename to sdk/core/azure-core-http-jdk/src/main/java/module-info.java index a791a8ea254e1..7731ef6c57f7f 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/module-info.java +++ b/sdk/core/azure-core-http-jdk/src/main/java/module-info.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import com.azure.core.http.jdk.httpclient.implementation.JdkHttpClientProvider; +import com.azure.core.http.jdk.implementation.JdkHttpClientProvider; -module com.azure.core.http.jdk.httpclient { +module com.azure.core.http.jdk { requires transitive com.azure.core; requires java.net.http; - exports com.azure.core.http.jdk.httpclient; + exports com.azure.core.http.jdk; provides com.azure.core.http.HttpClientProvider with JdkHttpClientProvider; diff --git a/sdk/core/azure-core-http-jdk/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider b/sdk/core/azure-core-http-jdk/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider new file mode 100644 index 0000000000000..b2229a4102c8c --- /dev/null +++ b/sdk/core/azure-core-http-jdk/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider @@ -0,0 +1 @@ +com.azure.core.http.jdk.implementation.JdkHttpClientProvider diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java b/sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java similarity index 98% rename from sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java rename to sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java index 623c7b7fe468a..a407fd0caed80 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java +++ b/sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; import com.azure.core.http.HttpClient; import com.azure.core.http.ProxyOptions; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/ReadmeSamples.java b/sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/ReadmeSamples.java similarity index 96% rename from sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/ReadmeSamples.java rename to sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/ReadmeSamples.java index 6e7b547de2319..3d6f5ccdb1e76 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/ReadmeSamples.java +++ b/sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/ReadmeSamples.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; import com.azure.core.http.HttpClient; import com.azure.core.http.ProxyOptions; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderTests.java similarity index 99% rename from sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java rename to sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderTests.java index 7d14cbef787be..48b16607a1ffe 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java +++ b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderTests.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpMethod; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientTests.java b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientTests.java similarity index 99% rename from sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientTests.java rename to sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientTests.java index d2e0fddecebb4..753ff8aff6df9 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientTests.java +++ b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientTests.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpMethod; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientTests.java b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkHttpClientTests.java similarity index 96% rename from sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientTests.java rename to sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkHttpClientTests.java index 3e8dabbaa6eac..66f0d3cf15270 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientTests.java +++ b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkHttpClientTests.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; import com.azure.core.http.HttpClient; import com.azure.core.test.HttpClientTestsWireMockServer; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/SimpleBasicAuthHttpProxyServer.java b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/SimpleBasicAuthHttpProxyServer.java similarity index 99% rename from sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/SimpleBasicAuthHttpProxyServer.java rename to sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/SimpleBasicAuthHttpProxyServer.java index 887f8b97041c2..b669736f9835b 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/SimpleBasicAuthHttpProxyServer.java +++ b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/SimpleBasicAuthHttpProxyServer.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient; +package com.azure.core.http.jdk; import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.client.WireMock; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java similarity index 91% rename from sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java rename to sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java index fca1c56765d0b..9086d72332ddf 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java +++ b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient.implementation; +package com.azure.core.http.jdk.implementation; import com.azure.core.http.HttpClient; import com.azure.core.http.ProxyOptions; -import com.azure.core.http.jdk.httpclient.JdkAsyncHttpClientBuilder; +import com.azure.core.http.jdk.JdkAsyncHttpClientBuilder; import com.azure.core.test.RestProxyTestsWireMockServer; import com.azure.core.test.implementation.RestProxyTests; import com.github.tomakehurst.wiremock.WireMockServer; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithJdkHttpClientTests.java b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithJdkHttpClientTests.java similarity index 90% rename from sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithJdkHttpClientTests.java rename to sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithJdkHttpClientTests.java index 93d553ca72398..c43974172db3f 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithJdkHttpClientTests.java +++ b/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithJdkHttpClientTests.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.httpclient.implementation; +package com.azure.core.http.jdk.implementation; import com.azure.core.http.HttpClient; -import com.azure.core.http.jdk.httpclient.JdkAsyncHttpClientBuilder; +import com.azure.core.http.jdk.JdkAsyncHttpClientBuilder; import com.azure.core.test.implementation.RestProxyTests; import com.azure.core.test.RestProxyTestsWireMockServer; import com.github.tomakehurst.wiremock.WireMockServer; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/resources/upload.txt b/sdk/core/azure-core-http-jdk/src/test/resources/upload.txt similarity index 100% rename from sdk/core/azure-core-http-jdk-httpclient/src/test/resources/upload.txt rename to sdk/core/azure-core-http-jdk/src/test/resources/upload.txt diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index f742ddbc1412b..c0b53b5f333ee 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -42,9 +42,9 @@ extends: - name: azure-core-experimental groupId: com.azure safeName: azurecoreexperimental - - name: azure-core-http-jdk-httpclient + - name: azure-core-http-jdk groupId: com.azure - safeName: azurecorehttpjdkhttpclient + safeName: azurecorehttpjdk - name: azure-core-http-netty groupId: com.azure safeName: azurecorehttpnetty diff --git a/sdk/core/pom.xml b/sdk/core/pom.xml index 50a3b1d0ebb5b..8073984558c35 100644 --- a/sdk/core/pom.xml +++ b/sdk/core/pom.xml @@ -12,7 +12,7 @@ azure-core azure-core-amqp azure-core-experimental - azure-core-http-jdk-httpclient + azure-core-http-jdk azure-core-http-netty azure-core-http-okhttp azure-core-management From ed9952a0c3fef018ada36ab052c7a802a45127e9 Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Tue, 1 Sep 2020 12:18:14 -0700 Subject: [PATCH 034/168] Add implementation and API design for ADT component APIs (#14666) Also added new ___RequestOptions classes for each group of client side APIs that map to one service API in case we ever need to add additional options to a particular service API. Also added a few null checks on code that dereferenced request option instances --- .../azure-digitaltwins-core/API design.md | 137 +++++++++++++++++- .../DeleteRelationshipRequestOptions.java | 21 +++ .../core/DigitalTwinsAsyncClient.java | 136 ++++++++++++++++- .../digitaltwins/core/DigitalTwinsClient.java | 89 +++++++++++- .../digitaltwins/core/RequestOptions.java | 2 +- .../core/UpdateComponentRequestOptions.java | 22 +++ .../UpdateRelationshipRequestOptions.java | 22 +++ .../azure/digitaltwins/core/AsyncSample.java | 2 +- 8 files changed, 414 insertions(+), 17 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/API design.md b/sdk/digitaltwins/azure-digitaltwins-core/API design.md index 5f024005ca117..aa75a9e3450c2 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/API design.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/API design.md @@ -676,16 +676,147 @@ When updating a component, the patch string follows the below format -

    -APIs +
    Async APIs +These APIs are invoked via DigitalTwinsAsyncClient. ```java -TODO: +/** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @return The application/json string representing the component of the digital twin. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public Mono getComponent(String digitalTwinId, String componentPath) + +/** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @return A {@link DigitalTwinsResponse} containing the application/json string representing the component of the digital twin. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public Mono> getComponentWithResponse(String digitalTwinId, String componentPath) + +/** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param clazz The class to deserialize the application/json component into. + * @param The generic type to deserialize the component to. + * @return The deserialized application/json object representing the component of the digital twin. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public Mono getComponent(String digitalTwinId, String componentPath, Class clazz) + +/** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param clazz The class to deserialize the application/json component into. + * @param The generic type to deserialize the component to. + * @return A {@link DigitalTwinsResponse} containing the deserialized application/json object representing the component of the digital twin. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public Mono> getComponentWithResponse(String digitalTwinId, String componentPath, Class clazz) + +/** + * Patch a component on a digital twin. + * @param digitalTwinId The Id of the digital twin that has the component to patch. + * @param componentPath The path of the component on the digital twin. + * @param componentUpdateOperations The application json patch to apply to the component. See {@link com.azure.digitaltwins.core.util.UpdateOperationUtility} for building + * this argument. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public Mono updateComponent(String digitalTwinId, String componentPath, List componentUpdateOperations) + +/** + * Patch a component on a digital twin. + * @param digitalTwinId The Id of the digital twin that has the component to patch. + * @param componentPath The path of the component on the digital twin. + * @param componentUpdateOperations The application json patch to apply to the component. See {@link com.azure.digitaltwins.core.util.UpdateOperationUtility} for building + * this argument. + * @param requestOptions The optional parameters for this request. + * @return A {@link DigitalTwinsResponse} containing an empty Mono. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public Mono> updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, UpdateComponentRequestOptions requestOptions) ``` +
    Sync APIs + +These APIs are invoked via DigitalTwinsClient. + +```java +/** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @return The application/json string representing the component of the digital twin. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public String getComponent(String digitalTwinId, String componentPath) + +/** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link DigitalTwinsResponse} containing the application/json string representing the component of the digital twin. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public DigitalTwinsResponse getComponentWithResponse(String digitalTwinId, String componentPath, Context context) + +/** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param clazz The class to deserialize the application/json component into. + * @param The generic type to deserialize the component to. + * @return The deserialized application/json object representing the component of the digital twin. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public T getComponent(String digitalTwinId, String componentPath, Class clazz) + +/** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param clazz The class to deserialize the application/json component into. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @param The generic type to deserialize the component to. + * @return A {@link DigitalTwinsResponse} containing the deserialized application/json object representing the component of the digital twin. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public DigitalTwinsResponse getComponentWithResponse(String digitalTwinId, String componentPath, Class clazz, Context context) + +/** + * Patch a component on a digital twin. + * @param digitalTwinId The Id of the digital twin that has the component to patch. + * @param componentPath The path of the component on the digital twin. + * @param componentUpdateOperations The application json patch to apply to the component. See {@link com.azure.digitaltwins.core.util.UpdateOperationUtility} for building + * this argument. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public void updateComponent(String digitalTwinId, String componentPath, List componentUpdateOperations) + +/** + * Patch a component on a digital twin. + * @param digitalTwinId The Id of the digital twin that has the component to patch. + * @param componentPath The path of the component on the digital twin. + * @param componentUpdateOperations The application json patch to apply to the component. See {@link com.azure.digitaltwins.core.util.UpdateOperationUtility} for building + * this argument. + * @param requestOptions The optional parameters for this request. + * @return The http response. + */ +@ServiceMethod(returns = ReturnType.SINGLE) +public DigitalTwinsResponse updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, UpdateComponentRequestOptions requestOptions, Context context) +``` + + ## Query
    APIs diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java new file mode 100644 index 0000000000000..e70aee1caabcc --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + + +import java.util.List; + +/** + * Optional settings that are specific to calls to {@link DigitalTwinsClient#updateComponent(String, String, List)} and its overloads. + */ +public class DeleteRelationshipRequestOptions extends RequestOptions { + // This class exists to be added to later if the deleteRelationship APIs get a new optional parameter in later service + // API versions and so that we don't have to expose that new optional parameter for other APIs like deleteDigitalTwin + + @Override + public DeleteRelationshipRequestOptions setIfMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 8f54858ee3233..159c7b2cee56f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -17,6 +17,7 @@ import com.azure.digitaltwins.core.implementation.models.IncomingRelationship; import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; import com.azure.digitaltwins.core.models.ModelData; +import com.azure.digitaltwins.core.implementation.models.DigitalTwinsGetComponentResponse; import com.azure.digitaltwins.core.util.DigitalTwinsResponse; import com.azure.digitaltwins.core.util.DigitalTwinsResponseHeaders; import com.azure.digitaltwins.core.util.ListModelOptions; @@ -307,7 +308,7 @@ Mono> getRelationshipWithResponse(String digitalTwin */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateRelationship(String digitalTwinId, String relationshipId, List relationshipUpdateOperations) { - return updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, new RequestOptions()) + return updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, new UpdateRelationshipRequestOptions()) .flatMap(voidResponse -> Mono.empty()); } @@ -321,14 +322,16 @@ public Mono updateRelationship(String digitalTwinId, String relationshipId * @return The Http response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, RequestOptions options) { + public Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, UpdateRelationshipRequestOptions options) { return withContext(context -> updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context)); } - Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, RequestOptions options, Context context) { + Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, UpdateRelationshipRequestOptions options, Context context) { + String ifMatch = options != null ? options.getIfMatch() : null; + return protocolLayer .getDigitalTwins() - .updateRelationshipWithResponseAsync(digitalTwinId, relationshipId, options.getIfMatch(), relationshipUpdateOperations, context) + .updateRelationshipWithResponseAsync(digitalTwinId, relationshipId, ifMatch, relationshipUpdateOperations, context) .map(response -> { DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), response.getValue(), twinHeaders); @@ -344,7 +347,7 @@ Mono> updateRelationshipWithResponse(String digitalTw */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteRelationship(String digitalTwinId, String relationshipId) { - return deleteRelationshipWithResponse(digitalTwinId, relationshipId, new RequestOptions()) + return deleteRelationshipWithResponse(digitalTwinId, relationshipId, new DeleteRelationshipRequestOptions()) .flatMap(voidResponse -> Mono.empty()); } @@ -357,14 +360,16 @@ public Mono deleteRelationship(String digitalTwinId, String relationshipId * @return The Http response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, RequestOptions options) { + public Mono> deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, DeleteRelationshipRequestOptions options) { return withContext(context -> deleteRelationshipWithResponse(digitalTwinId, relationshipId, options, context)); } - Mono> deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, RequestOptions options, Context context) { + Mono> deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, DeleteRelationshipRequestOptions options, Context context) { + String ifMatch = options != null ? options.getIfMatch() : null; + return protocolLayer .getDigitalTwins() - .deleteRelationshipWithResponseAsync(digitalTwinId, relationshipId, options.getIfMatch(), context); + .deleteRelationshipWithResponseAsync(digitalTwinId, relationshipId, ifMatch, context); } /** @@ -716,4 +721,119 @@ Mono> decommissionModelWithResponse(String modelId, Context conte return protocolLayer.getDigitalTwinModels().updateWithResponseAsync(modelId, updateOperation, context); } + + //================================================================================================================================================== + // Component APIs + //================================================================================================================================================== + + /** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @return The application/json string representing the component of the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getComponent(String digitalTwinId, String componentPath) { + return getComponentWithResponse(digitalTwinId, componentPath) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @return A {@link DigitalTwinsResponse} containing the application/json string representing the component of the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getComponentWithResponse(String digitalTwinId, String componentPath) { + return withContext(context -> getComponentWithResponse(digitalTwinId, componentPath, context)); + } + + Mono> getComponentWithResponse(String digitalTwinId, String componentPath, Context context) { + return protocolLayer.getDigitalTwins().getComponentWithResponseAsync(digitalTwinId, componentPath, context) + .flatMap(response -> { + try { + String jsonResponse = mapper.writeValueAsString(response.getValue()); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), jsonResponse, twinHeaders)); + } catch (JsonProcessingException e) { + logger.error("Failed to deserialize the returned component object into a string", e); + return Mono.error(e); + } + }); + } + + /** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param clazz The class to deserialize the application/json component into. + * @param The generic type to deserialize the component to. + * @return The deserialized application/json object representing the component of the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getComponent(String digitalTwinId, String componentPath, Class clazz) { + return getComponentWithResponse(digitalTwinId, componentPath, clazz) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param clazz The class to deserialize the application/json component into. + * @param The generic type to deserialize the component to. + * @return A {@link DigitalTwinsResponse} containing the deserialized application/json object representing the component of the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getComponentWithResponse(String digitalTwinId, String componentPath, Class clazz) { + return withContext(context -> getComponentWithResponse(digitalTwinId, componentPath, clazz, context)); + } + + Mono> getComponentWithResponse(String digitalTwinId, String componentPath, Class clazz, Context context) { + return protocolLayer.getDigitalTwins().getComponentWithResponseAsync(digitalTwinId, componentPath, context) + .flatMap(response -> { + T genericResponse = mapper.convertValue(response.getValue(), clazz); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return Mono.just(new DigitalTwinsResponse(response.getRequest(), response.getStatusCode(), response.getHeaders(), genericResponse, twinHeaders)); + }); + } + + /** + * Patch a component on a digital twin. + * @param digitalTwinId The Id of the digital twin that has the component to patch. + * @param componentPath The path of the component on the digital twin. + * @param componentUpdateOperations The application json patch to apply to the component. See {@link com.azure.digitaltwins.core.util.UpdateOperationUtility} for building + * this argument. + * @return An empty Mono. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateComponent(String digitalTwinId, String componentPath, List componentUpdateOperations) { + return updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, new UpdateComponentRequestOptions()) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Patch a component on a digital twin. + * @param digitalTwinId The Id of the digital twin that has the component to patch. + * @param componentPath The path of the component on the digital twin. + * @param componentUpdateOperations The application json patch to apply to the component. See {@link com.azure.digitaltwins.core.util.UpdateOperationUtility} for building + * this argument. + * @param options The optional parameters for this request. + * @return A {@link DigitalTwinsResponse} containing an empty Mono. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, UpdateComponentRequestOptions options) { + return withContext(context -> updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context)); + } + + Mono> updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, UpdateComponentRequestOptions options, Context context) { + String ifMatch = options != null ? options.getIfMatch() : null; + + return protocolLayer.getDigitalTwins().updateComponentWithResponseAsync(digitalTwinId, componentPath, ifMatch, componentUpdateOperations, context) + .flatMap(response -> { + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null, twinHeaders)); + }); + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 8cfb8965635c8..67b6031fe492e 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -180,7 +180,7 @@ public DigitalTwinsResponse getRelationshipWithResponse(String digitalTwi */ @ServiceMethod(returns = ReturnType.SINGLE) public void updateRelationship(String digitalTwinId, String relationshipId, List relationshipUpdateOperations) { - updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, new RequestOptions(), Context.NONE); + updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, new UpdateRelationshipRequestOptions(), Context.NONE); } /** @@ -194,7 +194,7 @@ public void updateRelationship(String digitalTwinId, String relationshipId, List * @return The Http response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DigitalTwinsResponse updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, RequestOptions options, Context context) { + public DigitalTwinsResponse updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, UpdateRelationshipRequestOptions options, Context context) { return digitalTwinsAsyncClient.updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context).block(); } @@ -206,7 +206,7 @@ public DigitalTwinsResponse updateRelationshipWithResponse(String digitalT */ @ServiceMethod(returns = ReturnType.SINGLE) public void deleteRelationship(String digitalTwinId, String relationshipId) { - deleteRelationshipWithResponse(digitalTwinId, relationshipId, new RequestOptions(), Context.NONE); + deleteRelationshipWithResponse(digitalTwinId, relationshipId, new DeleteRelationshipRequestOptions(), Context.NONE); } /** @@ -219,7 +219,7 @@ public void deleteRelationship(String digitalTwinId, String relationshipId) { * @return The Http response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, RequestOptions options, Context context) { + public Response deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, DeleteRelationshipRequestOptions options, Context context) { return digitalTwinsAsyncClient.deleteRelationshipWithResponse(digitalTwinId, relationshipId, options, context).block(); } @@ -381,4 +381,85 @@ public void decommissionModel(String modelId) { public Response decommissionModelWithResponse(String modelId, Context context) { return digitalTwinsAsyncClient.decommissionModelWithResponse(modelId, context).block(); } + + //================================================================================================================================================== + // Component APIs + //================================================================================================================================================== + + /** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @return The application/json string representing the component of the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String getComponent(String digitalTwinId, String componentPath) { + return getComponentWithResponse(digitalTwinId, componentPath, Context.NONE).getValue(); + } + + /** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link DigitalTwinsResponse} containing the application/json string representing the component of the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse getComponentWithResponse(String digitalTwinId, String componentPath, Context context) { + return digitalTwinsAsyncClient.getComponentWithResponse(digitalTwinId, componentPath, context).block(); + } + + /** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param clazz The class to deserialize the application/json component into. + * @param The generic type to deserialize the component to. + * @return The deserialized application/json object representing the component of the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public T getComponent(String digitalTwinId, String componentPath, Class clazz) { + return getComponentWithResponse(digitalTwinId, componentPath, clazz, Context.NONE).getValue(); + } + + /** + * Get a component of a digital twin. + * @param digitalTwinId The Id of the digital twin to get the component from. + * @param componentPath The path of the component on the digital twin to retrieve. + * @param clazz The class to deserialize the application/json component into. + * @param The generic type to deserialize the component to. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link DigitalTwinsResponse} containing the deserialized application/json object representing the component of the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse getComponentWithResponse(String digitalTwinId, String componentPath, Class clazz, Context context) { + return digitalTwinsAsyncClient.getComponentWithResponse(digitalTwinId, componentPath, clazz, context).block(); + } + + /** + * Patch a component on a digital twin. + * @param digitalTwinId The Id of the digital twin that has the component to patch. + * @param componentPath The path of the component on the digital twin. + * @param componentUpdateOperations The application json patch to apply to the component. See {@link com.azure.digitaltwins.core.util.UpdateOperationUtility} for building + * this argument. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateComponent(String digitalTwinId, String componentPath, List componentUpdateOperations) { + updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, new UpdateComponentRequestOptions(), Context.NONE); + } + + /** + * Patch a component on a digital twin. + * @param digitalTwinId The Id of the digital twin that has the component to patch. + * @param componentPath The path of the component on the digital twin. + * @param componentUpdateOperations The application json patch to apply to the component. See {@link com.azure.digitaltwins.core.util.UpdateOperationUtility} for building + * this argument. + * @param options The optional parameters for this request. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The http response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, UpdateComponentRequestOptions options, Context context) { + return digitalTwinsAsyncClient.updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context).block(); + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java index 5d8b3adafaf4f..e40b800e408c3 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java @@ -11,7 +11,7 @@ @Fluent public class RequestOptions { - private String ifMatch; + String ifMatch; /** * Gets a string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java new file mode 100644 index 0000000000000..228c9ebf760a2 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + + +import java.util.List; + +/** + * Optional settings that are specific to calls to {@link DigitalTwinsClient#updateComponent(String, String, List)} and its overloads. + */ +public class UpdateComponentRequestOptions extends RequestOptions { + // This class exists to be added to later if the updateComponent APIs get a new optional parameter in later service + // API versions and so that we don't have to expose that new optional parameter for other APIs like updateDigitalTwin, + // updateRelationship, etc. + + @Override + public UpdateComponentRequestOptions setIfMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java new file mode 100644 index 0000000000000..0558f4bcdb22b --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + + +import java.util.List; + +/** + * Optional settings that are specific to calls to {@link DigitalTwinsClient#updateComponent(String, String, List)} and its overloads. + */ +public class UpdateRelationshipRequestOptions extends RequestOptions { + // This class exists to be added to later if the updateRelationship APIs get a new optional parameter in later service + // API versions and so that we don't have to expose that new optional parameter for other APIs like updateDigitalTwin, + // updateComponent, etc. + + @Override + public UpdateRelationshipRequestOptions setIfMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java index a34a8a7495f07..32762a1b61373 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java @@ -152,7 +152,7 @@ public static void main(String[] args) throws InterruptedException, JsonProcessi String etag = jsonNode.path("$etag").textValue(); client.deleteRelationship(dtId_String, r_id_1).block(); - client.deleteRelationshipWithResponse(dtId_String, r_id_2, new RequestOptions().setIfMatch(etag)).block(); + client.deleteRelationshipWithResponse(dtId_String, r_id_2, new DeleteRelationshipRequestOptions().setIfMatch(etag)).block(); } } From 39bd935fdf8ca80f2f4e51fa6e8d81eb78559e56 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Tue, 1 Sep 2020 12:19:14 -0700 Subject: [PATCH 035/168] Add retry count to basic request logging (#14673) --- .../core/http/policy/HttpLoggingPolicy.java | 46 ++++++++++---- .../azure/core/http/policy/RetryPolicy.java | 62 +++++++++---------- .../http/policy/HttpLoggingPolicyTests.java | 51 ++++++++++++--- 3 files changed, 106 insertions(+), 53 deletions(-) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java index 34b39f8ed623c..d6e3362852cff 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java @@ -10,6 +10,7 @@ import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; +import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.UrlBuilder; import com.azure.core.util.logging.ClientLogger; @@ -19,10 +20,15 @@ import reactor.core.publisher.Mono; import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.channels.Channels; +import java.nio.channels.WritableByteChannel; import java.util.Collections; import java.util.Locale; +import java.util.Optional; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -40,6 +46,11 @@ public class HttpLoggingPolicy implements HttpPipelinePolicy { private final Set allowedQueryParameterNames; private final boolean prettyPrintBody; + /** + * Key for {@link Context} to pass request retry count metadata for logging. + */ + public static final String RETRY_COUNT_CONTEXT = "requestRetryCount"; + /** * Creates an HttpLoggingPolicy with the given log configurations. * @@ -75,7 +86,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN final ClientLogger logger = new ClientLogger((String) context.getData("caller-method").orElse("")); final long startNs = System.nanoTime(); - return logRequest(logger, context.getHttpRequest()) + return logRequest(logger, context.getHttpRequest(), context.getData(RETRY_COUNT_CONTEXT)) .then(next.process()) .flatMap(response -> logResponse(logger, response, startNs)) .doOnError(throwable -> logger.warning("<-- HTTP FAILED: ", throwable)); @@ -88,7 +99,8 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN * @param request HTTP request being sent to Azure. * @return A Mono which will emit the string to log. */ - private Mono logRequest(final ClientLogger logger, final HttpRequest request) { + private Mono logRequest(final ClientLogger logger, final HttpRequest request, + final Optional optionalRetryCount) { if (!logger.canLogAtLevel(LogLevel.INFORMATIONAL)) { return Mono.empty(); @@ -101,6 +113,10 @@ private Mono logRequest(final ClientLogger logger, final HttpRequest reque .append(" ") .append(getRedactedUrl(request.getUrl())) .append(System.lineSeparator()); + + optionalRetryCount.ifPresent(o -> requestLogMessage.append("Try count: ") + .append(o) + .append(System.lineSeparator())); } addHeadersToLogMessage(logger, request.getHeaders(), requestLogMessage); @@ -124,15 +140,12 @@ private Mono logRequest(final ClientLogger logger, final HttpRequest reque if (shouldBodyBeLogged(contentType, contentLength)) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream((int) contentLength); + WritableByteChannel bodyContentChannel = Channels.newChannel(outputStream); // Add non-mutating operators to the data stream. request.setBody( request.getBody() - .doOnNext(byteBuffer -> { - for (int i = byteBuffer.position(); i < byteBuffer.limit(); i++) { - outputStream.write(byteBuffer.get(i)); - } - }) + .flatMap(byteBuffer -> writeBufferToBodyStream(bodyContentChannel, byteBuffer)) .doFinally(ignored -> { requestLogMessage.append(contentLength) .append("-byte body:") @@ -207,12 +220,9 @@ private Mono logResponse(final ClientLogger logger, final HttpResp if (shouldBodyBeLogged(contentTypeHeader, contentLength)) { HttpResponse bufferedResponse = response.buffer(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream((int) contentLength); + WritableByteChannel bodyContentChannel = Channels.newChannel(outputStream); return bufferedResponse.getBody() - .doOnNext(byteBuffer -> { - for (int i = byteBuffer.position(); i < byteBuffer.limit(); i++) { - outputStream.write(byteBuffer.get(i)); - } - }) + .flatMap(byteBuffer -> writeBufferToBodyStream(bodyContentChannel, byteBuffer)) .doFinally(ignored -> { responseLogMessage.append("Response body:") .append(System.lineSeparator()) @@ -383,4 +393,16 @@ private static String convertStreamToString(ByteArrayOutputStream stream, Client throw logger.logExceptionAsError(new RuntimeException(ex)); } } + + /* + * Helper function which writes body ByteBuffers into the body message channel. + */ + private static Mono writeBufferToBodyStream(WritableByteChannel channel, ByteBuffer byteBuffer) { + try { + channel.write(byteBuffer.duplicate()); + return Mono.just(byteBuffer); + } catch (IOException ex) { + return Mono.error(ex); + } + } } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java index 0e7782a11385f..7980330d94ba5 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java @@ -7,16 +7,15 @@ import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.publisher.Mono; +import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.Objects; -import com.azure.core.util.logging.ClientLogger; -import reactor.core.publisher.Mono; import static com.azure.core.util.CoreUtils.isNullOrEmpty; -import java.time.Duration; - /** * A pipeline policy that retries when a recoverable HTTP error occurs. */ @@ -29,43 +28,41 @@ public class RetryPolicy implements HttpPipelinePolicy { private final ChronoUnit retryAfterTimeUnit; /** - * Creates {@link RetryPolicy} with default {@link ExponentialBackoff} as {@link RetryStrategy} and ignore the - * delay provided in response header. + * Creates {@link RetryPolicy} with default {@link ExponentialBackoff} as {@link RetryStrategy} and ignore the delay + * provided in response header. */ public RetryPolicy() { this(new ExponentialBackoff(), null, null); } /** - * Creates {@link RetryPolicy} with default {@link ExponentialBackoff} as {@link RetryStrategy} and use - * provided {@code retryAfterHeader} in {@link HttpResponse} headers for calculating retry delay. + * Creates {@link RetryPolicy} with default {@link ExponentialBackoff} as {@link RetryStrategy} and use provided + * {@code retryAfterHeader} in {@link HttpResponse} headers for calculating retry delay. * - * @param retryAfterHeader The HTTP header, such as 'Retry-After' or 'x-ms-retry-after-ms', to lookup for the - * retry delay. If the value is {@code null}, {@link RetryPolicy} will use the retry strategy to compute the delay - * and ignore the delay provided in response header. - * @param retryAfterTimeUnit The time unit to use when applying the retry delay. {@code null} is valid if, and only - * if, {@code retryAfterHeader} is {@code null}. - * @throws NullPointerException When {@code retryAfterTimeUnit} is {@code null} and {@code retryAfterHeader} is - * not {@code null}. + * @param retryAfterHeader The HTTP header, such as 'Retry-After' or 'x-ms-retry-after-ms', to lookup for the retry + * delay. If the value is null, {@link RetryPolicy} will use the retry strategy to compute the delay and ignore the + * delay provided in response header. + * @param retryAfterTimeUnit The time unit to use when applying the retry delay. null is valid if, and only if, + * {@code retryAfterHeader} is null. + * @throws NullPointerException When {@code retryAfterTimeUnit} is null and {@code retryAfterHeader} is not null. */ public RetryPolicy(String retryAfterHeader, ChronoUnit retryAfterTimeUnit) { this(new ExponentialBackoff(), retryAfterHeader, retryAfterTimeUnit); } /** - * Creates {@link RetryPolicy} with the provided {@link RetryStrategy} and default {@link ExponentialBackoff} - * as {@link RetryStrategy}. It will use provided {@code retryAfterHeader} in {@link HttpResponse} headers for + * Creates {@link RetryPolicy} with the provided {@link RetryStrategy} and default {@link ExponentialBackoff} as + * {@link RetryStrategy}. It will use provided {@code retryAfterHeader} in {@link HttpResponse} headers for * calculating retry delay. * * @param retryStrategy The {@link RetryStrategy} used for retries. - * @param retryAfterHeader The HTTP header, such as 'Retry-After' or 'x-ms-retry-after-ms', to lookup for the - * retry delay. If the value is {@code null}, {@link RetryPolicy} will use the retry strategy to compute the delay - * and ignore the delay provided in response header. - * @param retryAfterTimeUnit The time unit to use when applying the retry delay. {@code null} is valid if, and only - * if, {@code retryAfterHeader} is {@code null}. - * - * @throws NullPointerException When {@code retryStrategy} is {@code null}. Also when {@code retryAfterTimeUnit} - * is {@code null} and {@code retryAfterHeader} is not {@code null}. + * @param retryAfterHeader The HTTP header, such as 'Retry-After' or 'x-ms-retry-after-ms', to lookup for the retry + * delay. If the value is null, {@link RetryPolicy} will use the retry strategy to compute the delay and ignore the + * delay provided in response header. + * @param retryAfterTimeUnit The time unit to use when applying the retry delay. null is valid if, and only if, + * {@code retryAfterHeader} is null. + * @throws NullPointerException When {@code retryStrategy} is null. Also when {@code retryAfterTimeUnit} is null and + * {@code retryAfterHeader} is not null. */ public RetryPolicy(RetryStrategy retryStrategy, String retryAfterHeader, ChronoUnit retryAfterTimeUnit) { this.retryStrategy = Objects.requireNonNull(retryStrategy, "'retryStrategy' cannot be null."); @@ -77,12 +74,11 @@ public RetryPolicy(RetryStrategy retryStrategy, String retryAfterHeader, ChronoU } /** - * Creates a {@link RetryPolicy} with the provided {@link RetryStrategy} and ignore the delay provided in - * response header. + * Creates a {@link RetryPolicy} with the provided {@link RetryStrategy} and ignore the delay provided in response + * header. * * @param retryStrategy The {@link RetryStrategy} used for retries. - * - * @throws NullPointerException When {@code retryStrategy} is {@code null}. + * @throws NullPointerException When {@code retryStrategy} is null. */ public RetryPolicy(RetryStrategy retryStrategy) { this(retryStrategy, null, null); @@ -94,8 +90,9 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN } private Mono attemptAsync(final HttpPipelineCallContext context, final HttpPipelineNextPolicy next, - final HttpRequest originalHttpRequest, final int tryCount) { + final HttpRequest originalHttpRequest, final int tryCount) { context.setHttpRequest(originalHttpRequest.copy()); + context.setData(HttpLoggingPolicy.RETRY_COUNT_CONTEXT, tryCount + 1); return next.clone().process() .flatMap(httpResponse -> { if (shouldRetry(httpResponse, tryCount)) { @@ -129,9 +126,10 @@ private boolean shouldRetry(HttpResponse response, int tryCount) { /** * Determines the delay duration that should be waited before retrying. + * * @param response HTTP response - * @return If the HTTP response has a retry-after-ms header that will be returned, - * otherwise the duration used during the construction of the policy. + * @return If the HTTP response has a retry-after-ms header that will be returned, otherwise the duration used + * during the construction of the policy. */ private Duration determineDelayDuration(HttpResponse response, int tryCount) { int code = response.getStatusCode(); diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/HttpLoggingPolicyTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/HttpLoggingPolicyTests.java index 0e31e11a2645c..d65406d79347d 100644 --- a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/HttpLoggingPolicyTests.java +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/HttpLoggingPolicyTests.java @@ -17,11 +17,11 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.LogLevel; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.parallel.ResourceLock; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.EnumSource; import org.junit.jupiter.params.provider.MethodSource; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -30,6 +30,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; +import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; import java.nio.ByteBuffer; @@ -38,10 +39,13 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Stream; import static com.azure.core.util.Configuration.PROPERTY_AZURE_LOG_LEVEL; import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * This class contains tests for {@link HttpLoggingPolicy}. @@ -102,8 +106,7 @@ public void redactQueryParameters(String requestUrl, String expectedQueryString, StepVerifier.create(pipeline.send(new HttpRequest(HttpMethod.POST, requestUrl), CONTEXT)) .verifyComplete(); - String logString = new String(logCaptureStream.toByteArray(), StandardCharsets.UTF_8); - Assertions.assertTrue(logString.contains(expectedQueryString)); + assertTrue(convertOutputStreamToString(logCaptureStream).contains(expectedQueryString)); } private static Stream redactQueryParametersSupplier() { @@ -154,9 +157,8 @@ public void validateLoggingDoesNotConsumeRequest(Flux stream, byte[] CONTEXT)) .verifyComplete(); - String logString = new String(logCaptureStream.toByteArray(), StandardCharsets.UTF_8); - System.out.println(logString); - Assertions.assertTrue(logString.contains(new String(data, StandardCharsets.UTF_8))); + String logString = convertOutputStreamToString(logCaptureStream); + assertTrue(logString.contains(new String(data, StandardCharsets.UTF_8))); } /** @@ -182,9 +184,8 @@ public void validateLoggingDoesNotConsumeResponse(Flux stream, byte[ .verifyComplete()) .verifyComplete(); - String logString = new String(logCaptureStream.toByteArray(), StandardCharsets.UTF_8); - System.out.println(logString); - Assertions.assertTrue(logString.contains(new String(data, StandardCharsets.UTF_8))); + String logString = convertOutputStreamToString(logCaptureStream); + assertTrue(logString.contains(new String(data, StandardCharsets.UTF_8))); } private static Stream validateLoggingDoesNotConsumeSupplier() { @@ -272,4 +273,36 @@ public Mono getBodyAsString(Charset charset) { return getBodyAsByteArray().map(bytes -> new String(bytes, charset)); } } + + @ParameterizedTest(name = "[{index}] {displayName}") + @EnumSource(value = HttpLogDetailLevel.class, mode = EnumSource.Mode.INCLUDE, + names = { "BASIC", "HEADERS", "BODY", "BODY_AND_HEADERS" }) + @ResourceLock("SYSTEM_OUT") + public void loggingIncludesRetryCount(HttpLogDetailLevel logLevel) { + AtomicInteger requestCount = new AtomicInteger(); + HttpRequest request = new HttpRequest(HttpMethod.GET, "https://test.com"); + + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(new RetryPolicy(), new HttpLoggingPolicy(new HttpLogOptions().setLogLevel(logLevel))) + .httpClient(ignored -> (requestCount.getAndIncrement() == 0) + ? Mono.error(new RuntimeException("Try again!")) + : Mono.just(new com.azure.core.http.MockHttpResponse(ignored, 200))) + .build(); + + StepVerifier.create(pipeline.send(request, CONTEXT)) + .assertNext(response -> assertEquals(200, response.getStatusCode())) + .verifyComplete(); + + String logString = convertOutputStreamToString(logCaptureStream); + assertTrue(logString.contains("Try count: 1")); + assertTrue(logString.contains("Try count: 2")); + } + + private static String convertOutputStreamToString(ByteArrayOutputStream stream) { + try { + return stream.toString("UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + } } From 181a04ab2f2769246c9b60e05fa4dc50cfa73493 Mon Sep 17 00:00:00 2001 From: Mohammad Derakhshani Date: Tue, 1 Sep 2020 12:32:59 -0700 Subject: [PATCH 036/168] Cosmos Encryption removed block() in implementation (#14529) * removed blocking calls from cosmos encryption * undo change * cleanup * minor cleanup * address code review comment * method renaming (dropped Async suffix from the methods) * cleanup, move internal classes to implementation package * move internal classes to implementation * internal APIs moved to package private --- .../AzureKeyVaultCosmosEncryptor.java | 10 +- .../AzureKeyVaultKeyWrapMetadata.java | 23 +- .../AzureKeyVaultKeyWrapProvider.java | 98 ------- .../cosmos/encryption/DataEncryptionKey.java | 2 - .../EncryptionCosmosAsyncContainer.java | 23 +- .../encryption/EncryptionKeyWrapMetadata.java | 39 ++- .../encryption/EncryptionKeyWrapProvider.java | 7 +- .../azure/cosmos/encryption/Encryptor.java | 4 +- .../encryption/KeyVaultAccessClient.java | 254 ------------------ .../cosmos/encryption/KeyVaultConstants.java | 28 -- .../KeyVaultTokenCredentialFactory.java | 2 +- .../AzureKeyVaultKeyWrapProvider.java | 130 +++++++++ .../encryption/CachedDekProperties.java | 3 +- .../CosmosDataEncryptionKeyProvider.java | 2 +- .../encryption/CosmosEncryptor.java | 4 +- .../encryption/CryptographyClientFactory.java | 5 +- .../DataEncryptionKeyContainer.java | 6 +- .../DataEncryptionKeyContainerCore.java | 185 +++++++------ .../implementation/encryption/DekCache.java | 12 +- .../encryption/EncryptionProcessor.java | 17 +- .../ImplementationBridgeHelpers.java | 91 +++++++ .../encryption/KeyClientFactory.java | 3 +- .../encryption/KeyVaultAccessClient.java | 211 +++++++++++++++ .../encryption/KeyVaultAccessException.java | 2 +- .../encryption/KeyVaultConstants.java | 30 +++ .../encryption/KeyVaultCosmosException.java | 16 ++ .../encryption/KeyVaultKeyUriProperties.java | 6 +- .../UserProvidedTokenCredentialFactory.java | 5 +- .../java/com/azure/cosmos/Program.java | 2 +- .../encryption/KeyVaultAccessClientTests.java | 4 + .../DecryptDataEncryptedByDotNetTest.java | 11 +- .../encryption/EncryptionProcessorTest.java | 4 +- .../encryption/EncryptionTests.java | 86 +++--- .../NewEncryptionProcessorTests.java | 10 +- .../encryption/OldEncryptionTests.java | 13 +- .../models/CosmosItemRequestOptions.java | 18 ++ .../cosmos/models/ModelBridgeInternal.java | 5 + 37 files changed, 782 insertions(+), 589 deletions(-) delete mode 100644 sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultKeyWrapProvider.java delete mode 100644 sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultAccessClient.java delete mode 100644 sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultConstants.java create mode 100644 sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AzureKeyVaultKeyWrapProvider.java rename sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/{ => implementation}/encryption/CryptographyClientFactory.java (82%) create mode 100644 sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/ImplementationBridgeHelpers.java rename sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/{ => implementation}/encryption/KeyClientFactory.java (84%) create mode 100644 sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultAccessClient.java rename sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/{ => implementation}/encryption/KeyVaultAccessException.java (93%) create mode 100644 sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultConstants.java create mode 100644 sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultCosmosException.java rename sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/{ => implementation}/encryption/KeyVaultKeyUriProperties.java (94%) rename sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/{ => implementation}/encryption/UserProvidedTokenCredentialFactory.java (87%) diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultCosmosEncryptor.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultCosmosEncryptor.java index 2cc984dc42ea6..69fd572188d2b 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultCosmosEncryptor.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultCosmosEncryptor.java @@ -5,9 +5,11 @@ import com.azure.core.credential.TokenCredential; import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.implementation.encryption.AzureKeyVaultKeyWrapProvider; import com.azure.cosmos.implementation.encryption.CosmosDataEncryptionKeyProvider; import com.azure.cosmos.implementation.encryption.CosmosEncryptor; import com.azure.cosmos.implementation.encryption.DataEncryptionKeyContainer; +import com.azure.cosmos.implementation.encryption.UserProvidedTokenCredentialFactory; import reactor.core.publisher.Mono; /** @@ -69,22 +71,22 @@ public void initialize( // TODO: should this be async? moderakh } @Override - public Mono encryptAsync( + public Mono encrypt( byte[] plainText, String dataEncryptionKeyId, String encryptionAlgorithm) { - return this.cosmosEncryptor.encryptAsync( + return this.cosmosEncryptor.encrypt( plainText, dataEncryptionKeyId, encryptionAlgorithm); } @Override - public Mono decryptAsync( + public Mono decrypt( byte[] cipherText, String dataEncryptionKeyId, String encryptionAlgorithm) { - return this.cosmosEncryptor.decryptAsync( + return this.cosmosEncryptor.decrypt( cipherText, dataEncryptionKeyId, encryptionAlgorithm); diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultKeyWrapMetadata.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultKeyWrapMetadata.java index 420ed7eb959ae..b88a6dbfe1abd 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultKeyWrapMetadata.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultKeyWrapMetadata.java @@ -3,13 +3,17 @@ package com.azure.cosmos.encryption; +import com.azure.cosmos.implementation.encryption.ImplementationBridgeHelpers; + import java.net.URL; +import static com.azure.cosmos.implementation.encryption.ImplementationBridgeHelpers.AzureKeyVaultKeyWrapMetadataHelper; + /** * Metadata used by Azure Key Vault to wrap (encrypt) and unwrap (decrypt) keys. */ public final class AzureKeyVaultKeyWrapMetadata extends EncryptionKeyWrapMetadata { - static final String TypeConstant = "akv"; + private static final String TYPE_CONSTANT = "akv"; // TODO: moderakh use URL vs URI? /** @@ -19,6 +23,21 @@ public final class AzureKeyVaultKeyWrapMetadata extends EncryptionKeyWrapMetadat */ public AzureKeyVaultKeyWrapMetadata(URL masterKeyUri) { // masterKeyUri.AbsoluteUri - super(AzureKeyVaultKeyWrapMetadata.TypeConstant, masterKeyUri.toString()); + super(AzureKeyVaultKeyWrapMetadata.TYPE_CONSTANT, masterKeyUri.toString()); + } + + /////////////////////////////////////////////////////////////////////////////////////////// + // the following helper/accessor only helps to access this class outside of this package.// + /////////////////////////////////////////////////////////////////////////////////////////// + + static { + AzureKeyVaultKeyWrapMetadataHelper.setAzureKeyVaultKeyWrapMetadataAccessor( + new ImplementationBridgeHelpers.AzureKeyVaultKeyWrapMetadataHelper.AzureKeyVaultKeyWrapMetadataAccessor() { + @Override + public String getTypeConstant() { + return TYPE_CONSTANT; + } + } + ); } } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultKeyWrapProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultKeyWrapProvider.java deleted file mode 100644 index fa3ee399f9df0..0000000000000 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/AzureKeyVaultKeyWrapProvider.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.cosmos.encryption; - -import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; -import com.azure.cosmos.implementation.encryption.EncryptionUtils; - -import java.time.Duration; -import java.util.concurrent.atomic.AtomicReference; - -// TODO: moderakh remove blocking calls -/** - * Provides functionality to wrap (encrypt) and unwrap (decrypt) data encryption keys using master keys stored in Azure Key Vault. - * Unwrapped data encryption keys will be cached within the client SDK for a period of 1 hour. - */ -public class AzureKeyVaultKeyWrapProvider implements EncryptionKeyWrapProvider { - private final KeyVaultAccessClient keyVaultAccessClient; - private final Duration rawDekCacheTimeToLive; - - /** - * Creates a new instance of a provider to wrap (encrypt) and unwrap (decrypt) data encryption keys using master - * keys stored in Azure Key Vault. - * - * @param keyVaultTokenCredentialFactory KeyVaultTokenCredentialFactory instance - *

    - * Amount of time the unencrypted form of the data encryption key can be cached on the client before UnwrapKeyAsync - * needs to be called again. - */ - public AzureKeyVaultKeyWrapProvider(KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory) { - this.keyVaultAccessClient = new KeyVaultAccessClient(keyVaultTokenCredentialFactory); - this.rawDekCacheTimeToLive = Duration.ofHours(1); - } - - /** - * Creates a new instance of a provider to wrap (encrypt) and unwrap (decrypt) data encryption keys using master - * keys stored in Azure Key Vault. - * - * @param keyVaultTokenCredentialFactory KeyVaultTokenCredentialFactory instance - * @param keyClientFactory KeyClient Factory Methods - * @param cryptographyClientFactory CryptographyClient Factory Methods. - */ - public AzureKeyVaultKeyWrapProvider(KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory, - KeyClientFactory keyClientFactory, - CryptographyClientFactory cryptographyClientFactory) { - this.keyVaultAccessClient = new KeyVaultAccessClient(keyVaultTokenCredentialFactory, keyClientFactory, - cryptographyClientFactory); - this.rawDekCacheTimeToLive = Duration.ofHours(1); - } - - // TODO make this async - @Override - public EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, - EncryptionKeyWrapMetadata metadata) { - if (!StringUtils.equals(metadata.type, AzureKeyVaultKeyWrapMetadata.TypeConstant)) { - throw new IllegalArgumentException("Invalid metadata metadata"); - } - - if (!StringUtils.equals(metadata.algorithm, KeyVaultConstants.RsaOaep256.toString())) { - throw new IllegalArgumentException( - String.format("Unknown encryption key wrap algorithm %s metadata", metadata.algorithm)); - } - - AtomicReference keyVaultUriPropertiesRef = - new AtomicReference(); - - if (!KeyVaultKeyUriProperties.tryParse(EncryptionUtils.toURI(metadata.value), keyVaultUriPropertiesRef)) { - throw new IllegalArgumentException(String.format("KeyVault Key Uri %s is invalid.", metadata.value)); - } - - byte[] result = this.keyVaultAccessClient.unwrapKeyAsync(wrappedKey, keyVaultUriPropertiesRef.get()).block(); - return new EncryptionKeyUnwrapResult(result, this.rawDekCacheTimeToLive); - } - - @Override - public EncryptionKeyWrapResult wrapKey(byte[] key, - EncryptionKeyWrapMetadata metadata) { - if (!StringUtils.equals(metadata.type, AzureKeyVaultKeyWrapMetadata.TypeConstant)) { - throw new IllegalArgumentException("Invalid metadata metadata"); - } - - AtomicReference keyVaultUriPropertiesRef = - new AtomicReference<>(); - if (!KeyVaultKeyUriProperties.tryParse(EncryptionUtils.toURI(metadata.value), keyVaultUriPropertiesRef)) { - throw new IllegalArgumentException(String.format("KeyVault Key Uri %s is invalid.", metadata.value)); - } - - if (!this.keyVaultAccessClient.validatePurgeProtectionAndSoftDeleteSettingsAsync(keyVaultUriPropertiesRef.get()).block()) { - throw new IllegalArgumentException(String.format("Key Vault %s provided must have soft delete and purge " - + "protection enabled.", keyVaultUriPropertiesRef.get().getKeyUri())); - } - - byte[] result = this.keyVaultAccessClient.wrapKeyAsync(key, keyVaultUriPropertiesRef.get()).block(); - EncryptionKeyWrapMetadata responseMetadata = new EncryptionKeyWrapMetadata(metadata.type, metadata.value, - KeyVaultConstants.RsaOaep256.toString()); - return new EncryptionKeyWrapResult(result, responseMetadata); - } -} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/DataEncryptionKey.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/DataEncryptionKey.java index 4144d569436d1..eca0603e4deec 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/DataEncryptionKey.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/DataEncryptionKey.java @@ -6,8 +6,6 @@ import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import com.azure.cosmos.implementation.encryption.AeadAes256CbcHmac256AlgorithmProvider; -import java.lang.reflect.InvocationTargetException; - /** * Abstraction for a data encryption key for use in client-side encryption. See https://aka.ms/CosmosClientEncryption * for more information on client-side encryption support in Azure Cosmos DB. diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionCosmosAsyncContainer.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionCosmosAsyncContainer.java index b6f818fecda17..d74522295ed6f 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionCosmosAsyncContainer.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionCosmosAsyncContainer.java @@ -48,8 +48,7 @@ public class EncryptionCosmosAsyncContainer { EncryptionCosmosAsyncContainer(String id, CosmosAsyncDatabase database, Encryptor encryptor) { this.container = BridgeInternal.createCosmosAsyncContainer(id, database); this.encryptor = encryptor; - // TODO: moderakh once EncryptionKeyWrapProvider apis are made async this should change to Schedulers.parallel() - this.encryptionScheduler = Schedulers.boundedElastic(); + this.encryptionScheduler = Schedulers.parallel(); } private Mono> createItemStream(byte[] payload, @@ -59,7 +58,7 @@ private Mono> createItemStream(byte[] payload, // TODO: add diagnostics assert encryptionItemRequestOptions != null && encryptionItemRequestOptions.getEncryptionOptions() != null; - Mono encryptedPayloadMono = EncryptionProcessor.encryptAsync(payload, encryptor, + Mono encryptedPayloadMono = EncryptionProcessor.encrypt(payload, encryptor, encryptionItemRequestOptions.getEncryptionOptions()); return encryptedPayloadMono.flatMap( @@ -72,7 +71,7 @@ private Mono> createItemStream(byte[] payload, .flatMap(rsp -> setByteArrayContent( rsp, - decryptResponseAsync( + decryptResponse( EncryptionModelBridgeInternal.getByteArrayContent(rsp), encryptionItemRequestOptions.getDecryptionResultHandler())) ); @@ -88,7 +87,7 @@ private Mono> replaceItemStream(byte[] payload, // TODO: add diagnostics assert encryptionItemRequestOptions != null && encryptionItemRequestOptions.getEncryptionOptions() != null; - Mono encryptedPayloadMono = EncryptionProcessor.encryptAsync(payload, encryptor, + Mono encryptedPayloadMono = EncryptionProcessor.encrypt(payload, encryptor, encryptionItemRequestOptions.getEncryptionOptions()); return encryptedPayloadMono.flatMap( @@ -103,7 +102,7 @@ private Mono> replaceItemStream(byte[] payload, .flatMap(rsp -> setByteArrayContent( rsp, - decryptResponseAsync( + decryptResponse( EncryptionModelBridgeInternal.getByteArrayContent(rsp), encryptionItemRequestOptions.getDecryptionResultHandler())) @@ -121,7 +120,7 @@ private Mono> upsertItemStream(byte[] payload, assert encryptionItemRequestOptions != null && encryptionItemRequestOptions.getEncryptionOptions() != null; - Mono encryptedPayloadMono = EncryptionProcessor.encryptAsync(payload, encryptor, + Mono encryptedPayloadMono = EncryptionProcessor.encrypt(payload, encryptor, encryptionItemRequestOptions.getEncryptionOptions()).subscribeOn(encryptionScheduler); return encryptedPayloadMono.flatMap( @@ -134,7 +133,7 @@ private Mono> upsertItemStream(byte[] payload, .flatMap(rsp -> setByteArrayContent( rsp, - decryptResponseAsync( + decryptResponse( EncryptionModelBridgeInternal.getByteArrayContent(rsp), encryptionItemRequestOptions.getDecryptionResultHandler())) ); @@ -302,7 +301,7 @@ private Mono> readItemStream(String id, decryptionErroHandler = encryptionItemRequestOptions.getDecryptionResultHandler(); } - return setByteArrayContent(responseMessage, this.decryptResponseAsync( + return setByteArrayContent(responseMessage, this.decryptResponse( EncryptionModelBridgeInternal.getByteArrayContent(responseMessage), decryptionErroHandler)); } ); @@ -376,7 +375,7 @@ ItemDeserializer getItemDeserializer() { return CosmosBridgeInternal.getAsyncDocumentClient(container.getDatabase()).getItemDeserializer(); } - private Mono decryptResponseAsync( + private Mono decryptResponse( byte[] input, Consumer decryptionResultHandler) { @@ -384,7 +383,7 @@ private Mono decryptResponseAsync( return Mono.empty(); } - return EncryptionProcessor.decryptAsync( + return EncryptionProcessor.decrypt( input, this.encryptor).onErrorResume( throwable -> { @@ -423,7 +422,7 @@ private Function>> queryDecrypt page -> { List> byteArrayMonoList = page.getResults().stream() .map(node -> cosmosSerializerToStream(node)) - .map(bytes -> decryptResponseAsync(bytes, handler)) + .map(bytes -> decryptResponse(bytes, handler)) .collect(Collectors.toList()); return Flux.concat(byteArrayMonoList).map( diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionKeyWrapMetadata.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionKeyWrapMetadata.java index 8a711e111ec89..2e70dd3e93161 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionKeyWrapMetadata.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionKeyWrapMetadata.java @@ -9,12 +9,15 @@ import java.util.Objects; +import static com.azure.cosmos.implementation.encryption.ImplementationBridgeHelpers.EncryptionKeyWrapMetadataHelper; + /** * Metadata that a key wrapping provider can use to wrap/unwrap data encryption keys. * {@link EncryptionKeyWrapProvider} */ public class EncryptionKeyWrapMetadata { + /** * For JSON deserialize */ @@ -41,13 +44,11 @@ public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source) { this.value = source.value; } - // TODO: this doen't need to be public. only for test FIXME moderakh - public EncryptionKeyWrapMetadata(String type, String value) { + EncryptionKeyWrapMetadata(String type, String value) { this(type, value, null); } - // TODO: this doen't need to be public. only for test FIXME moderakh - public EncryptionKeyWrapMetadata(String type, String value, String algorithm) { + EncryptionKeyWrapMetadata(String type, String value, String algorithm) { Preconditions.checkNotNull(type, "type is null"); Preconditions.checkNotNull(value, "value is null"); this.type = type; @@ -86,4 +87,34 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(type, algorithm, value); } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // the following helper/accessor only helps to access this class outside of this package.// + /////////////////////////////////////////////////////////////////////////////////////////// + + static { + EncryptionKeyWrapMetadataHelper.setEncryptionKeyWrapMetadataAccessor( + new EncryptionKeyWrapMetadataHelper.EncryptionKeyWrapMetadataAccessor() { + @Override + public EncryptionKeyWrapMetadata create(String type, String value, String algorithm) { + return new EncryptionKeyWrapMetadata(type, value, algorithm); + } + + @Override + public EncryptionKeyWrapMetadata create(String type, String value) { + return new EncryptionKeyWrapMetadata(type, value); + } + + @Override + public String getType(EncryptionKeyWrapMetadata metadata) { + return metadata.type; + } + + @Override + public String getAlgorithm(EncryptionKeyWrapMetadata metadata) { + return metadata.algorithm; + } + }); + } } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionKeyWrapProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionKeyWrapProvider.java index 1fc41c93d93b3..d7a63cf832ddb 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionKeyWrapProvider.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/EncryptionKeyWrapProvider.java @@ -3,6 +3,8 @@ package com.azure.cosmos.encryption; +import reactor.core.publisher.Mono; + /** * Interface for interacting with a provider that can be used to wrap (encrypt) and unwrap (decrypt) data encryption * keys for envelope based encryption. Implementations are expected to ensure that master keys are highly available and @@ -32,7 +34,7 @@ public interface EncryptionKeyWrapProvider { * @param metadata Metadata for the wrap provider that should be used to wrap / unwrap the key. * @return Wrapped (i.e. encrypted) version of data encryption key passed in possibly with updated metadata. */ - EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata); + Mono wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata); /** * Unwraps (i.e. decrypts) the provided wrapped data encryption key. @@ -42,6 +44,5 @@ public interface EncryptionKeyWrapProvider { * @return unwrapped (i.e. unencrypted) version of data encryption key passed in and how long the raw data * encryption key can be cached on the client. */ - EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata); + Mono unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata); } -// TODO: @moderakh look into if this class needs to be async diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/Encryptor.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/Encryptor.java index eea3e21d4e15b..97b29f9a9d9be 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/Encryptor.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/Encryptor.java @@ -19,7 +19,7 @@ public interface Encryptor { * @param encryptionAlgorithm Identifier for the encryption algorithm. * @return Mono of Cipher text byte array. */ - Mono encryptAsync( + Mono encrypt( byte[] plainText, String dataEncryptionKeyId, String encryptionAlgorithm); @@ -32,7 +32,7 @@ Mono encryptAsync( * @param encryptionAlgorithm Identifier for the encryption algorithm. * @return Mono of Plain text byte array. */ - Mono decryptAsync( + Mono decrypt( byte[] cipherText, String dataEncryptionKeyId, String encryptionAlgorithm); diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultAccessClient.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultAccessClient.java deleted file mode 100644 index 532f45de08336..0000000000000 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultAccessClient.java +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.cosmos.encryption; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.exception.AzureException; -import com.azure.cosmos.implementation.caches.AsyncCache; -import com.azure.security.keyvault.keys.KeyAsyncClient; -import com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient; -import com.azure.security.keyvault.keys.cryptography.models.UnwrapResult; -import com.azure.security.keyvault.keys.cryptography.models.WrapResult; -import com.azure.security.keyvault.keys.models.KeyVaultKey; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import reactor.core.publisher.Mono; - -import java.net.URI; - -/** - * Implements Core KeyVault access methods that uses the TODO: moderakh this doesn't need to be public. it is public due - * to tests. FIXME - * TODO: methods should be async moderakh - */ -public class KeyVaultAccessClient { - private final AsyncCache akvClientCache; - private final AsyncCache akvCryptoClientCache; - private final KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory; - private final KeyClientFactory keyClientFactory; - private final CryptographyClientFactory cryptographyClientFactory; - private final Logger logger = LoggerFactory.getLogger(KeyVaultAccessClient.class); - - /** - * Initializes a new instance of the {@link KeyVaultAccessClient} - * - * @param keyVaultTokenCredentialFactory TokenCredentials factory - */ - public KeyVaultAccessClient(KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory) { - this.keyVaultTokenCredentialFactory = keyVaultTokenCredentialFactory; - this.akvClientCache = new AsyncCache<>(); - this.akvCryptoClientCache = new AsyncCache<>(); - this.keyClientFactory = new KeyClientFactory(); - this.cryptographyClientFactory = new CryptographyClientFactory(); - } - - /** - * TODO: this doesn't need to be public moderakh Initializes a new instance of the {@link KeyVaultAccessClient} - * class Invokes internal factory Methods. - * - * @param keyVaultTokenCredentialFactory TokenCredential - * @param keyClientFactory KeyClient Factory - * @param cryptographyClientFactory KeyClient Factory - */ - public KeyVaultAccessClient(KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory, - KeyClientFactory keyClientFactory, - CryptographyClientFactory cryptographyClientFactory) { - this.keyVaultTokenCredentialFactory = keyVaultTokenCredentialFactory; - this.akvClientCache = new AsyncCache<>(); - this.akvCryptoClientCache = new AsyncCache<>(); - this.keyClientFactory = keyClientFactory; - this.cryptographyClientFactory = cryptographyClientFactory; - } - - /** - * Unwrap the encrypted Key. Only supports encrypted bytes in base64 format. - * - * Note: this may return an empty Mono if cryptoClient returns empty/null - * - * @param wrappedKey encrypted bytes. - * @param keyVaultUriProperties Parsed key Vault Uri Properties.Properties as in sample Format: - * https://{keyvault-name}.vault.azure.net/keys/{key-name}/{key-version} - * @return Mono of Result including KeyIdentifier and decrypted bytes in base64 string format, can be convert to - * bytes using Convert.FromBase64String(). - */ - public Mono unwrapKeyAsync( - byte[] wrappedKey, - KeyVaultKeyUriProperties keyVaultUriProperties) { - UnwrapResult keyOpResult; - - // Get a Crypto Client for Wrap and UnWrap,this gets init per Key ID - Mono cryptoClientMono = this.getCryptoClientAsync(keyVaultUriProperties); - - // TODO: moderakh change to async - CryptographyAsyncClient cryptoClient = cryptoClientMono.block(); - if (cryptoClient == null) { - // this never be empty Mono and hence never null - // TODO: remove this once moved to async and removed blocking call - return Mono.error(new IllegalStateException("avk cannot be null")); - } - - try { - keyOpResult = cryptoClient.unwrapKey(KeyVaultConstants.RsaOaep256, wrappedKey).block(); - } catch (AzureException ex) { - - throw new KeyVaultAccessException(); - // TODO: set proper exception moderakh - // throw new KeyVaultAccessException( - // ex.Status, - // ex.ErrorCode, - // "UnwrapKeyAsync:Failed to Unwrap the encrypted key.", - // ex); - } - - if (keyOpResult == null) { - // this never be empty Mono and hence never null - // TODO: remove this once moved to async and removed blocking call - return Mono.error(new IllegalStateException("keyOpResult cannot be null")); - } - - // may return null - return Mono.justOrEmpty(keyOpResult.getKey()); - } - - /** - * Wrap the Key with latest Key version. Only supports bytes in base64 format. - * - * @param key plain text key. - * @param keyVaultUriProperties Parsed key Vault Uri Properties.Properties as in sample Format: - * https://{keyvault-name}.vault.azure.net/keys/{key-name}/{key-version} - * @return Mono of Result including KeyIdentifier and encrypted bytes in base64 string format. - */ - public Mono wrapKeyAsync( - byte[] key, - KeyVaultKeyUriProperties keyVaultUriProperties) { - WrapResult keyOpResult; - - // Get a Crypto Client for Wrap and UnWrap,this gets init per Key ID - CryptographyAsyncClient cryptoClient = this.getCryptoClientAsync(keyVaultUriProperties).block(); - if (cryptoClient == null) { - // this never be empty Mono and hence never null - // TODO: remove this once moved to async and removed blocking call - return Mono.error(new IllegalStateException("avk cannot be null")); - } - - try { - keyOpResult = cryptoClient.wrapKey(KeyVaultConstants.RsaOaep256, key).block(); - } - // TODO: set proper exception moderakh moderakh - // catch (RequestFailedException ex) - // { - // throw new KeyVaultAccessException( - // ex.Status, - // ex.ErrorCode, - // "WrapKeyAsync: Failed to Wrap the data encryption key.", - // ex); - // } - catch (Exception ex) { - // TODO: error should be passed to the wrapped exception - logger.error("cryptoClient error {}", ex); - throw new KeyVaultAccessException(); - } - - // key vault may return null - return Mono.justOrEmpty(keyOpResult.getEncryptedKey()); - } - - /** - * Validate the Purge Protection AndSoft Delete Settings. - * - * @param keyVaultUriProperties Parsed key Vault Uri Properties. - * @return Whether The Customer has the correct Deletion Level. - */ - public Mono validatePurgeProtectionAndSoftDeleteSettingsAsync( - KeyVaultKeyUriProperties keyVaultUriProperties) { - KeyAsyncClient akvClient = this.getAkvClientAsync(keyVaultUriProperties).block(); - if (akvClient == null) { - // this never be empty Mono and hence never null - // TODO: remove this once moved to async and removed blocking call - return Mono.error(new IllegalStateException("avk cannot be null")); - } - try { - KeyVaultKey getKeyResponse = akvClient.getKey(keyVaultUriProperties.getKeyName()).block(); - - String keyDeletionRecoveryLevel = null; - if (getKeyResponse != null && getKeyResponse.getProperties() != null) { - keyDeletionRecoveryLevel = getKeyResponse.getProperties().getRecoveryLevel(); - } - - return Mono.just(keyDeletionRecoveryLevel != null && ( - keyDeletionRecoveryLevel.contains(KeyVaultConstants.DeletionRecoveryLevel.Recoverable) - || keyDeletionRecoveryLevel.contains(KeyVaultConstants.DeletionRecoveryLevel.RecoverableProtectedSubscription) - || keyDeletionRecoveryLevel.contains(KeyVaultConstants.DeletionRecoveryLevel.CustomizedRecoverable) - || keyDeletionRecoveryLevel.contains(KeyVaultConstants.DeletionRecoveryLevel.CustomizedRecoverableProtectedSubscription))); - } - // catch (RequestFailedException ex) - // { - // throw new KeyVaultAccessException( - // ex.Status, - // ex.ErrorCode, - // "ValidatePurgeProtectionAndSoftDeleteSettingsAsync: Failed to fetch Key from Key Vault.", - // ex); - // } - catch (Exception ex) { - // TODO: error should be passed to the wrapped exception - logger.error("cryptoClient error {}", ex); - throw new KeyVaultAccessException(); - } - } - - /** - * Obtains the KeyClient to retrieve keys from Keyvault. - * returned Mono will never be an empty Mono. - * @param keyVaultUriProperties Parsed key Vault Uri Properties. - * @return Mono of KeyClient - */ - private Mono getAkvClientAsync( - KeyVaultKeyUriProperties keyVaultUriProperties) { - - // Called once per KEYVALTNAME - // Eg:https://KEYVALTNAME.vault.azure.net/ - Mono akvClientMono = this.akvClientCache.getAsync( - /** key: */keyVaultUriProperties.getKeyUri(), - /** obsoleteValue: */null, - /** singleValueInitFunc: */() -> - { - TokenCredential tokenCred = - this.keyVaultTokenCredentialFactory.getTokenCredentialAsync(keyVaultUriProperties.getKeyUri()).block(); - return Mono.just(this.keyClientFactory.getKeyClient(keyVaultUriProperties, tokenCred)); - }); - - return akvClientMono; - } - - // - // ///

    - // /// Obtains the Crypto Client for Wrap/UnWrap. - // /// - // /// Parsed key Vault Uri Properties. - // /// cancellation token - // /// CryptographyClient - private Mono getCryptoClientAsync( - KeyVaultKeyUriProperties keyVaultUriProperties) { - - // Get a Crypto Client for Wrap and UnWrap,this gets init per Key Version - // Cache it against the KeyVersion/KeyId - // Eg: :https://KEYVAULTNAME.vault.azure.net/keys/keyname/KEYID - Mono cryptoClientMono = this.akvCryptoClientCache.getAsync( - keyVaultUriProperties.getKeyUri(), - /** obsoleteValue: */null, - /** singleValueInitFunc: */() -> - { - // we need to acquire the Client Cert Creds for cases where we directly access Crypto Services. - Mono tokenCredMono = - this.keyVaultTokenCredentialFactory.getTokenCredentialAsync(keyVaultUriProperties.getKeyUri()); - return tokenCredMono.map( - tokenCred -> { - return this.cryptographyClientFactory.getCryptographyClient(keyVaultUriProperties, tokenCred); - } - - ); - }); - return cryptoClientMono; - } -} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultConstants.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultConstants.java deleted file mode 100644 index 06a306e565300..0000000000000 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultConstants.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.cosmos.encryption; - -import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; - -// TODO: can this class move to implementation? -public class KeyVaultConstants { - // TODO: "keys/"? check with dotnet - static final String KeysSegment = "keys"; - static final String AuthenticationChallengePrefix = "Bearer "; - static final String AuthenticationResponseHeaderName = "WWW-Authenticate"; - static final String AuthenticationParameter = "authorization"; - // TODO: this doesn't need to be public FiXME - public static final KeyWrapAlgorithm RsaOaep256 = KeyWrapAlgorithm.RSA_OAEP_256; - - static class DeletionRecoveryLevel { - public static final String Purgeable = "Purgeable"; - public static final String Recoverable = "Recoverable"; - public static final String RecoverableProtectedSubscription = "Recoverable+ProtectedSubscription"; - public static final String RecoverablePurgeable = "Recoverable+Purgeable"; - public static final String CustomizedRecoverable = "CustomizedRecoverable"; - public static final String CustomizedRecoverableProtectedSubscription = "CustomizedRecoverable" - + "+ProtectedSubscription"; - public static final String CustomizedRecoverablePurgeable = "CustomizedRecoverable+Purgeable"; - } -} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultTokenCredentialFactory.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultTokenCredentialFactory.java index b59d1d3b1a7e1..9bae26ba8dff4 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultTokenCredentialFactory.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultTokenCredentialFactory.java @@ -19,5 +19,5 @@ abstract public class KeyVaultTokenCredentialFactory { * @param keyVaultKeyUri Azure Key-Vault Key URI to acquire a TokenCredentials for * @return Mono of TokenCredentials result token credentials */ - public abstract Mono getTokenCredentialAsync(URI keyVaultKeyUri); + public abstract Mono getTokenCredential(URI keyVaultKeyUri); } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AzureKeyVaultKeyWrapProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AzureKeyVaultKeyWrapProvider.java new file mode 100644 index 0000000000000..76bcbc6407d47 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AzureKeyVaultKeyWrapProvider.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.encryption.EncryptionKeyUnwrapResult; +import com.azure.cosmos.encryption.EncryptionKeyWrapMetadata; +import com.azure.cosmos.encryption.EncryptionKeyWrapProvider; +import com.azure.cosmos.encryption.EncryptionKeyWrapResult; +import com.azure.cosmos.encryption.KeyVaultTokenCredentialFactory; +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.util.concurrent.atomic.AtomicReference; + +import static com.azure.cosmos.implementation.encryption.ImplementationBridgeHelpers.EncryptionKeyWrapMetadataHelper; + +/** + * Provides functionality to wrap (encrypt) and unwrap (decrypt) data encryption keys using master keys stored in Azure Key Vault. + * Unwrapped data encryption keys will be cached within the client SDK for a period of 1 hour. + */ +public class AzureKeyVaultKeyWrapProvider implements EncryptionKeyWrapProvider { + private final KeyVaultAccessClient keyVaultAccessClient; + private final Duration rawDekCacheTimeToLive; + + /** + * Creates a new instance of a provider to wrap (encrypt) and unwrap (decrypt) data encryption keys using master + * keys stored in Azure Key Vault. + * + * @param keyVaultTokenCredentialFactory KeyVaultTokenCredentialFactory instance + *

    + * Amount of time the unencrypted form of the data encryption key can be cached on the client before UnwrapKeyAsync + * needs to be called again. + */ + public AzureKeyVaultKeyWrapProvider(KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory) { + this.keyVaultAccessClient = new KeyVaultAccessClient(keyVaultTokenCredentialFactory); + this.rawDekCacheTimeToLive = Duration.ofHours(1); + } + + /** + * Creates a new instance of a provider to wrap (encrypt) and unwrap (decrypt) data encryption keys using master + * keys stored in Azure Key Vault. + * + * @param keyVaultTokenCredentialFactory KeyVaultTokenCredentialFactory instance + * @param keyClientFactory KeyClient Factory Methods + * @param cryptographyClientFactory CryptographyClient Factory Methods. + */ + public AzureKeyVaultKeyWrapProvider(KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory, + KeyClientFactory keyClientFactory, + CryptographyClientFactory cryptographyClientFactory) { + this.keyVaultAccessClient = new KeyVaultAccessClient(keyVaultTokenCredentialFactory, keyClientFactory, + cryptographyClientFactory); + this.rawDekCacheTimeToLive = Duration.ofHours(1); + } + + @Override + public Mono unwrapKey(byte[] wrappedKey, + EncryptionKeyWrapMetadata metadata) { + String metadataType = EncryptionKeyWrapMetadataHelper.getType(metadata); + if (!StringUtils.equals(metadataType, KeyVaultConstants.AzureKeyVaultKeyWrapMetadata.TYPE_CONSTANT)) { + throw new IllegalArgumentException("Invalid metadata metadata"); + } + + String metadataAlgo = EncryptionKeyWrapMetadataHelper.getAlgorithm(metadata); + if (!StringUtils.equals(metadataAlgo, KeyVaultConstants.RsaOaep256.toString())) { + throw new IllegalArgumentException( + String.format("Unknown encryption key wrap algorithm %s metadata", metadataAlgo)); + } + + AtomicReference keyVaultUriPropertiesRef = + new AtomicReference(); + + if (!KeyVaultKeyUriProperties.tryParse(EncryptionUtils.toURI(metadata.value), keyVaultUriPropertiesRef)) { + throw new IllegalArgumentException(String.format("KeyVault Key Uri %s is invalid.", metadata.value)); + } + + return this.keyVaultAccessClient + .unwrapKey(wrappedKey, keyVaultUriPropertiesRef.get()) + .map( + dataEncryptionKey -> new EncryptionKeyUnwrapResult(dataEncryptionKey, this.rawDekCacheTimeToLive) + ).switchIfEmpty( + Mono.error( + new IllegalArgumentException("keyVaultAccessClient.unwrapKey returned no bytes: dataEncryptionKey is null") + ) + ); + } + + @Override + public Mono wrapKey(byte[] key, + EncryptionKeyWrapMetadata metadata) { + String metadataType = EncryptionKeyWrapMetadataHelper.getType(metadata); + + if (!StringUtils.equals(metadataType, KeyVaultConstants.AzureKeyVaultKeyWrapMetadata.TYPE_CONSTANT)) { + throw new IllegalArgumentException("Invalid metadata metadata"); + } + + AtomicReference keyVaultUriPropertiesRef = + new AtomicReference<>(); + if (!KeyVaultKeyUriProperties.tryParse(EncryptionUtils.toURI(metadata.value), keyVaultUriPropertiesRef)) { + throw new IllegalArgumentException(String.format("KeyVault Key Uri %s is invalid.", metadata.value)); + } + + return this.keyVaultAccessClient + .validatePurgeProtectionAndSoftDeleteSettings(keyVaultUriPropertiesRef.get()) + .flatMap( + isValid -> { + if (!isValid) { + throw new IllegalArgumentException( + String.format("Key Vault %s provided must have soft delete and purge protection enabled." + , keyVaultUriPropertiesRef.get().getKeyUri())); + } + + return this.keyVaultAccessClient + .wrapKey(key, keyVaultUriPropertiesRef.get()) + .map( + wrappedDataEncryptionKey -> { // TODO: what happens if wrappedDataEncryptionKey is null? + EncryptionKeyWrapMetadata responseMetadata = + EncryptionKeyWrapMetadataHelper.create(metadataType, metadata.value, + KeyVaultConstants.RsaOaep256.toString()); + return new EncryptionKeyWrapResult(wrappedDataEncryptionKey, responseMetadata); + } + ).switchIfEmpty( + Mono.error( + new IllegalArgumentException("keyVaultAccessClient.wrapKey returned no bytes: wrappedDataEncryptionKey is null") + )); + } + ); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CachedDekProperties.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CachedDekProperties.java index b229eefe97229..ee667882bfdaf 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CachedDekProperties.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CachedDekProperties.java @@ -13,7 +13,8 @@ public CachedDekProperties( DataEncryptionKeyProperties serverProperties, Instant serverPropertiesExpiryUtc) { assert(serverProperties != null); - + // TODO: when contentResponseOnWriteEnabled = false we fail with NPE. + // TODO: consider the above scenario / add NPE validation this.serverProperties = serverProperties; this.serverPropertiesExpiryUtc = serverPropertiesExpiryUtc; } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosDataEncryptionKeyProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosDataEncryptionKeyProvider.java index c1cb7d7cccea3..ba1a4d1b26112 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosDataEncryptionKeyProvider.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosDataEncryptionKeyProvider.java @@ -108,7 +108,7 @@ public void initialize(CosmosAsyncDatabase database, public Mono getDataEncryptionKey(String id, String encryptionAlgorithm) { Mono> fetchUnwrapMono = this - .dataEncryptionKeyContainerCore.fetchUnwrappedAsync(id); + .dataEncryptionKeyContainerCore.fetchUnwrapped(id); return fetchUnwrapMono .map(fetchUnwrap -> fetchUnwrap.getT2().getDataEncryptionKey()); diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosEncryptor.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosEncryptor.java index 1fd55932cf9d4..0528459fcd17f 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosEncryptor.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosEncryptor.java @@ -33,7 +33,7 @@ public CosmosEncryptor(DataEncryptionKeyProvider dataEncryptionKeyProvider) { } @Override - public Mono decryptAsync( + public Mono decrypt( byte[] cipherText, String dataEncryptionKeyId, String encryptionAlgorithm) { @@ -49,7 +49,7 @@ public Mono decryptAsync( } @Override - public Mono encryptAsync( + public Mono encrypt( byte[] plainText, String dataEncryptionKeyId, String encryptionAlgorithm) { diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/CryptographyClientFactory.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CryptographyClientFactory.java similarity index 82% rename from sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/CryptographyClientFactory.java rename to sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CryptographyClientFactory.java index ae0200f8de79a..8b313a3d6fe85 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/CryptographyClientFactory.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CryptographyClientFactory.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.encryption; +package com.azure.cosmos.implementation.encryption; import com.azure.core.credential.TokenCredential; +import com.azure.cosmos.implementation.encryption.KeyVaultKeyUriProperties; import com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient; import com.azure.security.keyvault.keys.cryptography.CryptographyClientBuilder; /** * Factory Class for Accessing CryptographyClient methods. */ -class CryptographyClientFactory { +public class CryptographyClientFactory { public CryptographyAsyncClient getCryptographyClient(KeyVaultKeyUriProperties keyVaultKeyUriProperties, TokenCredential tokenCredential) { return new CryptographyClientBuilder() diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainer.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainer.java index c5dca1183e1f3..c77bcb166a836 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainer.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainer.java @@ -33,7 +33,7 @@ public interface DataEncryptionKeyContainer { *

  • Conflict - This means an {@link DataEncryptionKeyProperties} with an id matching the id you supplied already existed.
  • * */ - Mono> createDataEncryptionKeyAsync( + Mono> createDataEncryptionKey( String id, String encryptionAlgorithm, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata, @@ -90,7 +90,7 @@ Mono> createDataEncryptionKeyAsy * @param requestOptions * @return */ - Mono> rewrapDataEncryptionKeyAsync( + Mono> rewrapDataEncryptionKey( String id, EncryptionKeyWrapMetadata newWrapMetadata, CosmosItemRequestOptions requestOptions); @@ -118,7 +118,7 @@ Mono> rewrapDataEncryptionKeyAsy * * */ - Mono> readDataEncryptionKeyAsync( + Mono> readDataEncryptionKey( String id, CosmosItemRequestOptions requestOptions); } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainerCore.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainerCore.java index c115996fc2902..ec663a10d93b2 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainerCore.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainerCore.java @@ -12,6 +12,7 @@ import com.azure.cosmos.implementation.guava25.base.Preconditions; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.ModelBridgeInternal; import com.azure.cosmos.models.PartitionKey; import reactor.core.publisher.Mono; import reactor.util.function.Tuple2; @@ -26,10 +27,10 @@ public DataEncryptionKeyContainerCore(CosmosDataEncryptionKeyProvider dekProvide this.dekProvider = dekProvider; } - public Mono> createDataEncryptionKeyAsync(String id, - String encryptionAlgorithm, - EncryptionKeyWrapMetadata encryptionKeyWrapMetadata, - CosmosItemRequestOptions requestOptions) { + public Mono> createDataEncryptionKey(String id, + String encryptionAlgorithm, + EncryptionKeyWrapMetadata encryptionKeyWrapMetadata, + CosmosItemRequestOptions requestOptions) { Preconditions.checkArgument(StringUtils.isNotEmpty(id), "id is missing"); Preconditions.checkArgument(StringUtils.equals(encryptionAlgorithm, @@ -38,37 +39,40 @@ public Mono> createDataEncryptio byte[] rawDek = DataEncryptionKey.generate(encryptionAlgorithm); - Tuple3 wrapResult = - this.wrapAsync( - id, - rawDek, - encryptionAlgorithm, - encryptionKeyWrapMetadata); + Mono> wrapResultMono = this.wrap( + id, + rawDek, + encryptionAlgorithm, + encryptionKeyWrapMetadata); - byte[] wrappedDek = wrapResult.getLeft(); - EncryptionKeyWrapMetadata updatedMetadata = wrapResult.getMiddle(); - InMemoryRawDek inMemoryRawDek = wrapResult.getRight(); + return wrapResultMono.flatMap( + wrapResult -> { + byte[] wrappedDek = wrapResult.getLeft(); + EncryptionKeyWrapMetadata updatedMetadata = wrapResult.getMiddle(); + InMemoryRawDek inMemoryRawDek = wrapResult.getRight(); - DataEncryptionKeyProperties dekProperties = new DataEncryptionKeyProperties(id, encryptionAlgorithm, wrappedDek, updatedMetadata, Instant.now()); + DataEncryptionKeyProperties dekProperties = new DataEncryptionKeyProperties(id, encryptionAlgorithm, wrappedDek, updatedMetadata, Instant.now()); - Mono> dekResponseMono = - this.dekProvider.getContainer().createItem(dekProperties, new PartitionKey(dekProperties.id), requestOptions); + Mono> dekResponseMono = + this.dekProvider.getContainer().createItem(dekProperties, new PartitionKey(dekProperties.id), requestOptions); - return dekResponseMono.flatMap( - dekResponse -> { + return dekResponseMono.flatMap( + dekResponse -> { - this.dekProvider.getDekCache().setDekProperties(id, dekResponse.getItem()); - this.dekProvider.getDekCache().setRawDek(id, inMemoryRawDek); - return Mono.just(dekResponse); + this.dekProvider.getDekCache().setDekProperties(id, dekResponse.getItem()); + this.dekProvider.getDekCache().setRawDek(id, inMemoryRawDek); + return Mono.just(dekResponse); + } + ); } ); } @Override - public Mono> readDataEncryptionKeyAsync( + public Mono> readDataEncryptionKey( String id, CosmosItemRequestOptions requestOptions) { - Mono> responseMono = this.readInternalAsync( + Mono> responseMono = this.readInternal( id, requestOptions); @@ -82,13 +86,13 @@ public Mono> readDataEncryptionK } @Override - public Mono> rewrapDataEncryptionKeyAsync( + public Mono> rewrapDataEncryptionKey( String id, EncryptionKeyWrapMetadata newWrapMetadata, final CosmosItemRequestOptions requestOptions) { Preconditions.checkNotNull(newWrapMetadata, "newWrapMetadata is missing"); - Mono> resultMono = this.fetchUnwrappedAsync( + Mono> resultMono = this.fetchUnwrapped( id); return resultMono.flatMap( @@ -96,55 +100,59 @@ public Mono> rewrapDataEncryptio DataEncryptionKeyProperties dekProperties = result.getT1(); InMemoryRawDek inMemoryRawDek = result.getT2(); - Tuple3 wrapResult = - this.wrapAsync( - id, - inMemoryRawDek.getDataEncryptionKey().getRawKey(), - dekProperties.encryptionAlgorithm, - newWrapMetadata); - - byte[] wrappedDek = wrapResult.getLeft(); - EncryptionKeyWrapMetadata updatedMetadata = wrapResult.getMiddle(); - InMemoryRawDek updatedRawDek = wrapResult.getRight(); - - CosmosItemRequestOptions effectiveRequestOptions = requestOptions != null ? requestOptions : new CosmosItemRequestOptions(); - - effectiveRequestOptions.setIfMatchETag(dekProperties.eTag); - - DataEncryptionKeyProperties newDekProperties = new DataEncryptionKeyProperties(dekProperties); - newDekProperties.wrappedDataEncryptionKey = wrappedDek; - newDekProperties.encryptionKeyWrapMetadata = updatedMetadata; - - Mono> responseMono = this.dekProvider.getContainer().replaceItem( - newDekProperties, - newDekProperties.id, - new PartitionKey(newDekProperties.id), - effectiveRequestOptions); - - return responseMono.flatMap( - response -> { - DataEncryptionKeyProperties item = response.getItem(); - - assert (item != null); - this.dekProvider.getDekCache().setDekProperties(id, item); - this.dekProvider.getDekCache().setRawDek(id, updatedRawDek); - return Mono.just(response); + Mono> wrapResultMono = this.wrap( + id, + inMemoryRawDek.getDataEncryptionKey().getRawKey(), + dekProperties.encryptionAlgorithm, + newWrapMetadata); + + return wrapResultMono.flatMap( + wrapResult -> { + byte[] wrappedDek = wrapResult.getLeft(); + EncryptionKeyWrapMetadata updatedMetadata = wrapResult.getMiddle(); + InMemoryRawDek updatedRawDek = wrapResult.getRight(); + + CosmosItemRequestOptions effectiveRequestOptions = requestOptions != null ? + ModelBridgeInternal.clone(requestOptions) : + new CosmosItemRequestOptions(); + effectiveRequestOptions.setIfMatchETag(dekProperties.eTag); + + DataEncryptionKeyProperties newDekProperties = new DataEncryptionKeyProperties(dekProperties); + newDekProperties.wrappedDataEncryptionKey = wrappedDek; + newDekProperties.encryptionKeyWrapMetadata = updatedMetadata; + + Mono> responseMono = this.dekProvider.getContainer().replaceItem( + newDekProperties, + newDekProperties.id, + new PartitionKey(newDekProperties.id), + effectiveRequestOptions); + + return responseMono.flatMap( + response -> { + DataEncryptionKeyProperties item = response.getItem(); + + assert (item != null); + this.dekProvider.getDekCache().setDekProperties(id, item); + this.dekProvider.getDekCache().setRawDek(id, updatedRawDek); + return Mono.just(response); + } + ); } ); }); } - Mono> fetchUnwrappedAsync( + Mono> fetchUnwrapped( String id) { - Mono dekPropertiesMono = this.dekProvider.getDekCache().getOrAddDekPropertiesAsync( + Mono dekPropertiesMono = this.dekProvider.getDekCache().getOrAddDekProperties( id, - this::readResourceAsync); + this::readResource); return dekPropertiesMono.flatMap( dekProperties -> { - Mono inMemoryRawDek = this.dekProvider.getDekCache().getOrAddRawDekAsync( + Mono inMemoryRawDek = this.dekProvider.getDekCache().getOrAddRawDek( dekProperties, - dp -> Mono.just(this.unwrapAsync(dp))); + dp ->this.unwrap(dp)); return Mono.zip(Mono.just(dekProperties), inMemoryRawDek); } @@ -173,45 +181,56 @@ public C getRight() { } } - Tuple3 wrapAsync( + Mono> wrap( String id, byte[] key, String encryptionAlgorithm, EncryptionKeyWrapMetadata metadata) { - EncryptionKeyWrapResult keyWrapResponse; - - keyWrapResponse = this.dekProvider.getEncryptionKeyWrapProvider().wrapKey(key, metadata); - // Verify - DataEncryptionKeyProperties tempDekProperties = new DataEncryptionKeyProperties(id, encryptionAlgorithm, keyWrapResponse.getWrappedDataEncryptionKey(), keyWrapResponse.getEncryptionKeyWrapMetadata(), Instant.now()); - InMemoryRawDek roundTripResponse = this.unwrapAsync(tempDekProperties); - if (!Arrays.equals(roundTripResponse.getDataEncryptionKey().getRawKey(), key)) { - throw new IllegalStateException("The key wrapping provider configured was unable to unwrap the wrapped key correctly."); - } - - return new Tuple3<>(keyWrapResponse.getWrappedDataEncryptionKey(), keyWrapResponse.getEncryptionKeyWrapMetadata(), roundTripResponse); + Mono keyWrapResponseMono = + this.dekProvider.getEncryptionKeyWrapProvider().wrapKey(key, metadata); + + return keyWrapResponseMono.flatMap( + keyWrapResponse -> { + // Verify + DataEncryptionKeyProperties tempDekProperties = new DataEncryptionKeyProperties(id, encryptionAlgorithm, keyWrapResponse.getWrappedDataEncryptionKey(), keyWrapResponse.getEncryptionKeyWrapMetadata(), Instant.now()); + Mono roundTripResponseMono = this.unwrap(tempDekProperties); + return roundTripResponseMono.map( + roundTripResponse -> { + if (!Arrays.equals(roundTripResponse.getDataEncryptionKey().getRawKey(), key)) { + throw new IllegalStateException("The key wrapping provider configured was unable to unwrap the wrapped key correctly."); + } + + return new Tuple3<>(keyWrapResponse.getWrappedDataEncryptionKey(), keyWrapResponse.getEncryptionKeyWrapMetadata(), roundTripResponse); + } + ); + } + ); } - InMemoryRawDek unwrapAsync( + Mono unwrap( DataEncryptionKeyProperties dekProperties) { - EncryptionKeyUnwrapResult unwrapResult; - unwrapResult = this.dekProvider.getEncryptionKeyWrapProvider().unwrapKey( + Mono unwrapResultMono = this.dekProvider.getEncryptionKeyWrapProvider().unwrapKey( dekProperties.wrappedDataEncryptionKey, dekProperties.encryptionKeyWrapMetadata); - DataEncryptionKey dek = DataEncryptionKey.create(unwrapResult.getDataEncryptionKey(), dekProperties.encryptionAlgorithm); - return new InMemoryRawDek(dek, unwrapResult.getClientCacheTimeToLive()); + return unwrapResultMono.map( + unwrapResult -> { + DataEncryptionKey dek = DataEncryptionKey.create(unwrapResult.getDataEncryptionKey(), dekProperties.encryptionAlgorithm); + return new InMemoryRawDek(dek, unwrapResult.getClientCacheTimeToLive()); + } + ); } - private Mono readResourceAsync( + private Mono readResource( String id) { - return this.readInternalAsync( + return this.readInternal( id, null).map(CosmosItemResponse::getItem); } - private Mono> readInternalAsync( + private Mono> readInternal( String id, CosmosItemRequestOptions requestOptions) { return this.dekProvider.getContainer() diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DekCache.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DekCache.java index 1e3754756f571..bb46882619612 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DekCache.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DekCache.java @@ -27,20 +27,20 @@ public DekCache(Duration dekPropertiesTimeToLive) { } } - public Mono getOrAddDekPropertiesAsync( + public Mono getOrAddDekProperties( String dekId, Function> fetcher) { Mono cachedDekPropertiesMono = this.DekPropertiesCache.getAsync( dekId, null, - () -> this.fetchAsync(dekId, fetcher)); + () -> this.fetch(dekId, fetcher)); return cachedDekPropertiesMono.flatMap(cachedDekProperties -> { if (cachedDekProperties.getServerPropertiesExpiryUtc().isBefore(Instant.now())) { return this.DekPropertiesCache.getAsync( dekId, null, - () -> this.fetchAsync(dekId, fetcher)); + () -> this.fetch(dekId, fetcher)); } else { return Mono.just(cachedDekProperties); } @@ -49,7 +49,7 @@ public Mono getOrAddDekPropertiesAsync( ).map(CachedDekProperties::getServerProperties); } - public Mono getOrAddRawDekAsync( + public Mono getOrAddRawDek( DataEncryptionKeyProperties dekProperties, Function> unwrapper) { Mono inMemoryRawDekMono = this.RawDekCache.getAsync( @@ -82,13 +82,13 @@ public void setRawDek(String dekId, InMemoryRawDek inMemoryRawDek) { this.RawDekCache.set(dekId, inMemoryRawDek); } - public Mono removeAsync(String dekId) { + public Mono remove(String dekId) { Mono cachedDekPropertiesMono = this.DekPropertiesCache.removeAsync(dekId); return cachedDekPropertiesMono.flatMap(cachedDekProperties -> this.RawDekCache.removeAsync(dekId)).then(); } - private Mono fetchAsync( + private Mono fetch( String dekId, Function> fetcher) { Mono serverPropertiesMono = fetcher.apply(dekId); diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProcessor.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProcessor.java index 5b38bde821fc8..fd36a09c3a3c7 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProcessor.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProcessor.java @@ -9,7 +9,6 @@ import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import com.azure.cosmos.encryption.Encryptor; import com.azure.cosmos.encryption.EncryptionOptions; -import com.azure.cosmos.implementation.guava25.base.Preconditions; import com.azure.cosmos.implementation.guava27.Strings; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; @@ -26,7 +25,7 @@ public class EncryptionProcessor { private final static Logger LOGGER = LoggerFactory.getLogger(EncryptionProcessor.class); - public static Mono encryptAsync(byte[] payload, Encryptor encryptor, EncryptionOptions encryptionOptions) { + public static Mono encrypt(byte[] payload, Encryptor encryptor, EncryptionOptions encryptionOptions) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Encrypting byte[] of size [{}] on thread [{}]", payload == null ? null : payload.length, @@ -71,7 +70,7 @@ public static Mono encryptAsync(byte[] payload, Encryptor encryptor, Enc SensitiveDataTransformer serializer = new SensitiveDataTransformer(); byte[] plainText = serializer.toByteArray(toEncryptJObj); - Mono cipherTextMono = encryptor.encryptAsync(plainText, encryptionOptions.getDataEncryptionKeyId(), encryptionOptions.getEncryptionAlgorithm()); + Mono cipherTextMono = encryptor.encrypt(plainText, encryptionOptions.getDataEncryptionKeyId(), encryptionOptions.getEncryptionAlgorithm()); return cipherTextMono.switchIfEmpty(Mono.error(new NullPointerException("cipherText is null"))) .flatMap( @@ -92,7 +91,7 @@ public static Mono encryptAsync(byte[] payload, Encryptor encryptor, Enc ); } - public static Mono decryptAsync(byte[] input, Encryptor encryptor) { + public static Mono decrypt(byte[] input, Encryptor encryptor) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Decrypting byte[] of size [{}] on thread [{}]", input == null ? null : input.length, @@ -101,7 +100,7 @@ public static Mono decryptAsync(byte[] input, Encryptor encryptor) { JsonNode itemJObj = Utils.parse(input, JsonNode.class); if (itemJObj instanceof ObjectNode) { - Mono itemJObjMono = decryptAsync((ObjectNode) itemJObj, encryptor); + Mono itemJObjMono = decrypt((ObjectNode) itemJObj, encryptor); return itemJObjMono.flatMap( decryptedItem -> { return Mono.just(EncryptionUtils.serializeJsonToByteArray(Utils.getSimpleObjectMapper(), itemJObj)); @@ -112,15 +111,15 @@ public static Mono decryptAsync(byte[] input, Encryptor encryptor) { } } - public static Mono decryptAsync(ObjectNode itemJObj, Encryptor encryptor) { + public static Mono decrypt(ObjectNode itemJObj, Encryptor encryptor) { try { - return decryptAsyncInternal(itemJObj, encryptor); + return decryptInternal(itemJObj, encryptor); } catch (Exception e) { return Mono.error(e); } } - private static Mono decryptAsyncInternal(ObjectNode itemJObj, Encryptor encryptor) { + private static Mono decryptInternal(ObjectNode itemJObj, Encryptor encryptor) { assert (itemJObj != null); assert (encryptor != null); @@ -145,7 +144,7 @@ private static Mono decryptAsyncInternal(ObjectNode itemJObj, Encryp "Unknown encryption format version: %s. Please upgrade your SDK to the latest version.", encryptionProperties.getEncryptionFormatVersion())); } - Mono plainTextMono = encryptor.decryptAsync(encryptionProperties.getEncryptedData(), encryptionProperties.getDataEncryptionKeyId(), encryptionProperties.getEncryptionAlgorithm()); + Mono plainTextMono = encryptor.decrypt(encryptionProperties.getEncryptedData(), encryptionProperties.getDataEncryptionKeyId(), encryptionProperties.getEncryptionAlgorithm()); return plainTextMono.flatMap( plainText -> { diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/ImplementationBridgeHelpers.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/ImplementationBridgeHelpers.java new file mode 100644 index 0000000000000..7648e553fa31b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/ImplementationBridgeHelpers.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.encryption.EncryptionKeyWrapMetadata; + +public class ImplementationBridgeHelpers { + public abstract static class EncryptionKeyWrapMetadataHelper { + private static EncryptionKeyWrapMetadataAccessor accessor; + + protected EncryptionKeyWrapMetadataHelper() { + } + + public static void setEncryptionKeyWrapMetadataAccessor(final EncryptionKeyWrapMetadataAccessor newAccessor) { + if (accessor != null) { + throw new IllegalStateException(); + } + + accessor = newAccessor; + } + + public static EncryptionKeyWrapMetadataAccessor getEncryptionKeyWrapMetadataAccessor() { + if (accessor == null) { + throw new IllegalStateException(); + } + + return accessor; + } + + public static String getType(EncryptionKeyWrapMetadata metadata) { + return accessor.getType(metadata); + } + + public static String getAlgorithm(EncryptionKeyWrapMetadata metadata) { + return accessor.getAlgorithm(metadata); + } + + public static EncryptionKeyWrapMetadata create(String type, String value, String algorithm) { + return accessor.create(type, value, algorithm); + } + + public static EncryptionKeyWrapMetadata create(String type, String value) { + return accessor.create(type, value); + } + + public interface EncryptionKeyWrapMetadataAccessor { + + EncryptionKeyWrapMetadata create(String type, String value, String algorithm); + + EncryptionKeyWrapMetadata create(String type, String value); + + String getType(EncryptionKeyWrapMetadata metadata); + + String getAlgorithm(EncryptionKeyWrapMetadata metadata); + } + } + + public abstract static class AzureKeyVaultKeyWrapMetadataHelper { + private static AzureKeyVaultKeyWrapMetadataAccessor accessor; + + protected AzureKeyVaultKeyWrapMetadataHelper() { + } + + public static void setAzureKeyVaultKeyWrapMetadataAccessor(final AzureKeyVaultKeyWrapMetadataAccessor newAccessor) { + if (accessor != null) { + throw new IllegalStateException(); + } + + accessor = newAccessor; + } + + public static AzureKeyVaultKeyWrapMetadataAccessor getAzureKeyVaultKeyWrapMetadataAccessor() { + if (accessor == null) { + throw new IllegalStateException(); + } + + return accessor; + } + + public static String getTypeConstant() { + return accessor.getTypeConstant(); + } + + public interface AzureKeyVaultKeyWrapMetadataAccessor { + + String getTypeConstant(); + + } + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyClientFactory.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyClientFactory.java similarity index 84% rename from sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyClientFactory.java rename to sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyClientFactory.java index b7e9c3c371e83..edcd2dcc76eb4 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyClientFactory.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyClientFactory.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.encryption; +package com.azure.cosmos.implementation.encryption; import com.azure.core.credential.TokenCredential; +import com.azure.cosmos.implementation.encryption.KeyVaultKeyUriProperties; import com.azure.security.keyvault.keys.KeyAsyncClient; import com.azure.security.keyvault.keys.KeyClientBuilder; diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultAccessClient.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultAccessClient.java new file mode 100644 index 0000000000000..bd8a3d0d82b22 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultAccessClient.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.core.credential.TokenCredential; +import com.azure.cosmos.CosmosException; +import com.azure.cosmos.encryption.KeyVaultTokenCredentialFactory; +import com.azure.cosmos.implementation.caches.AsyncCache; +import com.azure.security.keyvault.keys.KeyAsyncClient; +import com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Mono; + +import java.net.URI; + +/** + * Implements Core KeyVault access methods that uses the {@link KeyVaultAccessClient} + */ +public class KeyVaultAccessClient { + private final AsyncCache akvClientCache; + private final AsyncCache akvCryptoClientCache; + private final KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory; + private final KeyClientFactory keyClientFactory; + private final CryptographyClientFactory cryptographyClientFactory; + private final Logger logger = LoggerFactory.getLogger(KeyVaultAccessClient.class); + + /** + * Initializes a new instance of the {@link KeyVaultAccessClient} + * + * @param keyVaultTokenCredentialFactory TokenCredentials factory + */ + public KeyVaultAccessClient(KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory) { + this.keyVaultTokenCredentialFactory = keyVaultTokenCredentialFactory; + this.akvClientCache = new AsyncCache<>(); + this.akvCryptoClientCache = new AsyncCache<>(); + this.keyClientFactory = new KeyClientFactory(); + this.cryptographyClientFactory = new CryptographyClientFactory(); + } + + /** + * Initializes a new instance of the {@link KeyVaultAccessClient} + * class Invokes internal factory Methods. + * + * @param keyVaultTokenCredentialFactory TokenCredential + * @param keyClientFactory KeyClient Factory + * @param cryptographyClientFactory KeyClient Factory + */ + KeyVaultAccessClient(KeyVaultTokenCredentialFactory keyVaultTokenCredentialFactory, + KeyClientFactory keyClientFactory, + CryptographyClientFactory cryptographyClientFactory) { + this.keyVaultTokenCredentialFactory = keyVaultTokenCredentialFactory; + this.akvClientCache = new AsyncCache<>(); + this.akvCryptoClientCache = new AsyncCache<>(); + this.keyClientFactory = keyClientFactory; + this.cryptographyClientFactory = cryptographyClientFactory; + } + + /** + * Unwrap the encrypted Key. Only supports encrypted bytes in base64 format. + * + * Note: this may return an empty Mono if cryptoClient returns empty/null + * + * @param wrappedKey encrypted bytes. + * @param keyVaultUriProperties Parsed key Vault Uri Properties.Properties as in sample Format: + * https://{keyvault-name}.vault.azure.net/keys/{key-name}/{key-version} + * @return Mono of Result including KeyIdentifier and decrypted bytes in base64 string format, can be convert to + * bytes using Convert.FromBase64String(). + */ + public Mono unwrapKey( + byte[] wrappedKey, + KeyVaultKeyUriProperties keyVaultUriProperties) { + + // Get a Crypto Client for Wrap and UnWrap,this gets init per Key ID + Mono cryptoClientMono = this.getCryptoClient(keyVaultUriProperties); + return cryptoClientMono.flatMap( + cryptoClient -> + cryptoClient.unwrapKey(KeyVaultConstants.RsaOaep256, wrappedKey) + .flatMap(keyOpResult -> + Mono.justOrEmpty(keyOpResult.getKey()) + ) + .onErrorResume(e -> { + logger.error("unwrapKeyAsync:Failed to Unwrap the encrypted key. {}", e.getMessage()); + return Mono.error( + cryptoClientExceptionToCosmosException("UnwrapKeyAsync" + + ":Failed to Unwrap the encrypted key.", e)); + }) + ); + } + + private CosmosException cryptoClientExceptionToCosmosException(String message, Throwable ex) { + // TODO: discuss with dotnet folks, + return new KeyVaultCosmosException(-1, message, ex); + } + + /** + * Wrap the Key with latest Key version. Only supports bytes in base64 format. + * + * @param key plain text key. + * @param keyVaultUriProperties Parsed key Vault Uri Properties.Properties as in sample Format: + * https://{keyvault-name}.vault.azure.net/keys/{key-name}/{key-version} + * @return Mono of Result including KeyIdentifier and encrypted bytes in base64 string format. + */ + public Mono wrapKey( + byte[] key, + KeyVaultKeyUriProperties keyVaultUriProperties) { + + // Get a Crypto Client for Wrap and UnWrap,this gets init per Key ID + Mono cryptoClientMono = this.getCryptoClient(keyVaultUriProperties); + return cryptoClientMono.flatMap( + cryptoClient -> + cryptoClient.wrapKey(KeyVaultConstants.RsaOaep256, key) + .flatMap(keyOpResult -> + Mono.justOrEmpty(keyOpResult.getEncryptedKey()) + ) + .onErrorResume(e -> { + logger.error("unwrapKeyAsync:Failed to Unwrap the encrypted key. {}", e.getMessage()); + return Mono.error(cryptoClientExceptionToCosmosException("UnwrapKeyAsync" + + ":Failed to Unwrap the encrypted key.", e)); + }) + ); + } + + /** + * Validate the Purge Protection AndSoft Delete Settings. + * + * @param keyVaultUriProperties Parsed key Vault Uri Properties. + * @return Whether The Customer has the correct Deletion Level. + */ + public Mono validatePurgeProtectionAndSoftDeleteSettings( + KeyVaultKeyUriProperties keyVaultUriProperties) { + Mono akvClientMono = this.getAkvClient(keyVaultUriProperties); + return akvClientMono.flatMap( + akvClient -> + akvClient.getKey(keyVaultUriProperties.getKeyName()) + .flatMap( + getKeyResponse -> { + String keyDeletionRecoveryLevel = null; + if (getKeyResponse != null && getKeyResponse.getProperties() != null) { + keyDeletionRecoveryLevel = getKeyResponse.getProperties().getRecoveryLevel(); + } + + return Mono.just(keyDeletionRecoveryLevel != null && ( + keyDeletionRecoveryLevel.contains(KeyVaultConstants.DeletionRecoveryLevel.RECOVERABLE) + || keyDeletionRecoveryLevel.contains(KeyVaultConstants.DeletionRecoveryLevel.RECOVERABLE_PROTECTED_SUBSCRIPTION) + || keyDeletionRecoveryLevel.contains(KeyVaultConstants.DeletionRecoveryLevel.CUSTOMIZED_RECOVERABLE) + || keyDeletionRecoveryLevel.contains(KeyVaultConstants.DeletionRecoveryLevel.CUSTOMIZED_RECOVERABLE_PROTECTED_SUBSCRIPTION))); + } + ) + ).onErrorResume( + e -> Mono.error(cryptoClientExceptionToCosmosException("ValidatePurgeProtectionAndSoftDeleteSettingsAsync: Failed to fetch Key from Key Vault.", e)) + ); + } + + /** + * Obtains the KeyClient to retrieve keys from Keyvault. + * returned Mono will never be an empty Mono. + * @param keyVaultUriProperties Parsed key Vault Uri Properties. + * @return Mono of KeyClient + */ + private Mono getAkvClient( + KeyVaultKeyUriProperties keyVaultUriProperties) { + + // Called once per KEYVALTNAME + // Eg:https://KEYVALTNAME.vault.azure.net/ + Mono akvClientMono = this.akvClientCache.getAsync( + /** key: */keyVaultUriProperties.getKeyUri(), + /** obsoleteValue: */null, + /** singleValueInitFunc: */ + () -> { + Mono tokenCredMono = + this.keyVaultTokenCredentialFactory.getTokenCredential(keyVaultUriProperties.getKeyUri()); + return tokenCredMono.map( + tokenCred -> + this.keyClientFactory.getKeyClient(keyVaultUriProperties, tokenCred) + ); + }); + + return akvClientMono; + } + + // + // /// + // /// Obtains the Crypto Client for Wrap/UnWrap. + // /// + // /// Parsed key Vault Uri Properties. + // /// cancellation token + // /// CryptographyClient + private Mono getCryptoClient( + KeyVaultKeyUriProperties keyVaultUriProperties) { + + // Get a Crypto Client for Wrap and UnWrap,this gets init per Key Version + // Cache it against the KeyVersion/KeyId + // Eg: :https://KEYVAULTNAME.vault.azure.net/keys/keyname/KEYID + Mono cryptoClientMono = this.akvCryptoClientCache.getAsync( + keyVaultUriProperties.getKeyUri(), + /** obsoleteValue: */null, + /** singleValueInitFunc: */ + () -> { + // we need to acquire the Client Cert Creds for cases where we directly access Crypto Services. + Mono tokenCredMono = + this.keyVaultTokenCredentialFactory.getTokenCredential(keyVaultUriProperties.getKeyUri()); + return tokenCredMono.map( + tokenCred -> + this.cryptographyClientFactory.getCryptographyClient(keyVaultUriProperties, tokenCred) + ); + }); + return cryptoClientMono; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultAccessException.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultAccessException.java similarity index 93% rename from sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultAccessException.java rename to sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultAccessException.java index 053a2ef8ca6c9..2d0c9eb7f5f44 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultAccessException.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultAccessException.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.encryption; +package com.azure.cosmos.implementation.encryption; import com.azure.core.exception.AzureException; diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultConstants.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultConstants.java new file mode 100644 index 0000000000000..40e873d5da8d6 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultConstants.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm; + +public class KeyVaultConstants { + // TODO: "keys/"? check with dotnet + public static final String KEYS_SEGMENT = "keys"; + public static final String AUTHENTICATION_CHALLENGE_PREFIX = "Bearer "; + public static final String AUTHENTICATION_RESPONSE_HEADER_NAME = "WWW-Authenticate"; + public static final String AUTHENTICATION_PARAMETER = "authorization"; + public static final KeyWrapAlgorithm RsaOaep256 = KeyWrapAlgorithm.RSA_OAEP_256; + + public static class DeletionRecoveryLevel { + public static final String PURGEABLE = "Purgeable"; + public static final String RECOVERABLE = "Recoverable"; + public static final String RECOVERABLE_PROTECTED_SUBSCRIPTION = "Recoverable+ProtectedSubscription"; + public static final String RECOVERABLE_PURGEABLE = "Recoverable+Purgeable"; + public static final String CUSTOMIZED_RECOVERABLE = "CustomizedRecoverable"; + public static final String CUSTOMIZED_RECOVERABLE_PROTECTED_SUBSCRIPTION = "CustomizedRecoverable" + + "+ProtectedSubscription"; + public static final String CUSTOMIZED_RECOVERABLE_PURGEABLE = "CustomizedRecoverable+Purgeable"; + } + + public static class AzureKeyVaultKeyWrapMetadata { + public static final String TYPE_CONSTANT = ImplementationBridgeHelpers.AzureKeyVaultKeyWrapMetadataHelper.getTypeConstant(); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultCosmosException.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultCosmosException.java new file mode 100644 index 0000000000000..21d09b6095347 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultCosmosException.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.CosmosException; + +import java.util.HashMap; + +public class KeyVaultCosmosException extends CosmosException { + public KeyVaultCosmosException(int statusCode, + String message, + Throwable cause) { + super(statusCode, message, new HashMap<>(), cause); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultKeyUriProperties.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultKeyUriProperties.java similarity index 94% rename from sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultKeyUriProperties.java rename to sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultKeyUriProperties.java index fecf3d838db21..dd0446710a0b5 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/KeyVaultKeyUriProperties.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/KeyVaultKeyUriProperties.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.encryption; +package com.azure.cosmos.implementation.encryption; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import org.slf4j.Logger; @@ -11,8 +11,6 @@ import java.net.URISyntaxException; import java.util.concurrent.atomic.AtomicReference; - -// TODO: this also doesn't need to be public, it is public because of test FIXME public class KeyVaultKeyUriProperties { private final static Logger logger = LoggerFactory.getLogger(KeyVaultKeyUriProperties.class); private final URI keyUri; @@ -58,7 +56,7 @@ public static boolean tryParse(URI keyUri, // https://testdemo1.vault.azure.net/keys/testkey1/47d306aeaae74baab294672354603ca3 // https://testdemo1.vault.azure.net/keys/testkey1/47d306aeaae74baab294672354603ca3 - if (!((segments.length == 3) && StringUtils.equalsIgnoreCase(segments[0], KeyVaultConstants.KeysSegment))) { + if (!((segments.length == 3) && StringUtils.equalsIgnoreCase(segments[0], KeyVaultConstants.KEYS_SEGMENT))) { return false; } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/UserProvidedTokenCredentialFactory.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UserProvidedTokenCredentialFactory.java similarity index 87% rename from sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/UserProvidedTokenCredentialFactory.java rename to sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UserProvidedTokenCredentialFactory.java index 6e33904f7e7f7..743d3068f2af1 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/UserProvidedTokenCredentialFactory.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UserProvidedTokenCredentialFactory.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.encryption; +package com.azure.cosmos.implementation.encryption; import com.azure.core.credential.TokenCredential; +import com.azure.cosmos.encryption.KeyVaultTokenCredentialFactory; import reactor.core.publisher.Mono; import java.net.URI; @@ -38,7 +39,7 @@ public UserProvidedTokenCredentialFactory(TokenCredential tokenCredential) { * @return Mono of TokenCredential User passed TokenCredential. */ @Override - public Mono getTokenCredentialAsync(URI keyVaultKeyUri) { + public Mono getTokenCredential(URI keyVaultKeyUri) { return Mono.just(this.tokenCredential); } } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/samples/java/com/azure/cosmos/Program.java b/sdk/cosmos/azure-cosmos-encryption/src/samples/java/com/azure/cosmos/Program.java index d550cfadc6cf2..60eb700164c18 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/samples/java/com/azure/cosmos/Program.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/samples/java/com/azure/cosmos/Program.java @@ -138,7 +138,7 @@ private static void initialize(CosmosAsyncClient client, Properties properties) /// Generates an encryption key, wraps it using the key wrap metadata provided /// with the key wrapping provider configured on the client /// and saves the wrapped encryption key as an asynchronous operation in the Azure Cosmos service. - encryptor.getDataEncryptionKeyContainer().createDataEncryptionKeyAsync( + encryptor.getDataEncryptionKeyContainer().createDataEncryptionKey( dataEncryptionKeyId, CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED, wrapMetadata, new CosmosItemRequestOptions()).block(); diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/KeyVaultAccessClientTests.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/KeyVaultAccessClientTests.java index 9625918755141..e5b2a69cc5361 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/KeyVaultAccessClientTests.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/KeyVaultAccessClientTests.java @@ -6,6 +6,10 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.exception.AzureException; import com.azure.cosmos.implementation.encryption.AesCryptoServiceProvider; +import com.azure.cosmos.implementation.encryption.CryptographyClientFactory; +import com.azure.cosmos.implementation.encryption.KeyClientFactory; +import com.azure.cosmos.implementation.encryption.KeyVaultConstants; +import com.azure.cosmos.implementation.encryption.KeyVaultKeyUriProperties; import com.azure.cosmos.implementation.guava25.base.Function; import com.azure.cosmos.implementation.guava25.collect.ImmutableList; import com.azure.cosmos.implementation.guava25.collect.ImmutableMap; diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DecryptDataEncryptedByDotNetTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DecryptDataEncryptedByDotNetTest.java index 92d1e4a66cecf..8aea00a8d904e 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DecryptDataEncryptedByDotNetTest.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DecryptDataEncryptedByDotNetTest.java @@ -31,6 +31,7 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Factory; import org.testng.annotations.Test; +import reactor.core.publisher.Mono; import java.time.Duration; import java.util.Objects; @@ -111,7 +112,7 @@ public void canReadKeyEncryptionKeyGeneratedByDotNet() throws Exception { EncryptionKeyWrapMetadata keyWrapMetadata = Utils.getSimpleObjectMapper().convertValue(dataEncryptionKeyProperties.get("keyWrapMetadata"), EncryptionKeyWrapMetadata.class); byte[] expectedWrappedKey = dataEncryptionKeyProperties.get("wrappedDataEncryptionKey").binaryValue(); - EncryptionKeyUnwrapResult expectedUnWrappedKey = keyWrapProvider.unwrapKey(expectedWrappedKey, keyWrapMetadata); + EncryptionKeyUnwrapResult expectedUnWrappedKey = keyWrapProvider.unwrapKey(expectedWrappedKey, keyWrapMetadata).block(); assertThat(loadedKey.getRawKey()).isEqualTo(expectedUnWrappedKey.getDataEncryptionKey()); } @@ -172,17 +173,17 @@ public int hashCode() { } private class TestKeyWrapProvider implements EncryptionKeyWrapProvider { - public EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata) { + public Mono unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata) { int moveBy = StringUtils.equals(metadata.value, DecryptDataEncryptedByDotNetTest.METADATA_1.value + DecryptDataEncryptedByDotNetTest.METADATA_UPDATE_SUFFIX) ? 1 : 2; for (int i = 0; i < wrappedKey.length; i++) { wrappedKey[i] = (byte) (wrappedKey[i] - moveBy); } - return new EncryptionKeyUnwrapResult(wrappedKey, CACHE_TTL); + return Mono.just(new EncryptionKeyUnwrapResult(wrappedKey, CACHE_TTL)); } - public EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata) { + public Mono wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata) { EncryptionKeyWrapMetadata responseMetadata = new EncryptionKeyWrapMetadata(metadata.value + DecryptDataEncryptedByDotNetTest.METADATA_UPDATE_SUFFIX); int moveBy = StringUtils.equals(metadata.value, DecryptDataEncryptedByDotNetTest.METADATA_1.value) ? 1 : 2; @@ -190,7 +191,7 @@ public EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata met key[i] = (byte) (key[i] + moveBy); } - return new EncryptionKeyWrapResult(key, responseMetadata); + return Mono.just(new EncryptionKeyWrapResult(key, responseMetadata)); } } } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionProcessorTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionProcessorTest.java index fb5bd3f96d0a7..50a3358e52856 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionProcessorTest.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionProcessorTest.java @@ -94,8 +94,8 @@ public byte[] decryptData(byte[] cipherText) { byte[] inputAsByteArray = toByteArray(testDate); - byte[] itemObjectWithEncryptedSensitiveDataAsByteArray = EncryptionProcessor.encryptAsync(inputAsByteArray, encryptor, encryptionOptions).block(); - byte[] itemObjectWithDecryptedSensitiveDataAsByteArray = EncryptionProcessor.decryptAsync(itemObjectWithEncryptedSensitiveDataAsByteArray, encryptor).block(); + byte[] itemObjectWithEncryptedSensitiveDataAsByteArray = EncryptionProcessor.encrypt(inputAsByteArray, encryptor, encryptionOptions).block(); + byte[] itemObjectWithDecryptedSensitiveDataAsByteArray = EncryptionProcessor.decrypt(itemObjectWithEncryptedSensitiveDataAsByteArray, encryptor).block(); assertThat(itemObjectWithDecryptedSensitiveDataAsByteArray).isEqualTo(inputAsByteArray); } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionTests.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionTests.java index 1d1f92a3e02ff..dc51056bb6ba3 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionTests.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionTests.java @@ -11,7 +11,6 @@ import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosException; import com.azure.cosmos.encryption.AzureKeyVaultKeyWrapMetadata; -import com.azure.cosmos.encryption.AzureKeyVaultKeyWrapProvider; import com.azure.cosmos.encryption.DecryptionResult; import com.azure.cosmos.encryption.EncryptionCosmosAsyncContainer; import com.azure.cosmos.encryption.EncryptionItemRequestOptions; @@ -21,10 +20,7 @@ import com.azure.cosmos.encryption.EncryptionKeyWrapResult; import com.azure.cosmos.encryption.EncryptionQueryRequestOptions; import com.azure.cosmos.encryption.Encryptor; -import com.azure.cosmos.encryption.KeyVaultAccessClient; import com.azure.cosmos.encryption.KeyVaultAccessClientTests; -import com.azure.cosmos.encryption.KeyVaultConstants; -import com.azure.cosmos.encryption.KeyVaultKeyUriProperties; import com.azure.cosmos.encryption.KeyVaultTokenCredentialFactory; import com.azure.cosmos.encryption.WithEncryption; import com.azure.cosmos.implementation.DatabaseForTest; @@ -72,6 +68,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; import static com.azure.cosmos.encryption.KeyVaultAccessClientTests.*; +import static com.azure.cosmos.implementation.encryption.ImplementationBridgeHelpers.EncryptionKeyWrapMetadataHelper; // TODO: moderakh fix/update the comments on the key wrap/unwrap tests. public class EncryptionTests extends TestSuiteBase { @@ -250,7 +247,7 @@ public void encryptionCreateDek() { dekProvider.initialize(databaseCore, EncryptionTests.keyContainer.getId()); DataEncryptionKeyProperties readProperties = - dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKeyAsync(dekId, null).block().getItem(); + dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKey(dekId, null).block().getItem(); assertThat(dekProperties).isEqualTo(readProperties); } @@ -261,7 +258,7 @@ public void encryptionRewrapDek() { assertThat(dekProperties.encryptionKeyWrapMetadata ).isEqualTo(new EncryptionKeyWrapMetadata(EncryptionTests.metadata1.value + EncryptionTests.metadataUpdateSuffix)); - CosmosItemResponse dekResponse = EncryptionTests.dekProvider.getDataEncryptionKeyContainer().rewrapDataEncryptionKeyAsync( + CosmosItemResponse dekResponse = EncryptionTests.dekProvider.getDataEncryptionKeyContainer().rewrapDataEncryptionKey( dekId, EncryptionTests.metadata2, null).block(); @@ -275,7 +272,7 @@ public void encryptionRewrapDek() { // Use different DEK provider to avoid (unintentional) cache impact CosmosDataEncryptionKeyProvider dekProvider = new CosmosDataEncryptionKeyProvider(new TestKeyWrapProvider()); dekProvider.initialize(EncryptionTests.databaseCore, EncryptionTests.keyContainer.getId()); - DataEncryptionKeyProperties readProperties = dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKeyAsync(dekId, null).block().getItem(); + DataEncryptionKeyProperties readProperties = dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKey(dekId, null).block().getItem(); assertThat(readProperties).isEqualTo(readProperties); } @@ -711,7 +708,7 @@ public void setKeyVaultValidatePurgeProtectionAndSoftDeleteSettingsAsync() throw AtomicReference keyVaultKeyUriPropertiesRef = new AtomicReference(); KeyVaultKeyUriProperties.tryParse(new URI(wrapKeyVaultMetaData.value), keyVaultKeyUriPropertiesRef); boolean validatepurgeprotection = - keyVaultAccessClient.validatePurgeProtectionAndSoftDeleteSettingsAsync(keyVaultKeyUriPropertiesRef.get()).block(); + keyVaultAccessClient.validatePurgeProtectionAndSoftDeleteSettings(keyVaultKeyUriPropertiesRef.get()).block(); assertThat(validatepurgeprotection).isEqualTo(true); } @@ -727,7 +724,7 @@ public void notSetKeyVaultValidatePurgeProtectionAndSoftDeleteSettingsAsync2() t KeyVaultKeyUriProperties.tryParse(new URI(wrapKeyVaultMetaData.value), keyVaultUriPropertiesRef); boolean validatepurgeprotection = - keyVaultAccessClient.validatePurgeProtectionAndSoftDeleteSettingsAsync(keyVaultUriPropertiesRef.get()).block(); + keyVaultAccessClient.validatePurgeProtectionAndSoftDeleteSettings(keyVaultUriPropertiesRef.get()).block(); assertThat(validatepurgeprotection).isEqualTo(false); } @@ -736,31 +733,33 @@ public void notSetKeyVaultValidatePurgeProtectionAndSoftDeleteSettingsAsync2() t /// Validates handling of Null Wrapped Key Returned from Key Vault // [ExpectedException(typeof(ArgumentNullException), // "ArgumentNullException when provided with null key.")] - @Test(groups = { "encryption" }, timeOut = TIMEOUT, expectedExceptions = { NullPointerException.class }, - expectedExceptionsMessageRegExp = "wrappedDataEncryptionKey is null") + @Test(groups = { "encryption" }, timeOut = TIMEOUT, + expectedExceptions = { IllegalArgumentException.class }, + expectedExceptionsMessageRegExp = "keyVaultAccessClient.wrapKey returned no bytes: wrappedDataEncryptionKey is null") public void validateNullWrappedKeyResult() throws Exception { URI keyUri = new URI("https://testdemo.vault.azure.net/keys/testkey1/" + KeyVaultTestConstants.ValidateNullWrappedKey); - EncryptionKeyWrapMetadata invalidWrapMetadata = new EncryptionKeyWrapMetadata("akv", keyUri.toString()); + EncryptionKeyWrapMetadata invalidWrapMetadata = EncryptionKeyWrapMetadataHelper.create("akv", keyUri.toString()); EncryptionKeyWrapResult keyWrapResponse = azureKeyVaultKeyWrapProvider.wrapKey( rawDekForKeyVault, - invalidWrapMetadata); - + invalidWrapMetadata).block(); } /// Validates handling of Null Unwrapped Key from Key Vault - @Test(groups = { "encryption" }, timeOut = TIMEOUT, expectedExceptions = {NullPointerException.class}, expectedExceptionsMessageRegExp = "dataEncryptionKey is null") + @Test(groups = { "encryption" }, timeOut = TIMEOUT, + expectedExceptions = {IllegalArgumentException.class}, + expectedExceptionsMessageRegExp = "keyVaultAccessClient.unwrapKey returned no bytes: dataEncryptionKey is null") public void validateNullUnwrappedKeyResult() throws Exception { URI keyUri = new URI("https://testdemo.vault.azure.net/keys/testkey1/" + KeyVaultTestConstants.ValidateNullUnwrappedKey); - EncryptionKeyWrapMetadata invalidWrapMetadata = new EncryptionKeyWrapMetadata("akv", keyUri.toString(), KeyVaultConstants.RsaOaep256.toString()); + EncryptionKeyWrapMetadata invalidWrapMetadata = EncryptionKeyWrapMetadataHelper.create("akv", keyUri.toString(), KeyVaultConstants.RsaOaep256.toString()); EncryptionKeyWrapResult wrappedKey = EncryptionTests.wrapDekKeyVaultAsync(rawDekForKeyVault, azureKeyVaultKeyWrapMetadata).block(); byte[] wrappedDek = wrappedKey.getWrappedDataEncryptionKey(); - EncryptionKeyUnwrapResult keyWrapResponse = azureKeyVaultKeyWrapProvider.unwrapKey( - wrappedDek, - invalidWrapMetadata); + EncryptionKeyUnwrapResult keyWrapResponse = azureKeyVaultKeyWrapProvider.unwrapKey( + wrappedDek, + invalidWrapMetadata).block(); } /// Validates Null Response from KeyVault @@ -772,7 +771,7 @@ public void validateNullUnwrappedKeyResult() throws Exception { + "protection enabled.") public void validateKeyClientReturnsNullKeyVaultResponse() throws Exception { URI keyUri = new URI("https://testdemo.vault.azure.net/keys/" + KeyVaultTestConstants.ValidateNullKeyVaultKey + "47d306aeaae74baab294672354603ca3"); - EncryptionKeyWrapMetadata invalidWrapMetadata = new EncryptionKeyWrapMetadata("akv", keyUri.toString()); + EncryptionKeyWrapMetadata invalidWrapMetadata = EncryptionKeyWrapMetadataHelper.create("akv", keyUri.toString()); EncryptionKeyWrapResult keyWrapResponse = EncryptionTests.wrapDekKeyVaultAsync(rawDekForKeyVault, invalidWrapMetadata).block(); } @@ -799,7 +798,7 @@ public void validateKeyClientReturnRequestFailed() throws Exception { URI keyUri = new URI("https://testdemo.vault.azure.net/keys/" + KeyVaultTestConstants.ValidateRequestFailedEx + "47d306aeaae74baab294672354603ca3"); - EncryptionKeyWrapMetadata invalidWrapMetadata = new EncryptionKeyWrapMetadata("akv", keyUri.toString()); + EncryptionKeyWrapMetadata invalidWrapMetadata = EncryptionKeyWrapMetadataHelper.create("akv", keyUri.toString()); EncryptionKeyWrapResult keyWrapResponse = EncryptionTests.wrapDekKeyVaultAsync(rawDekForKeyVault, invalidWrapMetadata).block(); } @@ -815,7 +814,7 @@ public void encryptionCreateDekKeyVaultWrapProvider() { dekProvider.initialize(EncryptionTests.databaseCore, EncryptionTests.keyContainer.getId()); DataEncryptionKeyProperties readProperties = - dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKeyAsync(dekId, + dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKey(dekId, new CosmosItemRequestOptions()).block().getItem(); assertThat(readProperties).isEqualTo(dekProperties); @@ -830,7 +829,7 @@ public void encryptionRewrapDekWithKeyVaultWrapProvider() { .isEqualTo(dekProperties.encryptionKeyWrapMetadata); CosmosItemResponse dekResponse = - EncryptionTests.dekProvider.getDataEncryptionKeyContainer().rewrapDataEncryptionKeyAsync( + EncryptionTests.dekProvider.getDataEncryptionKeyContainer().rewrapDataEncryptionKey( dekId, EncryptionTests.metadata2, new CosmosItemRequestOptions()).block(); @@ -843,14 +842,14 @@ public void encryptionRewrapDekWithKeyVaultWrapProvider() { assertThat(new EncryptionKeyWrapMetadata(EncryptionTests.metadata2.value + EncryptionTests.metadataUpdateSuffix)).isEqualTo(dekProperties.encryptionKeyWrapMetadata); // Assert.AreEqual( - // new EncryptionKeyWrapMetadata(EncryptionTests.metadata2.Value + EncryptionTests + // EncryptionKeyWrapMetadataHelper.create(EncryptionTests.metadata2.Value + EncryptionTests // .metadataUpdateSuffix), // dekProperties.EncryptionKeyWrapMetadata); CosmosDataEncryptionKeyProvider dekProvider = new CosmosDataEncryptionKeyProvider(azureKeyVaultKeyWrapProvider); dekProvider.initialize(EncryptionTests.databaseCore, EncryptionTests.keyContainer.getId()); DataEncryptionKeyProperties readProperties = - dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKeyAsync(dekId, + dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKey(dekId, new CosmosItemRequestOptions()).block().getItem(); assertThat(readProperties).isEqualTo(dekProperties); @@ -873,7 +872,7 @@ public void wrapNullKeyUsingKeyVault() { public void wrapKeyUsingKeyVaultInValidTypeConstants() throws Exception { URI keyUri = new URI("https://testdemo.vault.azure.net/keys/testkey1/47d306aeaae74baab294672354603ca3"); - EncryptionKeyWrapMetadata invalidWrapMetadata = new EncryptionKeyWrapMetadata("incorrectConstant", + EncryptionKeyWrapMetadata invalidWrapMetadata = EncryptionKeyWrapMetadataHelper.create("incorrectConstant", keyUri.toString()); EncryptionKeyWrapResult keyWrapResponse = EncryptionTests.wrapDekKeyVaultAsync(rawDekForKeyVault, invalidWrapMetadata).block(); @@ -887,7 +886,7 @@ public void wrapKeyUsingKeyVaultInValidTypeConstants() throws Exception { @Test(groups = { "encryption" }, timeOut = TIMEOUT, expectedExceptions = {RuntimeException.class}) public void validateKeyClientReturnNullArgument() { - EncryptionKeyWrapMetadata invalidWrapMetadata = new EncryptionKeyWrapMetadata("akv", null); + EncryptionKeyWrapMetadata invalidWrapMetadata = EncryptionKeyWrapMetadataHelper.create("akv", null); EncryptionKeyWrapResult keyWrapResponse = EncryptionTests.wrapDekKeyVaultAsync(rawDekForKeyVault, invalidWrapMetadata).block(); } @@ -897,7 +896,7 @@ public void validateKeyClientReturnNullArgument() @Test(groups = { "encryption" }, timeOut = TIMEOUT, expectedExceptions = {RuntimeException.class}) public void wrapKeyUsingKeyVaultInValidValue() throws Exception { URI keyUri = new URI("https://testdemo.vault.azure.net/key/testkey1/47d306aeaae74baab294672354603ca3"); - EncryptionKeyWrapMetadata invalidWrapMetadata = new EncryptionKeyWrapMetadata("akv", keyUri.toString()); + EncryptionKeyWrapMetadata invalidWrapMetadata = EncryptionKeyWrapMetadataHelper.create("akv", keyUri.toString()); EncryptionKeyWrapResult keyWrapResponse = EncryptionTests.wrapDekKeyVaultAsync(rawDekForKeyVault, invalidWrapMetadata).block(); } @@ -1002,7 +1001,7 @@ private static void verifyItemByRead(EncryptionCosmosAsyncContainer container, T private static DataEncryptionKeyProperties createDek(CosmosDataEncryptionKeyProvider dekProvider, String dekId) { - CosmosItemResponse dekResponse = dekProvider.getDataEncryptionKeyContainer().createDataEncryptionKeyAsync( + CosmosItemResponse dekResponse = dekProvider.getDataEncryptionKeyContainer().createDataEncryptionKey( dekId, CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED, EncryptionTests.metadata1, @@ -1075,7 +1074,7 @@ private static EncryptionOptions getEncryptionOptions( } private class TestKeyWrapProvider implements EncryptionKeyWrapProvider { - public EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata) { + public Mono unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata) { int moveBy = StringUtils.equals(metadata.value, EncryptionTests.metadata1.value + EncryptionTests.metadataUpdateSuffix) ? 1 : 2; @@ -1083,10 +1082,10 @@ public EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, EncryptionKeyWrapM wrappedKey[i] = (byte) (wrappedKey[i] - moveBy); } - return new EncryptionKeyUnwrapResult(wrappedKey, EncryptionTests.cacheTTL); + return Mono.just(new EncryptionKeyUnwrapResult(wrappedKey, EncryptionTests.cacheTTL)); } - public EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata) { + public Mono wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata) { EncryptionKeyWrapMetadata responseMetadata = new EncryptionKeyWrapMetadata(metadata.value + EncryptionTests.metadataUpdateSuffix); int moveBy = StringUtils.equals(metadata.value, EncryptionTests.metadata1.value) ? 1 : 2; @@ -1095,7 +1094,7 @@ public EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata met key[i] = (byte) (key[i] + moveBy); } - return new EncryptionKeyWrapResult(key, responseMetadata); + return Mono.just(new EncryptionKeyWrapResult(key, responseMetadata)); } } @@ -1109,7 +1108,7 @@ public TestEncryptor(DataEncryptionKeyProvider dataEncryptionKeyProvider) { this.failDecryption = false; } - public Mono decryptAsync( + public Mono decrypt( byte[] cipherText, String dataEncryptionKeyId, String encryptionAlgorithm) { @@ -1134,7 +1133,7 @@ public Mono decryptAsync( ); } - public Mono encryptAsync( + public Mono encrypt( byte[] plainText, String dataEncryptionKeyId, String encryptionAlgorithm) { @@ -1301,22 +1300,19 @@ public void accept(DecryptionResult decryptionResult) { private static Mono wrapDekKeyVaultAsync(byte[] rawDek, EncryptionKeyWrapMetadata wrapMetaData) { - EncryptionKeyWrapResult keyWrapResponse = azureKeyVaultKeyWrapProvider.wrapKey( - rawDek, - wrapMetaData); - - return Mono.just(keyWrapResponse); + return azureKeyVaultKeyWrapProvider.wrapKey( + rawDek, + wrapMetaData); } private static Mono unwrapDekKeyVaultAsync(byte[] wrappedDek, EncryptionKeyWrapMetadata unwrapMetaData) { - EncryptionKeyUnwrapResult keyUnwrapResponse = azureKeyVaultKeyWrapProvider.unwrapKey( - wrappedDek, - unwrapMetaData); - return Mono.just(keyUnwrapResponse); + return azureKeyVaultKeyWrapProvider.unwrapKey( + wrappedDek, + unwrapMetaData); } class EncryptionTestsTokenCredentialFactory extends KeyVaultTokenCredentialFactory { - public Mono getTokenCredentialAsync(URI keyVaultKeyUri) { + public Mono getTokenCredential(URI keyVaultKeyUri) { // TODO: DefaultAzureCredentials return Mono.just(Mockito.mock(TokenCredential.class)); diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/NewEncryptionProcessorTests.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/NewEncryptionProcessorTests.java index 859a07a2f9cd2..63a609dda911e 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/NewEncryptionProcessorTests.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/NewEncryptionProcessorTests.java @@ -49,7 +49,7 @@ public Object answer(InvocationOnMock invocationOnMock) throws Throwable { throw new IllegalArgumentException("DEK not found."); } } - }).when(NewEncryptionProcessorTests.mockEncryptor).encryptAsync(Mockito.any(), Mockito.any(), Mockito.any()); + }).when(NewEncryptionProcessorTests.mockEncryptor).encrypt(Mockito.any(), Mockito.any(), Mockito.any()); Mockito.doAnswer(new Answer() { @Override @@ -63,7 +63,7 @@ public Object answer(InvocationOnMock invocationOnMock) throws Throwable { throw new IllegalArgumentException("Null DEK was returned."); } } - }).when(NewEncryptionProcessorTests.mockEncryptor).decryptAsync(Mockito.any(), Mockito.any(), Mockito.any()); + }).when(NewEncryptionProcessorTests.mockEncryptor).decrypt(Mockito.any(), Mockito.any(), Mockito.any()); } @@ -77,7 +77,7 @@ public void InvalidPathToEncrypt() { .setPathsToEncrypt(ImmutableList.of("/SensitiveStr", "/Invalid")); try { - EncryptionProcessor.encryptAsync( + EncryptionProcessor.encrypt( testDoc.ToStream(), NewEncryptionProcessorTests.mockEncryptor, encryptionOptionsWithInvalidPathToEncrypt); @@ -112,7 +112,7 @@ public void ValidateEncryptDecryptDocument() { TestCommon.TestDoc testDoc = TestCommon.TestDoc.Create(); ObjectNode encryptedDoc = NewEncryptionProcessorTests.VerifyEncryptionSucceeded(testDoc); - ObjectNode decryptedDoc = EncryptionProcessor.decryptAsync( + ObjectNode decryptedDoc = EncryptionProcessor.decrypt( encryptedDoc, NewEncryptionProcessorTests.mockEncryptor).block(); @@ -164,7 +164,7 @@ public void ValidateEncryptDecryptDocument() { //} // private static ObjectNode VerifyEncryptionSucceeded(TestCommon.TestDoc testDoc) { - byte[] encryptedStream = EncryptionProcessor.encryptAsync( + byte[] encryptedStream = EncryptionProcessor.encrypt( testDoc.ToStream(), NewEncryptionProcessorTests.mockEncryptor, NewEncryptionProcessorTests.encryptionOptions).block(); diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/OldEncryptionTests.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/OldEncryptionTests.java index 66e64c531619e..f8c7752bb3862 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/OldEncryptionTests.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/OldEncryptionTests.java @@ -31,6 +31,7 @@ import org.testng.annotations.BeforeTest; import org.testng.annotations.Factory; import org.testng.annotations.Test; +import reactor.core.publisher.Mono; import java.time.Duration; import java.util.Objects; @@ -168,7 +169,7 @@ public void encryptionCreateDek() { dekProvider.initialize(databaseCore, OldEncryptionTests.keyContainer.getId()); - DataEncryptionKeyProperties readProperties = dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKeyAsync(dekId, null).block().getItem(); + DataEncryptionKeyProperties readProperties = dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKey(dekId, null).block().getItem(); assertThat(dekProperties).isEqualTo(readProperties); } @@ -227,7 +228,7 @@ private TestDoc getItem(String documentId) { } private static DataEncryptionKeyProperties createDek(CosmosDataEncryptionKeyProvider dekProvider, String dekId) { - CosmosItemResponse dekResponse = dekProvider.getDataEncryptionKeyContainer().createDataEncryptionKeyAsync( + CosmosItemResponse dekResponse = dekProvider.getDataEncryptionKeyContainer().createDataEncryptionKey( dekId, CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED, OldEncryptionTests.metadata1, null).block(); @@ -242,17 +243,17 @@ private static DataEncryptionKeyProperties createDek(CosmosDataEncryptionKeyProv } private class TestKeyWrapProvider implements EncryptionKeyWrapProvider { - public EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata) { + public Mono unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata) { int moveBy = StringUtils.equals(metadata.value, OldEncryptionTests.metadata1.value + OldEncryptionTests.metadataUpdateSuffix) ? 1 : 2; for (int i = 0; i < wrappedKey.length; i++) { wrappedKey[i] = (byte) (wrappedKey[i] - moveBy); } - return new EncryptionKeyUnwrapResult(wrappedKey, OldEncryptionTests.cacheTTL); + return Mono.just(new EncryptionKeyUnwrapResult(wrappedKey, OldEncryptionTests.cacheTTL)); } - public EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata) { + public Mono wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata) { EncryptionKeyWrapMetadata responseMetadata = new EncryptionKeyWrapMetadata(metadata.value + OldEncryptionTests.metadataUpdateSuffix); int moveBy = StringUtils.equals(metadata.value, OldEncryptionTests.metadata1.value) ? 1 : 2; @@ -260,7 +261,7 @@ public EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata met key[i] = (byte) (key[i] + moveBy); } - return new EncryptionKeyWrapResult(key, responseMetadata); + return Mono.just(new EncryptionKeyWrapResult(key, responseMetadata)); } } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java index 015319c65378c..01c4edf63f721 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java @@ -5,6 +5,8 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.implementation.RequestOptions; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** @@ -20,6 +22,22 @@ public class CosmosItemRequestOptions { private String ifMatchETag; private String ifNoneMatchETag; + + /** + * copy constructor + */ + CosmosItemRequestOptions(CosmosItemRequestOptions options) { + consistencyLevel = options.consistencyLevel; + indexingDirective = options.indexingDirective; + preTriggerInclude = options.preTriggerInclude != null ? new ArrayList<>(options.preTriggerInclude) : null; + postTriggerInclude = options.postTriggerInclude != null ? new ArrayList<>(options.postTriggerInclude) : null; + sessionToken = options.sessionToken; + partitionKey = options.partitionKey; + ifMatchETag = options.ifMatchETag; + ifNoneMatchETag = options.ifNoneMatchETag; + } + + /** * Constructor */ diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ModelBridgeInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ModelBridgeInternal.java index d4c543f4086a9..519498eb3fac6 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ModelBridgeInternal.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ModelBridgeInternal.java @@ -714,4 +714,9 @@ public static CosmosQueryRequestOptions setQueryRequestOptionsEmptyPagesAllowed( public static IndexingPolicy createIndexingPolicy(Index[] indexes) { return new IndexingPolicy(indexes); } + + @Warning(value = INTERNAL_USE_ONLY_WARNING) + public static CosmosItemRequestOptions clone(CosmosItemRequestOptions options) { + return new CosmosItemRequestOptions(options); + } } From 07f7930b4448b45566d419ac334b86623646d643 Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Tue, 1 Sep 2020 12:47:33 -0700 Subject: [PATCH 037/168] Refactor ADT RequestOption extensions for less code duplication (#14695) --- .../digitaltwins/core/DeleteRelationshipRequestOptions.java | 3 ++- .../azure/digitaltwins/core/UpdateComponentRequestOptions.java | 3 ++- .../digitaltwins/core/UpdateRelationshipRequestOptions.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java index e70aee1caabcc..918b917e94ace 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java @@ -13,9 +13,10 @@ public class DeleteRelationshipRequestOptions extends RequestOptions { // This class exists to be added to later if the deleteRelationship APIs get a new optional parameter in later service // API versions and so that we don't have to expose that new optional parameter for other APIs like deleteDigitalTwin + // Need to override this method so that the returned value is of type DeleteRelationshipRequestOptions instead of type RequestOptions @Override public DeleteRelationshipRequestOptions setIfMatch(String ifMatch) { - this.ifMatch = ifMatch; + super.setIfMatch(ifMatch); return this; } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java index 228c9ebf760a2..5cdf52b2b9409 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java @@ -14,9 +14,10 @@ public class UpdateComponentRequestOptions extends RequestOptions { // API versions and so that we don't have to expose that new optional parameter for other APIs like updateDigitalTwin, // updateRelationship, etc. + // Need to override this method so that the returned value is of type UpdateComponentRequestOptions instead of type RequestOptions @Override public UpdateComponentRequestOptions setIfMatch(String ifMatch) { - this.ifMatch = ifMatch; + super.setIfMatch(ifMatch); return this; } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java index 0558f4bcdb22b..d774d6c9e95e9 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java @@ -14,9 +14,10 @@ public class UpdateRelationshipRequestOptions extends RequestOptions { // API versions and so that we don't have to expose that new optional parameter for other APIs like updateDigitalTwin, // updateComponent, etc. + // Need to override this method so that the returned value is of type UpdateRelationshipRequestOptions instead of type RequestOptions @Override public UpdateRelationshipRequestOptions setIfMatch(String ifMatch) { - this.ifMatch = ifMatch; + super.setIfMatch(ifMatch); return this; } } From f7c2bb9f40cc209d9d05718da96821a2f73d47a5 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Tue, 1 Sep 2020 12:54:13 -0700 Subject: [PATCH 038/168] Fix the live tests pipeline (#14692) --- sdk/digitaltwins/tests.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sdk/digitaltwins/tests.yml b/sdk/digitaltwins/tests.yml index 2f799c176aa1e..c4569a7b22f6b 100644 --- a/sdk/digitaltwins/tests.yml +++ b/sdk/digitaltwins/tests.yml @@ -1,8 +1,12 @@ trigger: none -extends: - template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests.yml - parameters: - ServiceDirectory: digitaltwins - Location: westus2 - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) \ No newline at end of file +jobs: + - template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests.yml + parameters: + Artifacts: + - name: azure-digitaltwins-core + groupId: com.azure + safeName: azuredigitaltwinscore + ServiceDirectory: digitaltwins + Location: westus2 + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) \ No newline at end of file From b9e2eb13ee9ac6d4511f8bfbf48c7052bad4e5af Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Tue, 1 Sep 2020 13:00:02 -0700 Subject: [PATCH 039/168] [TA] Update Sample README and README for OpinionMining and PII endpoints. (#14665) * PII README updates --- .../azure-ai-textanalytics/README.md | 11 +- .../src/samples/README.md | 17 ++- ...timentBatchDocumentsWithOpinionMining.java | 95 ---------------- ...tBatchDocumentsWithOpinionMiningAsync.java | 105 ------------------ ...SentimentBatchStringWithOpinionMining.java | 78 ------------- ...mentBatchStringWithOpinionMiningAsync.java | 100 ----------------- 6 files changed, 26 insertions(+), 380 deletions(-) delete mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMining.java delete mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync.java delete mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMining.java delete mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMiningAsync.java diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 0efe4d8ec9afb..57ac922e00171 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -222,6 +222,11 @@ documentSentiment.getSentences().forEach(sentenceSentiment -> System.out.printf("Analyzed sentence sentiment: %s.%n", sentenceSentiment.getSentiment())); ``` For samples on using the production recommended option `AnalyzeSentimentBatch` see [here][analyze_sentiment_sample]. + +To get more granular information about the opinions related to aspects of a product/service, also knows as Aspect-based +Sentiment Analysis in Natural Language Processing (NLP), see sample on sentiment analysis with opinion mining see +[here][analyze_sentiment_with_opinion_mining_sample]. + Please refer to the service documentation for a conceptual discussion of [sentiment analysis][sentiment_analysis]. ### Detect language @@ -270,14 +275,16 @@ document. It recognizes and categorizes PII entities in its input text, such as Social Security Numbers, bank account information, credit card numbers, and more. This endpoint is only supported for API versions v3.1-preview.1 and above. - + ```java String document = "My SSN is 859-98-0987"; textAnalyticsClient.recognizePiiEntities(document).forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s," + " confidence score: %f.%n", + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); ``` +For samples on using the production recommended option `RecognizePiiEntitiesBatch` see [here][recognize_pii_entities_sample]. Please refer to the service documentation for [supported PII entity types][pii_entity_recognition]. ### Recognize linked entities @@ -394,8 +401,10 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [samples_readme]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/README.md [detect_language_sample]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/DetectLanguageBatchDocuments.java [analyze_sentiment_sample]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocuments.java +[analyze_sentiment_with_opinion_mining_sample]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMining.java [extract_key_phrases_sample]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/ExtractKeyPhrasesBatchDocuments.java [recognize_entities_sample]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeEntitiesBatchDocuments.java +[recognize_pii_entities_sample]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java [recognize_linked_entities_sample]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocuments.java ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Ftextanalytics%2Fazure-ai-textanalytics%2FREADME.png) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/README.md b/sdk/textanalytics/azure-ai-textanalytics/src/samples/README.md index 8331b0b9f0644..4f30dd0c0572d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/README.md @@ -27,12 +27,16 @@ The following sections provide several code snippets covering some of the most c - [Detect language in a document with asynchronous client][async_sample_detect_language] - [Recognize entities in a document][sample_entities] - [Recognize entities in a document with asynchronous client][async_sample_entities] +- [Recognize Personally Identifiable Information in a document][sample_pii_entities] +- [Recognize Personally Identifiable Information in a document with asynchronous client][async_sample_pii_entities] - [Recognize linked entities in a document][sample_linked_entities] - [Recognize linked entities in a document with asynchronous client][async_sample_linked_entities] - [Extract key phrases in a document][sample_key_phrases] - [Extract key phrases in a document with asynchronous client][async_sample_key_phrases] - [Analyze sentiment in a document][sample_sentiment] - [Analyze sentiment in a document with asynchronous client][async_sample_sentiment] +- [Analyze sentiment with opinion mining in a document][sample_sentiment_opinion_mining] +- [Analyze sentiment with opinion mining in a document with asynchronous client][async_sample_sentiment_opinion_mining] - [Rotate key credential][sample_rotate_key] - [Rotate key credential with asynchronous client][async_sample_rotate_key] @@ -45,6 +49,10 @@ Batch Samples: - [Recognize entities in a batch of documents(Convenience)][sample_entities_batch_convenience] - [Recognize entities in a batch of documents with asynchronous client][async_sample_entities_batch] - [Recognize entities in a batch of documents with asynchronous client(Convenience)][async_sample_entities_batch_convenience] +- [Recognize Personally Identifiable Information in a batch of documents][sample_pii_entities_batch] +- [Recognize Personally Identifiable Information in a batch of documents(Convenience)][sample_pii_entities_batch_convenience] +- [Recognize Personally Identifiable Information in a batch of documents with asynchronous client][async_sample_pii_entities_batch] +- [Recognize Personally Identifiable Information in a batch of documents with asynchronous client(Convenience)][async_sample_pii_entities_batch_convenience] - [Recognize linked entities in a batch of documents][sample_linked_entities_batch] - [Recognize linked entities in a batch of documents(Convenience)][sample_linked_entities_batch_convenience] - [Recognize linked entities in a batch of documents with asynchronous client][async_sample_linked_entities_batch] @@ -57,7 +65,6 @@ Batch Samples: - [Analyze sentiment in a batch of documents(Convenience)][sample_sentiment_batch_convenience] - [Analyze sentiment in a batch of documents with asynchronous client][async_sample_sentiment_batch] - [Analyze sentiment in a batch of documents with asynchronous client(Convenience)][async_sample_sentiment_batch_convenience] - ## Troubleshooting Troubleshooting steps can be found [here][SDK_README_TROUBLESHOOTING]. @@ -82,6 +89,9 @@ This project welcomes contributions and suggestions. Find [more contributing][SD [async_sample_entities]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeEntitiesAsync.java [async_sample_entities_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeEntitiesBatchDocumentsAsync.java [async_sample_entities_batch_convenience]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeEntitiesBatchStringDocumentsAsync.java +[async_sample_pii_entities]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntitiesAsync.java +[async_sample_pii_entities_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java +[async_sample_pii_entities_batch_convenience]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeEntitiesBatchStringDocumentsAsync.java [async_sample_linked_entities]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntitiesAsync.java [async_sample_linked_entities_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocumentsAsync.java [async_sample_linked_entities_batch_convenience]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocumentsAsync.java @@ -92,6 +102,7 @@ This project welcomes contributions and suggestions. Find [more contributing][SD [async_sample_sentiment]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentAsync.java [async_sample_sentiment_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsAsync.java [async_sample_sentiment_batch_convenience]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringDocumentsAsync.java +[async_sample_sentiment_opinion_mining]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMiningAsync.java [sample_detect_language]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/DetectLanguage.java [sample_detect_language_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/DetectLanguageBatchDocuments.java @@ -99,6 +110,9 @@ This project welcomes contributions and suggestions. Find [more contributing][SD [sample_entities]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeEntities.java [sample_entities_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeEntitiesBatchDocuments.java [sample_entities_batch_convenience]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeEntitiesBatchStringDocuments.java +[sample_pii_entities]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntities.java +[sample_pii_entities_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java +[sample_pii_entities_batch_convenience]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java [sample_linked_entities]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntities.java [sample_linked_entities_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocuments.java [sample_linked_entities_batch_convenience]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocuments.java @@ -109,5 +123,6 @@ This project welcomes contributions and suggestions. Find [more contributing][SD [sample_sentiment]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentiment.java [sample_sentiment_batch]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocuments.java [sample_sentiment_batch_convenience]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringDocuments.java +[sample_sentiment_opinion_mining]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/AnalyzeSentimentWithOpinionMining.java ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Ftextanalytics%2Fazure-ai-textanalytics%2FREADME.png) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMining.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMining.java deleted file mode 100644 index 0c0f936ab4606..0000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMining.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.textanalytics.batch; - -import com.azure.ai.textanalytics.TextAnalyticsClient; -import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; -import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; -import com.azure.ai.textanalytics.models.AspectSentiment; -import com.azure.ai.textanalytics.models.DocumentSentiment; -import com.azure.ai.textanalytics.models.OpinionSentiment; -import com.azure.ai.textanalytics.models.SentimentConfidenceScores; -import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; -import com.azure.ai.textanalytics.models.TextDocumentInput; -import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; -import com.azure.core.credential.AzureKeyCredential; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * Sample demonstrates how to analyze the sentiments of {@link TextDocumentInput} documents with opinion mining. - */ -public class AnalyzeSentimentBatchDocumentsWithOpinionMining { - /** - * Main method to invoke this demo about how to analyze the sentiments of {@link TextDocumentInput} documents. - * - * @param args Unused arguments to the program. - */ - public static void main(String[] args) { - // Instantiate a client that will be used to call the service. - TextAnalyticsClient client = new TextAnalyticsClientBuilder() - .credential(new AzureKeyCredential("{key}")) - .endpoint("{endpoint}") - .buildClient(); - - // The texts that need be analyzed. - List documents = Arrays.asList( - new TextDocumentInput("A", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.").setLanguage("en"), - new TextDocumentInput("B", "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful.").setLanguage("en") - ); - - AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() - .setIncludeOpinionMining(true).setIncludeStatistics(true).setModelVersion("latest"); - - // Analyzing sentiment for each document in a batch of documents - Response sentimentBatchResultResponse = - client.analyzeSentimentBatchWithResponse(documents, options, Context.NONE); - - // Response's status code - System.out.printf("Status code of request response: %d%n", sentimentBatchResultResponse.getStatusCode()); - AnalyzeSentimentResultCollection sentimentBatchResultCollection = sentimentBatchResultResponse.getValue(); - - // Model version - System.out.printf("Results of Azure Text Analytics \"Sentiment Analysis\" Model, version: %s%n", sentimentBatchResultCollection.getModelVersion()); - - // Batch statistics - TextDocumentBatchStatistics batchStatistics = sentimentBatchResultCollection.getStatistics(); - System.out.printf("Documents statistics: document count = %s, erroneous document count = %s, transaction count = %s, valid document count = %s.%n", - batchStatistics.getDocumentCount(), batchStatistics.getInvalidDocumentCount(), batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); - - // Analyzed sentiment for each document in a batch of documents - AtomicInteger counter = new AtomicInteger(); - sentimentBatchResultCollection.forEach(analyzeSentimentResult -> { - System.out.printf("%n%s%n", documents.get(counter.getAndIncrement())); - if (analyzeSentimentResult.isError()) { - // Erroneous document - System.out.printf("Cannot analyze sentiment. Error: %s%n", analyzeSentimentResult.getError().getMessage()); - } else { - // Valid document - DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); - SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); - System.out.printf("Analyzed document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", - documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); - documentSentiment.getSentences().forEach(sentenceSentiment -> { - SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); - System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", - sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); - sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { - AspectSentiment aspectSentiment = minedOpinions.getAspect(); - System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), - aspectSentiment.getText()); - for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { - System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", - opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); - } - }); - }); - } - }); - } -} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync.java deleted file mode 100644 index 50b8acde5803b..0000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.textanalytics.batch; - -import com.azure.ai.textanalytics.TextAnalyticsAsyncClient; -import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; -import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; -import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; -import com.azure.ai.textanalytics.models.AspectSentiment; -import com.azure.ai.textanalytics.models.DocumentSentiment; -import com.azure.ai.textanalytics.models.OpinionSentiment; -import com.azure.ai.textanalytics.models.SentimentConfidenceScores; -import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; -import com.azure.ai.textanalytics.models.TextDocumentInput; -import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; -import com.azure.core.credential.AzureKeyCredential; - -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * Sample demonstrates how to asynchronously analyze the sentiments of {@link TextDocumentInput} documents with - * opinion mining. - */ -public class AnalyzeSentimentBatchDocumentsWithOpinionMiningAsync { - /** - * Main method to invoke this demo about how to analyze the sentiments of {@link TextDocumentInput} documents. - * - * @param args Unused arguments to the program. - */ - public static void main(String[] args) { - // Instantiate a client that will be used to call the service. - TextAnalyticsAsyncClient client = new TextAnalyticsClientBuilder() - .credential(new AzureKeyCredential("{key}")) - .endpoint("{endpoint}") - .buildAsyncClient(); - - // The texts that need be analyzed. - List documents = Arrays.asList( - new TextDocumentInput("A", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.").setLanguage("en"), - new TextDocumentInput("B", "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful.").setLanguage("en") - ); - - AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() - .setIncludeOpinionMining(true).setIncludeStatistics(true).setModelVersion("latest"); - - // Analyzing sentiment for each document in a batch of documents - client.analyzeSentimentBatchWithResponse(documents, options).subscribe( - sentimentBatchResultResponse -> { - // Response's status code - System.out.printf("Status code of request response: %d%n", sentimentBatchResultResponse.getStatusCode()); - AnalyzeSentimentResultCollection sentimentBatchResultCollection = sentimentBatchResultResponse.getValue(); - - System.out.printf("Results of Azure Text Analytics \"Sentiment Analysis\" Model, version: %s%n", sentimentBatchResultCollection.getModelVersion()); - - // Batch statistics - TextDocumentBatchStatistics batchStatistics = sentimentBatchResultCollection.getStatistics(); - System.out.printf("Documents statistics: document count = %s, erroneous document count = %s, transaction count = %s, valid document count = %s.%n", - batchStatistics.getDocumentCount(), batchStatistics.getInvalidDocumentCount(), batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); - - // Analyzed sentiment for each document in a batch of documents - AtomicInteger counter = new AtomicInteger(); - for (AnalyzeSentimentResult analyzeSentimentResult : sentimentBatchResultCollection) { - System.out.printf("%n%s%n", documents.get(counter.getAndIncrement())); - if (analyzeSentimentResult.isError()) { - // Erroneous document - System.out.printf("Cannot analyze sentiment. Error: %s%n", analyzeSentimentResult.getError().getMessage()); - } else { - // Valid document - DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); - SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); - System.out.printf("Analyzed document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", - documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); - documentSentiment.getSentences().forEach(sentenceSentiment -> { - SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); - System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", - sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); - sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { - AspectSentiment aspectSentiment = minedOpinions.getAspect(); - System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), - aspectSentiment.getText()); - for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { - System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", - opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); - } - }); - }); - } - } - }, - error -> System.err.println("There was an error analyzing sentiment of the documents." + error), - () -> System.out.println("Batch of sentiment analyzed.")); - - // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep - // the thread so the program does not end before the send operation is complete. Using .block() instead of - // .subscribe() will turn this into a synchronous call. - try { - TimeUnit.SECONDS.sleep(5); - } catch (InterruptedException ignored) { - } - } -} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMining.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMining.java deleted file mode 100644 index 0508152e9b307..0000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMining.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.textanalytics.batch; - -import com.azure.ai.textanalytics.TextAnalyticsClient; -import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; -import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; -import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; -import com.azure.ai.textanalytics.models.AspectSentiment; -import com.azure.ai.textanalytics.models.DocumentSentiment; -import com.azure.ai.textanalytics.models.OpinionSentiment; -import com.azure.ai.textanalytics.models.SentimentConfidenceScores; -import com.azure.ai.textanalytics.models.TextDocumentInput; -import com.azure.ai.textanalytics.util.AnalyzeSentimentResultCollection; -import com.azure.core.credential.AzureKeyCredential; - -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * Sample demonstrates how to analyze the sentiments of {@code String} documents with opinion mining. - */ -public class AnalyzeSentimentBatchStringWithOpinionMining { - /** - * Main method to invoke this demo about how to analyze the sentiments of {@link TextDocumentInput} documents. - * - * @param args Unused arguments to the program. - */ - public static void main(String[] args) { - // Instantiate a client that will be used to call the service. - TextAnalyticsClient client = new TextAnalyticsClientBuilder() - .credential(new AzureKeyCredential("{key}")) - .endpoint("{endpoint}") - .buildClient(); - - // The documents that need to be analyzed. - List documents = Arrays.asList( - "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", - "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful." - ); - - AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() - .setIncludeOpinionMining(true).setIncludeStatistics(true).setModelVersion("latest"); - - // Analyzing sentiment for each document in a batch of documents - AnalyzeSentimentResultCollection sentimentBatchResultCollection = client.analyzeSentimentBatch(documents, "en", options); - - // Model version - System.out.printf("Results of Azure Text Analytics \"Sentiment Analysis\" Model, version: %s%n", sentimentBatchResultCollection.getModelVersion()); - - // Analyzed sentiment for each document in a batch of documents - AtomicInteger counter = new AtomicInteger(); - for (AnalyzeSentimentResult analyzeSentimentResult : sentimentBatchResultCollection) { - System.out.printf("%nText = %s%n", documents.get(counter.getAndIncrement())); - DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); - - SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); - System.out.printf("Analyzed document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", - documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); - documentSentiment.getSentences().forEach(sentenceSentiment -> { - SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); - System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", - sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); - sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { - AspectSentiment aspectSentiment = minedOpinions.getAspect(); - System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), - aspectSentiment.getText()); - for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { - System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", - opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); - } - }); - }); - } - } -} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMiningAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMiningAsync.java deleted file mode 100644 index 43e28939f213a..0000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/AnalyzeSentimentBatchStringWithOpinionMiningAsync.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.textanalytics.batch; - -import com.azure.ai.textanalytics.TextAnalyticsAsyncClient; -import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; -import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; -import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; -import com.azure.ai.textanalytics.models.AspectSentiment; -import com.azure.ai.textanalytics.models.DocumentSentiment; -import com.azure.ai.textanalytics.models.OpinionSentiment; -import com.azure.ai.textanalytics.models.SentimentConfidenceScores; -import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; -import com.azure.core.credential.AzureKeyCredential; - -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * Sample demonstrates how to asynchronously analyze the sentiments of {@code String} documents with opinion mining. - */ -public class AnalyzeSentimentBatchStringWithOpinionMiningAsync { - - /** - * Main method to invoke this demo about how to analyze the sentiments of {@code String} documents. - * - * @param args Unused arguments to the program. - */ - public static void main(String[] args) { - // Instantiate a client that will be used to call the service. - TextAnalyticsAsyncClient client = new TextAnalyticsClientBuilder() - .credential(new AzureKeyCredential("{key}")) - .endpoint("{endpoint}") - .buildAsyncClient(); - - // The texts that need be analyzed. - List documents = Arrays.asList( - "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", - "Bad atmosphere. Not close to plenty of restaurants, hotels, and transit! Staff are not friendly and helpful." - ); - - AnalyzeSentimentOptions options = new AnalyzeSentimentOptions() - .setIncludeOpinionMining(true).setIncludeStatistics(true).setModelVersion("latest"); - - // Analyzing sentiment for each document in a batch of documents - client.analyzeSentimentBatch(documents, "en", options).subscribe( - sentimentBatchResultCollection -> { - System.out.printf("Results of Azure Text Analytics \"Sentiment Analysis\" Model, version: %s%n", sentimentBatchResultCollection.getModelVersion()); - - // Batch statistics - TextDocumentBatchStatistics batchStatistics = sentimentBatchResultCollection.getStatistics(); - System.out.printf("Documents statistics: document count = %s, erroneous document count = %s, transaction count = %s, valid document count = %s.%n", - batchStatistics.getDocumentCount(), batchStatistics.getInvalidDocumentCount(), batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); - - // Analyzed sentiment for each document in a batch of documents - AtomicInteger counter = new AtomicInteger(); - for (AnalyzeSentimentResult analyzeSentimentResult : sentimentBatchResultCollection) { - // Analyzed sentiment for each document - System.out.printf("%nText = %s%n", documents.get(counter.getAndIncrement())); - if (analyzeSentimentResult.isError()) { - // Erroneous document - System.out.printf("Cannot analyze sentiment. Error: %s%n", analyzeSentimentResult.getError().getMessage()); - } else { - // Valid document - DocumentSentiment documentSentiment = analyzeSentimentResult.getDocumentSentiment(); - SentimentConfidenceScores scores = documentSentiment.getConfidenceScores(); - System.out.printf("Analyzed document sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", - documentSentiment.getSentiment(), scores.getPositive(), scores.getNeutral(), scores.getNegative()); - documentSentiment.getSentences().forEach(sentenceSentiment -> { - SentimentConfidenceScores sentenceScores = sentenceSentiment.getConfidenceScores(); - System.out.printf("\tSentence sentiment: %s, positive score: %f, neutral score: %f, negative score: %f.%n", - sentenceSentiment.getSentiment(), sentenceScores.getPositive(), sentenceScores.getNeutral(), sentenceScores.getNegative()); - sentenceSentiment.getMinedOpinions().forEach(minedOpinions -> { - AspectSentiment aspectSentiment = minedOpinions.getAspect(); - System.out.printf("\t\tAspect sentiment: %s, aspect text: %s%n", aspectSentiment.getSentiment(), - aspectSentiment.getText()); - for (OpinionSentiment opinionSentiment : minedOpinions.getOpinions()) { - System.out.printf("\t\t\t'%s' opinion sentiment because of \"%s\". Is the opinion negated: %s.%n", - opinionSentiment.getSentiment(), opinionSentiment.getText(), opinionSentiment.isNegated()); - } - }); - }); - } - } - }, - error -> System.err.println("There was an error analyzing sentiment of the documents." + error), - () -> System.out.println("Batch of sentiment analyzed.")); - - // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep - // the thread so the program does not end before the send operation is complete. Using .block() instead of - // .subscribe() will turn this into a synchronous call. - try { - TimeUnit.SECONDS.sleep(5); - } catch (InterruptedException ignored) { - } - } -} From bf7b33c8336ee99b18646c111634c4f1e1af72a6 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Tue, 1 Sep 2020 13:58:27 -0700 Subject: [PATCH 040/168] Moved module specific exports, opens, and reads configuration from parent POM into specified module (#14663) --- .../azure-data-appconfiguration/pom.xml | 23 ++++++++ sdk/core/azure-core-amqp/pom.xml | 26 +++++++++ sdk/core/azure-core-test/pom.xml | 2 + sdk/core/azure-core/pom.xml | 19 +++--- sdk/cosmos/azure-cosmos/pom.xml | 29 ++++++++++ .../pom.xml | 24 ++++++++ .../azure-ai-formrecognizer/pom.xml | 23 ++++++++ .../pom.xml | 23 ++++++++ .../azure-security-keyvault-keys/pom.xml | 23 ++++++++ .../azure-security-keyvault-secrets/pom.xml | 22 +++++++ sdk/parents/azure-client-sdk-parent/pom.xml | 58 ------------------- .../azure-ai-textanalytics/pom.xml | 24 ++++++++ 12 files changed, 230 insertions(+), 66 deletions(-) diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 89a8c68af49dd..920a67449c151 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml @@ -94,4 +94,27 @@ test + + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.data.appconfiguration/com.azure.data.appconfiguration=ALL-UNNAMED + + + + + + + diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml index 420792cc4d748..4d760e6c9bfb7 100644 --- a/sdk/core/azure-core-amqp/pom.xml +++ b/sdk/core/azure-core-amqp/pom.xml @@ -135,4 +135,30 @@ + + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.core.amqp/com.azure.core.amqp.implementation=ALL-UNNAMED + --add-opens com.azure.core.amqp/com.azure.core.amqp.implementation.handler=ALL-UNNAMED + + --add-reads com.azure.core.amqp=ALL-UNNAMED + + + + + + + diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index 339fe7ad6ec90..fd299b6c6e882 100644 --- a/sdk/core/azure-core-test/pom.xml +++ b/sdk/core/azure-core-test/pom.xml @@ -134,6 +134,8 @@ --add-exports org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED --add-exports org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED + + --add-reads com.azure.core.test=ALL-UNNAMED diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index 554211b5ad027..991a3ad4ef0ef 100644 --- a/sdk/core/azure-core/pom.xml +++ b/sdk/core/azure-core/pom.xml @@ -200,22 +200,25 @@ 3.0.0-M3 - + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-exports com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED + --add-exports com.azure.core/com.azure.core.implementation.serializer.jackson=ALL-UNNAMED + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + --add-opens com.azure.core/com.azure.core=ALL-UNNAMED --add-opens com.azure.core/com.azure.core.http=ALL-UNNAMED --add-opens com.azure.core/com.azure.core.http.policy=ALL-UNNAMED --add-opens com.azure.core/com.azure.core.http.rest=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.models.spatial=ALL-UNNAMED + --add-opens com.azure.core/com.azure.core.implementation.entities=com.fasterxml.jackson.databind + --add-opens com.azure.core/com.azure.core.implementation.entities=ALL-UNNAMED + --add-opens com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-opens com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED + --add-opens com.azure.core/com.azure.core.util=ALL-UNNAMED --add-opens com.azure.core/com.azure.core.util.logging=ALL-UNNAMED --add-opens com.azure.core/com.azure.core.util.polling=ALL-UNNAMED --add-opens com.azure.core/com.azure.core.util.serializer=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.util=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED - - --add-opens com.azure.core/com.azure.core.implementation.entities=com.fasterxml.jackson.databind - --add-opens com.azure.core/com.azure.core.implementation.entities=ALL-UNNAMED + --add-reads com.azure.core=ALL-UNNAMED diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index ecb03d9a49c85..fe687bdef68f6 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -496,5 +496,34 @@ Licensed under the MIT License. + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.cosmos/com.azure.cosmos=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.implementation=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.implementation.caches=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.implementation.http=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.implementation.directconnectivity=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.implementation.query=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.implementation.routing=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.models=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.rx=ALL-UNNAMED + --add-opens com.azure.cosmos/com.azure.cosmos.rx.proxy=ALL-UNNAMED + + + + + + diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml index 8281fbf1ae9b2..7b74cef16d39f 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml @@ -87,4 +87,28 @@ + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.messaging.eventhubs.checkpointstore.blob/com.azure.messaging.eventhubs.checkpointstore.blob=ALL-UNNAMED + + --add-reads com.azure.messaging.eventhubs=ALL-UNNAMED + + + + + + + diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index e85d6bb528795..7b7606f816948 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml @@ -82,4 +82,27 @@ test + + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.ai.formrecognizer/com.azure.ai.formrecognizer=ALL-UNNAMED + + + + + + + diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml index 34848eb10e1d5..bd22338e69bfd 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml @@ -109,4 +109,27 @@ + + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.security.keyvault.certificates/com.azure.security.keyvault.certificates=ALL-UNNAMED + + + + + + + diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml index c345549cb4132..3642c28e3a845 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-keys/pom.xml @@ -116,4 +116,27 @@ + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys=ALL-UNNAMED + --add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys.cryptography=ALL-UNNAMED + + + + + + + diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml index a6bada75c9246..45d3a25edd785 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml @@ -117,4 +117,26 @@ + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.security.keyvault.secrets/com.azure.security.keyvault.secrets=ALL-UNNAMED + + + + + + + diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index d0ecd0a4674b9..59c1e7b7c24b4 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -1085,64 +1085,6 @@ maven-surefire-plugin 3.0.0-M3 - - - --add-exports com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED - --add-exports com.azure.core/com.azure.core.implementation.serializer.jackson=ALL-UNNAMED - --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED - --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED - - - --add-reads com.azure.core=ALL-UNNAMED - --add-reads com.azure.core.test=ALL-UNNAMED - --add-reads com.azure.core.amqp=ALL-UNNAMED - - - - --add-opens com.azure.core/com.azure.core=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.http.rest=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.util.logging=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.util.polling=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.util.serializer=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.http=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.http.policy=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.http.rest=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.util=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED - --add-opens com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED - --add-opens com.azure.ai.formrecognizer/com.azure.ai.formrecognizer=ALL-UNNAMED - --add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics=ALL-UNNAMED - --add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics.implementation.models=com.azure.core - --add-opens com.azure.data.appconfiguration/com.azure.data.appconfiguration=ALL-UNNAMED - --add-opens com.azure.security.keyvault.certificates/com.azure.security.keyvault.certificates=ALL-UNNAMED - --add-opens com.azure.security.keyvault.secrets/com.azure.security.keyvault.secrets=ALL-UNNAMED - --add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys.cryptography=ALL-UNNAMED - --add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys=ALL-UNNAMED - - - --add-opens com.azure.cosmos/com.azure.cosmos=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.implementation=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.implementation.caches=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.implementation.http=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.implementation.directconnectivity=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.implementation.query=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.implementation.routing=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.models=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.rx=ALL-UNNAMED - --add-opens com.azure.cosmos/com.azure.cosmos.rx.proxy=ALL-UNNAMED - - - --add-opens com.azure.core.amqp/com.azure.core.amqp.implementation=ALL-UNNAMED - --add-opens com.azure.core.amqp/com.azure.core.amqp.implementation.handler=ALL-UNNAMED - - - --add-opens com.azure.messaging.eventhubs.checkpointstore.blob/com.azure.messaging.eventhubs.checkpointstore.blob=ALL-UNNAMED - --add-reads com.azure.messaging.eventhubs=ALL-UNNAMED - - - --add-opens com.azure.core/com.azure.core.implementation.entities=com.fasterxml.jackson.databind - --add-opens com.azure.core/com.azure.core.implementation.entities=ALL-UNNAMED - ${project.build.directory}/jacoco.exec diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index 29bb4fcf531ef..cf23a900244c6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/pom.xml +++ b/sdk/textanalytics/azure-ai-textanalytics/pom.xml @@ -98,4 +98,28 @@ test + + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics=ALL-UNNAMED + --add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics.implementation.models=com.azure.core + + + + + + + From 49d7bb557cd0fbd0e31660cdb91558bdd0a11c83 Mon Sep 17 00:00:00 2001 From: bikamani <41314966+bikamani@users.noreply.github.com> Date: Tue, 1 Sep 2020 14:03:37 -0700 Subject: [PATCH 041/168] Add implementation of DT Apis (#14671) --- .../azure-digitaltwins-core/API design.md | 59 +---- .../core/DeleteDigitalTwinRequestOptions.java | 18 ++ .../core/DigitalTwinsAsyncClient.java | 204 +++++++++++++++++- .../digitaltwins/core/DigitalTwinsClient.java | 163 ++++++++++++++ .../core/UpdateDigitalTwinRequestOptions.java | 20 ++ 5 files changed, 406 insertions(+), 58 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/API design.md b/sdk/digitaltwins/azure-digitaltwins-core/API design.md index aa75a9e3450c2..3d065d4832b4e 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/API design.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/API design.md @@ -400,21 +400,9 @@ public Mono> deleteDigitalTwinWithResponse(String digitalTwinId, * * @param digitalTwinId The Id of the digital twin. * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin - * @return The updated application/json digital twin. */ @ServiceMethod(returns = ReturnType.SINGLE) -public Mono updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations) - - /** - * Updates a digital twin. - * - * @param digitalTwinId The Id of the digital twin. - * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin - * @param classType The model class to convert the response to. - * @return The updated application/json digital twin. - */ -@ServiceMethod(returns = ReturnType.SINGLE) -public Mono updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations, Class classType) +public Mono updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations) /** * Updates a digital twin. @@ -422,22 +410,11 @@ public Mono updateDigitalTwin(String digitalTwinId, List digitalT * @param digitalTwinId The Id of the digital twin. * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin * @param options The optional settings for this request - * @return A Http response containing updated application/json digital twin. + * @return A Http response */ @ServiceMethod(returns = ReturnType.SINGLE) -public Mono> updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, RequestOptions options) +public Mono> updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, RequestOptions options) - /** - * Updates a digital twin. - * - * @param digitalTwinId The Id of the digital twin. - * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin - * @param classType The model class to convert the response to. - * @param options The optional settings for this request - * @return A Http response containing updated application/json digital twin. - */ -@ServiceMethod(returns = ReturnType.SINGLE) -public Mono> updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, RequestOptions options, Class classType) ``` @@ -555,21 +532,9 @@ public Response deleteDigitalTwinWithResponse(String digitalTwinId, Reques * * @param digitalTwinId The Id of the digital twin. * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin - * @return The updated application/json digital twin. */ @ServiceMethod(returns = ReturnType.SINGLE) -public String updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations) - - /** - * Updates a digital twin. - * - * @param digitalTwinId The Id of the digital twin. - * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin - * @param classType The model class to convert the response to. - * @return The updated application/json digital twin. - */ -@ServiceMethod(returns = ReturnType.SINGLE) -public updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations, Class classType) +public void updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations) /** * Updates a digital twin. @@ -578,23 +543,11 @@ public updateDigitalTwin(String digitalTwinId, List digitalTwinUpdat * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin * @param options The optional settings for this request * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A Http response containing updated application/json digital twin. + * @return A Http response */ @ServiceMethod(returns = ReturnType.SINGLE) -public Response updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, RequestOptions options, Context context) +public Response updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, RequestOptions options, Context context) -/** - * Updates a digital twin. - * - * @param digitalTwinId The Id of the digital twin. - * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin - * @param options The optional settings for this request - * @param classType The model class to convert the response to. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A Http response containing updated application/json digital twin. - */ -@ServiceMethod(returns = ReturnType.SINGLE) -public Response updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, RequestOptions options, Class classType, Context context) ``` diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java new file mode 100644 index 0000000000000..5ded3a86fc101 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + +/** + * Optional settings that are specific to calls to {@link DigitalTwinsClient#deleteDigitalTwin(String)} and its overloads. + */ +public class DeleteDigitalTwinRequestOptions extends RequestOptions { + // This class exists to be added to later if the deleteDigitalTwin APIs get a new optional parameter in later service + // API versions and so that we don't have to expose that new optional parameter for other APIs using RequestOptions + + @Override + public DeleteDigitalTwinRequestOptions setIfMatch(String ifMatch) { + super.setIfMatch(ifMatch); + return this; + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 159c7b2cee56f..8266fdaca32c1 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -91,8 +91,27 @@ public HttpPipeline getHttpPipeline() { return this.protocolLayer.getHttpPipeline(); } - // TODO: This is a temporary implementation for sample purposes. This should be spruced up/replaced once this API is actually designed. - // Input is String and output is Response. + /** + * Creates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwin The application/json digital twin to create. + * @return The application/json string representing the digital twin created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createDigitalTwin(String digitalTwinId, String digitalTwin) + { + return createDigitalTwinWithResponse(digitalTwinId, digitalTwin) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Creates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwin The application/json digital twin to create. + * @return A {@link DigitalTwinsResponse} containing the application/json string representing the digital twin created. + */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createDigitalTwinWithResponse(String digitalTwinId, String digitalTwin) { return withContext(context -> createDigitalTwinWithResponse(digitalTwinId, digitalTwin, context)); @@ -108,14 +127,37 @@ Mono> createDigitalTwinWithResponse(String digitalT DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), jsonResponse, twinHeaders)); } catch (JsonProcessingException e) { - logger.error("JsonProcessingException occurred while creating a digital twin: ", e); + logger.error("JsonProcessingException occurred while serializing json object into string ", e); return Mono.error(e); } }); } - // TODO: This is a temporary implementation for sample purposes. This should be spruced up/replaced once this API is actually designed. - // Input is Object and output is Response. + /** + * Creates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwin The application/json digital twin to create. + * @param clazz The model class to deserialize the response with. + * @param The generic type to deserialize the digital twin with. + * @return The deserialized application/json object representing the digital twin created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createDigitalTwin(String digitalTwinId, Object digitalTwin, Class clazz) + { + return createDigitalTwinWithResponse(digitalTwinId, digitalTwin, clazz) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Creates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwin The application/json digital twin to create. + * @param clazz The model class to deserialize the response with. + * @param The generic type to deserialize the digital twin with. + * @return A {@link DigitalTwinsResponse} containing the deserialized application/json object representing the digital twin created. + */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createDigitalTwinWithResponse(String digitalTwinId, Object digitalTwin, Class clazz) { return withContext(context -> createDigitalTwinWithResponse(digitalTwinId, digitalTwin, clazz, context)); @@ -132,6 +174,158 @@ Mono> createDigitalTwinWithResponse(String digitalTw }); } + /** + * Gets a digital twin. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @return The application/json string representing the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getDigitalTwin(String digitalTwinId) + { + return getDigitalTwinWithResponse(digitalTwinId) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Gets a digital twin. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @return A {@link DigitalTwinsResponse} containing the application/json string representing the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDigitalTwinWithResponse(String digitalTwinId) + { + return withContext(context -> getDigitalTwinWithResponse(digitalTwinId, context)); + } + + Mono> getDigitalTwinWithResponse(String digitalTwinId, Context context) { + return protocolLayer + .getDigitalTwins() + .getByIdWithResponseAsync(digitalTwinId, context) + .flatMap(response -> { + try { + String jsonResponse = mapper.writeValueAsString(response.getValue()); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return Mono.justOrEmpty(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), jsonResponse, twinHeaders)); + } catch (JsonProcessingException e) { + logger.error("JsonProcessingException occurred while serializing json object into string: ", e); + return Mono.error(e); + } + }); + } + + /** + * Gets a digital twin. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @param clazz The model class to deserialize the response with. + * @param The generic type to deserialize the digital twin with. + * @return The deserialized application/json object representing the digital twin + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getDigitalTwin(String digitalTwinId, Class clazz) + { + return getDigitalTwinWithResponse(digitalTwinId, clazz) + .map(DigitalTwinsResponse::getValue); + } + + /** + * Gets a digital twin. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @param clazz The model class to deserialize the response with. + * @param The generic type to deserialize the digital twin with. + * @return A {@link DigitalTwinsResponse} containing the deserialized application/json object representing the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDigitalTwinWithResponse(String digitalTwinId, Class clazz) + { + return withContext(context -> getDigitalTwinWithResponse(digitalTwinId, clazz, context)); + } + + Mono> getDigitalTwinWithResponse(String digitalTwinId, Class clazz, Context context) { + return protocolLayer + .getDigitalTwins() + .getByIdWithResponseAsync(digitalTwinId, context) + .map(response -> { + T genericResponse = mapper.convertValue(response.getValue(), clazz); + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), genericResponse, twinHeaders); + }); + } + + /** + * Updates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin + * @return An empty Mono + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations) + { + return updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, new UpdateDigitalTwinRequestOptions()) + .flatMap(voidResponse -> Mono.empty()); + } + + /** + * Updates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin + * @param options The optional settings for this request + * @return A {@link DigitalTwinsResponse} + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, UpdateDigitalTwinRequestOptions options) + { + return withContext(context -> updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, options, context)); + } + + Mono> updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, UpdateDigitalTwinRequestOptions options, Context context) { + String ifMatch = options != null ? options.getIfMatch() : null; + return protocolLayer + .getDigitalTwins() + .updateWithResponseAsync(digitalTwinId, digitalTwinUpdateOperations, ifMatch, context) + .map(response -> { + DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class); + return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), response.getValue(), twinHeaders); + }); + } + + /** + * Deletes a digital twin. All relationships referencing the digital twin must already be deleted. + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @return An empty Mono + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteDigitalTwin(String digitalTwinId) + { + return deleteDigitalTwinWithResponse(digitalTwinId, new DeleteDigitalTwinRequestOptions()) + .flatMap(voidResponse -> Mono.empty()); + } + + /** + * Deletes a digital twin. All relationships referencing the digital twin must already be deleted. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @param options The optional settings for this request + * @return The Http response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDigitalTwinWithResponse(String digitalTwinId, DeleteDigitalTwinRequestOptions options) + { + return withContext(context -> deleteDigitalTwinWithResponse(digitalTwinId, options, context)); + } + + Mono> deleteDigitalTwinWithResponse(String digitalTwinId, DeleteDigitalTwinRequestOptions options, Context context) { + String ifMatch = options != null ? options.getIfMatch() : null; + return protocolLayer + .getDigitalTwins() + .deleteWithResponseAsync(digitalTwinId, ifMatch, context); + } + /** * Creates a relationship on a digital twin. * diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 67b6031fe492e..a8e404eb9d04b 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -59,6 +59,169 @@ public DigitalTwinsServiceVersion getServiceVersion() { return this.digitalTwinsAsyncClient.getServiceVersion(); } + /** + * Creates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwin The application/json digital twin to create. + * @return The application/json string representing the digital twin created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String createDigitalTwin(String digitalTwinId, String digitalTwin) + { + return createDigitalTwinWithResponse(digitalTwinId, digitalTwin, Context.NONE).getValue(); + } + + /** + * Creates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwin The application/json digital twin to create. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link DigitalTwinsResponse} containing the application/json string representing the digital twin created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createDigitalTwinWithResponse(String digitalTwinId, String digitalTwin, Context context) + { + return digitalTwinsAsyncClient.createDigitalTwinWithResponse(digitalTwinId, digitalTwin, context).block(); + } + + /** + * Creates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param clazz The model class to deserialize the response with. + * @param The generic type to deserialize the digital twin with. + * @param digitalTwin The application/json digital twin to create. + * @return The deserialized application/json object representing the digital twin created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public T createDigitalTwin(String digitalTwinId, Object digitalTwin, Class clazz) + { + return createDigitalTwinWithResponse(digitalTwinId, digitalTwin, clazz, Context.NONE).getValue(); + } + + /** + * Creates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwin The application/json digital twin to create. + * @param clazz The model class to deserialize the response with. + * @param The generic type to deserialize the digital twin with. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link DigitalTwinsResponse} containing the deserialized application/json object representing the digital twin created. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createDigitalTwinWithResponse(String digitalTwinId, Object digitalTwin, Class clazz, Context context) + { + return digitalTwinsAsyncClient.createDigitalTwinWithResponse(digitalTwinId, digitalTwin, clazz, context).block(); + } + + /** + * Gets a digital twin. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @return The application/json string representing the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String getDigitalTwin(String digitalTwinId) + { + return getDigitalTwinWithResponse(digitalTwinId, Context.NONE).getValue(); + } + + /** + * Gets a digital twin. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link DigitalTwinsResponse} containing the application/json string representing the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse getDigitalTwinWithResponse(String digitalTwinId, Context context) + { + return digitalTwinsAsyncClient.getDigitalTwinWithResponse(digitalTwinId, context).block(); + } + + /** + * Gets a digital twin. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @param clazz The model class to deserialize the response with. + * @param The generic type to deserialize the digital twin with. + * @return The deserialized application/json object representing the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public T getDigitalTwin(String digitalTwinId, Class clazz) + { + return getDigitalTwinWithResponse(digitalTwinId, clazz, Context.NONE).getValue(); + } + + /** + * Gets a digital twin. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @param clazz The model class to deserialize the response with. + * @param The generic type to deserialize the digital twin with. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link DigitalTwinsResponse} containing the deserialized application/json object representing the digital twin. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse getDigitalTwinWithResponse(String digitalTwinId, Class clazz, Context context) + { + return digitalTwinsAsyncClient.getDigitalTwinWithResponse(digitalTwinId, clazz, context).block(); + } + + /** + * Updates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations) + { + updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, new UpdateDigitalTwinRequestOptions(), Context.NONE); + } + + /** + * Updates a digital twin. + * + * @param digitalTwinId The Id of the digital twin. + * @param digitalTwinUpdateOperations The application/json-patch+json operations to be performed on the specified digital twin + * @param options The optional settings for this request + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link DigitalTwinsResponse} + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DigitalTwinsResponse updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, UpdateDigitalTwinRequestOptions options, Context context) + { + return digitalTwinsAsyncClient.updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, options, context).block(); + } + + /** + * Deletes a digital twin. All relationships referencing the digital twin must already be deleted. + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteDigitalTwin(String digitalTwinId) + { + deleteDigitalTwinWithResponse(digitalTwinId, new DeleteDigitalTwinRequestOptions(), Context.NONE); + } + + /** + * Deletes a digital twin. All relationships referencing the digital twin must already be deleted. + * + * @param digitalTwinId The Id of the digital twin. The Id is unique within the service and case sensitive. + * @param options The optional settings for this request + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The Http response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDigitalTwinWithResponse(String digitalTwinId, DeleteDigitalTwinRequestOptions options, Context context) + { + return digitalTwinsAsyncClient.deleteDigitalTwinWithResponse(digitalTwinId, options, context).block(); + } + /** * Creates a relationship on a digital twin. * diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java new file mode 100644 index 0000000000000..7c5f07eb1ead8 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + +import java.util.List; + +/** + * Optional settings that are specific to calls to {@link DigitalTwinsClient#updateDigitalTwin(String, List)} and its overloads. + */ +public class UpdateDigitalTwinRequestOptions extends RequestOptions { + // This class exists to be added to later if the updateDigitalTwin APIs get a new optional parameter in later service + // API versions and so that we don't have to expose that new optional parameter for other APIs using RequestOptions + + @Override + public UpdateDigitalTwinRequestOptions setIfMatch(String ifMatch) { + super.setIfMatch(ifMatch); + return this; + } +} From 7b311541dbcb5bad527795f8e6a4d55135880289 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Tue, 1 Sep 2020 14:12:55 -0700 Subject: [PATCH 042/168] [TA] upgrade to 3.1-Preview.2 and fixes the tests (#14680) upgrade to 3.1-Preview.2 and fixes the tests --- .../azure-ai-textanalytics/CHANGELOG.md | 2 +- .../AnalyzeSentimentAsyncClient.java | 2 + .../RecognizeEntityAsyncClient.java | 2 + .../RecognizeLinkedEntityAsyncClient.java | 2 + .../RecognizePiiEntityAsyncClient.java | 16 +- .../TextAnalyticsServiceVersion.java | 4 +- .../TextAnalyticsClientImpl.java | 95 ++++++++---- .../textanalytics/implementation/Utility.java | 10 +- .../models/AspectRelationType.java | 43 ++++-- .../implementation/models/ErrorCodeValue.java | 51 +++--- .../implementation/models/ErrorResponse.java | 38 +++++ ...ption.java => ErrorResponseException.java} | 16 +- .../models/InnerErrorCodeValue.java | 71 ++++----- .../implementation/models/LinkedEntity.java | 29 ++++ .../models/PiiDocumentEntities.java | 146 ++++++++++++++++++ .../models/PiiEntitiesResult.java | 120 ++++++++++++++ .../implementation/models/SentenceAspect.java | 6 +- .../models/SentenceOpinion.java | 6 +- .../models/StringIndexType.java | 37 +++++ .../models/TokenSentimentValue.java | 50 ++++++ .../models/WarningCodeValue.java | 43 ++---- .../models/TextAnalyticsErrorCode.java | 52 +++---- .../TextAnalyticsAsyncClientTest.java | 115 ++++++-------- .../TextAnalyticsClientTest.java | 131 +++++++--------- .../TextAnalyticsClientTestBase.java | 8 +- ...analyzeSentimentBatchTooManyDocuments.json | 10 +- .../analyzeSentimentDuplicateIdInput.json | 10 +- .../analyzeSentimentEmptyIdInput.json | 10 +- ...ShowStatisticsButIncludeOpinionMining.json | 10 +- ...eSentimentForBatchInputShowStatistics.json | 10 +- ...ShowStatisticsAndIncludeOpinionMining.json | 10 +- ...putShowStatisticsExcludeOpinionMining.json | 10 +- ...hInputWithNullAnalyzeSentimentOptions.json | 10 +- ...ntForBatchInputWithNullRequestOptions.json | 10 +- .../analyzeSentimentForBatchStringInput.json | 10 +- .../analyzeSentimentForEmptyText.json | 10 +- .../analyzeSentimentForFaultyText.json | 10 +- ...ShowStatisticsButIncludeOpinionMining.json | 10 +- ...ShowStatisticsAndIncludeOpinionMining.json | 10 +- ...ingShowStatisticsExcludeOpinionMining.json | 10 +- ...entimentForListStringWithLanguageHint.json | 10 +- .../analyzeSentimentForTextInput.json | 10 +- ...ntForTextInputWithDefaultLanguageHint.json | 10 +- ...entimentForTextInputWithOpinionMining.json | 10 +- .../clientBuilderWithDefaultCountryHint.json | 14 +- ...thDefaultCountryHintForBatchOperation.json | 14 +- .../clientBuilderWithDefaultLanguage.json | 14 +- ...rWithDefaultLanguageForBatchOperation.json | 14 +- .../clientBuilderWithDefaultPipeline.json | 14 +- ...entBuilderWithInvalidApiKeyCredential.json | 8 +- .../clientBuilderWithNewCountryHint.json | 12 +- ...erWithNewCountryHintForBatchOperation.json | 12 +- .../clientBuilderWithNewLanguage.json | 14 +- ...ilderWithNewLanguageForBatchOperation.json | 14 +- .../clientBuilderWithNullServiceVersion.json | 14 +- .../clientBuilderWithRotateToInvalidKey.json | 8 +- .../clientBuilderWithRotateToValidKey.json | 12 +- ...lientBuilderWithValidApiKeyCredential.json | 12 +- .../detectLanguageDuplicateIdInput.json | 12 +- .../detectLanguageEmptyCountryHint.json | 12 +- .../detectLanguageEmptyIdInput.json | 10 +- .../detectLanguageEmptyText.json | 14 +- .../detectLanguageFaultyText.json | 14 +- .../detectLanguageInvalidCountryHint.json | 14 +- .../detectLanguageNoneCountryHint.json | 14 +- .../detectLanguagesBatchInput.json | 14 +- ...tectLanguagesBatchInputShowStatistics.json | 14 +- .../detectLanguagesBatchListCountryHint.json | 14 +- ...guagesBatchListCountryHintWithOptions.json | 14 +- .../detectLanguagesBatchStringInput.json | 12 +- .../detectSingleTextLanguage.json | 12 +- ...xtractKeyPhrasesBatchTooManyDocuments.json | 8 +- .../extractKeyPhrasesBatchWarning.json | 14 +- .../extractKeyPhrasesDuplicateIdInput.json | 12 +- .../extractKeyPhrasesEmptyIdInput.json | 10 +- .../extractKeyPhrasesForBatchInput.json | 14 +- ...KeyPhrasesForBatchInputShowStatistics.json | 14 +- .../extractKeyPhrasesForBatchStringInput.json | 14 +- .../extractKeyPhrasesForEmptyText.json | 15 +- .../extractKeyPhrasesForFaultyText.json | 14 +- .../extractKeyPhrasesForListLanguageHint.json | 14 +- ...actKeyPhrasesForListStringWithOptions.json | 14 +- .../extractKeyPhrasesForTextInput.json | 14 +- .../extractKeyPhrasesWarning.json | 14 +- ...ecognizeEntitiesBatchInputSingleError.json | 12 +- ...ecognizeEntitiesBatchTooManyDocuments.json | 10 +- .../recognizeEntitiesDuplicateIdInput.json | 12 +- .../recognizeEntitiesEmptyIdInput.json | 10 +- .../recognizeEntitiesForBatchInput.json | 12 +- ...zeEntitiesForBatchInputShowStatistics.json | 12 +- .../recognizeEntitiesForBatchStringInput.json | 12 +- .../recognizeEntitiesForEmptyText.json | 12 +- .../recognizeEntitiesForFaultyText.json | 10 +- .../recognizeEntitiesForListLanguageHint.json | 12 +- .../recognizeEntitiesForListWithOptions.json | 12 +- .../recognizeEntitiesForTextInput.json | 12 +- ...zeLinkedEntitiesBatchTooManyDocuments.json | 10 +- ...cognizeLinkedEntitiesDuplicateIdInput.json | 12 +- .../recognizeLinkedEntitiesEmptyIdInput.json | 10 +- .../recognizeLinkedEntitiesForBatchInput.json | 12 +- ...edEntitiesForBatchInputShowStatistics.json | 14 +- ...nizeLinkedEntitiesForBatchStringInput.json | 12 +- .../recognizeLinkedEntitiesForEmptyText.json | 12 +- .../recognizeLinkedEntitiesForFaultyText.json | 12 +- ...nizeLinkedEntitiesForListLanguageHint.json | 14 +- ...inkedEntitiesForListStringWithOptions.json | 14 +- .../recognizeLinkedEntitiesForTextInput.json | 14 +- ...gnizePiiEntitiesBatchInputSingleError.json | 14 +- ...gnizePiiEntitiesBatchTooManyDocuments.json | 10 +- .../recognizePiiEntitiesDuplicateIdInput.json | 12 +- .../recognizePiiEntitiesEmptyIdInput.json | 10 +- .../recognizePiiEntitiesForBatchInput.json | 12 +- ...iiEntitiesForBatchInputShowStatistics.json | 12 +- .../recognizePiiEntitiesForEmptyText.json | 8 +- .../recognizePiiEntitiesForFaultyText.json | 14 +- ...cognizePiiEntitiesForListLanguageHint.json | 12 +- ...zePiiEntitiesForListStringWithOptions.json | 12 +- .../recognizePiiEntitiesForTextInput.json | 14 +- .../azure-ai-textanalytics/swagger/README.md | 2 +- 119 files changed, 1304 insertions(+), 904 deletions(-) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponse.java rename sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/{TextAnalyticsErrorException.java => ErrorResponseException.java} (57%) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiDocumentEntities.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiEntitiesResult.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/StringIndexType.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TokenSentimentValue.java diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index c083a82b5be12..c99b0c5bddbe4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -5,7 +5,7 @@ - `offset` is the offset of the text from the start of the document **New features** -- Updated Text Analytics SDK's default service API version to `v3.1-preview.1` from `v3.0`. +- Updated Text Analytics SDK's default service API version to `v3.1-preview.2` from `v3.0`. - Added support for Personally Identifiable Information(PII) entity recognition feature. To use this feature, you need to make sure you are using the service's v3.1-preview.1 API. - Added support for the Opinion Mining feature. To use this feature, you need to make sure you are using the diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java index 7423d2d107e4f..f99459ee1a6df 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java @@ -205,11 +205,13 @@ private AnalyzeSentimentResult convertToAnalyzeSentimentResult(DocumentSentiment */ private Mono> getAnalyzedSentimentResponse( Iterable documents, AnalyzeSentimentOptions options, Context context) { + // TODO: add StringIndexType implementation https://github.com/Azure/azure-sdk-for-java/issues/12173 return service.sentimentWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), options == null ? null : options.isIncludeOpinionMining(), + null, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Analyzed sentiment for a batch of documents - {}", response)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java index da59324136f59..adf4f241bdcc2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java @@ -184,10 +184,12 @@ private Response toRecognizeEntitiesResultCol */ private Mono> getRecognizedEntitiesResponse( Iterable documents, TextAnalyticsRequestOptions options, Context context) { + // TODO: add string index type implementation PR return service.entitiesRecognitionGeneralWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), + null, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Recognized entities for a batch of documents- {}", diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java index d0b2e6b176c27..34a186c21bb79 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java @@ -198,10 +198,12 @@ private IterableStream mapLinkedEntity( private Mono> getRecognizedLinkedEntitiesResponse(Iterable documents, TextAnalyticsRequestOptions options, Context context) { + // TODO: add string index type implementation PR return service.entitiesLinkingWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), + null, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Recognized linked entities for a batch of documents - {}", diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java index 07e3ff2e82992..59b8fd14caecd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java @@ -7,6 +7,7 @@ import com.azure.ai.textanalytics.implementation.models.DocumentError; import com.azure.ai.textanalytics.implementation.models.EntitiesResult; import com.azure.ai.textanalytics.implementation.models.MultiLanguageBatchInput; +import com.azure.ai.textanalytics.implementation.models.PiiEntitiesResult; import com.azure.ai.textanalytics.implementation.models.WarningCodeValue; import com.azure.ai.textanalytics.models.EntityCategory; import com.azure.ai.textanalytics.models.PiiEntity; @@ -136,11 +137,11 @@ Mono> recognizePiiEntitiesBatchWi * @return A {@link Response} that contains {@link RecognizePiiEntitiesResultCollection}. */ private Response toRecognizePiiEntitiesResultCollectionResponse( - final Response response) { - final EntitiesResult entitiesResult = response.getValue(); + final Response response) { + final PiiEntitiesResult piiEntitiesResult = response.getValue(); // List of documents results final List recognizeEntitiesResults = new ArrayList<>(); - entitiesResult.getDocuments().forEach(documentEntities -> { + piiEntitiesResult.getDocuments().forEach(documentEntities -> { // Pii entities list final List piiEntities = documentEntities.getEntities().stream().map(entity -> new PiiEntity(entity.getText(), EntityCategory.fromString(entity.getCategory()), @@ -164,14 +165,15 @@ private Response toRecognizePiiEntitiesRes )); }); // Document errors - for (DocumentError documentError : entitiesResult.getErrors()) { + for (DocumentError documentError : piiEntitiesResult.getErrors()) { recognizeEntitiesResults.add(new RecognizePiiEntitiesResult(documentError.getId(), null, toTextAnalyticsError(documentError.getError()), null)); } return new SimpleResponse<>(response, - new RecognizePiiEntitiesResultCollection(recognizeEntitiesResults, entitiesResult.getModelVersion(), - entitiesResult.getStatistics() == null ? null : toBatchStatistics(entitiesResult.getStatistics()))); + new RecognizePiiEntitiesResultCollection(recognizeEntitiesResults, piiEntitiesResult.getModelVersion(), + piiEntitiesResult.getStatistics() == null ? null : toBatchStatistics(piiEntitiesResult.getStatistics()) + )); } /** @@ -186,11 +188,13 @@ private Response toRecognizePiiEntitiesRes */ private Mono> getRecognizePiiEntitiesResponse( Iterable documents, TextAnalyticsRequestOptions options, Context context) { + // TODO: add string index type implementation PR return service.entitiesRecognitionPiiWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), null, + null, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info( "Start recognizing Personally Identifiable Information entities for a batch of documents.")) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java index b8367546eb42a..d71d1b2bdf3d1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java @@ -10,7 +10,7 @@ */ public enum TextAnalyticsServiceVersion implements ServiceVersion { V3_0("v3.0"), - V3_1_PREVIEW_1("v3.1-preview.1"); + V3_1_PREVIEW_2("v3.1-preview.2"); private final String version; @@ -32,7 +32,7 @@ public String getVersion() { * @return the latest {@link TextAnalyticsServiceVersion} */ public static TextAnalyticsServiceVersion getLatest() { - return V3_1_PREVIEW_1; + return V3_1_PREVIEW_2; } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java index f285b7398e18d..358912b3727d0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java @@ -6,12 +6,14 @@ import com.azure.ai.textanalytics.implementation.models.EntitiesResult; import com.azure.ai.textanalytics.implementation.models.EntityLinkingResult; +import com.azure.ai.textanalytics.implementation.models.ErrorResponseException; import com.azure.ai.textanalytics.implementation.models.KeyPhraseResult; import com.azure.ai.textanalytics.implementation.models.LanguageBatchInput; import com.azure.ai.textanalytics.implementation.models.LanguageResult; import com.azure.ai.textanalytics.implementation.models.MultiLanguageBatchInput; +import com.azure.ai.textanalytics.implementation.models.PiiEntitiesResult; import com.azure.ai.textanalytics.implementation.models.SentimentResponse; -import com.azure.ai.textanalytics.implementation.models.TextAnalyticsErrorException; +import com.azure.ai.textanalytics.implementation.models.StringIndexType; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Host; @@ -89,43 +91,46 @@ public HttpPipeline getHttpPipeline() { * The interface defining all the services for TextAnalyticsClient to be used by the proxy service to perform REST * calls. */ - @Host("{Endpoint}/text/analytics/v3.1-preview.1") + @Host("{Endpoint}/text/analytics/v3.1-preview.2") @ServiceInterface(name = "TextAnalyticsClient") private interface TextAnalyticsClientService { @Post("/entities/recognition/general") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) + @UnexpectedResponseExceptionType(ErrorResponseException.class) Mono> entitiesRecognitionGeneral( @HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, + @QueryParam("stringIndexType") StringIndexType stringIndexType, @BodyParam("application/json") MultiLanguageBatchInput input, Context context); @Post("/entities/recognition/pii") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) - Mono> entitiesRecognitionPii( + @UnexpectedResponseExceptionType(ErrorResponseException.class) + Mono> entitiesRecognitionPii( @HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @QueryParam("domain") String domain, + @QueryParam("stringIndexType") StringIndexType stringIndexType, @BodyParam("application/json") MultiLanguageBatchInput input, Context context); @Post("/entities/linking") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) + @UnexpectedResponseExceptionType(ErrorResponseException.class) Mono> entitiesLinking( @HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, + @QueryParam("stringIndexType") StringIndexType stringIndexType, @BodyParam("application/json") MultiLanguageBatchInput input, Context context); @Post("/keyPhrases") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) + @UnexpectedResponseExceptionType(ErrorResponseException.class) Mono> keyPhrases( @HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @@ -135,7 +140,7 @@ Mono> keyPhrases( @Post("/languages") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) + @UnexpectedResponseExceptionType(ErrorResponseException.class) Mono> languages( @HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @@ -145,12 +150,13 @@ Mono> languages( @Post("/sentiment") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) + @UnexpectedResponseExceptionType(ErrorResponseException.class) Mono> sentiment( @HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @QueryParam("opinionMining") Boolean opinionMining, + @QueryParam("stringIndexType") StringIndexType stringIndexType, @BodyParam("application/json") MultiLanguageBatchInput input, Context context); } @@ -164,17 +170,25 @@ Mono> sentiment( * @param input Contains a set of input documents to be analyzed by the service. * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is * not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. + * @param showStats (Optional) if set to true, response will contain request and document level statistics. + * @param stringIndexType (Optional) Specifies the method used to interpret string offsets. Defaults to Text + * Elements (Graphemes) according to Unicode v8.0.0. For additional information see + * https://aka.ms/text-analytics-offsets. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException thrown if the request is rejected by server. + * @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 the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> entitiesRecognitionGeneralWithResponseAsync( - MultiLanguageBatchInput input, String modelVersion, Boolean showStats, Context context) { - return service.entitiesRecognitionGeneral(this.getEndpoint(), modelVersion, showStats, input, context); + MultiLanguageBatchInput input, + String modelVersion, + Boolean showStats, + StringIndexType stringIndexType, + Context context) { + return service.entitiesRecognitionGeneral( + this.getEndpoint(), modelVersion, showStats, stringIndexType, input, context); } /** @@ -186,18 +200,27 @@ public Mono> entitiesRecognitionGeneralWithResponseAsyn * @param input Contains a set of input documents to be analyzed by the service. * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is * not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. + * @param showStats (Optional) if set to true, response will contain request and document level statistics. * @param domain (Optional) if set to 'PHI', response will contain only PHI entities. + * @param stringIndexType (Optional) Specifies the method used to interpret string offsets. Defaults to Text + * Elements (Graphemes) according to Unicode v8.0.0. For additional information see + * https://aka.ms/text-analytics-offsets. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException thrown if the request is rejected by server. + * @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 the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> entitiesRecognitionPiiWithResponseAsync( - MultiLanguageBatchInput input, String modelVersion, Boolean showStats, String domain, Context context) { - return service.entitiesRecognitionPii(this.getEndpoint(), modelVersion, showStats, domain, input, context); + public Mono> entitiesRecognitionPiiWithResponseAsync( + MultiLanguageBatchInput input, + String modelVersion, + Boolean showStats, + String domain, + StringIndexType stringIndexType, + Context context) { + return service.entitiesRecognitionPii( + this.getEndpoint(), modelVersion, showStats, domain, stringIndexType, input, context); } /** @@ -208,17 +231,24 @@ public Mono> entitiesRecognitionPiiWithResponseAsync( * @param input Contains a set of input documents to be analyzed by the service. * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is * not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. + * @param showStats (Optional) if set to true, response will contain request and document level statistics. + * @param stringIndexType (Optional) Specifies the method used to interpret string offsets. Defaults to Text + * Elements (Graphemes) according to Unicode v8.0.0. For additional information see + * https://aka.ms/text-analytics-offsets. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException thrown if the request is rejected by server. + * @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 the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> entitiesLinkingWithResponseAsync( - MultiLanguageBatchInput input, String modelVersion, Boolean showStats, Context context) { - return service.entitiesLinking(this.getEndpoint(), modelVersion, showStats, input, context); + MultiLanguageBatchInput input, + String modelVersion, + Boolean showStats, + StringIndexType stringIndexType, + Context context) { + return service.entitiesLinking(this.getEndpoint(), modelVersion, showStats, stringIndexType, input, context); } /** @@ -229,10 +259,10 @@ public Mono> entitiesLinkingWithResponseAsync( * @param input Contains a set of input documents to be analyzed by the service. * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is * not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. + * @param showStats (Optional) if set to true, response will contain request and document level statistics. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException thrown if the request is rejected by server. + * @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 the response. */ @@ -247,13 +277,13 @@ public Mono> keyPhrasesWithResponseAsync( * certainty that the identified language is true. See the <a href="https://aka.ms/talangs">Supported * languages in Text Analytics API</a> for the list of enabled languages. * - * @param input Collection of documents to analyze. + * @param input Collection of documents to analyze for language endpoint. * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is * not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. + * @param showStats (Optional) if set to true, response will contain request and document level statistics. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException thrown if the request is rejected by server. + * @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 the response. */ @@ -270,12 +300,15 @@ public Mono> languagesWithResponseAsync( * @param input Contains a set of input documents to be analyzed by the service. * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is * not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. + * @param showStats (Optional) if set to true, response will contain request and document level statistics. * @param opinionMining (Optional) if set to true, response will contain input and document level statistics * including aspect-based sentiment analysis results. + * @param stringIndexType (Optional) Specifies the method used to interpret string offsets. Defaults to Text + * Elements (Graphemes) according to Unicode v8.0.0. For additional information see + * https://aka.ms/text-analytics-offsets. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException thrown if the request is rejected by server. + * @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 the response. */ @@ -285,7 +318,9 @@ public Mono> sentimentWithResponseAsync( String modelVersion, Boolean showStats, Boolean opinionMining, + StringIndexType stringIndexType, Context context) { - return service.sentiment(this.getEndpoint(), modelVersion, showStats, opinionMining, input, context); + return service.sentiment( + this.getEndpoint(), modelVersion, showStats, opinionMining, stringIndexType, input, context); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java index 76a31499534d9..c6f4a9c25c356 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java @@ -5,13 +5,13 @@ import com.azure.ai.textanalytics.implementation.models.DocumentStatistics; import com.azure.ai.textanalytics.implementation.models.ErrorCodeValue; +import com.azure.ai.textanalytics.implementation.models.ErrorResponseException; import com.azure.ai.textanalytics.implementation.models.InnerError; import com.azure.ai.textanalytics.implementation.models.InnerErrorCodeValue; import com.azure.ai.textanalytics.implementation.models.LanguageInput; import com.azure.ai.textanalytics.implementation.models.MultiLanguageInput; import com.azure.ai.textanalytics.implementation.models.RequestStatistics; import com.azure.ai.textanalytics.implementation.models.TextAnalyticsError; -import com.azure.ai.textanalytics.implementation.models.TextAnalyticsErrorException; import com.azure.ai.textanalytics.models.DetectLanguageInput; import com.azure.ai.textanalytics.models.TextAnalyticsErrorCode; import com.azure.ai.textanalytics.models.TextAnalyticsException; @@ -103,17 +103,17 @@ public Mono getBodyAsString(Charset charset) { } /** - * Mapping a {@link TextAnalyticsErrorException} to {@link HttpResponseException} if exist. Otherwise, return + * Mapping a {@link ErrorResponseException} to {@link HttpResponseException} if exist. Otherwise, return * original {@link Throwable}. * * @param throwable A {@link Throwable}. * @return A {@link HttpResponseException} or the original throwable type. */ public static Throwable mapToHttpResponseExceptionIfExist(Throwable throwable) { - if (throwable instanceof TextAnalyticsErrorException) { - TextAnalyticsErrorException errorException = (TextAnalyticsErrorException) throwable; + if (throwable instanceof ErrorResponseException) { + ErrorResponseException errorException = (ErrorResponseException) throwable; return new HttpResponseException(errorException.getMessage(), errorException.getResponse(), - toTextAnalyticsError(errorException.getValue())); + toTextAnalyticsError(errorException.getValue().getError())); } return throwable; } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java index 77fd22fbbc108..c50d3d7043713 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java @@ -4,31 +4,44 @@ package com.azure.ai.textanalytics.implementation.models; -import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonValue; /** Defines values for AspectRelationType. */ -public final class AspectRelationType extends ExpandableStringEnum { - /** Static value opinion for AspectRelationType. */ - public static final AspectRelationType OPINION = fromString("opinion"); +public enum AspectRelationType { + /** Enum value opinion. */ + OPINION("opinion"), - /** Static value aspect for AspectRelationType. */ - public static final AspectRelationType ASPECT = fromString("aspect"); + /** Enum value aspect. */ + ASPECT("aspect"); + + /** The actual serialized value for a AspectRelationType instance. */ + private final String value; + + AspectRelationType(String value) { + this.value = value; + } /** - * Creates or finds a AspectRelationType from its string representation. + * Parses a serialized value to a AspectRelationType instance. * - * @param name a name to look for. - * @return the corresponding AspectRelationType. + * @param value the serialized value to parse. + * @return the parsed AspectRelationType object, or null if unable to parse. */ @JsonCreator - public static AspectRelationType fromString(String name) { - return fromString(name, AspectRelationType.class); + public static AspectRelationType fromString(String value) { + AspectRelationType[] items = AspectRelationType.values(); + for (AspectRelationType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } - /** @return known AspectRelationType values. */ - public static Collection values() { - return values(AspectRelationType.class); + @JsonValue + @Override + public String toString() { + return this.value; } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java index fd24a2ff645e2..a6dca165182da 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java @@ -4,50 +4,37 @@ package com.azure.ai.textanalytics.implementation.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Defines values for ErrorCodeValue. */ -public enum ErrorCodeValue { - /** Enum value invalidRequest. */ - INVALID_REQUEST("invalidRequest"), +public final class ErrorCodeValue extends ExpandableStringEnum { + /** Static value InvalidRequest for ErrorCodeValue. */ + public static final ErrorCodeValue INVALID_REQUEST = fromString("InvalidRequest"); - /** Enum value invalidArgument. */ - INVALID_ARGUMENT("invalidArgument"), + /** Static value InvalidArgument for ErrorCodeValue. */ + public static final ErrorCodeValue INVALID_ARGUMENT = fromString("InvalidArgument"); - /** Enum value internalServerError. */ - INTERNAL_SERVER_ERROR("internalServerError"), + /** Static value InternalServerError for ErrorCodeValue. */ + public static final ErrorCodeValue INTERNAL_SERVER_ERROR = fromString("InternalServerError"); - /** Enum value serviceUnavailable. */ - SERVICE_UNAVAILABLE("serviceUnavailable"); - - /** The actual serialized value for a ErrorCodeValue instance. */ - private final String value; - - ErrorCodeValue(String value) { - this.value = value; - } + /** Static value ServiceUnavailable for ErrorCodeValue. */ + public static final ErrorCodeValue SERVICE_UNAVAILABLE = fromString("ServiceUnavailable"); /** - * Parses a serialized value to a ErrorCodeValue instance. + * Creates or finds a ErrorCodeValue from its string representation. * - * @param value the serialized value to parse. - * @return the parsed ErrorCodeValue object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding ErrorCodeValue. */ @JsonCreator - public static ErrorCodeValue fromString(String value) { - ErrorCodeValue[] items = ErrorCodeValue.values(); - for (ErrorCodeValue item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static ErrorCodeValue fromString(String name) { + return fromString(name, ErrorCodeValue.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** @return known ErrorCodeValue values. */ + public static Collection values() { + return values(ErrorCodeValue.class); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponse.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponse.java new file mode 100644 index 0000000000000..2689490a7c97b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ErrorResponse model. */ +@Fluent +public final class ErrorResponse { + /* + * Document Error. + */ + @JsonProperty(value = "error", required = true) + private TextAnalyticsError error; + + /** + * Get the error property: Document Error. + * + * @return the error value. + */ + public TextAnalyticsError getError() { + return this.error; + } + + /** + * Set the error property: Document Error. + * + * @param error the error value to set. + * @return the ErrorResponse object itself. + */ + public ErrorResponse setError(TextAnalyticsError error) { + this.error = error; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsErrorException.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponseException.java similarity index 57% rename from sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsErrorException.java rename to sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponseException.java index f98cb2de2d13d..4d335f2abf876 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsErrorException.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponseException.java @@ -7,31 +7,31 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpResponse; -/** Exception thrown for an invalid response with TextAnalyticsError information. */ -public final class TextAnalyticsErrorException extends HttpResponseException { +/** Exception thrown for an invalid response with ErrorResponse information. */ +public final class ErrorResponseException extends HttpResponseException { /** - * Initializes a new instance of the TextAnalyticsErrorException class. + * Initializes a new instance of the ErrorResponseException class. * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ - public TextAnalyticsErrorException(String message, HttpResponse response) { + public ErrorResponseException(String message, HttpResponse response) { super(message, response); } /** - * Initializes a new instance of the TextAnalyticsErrorException class. + * Initializes a new instance of the ErrorResponseException class. * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. */ - public TextAnalyticsErrorException(String message, HttpResponse response, TextAnalyticsError value) { + public ErrorResponseException(String message, HttpResponse response, ErrorResponse value) { super(message, response, value); } @Override - public TextAnalyticsError getValue() { - return (TextAnalyticsError) super.getValue(); + public ErrorResponse getValue() { + return (ErrorResponse) super.getValue(); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java index 4f1ac83a949c0..8231b7dbd6ec5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java @@ -4,65 +4,52 @@ package com.azure.ai.textanalytics.implementation.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Defines values for InnerErrorCodeValue. */ -public enum InnerErrorCodeValue { - /** Enum value invalidParameterValue. */ - INVALID_PARAMETER_VALUE("invalidParameterValue"), +public final class InnerErrorCodeValue extends ExpandableStringEnum { + /** Static value InvalidParameterValue for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue INVALID_PARAMETER_VALUE = fromString("InvalidParameterValue"); - /** Enum value invalidRequestBodyFormat. */ - INVALID_REQUEST_BODY_FORMAT("invalidRequestBodyFormat"), + /** Static value InvalidRequestBodyFormat for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue INVALID_REQUEST_BODY_FORMAT = fromString("InvalidRequestBodyFormat"); - /** Enum value emptyRequest. */ - EMPTY_REQUEST("emptyRequest"), + /** Static value EmptyRequest for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue EMPTY_REQUEST = fromString("EmptyRequest"); - /** Enum value missingInputRecords. */ - MISSING_INPUT_RECORDS("missingInputRecords"), + /** Static value MissingInputRecords for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue MISSING_INPUT_RECORDS = fromString("MissingInputRecords"); - /** Enum value invalidDocument. */ - INVALID_DOCUMENT("invalidDocument"), + /** Static value InvalidDocument for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue INVALID_DOCUMENT = fromString("InvalidDocument"); - /** Enum value modelVersionIncorrect. */ - MODEL_VERSION_INCORRECT("modelVersionIncorrect"), + /** Static value ModelVersionIncorrect for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue MODEL_VERSION_INCORRECT = fromString("ModelVersionIncorrect"); - /** Enum value invalidDocumentBatch. */ - INVALID_DOCUMENT_BATCH("invalidDocumentBatch"), + /** Static value InvalidDocumentBatch for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue INVALID_DOCUMENT_BATCH = fromString("InvalidDocumentBatch"); - /** Enum value unsupportedLanguageCode. */ - UNSUPPORTED_LANGUAGE_CODE("unsupportedLanguageCode"), + /** Static value UnsupportedLanguageCode for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue UNSUPPORTED_LANGUAGE_CODE = fromString("UnsupportedLanguageCode"); - /** Enum value invalidCountryHint. */ - INVALID_COUNTRY_HINT("invalidCountryHint"); - - /** The actual serialized value for a InnerErrorCodeValue instance. */ - private final String value; - - InnerErrorCodeValue(String value) { - this.value = value; - } + /** Static value InvalidCountryHint for InnerErrorCodeValue. */ + public static final InnerErrorCodeValue INVALID_COUNTRY_HINT = fromString("InvalidCountryHint"); /** - * Parses a serialized value to a InnerErrorCodeValue instance. + * Creates or finds a InnerErrorCodeValue from its string representation. * - * @param value the serialized value to parse. - * @return the parsed InnerErrorCodeValue object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding InnerErrorCodeValue. */ @JsonCreator - public static InnerErrorCodeValue fromString(String value) { - InnerErrorCodeValue[] items = InnerErrorCodeValue.values(); - for (InnerErrorCodeValue item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static InnerErrorCodeValue fromString(String name) { + return fromString(name, InnerErrorCodeValue.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** @return known InnerErrorCodeValue values. */ + public static Collection values() { + return values(InnerErrorCodeValue.class); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java index 3be72691aa8eb..002c5a673e461 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java @@ -47,6 +47,13 @@ public final class LinkedEntity { @JsonProperty(value = "dataSource", required = true) private String dataSource; + /* + * Bing unique identifier of the recognized entity. Use in conjunction with + * the Bing Entity Search API to fetch additional relevant information. + */ + @JsonProperty(value = "bingId") + private String bingId; + /** * Get the name property: Entity Linking formal name. * @@ -166,4 +173,26 @@ public LinkedEntity setDataSource(String dataSource) { this.dataSource = dataSource; return this; } + + /** + * Get the bingId property: Bing unique identifier of the recognized entity. Use in conjunction with the Bing Entity + * Search API to fetch additional relevant information. + * + * @return the bingId value. + */ + public String getBingId() { + return this.bingId; + } + + /** + * Set the bingId property: Bing unique identifier of the recognized entity. Use in conjunction with the Bing Entity + * Search API to fetch additional relevant information. + * + * @param bingId the bingId value to set. + * @return the LinkedEntity object itself. + */ + public LinkedEntity setBingId(String bingId) { + this.bingId = bingId; + return this; + } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiDocumentEntities.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiDocumentEntities.java new file mode 100644 index 0000000000000..60cc03b4e9422 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiDocumentEntities.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The PiiDocumentEntities model. */ +@Fluent +public final class PiiDocumentEntities { + /* + * Unique, non-empty document identifier. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * Recognized entities in the document. + */ + @JsonProperty(value = "entities", required = true) + private List entities; + + /* + * Warnings encountered while processing document. + */ + @JsonProperty(value = "warnings", required = true) + private List warnings; + + /* + * if showStats=true was specified in the request this field will contain + * information about the document payload. + */ + @JsonProperty(value = "statistics") + private DocumentStatistics statistics; + + /* + * Returns redacted text. + */ + @JsonProperty(value = "redactedText") + private String redactedText; + + /** + * Get the id property: Unique, non-empty document identifier. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique, non-empty document identifier. + * + * @param id the id value to set. + * @return the PiiDocumentEntities object itself. + */ + public PiiDocumentEntities setId(String id) { + this.id = id; + return this; + } + + /** + * Get the entities property: Recognized entities in the document. + * + * @return the entities value. + */ + public List getEntities() { + return this.entities; + } + + /** + * Set the entities property: Recognized entities in the document. + * + * @param entities the entities value to set. + * @return the PiiDocumentEntities object itself. + */ + public PiiDocumentEntities setEntities(List entities) { + this.entities = entities; + return this; + } + + /** + * Get the warnings property: Warnings encountered while processing document. + * + * @return the warnings value. + */ + public List getWarnings() { + return this.warnings; + } + + /** + * Set the warnings property: Warnings encountered while processing document. + * + * @param warnings the warnings value to set. + * @return the PiiDocumentEntities object itself. + */ + public PiiDocumentEntities setWarnings(List warnings) { + this.warnings = warnings; + return this; + } + + /** + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * + * @return the statistics value. + */ + public DocumentStatistics getStatistics() { + return this.statistics; + } + + /** + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * + * @param statistics the statistics value to set. + * @return the PiiDocumentEntities object itself. + */ + public PiiDocumentEntities setStatistics(DocumentStatistics statistics) { + this.statistics = statistics; + return this; + } + + /** + * Get the redactedText property: Returns redacted text. + * + * @return the redactedText value. + */ + public String getRedactedText() { + return this.redactedText; + } + + /** + * Set the redactedText property: Returns redacted text. + * + * @param redactedText the redactedText value to set. + * @return the PiiDocumentEntities object itself. + */ + public PiiDocumentEntities setRedactedText(String redactedText) { + this.redactedText = redactedText; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiEntitiesResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiEntitiesResult.java new file mode 100644 index 0000000000000..fade6eb5c72e2 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiEntitiesResult.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The PiiEntitiesResult model. */ +@Fluent +public final class PiiEntitiesResult { + /* + * Response by document + */ + @JsonProperty(value = "documents", required = true) + private List documents; + + /* + * Errors by document id. + */ + @JsonProperty(value = "errors", required = true) + private List errors; + + /* + * if showStats=true was specified in the request this field will contain + * information about the request payload. + */ + @JsonProperty(value = "statistics") + private RequestStatistics statistics; + + /* + * This field indicates which model is used for scoring. + */ + @JsonProperty(value = "modelVersion", required = true) + private String modelVersion; + + /** + * Get the documents property: Response by document. + * + * @return the documents value. + */ + public List getDocuments() { + return this.documents; + } + + /** + * Set the documents property: Response by document. + * + * @param documents the documents value to set. + * @return the PiiEntitiesResult object itself. + */ + public PiiEntitiesResult setDocuments(List documents) { + this.documents = documents; + return this; + } + + /** + * Get the errors property: Errors by document id. + * + * @return the errors value. + */ + public List getErrors() { + return this.errors; + } + + /** + * Set the errors property: Errors by document id. + * + * @param errors the errors value to set. + * @return the PiiEntitiesResult object itself. + */ + public PiiEntitiesResult setErrors(List errors) { + this.errors = errors; + return this; + } + + /** + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * + * @return the statistics value. + */ + public RequestStatistics getStatistics() { + return this.statistics; + } + + /** + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * + * @param statistics the statistics value to set. + * @return the PiiEntitiesResult object itself. + */ + public PiiEntitiesResult setStatistics(RequestStatistics statistics) { + this.statistics = statistics; + return this; + } + + /** + * Get the modelVersion property: This field indicates which model is used for scoring. + * + * @return the modelVersion value. + */ + public String getModelVersion() { + return this.modelVersion; + } + + /** + * Set the modelVersion property: This field indicates which model is used for scoring. + * + * @param modelVersion the modelVersion value to set. + * @return the PiiEntitiesResult object itself. + */ + public PiiEntitiesResult setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java index 37a7b5ff14495..d7489460660a8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java @@ -15,7 +15,7 @@ public final class SentenceAspect { * Aspect level sentiment for the aspect in the sentence. */ @JsonProperty(value = "sentiment", required = true) - private SentenceAspectSentiment sentiment; + private TokenSentimentValue sentiment; /* * Aspect level sentiment confidence scores for the aspect in the sentence. @@ -53,7 +53,7 @@ public final class SentenceAspect { * * @return the sentiment value. */ - public SentenceAspectSentiment getSentiment() { + public TokenSentimentValue getSentiment() { return this.sentiment; } @@ -63,7 +63,7 @@ public SentenceAspectSentiment getSentiment() { * @param sentiment the sentiment value to set. * @return the SentenceAspect object itself. */ - public SentenceAspect setSentiment(SentenceAspectSentiment sentiment) { + public SentenceAspect setSentiment(TokenSentimentValue sentiment) { this.sentiment = sentiment; return this; } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java index bce2356d9fc78..d54d20f27272d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java @@ -14,7 +14,7 @@ public final class SentenceOpinion { * Opinion level sentiment for the aspect in the sentence. */ @JsonProperty(value = "sentiment", required = true) - private SentenceOpinionSentiment sentiment; + private TokenSentimentValue sentiment; /* * Opinion level sentiment confidence scores for the aspect in the @@ -52,7 +52,7 @@ public final class SentenceOpinion { * * @return the sentiment value. */ - public SentenceOpinionSentiment getSentiment() { + public TokenSentimentValue getSentiment() { return this.sentiment; } @@ -62,7 +62,7 @@ public SentenceOpinionSentiment getSentiment() { * @param sentiment the sentiment value to set. * @return the SentenceOpinion object itself. */ - public SentenceOpinion setSentiment(SentenceOpinionSentiment sentiment) { + public SentenceOpinion setSentiment(TokenSentimentValue sentiment) { this.sentiment = sentiment; return this; } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/StringIndexType.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/StringIndexType.java new file mode 100644 index 0000000000000..208af0412a484 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/StringIndexType.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.ai.textanalytics.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for StringIndexType. */ +public final class StringIndexType extends ExpandableStringEnum { + /** Static value TextElements_v8 for StringIndexType. */ + public static final StringIndexType TEXT_ELEMENTS_V8 = fromString("TextElements_v8"); + + /** Static value UnicodeCodePoint for StringIndexType. */ + public static final StringIndexType UNICODE_CODE_POINT = fromString("UnicodeCodePoint"); + + /** Static value Utf16CodeUnit for StringIndexType. */ + public static final StringIndexType UTF16CODE_UNIT = fromString("Utf16CodeUnit"); + + /** + * Creates or finds a StringIndexType from its string representation. + * + * @param name a name to look for. + * @return the corresponding StringIndexType. + */ + @JsonCreator + public static StringIndexType fromString(String name) { + return fromString(name, StringIndexType.class); + } + + /** @return known StringIndexType values. */ + public static Collection values() { + return values(StringIndexType.class); + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TokenSentimentValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TokenSentimentValue.java new file mode 100644 index 0000000000000..553364d3720c5 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TokenSentimentValue.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for TokenSentimentValue. */ +public enum TokenSentimentValue { + /** Enum value positive. */ + POSITIVE("positive"), + + /** Enum value mixed. */ + MIXED("mixed"), + + /** Enum value negative. */ + NEGATIVE("negative"); + + /** The actual serialized value for a TokenSentimentValue instance. */ + private final String value; + + TokenSentimentValue(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TokenSentimentValue instance. + * + * @param value the serialized value to parse. + * @return the parsed TokenSentimentValue object, or null if unable to parse. + */ + @JsonCreator + public static TokenSentimentValue fromString(String value) { + TokenSentimentValue[] items = TokenSentimentValue.values(); + for (TokenSentimentValue item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/WarningCodeValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/WarningCodeValue.java index 5aadf16b51b9c..d196cf67b357c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/WarningCodeValue.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/WarningCodeValue.java @@ -4,44 +4,31 @@ package com.azure.ai.textanalytics.implementation.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Defines values for WarningCodeValue. */ -public enum WarningCodeValue { - /** Enum value LongWordsInDocument. */ - LONG_WORDS_IN_DOCUMENT("LongWordsInDocument"), +public final class WarningCodeValue extends ExpandableStringEnum { + /** Static value LongWordsInDocument for WarningCodeValue. */ + public static final WarningCodeValue LONG_WORDS_IN_DOCUMENT = fromString("LongWordsInDocument"); - /** Enum value DocumentTruncated. */ - DOCUMENT_TRUNCATED("DocumentTruncated"); - - /** The actual serialized value for a WarningCodeValue instance. */ - private final String value; - - WarningCodeValue(String value) { - this.value = value; - } + /** Static value DocumentTruncated for WarningCodeValue. */ + public static final WarningCodeValue DOCUMENT_TRUNCATED = fromString("DocumentTruncated"); /** - * Parses a serialized value to a WarningCodeValue instance. + * Creates or finds a WarningCodeValue from its string representation. * - * @param value the serialized value to parse. - * @return the parsed WarningCodeValue object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding WarningCodeValue. */ @JsonCreator - public static WarningCodeValue fromString(String value) { - WarningCodeValue[] items = WarningCodeValue.values(); - for (WarningCodeValue item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static WarningCodeValue fromString(String name) { + return fromString(name, WarningCodeValue.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** @return known WarningCodeValue values. */ + public static Collection values() { + return values(WarningCodeValue.class); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/TextAnalyticsErrorCode.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/TextAnalyticsErrorCode.java index 3fcc2276b383e..6d158379d4f2e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/TextAnalyticsErrorCode.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/TextAnalyticsErrorCode.java @@ -17,69 +17,69 @@ public final class TextAnalyticsErrorCode extends ExpandableStringEnum validateDetectLanguageResultCollectionWithResponse(true, getExpectedBatchDetectedLanguages(), - 200, response) - ) + 200, response)) .verifyComplete()); } @@ -158,7 +160,7 @@ public void detectLanguageInvalidCountryHint(HttpClient httpClient, TextAnalytic detectLanguageInvalidCountryHintRunner((input, countryHint) -> StepVerifier.create(client.detectLanguage(input, countryHint)) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_COUNTRY_HINT_EXPECTED_EXCEPTION_MESSAGE)) + && INVALID_COUNTRY_HINT.equals(((TextAnalyticsException) throwable).getErrorCode())) .verify()); } @@ -172,7 +174,7 @@ public void detectLanguageEmptyText(HttpClient httpClient, TextAnalyticsServiceV emptyTextRunner(input -> StepVerifier.create(client.detectLanguage(input)) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + && INVALID_DOCUMENT.equals(((TextAnalyticsException) throwable).getErrorCode())) .verify()); } @@ -211,12 +213,10 @@ public void detectLanguageEmptyIdInput(HttpClient httpClient, TextAnalyticsServi detectLanguageInputEmptyIdRunner(inputs -> StepVerifier.create(client.detectLanguageBatchWithResponse(inputs, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); })); } @@ -265,7 +265,7 @@ public void recognizeEntitiesForEmptyText(HttpClient httpClient, TextAnalyticsSe emptyTextRunner(input -> StepVerifier.create(client.recognizeEntities(input)) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + && INVALID_DOCUMENT.equals(((TextAnalyticsException) throwable).getErrorCode())) .verify() ); } @@ -297,12 +297,10 @@ public void recognizeEntitiesEmptyIdInput(HttpClient httpClient, TextAnalyticsSe textAnalyticsInputEmptyIdRunner(inputs -> StepVerifier.create(client.recognizeEntitiesBatchWithResponse(inputs, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); })); } @@ -375,12 +373,10 @@ public void recognizeEntitiesBatchTooManyDocuments(HttpClient httpClient, TextAn tooManyDocumentsRunner(inputs -> StepVerifier.create(client.recognizeEntitiesBatch(inputs, null, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); })); } @@ -402,7 +398,7 @@ public void recognizePiiEntitiesForEmptyText(HttpClient httpClient, TextAnalytic client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); emptyTextRunner(document -> StepVerifier.create(client.recognizePiiEntities(document)) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE.equals(throwable.getMessage())) + && INVALID_DOCUMENT.equals(((TextAnalyticsException) throwable).getErrorCode())) .verify()); } @@ -432,12 +428,10 @@ public void recognizePiiEntitiesEmptyIdInput(HttpClient httpClient, TextAnalytic textAnalyticsInputEmptyIdRunner(inputs -> StepVerifier.create(client.recognizePiiEntitiesBatchWithResponse(inputs, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); })); } @@ -500,12 +494,10 @@ public void recognizePiiEntitiesBatchTooManyDocuments(HttpClient httpClient, Tex tooManyDocumentsRunner(inputs -> StepVerifier.create(client.recognizePiiEntitiesBatch(inputs, null, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); })); } @@ -527,7 +519,7 @@ public void recognizeLinkedEntitiesForEmptyText(HttpClient httpClient, TextAnaly emptyTextRunner(input -> StepVerifier.create(client.recognizeLinkedEntities(input)) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + && INVALID_DOCUMENT.equals(((TextAnalyticsException) throwable).getErrorCode())) .verify()); } @@ -557,12 +549,10 @@ public void recognizeLinkedEntitiesEmptyIdInput(HttpClient httpClient, TextAnaly textAnalyticsInputEmptyIdRunner(inputs -> StepVerifier.create(client.recognizeLinkedEntitiesBatchWithResponse(inputs, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); })); } @@ -623,12 +613,10 @@ public void recognizeLinkedEntitiesBatchTooManyDocuments(HttpClient httpClient, tooManyDocumentsRunner(inputs -> StepVerifier.create(client.recognizeLinkedEntitiesBatch(inputs, null, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); })); } @@ -650,7 +638,7 @@ public void extractKeyPhrasesForEmptyText(HttpClient httpClient, TextAnalyticsSe emptyTextRunner(input -> StepVerifier.create(client.extractKeyPhrases(input)) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + && INVALID_DOCUMENT.equals(((TextAnalyticsException) throwable).getErrorCode())) .verify()); } @@ -680,12 +668,10 @@ public void extractKeyPhrasesEmptyIdInput(HttpClient httpClient, TextAnalyticsSe textAnalyticsInputEmptyIdRunner(inputs -> StepVerifier.create(client.extractKeyPhrasesBatchWithResponse(inputs, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); })); } @@ -779,12 +765,10 @@ public void extractKeyPhrasesBatchTooManyDocuments(HttpClient httpClient, TextAn tooManyDocumentsRunner(inputs -> StepVerifier.create(client.extractKeyPhrasesBatch(inputs, null, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); })); } @@ -838,11 +822,12 @@ public void analyzeSentimentForTextInputWithOpinionMining(HttpClient httpClient, @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); - emptyTextRunner(input -> - StepVerifier.create(client.analyzeSentiment(input)) + emptyTextRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE.equals(throwable.getMessage())) - .verify()); + && INVALID_DOCUMENT.equals(((TextAnalyticsException) throwable).getErrorCode())) + .verify() + ); } /** @@ -888,12 +873,10 @@ public void analyzeSentimentEmptyIdInput(HttpClient httpClient, TextAnalyticsSer textAnalyticsInputEmptyIdRunner(inputs -> StepVerifier.create(client.analyzeSentimentBatchWithResponse(inputs, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); })); } @@ -1100,12 +1083,10 @@ public void analyzeSentimentBatchTooManyDocuments(HttpClient httpClient, TextAna tooManyDocumentsRunner(inputs -> StepVerifier.create(client.analyzeSentimentBatch(inputs, null, null)) .verifyErrorSatisfies(ex -> { - HttpResponseException httpResponseException = (HttpResponseException) ex; + final HttpResponseException httpResponseException = (HttpResponseException) ex; assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); })); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java index edad61d208b73..8d717cfc04417 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java @@ -43,6 +43,9 @@ import static com.azure.ai.textanalytics.TestUtils.getLinkedEntitiesList1; import static com.azure.ai.textanalytics.TestUtils.getPiiEntitiesList1; import static com.azure.ai.textanalytics.TestUtils.getUnknownDetectedLanguage; +import static com.azure.ai.textanalytics.models.TextAnalyticsErrorCode.INVALID_COUNTRY_HINT; +import static com.azure.ai.textanalytics.models.TextAnalyticsErrorCode.INVALID_DOCUMENT; +import static com.azure.ai.textanalytics.models.TextAnalyticsErrorCode.INVALID_DOCUMENT_BATCH; import static com.azure.ai.textanalytics.models.WarningCode.LONG_WORDS_IN_DOCUMENT; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -135,8 +138,9 @@ public void detectSingleTextLanguage(HttpClient httpClient, TextAnalyticsService public void detectLanguageEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); emptyTextRunner(input -> { - Exception exception = assertThrows(TextAnalyticsException.class, () -> client.detectLanguage(input)); - assertTrue(exception.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + final TextAnalyticsException exception = assertThrows(TextAnalyticsException.class, + () -> client.detectLanguage(input)); + assertEquals(INVALID_DOCUMENT, exception.getErrorCode()); }); } @@ -158,7 +162,7 @@ public void detectLanguageFaultyText(HttpClient httpClient, TextAnalyticsService public void detectLanguageDuplicateIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); detectLanguageDuplicateIdRunner((inputs, options) -> { - HttpResponseException response = assertThrows(HttpResponseException.class, + final HttpResponseException response = assertThrows(HttpResponseException.class, () -> client.detectLanguageBatchWithResponse(inputs, options, Context.NONE)); assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, response.getResponse().getStatusCode()); }); @@ -172,13 +176,11 @@ public void detectLanguageDuplicateIdInput(HttpClient httpClient, TextAnalyticsS public void detectLanguageEmptyIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); detectLanguageInputEmptyIdRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.detectLanguageBatchWithResponse(inputs, null, Context.NONE)); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); }); } @@ -190,9 +192,9 @@ public void detectLanguageEmptyIdInput(HttpClient httpClient, TextAnalyticsServi public void detectLanguageInvalidCountryHint(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); detectLanguageInvalidCountryHintRunner((input, countryHint) -> { - Exception exception = assertThrows(TextAnalyticsException.class, + final TextAnalyticsException exception = assertThrows(TextAnalyticsException.class, () -> client.detectLanguage(input, countryHint)); - assertTrue(exception.getMessage().equals(INVALID_COUNTRY_HINT_EXPECTED_EXCEPTION_MESSAGE)); + assertEquals(INVALID_COUNTRY_HINT, exception.getErrorCode()); }); } @@ -235,9 +237,9 @@ public void recognizeEntitiesForTextInput(HttpClient httpClient, TextAnalyticsSe public void recognizeEntitiesForEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); emptyTextRunner(input -> { - Exception exception = assertThrows(TextAnalyticsException.class, + final TextAnalyticsException exception = assertThrows(TextAnalyticsException.class, () -> client.recognizeEntities(input).iterator().hasNext()); - assertTrue(exception.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + assertEquals(INVALID_DOCUMENT, exception.getErrorCode()); }); } @@ -253,7 +255,7 @@ public void recognizeEntitiesForFaultyText(HttpClient httpClient, TextAnalyticsS public void recognizeEntitiesDuplicateIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); recognizeCategorizedEntityDuplicateIdRunner(inputs -> { - HttpResponseException response = assertThrows(HttpResponseException.class, + final HttpResponseException response = assertThrows(HttpResponseException.class, () -> client.recognizeEntitiesBatchWithResponse(inputs, null, Context.NONE)); assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, response.getResponse().getStatusCode()); }); @@ -264,13 +266,11 @@ public void recognizeEntitiesDuplicateIdInput(HttpClient httpClient, TextAnalyti public void recognizeEntitiesEmptyIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); textAnalyticsInputEmptyIdRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.recognizeEntitiesBatchWithResponse(inputs, null, Context.NONE)); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); }); } @@ -341,13 +341,11 @@ public void recognizeEntitiesForListWithOptions(HttpClient httpClient, TextAnaly public void recognizeEntitiesBatchTooManyDocuments(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); tooManyDocumentsRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.recognizeEntitiesBatch(inputs, null, null).stream().findFirst().get()); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); }); } @@ -368,9 +366,9 @@ public void recognizePiiEntitiesForTextInput(HttpClient httpClient, TextAnalytic public void recognizePiiEntitiesForEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); emptyTextRunner(document -> { - final Exception exception = assertThrows(TextAnalyticsException.class, () -> + final TextAnalyticsException exception = assertThrows(TextAnalyticsException.class, () -> client.recognizePiiEntities(document).iterator().hasNext()); - assertTrue(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE.equals(exception.getMessage())); + assertEquals(INVALID_DOCUMENT, exception.getErrorCode()); }); } @@ -386,7 +384,7 @@ public void recognizePiiEntitiesForFaultyText(HttpClient httpClient, TextAnalyti public void recognizePiiEntitiesDuplicateIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); recognizeBatchPiiEntityDuplicateIdRunner(inputs -> { - HttpResponseException response = assertThrows(HttpResponseException.class, + final HttpResponseException response = assertThrows(HttpResponseException.class, () -> client.recognizePiiEntitiesBatchWithResponse(inputs, null, Context.NONE)); assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, response.getResponse().getStatusCode()); }); @@ -397,13 +395,11 @@ public void recognizePiiEntitiesDuplicateIdInput(HttpClient httpClient, TextAnal public void recognizePiiEntitiesEmptyIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); textAnalyticsInputEmptyIdRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.recognizePiiEntitiesBatchWithResponse(inputs, null, Context.NONE)); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); }); } @@ -462,13 +458,11 @@ public void recognizePiiEntitiesForListStringWithOptions(HttpClient httpClient, public void recognizePiiEntitiesBatchTooManyDocuments(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); tooManyDocumentsRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.recognizePiiEntitiesBatch(inputs, null, null).stream().findFirst().get()); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); }); } @@ -492,7 +486,7 @@ public void recognizeLinkedEntitiesForEmptyText(HttpClient httpClient, TextAnaly emptyTextRunner(input -> { final TextAnalyticsException exception = assertThrows(TextAnalyticsException.class, () -> client.recognizeLinkedEntities(input).iterator().hasNext()); - assertTrue(exception.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + assertEquals(INVALID_DOCUMENT, exception.getErrorCode()); }); } @@ -509,7 +503,7 @@ public void recognizeLinkedEntitiesForFaultyText(HttpClient httpClient, TextAnal public void recognizeLinkedEntitiesDuplicateIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); recognizeBatchLinkedEntityDuplicateIdRunner(inputs -> { - HttpResponseException response = assertThrows(HttpResponseException.class, + final HttpResponseException response = assertThrows(HttpResponseException.class, () -> client.recognizeLinkedEntitiesBatchWithResponse(inputs, null, Context.NONE)); assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, response.getResponse().getStatusCode()); }); @@ -520,13 +514,11 @@ public void recognizeLinkedEntitiesDuplicateIdInput(HttpClient httpClient, TextA public void recognizeLinkedEntitiesEmptyIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); textAnalyticsInputEmptyIdRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.recognizeLinkedEntitiesBatchWithResponse(inputs, null, Context.NONE)); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); }); } @@ -578,13 +570,11 @@ public void recognizeLinkedEntitiesForListStringWithOptions(HttpClient httpClien public void recognizeLinkedEntitiesBatchTooManyDocuments(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); tooManyDocumentsRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.recognizeLinkedEntitiesBatch(inputs, null, null).stream().findFirst().get()); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); }); } @@ -604,9 +594,9 @@ public void extractKeyPhrasesForTextInput(HttpClient httpClient, TextAnalyticsSe public void extractKeyPhrasesForEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); emptyTextRunner(input -> { - Exception exception = assertThrows(TextAnalyticsException.class, + final TextAnalyticsException exception = assertThrows(TextAnalyticsException.class, () -> client.extractKeyPhrases(input).iterator().hasNext()); - assertTrue(exception.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + assertEquals(INVALID_DOCUMENT, exception.getErrorCode()); }); } @@ -622,7 +612,7 @@ public void extractKeyPhrasesForFaultyText(HttpClient httpClient, TextAnalyticsS public void extractKeyPhrasesDuplicateIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); extractBatchKeyPhrasesDuplicateIdRunner(inputs -> { - HttpResponseException response = assertThrows(HttpResponseException.class, + final HttpResponseException response = assertThrows(HttpResponseException.class, () -> client.extractKeyPhrasesBatchWithResponse(inputs, null, Context.NONE)); assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, response.getResponse().getStatusCode()); }); @@ -633,13 +623,11 @@ public void extractKeyPhrasesDuplicateIdInput(HttpClient httpClient, TextAnalyti public void extractKeyPhrasesEmptyIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); textAnalyticsInputEmptyIdRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.extractKeyPhrasesBatchWithResponse(inputs, null, Context.NONE)); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); }); } @@ -714,13 +702,11 @@ public void extractKeyPhrasesBatchWarning(HttpClient httpClient, TextAnalyticsSe public void extractKeyPhrasesBatchTooManyDocuments(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); tooManyDocumentsRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.extractKeyPhrasesBatch(inputs, null, null).stream().findFirst().get()); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); }); } @@ -772,9 +758,10 @@ public void analyzeSentimentForTextInputWithOpinionMining(HttpClient httpClient, @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") public void analyzeSentimentForEmptyText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); - emptyTextRunner(input -> { - final Exception exception = assertThrows(TextAnalyticsException.class, () -> client.analyzeSentiment(input)); - assertEquals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE, exception.getMessage()); + emptyTextRunner(document -> { + final TextAnalyticsException exception = assertThrows(TextAnalyticsException.class, + () -> client.analyzeSentiment(document)); + assertEquals(INVALID_DOCUMENT, exception.getErrorCode()); }); } @@ -805,7 +792,7 @@ public void analyzeSentimentForFaultyText(HttpClient httpClient, TextAnalyticsSe public void analyzeSentimentDuplicateIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); analyzeBatchSentimentDuplicateIdRunner(inputs -> { - HttpResponseException response = assertThrows(HttpResponseException.class, + final HttpResponseException response = assertThrows(HttpResponseException.class, () -> client.analyzeSentimentBatchWithResponse(inputs, new TextAnalyticsRequestOptions(), Context.NONE)); assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, response.getResponse().getStatusCode()); }); @@ -819,13 +806,11 @@ public void analyzeSentimentDuplicateIdInput(HttpClient httpClient, TextAnalytic public void analyzeSentimentEmptyIdInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); textAnalyticsInputEmptyIdRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.analyzeSentimentBatchWithResponse(inputs, null, Context.NONE)); assertEquals(400, httpResponseException.getResponse().getStatusCode()); TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); + assertEquals(INVALID_DOCUMENT, textAnalyticsError.getErrorCode()); }); } @@ -1018,13 +1003,11 @@ public void analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining(H public void analyzeSentimentBatchTooManyDocuments(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { client = getTextAnalyticsClient(httpClient, serviceVersion); tooManyDocumentsRunner(inputs -> { - HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.analyzeSentimentBatch(inputs, null, null).stream().findFirst().get()); assertEquals(400, httpResponseException.getResponse().getStatusCode()); - TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); - // TODO: TextAnalyticsError has null values for all properties, - // https://github.com/Azure/azure-sdk-for-java/issues/13960 - // assertEquals(InvalidDocumentBatch, textAnalyticsError.getErrorCode()); + final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); + assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); }); }; } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java index dc7225f499fe1..3c794caa70f1c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java @@ -36,7 +36,6 @@ import com.azure.core.test.TestMode; import com.azure.core.util.Configuration; import com.azure.core.util.IterableStream; -import com.azure.identity.DefaultAzureCredentialBuilder; import org.junit.jupiter.api.Test; import java.util.Arrays; @@ -48,6 +47,7 @@ import java.util.function.Consumer; import java.util.stream.Collectors; +import static com.azure.ai.textanalytics.TestUtils.AZURE_TEXT_ANALYTICS_API_KEY; import static com.azure.ai.textanalytics.TestUtils.CATEGORIZED_ENTITY_INPUTS; import static com.azure.ai.textanalytics.TestUtils.DETECT_LANGUAGE_INPUTS; import static com.azure.ai.textanalytics.TestUtils.FAKE_API_KEY; @@ -63,11 +63,9 @@ import static org.junit.jupiter.api.Assertions.assertNull; public abstract class TextAnalyticsClientTestBase extends TestBase { - static final String BATCH_ERROR_EXCEPTION_MESSAGE = "Error in accessing the property on document id: 2, when %s returned with an error: Document text is empty. ErrorCodeValue: {invalidDocument}"; - static final String INVALID_COUNTRY_HINT_EXPECTED_EXCEPTION_MESSAGE = "Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code. ErrorCodeValue: {invalidCountryHint}"; + static final String BATCH_ERROR_EXCEPTION_MESSAGE = "Error in accessing the property on document id: 2, when %s returned with an error: Document text is empty. ErrorCodeValue: {InvalidDocument}"; static final String INVALID_DOCUMENT_BATCH_NPE_MESSAGE = "'documents' cannot be null."; static final String INVALID_DOCUMENT_EMPTY_LIST_EXCEPTION_MESSAGE = "'documents' cannot be empty."; - static final String INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE = "Document text is empty. ErrorCodeValue: {invalidDocument}"; static final String INVALID_DOCUMENT_NPE_MESSAGE = "'document' cannot be null."; static final String WARNING_TOO_LONG_DOCUMENT_INPUT_MESSAGE = "The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions."; @@ -563,7 +561,7 @@ TextAnalyticsClientBuilder getTextAnalyticsAsyncClientBuilder(HttpClient httpCli if (getTestMode() == TestMode.PLAYBACK) { builder.credential(new AzureKeyCredential(FAKE_API_KEY)); } else { - builder.credential(new DefaultAzureCredentialBuilder().build()); + builder.credential(new AzureKeyCredential(Configuration.getGlobalConfiguration().get(AZURE_TEXT_ANALYTICS_API_KEY))); } return builder; } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentBatchTooManyDocuments.json index b5824f9ca8e7f..cc2f0f6f6311e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentBatchTooManyDocuments.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a6eb551e-8824-4cfd-8d0d-5f033113dec1", + "x-ms-client-request-id" : "c829be78-595b-4bc7-b643-27817be6e96c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "a9789ba4-649d-4cee-9d72-b47bf8798455", + "apim-request-id" : "e9cc0104-24c0-4f38-9b26-4ff7022ac675", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 10 records are permitted.\"}}}", - "Date" : "Tue, 25 Aug 2020 04:34:28 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json index 72b446e011c36..9c06d1b61803a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b71587d2-92a0-4801-884a-9b64e465b52b", + "x-ms-client-request-id" : "256847f5-efb4-40b9-b51c-a88cae4e76e2", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "857", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "a649d200-61d3-4ff8-8ccb-ec9bd374a17a", + "apim-request-id" : "3db31293-1719-4b68-b699-8144b55a8a1c", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Wed, 19 Aug 2020 12:12:26 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmptyIdInput.json index d561e2d3f3bdc..59b8f741f89b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "33437ebf-a0a8-4d17-a50f-6eb581966892", + "x-ms-client-request-id" : "208b2306-5b68-4fc0-8674-39fefac24071", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "860", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "520ba4d0-992a-4586-b1da-706709f1861c", + "apim-request-id" : "316f5103-3b95-490f-b47b-231e8f7df047", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Fri, 21 Aug 2020 17:02:20 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json index 4da14aee95d0d..4576bc2d74f0b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "cba40f81-c586-4ca0-bc21-0007e532435c", + "x-ms-client-request-id" : "45b8196a-af8a-45a2-84f3-0919de49861b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1020", + "x-envoy-upstream-service-time" : "112", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "23360b86-499e-4fb4-a0bf-feae50c53e13", + "apim-request-id" : "0e4b748e-f808-4d43-8900-9575423a53e2", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Thu, 13 Aug 2020 02:46:06 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json index bb6b021cb8c1d..77f363daa6570 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "d9bf8c67-2dfe-47b6-8910-6a5f45fd4632", + "x-ms-client-request-id" : "57c84e98-dea0-4557-88fd-4441807f729f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "977", + "x-envoy-upstream-service-time" : "114", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "b729dbe2-af27-4322-bc97-70ed6d3c86ac", + "apim-request-id" : "51a3aaac-517b-4e3a-87ac-db51136a1a4c", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Thu, 13 Aug 2020 02:46:52 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json index 104c9f999beb0..fe1054197c864 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=true", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ee7044d2-8e5d-4dbf-88a3-743ca60094e7", + "x-ms-client-request-id" : "d583966b-50ba-42d6-87f6-f4a5dc8d392f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "932", + "x-envoy-upstream-service-time" : "87", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "d81a7648-08c6-4e81-b3a5-7356d12ab8e5", + "apim-request-id" : "86d6550b-0b1f-4d01-bc40-24f32830dab5", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Thu, 13 Aug 2020 02:45:54 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json index efe062136f68f..f58fd9f2fea59 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "31d48485-0b64-435e-bf39-49cbd7c0207e", + "x-ms-client-request-id" : "1124d35e-bd7c-42b8-82fb-caa3c0005929", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "974", + "x-envoy-upstream-service-time" : "88", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "89aa233a-0cb5-404c-88cb-56563de55f30", + "apim-request-id" : "99368e33-87a4-4037-871f-7dea29508a94", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Thu, 13 Aug 2020 02:45:46 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json index b358a63fe8071..670372c39994a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "72540f78-b82a-4a7b-9681-384941cc781b", + "x-ms-client-request-id" : "6b89dead-27fb-4a2c-bd57-67dfa2161e39", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "427", + "x-envoy-upstream-service-time" : "102", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "4ba8643d-1a3c-4f9e-b0c4-de195ff1430a", + "apim-request-id" : "34925a6e-2c6e-40d3-97ed-17bb8264e27b", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 12:16:42 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json index 593ff1708b19d..f6c500561c867 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "8cc2f855-9ea4-48fc-b48c-721a37cb932b", + "x-ms-client-request-id" : "eb652e5d-98c3-442f-b601-8516543e388d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "483", + "x-envoy-upstream-service-time" : "86", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "7fff84fa-4c3b-4999-a8e2-e5407f83f591", + "apim-request-id" : "f5fe8cd7-2c6e-4adc-8ad1-b5b20afff05e", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 12:16:02 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json index 5c0c67fcd1c2e..3aaeefa57679e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "3d4b440a-b534-4c2a-9d54-a36ba0c01c93", + "x-ms-client-request-id" : "979804da-7b26-49e3-b27e-e180ebe5cb2c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1414", + "x-envoy-upstream-service-time" : "118", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "642f692e-b950-4196-9626-72e0471c8fb6", + "apim-request-id" : "33d7ca82-95a4-4cac-a26c-ab90577a9691", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 12:12:57 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json index b87369d64e14d..4a351130e3bbf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b3847ede-f44a-4b9e-ac28-244e1a1f6b5a", + "x-ms-client-request-id" : "37c7332f-17a1-4ebe-920a-53216962a41f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "885", + "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "1c05f21f-1ba9-4576-bb26-4fee089fe844", + "apim-request-id" : "72539de6-6170-40e0-a454-03c961a915ec", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 12:06:48 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json index 5616a8b50b0a9..841bbb84760f6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "00c290e3-841e-41e8-bd05-6b34bda8a5be", + "x-ms-client-request-id" : "eb6a13dd-3e85-467c-959c-68c9a78077ee", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1109", + "x-envoy-upstream-service-time" : "108", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "14908804-a749-42f8-a444-8ec4c5c47ced", + "apim-request-id" : "72db31da-510e-4c20-b56c-802786bd228c", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":0,\"length\":1,\"text\":\"!\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":1,\"length\":4,\"text\":\"@#%%\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 12:11:47 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json index ac0d577a847e1..e7c4c7f0b087a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c90fc67b-cac6-4a3e-9809-8537f74b56e8", + "x-ms-client-request-id" : "8ff9341b-f831-4a9c-b5bc-7eeca3150f04", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "972", + "x-envoy-upstream-service-time" : "101", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "becc195c-b463-42e1-b855-083626b7b648", + "apim-request-id" : "9be728ca-394e-486f-9893-3e78962fa432", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Thu, 13 Aug 2020 02:46:32 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json index b098e8e75126f..0fde00bcbdc62 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=true", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "7f42bc40-5d3f-45ee-8ef8-28515d9933f0", + "x-ms-client-request-id" : "2e3cfeef-1bd7-4ecb-9c9f-7e50dc3e4687", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "987", + "x-envoy-upstream-service-time" : "104", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "13f34c9f-abeb-406f-9552-85f7cd8573d0", + "apim-request-id" : "06600523-f94d-45dd-aede-1ada7b523965", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Thu, 13 Aug 2020 02:46:47 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json index 8097ad72aef51..f75450da341d0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "06ee858b-a4cb-4dfd-ba0d-4c79c9f5f847", + "x-ms-client-request-id" : "5879cf56-368e-4de6-a10c-49af0d04d74a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1280", + "x-envoy-upstream-service-time" : "114", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "f10c179e-85d0-4496-850d-88bc981e4142", + "apim-request-id" : "c51a88ce-bf26-4b5e-9e42-ed32e679b259", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Thu, 13 Aug 2020 02:46:05 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json index 0b1bd47334463..5d935f2925975 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a427d4e9-57e4-4e93-847e-30f88dfe3f93", + "x-ms-client-request-id" : "dafa3d0c-3e29-425e-a57f-0dfd34d2116d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "426", + "x-envoy-upstream-service-time" : "99", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "52b8dd67-927d-4e76-bef0-6e8db9f70e0d", + "apim-request-id" : "95a6f9eb-8337-4ba0-8daf-86a75748741a", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 12:13:39 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json index 17db8e025e742..ecd4fec771a88 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e1b7b36e-90a4-4bc3-aa4f-c49334e219b0", + "x-ms-client-request-id" : "c057e80e-5a57-42dc-9469-2dfa25c91aba", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "494", + "x-envoy-upstream-service-time" : "206", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "b398ccd5-907d-4513-88ae-3b746c38429f", + "apim-request-id" : "6d7782f2-7989-4d93-9c4a-e7466926b0a5", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 12:14:29 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json index a203cbfdce987..45ce6b6709e16 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "cb07bf78-08e5-4cb8-9dfb-60f6f8172267", + "x-ms-client-request-id" : "3965ed9f-de84-4697-a309-a5b6df10e768", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1036", + "x-envoy-upstream-service-time" : "115", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "be002d0a-abc9-43b7-8514-c989f178365b", + "apim-request-id" : "6bf42621-9895-4439-bc37-d56aeac9005e", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 12:15:06 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json index 090ca46e03c8a..c4cddc5ff2d27 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=false&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "3875ba1c-2304-4f9b-ba0b-4dc1099ec029", + "x-ms-client-request-id" : "08aec66e-a9ed-4ee7-a519-766a0c0727d2", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1369", + "x-envoy-upstream-service-time" : "90", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "1dd802b2-9892-45a5-b8dc-cc879a0aff33", + "apim-request-id" : "a5cd6b15-fa68-4abb-a510-ebceb0390f84", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 19 Aug 2020 06:32:59 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHint.json index e80fdf1392f5b..e159a49d0c8e2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "41e26755-23ea-43a5-8ae4-5e35caaa794a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7eccc75-2242-4798-9fef-4c73f5b32665", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "6", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "91defeba-9570-40d3-a924-b742acea864e", + "apim-request-id" : "dec2687f-0d06-43cd-bfd7-e9d1230c923a", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:58 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHintForBatchOperation.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHintForBatchOperation.json index 82b3c73ceeb5d..f6fd9ef8f30d9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHintForBatchOperation.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHintForBatchOperation.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "78a3a306-5107-4d00-9393-e7957b14748c", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5134811a-6154-40d9-8299-9097dcbc6783", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "7", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "20dbab91-db76-40b6-97fd-d1bddb472bb9", + "apim-request-id" : "a1aca27a-893b-45b9-8b82-202920a2bddd", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguage.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguage.json index 384244568680b..adddd014a8efc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguage.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguage.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e943340b-e07c-4c92-bed9-ed89b1f6e1ec", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a456e2a-dbf9-40f9-b9df-f54fce09cf02", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "e85d934d-38bb-42a2-a2dd-41512088953e", + "apim-request-id" : "981d941e-cc58-4188-8e49-8578836c7f39", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:43 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:58 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguageForBatchOperation.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguageForBatchOperation.json index 0724d8a22cbdd..087584d7263c3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguageForBatchOperation.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguageForBatchOperation.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "0ce16f07-9311-473d-891e-617ed8e876b0", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f758411-44a1-4f9b-99cf-aff644ea13d8", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "e5842e25-e10f-4c56-8838-38b39f6f12c8", + "apim-request-id" : "695b93f6-aab7-499e-bca3-15fad420625e", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:58 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultPipeline.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultPipeline.json index 79d249639761d..0ec074b2977cf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultPipeline.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultPipeline.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "228448f7-ad12-4eb8-94f2-2eed7aa712ad", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d4945bf-584b-46e4-a696-744d148e46b8", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "7", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "1c8d58b1-52e5-46f6-a27d-c10bf1f8c32c", + "apim-request-id" : "362d5603-705f-49f9-9d43-2a4dcad800ce", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithInvalidApiKeyCredential.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithInvalidApiKeyCredential.json index 328a7000fe9f4..083a2cb08bcbb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithInvalidApiKeyCredential.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithInvalidApiKeyCredential.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "0a7bf23a-f1b4-426c-84c0-827f723f9659", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a0bf3eb-e79f-4913-976d-18d81ee584d5", "Content-Type" : "application/json" }, "Response" : { @@ -12,7 +12,7 @@ "Content-Length" : "224", "StatusCode" : "401", "Body" : "{\"error\":{\"code\":\"401\",\"message\":\"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.\"}}", - "Date" : "Wed, 15 Jul 2020 04:14:43 GMT" + "Date" : "Tue, 01 Sep 2020 06:14:58 GMT" }, "Exception" : null } ], diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHint.json index 06f67c9c43310..ec34ecc214f46 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHint.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9737a876-5b70-44b2-89c2-a41524c1dfed", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e864f6e-94c8-4e8b-bb3b-02fd4db3ad23", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "4b410dcf-d2d8-4afb-a39b-87e95d35f393", + "apim-request-id" : "a5e4b3a2-9c2d-422c-aa41-e891ca42e825", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:43 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:58 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHintForBatchOperation.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHintForBatchOperation.json index bde298e006f12..7ec3e78527352 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHintForBatchOperation.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHintForBatchOperation.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2731d960-9fb3-4c70-8422-9360f9970b04", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b34c63b0-9733-4698-9e37-bd7eb0e7daa5", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "23d96b4c-9a02-4c77-b56b-29ae2bd35cfd", + "apim-request-id" : "17c77533-9b69-4ab1-94b4-27007db1e357", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:43 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":0.58},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":0.9},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:58 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguage.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguage.json index e8fe2940c1289..4fb2138eb3f2d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguage.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguage.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e4ae3aa5-6b11-401b-8ccb-a6acdc59e918", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d295894b-41e9-49bc-a5ba-2739e06a8428", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "9", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "388f89c2-98f1-4675-85e4-57429d2531be", + "apim-request-id" : "3215e239-4127-423a-be8a-428f03491c57", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Je m'appelle Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:43 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Je m'appelle Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:58 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguageForBatchOperation.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguageForBatchOperation.json index e2e981970ae0e..1ed06f6f063f0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguageForBatchOperation.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguageForBatchOperation.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f0a679f7-ce2d-40ca-85fe-ae5a5037b3d0", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7d02effa-9a18-46b4-b91e-9b4bba11d129", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "b0db648a-257b-403e-b9d8-a0efd13fa5f1", + "apim-request-id" : "1e0a1388-11d9-4157-a874-0942ec234d07", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"Je m'appelle Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"Je m'appelle Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNullServiceVersion.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNullServiceVersion.json index 00ed2adcd0cec..66c633883cd2c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNullServiceVersion.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNullServiceVersion.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b3c50f6a-8ddd-47ba-a6f7-f0d30505c056", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c7662a0-ae4f-4201-bee5-23f4fd74b7c6", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "9", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "d7e8807e-f5a2-4f7b-a1a5-eb0fc2856323", + "apim-request-id" : "01230994-2ab5-496a-b186-db815d02bd25", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToInvalidKey.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToInvalidKey.json index 9798baeee1764..c339b49c0c498 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToInvalidKey.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToInvalidKey.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f9c56da2-fec2-43ac-8423-1601ac330b42", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3cea85e5-707c-4377-acd6-e0c2c776aba2", "Content-Type" : "application/json" }, "Response" : { @@ -12,7 +12,7 @@ "Content-Length" : "224", "StatusCode" : "401", "Body" : "{\"error\":{\"code\":\"401\",\"message\":\"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.\"}}", - "Date" : "Wed, 15 Jul 2020 04:14:43 GMT" + "Date" : "Tue, 01 Sep 2020 06:14:58 GMT" }, "Exception" : null } ], diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToValidKey.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToValidKey.json index 6283e7c93c8ad..dd41b509d77d9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToValidKey.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToValidKey.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "457b620f-e1ca-45d2-b68b-35f721b14854", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0d78eda-3f6b-4683-b017-36d0641f26b2", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "b7e247c6-dcea-49b3-a59a-14f5bd879b34", + "apim-request-id" : "0f69d279-9ab6-44ae-b0e0-9c37e52546bb", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithValidApiKeyCredential.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithValidApiKeyCredential.json index 0b672fbd3ba5b..c76ca619e539c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithValidApiKeyCredential.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithValidApiKeyCredential.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "cac692a6-264d-4df5-b82a-1e839148c2bc", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cb931e99-7541-41b1-a08d-dbe338dcfe72", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "70904319-9f94-49a6-906a-379fe96496fd", + "apim-request-id" : "833c1672-d889-478c-89fa-9156d3ee63dd", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageDuplicateIdInput.json index ff81a821cb945..6e0a37ef65a0b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "90d576e3-1b2d-48cb-b8e7-367a653458fb", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "20f05c0a-4717-48a3-9e72-378a5c2c512d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "232295a8-9591-4b36-8410-36b8bd360449", + "apim-request-id" : "8850792e-52e0-4b9f-9f50-f6dbf5a8f283", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Wed, 15 Jul 2020 04:14:34 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyCountryHint.json index 30703f4c87c3d..6f6843971e4a6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyCountryHint.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "38581834-8351-460e-a706-57d247d0c8c1", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d36aa3f3-f430-492a-8c2b-47c01c84858e", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "5c201a8d-eda4-46e4-81a4-048714871300", + "apim-request-id" : "43ab9dd8-3534-48ad-8bb5-66161f08cdc2", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:34 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyIdInput.json index eed7a44ab2502..e867b0d3be148 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9eb8cc82-b4ab-4ac4-9683-033c3df33cf1", + "x-ms-client-request-id" : "83b94598-4918-47c8-b7c9-4509a386319a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "817", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "d49e1e71-8859-4e8a-952e-dae6856f0fd6", + "apim-request-id" : "1639c8dd-3d17-49d6-8107-eace4ec93a7f", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Fri, 21 Aug 2020 16:03:30 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyText.json index 7fddfc69c3796..b671815b41807 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "201beac7-cedd-4db1-8390-5f87cf6ecf95", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0638242-e3f4-40e7-a09d-9d50ccd8f0c5", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "6", + "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "515a36d0-2ec5-4399-8ab7-c91d0e3deb9f", + "apim-request-id" : "904d2fe7-31d8-4be9-8ddf-a094b7ffe8ce", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 06:14:50 GMT", + "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageFaultyText.json index da3fb418bf7f5..a99e0cd69703e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "7b64255d-f8ad-40a7-817e-325772bb8819", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4580fddf-92c5-4e5b-9352-e65a443d496c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "8", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "814ef715-d269-4492-b6bc-4878c75bb9f5", + "apim-request-id" : "5ab6b35f-6d47-4e90-8aee-3e8fe1ea6877", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:40 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageInvalidCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageInvalidCountryHint.json index 4b2445a572ce3..4c0d4581629c1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageInvalidCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageInvalidCountryHint.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9d69b921-32bd-4405-aca9-7735067f0c76", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9722e589-4af5-4cbf-b68c-ed640ac0bf3b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "11", + "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "64b09a3d-d2df-42c6-9bee-099b1cb4d230", + "apim-request-id" : "75fdced4-d890-4c82-bd91-a286751c09b0", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Country Hint.\",\"innererror\":{\"code\":\"InvalidCountryHint\",\"message\":\"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code.\"}}}],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 05:21:19 GMT", + "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Country Hint.\",\"innererror\":{\"code\":\"InvalidCountryHint\",\"message\":\"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code.\"}}}],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageNoneCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageNoneCountryHint.json index d0886143a9d92..8453f660aa681 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageNoneCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageNoneCountryHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c9dfa311-86d8-4af3-9084-1b895aff0328", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "efae7fbe-55cf-4b26-8592-45f9c021ef90", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "8", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "d24f76ec-1e3c-425c-ada1-d7ad8ed5570a", + "apim-request-id" : "63266073-b00e-4161-87e1-8846c1172735", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:26 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInput.json index e875f162913e2..f032a64da886c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f12701d1-dc38-40ca-8fc4-d3ed25740f18", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "059dde47-14a3-4a5a-a3d4-99aee2f4d13b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "8", + "x-envoy-upstream-service-time" : "9", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "f5a23511-ea35-4fad-b38e-796e6e9021be", + "apim-request-id" : "323dd16a-3faf-4ea1-b84f-2ee00d4bba7a", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:41 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"Polish\",\"iso6391Name\":\"pl\",\"confidenceScore\":0.4},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatistics.json index 4a1532ddfe63e..b0db80970e0b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "d9d1eb82-9746-4cfa-a994-5f48dd37323a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7e2564e-dba8-4bc1-8c83-22c3ad851b52", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "7", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "c5036c9e-72e2-4ec8-8519-aca69ef8f7fe", + "apim-request-id" : "7bd47753-874e-4a43-bdb7-98ac3f807531", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":3,\"validDocumentsCount\":3,\"erroneousDocumentsCount\":0,\"transactionsCount\":3},\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":26,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":40,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"statistics\":{\"charactersCount\":6,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:33 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":3,\"validDocumentsCount\":3,\"erroneousDocumentsCount\":0,\"transactionsCount\":3},\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":26,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":40,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"Polish\",\"iso6391Name\":\"pl\",\"confidenceScore\":0.4},\"statistics\":{\"charactersCount\":6,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHint.json index 95f211e86aeaa..a4ed03a474e13 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "1dadde91-c611-4113-b4dd-cb220ff76d93", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "025082c7-ae96-41b0-a89c-4f03664e2992", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "8", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "63831bed-228f-4060-8075-0290c388cec3", + "apim-request-id" : "bdeaf159-f9f7-48a1-9522-8cc67a80e7eb", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:39 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"Polish\",\"iso6391Name\":\"pl\",\"confidenceScore\":0.4},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHintWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHintWithOptions.json index 00c1028403452..423f0d4de2108 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHintWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHintWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "15d08c28-acf4-44e4-bd7f-41cdcd8ed18c", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a2f9363-b4f8-4134-86a9-bde15f6a0fe1", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "8", + "x-envoy-upstream-service-time" : "10", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "327012fc-8461-44ba-8cdb-687378056036", + "apim-request-id" : "7472c8e7-d430-41ff-8f4f-a5f7e02c70ca", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":3,\"validDocumentsCount\":3,\"erroneousDocumentsCount\":0,\"transactionsCount\":3},\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":26,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":40,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"statistics\":{\"charactersCount\":6,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:36 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":3,\"validDocumentsCount\":3,\"erroneousDocumentsCount\":0,\"transactionsCount\":3},\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":26,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":40,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"Polish\",\"iso6391Name\":\"pl\",\"confidenceScore\":0.4},\"statistics\":{\"charactersCount\":6,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringInput.json index f4152948f34aa..bc015665459aa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "66f3f4d9-3460-4c95-9eff-bc80fcfdd11b", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "64ea71c7-db6b-49a0-84b9-017d6f85ec1e", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "c0c42ba6-d0ca-417d-a1b4-5801af943e22", + "apim-request-id" : "eb21267c-cb40-4185-be01-995806eb0728", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:30 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"Polish\",\"iso6391Name\":\"pl\",\"confidenceScore\":0.4},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectSingleTextLanguage.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectSingleTextLanguage.json index fc430dada420e..18165a166a9f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectSingleTextLanguage.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectSingleTextLanguage.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f1dbbaa8-c081-4059-9d5d-6e5286a06c41", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7dfb57d-46ef-4411-a1c2-62fa3c71bda4", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "52fa2d38-a805-4a66-be05-8dac3f85bff2", + "apim-request-id" : "82b0ca93-5e62-460f-80a6-97268bebe97a", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:37 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchTooManyDocuments.json index 3cca3afd44e3a..ab95acb5bca43 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchTooManyDocuments.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "dc6848eb-0ab7-4cab-a41c-7e596a9abae7", + "x-ms-client-request-id" : "a71ab59a-4320-4099-b527-f856725ed717", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "25f22436-e460-42c0-b53f-b3edd00aede7", + "apim-request-id" : "f141c995-4714-429e-ba32-df6a45ef8b0d", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 10 records are permitted.\"}}}", - "Date" : "Tue, 25 Aug 2020 04:34:24 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchWarning.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchWarning.json index 3029c8b7c7b63..750b29d774994 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchWarning.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchWarning.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "fbdaf84a-d713-460f-9667-4fea0bb66ce3", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c4d7a11-d3b7-46f5-b87d-43d2a4928b0d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "6", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "bc125268-a1fa-4433-8aa7-b9153ecb3e71", + "apim-request-id" : "87406636-3b9a-4b54-bcde-858d706299f8", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost\"],\"warnings\":[{\"code\":\"LongWordsInDocument\",\"message\":\"The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions.\"}]},{\"id\":\"1\",\"keyPhrases\":[\"Microsoft\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:41 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost\"],\"warnings\":[{\"code\":\"LongWordsInDocument\",\"message\":\"The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions.\"}]},{\"id\":\"1\",\"keyPhrases\":[\"Microsoft\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesDuplicateIdInput.json index 7b549b5c80f65..a200f395a602a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ff81219f-02cb-4191-8667-5b88194dc89a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "331ea854-985a-4826-800f-42906f0dc39e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "983040d8-028c-4ae1-a176-8a0d48a87fe1", + "apim-request-id" : "309ddeb9-83ac-4b85-9e37-36147f8f85dc", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Wed, 15 Jul 2020 04:14:29 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesEmptyIdInput.json index 796f24835cfc8..e7130a9c3d499 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "77772418-c085-44ac-bbf4-f072a55afe39", + "x-ms-client-request-id" : "46083ebe-7708-4fc9-bd61-d0439cf212d8", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "884", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "51bbd2ed-6f77-4261-8312-bedefb60bb1c", + "apim-request-id" : "c2d615d8-4114-4b00-b411-02fbc14ac4b9", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Fri, 21 Aug 2020 17:15:44 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInput.json index 7977dcd9620fd..7ca7e2de7b9a6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9542d252-cb21-44cb-8e84-ff122a27bed6", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "527734a0-b5d0-44d5-a5f3-ff0f3654d10c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "8", + "x-envoy-upstream-service-time" : "10", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "788a61b9-34bf-4d2b-a4f1-ce40115dd8fe", + "apim-request-id" : "b2d7bc99-a9c4-486e-b32a-ae07c848d7b0", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:26 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInputShowStatistics.json index 50db86952ee13..9d3565e1bcdec 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "91fe1f35-1351-4a13-84b2-3bf39d684d37", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d1a273e-4938-41b4-9a1d-7bdb59c21e7e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "8", + "x-envoy-upstream-service-time" : "19", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "cf12ce51-f5c4-4ad5-a4e2-4ae74d34e311", + "apim-request-id" : "173eaa26-f8ff-4bd1-95ef-049d515197bc", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"statistics\":{\"charactersCount\":49,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"statistics\":{\"charactersCount\":21,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:27 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"statistics\":{\"charactersCount\":49,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"statistics\":{\"charactersCount\":21,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchStringInput.json index bed1d2528eaad..4ad4e0242c762 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "10e53ad6-80a5-4639-9060-87dca1400b00", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "803e6647-30a0-4fa2-9df5-b02696fe58b4", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "8", + "x-envoy-upstream-service-time" : "13", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "b7e6b269-0a95-4632-9ed5-26b9486d4f63", + "apim-request-id" : "95368d38-14e7-45b7-9338-b46f91d76f29", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:40 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForEmptyText.json index 0897ed4543123..e4846a515474a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForEmptyText.json @@ -1,23 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9a086500-1dc1-49b5-a9b3-4bbf69393cc0", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "862dabe7-a09c-477d-bdac-794864b00e3b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "236", + "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=0", - "apim-request-id" : "8880d2cb-9e96-4c23-b9ef-2fc7c3319058", + "apim-request-id" : "e3ccfcac-0723-4764-94bb-8df2d38a1a99", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 06:19:40 GMT", + "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForFaultyText.json index a7b17f2f16e19..fba14971fe02f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "99b15e2f-fbea-49f2-bd8b-735dba11c076", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e21a90a-19fc-4132-9653-ca50528c6a04", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "ad26b9f3-a44b-4f49-bf0d-440e6bdd1171", + "apim-request-id" : "273c031a-6f61-434f-afab-9af7444bb01d", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:27 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListLanguageHint.json index 50e741adc9c5e..ba1d17d5463ab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "0250bb3d-c903-4c6d-9b5a-af1408b8a2ea", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "81d11171-495b-4adc-8d52-40b13cedf0dc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "6", + "x-envoy-upstream-service-time" : "9", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "f9a8ee49-b556-44d3-912f-dbfb58d20dba", + "apim-request-id" : "4cfb436e-50dd-4394-b6d0-2cd9f2c432e9", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:40 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListStringWithOptions.json index 2f038f1c56e9d..cfcf20ccb9d68 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListStringWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "21234958-3db8-45ff-bb8a-a9f851e47de0", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d62328e-f4cb-4d14-b207-b7e118dcf91e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "9", + "x-envoy-upstream-service-time" : "11", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "c233a162-654a-4ea1-886f-acdd93eb8a7e", + "apim-request-id" : "2693e43c-048e-411f-bd24-80856e4dff4c", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"statistics\":{\"charactersCount\":49,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"statistics\":{\"charactersCount\":21,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:34 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"statistics\":{\"charactersCount\":49,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"statistics\":{\"charactersCount\":21,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForTextInput.json index c05a76dcf9674..813a97835036c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "8908ad2a-3f5c-4b6b-a792-94cdde185ecc", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "314cc613-01dc-49b8-a132-0c7e938f0b87", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "1470a283-af3f-4e96-b849-a08195509963", + "apim-request-id" : "7adccd07-575b-4f10-a4da-b2277cf301b5", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:29 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesWarning.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesWarning.json index 41e37e911b388..064a202129a76 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesWarning.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesWarning.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "48f8afcf-669d-4109-8fe1-1d9ae9c7cc19", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d929f1cd-82ca-4cbe-bacf-db946576faf3", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "54252be8-2160-4162-9a3a-fb2da1c63482", + "apim-request-id" : "b281a64d-aa17-4a6d-9aec-8fa724587130", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost\"],\"warnings\":[{\"code\":\"LongWordsInDocument\",\"message\":\"The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions.\"}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:35 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost\"],\"warnings\":[{\"code\":\"LongWordsInDocument\",\"message\":\"The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions.\"}]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json index 8d2b18d1fa0a6..804c5c194dae4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "804f9674-7cdc-48f8-9f2d-b310a4b23844", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87d04faf-e3d8-44cf-aee1-89d614112486", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "0353845f-15de-4bd8-9e4b-0c6aba1140a4", + "apim-request-id" : "936eccbc-00ac-4f83-b355-81878dd83529", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"2\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 07:14:10 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchTooManyDocuments.json index e40c1a774a44a..b5b255b602933 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchTooManyDocuments.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "531d0756-9bcf-4a4b-8d77-439ff9c9656a", + "x-ms-client-request-id" : "f794b3ce-9331-4947-87bb-78c3006472dc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "13c9b8f7-ebd2-463b-ba4b-81bffbb8746b", + "apim-request-id" : "813e6f78-84ba-4f69-9cbd-1d8e26531cdf", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 5 records are permitted.\"}}}", - "Date" : "Tue, 25 Aug 2020 04:34:50 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json index b5db55a394d6b..7a2ac6d87f529 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "7de08f9c-a424-43b9-a1ba-bff22e7b6d78", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23e1a99f-1756-4ad8-a687-e82bd5c7a580", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "7b927df4-bc42-48f1-8909-e2daf670d0f6", + "apim-request-id" : "e6298b5d-02b9-4e28-9369-9fc4f15a3017", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmptyIdInput.json index 5232f5471cf0d..c848cb85a264c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "bf93b9c8-d41a-40ef-be64-c9225c07d218", + "x-ms-client-request-id" : "d8e39933-b7b4-4b1a-a5c0-e4b8563d94bc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "6bfc92b2-9caa-419f-8d86-c02ccf7a6fb7", + "apim-request-id" : "dd302e52-4716-46ba-97d1-023aecede465", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Fri, 21 Aug 2020 17:00:43 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json index da5942f5cc83b..35f8d23fc5b8a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2a46f3f9-1b6b-4873-802d-f7abf49645b0", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9a8fff9-2483-4a2a-9ab7-7c60a0b70fb2", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "106", + "x-envoy-upstream-service-time" : "95", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "6d0230d1-cf8f-48cd-830b-5139129e60e0", + "apim-request-id" : "001f24b3-dd80-4247-9f26-fd64ab4baa54", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:30 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json index 7eaf842470a4d..acd8b5d9e429a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b16eb4cc-ece9-4990-917c-3b18d7e525c3", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "248bdd5e-0a7a-421d-8fca-4795a5a282c5", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "84", + "x-envoy-upstream-service-time" : "99", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "0de8933d-0dc6-4823-9a83-28287320521c", + "apim-request-id" : "038f70a9-b311-4729-a618-b4c2661e2721", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:41 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json index 9744c089a40f2..9906a7f976788 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "d2bf186b-fc0b-48c9-a968-7a5a0a619a1d", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1418f846-0702-496b-821b-e8e26202d3b8", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "95", + "x-envoy-upstream-service-time" : "93", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "a89501b9-279c-46b6-8f27-cc6f291a414e", + "apim-request-id" : "9af0a8fd-f3a1-4aa9-9642-02a840eb8530", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:32 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json index ed1fafbe01445..5ba20f2c00147 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "22827ee1-0788-4246-8c34-1319cbbb71c9", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9586541f-0de6-4eb0-bd06-ca5049618249", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "88179958-0667-41d0-8784-312f94f98e28", + "apim-request-id" : "7010c521-2ff1-4dd1-9b29-8eb37429fe97", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 06:13:34 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json index e60c4e7f7d049..a85956a8dd18c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c8d91dc2-3351-49f2-855b-fa80c170ad5e", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4900447-c2a4-4f4e-8696-f1b142cffacf", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "e096da31-8ccc-462b-a528-b5ff0f6a758d", + "apim-request-id" : "e2232377-29c9-4a06-980b-6cd7b69421c8", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:35 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json index 248cb6a1fa354..2ed4f1ea1f8f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "543c03c2-fb0d-4cfc-938b-0dad2acd850d", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "98aabf1b-7391-4776-9af0-cd6be2863d71", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "107", + "x-envoy-upstream-service-time" : "99", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "e3cfef2b-8054-40f5-ae33-f2b2ff6c5de4", + "apim-request-id" : "230af861-501a-47f5-b68c-63b1b7884165", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:31 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json index 16c4f9c873d0d..6ee414ea27c3e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "5484539f-0b52-42b5-bd39-9f9285302365", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b8688851-3a69-4c33-8179-3f9a3ea2a144", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "108", + "x-envoy-upstream-service-time" : "99", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "90fa5c9a-fcb7-4668-bde5-6847d34fa94c", + "apim-request-id" : "b38e98a9-9a7d-40b4-9560-e5880c8432f4", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:30 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json index 9753ffcafa953..9272c4a420568 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9b32a575-b0a6-4689-ad1a-a5fe0389c296", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9d50aa4a-25bb-4867-a0ca-1dd1c9230f07", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "91", + "x-envoy-upstream-service-time" : "86", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "81434fee-45a6-4ef6-abaf-a6683d886503", + "apim-request-id" : "83796b64-de6b-4e86-bfa9-1fde022a2629", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:38 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesBatchTooManyDocuments.json index c76f4e9f04025..30e7d36045b56 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesBatchTooManyDocuments.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a3823cf4-43e0-4ca8-b20a-22a541caeebf", + "x-ms-client-request-id" : "ca742ed1-6b9c-4b42-a12a-a2dff3c6f0e7", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "95a9fdf2-625f-4b69-9051-cf468f9fc56e", + "apim-request-id" : "fd31d0bd-b47f-4025-864b-ab51d75e0702", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 5 records are permitted.\"}}}", - "Date" : "Tue, 25 Aug 2020 04:34:28 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json index fa62720ff673f..f1d0a1c48ba01 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "8544a8f7-6f2a-4d9d-a2ed-d6f074246ab0", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4eaf018-dabc-4ec3-bcdc-8868b276dd2c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "ff2714cb-28d1-4ecb-a7f1-ee9814a6cf44", + "apim-request-id" : "f73f567b-43a4-4523-afa3-2db2e2860c2f", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Wed, 15 Jul 2020 04:14:31 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmptyIdInput.json index 0d622bc0dd8e3..74852591fb930 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f6c418ba-c045-4047-9b79-b0a4c99415e4", + "x-ms-client-request-id" : "ee9200cb-9bbd-4944-b0d3-1e2d331cff19", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "808", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "6b72609e-1476-4836-9eb3-3e6b19d5e3aa", + "apim-request-id" : "83e94ad9-1962-446e-a57d-c8c0369f335d", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Fri, 21 Aug 2020 17:02:35 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json index ed180b1540e5a..21cfeae723a61 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6d17372a-4a5c-4666-b3b4-5a9c69fab65a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac39d8fa-b5e3-4dac-afd8-4803d9b14caf", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "f85c7d18-cd5d-47c4-a067-711bf221bd2b", + "apim-request-id" : "47a49c16-17a0-4f51-a226-f00dd395859d", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:33 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json index d9eec0412a031..a472aaa890684 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "7fd12438-4735-4240-9b9c-20d910cd46a1", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d192836-a352-4c65-9425-d126aedd5cfc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "21", + "x-envoy-upstream-service-time" : "19", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "50c1c83c-0484-4e3c-b12f-f345c3b956f0", + "apim-request-id" : "aca32039-2701-4e65-9d66-26cb491a3e6f", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:39 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json index 4020a82c412d4..fa98be71c4a4a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "988a54c2-6c04-4be9-b254-3b3b7b4f127c", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "09208748-d6f8-4bc8-bf4d-94073e661926", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "63395d16-1940-4b55-ad48-1ee0facade6a", + "apim-request-id" : "4fd95cda-cb8c-4de1-bc47-69cdf7d79b23", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:25 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json index c4e6d38d71ab7..11f33b7e82923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2bea51cf-8a7d-4684-9910-aa44683305c3", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1cfe6e54-ecbf-41b7-a711-f541199d116c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "464", + "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "3fba3d9e-867f-4f48-a3e3-c3f0d9cac40d", + "apim-request-id" : "0c268b51-902b-474b-96fe-9dfc4022ca6f", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 15 Jul 2020 06:18:17 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json index 788fa793a86ed..f942a71264b11 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "3f729f50-bdfa-4518-b43b-fbfc81668f12", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ccfb027e-3e6c-4388-8228-770c0ee286e8", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "17", + "x-envoy-upstream-service-time" : "16", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "e2956b10-6602-43d3-a71f-4214ccad443b", + "apim-request-id" : "511eef1b-5dc4-4ad3-bae4-6e6e9d58cd82", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:37 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json index d79d2b2f5fc71..6b8ebf525ea12 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e0579e3d-1a00-4116-88e6-c23f3f9fb4d4", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a2927cbd-049c-45c4-a3e6-16c1b62ddc6b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "21", + "x-envoy-upstream-service-time" : "18", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "2a27fdc5-a5b7-4ad6-b103-203954b9d260", + "apim-request-id" : "50cd4b5e-0bf5-4363-8282-1c841af243d6", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:24 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json index d0a58431a7850..8fa13f9aa47a1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "667afabd-0adb-41a0-a04b-0aa32330c4c5", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c2df6e63-a5ee-4942-9168-c5a9e0bedd77", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "18", + "x-envoy-upstream-service-time" : "19", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "dd9e4842-510f-46d1-a328-b51198e22f3e", + "apim-request-id" : "8f6a3864-8e16-441d-9a93-0e9ca809d968", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:26 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json index ff258ed571b28..03d1d15822a3a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "0da10601-b9bc-411a-9f12-945fa3f667dc", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cac23bc9-9c0c-4261-966d-5c20f556528f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "19", + "x-envoy-upstream-service-time" : "18", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "9e3520c5-51b5-4edd-85eb-4fb02ec511d9", + "apim-request-id" : "8856ade6-f871-4538-a6db-956468d98813", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 15 Jul 2020 04:14:27 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchInputSingleError.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchInputSingleError.json index 118ce920a8117..d38dcdfc327f4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchInputSingleError.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchInputSingleError.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "69d2e167-8e03-4958-943b-ccecdf717d16", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a23cafe-b2c3-4893-9e93-6d244bf1fca7", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "2158cc12-92dd-4979-b675-2e326a3a6a07", + "apim-request-id" : "0affafcb-3a4f-4c9a-a153-61c59d6688f6", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"2\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Mon, 27 Jul 2020 16:40:05 GMT", + "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"2\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchTooManyDocuments.json index 185aa2a3e8625..0251baaa656af 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchTooManyDocuments.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "19034207-2726-4190-b0be-ec51484020eb", + "x-ms-client-request-id" : "8ab62a2b-4265-4c0d-9e67-f35b787a7976", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "b14aca56-3ece-4b3e-ae1b-c3246e8c93ca", + "apim-request-id" : "dc35794f-8cf3-4f2a-94d0-61266818fbaf", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 5 records are permitted.\"}}}", - "Date" : "Tue, 25 Aug 2020 04:34:43 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDuplicateIdInput.json index 06b9ea32a66d6..cc09110d7085b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a39bf614-9fcb-44c6-9c33-0626ba8411b9", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5ed6bd4-6fcf-47cd-84ae-73d08d40fa2d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "10", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "13d25518-5e10-48d1-9e09-9a6fd0054494", + "apim-request-id" : "bbd8e25d-3284-425b-a53b-2ffdc3035a5a", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Mon, 27 Jul 2020 16:40:14 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmptyIdInput.json index 1df65cefc4d00..3611441c27afb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "1fdfdd5f-f688-466c-8136-77012b2af340", + "x-ms-client-request-id" : "422d52f4-151f-4936-ad85-b0da82e04630", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1668", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "285412d4-9bc3-4af3-aa81-87bc4c92ce2f", + "apim-request-id" : "b6a675cc-4a20-41e4-a1e0-d73fc6532992", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Fri, 21 Aug 2020 17:02:42 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInput.json index 6dbe299f208d4..a8f90c014b618 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "37a85b52-818d-4e53-9e74-dca0b1230d9c", + "x-ms-client-request-id" : "23eb6bcb-8b39-4c81-bab1-c5aa41d11fc0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "956", + "x-envoy-upstream-service-time" : "139", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "fd7be3ee-c0aa-4cca-a453-76af868d9cc3", + "apim-request-id" : "af659d6c-9418-4f56-8c74-d006f8237df9", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Fri, 14 Aug 2020 05:37:17 GMT", + "Body" : "{\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputShowStatistics.json index a96e447564b86..10c8fd5754786 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=true", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6337ce73-6d71-4e9c-a107-7213071eb702", + "x-ms-client-request-id" : "dc1bd604-422d-4715-aa33-4045d3b147bc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1296", + "x-envoy-upstream-service-time" : "141", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "99a0bbd4-1693-43c4-ad88-093108d75d71", + "apim-request-id" : "02dab083-c3d5-44ff-ad1a-023f03932ff2", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":105,\"transactionsCount\":1},\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Fri, 14 Aug 2020 05:33:45 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"statistics\":{\"charactersCount\":105,\"transactionsCount\":1},\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForEmptyText.json index 89a8da0144509..5691e27d5b9f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForEmptyText.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6b916f89-42c5-41b1-b899-d0ae3b36c4e0", + "x-ms-client-request-id" : "253b94c3-2001-483f-ae74-8a8e77104da2", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "2ccb72c2-02b9-41dd-917f-1dbf546b72bf", + "apim-request-id" : "f54daa01-4629-4609-8a75-922d021fe601", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Fri, 31 Jul 2020 21:58:01 GMT", + "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForFaultyText.json index 489f880a2e6f2..539012adaf4dd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "4088f159-62f5-4465-8823-f03ef1d7eeca", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "075e13d6-363a-4f02-8787-9e7e82f81870", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "74", + "x-envoy-upstream-service-time" : "62", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "21f0e4cc-7e10-4f13-abbb-623664894484", + "apim-request-id" : "e0891644-a177-48ae-baab-bd49b8cb4d88", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Mon, 27 Jul 2020 16:41:53 GMT", + "Body" : "{\"documents\":[{\"redactedText\":\"!@#%%\",\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListLanguageHint.json index c7a1b3eb3d8ab..5cc2355f1814a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ac3b1975-2a1f-4b4c-b812-57f5edc06d90", + "x-ms-client-request-id" : "b1eb3a7d-af60-4297-ab80-a379fabb8767", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1151", + "x-envoy-upstream-service-time" : "149", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "a5c0e82d-4149-44a6-a86a-f8bcd5ef40d6", + "apim-request-id" : "d24c438f-1edf-4d09-8dfb-40981a47759c", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Fri, 14 Aug 2020 05:33:53 GMT", + "Body" : "{\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListStringWithOptions.json index 6ab75b17ec589..5f3ed632f6de4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListStringWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=true", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ecba6ca9-c040-4e8a-9a23-a84cf38b2f93", + "x-ms-client-request-id" : "ef3a5d53-b4b2-4611-ab5d-199ec3b89cc6", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1043", + "x-envoy-upstream-service-time" : "143", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "d3e4e6a6-e27d-4bce-8eb2-6b0a41a90d9d", + "apim-request-id" : "6dd25191-e91f-4d2b-b022-32e076b427c5", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":105,\"transactionsCount\":1},\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Fri, 14 Aug 2020 05:35:20 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"statistics\":{\"charactersCount\":105,\"transactionsCount\":1},\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForTextInput.json index de4663ac66541..a75831e8cba25 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e79ad848-316e-4391-be17-1957b972b16f", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ecf109ce-c955-4e20-b475-c6144c855de3", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "104", + "x-envoy-upstream-service-time" : "93", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "7fc294cf-e760-4c4d-af87-a28aade608fe", + "apim-request-id" : "03dcd4e3-9337-41ee-a6cd-cd6d0b5b647a", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.4},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Mon, 27 Jul 2020 16:42:11 GMT", + "Body" : "{\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.4},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md b/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md index c1474438ca8bb..32de6ebe32ba4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md @@ -20,7 +20,7 @@ autorest --java --use=C:/work/autorest.java ### Code generation settings ``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/TextAnalytics.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.2/TextAnalytics.json java: true output-folder: ..\ generate-client-as-impl: true From 12f0801df089c8dd1df57093aca5bc7805f40a1e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 1 Sep 2020 16:17:42 -0700 Subject: [PATCH 043/168] Sync eng/common directory with azure-sdk-tools repository for Tools PR 935 (#14605) --- eng/common/scripts/SemVer.ps1 | 322 ++++++++++++++++++++++++---------- 1 file changed, 232 insertions(+), 90 deletions(-) diff --git a/eng/common/scripts/SemVer.ps1 b/eng/common/scripts/SemVer.ps1 index 402c9fb1f57da..0efdfae9cd425 100644 --- a/eng/common/scripts/SemVer.ps1 +++ b/eng/common/scripts/SemVer.ps1 @@ -4,102 +4,244 @@ Parses a semver version string into its components and supports operations aroun See https://azure.github.io/azure-sdk/policies_releases.html#package-versioning -Example: 1.2.3-preview.4 +Example: 1.2.3-beta.4 Components: Major.Minor.Patch-PrereleaseLabel.PrereleaseNumber Note: A builtin Powershell version of SemVer exists in 'System.Management.Automation'. At this time, it does not parsing of PrereleaseNumber. It's name is also type accelerated to 'SemVer'. #> class AzureEngSemanticVersion { - [int] $Major - [int] $Minor - [int] $Patch - [string] $PrereleaseLabel - [int] $PrereleaseNumber - [bool] $IsPrerelease - [string] $RawVersion - # Regex inspired but simplified from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string - static [string] $SEMVER_REGEX = "(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-?(?[a-zA-Z-]*)(?:\.?(?0|[1-9]\d*)))?" - - static [AzureEngSemanticVersion] ParseVersionString([string] $versionString) + [int] $Major + [int] $Minor + [int] $Patch + [string] $PrereleaseLabelSeparator + [string] $PrereleaseLabel + [string] $PrereleaseNumberSeparator + [int] $PrereleaseNumber + [bool] $IsPrerelease + [string] $RawVersion + [bool] $IsSemVerFormat + [string] $DefaultPrereleaseLabel + # Regex inspired but simplified from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string + static [string] $SEMVER_REGEX = "(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:(?-?)(?[a-zA-Z-]*)(?\.?)(?0|[1-9]\d*))?" + + static [AzureEngSemanticVersion] ParseVersionString([string] $versionString) + { + $version = [AzureEngSemanticVersion]::new($versionString) + + if (!$version.IsSemVerFormat) { + return $null + } + return $version + } + + static [AzureEngSemanticVersion] ParsePythonVersionString([string] $versionString) + { + $version = [AzureEngSemanticVersion]::ParseVersionString($versionString) + + if (!$version) { + return $null + } + + $version.SetupPythonConventions() + return $version + } + + AzureEngSemanticVersion([string] $versionString) + { + if ($versionString -match "^$([AzureEngSemanticVersion]::SEMVER_REGEX)$") + { + $this.IsSemVerFormat = $true + $this.RawVersion = $versionString + $this.Major = [int]$matches.Major + $this.Minor = [int]$matches.Minor + $this.Patch = [int]$matches.Patch + + $this.SetupDefaultConventions() + + if ($null -eq $matches['prelabel']) + { + # artifically provide these values for non-prereleases to enable easy sorting of them later than prereleases. + $this.PrereleaseLabel = "zzz" + $this.PrereleaseNumber = 999 + $this.IsPrerelease = $false + } + else + { + $this.PrereleaseLabel = $matches["prelabel"] + $this.PrereleaseLabelSeparator = $matches["presep"] + $this.PrereleaseNumber = [int]$matches["prenumber"] + $this.PrereleaseNumberSeparator = $matches["prenumsep"] + $this.IsPrerelease = $true + } + } + else + { + $this.RawVersion = $versionString + $this.IsSemVerFormat = $false + } + } + + # If a prerelease label exists, it must be 'beta', and similar semantics used in our release guidelines + # See https://azure.github.io/azure-sdk/policies_releases.html#package-versioning + [bool] HasValidPrereleaseLabel() + { + if ($this.IsPrerelease -eq $true) { + if ($this.PrereleaseLabel -ne $this.DefaultPrereleaseLabel) { + Write-Host "Unexpected pre-release identifier '$($this.PrereleaseLabel)', should be '$($this.DefaultPrereleaseLabel)'" + return $false; + } + if ($this.PrereleaseNumber -lt 1) + { + Write-Host "Unexpected pre-release version '$($this.PrereleaseNumber)', should be >= '1'" + return $false; + } + } + return $true; + } + + [string] ToString() + { + $versionString = "{0}.{1}.{2}" -F $this.Major, $this.Minor, $this.Patch + + if ($this.IsPrerelease) + { + $versionString += $this.PrereleaseLabelSeparator + $this.PrereleaseLabel + $this.PrereleaseNumberSeparator + $this.PrereleaseNumber + } + return $versionString; + } + + [void] IncrementAndSetToPrerelease() { + if ($this.IsPrerelease -eq $false) + { + $this.PrereleaseLabel = $this.DefaultPrereleaseLabel + $this.PrereleaseNumber = 1 + $this.Minor++ + $this.Patch = 0 + $this.IsPrerelease = $true + } + else + { + $this.PrereleaseNumber++ + } + } + + [void] SetupPythonConventions() + { + # Python uses no separators and "b" for beta so this sets up the the object to work with those conventions + $this.PrereleaseLabelSeparator = $this.PrereleaseNumberSeparator = "" + $this.DefaultPrereleaseLabel = "b" + } + + [void] SetupDefaultConventions() + { + # Use the default common conventions + $this.PrereleaseLabelSeparator = "-" + $this.PrereleaseNumberSeparator = "." + $this.DefaultPrereleaseLabel = "beta" + } + + static [string[]] SortVersionStrings([string[]] $versionStrings) + { + $versions = $versionStrings | ForEach-Object { [AzureEngSemanticVersion]::ParseVersionString($_) } + $sortedVersions = [AzureEngSemanticVersion]::SortVersions($versions) + return ($sortedVersions | ForEach-Object { $_.ToString() }) + } + + static [AzureEngSemanticVersion[]] SortVersions([AzureEngSemanticVersion[]] $versions) + { + return ($versions | Sort-Object -Property Major, Minor, Patch, PrereleaseLabel, PrereleaseNumber -Descending) + } + + static [void] QuickTests() + { + $versions = @( + "1.0.1", + "2.0.0", + "2.0.0-alpha.20200920", + "2.0.0-beta.2", + "1.0.10", + "2.0.0-beta.1", + "2.0.0-beta.10", + "1.0.0", + "1.0.0b2", + "1.0.2") + + $expectedSort = @( + "2.0.0", + "2.0.0-beta.10", + "2.0.0-beta.2", + "2.0.0-beta.1", + "2.0.0-alpha.20200920", + "1.0.10", + "1.0.2", + "1.0.1", + "1.0.0", + "1.0.0b2") + + $sort = [AzureEngSemanticVersion]::SortVersionStrings($versions) + + for ($i = 0; $i -lt $expectedSort.Count; $i++) { - try { - return [AzureEngSemanticVersion]::new($versionString) - } - catch { - return $null - } - } - - AzureEngSemanticVersion([string] $versionString){ - if ($versionString -match "^$([AzureEngSemanticVersion]::SEMVER_REGEX)$") { - if ($null -eq $matches['prelabel']) { - # artifically provide these values for non-prereleases to enable easy sorting of them later than prereleases. - $prelabel = "zzz" - $prenumber = 999; - $isPre = $false; - } - else { - $prelabel = $matches["prelabel"] - $prenumber = [int]$matches["prenumber"] - $isPre = $true; - } - - $this.Major = [int]$matches.Major - $this.Minor = [int]$matches.Minor - $this.Patch = [int]$matches.Patch - $this.PrereleaseLabel = $prelabel - $this.PrereleaseNumber = $prenumber - $this.IsPrerelease = $isPre - $this.RawVersion = $versionString - } - else - { - throw "Invalid version string: '$versionString'" - } - } - - # If a prerelease label exists, it must be 'preview', and similar semantics used in our release guidelines - # See https://azure.github.io/azure-sdk/policies_releases.html#package-versioning - [bool] HasValidPrereleaseLabel(){ - if ($this.IsPrerelease -eq $true) { - if ($this.PrereleaseLabel -ne 'preview') { - Write-Error "Unexpected pre-release identifier '$this.PrereleaseLabel', should be 'preview'" - return $false; - } - if ($this.PrereleaseNumber -lt 1) - { - Write-Error "Unexpected pre-release version '$this.PrereleaseNumber', should be >= '1'" - return $false; - } - } - return $true; - } - - [string] ToString(){ - if ($this.IsPrerelease -eq $false) - { - $versionString = "{0}.{1}.{2}" -F $this.Major, $this.Minor, $this.Patch - } - else - { - $versionString = "{0}.{1}.{2}-{3}.{4}" -F $this.Major, $this.Minor, $this.Patch, $this.PrereleaseLabel, $this.PrereleaseNumber - } - return $versionString; - } - - [void] IncrementAndSetToPrerelease(){ - if ($this.IsPrerelease -eq $false) - { - $this.PrereleaseLabel = 'preview' - $this.PrereleaseNumber = 1 - $this.Minor++ - $this.Patch = 0 - $this.IsPrerelease = $true - } - else - { - $this.PrereleaseNumber++ - } + if ($sort[$i] -ne $expectedSort[$i]) { + Write-Host "Error: Incorrect sort:" + Write-Host "Expected: " + Write-Host $expectedSort + Write-Host "Actual:" + Write-Host $sort + break + } + } + + $devVerString = "1.2.3-alpha.20200828.1" + $devVerNew = [AzureEngSemanticVersion]::new($devVerString) + if (!$devVerNew -or $devVerNew.IsSemVerFormat -ne $false) { + Write-Host "Error: Didn't expect daily dev version to match our semver regex because of the extra .r" + } + $devVerparse = [AzureEngSemanticVersion]::ParseVersionString($devVerString) + if ($devVerparse) { + Write-Host "Error: Didn't expect daily dev version to parse because of the extra .r" + } + + $gaVerString = "1.2.3" + $gaVer = [AzureEngSemanticVersion]::ParseVersionString($gaVerString) + if ($gaVer.Major -ne 1 -or $gaVer.Minor -ne 2 -or $gaVer.Patch -ne 3) { + Write-Host "Error: Didn't correctly parse ga version string $gaVerString" + } + if ($gaVerString -ne $gaVer.ToString()) { + Write-Host "Error: Ga string did not correctly round trip with ToString" + } + $gaVer.IncrementAndSetToPrerelease() + if ("1.3.0-beta.1" -ne $gaVer.ToString()) { + Write-Host "Error: Ga string did not correctly increment" + } + + $betaVerString = "1.2.3-beta.4" + $betaVer = [AzureEngSemanticVersion]::ParseVersionString($betaVerString) + if ($betaVer.Major -ne 1 -or $betaVer.Minor -ne 2 -or $betaVer.Patch -ne 3 -or $betaVer.PrereleaseLabel -ne "beta" -or $betaVer.PrereleaseNumber -ne 4) { + Write-Host "Error: Didn't correctly parse beta version string $betaVerString" + } + if ($betaVerString -ne $betaVer.ToString()) { + Write-Host "Error: beta string did not correctly round trip with ToString" } + $betaVer.IncrementAndSetToPrerelease() + if ("1.2.3-beta.5" -ne $betaVer.ToString()) { + Write-Host "Error: Beta string did not correctly increment" + } + + $pythonBetaVerString = "1.2.3b4" + $pbetaVer = [AzureEngSemanticVersion]::ParsePythonVersionString($pythonBetaVerString) + if ($pbetaVer.Major -ne 1 -or $pbetaVer.Minor -ne 2 -or $pbetaVer.Patch -ne 3 -or $pbetaVer.PrereleaseLabel -ne "b" -or $pbetaVer.PrereleaseNumber -ne 4) { + Write-Host "Error: Didn't correctly parse python beta string $pythonBetaVerString" + } + if ($pythonBetaVerString -ne $pbetaVer.ToString()) { + Write-Host "Error: python beta string did not correctly round trip with ToString" + } + $pbetaVer.IncrementAndSetToPrerelease() + if ("1.2.3b5" -ne $pbetaVer.ToString()) { + Write-Host "Error: Python beta string did not correctly increment" + } + + Write-Host "QuickTests done" + } } From 827f763c664c29d9465c013ef174b1ce1afee39f Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 1 Sep 2020 17:10:01 -0700 Subject: [PATCH 044/168] Sync eng/common directory with azure-sdk-tools repository for Tools PR 916 (#14520) --- .../templates/steps/get-pr-owners.yml | 35 +++++++------------ eng/common/scripts/get-codeowners.ps1 | 13 ++++++- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/eng/common/pipelines/templates/steps/get-pr-owners.yml b/eng/common/pipelines/templates/steps/get-pr-owners.yml index e3739602b2293..545143ce09be2 100644 --- a/eng/common/pipelines/templates/steps/get-pr-owners.yml +++ b/eng/common/pipelines/templates/steps/get-pr-owners.yml @@ -6,30 +6,19 @@ steps: - pwsh: | git clone https://github.com/Azure/azure-sdk-tools.git $(Build.SourcesDirectory)/tools_repo cd $(Build.SourcesDirectory)/tools_repo - git checkout 564ad63ae72d18422533fa1da9d396e7703c1cb5 + git checkout 35ad98f821913eb0e8872f861ee60589b563c865 displayName: Setup Identity Resolver - pwsh: | - $result = dotnet run -v q -- ` + dotnet run -v q -- ` --aad-app-id-var APP_ID ` --aad-app-secret-var APP_SECRET ` --aad-tenant-var AAD_TENANT ` --kusto-url-var KUSTO_URL ` --kusto-database-var KUSTO_DB ` --kusto-table-var KUSTO_TABLE ` - --identity "$(Build.QueuedBy)" - - $resolvedIdentity = "" - try { $resolvedIdentity = $result[-1] | ConvertFrom-Json } catch {} - - if($resolvedIdentity) { - Write-Host $resolvedIdentity - - Write-Host "##vso[task.setvariable variable=${{ parameters.TargetVariable }}]$($resolvedIdentity.GithubUserName)" - } - else { - Write-Host "Unable to locate a github user for identity $(Build.QueuedBy)" - } + --identity "$(Build.QueuedBy)" ` + --targetvar "${{ parameters.TargetVariable }}" displayName: 'Resolving Queuing User' continueOnError: true workingDirectory: $(Build.SourcesDirectory)/tools_repo/tools/notification-configuration/identity-resolver @@ -45,10 +34,12 @@ steps: Remove-Item -Force -Recurse $(Build.SourcesDirectory)/tools_repo displayName: Clean Up Cloned Tools Repo - - pwsh: | - $originalValue = "$(${{ parameters.TargetVariable }})" - $result = $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1 -TargetDirectory /sdk/${{ parameters.ServiceDirectory }}/ -RootDirectory $(Build.SourcesDirectory) - if ($result) { - Write-Host "##vso[task.setvariable variable=${{ parameters.TargetVariable }}]$originalValue,$result" - } - displayName: Add CodeOwners if Present \ No newline at end of file + - task: PowerShell@2 + displayName: Add CodeOwners if Present + inputs: + pwsh: true + filePath: $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1 + arguments: > + -TargetDirectory "/sdk/${{ parameters.ServiceDirectory }}/" + -RootDirectory "$(Build.SourcesDirectory)" + -VsoVariable "${{ parameters.TargetVariable }}" \ No newline at end of file diff --git a/eng/common/scripts/get-codeowners.ps1 b/eng/common/scripts/get-codeowners.ps1 index 8452f9fd650b6..f28cb3df78995 100644 --- a/eng/common/scripts/get-codeowners.ps1 +++ b/eng/common/scripts/get-codeowners.ps1 @@ -1,6 +1,7 @@ param ( $TargetDirectory, # should be in relative form from root of repo. EG: sdk/servicebus - $RootDirectory # ideally $(Build.SourcesDirectory) + $RootDirectory, # ideally $(Build.SourcesDirectory) + $VsoVariable = "" # target devops output variable ) $target = $TargetDirectory.ToLower().Trim("/") $codeOwnersLocation = Join-Path $RootDirectory -ChildPath ".github/CODEOWNERS" @@ -29,6 +30,16 @@ $results = $ownedFolders[$target] if ($results) { Write-Host "Found a folder $results to match $target" + + if ($VsoVariable) { + $alreadyPresent = [System.Environment]::GetEnvironmentVariable($VsoVariable) + + if ($alreadyPresent) { + $results += ",$alreadyPresent" + } + Write-Host "##vso[task.setvariable variable=$VsoVariable;]$results" + } + return $results } else { From 39b1947c933d7424493a7f042923e58343372492 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu <31145988+chidozieononiwu@users.noreply.github.com> Date: Tue, 1 Sep 2020 17:29:53 -0700 Subject: [PATCH 045/168] Restructure ChangeLog Logic (#13592) --- eng/scripts/Language-Settings.ps1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index b3ec6dea7284b..d9a0e1c0ff83e 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -1,12 +1,12 @@ $Language = "java" -$Lang = "java" $PackageRepository = "Maven" $packagePattern = "*.pom" $MetadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/java-packages.csv" -function Extract-java-PkgProperties ($pkgPath, $serviceName, $pkgName) +function Get-java-PackageInfoFromRepo ($pkgPath, $serviceDirectory, $pkgName) { $projectPath = Join-Path $pkgPath "pom.xml" + if (Test-Path $projectPath) { $projectData = New-Object -TypeName XML @@ -17,7 +17,7 @@ function Extract-java-PkgProperties ($pkgPath, $serviceName, $pkgName) if ($projectPkgName -eq $pkgName) { - return [PackageProps]::new($pkgName, $pkgVersion.ToString(), $pkgPath, $serviceName, $pkgGroup) + return [PackageProps]::new($pkgName, $pkgVersion.ToString(), $pkgPath, $serviceDirectory, $pkgGroup) } } return $null @@ -29,7 +29,7 @@ function IsMavenPackageVersionPublished($pkgId, $pkgVersion, $groupId) try { $uri = "https://oss.sonatype.org/content/repositories/releases/$groupId/$pkgId/$pkgVersion/$pkgId-$pkgVersion.pom" - $pomContent = Invoke-RestMethod -MaximumRetryCount 3 -Method "GET" -uri $uri + $pomContent = Invoke-RestMethod -MaximumRetryCount 3 -RetryIntervalSec 10 -Method "GET" -uri $uri if ($pomContent -ne $null -or $pomContent.Length -eq 0) { @@ -57,7 +57,7 @@ function IsMavenPackageVersionPublished($pkgId, $pkgVersion, $groupId) } # Parse out package publishing information given a maven POM file -function Parse-java-Package($pkg, $workingDirectory) { +function Get-java-PackageInfoFromPackageFile ($pkg, $workingDirectory) { [xml]$contentXML = Get-Content $pkg $pkgId = $contentXML.project.artifactId @@ -83,6 +83,7 @@ function Parse-java-Package($pkg, $workingDirectory) { return New-Object PSObject -Property @{ PackageId = $pkgId + GroupId = $groupId PackageVersion = $pkgVersion Deployable = $forceCreate -or !(IsMavenPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion -groupId $groupId.Replace(".", "/")) ReleaseNotes = $releaseNotes @@ -91,7 +92,7 @@ function Parse-java-Package($pkg, $workingDirectory) { } # Stage and Upload Docs to blob Storage -function StageAndUpload-java-Docs () +function Publish-java-GithubIODocs () { $PublishedDocs = Get-ChildItem "$DocLocation" | Where-Object -FilterScript {$_.Name.EndsWith("-javadoc.jar")} foreach ($Item in $PublishedDocs) From ed6476a9bda56c1c0e38e9ca0a80522ecd702f51 Mon Sep 17 00:00:00 2001 From: bsiegel <96068+bsiegel@users.noreply.github.com> Date: Tue, 1 Sep 2020 18:10:01 -0700 Subject: [PATCH 046/168] Handle OData property types (#14597) * Handle OData types when deserializing * Insert OData metadata properties when serializing * Add OData type test --- .../tables/TableServiceClientBuilder.java | 4 +- .../implementation/EntityDataModelType.java | 112 ++++++++++++++++++ .../implementation/TablesConstants.java | 5 + .../TablesJacksonSerializer.java | 94 +++++++++++---- .../data/tables/TablesAsyncClientTest.java | 51 ++++++++ ...eEntityWithAllSupportedDataTypesAsync.json | 79 ++++++++++++ 6 files changed, 321 insertions(+), 24 deletions(-) create mode 100644 sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/EntityDataModelType.java create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithAllSupportedDataTypesAsync.json diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClientBuilder.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClientBuilder.java index dc87236035f43..86e19b99d4fc8 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClientBuilder.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClientBuilder.java @@ -10,8 +10,8 @@ import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.data.tables.implementation.TablesJacksonSerializer; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; @@ -29,7 +29,7 @@ @ServiceClientBuilder(serviceClients = {TableServiceClient.class, TableServiceAsyncClient.class}) public class TableServiceClientBuilder { private final ClientLogger logger = new ClientLogger(TableServiceClientBuilder.class); - private final SerializerAdapter serializerAdapter = new TablesJacksonSerializer(); + private final SerializerAdapter serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); private final List policies; private String connectionString; private Configuration configuration; diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/EntityDataModelType.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/EntityDataModelType.java new file mode 100644 index 0000000000000..8581b8a37f235 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/EntityDataModelType.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables.implementation; + +import com.azure.core.util.Base64Util; + +import java.time.Instant; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.OffsetDateTime; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * Entity Data Model (EDM) types + */ +public enum EntityDataModelType { + /** + * Edm.Binary Represents fixed- or variable-length binary data + */ + BINARY("Edm.Binary", Base64Util::decodeString, byte[].class, Byte[].class), + + /** + * Edm.Boolean Represents the mathematical concept of binary-valued logic + */ + BOOLEAN("Edm.Boolean", Boolean::parseBoolean), + + /** + * Edm.DateTime Represents date and time with values ranging from 12:00:00 midnight, January 1, + * 1753 A.D. through 11:59:59 P.M, December 9999 A.D. + */ + DATE_TIME("Edm.DateTime", s -> + DateTimeFormatter.ISO_DATE_TIME.parseBest(s, OffsetDateTime::from, LocalDateTime::from), + OffsetDateTime.class, ZonedDateTime.class, Instant.class, LocalDateTime.class, LocalDate.class, Date.class), + + /** + * Edm.Double Represents a floating point number with 15 digits precision that can represent values + * with approximate range of +/- 2.23e -308 through +/- 1.79e +308 + */ + DOUBLE("Edm.Double", Double::parseDouble), + + /** + * Edm.Guid Represents a 16-byte (128-bit) unique identifier value + */ + GUID("Edm.Guid", UUID::fromString, UUID.class), + + /** + * Edm.Int32 Represents a signed 32-bit integer value + */ + INT32("Edm.Int32", Integer::parseInt), + + /** + * Edm.Int64 Represents a signed 64-bit integer value + */ + INT64("Edm.Int64", Long::parseLong, long.class, Long.class), + + /** + * Edm.String Represents fixed- or variable-length character data + */ + STRING("Edm.String", String::toString); + + private final String edmType; + private final Function deserializer; + private final Set> typesToAnnotate; + + EntityDataModelType(String edmType, Function deserializer, Class... typesToAnnotate) { + this.edmType = edmType; + this.deserializer = deserializer; + + if (typesToAnnotate.length == 0) { + this.typesToAnnotate = Collections.emptySet(); + } else if (typesToAnnotate.length == 1) { + this.typesToAnnotate = Collections.singleton(typesToAnnotate[0]); + } else { + this.typesToAnnotate = Arrays.stream(typesToAnnotate).collect(Collectors.toCollection(HashSet::new)); + } + } + + public static EntityDataModelType fromString(String edmType) { + for (EntityDataModelType value : EntityDataModelType.values()) { + if (value.edmType.equals(edmType)) { + return value; + } + } + return null; + } + + public static EntityDataModelType forClass(Class clazz) { + for (EntityDataModelType value : EntityDataModelType.values()) { + if (value.typesToAnnotate.contains(clazz)) { + return value; + } + } + return null; + } + + public String getEdmType() { + return edmType; + } + + public Object deserialize(String value) { + return deserializer.apply(value); + } +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java index 66e0380930c61..a1bf50f4e40de 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesConstants.java @@ -52,6 +52,11 @@ public final class TablesConstants { */ public static final String ODATA_TYPE_KEY = "odata.type"; + /** + * Name suffix expressing the value's type + */ + public static final String ODATA_TYPE_KEY_SUFFIX = "@odata.type"; + /** * Name in the map for the table or entity's ID. */ diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java index 4f840de467343..4130a1a30d56e 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesJacksonSerializer.java @@ -11,10 +11,9 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.time.format.DateTimeParseException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -27,6 +26,53 @@ public class TablesJacksonSerializer extends JacksonAdapter { private final ClientLogger logger = new ClientLogger(TablesJacksonSerializer.class); + @Override + public void serialize(Object object, SerializerEncoding encoding, OutputStream outputStream) throws IOException { + if (object instanceof Map) { + super.serialize(insertTypeProperties(object), encoding, outputStream); + } else { + super.serialize(object, encoding, outputStream); + } + } + + @SuppressWarnings("unchecked") + private Map insertTypeProperties(Object o) { + Map map = (Map) o; + Map result = new HashMap<>(); + + for (Map.Entry entry : map.entrySet()) { + String propertyName = entry.getKey(); + Object propertyValue = entry.getValue(); + + // Skip entries with null values + if (propertyValue == null) { + continue; + } + + if (propertyValue instanceof Long) { + // Long values must be represented as a JSON string with a type annotation + result.put(propertyName, String.valueOf(propertyValue)); + } else { + result.put(propertyName, propertyValue); + } + + if (TablesConstants.METADATA_KEYS.contains(propertyName) + || propertyName.endsWith(TablesConstants.ODATA_TYPE_KEY_SUFFIX)) { + continue; + } + + EntityDataModelType typeToTag = EntityDataModelType.forClass(propertyValue.getClass()); + if (typeToTag == null) { + continue; + } + + // Use putIfAbsent to avoid overwriting a user's custom OData type annotation + result.putIfAbsent(propertyName + TablesConstants.ODATA_TYPE_KEY_SUFFIX, typeToTag.getEdmType()); + } + + return result; + } + @Override public U deserialize(String value, Type type, SerializerEncoding serializerEncoding) throws IOException { if (type == TableEntityQueryResponse.class) { @@ -99,7 +145,7 @@ private U deserializeTableEntityQueryResponse(InputStream inputStream) throw .setValue(values); } - private Map getEntityFieldsAsMap(JsonNode node) { + private Map getEntityFieldsAsMap(JsonNode node) throws IOException { Map result = new HashMap<>(); for (Iterator it = node.fieldNames(); it.hasNext();) { String fieldName = it.next(); @@ -108,26 +154,30 @@ private Map getEntityFieldsAsMap(JsonNode node) { return result; } - private Object getEntityFieldAsObject(JsonNode parentNode, String fieldName) { + private Object getEntityFieldAsObject(JsonNode parentNode, String fieldName) throws IOException { JsonNode valueNode = parentNode.get(fieldName); - if (!TablesConstants.METADATA_KEYS.contains(fieldName) && !fieldName.endsWith("@odata.type")) { - JsonNode typeNode = parentNode.get(fieldName + "@odata.type"); - if (typeNode != null) { - String type = typeNode.asText(); - switch (type) { - case "Edm.DateTime": - try { - return OffsetDateTime.parse(valueNode.asText()); - } catch (DateTimeParseException e) { - throw logger.logExceptionAsError(new IllegalArgumentException(String.format( - "'%s' value is not a valid OffsetDateTime.", TablesConstants.TIMESTAMP_KEY), e)); - } - default: - logger.warning(String.format("'%s' value has unknown OData type '%s'", fieldName, type)); - break; // Fallthrough to the default return value - } - } + if (TablesConstants.METADATA_KEYS.contains(fieldName) + || fieldName.endsWith(TablesConstants.ODATA_TYPE_KEY_SUFFIX)) { + return serializer().treeToValue(valueNode, Object.class); + } + + JsonNode typeNode = parentNode.get(fieldName + TablesConstants.ODATA_TYPE_KEY_SUFFIX); + if (typeNode == null) { + return serializer().treeToValue(valueNode, Object.class); + } + + String typeString = typeNode.asText(); + EntityDataModelType type = EntityDataModelType.fromString(typeString); + if (type == null) { + logger.warning(String.format("'%s' value has unknown OData type %s", fieldName, typeString)); + return serializer().treeToValue(valueNode, Object.class); + } + + try { + return type.deserialize(valueNode.asText()); + } catch (Exception e) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format( + "'%s' value is not a valid %s.", fieldName, type.getEdmType()), e)); } - return valueNode.asText(); } } diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java index 5b90f427dc958..1911a40abd17b 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java @@ -18,7 +18,10 @@ import reactor.test.StepVerifier; import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Date; import java.util.Map; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -144,6 +147,54 @@ void createEntityWithResponseAsync() { .verify(); } + @Test + void createEntityWithAllSupportedDataTypesAsync() { + // Arrange + final String partitionKeyValue = testResourceNamer.randomName("partitionKey", 20); + final String rowKeyValue = testResourceNamer.randomName("rowKey", 20); + final TableEntity tableEntity = new TableEntity(partitionKeyValue, rowKeyValue); + + final boolean booleanValue = true; + final byte[] binaryValue = "Test value".getBytes(); + final Date dateValue = new Date(); + final OffsetDateTime offsetDateTimeValue = OffsetDateTime.now(); + final double doubleValue = 2.0d; + final UUID guidValue = UUID.randomUUID(); + final int int32Value = 1337; + final long int64Value = 1337L; + final String stringValue = "This is table entity"; + + tableEntity.addProperty("BinaryTypeProperty", binaryValue); + tableEntity.addProperty("BooleanTypeProperty", booleanValue); + tableEntity.addProperty("DateTypeProperty", dateValue); + tableEntity.addProperty("OffsetDateTimeTypeProperty", offsetDateTimeValue); + tableEntity.addProperty("DoubleTypeProperty", doubleValue); + tableEntity.addProperty("GuidTypeProperty", guidValue); + tableEntity.addProperty("Int32TypeProperty", int32Value); + tableEntity.addProperty("Int64TypeProperty", int64Value); + tableEntity.addProperty("StringTypeProperty", stringValue); + + tableClient.createEntity(tableEntity).block(TIMEOUT); + + // Act & Assert + StepVerifier.create(tableClient.getEntityWithResponse(partitionKeyValue, rowKeyValue)) + .assertNext(response -> { + final TableEntity entity = response.getValue(); + Map properties = entity.getProperties(); + assertTrue(properties.get("BinaryTypeProperty") instanceof byte[]); + assertTrue(properties.get("BooleanTypeProperty") instanceof Boolean); + assertTrue(properties.get("DateTypeProperty") instanceof OffsetDateTime); + assertTrue(properties.get("OffsetDateTimeTypeProperty") instanceof OffsetDateTime); + assertTrue(properties.get("DoubleTypeProperty") instanceof Double); + assertTrue(properties.get("GuidTypeProperty") instanceof UUID); + assertTrue(properties.get("Int32TypeProperty") instanceof Integer); + assertTrue(properties.get("Int64TypeProperty") instanceof Long); + assertTrue(properties.get("StringTypeProperty") instanceof String); + }) + .expectComplete() + .verify(); + } + @Test void deleteTableAsync() { // Act & Assert diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithAllSupportedDataTypesAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithAllSupportedDataTypesAsync.json new file mode 100644 index 0000000000000..039a3a7b373c6 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithAllSupportedDataTypesAsync.json @@ -0,0 +1,79 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "45469cdb-8e1b-4d39-af22-903d90eb4dac", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Tue, 01 Sep 2020 09:09:13 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename1410928e')", + "Content-Length" : "0", + "x-ms-request-id" : "c8af5d7d-8002-007e-423f-805a1b000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "45469cdb-8e1b-4d39-af22-903d90eb4dac", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename1410928e')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/tablename1410928e", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "66b90cd1-3fd9-42c4-a95a-c9a7766e6fdb", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Tue, 01 Sep 2020 09:09:14 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-09-01T09%3A09%3A14.7106597Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')", + "Content-Length" : "0", + "x-ms-request-id" : "c8af5d97-8002-007e-593f-805a1b000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "66b90cd1-3fd9-42c4-a95a-c9a7766e6fdb", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')?$format=application/json%3Bodata%3Dfullmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "1298b5be-8b23-47b5-b083-e356d1ee4f49" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 01 Sep 2020 09:09:14 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/datetime'2020-09-01T09%3A09%3A14.7106597Z'", + "x-ms-request-id" : "c8af5da1-8002-007e-603f-805a1b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename1410928e/@Element\",\"odata.type\":\"brsiegelsample.tablename1410928e\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')\",\"odata.etag\":\"W/\\\"datetime'2020-09-01T09%3A09%3A14.7106597Z'\\\"\",\"odata.editLink\":\"tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')\",\"PartitionKey\":\"partitionkey06883c\",\"RowKey\":\"rowkey60363fa81\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-01T09:09:14.7106597Z\",\"Int32TypeProperty\":1337,\"DateTypeProperty@odata.type\":\"Edm.DateTime\",\"DateTypeProperty\":\"2020-09-01T09:09:14.66Z\",\"BooleanTypeProperty\":true,\"OffsetDateTimeTypeProperty@odata.type\":\"Edm.DateTime\",\"OffsetDateTimeTypeProperty\":\"2020-09-01T09:09:14.660377Z\",\"BinaryTypeProperty@odata.type\":\"Edm.Binary\",\"BinaryTypeProperty\":\"VGVzdCB2YWx1ZQ==\",\"Int64TypeProperty@odata.type\":\"Edm.Int64\",\"Int64TypeProperty\":\"1337\",\"StringTypeProperty\":\"This is table entity\",\"GuidTypeProperty@odata.type\":\"Edm.Guid\",\"GuidTypeProperty\":\"a50ad59d-7f9c-4c75-aa3c-bd3bb3a2930b\",\"DoubleTypeProperty\":2.0}", + "x-ms-client-request-id" : "1298b5be-8b23-47b5-b083-e356d1ee4f49", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "tablename1410928e", "partitionkey06883c", "rowkey60363fa81" ] +} \ No newline at end of file From 5b1b54daa472e99765375e416e630748b555c8df Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 1 Sep 2020 19:35:50 -0700 Subject: [PATCH 047/168] Sync eng/common directory with azure-sdk-tools repository for Tools PR 930 (#14532) --- eng/common/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eng/common/README.md b/eng/common/README.md index 227a572db2d8c..10fcb49f2a888 100644 --- a/eng/common/README.md +++ b/eng/common/README.md @@ -19,5 +19,7 @@ The 'Sync eng/common directory' PRs will be created in the language repositories 2. `azure-sdk-tools - sync - eng-common` is run automatically. It creates **Sync PRs** in each of the connected language repositories using the format `Sync eng/common directory with azure-sdk-tools for PR {Tools PR Number}`. Each **Sync PR** will contain a link back to the **Tools PR** that triggered it. 3. More changes pushed to the **Tools PR**, will automatically triggered new pipeline runs in the respective **Sync PRs**. The **Sync PRs** are used to make sure the changes would not break any of the connected pipelines. 4. Once satisfied with the changes; - - First merge all the **Sync PRs**. The **Tools PR** contains links to all the **Sync PRs** - - Finally merge the **Tools PR**. Each **Sync PR** contains the link to the corresponding **Tools PR**. \ No newline at end of file + - First make sure all checks in the **Sync PRs** are green and approved. The **Tools PR** contains links to all the **Sync PRs**. If for some reason the PRs is blocked by a CI gate get someone with permission to override and manually merge the PR. + - To test the state of all the **Sync PRs**, you can download the `PRsCreated.txt` artifact from the `azure-sdk-tools - sync - eng-common` pipeline, with that run the [Verify-And-Merge-PRs.ps1](https://github.com/Azure/azure-sdk-tools/blob/master/scripts/powershell/Verify-And-Merge-PRs.ps1) passing the downloaded `PRsCreated.txt` file path for `PRDataArtifactPath` and `false` to `ShouldMerge`. + - Next approve the `VerifyAndMerge` job for the `azure-sdk-tools - sync - eng-common` pipeline triggered by your **Tools PR** which will automatically merge all the **Sync PRs**. You need `azure-sdk` devops contributor permissions to reach the `azure-sdk-tools - sync - eng-common` pipeline. + - Finally merge the **Tools PR**. \ No newline at end of file From 51b2e322e2e870c026f30b0fa76361949952b7ca Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Wed, 2 Sep 2020 14:48:41 +0800 Subject: [PATCH 048/168] mgmt update test config variable (#14725) --- .../azure/resourcemanager/test/ResourceManagerTestBase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java index 852ef36a4772a..b346d89380478 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java @@ -48,6 +48,7 @@ public abstract class ResourceManagerTestBase extends TestBase { private static final String ZERO_TENANT = "00000000-0000-0000-0000-000000000000"; private static final String PLAYBACK_URI_BASE = "http://localhost:"; private static final String AZURE_AUTH_LOCATION = "AZURE_AUTH_LOCATION"; + private static final String AZURE_TEST_LOG_LEVEL = "AZURE_TEST_LOG_LEVEL"; private static final String HTTPS_PROXY_HOST = "https.proxyHost"; private static final String HTTPS_PROXY_PORT = "https.proxyPort"; private static final String HTTP_PROXY_HOST = "http.proxyHost"; @@ -126,7 +127,7 @@ protected void beforeTest() { TokenCredential credential; HttpPipeline httpPipeline; Map textReplacementRules = new HashMap<>(); - String logLevel = Configuration.getGlobalConfiguration().get(Configuration.PROPERTY_AZURE_LOG_LEVEL); + String logLevel = Configuration.getGlobalConfiguration().get(AZURE_TEST_LOG_LEVEL); HttpLogDetailLevel httpLogDetailLevel; try { From 25d8d5a82ed99e722cdba814fd4fe21cb6735ef7 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Wed, 2 Sep 2020 14:49:06 +0800 Subject: [PATCH 049/168] mgmt appplatform remove beta annotation (#14724) --- .../com/azure/resourcemanager/appplatform/models/SpringApp.java | 2 -- .../resourcemanager/appplatform/models/SpringAppDeployment.java | 2 -- .../appplatform/models/SpringAppDeployments.java | 2 -- .../resourcemanager/appplatform/models/SpringAppDomains.java | 2 -- .../appplatform/models/SpringAppServiceBindings.java | 2 -- .../azure/resourcemanager/appplatform/models/SpringApps.java | 2 -- .../azure/resourcemanager/appplatform/models/SpringService.java | 2 -- .../appplatform/models/SpringServiceCertificates.java | 2 -- .../resourcemanager/appplatform/models/SpringServices.java | 2 -- 9 files changed, 18 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java index db86874da7eed..c09dfc7a8499f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.appplatform.models; import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.fluent.inner.AppResourceInner; import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; import com.azure.resourcemanager.resources.fluentcore.model.Appliable; @@ -17,7 +16,6 @@ /** An immutable client-side representation of an Azure Spring App. */ @Fluent -@Beta public interface SpringApp extends ExternalChildResource, HasInner, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java index f9c3b572e63b4..ef0b8a8fd5598 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.appplatform.models; import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.fluent.inner.DeploymentResourceInner; import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; import com.azure.resourcemanager.resources.fluentcore.model.Appliable; @@ -20,7 +19,6 @@ /** An immutable client-side representation of an Azure Spring App Deployment. */ @Fluent -@Beta public interface SpringAppDeployment extends ExternalChildResource, HasInner, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployments.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployments.java index 17918b6497b79..2d2f750f280e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployments.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployments.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.appplatform.models; import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.DeploymentsClient; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +18,6 @@ /** Entry point for Spring App Deployments API. */ @Fluent -@Beta public interface SpringAppDeployments extends HasManager, HasInner, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomains.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomains.java index be102f9672847..5f2c5cb75b07e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomains.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomains.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.appplatform.models; import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.CustomDomainsClient; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +18,6 @@ /** Entry point for Spring App Custom Domains API. */ @Fluent -@Beta public interface SpringAppDomains extends HasManager, HasInner, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBindings.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBindings.java index 93573416739cb..280734f286195 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBindings.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBindings.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.appplatform.models; import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.BindingsClient; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; @@ -18,7 +17,6 @@ /** Entry point for Spring App Service Bindings API. */ @Fluent -@Beta public interface SpringAppServiceBindings extends HasManager, HasInner, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApps.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApps.java index d2cb8fe70155d..544aaf72c16e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApps.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApps.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.appplatform.models; import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.AppsClient; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +18,6 @@ /** Entry point for Spring Apps API. */ @Fluent -@Beta public interface SpringApps extends HasManager, HasInner, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringService.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringService.java index 6753a9d23eeed..1b0d7a757d961 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringService.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringService.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.appplatform.models; import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.inner.ServiceResourceInner; import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; @@ -17,7 +16,6 @@ /** An immutable client-side representation of an Azure Spring Service. */ @Fluent -@Beta public interface SpringService extends GroupableResource, Refreshable, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificates.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificates.java index 22d36f5210441..ce5936d7eda56 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificates.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificates.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.appplatform.models; import com.azure.core.annotation.Fluent; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.CertificatesClient; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; @@ -18,7 +17,6 @@ /** Entry point for Spring Service Certificates API. */ @Fluent -@Beta public interface SpringServiceCertificates extends HasManager, HasInner, diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServices.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServices.java index 7219419817719..3cec47a815767 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServices.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServices.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.ServicesClient; import com.azure.resourcemanager.resources.fluentcore.arm.Region; @@ -23,7 +22,6 @@ /** Entry point for Spring Service management API. */ @Fluent -@Beta public interface SpringServices extends HasManager, HasInner, From fbd12ff65b416c483f9b0b320e34ad50e4c916dc Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Wed, 2 Sep 2020 17:20:13 +0800 Subject: [PATCH 050/168] mgmt update maven profile (#14728) * mgmt update maven build profile * move TestUtilities to azure-resourcemanager-test * update TestUtilities --- .../azure-resourcemanager-appplatform/pom.xml | 5 ++-- .../azure-resourcemanager-appservice/pom.xml | 5 ++-- .../appservice/FunctionAppsTests.java | 2 +- .../FunctionDeploymentSlotsTests.java | 2 +- .../appservice/WebAppsTests.java | 2 +- .../appservice/ZipDeployTests.java | 2 +- .../pom.xml | 5 ++-- .../azure-resourcemanager-compute/pom.xml | 5 ++-- .../compute/ComputeSkuTests.java | 2 +- .../compute/ComputeUsageOperationsTests.java | 2 +- .../compute/ManagedDiskOperationsTests.java | 2 +- .../compute/SharedGalleryImageTests.java | 2 +- ...rtualMachineCustomImageOperationsTest.java | 2 +- ...lMachineExtensionImageOperationsTests.java | 2 +- .../VirtualMachineImageOperationsTests.java | 2 +- ...lMachineRelatedResourcesDeletionTests.java | 2 +- ...ineScaleSetManagedDiskOperationsTests.java | 2 +- ...VirtualMachineScaleSetOperationsTests.java | 2 +- .../pom.xml | 5 ++-- .../pom.xml | 5 ++-- .../pom.xml | 5 ++-- .../azure-resourcemanager-cosmos/pom.xml | 5 ++-- .../azure-resourcemanager-dns/pom.xml | 5 ++-- .../dns/DnsZoneRecordSetETagTests.java | 2 +- .../azure-resourcemanager-eventhubs/pom.xml | 5 ++-- .../eventhubs/EventHubTests.java | 2 +- .../azure-resourcemanager-keyvault/pom.xml | 5 ++-- .../resourcemanager/keyvault/KeyTests.java | 2 +- .../azure-resourcemanager-monitor/pom.xml | 5 ++-- .../monitor/ActionGroupsTests.java | 2 +- .../resourcemanager/monitor/AlertsTests.java | 2 +- .../monitor/AutoscaleTests.java | 2 +- .../MonitorActivityAndMetricsTests.java | 2 +- .../azure-resourcemanager-msi/pom.xml | 5 ++-- .../azure-resourcemanager-network/pom.xml | 5 ++-- .../ApplicationSecurityGroupTests.java | 2 +- .../network/DdosProtectionPlanTests.java | 2 +- .../network/NetworkUsageOperationsTests.java | 2 +- .../network/RouteFilterTests.java | 2 +- .../azure-resourcemanager-privatedns/pom.xml | 5 ++-- .../PrivateDnsZoneRecordSetETagTests.java | 2 +- .../VirtualNetworkLinkETagTests.java | 2 +- .../azure-resourcemanager-redis/pom.xml | 5 ++-- .../azure-resourcemanager-resources/pom.xml | 25 +++++++++++++----- .../resources/DeploymentsTests.java | 2 +- .../resources/PolicyTests.java | 2 +- .../resources/ProvidersTests.java | 2 +- .../resources/SubscriptionsTests.java | 2 +- .../resources/TenantsTests.java | 2 +- .../azure-resourcemanager-samples/pom.xml | 5 ++-- .../azure-resourcemanager-sql/pom.xml | 5 ++-- .../azure-resourcemanager-storage/pom.xml | 5 ++-- .../storage/UsageOperationsTests.java | 2 +- .../azure-resourcemanager-test/pom.xml | 7 ----- .../test/utils}/TestUtilities.java | 26 ++++++++++++++++--- .../pom.xml | 5 ++-- .../azure-resourcemanager/pom.xml | 5 ++-- .../com/azure/resourcemanager/AzureTests.java | 2 +- .../resourcemanager/TestAvailabilitySet.java | 2 +- .../azure/resourcemanager/TestNetwork.java | 2 +- .../azure/resourcemanager/TestTemplate.java | 2 +- .../TestVirtualMachineSizes.java | 2 +- .../TestVirtualNetworkGateway.java | 2 +- 63 files changed, 121 insertions(+), 120 deletions(-) rename sdk/resourcemanager/{azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core => azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/utils}/TestUtilities.java (57%) diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml index 474e87b6d9ce6..6e2cc54d4918d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml @@ -125,9 +125,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml index 1c48300d3d250..ee22f52dde41e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml @@ -140,9 +140,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionAppsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionAppsTests.java index 6dc89c3618080..07ec7d7e350b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionAppsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionAppsTests.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.appservice.models.FunctionRuntimeStack; import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.appservice.models.SkuName; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionDeploymentSlotsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionDeploymentSlotsTests.java index 0195c1822b4a5..1d56a83963cca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionDeploymentSlotsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/FunctionDeploymentSlotsTests.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.appservice.models.FunctionDeploymentSlot; import com.azure.resourcemanager.appservice.models.PricingTier; import com.azure.resourcemanager.appservice.models.PythonVersion; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import java.util.Map; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java index 9583fab9a4be5..3b0388a4c0605 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.appservice.models.RemoteVisualStudioVersion; import com.azure.resourcemanager.appservice.models.WebApp; import com.azure.resourcemanager.appservice.models.WebAppRuntimeStack; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/ZipDeployTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/ZipDeployTests.java index 1ecf6426bdf7c..89eb46a10a520 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/ZipDeployTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/ZipDeployTests.java @@ -7,7 +7,7 @@ import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.appservice.models.FunctionApp; import com.azure.resourcemanager.appservice.models.FunctionEnvelope; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml index 0936f8a871176..6e2c4a8d78a72 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml @@ -96,9 +96,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml index bf1c11ec94dd0..3a44981d6871e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml @@ -152,9 +152,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeSkuTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeSkuTests.java index 298fe5abf0d20..8abe7592c2403 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeSkuTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeSkuTests.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.compute.models.ComputeResourceType; import com.azure.resourcemanager.compute.models.ComputeSku; import com.azure.resourcemanager.compute.models.EncryptionStatus; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import java.util.HashSet; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeUsageOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeUsageOperationsTests.java index cc8714a634511..7a1d2a28fb65f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeUsageOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ComputeUsageOperationsTests.java @@ -5,7 +5,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.compute.models.ComputeUsage; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ManagedDiskOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ManagedDiskOperationsTests.java index 935e3a9ba7e05..f6026861bef64 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ManagedDiskOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/ManagedDiskOperationsTests.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.compute.models.Snapshot; import com.azure.resourcemanager.compute.models.SnapshotSkuType; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/SharedGalleryImageTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/SharedGalleryImageTests.java index f4ce90d18c140..f9d1cf69f4ca4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/SharedGalleryImageTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/SharedGalleryImageTests.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineCustomImage; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.compute.models.VirtualMachineUnmanagedDataDisk; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineCustomImageOperationsTest.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineCustomImageOperationsTest.java index 6c39d0cbc8dd5..d3f6180f197cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineCustomImageOperationsTest.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineCustomImageOperationsTest.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineDataDisk; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.compute.models.VirtualMachineUnmanagedDataDisk; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionImageOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionImageOperationsTests.java index 64e4083cefdbb..de71f2f79e522 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionImageOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionImageOperationsTests.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineExtensionImageVersion; import com.azure.resourcemanager.compute.models.VirtualMachineExtensionImageVersions; import com.azure.resourcemanager.compute.models.VirtualMachinePublisher; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineImageOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineImageOperationsTests.java index 1a7ddb570b450..ed5a74ba4620a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineImageOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineImageOperationsTests.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachineOffer; import com.azure.resourcemanager.compute.models.VirtualMachinePublisher; import com.azure.resourcemanager.compute.models.VirtualMachineSku; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineRelatedResourcesDeletionTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineRelatedResourcesDeletionTests.java index 7405d6b9397c6..dfc70ca598bd9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineRelatedResourcesDeletionTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineRelatedResourcesDeletionTests.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.network.models.NetworkInterface; import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetManagedDiskOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetManagedDiskOperationsTests.java index 0bd121a3e4454..776278b85d649 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetManagedDiskOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetManagedDiskOperationsTests.java @@ -20,7 +20,7 @@ import com.azure.resourcemanager.network.models.LoadBalancer; import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java index 236b8030c2ca5..f0ae86ea46041 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java @@ -46,7 +46,7 @@ import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNicIpConfiguration; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml index 8158cf7d4bb98..6b9e8da1391ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml @@ -111,9 +111,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml index 34b968a338b5a..112e477fef4fa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml @@ -97,9 +97,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml index 93e979909fdf6..ea86ee56cf0df 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml @@ -92,9 +92,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml index 7ec4aca7a4fd6..5c76744b75df2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml @@ -104,9 +104,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml index b51f000f884e9..da8c7fe564be5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml @@ -102,9 +102,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/test/java/com/azure/resourcemanager/dns/DnsZoneRecordSetETagTests.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/test/java/com/azure/resourcemanager/dns/DnsZoneRecordSetETagTests.java index 0e4362bc5cf96..a9628550d63ef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/test/java/com/azure/resourcemanager/dns/DnsZoneRecordSetETagTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/test/java/com/azure/resourcemanager/dns/DnsZoneRecordSetETagTests.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.dns.models.CaaRecordSet; import com.azure.resourcemanager.dns.models.DnsZone; import com.azure.resourcemanager.dns.models.ZoneType; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml index 8bc0234f55447..ef47a1a3d99e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml @@ -95,9 +95,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java index 4b4a0fc52581e..aa46bd2c033a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java @@ -23,7 +23,7 @@ import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceSkuType; import com.azure.resourcemanager.eventhubs.models.ProvisioningStateDR; import com.azure.resourcemanager.resources.ResourceManager; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.core.management.profile.AzureProfile; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml index 75b96fff9410b..dd4d786bdbd0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml @@ -111,9 +111,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyTests.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyTests.java index 4ab0165e3b344..74fb74f3b3e98 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/KeyTests.java @@ -7,7 +7,7 @@ import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.keyvault.models.Key; import com.azure.resourcemanager.keyvault.models.Vault; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml index 86fcf43ddc985..77053ba32de57 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml @@ -116,9 +116,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java index 66024a7827afd..ca3b102bd2240 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java @@ -6,7 +6,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.monitor.models.ActionGroup; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java index 2dcbd037c9249..be8c6ddaf6dfb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.monitor.models.MetricAlertRuleTimeAggregation; import com.azure.resourcemanager.monitor.models.MetricDimension; import com.azure.resourcemanager.monitor.models.MetricDynamicAlertCondition; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java index b0ccaee46dd56..7a8e3e3ac24cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java @@ -18,7 +18,7 @@ import com.azure.resourcemanager.monitor.models.ScaleRule; import com.azure.resourcemanager.monitor.models.ScaleType; import com.azure.resourcemanager.monitor.models.TimeAggregationType; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java index 515757d3a4fe3..bdf28b7a681a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.monitor.models.MetricCollection; import com.azure.resourcemanager.monitor.models.MetricDefinition; import com.azure.resourcemanager.monitor.models.ResultType; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml index 2b6e3173eb2e6..6a99b3e819642 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml @@ -97,9 +97,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml index e7099afae1c1f..8ec947c300a75 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml @@ -114,9 +114,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationSecurityGroupTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationSecurityGroupTests.java index 11405e7ea3c3a..160aea36ca783 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationSecurityGroupTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/ApplicationSecurityGroupTests.java @@ -5,7 +5,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.models.ApplicationSecurityGroup; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java index e7736985fbd6f..fb5aa2920959b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java @@ -4,7 +4,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.models.DdosProtectionPlan; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkUsageOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkUsageOperationsTests.java index c1826d5c2bfa0..2639f77fee690 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkUsageOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkUsageOperationsTests.java @@ -5,7 +5,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.models.NetworkUsage; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/RouteFilterTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/RouteFilterTests.java index ec9aab5b15a87..e107015f5ff2b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/RouteFilterTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/RouteFilterTests.java @@ -6,7 +6,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.models.Access; import com.azure.resourcemanager.network.models.RouteFilter; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml index 2b1242f3ac55b..d128f6bb098e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml @@ -96,9 +96,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneRecordSetETagTests.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneRecordSetETagTests.java index f40f0bd874477..7a5800827470d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneRecordSetETagTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneRecordSetETagTests.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.privatedns.models.AaaaRecordSet; import com.azure.resourcemanager.privatedns.models.CnameRecordSet; import com.azure.resourcemanager.privatedns.models.PrivateDnsZone; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.ResourceManager; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/VirtualNetworkLinkETagTests.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/VirtualNetworkLinkETagTests.java index 8301ac875c706..8e000d0a62b2e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/VirtualNetworkLinkETagTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/java/com/azure/resourcemanager/privatedns/VirtualNetworkLinkETagTests.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.privatedns.models.PrivateDnsZone; import com.azure.resourcemanager.privatedns.models.VirtualNetworkLink; import com.azure.resourcemanager.resources.ResourceManager; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml index 8959971c9396c..1d1d8b8a88783 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml @@ -102,9 +102,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml index 1ddb5ed862065..fdfbea79ce120 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml @@ -96,6 +96,24 @@ test + + + azure-mgmt-sdk-test-jar + + + !maven.test.skip + + + + + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 + test + + + + @@ -109,13 +127,6 @@ org.apache.maven.plugins maven-jar-plugin 3.1.2 - - - - test-jar - - - diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java index 8d59653d56453..05fc6754d3e3d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java @@ -9,7 +9,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollResponse; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Accepted; import com.azure.core.management.profile.AzureProfile; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java index bac87781c2e31..819a513cf2936 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.resources; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.models.PolicyAssignment; import com.azure.resourcemanager.resources.models.PolicyDefinition; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ProvidersTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ProvidersTests.java index 324be2fa6a68a..caf3c356d3017 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ProvidersTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/ProvidersTests.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.resources; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.Provider; import com.azure.resourcemanager.resources.models.ProviderResourceType; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/SubscriptionsTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/SubscriptionsTests.java index 0324ac2b9a5bc..312dd5b159867 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/SubscriptionsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/SubscriptionsTests.java @@ -5,7 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.Location; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TenantsTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TenantsTests.java index 6c2b3618eac39..bb66aed6eac23 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TenantsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/TenantsTests.java @@ -5,7 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluent.inner.TenantIdDescriptionInner; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index 2c55fc7dcefba..a48dfa03796a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -176,9 +176,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml index 82cc6c748cb13..9ce3764a4affa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml @@ -101,9 +101,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml index 46eef75819927..0d825167a078f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml @@ -97,9 +97,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/UsageOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/UsageOperationsTests.java index 4367db3415c7f..1415d22dea332 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/UsageOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/UsageOperationsTests.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.storage; import com.azure.core.http.rest.PagedIterable; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.storage.fluent.inner.UsageInner; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml index 067124d963fed..160868c95a13c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml @@ -76,13 +76,6 @@ org.apache.maven.plugins maven-jar-plugin 3.1.2 - - - - test-jar - - - diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestUtilities.java b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/utils/TestUtilities.java similarity index 57% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestUtilities.java rename to sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/utils/TestUtilities.java index 22851b2160fbe..31193be20e910 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/core/TestUtilities.java +++ b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/utils/TestUtilities.java @@ -1,10 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.resourcemanager.resources.core; +package com.azure.resourcemanager.test.utils; import com.azure.core.http.rest.PagedIterable; +import java.util.Iterator; + /** * Common utility functions for the tests. */ @@ -13,6 +15,7 @@ public class TestUtilities { * Wrapper on the SdkContext.sleep, in case of record mode will not sleep, otherwise sleep. * * @param milliseconds time in milliseconds for which to sleep. + * @param isRecordMode the value indicates whether it is record mode. */ public static void sleep(int milliseconds, boolean isRecordMode) { if (isRecordMode) { @@ -24,15 +27,30 @@ public static void sleep(int milliseconds, boolean isRecordMode) { } } + /** + * Return the size of Iterable collection. + * + * @param iterable the Iterable collection. + * @param the type of the resource + * @return the size of the collection. + */ public static synchronized int getSize(Iterable iterable) { int res = 0; - - for (T t : iterable) { - res++; + Iterator iterator = iterable.iterator(); + while (iterator.hasNext()) { + iterator.next(); + ++res; } return res; } + /** + * Return whether the Iterable collection is empty. + * + * @param iterable the Iterable collection. + * @param the type of the resource + * @return if the collection is empty. + */ public static synchronized boolean isEmpty(PagedIterable iterable) { return !iterable.iterator().hasNext(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml index 6fefad1bcf51b..a380bf171bb49 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml @@ -97,9 +97,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 1685593ce4f4c..366d876ba194d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -204,9 +204,8 @@ com.azure.resourcemanager - azure-resourcemanager-resources - 2.0.0-beta.4 - test-jar + azure-resourcemanager-test + 2.0.0-beta.4 test diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java index c42bdf8fc9cf1..53492c1d2a94c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java @@ -44,7 +44,7 @@ import com.azure.resourcemanager.network.models.SecurityGroupView; import com.azure.resourcemanager.network.models.Topology; import com.azure.resourcemanager.network.models.VerificationIPFlow; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestAvailabilitySet.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestAvailabilitySet.java index c8a17cd8d75e6..b5790a7998bfc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestAvailabilitySet.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestAvailabilitySet.java @@ -6,7 +6,7 @@ import com.azure.resourcemanager.compute.models.AvailabilitySet; import com.azure.resourcemanager.compute.models.AvailabilitySets; import com.azure.resourcemanager.compute.models.VirtualMachineSize; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestNetwork.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestNetwork.java index 16e71f9d2a006..6a5d5091f42ea 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestNetwork.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestNetwork.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.network.models.ServiceEndpointType; import com.azure.resourcemanager.network.models.Subnet; import com.azure.resourcemanager.network.models.VirtualNetworkPeeringState; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.CreatedResources; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTemplate.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTemplate.java index ff0b157f726a9..6edbde8f07479 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTemplate.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTemplate.java @@ -5,7 +5,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.resources.models.ResourceGroups; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSizes.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSizes.java index 1995fe76c90b7..16a811f8b4772 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSizes.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSizes.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.compute.models.VirtualMachineSize; import com.azure.resourcemanager.compute.models.VirtualMachines; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import org.junit.jupiter.api.Assertions; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualNetworkGateway.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualNetworkGateway.java index a1a91d828b021..6ca9a0e4aa8c8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualNetworkGateway.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualNetworkGateway.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.network.models.VirtualNetworkGatewaySkuName; import com.azure.resourcemanager.network.models.VirtualNetworkGateways; import com.azure.resourcemanager.network.NetworkManager; -import com.azure.resourcemanager.resources.core.TestUtilities; +import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import java.io.File; From 17b944418ebc03a93925011bf23ce359ae7f243d Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Wed, 2 Sep 2020 17:20:56 +0800 Subject: [PATCH 051/168] Mgmt: update changelog (#14726) * update changelog * fix typo * minor change spelling in compute --- .../azure-resourcemanager-appplatform/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-appservice/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-authorization/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-compute/CHANGELOG.md | 5 +++-- .../azure-resourcemanager-containerinstance/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-containerregistry/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-containerservice/CHANGELOG.md | 5 +++-- .../azure-resourcemanager-cosmos/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-dns/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-eventhubs/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-keyvault/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-monitor/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-msi/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-network/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-privatedns/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-redis/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-resources/CHANGELOG.md | 9 +++++---- .../azure-resourcemanager-sql/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-storage/CHANGELOG.md | 4 ++-- .../azure-resourcemanager-trafficmanager/CHANGELOG.md | 4 ++-- sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md | 8 ++++++-- 21 files changed, 51 insertions(+), 44 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md index 277a90dc04c24..08476b843de45 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md @@ -1,9 +1,9 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) - Updated `api-version` to `2020-07-01` -- Add `defineActiveDeployment` and `getActiveDeployment` in SpringApp +- Added `defineActiveDeployment` and `getActiveDeployment` in SpringApp - Removed `withoutTemporaryDisk` and `withoutPersistentDisk` in SpringAppDeployment - Removed `withSettingsFromDeployment` in SpringAppDeployment - Removed `deployJar` and `deploySource` in SpringApp diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md index 003c434ede62c..4cabd7b58c813 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Fixed function app slot diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-authorization/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md index 9e32b2be45be8..fd360249242b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md @@ -1,5 +1,6 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- Support beginCreate/beginDelete for VirtualMachine and Disk +- Supported beginCreate/beginDelete for VirtualMachine and Disk +- Updated `runPowerShellScript` parameters in VirtualMachine diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerinstance/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md index 003c434ede62c..24ccaee88d2e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,5 +1,6 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated `api-version` to `2020-06-01` +- Add `withAgentPoolMode` in `KubernetesClusterAgentPool` diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-dns/CHANGELOG.md index 003c434ede62c..a9880e2324531 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-dns/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Disallowed setting access type diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md index 003c434ede62c..d573ad5df7d7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-monitor/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-msi/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-msi/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md index 52f115527f337..0e185fc7cfc8d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- Support beginCreate/beginDelete for PublicIpAddress and NetworkInterface +- Supported beginCreate/beginDelete for PublicIpAddress and NetworkInterface diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-privatedns/CHANGELOG.md index 003c434ede62c..d573ad5df7d7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md index 003c434ede62c..d573ad5df7d7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md index 9579ff0bb9cc6..afee53c305f81 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- Support `beginCreate` and `beginDelete` for `VirtualMachine`, `Disk`, `NetworkInterface`, `PublicIpAddress`. -- Remove `DateTimeDeserializer`, as it is in azure-core. -- Add `ReturnRequestIdHeaderPolicy`. It is added to pipeline by default. +- Updated `azure-core-management` dependency +- Supported `beginCreate` and `beginDelete` for `VirtualMachine`, `Disk`, `NetworkInterface`, `PublicIpAddress`. +- Removed `DateTimeDeserializer`, as it is in azure-core. +- Added `ReturnRequestIdHeaderPolicy`. It is added to pipeline by default. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-sql/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-sql/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md index 003c434ede62c..b18d13187911f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md index 003c434ede62c..d573ad5df7d7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index 003c434ede62c..acbe2654cf9e0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.4 (2020-09-02) -- TODO +- Added `PrivateDns` +- Added `Redis` +- Added `EventHubs` +- Added `TrafficMananger` +- Exposed `subscriptions`, `tenants` and `tenantId` API \ No newline at end of file From 3af01dfd02ef2e12de690373904e7087a435e1de Mon Sep 17 00:00:00 2001 From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com> Date: Wed, 2 Sep 2020 08:39:37 -0700 Subject: [PATCH 052/168] Added support for upload via input stream to a file (#14667) --- .../azure-storage-file-datalake/CHANGELOG.md | 4 +- .../datalake/DataLakeFileAsyncClient.java | 53 +- .../file/datalake/DataLakeFileClient.java | 67 ++ .../datalake/DataLakePathAsyncClient.java | 6 +- .../options/FileParallelUploadOptions.java | 210 ++++++ ...DataLakeFileAsyncClientJavaDocSamples.java | 49 +- .../DataLakeFileClientJavaDocSamples.java | 52 ++ .../storage/file/datalake/FileAPITest.groovy | 149 +++- ...Testbuffereduploadpermissionsandumask.json | 180 +++++ .../FileAPITestcreatepermissionsandumask.json | 139 ++-- .../FileAPITestuploadincorrectsize[0].json | 107 +++ .../FileAPITestuploadincorrectsize[1].json | 107 +++ .../FileAPITestuploadincorrectsize[2].json | 107 +++ .../FileAPITestuploadincorrectsize[3].json | 107 +++ ...FileAPITestuploadinputstreamlargedata.json | 234 ++++++ ...FileAPITestuploadinputstreamoverwrite.json | 179 +++++ ...PITestuploadinputstreamoverwritefails.json | 108 +++ ...ITestuploadinputstreamsingleupload[0].json | 179 +++++ ...ITestuploadinputstreamsingleupload[1].json | 179 +++++ ...ITestuploadinputstreamsingleupload[2].json | 179 +++++ .../FileAPITestuploadnumappends[0].json | 180 +++++ .../FileAPITestuploadnumappends[1].json | 705 ++++++++++++++++++ .../FileAPITestuploadnumappends[2].json | 180 +++++ .../FileAPITestuploadnumappends[3].json | 264 +++++++ .../FileAPITestuploadreturnvalue.json | 150 ++++ 25 files changed, 3766 insertions(+), 108 deletions(-) create mode 100644 sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/options/FileParallelUploadOptions.java create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestbuffereduploadpermissionsandumask.json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[0].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[1].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[2].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[3].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamlargedata.json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamoverwrite.json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamoverwritefails.json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[0].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[1].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[2].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[0].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[1].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[2].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[3].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadreturnvalue.json diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index ce98e236892e9..8ea58da2e23db 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -1,7 +1,9 @@ # Release History ## 12.3.0-beta.1 (Unreleased) - +- Added support to upload data to a file from an InputStream. +- Added support to specify permissions and umask when uploading a file. +- Fixed a bug where an empty string would be sent with the x-ms-properties header when metadata was null or empty. ## 12.2.0 (2020-08-13) - Fixed bug where Query Input Stream would throw when a ByteBuffer of length 0 was encountered. diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileAsyncClient.java index 0139c0e2fdf85..cb508b23c7760 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileAsyncClient.java @@ -14,8 +14,10 @@ import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.common.ParallelTransferOptions; import com.azure.storage.common.ProgressReporter; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.BufferAggregator; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.implementation.UploadBufferPool; import com.azure.storage.common.implementation.UploadUtils; import com.azure.storage.file.datalake.implementation.models.LeaseAccessConditions; @@ -26,6 +28,7 @@ import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.storage.file.datalake.models.DownloadRetryOptions; import com.azure.storage.file.datalake.models.FileQueryAsyncResponse; +import com.azure.storage.file.datalake.options.FileParallelUploadOptions; import com.azure.storage.file.datalake.options.FileQueryOptions; import com.azure.storage.file.datalake.models.FileRange; import com.azure.storage.file.datalake.models.FileReadAsyncResponse; @@ -47,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.Lock; @@ -262,29 +264,62 @@ public Mono> uploadWithResponse(Flux data, ParallelTransferOptions parallelTransferOptions, PathHttpHeaders headers, Map metadata, DataLakeRequestConditions requestConditions) { try { - Objects.requireNonNull(data, "'data' must not be null"); - DataLakeRequestConditions validatedRequestConditions = requestConditions == null - ? new DataLakeRequestConditions() : requestConditions; + return uploadWithResponse(new FileParallelUploadOptions(data) + .setParallelTransferOptions(parallelTransferOptions).setHeaders(headers).setMetadata(metadata) + .setRequestConditions(requestConditions)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Creates a new file. + *

    + * To avoid overwriting, pass "*" to {@link DataLakeRequestConditions#setIfNoneMatch(String)}. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadWithResponse#FileParallelUploadOptions} + * + *

    Using Progress Reporting

    + * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadWithResponse#FileParallelUploadOptions.ProgressReporter} + * + * @param options {@link FileParallelUploadOptions} + * @return A reactive response containing the information of the uploaded file. + */ + public Mono> uploadWithResponse(FileParallelUploadOptions options) { + try { + StorageImplUtils.assertNotNull("options", options); + DataLakeRequestConditions validatedRequestConditions = options.getRequestConditions() == null + ? new DataLakeRequestConditions() : options.getRequestConditions(); /* Since we are creating a file with the request conditions, everything but lease id becomes invalid after creation, so remove them for the append/flush calls. */ DataLakeRequestConditions validatedUploadRequestConditions = new DataLakeRequestConditions() .setLeaseId(validatedRequestConditions.getLeaseId()); final ParallelTransferOptions validatedParallelTransferOptions = - ModelHelper.populateAndApplyDefaults(parallelTransferOptions); + ModelHelper.populateAndApplyDefaults(options.getParallelTransferOptions()); long fileOffset = 0; Function, Mono>> uploadInChunksFunction = (stream) -> - uploadInChunks(stream, fileOffset, validatedParallelTransferOptions, headers, + uploadInChunks(stream, fileOffset, validatedParallelTransferOptions, options.getHeaders(), validatedUploadRequestConditions); BiFunction, Long, Mono>> uploadFullMethod = (stream, length) -> uploadWithResponse(ProgressReporter .addProgressReporting(stream, validatedParallelTransferOptions.getProgressReceiver()), - fileOffset, length, headers, validatedUploadRequestConditions); + fileOffset, length, options.getHeaders(), validatedUploadRequestConditions); + + Flux data = options.getDataFlux() == null ? Utility.convertStreamToByteBuffer( + options.getDataStream(), options.getLength(), + // We can only buffer up to max int due to restrictions in ByteBuffer. + (int) Math.min(Integer.MAX_VALUE, validatedParallelTransferOptions.getBlockSizeLong())) + : options.getDataFlux(); - return createWithResponse(null, null, headers, metadata, validatedRequestConditions) + return createWithResponse(options.getPermissions(), options.getUmask(), options.getHeaders(), + options.getMetadata(), validatedRequestConditions) .then(UploadUtils.uploadFullOrChunked(data, validatedParallelTransferOptions, - uploadInChunksFunction, uploadFullMethod)); + uploadInChunksFunction, uploadFullMethod)); } catch (RuntimeException ex) { return monoError(logger, ex); } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileClient.java index 0ddc194047d17..e715f59e25d6d 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileClient.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.models.BlobDownloadResponse; @@ -23,6 +24,7 @@ import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.storage.file.datalake.models.DownloadRetryOptions; import com.azure.storage.file.datalake.models.FileQueryAsyncResponse; +import com.azure.storage.file.datalake.options.FileParallelUploadOptions; import com.azure.storage.file.datalake.options.FileQueryOptions; import com.azure.storage.file.datalake.models.FileQueryResponse; import com.azure.storage.file.datalake.models.FileRange; @@ -151,6 +153,71 @@ public Response deleteWithResponse(DataLakeRequestConditions requestCondit return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } + /** + * Creates a new file. By default this method will not overwrite an existing file. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileClient.upload#InputStream-long} + * + * @param data The data to write to the file. + * @param length The exact length of the data. It is important that this value match precisely the length of the + * data provided in the {@link InputStream}. + * @return Information about the uploaded path. + */ + public PathInfo upload(InputStream data, long length) { + return upload(data, length, false); + } + + /** + * Creates a new file, or updates the content of an existing file. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileClient.upload#InputStream-long-boolean} + * + * @param data The data to write to the file. + * @param length The exact length of the data. It is important that this value match precisely the length of the + * data provided in the {@link InputStream}. + * @param overwrite Whether or not to overwrite, should data exist on the bfilelob. + * @return Information about the uploaded path. + */ + public PathInfo upload(InputStream data, long length, boolean overwrite) { + DataLakeRequestConditions requestConditions = new DataLakeRequestConditions(); + if (!overwrite) { + requestConditions.setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); + } + return uploadWithResponse(new FileParallelUploadOptions(data, length).setRequestConditions(requestConditions), + null, Context.NONE).getValue(); + } + + /** + * Creates a new file. + *

    + * To avoid overwriting, pass "*" to {@link DataLakeRequestConditions#setIfNoneMatch(String)}. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileClient.uploadWithResponse#FileParallelUploadOptions-Duration-Context} + * + * @param options {@link FileParallelUploadOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return Information about the uploaded path. + */ + public Response uploadWithResponse(FileParallelUploadOptions options, Duration timeout, + Context context) { + Objects.requireNonNull(options); + Mono> upload = this.dataLakeFileAsyncClient.uploadWithResponse(options) + .subscriberContext(FluxUtil.toReactorContext(context)); + + try { + return StorageImplUtils.blockWithOptionalTimeout(upload, timeout); + } catch (UncheckedIOException e) { + throw logger.logExceptionAsError(e); + } + } + /** * Creates a file, with the content of the specified file. By default this method will not overwrite an * existing file. diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java index 5868d847342cf..21a8e07a6c31c 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java @@ -104,8 +104,8 @@ public class DataLakePathAsyncClient { * @return The metadata represented as a String. */ static String buildMetadataString(Map metadata) { - StringBuilder sb = new StringBuilder(); if (!CoreUtils.isNullOrEmpty(metadata)) { + StringBuilder sb = new StringBuilder(); for (final Map.Entry entry : metadata.entrySet()) { if (Objects.isNull(entry.getKey()) || entry.getKey().isEmpty()) { throw new IllegalArgumentException("The key for one of the metadata key-value pairs is null, " @@ -125,8 +125,10 @@ static String buildMetadataString(Map metadata) { StandardCharsets.UTF_8)).append(','); } sb.deleteCharAt(sb.length() - 1); // Remove the extraneous "," after the last element. + return sb.toString(); + } else { + return null; } - return sb.toString(); } /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/options/FileParallelUploadOptions.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/options/FileParallelUploadOptions.java new file mode 100644 index 0000000000000..636e9de0680ac --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/options/FileParallelUploadOptions.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.file.datalake.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.common.ParallelTransferOptions; +import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.file.datalake.models.DataLakeRequestConditions; +import com.azure.storage.file.datalake.models.PathHttpHeaders; +import reactor.core.publisher.Flux; + +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.util.Map; + +/** + * Extended options that may be passed when uploading a file in parallel. + */ +@Fluent +public class FileParallelUploadOptions { + private final Flux dataFlux; + private final InputStream dataStream; + private final long length; + private ParallelTransferOptions parallelTransferOptions; + private PathHttpHeaders headers; + private Map metadata; + private String permissions; + private String umask; + private DataLakeRequestConditions requestConditions; + + /** + * Constructs a new {@code FileParallelUploadOptions}. + * + * @param dataFlux The data to write to the file. Unlike other upload methods, this method does not require that + * the {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not + * expected to produce the same values across subscriptions. + */ + public FileParallelUploadOptions(Flux dataFlux) { + StorageImplUtils.assertNotNull("dataFlux", dataFlux); + this.dataFlux = dataFlux; + this.dataStream = null; + this.length = -1; + } + + /** + * Constructs a new {@code FileParallelUploadOptions}. + * + * @param dataStream The data to write to the file. Unlike other upload methods, this method does not require that + * the {@code InputStream} be markable. + * @param length The exact length of the data. It is important that this value match precisely the length of the + * data provided in the {@link InputStream}. + */ + public FileParallelUploadOptions(InputStream dataStream, long length) { + StorageImplUtils.assertNotNull("dataStream", length); + StorageImplUtils.assertInBounds("length", length, 0, Long.MAX_VALUE); + this.dataStream = dataStream; + this.length = length; + this.dataFlux = null; + } + + /** + * Gets the data source. + * + * @return The data to write to the file. + */ + public Flux getDataFlux() { + return this.dataFlux; + } + + /** + * Gets the data source. + * + * @return The data to write to the file. + */ + public InputStream getDataStream() { + return this.dataStream; + } + + /** + * Gets the length of the data. + * + * @return The exact length of the data. It is important that this value match precisely the length of the + * data provided in the {@link InputStream}. + */ + public long getLength() { + return length; + } + + /** + * Gets the {@link ParallelTransferOptions}. + * + * @return {@link ParallelTransferOptions} + */ + public ParallelTransferOptions getParallelTransferOptions() { + return parallelTransferOptions; + } + + /** + * Sets the {@link ParallelTransferOptions}. + * + * @param parallelTransferOptions {@link ParallelTransferOptions} + * @return The updated options. + */ + public FileParallelUploadOptions setParallelTransferOptions(ParallelTransferOptions parallelTransferOptions) { + this.parallelTransferOptions = parallelTransferOptions; + return this; + } + + /** + * Gets the {@link PathHttpHeaders}. + * + * @return {@link PathHttpHeaders} + */ + public PathHttpHeaders getHeaders() { + return headers; + } + + /** + * Sets the {@link PathHttpHeaders}. + * + * @param headers {@link PathHttpHeaders} + * @return The updated options + */ + public FileParallelUploadOptions setHeaders(PathHttpHeaders headers) { + this.headers = headers; + return this; + } + + /** + * Gets the metadata. + * + * @return The metadata to associate with the file. + */ + public Map getMetadata() { + return metadata; + } + + /** + * Sets the metadata. + * + * @param metadata The metadata to associate with the blob. + * @return The updated options. + */ + public FileParallelUploadOptions setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Gets the permissions. + * + * @return the POSIX access permissions for the resource owner, the resource owning group, and others. + */ + public String getPermissions() { + return permissions; + } + + /** + * Sets the permissions. + * + * @param permissions the POSIX access permissions for the resource owner, the resource owning group, and others. + * @return The updated options + */ + public FileParallelUploadOptions setPermissions(String permissions) { + this.permissions = permissions; + return this; + } + + /** + * Gets the umask. + * + * @return the umask. + */ + public String getUmask() { + return umask; + } + + /** + * Sets the umask. + * + * @param umask Restricts permissions of the resource to be created. + * @return The updated options + */ + public FileParallelUploadOptions setUmask(String umask) { + this.umask = umask; + return this; + } + + /** + * Gets the {@link DataLakeRequestConditions}. + * + * @return {@link DataLakeRequestConditions} + */ + public DataLakeRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * Sets the {@link DataLakeRequestConditions}. + * + * @param requestConditions {@link DataLakeRequestConditions} + * @return The updated options. + */ + public FileParallelUploadOptions setRequestConditions(DataLakeRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } + +} diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeFileAsyncClientJavaDocSamples.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeFileAsyncClientJavaDocSamples.java index 341484a5e9f3d..42217147f6aa4 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeFileAsyncClientJavaDocSamples.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeFileAsyncClientJavaDocSamples.java @@ -10,6 +10,7 @@ import com.azure.storage.file.datalake.models.FileQueryDelimitedSerialization; import com.azure.storage.file.datalake.models.FileQueryError; import com.azure.storage.file.datalake.models.FileQueryJsonSerialization; +import com.azure.storage.file.datalake.options.FileParallelUploadOptions; import com.azure.storage.file.datalake.options.FileQueryOptions; import com.azure.storage.file.datalake.models.FileQueryProgress; import com.azure.storage.file.datalake.models.FileRange; @@ -149,7 +150,7 @@ public void downloadToFileCodeSnippet() { /** * Code snippets for {@link DataLakeFileAsyncClient#upload(Flux, ParallelTransferOptions)}, - * {@link DataLakeFileAsyncClient#upload(Flux, ParallelTransferOptions, boolean)} and + * {@link DataLakeFileAsyncClient#upload(Flux, ParallelTransferOptions, boolean)}, and * {@link DataLakeFileAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, PathHttpHeaders, Map, DataLakeRequestConditions)} */ public void uploadCodeSnippets() { @@ -202,6 +203,52 @@ public void uploadCodeSnippets() { // END: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-PathHttpHeaders-Map-DataLakeRequestConditions.ProgressReporter } + /** + * Code snippets for {@link DataLakeFileAsyncClient#uploadWithResponse(FileParallelUploadOptions)} + */ + public void uploadCodeSnippets2() { + // BEGIN: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadWithResponse#FileParallelUploadOptions + PathHttpHeaders headers = new PathHttpHeaders() + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); + + Map metadata = Collections.singletonMap("metadata", "value"); + DataLakeRequestConditions requestConditions = new DataLakeRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + Long blockSize = 100L * 1024L * 1024L; // 100 MB; + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions().setBlockSizeLong(blockSize); + + client.uploadWithResponse(new FileParallelUploadOptions(data) + .setParallelTransferOptions(parallelTransferOptions).setHeaders(headers) + .setMetadata(metadata).setRequestConditions(requestConditions) + .setPermissions("permissions").setUmask("umask")) + .subscribe(response -> System.out.println("Uploaded file %n")); + // END: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadWithResponse#FileParallelUploadOptions + + // BEGIN: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadWithResponse#FileParallelUploadOptions.ProgressReporter + PathHttpHeaders httpHeaders = new PathHttpHeaders() + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); + + Map metadataMap = Collections.singletonMap("metadata", "value"); + DataLakeRequestConditions conditions = new DataLakeRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + ParallelTransferOptions pto = new ParallelTransferOptions() + .setBlockSizeLong(blockSize) + .setProgressReceiver(bytesTransferred -> System.out.printf("Upload progress: %s bytes sent", bytesTransferred)); + + client.uploadWithResponse(new FileParallelUploadOptions(data) + .setParallelTransferOptions(parallelTransferOptions).setHeaders(headers) + .setMetadata(metadata).setRequestConditions(requestConditions) + .setPermissions("permissions").setUmask("umask")) + .subscribe(response -> System.out.println("Uploaded file %n")); + // END: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadWithResponse#FileParallelUploadOptions.ProgressReporter + } + /** * Code snippets for {@link DataLakeFileAsyncClient#uploadFromFile(String)}, * {@link DataLakeFileAsyncClient#uploadFromFile(String, boolean)} and diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeFileClientJavaDocSamples.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeFileClientJavaDocSamples.java index a52220850e08a..d52ac7852dd68 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeFileClientJavaDocSamples.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeFileClientJavaDocSamples.java @@ -12,6 +12,7 @@ import com.azure.storage.file.datalake.models.FileQueryDelimitedSerialization; import com.azure.storage.file.datalake.models.FileQueryError; import com.azure.storage.file.datalake.models.FileQueryJsonSerialization; +import com.azure.storage.file.datalake.options.FileParallelUploadOptions; import com.azure.storage.file.datalake.options.FileQueryOptions; import com.azure.storage.file.datalake.models.FileQueryProgress; import com.azure.storage.file.datalake.models.FileQuerySerialization; @@ -146,6 +147,57 @@ public void downloadToFile() { System.out.println("Completed download to file"); // END: com.azure.storage.file.datalake.DataLakeFileClient.readToFileWithResponse#String-FileRange-ParallelTransferOptions-DownloadRetryOptions-DataLakeRequestConditions-boolean-Set-Duration-Context } + + /** + * Code snippets for {@link DataLakeFileClient#upload(InputStream, long)}, + * {@link DataLakeFileClient#upload(InputStream, long, boolean)}, and + * {@link DataLakeFileClient#uploadWithResponse(FileParallelUploadOptions, Duration, Context)} + */ + public void uploadCodeSnippets() { + // BEGIN: com.azure.storage.file.datalake.DataLakeFileClient.upload#InputStream-long + try { + client.upload(data, length); + System.out.println("Upload from file succeeded"); + } catch (UncheckedIOException ex) { + System.err.printf("Failed to upload from file %s%n", ex.getMessage()); + } + // END: com.azure.storage.file.datalake.DataLakeFileClient.upload#InputStream-long + + // BEGIN: com.azure.storage.file.datalake.DataLakeFileClient.upload#InputStream-long-boolean + try { + boolean overwrite = false; + client.upload(data, length, overwrite); + System.out.println("Upload from file succeeded"); + } catch (UncheckedIOException ex) { + System.err.printf("Failed to upload from file %s%n", ex.getMessage()); + } + // END: com.azure.storage.file.datalake.DataLakeFileClient.upload#InputStream-long-boolean + + // BEGIN: com.azure.storage.file.datalake.DataLakeFileClient.uploadWithResponse#FileParallelUploadOptions-Duration-Context + PathHttpHeaders headers = new PathHttpHeaders() + .setContentMd5("data".getBytes(StandardCharsets.UTF_8)) + .setContentLanguage("en-US") + .setContentType("binary"); + + Map metadata = Collections.singletonMap("metadata", "value"); + DataLakeRequestConditions requestConditions = new DataLakeRequestConditions() + .setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + Long blockSize = 100L * 1024L * 1024L; // 100 MB; + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions().setBlockSizeLong(blockSize); + + try { + client.uploadWithResponse(new FileParallelUploadOptions(data, length) + .setParallelTransferOptions(parallelTransferOptions).setHeaders(headers) + .setMetadata(metadata).setRequestConditions(requestConditions) + .setPermissions("permissions").setUmask("umask"), timeout, new Context("key", "value")); + System.out.println("Upload from file succeeded"); + } catch (UncheckedIOException ex) { + System.err.printf("Failed to upload from file %s%n", ex.getMessage()); + } + // END: com.azure.storage.file.datalake.DataLakeFileClient.uploadWithResponse#FileParallelUploadOptions-Duration-Context + } + /** * Code snippets for {@link DataLakeFileClient#uploadFromFile(String)}, * {@link DataLakeFileClient#uploadFromFile(String, boolean)} and diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy index f3f843c7c224e..f810ab1a3ba0b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy @@ -27,6 +27,7 @@ import com.azure.storage.file.datalake.models.PathAccessControlEntry import com.azure.storage.file.datalake.models.PathHttpHeaders import com.azure.storage.file.datalake.models.PathPermissions import com.azure.storage.file.datalake.models.RolePermissions +import com.azure.storage.file.datalake.options.FileParallelUploadOptions import com.azure.storage.file.datalake.options.FileQueryOptions import spock.lang.Ignore import reactor.core.Exceptions @@ -2191,9 +2192,9 @@ class FileAPITest extends APISpec { file.delete() where: - dataSize | singleUploadSize | blockSize || expectedBlockCount - 100 | 50 | null || 1 // Test that singleUploadSize is respected - 100 | 50 | 20 || 5 // Test that blockSize is respected + dataSize | singleUploadSize | blockSize || expectedBlockCount + 100 | 50 | null || 1 // Test that singleUploadSize is respected + 100 | 50 | 20 || 5 // Test that blockSize is respected } @Requires({ liveMode() }) @@ -2499,7 +2500,7 @@ class FileAPITest extends APISpec { @Unroll @Requires({ liveMode() }) - @Ignore("failing in ci") +// @Ignore("failing in ci") def "Buffered upload options"() { setup: DataLakeFileAsyncClient fac = fscAsync.getFileAsyncClient(generatePathName()) @@ -2522,6 +2523,23 @@ class FileAPITest extends APISpec { 100 | 50 | 20 || 5 } + def "Buffered upload permissions and umask"() { + setup: + def permissions = "0777" + def umask = "0057" + DataLakeFileAsyncClient fac = fscAsync.getFileAsyncClient(generatePathName()) + + when: + def uploadOperation = fac.uploadWithResponse(new FileParallelUploadOptions(Flux.just(getRandomData(10))).setPermissions(permissions).setUmask(umask)) + + then: + StepVerifier.create(uploadOperation.then(fac.getPropertiesWithResponse(null))) + .assertNext({ + assert it.getStatusCode() == 200 + assert it.getValue().getFileSize() == 10 + }).verifyComplete() + } + @Unroll @Requires({ liveMode() }) def "Buffered upload AC"() { @@ -3398,4 +3416,127 @@ class FileAPITest extends APISpec { class RandomOtherSerialization implements FileQuerySerialization { } + + def "Upload input stream overwrite fails"() { + when: + fc.upload(defaultInputStream.get(), defaultDataSize) + + then: + thrown(DataLakeStorageException) + } + + def "Upload input stream overwrite"() { + setup: + def randomData = getRandomByteArray(Constants.KB) + def input = new ByteArrayInputStream(randomData) + + when: + fc.upload(input, Constants.KB, true) + + then: + def stream = new ByteArrayOutputStream() + fc.read(stream) + stream.toByteArray() == randomData + } + + /* Tests an issue found where buffered upload would not deep copy buffers while determining what upload path to take. */ + + @Unroll + def "Upload input stream single upload"() { + setup: + def randomData = getRandomByteArray(20 * Constants.KB) + def input = new ByteArrayInputStream(randomData) + + when: + fc.upload(input, 20 * Constants.KB, true) + + then: + def stream = new ByteArrayOutputStream() + fc.read(stream) + stream.toByteArray() == randomData + + where: + size || _ + 1 * Constants.KB || _ /* Less than copyToOutputStream buffer size, Less than maxSingleUploadSize */ + 8 * Constants.KB || _ /* Equal to copyToOutputStream buffer size, Less than maxSingleUploadSize */ + 20 * Constants.KB || _ /* Greater than copyToOutputStream buffer size, Less than maxSingleUploadSize */ + } + + def "Upload input stream large data"() { + setup: + def randomData = getRandomByteArray(20 * Constants.MB) + def input = new ByteArrayInputStream(randomData) + + def pto = new ParallelTransferOptions().setMaxSingleUploadSizeLong(Constants.MB) + + when: + // Uses blob output stream under the hood. + fc.uploadWithResponse(new FileParallelUploadOptions(input, 20 * Constants.MB).setParallelTransferOptions(pto), null, null) + + then: + notThrown(DataLakeStorageException) + } + + @Unroll + def "Upload incorrect size"() { + when: + fc.upload(defaultInputStream.get(), dataSize, true) + + then: + thrown(IllegalStateException) + + where: + dataSize | threshold + defaultDataSize + 1 | null + defaultDataSize - 1 | null + defaultDataSize + 1 | 1 // Test the chunked case as well + defaultDataSize - 1 | 1 + } + + /* Due to the inability to spy on a private method, we are just calling the async client with the input stream constructor */ + @Unroll + def "Upload numAppends"() { + setup: + DataLakeFileAsyncClient fac = fscAsync.getFileAsyncClient(generatePathName()) + def spyClient = Spy(fac) + def randomData = getRandomByteArray(dataSize) + def input = new ByteArrayInputStream(randomData) + + def pto = new ParallelTransferOptions().setBlockSizeLong(blockSize).setMaxSingleUploadSizeLong(singleUploadSize) + + when: + spyClient.uploadWithResponse(new FileParallelUploadOptions(input, dataSize).setParallelTransferOptions(pto)).block() + + then: + fac.getProperties().block().getFileSize() == dataSize + numAppends * spyClient.appendWithResponse(_, _, _, _, _) + + where: + dataSize | singleUploadSize | blockSize || numAppends + (100 * Constants.MB) - 1 | null | null || 1 + (100 * Constants.MB) + 1 | null | null || Math.ceil(((double) (100 * Constants.MB) + 1) / (double) (4 * Constants.MB)) + 100 | 50 | null || 1 + 100 | 50 | 20 || 5 + } + + def "Upload return value"() { + expect: + fc.uploadWithResponse(new FileParallelUploadOptions(defaultInputStream.get(), defaultDataSize), null, null) + .getValue().getETag() != null + } + + @Requires({ liveMode() }) + // Reading from recordings will not allow for the timing of the test to work correctly. + def "Upload timeout"() { + setup: + def size = 1024 + def randomData = getRandomByteArray(size) + def input = new ByteArrayInputStream(randomData) + + when: + fc.uploadWithResponse(new FileParallelUploadOptions(input, size), Duration.ofNanos(5L), null) + + then: + thrown(IllegalStateException) + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestbuffereduploadpermissionsandumask.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestbuffereduploadpermissionsandumask.json new file mode 100644 index 0000000000000..78c51d219b029 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestbuffereduploadpermissionsandumask.json @@ -0,0 +1,180 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsbuffereduploadpermissionsandumask012753f7e2792416?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "aac5aba2-b827-44e7-8630-d45c89dd62d1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFF4F2C4427", + "Last-Modified" : "Mon, 31 Aug 2020 22:43:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a1ba15f6-001e-00b1-47e8-7fb607000000", + "Date" : "Mon, 31 Aug 2020 22:43:40 GMT", + "x-ms-client-request-id" : "aac5aba2-b827-44e7-8630-d45c89dd62d1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsbuffereduploadpermissionsandumask012753f7e2792416/javapathbuffereduploadpermissionsandumask129316a365cd1a?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3abe547-fadb-4e76-a3d2-7c55f6f39eac" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFF4F6CE532", + "Last-Modified" : "Mon, 31 Aug 2020 22:43:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "475d1362-001f-0093-5ce8-7fd831000000", + "Date" : "Mon, 31 Aug 2020 22:43:41 GMT", + "x-ms-client-request-id" : "e3abe547-fadb-4e76-a3d2-7c55f6f39eac" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsbuffereduploadpermissionsandumask012753f7e2792416/javapathbuffereduploadpermissionsandumask2754548502c400?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec89b6c2-df1b-49a0-8072-fa3a4ad07b2d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFF4F836678", + "Last-Modified" : "Mon, 31 Aug 2020 22:43:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "475d1363-001f-0093-5de8-7fd831000000", + "Date" : "Mon, 31 Aug 2020 22:43:41 GMT", + "x-ms-client-request-id" : "ec89b6c2-df1b-49a0-8072-fa3a4ad07b2d" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsbuffereduploadpermissionsandumask012753f7e2792416/javapathbuffereduploadpermissionsandumask2754548502c400?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a3d43a8-6f98-43ca-b51c-26336a5f2dad", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "475d1364-001f-0093-5ee8-7fd831000000", + "Date" : "Mon, 31 Aug 2020 22:43:41 GMT", + "x-ms-client-request-id" : "6a3d43a8-6f98-43ca-b51c-26336a5f2dad" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsbuffereduploadpermissionsandumask012753f7e2792416/javapathbuffereduploadpermissionsandumask2754548502c400?position=10&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e9d1cdc-de01-4fe6-9806-9b2101fd99c5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFF4FAFD8C1", + "Last-Modified" : "Mon, 31 Aug 2020 22:43:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "475d1365-001f-0093-5fe8-7fd831000000", + "Date" : "Mon, 31 Aug 2020 22:43:41 GMT", + "x-ms-client-request-id" : "7e9d1cdc-de01-4fe6-9806-9b2101fd99c5" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsbuffereduploadpermissionsandumask012753f7e2792416/javapathbuffereduploadpermissionsandumask2754548502c400", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ea5f3a41-4809-4094-91d6-3cf8076ce6bd" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 22:43:42 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 22:43:41 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "ETag" : "0x8D84DFF4FAFD8C1", + "x-ms-creation-time" : "Mon, 31 Aug 2020 22:43:41 GMT", + "Content-Length" : "10", + "x-ms-request-id" : "a1ba1690-001e-00b1-49e8-7fb607000000", + "x-ms-client-request-id" : "ea5f3a41-4809-4094-91d6-3cf8076ce6bd", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsbuffereduploadpermissionsandumask&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "36f21499-b97b-4421-9109-9c8e3bed4551" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a1ba16aa-001e-00b1-60e8-7fb607000000", + "Body" : "jtfsbuffereduploadpermissionsandumaskjtfsbuffereduploadpermissionsandumask012753f7e2792416Mon, 31 Aug 2020 22:43:41 GMT\"0x8D84DFF4F2C4427\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 22:43:41 GMT", + "x-ms-client-request-id" : "36f21499-b97b-4421-9109-9c8e3bed4551", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsbuffereduploadpermissionsandumask012753f7e2792416?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a4f8a75-fde0-4612-9412-68ea3866e1c5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a1ba16ce-001e-00b1-7de8-7fb607000000", + "Date" : "Mon, 31 Aug 2020 22:43:41 GMT", + "x-ms-client-request-id" : "4a4f8a75-fde0-4612-9412-68ea3866e1c5" + }, + "Exception" : null + } ], + "variables" : [ "jtfsbuffereduploadpermissionsandumask012753f7e2792416", "javapathbuffereduploadpermissionsandumask129316a365cd1a", "javapathbuffereduploadpermissionsandumask2754548502c400", "17bfd52b-ed08-4d80-9275-32dac7ed431c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestcreatepermissionsandumask.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestcreatepermissionsandumask.json index 9aa352c3231d1..08b38780e975b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestcreatepermissionsandumask.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestcreatepermissionsandumask.json @@ -1,150 +1,107 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfscreatepermissionsandumask021931d8063fa36b8a4f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfscreatepermissionsandumask0410041bc51a6b7c9344?restype=container", "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "dec8853b-3449-4a9d-ae3b-b6fe1554118c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b86c985-caf4-4c31-a339-2721dc402fe6" }, "Response" : { - "x-ms-version" : "2019-02-02", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEB3868585E", - "Last-Modified" : "Fri, 01 Nov 2019 16:47:45 GMT", + "ETag" : "0x8D84DFF29D1354B", + "Last-Modified" : "Mon, 31 Aug 2020 22:42:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "2575daa9-501e-0003-2ed4-904d7d000000", - "Date" : "Fri, 01 Nov 2019 16:47:44 GMT", - "x-ms-client-request-id" : "dec8853b-3449-4a9d-ae3b-b6fe1554118c" + "x-ms-request-id" : "92192e0c-801e-00c6-39e8-7f3346000000", + "Date" : "Mon, 31 Aug 2020 22:42:38 GMT", + "x-ms-client-request-id" : "6b86c985-caf4-4c31-a339-2721dc402fe6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfscreatepermissionsandumask021931d8063fa36b8a4f/javapathcreatepermissionsandumask142860e926bd7bb0b1?resource=file", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfscreatepermissionsandumask0410041bc51a6b7c9344/javapathcreatepermissionsandumask110498b80dcaedfe32?resource=file", "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c5f84687-e3b1-4a36-803f-cb20d1646945" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "dbc511c9-4d44-46ed-b0c7-ce13dd2a26a7" }, "Response" : { - "x-ms-version" : "2019-02-02", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEB38731E49", - "Last-Modified" : "Fri, 01 Nov 2019 16:47:45 GMT", + "ETag" : "0x8D84DFF2A0EC092", + "Last-Modified" : "Mon, 31 Aug 2020 22:42:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "123e8264-201f-006a-56d4-9012d1000000", - "Date" : "Fri, 01 Nov 2019 16:47:45 GMT", - "x-ms-client-request-id" : "c5f84687-e3b1-4a36-803f-cb20d1646945" - }, - "Exception" : null - }, { - "Method" : "PATCH", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfscreatepermissionsandumask021931d8063fa36b8a4f/javapathcreatepermissionsandumask142860e926bd7bb0b1?position=0&action=append", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "98c6112d-1f21-4d0f-925a-1cf76d8def72", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "123e8265-201f-006a-57d4-9012d1000000", - "Date" : "Fri, 01 Nov 2019 16:47:45 GMT", - "x-ms-client-request-id" : "98c6112d-1f21-4d0f-925a-1cf76d8def72" - }, - "Exception" : null - }, { - "Method" : "PATCH", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfscreatepermissionsandumask021931d8063fa36b8a4f/javapathcreatepermissionsandumask142860e926bd7bb0b1?position=7&retainUncommittedData=false&close=false&action=flush", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c6ddf295-d080-4e54-8f5f-624aa090af95" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEB388BDF10", - "Last-Modified" : "Fri, 01 Nov 2019 16:47:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "200", - "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "123e8266-201f-006a-58d4-9012d1000000", - "Date" : "Fri, 01 Nov 2019 16:47:45 GMT", - "x-ms-client-request-id" : "c6ddf295-d080-4e54-8f5f-624aa090af95" + "x-ms-request-id" : "a7c986b3-e01f-0077-6ce8-7fcb3b000000", + "Date" : "Mon, 31 Aug 2020 22:42:38 GMT", + "x-ms-client-request-id" : "dbc511c9-4d44-46ed-b0c7-ce13dd2a26a7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfscreatepermissionsandumask021931d8063fa36b8a4f/javapathcreatepermissionsandumask142860e926bd7bb0b1?resource=file", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfscreatepermissionsandumask0410041bc51a6b7c9344/javapathcreatepermissionsandumask110498b80dcaedfe32?resource=file", "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "50624e68-08da-4fd0-9ded-ed8c633584fe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9f15b43-d2fc-4989-927b-dc2f48858def" }, "Response" : { - "x-ms-version" : "2019-02-02", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEB38942423", - "Last-Modified" : "Fri, 01 Nov 2019 16:47:45 GMT", + "ETag" : "0x8D84DFF2A2838FA", + "Last-Modified" : "Mon, 31 Aug 2020 22:42:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "123e8267-201f-006a-59d4-9012d1000000", - "Date" : "Fri, 01 Nov 2019 16:47:45 GMT", - "x-ms-client-request-id" : "50624e68-08da-4fd0-9ded-ed8c633584fe" + "x-ms-request-id" : "a7c986b4-e01f-0077-6de8-7fcb3b000000", + "Date" : "Mon, 31 Aug 2020 22:42:38 GMT", + "x-ms-client-request-id" : "f9f15b43-d2fc-4989-927b-dc2f48858def" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfscreatepermissionsandumask&comp=list", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfscreatepermissionsandumask&comp=list", "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1ea60ca0-073c-4da6-9034-76ba8b4357ef" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e595c4d-1e51-43fe-bf2f-b5e638229817" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "2575db39-501e-0003-30d4-904d7d000000", - "Body" : "jtfscreatepermissionsandumaskjtfscreatepermissionsandumask021931d8063fa36b8a4fFri, 01 Nov 2019 16:47:45 GMT\"0x8D75EEB3868585E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:47:44 GMT", - "x-ms-client-request-id" : "1ea60ca0-073c-4da6-9034-76ba8b4357ef", + "x-ms-request-id" : "92192e90-801e-00c6-24e8-7f3346000000", + "Body" : "jtfscreatepermissionsandumaskjtfscreatepermissionsandumask0410041bc51a6b7c9344Mon, 31 Aug 2020 22:42:38 GMT\"0x8D84DFF29D1354B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 22:42:39 GMT", + "x-ms-client-request-id" : "2e595c4d-1e51-43fe-bf2f-b5e638229817", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfscreatepermissionsandumask021931d8063fa36b8a4f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfscreatepermissionsandumask0410041bc51a6b7c9344?restype=container", "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2c423eac-70f6-4465-8f80-18ec525591a5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "d59eddd2-6b65-405f-9dc5-05684ef1e891" }, "Response" : { - "x-ms-version" : "2019-02-02", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "2575db46-501e-0003-3cd4-904d7d000000", - "Date" : "Fri, 01 Nov 2019 16:47:45 GMT", - "x-ms-client-request-id" : "2c423eac-70f6-4465-8f80-18ec525591a5" + "x-ms-request-id" : "92192ea8-801e-00c6-34e8-7f3346000000", + "Date" : "Mon, 31 Aug 2020 22:42:39 GMT", + "x-ms-client-request-id" : "d59eddd2-6b65-405f-9dc5-05684ef1e891" }, "Exception" : null } ], - "variables" : [ "jtfscreatepermissionsandumask021931d8063fa36b8a4f", "javapathcreatepermissionsandumask142860e926bd7bb0b1" ] + "variables" : [ "jtfscreatepermissionsandumask0410041bc51a6b7c9344", "javapathcreatepermissionsandumask110498b80dcaedfe32" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[0].json new file mode 100644 index 0000000000000..48a55805f2200 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[0].json @@ -0,0 +1,107 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsize80548666?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "86927996-272e-417b-a704-ec9f3ed4b17a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24AA3C10D", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "79001a2a-f01e-00af-75db-7f6cea000000", + "Date" : "Mon, 31 Aug 2020 21:10:29 GMT", + "x-ms-client-request-id" : "86927996-272e-417b-a704-ec9f3ed4b17a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsize80548666/javapathuploadincorrectsize167934fa8c832d5f364bf?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc68adb9-79df-44f4-b77c-1e285c43f5c8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24AEF0846", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e6653e91-e01f-0099-36db-7fc1b8000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "cc68adb9-79df-44f4-b77c-1e285c43f5c8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsize80548666/javapathuploadincorrectsize167934fa8c832d5f364bf?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7585f867-a4af-4d17-838b-eee3d2041234" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24AFB1A19", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e6653e93-e01f-0099-37db-7fc1b8000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "7585f867-a4af-4d17-838b-eee3d2041234" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadincorrectsize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "87409f46-b817-419f-adee-68dcd05577b0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "79001aca-f01e-00af-01db-7f6cea000000", + "Body" : "jtfsuploadincorrectsizejtfsuploadincorrectsize0fileapitestuploadincorrectsize80548666Mon, 31 Aug 2020 21:10:30 GMT\"0x8D84DF24AA3C10D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "87409f46-b817-419f-adee-68dcd05577b0", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsize80548666?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "361327c0-22a0-43e0-991c-3cdfb9ab1e70" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "79001ae0-f01e-00af-14db-7f6cea000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "361327c0-22a0-43e0-991c-3cdfb9ab1e70" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadincorrectsize0fileapitestuploadincorrectsize80548666", "javapathuploadincorrectsize167934fa8c832d5f364bf" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[1].json new file mode 100644 index 0000000000000..5da5fe5a17954 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[1].json @@ -0,0 +1,107 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizece847753?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1bb33d99-cc0e-48fe-95c6-a9ffa6fbeb1d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24B2A6EAE", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "79001b1b-f01e-00af-4adb-7f6cea000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "1bb33d99-cc0e-48fe-95c6-a9ffa6fbeb1d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizece847753/javapathuploadincorrectsize124273d5e7d1e3530d487?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "87640dbf-6ea2-4c93-85a3-80342c8c11c0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24B37131C", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e6653e94-e01f-0099-38db-7fc1b8000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "87640dbf-6ea2-4c93-85a3-80342c8c11c0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizece847753/javapathuploadincorrectsize124273d5e7d1e3530d487?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3d35f34-d1e3-4573-855a-190c974ffe6e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24B40C974", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e6653e96-e01f-0099-3adb-7fc1b8000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "a3d35f34-d1e3-4573-855a-190c974ffe6e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadincorrectsize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c723669-03d7-48da-8f26-bf700310a62c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "79001b65-f01e-00af-0bdb-7f6cea000000", + "Body" : "jtfsuploadincorrectsizejtfsuploadincorrectsize0fileapitestuploadincorrectsizece847753Mon, 31 Aug 2020 21:10:31 GMT\"0x8D84DF24B2A6EAE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "3c723669-03d7-48da-8f26-bf700310a62c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizece847753?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f81dd14-9229-4983-a839-a8087e5da051" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "79001b73-f01e-00af-18db-7f6cea000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "5f81dd14-9229-4983-a839-a8087e5da051" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadincorrectsize0fileapitestuploadincorrectsizece847753", "javapathuploadincorrectsize124273d5e7d1e3530d487" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[2].json new file mode 100644 index 0000000000000..b10965b8035ef --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[2].json @@ -0,0 +1,107 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizeaf041701?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "72a51f0e-1df6-4cf9-a315-ebc3de1c795e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24B60F1E9", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "79001b7d-f01e-00af-20db-7f6cea000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "72a51f0e-1df6-4cf9-a315-ebc3de1c795e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizeaf041701/javapathuploadincorrectsize1302949de4652a1b014f5?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f230abf-3d90-4607-b2e0-cf1394b3b203" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24B6CB30E", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e6653e97-e01f-0099-3bdb-7fc1b8000000", + "Date" : "Mon, 31 Aug 2020 21:10:31 GMT", + "x-ms-client-request-id" : "9f230abf-3d90-4607-b2e0-cf1394b3b203" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizeaf041701/javapathuploadincorrectsize1302949de4652a1b014f5?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a01abdd-6b16-41d2-9711-674e04a368c6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24B7696E8", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e6653e98-e01f-0099-3cdb-7fc1b8000000", + "Date" : "Mon, 31 Aug 2020 21:10:31 GMT", + "x-ms-client-request-id" : "5a01abdd-6b16-41d2-9711-674e04a368c6" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadincorrectsize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b98b20f-a17f-4a01-af53-19a21ac99ea3" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "79001bc7-f01e-00af-61db-7f6cea000000", + "Body" : "jtfsuploadincorrectsizejtfsuploadincorrectsize0fileapitestuploadincorrectsizeaf041701Mon, 31 Aug 2020 21:10:31 GMT\"0x8D84DF24B60F1E9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "4b98b20f-a17f-4a01-af53-19a21ac99ea3", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizeaf041701?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a8e931cd-e5ee-4376-a801-a5e1560d3123" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "79001bd4-f01e-00af-6edb-7f6cea000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "a8e931cd-e5ee-4376-a801-a5e1560d3123" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadincorrectsize0fileapitestuploadincorrectsizeaf041701", "javapathuploadincorrectsize1302949de4652a1b014f5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[3].json new file mode 100644 index 0000000000000..b1d237f1eb246 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadincorrectsize[3].json @@ -0,0 +1,107 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizefc845273?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce7166e2-9a9d-4fa0-8f9e-565ab930975f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24B93F210", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "79001be0-f01e-00af-7adb-7f6cea000000", + "Date" : "Mon, 31 Aug 2020 21:10:30 GMT", + "x-ms-client-request-id" : "ce7166e2-9a9d-4fa0-8f9e-565ab930975f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizefc845273/javapathuploadincorrectsize13703035042fb0633a46f?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "d91f7f8c-2486-48a1-964e-8ed39a0a6929" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24B9FFC09", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e6653e99-e01f-0099-3ddb-7fc1b8000000", + "Date" : "Mon, 31 Aug 2020 21:10:31 GMT", + "x-ms-client-request-id" : "d91f7f8c-2486-48a1-964e-8ed39a0a6929" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizefc845273/javapathuploadincorrectsize13703035042fb0633a46f?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3e8345b-27e1-405e-953b-50c6dc396a6c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24BB03F85", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e6653e9a-e01f-0099-3edb-7fc1b8000000", + "Date" : "Mon, 31 Aug 2020 21:10:31 GMT", + "x-ms-client-request-id" : "c3e8345b-27e1-405e-953b-50c6dc396a6c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadincorrectsize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ef1f634-8ab0-42f7-8c86-f8f62a7109d5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "79001c3f-f01e-00af-4edb-7f6cea000000", + "Body" : "jtfsuploadincorrectsizejtfsuploadincorrectsize0fileapitestuploadincorrectsizefc845273Mon, 31 Aug 2020 21:10:31 GMT\"0x8D84DF24B93F210\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:31 GMT", + "x-ms-client-request-id" : "1ef1f634-8ab0-42f7-8c86-f8f62a7109d5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadincorrectsize0fileapitestuploadincorrectsizefc845273?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1e7a31c5-b3a4-4b20-9add-3c877d7d5e19" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "79001c5e-f01e-00af-66db-7f6cea000000", + "Date" : "Mon, 31 Aug 2020 21:10:31 GMT", + "x-ms-client-request-id" : "1e7a31c5-b3a4-4b20-9add-3c877d7d5e19" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadincorrectsize0fileapitestuploadincorrectsizefc845273", "javapathuploadincorrectsize13703035042fb0633a46f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamlargedata.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamlargedata.json new file mode 100644 index 0000000000000..57fcdae8fbed9 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamlargedata.json @@ -0,0 +1,234 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "15203eac-2a7a-4891-a09e-1f7a60d129b8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF243F954A5", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:19 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e21ff9b8-301e-00f6-6adb-7f696c000000", + "Date" : "Mon, 31 Aug 2020 21:10:18 GMT", + "x-ms-client-request-id" : "15203eac-2a7a-4891-a09e-1f7a60d129b8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4/javapathuploadinputstreamlargedata153627fb2436eec61?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "292d92dd-aa9c-492a-bc62-37bf4354b9c9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF244387ACA", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:19 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "93daacf4-f01f-0063-6bdb-7f085f000000", + "Date" : "Mon, 31 Aug 2020 21:10:19 GMT", + "x-ms-client-request-id" : "292d92dd-aa9c-492a-bc62-37bf4354b9c9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4/javapathuploadinputstreamlargedata153627fb2436eec61?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "5bbeaffb-1e3c-42c8-a2f3-3a792b40cfe5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24450287E", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:19 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "93daad02-f01f-0063-79db-7f085f000000", + "Date" : "Mon, 31 Aug 2020 21:10:19 GMT", + "x-ms-client-request-id" : "5bbeaffb-1e3c-42c8-a2f3-3a792b40cfe5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4/javapathuploadinputstreamlargedata153627fb2436eec61?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e4e5a0c-ae70-4eb8-9fd8-a6edff9a9bd3", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "4d66641d-a01f-0016-0adb-7f8fe4000000", + "Date" : "Mon, 31 Aug 2020 21:10:20 GMT", + "x-ms-client-request-id" : "3e4e5a0c-ae70-4eb8-9fd8-a6edff9a9bd3" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4/javapathuploadinputstreamlargedata153627fb2436eec61?position=4194304&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5e71763-c00f-47e6-8bd5-9dd40d3dc5be", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "591faf20-001f-0054-4adb-7fa4f0000000", + "Date" : "Mon, 31 Aug 2020 21:10:20 GMT", + "x-ms-client-request-id" : "d5e71763-c00f-47e6-8bd5-9dd40d3dc5be" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4/javapathuploadinputstreamlargedata153627fb2436eec61?position=8388608&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "53eb9628-7f2d-4e4f-9055-fc9c4d1baf86", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "ea3cf040-e01f-007c-07db-7fd34f000000", + "Date" : "Mon, 31 Aug 2020 21:10:21 GMT", + "x-ms-client-request-id" : "53eb9628-7f2d-4e4f-9055-fc9c4d1baf86" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4/javapathuploadinputstreamlargedata153627fb2436eec61?position=12582912&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ac4dbd8-6e86-4f60-b205-f2a735cccb6e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "e416c52d-301f-007e-44db-7fd1b5000000", + "Date" : "Mon, 31 Aug 2020 21:10:21 GMT", + "x-ms-client-request-id" : "4ac4dbd8-6e86-4f60-b205-f2a735cccb6e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4/javapathuploadinputstreamlargedata153627fb2436eec61?position=16777216&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "299d7dd5-b2e6-4538-91e5-b308f6a80e2f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "93daad11-f01f-0063-08db-7f085f000000", + "Date" : "Mon, 31 Aug 2020 21:10:22 GMT", + "x-ms-client-request-id" : "299d7dd5-b2e6-4538-91e5-b308f6a80e2f" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4/javapathuploadinputstreamlargedata153627fb2436eec61?position=20971520&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e586303-3459-4094-b4c2-11f8e6fdcf76" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF2467B9CE1", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "93daae41-f01f-0063-34db-7f085f000000", + "Date" : "Mon, 31 Aug 2020 21:10:22 GMT", + "x-ms-client-request-id" : "3e586303-3459-4094-b4c2-11f8e6fdcf76" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadinputstreamlargedata&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e63e1563-2888-4da4-8cf8-b30dec879e7a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e22002fb-301e-00f6-11db-7f696c000000", + "Body" : "jtfsuploadinputstreamlargedatajtfsuploadinputstreamlargedata0408843ca319d8bcaf4Mon, 31 Aug 2020 21:10:19 GMT\"0x8D84DF243F954A5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:22 GMT", + "x-ms-client-request-id" : "e63e1563-2888-4da4-8cf8-b30dec879e7a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamlargedata0408843ca319d8bcaf4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa5be808-5f5b-40dd-bb19-120784f0a077" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e2200328-301e-00f6-3adb-7f696c000000", + "Date" : "Mon, 31 Aug 2020 21:10:23 GMT", + "x-ms-client-request-id" : "aa5be808-5f5b-40dd-bb19-120784f0a077" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadinputstreamlargedata0408843ca319d8bcaf4", "javapathuploadinputstreamlargedata153627fb2436eec61", "fbf846bb-f2df-41dc-b215-951dd3811c94" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamoverwrite.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamoverwrite.json new file mode 100644 index 0000000000000..1b051acbca1d7 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamoverwrite.json @@ -0,0 +1,179 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamoverwrite08714229d89255e0dd4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "63185782-225a-4b7f-b67c-446e440b9a2b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF22E48678B", + "Last-Modified" : "Mon, 31 Aug 2020 21:09:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d7e77d01-501e-0107-37db-7ffeaa000000", + "Date" : "Mon, 31 Aug 2020 21:09:42 GMT", + "x-ms-client-request-id" : "63185782-225a-4b7f-b67c-446e440b9a2b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamoverwrite08714229d89255e0dd4/javapathuploadinputstreamoverwrite123493daad58b2516?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2af573a-76d7-4170-9366-d67fd8e150de" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF22E83BB64", + "Last-Modified" : "Mon, 31 Aug 2020 21:09:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f6525780-d01f-0019-19db-7f6212000000", + "Date" : "Mon, 31 Aug 2020 21:09:42 GMT", + "x-ms-client-request-id" : "f2af573a-76d7-4170-9366-d67fd8e150de" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamoverwrite08714229d89255e0dd4/javapathuploadinputstreamoverwrite123493daad58b2516?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "39695e10-133f-4c50-a335-6264515322db" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF22E9171E6", + "Last-Modified" : "Mon, 31 Aug 2020 21:09:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f6525781-d01f-0019-1adb-7f6212000000", + "Date" : "Mon, 31 Aug 2020 21:09:42 GMT", + "x-ms-client-request-id" : "39695e10-133f-4c50-a335-6264515322db" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamoverwrite08714229d89255e0dd4/javapathuploadinputstreamoverwrite123493daad58b2516?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b39a5505-714b-42ab-95ed-99f512dbe9ea", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "f6525782-d01f-0019-1bdb-7f6212000000", + "Date" : "Mon, 31 Aug 2020 21:09:42 GMT", + "x-ms-client-request-id" : "b39a5505-714b-42ab-95ed-99f512dbe9ea" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamoverwrite08714229d89255e0dd4/javapathuploadinputstreamoverwrite123493daad58b2516?position=1024&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3d8c4a7-029c-479f-9d85-afa667b35f82" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF22EACAF0A", + "Last-Modified" : "Mon, 31 Aug 2020 21:09:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "f6525783-d01f-0019-1cdb-7f6212000000", + "Date" : "Mon, 31 Aug 2020 21:09:42 GMT", + "x-ms-client-request-id" : "a3d8c4a7-029c-479f-9d85-afa667b35f82" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamoverwrite08714229d89255e0dd4/javapathuploadinputstreamoverwrite123493daad58b2516", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "dcbc5540-3b48-4977-983a-16d543ba1e28" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 21:09:43 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 21:09:43 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D84DF22EACAF0A", + "x-ms-creation-time" : "Mon, 31 Aug 2020 21:09:43 GMT", + "Content-Length" : "1024", + "x-ms-request-id" : "d7e77df4-501e-0107-13db-7ffeaa000000", + "Body" : "PswREq4oa+Uw52uyz/wNcthQ9eaewi3+Ex6rrxUGLnKN+bki3Jmgm3uC6jU4sgQUEZvDJ00UghKF8Ajcj0G0ftscrdBXgL3k12KPevVdVzPAPiHMtpN4CeBq0ry7Z/7A3pTHW5CDeRBkaXx34B0AXrvdqjrGCU7ON0tkxX8VsBmtFixujOtMPEjOjC+ItMBTe/LnVzvVENfhkmTIsqO9yESWKq1ln6TQLH0fVbDrZtifwOdLKlGG/vgqhlaiMYQyA7/r68lzJzi9gSD1zsZKBGnVW7d5i+Zl3Zhsv49/6Dov/OIdecnmYyyEI4yNhXDSPxhSFGZL6ASywqEyLZmGQnARSSXMe5Rwr1WhsEt2+G4ra/Cg/mfXI97Dz4omUDyJUUMhICkfGGr+jKoNm5jGs1zb09ynbq/4jdGwoZaGmBjED4vkkI8dvNYyocHFD4xUo2H1U5eZdAUuL2enjUn5X5t2YvMSz3ZXen7LVEFlnHb3MjYsWhZFo/MyL9yRu2JbENJwRlQ0a/UtotFjQJs41PGg9axPnNxaVFqdNxnPWHU+P7AFEelNK7mneMojDzoWUYpSwixThEiMbtr8E9FFU6WWY12VuPUx61wskwEsR8J3W/pPdgmpzhu5j/dfwzdjqvQEZUIu8F0UUCowJu379uqepwEKu5FHQkh1IVGH/lAU0kxFDwSKRoncX4uOMLAy1R2yKZdn8DuKQ7S8M9j0f5Gs05EE4QaDJEdNSm7ZxYyFkFIoITlH4T1Qj4PAFf5FLz8QGb9norbC6n87rMKoHOzee8iA+ltI6wUDaqveguvjSrRD8pQ0XcN0dUNigerEIfFr+d/dM7HnclCSFnt2YwXvqXribZNrjTH6Rl/3IzzeD1ZOPZNR78iwo4EbF69F0pEz8er+C2AJaVSBpbWG+AHVyLfvri+m6YhIVkfNGtXpWPCe9qmM0CXLzmzsLkiWC6yx/BxgMWvoKB+9GoGbws8xxysIxVrdUOxz5B66UGyk4h+TQHeDhyrnQqiIiZPsa2r6DbeIbTAA0gxu2WTYRRVJKZupvKcpVhcVVXorbZKK2eUgq07IWi+PtKvwlduizGKS6P2WpFPW7h0ETuSmUlyXKYkiIG5y2vCSzOp/kXTcJhw6sgETuFl5deFThC7R9UVD0W6UyMyBOpB0gmNOBnpQmfeV04QFVJ2mAE4ZFRPN6dfHdf+bkqryE/slonumgT8tEkRV/dR8MD77+ajlc0BSMM8w8OKzX78gEXegj67vaFbstCd2jU0ceLV+uyiYDxKq+yz/KnOrUl/XzngvvGZXpoGreqoThpK8CAC23ufeBx+VDO1MWSBn6iy1feRIrDtJYEaTogqrUd+XEgX76g==", + "x-ms-client-request-id" : "dcbc5540-3b48-4977-983a-16d543ba1e28", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadinputstreamoverwrite&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ebef68ea-54d9-4db3-97f9-8e8d32c77162" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d7e77e08-501e-0107-21db-7ffeaa000000", + "Body" : "jtfsuploadinputstreamoverwritejtfsuploadinputstreamoverwrite08714229d89255e0dd4Mon, 31 Aug 2020 21:09:42 GMT\"0x8D84DF22E48678B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:09:43 GMT", + "x-ms-client-request-id" : "ebef68ea-54d9-4db3-97f9-8e8d32c77162", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamoverwrite08714229d89255e0dd4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1f65e1ab-9302-44b7-975f-87eb86fe382a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d7e77e16-501e-0107-2cdb-7ffeaa000000", + "Date" : "Mon, 31 Aug 2020 21:09:43 GMT", + "x-ms-client-request-id" : "1f65e1ab-9302-44b7-975f-87eb86fe382a" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadinputstreamoverwrite08714229d89255e0dd4", "javapathuploadinputstreamoverwrite123493daad58b2516", "c299ee38-4731-43e6-9d3a-3dd8981eb5e9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamoverwritefails.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamoverwritefails.json new file mode 100644 index 0000000000000..d4db7c7a4067f --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamoverwritefails.json @@ -0,0 +1,108 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamoverwritefails0434287325bff9872?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "084f112b-ac53-4046-8a8f-1aa348d443e9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF2139B9865", + "Last-Modified" : "Mon, 31 Aug 2020 21:08:57 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e3b0422d-a01e-009e-20da-7f373d000000", + "Date" : "Mon, 31 Aug 2020 21:08:57 GMT", + "x-ms-client-request-id" : "084f112b-ac53-4046-8a8f-1aa348d443e9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamoverwritefails0434287325bff9872/javapathuploadinputstreamoverwritefails108790c97331d6d?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2be73991-d65b-4082-8dad-ca9de83ed3a4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF213D623F5", + "Last-Modified" : "Mon, 31 Aug 2020 21:08:58 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "63ed40d6-b01f-0081-4dda-7fec2d000000", + "Date" : "Mon, 31 Aug 2020 21:08:58 GMT", + "x-ms-client-request-id" : "2be73991-d65b-4082-8dad-ca9de83ed3a4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamoverwritefails0434287325bff9872/javapathuploadinputstreamoverwritefails108790c97331d6d?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e9e03c34-fa97-4211-988d-aa3d3048959b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "PathAlreadyExists", + "retry-after" : "0", + "Content-Length" : "168", + "StatusCode" : "409", + "x-ms-request-id" : "63ed40d7-b01f-0081-4eda-7fec2d000000", + "Body" : "{\"error\":{\"code\":\"PathAlreadyExists\",\"message\":\"The specified path already exists.\\nRequestId:63ed40d7-b01f-0081-4eda-7fec2d000000\\nTime:2020-08-31T21:08:58.3967658Z\"}}", + "Date" : "Mon, 31 Aug 2020 21:08:58 GMT", + "x-ms-client-request-id" : "e9e03c34-fa97-4211-988d-aa3d3048959b", + "Content-Type" : "application/json;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadinputstreamoverwritefails&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "bef4f649-045e-40ae-95aa-76c951d88267" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e3b043aa-a01e-009e-62da-7f373d000000", + "Body" : "jtfsuploadinputstreamoverwritefailsjtfsuploadinputstreamoverwritefails0434287325bff9872Mon, 31 Aug 2020 21:08:57 GMT\"0x8D84DF2139B9865\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:08:58 GMT", + "x-ms-client-request-id" : "bef4f649-045e-40ae-95aa-76c951d88267", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamoverwritefails0434287325bff9872?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b8123c4-62ea-40cb-a8c9-0d9e8cfd2b09" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e3b043f2-a01e-009e-25da-7f373d000000", + "Date" : "Mon, 31 Aug 2020 21:08:58 GMT", + "x-ms-client-request-id" : "0b8123c4-62ea-40cb-a8c9-0d9e8cfd2b09" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadinputstreamoverwritefails0434287325bff9872", "javapathuploadinputstreamoverwritefails108790c97331d6d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[0].json new file mode 100644 index 0000000000000..ed44073e1aa9b --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[0].json @@ -0,0 +1,179 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload0146186e2ed54f3ffd?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6814c951-111a-4202-aed6-798e15cd51bf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23EB8D509", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d70bffd5-a01e-0095-5adb-7f2f49000000", + "Date" : "Mon, 31 Aug 2020 21:10:09 GMT", + "x-ms-client-request-id" : "6814c951-111a-4202-aed6-798e15cd51bf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload0146186e2ed54f3ffd/javapathuploadinputstreamsingleupload110952393518ff9f?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e8acf5f-bc04-4ccd-ab4f-122446f616a2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23EF3BCE0", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1ce75776-d01f-0030-47db-7f1450000000", + "Date" : "Mon, 31 Aug 2020 21:10:09 GMT", + "x-ms-client-request-id" : "4e8acf5f-bc04-4ccd-ab4f-122446f616a2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload0146186e2ed54f3ffd/javapathuploadinputstreamsingleupload110952393518ff9f?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "8cb39572-50ea-4871-aa48-b52da1177ac7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23F04A847", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1ce7578a-d01f-0030-5bdb-7f1450000000", + "Date" : "Mon, 31 Aug 2020 21:10:09 GMT", + "x-ms-client-request-id" : "8cb39572-50ea-4871-aa48-b52da1177ac7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload0146186e2ed54f3ffd/javapathuploadinputstreamsingleupload110952393518ff9f?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4775271b-96c1-423d-9913-76d3f96ee5c5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1ce75798-d01f-0030-69db-7f1450000000", + "Date" : "Mon, 31 Aug 2020 21:10:09 GMT", + "x-ms-client-request-id" : "4775271b-96c1-423d-9913-76d3f96ee5c5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload0146186e2ed54f3ffd/javapathuploadinputstreamsingleupload110952393518ff9f?position=20480&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6995e70-20e7-400f-9c44-df05d7690494" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23F2595E6", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "1ce757ae-d01f-0030-7fdb-7f1450000000", + "Date" : "Mon, 31 Aug 2020 21:10:10 GMT", + "x-ms-client-request-id" : "e6995e70-20e7-400f-9c44-df05d7690494" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload0146186e2ed54f3ffd/javapathuploadinputstreamsingleupload110952393518ff9f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "682f58f2-b102-4b4d-88bd-97fcdd10ad8c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:10 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 21:10:10 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D84DF23F2595E6", + "x-ms-creation-time" : "Mon, 31 Aug 2020 21:10:10 GMT", + "Content-Length" : "20480", + "x-ms-request-id" : "d70c00c2-a01e-0095-2bdb-7f2f49000000", + "Body" : "la52iCIZbEpidTGM01pwtET12szRgu4OHNfwby9ARPg34IDQjf/ByJQsCFWRCFEXvOfUcWYrWF9qb7+e59tJEpIwwPlwNFkGjZY1tl7wjwx23fYyyY63E/HTL1ADiM8w/WXh19lkfFN/ebI+rKS89aQGxO7bR7RdTbkO3xmWjJwlnmQanORX0w+1D7hVxvfcC4ygmIPAhPLMkKRHYmhhmYhkadXRQhbV1HwMqxTteM+GjbhoKI7vlvDqZEM9YoOQ+xh3plHuSgfbYsm5CiC5zoFwWMk53mvi8ak3haxoBg0lpns6POpcmyYyYvg63kMyfn6QoKXyMrg5BMbB1fLlwgGIeqd1kuOyKJn4+wy3cNKU0z3WY65UPeZWdXKCqu/6YCKmISRwJ/1LpHmPznKHWuqc0h/sMSEjS8j5rKKcMehlZ90QMx45P2oIqNwuyxCvQad3LLyHefVvuqr8xvnNnQfOx3DSPVCdVz01X8GzVWtoPWFF1GDZvIwNA+akZlaWkpgJs/R6ZOBWaPMmgDJPF8VWcVc74SuskTL3n5jcEAAma0oQz6Ayn6AWasVGyIjd0xWBJHh8vcKhDQuaHhrISzYyCFJgvh8m4sdXwlNptzaelusLGuLcQpKoUZlZownOC1lwpOVarDW7SOqZzAUHN0kNNHMw+vydb7XAkZBS85w/ULnsYbppM0HdtxY4omDniDThWNHxaf/34IHkq3jyNkJktnUbMqM1fTvDUAQAK1smDOgEllfj7hv1K1e6jRbp2eOfgR+NLWbqVRS6ANZHAYHnPxsbSK2cg8sN625x2V2alkl1u4AOlfr1r2jhmE8FCcx5joKq6kgKEPW2njt/N3CDQd4EMe53kSb4PL3TTXTEH3UR73xS4D7TGgnEnG8bHQeRik/FhP+Ibr+akhCAPs2ni7ANMZJY4ewfYn7OKh6zOhpGuAx2YCvbmCq/UNkd0NbOK4cY745rLkNNDRS8ERqqy5aeMk3pu9ougIgVTN+QazCFkOH4a4VlO7XZysvSjlok/iWDioPt5qqRlvgci2JfsPZcI1/Xjy5fGOoKs1IeIcLbsj/1yWr/d6N11L9uryTqLaT6O5cblwTqcdcyxy5J9Alzg6PyTfTpqhV9ARl2NZs7JrZljm+QQoI937Aa9oqMstU3ameogJMxSgiA78fx/B4jk5ntBzJ+OEfNG3IAUminDBmny/80VXJMprMiSc4LNuCJkdMSzG2oJynZX65TbL+OypZayzFvwDgKCmy10hUlJSpXiPDJe6ybx14lsXXsVZj7qP34sR9IjGLWL1hoKvnBh2X4umSzSwfLWTeTBLoPqJuENmdlmN+v4RdTlXhFYgQ3bFS6JaG08DOFEi86UnYBH678bZtU7mfWWFNh20/jQ1nFwu440WGAAZJRMxTnzirTAftSPRpoYFQo9cUVT79XufDfio/Vrwbiwt6lejzQb0N0LdOYL3isbPArYGhePB74pWNz0v1/cnMdDlu2k39ercq7ofqPwD72KrTjLUuO+chPoMQkK/7dE1NngTcfikyFPRLgGCkAbuY2N5KJ7ltNPgK7TbZpQ/9Bw+gXrLjlzgo3palNa4p4OVC2ymWeWwImPmoPJjpat405l3Fm02BA7Z+BiKG2OfxqbGh1wk/0B3YTwsG0tByHGElAtRPlDkEAbMf+pW5tf379LJdTRCrLyHQUTkfwfxamZ29gwr4rNQBZcAAgvzPpl90zxW9dX8bpzTRVOVcjrDwquMI4kCXCZhFRdoJb9gYk5YCpTm6Y7nEvfqj/02W5VUWifZuP+lNPJRe9OMPgBZHtf4CXJwpCdKHTzZr/1U6eMrYKZH/8mGuLIibB1L38lkL0mz92qUM6b3KA2buNokeeYzOnjFkECJx9dJe5OWEQxCzhuG9cdhB+1i9r4+yO5/28mqs/f04guOJi73RMkmI6jExwJTLjIgEhfML5MRLp8k0x0HiJ8YMOsxs/nxBPdp8jaJz5uJlpHGq/xwSjzoxapMDCs3SrCjH+wJkYcTtAXlLXW08kKKVIJoJb+lOJeS1+YwYLuAHZaz7m2bvnXtnKHs8jsHMla4pQA6lrG67ckPAJyrVAurQQOhWcXP6lJ1U/mn7ANqlCzlq1SFjxyhq7RvYO+oVgaSiOSgmaYmEWOJsVGp7a0tD7/b8yU8cQEI7JQR/NkcI8PMN1cVAkxF6nXzEmgaZBFZLje4Fj5NXgCBtXVJxndXMpcfy1syVn4L2kdgO7rpu23sr4A0vyE1rzUnYt+CdO5TDjN4Rc28eJrgN7QWwOCV8iPHmgHDXq4WSUM7YbremhtOHyX9I5w9D5bW/ti6m3KDQU9IZM2Rv4CGb1PIohJqVVw+59XBUgu6kLkzAaklgadjOUM6Tfi0ZDsXdZPT+mm2OrX24jSAV31uS+PpjsoLMsYzhBxPHGQZXuSkMde1K30Odvl+2pf4P1oNiUH9nJiYsU8QseVXpZ569QeL1d1ZMbtbp/AET+aLW0X4eydw/0CPWII49F97iXa0Kzl68dK+FK0OjwMtYBaO3lIKCXNMjKc/WNCDy2l3AlLDI/7N7ZCPi3uWtXwFI9Z49QFQP9Jj486dnrCM8Z6FTsTEalD3S8QWe5QU5W89ChmGg1obJYLFpFAQg1gcBLMrZb0BpqaZ5sSxlAJ5oGzJTM7FPaorneM6EbYM+uarlmku0JVfD575PGz5/5b8OdXA2xKcOdtiPHxuAlqVzlB/XdTgF3Y3qZdqzCFcQejYxV0kcflXjZRp40+5EENQwBFMRfmdjLqEZuxcHN/dOboUGjwAbjjeVNwp0qhOYIeo+czLqQsvIQCZlNUdrcHjUxZJ623so4BA2IaDYVjkbJwaBNK9fM6IAyGndE451zdAFU9a54HlsB5HUvsIQQhWTFuvJzq6x/jVl75ScdCKqjUaNuxxwe2pc2qEGGLLsB5zqlOmU7Nc8muqIyfNP/fyNEY+G0hOkgzvEKIWZkqBYNhrj6Q8CKtDxkiGjADzkT5Gz2vhHIPJlisHYF737nxzT7+tl/UU1Lc+rPikwnA2lthpyE/BNoNkhQQFi0SrM6bgyM07nn7XnngrAM/Dm16nePn0sGSLLsMgsSOBDBdToc2FS3Gkr1ZAPMIVWo63riFNMQO3HSfzU0ZPX4xczCtCS7Eqn535H3YqcXRHPiHwBnnZITv2WojWd8TZ90Ugc6scgCoNKgpmLI3LOo4dP/2uqewaOPYV/2rqAhaNnkZIN/Sa/pjJzimCB3uMfFKnBnT0BvUs8I9HR/IoBA4s4V6cGkoqIR1h3Qlw0y2PmPz4PeaASZNd93kr3N8UyQXcDpj1QNQDJqVQW+akWJ6t/mbnV5EoUTyArcqY3uYKqTU6fmx74K3zwmdrtDSHnxVm5NDX5OOXLAJWPdEgSIP7FiZzlUK5utppImlfHQv3/+WKjT1/BqgU6+PFaM54P5OHgVkpibZK/cNF2BXjVhGKX/6tLhueFVAIYBlMX7Qz9dhL5B9AsnmAy9JUyZBd4a62PlKlKq/feT2k7EO+1uJ/9dFSHztH00Z7/Oy8BqpV0ui0vZWdQuwqI0Rf/75eA6qUjvYNGvUTCTY2plOfebmF5gNhLFiHsP6gMLlFyDJwcwlcfqeKxjLUJ8UaFeYZqfBKOhKJ6J/TmL8Uhl4ycFgeK9O1GaOMcp4uqfzyLW7GwGKewGFdpi6dxxq1Xre/I2dNKMUMOpYzal+LG8Tg3U+/EfXDetOWuxp2hkxNrvmFMLoyLflFZ0fVl7rHVTDQXz2AmYfPRWbgDoY6kZ/dpVcBzdBs56bQmZyzH2HOCYKR8H6S36Q0zUXW+aMWNRYrw3/jdn+YZhhzmtwLvOrZRbvR1tC+1NB5z4/my8AOCqFNhe4hYJUpgjHDoeaZUzUK2VXfsH9HnS1oW1oYlgafvXRQWdCcEDvmtRFQg0bjSAo+UpG1foUVUpb+ry3ct/WTVOiFLb4eTmvtMYVJNdWea2Gg4nGUaBB09R0NODQ17ej3nlhkqZHHDPbRGKwZNJFdNc0CHMJClAk8p4fkdsDnj8vSGtuIJ7YybxoDk9ofJ82ehaNtS/isFZmRN4eouvC8cBXkysN3b8n7zA7Eq78u4fO4a4+o5K35cKg7lxk/D17m0J4U5wsc7okp5scBBXF+sJDnTq7s0jVLifkwZAD7elkBuS7rPB+AfBzUv5LCD6+w87trRZdacwmMU3FUPuL9FPgCV9mQDA05QGTnVvPmIApwvGTC+1ItxZhIYAgRQ2jqsfGhKYmex2I+5SNo34Uh8y5W0KDk8inRWNZyxdp2yqUCtxZmcwP/FfoN7VJu74blgY0Su7LavNSjd3ghayQCf7m3tY8MJjmIH2N6tsKEx9D8IGTpulCVouN0fvM0yfvagI9GvNqNeSusNZWdPqkMp109r3uht+RklfyeQAcXxVm0HIQ1vSUlo+gqFA2DUpS31KpQ9nVfclZ4e81hmaiY8rWTksWalmQZgqOwrWLbXpZeVeYlXyEKLU8hy/CG+LPWsEZJMZNS/pUS/HH+nXVP8H2/kfXdMa+u3PqpvxG5bml33WikJkJcvp1pwx5N753+5hjFy/bwR//aqS7E4hGERdUpRIHp5bshluWLFUUhxNQxAKkP9apRZq7iQ3vq4DxufHy6d7/a8+bQwaV5eR0QKGXiAXTH0CuTXKUoXc2pYPx76LpR7XyWMo5fad/NQ4KhrXSbJ2wN33yxxY4zJKO3WgQPzjwG0K531epEX9Bm3mn7xSBH0zFG8gN5PiMhe2g7Eh9ymi9fLnFWlRz37fr8seMVkWoeYMWB2WDBdDDWl3ImBh4KhJ5FLk0fcEKHNOYgAoytMRAsH8YeuZnNuItsQoK1GWEvSGbE+ILG7FqNOm2qz7jSPZszlRD9mOso6xkfm73360bJxNphKb3b1GeYkKScx2GPyH/2+2eI346yM5jGqB7cuudGDnquXjlopsbx6SHih5irzUEwRmP6VxnMosqOHeXojF5da9mFmJfGewECsfHv1HhFNhVH/M05ynht7Ji28sRStvZcY92CVxVBtSwgI4AzaWqJrXXWMvPo1kjswcYi2XLGZmv15BCWstbqTWUDuas00WvtigtG/y7Y8VfVWdpN41hZaleDahTg3fxEzfTxlmbnF0yeZ15X1j5guuJ6q/M6Jd8sNwngAadZbmH1p/SGxmpE9tSd4WXdd7amXEOMfTktFcxB0lxJIbMP22kT0ZnvctWb7DLGwcmxT+K8SY39MHmJW+2rkGHDo+16jR2+7axpzwZGEh7EhuranovUBZO2e/f7/nDmamLcQI+TASd6huGPrceIIIDIb0ePEDTJHnYSS4gpAbF+xuuqUXJH8SpFjZXKJ6mHrEWsyCPMr4Ydvv/HtYr5sKa1mOzC2YIc2Iz6/R/hCwLy54y5vaqycj3O9N33EnjSHP9KEAgYbd5stxegFTZZtF68y72CVh3zp+0HVTDV+1cb74xVT3PfrrEWuv8/RgLheA/hzhTXvLPQOLoX09lxmaOY/FZQaYpV3+oNrM/ajDWBQXoREsJbifqyJXXUQ8hCcC7t0kl+1u6h9OFt2g5bdEi3qvbok8GPRdze3CvO4GCbm7PnKo58o2+1uX/uWe6tfEcOFmQJKCvsXkDxYME3EUp1mMh7o2jzV2KyBE4ZlCHhq7hmXkwjDTS8E9bNYp3pphl18yTdN6ECZhjffBKiiPZpshNdnkf0eKqkrvbhEmDb0Jxd76qKygQblL6FJhCXowa+gxBDxy8h0b3pN+lWqwvzq+cfp0KXc63dsJxk7WgsJhR0yBPjB996/1H1tfjGKGLL/zETBYdT6zU2Ll5IQuSHBa2wV5ggOOPV6ByG6zbk01MAtEk4b1I6bcSAMYjX8/K3Y/20xWRJWvPXQewMtxDw/uRsIlY4OC8jX0Q/5uotGQoFSbFD5iGYqKeQyqA09sEco47smCJPobLlkaoCeq5BsUtRj48jMiHZAddspNNMrwB2Bz7t0w60suWRIPvlz4+8DLHJvKJEC+bo4hD+Gu4gng48NfULsgga5AQiG8DyB6xrbl3USlpKWZgjKEus8tNQAegjUaii8mvJX94K6Uq4v++Y0ZhCuoXlhvqxcXYN1ZCPWgfl+fi9p5NqNZpTVRU3EByJ3Pw98VRw9vbvwlWnwMB0UeqFGW+JvHoOu3werZ33OXuA8xJHHVOHw8rjh10BaksMJg9Cap7HIFu3ypF5g6VfI7Up0sCMYEXk87Zb9ropjE/lkQUCPJ9T0dkStWgin5c0hL2p4GsUQKn/CiuJAgyN9VRixjDaP/0yMYkWUphsWLH9Axt/qCSahG4JfJL3aXJ3k+JXXSguBKgzZ6AyngxNHiWsbpVfr5+TtkLTkneyeDDEAX5SV9h3MelDpWj/oIa3GIgx+vKjlh+ZY0kP99X9MIqdWn3EPR0W/fRZYfSt2nB5yecGj8nLsT1BodXrzHMTi/81m6lSbt40msyFJ7yUXg/KZ+9Kp0juJDrokr7TNAWCpdWs7Jaqb4Baecwetj/9myJtCZRR899krytHi3PdMldX5vg0k67Z7ONL4yLvRTD+3SzzwvskMVEwRDgDmPgfSS/biSEnlu7WHGL+GJ5bBhfkxRa6Hvr94ND5W/gv3he1MC8KA2MRas/vp8rncJZzRccL2eJo1S/WxRGwYYc4Iz8g44a1rBfqHrbNjcKKoV9yA4SGweymIMqDAzhnKq4e2KaAIPOFun1PGNdp39bHWqiirSJDxWjuv6XQNnfrj1YZsPxiYe0osm3ZO3Nw0FrT36W1c4CYivReIKCBMcZwn6ikiOK265d8AAdfLNpLWZfff+DYtf46N6oy1Bg6Bf+o0etKHJHNMu1bD08sy+pLVSrISWzO7v/PHF1TQTVCUipgT4w5wzzkQcxb9845D9hTVmTd/Lul+FGZOQN/7z33ODTffTFlBVPkAcmWX3AOO6FBfpnbSahdT3m92sgjD2mHDrmsgpJW1VMRiWGO4oMmtj1ud/HbsbakgxszHMLXgWzzcqTqz4IvvvHGuURtcUFqldOnXQHFoMjOsS4zEEWsXqbjOGViGLcOsSyDZzD2RUuIoitkAQXWJVJq4yCkJ+J90vBKyijw8RgufE5pmI2mOk3rNmtL/bBF+AmvtRZ5Bjsf6xn9NEDiiKDF5w4SwX9qgB5PlBpC5/pVwWyahnr/GIxbKZ4dXHawv3ACO7mW/tejwrtuMQpvrUYV2BsCzoQrhOBYkT6513eqAoBaiikvHj/bT9DaYwjtf7jOayEYDtscrp3ZnEod/YBAov0c76BR5XIDxn3VFsNtmYn4toDygeTSrDlbJytxWmUB5r2DCMH3/Qm3qBaGlNbU+7OfZrnatP8weWm2ym6wnrFEQt3lvrUM3kgDNFlAVvbt8ncmPj/Sw8PLl3JuNCN+fUDXGv2gPIMyel5BDb6FrHlS4JRh6dpb/BUtZAsM49X0vr+gY+U4k2E31eg/bl7nNpkN1Am/FehNMmV4Q0N6x1/IpTf2A2Wa4gx7tpFQmsGsazgYhrJV71xQ8yUMihGmJCn7s91dqiOuji7HwCw11Dyyp/U0o9kYoBJa9YEtOfjbHVpBQjzPLxT+IziL4VjLuFrdKkV9lJAXpKrbWNd1m/M4c0dlFffKJthKnfyCIHC0EHbOZx1bkkpGUcQVNY6FisOsc2MaeWokDluSaQJGL44puxUzhweSYsU4NFQGPyoje8ax8LvzkxpS+jZsXRcx2DFvozALcFh+4ee3zUdqApV/tiUJ6EhGYjKfp0i4bXi7AGFOVGtD6O9e0xXWHTHymdGqRzmE06tHsBJqq8VGyBF66+tWpF51N9gOi6ZOwhCqkbWr/xvz/2Emrj58BJ1Sx5BC6QtIspWEAwdbMoFlnuhlpkyNa3HhOgm8Dvrc36gScEjXT8ow+sjtXB7QI1Ak3Em9QkChGGLL2aoQms/IUed6V2w3KvC6rxC0sozSRZn8vIcd7nPMhfPr4++thAZT7Zi3tYWD9vPl7loxdxCB4dWZY1tXTJWxZwNKJJI0BPwI9LoHSv5PW/NznwlKESGIkaOc8xI2FZ5p4GrNnXZjg6LVveeC/8OFilYmscG6KODcz8Iog4Vv8Ci+SRzNv03B1TOKFwBc44/Ptv4psFvc4oZArESft/MT2p01i7zHg77V8DS2wrwNr0Pns2kVEQqakg6oDoFQvzk1O4XDyBERZ//9mvq2CpZvf4Id14Kpn1u4ZW1QjX4fFUS5HOuaOjdlPPhJaYDEoHzu/YYYzYBwoFqMV0pDl8+MwuKDGYYW4m+IigPpGWj0+QdCbe0Ku8RtA+psX83jp6iMTr3KxoDzR9ZEfVgvyNsGtSpIh1yviJS3OuY11k6w8kPqN8BK0TdPmkYwJUsgoE/J0II4L8fbnTW8Kbrr637qzUq4/5sKf9HoFAXR8UCwU051qJ1c5hQFGK6PLXhY14kWB86ZpJ16nf2aLyPfUX1dWP6Sh0p0mJpDh7nPJZ/a4hzzwzYhkSmSFxr8MhFs94e0iJgSalnoYi5kQFTMyttp+XWWc6O1evg5IoQwCL6lYv9iaqZ2SJLSF4f0w4dsBa4JEdVtbXfxMyYBnbTF0dupSCus2jA6/2ky+9w7Qn84h70IYiV5+dr8o12WgD8gNVoFg3p8YAul+4BZtx2lfa04xgvcRCYUezUdNtu8L+7bvgjy0KGsqyaNJBvJAgQU3wAxHNh8o8+xE2QrcYtxd35FYIbVt0HA0Y+Vn3D29T/zqFo4WLYSNzAmamfLhUILqt3vghFLeIGPbycMwQAeZNL9oIr0Ojp+V/c21lR+Ioa1UnspBDnbozkCIDNmsXU3zx8YoR94lSssjIjSZm04JKADyYzAraWrv3gpSkKnvn88ZxBixD9fjl4ezHryrzFTM3nJSEHYemLkG0cX4L0E+gmdWV1JaAy1gQ2Bvxm15AfWbkgkVH4xVtBhjWzAG3bSx2IFBqtKka5WFY5OQ2T8uOXQZaYeVgrEHk/QjYs8C+thId/bA1RwlbIoZK52y1vjfQERQAaQTMqfzfQ1T8L7+PQC7h6QNPp2JnSAMIIaMd69eMlr3YEqZmcq9zaWmM8rd9rwI/4Owuc4fpiO8thtX5b1wdnk0Qo3HwMCdQvgR8HmXliiDe6F1jnbtCJd4yarX2POoQdA5c3SNpPHZyoXAUO34kxuVdJdwIzUwAdL4ox7PKOi8PS/+FPRkfHi5HTQRmonmgMMApJOus0VCkKesXTBrHY3UeOrVyS6ozUYk6QO6UMynQM81PrT8o3BbbtltN4UotDjoCh3vv/qFvTAilA+QdKigzvt57oyca5+m/s6gu27zYNthtFofhzc04C+N2KU9Gb4VENcEkYz4oOJvgMLMKx+VzXa6D4nD45/xFeT5beUoxhcYstUJAfFxdqS0cmh7920RXCwjtRzbrX4jS9avDi862QCzMwxih/mAElovx1UlycHkkb4lcVzskbn9Z+89m+q6p1kPa2pP5RHqi+qKFG/r+kTuDfi2U77lnO8vWzcI7SXxil1jZBS5gXifP+4q70ljwLJdzERVRwTZG0wm9Vm4u4hoN9r2k8og7WNLFVvHytCFp/vy4cF9diJ6avkFRQ6s4YCujz2mND7Geru+S9WLXXKeUuDUPTFaX1W4urO281um6Pe7+NryIBEF1xSQIwB832TN6GPf/CwCHQuIVc7II1DjRd2rOL2gyLBm5DdK/53yhP4h46pI4MPsrg7YUUKC5Wjt3TVUMa4ck9LpsGqIxRzEb6PXh1IIcHuQ60iyWGnNMEk+K/2rSDDdBIiI8xaao97K6COTI4CW/S6TjVdd43f+xMUM1121RhaAl2DcV5osB76gv7yTKWALiS+P3O/e+B7fVMoDTdVlsluNxNJIinUBEYM8t0zpwBk7Azvk+Exy9hzq30lI2v5YK+yK+1BFZMScf1fJzhUYG3DLRaS/itk7JfMBGPolOwcqzsRqDKpuBkVFuDtj1naf3p68Ysrey1+e6FUfzIKXYBLell94yRWp9PWfih0NrvLO3Wlc/HJZ/kQmiMcKioZ3NV2XNNR/aZ2+/Aj481At3Rt7HP6ATJfM5eLvlbpGrLZ5rg3BvQCbf6hZdcWTOEfWJXHQ0d7PNOpglll2xBx6j0bK/cIXCTgT5wqs4pPuPD3uoM4y2CaEQJ2RVZrhCX4Eo0XvTBXviC6du7BdQew+Tvm0rsiRTEl2n7mzGo/xux0fWpu2QB8ZGh+3Uf/REmVwYHh9c34H2bposRKYHl/VSNVZhX1w8FUssSBadz3p9XPQRbdvVE37Yx4ZN22sVHrXfEdx5suJTtbLYRANTjMIq3jhf90k5I5i6ywPKzufEuZUvM4Zxx4deNHf3fKcoZqwLWrExVUvGWUGkf+8fhcWoiwNIuokZFh1Ttu8qJQHaQ8/kbtBiknIp8BeXx8TVcLhaaNuGgRh+R7YvXcTcW2YqJFGKirFcheaeIbmwFG52P3ynalDzEks5hOCNOg52XNsqENA+1WQxI+ZT96LdmMrz0/GQkgq11wvrlZ06s7ZC7aEMF683iJjhp43vC94xU+siaO/jCqe8jZ1p9gf1sGRQcLvQ05HN9cyFvoflTlBlIpKz3U7JewRFTk608rL2cK0ivFr+dLuRImW7rSlUwV0DLy5l+S7vfvE3rD09/roOimQJtKrC/np79SKNGYxS3slpm0gluXTNlZYNo5yeRJXsibl3kzRhPQ0hUu1qiOx5o5RwGif7FQOHLNuXn40wT3MGTz9V1Q8RxZ9oqVJNfdkeaK2jERmh8WO9KBYwe4TzNvaYzrCEMTzWZV10j9Kyo9GBRB15TSd+HpSR/xNJkT5bliOrRXfNoPEtI1sMhIWxHOAT/t9ly5Zy/CRNyY6l1OPKOAFxswGxYfjctm7FklmdaG1fFULgoz/IYqBaFZDYPpdw+NaUiUOziCKB52hH3CliLzoLW1eOOsxHR9Fd8t/5p9HZ/kyUAmnkVDzsN9o6Lvls/nA3f7VXYWoFuhdjL0HIgalUXOtudNgC4g9uFgPev6ZHrfYRbh3lJjTKrGBoHG0GFtUcabHUcl2JED322fYnk6+nyZPkyDncCxO1ExPXKxXfojm/tMiGvLdSSQ3Pvgh3ATJ2AX3QQTgoWYHhraY99BXHMY1BdyszjW8rw8KAIA5QxtXOCdhnlJkWks4sawFr2WfZxhbNPDQ/L+9daQiPA7C9VTV0nBliFWYgsRJaeUJv09hqOJbZRpNFl9y0hlj6mBl40q+1R6cXlpQzjn/LVd3XKYnuhOPKS2qWoa/W4yUveFKWE0/migdrDqdERMIyZAGdmS7ug82481btEVJ+cvfRDgJyH2/xsCfhpbSRSkp9hFYiaYCj7d7tsigcRNc9uC1ptor7YCmlSxGGWsL3sD7KTq71HnNQ5sR8/3+Qg5+IjTVSr1a6p1SX3JsARn9vRtDOE5dZ5qXD/fhKYlN7QVD22KC15oHU800uTOXFO2OPz/cK0qwyPU0kX8y/FprIOZnKGJFpQOd83SvvoJ+rrtHnPBQQ1VQpLgpet764IM3Z1BqqLTyC02ANqYL1wO+5UN/mrsgDinVprpQMt0UyYwz66txlC1pFuZSzLPJJTsM4YY/fKrPWaV+pF8T711czy37uPy5p3K0NgQeOFN6z/+2GpwYBKoLfhsXwx64G/CJ+j/ImUHmhX/0mmeRROCtL7+LzBsl+l6VMgZq+KYzyjIi9UblNOke7YG4O/jFpaGkutgi8Og5k9cqSh6XFk+sJFeB+UEko72uzK0L6ZSFB1v9y1MC25v32SiqbOwuOAMlhGn8mChm9s9ngwt2EjjAmBDMWhlefuVXCnK87loEueA9hbFR4OVzIkq9T9Nea0vasT+G4nm605L5TD2c1jtS8NMb1ICoGdz8qgGkDYdRrbz/fHfn4GUtTclz9XxG/Njw4Stqe3PFBizpfsUyE2l9RdnIG4JGEovHPsyxU5Ff9M7PtcJvxLe6Gkt2HYAD1upglEatWMjkhhe55RXeMgLWi3kYj3UyyOBOQzYDAHWKprIEecDwjSPMsIItlTYORTgBN6+6xKjPbwoER4lFA/f8f7H+NXU43hlZymZ3FA0uchvKU5M3JLBiX4U4noEQasQFoG4y5F5ANwofFcSTp79cJvgereQKONsx6Qn7vUtVavReFzhmpywGX/uFavpCUHGFEY/wQJdT9tcwhSh8SoriLZn0H+Kn7nIjUAESCSPHpXkC6JdG5mzmsPO6hXGSYLXO/s760nZJcCnumEFQUr6VZ6X+H9/vCPQfp3s6kF9g/2PMbzh1iHIaUjQITN9R0FkRimRcwKjxdLC8Ozxc0YBieswboRIiMofhb2pVIFfLoVcOn4VMGl3KqNmjXGtLhBte4Fw+mgQX3xbplVIoXxC1EgG2Adx4aWmYTcM1Komn8BIkmGp7boBe+yzr+fNJY2AktCKhJuf1211DRzD6RNhDq7RA1MQPOVVmwibqKAuNBQOMVncF/+ytU+NuhGjG3++iHiGAhS1JJW1hVoEGJCaQHysO5HT7vYW5k+VDx0nKc9Rvv71Qu0kx33go8Xqo7oX+CMeoxVrYHYHPgkPd5lnUVf2cIjQgR/gQl1Q+m73q9z3qLMQa91I2H6s9KhhL5LHBBWyhsv8HDxKRODpK9+uC/abwkxZ2naPQcXh3tlq0L8HrXnswV2EG0n78hyeIs1uB0nGz6+xaRAyd93RQMpYFyW00PZ6PH4/Ip66VqrLHORMMSSCHvyAcMUSsQ8n91n4hgdfDIqgJZtrqJ6yhJKd7HfrQJg1HSSBtr53DHcxacx1JOD5tHWBZPN/S3M4UTfOiFCpRl/MHcwTNpazhcRlKpbHMLOK+G0TyqLsHyKMIGMFDN44nrrMrvG06mKyFYvvxMT9eSfXMEUxh2N5CE4TwrxxSE+uGSIeH5YnZ9x1qD5pYDO21IAXDtJbE5U/JBwfIVsBgqagxxGn3zZYKu6GhxYTdT3vJmlzR+p1zKWVydQ7GX1WFLtE91dRCzWQtv1q7YYA4pe0JBci6wKMb9gr0nGrIFgM4n1Tw/DtMPjGlbZ7KIsOI8Xvh1Z5uaIx/Pci4d8oUGbMofWuaU6ZBM4SlbWPhQaeFEiwlX+KNmPqPuNJArR3m9ss+Q0ntTa4d5lxLqvVuqeE2PdQt8piQGCcq+0NnQDMxHicsOUx1irHefPnhzDzl0vtkVkzr+PihJg96EebqkFh94eH3si8/Gf1+pG0EBtX4DBf7Jl3btt9r4rWAFMyLpnMf1i2+T110xmLbJo5iAabfyrYdRz5jKLu5W8pt9At+xKQ43gmBqOGwydAgdj8eqcETWHsk9hWnsjKu2UmxNq9FShXLa0Bavx7Y65JF31SXU4SxhvupMHujfTvjA69N/6Hy0RRv3rHWy0t3IyTK8N291UZkCciqkgVdtO9t3vq2l4zYvOZqwBsTZbCAweUpCP+7BLEZmE4gZSAU4TqJrWetJpqHBtZsaBECD2bVYUi+aAN/XB8miwf9rv6Smkp5blHNnq0n28NRPIik3cq0/pmChALbYltOOk1pXVDl//akKqYYb+D8ekY+9Q4xsrP7t/46ah5w3ixxMF5Rn7Tjg4Fk6pLWXKC95I/OVxMpdMrXOxXDoKQ/0xQiF0JXAn27IgvbwRt56T1DIylDdehy7Or0J3Gey8qf0Vu4TzhsoD+/VsjqunbUdGzntM69PGY2QJmIetaaoqutSe7qy1F4lswTICClki82P/Sg+rHPW1vLNmsdRX240B2i/rbEGXyBWaZTId6ljGngo7+1yBqx3bbjAKXyudEw7fC0tu8Rb2fK/+AmrBtcJb0TYEVm0RsZJoKndQ6RfM9sBnSbZAhhCcSvZy6seNn6kUBwpUBkjp/40alf6Ocmd8wHLHin9cWPR6p/Y0M0DmZB6GlTFyhjznDffinFOvL7BcNip+s/Sq2eUuTIT73PtwDTV1F72zC3yyCigulg7IhEFx3MU676N5AUXkbOF84IpZnEfuZ07jNvrJrhWe7pXiloB2WGISm5Bea7rYmKhp6OwuXqFmTRLg1MCwQsuoWw8XtIOi1Sf4+xX+BdAa86ShDicMKy421WCEqdaz4jMNuvj6ds5BntD0HZxdTyGgtd16qxOVIInPCClQ8t5Vg1v7Mnc4Ay3sIEIXxuqucX4pvn3nvbyW2V5Kx7KAzN6qZudQKJwe2+kXmwo+25y3x3jRCbMPsQWswok83O0y97XyryhF/krfdDlOTSZbAAmFQFZlraiTzKGVbIBOXF0G0UdLsN7+37ZQTyFx4QnkTW3u4fgfAPacyVepO1b5oQ1kiD41/OUUBwav0IezPybRAyWyrhmOOfMK07r49wcRWvV+YDBB5cyNRByBhGGLquR0y2Y1F0vLe0JS1MkBM/qvxVgVioiMKFr7L3S0EwAircAXiF2b52aRoGc73DdzDwVzmYK4xYk9PQNf5CNuuNpyTkxINROP1O8LCN1p7ZwjvtyGO/AlZQOxeNjChXytND4WKSikNKpw6/1Hv1VpCMFBebguq25WQ8ddZuFmRkHYi/sOHuUcqouoZxF6hH88VlVAchfrn3qg8Hc01HY2IDVdrdXQfDPN1YjNSnqtNsviVsQfJ9mQdXfr8aI6sncSKxBMYML1yryIXSm7kxpni0iH1UsJgZKyDqh9KGD3lWCd6cDWk1i6TNlpixULZxq/ChPgzM2mz8ql6a8YRuLe9nBb45pg5EWsibr1gcjgaVCvExEki5+rUIzsYeja5QFIO5WYtCW49+sCzMJTnnQeiDxv7M5duiE8qbnVGpUFrD5nFDHsCL7F7DIEvr3I85aJJfh4iWW0Jn8zz40v5m/vphrqzdzBfq047mPN6rsdHZP1ohWSIzUIt7O68zfDht0ih3i4djno0/sBDwfc5LWRirZN4ZCoVI9N5bq1ryICJqTg5Yo3qPip1vm02Wx1V4F6fTWX/BK0GnDzgKgyDG5/5yxqiJttfoesQxgkUqqrDKgAYrDwuV1CuIRa4sVGZzzr1WtGuAemTrqIrt+MQoiEInUDwXqTrXprrxojcQWqcsCQtYPVGvnJqPsOt08IiAmVg5oblCpKLKq3RCww19hYRV8oDPLuP0ux5UnsU3TIsGXrw+8ZNdVdfP+nJHcYq6S3WKnbB/0XUbRF57SxcGTbTAlAZ60c0omDc+c4RLJgL4DvszWxLCehJzWdGpObTqA2b7IOVdS8x066qvoUrOySi/I1T5cRg+ixNa7eu4KpI+3wWqmJ9Wpl2NGOf1vjzkhY4adqRUe6n2WL3xWcRu79/6IjHHPnLAzkgNcD3MeJS9q/rLL4lmdmJCabCUd+AtVqGZOG6FgQHX2oqcfOYZC5VMeupF5P82ac0JrYrnP4A41NoiaQvdURoHmb8NhiHu4AGcumCYR98viM69e5c10yIPTptQn2qFyDNvypY04M6K+qzazbz4Gm5QRzru+ZvvvtOc8J92t9CgTz20C7cvyoPV4EWiGFsEcE+7k8tcAHjEfvnXkIZnTfvo3OCweXLIy5PNBdIpmrYMMbW3OfnffAlQT/c/SdFTr6cedCFy36t1rRQ1DnK3wqzOOiu9SL4oZNBCboaQeAcszNleR/JdmrO3hCHi/0LqRsMPiSSy3avET47eGrngc3018L1M/3XqrNkBya414/dkgNm+iUS+eSfCoNqDE38LKWYmZ8Guf5mt80cimt4KNSChYAhf/8CilspibgqIiMJU9rrifQDkdgmlMq2haMU9HkSuqlzww38qFoj215UPsK0xEpKiwoCUHOp1JIh8CuWf92XxmBJJmRjr1VzbYkL/efVB96fKoixroDNX8LlfM1yWD0Jy58Lzluhss9grXFeA4JUNU4AcZWmhxOFH1W57wq2JZpO7IPT2RpAlZwMLny6lEMm+iOC1t9ngKLrLPrqp5ryu9ewgVJHqF/LgmsFgarAXf0rGVlHxxYhzX3J+VJLLWKHzlOWs0Cq0X32J59q1CvSutJESwtMi0P0NWfAMgMvTxSBNGXE5idM2PagvwSaBusD9NypnGd8fdm2vPrISgqhPdVUb3E/Tii/2uy6YWwEMoYKhrrmcTLsS/qMN52g69wcq9IBttVvbeUZcYth+OUP/4G6SX0eVYGcB6QUHQKQwj88HoAAQqYK8oy27r1p9iKYWFXHdAm/zEZ6IOaLn52OAPNj6qyg1s0BNN/bCNfN8AmZiyV3b+Eritdnn4CzNvZiuRJDdwo//zFmWyG/118wpaDW5fOMWGaEH3OSrfFpkAJYQMXO6j5kcpWwslwxCTJAEffZXPbNyEBa9y3XXjftYx4AnO/wPdc7sBMZje/BDKW1oSL4gmalyRZvs+rdTTh1jNb4CiKAlsKhAr4TOeSuFLvD19NNTwuK+mX6eOtHIW9FBN/Jsr2I9LTTQ8CSWtrEYgG5CpFKju3Qo7ycL7y6M2JITv7y9u2emJebqNNpVT1f7vjj9gD7jOY91uGILHdKDac05sxhx2PmvNME8ly7oXfNKVUzUWC+mpYFoCv/ugi1hzCB5ikfx7BRtsxLkdPjzGs6LHVG11yb+aVhSaXMyjmZJc29ytmUZGofbCil06C8TnvIAOE7a7BJUqi8vDTGXHXlG5Cz35Ny9BUAbmOj1dE4QL551sOkO3c+zEzPQmqJ+ir5Jj9WNa4Gi7sUjIHp9XMABpln7dlyf3I8BY/mARK10lh617iLByZafHZ6M+VNhBFfdfFsgiugBIp3wbQp3DaON6y1epraIlUK/IBp2Rbzzfh8P2mAO6xWVBOHY6G2uMHZKMDXa7SrditulFjoDIEluRh1kMi/uZK36ubVevcfFRu5HLqbatCVWM+nVV3e2/c5IcWDLDTnwk8OVBW1FsNyIjQmKmb5G+psQkRQl8KBSzjFkN5OPBzqxMGUfJTHug1b/PdKYpKRRwWWRCxMEtz/KESIKP3LPkC+2XAnq/4A9RxEsWzh/QMXsk8BdIJp5hrAMDuKLQtlApUTbTlB/n1G4uy0RV/JNho2cyeum50+82lp5g1pRCHIiaTgcfsxd8JTyb9ENhjwBdRVHN0JsAcNxOKRlZNTdTjQ1RgqoXwSDa8YWdu2IUMBhHR8NZgp39L0G2NmRwL42aluRTELrN+I+VJnyWCaeRp9iLdKI3KLx4B3p4EzijXjBDl+KNYOoUZDNO+TjSx5fzyku1KBky41U99zBxM9rbH8UejA2g/I7pGXjpzS6ONQrQMamqmb7N+QY7uIg+rpfN8ijd3WbpoIdaTpbKABP3CQG/11288SZ7hSk5+eUdyKtFvMKcc6td8E8+xIMiq8x+XDND9pwOjsRk2ivz7K56XFwoV6bYuQYkER0m0eHxEoY+BkTl58VLnFAFD8PJoAJgeYYs6X++NzoB3PA4faOhdu3uKq5e1PIWen4yDCbvCs8CyjacopxiV0FNgeGrR+vYEX3rLFjxBYkXw6SeZCT2YgJht/RSx1XKOfhFkxOsdzI1QVExPA39tOGVlWMT/HX6pWTMpPHnxkoS/l5p0S5Dh0uFgd8K4EOElau/M3vVhNvAWYWduNQbtz4Opmv42Mx6JZXL3NPHCxNzZ6uLF/YqL0aBn0ky1+t87moQMQpJ3an9lgluPPcKOMGn3PkVnLmW1LhLOL9C8wya/ZzVgW1QLe7zE1MA9IL6SKI909fgZUUm65/5EltzWH17QANKD2w1eFAJWWtlKJrV0FgydGttvJ8QlsCzijhbF5qBiUUsjVQAFW1T3zLG5bntM4Y38y4jxr+6OH7pwCKpU7cDxiE2X02GXmpT8rWeSgDe/R+S4DfDTe3fIxM9mLw7G1oXp8e+DG5qcs+mh5BgeQLuXufNAOZ+0x6kTWWQm+MhfvSXbrNOU7lQ8c5y1dlfE+bbCUi5IcfiTNn/XEnUTsueDY8QSQVDnERrw2p5FY3cirBKsfCJGiHH73cejLp33TWHUEGyiii6TYJl8E56+ZF0rMdOddlN/0LlASkc5uM6u3sEi1Matl/MkR37UfEYqz7Rzclv7gbvkA5Oa/2ySMd/dkGTCFTds+eEKZNmZ0cdsNcLiwdMPZYUkSekXb0/jC345uYTvNfSO10795lNRcdiqJRZA5dKwlLserObagsQr/XHdrk8vxHQs2dnThnEH5niseccG4t8F22slfxgaxDMVyUPu5627FsuZO/iwwJ5AViGNylFjuLguD4DGwuBE555+FPNE6JhbwwWynlJemv+kYAByyjXo21Eye4DGcSAG60NDKOvb7kpn3A4eSuaOaxHnYYf+ixHiN0+Wz//BjRcuO7EW+rvAcjNo+VD75Q+Q+p5eLmUe5lqI4REunKLvOZRnRn6ID66eo+aMm+ePLqnGzfhSPRD6F4KVpSj7ia6SaUdJgUSuXOgcskCb0Xvi+8xKzWCvpzpllmAXdMzdwqB1tDxn2SLabkZTeRHdpOuZrdk+DG3wnOKK2TXQMImuCp3n9owHcRQJrhYrVnEpIcj7Pyh7Uk5ZpJwztNgZEHeWxL0Siop/+IKm/TovUpQW4xBOqd9A3tm3m0eqQOkmPH5ooVEpdqd5XqdDK0GJaF3R9+C2O8WOlJWOLzKblA4ItkZ8olFY4+vbrLOs2P1vOjvHx96PNgwiXI934n7++rGhNsocU5cqW/aXVnSVGAwyJAPzMKLRYJwmLykuHl+zgSDQaWo5kGQtak6uiYaj0t5WfQdqnR5qtESSHYp8nP4JBkYeXlI8y//TnY8lwOwjmQ1wrIwATf/9k9JwEQquSpKEh8nUAM1xEwNUQd9mnImBPKmNIzfZcCnqXv4Lnfzl3jOjE2WgjBx/R+jDJRhjHhTZn0s4eqOuGWdbfQ4BAi4IeyIICfF72t2a1VHipA2wPOeWqR0IV9tjgUDkJStpCymMq606I/kslZv40nIwa26l2oEmn8xKuBBlvWjh/W2tX8AkBlUbWFWOcnhHE0CtGOIwnVBDgFm3jCbTkyXZ/A1BWQyRPZ6IFFItXNttxQOwlRzXBeV+CzitLXtfmXyS8f6MY3JM1288CGg0wvWAQXE/hmcwyVjvILTJAfyOl6A31/hDmnZsDXO0gvOuVlC5is3AsvLber2dA/zo1J3C4+ELbAUZ0P5cFbmv0dJguaDjHqytBXpD+IbKUAcy2GRPJH2mHW3JVm14s96swrhIa9VIfvVOfKHKKkwv6PZE6uNCZzt+fc+Wy9hLiGci4qKxfC0LeKlmoaYzYtru3Z4HU5/h//eOoCvcI2stR+lUSwi7Ru6QI90YaT50Gm7i5nmjYYdGlOhcwjquH86bdrlSac8b8+Ltbhk4S2aA1C5tRMeOlo4/cXrM3cjx/tNB+9GOICKxhD1cV2KW7Gv+G3YEBfQyUp090Uh0eNNqJlegL8/ZKkMU6mYJf1UOCKHTO4hVT5Pl8dCycYbYHEMvLh8QikNpPyL30dyO06ucqbij/r27mq49E3svlZWLjk7MsZ96JOclSFZdj9s7fR/T6/8Ft2E8wVxAowF7XSWXykaU+xvki9GNV7dd1nrttxTeQCOMrByvaYHXXQqgzCvsDCCPznAeRMZYPfi8UPSuNT1vJDfEpgUcA0ifb4ZBRSPNUjOw56EO9NrQPbE9qduy76RshQ1dHyg5nAnPetZx5fGEE4ONuwSn2wi4otXc5WDmZxgw4ltwHpzEIefnF1ELY5s+h7hz0VrPjcWnu4KvBwNjKUkgyFYN1w5t8EtRljMweYZfSpg1FqQyoN86aw5CUm+czO3ozeDm0Pm4vGjs4Dwm3+4uJsbQpfFGEcbudSSW+Y0LRTNpf/YiiQmGOuYayFsQuFKDfsukG5IRY16WVO4sUsXJY0kwJOTeBbEdQJDQuJjC8WcsNwSpvpgn2Kduw4oiTdmb0POHLsxHraA4NLlKorSTMVTPzSM5ae4V9WOcL9UmanGSKZh/JEOhOTddVK0QdB1wvH+eLcoy4f5l2TIXmuLizD6uYaTrpphjXCe4FF0KX6GLPSXZ/yj0/xeJ6DIpiH3YnHrUYrW2njz2FOp/OQAm4vmrgxeaqjbAN2ZNyg0srp11hRld+XL0hUarISLiP9U0vXweUZReUiAB8zquv1YLBoNgkj6p8vPueFYWPyE1PSeEDDc2GZZrL9GqOjP0HTect51Rb7eITDxzhm2KHqu/8cmGYwfiKyT29doOZj2KWR97aIQDnxzrCiDQ8r/d8TDpyIKEYtqfiVYDx0VgYvcJUDQsURCb00eQXBBmp+vzvQCnZXDvav8U9TUKYoS3rpFLvy/rJSwoTh1ZBCT532KWHZnAEA5UficwmLGc4yDMpRz0N1eIkdC0A1rwmde5ziDPfHHqFcEaVpJD33Au513lBrtj6Ymsme0Jrf9P4X+H6Rkchi5OrrpoqylrwjCAv+QPjJNv7h1LxcG9Ho28vYGYrd5VaeaAjW646EQdcmUBsC7NgVflooXhsiEhifM2LvH/vGW157rsRE8cib13hwMeA/ClxDFF4VyY/OEz4HhkEBg8yReKkTh2Cu9zsVsaVN0WtlYXhQsQUpADWg51p/ZpO+9/1FGCfEdtou4Rw9GYim3O5DMyiT2H/LxPX2cwm9WxgpZ75P2Ln4CI+Ylvh+EKVa+/KMHDrbjx6ahzrxiMG0xeRmK8ISLZgpKMcyDzUqZEtVMjKOQcys9mETbXEp888g9WlC1HR3kfbLELT0DBbRwuKb2mfCHi4vQbXlFXLoygmHp3DzsnwRCPp/bG2lNYDgGIVhFNi1/3pB0pt/H0Q8Pz8qZmILvxirlFWvkL33UHW5LNPjbBeHraEnVYievdxwls/KfeY+b0hBOLCM/NEsq+KT3vECU8/Le7IwO/8bbQcSPV8NPJXWxXsYw0cfVx9a2IaJGsML5YzjzVolVir6z1/wOTQ37aNXazKEjGwjrCkOpQVwHWl+y+Qf+vkb0Twsozdj5n4Df3u8EZ38iN9dxNJs8SduNcRNCZhzYgwIatV+KYBNzxVQie+Ycy7oSJdfkR2wckm+nKz5j+iSsNL3YCOt/doQAqRGuPFuZggvofTFwB8AIeXrsiuK8FUwRvcv0YVEvGgwBT6ioS+Vf28KjmdFcNDsFzySI3eOZGKBcYe2NEpVH6DYLAByQWx/7C6INlF134tXshUjhGIGu74qpiMfWD6Q02pHAX3lpFCwCX/7c9+IijQcfA5FNt7aQ3/C3mAny8LfAJMGPjYyO8BABwT1BDDU0V5GoIip20RenEzNAwQ/v2yaJmJpenE0OJRYnPnFtarfAfoTey8UTnf91MTHh/U8vYOjbw7AI3BERoT/eq2QOZg71oaHT5jNABTP6kQwjguQX5skj8UXbygG/kQycUWt1uNf/X8R/uqEOVbW8aAQSUSEO/Sb84dvKAtfFLt7bqn09ioCcsaevZPkokMEveH5w2PtCCjT7T+mShZ6bOqxf+Apd5vI9KESzhv624BKoqF4S3T9j5xOEwki2ViGwIkbI9X4cj+mQ6LzH594SbQ183p0yGJoHfE80h532gE7TMLBCdYK0sPUcLppJGoFF0QXXU/D0aS/LWuJBhPXs4NMk2T5c7jf6cgXANE97CyI69tK3Xthg+SRwtNGXio9oJGFPaHKgAtbQeKvDkpfDqRFyfShg5GSmQUZU2S9jBGe8a4ImsHCRi9/PKhWNWHAXLC0qoPvkKxR1nLI5PBHe+AZGxhJuFXh4ZzUBVp6kDXx7AlAFT6zBAy5LgRbNaB/A15nT0FuA2z7Gl/TdwVRH0VihCQtLjwWwpyG36uYvwZ4iB0V3SfX1Q5OmSww/mwLc7HKTodocLLTHBhGtFPgxQQC6HYiFrJF+5XdUNOl31d7ijc/2V/s+QmLYjQRqtc54yRc+edGIlJUUiuGZwBaJHM9pxQZxspSpXvHtjOeqb2ZTofHMLqdxTg/Yxn0G/p0q8wYevN0JYC12FDsrc5DadJYfYboGVbNLoZ9cOhbBxRNKaqmgiY8lK4e2P3LWak4jSs8gZm5HdxtCSgFwlYVnSgah1h0TyjuRtkgLF3Vq+p8/h6GqicTvlUeilkHNCBxr6/k+TcKWTaXZL3B1rUmDMoXEu3BOzuCLlR//oD77Nc8txhlZWTTaGuKLhiQVEIJ2nB4smCpEJMUkoKerw3g078G+xmxghrd5Rs8omwPUBGZN5RRwTl8qT/tR+RbQG06VRR5HNc8ui9Sga3XkHBAINOCQdr+d43EbcO3orKKq8N/smsLxNTZRz/2FUWTOZgT3xzy6XYndEO7Tn2jYeaU3FB2vARTIHNr1lbriq+85YSMInC5bU8sxnNkv8kEdDXZAnwrzcOpYSGLrdBNe+VD61d61gLl/npGaV/YEfE6RtK6UmSkBJ3qUs4VGFCSE5KHufUBFtHMYAtw8P5+/8vYrJ5dJWTGoYQpUxvPXsQHKm/rcnnaZhaPq/9KHx7gH7ssCr5jfwp1DyA+Po5Xa4SYe7+1d7jH/78LQp9gHY7W/tA0JBTc8LW9C+7S7SLWVBtqzvoztudRKlxK4Kur1DjXAOZanhOnPLMGpeXku0SJrbX1RcphpEtqLobVgg+FU1/Yg/54NbUBd37OEQkx6OPTt9zXzdo1CqVXggt7m2skyGFiVc7rfWeUMjhcA6Q35BGNBLXD0Lk62vXY9Mqz4bBUWkSxIm4GKXQ2vdZMOX+lkSrRiBuNMmv0hYHKTdN8q25mNBX9h+rvtdwa7lw0ruLQUggPh9aNj2vRJVTZc/le5eeE0deMp07g4w5oy953Ps6UdP7tDB5vuOUIVkozbhaNHhS8am4gpvQ9qwKok5+I/1nX6yMpIxCsMtqjCq3AF1MQ4Z3QnGKKZDzzN16/d6Svz/7/76bGZhBnAqh9ol6g6aLUgl8jjOzkg7StF+LQ8iD6StgDkC3ZFI8cj+/KFlBTcsO0o5hBEAX6qNA4gwcG5ag6pY2Q4xw9/bFc8gFs3uICvdF2Kf4nAOHFbD5BLX8og3Gj69VkL+5bK8TPLvLIw5qZwMOL6M0iytGIFcncjsX0zFRuHjBpsZwMumI+ATZxVcBLDwPkgSSNVzJg2NtTskjcRJ+4tv8kCH9AQDmy+YUcLLvgc7+fKGOYCIQ9M2a/j4LKjYrbeUw46DByM/2E466/dzo4q6FPvRPUfdGSyCOm39HAAIbUIQwS1XtRSra+ksYSG1EgCpF1/HhSfNmvmkF+0rUbk5LHxjkujsQFwWocxXEpSNN+16Qk0RBG6v5S570eAm3pd6XhryuR2KLcC4aDz/Y215pRuRvSUDGviT7kfdEnFelokzhlGw3dwY1OvE0/Hr5NHeJ1az04Ynxbc2UANv3BA/Zj8xrypjizENCVjjR4HRbN9eVZk9n7pkKHUCM0KriRDIaFbr72XhcmxKCBAfoYvr1DZqgwA0I9PqVssJ1FyRloUbdpdavS2n5vTVd9KQnmdBenv7zNfDt37lMkm8xTjlm2nDsH6CVvFSfYbAyv2aN9xqftZDcOsLk+Xop510D6LfqiKmz7Bx+7EkvlM1YBWs1RsSE09WCIRpfAnNjdGHQTYXvY7qAd7SGNeFytMYiuwtluri727StV3IFMdBvzJ6wvKrcqpTpfqXEVC35pDcwAA8FqPjlDqLlccUXE117BVaIKvPFoKcI8n5r1zamv8vmd7RS5Qv4J3Y8z8mwmmhjTSMNtFkzUm33gT54cwSggXiaG34WFzN8fpjSk4MpcBfXQRgOTKy1TiplKmHk3xCwod11LsHBrClX+wvUSPwCG3DnY7YOROzW2+X7LYJ5cA/RHrU9gHKHfVYPmcsK6XCUBMRifWFUJkmQ+ookRAFURvfHwpCJhTWrp/IGOJRnpmvrN6WKzIss2TINDRLjBrCX0mfVpTMxhDn6lT7lZvKWmLbKCthgypiWXvLBAb0jlZD9a2vOmoNRG7YLK5bYlHThJOWu2WzbrgdCtJJlIZRqLbu0P79kUt8ZeO0gdCh9x2aGvcNGKAefDcl2QnLaz92ZTfE23A/8ewfv873QXO1RCgk3C2VV4AyOkX8JOI/Oss8MdqOzfqjyNIq+rKG/2DT5cN9cfEn2uUS/8UTIltQz9fD1/YOFdUl0Ys0IgotBg0RixcQSpZXN3SHypSHRFa/aEQX8X3h6hYOWlQYM3eLebMNiorx8J40ce2Ql3iqiv8kVioqUbPZEd8Y8VmVSQ/nMSF+rz4uueiLsydO1zx02nJFM+4v2Ahe+VO+off2C0UlaX4q99E2POKzjIFpXkWjgdJO2kCzr/3ApWwYM80vJvQw2bJMp77UvQ1LB4BVdnadC+neoFg4nGqKRzpjqYTqdirG/FWSAXIjcFpCQErpYwoyqRMmxNwIw2jZe/qyT8DTR3+RxYKL3Cycv0KG4Yr25FWFIX27xSwwdsqYpTvsHoHVZDKkIC4KmnBrZrmG7u5pgWwBl3uvhl2gftqkCa6MaY3YCtAT15V8aV1pmMVyyf6FYQ3j1UhxTvX21ihaBZ15qqUASlg6Zh6+wKl9752ERwvbpfJuzSOnx7FWvLhXiRSUWZHk+6hxVlwOXgKk/q/5KeipvZxsuz/jiQKkEuUqgEKpSjkR9K/TLCuH21FOdqNMygcxyOaKNN+WcV395uGdEwwIXNHT3yftS479FA59bpLXGwq5a+ez2Y42kd8vWPCtn9rdJPsDEQ2Nl3wi6S0049un+G6+BQos4uA2uUjwqbqGr9SigO9L/J5LW5zSXtRPOB3JulBH07rjqRV72AvKSQfXxKh8D2PQF1baDCZq+LOC+mg+JmT7JRxgXkS5w7kysB4l6yV46OZfmBV1Sp4heaa3SRv0g4MW9oLOCeQ8iudw9HpMNfwWwMqE7v1OET8cAxO8q4FiZNuYCzf5ReDmfoAx89aH/T3NuQIsoQflD1BNqdxTAv6lskRyl/dnfi3QeeaWrnZM08O4siC2uKNwTy/gKZvBA4m++yke1YlI9oq9xM+JvgqhUePzsbcpwnPZ6Oj0oPU6YxlaADkKxgDWIhIaw2NcBVC9glct4c5Mio7sWADjaH/OGXsHZPWwvG22gKLt2q7jMAJpByUgoW1xtcNN4P4V/OzqlSH6szSWX615Jzc71U0Qidll0v8HYVf367KaaIkj2Yucylg2t7/uge+6NapQHa9uIdxz8i4Jhbz4SrEF/zHFYmLPsRE3dpy+fcCkXeBT9Z3+oC+mrCUexvEaA/SFtJLKNYIamurfIs1B0uDWKEsdO3frk5Agq6kp8x9/0VtRR/KAV29C4gK5SX+uXJVLNaGVg2qoP1SOSxjP4LMJEBSCuis/A5+mcWr3fwAy1s1bcwej2nneWRwRF27M4AckgXEPOvAoQxmIyIst/etZdF3qqokfw04pCU63a3L/biqnU1dyJRC/lp2ZZj4WhKyl/1reb45wj4fcguL2yW+xJTupXG+P/UMRybv1B3biyEntHbBA5gYZ4j280TbNnqtn9bUdT8AgMjfeNSPmXqWBaA7SYjPCiLEtKsQlZnSPf7ewkAQMPbf0zzqBmNwPH/RJ2tU4LAHL7keQ3081cKc9adDgPZoXfADWRUXDrwiRCVnrQFnaWufn2QXjdOjLQScFrEZDjSYziSWLDwRKn0FnAxteFVwrGxQyKwBEelLYoOL3+Ly1gnFkjgCojd9h+KgR5H0dm/d14CvwWDk5G+ehijk8lABwcbi5qA/nQpYW05NCsAfxn/lpCXvyzGjW5t0VOlXjF/yxY0tdLhCOx6SBdhtIdAHJpH1WNn7p4rnvY86EwOFC0Nv8f0AClANsQX8pKPRhnnm4ksZ8EDb0fgxMEt0nOEX4xMAKy4IvZFtn3fzocrml51QvV6/q4oDyGekuBExMAh4zKjtHOo0bmUu0go6gTyOABVJws++toB3g6D49+xXVdceWGGRabBd3ammsvTbHsJ/ZnEEF0z7+/m4KkhfU0vrkLDwBus2cKwb1bu3/njgSfm3ToT4X3D8SM73JuCmpqxJ0EJArcO3vIYeWWwlFUZuO22GydVbMF7rPZjWt3Pq6+XfWNiXpeaDE9SzJuMl/zBXrZH9LqKD0suzq90cbk7xg+nlek8UVQsEBwy9e/gtwMI87G9TdpxbX96NiKMWvXxG6cI2lkOm8fW44Q4p6OQHTIkWEKLxv9AbzpRmstZkO++VrgAUnBnnQCxke1d93h3bUdH3WTCzXj5dBsoGh29TSbJyMK8UwjKlcd5p8ofe0wSUnN36F0YD4llfSkmS3d1jMSkDdS5xLEqNbcDAhhoqbalOojVZ3xRmbGRDsiU2ZZy3mhgSVZHDDM29b9Htv9r5vovGbI//uCT0uVK+IbpteUKX89qlIfgdKubm9x0vzNQPAfDEn8tqeVRt3PK8C+hUAbl9ZF+DYvHPuZtYH8qgPo6Ka8W50HsXbO+HsgrJv9aoOIKse8+peyIRhgVxRigx5NSkiJtejbAwfb8h2GtPP8tZMtI2+QvB3Zykqn9J69H1oK18+wYZ66jYMhuR3emB/3ygXoQY2rMoz3dKlbejtE+JvbM5C+qovoFUNB+SUS/hFEYdtdX7YrVHhApUhb/tKg2uxLrDoJ2jU9zR9KhAMDOSf4TPFWh4SPnUDw4M4vTwr347jlYvNcKIRUy2h+JPr9oMrly1rwdC8HNrjNliV2kvzplCZV3KdKxOJDOeWZZMBZDfq1VyrAE79RYXtMo6+y1m5wi0Ry397npHoYc4cwbmFKPO/uX4P/bsANATWK+sMa/SiS7ceXalkWRMiQi4bmqDb8+eUzS36HMps6KA0smDN2EOGWA+u3wdUCuDxmKU5y/h5DyaabVqps7NbGfBXVAxMN6u6/F5C+54DcNjOAlBSoKjDarFcY8nqX5KaFvnX/JE9ejouvH8l2xSz0MvEEBuI3BzCUY/p5s40baT1PPodW1zqpaFEQPua10qv6k+iRbEtFxSt/Y6KyBGtCkYiULYMGcaimrzG5APN0SjgBpeIguaX7EDMpIEk5qaIfuJs91P1oQrZe57WvwOTLDdfr9XT0dpadEyr9fQYKinPn42atUltzVauJrxp49XG+bRlN0v69ROcY5sWbJ7+5diaMwJt0NuN25SdzstNmIMNVUzv7wORUsd+RHERc8jBkiT5GkFNBcVrLkj5DAg+yAmGwBvL/Wn3obKRlV7uNu6o4Fy26zj1Ib7lQ7b1QEU6O9q7j8zCmaXtRXCzOEdkq1AaYbWxWJ4lmdhTtLBNUhojp1L6L2g1501bnnvcitajhLkn3N16NomtcFmwTEZH5l9vaAHeITFKJa0WAdwC4U/GMF98V1C02dJDp5jHiZB50NzcZu1H+YIOIS+YE4uolgOH+Eyn5HSY2A8/rdwfVOzzAhHif43/xxsHBLOs/Pio/E6lT1ndw4=", + "x-ms-client-request-id" : "682f58f2-b102-4b4d-88bd-97fcdd10ad8c", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadinputstreamsingleupload&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "946bd58d-7ad8-4316-b9c0-6391a693380a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d70c012e-a01e-0095-09db-7f2f49000000", + "Body" : "jtfsuploadinputstreamsingleuploadjtfsuploadinputstreamsingleupload0146186e2ed54f3ffdMon, 31 Aug 2020 21:10:10 GMT\"0x8D84DF23EB8D509\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:10 GMT", + "x-ms-client-request-id" : "946bd58d-7ad8-4316-b9c0-6391a693380a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload0146186e2ed54f3ffd?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "505bbd3b-a021-4aaa-9849-60abb3e1333d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d70c014c-a01e-0095-23db-7f2f49000000", + "Date" : "Mon, 31 Aug 2020 21:10:10 GMT", + "x-ms-client-request-id" : "505bbd3b-a021-4aaa-9849-60abb3e1333d" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadinputstreamsingleupload0146186e2ed54f3ffd", "javapathuploadinputstreamsingleupload110952393518ff9f", "a5091f85-cd84-4b3b-86d1-f2c23d826f6d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[1].json new file mode 100644 index 0000000000000..45ec1ee3b2859 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[1].json @@ -0,0 +1,179 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload055187065545234b11?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "c41b905c-dd0e-47e3-ab3a-7de2ead90203" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23F6E881B", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:11 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d70c015a-a01e-0095-2ddb-7f2f49000000", + "Date" : "Mon, 31 Aug 2020 21:10:10 GMT", + "x-ms-client-request-id" : "c41b905c-dd0e-47e3-ab3a-7de2ead90203" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload055187065545234b11/javapathuploadinputstreamsingleupload101672fd94d3b32a?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2af2613b-274c-4bd3-a0aa-f1a30a0c3aad" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23F96A205", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:11 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0154f3bc-101f-00c3-4bdb-7fc739000000", + "Date" : "Mon, 31 Aug 2020 21:10:10 GMT", + "x-ms-client-request-id" : "2af2613b-274c-4bd3-a0aa-f1a30a0c3aad" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload055187065545234b11/javapathuploadinputstreamsingleupload101672fd94d3b32a?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "235a903b-34c0-4d8f-ae6f-db176ff9679d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23FA07149", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:11 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0154f3bd-101f-00c3-4cdb-7fc739000000", + "Date" : "Mon, 31 Aug 2020 21:10:10 GMT", + "x-ms-client-request-id" : "235a903b-34c0-4d8f-ae6f-db176ff9679d" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload055187065545234b11/javapathuploadinputstreamsingleupload101672fd94d3b32a?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "24e79645-c873-429c-bf9c-771a2106cb1f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "0154f3be-101f-00c3-4ddb-7fc739000000", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "24e79645-c873-429c-bf9c-771a2106cb1f" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload055187065545234b11/javapathuploadinputstreamsingleupload101672fd94d3b32a?position=20480&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2347a1c9-18d1-43f9-93b9-400d0db89f23" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23FBB7381", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:11 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "0154f3bf-101f-00c3-4edb-7fc739000000", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "2347a1c9-18d1-43f9-93b9-400d0db89f23" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload055187065545234b11/javapathuploadinputstreamsingleupload101672fd94d3b32a", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd0cf2aa-75c3-4911-82b1-a24507341c93" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:11 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D84DF23FBB7381", + "x-ms-creation-time" : "Mon, 31 Aug 2020 21:10:11 GMT", + "Content-Length" : "20480", + "x-ms-request-id" : "d70c01bf-a01e-0095-05db-7f2f49000000", + "Body" : "TXjJQOcMnQTWtrkMfDhG6juzvPXnMr7iNZuaqQ9pevJn/KkkV0Q/bGsiQwoBDmO8YJC6nqkHa6fFJTgHrm6brd8EIqV+yTYtBeEQyyPJZfB0BY9UfQbuUKy5klgUQjYtYbbYRWZeDjN8tiudE2DoFcbhZIxmJIe0N2seBP+F9NX9UuEDrCDxDq1cmiq6IF5WRwStcztXiLL1ICjvHnxqqqcC9AQC6Pps+r+AvzBzuyYOLEubKVy9kTkYXKOWb2hGtyvH7K30xUbISzr5Rmxj/NRYXIAuzpVsmXnoV4DvHrpqWwumB+6PH/9GwTz9L0Xaebs41p+MCyhy/a2PaNmfPl++y9r+MJAHjkD1Cg0kU359NpOHo3F/sWGgMPrQM4akGik1TpNuWX3li5LJX/K9Eodu2H61WAbuy2c6iavYzuyEsAXIXZpghXrN7N+TW52J4movaCZ14NpWNmI54u8rs2nSJkgEKQN5RZe+FnvZ8DT7xb3JmPgU3G6w6N/SOV3w+S00x8aeph9DFaACnhEiwORtEQGECWwbwTCdbMwpVyJHzPDe9W3LnfbJ9uC2F3Nr1PTR7rUJQSfDzLxylNBCF8347FN2JS2n41pwtzKAAk2lcRtcyyzntStp/XfjlqBv5qnen0PvSSoTbVq2tUJPZlXwJG+6XpqPdN42feXHF2tTeW5K6l7rXJKRadaVbGaQhXIU10h6NiZdLVxwvOu8urcsexQNkIqq9EHBal2jJJz9fyKxks8uT2nDtrv78djiG84VuOCUqYbL7E7oS3c1hyZHb4uH+n/pYM+V8issey1qVLhFrjR8jjISynPThbpRjk0rVGsJlvbMpeOvSRhgTvbbePVV+nm2RXDr3xpsxNNosPV1VvNg0n01UxdG+/af8W47mcWSs3mmP62le4kH7Qn1kdyzXhHEBowXDoZLkFD1XSS7hHsFIvp/pggGknaMbGlXH8G3NxY9alcsYuv+7X0ozdktAYJJalTTCfzwrFivFPyYFZc/Qr/ozpymMzZ9afX9IeyNrKYjcFwDVPtSNZQ3ncYWeIGAaSxRnBPOrrJ+m+17BEhgDtaSL8g68uV8AV0n4oC/ZDvgKhwP3l+c7+Q5SsBJAHxXOBV76orVjYmA+n9O4hFMeQp/MK4vBD5fpmCMb6ZwrXWDhV5cWQbrEsCgEhYg+kVOk00fo6OW0+42yVZUmcr1sfRTYvZtuQX6EryjbvHfu8tqOQAFy80B4uae5A+ylcFgS4+Ij8A5yVft5IrvYU6ZsUFogY2rJa90b1fIrRjerdZOsQg7Afu0BWrAtulRiqVZEJdDCTyao1JuG30CA7NUpkZ7CPASfK1jyHAcG/J4CfOSPvR66jF1rOK+jMZD9bpif+LjV4v5FtHplXTJTtY7KcbH16QWWItYsElMFrd1OTvNDNa/NvCjKtTdZyq/u82+b9C1sJUHQ74fEHE812P7xgJdFTORb4GhMSWN4XZ20XmVf1n6L8V9QFxbAHQsDGw/eY+0kk88y2vQJ9tG9a3V/ALqF5UhaiV896FbnNLmLTqO5toY18JxISLBbxqV2q7MxoYOAZu+bvZlUGuw/PV0rCRnJRXD2fsTvrzORAEMidC0swupQ+TkxXwhKjBwdN6iHSVD2GNUzpLeNvpEuf/7DuJJUy6xkIdY+QYTkgfUH6Llnx61OGXj2N+MBviRhxtILUKxO/EXhrj9oTNALwwnFuguJrZ50BtUxd0LeC9AvlGzaYyVBEdhmIxL5ZppOIaOGH6FJZHukxG0GpfqkJd0yFcm62BeDn7+Da1u+cuGRMhoGmJPnn6mXXin/DiDI+q8QEucJ2n8cp/N6A+nfnZurlMObfX0SIcR/oou1yxIq4Ja/fXzAYia1XxSO2lBZv+LVY5bw5iRn5vZL/jvgy6JqtOn3Pr3KrSrrrf8MeRy/qJxtRi0xloWi760wYfTChaAnwAEr49Mnp9bONE/zqXoPapRwr9sdy5KCM08aTuz8xb1HJzEAfxymV+vcRJ4c8IZicDCWqxtZL40MZ35MIbuEdGV3KD7epES+6pRSvCJarid25lGXil2uGafPmT5oB7TcLwf7R2YXo9S9dS+V+8HxPf0JvWLfr5542va5zJmibHW3n+JfNnFXe2sfdVjcK0tquOFR/N7jheVoa5xSlT9JUucKOcfd8UBN+2Uat5ejBpRINHBiI1uMIqyOB0ELCKe2UnO5oUlj9gCBxBqJaBQBInxWmXxbnE6dbhlofpm98nQZv2zHrAHQgFJtI2pC4CqcqgvQwjuAq0sRVouFf46xUMhNLrNY68PTFi7k3EZ95My7fKAXH3cayjDM8EWgHJzier3vG1JPQ/fGHqnl+Dc6HIbavqwlgkkCGZlfRF4kMK8G1lQSDB3RhomzKPGZahe365F4nrtJb8Oq5It7SNwTT2qlmuhiBDdQttFTcM5Ecmqv/vEZXE/rKBpCajleqEELuzTkywOmsD/626g4WcFpAmPxRjPIAaByHM9dQmEPxn2bBIpkULMxdyMh9aLtP6TtCMSFkyrM2G1xufAvvzKYsHR4bPst7Zpyyua0b4rUWto9v/rIeRUrThLq1A6T0Pe/s13rlArnlyeuNs2jP9MvGeur4TKBF+1SCZh9QnZ97HfJyIoP2+Tr499nJyatk1h9u2B9XS/uo5+mW6ui4HLVtzMRM40Jg3VuYdL16KqEK3eLpJngyGvuJpzxoBzoOQkMPZVWhlNDqScn06f8tbsJu2uAL0ORlbt/BB41Uk0A4dbXYog0ZWjNJ3RsH/s9sXPcmzdd17YhVgr7O0N6Wj3hJ6AI3+vkcG7g4bpO4T01O3DMsZvc2ZVcVK+Pd4DbvIqgveROv2rzYP7Kz6hxaafRrq2ibN/gyzevi8s6Jmdq5BR191md/RbvhZtgAZM4Ll/NMNhjGi6gh5hGMYDg/KT6JsnB1vNuesyxvoqk8vNKRiRdZb4SlC7MFJQsZzuzpEMs2ZQTyT0rL1k5B7FiKSJDTeKnBvz1sYNSxCXjdkS/3IwHqWzln+YKC2Ag5LboEDJD7kAEmaPdJ8q4kntloLjU2yHjv+tJmUowOOK87NUbWMGIrJPWZydyXAhiVNPfaULCEBouex8Iy6i7ByWEkZboo7JfS+2BJQ5xQuENX8Dq3VmDse2RomKTbrYqvuM3Z1eGiXNoh2Gf/JyYX4cdQ2lDi62QySlQD+v1W6tR8ykKh2lt/kAYTeS+OWVOKPVMX8rytwbt2TQoOUjt4+TENUMwiy+x80H+z4QMZD9WBacLXfp/VqH1rjjAbhDCLOoNYw3L+zZ7srB20GL+3fjBFPTNgBwfXW9t4V2DAkj8npK4cY0ODAwGZ1Ztc4nsfo/z/qIxHi/qtOCZKt7xn18gdLQqES4AyiXofyE+HnbJLvh2vGxcYq3RFIBp8b+eMtKlsgFbY6RgpuZPVmrbMppP+rhC4b8sQ8yO7tXkYBfr3WGVzY+5aZ+roc/+60gOpDmXQEhx0dzKDBaCtfjfsZFOioblk38/+sP+YKOaH1I2aCdc8Y6Y2hIyM0FeKg5qHXhXXyktUTMTDIowc1q4cGYshz2UWqk4S31gL6RMjb7V0lh1X+QjenTPO8YeuZiI3sy17EkJxtXDKnFOL20B8hJYjbbAIJAqNmJivcmMqB0xIwYTFUEFuQFSb8Orsan/0KzT2TdLq4qCScrZ7BHIFtVAJLZN9i2/jEsnQXk5F6Uc9SO5kK+arH4WFmt9ERDCc4hwa2fPpfddh+lHzPvPJcW9ZJGSl+6ZhcUJ2Pd7MLquFemQHwVfT334w31hqohXOFWV9J/wg1724UycV8jwzBBXsuknwAfeZquqV1VPlXmcs0hgXudjqTjiHiZ3HRyn5vFmUcS5vgkQaZgteu2sB+uQ8HSLii8U08z93g8jjo/8nAB9lRzMKGMaXtFIYRWnPc3HOgeoRcv6UkgKybCgNNVF29fV5aJU7yIvZwA+vrs5TkPrzrI4KffyBv5/of2OPLEEpG2AWt7BwdQ4KjSvMERcJs7XmPiua9c2r6193kNhVl2Iwys8tEG33tf/6eNX1kVZajdu04olun37+1PhkPgCGQUtFMaaDV9NPTIeioqGfaBGKMerMlTBW5m0HM0gxTZHId08+t0TEBy+mktpESR9Je0hFvRtFF6FmWjZ8t6uSff5N9RxgVC/lzo2gt4iu6FS714SfJgOsn9d07X4ICsI70XH3Oxwv6ARtFWPjhjMzL+DDdAvArtooUcGpAJKohQw9kOJMM4cwF1XehYxDKLGt2iqJ2C8EhuV1tOBBq0CQVvUkB0k1yRs70AQcsRaGluPxE/Q3s3rsUmvs7L9miT7nR8ejbBNtM673k1cYRsM/NU6e4VC4w6+ENLdR31Wv2M1w3PgYbsYy4M5dEE1/UagyR+EX0iz7eI/nC5WMsc8LBN3DIwXZa0nlXqNqeTfDyM2pjj6Kli66zXCiOAEVcXBPn3zmKzlkKIJdRYWxzZC49n+K9I/uZ00ITqJLpRXZSCbPbs+q9imWKZlUiLQ0mXom629ZF9e7MRwo490KgkO/oCKHYgB+8llAwM5oF0YC/vg+sDPCPUOMH08aew9j1OkYWxer7eMkb7YgW67mukkDO7LJXGNLYp6Z2aee2etaA9IsQaA8NyG2gj1T1mgNjBQIa87jL+rYvCnFfGPNn6PkqybXnkqkUKH2KCBeF6OXh744jog54P6DtBUkX5kTAC2FC7FZYMhn9Ze9gYPP8r+V7cUAxD5JTcdy5g/qDaibtaQSgEFQKhhcKd5Ea2hB8f91OLqwA6KipMDb+5U+qT9xgmkwehffXx+ySqZnPep11nJelkyaK8ksQOpEdbro+zroYzdjyONXYZxBdH/VMPX2WSjBO1xhpfnz5JOJ/qPMGLpkksLbT7rSSAh4e9SeMbuQFQi1wPO7bQpWJILuq4/3Orgot/RQZVmXpTsYZ5PRvBDbbWXNR4B/w8JZm8v1IC/hNLq4Piyi7pi0myC7vL4O/iXOTVl5qp/q5JxhwWdzgWfolrSfpTzPitB0dkXNhrSO4Os+1Ss3hm67QPy5AVLH29exArX5pJnjaL+44K1RDm28oUTtIwrfWIsBdlvCH2RUKwa0PrzE8p4nwn50kq5XjlXBKjIqleIvjcKS2PEZtVz1Vb8DQ4JtqtA7O2fk1rvXBj0h4NOSWYhUeainl7m+uAW5ZVU8BfY4IogKGFXysN/tin9aOFFLYsTo+EBjanFSMbUdqyHr9vrhQMNNzVatBmfZXg3rLbDTo7dEsMmws22IdDqflVQBoxtTphWfBDBGy4JJ1H4S3mvcJlsWzQJ4gPG/8y/A3SddSMRvt1/fO7lM/nbbYEt7rOyySrZTjslMv5T6fByS0EGL99OSWvVZpciWCUHibJt5svf9Nxayy7OAyagZgpaj/rncw6PQIjXLKXTdxqYp5CT1ip6bhdVbGTAcD5OqtWFDhEFXtveshNxmOSE2o4hG/B6bZNEJLr/F96J5ADmmxjPQf7YtG0SdAoFQaIy/eEi/rdO4eLfA957tLahzEhJYG5yBe39JL12jjud5IrYyyThb8iwJx2KNgzSJ5oPbLQtuRziCWQgG504lcgCTDX1LqS6+9GxebAG+9wC3s9MaC/Oy9dvreV2TytNofLtIiC5+kF/QzWfZAbIEVrUlqZbEwaDcF0pZfd5BpjoTkIrLI0rQizJ8CrqwPOLRQ+UwvugyVFnKERGnmyVV+ItzeXrHDrmWxS9a3R0x3XhtcSeH97hkALgBtDnf8upLgvbDHTngKRdWtY2dzeuL5hd1NZQML0AkSxwfPouG0fNI5WQS100tWP9L0Ba0yDuIi/Uypi2JC6arnqVtbgbL0/Rqxs292+A4GT/CDumaLjihKbkrOyjoBlgP0YKwwKGLTLs/p6eIJ6b5KNn3cU1MlmFc50BziwlPbRCcqB5eOkAhbhq4QW0cZAX73gumETo0k2k1Pqxo+dQ92ALFGq6PwhJYI4jz/KjL4NbPT1+JD3yyGHvjSvurd3uH1y7Ks0F415e0j9rjteAtJdkKmj+Bl7TEG5bbWbXV3bnauVz0CRYpYU9gbRsyaMhxuzSwQINDRsaE6ckzVypKBp5eEPYV56htQtP0pkF3IrY5JqDHXf8v7WwBt0rfgHyUzAXPmSePlXbn2tcNQ8TGAotweFJIU6wM8MQnilQq76HnuPLpxshJi9I1XPYyjZ7CRpTYqw/C40QqssNmef7To8t03keNuy4NJziqOcV9w6+csiCj8mxiQfydM13tUWdi13cGQaS89HEN3HYVZDYtfcT41IqHg5GL1kmHFi8wX+4Bn2jXXgP+tVKswvqEBp9d5XQF3tvQPiTAPe3VI5AQZzVNRP4dwtbT7Kq2ernenrtjc2tf53RBNe8OTbfzPdJ4ZspzHF+CJxazInGA6kWrIk66+O0qdXg3M5BsVlQXTbKzXQzJf1XCLirwiFdWsdauEog3zL8M3Np9emaDccPwRdkIBOLQGJq3c2hKSwpanTH7Mw6G5SttBhubOEuCNDZQJ3rPhVxHG/TQGUn7rO89ScB9eMa/JXLxmePE3oe5onjcnToMw27BFfFhVXjWpH+D/Rt/jvsA/SKvbP7XtFkVYfax8wdZL43Rv/9tzDOrvsS72wEVGBAmO9OI7/KHuyYkRpWiXr/51eFkgq9gyWeAMflrqMAMG60rVhhxbAPSafOTLmEWDWgFW/mRmgbUtKsoPFO3fTBpTSu4nZNBeZcsXGG+cZyoiUiTJ8YYdTu0oUkaC9sZgkDllOyjNTxAsHcKa8jHdimpNBExgrj3cQFGYbH15t/1S9JOjf1OCnW/qhftqH+XM0Gcx4hgZOkMKIjLTgKbPNz5IwNDzZOkeBCTtp7nWAeTdR+eqBYY/UzCWLPKFk32Y+pkJSerA497M1hwyCSIKM4TSfboq/0U1C0w0Cf6ggosp9YCtn3qDW4FawQ+d0iSNkMxeizqjG+ilT4HK0rvrwwQ9W1g/AsZgWl0hXDAeyIAP3velr3dTBzMF3XKeGxdUGXjMMiOmaH7ASwsVuiC8wl7ByrNe6lzPfFWe8b/orqsqYyaxa1QDnR8j1m24KxXaN9B2gg+ldHTEy6yA44q61SSswU9YKfD6+mp9dhIlPkL69JSYPWajrzOVhmRkyIJSD8kP6p5QbVNxm4H0bTTnetpv4t5dJsNywKss2VaAo7CkjIbF1ndwOXhW7ZxPeBSZKa4hj+qDfAowOTxwN3MR1PxGuX2tMNrlsIZgWKazKf4w5yVcYE1MXKfS4H99uwlAhIQ+b64ePe9RCxT7LgLCUiho1gXC0XxxxR/L5Ao5Fq/SmMorWGMWmfsrwBRtsdS1bzkg2oGYK0C9RkQfOUUa4sl5E2hjFqc76xq9LG+/rEGQIA/ScLo7uA5NLmb4EEfZMdDjDdFyAtCA2+IFQxHcy7A1tKrns2kQl93nUcH3ExKPIRxy3XoEBFWCpFVPOlDBVKg0Zxh4Rk+oqmyMfwdNMST1qgMrWWdE69wFnFmJOI5YocrvkTAk/Oa7RNpB+h7VKVuKCWkKpDNy/JVLmWMi60ZqrxdeBzdZIfWKUlEt6q3lusfP44YeTklGcR10Utq0hOs+w6LccY2S9Obl18Rw38A8eNPeZ+Te8+9P01OTjd/ERd9exc+eJk4Bjyfh+MePIvzWbZaB9iIP1m3wTEa1ogns/ol/e1oBVh5LQ1khRM0WxRerqkIRqR8mmPzcUhAFzJ0jEOpHEz9finZLMe2dq3GFg0WUj8oRrWg01I4VvpGOUuYeN7D/jUn3+66NlM6HsFN6Diq6getv7zdLtgIaSEls5KjZECW922VLC2CTILAiD2lzu09v0ysxFhhRgeTqJqXdJeGSaoA/N3YS7AA5VGdazkzMv4n18+Lm8dfQH1zQgo1/f8ZshU5YDPTNGQVvWOI0AR6ZrKxmF0ntTjIhdBAXyT0TvbOp0btAugSdw0D/VzvDhBB4Z4xQciuB8ZLzlaR0DSEWf5HencQmox/87IxuhC8LhGbNMXIcnGgWaaTx14hPVfnpdX3a5p1hMJRLcjHZGSWhq0L4W51Xw7zpBK3SCi3oOeUgsxp1ghotv+swdgOl3hZidF/N0sf5667PLv0KusVjLUVDTuOcErDtmS2M1pHIjG1csSEvZV61mRazH6tdgb9DAgNrIvdHaPnf3ddKxBpPf09dg6mclePhaMMVJaC3joSoT2S8x6wj/Nbpm1Q3e/sbfX9a4ex6xBFqrtK6/bk+I9E04c+7Wf1kY5JeBuFXIImY7v3vPFjV/FlEycEvUTYOmVkC+IDr9/dclIF0LKPo/bINv32IoR3ORVcJoohBPxQ2oWl4iJfDumF2atR1dkdfbmCf2sjmPfAfW3HKxG242Lzp/Rr30ZANgcmoYOTM5nB3JVLOC4vBOT2XP8Pfds+4JxqKM++omaNm3jNhd8Tqxg/v2bjPx0S2IVSdG1FZpvinPn+mH4aAdb5R6jdfVzjGEsVVjrRJOcxgZ4V/gjwanCV3fPJ63EHWvY4yS4ZKvp8PjbTLYXkMN/FQKJ17vBGBGjvkHjF2zmQPPhYdbC86U74VpYaPLGf9ift0OtLtb1KBvofDAn6kDthanzY1BR+1ouwDVnsil3J8dn4v54bWi0MByQm8TeANJBbMN/qlKmr4G3F0jhYxOZhCul5NRgJwmkaNpvMYuPR2H1rJTVHP59/3tJwujHpRZZUku4X7ISP/dLnmBlncpaCBEakycMlivTUJJ+le0/+qqh9L33oJiBZ3IqJtLBJJ6u6KowFRPfvwU7zk3PzR0iMvcB3BuOVhE3M7QzOEXGFeJJCW4nigjL+SsVRNelO0a0VTYQZVSzAridu4rmjCumO43W47eX3NZ6Bhd4xzT+NQpW1Gx+RgWnXaopiW7KhyptkkJJ4HJj6oNzPSHNhw2UUh/AksUbcC3wVS8DCCOfkcH/bIygwgLmSJBIobgi90AuSiD8JaRCOJlmZw6+hrDXs6SHYPsBHHdRfvUr61IN+oGlur0+NNhkMOr079lFC8spPfWb7GBvTwpfVtc7XohtwnTVkm66vIWjluTpLM52bVbFKxKrHLgIvNo6TCJ/o0Td4xouS/DFWwc9zO5i9kukbuKMeSgVz4NyY8XeaOKAFzRx8U36iDZuh9/rfZH7Gz5GP09IHzNL8VMz2IPeHAUnA2QlToL4YHFqWIfbyutKDbPXGyaQbuBapZaqdVBAffcipgHKBjsAxitb0rOVrzIUc2Am1pZ/PRNdXOxvSYh68M0scvSHuGKCmE/FmqcbQogtHJvmS8uvZsBqKFhbIvEgOunlgY9TfWTMykM45WKfJQ+ds6UWFME1shfhix30m0Mi9yiJN3SVewystpUnXgBae7LY3SqUmYfH+PQElY0Y7crXivQOfxz/xiC0xaMZVIUN5UePv/0c1VfDtPa3PI4CHbh86r6lEevYiJsDGHYehChDbLakOgx+yOSSPWO/BHqI0G+IfxOguYcL8GFMMVZcZ+BFiohfZfzwvjJ5dxZKSsJg9dIlCYFe1EsDbD/DSPLEQkFKGBAEwyWqFg7dgBMSz2NisjmcmjgPeY1lm0s3misEH0gQl4FV9rB2BiyZF2aQNCo2RnPdKq9HT6xS5rn0sAqRPQ3rUFWMAaTTVBf0KY2LAZSfhGp35JF0wiIcW6lIHVebXuakfUG77L9FMQw/I9A/cD8VbkbdkDA4wqm9bYUH5ij4b4xVXu3yNoAVJoxvSbsm1m5C4IYY3kIai7VjqI/AXHlwFFkd2VI7CeMQEjFUbF6IsM5gIF4lI2Targrmjlr9ttMl0sZzQroaDDoWdntNGRWpJJgcipKOtIZIBomYO8vhViap60gyhqHV2uXP6TdKhthmay5+vt2zTvf2tdrZplqm2iTxt6p4GgsNpcvGRnZEbSEX6Dtp81mSp2ZapXw4r0hAYM516qtfI7M83nS2C0c+r7o2iB1+pZUVjO22HG1qSPZ7Q2PNqaGOUE6FXcSKaW9Zf6nzS+MrKTZjIz3D4dG11rJpoKZx1gjwSjqgD2ovojMPwegxBSOxko5e1G2f6XHYNOwpIKgN0wHPXmL2RKmffqnMeDG6eH0oHCripRto1e7rJ//h5ntVOaSM2PlFoLVKtC9pup0PS4oVlpJncl1e7DDw46fzc7LxBKh2mZ1a81JAho3ihS+dQCPowYIzCNgeA5DO6ZyL0ga8K0z594SunsbRqcmjK0MnSiYDM+QXazAlX5o3NEOGvV3uZz035Xylz73Lt4EFMVFz9tAM0xjQijPrqJm0PiJeC9A2p7dVAOmVo/T+p1Z55ZUQkg3j+7uxMfA0cwHYGNYQju3+iHcIWhpkqljjVmH/YUn5SCcTz2eHr7JeW7yyV5Bjz+i+DErz7mDjyfQiI9AU3sv+8owvTHPSTE/kKoo6TAkGTLbG46BulQZ+GoSO/VEvGoX/rFi8Mv7fdBWn19p54CJzK0sY1rQz16uOgsyCENay4Ymzk29aKU1RmLUM+W7A9eVC66c6OSogsFUH/05qztyodg8MnKVyLqc8YxqdoQSvjWjtqjtyB0Tz/daEJu3XkKB8EHNXOjLqTJb4+fK5NujW6P/F+FmUNgcDPE+FzXR+YdGHVO6eLUzTRWnnqLsgwk3N0vcbsXEPw00IQTniXgk1HMMgkKJdvKUTsMdVAbWg/4Sbnny2axXrGyfrxsMZBTRphAVnQISapQWsA1JNdYkahBOFAAr7DcnPh8uF6ijCKmH6qTnvSfJPRaw/oCky9U322ej30L9yVF85NgT19wQyiz+oTCfroJk2Nx+CoWemaetraQJ8iIcIJd7cZrlFwloHxH2/X/nCT+iQ42MPKMQ/xzRpK5hj88te/swDIp/PvpvFAnH6dJQ7NuUJcDjLOAI9kmUL/ZqvDcCc5wcywzru9psWHqgs6jqCCjO9BSB0Y8prF6jAeWZoPNjolI2Wbsq/GqM+PxnS51QVsiJCgeV5cgeeVVGuFPulG1fiWYR/4qV5fuUF6QjzpZtwXUNzBdfEgYlQ0nNuUzKiMpy2sH5Y+En2pjCVmEpJL6owjO3QteNMvShdORhBsd3cxAb+Ab/96Xfv1TDBr7ehJ0MbwbMKTkntFQKcuYQTktwOjLy6e5DKRq7QxrigRK0vQfr7ny3xEhGeOYVKYCCH5EdcVauggZntbCOmlbKydz897t67ubfBxPbEVniEEhy87eGrfRU7DL5t/iF79a1uhA33f1Jn5VYtn8km5OdM7UYXeaYYr2xv25cE3L2RKck77N/vArPuAg8HHhZ46oL/bU2fv8zXtefGiEZwC2YlmNPbaicF+dgx8KbKjqH3tjwjL29qpeZZnj9+ZdFX7s8Mh/7Hv3MXHbvpJzwhCKBhlrAQuwNlxXGl5nN62+meTvn4QesC7goT2dW8bfz6gMT+0BqzzHGPp7iD/uIbDwC1ot+zqc01kdbJ/8hGgV5dlCEIauh/t3CzciC0RYgFGk54Rei2IUkO+E5euaeOuQPNdra0VhesBVuNNIWWvbCKFWWJ2ihHiyJykXJr87sLqm7/ct8PPGa7uekb4Lv1AqaQzA8G4AHAjqA9jwfFZ8QQVRDi5/MTrrIF+j9Qta62IBCZ2dH3AriW9fSioxz/WB75LbwA/gMpWKCI6x1ytayfTv6oI4laSV9DVXJgQPuwBxYzxvCogdjP5kfwLFvHmCa3DogJ0KC1zXVVdM8SWCijsHTGMx8oqonDweQfkuwCsJA1PRaTc6TnXIc5DBWxHpfCpQ0ZSj/KqQ8DEDZj4o9RyiO9QWmv6nR56VVhLtTv8IzV3+lsGHPhpSm9LO1YOVbwQ5yGk1ovHMx9UqTTJZFDCchevdPPXVgKFrOcOeZ65gA3fIelPw0KJN+uGqxzMU4FrJrmoajgwg9O/BpO8IZeYkluawbjegZ9P+sTskqiGRs4WQjgQ8wG++fBmq++LLfJgSe8CGSQnNLWPUz3Qu5Uk42jvnOxwF257E/NE4kmIzTU2ctISIf5xwwNkWiinvoqt/y2GhQUr4f0mv8Q/naq1JHpji+7UArBYVeYwwnlbDbbZ9PB6ce2bYACOruGVtGWEy6+gZb+HZWauaf8GN4WNXvlELJQ3pz1bpInN7bZ89B+6DxAFoiCMWQpb93hocz6FXDaCoYWnqiANig/XtomF4V0q+HzB6gI2ctv2Dho7cQPPjNSQY7o0d13f17yztayNOEWnubvwQw5npNE1aB/dd9cVKAilzjBcsTq4mfV7LLCGIrP9N6fW9ZhEyC9cBFxDWNKEeR5fZZ7SIW4Y2vn+DV1O+HYVtYG7efUt7qiG9ZCuNZbrNO2zCbMp8hwBEGM/jhiXpORWYdWf4pGBorgqnq7D+jUtpVLGOtG/rn9y677atuGosjfBwpg1EzHG8pdZxHC0dQuGz3M3hSI57BROZ0kCcIr370mJEIfWiDPzDcvX0/lViw6qrydoEqtuzZziga0o8/zSsZxsMSGJHNDJ4cQjQa/NLfQckS2QtRJ18FPNeiB1qHAWY006uMx7lR6oT4lXkRvx4eH5v9nLgGr+iThFt+26hc1zAul40BcznBaW7ihBl+vZxtxojHTcWFjsbi17lf1qWwLxxZwfnIJOQIr++hn9eZumJMhZMTqQI8vfiDhbHKSY0dEifga6ISVuzwYoHQQM/IA4/1AaGbKm79feJQhgs53ahUbLY54its67Q4JcE6RDHCjE23gwtkctqkCR6fJWpxjgZH9z3KN24NUUA3IAcfS7Th9XVdZv2OEYMhwKjZVhg7WgrftpUmx+9Lnq9LGEo/ZHLKaEZapbuS5elpdbR6SlR2u6VymIrFkR9KywSH9Pzmdpw9PpTw6XdyMoxphtbm+TyWwSfrGOynNI9SPCURPi0BsQ+24NbdbJphBDYPcP/SjYn5opAr0tgpjC+xetibwMVAIn1qM5YJAfCaOfzRtTfLtke1CkGUhcS2VFsVRLNe4vdqmlNIReGx7NEjCYYnCmP1iwuJfNT/OlTz3ByUWSSaduzcCjjZR654A7OroGoQ3E8OWjchS0/iAgJ0BczgOoPS4CyQjBQQHkrQpzQ0muFwhNGFsxzn6KsvEyaUMmw5bhO051CvNsSzKd5Hudzyt5GGtbVfe375SZ57ICPRVKxjtc7QZHM0G6N15glqNf+5vvxpdRfvDiZD6ciGOvmddHArMGG7i4Cs3p8URTRf1IwMwDBUyk6O47j5hykfvXnxnVfZfzgPZCQwrLT9rYBeQU1hcKmhE0vIJY9b3+1z3SVfFAft1vvmeiS2MSlUQb3uR6IWaaLc3Hjjv2J6NzgmTPCtPOqlr0jvs2tkAxVPsIuh+coxL+ukEtpw75PWas2JomIe6d5wCMoDjDFP+dsT2RkR8f5pp941Vd2MqOUsLbXR6htLX+Z9J55veJyAG21vh0h7KDgYQBGdFlY+UeVUX07s6nuJnAFNAn5R7e3HhkGOMo2alm4qEZyAnA9/we2TWoXR8O+EpUp+tpxUU5wdJmQU7m7/emoUjFHec+guLwH0xcDWM3B969gp4Gek3Zw6F2lLUt0yiUhgFQ2BU2HjeQoxP3kwmnc2cXx2nnjN6jCyYUtfbDKsD2MsJJ+Lz3sDbkMjrOMdxQEfag34bzZF2kpdb1nzNgaSSUkPiBe0NeKz5R3CgnnSWk4/dIRd5S2Bf3TGcfOh19zQ9ODtb49OVQ76FNrSE9DEhV26pnQrZ+Qn8m//x/r+sNIJWUGnpEj1FtZNjSqyyo/Fup0tt14A5QbT7dUyaRljoje7Ukh5P+bXwGdIegNUyvRgSZvLVnI5GkxHI30+M29sg/XGbllMUPR3JtlXF7uP3u1jNjTwy7e9Q/v/J2sIokXCFpvB1PrPrKoM+1Dg1LQYEG6+mI7uCDjSwhqjBdX5kCIVMAU9zdCgf8bst7dUFYsScd11ltrWbsgjKiPHtaBloeSYbyvRA5oNZFi02bQDNUr9sA7vC8hwJ9MNfY6YoqiU3STH+ENkY+FjGKLlrp08qHgE7ofm2Tun58nd3rxAoCJzYJhFR3ypfY2jrmBEB0orvRaezzLspjLcxVJbxAThxzkGfnSl2yXUmyk1MVfOrmsHBX89qo+dZmL5WFFT9ZbSPZqKLaby49C3qpAl0vjfEDU1zcmTae0WBfEULkGOV+apqWDZ8sJBzcKT+mxhf1dYU1n6cHC+vMma1GgCWV7bfb3oayqLGGsbcamTGrs2CJV95nS1t/VhOojZ2AaqbDhgE6n6kck8cn80TOSnd2ktrQsZ2xukKLzW0soREmjHeDA4YqzHd1XVsvZe+G96pGWZEOBfrA8OXUEDkfAkXN6y4ZBGx0Xz4TPho1q6M+p3tuYoStl1YNXM0dfjHODkihs5kR6My2EINCuFWFiXuS5NN5lNiQeFwvARx4+kC4fn41ZC5Izd9aQbJmsdTaK/vo7AvAUz+ACdJUBS+YcPDlkXJRnZX0FDTW1bqG8eQGBzT83Dv3dgCUTv0CfI03s8axjsHBDGgqO57cXbQQHDxBTZOcJwyFyx+TbnFeS2gAxjzcFdpoFwqkbSVot8W16kjbz3DW9xjyY38uHMLf91gKgHELsjpZ6qgH1zjnCKqZxRSo3tiGec/Ru0zHGdilMDajMY+r0a40nrGnNIPGwgGgbzlJbShq2OyhvqALGFOVkb528seH/aJXefI7Ot6aTQL8A5fMXk72FDSjOAVMPpH7J8emZYM2GIVzBFOWsl+MPmir/tirAUrJGK0AGuFUnfwXj2xS2tHSwqtgxhbQRF4NKU+wSM3c/aWh+hdndS5KnZJXLIoLX1EKNuoUYTe5Yi863X5KB9WzEjubhQ0JhnTcV00vGHKpNgLqOi5ltpXVHxH89HeUH1dNlw3PWwgSQTlOTOwrpQ52I6R544DtjsRAQud14YD12pe0IHAmofkhCH73D/3IejghslmhnaF/2/ohbz/X3/Wt3m6+hZ2RPKB0k8mkXcaL9hvGyPBryaK9iIKn0e110zByTEYg0/kAzYEZ1+8xn19v2L6+mmLV937tG64qnPczbxw5cLCtzEOH6XuCRee4FI5VvxCSfta8M3KVYFmt8HNDYc166dxCFWpe4S51fadXd6IOrEYmUqWtVSC1tnrXMDTndrysiQzQ7HvA74BpDOiknFAOPfAGVmfY8tbsffIfupiVgQYdThMNxdadoLFItMbIezoZjxTXmznGVbu/gTeuG95+gDiVAund+m5Pfp2c3+hx4wljc6BZFTsFPuE8pg7il77djT0J1S9NzCE1ff4KOI5TRb8KvkHShKHWSih5N5P05sJNHUuDU/TvV1mmmcGQQSRh453tA4C22Sd315fDeJWuqpT1XdYJxRTmmhwtzdFO9y1C1E7A9xNCAp67KJVAdPm96lMw1QRhN3I3IUv+Lb6LkLz1M5KX7xSL1tUKnx/Ajr6woNcPH612rLxoIoU1m5kJXYhCL7nLchq3hQ07BARfmBHZ7PRYKM98+SMT5n6bhfAdOi8RT+79LaZNt/UWJRF3qCQBmROJZDjmzt7UjX/ATn6XBX18RQGzQ+xStdN1xMScWf3hp+C0RIFRBkCLgKTQFRJei84qrNfEQN1+OgpdJC5H3Xfi61RmuZiJagf0uBGEJxnDLjn02HOQCJSJw1mKoyQ1yNgXxoJsOjuQuCFdi83aFQACp3FbHWa8sd8fLAl3og7Lv3MiBR2U7JZ9IY/tB45UNBZvgzsQMDKBIO6iKniL2pJTT0s6HkEwYrsjWU5CDomew7Z8m2qKuy7OZUyH2Lydkb5ru+M/X7cWgCSa9eYcnc7WV6i9c18H+Z5XxwG/FFZkYkLLBeItlTJOlGV3iT5HXN0m5Ezjk4J0ZA4A39qw9fVNvqTdw+N7e4HBAJB0MEN+l9JVEJorxIjkYcRg8K/nU8Mm8sP3tX60mHyjYXcmDVPAeRJAl+ZQK4d/72cIfpfw0Gkjq5cCgDSzQqwlbFNme6S5bCDmDgfAB0xqoFRxD2Tt+2NjJOIVYSugOGT+Pi6jKA6UYatUdd+BoTJtgamXrxAu0yriFE/32Rtc5xkBy8zpBfXDmupFPwaC3hTEZpS8+A+hgEeFBdqA1y2+5RaCQWx6HGJZVukHXlY4QkZBzQvGHdI+TMXJOs5TdiY6HWyIn4L9szputH3rTxbk4asRQpV/FiLoWiCXuCUwtS++Q0y78jA5HJADTmnnwzi4VoRE6OkjiZbUXpvYKX821Ss1pVgjU80sWOElucjRjfhmky8ojI36f3RKPNJhcqtbHHDcVEGpjSxfQi2b2HmdRc9NW2HT7g8K6SabWWETZbF0mFsY9vveFLsaqXfYnkjjJWx/oBjpy0oH60RzTpjoPS8d4U5xBjQuxjdEXOVFusjlfFSX+1xsOvR71Ca3YgzO34mESW4Nr4aKNL9XjSFvnLkzNdNlHntQ6jBIWxwcyncNkYetLDgekINYEanAVf8QUDlawRItlvWnvNUak054iBLSbrddBQR0QzbJVdTDQUIwMXjsk6TfoO/Z6ll56527LKbXLVcE9SIJvkzyGbyAXnVwfnmyBFqFBDw5qg/P/QBOz/x3KQHWbUiMfp2fcCgjbtVWwZHJqNQ53K3XvSafhlfc5JjbpqWJIldvU62/we96EZcyrxd0VrcQcykwQdq7yLNFTTcX0njOlVRPBFhd80BQ1RrTfcCM05EQa9kDNGw3NsKrburviQXk7DGkiglXe6D01QmBwVzvBDGAU3NjVBqRZvIuDtZtsAT2evcQMVci2hH4lDX2IIjDwrNSCpzGrXtyyfwDoh6zTHqYYimTV1WGkDzBIhqo/PYMoP1ID0cao3bhXQKtmDii0VL/kAplCksVVk5rG9YNlUHm9do6KRyWFnwshpgSuueeHUrwyOi1PoxpD8syz1QYXRuU5vJR5oZi0W9DLcwXupoNCOQgEffh8bxTCeOzWUogRgdTQ+ZFta/4Ba2VkLnj77rjxeQRxejHozTD8qQiweU1JvuAth0rYecWdBR0kIvHzDG83Q6JAKUv/SNcrSQa/npAGyxJyj1DcDgWZMOWAucJiVNFX6+5jDuwNyZRwA0qDQA1BCsqR2WifB1ToWIJ/MzaznSTw31qYXEcD0gRJERUTvsVpNpkCCPDQvLHTRoTE57nKCibqLGdn3OqaD+orIN6dsC6p+Oa9kv6rwEUPK81hiFH3jjiGgirXOs6jYap/z2Ah03gNOjhMXj835BDM5bHA/hVHvJ9Z7DsKJXQ9wJP5ogqB59s+xmfy9i4vH+CXCvBqmkRjOrveDLD0ATGoM4b3KI0Gk8FmuTyXWSXO6GBLs/2wFgm1F0pV5UpUP7Op4XUWCF3pKzTlfTOiE8CD37t39e4Td/j2w7OfT3sXNxgA+TGxV01dB4krMjDyfUYqnYFbs/oaetamUCrjP1qi+S2CsyB8U+VIdNdNr03B76yWZAoEZgBDDKgJLmJXjXb3exCWPhIPzDsh7oqltblAAoFkrqS2vO4czNWS3so2NPtyR63JoaW+KhysP1RQ4hAcraq9SV9yozVnx5VfiuyEj9EsoXY+rdgt0aAMm+7FQNYRWoox60gU9LquzYsFNw5XJWHi3SYR7wdCU/Qt4pvJfoKzJ+WodpBfnfYNddZRj/4Cda4aQ9NEN0pSODJicK7zUtx8Tnxn8i3I2Y7HLs7MLaPAGVJpCMFy0rNvxWYS/qaqsVDoZbSeVUkMyQYtErL3pQELqMi00i6UcHknzIviPsOlJnHCMY2vkIiNQ8i0HlEDNjN1fe97kQswlMbZaJMrZaZXjI6KShPW7PriascW9mHlE5xs3EaetDdJ4coMTpD/FA7ufCbkkyObfcD4SqF6UYD4QMzEWHHi+mQ1sCZlmVSUSIKOShH7pTjVlFhO342MBQ6uJYxhD7dIFukByEnThYXOF6+zBY3vAxJrNyr5n5AORH1hmqQh1pjM0V7jZdE0Uj8VS7+CF0+Xkp0Lqyyd2Z1eDJXQ8DxdCVXyxps+TH8//5MjoekaSdD96kaSzB30VOgaLZ6gHXigwizyA28quzxKl08zHF5PLV20f24smvTzTKwq1q5kdHJ5Q98ZkP2RwSuZ92CZtWA3+sKMNL4MFjy/Wf6Jl3NzFDQKLaNmuG1rf2uA/mTvV1Nv/ZdO+sNp2TSD+5Nle5xH/uC7vKet08zoJsY9GCra87KUtUBubE5+kCBddb8BGn4hh8JZLZyjVex55sfeSixP/1posbluasprr4eB12Sae0/i8ULjTsBr0kGzsm/J4QTdV5BahHMMODs5F4plzZgqdG8LN7MrbPqwS/M/DaUeWjWcztuQP6z7Pd1JHcZJWRbjkAqfojRPU3tOVsCatAXFNIBhIKnFRfCJesvnzS+qvihs6lrPQc9B3lTtCHcZ49JXzz9Sqm1wZQF5/if0w2QyLsmN+1Jb7VZuL2Ocng1TG2Z1YBF4uvbPVRwS/zkV2IMuVh7PaH27XIBCBgWZ4kahiWokjh0AhRYM3NR6Lij06acmfitXjtDoRJQbfIZCOF8pprNUnpmmuXcHoLbsTWhId2LO72p/UISzHhn9AKwx5gehSRIVEkyVs6xvMy7Kmq6+Rg4mCcsfTZRDp8dPRvtJL9VxcrXbGAi74yveMLuu4fRlb82sIzlZhKmX9jHNXccAncMztgT7FEQEpQLALWFr5ROputtgJLvwQjLQ/OCNjy1ZWBloa+8z9YEB4UOWC5ilKOcmHcXLUwyR0uGngpCssr/55SfdtMsfuRWVpVWXYJr4U14nUd397jfU8p7XJn/YZG57Wd5ZZvwcp3VptIOqd44qOZ+Pj65hsINI6C5xsEfOTH2BXPVojaioyZ76G2lFJVPxU3Mz3x99WkopOlWS5D0y+C3JCG6nfg9c58q5Zl7hBSYTmqpRk07QXoKfxUf0U7/I9mS4L+bdq4lzzEB/Ycwmtsa7iLASlr4aqKae2QR7EdiF4e7QxE/dpwKXvORLFDb2XE1fw7ZUXD3qT4pS8s74rJ4hDCF/8uc85LxFDWNz2/nfi05uZDeV/CKArFfsQSLCCFUweClQMqv/PBzVN/jkImKNjNzese+3s5pKhXLt6H6hTm1WqimBgL0uNVq0C6LzBduL3Ki1N9eRMi9eUaMob1oEMNSsrIYlH37LQxSJdccH/X+iIGQbdVARRhCo1UkeKH5QnbzXmv67O50D2F6zL6GIiQJxKrqbBHQC6+SpDugcxJjTJSAv6KngY1TaK3kKLUVxSZDxnNlWovO2yFy3d1JNwHYKe8FZn/2dGjs5kA4Mm6NQTMLLRX2KO+VezG0o9Y9vpV9RwCHeFRlWd9U7RrhKa05AeaJPQ+dHOwhbC/NFsgbD5hlU3TfHlPxMqKTptWfsF9nrN6r7cYaAcgi4n4rQSrIy81LZBSE8KN1+VCSWdgGUSxWvf5JnYTWZzwHUIC9MAKB9h8Y+WmlViT/x8vjuN0ujrmp4g0Y7j8wxbap6uJldbB1e412cL8oLK7yMnu9VOL4DkyvWzNhXsyw28QwNfaKZWUIefzxNOmFQYtNBF89PQtqogBxY3s8uOrVVbVbnf+yEpW8wBgGI6FMhYLjc6FWo7vUahDSg94OsXo4yuwX1GLP9zLXtMwhIRjS86uCWM0dLFDDIkE97P1xpaQbqLQOEwtjjwuegCXMJctPJr6gaLzbbsyxZZURCcOtEqunNvHf7K+SuG6Mds7TLZ1ysCkVJKpV+jJl9pbh3QQ7qKWc3AX3+AVMplWybUPWZu1ML1lEi5eZP5ZTOJcjkYqLeH4ILZqC7J+5TihLPxCL8hUk32ih1Mmwos/lTKFlpvoLgzjzGs8koTTuwUkp0p2ZuI/M1JGb9bqj3bl6LNH82s668Iy296ehWMTXdeWzhMk5VQo7W98ZuPFI1uTsx/SJH8soLQTt9hKyX+5F11o60tdme4SdGvw/doNsjMRw+koy5ThS5XfOxKPe6i6poSFYKRZn/u4jljV1aJ6e5toW4/HlQOXly/bG81m5GCftOjxQsZHOyubq2aNafozkUjdTrKrQ3/qIwTYhmBoiW3nfWHou/trD9g9vVOXDKWuP1Laacq6EJZPHoSzmNaBP/0s/8jBP5PdII5RsXkBZR8XMgz8I32JqhPHn+C0VR+KXoFZ9MykwvX65MBXfL2o9wVhzmi5wV/ubveLSUuvHBqbBdoTJSiX+2UyLcAPWvklbRoBtw31c+qDn804A3U1Mh1nJm3olYYbB29IiWCIr1FUgzXjEeb+fTCKNHdonKu1p5IC2IdjSD5YfzGbnmoNSKGXG2oqH+yaMzmkteIgEoI71XiCU5bJGUYMyQ77+Ob9qgD9VAkHtFPySkSMkd7zUTQ/wVyq4UDh7u1de/niXqeFO/3qHkIZ31JRTmnePURisUI3A71BxQjS/cCL2mm33jS1GI/NEOrVkzzHMGlFNe9ZTUV3suPNIjHFABbSBrzjWGpmUeNxrQebs1kp4UQPwbVzom7fP+uzNtK/v0nGd1g2iicD7//BA881UMBh7idQygiJsUo7+rU3HvsBKCp/Ke7Ujpm7k7iBs7vAO447paFNwHnn7go8I0erafnZiduZRjpWOPRh4LbE2IPVmomjZVlQOavDyq5BaSKGyM0wuEZtfVFRIt0BZM7WrcWnOtf8Ms5d5XEp1VLWuHypv7/wQvfQB1Ou1E/FDVpTsqwW3rJC0hTgTwG3UBhI9gYLDOq3G3aPOi0TlMVnwIAL5umMfG9T9YxZ+EwyWDmRQ9ADC3nbJXJYNgRHlNY/SVuKpJzuBwyS6uBh4/7i2bnpZwJ6x5fiUMNjDFwW4cWMcb5+sQrDFxI/TV69ka//4gN8P34bO2SKrn7vBh0Km4hWfdKkD8WORynJvJUrxm0mPn8kJbCFM2ylMSyv2goCI8h7AXEx0m6SW10WY6OjKw2DYa+NFyWH4mV94eQSWpNQlDtQMFULNQUshXOTIMgr9WpRlbM7oGup3topbRkvYlclKUkmk8YAR+j5qKjdxmta8ENfIS5LmU67BPonQQcaxAQ82+g73G9E84x3YHptjcyjkEnqbXddZNUgyAhvYKJ6vts9EPjFgpl7hC69N4IBPdRTaTxXozOL4d5kmBRp9qpOgIWQcZN7RcGbiY6MDVu/H68ERfONKrLRN94hny9OqhfCFEfv0PuoBOdRaMRlPJp7BDjuh/VA4cj23xPJ/Xp0unAsv/d15zQ9n7tRgc+tEz4s2CdYR0YGoY8QWXUhAwztZBauxYNB9BW3iqErAD4J7m8JiSAkOwZleXaiE3iKwbl4/5R8PxELZs/uFT5MqoVoaeiMO45x0xsrFGN20KxZsj+aqhDju33Sa2Mb++M13Y0hppGAdezDu4/IiKTm3CEe8r5lqOEnu1cIkw72fkyNLafpAI8eADG7vi9bYAhGm1HAh9ISLZ5tl8U0pCEV5CO6/Ws4AAswGeqJAd4u7jJZAIF4OaXV6MxaUetTSM4bH9Zo3JSZzlMDLZB2WSv2HjO8vNWnaZUxdFBhp+2uwdkqZ2SCSYtz72T39yAfh4rh6T2ti7jR6KLCUkRIKpSabrYxKBaPP7Pc1qtNzsQrZI7gfHzKxyLSSjI65bZojk70xPB1p+PjJKS/W+mwRD9VDs3wwWihr2x0QW+UCuKKnW7O2EI6IkyAYAvGKC4nKTbFPpIhf15S1Y9YIlwplob/qA8bNGZqxmCaZxCzj9Bid63FisFOPUapyzH4mCSkvOqU87Bm+qBH3a73isIZRZq0fY7eTdnfTlL3TgZfWl2jdLKxKITZu3y6aqDfgevqaIdClNX0i5M916Vjo/MWiOtRqHwgjFsuCNKrR8t0pa4cAgQ6DwvR87Jjx9Z0/3IcdcMlI8Gy7F9Hoj/cspIBrtGJYciic4Aco8pR80CVsmnMuUGTQ1vvN5OIx+eEQXhPfXa001tn7rFDkJewFOJqPvaiH3S7CppCuL2UGaQuHoNtdG98W8qa+bKMLm0zXlk5lSMI+g8uWeT44EaiqWHGzBcF/J6CoMdPodqMvaIqS9GB/5HJdeEupaunMclRXF/sEdmf3MjM22SFKmlxgTG71DnK9ow7Nw5Mu0z5yc1sFg4xEJbS2cpDWNBAXSaZhLAVsB285FQsRFLoK7M1bMmynr/kd6wwRFCmAcqBGW0nm9UwbxLEGMwQKTpGQ9gulHubszkQnl5ZWaBUcE+9VsqAVY6sMKkLqobRZISCYdN9VBaxO8pGbHuZyPwyw9imUgqqbNi2PmpLsgvh6lbT46vcquOkRatTXFG15wH6IaO3dffyGc0fDZ3xWfGLWbGfORHpFlX8pGGqZo4IOc+kB1TpaJxNiH7wM1fSHbb1NaeALjUzaaJjZ/WCmT4OQuY2PRnU6LaDNklzjwrIe0NLf3kI2UGlAuHj5bWhRiSS1KYuqN/bpwHzLoQ0l5PccMrKGvXMFjxi8+V7U+4m3OAyYtpFiMX/UkuIAftbPmTZ/A2VJmw8VWD+v/yWzKFOy8r01ssuq5NrN67li2xjMCxZ/KhIbWdr05GosLyxedzYaT3bogkPS4usX9GhT98Hhxynk2e8TJzrZTEAKOuDv0jTtKRgleNd3Bv3Se+GphvZxgTjC5WeqZD84V0ELCBDAYqtCqk4A5tOmkK/fK6pEQV0BdTZzqWzRm0+PpthP6Dny7hFiw4dZf1lPSAEeTs0e7PMqDRVzQ9GxZ5WwWbwYsIZLBUjuP+Uy9Aix9fzMdqfHReFWqUFHKYfQBUtSa4rF4Q44HvZ473G1A93/SSTdCPtFbcIJ2u1cY8d4pvfHXgQfQEOKsM/18OEs+2Owa0DLmlcGVaUADHO+xG7rnBBS5Xl+f4z21f8QOc6Qxzug2K0xAug3D4ztV1U697K+v3c8ikis2f3vtHGL0FqTFwZXB2Fv+XLlbl3VThn0D1Cjnxw1cD8hKcYlsPfpTv3MpvHIPj4wdVexgXmrQX+Vbvmvf49zTpUc/Lac4xh90wV02tnHXg4xp1HT5yNE6XJhEg9B1mbBs8YI/G3xWZ2bzhFj2ob3TRpsZ5seY4JpJN0maiargws+SXkpHxgvwbZB0uVVP+iISUsxi9aMOt4kkMztEc59rDEpPXcFWtTR/fmYyUi8yGvnVaT1ZKR6wvre4snPWIxuW/hJiggvXsRzkKi0sECIapT59ZOUWCgcScLThPup8tXJrImBGRyCKxU9vaBbV1ypIa5pmw9uTWllKA7pK0dAGJhcWV2MEQr9leGqyYWZb9e0KdJU1ci+XMnG+miDCFUusYoAHl9DWmu2SrOVDv2ti2KJhof1zFUuxadJe3/34ZJR29cdAxrr21v881RTvpMcOhOelNPS/lFwRm+Jz3THONEhRrmyAeao6g/NC3Q/Ca83Vud18tWpSIIjkNn28zoqSqUXZXkQlxw4kBVYvSDAnx4XdQLboEtbzTDb7zx/xlV0zKpRH1E9BK036Oovi9MhIWhgF5WeNDrkeOkcTeNX1fkzz3y+PQG+QprH7qh2mYn7ciExHi+JC/RZ0ke5p6YTfMYzv3lSS4GwtvD1aY8GiJX2vHhhF/zfOmVHmqZNKQB3tabapoNIwrTMHD6gVUtMgZHHW2B18+d9hTt3qpHPar1syjx2DnE/eVZ55D7GieoeZpSevIORVxW1431lqNQnBI+wVaofbweuD3uJwynYNAO6169rsAMpdHSvTXbTlKavCMbrv3jV0q/S9Fj/3LQbiA3DXJLR5PAsU+uyRZs7VpHzKme098It8QnPIiOSIXPJLW0P/OLVpPkUK16Z63mkzeFmCWPPTyMhGN8r4VE8mLQX0LVDJF+zB/GiQ0O+nNKGUlYkBz3E9TS18U0oNcBe3Tn2kbUcyMMvN3bDc2nv8hpRiDd0+wVKPdELS+uxsvuX+1780H5gWUZ3fH3xi89fTAXmiMTfAPyTwodbS48Ql782fMEJVomdTpbjXBbqR0OIvLLRCRIkkWr+oDp7k39dPP7bjnHmYLuJoMjAtJMakUExth62Bj1pbS4lZ+wkOp5Cg1Gn8rRf9QMMW5rb/BJboVRPvmpIXjcBS3KvIZvajBBt4seChpwOB1kpg7aFbEMYSaQZtrw8ytOFCyP8kA2I/mBMa/5GpHK8UB6nrhvf82BsK4i2j+bvTYT7UNIpbsQTjdcr8V4X00lJJWtUzRla54cJMycZAPON3WlmA3s6aT4hsBKNK4AjrmZIoOzsCE82YAR+H/qz3hCJz+dF7RBsy7MbqrFx7xItU3ySYQcLWkk9Mvp7FMT4BtUh61tFHxAxFW271E9GuND7iTQ7/i5NV3hW/iybdbq/JfzcGXMfIqJGEU1J7e7xdWHjgRDbmehrztbrqtjNVD1eP0tSrPEsiodhe2zditgv4daNEtvFoKwfKthmdlJgIjDQZg1L3zgEeAgx5cX3DLciMudNp6D50XLMsPJgfuz0LBdCrBqpzFHXizTz0ozXSv4tup0fXLtwZV7au7IscraJJw0V9RtJs6gzxGQmulv8Y1zHVSXCrZCY/4ch2ls4shBlbR438SaCTcJOKluja8X0sSK6PYrV1OdDkq5ZeSdc0rkq7CK97BUo0dt4FrPr4xJXAFjWxdtDf6bxLTkUHPH4Py1DiWqc6y+0gzVo7x7YtmLsLd3S202yNkdke3S7qfMpvRxIA+YyNBWHOJd8tlznKvteSyDBeFhG6zyEpIKSmOHRiqcQwp/FYJauHXdIvx29fb+D6eJzSSnniBzUo/bO1oWG8Ia1SDEFD4DGVFGPwgpkrxvgB/GshoJL+vBnRs0o+oYWIiDHflszIYEiKUjbyTP6yFJkgemQZ8dJGIaQFgm2oNj+t+h4ysV/rXudtWg5m5jDiZ3loy8nK3EqdaViDn48cU28fZZQfqCg5jqZxS8TL0G7jGnQ0oXEI0jQtqG7/wJYXnLoS1n/mFUhv+ug7vls5vw+3pUxiq80cAMJI9OhyEIf4GFq7z4woDbLac8YoBB9xG2PYPclVLcUNN9Q2LqYKPV2cOS2C9HkU1jUUpdy8Q7bTlrjAyHvK1ujcPtUDJgp3+QWP7DSOonqFMScbaxl+gRRivW6AdMZ6vbi9TMkorF7vl+xvYbHUexPNT+gvK7ABq4MyPI4t2ZdnC+KYOk+mp0s01QrkVtRSjJaGm45a002ZDjJcYKdS6iubkA8qWa9lRvmBWhrh8W7FMgzqEzjpU6FSpSxSKgBGnwLyYZMMjBM+PQX4CLkIv+Hvf4a1iAQGhY5OlO0JVgcGdIQbDn8l32bmR15UwY5dzPbAD+s4TeEVp66GbI1E3B6UHRZPq2ZWGn30CMWmgXmMrghCYNX1jd0YI86rXFnbXSDTdd5EQCM/dJHwn8J2bkmj4oGWw0HVxE3WDX4NqJivFxmvzxPIErl8dyQocYcnXyUfke6iidoZWcciBprf3LSCqec7CR6Q0yO5v0O/Zb0/JuF6MbwtfxUFt5CcSixCriyai8a2aQwPXlsPMmFRcEyop+KanKYZUMZKZgqUZTy94Twnu77n62scEfkw0CGpwiY1aQz+c3VWEOQxme7cZAyWUIq4tOCA5Up0q14OM2tz4Z6Cn6Ao+ZpJwVThWXr9d+jHHCM7u3S7aumBkTlw+MSJTUwb9nMMJ8HzlL2MuaHSFvZwwbnXV5pcnzg3sWe3lZX667ax/OpdsUbYL4eeVRoCdyzllrtSK96YRCOFGD1fZKXniOGWbdDQcTq/RcDRK6Y4FMKU7mns3amXse0w0UQkqfT+uAZi2SrqRTKFTOlnRH9x23QSqDFecGZ0idn1o62o9tU2PN3UdPmcFmT/ZgjA0Z26/szE2vNreTlg2Vdx2aEgCUkmDZ1BvKC8GhT6ixIU7lqs3/e6Ss+CAjt63CfS0Ir9G80KY+UfloTqc49y2HLGo2kV7IM0ssO2BKAyuL3V1V4BQyUV0dXa97Z5uaofbeWhL0tFm1j7+vjuvi3xl5IyKj6rQPp7cXw4RyCJIifSHGluaAg+DVSaOznQ7yOPPJg28TmdOzBKDvN7+4LkJb0Tm850fBX7SiPuNWnREIBeRJqsN7IgC4qEtw0S4uhmnFZapnI+kfYq15s6p+x00MhhjWL0ajAXKsIXGRga/0c01cvKgYpzTRmaRNY+r7nupxbVvtigEqn757kXRJ2rSZNkv53S2WYBBSTc2mqtNZptuo+lW8QdgYw3UH1i5GbfDpS6aJiuqzq2b5LM/Of5RORJRg30yHlgViHXxcGdoKZZ3fiOKZ4igLpSVmFcA/7pIiI9NEtn9x+GhhadUTwpHXXln9LetRAJdnejYnAP826J/Phd8XVvFS5KzbmHvpBXsiW7iiH97TUZg7ZQxFeVXtcyg6CkwVeWKwlAEm6eE0uryD58bU4wh6p7a7hffqnUCCHweCjZRTwfQeYInylEGUm+q/lZXgru+3rS/uXtk9p98HfUVVV064l5tBs87J2f0gVSGXUihwyvjL4lhnl+UtmaefMIQZdxtvPr6gaSsvfUbljUdVAh7DPhU48BL3ccEggEBjzbOqq5RMmTQLxY0SpNAZsUOHVAzDLgraiJ9hFroA+p8mk5s4eXBRHHdK7BC6d7pR3ewROObRWtXM5lAIEC795DjDAT0sKYYwGG6G/lgeEHcCxA9V2vzPmRqFL7NOluKUmheDgo+H2w5lg/J5mWf6X3udEM6Ed4O0IZdunBjvFRQG7Rf+R0Hyf95ZHNOwgY6ahmDBy1RnQa/o6jhKj1+cpyHiDbMaQaQWMJWtc4lF0Wno8plRUbZELtQoR+ysd5bSd1geUEVP9Yu+9Mx1fs+eXoVfY+LXWqPLjoXrs/PoJrzDTOqSxFiC5A3GBYnkvaC78zIfnogjqjoYWcQ4dmcdDT5wlCRPlb/L1KiDVuPshNUcozAg8/6yJ/no4BZpNP5MKnIfe0v29nhvT87Xrk+v718VECMzNtpamG8MT1EHwUKn/Gw77zRuSLmkUzuCzsWgcbUr23VAEFGxCgwpQ3bx2wvD9xYZBT9jh+vRyAftYG7MVBXcg7KwJHc2JhA4hxqBO8Ddp9+CaVoKMFE290XKcpcoJjc3Jo0klZqVNDPWSIBL0KQb0BZ5xc5w99bjOtY0WbPMmCR3dXvVueCqf6P6JqJ7aknjXG9o6TB0K8eIHY4xHVgpuLh7DSjj0o28E+Sh37xi1mZwTA8CT3DOt/bhikjTj/LNyBwU1puynUNP7aGH5/RS13XNLQQkzc1ZQi/E2Cxi9/Cq5sfPb6HdoXtLtfMo+F518gbAMGO8yzbF0wriuyeaGvdqdCGXsvfexl2wQFrAxEfkxS6XIJJfZW80Ob3osveiIEtglXaCmuHuVoLMT3tdUZZrqLTjEfc+IyegWuupy1tEo0=", + "x-ms-client-request-id" : "dd0cf2aa-75c3-4911-82b1-a24507341c93", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadinputstreamsingleupload&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba8044a9-9c22-4758-ae8c-2dcec6588abc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d70c01d4-a01e-0095-15db-7f2f49000000", + "Body" : "jtfsuploadinputstreamsingleuploadjtfsuploadinputstreamsingleupload055187065545234b11Mon, 31 Aug 2020 21:10:11 GMT\"0x8D84DF23F6E881B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "ba8044a9-9c22-4758-ae8c-2dcec6588abc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload055187065545234b11?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3423db49-fd86-4c46-9d76-da1528f70c50" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d70c01e3-a01e-0095-23db-7f2f49000000", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "3423db49-fd86-4c46-9d76-da1528f70c50" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadinputstreamsingleupload055187065545234b11", "javapathuploadinputstreamsingleupload101672fd94d3b32a", "8fea5f4e-4c02-4dd6-969d-26eecfbf7d2e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[2].json new file mode 100644 index 0000000000000..406f1e9059409 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadinputstreamsingleupload[2].json @@ -0,0 +1,179 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload0502637065038beb0f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6faa8204-aed8-40b8-bcdd-d94f56adc1eb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF23FE552CF", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d70c01f4-a01e-0095-34db-7f2f49000000", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "6faa8204-aed8-40b8-bcdd-d94f56adc1eb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload0502637065038beb0f/javapathuploadinputstreamsingleupload158443d88b8fc61a?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6104a24-3de6-4543-a446-fb263ff6f225" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF2400ED5D9", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "61d67fc2-b01f-004d-13db-7f8898000000", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "e6104a24-3de6-4543-a446-fb263ff6f225" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload0502637065038beb0f/javapathuploadinputstreamsingleupload158443d88b8fc61a?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "47db0061-8f7b-4bc8-8b39-cd41efd4bb6b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF2401F81AD", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "61d67fd1-b01f-004d-1adb-7f8898000000", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "47db0061-8f7b-4bc8-8b39-cd41efd4bb6b" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload0502637065038beb0f/javapathuploadinputstreamsingleupload158443d88b8fc61a?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f4f6eb9-657d-40f1-a078-bc4f39e55473", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "61d67fd7-b01f-004d-1fdb-7f8898000000", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "6f4f6eb9-657d-40f1-a078-bc4f39e55473" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadinputstreamsingleupload0502637065038beb0f/javapathuploadinputstreamsingleupload158443d88b8fc61a?position=20480&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "8dfced5e-82a1-475f-b78a-a1f347041a75" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF2403B8EEA", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "61d67fe3-b01f-004d-2adb-7f8898000000", + "Date" : "Mon, 31 Aug 2020 21:10:11 GMT", + "x-ms-client-request-id" : "8dfced5e-82a1-475f-b78a-a1f347041a75" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload0502637065038beb0f/javapathuploadinputstreamsingleupload158443d88b8fc61a", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e1faf32-e86f-4f72-85f8-25d468a990f6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:12 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 21:10:12 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D84DF2403B8EEA", + "x-ms-creation-time" : "Mon, 31 Aug 2020 21:10:12 GMT", + "Content-Length" : "20480", + "x-ms-request-id" : "d70c029b-a01e-0095-41db-7f2f49000000", + "Body" : "JWhkIJclL0IChIJW3lZ1VwXbv8ySONdxYmNjuLv86QOGHspgWplAy5BAxdaHw2ax8F8fZCnTzEs78dSmXYR5N7GTMWbaZmwYEo1Nqsg4IyOm1zeB4rmE3q5j/qbhhPybmTU7YYCA0RSu7B/MnE5QMgqKzkIzF7ZdIxZFtF32d3syk5fhbH/Gii6VqAfRBGoyRGyrnIXzlsnoHGwM+2ElwPX4IP7xRVx/gZ9ZG41psNc+BWDos3/W6qv9FAZ5cAQFYB3chhNyoh04yK7xxo+zUihiVp2PL6aGAfhu1KfInzh03bFQEKAXmgrAuKHI1ffr9RoaK12k2w/j3VaZ6z0fhzUJ9BLUfO9ZUAySKrN7bMzcZg2dVmd18Sx8aU3ATgEKLkD/foOoGLWJd18n+4muvNdA/KIndAwOHJPKszLzFW3q3Ysy82gs3dgRvgvmB1IqJ5w/1m+T/DbYXqLFZLuUUXz2f+UvLLLOgcHA0hKCq6/OqGKXRIVNLeevk78KPmi5+GJUvPXaYLVvY99s7ODTrxMofKyv+6Y1tpOsQe/WCC743V74OftH17F7eaM5j+BVAtGt3Ctl2WcVjZPAcbWApxgwk1egogru+XXOmpHwiWvpxHshKofFqbhc89wAO3NxeWyNVQY5ltAcdo2V3ye6CN0T7qqQ6Ky0uFlnFKKpQW1CPfcn+Ar/cpS4Xh/jLb4SM1Gu3zYMNZsPWmqlciKnGRpAmsA7rGyNAYMITrA3E98HOJO2aHunBR8rCm4c9GW5sHKxV0MqQK6jpBFbLm0KE7hfTENooDjBLJphA2M54Mszr0sBvQ7eFuKGA3KZ77wGagAgFOlwX07dDBs+nMe1y9s40ZgFMsaFx82tMQAwCoeCx+wKlOiH0b+pff4wbcHQXlj+3bBd4/uAiA0Jx5Wazy684a+GU6oowhDH+B6AD0R7COX2BL88nuDxuUoldSD72zOemNBoke+6o9PwdrynTXOyx6p7KXMQ3MD4i6dVUfW91qti9jTZ699eV+rfckQFivrekUQptAcPCdymq4hRL0q0hOxx1PCwTUEpeRIHUbiLnFwmwuUMYTerC4HmD4z0v2eX7C3+qEuFRWOLXL7JyEFYPRsL1Ea5tVUci9/TMEOaTPvBC14ZbOrpWL0g3tbB/+27nWo5uF8RFZbGcSrTeB7Dxl5gv+bTRUmmhVMaPUAZK3cu3X2ygHR0DANNreL40oQ5eHQHNMZCw9lN/lP9NWkGnY+XTniPLS7q7HVg+C8CCS29BQDI1fE0etrAp73hy8ys3X+Q5UotbNJ6wigy/D35fK/B8TG1RsFrO0rM1YuhXaJIsCIzM4qYuUBgkhaQ1bVZ4c8O95uYKfXb4MAYvE93nAv3cIDqAL4XMk3nulpi6rbDR60Saya25y/ey7UkwBNQMVjWDMVreNZm3ZUlXT8ySOe1UVP6ja6r6THJyu/f1Npris9KwU513Ig55yaaC829jZqJXt9TYjOb2siBdh+BxsZ2/TY7T4RYqtsFIvsqYzOt65VljmDBFiJv/dOp9I9PQrz3nPG4Ny5nE1SAGULaAhSQ5dTrgIRZRZr6S55YxkB3Le8zX/gUJl6FEsnZvjltL+ZfiEXi5Z15mENhvUfj9TpSIL38IFXDQKlWl6pOn8sTPn9OMZzpxda6KUcYQ1xX2+QVjrxnNeHySlHohmVDOslcO8T9JDZF6Of6SDnQKeHyUrsw86fXeXUI5XuQuo3vi/jD0znYfKUnGYANmvmjBgU+PwPs3bI4otaMQTTIObGjQAtgVndy/57by1uWyW6FCwDGAZysk7oPfJILUE2LGbJUIOeMpldqZ9JYO0zTdnndIewjQNssndAWlQK+z5Ke28lZJQVtEaR1MXiJW6v9Q+HhGPg30jfAIZNfk/8Sgo37J1ADq7fRc21DEF7ga7aXyrOgZhghJVqGNg/RfqMQbCdrqFhF1U+JAuWq2VQv8js+vLfGxfpcwkIZioUCUfBxIoauTSX8kNrDCNQ2QJncWBVXNK9fsg8ToaVFan6uUQwG279lNcJAwgw0yDi6TsheopMhLexElgTtHF1DXpJ4nVDFhXxGpZlgPQBzUdN2i9rJsyFK+81ipJ4P+NbHmGDqvw8AQDiE3QBKm70Y40DsyPmtoAzvEYHJvegA+xSgcejYel/xASRehSdGLe+XXB07CqzWWy/1pmgiYisz9EtE3cI6sHavrBUcmdjR5WN/Sl7aj5pxVAPVKdgLS5kzgnYCKHlUBx4pz71pOYRFjOI0OA1nBMQ96Ybhlcn5CTfwjx8i0079ogvfOSrndE+yxN+qofzfkB76c8/rUo7Pf4P2y9XZXJXOpmvQInQKESXjTJFBSe90xKvfxIWyYkV57/JKQ47hpyuyRZ1FBRBlrQdJBwz8/Li/F3qUoMlqLfMrxTMA7Z+kNMxQVZXVM3zOeEguT/e+PqB80G2cyxqyT/HIVwFhRVu183sYorDVhqaCUwEe0og3LbxNBmi+nU5wQqqYWErEWngLSlp0eCVatPgCCu9Wzg5Z3cqxWv9bF9rgqaDOf37xbV3qInykkSrIr4wIeQN2MraJr8z1vdEcX9PxrozHPxhyFeEq4byFtU7+3+DSi/uiXI+iGfB9teLX5fnpnl8I0nXDP5Pe3nh090TSXnRVYnWDYMr035RuJR0m/Onzd6fKF9ttPKs8TLNvYlujFfv3sIyTnX7TsNtnf2h5baK1JT6nNYH9zZz5o4094kyTzOYy5WFDIChQaQNvw81pqrD/ciONJj6j1pHJzz6ZrO1LmIHlKYQL/Ud4tOQT1ekadjBRCQQatUdai1SG0eqaMa7nudPtSZiuPRTdX3WfbIIGDOCnnS9NEqdgSlXp9byZXyQAQtSwoeIu+vf8zjW209fptEPB63JF1X6S/3oaTX9/5B5IpqdE0Onu9TtEbkR1UJ+ciLyrTKYMhEKU/pW4wV6nPYJTIKKXkWV/i8LQ2QVNygmoPV6fNgvOwyjxL6QkBEjZUWzQhrAgdlSTeYvQfKHrEQray2FkolisQ1X2KcSsP2iZqIEasd8jRYVZdyexjlEDpopvQKA47GT9LwpiJ0O4VA5h8vjv8PN7cZwse/5O0t3uKd+Tckac9qQIfIip7W42SBVGVs/E0xS4PCdds45WOL/3w4vU2ZWZaGw4UuqBZnbn5QUR0aVPOjd4+7ow7jNd1xljkMkUPt8abgRDtghqxogZsdPtLhlDwlOaRyaCV6dPF7Yc86ygka4jihZgQV8WvpndpwvN3YnDFaYYJFRAathcE5Mfai6ibCJ1jtQgafHwdeic2kht+afI1unN38nuv7pmzqKty8E4C583ykvabOVfNmTQNTCH2LxuuFiVxk5+4/lxneUufHL9S/hOnPcSkCwEBXaA7hWTA7+on1tqOfbxzDk2GY/wIR13eZ2iinMUV8cJvenleun1u2cJCIXqsN5+zS5iooEoFi+9lB9ERA1+HsmbgzCfiq6heqvpjN4aDcbXK27sFh+UAnRki+46suNRrMI3e/e+i6gulUB5DS6/eGR+/lzJZMh84wCQcAsL7GOV1j8MzC6xyRrwwGy2BZ8lxzpnPhWi57FvuYyfMyKjscY+qxkLnoaTZbATMAaPNzyM7xV0662r2xndEuJ+FTYj7j7fb5/GNg5B41R8Iul4xTZdBAk8U9AFhrBpomv1eOw1yBNohd8vsE5GlRVkDjaszCVFDtTumMpZGQuR3J9f3Xwm0i4YLKVi3bZbtckPqpVziX/JqD5IHwZLJ7e/JYRCGHF7WlEkD5YzNB3F7YLuSaDrazPqBKkwTnEgWZXWplXBcMPR9GOoZlekyOgIwoSsmgpXxnZSh08dzQ2pAMAnPpB+MQLjk+/QBkc+WctE0ERYiaScimU17X34N0nMSo2hJrqhZgvuJ/bRxtIOF6iZVu+pSd/DCgioww6dngyiAsRr18JdudHYcIkkzbvk8YyKJN1NhNZX2Gc6RnPzSbzVOHyumFA1G0y5ck3tlt09uSbVGVBdiWiCiuwgnmncMfcir6r6KPSWE5r0COH1c0YU1z/FA3bWf2ggUro6veOGfwXTLxUYz/V/tK0OzreELfUFblOrwkiQ7zj73xTXhDImJAQP56z9HCkVJ4LNf8t+mcQ/raIe8bcAP4eTMS9XeMxzvi7FOsyJatiUxWq/s6WeQ9zX1pqMrYdle0xF/ysc8RoNnNWPSMbj3laRJpFQ94vbiE9JHLZ19yPK0D1FmRM9gvlUlftemfWRK4L3YoUARqUoBo9KPfjFwh3DtpXym/j0mz5SpSGySrhG3MNwqf+coub7U878Nun3NxaDvpmGktFv47IyNAtKWr4V6A4wULx2zPbS38n4YJP4bCo50SAdSs3IK76VKKe2/9a3xB8WvK5H9F4lV7SsO90OaG161860qmSJHUOf0kY+hPQ2YqYTmt+N3OEkaFI6DIGpw2maf2wH/2x4awuD0w4PWOI2AB2znbBGc9jVW1g8BJCHOg4wQaIUxy4xtzWZoMMPplIrm5fqtCshlUjTygswdZrMzoJ43SJjDzG5p3xGATsednUwkeEaKjswp04vmKTi9dVfOl7yHlneST9cT0JSb86EWeWtXO16h1oUXphpUxb+MezEZNY8nCteDxwkBCM0HGdRpWg7FGUBGcgeqgIxgqTYn67VcxRteQoFcbNPbYcZQfPC4aWsyecmH6rGpzhOWqc7KBIYpuWyiXgr0PkHWR/IgW6nTtSWGxsWpEovjNXSZX2LYzk5bvJBCNzrL/AOOMGGQw71MlLOaoex2ewhJJawGc9b9pJKmLMzXat7zf9Z8iW8GarzmICjjPq6CeN/Y7NQE8bwiwuxxJNHi/Ql+HEQlrn0mc2UUHZUrEXcVN1j3ZkYJ2afGayiQXuUUTS6PXSU//lbMomYbph4XRDoZyz5fcbNp6cwYrQqmyDNFXr2n7e2TAu2S91tnhP/stD9kFJ6p3NUnt9rVqWOrgwSYMvfO+kAqkvFDEdbt9xy2rFG1LJnbfXgCchblwDHfhMJLI9ECdSQ/nUME92hCqgESVZHTFpr4Sxo0ozk3/DgAgbjzJNrde1n65cYnZG79NHBXh6D9smGPwWKnqjftd+cWwCoacVekT1Ob2G6TQ2RH8endvZUcn/KwSdc9fe2AoUBlA+TtTyT/dbVVmce5ZMIPgQ5KrNKEDXQBP1q4tBWzWQ4D7A654ToU2D/BVHcytG7hIT29jb2djnR4AWfUIjm5WwiYDnqPzKlE7iHtzzzGgv6zHUhqaIyVxos6vI3X/BZwKhS+Z2Kj0HTgqYlDWaaq0dXBt/BSRdbIf/K4ZHProjLxDCnzxcNsx9Ed/UtiXhOhv0e/wBkfccBQcg31w/8r/sv9dP5omoWJYqlg4WX+Fv2ZAryhYUi9Cc5QwRjZ2z+LM2N8QwrC54Zt2KyPJJ8bcIPF0/grOONF3E3Gvem/BsVBJLax43pDuyos2ULbRrRkfRtUHBrVxKCmBqSUH0Qnn0vcEigBedCQjhRBZXH6AvrhYxSV4kzVq1lI0bMGbqTTqizXTtMN6fHKMEB1cXhUWZTUln4BnwCKqwcVBvPQPtoN+wddmOkvstkpkqb2boOsK6tiQiekxDaI5ehB6ggSlH4Tu/9RuKdMJ6I0xiPWGFb/jWuLyRoUEeaYVNIIEnqqfZfIHkIMW2prnwXfK6Vm4SobbU4cR/mSYisVmZzNbd9ENNfPxga7UhRKJKdRO3FQ7/4MdKq28r+RSPZsDOVglrnWUKivCvtXw+VR7xkNxjv2NDX3hdoRg5Xks5BG6COO+pDwMX5M9Sreic5SrUQgi2+YQJW3eF8QolnbRJJ3BZEwqy2CGyiG9UO2fLIGbUo2deFMLRGut5t33WxH1wSxUmsdGL91mbQPVSE/7ULDt6xhoyC+3vCtKGC7NmeHmc8L4ll6/Fq2BQgHqxxh3R1sd/Oz0BEx0qZtDNd6UGzFo8Or7bXCAPwnfz9p124GjZeRQHiU93Lwf4Y9wMnjHYZyDPFmJLh3WU1WUaJXeXzItiiTAfK/FCqpgP1Pp42Bg9j5zSS7tCSETnPNl0O+e22xodgglUAgjAo4sdKnqQgKNEI+TudqUVBGmorqpBoAQ8CFow2zT3GIXEhs+Q6aE5s9XjWXbkUW5vgVekmCYCeuBuUAkWqY5KMP0R8acjWh6SqVEeAPXovhKLdYrQiv8e+1M8vlotp1denSeBkZa1IaDr/osmKeZLvD7qMk4hFa5ijUEazshDjs49j30pvxcNG6PxMY+PxCPzorx6qbE/NmjJace+F9P3gNf1YQQnZKMponfSy8ZoXtIN+WWoEwhVb4r5Uow8r42mmEbJ1mlcuH2J2L2s/LRjYSh4smwjIUvpDgsQofHX5mkjSf3dOSlF/8q341b4aW6E6T1LPNX6Cr51L3legAAaxUZ1wdpNIfRgrFd/CQ9eXBWV3RtPNr3UDa6jugXG1iPRNRO0OnnwOEY8S7DEFse0fcNEguxWjnRrbHsxJiRkiuZyiLIbkt19zmFyNKx859woV672C1vUWGU8QkkSlv6SC8YOz86GXVkAzhAs1FDyypaJzxmPeiYMl3mvlAChItGPU2nrbVLmfpEBPV3hFSj5zeVpyHnyBhc/TMC3umfEThCFHNilB/4xQE+M3BX3QswOOPSFzBkztpi3BaKAguQafh+x0Uu3kxz72viOJZsCVGuwnIvRWwuygHgSOGA0LYzQKmZaipuNJyqWGTnoRyZ8VMKBEKElT4YCNWJkMUgM8GYI7z1j55kzQ0Jy1+XMf8+wMBw2wP0CH2pRXuaUEPkIPGqqyTTrRJb+cjTWf4tbjg8ZFpsCe6adrAmdAzt03PgzRuAJL/w873yNJ8vmcyejntszq0E8rlXvZG0b0vT5G5fyfuR2lQInX7y2czkARcInL4R7GP8kDp9FsIhkl8pEjwrKKr8rkZ2uD41sEUg+acAc/Nkfg6xb/1LQsIbpTDeOfZVMi0SaAs9IEb8C8BR3u/gC/HqWsrqqAhWiayGcNveGkNv1hriegxpq/Z0g/005c5cu8ibJLSahJCpy8ZcjrLntc+OaEkWe6ZgAdJ8i1plzZd/uJ3hkv07f986l4cwX8B5DZDwqHngD9F9lttkXeUdjcQSUI9DG8FNiSxA8o6BjGNSFO+JoeXa/kapICpsshGpgC48lyJ9BF4AnovvKxICJU/Ft5CImIR6OC8u/nRsSRNVzMXVhks7MW+hOvreoJYagNskqwKa6RgmxOBUzXyrscU+6J64W7/GaG556IV5nWASUQ8uU58bYtRUmVec3SvNi12JwTjnN3bTYqc2BK7Wtd6fkB/wbkZ1dC7NbuXBTQ1T0hekfjGoV6OkZXSKH1dXvPNW7WTBHXjyAjjiuN2AXu5+G2oRUhtL2sym3mFPPb6XNP8LUoc4Pv5j5EWKn9UV/RNcarYrGywj7nEIbmAI68lBV8V2X80mD4cRBsK3PqBB/ANbLRIxGqvfOiAXmHS250G8TwhBB9ktlU8BL+wfXtlSX6s2qF1Mf66u7l4ci5o2Q4znraCMXcKWOw1laAiauVjss+ehzZkfHoGHEKVsrKlAaYpzexhKMMf2RMWN347xUoksoM3AQId7AeT4qacdAFZss3McoG/6drcEgiG3NZIqTiZczySQBaKOg1AE6tZrH6gqK/irG1bE8gW/QP8oEQuIrFMzt5AJ/b58JOAtuUiKoeQQ4XgdCSOdEXjaJ4rlWcLQmayuSPbXVLPM6aXozqIChxnw9SVJWYqej+U6G3co7wxvJm0ipYS7wXNs2Y+5lLR16IA/zpfr/hcMmyfAXmTjcwPgm+QePQr2i7qC1ZBOBGZmv3O3+IaJy/JOa/uHSicGGNYmzukiFImKMKm+Hj1ChJBORuKuIuT9URKENbZdPyLi9UzUhSe8QIVSYfQeLjSpeNNxzbfRG7PfJG0LF3L+gAEnWuhbq/gYbBA+8j5w2bDwNPUKFa9nTAHiFBiX6FS5CnkD1Jm/SKqOD/vCYrE9zfSALHlR4l/mkzL+6Ygaz0lp8jW9coxbmC0kiP4fz++fiLGOasxMlsb436bNQ2/LTEnuK8C2D/ZkstYuYGY5lu6cPPh/7CdKSuxZ6exnPSg4uvMuBDgxWr1uqkM9Fr8rXvGlaVTFWYHs3ITw7Q8BG7lIqvzKQOnC4JZbqfOAfd0jYlUnHShg5DN4zRn2JZnGPx/KamZiXPiqTSJCGrvnHjbjxbMqctk1CCRf6NlC3dkVeimxEQRQw6D8C24kB6iMUzCYCtPElG1fJ3RLmkakHS/uHFYsv+VBj6ERb6pshDy/M/v1DFHCy3KSIkRkpJuqXtnI2jP5LPcwU6Qm46zIV/SNuOzYrtrMw51LSL6aE8DspEE2SXiEatx2cHjg0Fc3rzqVWTf4QUBah8HlIIsEArfyKpXZ/Zp2jXqoqW0az6RfHa8RmVcRIhGEkfYZv/Q+ZJbFXlJriFTbssw6nePklSVE4z/KCWO/unDYleB0hIr/5qUy4M3pZX4eP9FNQTUvrZ1V/i2q6HYDtEwfzu2VJJmlaRXJ4TM7f/Yljniq1OmGs8rjw9X9N4OttBeSgO66ZvwjJnP7nbQYGyR9hUbTaq/d/MzVLbXr+EuRdrdNWh1oRpDMtvTbBy33MTfsHzSgZ/5VoFO1FMi5oTZeHPIYP/8OsqDa5E+PoL6VXUY1aOH8qSbSrvHiYoP2zf0XtjqG1NlkoN1Aud4kvcgBJSrUhayiYNVhJKWH4VYVDXE72oroucXyjcuK44Js9V0lk3hHBHnLc91tKyS/kxFUBO4yG+wkkQKzjB3FNISWyGInmQ5ggg3M2+QejrFkigbD/WM0LFhjgUJAj+ooGaskC4SICPQ6dglE4/ErED4PZ9OsME2JLBZKeeuo0NOeXlyDisqyGD/xv75RsszFhgMlSpZz5w9q9Yz/G5KOT90BoDnc8s24HlW1Jf7ZfFktQA3XU+jLvjn4rQ9MgSYRbXOKbYGmI2oCxhqzFPloU3eiKy3pogp2UIpUtyS6+4LbV7QsqecK7uxN+CJOHS7IRM7wfRlDDpL9YIEFwqCrqDNPGXtaS+k/t5gDveV9f8KQHP6yFUdJ0lf0W+tlpS/z8eAD1CKXbw1phgaNdRlZDM9sDSQNmq8WZAojpnmFmuyufelDhxB33+R5DnfCrfpF0s1Hc92xPitwqb70shFMlMXBgWd7OmpCNAlMyKtO8wfnaxCju08wVSiV7gS6AeDrpKDOHZCMiZ/cDkGuob4I52zg+uqp4UbHNfTYtFAzRpBgpupg5wqnqZEW5Qmy4zdILEPkbntkSHPDGAnAequvNod8fdjrjJhdqXEsB380t6c9WdlwxO0iqvTEBwvTc0hc7s8Us6lWpeHJclvNPE8TbsoSS1IxwVl+DPjWV5U87T3Y+c2UvsE2Ep8u+QSxzQ5LXL277+yOWVsPmZAMfP1SQvRM25orcQCPfgLU9F3Pqb8otg8F0UIKeX6kvdbgQ8jZl9WuCZbe9f2maPZvEqYRou62b/N58nPV57vnHWoBjCtylvyOf3BIwmejsQ1OFfHI/iMMo/+V4Jz/e/oKXgJHkG6guLQLPmWmc6SIkhLC9Fq5MaVgEfr1i2e1IcnNc+WT7ihEW0z/DqqUZEHXctcZe/MhEeMAYHgMBoLZjAfOh6y3D/zwOvwV6FQa8Au3GqfU81FbEAL9hYCew7zFM4yHiEQfnDZYu8odXUfvssdsFibNW+oKdyls1u0hpHMfsoEANNwdJ1xok8WhOZ4/HShNonALS/V3A6dvj6nhCIUXZRQIH7a0i9kjmr6lzno2shWvJTNrBZC8JE5o5MHBV2xWBWAh603OOHGTZ0GqixlK2A6OmUwhZmr0E4x9+LSSZLxoks98pmN9vXNFiVJJZKoO9QQ7UjMaeFWMFvx8EG2+FO/MIkYizMRP/QIYhzM29Xs8zaklsDn040F4ilQ9oUhnyrAJqj7Vg+zuRXHU7agJE7/Ia5GyEVGCzxWtFs453chpyTIGgUJ4lrDGp3ashl8+OaEstdsx5yP8gk1PDM/qrrV+TRvSO8pyr5BSqmJ7aEDFMs/tHJX/MiyuruLYTnWI8Wbp6+IeZf4Dg1vgDYZTHCzBabnfuCs1xxc5FPmPd2bUJWyrb1kT1H47cvZo7OSve4T4Fp8YPQcFRq5EBrJTXZLORsm/T3D3TfbHBJEuIDTNu6oMCyousd/phBb57+7E0c9PDQFThpWrM84w6ku/RmVLx/vtD2qKngxrdcZR+UzxMDlkGKdCJhD+jiRtbemt2uE7gNyKIyPbZCiAKoiU3b9fryw6/W1QaITzq4YzHUrHA3djY0mbRR4E+sAx/41+fkeGrRmq9hli9GqzrMJGZBM2f9PK6+4SyYsk2v0+QadgPivIywEmrrAcVpYcKTeRCEqCKQcPRtbQJeSdOtvZ6x9Tx1GAve1UZUYZ71s44ZwA9pz0caQZGnd9ezXvmsE6HGcHo9oiFQM7s85UD3sbbf2Y6BsyveixGUOlLUDW/L5hI8g2FyO8h5GEHRJ2enpDCDVco4FmobQODpIY2B6TsRm/GbzRvM8CXDX2QUeCSbfuB1z4H53wjzJODNypKbfnufyaJEtNzBmvu2mLAPDTcIZLvK+2c/mfG7RjqasIrSvadhy+nEK/S2HfXacKlieXcbWYmlzP8d929t/4VNARiul9Yed66ciglDDYnukU5EakQG7S1MhGOvvYDlGGZRWPAzv/fD7TFFFkdVfBJD5eGKuShtYjvGQsOHY2swZc87F3gvhZv6zyyqX3F5Dys4ezi6GZDthFUT9Y/hRR9QZY9UYNdM47pDC0C7Bb8saOqkv87fdmWYnzJNRwjZn2Rxx7kIQqMRxKzwdNcCfWBDxM4iy45QqrwmgFbH08GWkh55CEQ0N/TkeK+MgYVYunOw03Iy3eSU3/TkagaGS6V7CN4SDCyGxrGTXwazr+mddCVut3xkCvU8HsUPme78i+LHVaxtDGWYDErbQLyTPc14PMBnAXAx4HaZkmKSoQhdtPfgKdITewTkpkMvb0dTQ8SezHKINNpP+Qs6lVWc3H4VXqVyyFTENqK7eB08eaHedgH618PIHBDDarR6ah+VfhwobqCvCw5DBlyjhHJtkNsRH5jPMz0f/u14eSOnlIayJJIqMOVVf8thUq7vFx77HkL9VIM3wKGWkD4FikAxtqzi6WrCWAEN93T2ye8GVLRQudTDVkzRdNTSi1lPlKNffaSS5GunZQS4Yl7nIEj0AMYfIN6/vST+XlB9fIe9hHHFZ5f0lSB6hGJ3Fj4+12gWPGkugK9H/7cIIsD1lUZ2DJmvYRZvVqYBk7tpy0ZGAKNiFhTpiW1/rp0oBVMaiswKMkRfbesbHcFkjcrMsfBbSDYt/j6vh4AFAnOspeyUZnNyRrw/VRLsYfi510SzsIgbK/K4BpTJgXCg2TICKpvcBjdB2ndtKExRStHPepBIKiInrLOuacJBuygpVQNRUn63eSLYIhytKVNZrgF6BPI120z96QZXGo1BnnYtRG7CsitERlLysNdMAJ1t7pK0xRS3lZriwkCOFXW2dsjnWGArPnL9fL6z5wVDzEte1rTsqpo8bGL7IWwEXYfy0RD/ggR9RDrfAEU+wtzzJp+eHM6sXfhgiqv0EWIRhrMAasKFXazCTD5VDhN63tybgAOrqt9MBn7VNCoxWkHVgNug5CkrQu7YvgHDpngxw/lmZXtYX6kE9tPas9jareMHSuUDCQfoxHDaaTAVmxFchvvnyRDHJ51Qj0SbhwqqWsolbacqh/4SfIyW3ijEjSzMlfHHgSdv/+w6/yrKl6Rca6jx2w45FhZYBLlA0u0JMO12roCWCJ4raTP7piPzlhP2JS/gv7N379g9oXUk87zOM1WMzaZRxQy4VgyVRhqTj/f6aOG8VJvmlhxGmPnnMyRcg75aAddoY/BtapXduUH1hffhx88jsXuxCUKgoJXMlU80vbsBeACAHrkxy2YRWfyO2WITIAocSvKeU9I2fjy5TPnDjyQtec2irOLU4zIpvgeauscUAfG6eZ3bwI6aCou1nU62yyG0K+eW4VRg7hLU12k4adcdfYdfSWDcxuAR9f3wo5Ok+QYadTT0CZH3CcaZPDQJima+C/FGDJTxgwKldORJZeKtuLG2L8p3DZoayYqohGKCLuVod0EtBnHH3zLgn4qmvgKFcOwoch/mnuDNQ7QHBhxP2nev9rZA6DKBlyrV9YTxcR/TISrgR5ncD98V5B6X8/K3i129vRHk7RTzlKjfZBSLqb8qWmtWqEjrzyN6LRid0UwEp0D7Z50MlqMt+N11IDc+wPNYUrdPSM46k2UfRyeqmrAb9U9Dd6Fbq4KqS1d7AGkNr+4yViNsps9uzuAJ/oJYAZm/OzUaeYtnyvHIzEN9q2ionpGmkbh08hOF4Or9tXILcWFlcU+Bo5b8HbiC0D35xsk9VzyPG86pRd2WpcoXhFp/gBhu/fzwrpWtweKSLTvLGuRQ9Oy1Xd0+pvvCupljkxWNwRTo0ReF/slO+M8ozhDFb6usGi1g5F0CC0bqnZTm6VpyghZvkELSQQ9l4aUDRmdXfo1YUChkQ9pIaEbV01Jx/WJYAAUmrHxgd2XwtJ4Wwbg/4Zj6mn5+iDdmpOeOt09bapzkCnm46rc95VxFV+YBaEx9lECwUCAk4Fs1Vmi3x/eJKexWfHZHDtujQpRcW0RDZLrTqPjA0IFSMekAtmpUpGKw+WD3Q/8mEmnO4864ADUs/a1hE54+nB2XkncF4tYnuUdJogVUgwtkSVUfPwmAH6zOgSc3DQWW1hLex5J4AWz6jEFml4WHzZn6X9w6GZpiz4Sn065IYPCWG27J0PbqbLJUGMvwibR5OzgcPbtBSMzmeuBaVa5L43tGrgHmhPP5E+ssIyhbCBcZOOaUswLXiybaRFgeHuP8JoMvGS5tZVJ15DliqQJfHMgu3FOGbcAuJfLxH46oIU88aJ+EuK57y899wMO1r926HeStqoxfecVhIfu6P41XfOWPrHPFX7j4Qo1PYt0dOrm0VxqMk4y7DblNXxxfifHjUARqUEzgtEKPAogJi0sYYW11zS1bWRbn8uwEVTB2awotvAMaeNzVc5v3ACd6gPgs6dmP7hmG0GUznf6KhjeIGDEn1q0nH42F8lBtYDikb3oRp/qT9ahkj4lNmv5M+ij3lso6om00E+RC7qT/q+SjgZBoISaLeCIrZPb8df/CXR6Y7ZuuD9zCcdtqcxeJrEc4VAjkS27mvhgY4kz+MUyJp/lVobwJTIDONm5O/t7pjJMR09ruoAndTV2FrA8HNbKTfRSIpglD1sprjFV+iqTK0b2MDhoc2dny0OeHx7x/W4BvYfdW8eqyebm2PeTA5M4RFZXuek22ZBZwnPYaHGB+NhuJ5HZYi+4GAjwK6YnpFoMXHDeolMeuFiFKNJkKWn+YUuhXFgoMBlRMWbVMP69n54ZmuVbFIjsuLMRxlPqvOHXp+CTFhEezX0FaKtoSxoDzaiI48KrHmYm9soBNdyF0rzlu52B5LU2or0kzd4Z441mNy8mUf2qX6mTLGw2f+W36oWHXdU+1GQwKMjzV80Ho7/4fc2t0DqwklZnN66JtOyUAj0ZwoqD7JeXtDVIElZxqkqTrSi9wsq0o17dnRksukDuh2ATBDSbIfYjimTnyIqZeOb4vR0AyFdlUvc1m94/wvY7IJSzavwEuLnWmZU6PRz6+N6nKLcdzyXLQ6W68TfjyBc2THNWgD/us78gwyXnOUsfVYrjAbsv7KGho4Whw0MvpbZn7wZKzCoXXhpazwdh7YSc0hQTH4NifXdHTPXmWPd7cx+cqwLAmiVw0ZuY6cOPmUa2bAohMrFi0CnAt/jXB5KKcNAM7lzwPq2DDaD+3cuOr6tUMwmMm5g7gc2kfCdYItc/nGcWb3rAjW6dmXy5ZCSCWBtiqHNw00iGvQbCjexzCqTtcRPTDm5pSW3epGos1SmFwZgNFxWM5jYpSLQ61hMsqIOiMFEVyANIBNEVJP4SA703CYDa9LNzUfQPafg8WW/m37moy4bsWqAoeWopwdTobSojhswTdac+VVZ9QFQHoCtdmFqu75RGawNV8wl0hiL4HQhrEv92aCPUBhpDYzjy2i496PxfTSpu9oBxfCX2LqpiQQil2zJquUujl+21t8GiSQvuf4f1hpnJAq0+8riVGByftkJQjbRx1zaSybkxEid4WomsmJ3a+ohh5YoBySmDPlNSz63IOEL1pHjJ3ifklFlPdmZmXUBHkpX8JpI6rHmLghmUtKFTxmsePZqos7/UTsDpBD/CorSRElBg9WK6VpfH5AnTnzGwT8h/CLHWb0Wbrx9ADiuLCIkW9A6BH3YJvzFLGunMjDEHz31GlNbJA0SkDHRNo5enxVqOB6pxH1w2baUViJ8Zj0iJcusRAiu7KKYUUgLb0iHo6WTt4FIE7wYjUx6381OOHxJjeueUT2PtFz4uy26T+98nzX2+rM3s+bIMwRiaYWLb2k7W5fHLOxEfnUrIYU+J4T6yHNXR10i5CNu63NwGtyPCme34Di3m4Cauyr7nAUmErh0/2elRrrHdYxfHd+I+8kWD+xMkZXhvqBYN61rP96sq4eyC6SvbLBAtNyCd7M6M+szrNLSGLaw1yRgmjv0We7kI85x6MLA1XZ6h1XsR6IhGQ5t5ow3rUcG8a90+WrdxAhGTCnWA37AtFXBJuEJPzVUnIwGvZYrrM2tcCe4Z6WTy0A+xW/GtUewwhId6uIGRbVu9Ay9ipM0dOcYwvBlKcYoXR5MqHhycSYDcGWm3g1o9S+6+82nSK9vV4HHdtcIHCZ0/tHkqbuHymFYjJmts/8FGfYiLWS74zgrraeUL5t84lVI9xJyVQob87VPkkE6nG5HgzqF6hAL0hARYvuctChNX0FD/lZK1qbpl605LUsbhkI/7veqM5qK10wZ1IOPngV2ML1ubafmJBO+4n3cEIJmUpJc5jG4ElcXTyrHfuCargZ8nbUwHoGwThCAVo8/XWYBcNlj5KqRE3eWKEQ3xwgkCQ4+DavARuA7gFoJ6B0vr+e592JKGyWIdT8HzBwoNR6wy2BYK2Xn6usoPN8zGLdokTyOYI61QoPg4fod7VaPn0eN+uN8x4m17eCQpJ+SKDbrX5IVH/ePLm2JO9XtedXX53w0kVCkXnT6d9Ev6DLZzn26e0Lly+P4WgmAF9f2+5TCYIIYYqrtEUMqwMK/pWvh/HzBgPGPhRtWibL9AvhEaF4hpBxG8QYw7RxT/HxNr1ck5kYrJxrZZOCq5dVJ9SM8fBp2xdxbxWsyPeXL4uCz2ha/H7uuaX6fG3CEa8aKXpHW8jIbJ8dgWwnG5XNlvOqg5t+HLIICWnLYyDJ2wGHaWF0EWroKP3HykD0c2HMB7xaoWCVG85+o4hcB02wBGtWfz2iEvO6Gs5qwLIAauFhytaIJwZoM1sdszcd5uA7R3qWGCrakA99CGRBPZgGxar/fj81yNPGQbLbVRZB6Vdia5ifzLeN+clEetcZJ1zfsEBVpDIyW/cBuWk9CzQyfDhSuPT4jyAhoegMEz9VUTKEYc6m4lzlBrgKTgtfqP4iWfVrJlJQ6WeF5ZHdhNP5+l5oNwvNsfF3rn+rXqCxqbLM03OOjRIwJfGfqk22DpRveuCVJ1y5WIN7Ioh/43mCp+yYHA+NsHPyvgYsqjmESQ/7TPv19+1HPaJSv32mnkslSOEFGMo18oaBo9gUrj7g8EXiLj+qUNeyNFwhVLHrk5pGVgw8KMK48+8gRUfLsdwHJhx1o/8KbREuxpcMNbumH78X18QiOil5tviF78N86Ujsp6PtokQBQZzUWmQrewezYgIpTJ5zvDImJ/qj31GQ7g6aBffBjithdXc0FnWRapUS/54Bl2/6HIbG73oifm/UBkQeWWrFs+N9uXfuQCz59Ur1Jej4EdoWgF5gAWiberfzU88xrUEayWcaRz1fMjZRN/50dPwcpUL27dr0h129pnoNp0w5vgPIsF64P7ARrMhcQJTQkHOkVGtm/iIsDDcNJBZcbsDVTdzFFUrj+j6eqfCOhuJyn527nBoo2b5bYnn/k4Ux1XCnet3P5L5MC8bigaQpbJGZQ5akGz3xPepp5n/f/VHKR4rxYI+e7t7q77PRMbzyrRSALtuW7KBj5T4a3ZFoc5Qdjtc/5YLk89FnSvX/nqI2ExbUt93CPUIKov/2FZfI58VW6dsIHTz1wKaIu+Oquq34rbdq45Tq49bS6iuiMA0cKDHwHxnhdZgxlQsESYH6R+RWQgPwba2tEeuBRfbtekgQUhvlqC1PtyTkfWTRBTzHTcX4DsfgbTrAn1SQ9gKIY/kLvxUagI44l4X4yEChg6Emtlm1RJZkQ3w/xr5Ql3Jo4aUzAZgWMmra2j2OyR11m38BMZ1mXqu1KgM7xIV7IXFjiIkLXxqE5c/9j+0hI97sb0qXSdPkklidrgT+83XxWI8+y8ASyPNpiGzHDXIfipxE7zh7Ej/77tZsS43Ea6MayOT+OrsGWkAKyOXuGT/6o/Lrgk5v4VVRqR/Y9uUWmzVuI0hCem0cm7nTmYN+GEfMiFGx3aIvB1QIDJhEWDXWRrv7m6xz+Qc3oU5L1jucElGoXHwf2O/BojJNm2VWTYXt+Iz3+esoI/imLzfkXj0nvkedEgnEvBqhBVijjsm3uasliTK50qOPDJn6zMC005FQLjERrFD0D47zGaZZ1cUHf/AcNyfRIBmJcxfuc3b6sBQ6luiVU8+h4pwQAaT6S7uOadp+DHosxI8qBLuZPl2QiW23pzBvp7DrzhSJM0SB4nnCmv8den4zZjhoWoPUSYB/tRZRZWovO7Rljx5NmGHJhomxS905CwLf/QlYmlNcr7e/H5u5tpqiHZRq9SEKW846Lc5n+6vtGPbE/kj43QW5Q01luC81S+RCiye6YBFpUroIF4C1X/drbrZEbZAkEByljqVY5OVhoBfH+4LiSK0e7qPdNvQ10+wz4fTEBchL/3H9A6a3i1+BSgiEQcQIEmqfT2OY7lN/jTv13X/VSi4vrP57El/M8LQfIFe4Ro+0ZZXugh9Hxw6YZZcZiq4PHJvsyIlnFH3Vb5ZyVXFwRuNQfFJuFbFhNeDYHFFW1XxeTDhMN0Qn5CMdB89qjizRba++E9RoiEDjP2Qu2CcEowNeJuBrmGptwf1EeAUP7HUj5OdzOJA3k7wgow6zW8tDHkoBtP7TyZwx6vYDS8FEVx8cBbpcxBaLtC6XuiC/LOADI2JGItpvYOUP/+i1zU9KHPFG5QWFikZsiY16hu6Ca8W9k5f1SGKzE/GeLXkKjLNbj9pLgGYkKrAVuJQGdZnCR4SxMK+OqBP8AYV3SPAAgWvtkNHgdsL5H+lXGnPR1n10e8fcahbgSc6IhAM661S3ud27GjZIsc/+Bo8nVtKPGJuyda/DuKoPnhSg/e79t06uBMu9Vs3KJNBokHjRb7Hr4tXJVAla//ZwnHxD7wh750BLdYRVURFwZdvzr+vxn/klG6JQyNSafOcnbwJA7LqSvufNaWVB2c9Y1Bn1TLQQTReF0aAMWM5ZPKdrPUBicWzGqOhYrFkjl3foTgF0RG81pUo5AUtT7nfwKxu6YSoiDcrNPLmQTjsfEjWjh+YgvQtCaSuUa8Apb312hI4ERfRMC8RBeXA4Gfuu8NbJNswwTz4vzLTDs+tlEqWjTqif1JU5C09YstSG78zc7YTI+JObfGRw3BJsPakKsM1qAaEUF8FOf0C4LbWSEjJWU455Zqn78X6Gwv3mhLrdEh/YJ8mFqNNL2fqfpuUoS0hhu0J+re0qTF2Qt4j8N+NZX2J5MCSLl7Ali2aII1CSZI+ecSVBZoZB4X1HxQZGHgQKF7aIOMOQCF+X+5PARgPUd2inOeYUYnfdkgZYNzJtjNlMTbd99t/yHoHhch2dYWoSgIrPnJReGB36InxdrpHmKPqOp/imE+t93HsXsxpMgUiCRFAMOMe9pNM0SJeKqtwk5ARpGSH8c0ZyyOWrBWge3KwimMGEgZQsH6oRloQ8M9uQoY+zW77q3wyCivQbSk/D+5ydAPxieCKXrsfca1RLdLhMlMocK/K/tmwjRATIyxwU9YRqPP6XtGQMGegw8rmJO9G3LzBcDSegSBdSip/QCJ4eS/NUjBFRYwjS2j5gbuRWspm2+sL9mTiGvIPXj4dyBELlNq34lXwdlDqJTQaT49Lb5T8YCOhZdog1yt0W4mq2xNdTagTD2nFtdo988Cr+CDFmi+LksvHa45K8yBi7tivGHqOaxs8J867pBb2S7u1K+XE2KgCjOTg7b9oAo3a2XPNLRlltGfowoZD47bWz/Plf+2/Ej4Cc6e7XC7tGYDruqmP8RyAXiTCc6k9hBcb7qiHCG/FB83EtLR6SPV+NtQ/qgtrcA+1kfJlO5FDEzdGI5Sb4EdekxKFcSqw3E31QpiM4T6lbEK62nRQVSbun+wRgD9+SRp92AeArbXR3ty/w1yk8liDop9mwbUX3FY0mf2wIm+RyrhCC2f7MqdOrSx4vr2Ohoezb02zLFcLcbnT/u6ENhmI9qn4/T6O8PdP1U325qQcqhhJyaToLRszV4zKsD2ibD7qH/RLVIyrUUoQLVmvpt3+uQ/TDhLMl+IZRIlGNgmpjc8LsbFQ82EJTm+fcvyLhHRAUVScSMK7uXHFOlzr2bX84taNefj87EGsf+bkhMlnJZw5AScYHOjHsWyo4vB4kKvjqMgJSZlEG9sa+r9UlxQUgpfMhIpKFc6TACiMaW/FFpk039zvgAQL9UbQzkuHnJzn8Cc5k96GL7IasbCQ6XDGS5RrFM4XkRg3p5Akm2uPgIengZGjE0wODiAHmzKFYPRHNhDzfB8Gw4R8lQVOjdt4YS2zcBgqV1KMyfn2MnAwTl7ZRMrEOVky4zVcIr8yDqY5SVERyJE1qXQ8/lYF1335ZpkW8SQ7Wlj9kMf8HXauDBVrEFN85LKD8bKijTWjiOm3Cy0pT0170aBKVTrra6yIwRCvu2+w8LWVtJ7l34neZq9rpm+t4YqoPl8pmIOZHkhLOhgw0xK9pdLegRk0auliLtecl9ZzyZtu2xAwjrvH6ofur45MIjLigT1DSvv7etIam2Y0GxwFJWo83r+N3B7Zi8/7v3Mp6JZfMzMaDs6v092P40n98aRRkGDBrlS700I0vxmHVLFEjIvyEYDYlMPU4oVp8bM+zmriB32eiYEJeqCTtlfwW7BNCoVM3N7IsEobwiGiqX8NiYbkm3ApysENstt2u7yOvZ1DZaJYM5W1x36K6RP8OC1yRjsHygT4MRuSswNdIO2Jl4SmtaABFhhrg8IHxP6XJIsQFKFJPNz8yiqpLaP6ouS7e61HkAfnw7Sol0n7uOVHO3f6w9jKrIrUqrDX4hh/A7C9eCSKFgKbwO09WNVjySTZME7KtvlK+S4EKZySwd3QokJ5/siT7ZPOWLxZMe5atByWI/8i6dlezHDwXZctYxwl5/q8Ifk6/8VzyS6kfAXNHSe0mtINpVhZ6og3tQiGOMDrHP9cVFWOE8m333zjOf4YBV+ssq5WIICvTHps8+nOvXJa1YPGn/XabHIKrC3xP5B2ORTQZX6hG8Syrw4DivViBaPzOQXkQ/ZyiWPnGv8f4GUv7qGlZ0kcb6POo0CzzlcQA96F2xBJpnNOnLKdNFcN3rMQXS9Ai5283BZMJ889FGPc0TWlSKYoDQFAD1tS8GGVAYFpm45S0PlmRCcp/nrxsq5tZtU/YaFgC1p1L8tqbGDr/ozW+N3rOhkNbiqCj+8VcFmOcesU55NO916pVoMWuTwK4J5avEvWLRpXA/kEVYh1cdiRfxnKTX/UIIpTjNQ9qgMtCCzmPujm75QAZ1EObOs1hOS9PWA8kssCSfp/YS9SS+v7Ny3RzkJ1tmIRyhkE3oB6LJTrt5I40oqRXzYX9cx+orKifAWuwA143SgnXPnRxEK9CtIWg2ybtcFGabWazTgkPkCjjOw0dx8cROLw1+xVCwKDbpHIDS5oasRvVUtS9LQCO6IBta3dUDmq+WiOrX+F+EUPWh+OAr7VsNtb2mT17jUKuhl4Z9dnRW3icfE0aeyxYimfyK1593vqYnQ+a1nkZLivA2jROkPGVLMNOh4KrNPcGzIJSL60imi+BxEIscfteQRn+6EAnzOY0tyE57HDFyu6eKwvZNlnHWkmEYvFLISTGRFu+6OLemmw+FDq4y3KBThdfBtW7SapaJaf8WvFspB6Yz6gsk57T1iGAeSJTU+FUAnLouQPFNyJjUN3h1hRyscDsDd//ItQ43ZgDr+empDCOu9JCJouCbukJradkxE9+yJKoidn8uwU4xjIta+2m3zowJ4oXacobryWV55B968B71heYZNt6awOO815tEG2EcEcZfoDZsos3YZUwGPZKuJmaPy9v6zpN2e7/5De6+lRxGTTRnuF2MeaC8aWo+O87dbOo1kv1dpowfK/vP/76B/b/N6tcNMpzSPgRb+XFJOxtyGnJVX/LUWvG9Vd5ckM3tnOmLXlU+Qs8uPey17BXqWHvChBsbjirQjW5TxIRaQMy8iZuI27rzgFlY1KJhIM0Hw+zxGugGEPp6iAuSJvkvO4WX+FLfa3ZqieUAxOgMjcmAqKDg9MJkLkeLShvdw8cW74d8F7o3+CDUfJDfpeWVq/yGVuDwQ75qMUOTTKOMpI0J3fXxGTgjVs/2ujD03CHuvicC0jBYLDjaonD26+sImBRuzA0U6oEezXQMvMxTsJhQiwGWmf0PimT0MNPMKU6n50aknSj4aHWQU0xmKTeZwrrCLaQJfZA6d70VOzKHcxPquJhTHEc3KJZfZaP1VBK/CH1yEkp+frPIsCEwTqMwOo9rgofo9pJFrzbWT6AFGRKxIRgdb6Zxn4Puq6h5VQtPNgk3xGR7cbdFK2jS9blbKRDnqGO7BEpK85CKeQzBr1BXvcECl4hMxHSLFd5oGwOhj9aSKnYA8jEoNggvPEFnN03Yy+R18jKElAJ/SMY9BWmqY5fkiR+0R/CSTm8se9ybmf7k9ObjPMFMZ3GvRE1WPglae5Yz+pwGsb6fQDsYxcdt3JX1bOkwP+D9qJLTvIyteYTEBrXb9hV+1z9Dh2YvTTOKFB0tglA4BuLYmntKGFVEMgqa1NVj/MFw8o/ZouOkNX/gRRm18MMOBZRGPvXwarbQ1SOWkyZfUWdG0zt+9o02HO5V1arl8ZgUB/rYBtes6xlinLfs55GslDXrf7AdFVhM679QupKN8VPIZTzVekZO6KWBpMNiu19A74tqe9BlhyCDsN2BLOm4AxfuiT1cVtx8m9lgexbOTA7gxZkWXWwN9eF2uirU84TjB2UWIdVLQkGG682TvPuDmt/qqjZVeFBCpdqXncm+Eso9x4HIxwNa8EqnJe1H40z32G3lnhuHwf5JCJJRYHVW0QOrx6m18YWNz7iCaTruDWRYt2R5Kh0vHlZ+ehJ0/4hmpTYYcoeJjSrm9JNpZ9iQZ1SCCR9jz5PjMsfppG1BSR8BUiIwpFehNjF0OHu54I+21HnHLPT0VQVx1l9PPxGM6e7qiB99JB2NtM5IYrTQa2fu1Ite/tj3VRYJ9FrqF1Hi9vqam+ZGUfLGQ4krNXPxppoJY/WqtSfZFQXFh00YmHqWIb98oHJavbvyCC8EwucHvD64OwYrQ9BESNrBcYELOEswCa+8KEgzt5rRxJEu3jOA9FDPHq5Q4wFEbzXrGucFbFCBbKWSRzyg7On7hvwwWSBS33hVb/TmH+9ZP465wxFCRWwsDdVImpym46aVoeSK2Ee3ajlUfd5qzmKD1zzIvjqqVLQYjZmSDTO5IeCJuGP7qsTvaVcaJee5cAwh6ouXqEGC+blja6MhevQHAVaHp0+YRZojnjBBJIe527MUUZEafsQ3IiTsdCicJR1Eh+RWc1JQWRv4tyYmRXNzA0163frYEudTBQ38dZnMR5vBnqKiKq1A93KNtFdgI4+s9RmzEyIutjb7DmESTPEPN4a9FiPu7avtgXNtNcir6aW2etBAYsS2Zh6QIeP1SbsMqySGtHDULPXgT83mnYHNz8fdI58ltxsulRHnukOkRL3Mz9EdrVyZG2wamngsNZRI3Im1XaM1SDeC9qPh8h2p5f0IXeQWxBVSWwP5L5H69Xqmu/0GesQF9PfNkHtfaitE962eq4/xCVOtvC9jLFDaubepf4nqVVrpeOoRZ7KNV9FQjUS5qZrncp0rz8ZrGWxviiol//0wehReq/bUlYH16ZmrYJSbwrnWPpu4cSbCDYOJED3hE6nGYBDXAI/vMihgtlpKjNvaY9Ty7PM+mHtjWWc/4hhpixs5DwuR5CifEdbbklQWyI15cy1w1iWq0XsO+Df9BBobaYelXheQN+lT8kfKYotbGGr65iDlX75jS1kSySNQMkbajfpPLYE+qLwSSn9ynSphFcY+twXWgBtUIRL+yEed1vbsBdO2WgqkTRd0zNTRID66aWbVQWb7B1qKIvYar0C6c1LI/QNnNspF0s9z4z9gMXevnd3rGT0wIbliprqg5v1B4S1gjpMFaEUfpgR/g+dLGe4/m5VUOkHhbkpKqS8OEMh66y/j4EMDGeIjJJssFVZQuhqpCHRdBBj/PbXvoUUjS+zs4S2Gli6hVW6Ih2AQj2gqqulqk+gxT4A9TvEqpuiA1l+2X0DeplFq0Qq/LRp7mC4/z/hlUq9xDl52ZI9Q4aDidBYEnuakoD+rc/lYTqF4E3/4XwTU18i+Zn8XFa+EpPMF0t5jHht5AAVDRGYsUOfDBT5GiqMOl8KeljkuheU03jZzwoaQq63VtvXq9zyLHXYDhd4aYUu6C9IbEojjW+t4IxwL8nhtpeHRH1FNoxpIy6NTeGHs0eazSRdhBXJe0HPRUwxCrZj5huMBW+OmWgpi3IOZuuHnXrk8Bw8lXNkmekoMbYfPLFqb+DP+3+oPUSKB4yaKjF2H7TlwFFG78058xyA2FKjl6mTKLXaGqBA7/Q/HI1pEuRUkwirtzbhbEEiyMpxVfWrcEDvqSTyh/ABhjtTljH2J62xx6kDKnot4GM2MDGS+z7SBYzUhVAYjVz97efTw/+M0AV4y5XXIJJikVrEuU/ngVuvsnzEuVeAcl6CkPwMw41vFJuQK4YvEAr7Keu0UhifOEDznr3UYvUZmzTm6Hy+r/xTwDvQ4Mxxxj8Ouj06NmEPYkQP8zCz/Xzvo0MqtTUoTS4L/fqFYjfxPxXWAKfijVArHp+IV97vV4ONH6Lwvvcx+tDNActzdnFgwFXnQItHdaCH9eGZoUaK9IK4G/2xicQs4opDrOA3oytH4UNIfC99H6az5NDfQ0RG8iipR/rbZY1fXyXi4xqbIY/RgMMUwdFwxtOgMcJLOv14DksyS1N2t7Kd/0fi83uHes/bMzC551yuSBNEN4h9c3tnlBVBZn0GsyJja/pqXw+B95XK/+3ToR8dHzbmChaaCjPWSCd1wkVcsNIRaV3UwOJ0OsCZcg55yZgWkcZlRNT/01FnFXDjOGDXDR1mwLMxiKJaAmh4L7931rVRHJMF+GbnZN3QMtQvtwuOkOq6fAiPb89SPq3dbzLwOY7zEfWDQHHJCFJkWxSajaZ1SQhZf6t7y6xV3m49Q9Si6QyFAviGtokO7Jt7BfdF+bUdHKa3yTXh4NgR/6b8rJLloFU2DOvZgjPUOlUWViYm5sa9VcAMfpgc5u1BQWL61SQZT433KEAmVR2Q/Vs8iE7l6CckNsaIPTEPE3Pd/fnIPylGba7Z8IR3sruCRiBQv18gKqJL4jTAM5nC2iPJ/iuLMHFhijVyEv7cBGvQwEtEjRrN1GuBuJAjwTggzwTUEzcNjPdn62z+iWtBqNt5Ddyl96thNYm4exX7jDob6WI7Gq86J3Ueyr5yPLc2H6xWz5xdk5nrsWoUKUsU6a3uB0SX/x/XHVCVaU0qdba8bG3sFHwq0hbgdBvsBsXJllD7kbrcCSqQ4dgTRIz6vxy1wydI2wuO88ZObpb5jwAsjfAJHpfGbRWE/6rKMNDX2ShQoGgDZEaB6yH0HJ396jprLrtgvk0MqOE43SDUcDA74ziJQbFZeKSS6BYbhRw6j2b6bQoLV+lInZJ8U+UciGQhZrOr6+NVGJ7L+ItKEQvdNa9Fma+GOYzlWysADgiNT3fvfp0M8DvD2wl21lgA505+IqBx9fuAg90DjCKssilop7Ate+xCjYkszKUXySz/nubCA72XwpvZkr00Mr1FSYNN753DHNLQwtkUFU5mUt/BaHU55QHo4CPHmaLb/XqU/dw9ZWFMLazthA5gnTZOTTlNO1FMzGJP8wCs+/nbN9qYN9HQyx+VNolPezOJ8Xdd27zN/NUi5uDkCurHjuSvcZWJbogISV/R04+LITL0QsU2dv7ZtNyUWPcpCPWz2oENmBQ+F1eamefHlIA1CWOjTzMtWVtGfoz8gVWdY15R2YcqrfQaTUjkMCV+zU+vSKfWV4uBWD7v19PjNT9oVyFSmUrI7MyomxSOihT1wSD83GiUzhP7i2XBwTOP52TexFKRiJ5OPeV1FgT7gi8sKerqYelKht2nV3xsbwAOlH/VLXRl9OYppvGIuBSS/mly2je7ZyvJewnSfUR6NE8lYwgDlnTqjLRdxeDKUKiasj9bh44CdaOVHtdg0J65RJSOOWLn+e0CSmmnSMjChQvMDrLaSJefVnLGrUaZv9XrC7tCZfcwzVBktbe/bFulinuWo4zbMLk7xzMxdKREmD/ElR0UI5yvqXDy/ziwqbjgeCs1uZSWVyc7u/O0wtK1IXEkWwJHHDFJHc9NvXwPUgil5qyXtxQ9w93hi7c2fyxupJr28lIQxVPKqCCLnwU5DpIHwNr8X6k3sbib72fu0igE6WCy3XByd1u9AnXj/clvdTz6FJIl0IAoU6F3c2WjzzwqDf8tKh3KMv/exLZi/7i3KfzTB9EHFHjIMS0H4zyFsHOWIGreSWuKpGUUG2EZKTkGD4Gx6u3EX8I6VJqtZe9+s+tLkS775DesmzbAGBJQoj53yD9LAxlAY6g17oStUHqPaQPMhKOFi7skk1tJgu/wFqgrhZcANWrDc74xAkRt8EKYeNC1nEod/RGF4jgxGI4aaG6+oqJzBysEYGh9DC5tHdwnIEP4tfeeZ/7SMScN6/Q0b/sZeUciAfczdxZCuMk+vXgKAVM0pHd0pNAT1SNb3dMMCdvLXd/p7RQ1adEV97pHYtlyPrxlAdWyF7J63fSg3PvRWPz90ptNg5qjTo6ZAo7K+lki64ltAZbCeofS9Tdf9aA0KyW0YarIflJ8zVNQWqCTKG+p6rcIF+CmeUluZ5yMrZqc7cRpiA2ro499K8LzwhCebweNB5RvJ4IzWXBINJCReYGmyl/PRAhy+6qn4R7Z5i7eHmMP9CuzJhiLe6gYL24Ywzt784uBET/Coy4Dt/9DHarwtg4FkVqTjnk1aQGSUG2PjccbHR8omxCUbzyJl3uGLsnyV5d42vHR7WIln8FAA+iav8kdHXvwMO5PoVUzo58CXtZk+DBUvClEYVI8wAh19RazGtIAOST2gNipezKhjJQtCGeeWlz8YYpvFOLv8XCRkBwE2DEbVIzdKOmDIHHzBtrNg4HPYwOgHWmgT+7v2Z2NvueKnot8ebXt/dgVH0EAV+ZR8vvq3LKL2i0iOAa21S+mOU6cEUAovh3GPJawurZ8jmeyAdoIjPYBf9lEHg0ljwYDQAHePpTKN2w/N4gjTSqhaD4YWOO2bOo3yOeN94EdwUdczWW6dS8DdsR3uW3H7GI8x6sJICyRfPNodRzH+UcUazdBD662I558oyOQ8CtVp5i4uw8WwLbZY9mbctUFTuJaywR6dhYegZ6BNNDgNiKsQTJ+L3spgTTA7Ab/KjeyKGNFg5L8lXiTOu7yYru7GQNma78AEMWE+RbzwJNVlkbTVHBQADxdCvkgEQ+6ftHnr19Tvm8R22ereuOO8m63nHkLG0BjJKDPr9NazS/oPkVf+GEQG0WxgJUCxNSSslCaeBeKD+nLWIImTNLYy5E1kxAE/37B0lT3L+3o8lSoXWH4eR4+96DKfpwitm0HOeZ6jERHaQEtWqRYuUQk7hXvbRIG27MgrikiReLjMcGvQM3Z7kgjLJSv8cKt++ZHzrvvF+HkFrjxmCvys7KbqIcPKMGPoFW30iH6sgKwzlEF+/OEY604+ARpGjidaswUfJpQAq/93nNVjCo4w4+wRVWQgA0Gcu4yeaZN43HLsdiHhhDkCukwXoWknXc0DP5oOWzyV1tacGIDd+enFx/oidp7oe7zCPONtFCCIT4cpbKT92FUbLn9SPAZalhJ/xk0/ZMCSQcrZOJ4NDcHiHByNl46PX076PjiqNYZJnqw2MvZYxt18eY2GnVJ7CZgmWt0tUEvNmBLS21mz1gafE6Kh39/3fpBRq5w99VCM7cNtugI9rjVUPbBxGVGjJsGoz36KFak5SZSiZPMDup1tbs2hHpuVUs9pS8QZ3H9M2Hdj1saMJP6isZYbZOaiB0RImnn01wZMWlZiku5erDeIbRIwAAstsT2hqCDJ6lPIEDCjMLD1xC9wjLQV+GVD9RfhAEQFfCkCIbu/aTifOQd2M44saf5IleJHiHriWRDoP9uO6bJppmcF/H/NQTOPIDSVcNMbh8tEav35dEzZNZ3TAtI7tKjHyQC94nBMKf/6p/pYCe5B6jIv2CneeXSEw/W2WarhjhlM+w2t+4He2Ufesl/DTamBuVbbDcmQe7mxQeM37zFWKURKXz3/NG51bdjOO2lZwJRAmlPiiIITz44aRxrkW+ggZxXd+4dVC9LFGI89ZXvq0p2w9gbEipnZ7hBRY8QkFsmHEpAk1lYC+/aaTL+lJGdDsQcrcmaBUpya9pa+7ZYUWdvjdXVUbPswG27x+wuQPez5+FbOZKF3I7B8zmwJPhSot8/4HdP7+bo8eAXv8DW1ibS+kd0ljQhbmNZ+ZgnyGwe1x0N8Oy5W+dR4IM36nVmz0I4jMlfQ5BjLAeYbG348qsDKb4PCCBW6oa/bu8rf6VtPWwRaz0KckBkXMCSdVUwAE5repPYLWAyZUSDvf2VQ3l53/5R2xePOkA4W/ysMvEfhsIclcoyH69wpg5ZXxkfRd/JgVub7mvGo+mfCwW5QLOnMgZhOH3R460StrOPjugd9BJvKkm+Hnso1nhqgXoacAENjlbz+ahBuz+YG8T57mVnpjmF2bum7ytzaTRp5v2xTrEvDKG1FA1zJVZeT6jAeUhJm/oC1HQbF0lxDwP+YR0loJxtbEf++4ekt+P3dRzQGEl3OOu/W0=", + "x-ms-client-request-id" : "3e1faf32-e86f-4f72-85f8-25d468a990f6", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadinputstreamsingleupload&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b446087-b0e3-49a2-a78d-1ae29ea1646f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d70c02ac-a01e-0095-50db-7f2f49000000", + "Body" : "jtfsuploadinputstreamsingleuploadjtfsuploadinputstreamsingleupload0502637065038beb0fMon, 31 Aug 2020 21:10:12 GMT\"0x8D84DF23FE552CF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:12 GMT", + "x-ms-client-request-id" : "9b446087-b0e3-49a2-a78d-1ae29ea1646f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadinputstreamsingleupload0502637065038beb0f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb5fed12-fca2-4fcf-b520-b2dab2c6d416" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d70c02b3-a01e-0095-55db-7f2f49000000", + "Date" : "Mon, 31 Aug 2020 21:10:12 GMT", + "x-ms-client-request-id" : "bb5fed12-fca2-4fcf-b520-b2dab2c6d416" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadinputstreamsingleupload0502637065038beb0f", "javapathuploadinputstreamsingleupload158443d88b8fc61a", "99420540-9695-4fb0-b62b-865d32d7091b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[0].json new file mode 100644 index 0000000000000..79789624ebb81 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[0].json @@ -0,0 +1,180 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends9c59932689f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7233aca9-2ae1-404b-a9c2-4f213975bf74" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC5EE49606", + "Last-Modified" : "Mon, 31 Aug 2020 22:22:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5fb9d777-b01e-0046-16e5-7f90ec000000", + "Date" : "Mon, 31 Aug 2020 22:22:38 GMT", + "x-ms-client-request-id" : "7233aca9-2ae1-404b-a9c2-4f213975bf74" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends9c59932689f/javapathuploadnumappends1fileapitestuploadnumappends9c5656621?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ec85acc-d53a-4b8c-a849-9c7e0d62bf5b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC5F2F030A", + "Last-Modified" : "Mon, 31 Aug 2020 22:22:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "23b6d29e-201f-000c-66e5-7fa08b000000", + "Date" : "Mon, 31 Aug 2020 22:22:38 GMT", + "x-ms-client-request-id" : "7ec85acc-d53a-4b8c-a849-9c7e0d62bf5b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends9c59932689f/javapathuploadnumappends2fileapitestuploadnumappends9c539926f?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "62ffa8e8-572d-434d-8839-61f05290dc64" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC5F8069DB", + "Last-Modified" : "Mon, 31 Aug 2020 22:22:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "23b6d29f-201f-000c-67e5-7fa08b000000", + "Date" : "Mon, 31 Aug 2020 22:22:39 GMT", + "x-ms-client-request-id" : "62ffa8e8-572d-434d-8839-61f05290dc64" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends9c59932689f/javapathuploadnumappends2fileapitestuploadnumappends9c539926f?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ecff9903-36ea-4e08-86ec-7ca8b8258716", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "23b6d2a2-201f-000c-6ae5-7fa08b000000", + "Date" : "Mon, 31 Aug 2020 22:23:11 GMT", + "x-ms-client-request-id" : "ecff9903-36ea-4e08-86ec-7ca8b8258716" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends9c59932689f/javapathuploadnumappends2fileapitestuploadnumappends9c539926f?position=104857599&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c200fe3-4347-4406-867b-1dcf47f81142" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC72AB0E6C", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "23b6d2c1-201f-000c-7ce5-7fa08b000000", + "Date" : "Mon, 31 Aug 2020 22:23:11 GMT", + "x-ms-client-request-id" : "9c200fe3-4347-4406-867b-1dcf47f81142" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends9c59932689f/javapathuploadnumappends2fileapitestuploadnumappends9c539926f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e8029c2-38d3-491e-af2d-4cc5db369167" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:12 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 22:23:11 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "ETag" : "0x8D84DFC72AB0E6C", + "x-ms-creation-time" : "Mon, 31 Aug 2020 22:22:40 GMT", + "Content-Length" : "104857599", + "x-ms-request-id" : "5fb9fa01-b01e-0046-44e5-7f90ec000000", + "x-ms-client-request-id" : "2e8029c2-38d3-491e-af2d-4cc5db369167", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadnumappends&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "16f12dbf-8210-4126-a77c-cdb2abc05d8b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5fb9fa22-b01e-0046-5ee5-7f90ec000000", + "Body" : "jtfsuploadnumappendsjtfsuploadnumappends0fileapitestuploadnumappends9c59932689fMon, 31 Aug 2020 22:22:39 GMT\"0x8D84DFC5EE49606\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 22:23:12 GMT", + "x-ms-client-request-id" : "16f12dbf-8210-4126-a77c-cdb2abc05d8b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends9c59932689f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "9544374b-54b0-45e9-9748-6f4ddbeb9a20" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "5fb9fa30-b01e-0046-6be5-7f90ec000000", + "Date" : "Mon, 31 Aug 2020 22:23:12 GMT", + "x-ms-client-request-id" : "9544374b-54b0-45e9-9748-6f4ddbeb9a20" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadnumappends0fileapitestuploadnumappends9c59932689f", "javapathuploadnumappends1fileapitestuploadnumappends9c5656621", "javapathuploadnumappends2fileapitestuploadnumappends9c539926f", "8aeaa676-ef4b-4291-8c97-0a4f9a8b9bb1" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[1].json new file mode 100644 index 0000000000000..066f410a2b001 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[1].json @@ -0,0 +1,705 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b252006a-54b3-46cd-b009-74f114c16e52" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC72E7F2F3", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5fb9fa4d-b01e-0046-80e5-7f90ec000000", + "Date" : "Mon, 31 Aug 2020 22:23:12 GMT", + "x-ms-client-request-id" : "b252006a-54b3-46cd-b009-74f114c16e52" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends1fileapitestuploadnumappends79724058a?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "77de1631-b1f6-45d9-85b0-1bc3e6bddb3d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC73111C3C", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "de5b8b33-901f-0073-49e5-7f3eb9000000", + "Date" : "Mon, 31 Aug 2020 22:23:12 GMT", + "x-ms-client-request-id" : "77de1631-b1f6-45d9-85b0-1bc3e6bddb3d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "101e2c8a-57b4-4eb1-ba1a-ec629c1969ed" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC73451C68", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "de5b8b35-901f-0073-4be5-7f3eb9000000", + "Date" : "Mon, 31 Aug 2020 22:23:12 GMT", + "x-ms-client-request-id" : "101e2c8a-57b4-4eb1-ba1a-ec629c1969ed" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=16777216&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a46d7b03-ed5a-4067-9f2f-fa8437932397", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "de5b8b38-901f-0073-4ee5-7f3eb9000000", + "Date" : "Mon, 31 Aug 2020 22:23:14 GMT", + "x-ms-client-request-id" : "a46d7b03-ed5a-4067-9f2f-fa8437932397" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=4194304&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3966ef97-9b31-49c0-b3df-1d541f2e1641", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "dcab4654-b01f-0064-66e5-7ffeda000000", + "Date" : "Mon, 31 Aug 2020 22:23:15 GMT", + "x-ms-client-request-id" : "3966ef97-9b31-49c0-b3df-1d541f2e1641" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=8388608&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "52c8ed91-652d-4ce4-844d-9f1156ccc237", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "841b824b-701f-003d-11e5-7ffb5c000000", + "Date" : "Mon, 31 Aug 2020 22:23:15 GMT", + "x-ms-client-request-id" : "52c8ed91-652d-4ce4-844d-9f1156ccc237" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1e6b5c54-4096-425c-9a5c-2d9246e2c6c6", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "47584269-a01f-0016-59e5-7f8fe4000000", + "Date" : "Mon, 31 Aug 2020 22:23:15 GMT", + "x-ms-client-request-id" : "1e6b5c54-4096-425c-9a5c-2d9246e2c6c6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=29360128&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e426c4f-8fbb-4d8a-a6b4-be309c044b74", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "8ce940d9-401f-0058-59e5-7f4a01000000", + "Date" : "Mon, 31 Aug 2020 22:23:16 GMT", + "x-ms-client-request-id" : "3e426c4f-8fbb-4d8a-a6b4-be309c044b74" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=20971520&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c608351-b959-4522-b615-77030d6a3c0d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "f807b372-501f-00a9-14e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:16 GMT", + "x-ms-client-request-id" : "1c608351-b959-4522-b615-77030d6a3c0d" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=41943040&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "44c07af9-216d-4694-9d3a-b2924a3cabbd", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "dcab4730-b01f-0064-30e5-7ffeda000000", + "Date" : "Mon, 31 Aug 2020 22:23:16 GMT", + "x-ms-client-request-id" : "44c07af9-216d-4694-9d3a-b2924a3cabbd" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=25165824&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "d8afa330-8fb8-41a2-ada1-53ef0f8370a2", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "5f8cd71a-c01f-00a7-3de5-7f7799000000", + "Date" : "Mon, 31 Aug 2020 22:23:16 GMT", + "x-ms-client-request-id" : "d8afa330-8fb8-41a2-ada1-53ef0f8370a2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=33554432&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ab2dcbc-a921-49e3-ae36-0cf88670ecca", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "841b824e-701f-003d-14e5-7ffb5c000000", + "Date" : "Mon, 31 Aug 2020 22:23:17 GMT", + "x-ms-client-request-id" : "7ab2dcbc-a921-49e3-ae36-0cf88670ecca" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=37748736&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "22fbb7a2-ca64-4d1b-84ba-3ac6d7771381", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "4758426e-a01f-0016-5ee5-7f8fe4000000", + "Date" : "Mon, 31 Aug 2020 22:23:18 GMT", + "x-ms-client-request-id" : "22fbb7a2-ca64-4d1b-84ba-3ac6d7771381" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=12582912&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4a18a1a-9071-4d1f-b07c-dc2b55c49732", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "d4a07e27-b01f-00a3-34e5-7f821b000000", + "Date" : "Mon, 31 Aug 2020 22:23:18 GMT", + "x-ms-client-request-id" : "b4a18a1a-9071-4d1f-b07c-dc2b55c49732" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=75497472&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2443222f-460c-44f5-8b12-7d41e31b679c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "67812fa3-601f-000b-06e5-7f560e000000", + "Date" : "Mon, 31 Aug 2020 22:23:20 GMT", + "x-ms-client-request-id" : "2443222f-460c-44f5-8b12-7d41e31b679c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=54525952&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2a384c4c-0a74-4fa4-802c-8848576c46be", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "dcab4822-b01f-0064-22e5-7ffeda000000", + "Date" : "Mon, 31 Aug 2020 22:23:20 GMT", + "x-ms-client-request-id" : "2a384c4c-0a74-4fa4-802c-8848576c46be" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=71303168&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad0668df-254c-4b6b-aeec-8329cdaa3c08", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "841b8255-701f-003d-18e5-7ffb5c000000", + "Date" : "Mon, 31 Aug 2020 22:23:20 GMT", + "x-ms-client-request-id" : "ad0668df-254c-4b6b-aeec-8329cdaa3c08" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=58720256&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7b014df-9146-44ee-a77a-d58e3c05a848", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "47584271-a01f-0016-61e5-7f8fe4000000", + "Date" : "Mon, 31 Aug 2020 22:23:21 GMT", + "x-ms-client-request-id" : "f7b014df-9146-44ee-a77a-d58e3c05a848" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=50331648&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6bd43836-85aa-4fc0-b932-250f931c264b", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "5f8cd75d-c01f-00a7-80e5-7f7799000000", + "Date" : "Mon, 31 Aug 2020 22:23:21 GMT", + "x-ms-client-request-id" : "6bd43836-85aa-4fc0-b932-250f931c264b" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=62914560&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b205d82-3fde-4194-b0e3-f4d2670ecfe2", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "f807b3ab-501f-00a9-49e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:22 GMT", + "x-ms-client-request-id" : "6b205d82-3fde-4194-b0e3-f4d2670ecfe2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=46137344&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e573541-b9e2-4b7c-9785-8ab4b735edf5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "d4a07e42-b01f-00a3-4ee5-7f821b000000", + "Date" : "Mon, 31 Aug 2020 22:23:22 GMT", + "x-ms-client-request-id" : "4e573541-b9e2-4b7c-9785-8ab4b735edf5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=67108864&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5cdc435-d496-495a-8e80-85003b64ab02", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "8ce940ee-401f-0058-6ae5-7f4a01000000", + "Date" : "Mon, 31 Aug 2020 22:23:23 GMT", + "x-ms-client-request-id" : "e5cdc435-d496-495a-8e80-85003b64ab02" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=104857600&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0e404c7-e10e-4a8f-bf37-c46275beec92", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "8ce940f6-401f-0058-70e5-7f4a01000000", + "Date" : "Mon, 31 Aug 2020 22:23:23 GMT", + "x-ms-client-request-id" : "c0e404c7-e10e-4a8f-bf37-c46275beec92" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=96468992&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "69102120-791e-4553-9522-4db3a04454e9", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "841b8264-701f-003d-27e5-7ffb5c000000", + "Date" : "Mon, 31 Aug 2020 22:23:24 GMT", + "x-ms-client-request-id" : "69102120-791e-4553-9522-4db3a04454e9" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=100663296&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "504bdecd-3040-4be3-a3dc-d5ecdf9a1fc8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "dcab4982-b01f-0064-01e5-7ffeda000000", + "Date" : "Mon, 31 Aug 2020 22:23:24 GMT", + "x-ms-client-request-id" : "504bdecd-3040-4be3-a3dc-d5ecdf9a1fc8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=88080384&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "603d4fdb-8611-432f-86df-84a313ec928a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "d4a07e5d-b01f-00a3-66e5-7f821b000000", + "Date" : "Mon, 31 Aug 2020 22:23:24 GMT", + "x-ms-client-request-id" : "603d4fdb-8611-432f-86df-84a313ec928a" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=83886080&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a59f4f9a-176e-4656-8662-350ad210b6bf", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "5f8cd7b7-c01f-00a7-59e5-7f7799000000", + "Date" : "Mon, 31 Aug 2020 22:23:25 GMT", + "x-ms-client-request-id" : "a59f4f9a-176e-4656-8662-350ad210b6bf" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=92274688&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "55a4d299-0781-40a1-8fe8-f99910b4730d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "47584277-a01f-0016-67e5-7f8fe4000000", + "Date" : "Mon, 31 Aug 2020 22:23:25 GMT", + "x-ms-client-request-id" : "55a4d299-0781-40a1-8fe8-f99910b4730d" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=79691776&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "0c1313f6-21f1-4db0-88a7-ef4f39b13c67", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "f807b3de-501f-00a9-7ce5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:25 GMT", + "x-ms-client-request-id" : "0c1313f6-21f1-4db0-88a7-ef4f39b13c67" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957?position=104857601&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae806ecf-ffdb-4a10-9ede-cff23b197c91" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7B0BBD93", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "f807b407-501f-00a9-21e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "ae806ecf-ffdb-4a10-9ede-cff23b197c91" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865/javapathuploadnumappends2fileapitestuploadnumappends797565957", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "84729c9d-f5aa-4a4c-b912-708d08ff4dc2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:26 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 22:23:25 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "ETag" : "0x8D84DFC7B0BBD93", + "x-ms-creation-time" : "Mon, 31 Aug 2020 22:23:13 GMT", + "Content-Length" : "104857601", + "x-ms-request-id" : "5fba085f-b01e-0046-7be5-7f90ec000000", + "x-ms-client-request-id" : "84729c9d-f5aa-4a4c-b912-708d08ff4dc2", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadnumappends&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa4df978-52e5-40a0-8bd0-5b85cb2cedc8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5fba0863-b01e-0046-7de5-7f90ec000000", + "Body" : "jtfsuploadnumappendsjtfsuploadnumappends0fileapitestuploadnumappends79788645865Mon, 31 Aug 2020 22:23:12 GMT\"0x8D84DFC72E7F2F3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "aa4df978-52e5-40a0-8bd0-5b85cb2cedc8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends79788645865?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "66d1ebc0-42a4-4934-bb3a-00bc72f8df88" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "5fba0868-b01e-0046-02e5-7f90ec000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "66d1ebc0-42a4-4934-bb3a-00bc72f8df88" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadnumappends0fileapitestuploadnumappends79788645865", "javapathuploadnumappends1fileapitestuploadnumappends79724058a", "javapathuploadnumappends2fileapitestuploadnumappends797565957", "afdea99c-0cea-4643-a451-f388a7fa4036" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[2].json new file mode 100644 index 0000000000000..18ced59e8ea4c --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[2].json @@ -0,0 +1,180 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappendse665332487e?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "81d627c8-020c-4685-831c-9e2e048d573f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7B32B5A2", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5fba0874-b01e-0046-0ce5-7f90ec000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "81d627c8-020c-4685-831c-9e2e048d573f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappendse665332487e/javapathuploadnumappends1fileapitestuploadnumappendse66804063?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "14b6925b-d0fb-44cf-b621-18d3260ecf66" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7B3EAC2B", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f807b40c-501f-00a9-26e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "14b6925b-d0fb-44cf-b621-18d3260ecf66" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappendse665332487e/javapathuploadnumappends2fileapitestuploadnumappendse6641214c?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1388fad1-b783-48cf-8756-342f5938d1d2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7B494422", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f807b40d-501f-00a9-27e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "1388fad1-b783-48cf-8756-342f5938d1d2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappendse665332487e/javapathuploadnumappends2fileapitestuploadnumappendse6641214c?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "094c6ec7-708b-4947-b480-305bc75dd0ec", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "f807b40e-501f-00a9-28e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "094c6ec7-708b-4947-b480-305bc75dd0ec" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappendse665332487e/javapathuploadnumappends2fileapitestuploadnumappendse6641214c?position=100&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "19243d05-5c08-47a0-b172-224e73137fd0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7B5C7B6E", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "f807b40f-501f-00a9-29e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "19243d05-5c08-47a0-b172-224e73137fd0" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappendse665332487e/javapathuploadnumappends2fileapitestuploadnumappendse6641214c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bb7414a-79ac-43d3-8c1b-089a37f2108b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:26 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "ETag" : "0x8D84DFC7B5C7B6E", + "x-ms-creation-time" : "Mon, 31 Aug 2020 22:23:26 GMT", + "Content-Length" : "100", + "x-ms-request-id" : "5fba08c5-b01e-0046-4ee5-7f90ec000000", + "x-ms-client-request-id" : "7bb7414a-79ac-43d3-8c1b-089a37f2108b", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadnumappends&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ada61cd-584e-4cbf-9625-5f1070aeb78e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5fba08ce-b01e-0046-57e5-7f90ec000000", + "Body" : "jtfsuploadnumappendsjtfsuploadnumappends0fileapitestuploadnumappendse665332487eMon, 31 Aug 2020 22:23:26 GMT\"0x8D84DFC7B32B5A2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "4ada61cd-584e-4cbf-9625-5f1070aeb78e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappendse665332487e?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e083c9f7-ac0a-461e-87d4-5567f7c9546f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "5fba08da-b01e-0046-62e5-7f90ec000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "e083c9f7-ac0a-461e-87d4-5567f7c9546f" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadnumappends0fileapitestuploadnumappendse665332487e", "javapathuploadnumappends1fileapitestuploadnumappendse66804063", "javapathuploadnumappends2fileapitestuploadnumappendse6641214c", "8e53dc29-d277-4cfd-8c64-90e863ae67f5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[3].json new file mode 100644 index 0000000000000..e4dae68cfb466 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadnumappends[3].json @@ -0,0 +1,264 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef30c1ec-c1f5-4424-9221-c7eec9cd79e6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7B826A86", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5fba08e8-b01e-0046-6fe5-7f90ec000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "ef30c1ec-c1f5-4424-9221-c7eec9cd79e6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends1fileapitestuploadnumappends5cc81400d?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a32740c0-60d5-41f1-8ebb-e74a3e8a39ad" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7B9506A2", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f807b414-501f-00a9-2ee5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "a32740c0-60d5-41f1-8ebb-e74a3e8a39ad" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends2fileapitestuploadnumappends5cc140823?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "57dd461f-c377-4853-8271-dd416595daf5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7B9F355B", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f807b416-501f-00a9-30e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:27 GMT", + "x-ms-client-request-id" : "57dd461f-c377-4853-8271-dd416595daf5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends2fileapitestuploadnumappends5cc140823?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3edce28e-ff90-4263-aff5-0dba86a7c498", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "f807b419-501f-00a9-33e5-7f9b92000000", + "Date" : "Mon, 31 Aug 2020 22:23:27 GMT", + "x-ms-client-request-id" : "3edce28e-ff90-4263-aff5-0dba86a7c498" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends2fileapitestuploadnumappends5cc140823?position=80&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5d54603-327e-439e-abed-85f4db6037a7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "d4a07e7d-b01f-00a3-04e5-7f821b000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "e5d54603-327e-439e-abed-85f4db6037a7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends2fileapitestuploadnumappends5cc140823?position=60&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b38bf565-ba0b-4d4e-a5f6-04fbea134296", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "dcab4aca-b01f-0064-48e5-7ffeda000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "b38bf565-ba0b-4d4e-a5f6-04fbea134296" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends2fileapitestuploadnumappends5cc140823?position=20&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae7b85fa-7843-48c5-8d36-5591b357542e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "4758427d-a01f-0016-6ce5-7f8fe4000000", + "Date" : "Mon, 31 Aug 2020 22:23:27 GMT", + "x-ms-client-request-id" : "ae7b85fa-7843-48c5-8d36-5591b357542e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends2fileapitestuploadnumappends5cc140823?position=40&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "68afceb5-e4f5-40ac-b0eb-690bf6dc3acd", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "5f8cd802-c01f-00a7-23e5-7f7799000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "68afceb5-e4f5-40ac-b0eb-690bf6dc3acd" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends2fileapitestuploadnumappends5cc140823?position=100&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b777ba2-c98e-480d-ad7a-99e1e4a60c50" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DFC7BB78E00", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "5f8cd806-c01f-00a7-27e5-7f7799000000", + "Date" : "Mon, 31 Aug 2020 22:23:26 GMT", + "x-ms-client-request-id" : "4b777ba2-c98e-480d-ad7a-99e1e4a60c50" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245/javapathuploadnumappends2fileapitestuploadnumappends5cc140823", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "974bd28d-8bac-4fa0-ba45-4083c5df781b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 31 Aug 2020 22:23:27 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 31 Aug 2020 22:23:27 GMT", + "x-ms-blob-type" : "BlockBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "ETag" : "0x8D84DFC7BB78E00", + "x-ms-creation-time" : "Mon, 31 Aug 2020 22:23:27 GMT", + "Content-Length" : "100", + "x-ms-request-id" : "5fba0954-b01e-0046-48e5-7f90ec000000", + "x-ms-client-request-id" : "974bd28d-8bac-4fa0-ba45-4083c5df781b", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadnumappends&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a6c8d1c-b8c5-4fe5-9f8d-7cf2b3ea6fe4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5fba096b-b01e-0046-5de5-7f90ec000000", + "Body" : "jtfsuploadnumappendsjtfsuploadnumappends0fileapitestuploadnumappends5cc47422245Mon, 31 Aug 2020 22:23:27 GMT\"0x8D84DFC7B826A86\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 22:23:27 GMT", + "x-ms-client-request-id" : "4a6c8d1c-b8c5-4fe5-9f8d-7cf2b3ea6fe4", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d86a119-5ab1-49a1-af0f-0741c4d9163a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "5fba097a-b01e-0046-68e5-7f90ec000000", + "Date" : "Mon, 31 Aug 2020 22:23:27 GMT", + "x-ms-client-request-id" : "6d86a119-5ab1-49a1-af0f-0741c4d9163a" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadnumappends0fileapitestuploadnumappends5cc47422245", "javapathuploadnumappends1fileapitestuploadnumappends5cc81400d", "javapathuploadnumappends2fileapitestuploadnumappends5cc140823", "9575f34c-7538-4533-be1a-dd27d6191335" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadreturnvalue.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadreturnvalue.json new file mode 100644 index 0000000000000..f237042ec3ff5 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestuploadreturnvalue.json @@ -0,0 +1,150 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadreturnvalue0fileapitestuploadreturnvalue24563680f9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f6d42008-08df-4cdf-ae2d-4ab0965fb757" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24F925B92", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "89eae5ce-601e-010f-4adb-7fe5d9000000", + "Date" : "Mon, 31 Aug 2020 21:10:37 GMT", + "x-ms-client-request-id" : "f6d42008-08df-4cdf-ae2d-4ab0965fb757" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadreturnvalue0fileapitestuploadreturnvalue24563680f9/javapathuploadreturnvalue1fileapitestuploadreturnvalue24544447?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "55719afb-b32a-46e7-bae1-68bcec566861" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24FCCA211", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a5297a5f-f01f-0086-15db-7f1aa8000000", + "Date" : "Mon, 31 Aug 2020 21:10:38 GMT", + "x-ms-client-request-id" : "55719afb-b32a-46e7-bae1-68bcec566861" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadreturnvalue0fileapitestuploadreturnvalue24563680f9/javapathuploadreturnvalue1fileapitestuploadreturnvalue24544447?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a20f513-7892-4c98-a31f-faa386673857" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24FDA4375", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a5297a60-f01f-0086-16db-7f1aa8000000", + "Date" : "Mon, 31 Aug 2020 21:10:38 GMT", + "x-ms-client-request-id" : "3a20f513-7892-4c98-a31f-faa386673857" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadreturnvalue0fileapitestuploadreturnvalue24563680f9/javapathuploadreturnvalue1fileapitestuploadreturnvalue24544447?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "0326b40a-4d75-4fe2-be18-11a78bb61d96", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "a5297a61-f01f-0086-17db-7f1aa8000000", + "Date" : "Mon, 31 Aug 2020 21:10:38 GMT", + "x-ms-client-request-id" : "0326b40a-4d75-4fe2-be18-11a78bb61d96" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsuploadreturnvalue0fileapitestuploadreturnvalue24563680f9/javapathuploadreturnvalue1fileapitestuploadreturnvalue24544447?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc5638f3-37a8-44c3-8d0d-d40cbcbf495f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84DF24FF2E9DE", + "Last-Modified" : "Mon, 31 Aug 2020 21:10:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "false", + "x-ms-request-id" : "a5297a62-f01f-0086-18db-7f1aa8000000", + "Date" : "Mon, 31 Aug 2020 21:10:38 GMT", + "x-ms-client-request-id" : "cc5638f3-37a8-44c3-8d0d-d40cbcbf495f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsuploadreturnvalue&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "943b15e1-3c28-4d6d-a4ca-ee1334d880fe" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "89eae65f-601e-010f-3adb-7fe5d9000000", + "Body" : "jtfsuploadreturnvaluejtfsuploadreturnvalue0fileapitestuploadreturnvalue24563680f9Mon, 31 Aug 2020 21:10:38 GMT\"0x8D84DF24F925B92\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 31 Aug 2020 21:10:38 GMT", + "x-ms-client-request-id" : "943b15e1-3c28-4d6d-a4ca-ee1334d880fe", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsuploadreturnvalue0fileapitestuploadreturnvalue24563680f9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "c40fd120-cd76-4fac-8864-adad46b8c282" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "89eae67d-601e-010f-53db-7fe5d9000000", + "Date" : "Mon, 31 Aug 2020 21:10:38 GMT", + "x-ms-client-request-id" : "c40fd120-cd76-4fac-8864-adad46b8c282" + }, + "Exception" : null + } ], + "variables" : [ "jtfsuploadreturnvalue0fileapitestuploadreturnvalue24563680f9", "javapathuploadreturnvalue1fileapitestuploadreturnvalue24544447" ] +} \ No newline at end of file From 41771aa8a58865923584e80b8e1748ae25432706 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Wed, 2 Sep 2020 09:23:08 -0700 Subject: [PATCH 053/168] Add missing azure-core export for HTTP implementation used in paramemterized HTTP client tests (#14707) --- sdk/appconfiguration/azure-data-appconfiguration/pom.xml | 1 + sdk/formrecognizer/azure-ai-formrecognizer/pom.xml | 2 ++ sdk/keyvault/azure-security-keyvault-certificates/pom.xml | 2 ++ sdk/keyvault/azure-security-keyvault-keys/pom.xml | 2 ++ sdk/keyvault/azure-security-keyvault-secrets/pom.xml | 2 ++ sdk/textanalytics/azure-ai-textanalytics/pom.xml | 2 ++ 6 files changed, 11 insertions(+) diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 920a67449c151..f06f7e68eed52 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml @@ -109,6 +109,7 @@ 3.0.0-M3 + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED --add-opens com.azure.data.appconfiguration/com.azure.data.appconfiguration=ALL-UNNAMED diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index 7b7606f816948..319c7b5e3fc77 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml @@ -97,6 +97,8 @@ 3.0.0-M3 + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-opens com.azure.ai.formrecognizer/com.azure.ai.formrecognizer=ALL-UNNAMED diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml index bd22338e69bfd..6003b22f1f440 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml @@ -124,6 +124,8 @@ 3.0.0-M3 + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-opens com.azure.security.keyvault.certificates/com.azure.security.keyvault.certificates=ALL-UNNAMED diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml index 3642c28e3a845..69789571ca3de 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-keys/pom.xml @@ -130,6 +130,8 @@ 3.0.0-M3 + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys=ALL-UNNAMED --add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys.cryptography=ALL-UNNAMED diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml index 45d3a25edd785..466decca05033 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml @@ -131,6 +131,8 @@ 3.0.0-M3 + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-opens com.azure.security.keyvault.secrets/com.azure.security.keyvault.secrets=ALL-UNNAMED diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index cf23a900244c6..faa4591103fd1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/pom.xml +++ b/sdk/textanalytics/azure-ai-textanalytics/pom.xml @@ -113,6 +113,8 @@ 3.0.0-M3 + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics=ALL-UNNAMED --add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics.implementation.models=com.azure.core From 087377f18d6b5cd16ad8ae0794483f7db0c9661f Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Wed, 2 Sep 2020 10:42:22 -0700 Subject: [PATCH 054/168] Revert jdk httpclient artifact name (#14701) * Revert jdk httpclient artifact name * Update ci.yml * Update checkstyle-suppression --- .../resources/checkstyle/checkstyle-suppressions.xml | 2 +- eng/jacoco-test-coverage/pom.xml | 4 ++-- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 0 .../README.md | 12 ++++++------ .../pom.xml | 4 ++-- .../http/jdk/httpclient}/JdkAsyncHttpClient.java | 2 +- .../jdk/httpclient}/JdkAsyncHttpClientBuilder.java | 4 ++-- .../implementation/JdkHttpClientProvider.java | 4 ++-- .../implementation/JdkHttpClientProxySelector.java | 2 +- .../core/http/jdk/httpclient}/package-info.java | 2 +- .../src/main/java/module-info.java | 6 +++--- .../services/com.azure.core.http.HttpClientProvider | 1 + ...JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java | 2 +- .../core/http/jdk/httpclient}/ReadmeSamples.java | 2 +- .../httpclient}/JdkAsyncHttpClientBuilderTests.java | 2 +- .../jdk/httpclient}/JdkAsyncHttpClientTests.java | 2 +- .../http/jdk/httpclient}/JdkHttpClientTests.java | 2 +- .../httpclient}/SimpleBasicAuthHttpProxyServer.java | 2 +- .../RestProxyWithHttpProxyJdkHttpClientTests.java | 4 ++-- .../RestProxyWithJdkHttpClientTests.java | 4 ++-- .../src/test/resources/upload.txt | 0 .../services/com.azure.core.http.HttpClientProvider | 1 - sdk/core/ci.yml | 4 ++-- sdk/core/pom.xml | 2 +- 25 files changed, 36 insertions(+), 36 deletions(-) rename sdk/core/{azure-core-http-jdk => azure-core-http-jdk-httpclient}/CHANGELOG.md (100%) rename sdk/core/{azure-core-http-jdk => azure-core-http-jdk-httpclient}/README.md (80%) rename sdk/core/{azure-core-http-jdk => azure-core-http-jdk-httpclient}/pom.xml (98%) rename sdk/core/{azure-core-http-jdk/src/main/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient}/JdkAsyncHttpClient.java (99%) rename sdk/core/{azure-core-http-jdk/src/main/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient}/JdkAsyncHttpClientBuilder.java (98%) rename sdk/core/{azure-core-http-jdk/src/main/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient}/implementation/JdkHttpClientProvider.java (79%) rename sdk/core/{azure-core-http-jdk/src/main/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient}/implementation/JdkHttpClientProxySelector.java (96%) rename sdk/core/{azure-core-http-jdk/src/main/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient}/package-info.java (81%) rename sdk/core/{azure-core-http-jdk => azure-core-http-jdk-httpclient}/src/main/java/module-info.java (64%) create mode 100644 sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider rename sdk/core/{azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient}/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java (98%) rename sdk/core/{azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient}/ReadmeSamples.java (96%) rename sdk/core/{azure-core-http-jdk/src/test/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient}/JdkAsyncHttpClientBuilderTests.java (99%) rename sdk/core/{azure-core-http-jdk/src/test/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient}/JdkAsyncHttpClientTests.java (99%) rename sdk/core/{azure-core-http-jdk/src/test/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient}/JdkHttpClientTests.java (96%) rename sdk/core/{azure-core-http-jdk/src/test/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient}/SimpleBasicAuthHttpProxyServer.java (99%) rename sdk/core/{azure-core-http-jdk/src/test/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient}/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java (91%) rename sdk/core/{azure-core-http-jdk/src/test/java/com/azure/core/http/jdk => azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient}/implementation/RestProxyWithJdkHttpClientTests.java (90%) rename sdk/core/{azure-core-http-jdk => azure-core-http-jdk-httpclient}/src/test/resources/upload.txt (100%) delete mode 100644 sdk/core/azure-core-http-jdk/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index 43a52eaf59d99..bf5ae0bed99ee 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -163,7 +163,7 @@ - + com.azure - azure-core-http-jdk - 1.0.0-beta.1 + azure-core-http-jdk-httpclient + 1.0.0-beta.1 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 9c7007456450b..b6399c5c996ff 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -10,7 +10,7 @@ com.azure:azure-ai-textanalytics;5.0.0;5.1.0-beta.1 com.azure:azure-core;1.7.0;1.8.0-beta.1 com.azure:azure-core-amqp;1.4.0;1.5.0-beta.1 com.azure:azure-core-experimental;1.0.0-beta.2;1.0.0-beta.3 -com.azure:azure-core-http-jdk;1.0.0-beta.1;1.0.0-beta.1 +com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-core-http-netty;1.5.4;1.6.0-beta.1 com.azure:azure-core-http-okhttp;1.2.5;1.3.0-beta.1 com.azure:azure-core-management;1.0.0-beta.3;1.0.0-beta.4 diff --git a/sdk/core/azure-core-http-jdk/CHANGELOG.md b/sdk/core/azure-core-http-jdk-httpclient/CHANGELOG.md similarity index 100% rename from sdk/core/azure-core-http-jdk/CHANGELOG.md rename to sdk/core/azure-core-http-jdk-httpclient/CHANGELOG.md diff --git a/sdk/core/azure-core-http-jdk/README.md b/sdk/core/azure-core-http-jdk-httpclient/README.md similarity index 80% rename from sdk/core/azure-core-http-jdk/README.md rename to sdk/core/azure-core-http-jdk-httpclient/README.md index 930f10f691f68..a2f9b6e647092 100644 --- a/sdk/core/azure-core-http-jdk/README.md +++ b/sdk/core/azure-core-http-jdk-httpclient/README.md @@ -11,11 +11,11 @@ part of JDK 11. ### Adding the package to your product -[//]: # ({x-version-update-start;com.azure:azure-core-http-jdk;current}) +[//]: # ({x-version-update-start;com.azure:azure-core-http-jdk-httpclient;current}) ```xml com.azure - azure-core-http-jdk + azure-core-http-jdk-httpclient 1.0.0-beta.1 ``` @@ -34,14 +34,14 @@ The following sections provide several code snippets covering some of the most c Create a HttpClient. - + ```java HttpClient client = new JdkAsyncHttpClientBuilder().build(); ``` Create a HttpClient using a connection timeout of 60 seconds. - + ```java HttpClient client = new JdkAsyncHttpClientBuilder().connectionTimeout(Duration.ofSeconds(60)).build(); ``` @@ -50,7 +50,7 @@ HttpClient client = new JdkAsyncHttpClientBuilder().connectionTimeout(Duration.o Create a HttpClient that is using a proxy. - + ```java HttpClient client = new JdkAsyncHttpClientBuilder() .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("", 8888))) @@ -72,4 +72,4 @@ Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). 1. Push to the branch (`git push origin my-new-feature`) 1. Create new Pull Request -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcore%2Fazure-core-http-jdk%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcore%2Fazure-core-http-jdk-httpclient%2FREADME.png) diff --git a/sdk/core/azure-core-http-jdk/pom.xml b/sdk/core/azure-core-http-jdk-httpclient/pom.xml similarity index 98% rename from sdk/core/azure-core-http-jdk/pom.xml rename to sdk/core/azure-core-http-jdk-httpclient/pom.xml index 739b09265745d..1c270690998b0 100644 --- a/sdk/core/azure-core-http-jdk/pom.xml +++ b/sdk/core/azure-core-http-jdk-httpclient/pom.xml @@ -13,9 +13,9 @@ com.azure - azure-core-http-jdk + azure-core-http-jdk-httpclient jar - 1.0.0-beta.1 + 1.0.0-beta.1 Microsoft Azure JDK HTTP Client Library This package contains the Azure HTTP client library using the JDK HttpClient API. diff --git a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClient.java b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClient.java similarity index 99% rename from sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClient.java rename to sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClient.java index 9b71a25976c8b..583d4a40e49bc 100644 --- a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClient.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClient.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpHeader; diff --git a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilder.java b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilder.java similarity index 98% rename from sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilder.java rename to sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilder.java index af913f8f9b410..f29b9facc65e2 100644 --- a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilder.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilder.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; import com.azure.core.http.HttpClient; import com.azure.core.http.ProxyOptions; -import com.azure.core.http.jdk.implementation.JdkHttpClientProxySelector; +import com.azure.core.http.jdk.httpclient.implementation.JdkHttpClientProxySelector; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProvider.java b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProvider.java similarity index 79% rename from sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProvider.java rename to sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProvider.java index 0118ab127e956..e9ce01b47368d 100644 --- a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProvider.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProvider.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.implementation; +package com.azure.core.http.jdk.httpclient.implementation; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpClientProvider; -import com.azure.core.http.jdk.JdkAsyncHttpClientBuilder; +import com.azure.core.http.jdk.httpclient.JdkAsyncHttpClientBuilder; /** * A {@link HttpClientProvider} that provides an implementation of HttpClient based on native JDK HttpClient. diff --git a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProxySelector.java b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProxySelector.java similarity index 96% rename from sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProxySelector.java rename to sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProxySelector.java index 0c577d2c3b1a0..369eb8183860d 100644 --- a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/implementation/JdkHttpClientProxySelector.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/implementation/JdkHttpClientProxySelector.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.implementation; +package com.azure.core.http.jdk.httpclient.implementation; import java.io.IOException; import java.net.Proxy; diff --git a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/package-info.java b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/package-info.java similarity index 81% rename from sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/package-info.java rename to sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/package-info.java index e82d308c8db94..76afceb9f4a8f 100644 --- a/sdk/core/azure-core-http-jdk/src/main/java/com/azure/core/http/jdk/package-info.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/package-info.java @@ -4,4 +4,4 @@ /** * Package containing an HTTP client for azure-core using the JDK HttpClient APIs. */ -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; diff --git a/sdk/core/azure-core-http-jdk/src/main/java/module-info.java b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/module-info.java similarity index 64% rename from sdk/core/azure-core-http-jdk/src/main/java/module-info.java rename to sdk/core/azure-core-http-jdk-httpclient/src/main/java/module-info.java index 7731ef6c57f7f..a791a8ea254e1 100644 --- a/sdk/core/azure-core-http-jdk/src/main/java/module-info.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/module-info.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import com.azure.core.http.jdk.implementation.JdkHttpClientProvider; +import com.azure.core.http.jdk.httpclient.implementation.JdkHttpClientProvider; -module com.azure.core.http.jdk { +module com.azure.core.http.jdk.httpclient { requires transitive com.azure.core; requires java.net.http; - exports com.azure.core.http.jdk; + exports com.azure.core.http.jdk.httpclient; provides com.azure.core.http.HttpClientProvider with JdkHttpClientProvider; diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider b/sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider new file mode 100644 index 0000000000000..ac348011337af --- /dev/null +++ b/sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider @@ -0,0 +1 @@ +com.azure.core.http.jdk.httpclient.implementation.JdkHttpClientProvider diff --git a/sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java b/sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java similarity index 98% rename from sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java rename to sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java index a407fd0caed80..623c7b7fe468a 100644 --- a/sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderJavaDocCodeSnippets.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; import com.azure.core.http.HttpClient; import com.azure.core.http.ProxyOptions; diff --git a/sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/ReadmeSamples.java b/sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/ReadmeSamples.java similarity index 96% rename from sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/ReadmeSamples.java rename to sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/ReadmeSamples.java index 3d6f5ccdb1e76..6e7b547de2319 100644 --- a/sdk/core/azure-core-http-jdk/src/samples/java/com/azure/core/http/jdk/ReadmeSamples.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/samples/java/com/azure/core/http/jdk/httpclient/ReadmeSamples.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; import com.azure.core.http.HttpClient; import com.azure.core.http.ProxyOptions; diff --git a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderTests.java b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java similarity index 99% rename from sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderTests.java rename to sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java index 48b16607a1ffe..7d14cbef787be 100644 --- a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientBuilderTests.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpMethod; diff --git a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientTests.java b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientTests.java similarity index 99% rename from sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientTests.java rename to sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientTests.java index 753ff8aff6df9..d2e0fddecebb4 100644 --- a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkAsyncHttpClientTests.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientTests.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpMethod; diff --git a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkHttpClientTests.java b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientTests.java similarity index 96% rename from sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkHttpClientTests.java rename to sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientTests.java index 66f0d3cf15270..3e8dabbaa6eac 100644 --- a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/JdkHttpClientTests.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientTests.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; import com.azure.core.http.HttpClient; import com.azure.core.test.HttpClientTestsWireMockServer; diff --git a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/SimpleBasicAuthHttpProxyServer.java b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/SimpleBasicAuthHttpProxyServer.java similarity index 99% rename from sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/SimpleBasicAuthHttpProxyServer.java rename to sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/SimpleBasicAuthHttpProxyServer.java index b669736f9835b..887f8b97041c2 100644 --- a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/SimpleBasicAuthHttpProxyServer.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/SimpleBasicAuthHttpProxyServer.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk; +package com.azure.core.http.jdk.httpclient; import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.client.WireMock; diff --git a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java similarity index 91% rename from sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java rename to sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java index 9086d72332ddf..fca1c56765d0b 100644 --- a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithHttpProxyJdkHttpClientTests.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.implementation; +package com.azure.core.http.jdk.httpclient.implementation; import com.azure.core.http.HttpClient; import com.azure.core.http.ProxyOptions; -import com.azure.core.http.jdk.JdkAsyncHttpClientBuilder; +import com.azure.core.http.jdk.httpclient.JdkAsyncHttpClientBuilder; import com.azure.core.test.RestProxyTestsWireMockServer; import com.azure.core.test.implementation.RestProxyTests; import com.github.tomakehurst.wiremock.WireMockServer; diff --git a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithJdkHttpClientTests.java b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithJdkHttpClientTests.java similarity index 90% rename from sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithJdkHttpClientTests.java rename to sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithJdkHttpClientTests.java index c43974172db3f..93d553ca72398 100644 --- a/sdk/core/azure-core-http-jdk/src/test/java/com/azure/core/http/jdk/implementation/RestProxyWithJdkHttpClientTests.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/implementation/RestProxyWithJdkHttpClientTests.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.http.jdk.implementation; +package com.azure.core.http.jdk.httpclient.implementation; import com.azure.core.http.HttpClient; -import com.azure.core.http.jdk.JdkAsyncHttpClientBuilder; +import com.azure.core.http.jdk.httpclient.JdkAsyncHttpClientBuilder; import com.azure.core.test.implementation.RestProxyTests; import com.azure.core.test.RestProxyTestsWireMockServer; import com.github.tomakehurst.wiremock.WireMockServer; diff --git a/sdk/core/azure-core-http-jdk/src/test/resources/upload.txt b/sdk/core/azure-core-http-jdk-httpclient/src/test/resources/upload.txt similarity index 100% rename from sdk/core/azure-core-http-jdk/src/test/resources/upload.txt rename to sdk/core/azure-core-http-jdk-httpclient/src/test/resources/upload.txt diff --git a/sdk/core/azure-core-http-jdk/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider b/sdk/core/azure-core-http-jdk/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider deleted file mode 100644 index b2229a4102c8c..0000000000000 --- a/sdk/core/azure-core-http-jdk/src/main/resources/META-INF/services/com.azure.core.http.HttpClientProvider +++ /dev/null @@ -1 +0,0 @@ -com.azure.core.http.jdk.implementation.JdkHttpClientProvider diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index c0b53b5f333ee..f742ddbc1412b 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -42,9 +42,9 @@ extends: - name: azure-core-experimental groupId: com.azure safeName: azurecoreexperimental - - name: azure-core-http-jdk + - name: azure-core-http-jdk-httpclient groupId: com.azure - safeName: azurecorehttpjdk + safeName: azurecorehttpjdkhttpclient - name: azure-core-http-netty groupId: com.azure safeName: azurecorehttpnetty diff --git a/sdk/core/pom.xml b/sdk/core/pom.xml index 8073984558c35..50a3b1d0ebb5b 100644 --- a/sdk/core/pom.xml +++ b/sdk/core/pom.xml @@ -12,7 +12,7 @@ azure-core azure-core-amqp azure-core-experimental - azure-core-http-jdk + azure-core-http-jdk-httpclient azure-core-http-netty azure-core-http-okhttp azure-core-management From 73a8ec370e99eb3e58ac97408dc4e043d64a762d Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Wed, 2 Sep 2020 11:06:47 -0700 Subject: [PATCH 055/168] Add helpers for accessing sample resources (#14706) * feat(adt): Add helpers for accessing sample's resources --- .../azure-digitaltwins-core/pom.xml | 5 + .../core/DigitalTwinsLifecycleSample.java | 111 ++++++++++++++++++ .../azure/digitaltwins/core/FileHelper.java | 53 +++++++++ .../digitaltwins/core/SamplesConstants.java | 12 ++ .../src/samples/resources/BuildingTwin.json | 7 ++ .../DTDL/DigitalTwins/BuildingTwin.json | 7 ++ .../DTDL/DigitalTwins/FloorTwin.json | 6 + .../resources/DTDL/DigitalTwins/HVACTwin.json | 8 ++ .../resources/DTDL/DigitalTwins/RoomTwin.json | 15 +++ .../resources/DTDL/Models/Building.json | 35 ++++++ .../samples/resources/DTDL/Models/Floor.json | 18 +++ .../samples/resources/DTDL/Models/HVAC.json | 28 +++++ .../samples/resources/DTDL/Models/Room.json | 33 ++++++ .../samples/resources/DTDL/Models/Wifi.json | 18 +++ .../Relationships/HospitalRelationships.json | 27 +++++ 15 files changed, 383 insertions(+) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleSample.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/BuildingTwin.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/BuildingTwin.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/FloorTwin.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/HVACTwin.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/RoomTwin.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Building.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Floor.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/HVAC.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Room.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Wifi.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Relationships/HospitalRelationships.json diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml index 04dc54125c671..7d174b46bcdd4 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml +++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml @@ -78,6 +78,11 @@ + + + src/samples/resources + + org.apache.maven.plugins diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleSample.java new file mode 100644 index 0000000000000..537c3d6370480 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleSample.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; +import com.azure.identity.ClientSecretCredentialBuilder; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Map; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; + +public class DigitalTwinsLifecycleSample { + private static final String tenantId = System.getenv("TENANT_ID"); + private static final String clientId = System.getenv("CLIENT_ID"); + private static final String clientSecret = System.getenv("CLIENT_SECRET"); + private static final String endpoint = System.getenv("DIGITAL_TWINS_ENDPOINT"); + + private static final int MaxWaitTimeAsyncOperationsInSeconds = 10; + + private static final URL DtdlDirectoryUrl = DigitalTwinsLifecycleSample.class.getClassLoader().getResource("DTDL"); + private static final Path DtDlDirectoryPath; + private static final Path TwinsPath; + private static final Path ModelsPath; + private static final Path RelationshipsPath; + + private static final DigitalTwinsAsyncClient client; + + static { + try { + assert DtdlDirectoryUrl != null; + DtDlDirectoryPath = Paths.get(DtdlDirectoryUrl.toURI()); + } catch (URISyntaxException e) { + System.err.println("Unable to convert the DTDL directory URL to URI: " + e); + throw new RuntimeException(e); + } + TwinsPath = Paths.get(DtDlDirectoryPath.toString(), "DigitalTwins"); + ModelsPath = Paths.get(DtDlDirectoryPath.toString(), "Models"); + RelationshipsPath = Paths.get(DtDlDirectoryPath.toString(), "Relationships"); + + client = new DigitalTwinsClientBuilder() + .tokenCredential( + new ClientSecretCredentialBuilder() + .tenantId(tenantId) + .clientId(clientId) + .clientSecret(clientSecret) + .build() + ) + .endpoint(endpoint) + .httpLogOptions( + new HttpLogOptions() + .setLogLevel(HttpLogDetailLevel.NONE)) + .buildAsyncClient(); + } + + public static void main(String[] args) throws IOException, InterruptedException { + // Ensure existing twins with the same name are deleted first + deleteTwins(); + + // Create twin counterparts for all the models + createTwins(); + } + + public static void deleteTwins() throws IOException, InterruptedException { + System.out.println("DELETE DIGITAL TWINS"); + Map twins = FileHelper.loadAllFilesInPath(TwinsPath); + final Semaphore deleteTwinsSemaphore = new Semaphore(0); + + // Call APIs to delete the twins. For each async operation, once the operation is completed successfully, a semaphore is released. + twins + .forEach((twinId, twinContent) -> client.deleteDigitalTwin(twinId) + .doOnSuccess(aVoid -> System.out.println("Deleted digital twin: " + twinId)) + .doOnError(throwable -> { + // If digital twin does not exist, ignore. + if (!(throwable instanceof ErrorResponseException) || !((ErrorResponseException) throwable).getValue().getError().getCode().equals("DigitalTwinNotFound")) { + System.err.println("Could not delete digital twin " + twinId + " due to " + throwable); + } + }) + .doOnTerminate(deleteTwinsSemaphore::release) + .subscribe()); + + // Verify that a semaphore has been released for each async operation, signifying that the async call has completed. + boolean created = deleteTwinsSemaphore.tryAcquire(twins.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + System.out.println("Twins deleted: " + created); + } + + public static void createTwins() throws IOException, InterruptedException { + System.out.println("CREATE DIGITAL TWINS"); + Map twins = FileHelper.loadAllFilesInPath(TwinsPath); + final Semaphore createTwinsSemaphore = new Semaphore(0); + + // Call APIs to create the twins. For each async operation, once the operation is completed successfully, a semaphore is released. + twins + .forEach((twinId, twinContent) -> client.createDigitalTwinWithResponse(twinId, twinContent) + .doOnSuccess(response -> System.out.println("Created digital twin: " + twinId + "\n\t Body: " + response.getValue())) + .doOnError(throwable -> System.err.println("Could not create digital twin " + twinId + " due to " + throwable)) + .doOnTerminate(createTwinsSemaphore::release) + .subscribe()); + + // Verify that a semaphore has been released for each async operation, signifying that the async call has completed. + boolean created = createTwinsSemaphore.tryAcquire(twins.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + System.out.println("Twins created: " + created); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java new file mode 100644 index 0000000000000..144dc63824a33 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class FileHelper { + public static Map loadAllFilesInPath(Path path) throws IOException { + Map fileContents = new HashMap<>(); + + Stream paths = Files.walk(path); + paths + .filter(filePath -> filePath.toFile().getName().endsWith(".json")) + .forEach(filePath -> { + try { + Stream lines = Files.lines(filePath); + String fileAsString = lines.collect(Collectors.joining()); + lines.close(); + + fileContents.put(getFileNameFromPath(filePath), cleanupJsonString(fileAsString)); + } catch (IOException e) { + e.printStackTrace(); + } + }); + + return fileContents; + } + + public static String cleanupJsonString(String jsonString) { + // Remove newline characters, empty spaces and unwanted unicode characters + return jsonString.replaceAll("([\\r\\n\\s+\\uFEFF-\\uFFFF])", ""); + } + + public static String getFileNameFromPath(Path path) { + String fileName = path.getFileName().toString(); + if (fileName.indexOf(".") > 0) { + fileName = fileName.substring(0, fileName.lastIndexOf(".")); + } + + return fileName; + } + +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java new file mode 100644 index 0000000000000..4838dec3a12a0 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + +public class SamplesConstants { + public static final String RoomModelId = "dtmi:samples:Room;1"; + public static final String WifiModelId = "dtmi:samples:Wifi;1"; + public static final String BuildingModelId = "dtmi:samples:Building;1"; + public static final String FloorModelId = "dtmi:samples:Floor;1"; + public static final String HvacModelId = "dtmi:samples:HVAC;1"; +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/BuildingTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/BuildingTwin.json new file mode 100644 index 0000000000000..ba5291c2b5715 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/BuildingTwin.json @@ -0,0 +1,7 @@ +{ + "$metadata": { + "$model": "dtmi:samples:Building;1" + }, + "AverageTemperature": 68, + "TemperatureUnit": "Celsius" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/BuildingTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/BuildingTwin.json new file mode 100644 index 0000000000000..ba5291c2b5715 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/BuildingTwin.json @@ -0,0 +1,7 @@ +{ + "$metadata": { + "$model": "dtmi:samples:Building;1" + }, + "AverageTemperature": 68, + "TemperatureUnit": "Celsius" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/FloorTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/FloorTwin.json new file mode 100644 index 0000000000000..f9a08edfd8bb7 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/FloorTwin.json @@ -0,0 +1,6 @@ +{ + "$metadata": { + "$model": "dtmi:samples:Floor;1" + }, + "AverageTemperature": 75 +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/HVACTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/HVACTwin.json new file mode 100644 index 0000000000000..49b4ad6172329 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/HVACTwin.json @@ -0,0 +1,8 @@ +{ + "$metadata": { + "$model": "dtmi:samples:HVAC;1" + }, + "Efficiency": 94, + "TargetTemperature": 72, + "TargetHumidity": 30 +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/RoomTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/RoomTwin.json new file mode 100644 index 0000000000000..bc75da2917f4d --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/DigitalTwins/RoomTwin.json @@ -0,0 +1,15 @@ +{ + "$metadata": { + "$model": "dtmi:samples:Room;1" + }, + "Temperature": 80, + "Humidity": 25, + "IsOccupied": true, + "EmployeeId": "Employee1", + "wifiAccessPoint": { + "$metadata": { + }, + "RouterName": "Cisco1", + "Network": "Room1" + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Building.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Building.json new file mode 100644 index 0000000000000..1a032d6364737 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Building.json @@ -0,0 +1,35 @@ +{ + "@id": "dtmi:samples:Building;1", + "@type": "Interface", + "@context": "dtmi:dtdl:context;2", + "displayName": "Building", + "contents": [ + { + "@type": "Relationship", + "name": "has", + "target": "dtmi:samples:Floor;1", + "properties": [ + { + "@type": "Property", + "name": "isAccessRestricted", + "schema": "boolean" + } + ] + }, + { + "@type": "Relationship", + "name": "isEquippedWith", + "target": "dtmi:samples:HVAC;1" + }, + { + "@type": "Property", + "name": "AverageTemperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "TemperatureUnit", + "schema": "string" + } + ] +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Floor.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Floor.json new file mode 100644 index 0000000000000..fe4ea891228b6 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Floor.json @@ -0,0 +1,18 @@ +{ + "@id": "dtmi:samples:Floor;1", + "@type": "Interface", + "@context": "dtmi:dtdl:context;2", + "displayName": "Floor", + "contents": [ + { + "@type": "Relationship", + "name": "contains", + "target": "dtmi:samples:Room;1" + }, + { + "@type": "Property", + "name": "AverageTemperature", + "schema": "double" + } + ] +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/HVAC.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/HVAC.json new file mode 100644 index 0000000000000..35186f130a95a --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/HVAC.json @@ -0,0 +1,28 @@ +{ + "@id": "dtmi:samples:HVAC;1", + "@type": "Interface", + "@context": "dtmi:dtdl:context;2", + "displayName": "HVAC", + "contents": [ + { + "@type": "Property", + "name": "Efficiency", + "schema": "double" + }, + { + "@type": "Property", + "name": "TargetTemperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "TargetHumidity", + "schema": "double" + }, + { + "@type": "Relationship", + "name": "controlsTemperature", + "target": "dtmi:samples:Floor;1" + } + ] +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Room.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Room.json new file mode 100644 index 0000000000000..a6c2dfe6bd781 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Room.json @@ -0,0 +1,33 @@ +{ + "@id": "dtmi:samples:Room;1", + "@type": "Interface", + "@context": "dtmi:dtdl:context;2", + "displayName": "Room", + "contents": [ + { + "@type": "Property", + "name": "Temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "Humidity", + "schema": "double" + }, + { + "@type": "Property", + "name": "IsOccupied", + "schema": "boolean" + }, + { + "@type": "Property", + "name": "EmployeeId", + "schema": "string" + }, + { + "@type": "Component", + "name": "wifiAccessPoint", + "schema": "dtmi:samples:Wifi;1" + } + ] +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Wifi.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Wifi.json new file mode 100644 index 0000000000000..a2b07b484334c --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Models/Wifi.json @@ -0,0 +1,18 @@ +{ + "@id": "dtmi:samples:Wifi;1", + "@type": "Interface", + "@context": "dtmi:dtdl:context;2", + "displayName": "Wifi", + "contents": [ + { + "@type": "Property", + "name": "RouterName", + "schema": "string" + }, + { + "@type": "Property", + "name": "Network", + "schema": "string" + } + ] +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Relationships/HospitalRelationships.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Relationships/HospitalRelationships.json new file mode 100644 index 0000000000000..82d426e17a3d6 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/DTDL/Relationships/HospitalRelationships.json @@ -0,0 +1,27 @@ +[ + { + "$relationshipId": "BuildingHasFloor", + "$sourceId": "BuildingTwin", + "$relationshipName": "has", + "$targetId": "FloorTwin", + "isAccessRestricted": false + }, + { + "$relationshipId": "BuildingIsEquippedWithHVAC", + "$sourceId": "BuildingTwin", + "$relationshipName": "isEquippedWith", + "$targetId": "HVACTwin" + }, + { + "$relationshipId": "HVACCoolsFloor", + "$sourceId": "HVACTwin", + "$relationshipName": "controlsTemperature", + "$targetId": "FloorTwin" + }, + { + "$relationshipId": "FloorContainsRoom", + "$sourceId": "FloorTwin", + "$relationshipName": "contains", + "$targetId": "RoomTwin" + } +] From 37c78d715851cd2af1cb2c6cdbc7a7864d4218d2 Mon Sep 17 00:00:00 2001 From: Kushagra Thapar Date: Wed, 2 Sep 2020 12:29:44 -0700 Subject: [PATCH 056/168] Fixed netty leak on DELETE operations in GATEWAY mode (#14727) --- .../cosmos/implementation/RxGatewayStoreModel.java | 14 +++----------- .../directconnectivity/ErrorUtils.java | 6 +----- .../directconnectivity/ResponseUtils.java | 11 ++--------- .../implementation/http/ReactorNettyClient.java | 6 +----- 4 files changed, 7 insertions(+), 30 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index c41395e57dbcc..f67f567176484 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -246,17 +246,9 @@ private Mono toDocumentServiceResponse(Mono contentObservable; - - if (request.getOperationType() == OperationType.Delete) { - // for delete we don't expect any body - contentObservable = Mono.just(EMPTY_BYTE_ARRAY); - } else { - // transforms the ByteBufFlux to Flux - contentObservable = httpResponse - .bodyAsByteArray() - .switchIfEmpty(Mono.just(EMPTY_BYTE_ARRAY)); - } + Mono contentObservable = httpResponse + .bodyAsByteArray() + .switchIfEmpty(Mono.just(EMPTY_BYTE_ARRAY)); return contentObservable .map(content -> { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ErrorUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ErrorUtils.java index 493a885e65f82..5c718d67c02b5 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ErrorUtils.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ErrorUtils.java @@ -17,11 +17,7 @@ public class ErrorUtils { private static final Logger logger = LoggerFactory.getLogger(ErrorUtils.class); static Mono getErrorResponseAsync(HttpResponse responseMessage, HttpRequest request) { - Mono responseAsString = responseMessage.bodyAsString().switchIfEmpty(Mono.just(StringUtils.EMPTY)); - if (request.httpMethod() == HttpMethod.DELETE) { - return Mono.just(StringUtils.EMPTY); - } - return responseAsString; + return responseMessage.bodyAsString().switchIfEmpty(Mono.just(StringUtils.EMPTY)); } static void logGoneException(URI physicalAddress, String activityId) { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ResponseUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ResponseUtils.java index 91b98158838fd..645a4f2c97984 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ResponseUtils.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ResponseUtils.java @@ -10,20 +10,13 @@ import reactor.core.publisher.Mono; class ResponseUtils { - private static byte[] EMPTY_BYTE_ARRAY = {}; + private static final byte[] EMPTY_BYTE_ARRAY = {}; static Mono toStoreResponse(HttpResponse httpClientResponse, HttpRequest httpRequest) { HttpHeaders httpResponseHeaders = httpClientResponse.headers(); - Mono contentObservable; - - if (httpRequest.httpMethod() == HttpMethod.DELETE) { - // for delete we don't expect any body - contentObservable = Mono.just(EMPTY_BYTE_ARRAY); - } else { - contentObservable = httpClientResponse.bodyAsByteArray().switchIfEmpty(Mono.just(EMPTY_BYTE_ARRAY)); - } + Mono contentObservable = httpClientResponse.bodyAsByteArray().switchIfEmpty(Mono.just(EMPTY_BYTE_ARRAY)); return contentObservable.map(byteArrayContent -> { // transforms to Mono diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java index 54dbf84da1d5c..ba46e804ff679 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java @@ -197,11 +197,7 @@ public HttpHeaders headers() { @Override public Flux body() { return bodyIntern() - .doOnSubscribe(this::updateSubscriptionState) - .map(byteBuf -> { - byteBuf.retain(); - return byteBuf; - }); + .doOnSubscribe(this::updateSubscriptionState); } @Override From ab7e1fff4e6d8fff9f9043135853cbcec507af6a Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Wed, 2 Sep 2020 12:51:45 -0700 Subject: [PATCH 057/168] Add ADT test assets and helper class to read them (#14741) --- .../digitaltwins/core/TestAssetDefaults.java | 31 +++ .../digitaltwins/core/TestAssetsHelper.java | 201 ++++++++++++++++++ .../test-assets/BuildingModelPayload.json | 24 +++ .../test-assets/FloorModelPayload.json | 31 +++ .../test-assets/FloorTwinPayload.json | 6 + .../test-assets/HvacModelPayload.json | 29 +++ .../test-assets/HvacTwinPayload.json | 7 + .../test-assets/RelationshipPayload.json | 4 + .../RelationshipWithPropertyPayload.json | 5 + .../test-assets/RoomModelPayload.json | 34 +++ .../test-assets/RoomTwinPayload.json | 9 + .../test-assets/RoomWithWifiModelPayload.json | 33 +++ .../test-assets/RoomWithWifiTwinPayload.json | 15 ++ .../test-assets/WardModelPayload.json | 23 ++ .../test-assets/WifiModelPayload.json | 18 ++ 15 files changed, 470 insertions(+) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetDefaults.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/BuildingModelPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorModelPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorTwinPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacModelPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacTwinPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RelationshipPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RelationshipWithPropertyPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomModelPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomTwinPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiModelPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiTwinPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WardModelPayload.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WifiModelPayload.json diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetDefaults.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetDefaults.java new file mode 100644 index 0000000000000..2f770d978dbab --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetDefaults.java @@ -0,0 +1,31 @@ +package com.azure.digitaltwins.core; + +public class TestAssetDefaults { + public static final String FloorTwinIdPrefix = "floorTwin"; + + public static final String RoomTwinIdPrefix = "roomTwin"; + + public static final String HvacTwinIdPrefix = "hvacTwin"; + + public static final String RoomWithWifiTwinIdPrefix = "roomWithWifiTwin"; + + public static final String WifiModelIdPrefix = "dtmi:example:wifi;1"; + + public static final String RoomModelIdPrefix = "dtmi:example:room;1"; + + public static final String FloorModelIdPrefix = "dtmi:example:floor;1"; + + public static final String HvacModelIdPrefix = "dtmi:example:hvac;1"; + + public static final String RoomWithWifiModelIdPrefix = "dtmi:example:wifiroom;1"; + + public static final String FloorModelId = "dtmi:example:Floor;1"; + + public static final String RoomModelId = "dtmi:example:Room;1"; + + public static final String HvacModelId = "dtmi:example:Hvac;1"; + + public static final String BuildingModelId = "dtmi:example:Building;1"; + + public static final String WardModelId = "dtmi:example:Ward;1"; +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java new file mode 100644 index 0000000000000..00071081d4795 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java @@ -0,0 +1,201 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.HttpResponse; +import com.azure.core.util.Context; +import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; +import com.azure.digitaltwins.core.util.UpdateOperationUtility; +import org.opentest4j.AssertionFailedError; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; +import java.util.Random; +import java.util.Scanner; +import java.util.function.Consumer; +import java.util.function.Function; + +public class TestAssetsHelper { + protected static int MaxTries = 10; + protected static int MaxIdLength = 27; + + // Remove all new line characters as they are different in different Operaing Systems. + // This will ensure that the recorded files always match the request in playback mode of tests. + private static String RemoveNewLines(String payload) + { + return payload.replace(System.lineSeparator(), ""); + } + + public static String GetFloorModelPayload(String floorModelId, String roomModelId, String hvacModelId) + { + return RemoveNewLines(readResourceFile("FloorModelPayload") + .replace("FLOOR_MODEL_ID", floorModelId) + .replace("ROOM_MODEL_ID", roomModelId) + .replace("HVAC_MODEL_ID", hvacModelId)); + } + + public static String GetRoomModelPayload(String roomModelId, String floorModelId) + { + return RemoveNewLines(readResourceFile("RoomModelPayload") + .replace("ROOM_MODEL_ID", roomModelId) + .replace("FLOOR_MODEL_ID", floorModelId)); + } + + public static String GetHvacModelPayload(String hvacModelId, String floorModelId) + { + return RemoveNewLines(readResourceFile("HvacModelPayload") + .replace("HVAC_MODEL_ID", hvacModelId) + .replace("FLOOR_MODEL_ID", floorModelId)); + } + + public static String GetBuildingModelPayload(String buildingModelId, String hvacModelId, String floorModelId) + { + return RemoveNewLines(readResourceFile("BuildingModelPayload") + .replace("BUILDING_MODEL_ID", buildingModelId) + .replace("HVAC_MODEL_ID", hvacModelId) + .replace("FLOOR_MODEL_ID", floorModelId)); + } + + public static String GetWardModelPayload(String wardModelId) + { + return RemoveNewLines(readResourceFile("WardModelPayload") + .replace("WARD_MODEL_ID", wardModelId)); + } + + public static List GetRoomTwinUpdatePayload() + { + UpdateOperationUtility uou = new UpdateOperationUtility(); + uou.appendAddOperation("/Humidity", 30); + uou.appendReplaceOperation("/Temperature", 70); + uou.appendRemoveOperation("/EmployeeId"); + return uou.getUpdateOperations(); + } + + public static List GetWifiComponentUpdatePayload() + { + UpdateOperationUtility uou = new UpdateOperationUtility(); + uou.appendReplaceOperation("/Network", "New Network"); + return uou.getUpdateOperations(); + } + + public static String GetFloorTwinPayload(String floorModelId) + { + return RemoveNewLines(readResourceFile("FloorTwinPayload") + .replace("FLOOR_MODEL_ID", floorModelId)); + } + + public static String GetRoomTwinPayload(String roomModelId) + { + return RemoveNewLines(readResourceFile("RoomTwinPayload") + .replace("ROOM_MODEL_ID", roomModelId)); + } + + public static String GetRelationshipPayload(String targetTwinId, String relationshipName) + { + return RemoveNewLines(readResourceFile("RelationshipPayload") + .replace("TARGET_TWIN_ID", targetTwinId) + .replace("RELATIONSHIP_NAME", relationshipName)); + } + + public static String GetRelationshipWithPropertyPayload(String targetTwinId, String relationshipName, String propertyName, boolean propertyValue) + { + return RemoveNewLines(readResourceFile("RelationshipWithPropertyPayload") + .replace("TARGET_TWIN_ID", targetTwinId) + .replace("RELATIONSHIP_NAME", relationshipName) + .replace("PROPERTY_NAME", propertyName) + .replace("\"PROPERTY_VALUE\"", String.valueOf(propertyValue).toLowerCase())); + } + + public static List GetRelationshipUpdatePayload(String propertyName, boolean propertyValue) + { + UpdateOperationUtility uou = new UpdateOperationUtility(); + uou.appendReplaceOperation(propertyName, propertyValue); + return uou.getUpdateOperations(); + } + + public static String GetWifiModelPayload(String wifiModelId) + { + return RemoveNewLines(readResourceFile("WifiModelPayload") + .replace("WIFI_MODEL_ID", wifiModelId)); + } + + public static String GetRoomWithWifiModelPayload(String roomWithWifiModelId, String wifiModelId, String wifiComponentName) + { + return RemoveNewLines(readResourceFile("RoomWithWifiModelPayload") + .replace("ROOM_WITH_WIFI_MODEL_ID", roomWithWifiModelId) + .replace("WIFI_MODEL_ID", wifiModelId) + .replace("WIFI_COMPONENT_NAME", wifiComponentName)); + } + + public static String GetRoomWithWifiTwinPayload(String roomWithWifiModelId, String wifiComponentName) + { + return RemoveNewLines(readResourceFile("RoomWithWifiTwinPayload") + .replace("ROOM_WITH_WIFI_MODEL_ID", roomWithWifiModelId) + .replace("WIFI_COMPONENT_NAME", wifiComponentName)); + } + + public static String GetHvacTwinPayload(String hvacModelId) + { + return RemoveNewLines(readResourceFile("HvacTwinPayload") + .replace("HVAC_MODEL_ID", hvacModelId)); + } + + // This method assumes that the file name is a json file under the test-assets folder within the resources directory + public static String readResourceFile(String fileName) + { + String resourceFileContents = ""; + try (InputStream inputStream = TestAssetsHelper.class.getResourceAsStream("/test-assets/" + fileName + ".json")) { + Scanner s = new Scanner(inputStream); + while (s.hasNext()) { + resourceFileContents += s.next(); + } + + return resourceFileContents; + } catch (IOException e) { + throw new RuntimeException("Cannot find file " + fileName, e); + } + } + + public static String GetUniqueModelId(DigitalTwinsClient dtClient, String baseName) + { + return GetUniqueModelId(baseName, (id) -> dtClient.getModel(id)); + } + + public static String GetUniqueDigitalTwinId(DigitalTwinsClient dtClient, String baseName) + { + return GetUniqueModelId(baseName, (id) -> dtClient.getDigitalTwin(id)); + } + + public static String GetUniqueModelId(DigitalTwinsAsyncClient dtClient, String baseName) + { + return GetUniqueModelId(baseName, (id) -> dtClient.getModel(id).block()); + } + + public static String GetUniqueDigitalTwinId(DigitalTwinsAsyncClient dtClient, String baseName) + { + return GetUniqueModelId(baseName, (id) -> dtClient.getDigitalTwin(id).block()); + } + + private static String GetUniqueModelId(String baseName, Consumer getMethod) + { + String id; + Random random = new Random(); + for (int i = 0; i < MaxTries; ++i) + { + id = baseName + random.nextInt(); + id = id.length() > MaxIdLength ? id.substring(0, MaxIdLength) : id; + try + { + getMethod.accept(id); + } + catch (ErrorResponseException e) + { + if (e.getResponse().getStatusCode() == 404) + { + return id; + } + } + } + + throw new AssertionFailedError("Unique Id could not be found with base " + baseName); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/BuildingModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/BuildingModelPayload.json new file mode 100644 index 0000000000000..838d8435acc24 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/BuildingModelPayload.json @@ -0,0 +1,24 @@ +{ + "@id": "BUILDING_MODEL_ID", + "@type": "Interface", + "displayName": "Building", + "description": "A free-standing structure.", + "contents": [ + { + "@type": "Relationship", + "name": "has", + "target": "FLOOR_MODEL_ID" + }, + { + "@type": "Relationship", + "name": "isEquippedWith", + "target": "HVAC_MODEL_ID" + }, + { + "@type": "Property", + "name": "AverageTemperature", + "schema": "double" + } + ], + "@context": "dtmi:dtdl:context;2" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorModelPayload.json new file mode 100644 index 0000000000000..176ed5e64ea40 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorModelPayload.json @@ -0,0 +1,31 @@ +{ + "@id": "FLOOR_MODEL_ID", + "@type": "Interface", + "@context": "dtmi:dtdl:context;2", + "displayName": "Floor", + "description": "A building story.", + "contents": [ + { + "@type": "Relationship", + "name": "contains", + "target": "ROOM_MODEL_ID", + "properties": [ + { + "@type": "Property", + "name": "isAccessRestricted", + "schema": "boolean" + } + ] + }, + { + "@type": "Relationship", + "name": "cooledBy", + "target": "HVAC_MODEL_ID" + }, + { + "@type": "Property", + "name": "AverageTemperature", + "schema": "double" + } + ] +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorTwinPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorTwinPayload.json new file mode 100644 index 0000000000000..a5357cef6a0fa --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorTwinPayload.json @@ -0,0 +1,6 @@ +{ + "$metadata": { + "$model": "FLOOR_MODEL_ID" + }, + "AverageTemperature": 75 +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacModelPayload.json new file mode 100644 index 0000000000000..ab89d13888f9a --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacModelPayload.json @@ -0,0 +1,29 @@ +{ + "@id": "HVAC_MODEL_ID", + "@type": "Interface", + "displayName": "HVAC", + "description": "A heating, ventilation, and air conditioning unit.", + "contents": [ + { + "@type": "Property", + "name": "Efficiency", + "schema": "double" + }, + { + "@type": "Property", + "name": "TargetTemperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "TargetHumidity", + "schema": "double" + }, + { + "@type": "Relationship", + "name": "cools", + "target": "FLOOR_MODEL_ID" + } + ], + "@context": "dtmi:dtdl:context;2" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacTwinPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacTwinPayload.json new file mode 100644 index 0000000000000..333859d152da1 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacTwinPayload.json @@ -0,0 +1,7 @@ +{ + "$metadata": { + "$model": "HVAC_MODEL_ID" + }, + "TargetTemperature": 80, + "TargetHumidity": 25 +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RelationshipPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RelationshipPayload.json new file mode 100644 index 0000000000000..e12c7be989956 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RelationshipPayload.json @@ -0,0 +1,4 @@ +{ + "$targetId": "TARGET_TWIN_ID", + "$relationshipName": "RELATIONSHIP_NAME" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RelationshipWithPropertyPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RelationshipWithPropertyPayload.json new file mode 100644 index 0000000000000..48b3b68b74003 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RelationshipWithPropertyPayload.json @@ -0,0 +1,5 @@ +{ + "$targetId": "TARGET_TWIN_ID", + "$relationshipName": "RELATIONSHIP_NAME", + "PROPERTY_NAME": "PROPERTY_VALUE" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomModelPayload.json new file mode 100644 index 0000000000000..b10638e4232f2 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomModelPayload.json @@ -0,0 +1,34 @@ +{ + "@id": "ROOM_MODEL_ID", + "@type": "Interface", + "displayName": "Room", + "description": "An enclosure inside a building.", + "contents": [ + { + "@type": "Relationship", + "name": "containedIn", + "target": "FLOOR_MODEL_ID" + }, + { + "@type": "Property", + "name": "Temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "Humidity", + "schema": "double" + }, + { + "@type": "Property", + "name": "IsOccupied", + "schema": "boolean" + }, + { + "@type": "Property", + "name": "EmployeeId", + "schema": "string" + } + ], + "@context": "dtmi:dtdl:context;2" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomTwinPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomTwinPayload.json new file mode 100644 index 0000000000000..d0442d4fd3681 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomTwinPayload.json @@ -0,0 +1,9 @@ +{ + "$metadata": { + "$model": "ROOM_MODEL_ID" + }, + "Temperature": 80, + "Humidity": 25, + "IsOccupied": true, + "EmployeeId": "Employee1" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiModelPayload.json new file mode 100644 index 0000000000000..2741751368f55 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiModelPayload.json @@ -0,0 +1,33 @@ +{ + "@id": "ROOM_WITH_WIFI_MODEL_ID", + "@type": "Interface", + "displayName": "RoomWithWifi", + "contents": [ + { + "@type": "Property", + "name": "Temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "Humidity", + "schema": "double" + }, + { + "@type": "Property", + "name": "IsOccupied", + "schema": "boolean" + }, + { + "@type": "Property", + "name": "EmployeeId", + "schema": "string" + }, + { + "@type": "Component", + "name": "WIFI_COMPONENT_NAME", + "schema": "WIFI_MODEL_ID" + } + ], + "@context": "dtmi:dtdl:context;2" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiTwinPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiTwinPayload.json new file mode 100644 index 0000000000000..de7bac85f2a52 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiTwinPayload.json @@ -0,0 +1,15 @@ +{ + "$metadata": { + "$model": "ROOM_WITH_WIFI_MODEL_ID" + }, + "Temperature": 80, + "Humidity": 25, + "IsOccupied": true, + "EmployeeId": "Employee1", + "WIFI_COMPONENT_NAME": { + "$metadata": { + }, + "RouterName": "Cisco1", + "Network": "Room1" + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WardModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WardModelPayload.json new file mode 100644 index 0000000000000..12e223e17d4eb --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WardModelPayload.json @@ -0,0 +1,23 @@ +{ + "@id": "WARD_MODEL_ID", + "@type": "Interface", + "displayName": "Ward", + "description": "A separate partition in a building, made of rooms and hallways.", + "contents": [ + { + "@type": "Property", + "name": "VisitorCount", + "schema": "double" + }, + { + "@type": "Property", + "name": "HandWashPercentage", + "schema": "double" + }, + { + "@type": "Relationship", + "name": "managedRooms" + } + ], + "@context": "dtmi:dtdl:context;2" +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WifiModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WifiModelPayload.json new file mode 100644 index 0000000000000..3d006e6c660d6 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WifiModelPayload.json @@ -0,0 +1,18 @@ +{ + "@id": "WIFI_MODEL_ID", + "@type": "Interface", + "@context": "dtmi:dtdl:context;2", + "displayName": "Wifi", + "contents": [ + { + "@type": "Property", + "name": "RouterName", + "schema": "string" + }, + { + "@type": "Property", + "name": "Network", + "schema": "string" + } + ] +} From 9b68a4619c42a9265a35f8aaa9eac0cc70208d15 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Wed, 2 Sep 2020 13:53:49 -0700 Subject: [PATCH 058/168] [TA] Add redactedText to PiiEntityCollection (#14719) * add redactedText to PiiEntityCollection --- .../azure-ai-textanalytics/pom.xml | 2 +- .../RecognizePiiEntityAsyncClient.java | 4 +++- .../models/PiiEntityCollection.java | 18 ++++++++++++++++-- .../com/azure/ai/textanalytics/TestUtils.java | 6 ++++-- .../TextAnalyticsClientTestBase.java | 11 ++++++++--- 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index faa4591103fd1..a9e80a847cfaf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/pom.xml +++ b/sdk/textanalytics/azure-ai-textanalytics/pom.xml @@ -116,7 +116,7 @@ --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED --add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics=ALL-UNNAMED - --add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics.implementation.models=com.azure.core + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java index 59b8fd14caecd..44985c455f614 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java @@ -82,6 +82,7 @@ Mono recognizePiiEntities(String document, String language) throw logger.logExceptionAsError(toTextAnalyticsException(entitiesResult.getError())); } entityCollection = new PiiEntityCollection(entitiesResult.getEntities(), + entitiesResult.getEntities().getRedactedText(), entitiesResult.getEntities().getWarnings()); } return entityCollection; @@ -161,7 +162,8 @@ private Response toRecognizePiiEntitiesRes documentEntities.getStatistics() == null ? null : toTextDocumentStatistics(documentEntities.getStatistics()), null, - new PiiEntityCollection(new IterableStream<>(piiEntities), new IterableStream<>(warnings)) + new PiiEntityCollection(new IterableStream<>(piiEntities), documentEntities.getRedactedText(), + new IterableStream<>(warnings)) )); }); // Document errors diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntityCollection.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntityCollection.java index cc9807ab0404c..e0161ac10805e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntityCollection.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntityCollection.java @@ -11,17 +11,20 @@ */ @Immutable public final class PiiEntityCollection extends IterableStream { - + private final String redactedText; private final IterableStream warnings; /** * Creates a {@link PiiEntityCollection} model that describes a entities collection including warnings. * * @param entities An {@link IterableStream} of {@link PiiEntity Personally Identifiable Information entities}. + * @param redactedText The text of the input document with all of the PII information redacted out. * @param warnings An {@link IterableStream} of {@link TextAnalyticsWarning warnings}. */ - public PiiEntityCollection(IterableStream entities, IterableStream warnings) { + public PiiEntityCollection(IterableStream entities, String redactedText, + IterableStream warnings) { super(entities); + this.redactedText = redactedText; this.warnings = warnings; } @@ -33,4 +36,15 @@ public PiiEntityCollection(IterableStream entities, IterableStream getWarnings() { return this.warnings; } + + + /** + * Get the property redactedText value. The text of the input document with all of the PII information redacted out. + * Only returned for API version v3.1-preview.2 and up. + * + * @return The text of the input document with all of the PII information redacted out. + */ + public String getRedactedText() { + return redactedText; + } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java index fdb82da76b261..b8e29a80eea22 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java @@ -229,8 +229,10 @@ static RecognizeEntitiesResult getExpectedBatchCategorizedEntities2() { * Helper method to get the expected batch of Personally Identifiable Information entities */ static RecognizePiiEntitiesResultCollection getExpectedBatchPiiEntities() { - PiiEntityCollection piiEntityCollection = new PiiEntityCollection(new IterableStream<>(getPiiEntitiesList1()), null); - PiiEntityCollection piiEntityCollection2 = new PiiEntityCollection(new IterableStream<>(getPiiEntitiesList2()), null); + PiiEntityCollection piiEntityCollection = new PiiEntityCollection(new IterableStream<>(getPiiEntitiesList1()), + "********* employee with ssn *********** is using our awesome API's.", null); + PiiEntityCollection piiEntityCollection2 = new PiiEntityCollection(new IterableStream<>(getPiiEntitiesList2()), + "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", null); TextDocumentStatistics textDocumentStatistics1 = new TextDocumentStatistics(67, 1); TextDocumentStatistics textDocumentStatistics2 = new TextDocumentStatistics(105, 1); RecognizePiiEntitiesResult recognizeEntitiesResult1 = new RecognizePiiEntitiesResult("0", textDocumentStatistics1, null, piiEntityCollection); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java index 3c794caa70f1c..1fbce528a06c9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java @@ -14,6 +14,7 @@ import com.azure.ai.textanalytics.models.MinedOpinion; import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.PiiEntity; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsError; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; @@ -606,10 +607,14 @@ static void validatePiiEntitiesResultCollectionWithResponse(boolean showStatisti static void validatePiiEntitiesResultCollection(boolean showStatistics, RecognizePiiEntitiesResultCollection expected, RecognizePiiEntitiesResultCollection actual) { - validateTextAnalyticsResult(showStatistics, expected, actual, (expectedItem, actualItem) -> + validateTextAnalyticsResult(showStatistics, expected, actual, (expectedItem, actualItem) -> { + final PiiEntityCollection expectedPiiEntityCollection = expectedItem.getEntities(); + final PiiEntityCollection actualPiiEntityCollection = actualItem.getEntities(); + assertEquals(expectedPiiEntityCollection.getRedactedText(), actualPiiEntityCollection.getRedactedText()); validatePiiEntities( - expectedItem.getEntities().stream().collect(Collectors.toList()), - actualItem.getEntities().stream().collect(Collectors.toList()))); + expectedPiiEntityCollection.stream().collect(Collectors.toList()), + actualPiiEntityCollection.stream().collect(Collectors.toList())); + }); } static void validateLinkedEntitiesResultCollectionWithResponse(boolean showStatistics, From 6d87858220e6dda468c3c9697e082769f02b2db5 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Wed, 2 Sep 2020 14:01:03 -0700 Subject: [PATCH 059/168] add bingEntitySearchApiId property (#14721) --- .../azure-ai-textanalytics/CHANGELOG.md | 3 ++ .../RecognizeLinkedEntityAsyncClient.java | 2 +- .../ai/textanalytics/models/LinkedEntity.java | 43 +++++++++++++++++++ .../com/azure/ai/textanalytics/TestUtils.java | 4 +- .../TextAnalyticsClientTestBase.java | 1 + 5 files changed, 50 insertions(+), 3 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index c99b0c5bddbe4..ab151dbb6be69 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -11,6 +11,9 @@ - Added support for the Opinion Mining feature. To use this feature, you need to make sure you are using the service's v3.1-preview.1 and above API. To get this support pass `includeOpinionMining` as `true` in `AnalyzeSentimentOptions` when calling the sentiment analysis endpoints. +- Add property `bingEntitySearchApiId` to the `LinkedEntity` class. This property is only available for v3.1-preview.2 +and up, and it is to be used in conjunction with the Bing Entity Search API to fetch additional relevant information +about the returned entity. ## 5.0.0 (2020-07-27) - Re-release of version `1.0.1` with updated version `5.0.0`. diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java index 34a186c21bb79..3e2833f3875d5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java @@ -181,7 +181,7 @@ private IterableStream mapLinkedEntity( match.getText(), match.getConfidenceScore(), match.getOffset(), match.getLength())) .collect(Collectors.toList())), linkedEntity.getLanguage(), - linkedEntity.getId(), linkedEntity.getUrl(), linkedEntity.getDataSource())); + linkedEntity.getId(), linkedEntity.getUrl(), linkedEntity.getDataSource(), linkedEntity.getBingId())); } return new IterableStream<>(linkedEntitiesList); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/LinkedEntity.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/LinkedEntity.java index de01b414b9222..fb8595e635b8b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/LinkedEntity.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/LinkedEntity.java @@ -41,6 +41,13 @@ public final class LinkedEntity { */ private final String dataSource; + /* + * Bing Entity Search unique identifier of the recognized entity. Use in conjunction with + * the Bing Entity Search API to fetch additional relevant information. Only available for API version + * v3.1-preview.2 and up. + */ + private final String bingEntitySearchApiId; + /** * Creates a {@link LinkedEntity} model that describes linked entity. * @@ -59,6 +66,31 @@ public LinkedEntity(String name, IterableStream matches, Stri this.dataSourceEntityId = dataSourceEntityId; this.url = url; this.dataSource = dataSource; + this.bingEntitySearchApiId = null; + } + + /** + * Creates a {@link LinkedEntity} model that describes linked entity. + * + * @param name The entity Linking formal name. + * @param matches A list of instances this entity appears in the text. + * @param language The language used in the data source. + * @param dataSourceEntityId Unique identifier of the recognized entity from the data source. + * @param url URL for the entity's page from the data source. + * @param dataSource The data source used to extract entity linking, such as Wiki/Bing etc. + * @param bingEntitySearchApiId Bing Entity Search unique identifier of the recognized entity. Use in conjunction + * with the Bing Entity Search SDK to fetch additional relevant information. Only available for API version + * v3.1-preview.2 and up. + */ + public LinkedEntity(String name, IterableStream matches, String language, + String dataSourceEntityId, String url, String dataSource, String bingEntitySearchApiId) { + this.name = name; + this.matches = matches; + this.language = language; + this.dataSourceEntityId = dataSourceEntityId; + this.url = url; + this.dataSource = dataSource; + this.bingEntitySearchApiId = bingEntitySearchApiId; } /** @@ -114,4 +146,15 @@ public String getUrl() { public String getDataSource() { return this.dataSource; } + + /** + * Get the bingEntitySearchApiId property: Bing Entity Search unique identifier of the recognized entity. + * Use in conjunction with the Bing Entity Search SDK to fetch additional relevant information. Only available + * for API version v3.1-preview.2 and up. + * + * @return The bingEntitySearchApiId value. + */ + public String getBingEntitySearchApiId() { + return this.bingEntitySearchApiId; + } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java index b8e29a80eea22..7701df57d9452 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java @@ -289,7 +289,7 @@ static List getLinkedEntitiesList1() { LinkedEntity linkedEntity = new LinkedEntity( "Seattle", new IterableStream<>(Collections.singletonList(linkedEntityMatch)), "en", "Seattle", "https://en.wikipedia.org/wiki/Seattle", - "Wikipedia"); + "Wikipedia", "5fbba6b8-85e1-4d41-9444-d9055436e473"); return asList(linkedEntity); } @@ -301,7 +301,7 @@ static List getLinkedEntitiesList2() { LinkedEntity linkedEntity = new LinkedEntity( "Microsoft", new IterableStream<>(Collections.singletonList(linkedEntityMatch)), "en", "Microsoft", "https://en.wikipedia.org/wiki/Microsoft", - "Wikipedia"); + "Wikipedia", "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85"); return asList(linkedEntity); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java index 1fbce528a06c9..6ce880cee7e83 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java @@ -719,6 +719,7 @@ static void validateLinkedEntity(LinkedEntity expectedLinkedEntity, LinkedEntity assertEquals(expectedLinkedEntity.getLanguage(), actualLinkedEntity.getLanguage()); assertEquals(expectedLinkedEntity.getUrl(), actualLinkedEntity.getUrl()); assertEquals(expectedLinkedEntity.getDataSourceEntityId(), actualLinkedEntity.getDataSourceEntityId()); + assertEquals(expectedLinkedEntity.getBingEntitySearchApiId(), actualLinkedEntity.getBingEntitySearchApiId()); validateLinkedEntityMatches(expectedLinkedEntity.getMatches().stream().collect(Collectors.toList()), actualLinkedEntity.getMatches().stream().collect(Collectors.toList())); } From b68dd3d1bac46965f59de9fdeb2d416826addf9c Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Wed, 2 Sep 2020 14:46:00 -0700 Subject: [PATCH 060/168] Convert ModelData.model to String (#14702) --- .../azure-digitaltwins-core/autorest.md | 4 +- .../core/DigitalTwinsAsyncClient.java | 67 +++++-- .../implementation/DigitalTwinModelsImpl.java | 2 +- .../converters/ModelDataConverter.java | 38 ++++ .../core/implementation/models/ModelData.java | 179 ++++++++++++++++++ .../models/PagedModelDataCollection.java | 1 - .../digitaltwins/core/models/ModelData.java | 18 +- .../core/models/package-info.java | 9 - .../core/util/ListModelOptions.java | 3 +- .../azure/digitaltwins/core/SampleTest.java | 9 +- .../resources/session-records/ListTest.json | 10 +- 11 files changed, 296 insertions(+), 44 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/converters/ModelDataConverter.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ModelData.java delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/package-info.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md index a226a86c43e7a..0d8d75b508f07 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md @@ -36,7 +36,7 @@ java: generate-client-as-impl: true implementation-subpackage: implementation models-subpackage: implementation.models - custom-types-subpackage: models - custom-types: ModelData context-client-method-parameter: true + custom-types-subpackage: models + #custom-types: ``` diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 8266fdaca32c1..96a567046f1bb 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -13,11 +13,11 @@ import com.azure.core.util.serializer.JacksonAdapter; import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImpl; import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImplBuilder; +import com.azure.digitaltwins.core.implementation.converters.ModelDataConverter; import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; import com.azure.digitaltwins.core.implementation.models.IncomingRelationship; import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; import com.azure.digitaltwins.core.models.ModelData; -import com.azure.digitaltwins.core.implementation.models.DigitalTwinsGetComponentResponse; import com.azure.digitaltwins.core.util.DigitalTwinsResponse; import com.azure.digitaltwins.core.util.DigitalTwinsResponseHeaders; import com.azure.digitaltwins.core.util.ListModelOptions; @@ -53,7 +53,7 @@ public final class DigitalTwinsAsyncClient { private static final ObjectMapper mapper = new ObjectMapper(); private final DigitalTwinsServiceVersion serviceVersion; private final AzureDigitalTwinsAPIImpl protocolLayer; - private static final Boolean includeModelDefinition = true; + private static final Boolean includeModelDefinitionOnGet = true; DigitalTwinsAsyncClient(HttpPipeline pipeline, DigitalTwinsServiceVersion serviceVersion, String host) { final SimpleModule stringModule = new SimpleModule("String Serializer"); @@ -777,13 +777,20 @@ Mono> createModelsSinglePageAsync(List models, return protocolLayer.getDigitalTwinModels().addWithResponseAsync(modelsPayload, context) .map( - listResponse -> new PagedResponseBase<>( - listResponse.getRequest(), - listResponse.getStatusCode(), - listResponse.getHeaders(), - listResponse.getValue(), - null, - ((ResponseBase)listResponse).getDeserializedHeaders())); + objectPagedResponse -> { + List convertedList = objectPagedResponse.getValue().stream() + .map(ModelDataConverter::map) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + return new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + convertedList, + null, + ((PagedResponseBase) objectPagedResponse).getDeserializedHeaders()); + } + ); } /** @@ -810,7 +817,15 @@ public Mono> getModelWithResponse(String modelId) { Mono> getModelWithResponse(String modelId, Context context){ return protocolLayer .getDigitalTwinModels() - .getByIdWithResponseAsync(modelId, includeModelDefinition, context); + .getByIdWithResponseAsync(modelId, includeModelDefinitionOnGet, context) + .map(response -> { + com.azure.digitaltwins.core.implementation.models.ModelData modelData = response.getValue(); + return new SimpleResponse<>( + response.getRequest(), + response.getStatusCode(), + response.getHeaders(), + ModelDataConverter.map(modelData)); + }); } /** @@ -851,11 +866,39 @@ Mono> listModelsSinglePageAsync(ListModelOptions listMo listModelOptions.getDependenciesFor(), listModelOptions.getIncludeModelDefinition(), new DigitalTwinModelsListOptions().setMaxItemCount(listModelOptions.getMaxItemCount()), - context); + context) + .map( + objectPagedResponse -> { + List convertedList = objectPagedResponse.getValue().stream() + .map(ModelDataConverter::map) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + return new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + convertedList, + null, + ((PagedResponseBase) objectPagedResponse).getDeserializedHeaders()); + } + ); } Mono> listModelsNextSinglePageAsync(String nextLink, Context context){ - return protocolLayer.getDigitalTwinModels().listNextSinglePageAsync(nextLink, context); + return protocolLayer.getDigitalTwinModels().listNextSinglePageAsync(nextLink, context) + .map(objectPagedResponse -> { + List convertedList = objectPagedResponse.getValue().stream() + .map(ModelDataConverter::map) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + return new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + convertedList, + objectPagedResponse.getContinuationToken(), + ((PagedResponseBase)objectPagedResponse).getDeserializedHeaders()); + }); } /** diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java index a4d53782a13c9..a7823d8fbb1c2 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java @@ -28,8 +28,8 @@ import com.azure.core.util.serializer.JacksonAdapter; import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; +import com.azure.digitaltwins.core.implementation.models.ModelData; import com.azure.digitaltwins.core.implementation.models.PagedModelDataCollection; -import com.azure.digitaltwins.core.models.ModelData; import java.util.List; import reactor.core.publisher.Mono; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/converters/ModelDataConverter.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/converters/ModelDataConverter.java new file mode 100644 index 0000000000000..3f9d9708cf99d --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/converters/ModelDataConverter.java @@ -0,0 +1,38 @@ +package com.azure.digitaltwins.core.implementation.converters; + +import com.azure.digitaltwins.core.models.ModelData; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +/** + * A converter between {@link com.azure.digitaltwins.core.implementation.models.ModelData} and + * {@link ModelData}. + */ +public final class ModelDataConverter { + + /** + * Maps from {@link com.azure.digitaltwins.core.implementation.models.ModelData} to + * {@link ModelData}. + */ + public static ModelData map(com.azure.digitaltwins.core.implementation.models.ModelData input) { + String modelStringValue = null; + + if (input.getModel() != null){ + try { + modelStringValue = new ObjectMapper().writeValueAsString(input.getModel()); + } catch (JsonProcessingException e) { + throw new IllegalArgumentException("ModelData does not have a valid model definition.", e); + } + } + + return new ModelData() + .setId(input.getId()) + .setUploadTime(input.getUploadTime()) + .setDisplayName(input.getDisplayName()) + .setDescription(input.getDescription()) + .setDecommissioned(input.isDecommissioned()) + .setModel(modelStringValue); + } + + private ModelDataConverter() {} +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ModelData.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ModelData.java new file mode 100644 index 0000000000000..cf05f37543a13 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ModelData.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.digitaltwins.core.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** The ModelData model. */ +@Fluent +public final class ModelData { + /* + * A language map that contains the localized display names as specified in + * the model definition. + */ + @JsonProperty(value = "displayName") + private Map displayName; + + /* + * A language map that contains the localized descriptions as specified in + * the model definition. + */ + @JsonProperty(value = "description") + private Map description; + + /* + * The id of the model as specified in the model definition. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * The time the model was uploaded to the service. + */ + @JsonProperty(value = "uploadTime") + private OffsetDateTime uploadTime; + + /* + * Indicates if the model is decommissioned. Decommissioned models cannot + * be referenced by newly created digital twins. + */ + @JsonProperty(value = "decommissioned") + private Boolean decommissioned; + + /* + * The model definition. + */ + @JsonProperty(value = "model") + private Object model; + + /** + * Get the displayName property: A language map that contains the localized display names as specified in the model + * definition. + * + * @return the displayName value. + */ + public Map getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: A language map that contains the localized display names as specified in the model + * definition. + * + * @param displayName the displayName value to set. + * @return the ModelData object itself. + */ + public ModelData setDisplayName(Map displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the description property: A language map that contains the localized descriptions as specified in the model + * definition. + * + * @return the description value. + */ + public Map getDescription() { + return this.description; + } + + /** + * Set the description property: A language map that contains the localized descriptions as specified in the model + * definition. + * + * @param description the description value to set. + * @return the ModelData object itself. + */ + public ModelData setDescription(Map description) { + this.description = description; + return this; + } + + /** + * Get the id property: The id of the model as specified in the model definition. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the model as specified in the model definition. + * + * @param id the id value to set. + * @return the ModelData object itself. + */ + public ModelData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the uploadTime property: The time the model was uploaded to the service. + * + * @return the uploadTime value. + */ + public OffsetDateTime getUploadTime() { + return this.uploadTime; + } + + /** + * Set the uploadTime property: The time the model was uploaded to the service. + * + * @param uploadTime the uploadTime value to set. + * @return the ModelData object itself. + */ + public ModelData setUploadTime(OffsetDateTime uploadTime) { + this.uploadTime = uploadTime; + return this; + } + + /** + * Get the decommissioned property: Indicates if the model is decommissioned. Decommissioned models cannot be + * referenced by newly created digital twins. + * + * @return the decommissioned value. + */ + public Boolean isDecommissioned() { + return this.decommissioned; + } + + /** + * Set the decommissioned property: Indicates if the model is decommissioned. Decommissioned models cannot be + * referenced by newly created digital twins. + * + * @param decommissioned the decommissioned value to set. + * @return the ModelData object itself. + */ + public ModelData setDecommissioned(Boolean decommissioned) { + this.decommissioned = decommissioned; + return this; + } + + /** + * Get the model property: The model definition. + * + * @return the model value. + */ + public Object getModel() { + return this.model; + } + + /** + * Set the model property: The model definition. + * + * @param model the model value to set. + * @return the ModelData object itself. + */ + public ModelData setModel(Object model) { + this.model = model; + return this; + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/PagedModelDataCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/PagedModelDataCollection.java index 0cce8e934b353..bbbcf2947b469 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/PagedModelDataCollection.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/PagedModelDataCollection.java @@ -5,7 +5,6 @@ package com.azure.digitaltwins.core.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.digitaltwins.core.models.ModelData; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java index a74c158d41cb9..6eee937348ab6 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java @@ -1,17 +1,17 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - package com.azure.digitaltwins.core.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; + import java.time.OffsetDateTime; import java.util.Map; -/** The ModelData model. */ +/** + * The ModelData representing the model and its corresponding metadata. + */ @Fluent -public final class ModelData { +public class ModelData { + /* * A language map that contains the localized display names as specified in * the model definition. @@ -49,7 +49,7 @@ public final class ModelData { * The model definition. */ @JsonProperty(value = "model") - private Object model; + private String model; /** * Get the displayName property: A language map that contains the localized display names as specified in the model @@ -162,7 +162,7 @@ public ModelData setDecommissioned(Boolean decommissioned) { * * @return the model value. */ - public Object getModel() { + public String getModel() { return this.model; } @@ -172,7 +172,7 @@ public Object getModel() { * @param model the model value to set. * @return the ModelData object itself. */ - public ModelData setModel(Object model) { + public ModelData setModel(String model) { this.model = model; return this; } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/package-info.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/package-info.java deleted file mode 100644 index f096bfc00de16..0000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing classes for AzureDigitalTwinsAPI. A service for managing and querying digital twins and digital - * twin models. - */ -package com.azure.digitaltwins.core.models; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/ListModelOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/ListModelOptions.java index e63131a3e4330..2c4b6ba3da516 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/ListModelOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/ListModelOptions.java @@ -35,8 +35,9 @@ public ListModelOptions setMaxItemCount(Integer maxItemCount) { /* * Whether to include the model definition in the result. If false, only the model metadata will be returned. + * Disabled by default. */ - private Boolean includeModelDefinition; + private Boolean includeModelDefinition = false; /** * Get the includeModelDefinition property. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java index fdec1b94937a6..ee9b75d898076 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java @@ -1,7 +1,9 @@ package com.azure.digitaltwins.core; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; import com.azure.digitaltwins.core.models.ModelData; +import com.azure.digitaltwins.core.util.ListModelOptions; import org.junit.jupiter.api.Test; public class SampleTest extends DigitalTwinsTestBase { @@ -27,15 +29,14 @@ private DigitalTwinsClient setupClient(){ @Test public void ListTest(){ - PagedIterable models = client.listModels(); - - // Process using the Stream interface by iterating over each page + PagedIterable models = client.listModels(new ListModelOptions().setIncludeModelDefinition(true), Context.NONE); + models // You can also subscribe to pages by specifying the preferred page size or the associated continuation token to start the processing from. .streamByPage() .forEach(page -> { System.out.println("Response headers status code is " + page.getStatusCode()); - page.getValue().forEach(item -> System.out.println("Model retrieved: " + item.getId())); + page.getValue().forEach(item -> System.out.println("Model Id retrieved: " + item.getId() + "model definition: " + item.getModel())); }); } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json index 0fbc08187eead..54972e5a89172 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json @@ -1,18 +1,18 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2c291200-e7dc-4262-89bc-7b9d33e0cf08" + "x-ms-client-request-id" : "b705b0b3-9128-4aff-bdda-afc038f480d8" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", - "Content-Length" : "8404", + "Content-Length" : "26814", "StatusCode" : "200", - "Body" : "{\"value\":[{\"id\":\"dtmi:example:Ward;114653809\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:35:57.0043855+00:00\"},{\"id\":\"dtmi:example:Ward;111815882\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:35:57.3524717+00:00\"},{\"id\":\"dtmi:example:Ward;189947004\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:04.264631+00:00\"},{\"id\":\"dtmi:example:Ward;134000272\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:05.0983867+00:00\"},{\"id\":\"dtmi:example:Ward;192739528\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:11.4816322+00:00\"},{\"id\":\"dtmi:example:Ward;116332842\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:11.7749519+00:00\"},{\"id\":\"dtmi:example:Ward;116238422\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:29.4055305+00:00\"},{\"id\":\"dtmi:example:Ward;198163867\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:29.8807133+00:00\"},{\"id\":\"dtmi:example:Ward;121159740\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:51.8135839+00:00\"},{\"id\":\"dtmi:example:Ward;121200167\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:52.3203982+00:00\"},{\"id\":\"dtmi:example:Ward;112162783\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:08.6579838+00:00\"},{\"id\":\"dtmi:example:Ward;147373991\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:09.529767+00:00\"},{\"id\":\"dtmi:example:Ward;161147759\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:15.2200393+00:00\"},{\"id\":\"dtmi:example:Ward;120708472\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:15.2352591+00:00\"},{\"id\":\"dtmi:example:Ward;110887268\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:22.2311573+00:00\"},{\"id\":\"dtmi:example:Ward;118301577\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:22.3667165+00:00\"},{\"id\":\"dtmi:example:Ward;139439832\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:40:48.8947652+00:00\"},{\"id\":\"dtmi:example:Ward;111263086\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:40:54.0431308+00:00\"},{\"id\":\"dtmi:example:Ward;168646450\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:05.1032132+00:00\"},{\"id\":\"dtmi:example:Ward;115143769\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:06.4744458+00:00\"},{\"id\":\"dtmi:example:Ward;128072960\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:10.0981475+00:00\"},{\"id\":\"dtmi:example:Ward;110184439\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:10.1085481+00:00\"},{\"id\":\"dtmi:example:Ward;116847374\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:16.6955258+00:00\"},{\"id\":\"dtmi:example:Ward;155773321\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:17.7553908+00:00\"},{\"id\":\"dtmi:example:Ward;114761833\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:37.6566323+00:00\"},{\"id\":\"dtmi:example:Ward;120391613\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:48.012186+00:00\"},{\"id\":\"dtmi:example:Ward;159816443\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:53.8412956+00:00\"},{\"id\":\"dtmi:example:Ward;112440549\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:58.1808299+00:00\"},{\"id\":\"dtmi:example:Ward;186622131\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:01.9623456+00:00\"},{\"id\":\"dtmi:example:Ward;145075813\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:02.2606087+00:00\"},{\"id\":\"dtmi:example:Ward;145121366\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:09.2690772+00:00\"},{\"id\":\"dtmi:example:Ward;116421010\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:09.6711432+00:00\"},{\"id\":\"dtmi:example:wifiroom;14907\",\"description\":{},\"displayName\":{\"en\":\"RoomWithWifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:44:42.3445106+00:00\"},{\"id\":\"dtmi:example:wifi;117599647\",\"description\":{},\"displayName\":{\"en\":\"Wifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:44:42.3447161+00:00\"},{\"id\":\"dtmi:example:Ward;115429255\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:26.6388005+00:00\"},{\"id\":\"dtmi:example:Ward;189540703\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:26.7312243+00:00\"},{\"id\":\"dtmi:example:Ward;144568920\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:30.5678849+00:00\"},{\"id\":\"dtmi:example:Ward;110855032\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:30.7037839+00:00\"}],\"nextLink\":null}", - "Date" : "Mon, 31 Aug 2020 20:27:27 GMT", + "Body" : "{\"value\":[{\"id\":\"dtmi:example:Ward;114653809\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:35:57.0043855+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;114653809\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;111815882\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:35:57.3524717+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;111815882\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;189947004\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:04.264631+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;189947004\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;134000272\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:05.0983867+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;134000272\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;192739528\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:11.4816322+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;192739528\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;116332842\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:11.7749519+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;116332842\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;116238422\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:29.4055305+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;116238422\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;198163867\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:29.8807133+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;198163867\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;121159740\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:51.8135839+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;121159740\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;121200167\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:52.3203982+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;121200167\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;112162783\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:08.6579838+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;112162783\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;147373991\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:09.529767+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;147373991\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;161147759\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:15.2200393+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;161147759\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;120708472\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:15.2352591+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;120708472\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;110887268\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:22.2311573+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;110887268\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;118301577\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:22.3667165+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;118301577\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;139439832\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:40:48.8947652+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;139439832\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;111263086\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:40:54.0431308+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;111263086\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;168646450\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:05.1032132+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;168646450\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;115143769\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:06.4744458+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;115143769\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;128072960\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:10.0981475+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;128072960\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;110184439\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:10.1085481+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;110184439\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;116847374\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:16.6955258+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;116847374\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;155773321\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:17.7553908+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;155773321\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;114761833\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:37.6566323+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;114761833\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;120391613\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:48.012186+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;120391613\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;159816443\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:53.8412956+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;159816443\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;112440549\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:58.1808299+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;112440549\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;186622131\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:01.9623456+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;186622131\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;145075813\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:02.2606087+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;145075813\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;145121366\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:09.2690772+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;145121366\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;116421010\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:09.6711432+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;116421010\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:wifiroom;14907\",\"description\":{},\"displayName\":{\"en\":\"RoomWithWifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:44:42.3445106+00:00\",\"model\":{\"@id\":\"dtmi:example:wifiroom;14907\",\"@type\":\"Interface\",\"displayName\":\"RoomWithWifi\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Temperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"Humidity\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"IsOccupied\",\"schema\":\"boolean\"},{\"@type\":\"Property\",\"name\":\"EmployeeId\",\"schema\":\"string\"},{\"@type\":\"Component\",\"name\":\"wifiAccessPoint\",\"schema\":\"dtmi:example:wifi;117599647\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:wifi;117599647\",\"description\":{},\"displayName\":{\"en\":\"Wifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:44:42.3447161+00:00\",\"model\":{\"@id\":\"dtmi:example:wifi;117599647\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Wifi\",\"contents\":[{\"@type\":\"Property\",\"name\":\"RouterName\",\"schema\":\"string\"},{\"@type\":\"Property\",\"name\":\"Network\",\"schema\":\"string\"}]}},{\"id\":\"dtmi:example:Ward;115429255\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:26.6388005+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;115429255\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;189540703\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:26.7312243+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;189540703\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;144568920\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:30.5678849+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;144568920\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;110855032\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:30.7037839+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;110855032\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:samples:Building;1\",\"description\":{},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.2508513+00:00\",\"model\":{\"@id\":\"dtmi:samples:Building;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Building\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"has\",\"target\":\"dtmi:samples:Floor;1\",\"properties\":[{\"@type\":\"Property\",\"name\":\"isAccessRestricted\",\"schema\":\"boolean\"}]},{\"@type\":\"Relationship\",\"name\":\"isEquippedWith\",\"target\":\"dtmi:samples:HVAC;1\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TemperatureUnit\",\"schema\":\"string\"}]}},{\"id\":\"dtmi:samples:Floor;1\",\"description\":{},\"displayName\":{\"en\":\"Floor\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.2510159+00:00\",\"model\":{\"@id\":\"dtmi:samples:Floor;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Floor\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"contains\",\"target\":\"dtmi:samples:Room;1\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"}]}},{\"id\":\"dtmi:samples:HVAC;1\",\"description\":{},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.2510852+00:00\",\"model\":{\"@id\":\"dtmi:samples:HVAC;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"HVAC\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Efficiency\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetHumidity\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"controlsTemperature\",\"target\":\"dtmi:samples:Floor;1\"}]}},{\"id\":\"dtmi:samples:Room;1\",\"description\":{},\"displayName\":{\"en\":\"Room\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.2511785+00:00\",\"model\":{\"@id\":\"dtmi:samples:Room;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Room\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Temperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"Humidity\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"IsOccupied\",\"schema\":\"boolean\"},{\"@type\":\"Property\",\"name\":\"EmployeeId\",\"schema\":\"string\"},{\"@type\":\"Component\",\"name\":\"wifiAccessPoint\",\"schema\":\"dtmi:samples:Wifi;1\"}]}},{\"id\":\"dtmi:samples:Wifi;1\",\"description\":{},\"displayName\":{\"en\":\"Wifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.251297+00:00\",\"model\":{\"@id\":\"dtmi:samples:Wifi;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Wifi\",\"contents\":[{\"@type\":\"Property\",\"name\":\"RouterName\",\"schema\":\"string\"},{\"@type\":\"Property\",\"name\":\"Network\",\"schema\":\"string\"}]}},{\"id\":\"dtmi:samples:ComponentModel;3759\",\"description\":{},\"displayName\":{\"en\":\"Component1\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:03.8903012+00:00\",\"model\":{\"@id\":\"dtmi:samples:ComponentModel;3759\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Component1\",\"contents\":[{\"@type\":\"Property\",\"name\":\"ComponentProp1\",\"schema\":\"string\"},{\"@type\":\"Property\",\"name\":\"ComponentProp2\",\"schema\":\"integer\"},{\"@type\":\"Telemetry\",\"name\":\"ComponentTelemetry1\",\"schema\":\"integer\"}]}},{\"id\":\"dtmi:samples:TempModel;5380\",\"description\":{},\"displayName\":{\"en\":\"TempModel\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:03.8904562+00:00\",\"model\":{\"@id\":\"dtmi:samples:TempModel;5380\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"TempModel\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Prop1\",\"schema\":\"string\"},{\"@type\":\"Property\",\"name\":\"Prop2\",\"schema\":\"integer\"},{\"@type\":\"Component\",\"name\":\"Component1\",\"schema\":\"dtmi:samples:ComponentModel;3759\"},{\"@type\":\"Telemetry\",\"name\":\"Telemetry1\",\"schema\":\"integer\"}]}}],\"nextLink\":null}", + "Date" : "Wed, 02 Sep 2020 20:33:00 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null From eff062e309e0e2df536fc3b1a21d16eeaf46f88a Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Wed, 2 Sep 2020 15:25:18 -0700 Subject: [PATCH 061/168] Fix FieldBuilder live test (#14746) --- .../indexes/FieldBuilderServiceTests.java | 10 +- .../createIndexWithFieldBuilder.json | 98 +++++++++---------- 2 files changed, 58 insertions(+), 50 deletions(-) diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/indexes/FieldBuilderServiceTests.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/indexes/FieldBuilderServiceTests.java index e21ed9eab2f46..77e2baf68b92f 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/indexes/FieldBuilderServiceTests.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/indexes/FieldBuilderServiceTests.java @@ -3,10 +3,15 @@ package com.azure.search.documents.indexes; +import com.azure.core.serializer.json.jackson.JacksonJsonSerializerBuilder; import com.azure.search.documents.SearchTestBase; +import com.azure.search.documents.indexes.models.FieldBuilderOptions; import com.azure.search.documents.indexes.models.SearchIndex; import com.azure.search.documents.indexes.models.SynonymMap; import com.azure.search.documents.test.environment.models.Hotel; +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import java.util.ArrayList; @@ -42,7 +47,10 @@ protected void afterTest() { public void createIndexWithFieldBuilder() { SynonymMap synonymMap = new SynonymMap(synonymMapName).setSynonyms("hotel,motel"); client.createSynonymMap(synonymMap); - index.setFields(SearchIndexClient.buildSearchFields(Hotel.class, null)); + index.setFields(SearchIndexClient.buildSearchFields(Hotel.class, new FieldBuilderOptions() + .setJsonSerializer(new JacksonJsonSerializerBuilder().serializer(new ObjectMapper() + .setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY)) + .build()))); client.createIndex(index); indexesToDelete.add(index.getName()); assertObjectEquals(index, client.getIndex(index.getName()), true); diff --git a/sdk/search/azure-search-documents/src/test/resources/session-records/createIndexWithFieldBuilder.json b/sdk/search/azure-search-documents/src/test/resources/session-records/createIndexWithFieldBuilder.json index 9154f08d47247..d64e74abbff37 100644 --- a/sdk/search/azure-search-documents/src/test/resources/session-records/createIndexWithFieldBuilder.json +++ b/sdk/search/azure-search-documents/src/test/resources/session-records/createIndexWithFieldBuilder.json @@ -3,129 +3,129 @@ "Method" : "POST", "Uri" : "https://REDACTED.search.windows.net/synonymmaps?api-version=2020-06-30", "Headers" : { - "User-Agent" : "azsdk-java-azure-search-documents/1.0.0-beta.5 (11.0.6; Windows 10; 10.0)", - "x-ms-client-request-id" : "8f148407-f41c-4f07-8c8f-1bd1d60cf5b7", + "User-Agent" : "azsdk-java-azure-search-documents/11.1.0-beta.2 (11.0.6; Windows 10; 10.0)", + "x-ms-client-request-id" : "e326cd05-f983-41d5-a8ca-196dbf75b5ce", "Content-Type" : "application/json" }, "Response" : { "Pragma" : "no-cache", "retry-after" : "0", - "request-id" : "8f148407-f41c-4f07-8c8f-1bd1d60cf5b7", + "request-id" : "e326cd05-f983-41d5-a8ca-196dbf75b5ce", "StatusCode" : "201", - "Date" : "Thu, 25 Jun 2020 17:19:35 GMT", + "Date" : "Wed, 02 Sep 2020 21:32:05 GMT", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Cache-Control" : "no-cache", - "client-request-id" : "8f148407-f41c-4f07-8c8f-1bd1d60cf5b7", - "ETag" : "W/\"0x8D8192BEEBE5C51\"", - "elapsed-time" : "19", + "client-request-id" : "e326cd05-f983-41d5-a8ca-196dbf75b5ce", + "ETag" : "W/\"0x8D84F87A407C254\"", + "elapsed-time" : "32", "OData-Version" : "4.0", "Expires" : "-1", - "Content-Length" : "212", - "Body" : "{\"@odata.context\":\"https://sizhu-search.search.windows.net/$metadata#synonymmaps/$entity\",\"@odata.etag\":\"\\\"0x8D8192BEEBE5C51\\\"\",\"name\":\"fieldbuilder\",\"format\":\"solr\",\"synonyms\":\"hotel,motel\",\"encryptionKey\":null}", + "Content-Length" : "213", + "Body" : "{\"@odata.context\":\"https://alzimmer-test.search.windows.net/$metadata#synonymmaps/$entity\",\"@odata.etag\":\"\\\"0x8D84F87A407C254\\\"\",\"name\":\"fieldbuilder\",\"format\":\"solr\",\"synonyms\":\"hotel,motel\",\"encryptionKey\":null}", "Preference-Applied" : "odata.include-annotations=\"*\"", - "x-ms-client-request-id" : "8f148407-f41c-4f07-8c8f-1bd1d60cf5b7", + "x-ms-client-request-id" : "e326cd05-f983-41d5-a8ca-196dbf75b5ce", "Content-Type" : "application/json; odata.metadata=minimal", - "Location" : "https://sizhu-search.search.windows.net/synonymmaps('fieldbuilder')?api-version=2020-06-30" + "Location" : "https://alzimmer-test.search.windows.net/synonymmaps('fieldbuilder')?api-version=2020-06-30" }, "Exception" : null }, { "Method" : "POST", "Uri" : "https://REDACTED.search.windows.net/indexes?api-version=2020-06-30", "Headers" : { - "User-Agent" : "azsdk-java-azure-search-documents/1.0.0-beta.5 (11.0.6; Windows 10; 10.0)", - "x-ms-client-request-id" : "3c817912-ce72-4c09-a79b-819f9ffbaacc", + "User-Agent" : "azsdk-java-azure-search-documents/11.1.0-beta.2 (11.0.6; Windows 10; 10.0)", + "x-ms-client-request-id" : "c894c5ed-587e-43c3-a87b-71929a499653", "Content-Type" : "application/json" }, "Response" : { "Pragma" : "no-cache", "retry-after" : "0", - "request-id" : "3c817912-ce72-4c09-a79b-819f9ffbaacc", + "request-id" : "c894c5ed-587e-43c3-a87b-71929a499653", "StatusCode" : "201", - "Date" : "Thu, 25 Jun 2020 17:19:36 GMT", + "Date" : "Wed, 02 Sep 2020 21:32:09 GMT", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Cache-Control" : "no-cache", - "client-request-id" : "3c817912-ce72-4c09-a79b-819f9ffbaacc", - "ETag" : "W/\"0x8D8192BEF5EFF1D\"", - "elapsed-time" : "1014", + "client-request-id" : "c894c5ed-587e-43c3-a87b-71929a499653", + "ETag" : "W/\"0x8D84F87A5FDCAA9\"", + "elapsed-time" : "3078", "OData-Version" : "4.0", "Expires" : "-1", - "Content-Length" : "5667", - "Body" : "{\"@odata.context\":\"https://sizhu-search.search.windows.net/$metadata#indexes/$entity\",\"@odata.etag\":\"\\\"0x8D8192BEF5EFF1D\\\"\",\"name\":\"fieldbuilder01306c6570d0\",\"defaultScoringProfile\":null,\"fields\":[{\"name\":\"hotelId\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":false,\"key\":true,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"hotelName\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":\"en.lucene\",\"synonymMaps\":[]},{\"name\":\"description\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"category\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"tags\",\"type\":\"Collection(Edm.String)\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"parkingIncluded\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"smokingAllowed\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"lastRenovationDate\",\"type\":\"Edm.DateTimeOffset\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"rating\",\"type\":\"Edm.Int32\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"location\",\"type\":\"Edm.GeographyPoint\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"address\",\"type\":\"Edm.ComplexType\",\"fields\":[{\"name\":\"streetAddress\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"city\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"stateProvince\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"country\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[\"fieldbuilder\"]},{\"name\":\"postalCode\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}]},{\"name\":\"rooms\",\"type\":\"Collection(Edm.ComplexType)\",\"fields\":[{\"name\":\"description\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"descriptionFr\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"type\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"baseRate\",\"type\":\"Edm.Double\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"bedOptions\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"sleepsCount\",\"type\":\"Edm.Int32\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"smokingAllowed\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"tags\",\"type\":\"Collection(Edm.String)\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}]}],\"scoringProfiles\":[],\"corsOptions\":null,\"suggesters\":[],\"analyzers\":[],\"tokenizers\":[],\"tokenFilters\":[],\"charFilters\":[],\"encryptionKey\":null,\"similarity\":{\"@odata.type\":\"#Microsoft.Azure.Search.BM25Similarity\",\"k1\":null,\"b\":null}}", + "Content-Length" : "5441", + "Body" : "{\"@odata.context\":\"https://alzimmer-test.search.windows.net/$metadata#indexes/$entity\",\"@odata.etag\":\"\\\"0x8D84F87A5FDCAA9\\\"\",\"name\":\"fieldbuilder101993472207\",\"defaultScoringProfile\":null,\"fields\":[{\"name\":\"HotelId\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":false,\"key\":true,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"HotelName\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":\"en.lucene\",\"synonymMaps\":[]},{\"name\":\"Description\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Category\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Tags\",\"type\":\"Collection(Edm.String)\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"ParkingIncluded\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"SmokingAllowed\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"LastRenovationDate\",\"type\":\"Edm.DateTimeOffset\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Rating\",\"type\":\"Edm.Int32\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Address\",\"type\":\"Edm.ComplexType\",\"fields\":[{\"name\":\"StreetAddress\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"City\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"StateProvince\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Country\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[\"fieldbuilder\"]},{\"name\":\"PostalCode\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}]},{\"name\":\"Rooms\",\"type\":\"Collection(Edm.ComplexType)\",\"fields\":[{\"name\":\"Description\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Description_fr\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Type\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"BaseRate\",\"type\":\"Edm.Double\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"BedOptions\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"SleepsCount\",\"type\":\"Edm.Int32\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"SmokingAllowed\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Tags\",\"type\":\"Collection(Edm.String)\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}]}],\"scoringProfiles\":[],\"corsOptions\":null,\"suggesters\":[],\"analyzers\":[],\"tokenizers\":[],\"tokenFilters\":[],\"charFilters\":[],\"encryptionKey\":null,\"similarity\":{\"@odata.type\":\"#Microsoft.Azure.Search.BM25Similarity\",\"k1\":null,\"b\":null}}", "Preference-Applied" : "odata.include-annotations=\"*\"", - "x-ms-client-request-id" : "3c817912-ce72-4c09-a79b-819f9ffbaacc", + "x-ms-client-request-id" : "c894c5ed-587e-43c3-a87b-71929a499653", "Content-Type" : "application/json; odata.metadata=minimal", - "Location" : "https://sizhu-search.search.windows.net/indexes('fieldbuilder01306c6570d0')?api-version=2020-06-30" + "Location" : "https://alzimmer-test.search.windows.net/indexes('fieldbuilder101993472207')?api-version=2020-06-30" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.search.windows.net/indexes('fieldbuilder01306c6570d0')?api-version=2020-06-30", + "Uri" : "https://REDACTED.search.windows.net/indexes('fieldbuilder101993472207')?api-version=2020-06-30", "Headers" : { - "User-Agent" : "azsdk-java-azure-search-documents/1.0.0-beta.5 (11.0.6; Windows 10; 10.0)", - "x-ms-client-request-id" : "700f0668-fdbf-4caa-a469-547dce554c43" + "User-Agent" : "azsdk-java-azure-search-documents/11.1.0-beta.2 (11.0.6; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe38a507-95c1-4c5f-9768-2360901b39d7" }, "Response" : { "Pragma" : "no-cache", "retry-after" : "0", - "request-id" : "700f0668-fdbf-4caa-a469-547dce554c43", + "request-id" : "fe38a507-95c1-4c5f-9768-2360901b39d7", "StatusCode" : "200", - "Date" : "Thu, 25 Jun 2020 17:19:36 GMT", + "Date" : "Wed, 02 Sep 2020 21:32:09 GMT", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Cache-Control" : "no-cache", - "client-request-id" : "700f0668-fdbf-4caa-a469-547dce554c43", - "ETag" : "W/\"0x8D8192BEF5EFF1D\"", - "elapsed-time" : "18", + "client-request-id" : "fe38a507-95c1-4c5f-9768-2360901b39d7", + "ETag" : "W/\"0x8D84F87A5FDCAA9\"", + "elapsed-time" : "27", "OData-Version" : "4.0", "Expires" : "-1", - "Content-Length" : "5667", - "Body" : "{\"@odata.context\":\"https://sizhu-search.search.windows.net/$metadata#indexes/$entity\",\"@odata.etag\":\"\\\"0x8D8192BEF5EFF1D\\\"\",\"name\":\"fieldbuilder01306c6570d0\",\"defaultScoringProfile\":null,\"fields\":[{\"name\":\"hotelId\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":false,\"key\":true,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"hotelName\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":\"en.lucene\",\"synonymMaps\":[]},{\"name\":\"description\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"category\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"tags\",\"type\":\"Collection(Edm.String)\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"parkingIncluded\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"smokingAllowed\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"lastRenovationDate\",\"type\":\"Edm.DateTimeOffset\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"rating\",\"type\":\"Edm.Int32\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"location\",\"type\":\"Edm.GeographyPoint\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"address\",\"type\":\"Edm.ComplexType\",\"fields\":[{\"name\":\"streetAddress\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"city\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"stateProvince\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"country\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[\"fieldbuilder\"]},{\"name\":\"postalCode\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}]},{\"name\":\"rooms\",\"type\":\"Collection(Edm.ComplexType)\",\"fields\":[{\"name\":\"description\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"descriptionFr\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"type\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"baseRate\",\"type\":\"Edm.Double\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"bedOptions\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"sleepsCount\",\"type\":\"Edm.Int32\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"smokingAllowed\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"tags\",\"type\":\"Collection(Edm.String)\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}]}],\"scoringProfiles\":[],\"corsOptions\":null,\"suggesters\":[],\"analyzers\":[],\"tokenizers\":[],\"tokenFilters\":[],\"charFilters\":[],\"encryptionKey\":null,\"similarity\":{\"@odata.type\":\"#Microsoft.Azure.Search.BM25Similarity\",\"k1\":null,\"b\":null}}", + "Content-Length" : "5441", + "Body" : "{\"@odata.context\":\"https://alzimmer-test.search.windows.net/$metadata#indexes/$entity\",\"@odata.etag\":\"\\\"0x8D84F87A5FDCAA9\\\"\",\"name\":\"fieldbuilder101993472207\",\"defaultScoringProfile\":null,\"fields\":[{\"name\":\"HotelId\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":false,\"key\":true,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"HotelName\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":\"en.lucene\",\"synonymMaps\":[]},{\"name\":\"Description\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Category\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Tags\",\"type\":\"Collection(Edm.String)\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"ParkingIncluded\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"SmokingAllowed\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"LastRenovationDate\",\"type\":\"Edm.DateTimeOffset\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Rating\",\"type\":\"Edm.Int32\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Address\",\"type\":\"Edm.ComplexType\",\"fields\":[{\"name\":\"StreetAddress\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"City\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"StateProvince\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Country\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[\"fieldbuilder\"]},{\"name\":\"PostalCode\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":false,\"retrievable\":true,\"sortable\":false,\"facetable\":false,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}]},{\"name\":\"Rooms\",\"type\":\"Collection(Edm.ComplexType)\",\"fields\":[{\"name\":\"Description\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Description_fr\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Type\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"BaseRate\",\"type\":\"Edm.Double\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"BedOptions\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"SleepsCount\",\"type\":\"Edm.Int32\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"SmokingAllowed\",\"type\":\"Edm.Boolean\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"Tags\",\"type\":\"Collection(Edm.String)\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":false,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}]}],\"scoringProfiles\":[],\"corsOptions\":null,\"suggesters\":[],\"analyzers\":[],\"tokenizers\":[],\"tokenFilters\":[],\"charFilters\":[],\"encryptionKey\":null,\"similarity\":{\"@odata.type\":\"#Microsoft.Azure.Search.BM25Similarity\",\"k1\":null,\"b\":null}}", "Preference-Applied" : "odata.include-annotations=\"*\"", - "x-ms-client-request-id" : "700f0668-fdbf-4caa-a469-547dce554c43", + "x-ms-client-request-id" : "fe38a507-95c1-4c5f-9768-2360901b39d7", "Content-Type" : "application/json; odata.metadata=minimal" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.search.windows.net/indexes('fieldbuilder01306c6570d0')?api-version=2020-06-30", + "Uri" : "https://REDACTED.search.windows.net/indexes('fieldbuilder101993472207')?api-version=2020-06-30", "Headers" : { - "User-Agent" : "azsdk-java-azure-search-documents/1.0.0-beta.5 (11.0.6; Windows 10; 10.0)", - "x-ms-client-request-id" : "01d5c06f-bc90-4f14-98a3-2a81efac266c" + "User-Agent" : "azsdk-java-azure-search-documents/11.1.0-beta.2 (11.0.6; Windows 10; 10.0)", + "x-ms-client-request-id" : "98224ec1-e27d-469c-96cf-f468f6f51858" }, "Response" : { "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Cache-Control" : "no-cache", - "client-request-id" : "01d5c06f-bc90-4f14-98a3-2a81efac266c", - "elapsed-time" : "355", + "client-request-id" : "98224ec1-e27d-469c-96cf-f468f6f51858", + "elapsed-time" : "460", "Expires" : "-1", "Pragma" : "no-cache", "retry-after" : "0", - "request-id" : "01d5c06f-bc90-4f14-98a3-2a81efac266c", + "request-id" : "98224ec1-e27d-469c-96cf-f468f6f51858", "StatusCode" : "204", - "Date" : "Thu, 25 Jun 2020 17:19:36 GMT", - "x-ms-client-request-id" : "01d5c06f-bc90-4f14-98a3-2a81efac266c" + "Date" : "Wed, 02 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "98224ec1-e27d-469c-96cf-f468f6f51858" }, "Exception" : null }, { "Method" : "DELETE", "Uri" : "https://REDACTED.search.windows.net/synonymmaps('fieldbuilder')?api-version=2020-06-30", "Headers" : { - "User-Agent" : "azsdk-java-azure-search-documents/1.0.0-beta.5 (11.0.6; Windows 10; 10.0)", - "x-ms-client-request-id" : "1c7da240-ee2e-4245-8106-3461141a556d" + "User-Agent" : "azsdk-java-azure-search-documents/11.1.0-beta.2 (11.0.6; Windows 10; 10.0)", + "x-ms-client-request-id" : "df821074-2c51-4ecf-9ac6-68a49fd944a2" }, "Response" : { "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Cache-Control" : "no-cache", - "client-request-id" : "1c7da240-ee2e-4245-8106-3461141a556d", - "elapsed-time" : "17", + "client-request-id" : "df821074-2c51-4ecf-9ac6-68a49fd944a2", + "elapsed-time" : "18", "Expires" : "-1", "Pragma" : "no-cache", "retry-after" : "0", - "request-id" : "1c7da240-ee2e-4245-8106-3461141a556d", + "request-id" : "df821074-2c51-4ecf-9ac6-68a49fd944a2", "StatusCode" : "204", - "Date" : "Thu, 25 Jun 2020 17:19:36 GMT", - "x-ms-client-request-id" : "1c7da240-ee2e-4245-8106-3461141a556d" + "Date" : "Wed, 02 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "df821074-2c51-4ecf-9ac6-68a49fd944a2" }, "Exception" : null } ], - "variables" : [ "fieldbuilder01306c6570d0" ] + "variables" : [ "fieldbuilder101993472207" ] } \ No newline at end of file From e1ed6ef9fbe3196c408660c5717e8cc7856216e9 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Wed, 2 Sep 2020 15:53:22 -0700 Subject: [PATCH 062/168] Address issues regarding the publicly facing APIs and Models (#14750) --- sdk/digitaltwins/azure-digitaltwins-core/autorest.md | 2 +- .../core/DeleteDigitalTwinRequestOptions.java | 2 +- .../core/DeleteRelationshipRequestOptions.java | 2 +- .../azure/digitaltwins/core/DigitalTwinsAsyncClient.java | 2 +- .../com/azure/digitaltwins/core/DigitalTwinsClient.java | 2 +- .../digitaltwins/core/UpdateComponentRequestOptions.java | 2 +- .../core/UpdateDigitalTwinRequestOptions.java | 2 +- .../core/UpdateRelationshipRequestOptions.java | 2 +- .../core/implementation/DigitalTwinsImpl.java | 2 +- .../models/IncomingRelationshipCollection.java | 1 + .../models/IncomingRelationship.java | 2 +- .../com/azure/digitaltwins/core/models/ModelData.java | 2 +- .../com/azure/digitaltwins/core/models/package-info.java | 9 +++++++++ .../digitaltwins/core/util/DigitalTwinsResponse.java | 2 +- .../core/util/DigitalTwinsResponseHeaders.java | 2 +- .../digitaltwins/core/util/UpdateOperationUtility.java | 2 +- 16 files changed, 24 insertions(+), 14 deletions(-) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{implementation => }/models/IncomingRelationship.java (98%) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/package-info.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md index 0d8d75b508f07..2d4a76cd07234 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md @@ -38,5 +38,5 @@ java: models-subpackage: implementation.models context-client-method-parameter: true custom-types-subpackage: models - #custom-types: + custom-types: IncomingRelationship ``` diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java index 5ded3a86fc101..c9b488cd9be7a 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java @@ -6,7 +6,7 @@ /** * Optional settings that are specific to calls to {@link DigitalTwinsClient#deleteDigitalTwin(String)} and its overloads. */ -public class DeleteDigitalTwinRequestOptions extends RequestOptions { +public final class DeleteDigitalTwinRequestOptions extends RequestOptions { // This class exists to be added to later if the deleteDigitalTwin APIs get a new optional parameter in later service // API versions and so that we don't have to expose that new optional parameter for other APIs using RequestOptions diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java index 918b917e94ace..4b839645960e6 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java @@ -9,7 +9,7 @@ /** * Optional settings that are specific to calls to {@link DigitalTwinsClient#updateComponent(String, String, List)} and its overloads. */ -public class DeleteRelationshipRequestOptions extends RequestOptions { +public final class DeleteRelationshipRequestOptions extends RequestOptions { // This class exists to be added to later if the deleteRelationship APIs get a new optional parameter in later service // API versions and so that we don't have to expose that new optional parameter for other APIs like deleteDigitalTwin diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 96a567046f1bb..684127700b1c7 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -15,8 +15,8 @@ import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImplBuilder; import com.azure.digitaltwins.core.implementation.converters.ModelDataConverter; import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; -import com.azure.digitaltwins.core.implementation.models.IncomingRelationship; import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; +import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; import com.azure.digitaltwins.core.util.DigitalTwinsResponse; import com.azure.digitaltwins.core.util.DigitalTwinsResponseHeaders; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index a8e404eb9d04b..49b7fedcbd497 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -11,7 +11,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.digitaltwins.core.implementation.models.IncomingRelationship; +import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; import com.azure.digitaltwins.core.util.DigitalTwinsResponse; import com.azure.digitaltwins.core.util.ListModelOptions; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java index 5cdf52b2b9409..deebd2adda14b 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java @@ -9,7 +9,7 @@ /** * Optional settings that are specific to calls to {@link DigitalTwinsClient#updateComponent(String, String, List)} and its overloads. */ -public class UpdateComponentRequestOptions extends RequestOptions { +public final class UpdateComponentRequestOptions extends RequestOptions { // This class exists to be added to later if the updateComponent APIs get a new optional parameter in later service // API versions and so that we don't have to expose that new optional parameter for other APIs like updateDigitalTwin, // updateRelationship, etc. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java index 7c5f07eb1ead8..397eba883b52d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java @@ -8,7 +8,7 @@ /** * Optional settings that are specific to calls to {@link DigitalTwinsClient#updateDigitalTwin(String, List)} and its overloads. */ -public class UpdateDigitalTwinRequestOptions extends RequestOptions { +public final class UpdateDigitalTwinRequestOptions extends RequestOptions { // This class exists to be added to later if the updateDigitalTwin APIs get a new optional parameter in later service // API versions and so that we don't have to expose that new optional parameter for other APIs using RequestOptions diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java index d774d6c9e95e9..2dfc4c1dad9a1 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java @@ -9,7 +9,7 @@ /** * Optional settings that are specific to calls to {@link DigitalTwinsClient#updateComponent(String, String, List)} and its overloads. */ -public class UpdateRelationshipRequestOptions extends RequestOptions { +public final class UpdateRelationshipRequestOptions extends RequestOptions { // This class exists to be added to later if the updateRelationship APIs get a new optional parameter in later service // API versions and so that we don't have to expose that new optional parameter for other APIs like updateDigitalTwin, // updateComponent, etc. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java index 04ef931f8909b..9aed42a28e807 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java @@ -34,9 +34,9 @@ import com.azure.digitaltwins.core.implementation.models.DigitalTwinsUpdateRelationshipResponse; import com.azure.digitaltwins.core.implementation.models.DigitalTwinsUpdateResponse; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; -import com.azure.digitaltwins.core.implementation.models.IncomingRelationship; import com.azure.digitaltwins.core.implementation.models.IncomingRelationshipCollection; import com.azure.digitaltwins.core.implementation.models.RelationshipCollection; +import com.azure.digitaltwins.core.models.IncomingRelationship; import java.util.List; import reactor.core.publisher.Mono; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationshipCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationshipCollection.java index bd5b7860c5dab..1b132253c14b6 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationshipCollection.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationshipCollection.java @@ -5,6 +5,7 @@ package com.azure.digitaltwins.core.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.digitaltwins.core.models.IncomingRelationship; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationship.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java similarity index 98% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationship.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java index 5d06244514e31..2d5dbcb633eef 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationship.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.digitaltwins.core.implementation.models; +package com.azure.digitaltwins.core.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java index 6eee937348ab6..0bbfd71bd9fd0 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java @@ -10,7 +10,7 @@ * The ModelData representing the model and its corresponding metadata. */ @Fluent -public class ModelData { +public final class ModelData { /* * A language map that contains the localized display names as specified in diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/package-info.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/package-info.java new file mode 100644 index 0000000000000..f096bfc00de16 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing classes for AzureDigitalTwinsAPI. A service for managing and querying digital twins and digital + * twin models. + */ +package com.azure.digitaltwins.core.models; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DigitalTwinsResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DigitalTwinsResponse.java index 446ba904d7e13..778128d95d9d2 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DigitalTwinsResponse.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DigitalTwinsResponse.java @@ -10,7 +10,7 @@ /** * A helper class to represent the HTTP response returned by the service. */ -public class DigitalTwinsResponse extends ResponseBase { +public final class DigitalTwinsResponse extends ResponseBase { /** * Creates an instance of DigitalTwinsResponse. * diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DigitalTwinsResponseHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DigitalTwinsResponseHeaders.java index 4b0a1848fc731..0fed51c19f2eb 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DigitalTwinsResponseHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DigitalTwinsResponseHeaders.java @@ -10,7 +10,7 @@ * A helper class to represent the HTTP response headers returned by the service. */ @Fluent -public class DigitalTwinsResponseHeaders { +public final class DigitalTwinsResponseHeaders { /* * The ETag property. */ diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java index 4e33e27bd7701..a42d42bf44198 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateOperationUtility.java @@ -15,7 +15,7 @@ * A utility to create the application/json-patch+json operations payload required for update operations. */ @Fluent -public class UpdateOperationUtility { +public final class UpdateOperationUtility { private static final String ADD = "add"; private static final String REPLACE = "replace"; private static final String REMOVE = "remove"; From c9a63131ddf0da5d4ca4cb2531b130f447e8ae65 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Wed, 2 Sep 2020 16:19:51 -0700 Subject: [PATCH 063/168] Change prerelease versioning (#14703) - Use alpha instead of dev --- eng/jacoco-test-coverage/pom.xml | 2 +- .../templates/jobs/archetype-sdk-client.yml | 4 ++-- eng/versioning/set_versions.py | 12 ++++++------ eng/versioning/version_client.txt | 2 +- sdk/template/azure-sdk-template/CHANGELOG.md | 4 ++-- sdk/template/azure-sdk-template/pom.xml | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 49bc33c4fef81..73c7a64ef1219 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -234,7 +234,7 @@ com.azure azure-sdk-template - 1.2.0-beta.1 + 1.2.1-beta.1 com.azure.resourcemanager diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 3eeb67594c72a..47c8652ae608d 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -68,13 +68,13 @@ jobs: - ${{ each artifact in parameters.Artifacts }}: - script: | python3 --version - python3 eng/versioning/set_versions.py --build-type ${{parameters.SDKType}} --build-qualifier dev.$(Build.BuildNumber) --artifact-id ${{artifact.name}} --group-id ${{artifact.groupId}} + python3 eng/versioning/set_versions.py --build-type ${{parameters.SDKType}} --build-qualifier alpha.$(Build.BuildNumber) --artifact-id ${{artifact.name}} --group-id ${{artifact.groupId}} condition: and(succeeded(), eq(variables['SetDevVersion'],'true')) displayName: Append dev package version suffix for ${{artifact.name}} - script: | python3 --version - python3 eng/versioning/set_versions.py --set-dev-zero-version --build-type ${{parameters.SDKType}} --build-qualifier dev.$(Build.BuildNumber) + python3 eng/versioning/set_versions.py --set-dev-zero-version --build-type ${{parameters.SDKType}} --build-qualifier alpha.$(Build.BuildNumber) condition: and(succeeded(), eq(variables['SetDevVersion'],'true')) displayName: Set zero-dev-version for packages diff --git a/eng/versioning/set_versions.py b/eng/versioning/set_versions.py index 695cfbb3cb135..66b70ed7d5a6c 100644 --- a/eng/versioning/set_versions.py +++ b/eng/versioning/set_versions.py @@ -54,7 +54,7 @@ prerelease_data_regex = re.compile(prerelease_data_version_regex) # Update packages (excluding unreleased dependencies and packages which already -# have a dev version set) to use a "zero dev version" (e.g. dev.20201225.0). +# have a dev version set) to use a "zero dev version" (e.g. alpha.20201225.0). # This ensures that packages built in pipelines who have unreleased dependencies # that are built in other pipelines can successfully fall back to a source build # of the unreleased dependency package in the monorepo if the unreleased @@ -67,8 +67,8 @@ def set_dev_zero_version(build_type, build_qualifier): version_file = os.path.normpath('eng/versioning/version_' + build_type.name + '.txt') print('version_file=' + version_file) - # Assuming a build qualifier of the form: "dev.20200204.123" - # Converts "dev.20200204.123" -> "dev.20200204.0" + # Assuming a build qualifier of the form: "alpha.20200204.123" + # Converts "alpha.20200204.123" -> "alpha.20200204.0" zero_qualifier = build_qualifier[:build_qualifier.rfind('.') + 1] + '0' newlines = [] @@ -174,8 +174,8 @@ def update_versions_file_for_nightly_devops(build_type, build_qualifier, artifac # changes in the case where a dependency version has already # been modified. elif (module.name.startswith('unreleased_') or module.name.startswith('beta_')) and not module.dependency.startswith('['): - # Assuming a build qualifier of the form: "dev.20200204.1" - # Converts "dev.20200204.1" -> "dev.20200204." + # Assuming a build qualifier of the form: "alpha.20200204.1" + # Converts "alpha.20200204.1" -> "alpha.20200204." unreleased_build_qualifier = build_qualifier[:build_qualifier.rfind('.') + 1] if '-' in module.dependency: @@ -185,7 +185,7 @@ def update_versions_file_for_nightly_devops(build_type, build_qualifier, artifac module.dependency += '-' + unreleased_build_qualifier # The final unreleased dependency version needs to be of the form - # [1.0.0-dev.YYYYMMDD.,] <-- note the ., this is the version range for Maven + # [1.0.0-alpha.YYYYMMDD.,] <-- note the ., this is the version range for Maven module.dependency = '[{},]'.format(module.dependency) print(f'updating unreleased/beta dependency {module.name} to use dependency version range: "{module.dependency}"') diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index b6399c5c996ff..2f0c65e388a67 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -40,7 +40,7 @@ com.azure:azure-search-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-security-keyvault-certificates;4.1.0;4.2.0-beta.1 com.azure:azure-security-keyvault-keys;4.2.0;4.3.0-beta.1 com.azure:azure-security-keyvault-secrets;4.2.0;4.3.0-beta.1 -com.azure:azure-sdk-template;1.1.0;1.2.0-beta.1 +com.azure:azure-sdk-template;1.1.0;1.2.1-beta.1 com.azure:azure-spring-data-cosmos-core;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-spring-data-2-2-cosmos;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-spring-data-2-3-cosmos;3.0.0-beta.1;3.0.0-beta.2 diff --git a/sdk/template/azure-sdk-template/CHANGELOG.md b/sdk/template/azure-sdk-template/CHANGELOG.md index d2d2382d97e41..8b59533f4b575 100644 --- a/sdk/template/azure-sdk-template/CHANGELOG.md +++ b/sdk/template/azure-sdk-template/CHANGELOG.md @@ -1,7 +1,7 @@ # Release History -## 1.2.0-beta.1 (Unreleased) - +## 1.2.1-beta.1 (2020-08-27) +- Test alpha and beta qualifiers ## 1.1.0 (2020-07-29) - Test Java Release Pipeline on a non-beta version (normal docs, normal sources) diff --git a/sdk/template/azure-sdk-template/pom.xml b/sdk/template/azure-sdk-template/pom.xml index 85afd93d38af2..4a873906f5f4d 100644 --- a/sdk/template/azure-sdk-template/pom.xml +++ b/sdk/template/azure-sdk-template/pom.xml @@ -11,7 +11,7 @@ com.azure azure-sdk-template - 1.2.0-beta.1 + 1.2.1-beta.1 Microsoft Azure SDK for Template This package contains Microsoft Azure SDK for Template. From dc4f2bac6d316da24b365ad0818dc7b95d5d2f3a Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Wed, 2 Sep 2020 16:52:01 -0700 Subject: [PATCH 064/168] Add digital twin lifecycle sample (#14744) * samples(adt): Add digital twin lifecycle sample --- .../DigitalTwinsLifecycleAsyncSample.java | 195 ++++++++++++++++++ .../core/DigitalTwinsLifecycleSample.java | 111 ---------- .../azure/digitaltwins/core/FileHelper.java | 14 +- .../src/samples/resources/BuildingTwin.json | 7 - 4 files changed, 204 insertions(+), 123 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleSample.java delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/BuildingTwin.json diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java new file mode 100644 index 0000000000000..fffe45c62005f --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; +import com.azure.digitaltwins.core.implementation.serialization.BasicRelationship; +import com.azure.identity.ClientSecretCredentialBuilder; +import org.apache.http.HttpStatus; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Map; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; + +/** + * This sample creates all the models in \DTDL\Models folder in the ADT service instance and creates the corresponding twins in \DTDL\DigitalTwins folder. + * The Diagram for the Hospital model looks like this: + * + * +------------+ + * | Building +-----isEquippedWith-----+ + * +------------+ | + * | v + * has +-----+ + * | | HVAC| + * v +-----+ + * +------------+ | + * | Floor +<--controlsTemperature--+ + * +------------+ + * | + * contains + * | + * v + * +------------+ +-----------------+ + * | Room |-with component->| WifiAccessPoint | + * +------------+ +-----------------+ + * + */ +public class DigitalTwinsLifecycleAsyncSample { + private static final String tenantId = System.getenv("TENANT_ID"); + private static final String clientId = System.getenv("CLIENT_ID"); + private static final String clientSecret = System.getenv("CLIENT_SECRET"); + private static final String endpoint = System.getenv("DIGITAL_TWINS_ENDPOINT"); + + private static final int MaxWaitTimeAsyncOperationsInSeconds = 10; + + private static final URL DtdlDirectoryUrl = DigitalTwinsLifecycleAsyncSample.class.getClassLoader().getResource("DTDL"); + private static final Path DtDlDirectoryPath; + private static final Path TwinsPath; + private static final Path ModelsPath; + private static final Path RelationshipsPath; + + private static final DigitalTwinsAsyncClient client; + + static { + try { + assert DtdlDirectoryUrl != null; + DtDlDirectoryPath = Paths.get(DtdlDirectoryUrl.toURI()); + } catch (URISyntaxException e) { + throw new RuntimeException("Unable to convert the DTDL directory URL to URI", e); + } + TwinsPath = Paths.get(DtDlDirectoryPath.toString(), "DigitalTwins"); + ModelsPath = Paths.get(DtDlDirectoryPath.toString(), "Models"); + RelationshipsPath = Paths.get(DtDlDirectoryPath.toString(), "Relationships"); + + client = new DigitalTwinsClientBuilder() + .tokenCredential( + new ClientSecretCredentialBuilder() + .tenantId(tenantId) + .clientId(clientId) + .clientSecret(clientSecret) + .build() + ) + .endpoint(endpoint) + .httpLogOptions( + new HttpLogOptions() + .setLogLevel(HttpLogDetailLevel.NONE)) + .buildAsyncClient(); + } + + public static void main(String[] args) throws IOException, InterruptedException { + // Ensure existing twins with the same name are deleted first + deleteTwins(); + + // Create twin counterparts for all the models + createTwins(); + } + + /** + * Delete a twin, and any relationships it might have. + * @throws IOException If an I/O error is thrown when accessing the starting file. + * @throws InterruptedException If the current thread is interrupted while waiting to acquire permits on a semaphore. + */ + public static void deleteTwins() throws IOException, InterruptedException { + System.out.println("DELETE DIGITAL TWINS"); + Map twins = FileHelper.loadAllFilesInPath(TwinsPath); + final Semaphore deleteTwinsSemaphore = new Semaphore(0); + final Semaphore deleteRelationshipsSemaphore = new Semaphore(0); + + // Call APIs to clean up any pre-existing resources that might be referenced by this sample. If digital twin does not exist, ignore. + twins + .forEach((twinId, twinContent) -> { + // Call APIs to delete all relationships. + client.listRelationships(twinId, BasicRelationship.class) + .doOnComplete(deleteRelationshipsSemaphore::release) + .doOnError(throwable -> { + if (throwable instanceof ErrorResponseException && ((ErrorResponseException) throwable).getResponse().getStatusCode() == HttpStatus.SC_NOT_FOUND) { + deleteRelationshipsSemaphore.release(); + } else { + System.err.println("List relationships error: " + throwable); + } + }) + .subscribe( + relationship -> client.deleteRelationship(twinId, relationship.getId()) + .subscribe( + aVoid -> System.out.println("Found and deleted relationship: " + relationship.getId()), + throwable -> System.err.println("Delete relationship error: " + throwable) + )); + + // Call APIs to delete any incoming relationships. + client.listIncomingRelationships(twinId) + .doOnComplete(deleteRelationshipsSemaphore::release) + .doOnError(throwable -> { + if (throwable instanceof ErrorResponseException && ((ErrorResponseException) throwable).getResponse().getStatusCode() == HttpStatus.SC_NOT_FOUND) { + deleteRelationshipsSemaphore.release(); + } else { + System.err.println("List incoming relationships error: " + throwable); + } + }) + .subscribe( + incomingRelationship -> client.deleteRelationship(incomingRelationship.getSourceId(), incomingRelationship.getRelationshipId()) + .subscribe( + aVoid -> System.out.println("Found and deleted incoming relationship: " + incomingRelationship.getRelationshipId()), + throwable -> System.err.println("Delete incoming relationship error: " + throwable) + )); + + try { + // Verify that the list relationships and list incoming relationships async operations have completed. + if (deleteRelationshipsSemaphore.tryAcquire(2, MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS)) { + // Now the digital twin should be safe to delete + + // Call APIs to delete the twins. + client.deleteDigitalTwin(twinId) + .doOnSuccess(aVoid -> { + System.out.println("Deleted digital twin: " + twinId); + deleteTwinsSemaphore.release(); + }) + .doOnError(throwable -> { + if (throwable instanceof ErrorResponseException && ((ErrorResponseException) throwable).getResponse().getStatusCode() == HttpStatus.SC_NOT_FOUND) { + deleteTwinsSemaphore.release(); + } else { + System.err.println("Could not delete digital twin " + twinId + " due to " + throwable); + } + }) + .subscribe(); + } + } catch (InterruptedException e) { + throw new RuntimeException("Could not cleanup the pre-existing resources: ", e); + } + }); + + // Verify that a semaphore has been released for each delete async operation, signifying that the async call has completed successfully.. + boolean created = deleteTwinsSemaphore.tryAcquire(twins.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + System.out.println("Twins deleted: " + created); + } + + /** + * Creates all twins specified in the DTDL->DigitalTwins directory. + * @throws IOException If an I/O error is thrown when accessing the starting file. + * @throws InterruptedException If the current thread is interrupted while waiting to acquire permits on a semaphore. + */ + public static void createTwins() throws IOException, InterruptedException { + System.out.println("CREATE DIGITAL TWINS"); + Map twins = FileHelper.loadAllFilesInPath(TwinsPath); + final Semaphore createTwinsSemaphore = new Semaphore(0); + + // Call APIs to create the twins. For each async operation, once the operation is completed successfully, a semaphore is released. + twins + .forEach((twinId, twinContent) -> client.createDigitalTwinWithResponse(twinId, twinContent) + .subscribe( + response -> System.out.println("Created digital twin: " + twinId + "\n\t Body: " + response.getValue()), + throwable -> System.err.println("Could not create digital twin " + twinId + " due to " + throwable), + createTwinsSemaphore::release)); + + // Verify that a semaphore has been released for each async operation, signifying that the async call has completed successfully. + boolean created = createTwinsSemaphore.tryAcquire(twins.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + System.out.println("Twins created: " + created); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleSample.java deleted file mode 100644 index 537c3d6370480..0000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleSample.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.digitaltwins.core; - -import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; -import com.azure.identity.ClientSecretCredentialBuilder; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.net.URL; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Map; -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; - -public class DigitalTwinsLifecycleSample { - private static final String tenantId = System.getenv("TENANT_ID"); - private static final String clientId = System.getenv("CLIENT_ID"); - private static final String clientSecret = System.getenv("CLIENT_SECRET"); - private static final String endpoint = System.getenv("DIGITAL_TWINS_ENDPOINT"); - - private static final int MaxWaitTimeAsyncOperationsInSeconds = 10; - - private static final URL DtdlDirectoryUrl = DigitalTwinsLifecycleSample.class.getClassLoader().getResource("DTDL"); - private static final Path DtDlDirectoryPath; - private static final Path TwinsPath; - private static final Path ModelsPath; - private static final Path RelationshipsPath; - - private static final DigitalTwinsAsyncClient client; - - static { - try { - assert DtdlDirectoryUrl != null; - DtDlDirectoryPath = Paths.get(DtdlDirectoryUrl.toURI()); - } catch (URISyntaxException e) { - System.err.println("Unable to convert the DTDL directory URL to URI: " + e); - throw new RuntimeException(e); - } - TwinsPath = Paths.get(DtDlDirectoryPath.toString(), "DigitalTwins"); - ModelsPath = Paths.get(DtDlDirectoryPath.toString(), "Models"); - RelationshipsPath = Paths.get(DtDlDirectoryPath.toString(), "Relationships"); - - client = new DigitalTwinsClientBuilder() - .tokenCredential( - new ClientSecretCredentialBuilder() - .tenantId(tenantId) - .clientId(clientId) - .clientSecret(clientSecret) - .build() - ) - .endpoint(endpoint) - .httpLogOptions( - new HttpLogOptions() - .setLogLevel(HttpLogDetailLevel.NONE)) - .buildAsyncClient(); - } - - public static void main(String[] args) throws IOException, InterruptedException { - // Ensure existing twins with the same name are deleted first - deleteTwins(); - - // Create twin counterparts for all the models - createTwins(); - } - - public static void deleteTwins() throws IOException, InterruptedException { - System.out.println("DELETE DIGITAL TWINS"); - Map twins = FileHelper.loadAllFilesInPath(TwinsPath); - final Semaphore deleteTwinsSemaphore = new Semaphore(0); - - // Call APIs to delete the twins. For each async operation, once the operation is completed successfully, a semaphore is released. - twins - .forEach((twinId, twinContent) -> client.deleteDigitalTwin(twinId) - .doOnSuccess(aVoid -> System.out.println("Deleted digital twin: " + twinId)) - .doOnError(throwable -> { - // If digital twin does not exist, ignore. - if (!(throwable instanceof ErrorResponseException) || !((ErrorResponseException) throwable).getValue().getError().getCode().equals("DigitalTwinNotFound")) { - System.err.println("Could not delete digital twin " + twinId + " due to " + throwable); - } - }) - .doOnTerminate(deleteTwinsSemaphore::release) - .subscribe()); - - // Verify that a semaphore has been released for each async operation, signifying that the async call has completed. - boolean created = deleteTwinsSemaphore.tryAcquire(twins.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); - System.out.println("Twins deleted: " + created); - } - - public static void createTwins() throws IOException, InterruptedException { - System.out.println("CREATE DIGITAL TWINS"); - Map twins = FileHelper.loadAllFilesInPath(TwinsPath); - final Semaphore createTwinsSemaphore = new Semaphore(0); - - // Call APIs to create the twins. For each async operation, once the operation is completed successfully, a semaphore is released. - twins - .forEach((twinId, twinContent) -> client.createDigitalTwinWithResponse(twinId, twinContent) - .doOnSuccess(response -> System.out.println("Created digital twin: " + twinId + "\n\t Body: " + response.getValue())) - .doOnError(throwable -> System.err.println("Could not create digital twin " + twinId + " due to " + throwable)) - .doOnTerminate(createTwinsSemaphore::release) - .subscribe()); - - // Verify that a semaphore has been released for each async operation, signifying that the async call has completed. - boolean created = createTwinsSemaphore.tryAcquire(twins.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); - System.out.println("Twins created: " + created); - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java index 144dc63824a33..80c0a63cecc28 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java @@ -3,10 +3,7 @@ package com.azure.digitaltwins.core; -import java.io.BufferedReader; -import java.io.FileInputStream; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.util.HashMap; @@ -15,6 +12,13 @@ import java.util.stream.Stream; public class FileHelper { + + /** + * Loads all json file contents in a path. + * @param path Path to the target directory. + * @return List of all file names and their content in map format. + * @throws IOException If an I/O error is thrown when accessing the starting file. + */ public static Map loadAllFilesInPath(Path path) throws IOException { Map fileContents = new HashMap<>(); @@ -36,12 +40,12 @@ public static Map loadAllFilesInPath(Path path) throws IOExcepti return fileContents; } - public static String cleanupJsonString(String jsonString) { + private static String cleanupJsonString(String jsonString) { // Remove newline characters, empty spaces and unwanted unicode characters return jsonString.replaceAll("([\\r\\n\\s+\\uFEFF-\\uFFFF])", ""); } - public static String getFileNameFromPath(Path path) { + private static String getFileNameFromPath(Path path) { String fileName = path.getFileName().toString(); if (fileName.indexOf(".") > 0) { fileName = fileName.substring(0, fileName.lastIndexOf(".")); diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/BuildingTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/BuildingTwin.json deleted file mode 100644 index ba5291c2b5715..0000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/resources/BuildingTwin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$metadata": { - "$model": "dtmi:samples:Building;1" - }, - "AverageTemperature": 68, - "TemperatureUnit": "Celsius" -} From c84e8f4d9d48e45a2bbf7859ee13204dbf869569 Mon Sep 17 00:00:00 2001 From: Mohammad Derakhshani Date: Wed, 2 Sep 2020 17:19:16 -0700 Subject: [PATCH 065/168] Cosmos fix resource leak on client initialization failure (#14742) * fix resource leak on client initialization failure * guard for global endpoint manager initilization issue * fixd spotbug issue --- .../azure/cosmos/implementation/Configs.java | 6 + .../implementation/GlobalEndpointManager.java | 4 +- .../implementation/RxDocumentClientImpl.java | 127 ++++++++++-------- 3 files changed, 79 insertions(+), 58 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java index 507ad6cc3838e..f19c69eac51f4 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java @@ -31,6 +31,7 @@ public class Configs { private static final Protocol DEFAULT_PROTOCOL = Protocol.TCP; private static final String UNAVAILABLE_LOCATIONS_EXPIRATION_TIME_IN_SECONDS = "COSMOS.UNAVAILABLE_LOCATIONS_EXPIRATION_TIME_IN_SECONDS"; + private static final String GLOBAL_ENDPOINT_MANAGER_INITIALIZATION_TIME_IN_SECONDS = "COSMOS.GLOBAL_ENDPOINT_MANAGER_MAX_INIT_TIME_IN_SECONDS"; private static final String MAX_HTTP_BODY_LENGTH_IN_BYTES = "COSMOS.MAX_HTTP_BODY_LENGTH_IN_BYTES"; private static final String MAX_HTTP_INITIAL_LINE_LENGTH_IN_BYTES = "COSMOS.MAX_HTTP_INITIAL_LINE_LENGTH_IN_BYTES"; @@ -57,6 +58,7 @@ public class Configs { private static final int SHORT_BARRIER_RETRY_INTERVAL_IN_MS_FOR_MULTI_REGION = 10; private static final int CPU_CNT = Runtime.getRuntime().availableProcessors(); private static final int DEFAULT_DIRECT_HTTPS_POOL_SIZE = CPU_CNT * 500; + private static final int DEFAULT_GLOBAL_ENDPOINT_MANAGER_INITIALIZATION_TIME_IN_SECONDS = 2 * 60; // Reactor Netty Constants private static final Duration MAX_IDLE_CONNECTION_TIMEOUT = Duration.ofSeconds(60); @@ -154,6 +156,10 @@ public int getUnavailableLocationsExpirationTimeInSeconds() { return getJVMConfigAsInt(UNAVAILABLE_LOCATIONS_EXPIRATION_TIME_IN_SECONDS, DEFAULT_UNAVAILABLE_LOCATIONS_EXPIRATION_TIME_IN_SECONDS); } + public int getGlobalEndpointManagerMaxInitializationTimeInSeconds() { + return getJVMConfigAsInt(GLOBAL_ENDPOINT_MANAGER_INITIALIZATION_TIME_IN_SECONDS, DEFAULT_GLOBAL_ENDPOINT_MANAGER_INITIALIZATION_TIME_IN_SECONDS); + } + public String getReactorNettyConnectionPoolName() { return REACTOR_NETTY_CONNECTION_POOL_NAME; } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/GlobalEndpointManager.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/GlobalEndpointManager.java index 27cb307f14204..be8f0f9466738 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/GlobalEndpointManager.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/GlobalEndpointManager.java @@ -35,6 +35,7 @@ public class GlobalEndpointManager implements AutoCloseable { private final LocationCache locationCache; private final URI defaultEndpoint; private final ConnectionPolicy connectionPolicy; + private final Duration maxInitializationTime; private final DatabaseAccountManagerInternal owner; private final AtomicBoolean isRefreshing; private final AtomicBoolean refreshInBackground; @@ -46,6 +47,7 @@ public class GlobalEndpointManager implements AutoCloseable { public GlobalEndpointManager(DatabaseAccountManagerInternal owner, ConnectionPolicy connectionPolicy, Configs configs) { this.backgroundRefreshLocationTimeIntervalInMS = configs.getUnavailableLocationsExpirationTimeInSeconds() * 1000; + this.maxInitializationTime = Duration.ofSeconds(configs.getGlobalEndpointManagerMaxInitializationTimeInSeconds()); try { this.locationCache = new LocationCache( new ArrayList<>(connectionPolicy.getPreferredRegions() != null ? @@ -72,7 +74,7 @@ public GlobalEndpointManager(DatabaseAccountManagerInternal owner, ConnectionPol public void init() { // TODO: add support for openAsync // https://msdata.visualstudio.com/CosmosDB/_workitems/edit/332589 - startRefreshLocationTimerAsync(true).block(); + startRefreshLocationTimerAsync(true).block(maxInitializationTime); } public UnmodifiableList getReadEndpoints() { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index 1aec46c71b057..e24e4c8c2e94c 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -213,50 +213,56 @@ private RxDocumentClientImpl(URI serviceEndpoint, + " serviceEndpoint [{}], connectionPolicy [{}], consistencyLevel [{}], directModeProtocol [{}]", serviceEndpoint, connectionPolicy, consistencyLevel, configs.getProtocol()); - this.connectionSharingAcrossClientsEnabled = connectionSharingAcrossClientsEnabled; - this.configs = configs; - this.masterKeyOrResourceToken = masterKeyOrResourceToken; - this.serviceEndpoint = serviceEndpoint; - this.credential = credential; - this.contentResponseOnWriteEnabled = contentResponseOnWriteEnabled; - - if (this.credential != null) { - hasAuthKeyResourceToken = false; - this.authorizationTokenProvider = new BaseAuthorizationTokenProvider(this.credential); - } else if (masterKeyOrResourceToken != null && ResourceTokenAuthorizationHelper.isResourceToken(masterKeyOrResourceToken)) { - this.authorizationTokenProvider = null; - hasAuthKeyResourceToken = true; - } else if(masterKeyOrResourceToken != null && !ResourceTokenAuthorizationHelper.isResourceToken(masterKeyOrResourceToken)){ - this.credential = new AzureKeyCredential(this.masterKeyOrResourceToken); - hasAuthKeyResourceToken = false; - this.authorizationTokenProvider = new BaseAuthorizationTokenProvider(this.credential); - } else { - hasAuthKeyResourceToken = false; - this.authorizationTokenProvider = null; - } + try { + this.connectionSharingAcrossClientsEnabled = connectionSharingAcrossClientsEnabled; + this.configs = configs; + this.masterKeyOrResourceToken = masterKeyOrResourceToken; + this.serviceEndpoint = serviceEndpoint; + this.credential = credential; + this.contentResponseOnWriteEnabled = contentResponseOnWriteEnabled; + + if (this.credential != null) { + hasAuthKeyResourceToken = false; + this.authorizationTokenProvider = new BaseAuthorizationTokenProvider(this.credential); + } else if (masterKeyOrResourceToken != null && ResourceTokenAuthorizationHelper.isResourceToken(masterKeyOrResourceToken)) { + this.authorizationTokenProvider = null; + hasAuthKeyResourceToken = true; + } else if (masterKeyOrResourceToken != null && !ResourceTokenAuthorizationHelper.isResourceToken(masterKeyOrResourceToken)) { + this.credential = new AzureKeyCredential(this.masterKeyOrResourceToken); + hasAuthKeyResourceToken = false; + this.authorizationTokenProvider = new BaseAuthorizationTokenProvider(this.credential); + } else { + hasAuthKeyResourceToken = false; + this.authorizationTokenProvider = null; + } - if (connectionPolicy != null) { - this.connectionPolicy = connectionPolicy; - } else { - this.connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); - } + if (connectionPolicy != null) { + this.connectionPolicy = connectionPolicy; + } else { + this.connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); + } - boolean disableSessionCapturing = (ConsistencyLevel.SESSION != consistencyLevel && !sessionCapturingOverrideEnabled); + boolean disableSessionCapturing = (ConsistencyLevel.SESSION != consistencyLevel && !sessionCapturingOverrideEnabled); - this.sessionContainer = new SessionContainer(this.serviceEndpoint.getHost(), disableSessionCapturing); - this.consistencyLevel = consistencyLevel; + this.sessionContainer = new SessionContainer(this.serviceEndpoint.getHost(), disableSessionCapturing); + this.consistencyLevel = consistencyLevel; - this.userAgentContainer = new UserAgentContainer(); + this.userAgentContainer = new UserAgentContainer(); - String userAgentSuffix = this.connectionPolicy.getUserAgentSuffix(); - if (userAgentSuffix != null && userAgentSuffix.length() > 0) { - userAgentContainer.setSuffix(userAgentSuffix); - } + String userAgentSuffix = this.connectionPolicy.getUserAgentSuffix(); + if (userAgentSuffix != null && userAgentSuffix.length() > 0) { + userAgentContainer.setSuffix(userAgentSuffix); + } - this.reactorHttpClient = httpClient(); - this.globalEndpointManager = new GlobalEndpointManager(asDatabaseAccountManagerInternal(), this.connectionPolicy, /**/configs); - this.retryPolicy = new RetryPolicy(this.globalEndpointManager, this.connectionPolicy); - this.resetSessionTokenRetryPolicy = retryPolicy; + this.reactorHttpClient = httpClient(); + this.globalEndpointManager = new GlobalEndpointManager(asDatabaseAccountManagerInternal(), this.connectionPolicy, /**/configs); + this.retryPolicy = new RetryPolicy(this.globalEndpointManager, this.connectionPolicy); + this.resetSessionTokenRetryPolicy = retryPolicy; + } catch (RuntimeException e) { + logger.error("unexpected failure in initializing client.", e); + close(); + throw e; + } } private void initializeGatewayConfigurationReader() { @@ -265,7 +271,13 @@ private void initializeGatewayConfigurationReader() { //Database account should not be null here, // this.globalEndpointManager.init() must have been already called // hence asserting it - assert(databaseAccount != null); + if (databaseAccount == null) { + logger.error("Client initialization failed." + + " Check if the endpoint is reachable and if your auth token is valid"); + throw new RuntimeException("Client initialization failed." + + " Check if the endpoint is reachable and if your auth token is valid"); + } + this.useMultipleWriteLocations = this.connectionPolicy.isMultipleWriteRegionsEnabled() && BridgeInternal.isEnableMultipleWriteLocations(databaseAccount); // TODO: add support for openAsync @@ -273,28 +285,33 @@ private void initializeGatewayConfigurationReader() { } public void init() { - - // TODO: add support for openAsync - // https://msdata.visualstudio.com/CosmosDB/_workitems/edit/332589 - this.gatewayProxy = createRxGatewayProxy(this.sessionContainer, + try { + // TODO: add support for openAsync + // https://msdata.visualstudio.com/CosmosDB/_workitems/edit/332589 + this.gatewayProxy = createRxGatewayProxy(this.sessionContainer, this.consistencyLevel, this.queryCompatibilityMode, this.userAgentContainer, this.globalEndpointManager, this.reactorHttpClient); - this.globalEndpointManager.init(); - this.initializeGatewayConfigurationReader(); + this.globalEndpointManager.init(); + this.initializeGatewayConfigurationReader(); - this.collectionCache = new RxClientCollectionCache(this.sessionContainer, this.gatewayProxy, this, this.retryPolicy); - this.resetSessionTokenRetryPolicy = new ResetSessionTokenRetryPolicyFactory(this.sessionContainer, this.collectionCache, this.retryPolicy); + this.collectionCache = new RxClientCollectionCache(this.sessionContainer, this.gatewayProxy, this, this.retryPolicy); + this.resetSessionTokenRetryPolicy = new ResetSessionTokenRetryPolicyFactory(this.sessionContainer, this.collectionCache, this.retryPolicy); - this.partitionKeyRangeCache = new RxPartitionKeyRangeCache(RxDocumentClientImpl.this, + this.partitionKeyRangeCache = new RxPartitionKeyRangeCache(RxDocumentClientImpl.this, collectionCache); - if (this.connectionPolicy.getConnectionMode() == ConnectionMode.GATEWAY) { - this.storeModel = this.gatewayProxy; - } else { - this.initializeDirectConnectivity(); + if (this.connectionPolicy.getConnectionMode() == ConnectionMode.GATEWAY) { + this.storeModel = this.gatewayProxy; + } else { + this.initializeDirectConnectivity(); + } + } catch (Exception e) { + logger.error("unexpected failure in initializing client.", e); + close(); + throw e; } } @@ -3316,11 +3333,7 @@ public void close() { logger.info("Closing StoreClientFactory ..."); LifeCycleUtils.closeQuietly(this.storeClientFactory); logger.info("Shutting down reactorHttpClient ..."); - try { - this.reactorHttpClient.shutdown(); - } catch (Exception e) { - logger.warn("shutting down reactorHttpClient failed", e); - } + LifeCycleUtils.closeQuietly(this.reactorHttpClient); logger.info("Shutting down completed."); } From d71fd3a6db2ef3a77370c97406760504c2754c38 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Wed, 2 Sep 2020 17:56:35 -0700 Subject: [PATCH 066/168] Update AfterBurner version to match other Jackson versions (#14745) * Update AfterBurner version to match other Jackson versions * Remove all unnecessary Maven enforcer includes --- eng/versioning/external_dependencies.txt | 2 +- sdk/cosmos/azure-cosmos-encryption/pom.xml | 15 --------------- sdk/cosmos/azure-cosmos/pom.xml | 4 ++-- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 2ba2cc5e0839b..339ce09844b75 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -268,7 +268,7 @@ org.revapi:revapi-maven-plugin;0.11.2 test_jar_com.microsoft.azure:azure-mgmt-resources;1.3.1-SNAPSHOT # everything under sdk\cosmos -cosmos_com.fasterxml.jackson.module:jackson-module-afterburner;2.10.1 +cosmos_com.fasterxml.jackson.module:jackson-module-afterburner;2.11.2 cosmos_com.google.guava:guava;25.0-jre cosmos_io.dropwizard.metrics:metrics-core;4.1.0 cosmos_io.dropwizard.metrics:metrics-graphite;4.1.0 diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml index 6e9de3da3ee40..9b42a6a5d7ace 100644 --- a/sdk/cosmos/azure-cosmos-encryption/pom.xml +++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml @@ -235,21 +235,6 @@ Licensed under the MIT License. com.azure:* - com.fasterxml.jackson.core:jackson-core:[2.11.2] - com.fasterxml.jackson.core:jackson-annotations:[2.11.2] - com.fasterxml.jackson.core:jackson-databind:[2.11.2] - com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.11.2] - com.fasterxml.jackson.module:jackson-module-afterburner:[2.10.1] - io.dropwizard.metrics:metrics-core:[4.1.0] - io.netty:netty-codec-http:[4.1.51.Final] - io.netty:netty-codec-http2:[4.1.51.Final] - io.netty:netty-handler:[4.1.51.Final] - io.netty:netty-handler-proxy:[4.1.51.Final] - io.netty:netty-transport-native-epoll:[4.1.51.Final] - io.projectreactor:reactor-core:[3.3.9.RELEASE] - io.projectreactor.netty:reactor-netty:[0.9.11.RELEASE] - org.slf4j:slf4j-api:[1.7.30] - org.slf4j:slf4j-api:[1.7.30] org.bouncycastle:bcprov-jdk15on:[1.60] diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index fe687bdef68f6..90d79d86109c0 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -131,7 +131,7 @@ Licensed under the MIT License. com.fasterxml.jackson.module jackson-module-afterburner - 2.10.1 + 2.11.2 @@ -277,7 +277,7 @@ Licensed under the MIT License. com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.11.2] - com.fasterxml.jackson.module:jackson-module-afterburner:[2.10.1] + com.fasterxml.jackson.module:jackson-module-afterburner:[2.11.2] io.dropwizard.metrics:metrics-core:[4.1.0] io.micrometer:micrometer-core:[1.5.4] io.netty:netty-codec-http:[4.1.51.Final] From 4b3a9f8e6c944fe5992673b1ec803619414591e1 Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Wed, 2 Sep 2020 17:59:08 -0700 Subject: [PATCH 067/168] Update generated ADT code to reflect swagger changes (#14760) The local swagger copy isn't used in code gen, but this keeps it up to date anyways --- .../digitaltwins/core/implementation/DigitalTwinModelsImpl.java | 2 +- .../swagger/2020-05-31-preview/digitaltwins.json | 2 +- .../swagger/2020-05-31-preview/examples/ModelAdd.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java index a7823d8fbb1c2..23485ec9ee3d4 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java @@ -61,7 +61,7 @@ public final class DigitalTwinModelsImpl { @ServiceInterface(name = "AzureDigitalTwinsAPI") private interface DigitalTwinModelsService { @Post("/models") - @ExpectedResponses({200}) + @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ErrorResponseException.class) Mono>> add( @HostParam("$host") String host, diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/digitaltwins.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/digitaltwins.json index b17bda7284649..fe035fde82aae 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/digitaltwins.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/digitaltwins.json @@ -48,7 +48,7 @@ } ], "responses": { - "200": { + "201": { "description": "Success", "schema": { "$ref": "#/definitions/NonPagedModelDataCollection" diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelAdd.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelAdd.json index b376ddb148608..b8b2b44eace4c 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelAdd.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelAdd.json @@ -31,7 +31,7 @@ "api-version": "2020-05-31-preview" }, "responses": { - "200": { + "201": { "body": [ { "id": "dtmi:com:example:Sample;1", From 2d02daff5ffaf88e2da1abc78e9eb03dae6c0e31 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 2 Sep 2020 20:46:01 -0700 Subject: [PATCH 068/168] Sync eng/common directory with azure-sdk-tools repository for Tools PR 946 (#14758) --- eng/common/Update-Change-Log.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/Update-Change-Log.ps1 b/eng/common/Update-Change-Log.ps1 index a819a05e8bb2e..6380e3ff800a2 100644 --- a/eng/common/Update-Change-Log.ps1 +++ b/eng/common/Update-Change-Log.ps1 @@ -1,4 +1,4 @@ -# Note: This script will add or replace version title in change log +# Note: This script will add or replace version title in change log # Parameter description # Version : Version to add or replace in change log From 99491d49a55e5d23b4aea1a2b5f33260e1676ade Mon Sep 17 00:00:00 2001 From: wcom939 Date: Wed, 2 Sep 2020 23:48:49 -0400 Subject: [PATCH 069/168] Updating libraries with dependency vulnerable to CVE-2020-11612 (#14590) Updating a library that has a dependency library vulnerable to https://nvd.nist.gov/vuln/detail/CVE-2020-11612 --- eng/versioning/external_dependencies.txt | 2 +- sdk/parents/azure-arm-parent/pom.xml | 2 +- sdk/servicebus/microsoft-azure-servicebus/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 339ce09844b75..89a2d39273675 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -69,7 +69,7 @@ org.apache.logging.log4j:log4j-slf4j-impl;2.13.3 org.apache.qpid:proton-j;0.33.4 org.apache.qpid:qpid-jms-client;0.53.0 org.apache.tinkerpop:gremlin-driver;3.2.4 -org.asynchttpclient:async-http-client;2.10.5 +org.asynchttpclient:async-http-client;2.12.1 org.codehaus.groovy:groovy-eclipse-batch;2.5.8-01 org.codehaus.groovy:groovy-eclipse-compiler;3.4.0-01 org.hibernate.validator:hibernate-validator;6.1.5.Final diff --git a/sdk/parents/azure-arm-parent/pom.xml b/sdk/parents/azure-arm-parent/pom.xml index 691f31787af2e..db02773b46b9c 100644 --- a/sdk/parents/azure-arm-parent/pom.xml +++ b/sdk/parents/azure-arm-parent/pom.xml @@ -57,7 +57,7 @@ 0.9.0.RELEASE 4.1.42.Final 4.2.2 - 2.10.4 + 2.12.1 1.2.4 24.1.1-jre 1.7.0 diff --git a/sdk/servicebus/microsoft-azure-servicebus/pom.xml b/sdk/servicebus/microsoft-azure-servicebus/pom.xml index 073d5ed95f849..6f783e12dbc53 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/pom.xml +++ b/sdk/servicebus/microsoft-azure-servicebus/pom.xml @@ -73,7 +73,7 @@ org.asynchttpclient async-http-client - 2.10.5 + 2.12.1 com.microsoft.azure From 6167cfad857e9d2fa0c2090b45242cedff138433 Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Thu, 3 Sep 2020 14:33:43 +0800 Subject: [PATCH 070/168] Mgmt: update ci (#14771) * Mgmt: update ci * add redis --- sdk/resourcemanager/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sdk/resourcemanager/ci.yml b/sdk/resourcemanager/ci.yml index 4fa9815dc0dd6..023ff8b91713a 100644 --- a/sdk/resourcemanager/ci.yml +++ b/sdk/resourcemanager/ci.yml @@ -56,6 +56,9 @@ extends: - name: azure-resourcemanager-dns groupId: com.azure.resourcemanager safeName: azureresourcemanagerdns + - name: azure-resourcemanager-eventhubs + groupId: com.azure.resourcemanager + safeName: azureresourcemanagereventhubs - name: azure-resourcemanager-keyvault groupId: com.azure.resourcemanager safeName: azureresourcemanagerkeyvault @@ -68,6 +71,12 @@ extends: - name: azure-resourcemanager-network groupId: com.azure.resourcemanager safeName: azureresourcemanagernetwork + - name: azure-resourcemanager-privatedns + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerprivatedns + - name: azure-resourcemanager-redis + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerredis - name: azure-resourcemanager-resources groupId: com.azure.resourcemanager safeName: azureresourcemanagerresources @@ -80,3 +89,6 @@ extends: - name: azure-resourcemanager-storage groupId: com.azure.resourcemanager safeName: azureresourcemanagerstorage + - name: azure-resourcemanager-trafficmanager + groupId: com.azure.resourcemanager + safeName: azureresourcemanagertrafficmanager From 6a2d823e6614f05e18a7f1f86f1e62528dcd79e5 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Thu, 3 Sep 2020 21:26:03 +0800 Subject: [PATCH 071/168] mgmt skip traffic sample test for CI random failure (#14732) * mgmt skip traffic sample test for CI random failure * skip testTrafficManager() --- .../resourcemanager/samples/TrafficManagerSampleTests.java | 3 +++ .../src/test/java/com/azure/resourcemanager/AzureTests.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java index 688cd31c9c807..94a0c961cbe5b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java @@ -12,6 +12,9 @@ public class TrafficManagerSampleTests extends SamplesTestBase { @Test public void testManageSimpleTrafficManager() { + if (isPlaybackMode()) { + return; // TODO: fix playback random fail + } Assertions.assertTrue(ManageSimpleTrafficManager.runSample(azure)); } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java index 53492c1d2a94c..65f1f59d14403 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java @@ -1098,6 +1098,9 @@ public void createStorageAccount() throws Exception { @Test public void testTrafficManager() throws Exception { + if (isPlaybackMode()) { + return; // TODO: fix playback random fail + } new TestTrafficManager(azure.publicIpAddresses()) .runTest(azure.trafficManagerProfiles(), azure.resourceGroups()); } From 4647a581bfde45e1fb678a00d7444fc72e9b5a73 Mon Sep 17 00:00:00 2001 From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com> Date: Thu, 3 Sep 2020 10:16:12 -0700 Subject: [PATCH 072/168] Re-enabled encryption scope tests (#14699) --- .../com/azure/storage/blob/CPKNTest.groovy | 36 +--- .../CPKNTestappendblobappendblock.json | 115 +++++++++++++ .../CPKNTestappendblobappendblockfromurl.json | 139 +++++++++++++++ .../CPKNTestappendblobclientbuildercheck.json | 65 +++++++ .../CPKNTestappendblobcreate.json | 88 ++++++++++ .../CPKNTestblobclientbuildercheck.json | 65 +++++++ .../CPKNTestblockblobclientbuildercheck.json | 65 +++++++ .../CPKNTestblockblobcommitblocklist.json | 113 +++++++++++++ .../CPKNTestblockblobstageblock.json | 114 +++++++++++++ .../CPKNTestblockblobupload.json | 91 ++++++++++ .../CPKNTestcontainerclientbuildercheck.json | 65 +++++++ .../CPKNTestcontainercreate.json | 105 ++++++++++++ ...tcontainerdenyencryptionscopeoverride.json | 127 ++++++++++++++ .../CPKNTestcontainerlistblobsflat.json | 149 ++++++++++++++++ ...PKNTestcontainerlistblobshierarchical.json | 149 ++++++++++++++++ .../CPKNTestpageblobclearpage.json | 136 +++++++++++++++ .../CPKNTestpageblobclientbuildercheck.json | 65 +++++++ .../CPKNTestpageblobcreate.json | 88 ++++++++++ .../CPKNTestpageblobputmultiplepages.json | 114 +++++++++++++ .../CPKNTestpageblobputpage.json | 114 +++++++++++++ .../CPKNTestpageblobputpagefromurl.json | 160 ++++++++++++++++++ .../CPKNTestpageblobresize.json | 110 ++++++++++++ .../CPKNTestserviceclientbuildercheck.json | 65 +++++++ sdk/storage/test-resources.json | 14 ++ 24 files changed, 2317 insertions(+), 35 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobappendblock.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobappendblockfromurl.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobclientbuildercheck.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobcreate.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblobclientbuildercheck.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobclientbuildercheck.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobcommitblocklist.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobstageblock.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobupload.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerclientbuildercheck.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainercreate.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerdenyencryptionscopeoverride.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerlistblobsflat.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerlistblobshierarchical.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobclearpage.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobclientbuildercheck.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobcreate.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputmultiplepages.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputpage.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputpagefromurl.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobresize.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestserviceclientbuildercheck.json diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKNTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKNTest.groovy index dcfafaf769fd9..d1955a26c250c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKNTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKNTest.groovy @@ -1,7 +1,5 @@ package com.azure.storage.blob -import com.azure.core.http.policy.HttpLogDetailLevel -import com.azure.core.http.policy.HttpLogOptions import com.azure.core.test.TestMode import com.azure.storage.blob.models.BlobContainerEncryptionScope import com.azure.storage.blob.models.BlobItem @@ -12,11 +10,9 @@ import com.azure.storage.blob.models.PageRange import com.azure.storage.blob.sas.BlobSasPermission import com.azure.storage.blob.sas.BlobServiceSasSignatureValues import com.azure.storage.blob.specialized.AppendBlobClient -import com.azure.storage.blob.specialized.BlobClientBase import com.azure.storage.blob.specialized.BlockBlobClient import com.azure.storage.blob.specialized.PageBlobClient import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder -import spock.lang.Ignore import java.time.OffsetDateTime @@ -32,16 +28,12 @@ class CPKNTest extends APISpec { BlockBlobClient cpknBlockBlob PageBlobClient cpknPageBlob AppendBlobClient cpknAppendBlob - BlobClientBase cpknExistingBlob def setup() { es = scope1 ces = new BlobContainerEncryptionScope().setDefaultEncryptionScope(scope2).setEncryptionScopeOverridePrevented(true) - builder = new BlobContainerClientBuilder() - .endpoint(cc.getBlobContainerUrl().toString()) - .httpClient(getHttpClient()) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + builder = getContainerClientBuilder(cc.getBlobContainerUrl()) .credential(primaryCredential) if (testMode == TestMode.RECORD && recordLiveMode) { @@ -53,13 +45,8 @@ class CPKNTest extends APISpec { cpknBlockBlob = cpknContainer.getBlobClient(generateBlobName()).getBlockBlobClient() cpknPageBlob = cpknContainer.getBlobClient(generateBlobName()).getPageBlobClient() cpknAppendBlob = cpknContainer.getBlobClient(generateBlobName()).getAppendBlobClient() - - def existingBlobSetup = cpknContainer.getBlobClient(generateBlobName()).getBlockBlobClient() - existingBlobSetup.upload(defaultInputStream.get(), defaultDataSize) - cpknExistingBlob = existingBlobSetup } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Container create"() { when: BlobContainerClient cpkncesContainer = builder.blobContainerEncryptionScope(ces).encryptionScope(null) @@ -70,7 +57,6 @@ class CPKNTest extends APISpec { response.getStatusCode() == 201 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Container deny encryption scope override"() { setup: BlobContainerClient cpkncesContainer = builder.blobContainerEncryptionScope(ces) @@ -90,7 +76,6 @@ class CPKNTest extends APISpec { thrown(BlobStorageException) } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Container list blobs flat"() { setup: BlobContainerClient cpkncesContainer = builder @@ -111,7 +96,6 @@ class CPKNTest extends APISpec { blob.getProperties().getEncryptionScope() == scope2 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Container list blobs hierarchical"() { setup: BlobContainerClient cpkncesContainer = builder @@ -132,7 +116,6 @@ class CPKNTest extends APISpec { blob.getProperties().getEncryptionScope() == scope2 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Append blob create"() { when: def response = cpknAppendBlob.createWithResponse(null, null, null, null, null) @@ -143,7 +126,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Append blob append block"() { setup: cpknAppendBlob.create() @@ -158,7 +140,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Append blob append block from URL"() { setup: cpknAppendBlob.create() @@ -183,7 +164,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Page blob create"() { when: def response = cpknPageBlob.createWithResponse(1024, null, null, null, null, null, null) @@ -194,7 +174,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Page blob put page"() { setup: cpknPageBlob.create(PageBlobClient.PAGE_BYTES) @@ -209,7 +188,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Page blob put page from URL"() { setup: def blobName = generateBlobName() @@ -238,7 +216,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Page blob put multiple pages"() { setup: cpknPageBlob.create(PageBlobClient.PAGE_BYTES * 2) @@ -253,7 +230,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Page blob clear page"() { setup: cpknPageBlob.create(PageBlobClient.PAGE_BYTES * 2) @@ -268,7 +244,6 @@ class CPKNTest extends APISpec { response.getStatusCode() == 201 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Page blob resize"() { setup: cpknPageBlob.create(PageBlobClient.PAGE_BYTES * 2) @@ -278,7 +253,6 @@ class CPKNTest extends APISpec { response.getStatusCode() == 200 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Block blob upload"() { setup: def response = cpknBlockBlob.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, null, null, @@ -290,7 +264,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Block blob stage block"() { setup: cpknBlockBlob.upload(defaultInputStream.get(), defaultDataSize) @@ -304,7 +277,6 @@ class CPKNTest extends APISpec { headers.getValue("x-ms-encryption-scope") == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Block blob commit block list"() { setup: def blockID = getBlockID() @@ -320,7 +292,6 @@ class CPKNTest extends APISpec { response.getValue().getEncryptionScope() == scope1 } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Service client builder check"() { when: new BlobServiceClientBuilder() @@ -332,7 +303,6 @@ class CPKNTest extends APISpec { thrown(IllegalArgumentException) } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Container client builder check"() { when: new BlobContainerClientBuilder() @@ -344,7 +314,6 @@ class CPKNTest extends APISpec { thrown(IllegalArgumentException) } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Blob client builder check"() { when: new BlobClientBuilder() @@ -358,7 +327,6 @@ class CPKNTest extends APISpec { thrown(IllegalArgumentException) } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Append blob client builder check"() { when: new SpecializedBlobClientBuilder() @@ -372,7 +340,6 @@ class CPKNTest extends APISpec { thrown(IllegalArgumentException) } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Block blob client builder check"() { when: new SpecializedBlobClientBuilder() @@ -386,7 +353,6 @@ class CPKNTest extends APISpec { thrown(IllegalArgumentException) } - @Ignore("Live tests always error with 'Customer-provided keys are disabled.'") def "Page blob client builder check"() { when: new SpecializedBlobClientBuilder() diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobappendblock.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobappendblock.json new file mode 100644 index 0000000000000..46d2d8a2c76bf --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobappendblock.json @@ -0,0 +1,115 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblock0cpkntestappendblobappendblock33a50789?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c971892-6b73-4ce5-ae85-76ed002c8d10" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7C0D30FE", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa203-401e-0078-3da7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "3c971892-6b73-4ce5-ae85-76ed002c8d10" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblock0cpkntestappendblobappendblock33a50789/javablobappendblobappendblock3380124ef00e3054bf49", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a3a1b2e-4805-4308-b5a9-b03406de8f05" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7C1718EE", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa20e-401e-0078-47a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "7a3a1b2e-4805-4308-b5a9-b03406de8f05", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblock0cpkntestappendblobappendblock33a50789/javablobappendblobappendblock3380124ef00e3054bf49?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "854fab31-3fc9-49a0-9acc-62ba186bb31d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-blob-committed-block-count" : "1", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:10 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "ETag" : "0x8D84EBE7C2461CC", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa21e-401e-0078-54a7-80793a000000", + "x-ms-client-request-id" : "854fab31-3fc9-49a0-9acc-62ba186bb31d", + "x-ms-blob-append-offset" : "0", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblobappendblock&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "161c2a33-ec7e-4246-b3c0-e1ff95e86dbe" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa22d-401e-0078-60a7-80793a000000", + "Body" : "jtcappendblobappendblockjtcappendblobappendblock0cpkntestappendblobappendblock33a50789Tue, 01 Sep 2020 21:32:10 GMT\"0x8D84EBE7C0D30FE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "161c2a33-ec7e-4246-b3c0-e1ff95e86dbe", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblock0cpkntestappendblobappendblock33a50789?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9bd07b4-5cd1-46f5-917f-93e8c0ddd790" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa239-401e-0078-6aa7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "f9bd07b4-5cd1-46f5-917f-93e8c0ddd790" + }, + "Exception" : null + } ], + "variables" : [ "jtcappendblobappendblock0cpkntestappendblobappendblock33a50789", "javablobappendblobappendblock15885410d4831058dc4b", "javablobappendblobappendblock246059f4c129d378b34b", "javablobappendblobappendblock3380124ef00e3054bf49" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobappendblockfromurl.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobappendblockfromurl.json new file mode 100644 index 0000000000000..993c6b726c269 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobappendblockfromurl.json @@ -0,0 +1,139 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblockfromurl02796521c064f147bb4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a01bcc60-ee56-4dfb-a4a0-4a74a83b609a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7C445090", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa251-401e-0078-01a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "a01bcc60-ee56-4dfb-a4a0-4a74a83b609a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblockfromurl02796521c064f147bb4/javablobappendblobappendblockfromurl3855821e3989cd45", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a81e108d-6d96-4ba9-b126-f6de629f158e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7C4E5F9E", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa258-401e-0078-07a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "a81e108d-6d96-4ba9-b126-f6de629f158e", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblockfromurl02796521c064f147bb4/javablobappendblobappendblockfromurl48649581dcd65845", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "11504216-edfa-4cc6-95e2-4e67c7e9d2e9", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:11 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:10 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D84EBE7C5BCF95", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa26c-401e-0078-19a7-80793a000000", + "x-ms-client-request-id" : "11504216-edfa-4cc6-95e2-4e67c7e9d2e9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblockfromurl02796521c064f147bb4/javablobappendblobappendblockfromurl3855821e3989cd45?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "8f65844f-7832-42fe-8945-02e45b2fd1bf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-committed-block-count" : "1", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:11 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:10 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D84EBE7CD7F3FA", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa28e-401e-0078-35a7-80793a000000", + "x-ms-client-request-id" : "8f65844f-7832-42fe-8945-02e45b2fd1bf", + "x-ms-blob-append-offset" : "0", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblobappendblockfromurl&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d32bb7f-4cf7-47cb-b78d-7d22692255d6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa353-401e-0078-57a7-80793a000000", + "Body" : "jtcappendblobappendblockfromurljtcappendblobappendblockfromurl02796521c064f147bb4Tue, 01 Sep 2020 21:32:10 GMT\"0x8D84EBE7C445090\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:10 GMT", + "x-ms-client-request-id" : "0d32bb7f-4cf7-47cb-b78d-7d22692255d6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobappendblockfromurl02796521c064f147bb4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4f5a382-fd3d-4861-9433-f3fdafc32689" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa35b-401e-0078-5fa7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "b4f5a382-fd3d-4861-9433-f3fdafc32689" + }, + "Exception" : null + } ], + "variables" : [ "jtcappendblobappendblockfromurl02796521c064f147bb4", "javablobappendblobappendblockfromurl18378868bbb85dbd", "javablobappendblobappendblockfromurl258546afc9ab4119", "javablobappendblobappendblockfromurl3855821e3989cd45", "javablobappendblobappendblockfromurl48649581dcd65845" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobclientbuildercheck.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobclientbuildercheck.json new file mode 100644 index 0000000000000..abc86c0fb8796 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobclientbuildercheck.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobclientbuildercheck02786433b6c72753df4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f66ee959-7b38-4eb4-8200-e414bec92132" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7F0D681D", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:15 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa6fa-401e-0078-4da7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "f66ee959-7b38-4eb4-8200-e414bec92132" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblobclientbuildercheck&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "246c7872-ed9c-403b-aad9-9b4b94cd7531" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa706-401e-0078-58a7-80793a000000", + "Body" : "jtcappendblobclientbuildercheckjtcappendblobclientbuildercheck02786433b6c72753df4Tue, 01 Sep 2020 21:32:15 GMT\"0x8D84EBE7F0D681D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "246c7872-ed9c-403b-aad9-9b4b94cd7531", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobclientbuildercheck02786433b6c72753df4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "537f8776-48d4-413b-915e-21903c4d9d4a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa70d-401e-0078-5da7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "537f8776-48d4-413b-915e-21903c4d9d4a" + }, + "Exception" : null + } ], + "variables" : [ "jtcappendblobclientbuildercheck02786433b6c72753df4", "javablobappendblobclientbuildercheck113490ba2c569640", "javablobappendblobclientbuildercheck276171db351d8c16", "javablobappendblobclientbuildercheck342495853cf4c21d", "javablobappendblobclientbuildercheck479956084f305d81" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobcreate.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobcreate.json new file mode 100644 index 0000000000000..7bd0fd30dbf26 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestappendblobcreate.json @@ -0,0 +1,88 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobcreate0cpkntestappendblobcreate5e9406993edd7?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c4f18f2-b908-4eb4-b1ba-e093b5039f26" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7BE75299", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa1d3-401e-0078-12a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "7c4f18f2-b908-4eb4-b1ba-e093b5039f26" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobcreate0cpkntestappendblobcreate5e9406993edd7/javablobappendblobcreate3cpkntestappendblobcreate5e9488212c8", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "09a69217-ce64-4c84-bbc0-adb67a795e69" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7BF1FE03", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:10 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa1e2-401e-0078-20a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "09a69217-ce64-4c84-bbc0-adb67a795e69", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblobcreate&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e38120e-7fa0-484d-848c-ad54930cef21" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa1ee-401e-0078-2ba7-80793a000000", + "Body" : "jtcappendblobcreatejtcappendblobcreate0cpkntestappendblobcreate5e9406993edd7Tue, 01 Sep 2020 21:32:10 GMT\"0x8D84EBE7BE75299\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "7e38120e-7fa0-484d-848c-ad54930cef21", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblobcreate0cpkntestappendblobcreate5e9406993edd7?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "d041b72f-0a55-48c8-8b16-d8c97b0219b0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa1ff-401e-0078-3aa7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "d041b72f-0a55-48c8-8b16-d8c97b0219b0" + }, + "Exception" : null + } ], + "variables" : [ "jtcappendblobcreate0cpkntestappendblobcreate5e9406993edd7", "javablobappendblobcreate1cpkntestappendblobcreate5e952634aa6", "javablobappendblobcreate2cpkntestappendblobcreate5e93085793a", "javablobappendblobcreate3cpkntestappendblobcreate5e9488212c8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblobclientbuildercheck.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblobclientbuildercheck.json new file mode 100644 index 0000000000000..e79c98876fa03 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblobclientbuildercheck.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientbuildercheck0984256f4d2a76253341a2?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "50744231-8394-4f15-98e2-f31a949aaef2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7EF1C4C0", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:15 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa6db-401e-0078-36a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "50744231-8394-4f15-98e2-f31a949aaef2" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobclientbuildercheck&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "34e96eeb-24a6-42e2-8e10-9cb8c8047847" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa6e8-401e-0078-3fa7-80793a000000", + "Body" : "jtcblobclientbuildercheckjtcblobclientbuildercheck0984256f4d2a76253341a2Tue, 01 Sep 2020 21:32:15 GMT\"0x8D84EBE7EF1C4C0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "34e96eeb-24a6-42e2-8e10-9cb8c8047847", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientbuildercheck0984256f4d2a76253341a2?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f4b1876-9d3b-42fb-9a2e-b648ae645ee4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa6eb-401e-0078-42a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "9f4b1876-9d3b-42fb-9a2e-b648ae645ee4" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobclientbuildercheck0984256f4d2a76253341a2", "javablobblobclientbuildercheck165734233bbeafe0994", "javablobblobclientbuildercheck210040256cb88d98e34", "javablobblobclientbuildercheck3486954d4fa2081f9a4", "javablobblobclientbuildercheck471658df2459221c284" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobclientbuildercheck.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobclientbuildercheck.json new file mode 100644 index 0000000000000..729b07a3ca8cf --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobclientbuildercheck.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobclientbuildercheck093649d9e2fe3feda94?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "0acaa82f-75d6-4774-926c-214d11991542" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7F2AB974", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:15 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa723-401e-0078-6da7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "0acaa82f-75d6-4774-926c-214d11991542" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblockblobclientbuildercheck&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd07741a-84e2-4521-a65c-b939cac1f6fe" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa731-401e-0078-77a7-80793a000000", + "Body" : "jtcblockblobclientbuildercheckjtcblockblobclientbuildercheck093649d9e2fe3feda94Tue, 01 Sep 2020 21:32:15 GMT\"0x8D84EBE7F2AB974\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "fd07741a-84e2-4521-a65c-b939cac1f6fe", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobclientbuildercheck093649d9e2fe3feda94?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "eeb59edb-4803-4cfc-af54-c9ad1c25654a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa73d-401e-0078-7fa7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "eeb59edb-4803-4cfc-af54-c9ad1c25654a" + }, + "Exception" : null + } ], + "variables" : [ "jtcblockblobclientbuildercheck093649d9e2fe3feda94", "javablobblockblobclientbuildercheck1148618fc921d579c", "javablobblockblobclientbuildercheck21377366a04a169de", "javablobblockblobclientbuildercheck349086751f14b5dc1", "javablobblockblobclientbuildercheck412301def1d4e4c2f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobcommitblocklist.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobcommitblocklist.json new file mode 100644 index 0000000000000..d34b15244cda6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobcommitblocklist.json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobcommitblocklist0261258fa6e0bf644d42a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "565155f4-bafc-4dee-a6d3-eb8567e681b6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7E86BAA3", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:14 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa613-401e-0078-18a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "565155f4-bafc-4dee-a6d3-eb8567e681b6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobcommitblocklist0261258fa6e0bf644d42a/javablobblockblobcommitblocklist1846900cbaa7fc9166?blockid=YjlkNzViNGYtNzE1Yy00YjYxLWFiZTYtMWFiYTdhNzZhYWY4&comp=block", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a8da687-d84d-44cb-81db-d31e519ed15d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa61e-401e-0078-20a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "4a8da687-d84d-44cb-81db-d31e519ed15d", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobcommitblocklist0261258fa6e0bf644d42a/javablobblockblobcommitblocklist1846900cbaa7fc9166?comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "cbe5f02d-8efb-4075-88c6-33cced95fe47", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "HjqwWPek2Ew=", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "ETag" : "0x8D84EBE7E9D4F17", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa63a-401e-0078-34a7-80793a000000", + "x-ms-client-request-id" : "cbe5f02d-8efb-4075-88c6-33cced95fe47", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblockblobcommitblocklist&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "19024423-c73a-41f7-b65a-0ee8cdb94496" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa64b-401e-0078-45a7-80793a000000", + "Body" : "jtcblockblobcommitblocklistjtcblockblobcommitblocklist0261258fa6e0bf644d42aTue, 01 Sep 2020 21:32:14 GMT\"0x8D84EBE7E86BAA3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "19024423-c73a-41f7-b65a-0ee8cdb94496", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobcommitblocklist0261258fa6e0bf644d42a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1262356a-d6dc-4795-8ab2-3048d1efe33e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa657-401e-0078-4fa7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "1262356a-d6dc-4795-8ab2-3048d1efe33e" + }, + "Exception" : null + } ], + "variables" : [ "jtcblockblobcommitblocklist0261258fa6e0bf644d42a", "javablobblockblobcommitblocklist1846900cbaa7fc9166", "javablobblockblobcommitblocklist203086b29ea3ed4d89", "javablobblockblobcommitblocklist39814707cab9e0320c", "b9d75b4f-715c-4b61-abe6-1aba7a76aaf8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobstageblock.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobstageblock.json new file mode 100644 index 0000000000000..efc29e40f459c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobstageblock.json @@ -0,0 +1,114 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobstageblock0cpkntestblockblobstageblock4e24075397?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6205b441-6686-4f04-b925-7f6484ad46ac" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7E52F70C", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:14 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa5d3-401e-0078-62a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "6205b441-6686-4f04-b925-7f6484ad46ac" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobstageblock0cpkntestblockblobstageblock4e24075397/javablobblockblobstageblock1680390959edb34d7b414", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "96d5a746-3cd0-498e-9f5d-eaa6c0de355d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D84EBE7E5CB7EB", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa5e0-401e-0078-6da7-80793a000000", + "x-ms-client-request-id" : "96d5a746-3cd0-498e-9f5d-eaa6c0de355d", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobstageblock0cpkntestblockblobstageblock4e24075397/javablobblockblobstageblock1680390959edb34d7b414?blockid=NGFlMjk2ZWYtMTJjNy00N2U4LTg1ZGEtZWEyYzQ1ZTUyODg5&comp=block", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "54924f43-54bc-416b-8d35-e29bd060811e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa5e7-401e-0078-73a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "54924f43-54bc-416b-8d35-e29bd060811e", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblockblobstageblock&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2df5327f-947a-40cb-9de0-81beb43e3ab6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa5f6-401e-0078-80a7-80793a000000", + "Body" : "jtcblockblobstageblockjtcblockblobstageblock0cpkntestblockblobstageblock4e24075397Tue, 01 Sep 2020 21:32:14 GMT\"0x8D84EBE7E52F70C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "2df5327f-947a-40cb-9de0-81beb43e3ab6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobstageblock0cpkntestblockblobstageblock4e24075397?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "29244887-ba71-492f-b79d-1dbb217d1800" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa5ff-401e-0078-08a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "29244887-ba71-492f-b79d-1dbb217d1800" + }, + "Exception" : null + } ], + "variables" : [ "jtcblockblobstageblock0cpkntestblockblobstageblock4e24075397", "javablobblockblobstageblock1680390959edb34d7b414", "javablobblockblobstageblock2711195cabf95a29204fe", "javablobblockblobstageblock3467323f6a5a3338c1423", "4ae296ef-12c7-47e8-85da-ea2c45e52889" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobupload.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobupload.json new file mode 100644 index 0000000000000..561654d49a82a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestblockblobupload.json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobupload0cpkntestblockblobuploadaa8645735e4699?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "c1aba29f-d83e-4c68-b202-23cd3ac262ab" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7E2BDFF4", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:14 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa569-401e-0078-13a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "c1aba29f-d83e-4c68-b202-23cd3ac262ab" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobupload0cpkntestblockblobuploadaa8645735e4699/javablobblockblobupload1cpkntestblockblobuploadaa8059827df5", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f19deecb-e1fc-4980-877e-e6fdbc948a3d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D84EBE7E35EEF7", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa5a3-401e-0078-42a7-80793a000000", + "x-ms-client-request-id" : "f19deecb-e1fc-4980-877e-e6fdbc948a3d", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblockblobupload&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "c727f5e6-4145-4c3d-99cc-7c815ec249e6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa5b8-401e-0078-50a7-80793a000000", + "Body" : "jtcblockblobuploadjtcblockblobupload0cpkntestblockblobuploadaa8645735e4699Tue, 01 Sep 2020 21:32:14 GMT\"0x8D84EBE7E2BDFF4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "c727f5e6-4145-4c3d-99cc-7c815ec249e6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblockblobupload0cpkntestblockblobuploadaa8645735e4699?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a371ffa8-9b24-46be-b83d-08471edeffa1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa5c5-401e-0078-59a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "a371ffa8-9b24-46be-b83d-08471edeffa1" + }, + "Exception" : null + } ], + "variables" : [ "jtcblockblobupload0cpkntestblockblobuploadaa8645735e4699", "javablobblockblobupload1cpkntestblockblobuploadaa8059827df5", "javablobblockblobupload2cpkntestblockblobuploadaa85184782ce", "javablobblockblobupload3cpkntestblockblobuploadaa8692367dfb" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerclientbuildercheck.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerclientbuildercheck.json new file mode 100644 index 0000000000000..9b051e55349cc --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerclientbuildercheck.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerclientbuildercheck02390668223937e17f4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae3281d2-9c41-4ff2-8ed6-a1a5be6cfe04" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7ED4E8BD", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:15 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa695-401e-0078-80a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "ae3281d2-9c41-4ff2-8ed6-a1a5be6cfe04" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainerclientbuildercheck&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "0409cff2-dbb1-4543-ab68-fbb78ff07eef" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa6ad-401e-0078-11a7-80793a000000", + "Body" : "jtccontainerclientbuildercheckjtccontainerclientbuildercheck02390668223937e17f4Tue, 01 Sep 2020 21:32:15 GMT\"0x8D84EBE7ED4E8BD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "0409cff2-dbb1-4543-ab68-fbb78ff07eef", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerclientbuildercheck02390668223937e17f4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "621260fd-873f-44c6-a26f-ccf449e124be" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa6c3-401e-0078-22a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "621260fd-873f-44c6-a26f-ccf449e124be" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainerclientbuildercheck02390668223937e17f4", "javablobcontainerclientbuildercheck101602b78a3f1d5ad", "javablobcontainerclientbuildercheck202459131636e0376", "javablobcontainerclientbuildercheck362917ccfe6af2e4c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainercreate.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainercreate.json new file mode 100644 index 0000000000000..c0eb964fb69d8 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainercreate.json @@ -0,0 +1,105 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainercreate0cpkntestcontainercreate04c38989ff352b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ffa183b-836b-47ea-a743-450e038c0e5b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7AB6272B", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:08 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f0c44aaf-c01e-0014-2ca7-8092ad000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "0ffa183b-836b-47ea-a743-450e038c0e5b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainercreate4cpkntestcontainercreate04c43392f1a6d7?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a480daab-b19d-467a-aa23-21d70789101c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7AD1F1A3", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:08 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f0c44acf-c01e-0014-46a7-8092ad000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "a480daab-b19d-467a-aa23-21d70789101c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainercreate&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2b5aba85-ff1b-48f3-9f21-b4abc22e0c8b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f0c44adf-c01e-0014-53a7-8092ad000000", + "Body" : "jtccontainercreatejtccontainercreate0cpkntestcontainercreate04c38989ff352bTue, 01 Sep 2020 21:32:08 GMT\"0x8D84EBE7AB6272B\"unlockedavailable$account-encryption-keyfalsefalsefalsejtccontainercreate4cpkntestcontainercreate04c43392f1a6d7Tue, 01 Sep 2020 21:32:08 GMT\"0x8D84EBE7AD1F1A3\"unlockedavailabletestscope2truefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "2b5aba85-ff1b-48f3-9f21-b4abc22e0c8b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainercreate0cpkntestcontainercreate04c38989ff352b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7b682a1b-029c-4836-b411-b3bdb7dc8a5b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa034-401e-0078-59a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:07 GMT", + "x-ms-client-request-id" : "7b682a1b-029c-4836-b411-b3bdb7dc8a5b" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainercreate4cpkntestcontainercreate04c43392f1a6d7?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8db3a15-53d0-4419-9601-f2bb57d77aff" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa041-401e-0078-64a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:07 GMT", + "x-ms-client-request-id" : "e8db3a15-53d0-4419-9601-f2bb57d77aff" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainercreate0cpkntestcontainercreate04c38989ff352b", "javablobcontainercreate1cpkntestcontainercreate04c09897ca67", "javablobcontainercreate2cpkntestcontainercreate04c6884442ba", "javablobcontainercreate3cpkntestcontainercreate04c026072e86", "jtccontainercreate4cpkntestcontainercreate04c43392f1a6d7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerdenyencryptionscopeoverride.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerdenyencryptionscopeoverride.json new file mode 100644 index 0000000000000..764c406bea59d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerdenyencryptionscopeoverride.json @@ -0,0 +1,127 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerdenyencryptionscopeoverride003611d771c0ff6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "aaf905ed-627a-45d7-9ead-cb7f4ab87cc1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7B1FBF86", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:08 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa04f-401e-0078-6ea7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "aaf905ed-627a-45d7-9ead-cb7f4ab87cc1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerdenyencryptionscopeoverride487477ddfa18869?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f8d24d7-665e-4146-93f8-52e723abc5be" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7B29AC69", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa056-401e-0078-73a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "6f8d24d7-665e-4146-93f8-52e723abc5be" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerdenyencryptionscopeoverride487477ddfa18869/javablobcontainerdenyencryptionscopeoverride553442ec1ab3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "450f9be9-f445-43b2-bcab-0d74f5302bdf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "RequestForbiddenByContainerEncryptionPolicy", + "retry-after" : "0", + "Content-Length" : "272", + "StatusCode" : "403", + "x-ms-request-id" : "d84aa07e-401e-0078-0fa7-80793a000000", + "Body" : "RequestForbiddenByContainerEncryptionPolicyThe request is forbidden by the container encryption policy.\nRequestId:d84aa07e-401e-0078-0fa7-80793a000000\nTime:2020-09-01T21:32:09.0887259Z", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "450f9be9-f445-43b2-bcab-0d74f5302bdf", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainerdenyencryptionscopeoverride&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7a8f38c-4c67-41a6-a237-421808c2e5b1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa09d-401e-0078-2aa7-80793a000000", + "Body" : "jtccontainerdenyencryptionscopeoverridejtccontainerdenyencryptionscopeoverride003611d771c0ff6Tue, 01 Sep 2020 21:32:08 GMT\"0x8D84EBE7B1FBF86\"unlockedavailable$account-encryption-keyfalsefalsefalsejtccontainerdenyencryptionscopeoverride487477ddfa18869Tue, 01 Sep 2020 21:32:09 GMT\"0x8D84EBE7B29AC69\"unlockedavailabletestscope2truefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "d7a8f38c-4c67-41a6-a237-421808c2e5b1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerdenyencryptionscopeoverride003611d771c0ff6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee9d78f3-72d3-4bbc-9d16-53c6a7d0d07d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa0ae-401e-0078-38a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "ee9d78f3-72d3-4bbc-9d16-53c6a7d0d07d" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerdenyencryptionscopeoverride487477ddfa18869?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a29ac8eb-dced-4d8c-93e2-b9e48b64c509" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa0c0-401e-0078-44a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "a29ac8eb-dced-4d8c-93e2-b9e48b64c509" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainerdenyencryptionscopeoverride003611d771c0ff6", "javablobcontainerdenyencryptionscopeoverride17380781436c", "javablobcontainerdenyencryptionscopeoverride2568897ec33b", "javablobcontainerdenyencryptionscopeoverride30548999de03", "jtccontainerdenyencryptionscopeoverride487477ddfa18869", "javablobcontainerdenyencryptionscopeoverride553442ec1ab3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerlistblobsflat.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerlistblobsflat.json new file mode 100644 index 0000000000000..cbaba46378c0d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerlistblobsflat.json @@ -0,0 +1,149 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobsflat030074d19252f13b324939?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4d976755-304b-4caa-803e-0f4dc1beb604" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7B5E5A8D", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa0d7-401e-0078-57a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "4d976755-304b-4caa-803e-0f4dc1beb604" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobsflat4523141c0d7f2e54454caa?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "dbc2059a-481c-4656-b84a-788fa6968970" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7B67D22B", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa0f2-401e-0078-67a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "dbc2059a-481c-4656-b84a-788fa6968970" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobsflat4523141c0d7f2e54454caa/javablobcontainerlistblobsflat528919b0c843d354074", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfb438fe-bd41-455e-b8b9-9fa6b7651c56" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7B7144DC", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa106-401e-0078-74a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "dfb438fe-bd41-455e-b8b9-9fa6b7651c56", + "x-ms-encryption-scope" : "testscope2" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobsflat4523141c0d7f2e54454caa?restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc04d6c4-6bbf-4775-a54b-8d910c43ffae" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa11b-401e-0078-03a7-80793a000000", + "Body" : "javablobcontainerlistblobsflat528919b0c843d354074Tue, 01 Sep 2020 21:32:09 GMTTue, 01 Sep 2020 21:32:09 GMT0x8D84EBE7B7144DC0application/octet-streamAppendBlobunlockedavailabletruetestscope2", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "bc04d6c4-6bbf-4775-a54b-8d910c43ffae", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainerlistblobsflat&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1769f392-edfc-4907-af37-32c32524cc01" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa12f-401e-0078-11a7-80793a000000", + "Body" : "jtccontainerlistblobsflatjtccontainerlistblobsflat030074d19252f13b324939Tue, 01 Sep 2020 21:32:09 GMT\"0x8D84EBE7B5E5A8D\"unlockedavailable$account-encryption-keyfalsefalsefalsejtccontainerlistblobsflat4523141c0d7f2e54454caaTue, 01 Sep 2020 21:32:09 GMT\"0x8D84EBE7B67D22B\"unlockedavailabletestscope2truefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "1769f392-edfc-4907-af37-32c32524cc01", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobsflat030074d19252f13b324939?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5775d80-bf98-4b0f-9b55-36dcc6cbfee9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa139-401e-0078-16a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "b5775d80-bf98-4b0f-9b55-36dcc6cbfee9" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobsflat4523141c0d7f2e54454caa?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f550996b-8edc-4dfc-b4a6-81647f4c0d7f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa155-401e-0078-2ba7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "f550996b-8edc-4dfc-b4a6-81647f4c0d7f" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainerlistblobsflat030074d19252f13b324939", "javablobcontainerlistblobsflat1757165d0264f6a6664", "javablobcontainerlistblobsflat217070fad091f3929d4", "javablobcontainerlistblobsflat373896a291bddd58fd4", "jtccontainerlistblobsflat4523141c0d7f2e54454caa", "javablobcontainerlistblobsflat528919b0c843d354074" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerlistblobshierarchical.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerlistblobshierarchical.json new file mode 100644 index 0000000000000..3270c340e1260 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestcontainerlistblobshierarchical.json @@ -0,0 +1,149 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobshierarchical0968432116d7a52e1e?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "937e8533-dff0-4b80-bf98-33281ab9c740" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7BA582A7", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa164-401e-0078-37a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "937e8533-dff0-4b80-bf98-33281ab9c740" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobshierarchical401894b7c9b0c00764?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc816781-2574-4a3d-82ad-d7478085eebe" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7BAED32A", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa16e-401e-0078-3fa7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:08 GMT", + "x-ms-client-request-id" : "bc816781-2574-4a3d-82ad-d7478085eebe" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobshierarchical401894b7c9b0c00764/javablobcontainerlistblobshierarchical56921393cb3fe61", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "80588b99-12b7-4d7e-a4f1-53f62f997aed" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7BB86CF1", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa175-401e-0078-45a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "80588b99-12b7-4d7e-a4f1-53f62f997aed", + "x-ms-encryption-scope" : "testscope2" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobshierarchical401894b7c9b0c00764?prefix=&delimiter=/&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a579fae-9033-459e-bc87-77ce16b40ccc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa180-401e-0078-4ea7-80793a000000", + "Body" : "/javablobcontainerlistblobshierarchical56921393cb3fe61Tue, 01 Sep 2020 21:32:09 GMTTue, 01 Sep 2020 21:32:09 GMT0x8D84EBE7BB86CF10application/octet-streamAppendBlobunlockedavailabletruetestscope2", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "6a579fae-9033-459e-bc87-77ce16b40ccc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainerlistblobshierarchical&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ede5312-afce-4694-9069-e51a18a2f205" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa194-401e-0078-5ca7-80793a000000", + "Body" : "jtccontainerlistblobshierarchicaljtccontainerlistblobshierarchical0968432116d7a52e1eTue, 01 Sep 2020 21:32:09 GMT\"0x8D84EBE7BA582A7\"unlockedavailable$account-encryption-keyfalsefalsefalsejtccontainerlistblobshierarchical401894b7c9b0c00764Tue, 01 Sep 2020 21:32:09 GMT\"0x8D84EBE7BAED32A\"unlockedavailabletestscope2truefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "1ede5312-afce-4694-9069-e51a18a2f205", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobshierarchical0968432116d7a52e1e?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f6e86e57-c6c9-4c7b-8e29-455273a91ec6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa1b2-401e-0078-77a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "f6e86e57-c6c9-4c7b-8e29-455273a91ec6" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainerlistblobshierarchical401894b7c9b0c00764?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c26a1b4-3e78-4b7b-bc0c-b5bd406999c3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa1c3-401e-0078-05a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:09 GMT", + "x-ms-client-request-id" : "1c26a1b4-3e78-4b7b-bc0c-b5bd406999c3" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainerlistblobshierarchical0968432116d7a52e1e", "javablobcontainerlistblobshierarchical1144457ea036caf", "javablobcontainerlistblobshierarchical25380516cf12f71", "javablobcontainerlistblobshierarchical370730af4c00536", "jtccontainerlistblobshierarchical401894b7c9b0c00764", "javablobcontainerlistblobshierarchical56921393cb3fe61" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobclearpage.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobclearpage.json new file mode 100644 index 0000000000000..6768b241555ac --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobclearpage.json @@ -0,0 +1,136 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobclearpage0cpkntestpageblobclearpageedc38115c8e5?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1c2c710-b429-4126-9241-8e768fcd1087" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7DC36E2E", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa4ec-401e-0078-2fa7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "b1c2c710-b429-4126-9241-8e768fcd1087" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobclearpage0cpkntestpageblobclearpageedc38115c8e5/javablobpageblobclearpage2cpkntestpageblobclearpageedc834065c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "62c2f75d-0f88-4e7e-8f3c-2a64a14248d2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7DCD07E7", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa506-401e-0078-45a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "62c2f75d-0f88-4e7e-8f3c-2a64a14248d2", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobclearpage0cpkntestpageblobclearpageedc38115c8e5/javablobpageblobclearpage2cpkntestpageblobclearpageedc834065c?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "453964ee-6848-4451-b1ad-6b00a9bb1606", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "X73b7ztLyJ0=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "ETag" : "0x8D84EBE7DD60A41", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa512-401e-0078-4da7-80793a000000", + "x-ms-client-request-id" : "453964ee-6848-4451-b1ad-6b00a9bb1606", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobclearpage0cpkntestpageblobclearpageedc38115c8e5/javablobpageblobclearpage2cpkntestpageblobclearpageedc834065c?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "1816b9eb-9233-454a-a6e7-1b1eea1bb04c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7DDFD004", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa524-401e-0078-5ba7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "1816b9eb-9233-454a-a6e7-1b1eea1bb04c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcpageblobclearpage&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "ced8e171-4a2a-4210-a9b4-7846c0090b58" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa52e-401e-0078-64a7-80793a000000", + "Body" : "jtcpageblobclearpagejtcpageblobclearpage0cpkntestpageblobclearpageedc38115c8e5Tue, 01 Sep 2020 21:32:13 GMT\"0x8D84EBE7DC36E2E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "ced8e171-4a2a-4210-a9b4-7846c0090b58", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobclearpage0cpkntestpageblobclearpageedc38115c8e5?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "da52d728-a750-48ac-a3b9-09c9d37c178f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa538-401e-0078-6ba7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "da52d728-a750-48ac-a3b9-09c9d37c178f" + }, + "Exception" : null + } ], + "variables" : [ "jtcpageblobclearpage0cpkntestpageblobclearpageedc38115c8e5", "javablobpageblobclearpage1cpkntestpageblobclearpageedc3562866", "javablobpageblobclearpage2cpkntestpageblobclearpageedc834065c", "javablobpageblobclearpage3cpkntestpageblobclearpageedc4877509", "05260158-ac7d-4e89-9119-ddba98867f9c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobclientbuildercheck.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobclientbuildercheck.json new file mode 100644 index 0000000000000..4a4b7643e78b6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobclientbuildercheck.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobclientbuildercheck02859714f2a254e86546?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "89b95267-defe-4374-bd75-b105e2d37e3c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7F4683F5", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:15 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa746-401e-0078-06a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "89b95267-defe-4374-bd75-b105e2d37e3c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcpageblobclientbuildercheck&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3ec1e36-0562-44ed-bb3a-81e2eef6f4d1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa755-401e-0078-12a7-80793a000000", + "Body" : "jtcpageblobclientbuildercheckjtcpageblobclientbuildercheck02859714f2a254e86546Tue, 01 Sep 2020 21:32:15 GMT\"0x8D84EBE7F4683F5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:15 GMT", + "x-ms-client-request-id" : "a3ec1e36-0562-44ed-bb3a-81e2eef6f4d1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobclientbuildercheck02859714f2a254e86546?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "c63ed70d-a77b-40d2-9383-ee74cd173282" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa75c-401e-0078-17a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:15 GMT", + "x-ms-client-request-id" : "c63ed70d-a77b-40d2-9383-ee74cd173282" + }, + "Exception" : null + } ], + "variables" : [ "jtcpageblobclientbuildercheck02859714f2a254e86546", "javablobpageblobclientbuildercheck1839119a7b2c0e1ae", "javablobpageblobclientbuildercheck200780c5409c82a03", "javablobpageblobclientbuildercheck39983369a2753f511", "javablobpageblobclientbuildercheck458653391d68f9623" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobcreate.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobcreate.json new file mode 100644 index 0000000000000..3f95b208c9afd --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobcreate.json @@ -0,0 +1,88 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobcreate0cpkntestpageblobcreate53057627255466a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ad0993c-ad3b-43c3-a820-56e826b2ed24" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7CF7E2CF", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa374-401e-0078-78a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "5ad0993c-ad3b-43c3-a820-56e826b2ed24" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobcreate0cpkntestpageblobcreate53057627255466a/javablobpageblobcreate2cpkntestpageblobcreate530166835fd56", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "7480ffe7-18ec-4ec7-8170-5efbc6ae2139" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7D03519E", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa3a8-401e-0078-24a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "7480ffe7-18ec-4ec7-8170-5efbc6ae2139", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcpageblobcreate&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "42544686-5b2e-40b1-93c0-121c8a133aee" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa3ba-401e-0078-30a7-80793a000000", + "Body" : "jtcpageblobcreatejtcpageblobcreate0cpkntestpageblobcreate53057627255466aTue, 01 Sep 2020 21:32:12 GMT\"0x8D84EBE7CF7E2CF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "42544686-5b2e-40b1-93c0-121c8a133aee", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobcreate0cpkntestpageblobcreate53057627255466a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8e9e977-2a25-49d9-b49c-07def580b12c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa3c4-401e-0078-38a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "f8e9e977-2a25-49d9-b49c-07def580b12c" + }, + "Exception" : null + } ], + "variables" : [ "jtcpageblobcreate0cpkntestpageblobcreate53057627255466a", "javablobpageblobcreate1cpkntestpageblobcreate53031731a9c49", "javablobpageblobcreate2cpkntestpageblobcreate530166835fd56", "javablobpageblobcreate3cpkntestpageblobcreate530138882fd89" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputmultiplepages.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputmultiplepages.json new file mode 100644 index 0000000000000..06fc4694c8dc3 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputmultiplepages.json @@ -0,0 +1,114 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputmultiplepages092163aece5fb6eca84a5?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3cfd894-2dae-45fe-9db0-763c0ea6947c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7D94DBA2", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa476-401e-0078-4ba7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "b3cfd894-2dae-45fe-9db0-763c0ea6947c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputmultiplepages092163aece5fb6eca84a5/javablobpageblobputmultiplepages2789282b6f5d2fae56", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "99fd0347-70d8-4802-a050-f20a68845727" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7D9F8702", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa49f-401e-0078-6ea7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "99fd0347-70d8-4802-a050-f20a68845727", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputmultiplepages092163aece5fb6eca84a5/javablobpageblobputmultiplepages2789282b6f5d2fae56?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe9eaefc-bcf2-4b40-8a74-8066003505e3", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "Os5898EMlBc=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "ETag" : "0x8D84EBE7DA8FE9B", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa4b4-401e-0078-7ca7-80793a000000", + "x-ms-client-request-id" : "fe9eaefc-bcf2-4b40-8a74-8066003505e3", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcpageblobputmultiplepages&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e879e8fa-679c-41e8-9564-26c6e2c7d6ee" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa4bd-401e-0078-05a7-80793a000000", + "Body" : "jtcpageblobputmultiplepagesjtcpageblobputmultiplepages092163aece5fb6eca84a5Tue, 01 Sep 2020 21:32:13 GMT\"0x8D84EBE7D94DBA2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "e879e8fa-679c-41e8-9564-26c6e2c7d6ee", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputmultiplepages092163aece5fb6eca84a5?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "9554d96e-73f1-4e97-95f6-4e5e4dc60e31" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa4cb-401e-0078-11a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "9554d96e-73f1-4e97-95f6-4e5e4dc60e31" + }, + "Exception" : null + } ], + "variables" : [ "jtcpageblobputmultiplepages092163aece5fb6eca84a5", "javablobpageblobputmultiplepages1160581cb4e1d067dd", "javablobpageblobputmultiplepages2789282b6f5d2fae56", "javablobpageblobputmultiplepages378892bb683870dfa5", "99e583fa-756b-447f-b033-439cc6947a31" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputpage.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputpage.json new file mode 100644 index 0000000000000..40b63196993f1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputpage.json @@ -0,0 +1,114 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpage0cpkntestpageblobputpagec2342162f49536?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "45c78304-e4e8-4283-a228-4e228c5dc8d7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7D1F6F2A", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa3d0-401e-0078-42a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "45c78304-e4e8-4283-a228-4e228c5dc8d7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpage0cpkntestpageblobputpagec2342162f49536/javablobpageblobputpage2cpkntestpageblobputpagec237808711f2", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d2b553f-fe0a-4450-96ed-0c6f739a8f5e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7D293004", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa3e1-401e-0078-50a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "3d2b553f-fe0a-4450-96ed-0c6f739a8f5e", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpage0cpkntestpageblobputpagec2342162f49536/javablobpageblobputpage2cpkntestpageblobputpagec237808711f2?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "cbaffb1f-7d0f-4d59-bcfd-7a3ef1de2975", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "8qCW58jrMJo=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "ETag" : "0x8D84EBE7D35190F", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa3f0-401e-0078-5ba7-80793a000000", + "x-ms-client-request-id" : "cbaffb1f-7d0f-4d59-bcfd-7a3ef1de2975", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcpageblobputpage&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4e29e20-86fb-49d4-a72c-27922838f905" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa404-401e-0078-68a7-80793a000000", + "Body" : "jtcpageblobputpagejtcpageblobputpage0cpkntestpageblobputpagec2342162f49536Tue, 01 Sep 2020 21:32:12 GMT\"0x8D84EBE7D1F6F2A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "e4e29e20-86fb-49d4-a72c-27922838f905", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpage0cpkntestpageblobputpagec2342162f49536?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1f065ae-822c-4837-9a0a-6f83b0d115bf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa41a-401e-0078-7ea7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "e1f065ae-822c-4837-9a0a-6f83b0d115bf" + }, + "Exception" : null + } ], + "variables" : [ "jtcpageblobputpage0cpkntestpageblobputpagec2342162f49536", "javablobpageblobputpage1cpkntestpageblobputpagec23866211abf", "javablobpageblobputpage2cpkntestpageblobputpagec237808711f2", "javablobpageblobputpage3cpkntestpageblobputpagec2386436b622", "fef61154-12e2-4872-acd0-5aea2ab4641e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputpagefromurl.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputpagefromurl.json new file mode 100644 index 0000000000000..eeed0cf3cb7a9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobputpagefromurl.json @@ -0,0 +1,160 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpagefromurl092621b87bebd412e04975?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "995d4817-32e2-42bc-b05f-ef6bc4dc7f67" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7D51D2FC", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa42d-401e-0078-0ea7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "995d4817-32e2-42bc-b05f-ef6bc4dc7f67" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpagefromurl092621b87bebd412e04975/javablobpageblobputpagefromurl436880877f640a6ecf4", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c06e0e3-7b86-4c33-a30a-b47180e18bd9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7D5C7E5B", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa431-401e-0078-11a7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "3c06e0e3-7b86-4c33-a30a-b47180e18bd9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpagefromurl092621b87bebd412e04975/javablobpageblobputpagefromurl436880877f640a6ecf4?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a229f02-4956-4873-b2fc-22d685defb6f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "4P0lr69jss8=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "ETag" : "0x8D84EBE7D65F5F9", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa439-401e-0078-18a7-80793a000000", + "x-ms-client-request-id" : "4a229f02-4956-4873-b2fc-22d685defb6f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpagefromurl092621b87bebd412e04975/javablobpageblobputpagefromurl23637149cd973d902d4", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6aca9fd5-28a6-4982-b280-abafc680a969" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7D6ED136", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa43c-401e-0078-1ba7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "x-ms-client-request-id" : "6aca9fd5-28a6-4982-b280-abafc680a969", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpagefromurl092621b87bebd412e04975/javablobpageblobputpagefromurl23637149cd973d902d4?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "32dd0ca5-4621-4561-87ab-398d266b5289" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:12 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:11 GMT", + "Content-MD5" : "VMy0/K/B10EZc0MauBtiYA==", + "ETag" : "0x8D84EBE7D798188", + "Content-Length" : "0", + "x-ms-request-id" : "d84aa446-401e-0078-22a7-80793a000000", + "x-ms-client-request-id" : "32dd0ca5-4621-4561-87ab-398d266b5289", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcpageblobputpagefromurl&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f94f708-0c7f-4e61-824f-201504ea864a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa450-401e-0078-2aa7-80793a000000", + "Body" : "jtcpageblobputpagefromurljtcpageblobputpagefromurl092621b87bebd412e04975Tue, 01 Sep 2020 21:32:12 GMT\"0x8D84EBE7D51D2FC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "6f94f708-0c7f-4e61-824f-201504ea864a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobputpagefromurl092621b87bebd412e04975?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "e49cfb6b-639b-4fd3-aa49-ee93e5b986b8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa457-401e-0078-30a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "e49cfb6b-639b-4fd3-aa49-ee93e5b986b8" + }, + "Exception" : null + } ], + "variables" : [ "jtcpageblobputpagefromurl092621b87bebd412e04975", "javablobpageblobputpagefromurl10494197510000bced4", "javablobpageblobputpagefromurl23637149cd973d902d4", "javablobpageblobputpagefromurl370285768830c1ed234", "javablobpageblobputpagefromurl436880877f640a6ecf4", "b8b0834b-bd77-4b06-8a88-d634f20da2d4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobresize.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobresize.json new file mode 100644 index 0000000000000..940f5925aac3d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestpageblobresize.json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobresize0cpkntestpageblobresizeabe376991fa82fc?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "6426f2fc-7f35-4ca9-bd8d-40273a2e41a4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7DFBC681", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa53e-401e-0078-70a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "6426f2fc-7f35-4ca9-bd8d-40273a2e41a4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobresize0cpkntestpageblobresizeabe376991fa82fc/javablobpageblobresize2cpkntestpageblobresizeabe3246124544", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "2362ac74-13e6-4904-bb11-ec9844b70601" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7E053926", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa54d-401e-0078-7ba7-80793a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "2362ac74-13e6-4904-bb11-ec9844b70601", + "x-ms-encryption-scope" : "testscope1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobresize0cpkntestpageblobresizeabe376991fa82fc/javablobpageblobresize2cpkntestpageblobresizeabe3246124544?comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4bdc602-ada6-4bea-9378-ab9996fe9c7f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7E0F4D1C", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa555-401e-0078-03a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "b4bdc602-ada6-4bea-9378-ab9996fe9c7f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcpageblobresize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "cedd0ca5-6593-47fc-aefb-e0a4bcbb3a9c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa55d-401e-0078-0aa7-80793a000000", + "Body" : "jtcpageblobresizejtcpageblobresize0cpkntestpageblobresizeabe376991fa82fcTue, 01 Sep 2020 21:32:13 GMT\"0x8D84EBE7DFBC681\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:12 GMT", + "x-ms-client-request-id" : "cedd0ca5-6593-47fc-aefb-e0a4bcbb3a9c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcpageblobresize0cpkntestpageblobresizeabe376991fa82fc?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "c80009c0-e4d2-44d2-82b8-b0b3e8fa88bb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa563-401e-0078-0ea7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:13 GMT", + "x-ms-client-request-id" : "c80009c0-e4d2-44d2-82b8-b0b3e8fa88bb" + }, + "Exception" : null + } ], + "variables" : [ "jtcpageblobresize0cpkntestpageblobresizeabe376991fa82fc", "javablobpageblobresize1cpkntestpageblobresizeabe409499c37e", "javablobpageblobresize2cpkntestpageblobresizeabe3246124544", "javablobpageblobresize3cpkntestpageblobresizeabe904838939d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestserviceclientbuildercheck.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestserviceclientbuildercheck.json new file mode 100644 index 0000000000000..d502313d1427f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/CPKNTestserviceclientbuildercheck.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcserviceclientbuildercheck0948990c3520fa23e44c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "88b6cd19-9cda-4941-951e-902053661ba3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D84EBE7EB99395", + "Last-Modified" : "Tue, 01 Sep 2020 21:32:14 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d84aa65e-401e-0078-56a7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "88b6cd19-9cda-4941-951e-902053661ba3" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcserviceclientbuildercheck&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b25e5df-1326-425c-b14e-d457ad4b9439" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d84aa665-401e-0078-5aa7-80793a000000", + "Body" : "jtcserviceclientbuildercheckjtcserviceclientbuildercheck0948990c3520fa23e44cTue, 01 Sep 2020 21:32:14 GMT\"0x8D84EBE7EB99395\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "3b25e5df-1326-425c-b14e-d457ad4b9439", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcserviceclientbuildercheck0948990c3520fa23e44c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.4; Windows 10; 10.0)", + "x-ms-client-request-id" : "89acab12-6b4a-47c0-a813-a61c6a21ad15" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84aa67b-401e-0078-6ca7-80793a000000", + "Date" : "Tue, 01 Sep 2020 21:32:14 GMT", + "x-ms-client-request-id" : "89acab12-6b4a-47c0-a813-a61c6a21ad15" + }, + "Exception" : null + } ], + "variables" : [ "jtcserviceclientbuildercheck0948990c3520fa23e44c", "javablobserviceclientbuildercheck193247670e197901da", "javablobserviceclientbuildercheck2204834850b6900225", "javablobserviceclientbuildercheck379970e2fbafd7cdaa" ] +} \ No newline at end of file diff --git a/sdk/storage/test-resources.json b/sdk/storage/test-resources.json index 245349b995fd6..5f1a5e940324f 100644 --- a/sdk/storage/test-resources.json +++ b/sdk/storage/test-resources.json @@ -110,6 +110,20 @@ "[variables('primaryAccountName')]" ] }, + { + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('primaryAccountName'), '/testscope1')]", + "properties": { + } + }, + { + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('primaryAccountName'), '/testscope2')]", + "properties": { + } + }, { "type": "Microsoft.Storage/storageAccounts", "apiVersion": "[variables('storageApiVersion')]", From 21787ac242bec3ab23cb15da977a18a2d3db23d4 Mon Sep 17 00:00:00 2001 From: vinagesh Date: Thu, 3 Sep 2020 10:22:01 -0700 Subject: [PATCH 073/168] feat(design): Query API design (#14756) --- .../azure-digitaltwins-core/API design.md | 49 +++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/API design.md b/sdk/digitaltwins/azure-digitaltwins-core/API design.md index 3d065d4832b4e..9750ccf0b3d92 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/API design.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/API design.md @@ -771,12 +771,55 @@ public DigitalTwinsResponse updateComponentWithResponse(String digitalTwin ## Query -
    -APIs +
    Async APIs + + ```java + /** + * Query digital twins. + * + * @param query The query string, in SQL-like syntax. + * @return A {@link PagedFlux} of application/json for the query result items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux query(String query) + + /** + * Query digital twins. + * + * @param query The query string, in SQL-like syntax. + * @param clazz The model class to convert the query response to. + * @param The generic type to convert the query response to. + * @return A {@link PagedFlux} of application/json for the query result items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux query(String query, Class clazz) + ``` +
    +
    Sync APIs ```java -TODO: +/** +* Query digital twins. +* +* @param query The query string, in SQL-like syntax. +* @param context Additional context that is passed through the Http pipeline during the service call. +* @return A {@link PagedIterable} of application/json for the query result items. +*/ +@ServiceMethod(returns = ReturnType.COLLECTION) +public PagedIterable query(String query, Context context) + +/** +* Query digital twins. +* +* @param query The query string, in SQL-like syntax. +* @param context Additional context that is passed through the Http pipeline during the service call. +* @param clazz The model class to convert the query response to. +* @param The generic type to convert the query response to. +* @return A {@link PagedIterable} of application/json for the query result items. +*/ +@ServiceMethod(returns = ReturnType.COLLECTION) +public PagedIterable query(String query, Class clazz, Context context) ```
    From 6b8fa2c57dafd930c1d0cee22567c24b746b1107 Mon Sep 17 00:00:00 2001 From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com> Date: Thu, 3 Sep 2020 11:18:34 -0700 Subject: [PATCH 074/168] Fixed query live tests in Java 11 (#14749) --- sdk/storage/azure-storage-blob/pom.xml | 1 + .../blob/specialized/BlobBaseAPITest.groovy | 14 -------------- sdk/storage/azure-storage-file-datalake/pom.xml | 1 + .../azure/storage/file/datalake/FileAPITest.groovy | 13 ------------- 4 files changed, 2 insertions(+), 27 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 2f17f1f0b9085..25e2ea912aaed 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -281,6 +281,7 @@ --add-reads com.azure.core.test=ALL-UNNAMED --add-reads com.azure.core.amqp=ALL-UNNAMED --add-reads com.azure.storage.common=ALL-UNNAMED + --add-reads com.azure.storage.internal.avro=ALL-UNNAMED diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy index 36b7aa15d772f..dc50430530c55 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy @@ -87,7 +87,6 @@ class BlobBaseAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query min"() { setup: BlobQueryDelimitedSerialization ser = new BlobQueryDelimitedSerialization() @@ -133,7 +132,6 @@ class BlobBaseAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query csv serialization separator"() { setup: BlobQueryDelimitedSerialization ser = new BlobQueryDelimitedSerialization() @@ -209,7 +207,6 @@ class BlobBaseAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query csv serialization escape and field quote"() { setup: BlobQueryDelimitedSerialization ser = new BlobQueryDelimitedSerialization() @@ -250,7 +247,6 @@ class BlobBaseAPITest extends APISpec { /* Note: Input delimited tested everywhere */ @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query Input json"() { setup: BlobQueryJsonSerialization ser = new BlobQueryJsonSerialization() @@ -292,7 +288,6 @@ class BlobBaseAPITest extends APISpec { 1000 || _ } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query Input csv Output json"() { setup: BlobQueryDelimitedSerialization inSer = new BlobQueryDelimitedSerialization() @@ -332,7 +327,6 @@ class BlobBaseAPITest extends APISpec { } } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query Input json Output csv"() { setup: BlobQueryJsonSerialization inSer = new BlobQueryJsonSerialization() @@ -372,7 +366,6 @@ class BlobBaseAPITest extends APISpec { } } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query non fatal error"() { setup: BlobQueryDelimitedSerialization base = new BlobQueryDelimitedSerialization() @@ -411,7 +404,6 @@ class BlobBaseAPITest extends APISpec { receiver.numErrors > 0 } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query fatal error"() { setup: BlobQueryDelimitedSerialization base = new BlobQueryDelimitedSerialization() @@ -440,7 +432,6 @@ class BlobBaseAPITest extends APISpec { thrown(Exceptions.ReactiveException) } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query progress receiver"() { setup: BlobQueryDelimitedSerialization base = new BlobQueryDelimitedSerialization() @@ -484,7 +475,6 @@ class BlobBaseAPITest extends APISpec { } @Requires( { liveMode() } ) // Large amount of data. - @Ignore("Query tests hang in Java 11") // TODO (rickle-msft): Remove annotation def "Query multiple records with progress receiver"() { setup: BlobQueryDelimitedSerialization ser = new BlobQueryDelimitedSerialization() @@ -535,7 +525,6 @@ class BlobBaseAPITest extends APISpec { } } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query snapshot"() { setup: BlobQueryDelimitedSerialization ser = new BlobQueryDelimitedSerialization() @@ -576,7 +565,6 @@ class BlobBaseAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query input output IA"() { setup: /* Mock random impl of QQ Serialization*/ @@ -607,7 +595,6 @@ class BlobBaseAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query AC"() { setup: def t = new HashMap() @@ -654,7 +641,6 @@ class BlobBaseAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query AC fail"() { setup: setupBlobLeaseCondition(bc, leaseID) diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 888831ad25e09..26c5bf1dd5981 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -282,6 +282,7 @@ --add-reads com.azure.core.amqp=ALL-UNNAMED --add-reads com.azure.storage.common=ALL-UNNAMED --add-reads com.azure.storage.blob=ALL-UNNAMED + --add-reads com.azure.storage.internal.avro=ALL-UNNAMED diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy index f810ab1a3ba0b..52dfa29839289 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy @@ -2815,7 +2815,6 @@ class FileAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query min"() { setup: FileQueryDelimitedSerialization ser = new FileQueryDelimitedSerialization() @@ -2861,7 +2860,6 @@ class FileAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query csv serialization separator"() { setup: FileQueryDelimitedSerialization ser = new FileQueryDelimitedSerialization() @@ -2937,7 +2935,6 @@ class FileAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query csv serialization escape and field quote"() { setup: FileQueryDelimitedSerialization ser = new FileQueryDelimitedSerialization() @@ -2978,7 +2975,6 @@ class FileAPITest extends APISpec { /* Note: Input delimited tested everywhere else. */ @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query Input json"() { setup: FileQueryJsonSerialization ser = new FileQueryJsonSerialization() @@ -3020,7 +3016,6 @@ class FileAPITest extends APISpec { 1000 | '\n' || _ } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query Input csv Output json"() { setup: FileQueryDelimitedSerialization inSer = new FileQueryDelimitedSerialization() @@ -3061,7 +3056,6 @@ class FileAPITest extends APISpec { } } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query Input json Output csv"() { setup: FileQueryJsonSerialization inSer = new FileQueryJsonSerialization() @@ -3102,7 +3096,6 @@ class FileAPITest extends APISpec { } } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query non fatal error"() { setup: FileQueryDelimitedSerialization base = new FileQueryDelimitedSerialization() @@ -3141,7 +3134,6 @@ class FileAPITest extends APISpec { receiver.numErrors > 0 } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query fatal error"() { setup: FileQueryDelimitedSerialization base = new FileQueryDelimitedSerialization() @@ -3172,7 +3164,6 @@ class FileAPITest extends APISpec { thrown(Exceptions.ReactiveException) } - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query progress receiver"() { setup: FileQueryDelimitedSerialization base = new FileQueryDelimitedSerialization() @@ -3216,7 +3207,6 @@ class FileAPITest extends APISpec { } @Requires( { liveMode() } ) // Large amount of data. - @Ignore // TODO (rickle-msft): Remove annotation def "Query multiple records with progress receiver"() { setup: FileQueryDelimitedSerialization ser = new FileQueryDelimitedSerialization() @@ -3268,7 +3258,6 @@ class FileAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query input output IA"() { setup: /* Mock random impl of QQ Serialization*/ @@ -3303,7 +3292,6 @@ class FileAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query AC"() { setup: match = setupPathMatchCondition(fc, match) @@ -3345,7 +3333,6 @@ class FileAPITest extends APISpec { } @Unroll - @Requires({ playbackMode() }) // TODO (rickle-msft): Remove annotation def "Query AC fail"() { setup: setupPathLeaseCondition(fc, leaseID) From 0d23a8e7bb94427551e2bff225822db727b92ff3 Mon Sep 17 00:00:00 2001 From: Hemant Tanwar Date: Thu, 3 Sep 2020 11:43:59 -0700 Subject: [PATCH 075/168] SB track2: Remove locktoken with ServiceBusReceivedMessage in settlement API. (#14696) * remove locktoken with ServiceBusReceivedMessage in settlement API. --- .../azure-messaging-servicebus/README.md | 2 +- .../ServiceBusReceiverAsyncClient.java | 377 ++++-------------- .../servicebus/ServiceBusReceiverClient.java | 303 +++----------- .../messaging/servicebus/ReadmeSamples.java | 2 +- .../ReceiveMessageAndSettleAsyncSample.java | 12 +- .../servicebus/ReceiveMessageAsyncSample.java | 4 +- .../ReceiveMessageAutoLockRenewal.java | 4 +- ...eceiveMessageAzureIdentityAsyncSample.java | 2 +- .../servicebus/ReceiveMessageSyncSample.java | 2 +- .../ReceiveMultipleSessionsAsyncSample.java | 4 +- .../ReceiveNamedSessionAsyncSample.java | 2 +- .../servicebus/ReceiveNamedSessionSample.java | 4 +- .../ReceiveSingleSessionAsyncSample.java | 2 +- .../SendAndReceiveSessionMessageSample.java | 2 +- ...ReceiverAsyncClientJavaDocCodeSamples.java | 6 +- ...BusReceiverAsyncClientIntegrationTest.java | 125 ++---- .../ServiceBusReceiverAsyncClientTest.java | 49 +-- ...rviceBusReceiverClientIntegrationTest.java | 46 +-- .../ServiceBusReceiverClientTest.java | 85 ++-- .../UnnamedSessionManagerIntegrationTest.java | 4 +- 20 files changed, 259 insertions(+), 778 deletions(-) diff --git a/sdk/servicebus/azure-messaging-servicebus/README.md b/sdk/servicebus/azure-messaging-servicebus/README.md index 4fde057b82232..754758954665c 100644 --- a/sdk/servicebus/azure-messaging-servicebus/README.md +++ b/sdk/servicebus/azure-messaging-servicebus/README.md @@ -253,7 +253,7 @@ receiver.receiveMessages(10).forEach(context -> { ServiceBusReceivedMessage message = context.getMessage(); // Process message and then complete it. - receiver.complete(message.getLockToken()); + receiver.complete(message); }); ``` diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java index fe6941ba72756..8ae330e745d46 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java @@ -187,54 +187,36 @@ public String getEntityPath() { } /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token. This will make the message available + * Abandon a {@link ServiceBusReceivedMessage message}. This will make the message available * again for processing. Abandoning a message will increase the delivery count on the message. * - * @param lockToken Lock token of the message. - * - * @return A {@link Mono} that completes when the Service Bus abandon operation completes. - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public Mono abandon(String lockToken) { - return abandon(lockToken, receiverOptions.getSessionId()); - } - - /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token. This will make the message available - * again for processing. Abandoning a message will increase the delivery count on the message. - * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to abandon. {@code null} if there is no session. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * * @return A {@link Mono} that completes when the Service Bus abandon operation completes. - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public Mono abandon(String lockToken, String sessionId) { - return abandon(lockToken, null, sessionId); + public Mono abandon(ServiceBusReceivedMessage message) { + return abandon(message, null); } /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token and updates the message's properties. + * Abandon a {@link ServiceBusReceivedMessage message} updates the message's properties. * This will make the message available again for processing. Abandoning a message will increase the delivery count * on the message. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param propertiesToModify Properties to modify on the message. * * @return A {@link Mono} that completes when the Service Bus operation finishes. - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public Mono abandon(String lockToken, Map propertiesToModify) { - return abandon(lockToken, propertiesToModify, receiverOptions.getSessionId()); + public Mono abandon(ServiceBusReceivedMessage message, Map propertiesToModify) { + return updateDisposition(message, DispositionStatus.ABANDONED, null, null, + propertiesToModify, null); } /** @@ -244,403 +226,188 @@ public Mono abandon(String lockToken, Map propertiesToModi *

    Complete a message with a transaction

    * {@codesnippet com.azure.messaging.servicebus.servicebusasyncreceiverclient.abandonMessageWithTransaction} * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param propertiesToModify Properties to modify on the message. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverAsyncClient#createTransaction()} or * {@link ServiceBusSenderAsyncClient#createTransaction()}. * * @return A {@link Mono} that completes when the Service Bus operation finishes. - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. + * @throws NullPointerException if {@code message}, {@code transactionContext} + * or {@code transactionContext.transactionId} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public Mono abandon(String lockToken, Map propertiesToModify, - ServiceBusTransactionContext transactionContext) { - return abandon(lockToken, propertiesToModify, receiverOptions.getSessionId(), transactionContext); - } - - /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token and updates the message's properties. - * This will make the message available again for processing. Abandoning a message will increase the delivery count - * on the message. - * - * @param lockToken Lock token of the message. - * @param propertiesToModify Properties to modify on the message. - * @param sessionId Session id of the message to abandon. {@code null} if there is no session. - * - * @return A {@link Mono} that completes when the Service Bus abandon operation completes. - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public Mono abandon(String lockToken, Map propertiesToModify, String sessionId) { - return updateDisposition(lockToken, DispositionStatus.ABANDONED, null, null, - propertiesToModify, sessionId, null); - } - - /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token and updates the message's properties. - * This will make the message available again for processing. Abandoning a message will increase the delivery count - * on the message. - * - * @param lockToken Lock token of the message. - * @param propertiesToModify Properties to modify on the message. - * @param sessionId Session id of the message to abandon. {@code null} if there is no session. - * @param transactionContext in which this operation is taking part in. The transaction should be created first by - * {@link ServiceBusReceiverAsyncClient#createTransaction()} or - * {@link ServiceBusSenderAsyncClient#createTransaction()}. - * - * @return A {@link Mono} that completes when the Service Bus abandon operation completes. - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public Mono abandon(String lockToken, Map propertiesToModify, String sessionId, + public Mono abandon(ServiceBusReceivedMessage message, Map propertiesToModify, ServiceBusTransactionContext transactionContext) { if (Objects.isNull(transactionContext)) { return monoError(logger, new NullPointerException("'transactionContext' cannot be null.")); } else if (Objects.isNull(transactionContext.getTransactionId())) { return monoError(logger, new NullPointerException("'transactionContext.transactionId' cannot be null.")); } - return updateDisposition(lockToken, DispositionStatus.ABANDONED, null, null, - propertiesToModify, sessionId, transactionContext); - } - - /** - * Completes a {@link ServiceBusReceivedMessage message} using its lock token. This will delete the message from the - * service. - * - * @param lockToken Lock token of the message. - * - * @return A {@link Mono} that finishes when the message is completed on Service Bus. - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public Mono complete(String lockToken) { - return updateDisposition(lockToken, DispositionStatus.COMPLETED, null, null, - null, receiverOptions.getSessionId(), null); - } - - /** - * Completes a {@link ServiceBusReceivedMessage message} using its lock token. This will delete the message from the - * service. - *

    Complete a message with a transaction

    - * {@codesnippet com.azure.messaging.servicebus.servicebusasyncreceiverclient.completeMessageWithTransaction} - * - * @param lockToken Lock token of the message. - * @param transactionContext in which this operation is taking part in. The transaction should be created first by - * {@link ServiceBusReceiverAsyncClient#createTransaction()} or - * {@link ServiceBusSenderAsyncClient#createTransaction()}. - * - * @return A {@link Mono} that finishes when the message is completed on Service Bus. - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public Mono complete(String lockToken, ServiceBusTransactionContext transactionContext) { - return complete(lockToken, receiverOptions.getSessionId(), transactionContext); + return updateDisposition(message, DispositionStatus.ABANDONED, null, null, + propertiesToModify, transactionContext); } /** - * Completes a {@link ServiceBusReceivedMessage message} using its lock token. This will delete the message from the + * Completes a {@link ServiceBusReceivedMessage message}. This will delete the message from the * service. * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to complete. {@code null} if there is no session. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * * @return A {@link Mono} that finishes when the message is completed on Service Bus. - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public Mono complete(String lockToken, String sessionId) { - return updateDisposition(lockToken, DispositionStatus.COMPLETED, null, null, - null, sessionId, null); + public Mono complete(ServiceBusReceivedMessage message) { + return updateDisposition(message, DispositionStatus.COMPLETED, null, null, + null, null); } /** - * Completes a {@link ServiceBusReceivedMessage message} using its lock token. This will delete the message from the + * Completes a {@link ServiceBusReceivedMessage message}. This will delete the message from the * service. * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to complete. {@code null} if there is no session. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverAsyncClient#createTransaction()} or * {@link ServiceBusSenderAsyncClient#createTransaction()}. * * @return A {@link Mono} that finishes when the message is completed on Service Bus. - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or + * @throws NullPointerException if {@code message}, {@code transactionContext} or * {@code transactionContext.transactionId} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public Mono complete(String lockToken, String sessionId, - ServiceBusTransactionContext transactionContext) { + public Mono complete(ServiceBusReceivedMessage message, ServiceBusTransactionContext transactionContext) { if (Objects.isNull(transactionContext)) { return monoError(logger, new NullPointerException("'transactionContext' cannot be null.")); } else if (Objects.isNull(transactionContext.getTransactionId())) { return monoError(logger, new NullPointerException("'transactionContext.transactionId' cannot be null.")); } - return updateDisposition(lockToken, DispositionStatus.COMPLETED, null, null, - null, sessionId, transactionContext); + return updateDisposition(message, DispositionStatus.COMPLETED, null, null, + null, transactionContext); } /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token. This will move message into the deferred + * Defers a {@link ServiceBusReceivedMessage message}. This will move message into the deferred * subqueue. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * * @return A {@link Mono} that completes when the Service Bus defer operation finishes. - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Message deferral */ - public Mono defer(String lockToken) { - return defer(lockToken, receiverOptions.getSessionId()); + public Mono defer(ServiceBusReceivedMessage message) { + return defer(message, null); } - /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token. This will move message into the deferred - * subqueue. - * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to defer. {@code null} if there is no session. - * - * @return A {@link Mono} that completes when the defer operation finishes. - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - * @see Message deferral - */ - public Mono defer(String lockToken, String sessionId) { - return defer(lockToken, null, sessionId); - } /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token with modified message property. This will + * Defers a {@link ServiceBusReceivedMessage message} with modified message property. This will * move message into the deferred subqueue. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param propertiesToModify Message properties to modify. * * @return A {@link Mono} that completes when the defer operation finishes. - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - * @see Message deferral - */ - public Mono defer(String lockToken, Map propertiesToModify) { - return defer(lockToken, propertiesToModify, receiverOptions.getSessionId()); - } - - /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token with modified message property. This will - * move message into the deferred subqueue. - * - * @param lockToken Lock token of the message. - * @param propertiesToModify Message properties to modify. - * @param transactionContext in which this operation is taking part in. The transaction should be created first by - * {@link ServiceBusReceiverAsyncClient#createTransaction()} or - * {@link ServiceBusSenderAsyncClient#createTransaction()}. - * - * @return A {@link Mono} that completes when the defer operation finishes. - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - * @see Message deferral - */ - public Mono defer(String lockToken, Map propertiesToModify, - ServiceBusTransactionContext transactionContext) { - return defer(lockToken, propertiesToModify, receiverOptions.getSessionId(), transactionContext); - } - - /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token with modified message property. This will - * move message into the deferred subqueue. - * - * @param lockToken Lock token of the message. - * @param propertiesToModify Message properties to modify. - * @param sessionId Session id of the message to defer. {@code null} if there is no session. - * - * @return A {@link Mono} that completes when the Service Bus defer operation finishes. - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Message deferral */ - public Mono defer(String lockToken, Map propertiesToModify, String sessionId) { - return updateDisposition(lockToken, DispositionStatus.DEFERRED, null, null, - propertiesToModify, sessionId, null); + public Mono defer(ServiceBusReceivedMessage message, Map propertiesToModify) { + return updateDisposition(message, DispositionStatus.DEFERRED, null, null, + propertiesToModify, null); } /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token with modified message property. This will + * Defers a {@link ServiceBusReceivedMessage message} with modified message property. This will * move message into the deferred subqueue. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param propertiesToModify Message properties to modify. - * @param sessionId Session id of the message to defer. {@code null} if there is no session. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverAsyncClient#createTransaction()} or * {@link ServiceBusSenderAsyncClient#createTransaction()}. * * @return A {@link Mono} that completes when the Service Bus defer operation finishes. - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or + * @throws NullPointerException if {@code message}, {@code transactionContext} or * {@code transactionContext.transactionId} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Message deferral */ - public Mono defer(String lockToken, Map propertiesToModify, String sessionId, + public Mono defer(ServiceBusReceivedMessage message, Map propertiesToModify, ServiceBusTransactionContext transactionContext) { if (Objects.isNull(transactionContext)) { return monoError(logger, new NullPointerException("'transactionContext' cannot be null.")); } else if (Objects.isNull(transactionContext.getTransactionId())) { return monoError(logger, new NullPointerException("'transactionContext.transactionId' cannot be null.")); } - return updateDisposition(lockToken, DispositionStatus.DEFERRED, null, null, - propertiesToModify, sessionId, transactionContext); - } - - /** - * Moves a {@link ServiceBusReceivedMessage message} to the deadletter sub-queue. - * - * @param lockToken Lock token of the message. - * - * @return A {@link Mono} that completes when the dead letter operation finishes. - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - * @see Dead letter - * queues - */ - public Mono deadLetter(String lockToken) { - return deadLetter(lockToken, receiverOptions.getSessionId()); + return updateDisposition(message, DispositionStatus.DEFERRED, null, null, + propertiesToModify, transactionContext); } /** * Moves a {@link ServiceBusReceivedMessage message} to the deadletter sub-queue. * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to deadletter. {@code null} if there is no session. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * * @return A {@link Mono} that completes when the dead letter operation finishes. - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Dead letter * queues */ - public Mono deadLetter(String lockToken, String sessionId) { - return deadLetter(lockToken, DEFAULT_DEAD_LETTER_OPTIONS, sessionId); + public Mono deadLetter(ServiceBusReceivedMessage message) { + return deadLetter(message, DEFAULT_DEAD_LETTER_OPTIONS); } /** * Moves a {@link ServiceBusReceivedMessage message} to the deadletter sub-queue. * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to deadletter. {@code null} if there is no session. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverAsyncClient#createTransaction()} or * {@link ServiceBusSenderAsyncClient#createTransaction()}. * * @return A {@link Mono} that completes when the dead letter operation finishes. - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or + * @throws NullPointerException if {@code message}, {@code transactionContext} or * {@code transactionContext.transactionId} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Dead letter * queues */ - public Mono deadLetter(String lockToken, String sessionId, - ServiceBusTransactionContext transactionContext) { - return deadLetter(lockToken, DEFAULT_DEAD_LETTER_OPTIONS, sessionId, transactionContext); - } - - /** - * Moves a {@link ServiceBusReceivedMessage message} to the deadletter subqueue with deadletter reason, error - * description, and/or modified properties. - * - * @param lockToken Lock token of the message. - * @param deadLetterOptions The options to specify when moving message to the deadletter sub-queue. - * - * @return A {@link Mono} that completes when the dead letter operation finishes. - * @throws NullPointerException if {@code lockToken} or {@code deadLetterOptions} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public Mono deadLetter(String lockToken, DeadLetterOptions deadLetterOptions) { - return deadLetter(lockToken, deadLetterOptions, receiverOptions.getSessionId()); - } - - /** - * Moves a {@link ServiceBusReceivedMessage message} to the deadletter subqueue with deadletter reason, error - * description, and/or modified properties. - * - * @param lockToken Lock token of the message. - * @param deadLetterOptions The options to specify when moving message to the deadletter sub-queue. - * @param transactionContext in which this operation is taking part in. The transaction should be created first by - * {@link ServiceBusReceiverAsyncClient#createTransaction()} or - * {@link ServiceBusSenderAsyncClient#createTransaction()}. - * - * @return A {@link Mono} that completes when the dead letter operation finishes. - * @throws NullPointerException if {@code lockToken}, {@code deadLetterOptions}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public Mono deadLetter(String lockToken, DeadLetterOptions deadLetterOptions, - ServiceBusTransactionContext transactionContext) { - return deadLetter(lockToken, deadLetterOptions, receiverOptions.getSessionId(), transactionContext); + public Mono deadLetter(ServiceBusReceivedMessage message, ServiceBusTransactionContext transactionContext) { + return deadLetter(message, DEFAULT_DEAD_LETTER_OPTIONS, transactionContext); } /** * Moves a {@link ServiceBusReceivedMessage message} to the deadletter subqueue with deadletter reason, error * description, and/or modified properties. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param deadLetterOptions The options to specify when moving message to the deadletter sub-queue. - * @param sessionId Session id of the message to deadletter. {@code null} if there is no session. * * @return A {@link Mono} that completes when the dead letter operation finishes. - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public Mono deadLetter(String lockToken, DeadLetterOptions deadLetterOptions, String sessionId) { + public Mono deadLetter(ServiceBusReceivedMessage message, DeadLetterOptions deadLetterOptions) { if (Objects.isNull(deadLetterOptions)) { return monoError(logger, new NullPointerException("'deadLetterOptions' cannot be null.")); } - return updateDisposition(lockToken, DispositionStatus.SUSPENDED, deadLetterOptions.getDeadLetterReason(), - deadLetterOptions.getDeadLetterErrorDescription(), deadLetterOptions.getPropertiesToModify(), sessionId, + return updateDisposition(message, DispositionStatus.SUSPENDED, deadLetterOptions.getDeadLetterReason(), + deadLetterOptions.getDeadLetterErrorDescription(), deadLetterOptions.getPropertiesToModify(), null); } @@ -648,28 +415,26 @@ public Mono deadLetter(String lockToken, DeadLetterOptions deadLetterOptio * Moves a {@link ServiceBusReceivedMessage message} to the deadletter subqueue with deadletter reason, error * description, and/or modified properties. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param deadLetterOptions The options to specify when moving message to the deadletter sub-queue. - * @param sessionId Session id of the message to deadletter. {@code null} if there is no session. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverAsyncClient#createTransaction()} or * {@link ServiceBusSenderAsyncClient#createTransaction()}. * * @return A {@link Mono} that completes when the dead letter operation finishes. - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public Mono deadLetter(String lockToken, DeadLetterOptions deadLetterOptions, String sessionId, + public Mono deadLetter(ServiceBusReceivedMessage message, DeadLetterOptions deadLetterOptions, ServiceBusTransactionContext transactionContext) { if (Objects.isNull(transactionContext)) { return monoError(logger, new NullPointerException("'transactionContext' cannot be null.")); } else if (Objects.isNull(transactionContext.getTransactionId())) { return monoError(logger, new NullPointerException("'transactionContext.transactionId' cannot be null.")); } - return updateDisposition(lockToken, DispositionStatus.SUSPENDED, deadLetterOptions.getDeadLetterReason(), - deadLetterOptions.getDeadLetterErrorDescription(), deadLetterOptions.getPropertiesToModify(), sessionId, + return updateDisposition(message, DispositionStatus.SUSPENDED, deadLetterOptions.getDeadLetterReason(), + deadLetterOptions.getDeadLetterErrorDescription(), deadLetterOptions.getPropertiesToModify(), transactionContext); } @@ -1264,19 +1029,19 @@ private boolean isManagementToken(String lockToken) { return managementNodeLocks.containsUnexpired(lockToken); } - private Mono updateDisposition(String lockToken, DispositionStatus dispositionStatus, + private Mono updateDisposition(ServiceBusReceivedMessage message, DispositionStatus dispositionStatus, String deadLetterReason, String deadLetterErrorDescription, Map propertiesToModify, - String sessionId, ServiceBusTransactionContext transactionContext) { - + ServiceBusTransactionContext transactionContext) { if (isDisposed.get()) { return monoError(logger, new IllegalStateException( String.format(INVALID_OPERATION_DISPOSED_RECEIVER, dispositionStatus.getValue()))); - } else if (Objects.isNull(lockToken)) { - return monoError(logger, new NullPointerException("'lockToken' cannot be null.")); - } else if (lockToken.isEmpty()) { - return monoError(logger, new IllegalArgumentException("'lockToken' cannot be empty.")); + } else if (Objects.isNull(message)) { + return monoError(logger, new NullPointerException("'message' cannot be null.")); } + final String lockToken = message.getLockToken(); + final String sessionId = message.getSessionId(); + if (receiverOptions.getReceiveMode() != ReceiveMode.PEEK_LOCK) { return Mono.error(logger.logExceptionAsError(new UnsupportedOperationException(String.format( "'%s' is not supported on a receiver opened in ReceiveMode.RECEIVE_AND_DELETE.", dispositionStatus)))); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java index 87bba9fb8eb67..f0dc9c1ad7d9f 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java @@ -69,385 +69,184 @@ public String getEntityPath() { } /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token. This will make the message available + * Abandon a {@link ServiceBusReceivedMessage message}. This will make the message available * again for processing. Abandoning a message will increase the delivery count on the message. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public void abandon(String lockToken) { - asyncClient.abandon(lockToken).block(operationTimeout); + public void abandon(ServiceBusReceivedMessage message) { + asyncClient.abandon(message).block(operationTimeout); } /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token and updates the message's properties. + * Abandon a {@link ServiceBusReceivedMessage message} updates the message's properties. * This will make the message available again for processing. Abandoning a message will increase the delivery count * on the message. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param propertiesToModify Properties to modify on the message. * - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public void abandon(String lockToken, Map propertiesToModify) { - asyncClient.abandon(lockToken, propertiesToModify).block(operationTimeout); + public void abandon(ServiceBusReceivedMessage message, Map propertiesToModify) { + asyncClient.abandon(message, propertiesToModify).block(operationTimeout); } /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token and updates the message's properties. + * Abandon a {@link ServiceBusReceivedMessage message} updates the message's properties. * This will make the message available again for processing. Abandoning a message will increase the delivery count * on the message. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param propertiesToModify Properties to modify on the message. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverClient#createTransaction()} or {@link ServiceBusSenderClient#createTransaction()}. * - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or + * @throws NullPointerException if {@code message}, {@code transactionContext} or * {@code transactionContext.transactionId} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public void abandon(String lockToken, Map propertiesToModify, + public void abandon(ServiceBusReceivedMessage message, Map propertiesToModify, ServiceBusTransactionContext transactionContext) { - asyncClient.abandon(lockToken, propertiesToModify, transactionContext).block(operationTimeout); - } - - /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token and updates the message's properties. - * This will make the message available again for processing. Abandoning a message will increase the delivery count - * on the message. - * - * @param lockToken Lock token of the message. - * @param propertiesToModify Properties to modify on the message. - * @param sessionId Session id of the message to abandon. {@code null} if there is no session. - * - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public void abandon(String lockToken, Map propertiesToModify, String sessionId) { - asyncClient.abandon(lockToken, propertiesToModify, sessionId).block(operationTimeout); - } - - /** - * Abandon a {@link ServiceBusReceivedMessage message} with its lock token and updates the message's properties. - * This will make the message available again for processing. Abandoning a message will increase the delivery count - * on the message. - * - * @param lockToken Lock token of the message. - * @param propertiesToModify Properties to modify on the message. - * @param sessionId Session id of the message to abandon. {@code null} if there is no session. - * @param transactionContext in which this operation is taking part in. The transaction should be created first by - * {@link ServiceBusReceiverClient#createTransaction()} or {@link ServiceBusSenderClient#createTransaction()}. - * - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public void abandon(String lockToken, Map propertiesToModify, String sessionId, - ServiceBusTransactionContext transactionContext) { - asyncClient.abandon(lockToken, propertiesToModify, sessionId, transactionContext).block(operationTimeout); - } - - /** - * Completes a {@link ServiceBusReceivedMessage message} using its lock token. This will delete the message from the - * service. - * - * @param lockToken Lock token of the message. - * - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public void complete(String lockToken) { - asyncClient.complete(lockToken).block(operationTimeout); - } - - /** - * Completes a {@link ServiceBusReceivedMessage message} using its lock token. This will delete the message from the - * service. - * - * @param lockToken Lock token of the message. - * @param transactionContext in which this operation is taking part in. The transaction should be created first by - * {@link ServiceBusReceiverClient#createTransaction()} or {@link ServiceBusSenderClient#createTransaction()}. - * - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public void complete(String lockToken, ServiceBusTransactionContext transactionContext) { - asyncClient.complete(lockToken, transactionContext).block(operationTimeout); + asyncClient.abandon(message, propertiesToModify, transactionContext).block(operationTimeout); } /** - * Completes a {@link ServiceBusReceivedMessage message} using its lock token. This will delete the message from the - * service. + * Completes a {@link ServiceBusReceivedMessage message}. This will delete the message from the service. * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to complete. {@code null} if there is no session. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public void complete(String lockToken, String sessionId) { - asyncClient.complete(lockToken, sessionId).block(operationTimeout); + public void complete(ServiceBusReceivedMessage message) { + asyncClient.complete(message).block(operationTimeout); } /** - * Completes a {@link ServiceBusReceivedMessage message} using its lock token. This will delete the message from the + * Completes a {@link ServiceBusReceivedMessage message}. This will delete the message from the * service. * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to complete. {@code null} if there is no session. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverClient#createTransaction()} or {@link ServiceBusSenderClient#createTransaction()}. * - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or + * @throws NullPointerException if {@code message}, {@code transactionContext} or * {@code transactionContext.transactionId} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public void complete(String lockToken, String sessionId, ServiceBusTransactionContext - transactionContext) { - asyncClient.complete(lockToken, sessionId, transactionContext).block(operationTimeout); - } - - /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token. This will move message into the deferred - * subqueue. - * - * @param lockToken Lock token of the message. - * - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - * @see Message deferral */ - public void defer(String lockToken) { - asyncClient.defer(lockToken).block(operationTimeout); + public void complete(ServiceBusReceivedMessage message, ServiceBusTransactionContext transactionContext) { + asyncClient.complete(message, transactionContext).block(operationTimeout); } /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token. This will move message into the deferred + * Defers a {@link ServiceBusReceivedMessage message}. This will move message into the deferred * subqueue. * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to defer. {@code null} if there is no session. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Message deferral */ - public void defer(String lockToken, String sessionId) { - asyncClient.defer(lockToken, sessionId).block(operationTimeout); + public void defer(ServiceBusReceivedMessage message) { + asyncClient.defer(message).block(operationTimeout); } /** * Defers a {@link ServiceBusReceivedMessage message} using its lock token with modified message property. This will * move message into the deferred subqueue. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param propertiesToModify Message properties to modify. * - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Message deferral */ - public void defer(String lockToken, Map propertiesToModify) { - asyncClient.defer(lockToken, propertiesToModify).block(operationTimeout); + public void defer(ServiceBusReceivedMessage message, Map propertiesToModify) { + asyncClient.defer(message, propertiesToModify).block(operationTimeout); } /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token with modified message property. This will + * Defers a {@link ServiceBusReceivedMessage message} with modified message property. This will * move message into the deferred subqueue. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param propertiesToModify Message properties to modify. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverClient#createTransaction()} or {@link ServiceBusSenderClient#createTransaction()}. * - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or + * @throws NullPointerException if {@code message}, {@code transactionContext} or * {@code transactionContext.transactionId} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Message deferral */ - public void defer(String lockToken, Map propertiesToModify, ServiceBusTransactionContext - transactionContext) { - asyncClient.defer(lockToken, propertiesToModify, transactionContext).block(operationTimeout); - - } - - /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token with modified message property. This will - * move message into the deferred subqueue. - * - * @param lockToken Lock token of the message. - * @param propertiesToModify Message properties to modify. - * @param sessionId Session id of the message to defer. {@code null} if there is no session. - * - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - * @see Message deferral - */ - public void defer(String lockToken, Map propertiesToModify, String sessionId) { - asyncClient.defer(lockToken, propertiesToModify, sessionId).block(operationTimeout); - } - - /** - * Defers a {@link ServiceBusReceivedMessage message} using its lock token with modified message property. This will - * move message into the deferred subqueue. - * - * @param lockToken Lock token of the message. - * @param propertiesToModify Message properties to modify. - * @param sessionId Session id of the message to defer. {@code null} if there is no session. - * @param transactionContext in which this operation is taking part in. The transaction should be created first by - * {@link ServiceBusReceiverClient#createTransaction()} or {@link ServiceBusSenderClient#createTransaction()}. - * - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - * @see Message deferral - */ - public void defer(String lockToken, Map propertiesToModify, String sessionId, + public void defer(ServiceBusReceivedMessage message, Map propertiesToModify, ServiceBusTransactionContext transactionContext) { - asyncClient.defer(lockToken, propertiesToModify, sessionId, transactionContext).block(operationTimeout); + asyncClient.defer(message, propertiesToModify, transactionContext).block(operationTimeout); } /** * Moves a {@link ServiceBusReceivedMessage message} to the deadletter sub-queue. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. * @see Dead letter * queues */ - public void deadLetter(String lockToken) { - asyncClient.deadLetter(lockToken).block(operationTimeout); - } - - /** - * Moves a {@link ServiceBusReceivedMessage message} to the deadletter sub-queue. - * - * @param lockToken Lock token of the message. - * @param sessionId Session id of the message to deadletter. {@code null} if there is no session. - * - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - * @see Dead letter - * queues - */ - public void deadLetter(String lockToken, String sessionId) { - asyncClient.deadLetter(lockToken, sessionId).block(operationTimeout); - } - - /** - * Moves a {@link ServiceBusReceivedMessage message} to the deadletter subqueue with deadletter reason, error - * description, and/or modified properties. - * - * @param lockToken Lock token of the message. - * @param deadLetterOptions The options to specify when moving message to the deadletter sub-queue. - * - * @throws NullPointerException if {@code lockToken} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public void deadLetter(String lockToken, DeadLetterOptions deadLetterOptions) { - asyncClient.deadLetter(lockToken, deadLetterOptions).block(operationTimeout); + public void deadLetter(ServiceBusReceivedMessage message) { + asyncClient.deadLetter(message).block(operationTimeout); } /** * Moves a {@link ServiceBusReceivedMessage message} to the deadletter subqueue with deadletter reason, error * description, and/or modified properties. * - * @param lockToken Lock token of the message. - * @param deadLetterOptions The options to specify when moving message to the deadletter sub-queue. - * @param transactionContext in which this operation is taking part in. The transaction should be created first by - * {@link ServiceBusReceiverClient#createTransaction()} or {@link ServiceBusSenderClient#createTransaction()}. - * - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or - * {@code transactionContext.transactionId} is null. - * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} - * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. - */ - public void deadLetter(String lockToken, DeadLetterOptions deadLetterOptions, - ServiceBusTransactionContext transactionContext) { - asyncClient.deadLetter(lockToken, deadLetterOptions, transactionContext).block(operationTimeout); - } - - /** - * Moves a {@link ServiceBusReceivedMessage message} to the deadletter subqueue with deadletter reason, error - * description, and/or modified properties. - * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param deadLetterOptions The options to specify when moving message to the deadletter sub-queue. - * @param sessionId Session id of the message to deadletter. {@code null} if there is no session. * - * @throws NullPointerException if {@code lockToken} is null. + * @throws NullPointerException if {@code message} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public void deadLetter(String lockToken, DeadLetterOptions deadLetterOptions, String sessionId) { - asyncClient.deadLetter(lockToken, deadLetterOptions, sessionId).block(operationTimeout); + public void deadLetter(ServiceBusReceivedMessage message, DeadLetterOptions deadLetterOptions) { + asyncClient.deadLetter(message, deadLetterOptions).block(operationTimeout); } /** * Moves a {@link ServiceBusReceivedMessage message} to the deadletter subqueue with deadletter reason, error * description, and/or modified properties. * - * @param lockToken Lock token of the message. + * @param message The {@link ServiceBusReceivedMessage} to perform this operation. * @param deadLetterOptions The options to specify when moving message to the deadletter sub-queue. - * @param sessionId Session id of the message to deadletter. {@code null} if there is no session. * @param transactionContext in which this operation is taking part in. The transaction should be created first by * {@link ServiceBusReceiverClient#createTransaction()} or {@link ServiceBusSenderClient#createTransaction()}. * - * @throws NullPointerException if {@code lockToken}, {@code transactionContext} or + * @throws NullPointerException if {@code message}, {@code transactionContext} or * {@code transactionContext.transactionId} is null. * @throws UnsupportedOperationException if the receiver was opened in {@link ReceiveMode#RECEIVE_AND_DELETE} * mode. - * @throws IllegalArgumentException if {@code lockToken} is an empty value. */ - public void deadLetter(String lockToken, DeadLetterOptions deadLetterOptions, String sessionId, + public void deadLetter(ServiceBusReceivedMessage message, DeadLetterOptions deadLetterOptions, ServiceBusTransactionContext transactionContext) { - asyncClient.deadLetter(lockToken, deadLetterOptions, sessionId, transactionContext).block(operationTimeout); + asyncClient.deadLetter(message, deadLetterOptions, transactionContext).block(operationTimeout); } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReadmeSamples.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReadmeSamples.java index d38385814e700..0cfba9e9b9b93 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReadmeSamples.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReadmeSamples.java @@ -147,7 +147,7 @@ public void completeMessage() { ServiceBusReceivedMessage message = context.getMessage(); // Process message and then complete it. - receiver.complete(message.getLockToken()); + receiver.complete(message); }); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAndSettleAsyncSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAndSettleAsyncSample.java index 434932a0900a5..ec726665da7e7 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAndSettleAsyncSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAndSettleAsyncSample.java @@ -9,10 +9,10 @@ /** * Sample demonstrates how to receive an {@link ServiceBusReceivedMessage} from an Azure Service Bus Queue and settle - * it. Settling of message include {@link ServiceBusReceiverAsyncClient#complete(String) complete()}, {@link - * ServiceBusReceiverAsyncClient#defer(String) defer()}, - * {@link ServiceBusReceiverAsyncClient#abandon(String) abandon}, or - * {@link ServiceBusReceiverAsyncClient#deadLetter(String) dead-letter} a message. + * it. Settling of message include {@link ServiceBusReceiverAsyncClient#complete(ServiceBusReceivedMessage) complete}, + * {@link ServiceBusReceiverAsyncClient#defer(ServiceBusReceivedMessage) defer}, + * {@link ServiceBusReceiverAsyncClient#abandon(ServiceBusReceivedMessage) abandon}, or + * {@link ServiceBusReceiverAsyncClient#deadLetter(ServiceBusReceivedMessage) dead-letter} a message. */ public class ReceiveMessageAndSettleAsyncSample { @@ -49,9 +49,9 @@ public static void main(String[] args) throws InterruptedException { // Change the `messageProcessed` according to you business logic and if you are able to process the // message successfully. if (messageProcessed) { - return receiver.complete(context.getMessage().getLockToken()); + return receiver.complete(context.getMessage()); } else { - return receiver.abandon(context.getMessage().getLockToken()); + return receiver.abandon(context.getMessage()); } }).subscribe(); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAsyncSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAsyncSample.java index 6cb75b19d8d4c..15f86ff3f671b 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAsyncSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAsyncSample.java @@ -51,9 +51,9 @@ public static void main(String[] args) throws InterruptedException { // When we are finished processing the message, then complete or abandon it. if (isSuccessfullyProcessed) { - return receiver.complete(message.getLockToken()).thenReturn("Completed: " + message.getMessageId()); + return receiver.complete(message).thenReturn("Completed: " + message.getMessageId()); } else { - return receiver.abandon(message.getLockToken()).thenReturn("Abandoned: " + message.getMessageId()); + return receiver.abandon(message).thenReturn("Abandoned: " + message.getMessageId()); } }) .subscribe(message -> System.out.printf("Processed at %s. %s%n", Instant.now(), message), diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAutoLockRenewal.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAutoLockRenewal.java index 7ff52c49e5755..39ca5c8138d31 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAutoLockRenewal.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAutoLockRenewal.java @@ -48,9 +48,9 @@ public static void main(String[] args) throws InterruptedException { // Change the `messageProcessed` according to you business logic and if you are able to process the // message successfully. if (messageProcessed) { - return receiver.complete(context.getMessage().getLockToken()); + return receiver.complete(context.getMessage()); } else { - return receiver.abandon(context.getMessage().getLockToken()); + return receiver.abandon(context.getMessage()); } }).subscribe(); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAzureIdentityAsyncSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAzureIdentityAsyncSample.java index 270977e9e5728..48266a9c9b0f7 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAzureIdentityAsyncSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageAzureIdentityAsyncSample.java @@ -54,7 +54,7 @@ public static void main(String[] args) throws InterruptedException { System.out.println("Received Message Id:" + message.getMessageId()); System.out.println("Received Message:" + new String(message.getBody())); - return receiverAsyncClient.complete(message.getLockToken()); + return receiverAsyncClient.complete(message); }) .subscribe(aVoid -> System.out.println("Processed message."), error -> System.err.println("Error occurred while receiving message: " + error), diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageSyncSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageSyncSample.java index 034b7f2d5e790..487b6ed02f119 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageSyncSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageSyncSample.java @@ -47,7 +47,7 @@ public static void main(String[] args) { System.out.println("Received Message Id: " + message.getMessageId()); System.out.println("Received Message: " + new String(message.getBody())); - receiver.complete(message.getLockToken()); + receiver.complete(message); }); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMultipleSessionsAsyncSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMultipleSessionsAsyncSample.java index b35711e91cd17..87f06985bbe11 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMultipleSessionsAsyncSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMultipleSessionsAsyncSample.java @@ -59,9 +59,9 @@ public static void main(String[] args) throws InterruptedException { // successful or not. boolean messageProcessed = RANDOM.nextBoolean(); if (messageProcessed) { - return receiver.complete(context.getMessage().getLockToken()); + return receiver.complete(context.getMessage()); } else { - return receiver.abandon(context.getMessage().getLockToken()); + return receiver.abandon(context.getMessage()); } }).subscribe(); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveNamedSessionAsyncSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveNamedSessionAsyncSample.java index 35f2f1167d449..0c764c0774c83 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveNamedSessionAsyncSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveNamedSessionAsyncSample.java @@ -52,7 +52,7 @@ public static void main(String[] args) throws InterruptedException { System.out.println("Processing message from session: " + context.getSessionId()); // Process message then complete it. - return receiver.complete(context.getMessage().getLockToken()); + return receiver.complete(context.getMessage()); }) .subscribe(aVoid -> { }, error -> System.err.println("Error occurred: " + error)); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveNamedSessionSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveNamedSessionSample.java index ffd2477d92b15..7e71405c23bfe 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveNamedSessionSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveNamedSessionSample.java @@ -56,9 +56,9 @@ public static void main(String[] args) { boolean isSuccessfullyProcessed = processMessage(message); if (isSuccessfullyProcessed) { - receiver.complete(message.getLockToken(), message.getSessionId()); + receiver.complete(message); } else { - receiver.abandon(message.getLockToken(), null, message.getSessionId()); + receiver.abandon(message, null); } } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveSingleSessionAsyncSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveSingleSessionAsyncSample.java index 45e2db71f5dff..c7e178ca23277 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveSingleSessionAsyncSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveSingleSessionAsyncSample.java @@ -51,7 +51,7 @@ public static void main(String[] args) throws InterruptedException { System.out.println("Processing message from session: " + context.getSessionId()); // Process message - return receiver.complete(context.getMessage().getLockToken(), context.getSessionId()); + return receiver.complete(context.getMessage()); }).subscribe(aVoid -> { }, error -> System.err.println("Error occurred: " + error)); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendAndReceiveSessionMessageSample.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendAndReceiveSessionMessageSample.java index 2e83b77705664..a6cbef6fb3bb1 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendAndReceiveSessionMessageSample.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendAndReceiveSessionMessageSample.java @@ -89,7 +89,7 @@ public static void main(String[] args) throws InterruptedException { System.out.println("Received Message Session Id: " + message.getSessionId()); System.out.println("Received Message: " + new String(message.getBody())); - return receiver.complete(message.getLockToken(), message.getSessionId()); + return receiver.complete(message); }).subscribe(); // subscribe() is not a blocking call. We sleep here so the program does not end before the send is complete. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientJavaDocCodeSamples.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientJavaDocCodeSamples.java index 4fa81a2c8c40d..5ac5b56af1617 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientJavaDocCodeSamples.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientJavaDocCodeSamples.java @@ -129,7 +129,7 @@ public void receiveAll() { ServiceBusReceivedMessage message = context.getMessage(); System.out.printf("Received message id: %s%n", message.getMessageId()); System.out.printf("Contents of message as string: %s%n", new String(message.getBody(), UTF_8)); - return receiver.complete(message.getLockToken()); + return receiver.complete(message); }).subscribe(aVoid -> System.out.println("Processed message."), error -> System.out.println("Error occurred: " + error)); @@ -283,7 +283,7 @@ public void completeMessageWithTransaction() { // Keep a reference to `subscription`. When the program is finished receiving messages, call // subscription.dispose(). This will dispose it cleanly. - Disposable subscriber = receiver.complete(messageContext.getMessage().getLockToken(), transactionContext) + Disposable subscriber = receiver.complete(messageContext.getMessage(), transactionContext) .subscribe(); // When all the messages are processed and settled, you should commit/rollback this transaction. @@ -313,7 +313,7 @@ public void abandonMessageWithTransaction() { // Keep a reference to `subscription`. When the program is finished receiving messages, call // subscription.dispose(). This will dispose it cleanly. - Disposable subscriber = receiver.abandon(messageContext.getMessage().getLockToken(), propertiesToModify, + Disposable subscriber = receiver.abandon(messageContext.getMessage(), propertiesToModify, transactionContext).subscribe(); // When all the messages are processed and settled, you should commit/rollback this transaction. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java index a20bcd986d978..dbf904550cda7 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java @@ -161,67 +161,13 @@ void createTransactionAndRollbackMessagesTest(MessagingEntityType entityType) { assertNotNull(receivedMessage); // Assert & Act - StepVerifier.create(receiver.complete(receivedMessage.getLockToken(), transaction.get())) + StepVerifier.create(receiver.complete(receivedMessage, transaction.get())) .verifyComplete(); StepVerifier.create(receiver.rollbackTransaction(transaction.get())) .verifyComplete(); } - /** - * This specifically test that we can use lockToken. This use case is valid when a message is moved from one machine - * to another machine and user just have access to lock token. Verifies that we can complete a message with lock - * token only with a transaction and rollback. - */ - @Test - void transactionWithLockTokenTest() { - - // Arrange - MessagingEntityType entityType = MessagingEntityType.QUEUE; - setSenderAndReceiver(entityType, 0, isSessionEnabled); - - ServiceBusReceiverAsyncClient receiverNonConnectionSharing = getReceiverBuilder(false, entityType, 0, - Function.identity(), false).buildAsyncClient(); - - final String messageId = UUID.randomUUID().toString(); - final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); - - sendMessage(message).block(TIMEOUT); - - // Assert & Act - AtomicReference transaction = new AtomicReference<>(); - - // create a transaction. - StepVerifier.create(receiverNonConnectionSharing.createTransaction()) - .assertNext(txn -> { - transaction.set(txn); - assertNotNull(transaction); - }) - .verifyComplete(); - - AtomicReference messageLockToken = new AtomicReference<>(); - - // receive a message and get lock token. - StepVerifier.create(receiver.receiveMessages().next() - .map(messageContext -> { - ServiceBusReceivedMessage received = messageContext.getMessage(); - messageLockToken.set(received.getLockToken()); - return messageContext; - })) - .assertNext(receivedMessage -> assertMessageEquals(receivedMessage, messageId, isSessionEnabled)) - .verifyComplete(); - - // complete the message using lock token only using a receiver which represent a different machine - StepVerifier.create(receiverNonConnectionSharing.complete(messageLockToken.get(), transaction.get())) - .verifyComplete(); - - // commit the transaction. - StepVerifier.create(receiverNonConnectionSharing.commitTransaction(transaction.get())) - .verifyComplete(); - - messagesPending.decrementAndGet(); - } - /** * Verifies that we can do following using shared connection and on non session entity. 1. create transaction 2. * receive and settle with transactionContext. 3. commit Rollback this transaction. @@ -260,19 +206,19 @@ void transactionSendReceiveAndCommit(DispositionStatus dispositionStatus) { final Mono operation; switch (dispositionStatus) { case COMPLETED: - operation = receiver.complete(receivedMessage.getLockToken(), transaction.get()); + operation = receiver.complete(receivedMessage, transaction.get()); messagesPending.decrementAndGet(); break; case ABANDONED: - operation = receiver.abandon(receivedMessage.getLockToken(), null, transaction.get()); + operation = receiver.abandon(receivedMessage, null, transaction.get()); break; case SUSPENDED: DeadLetterOptions deadLetterOptions = new DeadLetterOptions().setDeadLetterReason(deadLetterReason); - operation = receiver.deadLetter(receivedMessage.getLockToken(), deadLetterOptions, transaction.get()); + operation = receiver.deadLetter(receivedMessage, deadLetterOptions, transaction.get()); messagesPending.decrementAndGet(); break; case DEFERRED: - operation = receiver.defer(receivedMessage.getLockToken(), null, transaction.get()); + operation = receiver.defer(receivedMessage, null, transaction.get()); break; default: throw logger.logExceptionAsError(new IllegalArgumentException( @@ -323,7 +269,7 @@ void transactionReceiveCompleteCommitMixClient(MessagingEntityType entityType) { final ServiceBusReceivedMessage receivedMessage = receivedContext.getMessage(); assertNotNull(receivedMessage); - StepVerifier.create(receiver.complete(receivedMessage.getLockToken(), transaction.get())) + StepVerifier.create(receiver.complete(receivedMessage, transaction.get())) .verifyComplete(); StepVerifier.create(sender.commitTransaction(transaction.get())) @@ -341,7 +287,7 @@ void receiveTwoMessagesAutoComplete(MessagingEntityType entityType, boolean isSe final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); - final List lockTokens = new ArrayList<>(); + final List receivedMessages = new ArrayList<>(); Mono.when(sendMessage(message), sendMessage(message)).block(TIMEOUT); @@ -349,17 +295,17 @@ void receiveTwoMessagesAutoComplete(MessagingEntityType entityType, boolean isSe try { StepVerifier.create(receiver.receiveMessages()) .assertNext(receivedMessage -> { - lockTokens.add(receivedMessage.getMessage().getLockToken()); + receivedMessages.add(receivedMessage.getMessage()); assertMessageEquals(receivedMessage, messageId, isSessionEnabled); }) .assertNext(receivedMessage -> { - lockTokens.add(receivedMessage.getMessage().getLockToken()); + receivedMessages.add(receivedMessage.getMessage()); assertMessageEquals(receivedMessage, messageId, isSessionEnabled); }) .thenCancel() .verify(); } finally { - int numberCompleted = completeMessages(receiver, lockTokens); + int numberCompleted = completeMessages(receiver, receivedMessages); messagesPending.addAndGet(-numberCompleted); } } @@ -375,7 +321,7 @@ void receiveMessageAutoComplete(MessagingEntityType entityType, boolean isSessio final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); - final List lockTokens = new ArrayList<>(); + final List receivedMessages = new ArrayList<>(); sendMessage(message).block(TIMEOUT); @@ -383,13 +329,13 @@ void receiveMessageAutoComplete(MessagingEntityType entityType, boolean isSessio try { StepVerifier.create(receiver.receiveMessages()) .assertNext(receivedMessage -> { - lockTokens.add(receivedMessage.getMessage().getLockToken()); + receivedMessages.add(receivedMessage.getMessage()); assertMessageEquals(receivedMessage, messageId, isSessionEnabled); }) .thenCancel() .verify(); } finally { - int numberCompleted = completeMessages(receiver, lockTokens); + int numberCompleted = completeMessages(receiver, receivedMessages); messagesPending.addAndGet(-numberCompleted); } } @@ -500,7 +446,7 @@ void peekFromSequenceNumberMessage(MessagingEntityType entityType, boolean isSes }) .verifyComplete(); } finally { - receiver.complete(receivedMessage.getLockToken()) + receiver.complete(receivedMessage) .block(Duration.ofSeconds(10)); messagesPending.decrementAndGet(); } @@ -601,7 +547,7 @@ void deadLetterMessage(MessagingEntityType entityType, boolean isSessionEnabled) assertNotNull(receivedMessage); // Assert & Act - StepVerifier.create(receiver.deadLetter(receivedMessage.getLockToken())) + StepVerifier.create(receiver.deadLetter(receivedMessage)) .verifyComplete(); messagesPending.decrementAndGet(); @@ -625,7 +571,7 @@ void receiveAndComplete(MessagingEntityType entityType, boolean isSessionEnabled assertNotNull(receivedMessage); // Assert & Act - StepVerifier.create(receiver.complete(receivedMessage.getLockToken())) + StepVerifier.create(receiver.complete(receivedMessage)) .verifyComplete(); messagesPending.decrementAndGet(); @@ -670,7 +616,7 @@ void receiveAndRenewLock(MessagingEntityType entityType) { } finally { logger.info("Completing message. Seq: {}.", receivedMessage.getSequenceNumber()); - receiver.complete(receivedMessage.getLockToken()) + receiver.complete(receivedMessage) .doOnSuccess(aVoid -> messagesPending.decrementAndGet()) .block(TIMEOUT); } @@ -725,7 +671,7 @@ void autoRenewLockOnReceiveMessage(MessagingEntityType entityType, boolean isSes "Latest should be after or equal to initial. initial: %s. latest: %s", initial, latest)); } finally { logger.info("Completing message."); - receiver.complete(received.getLockToken()).block(Duration.ofSeconds(15)); + receiver.complete(received).block(Duration.ofSeconds(15)); messagesPending.decrementAndGet(); } }) @@ -752,7 +698,7 @@ void receiveAndAbandon(MessagingEntityType entityType, boolean isSessionEnabled) assertNotNull(receivedMessage); // Assert & Act - StepVerifier.create(receiver.abandon(receivedMessage.getLockToken())) + StepVerifier.create(receiver.abandon(receivedMessage)) .verifyComplete(); messagesPending.decrementAndGet(); @@ -777,7 +723,7 @@ void receiveAndDefer(MessagingEntityType entityType, boolean isSessionEnabled) { assertNotNull(receivedMessage); // Act & Assert - StepVerifier.create(receiver.defer(receivedMessage.getLockToken())) + StepVerifier.create(receiver.defer(receivedMessage)) .verifyComplete(); messagesPending.decrementAndGet(); @@ -803,7 +749,7 @@ void receiveDeferredMessageBySequenceNumber(MessagingEntityType entityType, Disp final ServiceBusReceivedMessage receivedMessage = receivedContext.getMessage(); assertNotNull(receivedMessage); - receiver.defer(receivedMessage.getLockToken()).block(TIMEOUT); + receiver.defer(receivedMessage).block(TIMEOUT); final ServiceBusReceivedMessage receivedDeferredMessage = receiver .receiveDeferredMessage(receivedMessage.getSequenceNumber()) @@ -815,14 +761,14 @@ void receiveDeferredMessageBySequenceNumber(MessagingEntityType entityType, Disp final Mono operation; switch (dispositionStatus) { case ABANDONED: - operation = receiver.abandon(receivedDeferredMessage.getLockToken()); + operation = receiver.abandon(receivedDeferredMessage); messagesDeferredPending.add(receivedDeferredMessage.getSequenceNumber()); break; case SUSPENDED: - operation = receiver.deadLetter(receivedDeferredMessage.getLockToken()); + operation = receiver.deadLetter(receivedDeferredMessage); break; case COMPLETED: - operation = receiver.complete(receivedDeferredMessage.getLockToken()); + operation = receiver.complete(receivedDeferredMessage); break; default: throw logger.logExceptionAsError(new IllegalArgumentException( @@ -904,15 +850,14 @@ void setAndGetSessionState(MessagingEntityType entityType) { sendMessage(messageToSend).block(Duration.ofSeconds(10)); // Act - AtomicReference messageLockToken = new AtomicReference<>(); - AtomicReference session = new AtomicReference<>(); + AtomicReference receivedMessage = new AtomicReference<>(); + //AtomicReference session = new AtomicReference<>(); StepVerifier.create(receiver.receiveMessages() .take(1) .flatMap(m -> { logger.info("SessionId: {}. LockToken: {}. LockedUntil: {}. Message received.", m.getSessionId(), m.getMessage().getLockToken(), m.getMessage().getLockedUntil()); - messageLockToken.set(m.getMessage().getLockToken()); - session.set(m.getSessionId()); + receivedMessage.set(m.getMessage()); return receiver.setSessionState(sessionId, sessionState); })) .expectComplete() @@ -925,7 +870,7 @@ void setAndGetSessionState(MessagingEntityType entityType) { }) .verifyComplete(); - receiver.complete(messageLockToken.get(), session.get()).block(Duration.ofSeconds(15)); + receiver.complete(receivedMessage.get()).block(Duration.ofSeconds(15)); messagesPending.decrementAndGet(); } @@ -944,7 +889,7 @@ void receiveFromDeadLetter(MessagingEntityType entityType) { final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); - final List lockTokens = new ArrayList<>(); + final List receivedMessages = new ArrayList<>(); sendMessage(message).block(TIMEOUT); @@ -955,20 +900,20 @@ void receiveFromDeadLetter(MessagingEntityType entityType) { final ServiceBusReceivedMessage receivedMessage = receivedContext.getMessage(); assertNotNull(receivedMessage); - StepVerifier.create(receiver.deadLetter(receivedMessage.getLockToken())) + StepVerifier.create(receiver.deadLetter(receivedMessage)) .verifyComplete(); // Assert & Act try { StepVerifier.create(deadLetterReceiver.receiveMessages().take(1)) .assertNext(messageContext -> { - lockTokens.add(messageContext.getMessage().getLockToken()); + receivedMessages.add(messageContext.getMessage()); assertMessageEquals(receivedMessage, messageId, isSessionEnabled); }) .thenCancel() .verify(); } finally { - int numberCompleted = completeMessages(deadLetterReceiver, lockTokens); + int numberCompleted = completeMessages(deadLetterReceiver, receivedMessages); messagesPending.addAndGet(-numberCompleted); } } @@ -1012,7 +957,7 @@ void renewMessageLock(MessagingEntityType entityType) throws InterruptedExceptio assertEquals(LockRenewalStatus.CANCELLED, operation.getStatus()); } finally { int numberCompleted = completeMessages(receiver, - Collections.singletonList(receivedMessage.getLockToken())); + Collections.singletonList(receivedMessage)); messagesPending.addAndGet(-numberCompleted); } }).thenCancel() @@ -1072,7 +1017,7 @@ private Mono sendMessage(List messages) { }); } - private int completeMessages(ServiceBusReceiverAsyncClient client, List lockTokens) { + private int completeMessages(ServiceBusReceiverAsyncClient client, List lockTokens) { Mono.when(lockTokens.stream().map(e -> client.complete(e)) .collect(Collectors.toList())) .block(TIMEOUT); @@ -1087,7 +1032,7 @@ private void completeDeferredMessages(ServiceBusReceiverAsyncClient client, Serv assertNotNull(receivedDeferredMessage); - receiver.complete(receivedDeferredMessage.getLockToken()).block(TIMEOUT); + receiver.complete(receivedDeferredMessage).block(TIMEOUT); } private ServiceBusClientBuilder.ServiceBusReceiverClientBuilder getDeadLetterReceiverBuilder(boolean useCredentials, 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 cae2c70325189..788f6507ab03b 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 @@ -279,16 +279,16 @@ void settleWithNullTransaction(DispositionStatus dispositionStatus) { final Mono operation; switch (dispositionStatus) { case DEFERRED: - operation = receiver.defer(receivedMessage.getLockToken(), null, nullTransaction); + operation = receiver.defer(receivedMessage, null, nullTransaction); break; case ABANDONED: - operation = receiver.abandon(receivedMessage.getLockToken(), null, nullTransaction); + operation = receiver.abandon(receivedMessage, null, nullTransaction); break; case COMPLETED: - operation = receiver.complete(receivedMessage.getLockToken(), nullTransaction); + operation = receiver.complete(receivedMessage, nullTransaction); break; case SUSPENDED: - operation = receiver.deadLetter(receivedMessage.getLockToken(), new DeadLetterOptions(), nullTransaction); + operation = receiver.deadLetter(receivedMessage, new DeadLetterOptions(), nullTransaction); break; default: throw new IllegalArgumentException("Unrecognized operation: " + dispositionStatus); @@ -319,16 +319,16 @@ void settleWithNullTransactionId(DispositionStatus dispositionStatus) { final Mono operation; switch (dispositionStatus) { case DEFERRED: - operation = receiver.defer(receivedMessage.getLockToken(), null, nullTransactionId); + operation = receiver.defer(receivedMessage, null, nullTransactionId); break; case ABANDONED: - operation = receiver.abandon(receivedMessage.getLockToken(), null, nullTransactionId); + operation = receiver.abandon(receivedMessage, null, nullTransactionId); break; case COMPLETED: - operation = receiver.complete(receivedMessage.getLockToken(), nullTransactionId); + operation = receiver.complete(receivedMessage, nullTransactionId); break; case SUSPENDED: - operation = receiver.deadLetter(receivedMessage.getLockToken(), new DeadLetterOptions(), nullTransactionId); + operation = receiver.deadLetter(receivedMessage, new DeadLetterOptions(), nullTransactionId); break; default: throw new IllegalArgumentException("Unrecognized operation: " + dispositionStatus); @@ -342,27 +342,6 @@ void settleWithNullTransactionId(DispositionStatus dispositionStatus) { isNull(), isNull(), isNull(), isNull()); } - /** - * Verifies that we error if we try to complete a message without a lock token. - */ - @Test - void completeNullLockToken() { - // Arrange - when(connection.getManagementNode(ENTITY_PATH, ENTITY_TYPE)).thenReturn(Mono.just(managementNode)); - when(managementNode.updateDisposition(any(), eq(DispositionStatus.COMPLETED), isNull(), isNull(), isNull(), - isNull(), isNull(), isNull())) - .thenReturn(Mono.delay(Duration.ofMillis(250)).then()); - - when(receivedMessage.getLockToken()).thenReturn(null); - - StepVerifier.create(receiver.complete(receivedMessage.getLockToken())) - .expectError(NullPointerException.class) - .verify(); - - verify(managementNode, never()).updateDisposition(any(), eq(DispositionStatus.COMPLETED), isNull(), isNull(), - isNull(), isNull(), isNull(), isNull()); - } - /** * Verifies that we error if we try to complete a null message. */ @@ -386,7 +365,7 @@ void completeInReceiveAndDeleteMode() { when(receivedMessage.getLockToken()).thenReturn(lockToken1); try { - StepVerifier.create(client.complete(receivedMessage.getLockToken())) + StepVerifier.create(client.complete(receivedMessage)) .expectError(UnsupportedOperationException.class) .verify(); } finally { @@ -458,7 +437,7 @@ void deadLetterWithDescription() { // Act & Assert StepVerifier.create(receiver.receiveMessages() .take(1) - .flatMap(context -> receiver.deadLetter(context.getMessage().getLockToken(), deadLetterOptions))) + .flatMap(context -> receiver.deadLetter(context.getMessage(), deadLetterOptions))) .then(() -> messageSink.next(message)) .expectNext() .verifyComplete(); @@ -523,16 +502,16 @@ void settleMessageOnManagement(DispositionStatus dispositionStatus) { final Mono operation; switch (dispositionStatus) { case DEFERRED: - operation = receiver.defer(receivedMessage.getLockToken()); + operation = receiver.defer(receivedMessage); break; case ABANDONED: - operation = receiver.abandon(receivedMessage.getLockToken()); + operation = receiver.abandon(receivedMessage); break; case COMPLETED: - operation = receiver.complete(receivedMessage.getLockToken()); + operation = receiver.complete(receivedMessage); break; case SUSPENDED: - operation = receiver.deadLetter(receivedMessage.getLockToken()); + operation = receiver.deadLetter(receivedMessage); break; default: throw new IllegalArgumentException("Unrecognized operation: " + dispositionStatus); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java index 8f9ff62e23a6c..3875224e2af46 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java @@ -92,7 +92,7 @@ protected void afterTest() { List listOfDeferredMessages = messagesDeferred.get(); for (Long seqNumber : listOfDeferredMessages) { ServiceBusReceivedMessage deferredMessages = receiver.receiveDeferredMessage(seqNumber); - receiver.complete(deferredMessages.getLockToken()); + receiver.complete(deferredMessages); } } catch (Exception e) { logger.warning("Error occurred when draining deferred messages Entity: {} ", receiver.getEntityPath(), e); @@ -134,7 +134,7 @@ void multipleReceiveByOneSubscriberMessageTimeout(MessagingEntityType entityType receivedMessageCount = 0; for (ServiceBusReceivedMessageContext receivedMessage : messages) { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); - receiver.complete(receivedMessage.getMessage().getLockToken()); + receiver.complete(receivedMessage.getMessage()); messagesPending.decrementAndGet(); ++receivedMessageCount; } @@ -175,7 +175,7 @@ void multipleReceiveByOneSubscriber(MessagingEntityType entityType, boolean isSe receivedMessageCount = 0; for (ServiceBusReceivedMessageContext receivedMessage : messages) { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); - receiver.complete(receivedMessage.getMessage().getLockToken()); + receiver.complete(receivedMessage.getMessage()); messagesPending.decrementAndGet(); ++receivedMessageCount; } @@ -217,7 +217,7 @@ void parallelReceiveByOneSubscriber(MessagingEntityType entityType, boolean isSe long lastSequenceReceiver = 0; for (ServiceBusReceivedMessageContext receivedMessage : messages1) { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); - receiver.complete(receivedMessage.getMessage().getLockToken()); + receiver.complete(receivedMessage.getMessage()); assertTrue(receivedMessage.getMessage().getSequenceNumber() > lastSequenceReceiver); lastSequenceReceiver = receivedMessage.getMessage().getSequenceNumber(); messagesPending.decrementAndGet(); @@ -269,7 +269,7 @@ void receiveTwoMessagesAndComplete(MessagingEntityType entityType, boolean isSes for (ServiceBusReceivedMessageContext context : messages) { ServiceBusReceivedMessage receivedMessage = context.getMessage(); assertMessageEquals(receivedMessage, messageId, isSessionEnabled); - receiver.complete(receivedMessage.getLockToken()); + receiver.complete(receivedMessage); messagesPending.decrementAndGet(); ++receivedMessageCount; } @@ -330,18 +330,18 @@ void transactionMessageAndSettle(DispositionStatus dispositionStatus) { switch (dispositionStatus) { case COMPLETED: - receiver.complete(receivedMessage.getLockToken(), transaction); + receiver.complete(receivedMessage, transaction); messagesPending.decrementAndGet(); break; case ABANDONED: - receiver.abandon(receivedMessage.getLockToken(), null, transaction); + receiver.abandon(receivedMessage, null, transaction); break; case SUSPENDED: DeadLetterOptions deadLetterOptions = new DeadLetterOptions().setDeadLetterReason(deadLetterReason); - receiver.deadLetter(receivedMessage.getLockToken(), deadLetterOptions, transaction); + receiver.deadLetter(receivedMessage, deadLetterOptions, transaction); break; case DEFERRED: - receiver.defer(receivedMessage.getLockToken(), null, transaction); + receiver.defer(receivedMessage, null, transaction); break; default: throw logger.logExceptionAsError(new IllegalArgumentException( @@ -379,7 +379,7 @@ void transactionReceiveAndCommitOnSessionEntity(MessagingEntityType entityType) ServiceBusReceivedMessage receivedMessage = messageList.get(0); - receiver.complete(receivedMessage.getLockToken(), sessionId, transaction); + receiver.complete(receivedMessage, transaction); receiver.commitTransaction(transaction); messagesPending.decrementAndGet(); } @@ -408,7 +408,7 @@ void receiveMessageAndComplete(MessagingEntityType entityType, boolean isSession final AtomicInteger receivedMessageCount = new AtomicInteger(); messages.forEach(receivedMessage -> { assertMessageEquals(receivedMessage, messageId, isSessionEnabled); - receiver.complete(receivedMessage.getLockToken()); + receiver.complete(receivedMessage); messagesPending.decrementAndGet(); receivedMessageCount.incrementAndGet(); }); @@ -468,7 +468,7 @@ void peekFromSequenceNumberMessage(MessagingEntityType entityType, boolean isSes assertEquals(receivedMessage.getSequenceNumber(), receivedPeekMessage.getSequenceNumber()); assertMessageEquals(receivedPeekMessage, messageId, isSessionEnabled); - receiver.complete(receivedMessage.getLockToken()); + receiver.complete(receivedMessage); messagesPending.decrementAndGet(); } @@ -548,7 +548,7 @@ void deadLetterMessage(MessagingEntityType entityType, boolean isSessionEnabled) assertNotNull(receivedMessage); // Assert & Act - receiver.deadLetter(receivedMessage.getLockToken()); + receiver.deadLetter(receivedMessage); messagesPending.decrementAndGet(); } @@ -574,7 +574,7 @@ void receiveAndComplete(MessagingEntityType entityType, boolean isSessionEnabled assertNotNull(receivedMessage); // Assert & Act - receiver.complete(receivedMessage.getLockToken()); + receiver.complete(receivedMessage); messagesPending.decrementAndGet(); } @@ -615,7 +615,7 @@ void receiveAndRenewLock(MessagingEntityType entityType) { lockedUntil, initialLock)); } finally { logger.info("Completing message. Seq: {}.", receivedMessage.getSequenceNumber()); - receiver.complete(receivedMessage.getLockToken()); + receiver.complete(receivedMessage); messagesPending.decrementAndGet(); } } @@ -641,7 +641,7 @@ void receiveAndAbandon(MessagingEntityType entityType, boolean isSessionEnabled) assertNotNull(receivedMessage); // Assert & Act - receiver.abandon(receivedMessage.getLockToken()); + receiver.abandon(receivedMessage); // Cleanup int messagesCompleted = completeMessages(receiver, maxMessages); @@ -671,7 +671,7 @@ void receiveDeferredMessageBySequenceNumber(MessagingEntityType entityType, Disp final ServiceBusReceivedMessage receivedMessage = asList.get(0).getMessage(); assertNotNull(receivedMessage); - receiver.defer(receivedMessage.getLockToken()); + receiver.defer(receivedMessage); final ServiceBusReceivedMessage receivedDeferredMessage = receiver .receiveDeferredMessage(receivedMessage.getSequenceNumber()); @@ -682,14 +682,14 @@ void receiveDeferredMessageBySequenceNumber(MessagingEntityType entityType, Disp // Assert & Act switch (dispositionStatus) { case ABANDONED: - receiver.abandon(receivedDeferredMessage.getLockToken()); + receiver.abandon(receivedDeferredMessage); messagesDeferred.get().add(receivedMessage.getSequenceNumber()); break; case SUSPENDED: - receiver.deadLetter(receivedDeferredMessage.getLockToken()); + receiver.deadLetter(receivedDeferredMessage); break; case COMPLETED: - receiver.complete(receivedDeferredMessage.getLockToken()); + receiver.complete(receivedDeferredMessage); break; default: throw logger.logExceptionAsError(new IllegalArgumentException( @@ -722,7 +722,7 @@ void receiveAndDefer(MessagingEntityType entityType, boolean isSessionEnabled) { assertNotNull(receivedMessage); // Act & Assert - receiver.defer(receivedMessage.getLockToken()); + receiver.defer(receivedMessage); // cleanup completeDeferredMessages(receiver, receivedMessage, isSessionEnabled); @@ -838,7 +838,7 @@ private int completeMessages(ServiceBusReceiverClient client, int totalMessages) final IterableStream contextStream = client.receiveMessages(totalMessages, TIMEOUT); final List asList = contextStream.stream().collect(Collectors.toList()); for (ServiceBusReceivedMessageContext context : asList) { - receiver.complete(context.getMessage().getLockToken()); + receiver.complete(context.getMessage()); } return asList.size(); } @@ -850,6 +850,6 @@ private void completeDeferredMessages(ServiceBusReceiverClient client, ServiceBu } else { message = client.receiveDeferredMessage(receivedMessage.getSequenceNumber()); } - receiver.complete(message.getLockToken()); + receiver.complete(message); } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java index 9acd797e0fece..de17dcb097c1b 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java @@ -33,9 +33,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; -import static org.mockito.ArgumentMatchers.anyMap; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isNull; import static org.mockito.Mockito.mock; @@ -49,6 +46,7 @@ class ServiceBusReceiverClientTest { private static final String NAMESPACE = "test-namespace"; private static final String ENTITY_PATH = "test-entity-path"; private static final String LOCK_TOKEN = UUID.randomUUID().toString(); + private static final Duration OPERATION_TIMEOUT = Duration.ofSeconds(5); private final ClientLogger logger = new ClientLogger(ServiceBusReceiverClientTest.class); @@ -60,12 +58,14 @@ class ServiceBusReceiverClientTest { @Mock private Map propertiesToModify; @Mock - ServiceBusTransactionContext transactionContext; + private ServiceBusTransactionContext transactionContext; + + @Mock + private ServiceBusReceivedMessage message; @BeforeEach void setup() { MockitoAnnotations.initMocks(this); - when(asyncClient.getEntityPath()).thenReturn(ENTITY_PATH); when(asyncClient.getFullyQualifiedNamespace()).thenReturn(NAMESPACE); when(asyncClient.getReceiverOptions()).thenReturn(new ReceiverOptions(ReceiveMode.PEEK_LOCK, 1)); @@ -93,112 +93,109 @@ void properties() { @Test void abandonMessageWithTransaction() { // Arrange - when(asyncClient.abandon(eq(LOCK_TOKEN), isNull(), any(ServiceBusTransactionContext.class))).thenReturn(Mono.empty()); + when(asyncClient.abandon(eq(message), isNull(), eq(transactionContext))).thenReturn(Mono.empty()); // Act - client.abandon(LOCK_TOKEN, null, transactionContext); + client.abandon(message, null, transactionContext); // Assert - verify(asyncClient).abandon(argThat(ServiceBusReceiverClientTest::lockTokenEquals), isNull(), eq(transactionContext)); + verify(asyncClient).abandon(eq(message), isNull(), eq(transactionContext)); } @Test void abandonMessage() { // Arrange - when(asyncClient.abandon(eq(LOCK_TOKEN))).thenReturn(Mono.empty()); + when(asyncClient.abandon(eq(message))).thenReturn(Mono.empty()); // Act - client.abandon(LOCK_TOKEN); + client.abandon(message); // Assert - verify(asyncClient).abandon(argThat(ServiceBusReceiverClientTest::lockTokenEquals)); + verify(asyncClient).abandon(eq(message)); } @Test void abandonMessageWithProperties() { // Arrange - when(asyncClient.abandon(eq(LOCK_TOKEN), anyMap())).thenReturn(Mono.empty()); - when(asyncClient.abandon(eq(LOCK_TOKEN), any(), anyString())).thenReturn(Mono.empty()); + when(asyncClient.abandon(eq(message), eq(propertiesToModify))).thenReturn(Mono.empty()); // Act - client.abandon(LOCK_TOKEN, propertiesToModify); + client.abandon(message, propertiesToModify); // Assert - verify(asyncClient).abandon(argThat(ServiceBusReceiverClientTest::lockTokenEquals), eq(propertiesToModify)); + verify(asyncClient).abandon(eq(message), eq(propertiesToModify)); } @Test void completeMessageWithTransaction() { // Arrange - when(asyncClient.complete(eq(LOCK_TOKEN), any(ServiceBusTransactionContext.class))).thenReturn(Mono.empty()); + when(asyncClient.complete(eq(message), eq(transactionContext))).thenReturn(Mono.empty()); // Act - client.complete(LOCK_TOKEN, transactionContext); + client.complete(message, transactionContext); // Assert - verify(asyncClient).complete(argThat(ServiceBusReceiverClientTest::lockTokenEquals), eq(transactionContext)); + verify(asyncClient).complete(eq(message), eq(transactionContext)); } @Test void completeMessage() { // Arrange - when(asyncClient.complete(eq(LOCK_TOKEN))).thenReturn(Mono.empty()); + when(asyncClient.complete(eq(message))).thenReturn(Mono.empty()); // Act - client.complete(LOCK_TOKEN); + client.complete(message); // Assert - verify(asyncClient).complete(argThat(ServiceBusReceiverClientTest::lockTokenEquals)); + verify(asyncClient).complete(eq(message)); } @Test void deferMessage() { // Arrange - when(asyncClient.defer(eq(LOCK_TOKEN))).thenReturn(Mono.empty()); + when(asyncClient.defer(eq(message))).thenReturn(Mono.empty()); // Act - client.defer(LOCK_TOKEN); + client.defer(message); // Assert - verify(asyncClient).defer(argThat(ServiceBusReceiverClientTest::lockTokenEquals)); + verify(asyncClient).defer(eq(message)); } @Test void deferMessageWithPropertiesWithTransaction() { // Arrange - when(asyncClient.defer(eq(LOCK_TOKEN), anyMap(), any(ServiceBusTransactionContext.class))).thenReturn(Mono.empty()); - when(asyncClient.defer(eq(LOCK_TOKEN), any(), anyString(), any(ServiceBusTransactionContext.class))).thenReturn(Mono.empty()); + when(asyncClient.defer(eq(message), eq(propertiesToModify), eq(transactionContext))).thenReturn(Mono.empty()); // Act - client.defer(LOCK_TOKEN, propertiesToModify, transactionContext); + client.defer(message, propertiesToModify, transactionContext); // Assert - verify(asyncClient).defer(argThat(ServiceBusReceiverClientTest::lockTokenEquals), eq(propertiesToModify), eq(transactionContext)); + verify(asyncClient).defer(eq(message), eq(propertiesToModify), eq(transactionContext)); } @Test void deferMessageWithProperties() { // Arrange - when(asyncClient.defer(eq(LOCK_TOKEN), anyMap())).thenReturn(Mono.empty()); - when(asyncClient.defer(eq(LOCK_TOKEN), any(), anyString())).thenReturn(Mono.empty()); + when(asyncClient.defer(eq(message), eq(propertiesToModify))).thenReturn(Mono.empty()); // Act - client.defer(LOCK_TOKEN, propertiesToModify); + client.defer(message, propertiesToModify); // Assert - verify(asyncClient).defer(argThat(ServiceBusReceiverClientTest::lockTokenEquals), eq(propertiesToModify)); + verify(asyncClient).defer(eq(message), eq(propertiesToModify)); } @Test void deadLetterMessage() { // Arrange - when(asyncClient.deadLetter(eq(LOCK_TOKEN))).thenReturn(Mono.empty()); + when(asyncClient.deadLetter(eq(message))).thenReturn(Mono.empty()); // Act - client.deadLetter(LOCK_TOKEN); + client.deadLetter(message); // Assert - verify(asyncClient).deadLetter(argThat(ServiceBusReceiverClientTest::lockTokenEquals)); + verify(asyncClient).deadLetter(eq(message)); } @Test @@ -209,14 +206,14 @@ void deadLetterMessageWithOptionsWithTransaction() { .setDeadLetterReason("bar") .setPropertiesToModify(propertiesToModify); - when(asyncClient.deadLetter(eq(LOCK_TOKEN), any(DeadLetterOptions.class), any(ServiceBusTransactionContext.class))) + when(asyncClient.deadLetter(eq(message), any(DeadLetterOptions.class), any(ServiceBusTransactionContext.class))) .thenReturn(Mono.empty()); // Act - client.deadLetter(LOCK_TOKEN, options, transactionContext); + client.deadLetter(message, options, transactionContext); // Assert - verify(asyncClient).deadLetter(argThat(ServiceBusReceiverClientTest::lockTokenEquals), eq(options), eq(transactionContext)); + verify(asyncClient).deadLetter(eq(message), eq(options), eq(transactionContext)); } @Test @@ -227,14 +224,14 @@ void deadLetterMessageWithOptions() { .setDeadLetterReason("bar") .setPropertiesToModify(propertiesToModify); - when(asyncClient.deadLetter(eq(LOCK_TOKEN), any(DeadLetterOptions.class))) + when(asyncClient.deadLetter(eq(message), any(DeadLetterOptions.class))) .thenReturn(Mono.empty()); // Act - client.deadLetter(LOCK_TOKEN, options); + client.deadLetter(message, options); // Assert - verify(asyncClient).deadLetter(argThat(ServiceBusReceiverClientTest::lockTokenEquals), eq(options)); + verify(asyncClient).deadLetter(eq(message), eq(options)); } @Test @@ -415,7 +412,7 @@ void receiveMessageNullWaitTime() { final int maxMessages = 10; // Act & Assert - assertThrows(NullPointerException.class, () -> client.receiveMessages(maxMessages, (Duration) null)); + assertThrows(NullPointerException.class, () -> client.receiveMessages(maxMessages, null)); } /** @@ -649,8 +646,4 @@ void setSessionState() { // Assert verify(asyncClient).setSessionState(sessionId, contents); } - - private static boolean lockTokenEquals(String compared) { - return compared != null && LOCK_TOKEN.equals(compared); - } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerIntegrationTest.java index 64416f9b87c1b..bc6497a1320ac 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/UnnamedSessionManagerIntegrationTest.java @@ -70,7 +70,7 @@ void singleUnnamedSession(MessagingEntityType entityType) { final String sessionId = "singleUnnamedSession-" + Instant.now().toString(); final String contents = "Some-contents"; final int numberToSend = 5; - final List lockTokens = new ArrayList<>(); + final List receivedMessages = new ArrayList<>(); setSenderAndReceiver(entityType, entityIndex, TIMEOUT, builder -> builder); @@ -98,7 +98,7 @@ void singleUnnamedSession(MessagingEntityType entityType) { .verify(Duration.ofMinutes(2)); } finally { subscription.dispose(); - Mono.when(lockTokens.stream().map(e -> receiver.complete(e, sessionId)) + Mono.when(receivedMessages.stream().map(e -> receiver.complete(e)) .collect(Collectors.toList())) .block(TIMEOUT); } From e03a589b4491683b3e2a07d96daa2553ed064678 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Thu, 3 Sep 2020 13:44:22 -0700 Subject: [PATCH 076/168] [TA] Add StringIndexType value and tests (#14784) * String Index Type feature --- .../AnalyzeSentimentAsyncClient.java | 15 +- .../RecognizeEntityAsyncClient.java | 4 +- .../RecognizeLinkedEntityAsyncClient.java | 4 +- .../RecognizePiiEntityAsyncClient.java | 4 +- .../com/azure/ai/textanalytics/TestUtils.java | 3 + .../TextAnalyticsAsyncClientTest.java | 490 +++++++++++++++++ .../TextAnalyticsClientTest.java | 508 +++++++++++++++++- .../TextAnalyticsClientTestBase.java | 41 +- ...analyzeSentimentBatchTooManyDocuments.json | 8 +- .../analyzeSentimentDiacriticsNfc.json | 26 + .../analyzeSentimentDiacriticsNfd.json | 26 + .../analyzeSentimentDuplicateIdInput.json | 8 +- .../analyzeSentimentEmoji.json | 26 + .../analyzeSentimentEmojiFamily.json | 26 + ...timentEmojiFamilyWithSkinToneModifier.json | 26 + ...yzeSentimentEmojiWithSkinToneModifier.json | 26 + .../analyzeSentimentEmptyIdInput.json | 10 +- ...ShowStatisticsButIncludeOpinionMining.json | 10 +- ...eSentimentForBatchInputShowStatistics.json | 10 +- ...ShowStatisticsAndIncludeOpinionMining.json | 10 +- ...putShowStatisticsExcludeOpinionMining.json | 10 +- ...hInputWithNullAnalyzeSentimentOptions.json | 10 +- ...ntForBatchInputWithNullRequestOptions.json | 10 +- .../analyzeSentimentForBatchStringInput.json | 10 +- .../analyzeSentimentForEmptyText.json | 8 +- .../analyzeSentimentForFaultyText.json | 10 +- ...ShowStatisticsButIncludeOpinionMining.json | 10 +- ...ShowStatisticsAndIncludeOpinionMining.json | 10 +- ...ingShowStatisticsExcludeOpinionMining.json | 10 +- ...entimentForListStringWithLanguageHint.json | 10 +- .../analyzeSentimentForTextInput.json | 10 +- ...ntForTextInputWithDefaultLanguageHint.json | 10 +- ...entimentForTextInputWithOpinionMining.json | 10 +- .../analyzeSentimentKoreanNfc.json | 26 + .../analyzeSentimentKoreanNfd.json | 26 + .../analyzeSentimentZalgoText.json | 26 + ...ecognizeEntitiesBatchInputSingleError.json | 8 +- ...ecognizeEntitiesBatchTooManyDocuments.json | 8 +- .../recognizeEntitiesDiacriticsNfc.json | 26 + .../recognizeEntitiesDiacriticsNfd.json | 26 + .../recognizeEntitiesDuplicateIdInput.json | 8 +- .../recognizeEntitiesEmoji.json | 26 + .../recognizeEntitiesEmojiFamily.json | 26 + ...titiesEmojiFamilyWIthSkinToneModifier.json | 26 + ...nizeEntitiesEmojiWithSkinToneModifier.json | 26 + .../recognizeEntitiesEmptyIdInput.json | 8 +- .../recognizeEntitiesForBatchInput.json | 10 +- ...zeEntitiesForBatchInputShowStatistics.json | 8 +- .../recognizeEntitiesForBatchStringInput.json | 10 +- .../recognizeEntitiesForEmptyText.json | 8 +- .../recognizeEntitiesForFaultyText.json | 10 +- .../recognizeEntitiesForListLanguageHint.json | 10 +- .../recognizeEntitiesForListWithOptions.json | 10 +- .../recognizeEntitiesForTextInput.json | 10 +- .../recognizeEntitiesKoreanNfc.json | 26 + .../recognizeEntitiesKoreanNfd.json | 26 + .../recognizeEntitiesZalgoText.json | 26 + ...zeLinkedEntitiesBatchTooManyDocuments.json | 10 +- .../recognizeLinkedEntitiesDiacriticsNfc.json | 26 + .../recognizeLinkedEntitiesDiacriticsNfd.json | 26 + ...cognizeLinkedEntitiesDuplicateIdInput.json | 8 +- .../recognizeLinkedEntitiesEmoji.json | 26 + .../recognizeLinkedEntitiesEmojiFamily.json | 26 + ...titiesEmojiFamilyWIthSkinToneModifier.json | 26 + ...nkedEntitiesEmojiWithSkinToneModifier.json | 26 + .../recognizeLinkedEntitiesEmptyIdInput.json | 10 +- .../recognizeLinkedEntitiesForBatchInput.json | 10 +- ...edEntitiesForBatchInputShowStatistics.json | 8 +- ...nizeLinkedEntitiesForBatchStringInput.json | 8 +- .../recognizeLinkedEntitiesForEmptyText.json | 10 +- .../recognizeLinkedEntitiesForFaultyText.json | 10 +- ...nizeLinkedEntitiesForListLanguageHint.json | 10 +- ...inkedEntitiesForListStringWithOptions.json | 10 +- .../recognizeLinkedEntitiesForTextInput.json | 10 +- .../recognizeLinkedEntitiesKoreanNfc.json | 26 + .../recognizeLinkedEntitiesKoreanNfd.json | 26 + .../recognizeLinkedEntitiesZalgoText.json | 26 + ...gnizePiiEntitiesBatchInputSingleError.json | 8 +- ...gnizePiiEntitiesBatchTooManyDocuments.json | 10 +- .../recognizePiiEntitiesDiacriticsNfc.json | 26 + .../recognizePiiEntitiesDiacriticsNfd.json | 26 + .../recognizePiiEntitiesDuplicateIdInput.json | 8 +- .../recognizePiiEntitiesEmoji.json | 26 + .../recognizePiiEntitiesEmojiFamily.json | 26 + ...titiesEmojiFamilyWIthSkinToneModifier.json | 26 + ...ePiiEntitiesEmojiWithSkinToneModifier.json | 26 + .../recognizePiiEntitiesEmptyIdInput.json | 10 +- .../recognizePiiEntitiesForBatchInput.json | 10 +- ...iiEntitiesForBatchInputShowStatistics.json | 10 +- .../recognizePiiEntitiesForEmptyText.json | 10 +- .../recognizePiiEntitiesForFaultyText.json | 10 +- ...cognizePiiEntitiesForListLanguageHint.json | 10 +- ...zePiiEntitiesForListStringWithOptions.json | 10 +- .../recognizePiiEntitiesForTextInput.json | 10 +- .../recognizePiiEntitiesKoreanNfc.json | 26 + .../recognizePiiEntitiesKoreanNfd.json | 26 + .../recognizePiiEntitiesZalgoText.json | 26 + 97 files changed, 2242 insertions(+), 265 deletions(-) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDiacriticsNfc.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDiacriticsNfd.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmoji.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiFamily.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiFamilyWithSkinToneModifier.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiWithSkinToneModifier.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentKoreanNfc.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentKoreanNfd.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentZalgoText.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDiacriticsNfc.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDiacriticsNfd.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmoji.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiFamily.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiFamilyWIthSkinToneModifier.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiWithSkinToneModifier.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesKoreanNfc.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesKoreanNfd.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesZalgoText.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDiacriticsNfc.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDiacriticsNfd.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmoji.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiFamily.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiFamilyWIthSkinToneModifier.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiWithSkinToneModifier.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesKoreanNfc.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesKoreanNfd.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesZalgoText.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDiacriticsNfc.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDiacriticsNfd.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmoji.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiFamily.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiFamilyWIthSkinToneModifier.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiWithSkinToneModifier.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesKoreanNfc.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesKoreanNfd.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesZalgoText.json diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java index f99459ee1a6df..54c4817dfc281 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java @@ -16,6 +16,7 @@ import com.azure.ai.textanalytics.implementation.models.SentenceSentimentValue; import com.azure.ai.textanalytics.implementation.models.SentimentConfidenceScorePerLabel; import com.azure.ai.textanalytics.implementation.models.SentimentResponse; +import com.azure.ai.textanalytics.implementation.models.StringIndexType; import com.azure.ai.textanalytics.implementation.models.WarningCodeValue; import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; import com.azure.ai.textanalytics.models.AnalyzeSentimentResult; @@ -205,13 +206,17 @@ private AnalyzeSentimentResult convertToAnalyzeSentimentResult(DocumentSentiment */ private Mono> getAnalyzedSentimentResponse( Iterable documents, AnalyzeSentimentOptions options, Context context) { - // TODO: add StringIndexType implementation https://github.com/Azure/azure-sdk-for-java/issues/12173 + String modelVersion = null; + Boolean includeStatistics = null; + Boolean includeOpinionMining = null; + if (options != null) { + modelVersion = options.getModelVersion(); + includeStatistics = options.isIncludeStatistics(); + includeOpinionMining = options.isIncludeOpinionMining(); + } return service.sentimentWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), - options == null ? null : options.getModelVersion(), - options == null ? null : options.isIncludeStatistics(), - options == null ? null : options.isIncludeOpinionMining(), - null, + modelVersion, includeStatistics, includeOpinionMining, StringIndexType.UTF16CODE_UNIT, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Analyzed sentiment for a batch of documents - {}", response)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java index adf4f241bdcc2..580aa89d893f8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java @@ -7,6 +7,7 @@ import com.azure.ai.textanalytics.implementation.models.DocumentError; import com.azure.ai.textanalytics.implementation.models.EntitiesResult; import com.azure.ai.textanalytics.implementation.models.MultiLanguageBatchInput; +import com.azure.ai.textanalytics.implementation.models.StringIndexType; import com.azure.ai.textanalytics.implementation.models.WarningCodeValue; import com.azure.ai.textanalytics.models.CategorizedEntity; import com.azure.ai.textanalytics.models.CategorizedEntityCollection; @@ -184,12 +185,11 @@ private Response toRecognizeEntitiesResultCol */ private Mono> getRecognizedEntitiesResponse( Iterable documents, TextAnalyticsRequestOptions options, Context context) { - // TODO: add string index type implementation PR return service.entitiesRecognitionGeneralWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), - null, + StringIndexType.UTF16CODE_UNIT, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Recognized entities for a batch of documents- {}", diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java index 3e2833f3875d5..0d0c4bfee4a6a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java @@ -7,6 +7,7 @@ import com.azure.ai.textanalytics.implementation.models.DocumentError; import com.azure.ai.textanalytics.implementation.models.EntityLinkingResult; import com.azure.ai.textanalytics.implementation.models.MultiLanguageBatchInput; +import com.azure.ai.textanalytics.implementation.models.StringIndexType; import com.azure.ai.textanalytics.implementation.models.WarningCodeValue; import com.azure.ai.textanalytics.models.LinkedEntity; import com.azure.ai.textanalytics.models.LinkedEntityCollection; @@ -198,12 +199,11 @@ private IterableStream mapLinkedEntity( private Mono> getRecognizedLinkedEntitiesResponse(Iterable documents, TextAnalyticsRequestOptions options, Context context) { - // TODO: add string index type implementation PR return service.entitiesLinkingWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), - null, + StringIndexType.UTF16CODE_UNIT, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Recognized linked entities for a batch of documents - {}", diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java index 44985c455f614..47df7ab157d55 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java @@ -8,6 +8,7 @@ import com.azure.ai.textanalytics.implementation.models.EntitiesResult; import com.azure.ai.textanalytics.implementation.models.MultiLanguageBatchInput; import com.azure.ai.textanalytics.implementation.models.PiiEntitiesResult; +import com.azure.ai.textanalytics.implementation.models.StringIndexType; import com.azure.ai.textanalytics.implementation.models.WarningCodeValue; import com.azure.ai.textanalytics.models.EntityCategory; import com.azure.ai.textanalytics.models.PiiEntity; @@ -190,13 +191,12 @@ private Response toRecognizePiiEntitiesRes */ private Mono> getRecognizePiiEntitiesResponse( Iterable documents, TextAnalyticsRequestOptions options, Context context) { - // TODO: add string index type implementation PR return service.entitiesRecognitionPiiWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), options == null ? null : options.getModelVersion(), options == null ? null : options.isIncludeStatistics(), null, - null, + StringIndexType.UTF16CODE_UNIT, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info( "Start recognizing Personally Identifiable Information entities for a batch of documents.")) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java index 7701df57d9452..1cc804da9f57f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java @@ -93,6 +93,9 @@ final class TestUtils { static final List DETECT_LANGUAGE_INPUTS = asList( "This is written in English", "Este es un documento escrito en Español.", "~@!~:)"); + static final String PII_ENTITY_OFFSET_INPUT = "SSN: 859-98-0987"; + static final String SENTIMENT_OFFSET_INPUT = "The hotel was dark and unclean."; + // "personal" and "social" are common to both English and Spanish and if given with limited context the // response will be based on the "US" country hint. If the origin of the text is known to be coming from // Spanish that can be given as a hint. diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java index b65a847164005..eaea7f9d9d599 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java @@ -24,7 +24,11 @@ import java.util.Arrays; import java.util.stream.Collectors; +import static com.azure.ai.textanalytics.TestUtils.CATEGORIZED_ENTITY_INPUTS; import static com.azure.ai.textanalytics.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; +import static com.azure.ai.textanalytics.TestUtils.LINKED_ENTITY_INPUTS; +import static com.azure.ai.textanalytics.TestUtils.PII_ENTITY_OFFSET_INPUT; +import static com.azure.ai.textanalytics.TestUtils.SENTIMENT_OFFSET_INPUT; import static com.azure.ai.textanalytics.TestUtils.getCategorizedEntitiesList1; import static com.azure.ai.textanalytics.TestUtils.getDetectedLanguageEnglish; import static com.azure.ai.textanalytics.TestUtils.getDetectedLanguageSpanish; @@ -380,6 +384,123 @@ public void recognizeEntitiesBatchTooManyDocuments(HttpClient httpClient, TextAn })); } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesEmoji(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(13, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesEmojiWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiWithSkinToneModifierRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(15, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesEmojiFamily(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiFamilyRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(22, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesEmojiFamilyWIthSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiFamilyWithSkinToneModifierRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(30, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesDiacriticsNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + diacriticsNfcRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(14, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesDiacriticsNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + diacriticsNfdRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(15, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesKoreanNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + koreanNfcRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(13, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesKoreanNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + koreanNfdRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(13, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesZalgoText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + zalgoTextRunner(document -> + StepVerifier.create(client.recognizeEntities(document)) + .assertNext(result -> result.forEach(categorizedEntity -> { + assertEquals(126, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + })).verifyComplete(), CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + // Recognize Personally Identifiable Information entity @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -501,6 +622,123 @@ public void recognizePiiEntitiesBatchTooManyDocuments(HttpClient httpClient, Tex })); } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesEmoji(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(8, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesEmojiWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiWithSkinToneModifierRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(10, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesEmojiFamily(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiFamilyRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(17, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesEmojiFamilyWIthSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiFamilyWithSkinToneModifierRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(25, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesDiacriticsNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + diacriticsNfcRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(9, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesDiacriticsNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + diacriticsNfdRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(10, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesKoreanNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + koreanNfcRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(8, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesKoreanNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + koreanNfdRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(8, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesZalgoText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + zalgoTextRunner(document -> + StepVerifier.create(client.recognizePiiEntities(document)) + .assertNext(result -> result.forEach(piiEntity -> { + assertEquals(121, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + })).verifyComplete(), PII_ENTITY_OFFSET_INPUT + ); + } + // Linked Entities @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") @@ -620,6 +858,141 @@ public void recognizeLinkedEntitiesBatchTooManyDocuments(HttpClient httpClient, })); } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesEmoji(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(13, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesEmojiWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiWithSkinToneModifierRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(15, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesEmojiFamily(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiFamilyRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(22, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesEmojiFamilyWIthSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiFamilyWithSkinToneModifierRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(30, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesDiacriticsNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + diacriticsNfcRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(14, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesDiacriticsNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + diacriticsNfdRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(15, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesKoreanNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + koreanNfcRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(13, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesKoreanNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + koreanNfdRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(13, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesZalgoText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + zalgoTextRunner(document -> + StepVerifier.create(client.recognizeLinkedEntities(document)) + .assertNext(result -> result.forEach(linkedEntity -> { + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(126, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + }); + })).verifyComplete(), LINKED_ENTITY_INPUTS.get(1) + ); + } + // Key Phrases @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") @@ -1089,4 +1462,121 @@ public void analyzeSentimentBatchTooManyDocuments(HttpClient httpClient, TextAna assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); })); } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentEmoji(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(34, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentEmojiWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiWithSkinToneModifierRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(36, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentEmojiFamily(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiFamilyRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(43, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentEmojiFamilyWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + emojiFamilyWithSkinToneModifierRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(51, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentDiacriticsNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + diacriticsNfcRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(35, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentDiacriticsNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + diacriticsNfdRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(36, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentKoreanNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + koreanNfcRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(34, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentKoreanNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + koreanNfdRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(34, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentZalgoText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + zalgoTextRunner(document -> + StepVerifier.create(client.analyzeSentiment(document)) + .assertNext(result -> result.getSentences().forEach(sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(147, sentenceSentiment.getLength()); + })).verifyComplete(), SENTIMENT_OFFSET_INPUT + ); + } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java index 8d717cfc04417..8eeec4158af8e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java @@ -29,7 +29,11 @@ import java.util.List; import java.util.stream.Collectors; +import static com.azure.ai.textanalytics.TestUtils.CATEGORIZED_ENTITY_INPUTS; import static com.azure.ai.textanalytics.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; +import static com.azure.ai.textanalytics.TestUtils.LINKED_ENTITY_INPUTS; +import static com.azure.ai.textanalytics.TestUtils.PII_ENTITY_OFFSET_INPUT; +import static com.azure.ai.textanalytics.TestUtils.SENTIMENT_OFFSET_INPUT; import static com.azure.ai.textanalytics.TestUtils.getCategorizedEntitiesList1; import static com.azure.ai.textanalytics.TestUtils.getDetectedLanguageEnglish; import static com.azure.ai.textanalytics.TestUtils.getDetectedLanguageSpanish; @@ -349,6 +353,132 @@ public void recognizeEntitiesBatchTooManyDocuments(HttpClient httpClient, TextAn }); } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesEmoji(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(13, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesEmojiWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiWithSkinToneModifierRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(15, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesEmojiFamily(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiFamilyRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(22, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesEmojiFamilyWIthSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiFamilyWithSkinToneModifierRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(30, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesDiacriticsNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + diacriticsNfcRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(14, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesDiacriticsNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + diacriticsNfdRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(15, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesKoreanNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + koreanNfcRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(13, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesKoreanNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + koreanNfdRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(13, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeEntitiesZalgoText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + zalgoTextRunner(document -> + client.recognizeEntities(document).forEach( + categorizedEntity -> { + assertEquals(126, categorizedEntity.getOffset()); + assertEquals(9, categorizedEntity.getLength()); + }), + CATEGORIZED_ENTITY_INPUTS.get(1) + ); + } + // Recognize Personally Identifiable Information entity @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -466,6 +596,123 @@ public void recognizePiiEntitiesBatchTooManyDocuments(HttpClient httpClient, Tex }); } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesEmoji(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(8, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesEmojiWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiWithSkinToneModifierRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(10, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesEmojiFamily(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiFamilyRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(17, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesEmojiFamilyWIthSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiFamilyWithSkinToneModifierRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(25, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesDiacriticsNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + diacriticsNfcRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(9, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesDiacriticsNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + diacriticsNfdRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(10, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesKoreanNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + koreanNfcRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(8, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesKoreanNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + koreanNfdRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(8, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesZalgoText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + zalgoTextRunner(document -> { + final PiiEntityCollection result = client.recognizePiiEntities(document); + result.forEach(piiEntity -> { + assertEquals(121, piiEntity.getOffset()); + assertEquals(11, piiEntity.getLength()); + }); + }, PII_ENTITY_OFFSET_INPUT); + } + // Recognize linked entity @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -578,6 +825,139 @@ public void recognizeLinkedEntitiesBatchTooManyDocuments(HttpClient httpClient, }); } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesEmoji(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiRunner(document -> + client.recognizeLinkedEntities(document).forEach( + linkedEntity -> linkedEntity.getMatches().forEach( + linkedEntityMatch -> { + assertEquals(13, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesEmojiWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiWithSkinToneModifierRunner(document -> + client.recognizeLinkedEntities(document).forEach( + linkedEntity -> linkedEntity.getMatches().forEach( + linkedEntityMatch -> { + assertEquals(15, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesEmojiFamily(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiFamilyRunner(document -> + client.recognizeLinkedEntities(document).forEach( + linkedEntity -> linkedEntity.getMatches().forEach( + linkedEntityMatch -> { + assertEquals(22, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesEmojiFamilyWIthSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiFamilyWithSkinToneModifierRunner(document -> + client.recognizeLinkedEntities(document).forEach(linkedEntity -> + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(30, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesDiacriticsNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + diacriticsNfcRunner(document -> + client.recognizeLinkedEntities(document).forEach( + linkedEntity -> linkedEntity.getMatches().forEach( + linkedEntityMatch -> { + assertEquals(14, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesDiacriticsNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + diacriticsNfdRunner(document -> + client.recognizeLinkedEntities(document).forEach( + linkedEntity -> linkedEntity.getMatches().forEach( + linkedEntityMatch -> { + assertEquals(15, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesKoreanNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + koreanNfcRunner(document -> + client.recognizeLinkedEntities(document).forEach( + linkedEntity -> linkedEntity.getMatches().forEach( + linkedEntityMatch -> { + assertEquals(13, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1) + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesKoreanNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + koreanNfdRunner(document -> + client.recognizeLinkedEntities(document).forEach( + linkedEntity -> linkedEntity.getMatches().forEach( + linkedEntityMatch -> { + assertEquals(13, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1)); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizeLinkedEntitiesZalgoText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + zalgoTextRunner(document -> + client.recognizeLinkedEntities(document).forEach( + linkedEntity -> + linkedEntity.getMatches().forEach(linkedEntityMatch -> { + assertEquals(126, linkedEntityMatch.getOffset()); + assertEquals(9, linkedEntityMatch.getLength()); + })), + LINKED_ENTITY_INPUTS.get(1) + ); + } + // Extract key phrase @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -1009,5 +1389,131 @@ public void analyzeSentimentBatchTooManyDocuments(HttpClient httpClient, TextAna final TextAnalyticsError textAnalyticsError = (TextAnalyticsError) httpResponseException.getValue(); assertEquals(INVALID_DOCUMENT_BATCH, textAnalyticsError.getErrorCode()); }); - }; + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentEmoji(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(34, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentEmojiWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiWithSkinToneModifierRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(36, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentEmojiFamily(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiFamilyRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(43, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentEmojiFamilyWithSkinToneModifier(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + emojiFamilyWithSkinToneModifierRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(51, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentDiacriticsNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + diacriticsNfcRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(35, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentDiacriticsNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + diacriticsNfdRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(36, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentKoreanNfc(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + koreanNfcRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(34, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentKoreanNfd(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + koreanNfdRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(34, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void analyzeSentimentZalgoText(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + zalgoTextRunner(document -> + client.analyzeSentiment(document).getSentences().forEach( + sentenceSentiment -> { + assertEquals(0, sentenceSentiment.getOffset()); + assertEquals(147, sentenceSentiment.getLength()); + }), + SENTIMENT_OFFSET_INPUT + ); + } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java index 6ce880cee7e83..b03c9a39779a5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java @@ -534,8 +534,7 @@ void textAnalyticsInputEmptyIdRunner(Consumer> testRunne testRunner.accept(Arrays.asList(new TextDocumentInput("", CATEGORIZED_ENTITY_INPUTS.get(0)))); } - void tooManyDocumentsRunner( - Consumer> testRunner) { + void tooManyDocumentsRunner(Consumer> testRunner) { final String documentInput = CATEGORIZED_ENTITY_INPUTS.get(0); // max num of document size is 10 testRunner.accept(Arrays.asList( @@ -543,6 +542,44 @@ void tooManyDocumentsRunner( documentInput, documentInput, documentInput, documentInput, documentInput, documentInput)); } + // offset runners + void emojiRunner(Consumer testRunner, String text) { + testRunner.accept("👩 " + text); // count as 3 units + } + + void emojiWithSkinToneModifierRunner(Consumer testRunner, String text) { + testRunner.accept("👩🏻 " + text); // count as 5 units + } + + void emojiFamilyRunner(Consumer testRunner, String text) { + testRunner.accept("👩‍👩‍👧‍👧 " + text); // count as 12 units + } + + void emojiFamilyWithSkinToneModifierRunner(Consumer testRunner, String text) { + testRunner.accept("👩🏻‍👩🏽‍👧🏾‍👦🏿 " + text); // count as 20 units + } + + void diacriticsNfcRunner(Consumer testRunner, String text) { + testRunner.accept("año " + text); // count as 4 units + } + + void diacriticsNfdRunner(Consumer testRunner, String text) { + testRunner.accept("año " + text); // count as 5 units + } + + void koreanNfcRunner(Consumer testRunner, String text) { + testRunner.accept("아가 " + text); // count as 3 units + } + + void koreanNfdRunner(Consumer testRunner, String text) { + testRunner.accept("아가 " + text); // count as 3 units + } + + void zalgoTextRunner(Consumer testRunner, String text) { + // count as 116 units + testRunner.accept("ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ " + text); + } + String getEndpoint() { return interceptorManager.isPlaybackMode() ? "https://localhost:8080" diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentBatchTooManyDocuments.json index cc2f0f6f6311e..1ac7c3abdbdb5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentBatchTooManyDocuments.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c829be78-595b-4bc7-b643-27817be6e96c", + "x-ms-client-request-id" : "5c6c2929-ed11-4d0e-8fd8-70f787885835", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "e9cc0104-24c0-4f38-9b26-4ff7022ac675", + "apim-request-id" : "ef67b446-45a7-43ba-9cbd-c26715c80e21", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 10 records are permitted.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDiacriticsNfc.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDiacriticsNfc.json new file mode 100644 index 0000000000000..83ea2257e0d6c --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDiacriticsNfc.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a83f8ab8-164a-461f-a08d-aaabce2dea8a", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "95", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "1cf570ca-80f2-4df4-8bd0-598893d32f43", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":35,\"text\":\"año The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:16 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDiacriticsNfd.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDiacriticsNfd.json new file mode 100644 index 0000000000000..b395e475577e7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDiacriticsNfd.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0843202a-667b-49a6-82bd-94330f97b993", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "94", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "a05b3f83-1f72-482f-a4a8-40015ceb49e0", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":36,\"text\":\"año The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:17 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json index 9c06d1b61803a..99c4de9bdee33 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "256847f5-efb4-40b9-b51c-a88cae4e76e2", + "x-ms-client-request-id" : "d596b89d-5b58-4224-9b7b-5f1be0a2d32a", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "3db31293-1719-4b68-b699-8144b55a8a1c", + "apim-request-id" : "d9ba76be-0ca0-4ae9-ab28-66861bcce9bc", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmoji.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmoji.json new file mode 100644 index 0000000000000..3a71ecbb71d8d --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmoji.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e2f1e123-866a-4846-91d1-8484ced8b94e", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "85", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "1aaf699e-3980-4734-9483-cc60f9cdad5b", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":34,\"text\":\"\uD83D\uDC69 The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:07 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiFamily.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiFamily.json new file mode 100644 index 0000000000000..f2f8cf5a8486d --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiFamily.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "591bf922-9a34-4131-8fdc-50d3c44cb392", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "97", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "2bbcbcfb-5a27-4649-83e1-25b0eebce3dc", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":43,\"text\":\"\uD83D\uDC69‍\uD83D\uDC69‍\uD83D\uDC67‍\uD83D\uDC67 The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:59 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiFamilyWithSkinToneModifier.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiFamilyWithSkinToneModifier.json new file mode 100644 index 0000000000000..0e2e7ea59a997 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiFamilyWithSkinToneModifier.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fecf14e-1a09-43d5-8d6e-97af232058e1", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "85", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "5e555ee2-a2be-4448-82dd-aeaaa2b14504", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":51,\"text\":\"\uD83D\uDC69\uD83C\uDFFB‍\uD83D\uDC69\uD83C\uDFFD‍\uD83D\uDC67\uD83C\uDFFE‍\uD83D\uDC66\uD83C\uDFFF The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:11 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiWithSkinToneModifier.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiWithSkinToneModifier.json new file mode 100644 index 0000000000000..26c59bb162df7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmojiWithSkinToneModifier.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0514eaf1-871d-4c75-8dcd-5fcebfff3eca", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "84", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "9c380cc5-f3e0-47ab-bf1f-1d1b6f76dcd5", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":36,\"text\":\"\uD83D\uDC69\uD83C\uDFFB The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:06 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmptyIdInput.json index 59b8f741f89b6..4f58fa6be18ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "208b2306-5b68-4fc0-8674-39fefac24071", + "x-ms-client-request-id" : "e12d2cd0-895a-4c8c-8528-1b25be38063e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "316f5103-3b95-490f-b47b-231e8f7df047", + "apim-request-id" : "9d9eb3c0-0092-483f-b6d7-94d649e19f50", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json index 4576bc2d74f0b..62de7e36223dc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputNotShowStatisticsButIncludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "45b8196a-af8a-45a2-84f3-0919de49861b", + "x-ms-client-request-id" : "3a16be16-d742-4bff-b7cd-f08ba2f1fbf3", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "112", + "x-envoy-upstream-service-time" : "95", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "0e4b748e-f808-4d43-8900-9575423a53e2", + "apim-request-id" : "b7fb713d-7d2f-43e9-bb9c-a270fecf7560", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json index 77f363daa6570..239bb9c5e05ac 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "57c84e98-dea0-4557-88fd-4441807f729f", + "x-ms-client-request-id" : "23c9b4c8-324c-43a2-9d25-4f8e01d525bd", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "114", + "x-envoy-upstream-service-time" : "105", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "51a3aaac-517b-4e3a-87ac-db51136a1a4c", + "apim-request-id" : "6d6e3eff-e7ed-45d4-bfb6-a1a830ae7a17", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:07 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json index fe1054197c864..0b0b2c29c4065 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsAndIncludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "d583966b-50ba-42d6-87f6-f4a5dc8d392f", + "x-ms-client-request-id" : "c8ee1e2f-7305-4f0d-a2ac-5bf6e519010d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "87", + "x-envoy-upstream-service-time" : "89", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "86d6550b-0b1f-4d01-bc40-24f32830dab5", + "apim-request-id" : "502b9b10-8fc4-4234-8104-3f6c79f473a2", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json index f58fd9f2fea59..fb28be0793c3d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatisticsExcludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "1124d35e-bd7c-42b8-82fb-caa3c0005929", + "x-ms-client-request-id" : "878483d8-b1a1-4f45-b1cd-8343acb1b6e1", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "88", + "x-envoy-upstream-service-time" : "91", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "99368e33-87a4-4037-871f-7dea29508a94", + "apim-request-id" : "53512d48-4ba2-46ad-8a1c-16f7ac3f2fec", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json index 670372c39994a..dbefe112f87ec 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullAnalyzeSentimentOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6b89dead-27fb-4a2c-bd57-67dfa2161e39", + "x-ms-client-request-id" : "0a65f274-d47a-4f7f-b488-649df4652157", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "102", + "x-envoy-upstream-service-time" : "104", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "34925a6e-2c6e-40d3-97ed-17bb8264e27b", + "apim-request-id" : "c626ed90-988d-4f69-ac4d-f3d9c0c4f430", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:03 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json index f6c500561c867..4696e49a71486 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputWithNullRequestOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "eb652e5d-98c3-442f-b601-8516543e388d", + "x-ms-client-request-id" : "9f14fd52-8b61-4601-90a3-a90d8b05a9b8", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "86", + "x-envoy-upstream-service-time" : "88", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "f5fe8cd7-2c6e-4adc-8ad1-b5b20afff05e", + "apim-request-id" : "423a12c2-5c61-4d66-9b2b-d048a2adc58c", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json index 3aaeefa57679e..65165d0d93873 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "979804da-7b26-49e3-b27e-e180ebe5cb2c", + "x-ms-client-request-id" : "7d6c73a9-e9ec-4b39-99ba-9be6c8d3535a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "118", + "x-envoy-upstream-service-time" : "83", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "33d7ca82-95a4-4cac-a26c-ab90577a9691", + "apim-request-id" : "0a287224-ee0a-48a5-8bc1-869a30468a4d", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json index 4a351130e3bbf..6bae8aa1d14f0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "37c7332f-17a1-4ebe-920a-53216962a41f", + "x-ms-client-request-id" : "50986742-9343-4f38-946f-458b88a5604d", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "72539de6-6170-40e0-a454-03c961a915ec", + "apim-request-id" : "61914af3-7de6-4860-9fc5-dde1b97e69cb", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:00 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json index 841bbb84760f6..8ddc4504b72be 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "eb6a13dd-3e85-467c-959c-68c9a78077ee", + "x-ms-client-request-id" : "8aa696ca-9a04-4bf4-bb17-b5030d971d6e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "108", + "x-envoy-upstream-service-time" : "83", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "72db31da-510e-4c20-b56c-802786bd228c", + "apim-request-id" : "a7a12972-48ad-4c69-8ea0-5773f581ffb7", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":0,\"length\":1,\"text\":\"!\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":1,\"length\":4,\"text\":\"@#%%\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:02 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json index e7c4c7f0b087a..b42925c1e26c3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringNotShowStatisticsButIncludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "8ff9341b-f831-4a9c-b5bc-7eeca3150f04", + "x-ms-client-request-id" : "6d4d94c1-88d1-489e-89b6-c90affc8c21c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "101", + "x-envoy-upstream-service-time" : "115", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "9be728ca-394e-486f-9893-3e78962fa432", + "apim-request-id" : "a0e71879-feb1-4671-9669-585895d909ae", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:00 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json index 0fde00bcbdc62..23e3a7e708f01 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsAndIncludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2e3cfeef-1bd7-4ecb-9c9f-7e50dc3e4687", + "x-ms-client-request-id" : "1ddf7dba-de38-4b70-af2f-d7338f676beb", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "104", + "x-envoy-upstream-service-time" : "85", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "06600523-f94d-45dd-aede-1ada7b523965", + "apim-request-id" : "1dbdc0e4-a92b-414c-a5fd-01bfaa539ec3", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":27,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/0/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":19,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":40,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/1/sentences/1/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":50,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":59,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:06 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json index f75450da341d0..929d332bb75a1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringShowStatisticsExcludeOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=true&opinionMining=false&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "5879cf56-368e-4de6-a10c-49af0d04d74a", + "x-ms-client-request-id" : "7d04a7af-12f2-4105-baf7-e843ca68421d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "114", + "x-envoy-upstream-service-time" : "91", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "c51a88ce-bf26-4b5e-9e42-ed32e679b259", + "apim-request-id" : "b146517e-ff23-4ec5-9240-6a2e71c5ad39", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json index 5d935f2925975..375f3391c7617 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=false&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "dafa3d0c-3e29-425e-a57f-0dfd34d2116d", + "x-ms-client-request-id" : "eeeb8809-db08-434d-9a04-72d93a5e25d5", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "99", + "x-envoy-upstream-service-time" : "82", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "95a6f9eb-8337-4ba0-8daf-86a75748741a", + "apim-request-id" : "01173e0a-b07b-4057-aad5-c2de004dda97", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:59 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json index ecd4fec771a88..63d086299c6c7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c057e80e-5a57-42dc-9469-2dfa25c91aba", + "x-ms-client-request-id" : "9e3d2772-dac1-4494-a88f-a2858f74c67c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "206", + "x-envoy-upstream-service-time" : "86", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "6d7782f2-7989-4d93-9c4a-e7466926b0a5", + "apim-request-id" : "77aa98c3-b571-4f66-a3e9-877b434184da", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:03 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json index 45ce6b6709e16..6dce9e2c66d5a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithDefaultLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "3965ed9f-de84-4697-a309-a5b6df10e768", + "x-ms-client-request-id" : "5c51283b-1648-44c6-8694-5520ebb725e8", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "115", + "x-envoy-upstream-service-time" : "95", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "6bf42621-9895-4439-bc37-d56aeac9005e", + "apim-request-id" : "3f66e0b8-8320-493d-b7e3-56dc0dada3ae", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:05 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json index c4cddc5ff2d27..2b6626a1fa2ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInputWithOpinionMining.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?showStats=false&opinionMining=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "08aec66e-a9ed-4ee7-a519-766a0c0727d2", + "x-ms-client-request-id" : "8dc4b5aa-7cb5-46f9-bb31-632c3b2a4918", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "90", + "x-envoy-upstream-service-time" : "100", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "a5cd6b15-fa68-4abb-a510-ebceb0390f84", + "apim-request-id" : "42ecb5a9-ad62-474d-a72b-7f7dc9e93078", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\",\"aspects\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":4,\"length\":5,\"text\":\"hotel\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/0\"},{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/0/opinions/1\"}]}],\"opinions\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":14,\"length\":4,\"text\":\"dark\",\"isNegated\":false},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"negative\":1.0},\"offset\":23,\"length\":7,\"text\":\"unclean\",\"isNegated\":false}]},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\",\"aspects\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":59,\"length\":7,\"text\":\"gnocchi\",\"relations\":[{\"relationType\":\"opinion\",\"ref\":\"#/documents/0/sentences/1/opinions/0\"}]}],\"opinions\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"negative\":0.0},\"offset\":51,\"length\":7,\"text\":\"amazing\",\"isNegated\":false}]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentKoreanNfc.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentKoreanNfc.json new file mode 100644 index 0000000000000..0a5a112078dde --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentKoreanNfc.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a49433b3-0322-4693-b89d-f2581e0f761c", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "83", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "b0201888-b6f0-443d-9e7e-b5ad6ab7d84f", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":34,\"text\":\"아가 The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:55 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentKoreanNfd.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentKoreanNfd.json new file mode 100644 index 0000000000000..69bfb11171059 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentKoreanNfd.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1674b82d-4585-4f6b-aac7-3cb3e3a8fda4", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "91", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "4f46bebf-4001-4702-b805-d009656cb164", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":34,\"text\":\"아가 The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:55 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentZalgoText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentZalgoText.json new file mode 100644 index 0000000000000..c068fa3c74722 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentZalgoText.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//sentiment?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee22488f-8cbb-4e00-87ba-98749c645b14", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "81", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "5737603d-ebc9-4b89-9583-8bc2eb07d3c3", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":147,\"text\":\"ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:13 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json index 804c5c194dae4..75de352780b81 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "87d04faf-e3d8-44cf-aee1-89d614112486", + "x-ms-client-request-id" : "fc62b511-6705-4a46-a485-bcbc2ec1a58d", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "936eccbc-00ac-4f83-b355-81878dd83529", + "apim-request-id" : "7fc0ef6d-1a87-40db-bed4-992d3fded78e", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"2\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchTooManyDocuments.json index b5b255b602933..a1d254929f22b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchTooManyDocuments.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f794b3ce-9331-4947-87bb-78c3006472dc", + "x-ms-client-request-id" : "fba8d8d7-53f3-4a9e-ba62-8605e8e9ddc4", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "813e6f78-84ba-4f69-9cbd-1d8e26531cdf", + "apim-request-id" : "e62e86f6-cf25-4295-8ded-434302e24613", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 5 records are permitted.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:08 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDiacriticsNfc.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDiacriticsNfc.json new file mode 100644 index 0000000000000..baac2faa311b2 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDiacriticsNfc.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "91ca340e-50f7-4f54-be0c-839101384433", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "74", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "55a7b121-46b7-4473-b8be-4d2ba65fcc0d", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":14,\"length\":9,\"confidenceScore\":0.62}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:13 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDiacriticsNfd.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDiacriticsNfd.json new file mode 100644 index 0000000000000..7627093cd1041 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDiacriticsNfd.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5aaf2abf-c350-4c5e-803e-e987fce4875f", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "75", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "d51d3031-8430-4a9d-8a71-3f25c19a81b0", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":15,\"length\":9,\"confidenceScore\":0.7}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:15 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json index 7a2ac6d87f529..3b7ad148c2fbc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "23e1a99f-1756-4ad8-a687-e82bd5c7a580", + "x-ms-client-request-id" : "bef15ea0-9821-4f0a-844a-4d734898ac24", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "e6298b5d-02b9-4e28-9369-9fc4f15a3017", + "apim-request-id" : "c4284202-bb00-47bc-b125-c335cf55c60d", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:11 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmoji.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmoji.json new file mode 100644 index 0000000000000..fb65b83ffd423 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmoji.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba219dcf-fe70-4714-9794-0a80d74b10cf", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "73", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "dd2d5711-b7d8-40f4-bee2-e36e1ee567e2", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":13,\"length\":9,\"confidenceScore\":0.72}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:54 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiFamily.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiFamily.json new file mode 100644 index 0000000000000..7aae04712ac41 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiFamily.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "024dd68d-f3cc-477b-814c-b3248eddeeec", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "81", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "7e52f9a0-e62b-49b7-a4ed-bb5dc52c11d9", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":22,\"length\":9,\"confidenceScore\":0.6}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:10 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiFamilyWIthSkinToneModifier.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiFamilyWIthSkinToneModifier.json new file mode 100644 index 0000000000000..80184b5670bfd --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiFamilyWIthSkinToneModifier.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4d01bb1-02b5-4fef-a708-3913df730384", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "71", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "3a3c38b9-c979-4c91-9fe2-1908deb9416f", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":30,\"length\":9,\"confidenceScore\":0.59}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:59 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiWithSkinToneModifier.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiWithSkinToneModifier.json new file mode 100644 index 0000000000000..1d85d3e64ac25 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmojiWithSkinToneModifier.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87e22552-fb74-4bb0-914e-d04afdb7cbf2", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "75", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "4a537768-b6b5-413f-b277-7d35930dc880", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":15,\"length\":9,\"confidenceScore\":0.7}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:11 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmptyIdInput.json index c848cb85a264c..2af9f87c3ce24 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesEmptyIdInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "d8e39933-b7b4-4b1a-a5c0-e4b8563d94bc", + "x-ms-client-request-id" : "fe75b814-99a3-449d-bef9-11dc4160ad30", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "dd302e52-4716-46ba-97d1-023aecede465", + "apim-request-id" : "ea9ae899-f762-4eac-b8a2-77770a9794f3", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:58 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json index 35f8d23fc5b8a..8296a9dd63583 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "d9a8fff9-2483-4a2a-9ab7-7c60a0b70fb2", + "x-ms-client-request-id" : "1c774096-ae90-4196-b27a-4fe9b6053ccf", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "95", + "x-envoy-upstream-service-time" : "99", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "001f24b3-dd80-4247-9f26-fd64ab4baa54", + "apim-request-id" : "2f8d15c3-c860-4f29-b4b5-26dd33828a05", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json index acd8b5d9e429a..2114848197eef 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?showStats=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "248bdd5e-0a7a-421d-8fca-4795a5a282c5", + "x-ms-client-request-id" : "94f3b1f3-8c5c-4006-ae9f-33654c57ce96", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "038f70a9-b311-4729-a618-b4c2661e2721", + "apim-request-id" : "9318b44e-0d50-449d-b278-6b002b42ce9c", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:57 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:09 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json index 9906a7f976788..1601e5a9924a1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "1418f846-0702-496b-821b-e8e26202d3b8", + "x-ms-client-request-id" : "1d0ccae8-baa4-407b-827a-1936b563dbdb", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "93", + "x-envoy-upstream-service-time" : "101", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "9af0a8fd-f3a1-4aa9-9642-02a840eb8530", + "apim-request-id" : "18294a3e-e3b4-4fb5-ab97-2be3141b6dd5", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json index 5ba20f2c00147..6c98d99c063a2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9586541f-0de6-4eb0-bd06-ca5049618249", + "x-ms-client-request-id" : "067b153d-daf2-4391-ab4f-bc599ba04380", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "7010c521-2ff1-4dd1-9b29-8eb37429fe97", + "apim-request-id" : "2ba0796c-2e5a-4d48-977d-49ee4cf66514", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:04 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json index a85956a8dd18c..7e8b9bd8cea39 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b4900447-c2a4-4f4e-8696-f1b142cffacf", + "x-ms-client-request-id" : "9165db69-6cfb-4621-9c5f-9787a67a8d74", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "62", + "x-envoy-upstream-service-time" : "81", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "e2232377-29c9-4a06-980b-6cd7b69421c8", + "apim-request-id" : "cebf70d2-9a34-4615-b849-ed137d79d74b", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:53 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:59 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json index 2ed4f1ea1f8f9..84c0b947841d8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "98aabf1b-7391-4776-9af0-cd6be2863d71", + "x-ms-client-request-id" : "f4a48fa0-d757-4630-9cdb-776cb5cfd76e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "99", + "x-envoy-upstream-service-time" : "103", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "230af861-501a-47f5-b68c-63b1b7884165", + "apim-request-id" : "a04db155-9702-4a9a-8fac-3af231e1f12b", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json index 6ee414ea27c3e..881fda7f6e90d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?showStats=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b8688851-3a69-4c33-8179-3f9a3ea2a144", + "x-ms-client-request-id" : "8b1b2c96-ca8a-4ed5-882b-cc29e584bce6", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "99", + "x-envoy-upstream-service-time" : "102", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "b38e98a9-9a7d-40b4-9560-e5880c8432f4", + "apim-request-id" : "b747308a-ce8a-4b55-a81d-2cb53b9ffdb9", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json index 9272c4a420568..b39bb79df9c29 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9d50aa4a-25bb-4867-a0ca-1dd1c9230f07", + "x-ms-client-request-id" : "4753cf0f-77d5-4a26-9287-b4ea3504ccba", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "86", + "x-envoy-upstream-service-time" : "95", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "83796b64-de6b-4e86-bfa9-1fde022a2629", + "apim-request-id" : "7fce4a2a-deaa-448c-9436-bf4e6944efe0", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:07 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesKoreanNfc.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesKoreanNfc.json new file mode 100644 index 0000000000000..bff746ef06cd2 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesKoreanNfc.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d55a5919-9dc6-40d2-bc0a-e8652264b043", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "69", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "c4bb6ebd-db38-42e2-8d53-8c4c4b5e08a7", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":13,\"length\":9,\"confidenceScore\":0.7}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:08 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesKoreanNfd.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesKoreanNfd.json new file mode 100644 index 0000000000000..d570999a497d1 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesKoreanNfd.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0149344-6615-4916-a60b-511ab6e8bcfc", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "71", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "c5b47c5c-c946-4c84-aef3-50969f17d8e9", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":13,\"length\":9,\"confidenceScore\":0.7}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:08 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesZalgoText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesZalgoText.json new file mode 100644 index 0000000000000..8cf499c3b4301 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesZalgoText.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/general?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8e2b4efd-4321-4597-b778-fc6fe9a302e8", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "110", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "f26b9f08-8382-4caa-9dda-4782b1194f3a", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":126,\"length\":9,\"confidenceScore\":0.6}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:03 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesBatchTooManyDocuments.json index 30e7d36045b56..17f89e1c1fc02 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesBatchTooManyDocuments.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ca742ed1-6b9c-4b42-a12a-a2dff3c6f0e7", + "x-ms-client-request-id" : "fbad32bf-1259-4eb7-9a4f-f8521337eaff", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "fd31d0bd-b47f-4025-864b-ab51d75e0702", + "apim-request-id" : "8a1d1704-07d4-458c-9333-8f1c32c99bf5", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 5 records are permitted.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:53 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDiacriticsNfc.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDiacriticsNfc.json new file mode 100644 index 0000000000000..14cec16d7c80b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDiacriticsNfc.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e1fd9d0-d71c-46f5-b3a6-c1419a7c12ca", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "17", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "d00c2027-35d6-4c6b-b525-f3eae4c9f5d7", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":14,\"length\":9,\"confidenceScore\":0.24}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:17 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDiacriticsNfd.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDiacriticsNfd.json new file mode 100644 index 0000000000000..924c2687fec83 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDiacriticsNfd.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4d387dfc-ea7b-42aa-a3fb-21a763b7f482", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "18", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "b2f05755-5523-44fe-92e2-1e939411b555", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":15,\"length\":9,\"confidenceScore\":0.24}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:17 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json index f1d0a1c48ba01..3eb879c7e82fb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a4eaf018-dabc-4ec3-bcdc-8868b276dd2c", + "x-ms-client-request-id" : "a440f22c-b653-4ee0-9232-784cc62536bc", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "f73f567b-43a4-4523-afa3-2db2e2860c2f", + "apim-request-id" : "1c8f7654-a8e4-4a7b-ac4c-2a1be7baad2e", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:56 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmoji.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmoji.json new file mode 100644 index 0000000000000..f5564a9dc3857 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmoji.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed776b78-5365-48c8-8ea1-4440799afaeb", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "18", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "019ba98f-c39e-48fa-b335-4170a35bbdb7", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":13,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:58 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiFamily.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiFamily.json new file mode 100644 index 0000000000000..ca846d748bafb --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiFamily.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "60f40ce4-3c24-481d-a222-e13c6174f717", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "17", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "5d3cbc20-4bea-4cdd-8e96-0c665aeb1f32", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":22,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:06 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiFamilyWIthSkinToneModifier.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiFamilyWIthSkinToneModifier.json new file mode 100644 index 0000000000000..3ae20849f9dba --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiFamilyWIthSkinToneModifier.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e338fece-4adc-4d0d-bde9-22cc55f36dbd", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "18", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "e5feeb63-f658-446a-a669-8666bfeed9ba", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":30,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:59 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiWithSkinToneModifier.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiWithSkinToneModifier.json new file mode 100644 index 0000000000000..fc672993366ef --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmojiWithSkinToneModifier.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16c1350c-35f8-4c47-a627-020e0f07cf72", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "17", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "2b9980c9-b9a2-4a7d-af9e-0c9914e7ec4e", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":15,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:54 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmptyIdInput.json index 74852591fb930..36b7cc72b162e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ee9200cb-9bbd-4944-b0d3-1e2d331cff19", + "x-ms-client-request-id" : "1f4cb3a1-faab-44d0-b70b-b93021efc527", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "83e94ad9-1962-446e-a57d-c8c0369f335d", + "apim-request-id" : "1722fdcf-fc5e-452b-96aa-5784f11a015d", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:09 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json index 21cfeae723a61..bf85d72dd9260 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ac39d8fa-b5e3-4dac-afd8-4803d9b14caf", + "x-ms-client-request-id" : "e1c8f748-2cf0-4bd7-9f03-b8c4615e17c1", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "20", + "x-envoy-upstream-service-time" : "19", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "47a49c16-17a0-4f51-a226-f00dd395859d", + "apim-request-id" : "f210df70-3aa8-4582-86f2-1ce572c7776a", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:58 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json index a472aaa890684..26e880cc18505 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?showStats=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6d192836-a352-4c65-9425-d126aedd5cfc", + "x-ms-client-request-id" : "37dab68e-5479-47b4-9d0a-b6d37e6f5ffe", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "aca32039-2701-4e65-9d66-26cb491a3e6f", + "apim-request-id" : "1e3cd7e5-e062-4163-8601-e11a5efd5b04", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:08 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json index fa98be71c4a4a..c2b49616c3aed 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "09208748-d6f8-4bc8-bf4d-94073e661926", + "x-ms-client-request-id" : "221b9e2d-de44-4686-b404-50cc7cb768fa", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "4fd95cda-cb8c-4de1-bc47-69cdf7d79b23", + "apim-request-id" : "3e7331c8-2fc3-4948-81a3-38fa0e796499", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:48 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json index 11f33b7e82923..e887313109e8b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "1cfe6e54-ecbf-41b7-a711-f541199d116c", + "x-ms-client-request-id" : "ce295d63-1914-4fcf-ba4b-735f0c2a8e18", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "3", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "0c268b51-902b-474b-96fe-9dfc4022ca6f", + "apim-request-id" : "39bc7bfe-d988-4a68-a754-59e203752699", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:49 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json index f942a71264b11..f1d29b442757d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ccfb027e-3e6c-4388-8228-770c0ee286e8", + "x-ms-client-request-id" : "8179787d-9312-4cb1-8747-2b41d0e48e9e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "16", + "x-envoy-upstream-service-time" : "20", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "511eef1b-5dc4-4ad3-bae4-6e6e9d58cd82", + "apim-request-id" : "cf9a6d3e-a747-4ab2-8f5b-0898f875c5ff", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:04 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json index 6b8ebf525ea12..05c34744f5ecf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a2927cbd-049c-45c4-a3e6-16c1b62ddc6b", + "x-ms-client-request-id" : "11d209dc-1fc0-40cf-93a8-1f9699c78d1a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "18", + "x-envoy-upstream-service-time" : "28", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "50cd4b5e-0bf5-4363-8282-1c841af243d6", + "apim-request-id" : "932288b8-1eac-4c44-bac5-ee5fa2124d36", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:47 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:44 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json index 8fa13f9aa47a1..67c3feb6fd544 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?showStats=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c2df6e63-a5ee-4942-9168-c5a9e0bedd77", + "x-ms-client-request-id" : "7bdf1e0b-aef0-4ed6-8d07-7e8709a51afe", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "19", + "x-envoy-upstream-service-time" : "29", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "8f6a3864-8e16-441d-9a93-0e9ca809d968", + "apim-request-id" : "8cba5377-ce03-462c-a18c-9d64278cd6f8", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json index 03d1d15822a3a..9b0cfd97af9ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "cac23bc9-9c0c-4261-966d-5c20f556528f", + "x-ms-client-request-id" : "1843ea29-e72a-4e1a-a45d-33b292b53331", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "18", + "x-envoy-upstream-service-time" : "25", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "8856ade6-f871-4538-a6db-956468d98813", + "apim-request-id" : "93a9cc71-5a51-49c2-a772-929ddc138623", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"5fbba6b8-85e1-4d41-9444-d9055436e473\",\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesKoreanNfc.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesKoreanNfc.json new file mode 100644 index 0000000000000..44977cc8e35aa --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesKoreanNfc.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b8db2fba-e3da-4763-a0c5-0561f992f779", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "18", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "eb3737fe-a88e-41e0-ba13-65e46bdbc496", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":13,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesKoreanNfd.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesKoreanNfd.json new file mode 100644 index 0000000000000..089cb505c0c08 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesKoreanNfd.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a75ff53a-acad-47b3-81c2-dcdfc25ecd2e", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "17", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "2d041cdc-6c69-4bd6-b514-d15249c1d8d0", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":13,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesZalgoText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesZalgoText.json new file mode 100644 index 0000000000000..4737b65c5bada --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesZalgoText.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/linking?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "556d27cd-784d-4592-9b9a-379abc1bbf6d", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "17", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "dc82672d-a7d5-4bd9-a061-e39025ebfa57", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"bingId\":\"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85\",\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":126,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:15 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchInputSingleError.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchInputSingleError.json index d38dcdfc327f4..03d0c3f58ce5c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchInputSingleError.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchInputSingleError.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9a23cafe-b2c3-4893-9e93-6d244bf1fca7", + "x-ms-client-request-id" : "b9b7d09e-a0c8-434b-bf5a-2a4c520fcabe", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "2", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "0affafcb-3a4f-4c9a-a153-61c59d6688f6", + "apim-request-id" : "9e3ca1e8-977f-410e-bab7-930bc13a0b9e", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"2\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:51 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchTooManyDocuments.json index 0251baaa656af..4c62d3bdbbcf5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesBatchTooManyDocuments.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "8ab62a2b-4265-4c0d-9e67-f35b787a7976", + "x-ms-client-request-id" : "d9a37065-663c-4410-a5b4-e7b09b0e8487", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "6", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "dc35794f-8cf3-4f2a-94d0-61266818fbaf", + "apim-request-id" : "0feaf027-4184-4837-a2ca-25a1f057de83", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"Batch request contains too many records. Max 5 records are permitted.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:02 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDiacriticsNfc.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDiacriticsNfc.json new file mode 100644 index 0000000000000..6480e3e2a8cf2 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDiacriticsNfc.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f364b5ff-a2d4-43b2-8324-4344bfd23512", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "71", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "08b2422e-34ff-4a56-b89e-cf25bdc7449b", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"año SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":9,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDiacriticsNfd.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDiacriticsNfd.json new file mode 100644 index 0000000000000..c6525ca3042e3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDiacriticsNfd.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "afb9b994-64a4-42f1-97fa-ccdee7df94ce", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "84", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "bf92ce69-66bf-4685-82c0-5a1707f836f8", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"año SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":10,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:49:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDuplicateIdInput.json index cc09110d7085b..b73b63c3c142c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesDuplicateIdInput.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b5ed6bd4-6fcf-47cd-84ae-73d08d40fa2d", + "x-ms-client-request-id" : "6165bd6b-195d-4bb1-b6ad-2e4bc8309197", "Content-Type" : "application/json" }, "Response" : { @@ -12,11 +12,11 @@ "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "bbd8e25d-3284-425b-a53b-2ffdc3035a5a", + "apim-request-id" : "9f8ffe1c-f9b2-47f4-bc14-ecab38e9c556", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:49 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:54 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmoji.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmoji.json new file mode 100644 index 0000000000000..f3169fd7515e1 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmoji.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ead30b42-6828-4db7-8129-75a46aa4fdb0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "74", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "902c4ae5-0530-4b7d-ad03-467de2c8cb3d", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"\uD83D\uDC69 SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":8,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:17 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiFamily.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiFamily.json new file mode 100644 index 0000000000000..022addbbb8b07 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiFamily.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ccae6b4-fa24-4137-a0b4-7630c36fceb9", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "75", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "b60ae1b5-8519-49da-9a4c-ca2eb0ef6cc9", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"\uD83D\uDC69‍\uD83D\uDC69‍\uD83D\uDC67‍\uD83D\uDC67 SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":17,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:07 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiFamilyWIthSkinToneModifier.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiFamilyWIthSkinToneModifier.json new file mode 100644 index 0000000000000..d3ac8514fe2e4 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiFamilyWIthSkinToneModifier.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0410d1f2-ca75-4d61-9369-6e0c37facbd0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "87", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "ff14a533-91f4-4844-9179-06982bfc701e", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"\uD83D\uDC69\uD83C\uDFFB‍\uD83D\uDC69\uD83C\uDFFD‍\uD83D\uDC67\uD83C\uDFFE‍\uD83D\uDC66\uD83C\uDFFF SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":25,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:13 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiWithSkinToneModifier.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiWithSkinToneModifier.json new file mode 100644 index 0000000000000..e293f20ed5729 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmojiWithSkinToneModifier.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7066bb6c-0633-4fb0-828c-2ac39db966ee", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "75", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "8f8da601-ba30-4b65-9999-a14718a09116", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"\uD83D\uDC69\uD83C\uDFFB SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":10,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:05 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmptyIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmptyIdInput.json index 3611441c27afb..841dbade9de58 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmptyIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesEmptyIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "422d52f4-151f-4936-ad85-b0da82e04630", + "x-ms-client-request-id" : "80f7c4f5-bf4b-476a-b334-c75a5c0d88f3", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "b6a675cc-4a20-41e4-a1e0-d73fc6532992", + "apim-request-id" : "6769b139-75b2-410d-ad06-d55e0355110c", "retry-after" : "0", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"At least one document is missing an Id attribute.\"}}}", - "Date" : "Tue, 01 Sep 2020 06:14:51 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:57 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInput.json index a8f90c014b618..b857deabf9b78 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "23eb6bcb-8b39-4c81-bab1-c5aa41d11fc0", + "x-ms-client-request-id" : "2cc26d76-5c36-4871-9b00-fd586f991928", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "139", + "x-envoy-upstream-service-time" : "193", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "af659d6c-9418-4f56-8c74-d006f8237df9", + "apim-request-id" : "1331c29b-b6db-4197-84b4-87a9827e0b5e", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:02 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputShowStatistics.json index 10c8fd5754786..cd8e68a97305d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "dc1bd604-422d-4715-aa33-4045d3b147bc", + "x-ms-client-request-id" : "cf15b07d-130d-41bb-9d10-ec7e9c588986", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "141", + "x-envoy-upstream-service-time" : "167", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "02dab083-c3d5-44ff-ad1a-023f03932ff2", + "apim-request-id" : "b11ce7ce-5a3b-4c88-b749-af92b1818d1b", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"statistics\":{\"charactersCount\":105,\"transactionsCount\":1},\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:48 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForEmptyText.json index 5691e27d5b9f9..9b9962a7fa601 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "253b94c3-2001-483f-ae74-8a8e77104da2", + "x-ms-client-request-id" : "62001a27-af90-46d0-a783-e8e779f60575", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "1", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "f54daa01-4629-4609-8a75-922d021fe601", + "apim-request-id" : "ef42e2b5-92d5-4b8f-bee0-72b52845ed8c", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:54 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:02 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForFaultyText.json index 539012adaf4dd..52cfdad68935b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "075e13d6-363a-4f02-8787-9e7e82f81870", + "x-ms-client-request-id" : "84d3378d-bfde-4190-98a9-9091710afb26", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "62", + "x-envoy-upstream-service-time" : "73", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "e0891644-a177-48ae-baab-bd49b8cb4d88", + "apim-request-id" : "96473f27-f806-4a0c-9bb6-5f742ed20f19", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"redactedText\":\"!@#%%\",\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:56 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:06 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListLanguageHint.json index 5cc2355f1814a..aec32ad6abfaa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b1eb3a7d-af60-4297-ab80-a379fabb8767", + "x-ms-client-request-id" : "9bdae4dc-317a-4f11-bdf2-7513da2920f2", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "149", + "x-envoy-upstream-service-time" : "146", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "d24c438f-1edf-4d09-8dfb-40981a47759c", + "apim-request-id" : "13c71289-8c39-4cd1-b74a-d18f1ebc7e60", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:50 GMT", + "Date" : "Thu, 03 Sep 2020 19:03:55 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListStringWithOptions.json index 5f3ed632f6de4..78ed7fc20bef0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForListStringWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=true", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=true&stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ef3a5d53-b4b2-4611-ab5d-199ec3b89cc6", + "x-ms-client-request-id" : "5cb62422-f5c2-44ad-b6cd-c3c9977a344a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "143", + "x-envoy-upstream-service-time" : "153", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "6dd25191-e91f-4d2b-b022-32e076b427c5", + "apim-request-id" : "012667de-9645-46d3-8647-6dc7b92e73c9", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.38},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"statistics\":{\"charactersCount\":105,\"transactionsCount\":1},\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65},{\"text\":\"111000025\",\"category\":\"Portugal Tax Identification Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:05 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForTextInput.json index a75831e8cba25..93eb90acb36d3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", "Headers" : { "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ecf109ce-c955-4e20-b475-c6144c855de3", + "x-ms-client-request-id" : "fc8901b8-3654-4d50-b899-11b86f5fc212", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "93", + "x-envoy-upstream-service-time" : "113", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "03dcd4e3-9337-41ee-a6cd-cd6d0b5b647a", + "apim-request-id" : "2ab66fd7-cc30-4b1b-b327-be07e6ac221a", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"redactedText\":\"********* employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":0,\"length\":9,\"confidenceScore\":0.4},{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", - "Date" : "Tue, 01 Sep 2020 06:14:55 GMT", + "Date" : "Thu, 03 Sep 2020 19:04:05 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesKoreanNfc.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesKoreanNfc.json new file mode 100644 index 0000000000000..4d3b6641e26b0 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesKoreanNfc.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "30d84360-4db4-4e62-98e6-6622cd1a58c9", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "72", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "29fd0303-ad54-4d78-8995-022b0cdea9fd", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"아가 SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":8,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:08 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesKoreanNfd.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesKoreanNfd.json new file mode 100644 index 0000000000000..a91d552fb09c3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesKoreanNfd.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8d4b2fc-79a0-4eca-8782-52397a4475a5", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "75", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "4c32111b-2f9e-4515-8b35-911ecb84461e", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"아가 SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":8,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:10 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesZalgoText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesZalgoText.json new file mode 100644 index 0000000000000..c6afd58186211 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesZalgoText.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "84a44541-df9b-4081-abd5-53b0585bbede", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "111", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "00a560cd-a062-4250-9adf-a2d8d38c7e02", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ SSN: ***********\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":121,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 17:50:03 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file From df5a8f46f44351fdad364702ec4ef2bad2a04566 Mon Sep 17 00:00:00 2001 From: Annie Liang <64233642+xinlian12@users.noreply.github.com> Date: Thu, 3 Sep 2020 21:47:26 +0000 Subject: [PATCH 077/168] Fix timeout exceptions when using tcnative (#14748) * Fixed RequestTimeoutException when enabled tcnative * remove exclusions of tcnative from the pom files Co-authored-by: Annie Liang --- sdk/cosmos/azure-cosmos-benchmark/pom.xml | 9 ------- sdk/cosmos/azure-cosmos-encryption/pom.xml | 26 ------------------- sdk/cosmos/azure-cosmos/CHANGELOG.md | 3 ++- sdk/cosmos/azure-cosmos/pom.xml | 6 ----- .../rntbd/RntbdClientChannelHandler.java | 5 +++- 5 files changed, 6 insertions(+), 43 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-benchmark/pom.xml b/sdk/cosmos/azure-cosmos-benchmark/pom.xml index 53b0cefff1f9a..807dc9f4e871d 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/azure-cosmos-benchmark/pom.xml @@ -88,15 +88,6 @@ Licensed under the MIT License. 1.5.4 - - org.apache.logging.log4j log4j-api diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml index 9b42a6a5d7ace..5905769907bea 100644 --- a/sdk/cosmos/azure-cosmos-encryption/pom.xml +++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml @@ -50,38 +50,12 @@ Licensed under the MIT License. com.azure azure-security-keyvault-keys 4.3.0-beta.1 - - - - - com.azure - azure-core - - com.azure azure-identity 1.2.0-beta.1 - - - - - com.azure - azure-core - - - - - io.netty - * - - com.fasterxml.jackson.module diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java index 7f060bc4688e3..5774d1f6c69d3 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java @@ -12,6 +12,7 @@ import io.netty.channel.pool.ChannelPool; import io.netty.channel.pool.ChannelPoolHandler; import io.netty.handler.logging.LoggingHandler; +import io.netty.handler.ssl.SslHandler; import io.netty.handler.timeout.IdleStateHandler; import io.netty.util.AttributeKey; import org.slf4j.Logger; @@ -113,7 +114,9 @@ protected void initChannel(final Channel channel) { } pipeline.addFirst( - this.config.sslContext().newHandler(channel.alloc()), + // TODO (DANOBLE) Log an issue with netty + // Initialize sslHandler with jdkCompatibilityMode = true for openssl context. + new SslHandler(this.config.sslContext().newEngine(channel.alloc())), new IdleStateHandler( idleConnectionTimerResolutionInNanos, idleConnectionTimerResolutionInNanos, From 7c4890fd79d895c84449615127ffe3b09c1ce061 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Thu, 3 Sep 2020 14:51:33 -0700 Subject: [PATCH 078/168] Add commanline options to the samples code. (#14785) --- eng/versioning/external_dependencies.txt | 1 + .../azure-digitaltwins-core/pom.xml | 6 + .../DigitalTwinsLifecycleAsyncSample.java | 24 ++-- .../digitaltwins/core/SamplesArguments.java | 115 ++++++++++++++++++ .../digitaltwins/core/TestAssetsHelper.java | 3 - 5 files changed, 133 insertions(+), 16 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesArguments.java diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 89a2d39273675..1a3db7bd607d6 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -161,6 +161,7 @@ io.opentelemetry:opentelemetry-sdk;0.6.0 io.grpc:grpc-context;1.30.2 io.projectreactor:reactor-test;3.3.9.RELEASE junit:junit;4.13 +commons-cli:commons-cli;1.3 org.apache.maven:maven-compat;3.6.2 org.apache.maven:maven-embedder;3.6.2 org.apache.maven.wagon:wagon-http;3.3.4 diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml index 7d174b46bcdd4..faf02a2bfc764 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml +++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml @@ -75,6 +75,12 @@ 5.6.2 test + + commons-cli + commons-cli + 1.3 + test + diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java index fffe45c62005f..7666b611e5b6f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java @@ -3,7 +3,6 @@ package com.azure.digitaltwins.core; -import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; import com.azure.digitaltwins.core.implementation.serialization.BasicRelationship; @@ -43,10 +42,6 @@ * */ public class DigitalTwinsLifecycleAsyncSample { - private static final String tenantId = System.getenv("TENANT_ID"); - private static final String clientId = System.getenv("CLIENT_ID"); - private static final String clientSecret = System.getenv("CLIENT_SECRET"); - private static final String endpoint = System.getenv("DIGITAL_TWINS_ENDPOINT"); private static final int MaxWaitTimeAsyncOperationsInSeconds = 10; @@ -56,7 +51,7 @@ public class DigitalTwinsLifecycleAsyncSample { private static final Path ModelsPath; private static final Path RelationshipsPath; - private static final DigitalTwinsAsyncClient client; + private static DigitalTwinsAsyncClient client; static { try { @@ -68,23 +63,26 @@ public class DigitalTwinsLifecycleAsyncSample { TwinsPath = Paths.get(DtDlDirectoryPath.toString(), "DigitalTwins"); ModelsPath = Paths.get(DtDlDirectoryPath.toString(), "Models"); RelationshipsPath = Paths.get(DtDlDirectoryPath.toString(), "Relationships"); + } + + public static void main(String[] args) throws IOException, InterruptedException { + + SamplesArguments parsedArguments = new SamplesArguments(args); client = new DigitalTwinsClientBuilder() .tokenCredential( new ClientSecretCredentialBuilder() - .tenantId(tenantId) - .clientId(clientId) - .clientSecret(clientSecret) + .tenantId(parsedArguments.getTenantId()) + .clientId(parsedArguments.getClientId()) + .clientSecret(parsedArguments.getClientSecret()) .build() ) - .endpoint(endpoint) + .endpoint(parsedArguments.getDigitalTwinEndpoint()) .httpLogOptions( new HttpLogOptions() - .setLogLevel(HttpLogDetailLevel.NONE)) + .setLogLevel(parsedArguments.getHttpLogDetailLevel())) .buildAsyncClient(); - } - public static void main(String[] args) throws IOException, InterruptedException { // Ensure existing twins with the same name are deleted first deleteTwins(); diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesArguments.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesArguments.java new file mode 100644 index 0000000000000..ebe7fcd03668d --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesArguments.java @@ -0,0 +1,115 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.policy.HttpLogDetailLevel; +import org.apache.commons.cli.*; + +public class SamplesArguments { + + private final String DIGITALTWINS_URL = "DigitalTwinsEndpoint"; + private final String TENANT_ID = "tenantId"; + private final String CLIENT_ID = "clientId"; + private final String CLIENT_SECRET = "clientSecret"; + private final String LOG_DETAIL_LEVEL = "logLevel"; + + private String digitalTwinEndpoint; + private String tenantId; + private String clientId; + private String clientSecret; + private HttpLogDetailLevel httpLogDetailLevel = HttpLogDetailLevel.NONE; + + public SamplesArguments(String[] args) { + + Option endpoint = new Option("d", DIGITALTWINS_URL, true, "DigitalTwins endpoint URL"); + Option tenantId = new Option("t", TENANT_ID, true, "AAD Tenant Id"); + Option clientId = new Option("c", CLIENT_ID, true, "AAD Client Id"); + Option clientSecret = new Option("s", CLIENT_SECRET, true, "AAD Client Secret"); + Option logLevel = new Option("l", LOG_DETAIL_LEVEL, true, "Http logging detail level \n 0 -> NONE \n 1 -> BASIC \n 2 -> HEADERS \n 3 -> BODY \n 4 -> BODY_AND_HEADERS"); + + endpoint.setRequired(true); + tenantId.setRequired(true); + clientId.setRequired(true); + clientSecret.setRequired(true); + logLevel.setRequired(false); + + Options options = new Options() + .addOption(endpoint) + .addOption(tenantId) + .addOption(clientId) + .addOption(clientSecret) + .addOption(logLevel); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd = null; + + try { + cmd = parser.parse(options, args); + } + catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp("java .jar", options); + + System.exit(1); + } + + this.digitalTwinEndpoint = cmd.getOptionValue(DIGITALTWINS_URL); + this.tenantId = cmd.getOptionValue(TENANT_ID); + this.clientId = cmd.getOptionValue(CLIENT_ID); + this.clientSecret = cmd.getOptionValue(CLIENT_SECRET); + + String inputLogLevel = cmd.getOptionValue(LOG_DETAIL_LEVEL); + + // If log level has been specified we will parse it and return the correct enum value. + if (inputLogLevel != null && inputLogLevel.trim().length() > 0) { + try { + int providedLogDetailLevel = Integer.parseInt(inputLogLevel); + + this.httpLogDetailLevel = convertFromInt(providedLogDetailLevel); + } + catch (NumberFormatException e) { + System.out.println("Provided log detail level must be an integer ranging from 0 - 4"); + formatter.printHelp("java .jar", options); + + System.exit(1); + } + } + } + + public String getDigitalTwinEndpoint() { + return this.digitalTwinEndpoint; + } + + public String getTenantId() { + return this.tenantId; + } + + public String getClientId() { + return this.clientId; + } + + public String getClientSecret() { + return this.clientSecret; + } + + public HttpLogDetailLevel getHttpLogDetailLevel() { + return this.httpLogDetailLevel; + } + + private static HttpLogDetailLevel convertFromInt(int input) throws NumberFormatException { + switch (input) + { + case 0: + return HttpLogDetailLevel.NONE; + case 1: + return HttpLogDetailLevel.BASIC; + case 2: + return HttpLogDetailLevel.HEADERS; + case 3: + return HttpLogDetailLevel.BODY; + case 4: + return HttpLogDetailLevel.BODY_AND_HEADERS; + } + + throw new NumberFormatException("Provided log detail level must be an integer ranging from 0 - 4"); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java index 00071081d4795..8beb4af4d182d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java @@ -1,7 +1,5 @@ package com.azure.digitaltwins.core; -import com.azure.core.http.HttpResponse; -import com.azure.core.util.Context; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; import com.azure.digitaltwins.core.util.UpdateOperationUtility; import org.opentest4j.AssertionFailedError; @@ -12,7 +10,6 @@ import java.util.Random; import java.util.Scanner; import java.util.function.Consumer; -import java.util.function.Function; public class TestAssetsHelper { protected static int MaxTries = 10; From 8d99c1163bcc0d421baa30283634c3187dccdd6d Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel Date: Thu, 3 Sep 2020 22:09:33 +0000 Subject: [PATCH 079/168] Adding synchronous WriteLatency benchmark. (#14787) --- .../cosmos/benchmark/AsyncWriteBenchmark.java | 4 +- .../java/com/azure/cosmos/benchmark/Main.java | 5 +++ .../azure/cosmos/benchmark/SyncBenchmark.java | 4 +- .../cosmos/benchmark/SyncWriteBenchmark.java | 45 +++++++++++++++++++ 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/SyncWriteBenchmark.java diff --git a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/AsyncWriteBenchmark.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/AsyncWriteBenchmark.java index 65f0c42f4d6d5..173a761454b23 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/AsyncWriteBenchmark.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/AsyncWriteBenchmark.java @@ -69,13 +69,13 @@ protected void performWorkload(BaseSubscriber baseSubscriber partitionKey, configuration.getDocumentDataFieldCount())); } else { - // more optimized for write as partition ke is already passed as config + // more optimized for write as partition key is already passed as config obs = cosmosAsyncContainer.createItem(BenchmarkHelper.generateDocument(id, dataFieldValue, partitionKey, configuration.getDocumentDataFieldCount()), new PartitionKey(id), - new CosmosItemRequestOptions()); + null); } concurrencyControlSemaphore.acquire(); diff --git a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/Main.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/Main.java index fd9a112594b1d..e3b2affae224f 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/Main.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/Main.java @@ -84,6 +84,11 @@ private static void syncBenchmark(Configuration cfg) throws Exception { benchmark = new SyncReadBenchmark(cfg); break; + case WriteLatency: + case WriteThroughput: + benchmark = new SyncWriteBenchmark(cfg); + break; + default: throw new RuntimeException(cfg.getOperationType() + " is not supported"); } diff --git a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/SyncBenchmark.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/SyncBenchmark.java index d04b35a237bed..39c78d738f377 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/SyncBenchmark.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/SyncBenchmark.java @@ -246,8 +246,8 @@ void run() throws Exception { switch (configuration.getOperationType()) { case ReadLatency: + case WriteLatency: // TODO: support for other operationTypes will be added later -// case WriteLatency: // case QueryInClauseParallel: // case QueryCross: // case QuerySingle: @@ -308,8 +308,8 @@ public T apply(T t, Throwable throwable) { switch (configuration.getOperationType()) { case ReadLatency: + case WriteLatency: // TODO: support for other operation types will be added later -// case WriteLatency: // case QueryInClauseParallel: // case QueryCross: // case QuerySingle: diff --git a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/SyncWriteBenchmark.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/SyncWriteBenchmark.java new file mode 100644 index 0000000000000..700a00505bd64 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/SyncWriteBenchmark.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.benchmark; + +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.PartitionKey; +import org.apache.commons.lang3.RandomStringUtils; + +import java.util.UUID; + +class SyncWriteBenchmark extends SyncBenchmark { + + private final String dataFieldValue; + private final String uuid; + + SyncWriteBenchmark(Configuration cfg) throws Exception { + super(cfg); + + uuid = UUID.randomUUID().toString(); + dataFieldValue = + RandomStringUtils.randomAlphabetic(configuration.getDocumentDataFieldSize()); + } + + @Override + protected CosmosItemResponse performWorkload(long i) throws Exception { + String id = uuid + i; + CosmosItemResponse response; + if (configuration.isDisablePassingPartitionKeyAsOptionOnWrite()) { + // require parsing partition key from the doc + return cosmosContainer.createItem(BenchmarkHelper.generateDocument(id, + dataFieldValue, + partitionKey, + configuration.getDocumentDataFieldCount())); + } + + // more optimized for write as partition key is already passed as config + return cosmosContainer.createItem(BenchmarkHelper.generateDocument(id, + dataFieldValue, + partitionKey, + configuration.getDocumentDataFieldCount()), + new PartitionKey(id), + null); + } +} From 9d87eeae04c7396a7689fc7a7fff33e8c40c0161 Mon Sep 17 00:00:00 2001 From: Brandon Siegel <96068+bsiegel@users.noreply.github.com> Date: Thu, 3 Sep 2020 15:19:39 -0700 Subject: [PATCH 080/168] Add tables live test configuration (#14796) --- sdk/tables/test-resources.json | 103 +++++++++++++++++++++++++++++++++ sdk/tables/tests.yml | 99 +++++++++++++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 sdk/tables/test-resources.json create mode 100644 sdk/tables/tests.yml diff --git a/sdk/tables/test-resources.json b/sdk/tables/test-resources.json new file mode 100644 index 0000000000000..3bf759d1ef6b4 --- /dev/null +++ b/sdk/tables/test-resources.json @@ -0,0 +1,103 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "String" + }, + "endpointType": { + "type": "String" + } + }, + "variables": { + "mgmtApiVersion": "2019-04-01", + "location": "[resourceGroup().location]", + "primaryAccountName": "[concat(parameters('baseName'), 'prim')]", + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + } + }, + "resources": [ + { + "condition": "[equals(parameters('endpointType'),'storage')]", + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('mgmtApiVersion')]", + "name": "[variables('primaryAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": "[variables('networkAcls')]", + "supportsHttpsTrafficOnly": true, + "encryption": "[variables('encryption')]", + "accessTier": "Cool" + } + }, + { + "condition": "[equals(parameters('endpointType'),'cosmos')]", + "type": "Microsoft.DocumentDB/databaseAccounts", + "apiVersion": "2020-04-01", + "name": "[variables('primaryAccountName')]", + "location": "[variables('location')]", + "tags": { + "defaultExperience": "Azure Table", + "hidden-cosmos-mmspecial": "", + "CosmosAccountType": "Non-Production" + }, + "kind": "GlobalDocumentDB", + "properties": { + "publicNetworkAccess": "Enabled", + "enableAutomaticFailover": false, + "enableMultipleWriteLocations": false, + "isVirtualNetworkFilterEnabled": false, + "virtualNetworkRules": [], + "disableKeyBasedMetadataWriteAccess": false, + "enableFreeTier": false, + "enableAnalyticalStorage": false, + "databaseAccountOfferType": "Standard", + "consistencyPolicy": { + "defaultConsistencyLevel": "BoundedStaleness", + "maxIntervalInSeconds": 86400, + "maxStalenessPrefix": 1000000 + }, + "locations": [ + { + "locationName": "[variables('location')]", + "provisioningState": "Succeeded", + "failoverPriority": 0, + "isZoneRedundant": false + } + ], + "capabilities": [ + { + "name": "EnableTable" + } + ], + "ipRules": [] + } + } + ], + "outputs": { + "AZURE_TABLES_CONNECTION_STRING": { + "type": "string", + "value": "[if(equals(parameters('endpointType'), 'storage'), concat('DefaultEndpointsProtocol=https;AccountName=', variables('primaryAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName')), variables('mgmtApiVersion')).keys[0].value, ';EndpointSuffix=core.windows.net/;'), concat('DefaultEndpointsProtocol=https;AccountName=', variables('primaryAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.DocumentDB/databaseAccounts', variables('primaryAccountName')), variables('mgmtApiVersion')).primaryMasterKey, ';EndpointSuffix=cosmos.azure.com:443/;'))]", + } + } +} diff --git a/sdk/tables/tests.yml b/sdk/tables/tests.yml new file mode 100644 index 0000000000000..21d1775c0ed5c --- /dev/null +++ b/sdk/tables/tests.yml @@ -0,0 +1,99 @@ +trigger: none + +jobs: + - template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests.yml + parameters: + ServiceDirectory: tables + Timeout: 60 + MaxParallel: 12 + EnvVars: + AZURE_TEST_MODE: LIVE + Artifacts: + - name: azure-data-tables + groupId: com.azure + safeName: azuretables + Matrix: + Linux - Java 8 Storage (AzureCloud): + OSVmImage: 'ubuntu-18.04' + JavaTestVersion: '1.8' + DisplayName: 'Linux - Java 8 - Storage' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: netty + ArmTemplateParameters: '@{endpointType="storage"}' + macOS - Java 8 Storage (AzureCloud): + OSVmImage: 'macOS-10.15' + JavaTestVersion: '1.8' + DisplayName: 'macOS - Java 8 - Storage' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: okhttp + ArmTemplateParameters: '@{endpointType="storage"}' + Windows - Java 8 Storage (AzureCloud): + OSVmImage: 'windows-2019' + JavaTestVersion: '1.8' + DisplayName: 'Windows - Java 8 - Storage' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: netty + ArmTemplateParameters: '@{endpointType="storage"}' + Linux - Java 11 Storage (AzureCloud): + OSVmImage: 'ubuntu-18.04' + JavaTestVersion: '1.11' + DisplayName: 'Linux - Java 11 - Storage' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: okhttp + ArmTemplateParameters: '@{endpointType="storage"}' + macOS - Java 11 Storage (AzureCloud): + OSVmImage: 'macOS-10.15' + JavaTestVersion: '1.11' + DisplayName: 'macOS - Java 11 - Storage' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: netty + ArmTemplateParameters: '@{endpointType="storage"}' + Windows - Java 11 Storage (AzureCloud): + OSVmImage: 'windows-2019' + JavaTestVersion: '1.11' + DisplayName: 'Windows - Java 11 - Storage' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: okhttp + ArmTemplateParameters: '@{endpointType="storage"}' + Linux - Java 8 CosmosDB (AzureCloud): + OSVmImage: 'ubuntu-18.04' + JavaTestVersion: '1.8' + DisplayName: 'Linux - Java 8 - CosmosDB' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: netty + ArmTemplateParameters: '@{endpointType="cosmos"}' + macOS - Java 8 CosmosDB (AzureCloud): + OSVmImage: 'macOS-10.15' + JavaTestVersion: '1.8' + DisplayName: 'macOS - Java 8 - CosmosDB' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: okhttp + ArmTemplateParameters: '@{endpointType="cosmos"}' + Windows - Java 8 CosmosDB (AzureCloud): + OSVmImage: 'windows-2019' + JavaTestVersion: '1.8' + DisplayName: 'Windows - Java 8 - CosmosDB' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: netty + ArmTemplateParameters: '@{endpointType="cosmos"}' + Linux - Java 11 CosmosDB (AzureCloud): + OSVmImage: 'ubuntu-18.04' + JavaTestVersion: '1.11' + DisplayName: 'Linux - Java 11 - CosmosDB' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: okhttp + ArmTemplateParameters: '@{endpointType="cosmos"}' + macOS - Java 11 CosmosDB (AzureCloud): + OSVmImage: 'macOS-10.15' + JavaTestVersion: '1.11' + DisplayName: 'macOS - Java 11 - CosmosDB' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: netty + ArmTemplateParameters: '@{endpointType="cosmos"}' + Windows - Java 11 CosmosDB (AzureCloud): + OSVmImage: 'windows-2019' + JavaTestVersion: '1.11' + DisplayName: 'Windows - Java 11 - CosmosDB' + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + AZURE_TEST_HTTP_CLIENTS: okhttp + ArmTemplateParameters: '@{endpointType="cosmos"}' From fc161f852351f5bdb45e4e5616c534c15bc11a5d Mon Sep 17 00:00:00 2001 From: Brandon Siegel <96068+bsiegel@users.noreply.github.com> Date: Thu, 3 Sep 2020 15:20:28 -0700 Subject: [PATCH 081/168] Update Tables README (#14698) * Update Tables README --- sdk/tables/azure-data-tables/README.md | 304 +++++++++++++++++- .../src/samples/java/ReadmeSamples.java | 167 ++++++++++ 2 files changed, 460 insertions(+), 11 deletions(-) create mode 100644 sdk/tables/azure-data-tables/src/samples/java/ReadmeSamples.java diff --git a/sdk/tables/azure-data-tables/README.md b/sdk/tables/azure-data-tables/README.md index a60e6c7ab5995..1e5415848b442 100644 --- a/sdk/tables/azure-data-tables/README.md +++ b/sdk/tables/azure-data-tables/README.md @@ -4,15 +4,10 @@ key/attribute store with a schemaless design. Tables storage gives developers fl best parts of Azure cloud. [Source code][source_code] | [Package (Maven)][package] | [API reference documentation][api_documentation] -| [Product documentation][azconfig_docs] | [Samples][samples] +| [Product documentation][product_documentation] | [Samples][samples] ## Getting started -### Prerequisites - -- Java Development Kit (JDK) with version 8 or above -- [Azure Subscription][azure_subscription] - ### Include the Package [//]: # ({x-version-update-start;com.azure:tables:azure-data-tables;current}) @@ -25,17 +20,296 @@ best parts of Azure cloud. ``` [//]: # ({x-version-update-end}) +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] +- An existing Azure storage account or Azure Cosmos DB Table API account + +#### Create a Storage Account +To create a Storage Account you can use the [Azure Portal][storage_account_create_portal] or [Azure CLI][storage_account_create_cli]. + +```bash +az storage account create \ + --resource-group \ + --name \ + --location +``` + +Your storage account URL, subsequently identified as ``, would be formatted as follows +`http(s)://.table.core.windows.net`. + +#### Create a Cosmos DB Table API account +To create a Cosmos DB Table API account you can use the [Azure Portal][cosmosdb_create_portal] or [Azure CLI][cosmosdb_create_cli]. + +```bash +az cosmosdb create \ + --resource-group \ + --name \ + --capabilities EnableTable +``` + +Your Table API account URL, subsequently identified as ``, would be formatted as follows +`http(s)://.table.cosmosdb.azure.com`. + +### Authenticate the client +Every request made to the Table service must be authorized using a connection string, shared key credential, or shared access signature. The samples below demonstrate the usage of these methods. + +Note: Azure Tables doesn't support Azure Active Directory (AAD) authentication. + +#### Connection string +A connection string includes the authentication information required for your application to access data in an Azure table at runtime using Shared Key authorization. See [Authenticate with a connection string](#authenticate-with-a-connection-string) for an example of how to use a connection string with a `TableServiceClient`. + +You can obtain your connection string from the Azure Portal (click **Access keys** under **Settings** in the Portal Storage account blade, or **Connection String** under **Settings** in the Portal Cosmos DB account blade) or using the Azure CLI: + +```bash +# Storage account +az storage account show-connection-string \ + --resource-group \ + --name + +# Cosmos DB Table API account +az cosmosdb list-connection-strings \ + --resource-group \ + --name +``` + +#### Shared Key credential +Shared Key authorization relies on your account access keys and other parameters to produce an encrypted signature string that is passed on the request in the Authorization header. See [Authenticate with a Shared Key credential](#authenticate-with-a-shared-key-credential) for an example of how to use Shared Key authorization with a `TableServiceClient`. + +To use Shared Key authorization you'll need your account name and URL, as well as an account access key. You can obtain your primary access key from the Azure Portal (click **Access keys** under **Settings** in the Portal Storage account blade, or **Connection String** under **Settings** in the Portal Cosmos DB account blade) or using the Azure CLI: + +```bash +# Storage account +az storage account keys list \ + --resource-group \ + --account-name + +# Cosmos DB Table API account +az cosmosdb list-keys \ + --resource-group \ + --name +``` + +#### Shared Access Signature (SAS) +A shared access signature allows administrators to delegate granular access to an Azure table without sharing the access key directly. You can control what resources the client may access, what permissions it has on those resources, and how long the SAS is valid, among other parameters. It relies on your account access keys and other parameters to produce an encrypted signature string that is passed on the request in the query string. See [Authenticate with a Shared Access Signature (SAS) token](#authenticate-with-a-shared-access-signature-sas-token) for an example of how to use shared access signatures with a `TableServiceClient`. + +To use SAS token authorization you'll need your account name and URL, as well as the SAS. You can obtain your SAS from the Azure Portal (click **Shared access signature** under **Settings** in the Portal Storage account blade) or using the Azure CLI: + +```bash +# Account-level SAS +az storage account generate-sas \ + --account-name \ + --services t \ + --resource-types \ + --permissions \ + --expiry + +# Table-level SAS +az storage table generate-sas \ + --name +``` + ## Key concepts +- **TableServiceClient** - A `TableServiceClient` is a client object that enables you to interact with the Table Service in order to create, list, and delete tables. +- **TableClient** - A `TableClient` is a client object that enables you to interact with a specific table in order to create, update, list, and delete entities within it. +- **Table** - A table is a collection of entities. Tables don't enforce a schema on entities, which means a single table can contain entities that have different sets of properties. +- **Entity** - An entity is a set of properties, similar to a database row. An entity in Azure Storage can be up to 1MB in size. An entity in Azure Cosmos DB can be up to 2MB in size. An entity has a partition key and a row key which together uniquely identify the entity within the table. +- **Properties** - A property is a name-value pair. Each entity can include up to 252 properties to store data. Each entity also has three system properties that specify a partition key, a row key, and a timestamp. +- **Partition Key** - An entity's partition key identifies the partition within the table to which the entity belongs. Entities with the same partition key can be queried more quickly, and inserted/updated in atomic operations. +- **Row Key** - An entity's row key is its unique identifier within a partition. + +Common uses of the Table service include: + +- Storing TBs of structured data capable of serving web scale applications +- Storing datasets that don't require complex joins, foreign keys, or stored procedures and can be de-normalized for fast access +- Quickly querying data using a clustered index +- Accessing data using the OData protocol + ## Examples -Use the client library for Tables to: -- manages tables -- edit and access table contents + +- [Authenticate a client](#authenticate-a-client) + - [Authenticate with a connection string](#authenticate-with-a-connection-string) + - [Authenticate with a Shared Key](#authenticate-with-a-shared-key) + - [Authenticate with a Shared Access Signature (SAS)](#authenticate-with-a-shared-access-signature-sas) +- [Create, List, and Delete Azure tables](#create-list-and-delete-azure-tables) + - [Construct a `TableServiceClient`](#construct-a-tableserviceclient) + - [Create a table](#create-a-table) + - [List tables](#list-tables) + - [Delete a table](#delete-a-table) +- [Create, List, and Delete table entities](##create-list-and-delete-table-entities) + - [Construct a `TableClient`](#construct-a-tableclient) + - [Create an entity](#create-an-entity) + - [List entities](#list-entities) + - [Delete an entity](#delete-an-entity) + +### Authenticate a client + +#### Authenticate with a connection string +To use a connection string to authorize your client, call the builder's `connectionString` method with your connection string. + + +```java +TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .connectionString("") + .buildClient(); +``` + +#### Authenticate with a Shared Key +To use a Shared Key to authorize your client, create an instance of `TablesSharedKeyCredential` with your account name and access key. Call the builder's `endpoint` method with your account URL and the `credential` method with the `TablesSharedKeyCredential` object you created. + + +```java +TablesSharedKeyCredential credential = new TablesSharedKeyCredential("", ""); +TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .endpoint("") + .credential(credential) + .buildClient(); +``` + +#### Authenticate with a Shared Access Signature (SAS) +To use a SAS to authorize your client, call the builder's `endpoint` method with your account URL and the `sasToken` method with your SAS. + + +```java +TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .endpoint("") + .sasToken("") + .buildClient(); +``` + +### Create, List, and Delete Azure tables + +#### Construct a `TableServiceClient` +Construct a `TableServiceClient` by creating an instance of `TableServiceClientBuilder` and then calling the builder's `buildClient` or `buildAsyncClient` methods. + + +```java +TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .connectionString("") // or use any of the other authentication methods + .buildClient(); +``` + +#### Create a table +Create a table by calling the `TableServiceClient`'s `createTable` method. An exception will be thrown if a table with the provided name exists. + + +```java +tableServiceClient.createTable(tableName); +``` + +Alternatively, you can call the `createTableIfNotExists` method which will create the table only if no such table exists, and does not throw an exception. + + +```java +tableServiceClient.createTableIfNotExists(tableName); +``` + +#### List tables +List or query the set of existing tables by calling the `TableServiceClient`'s `listTables` method, optionally passing in a `ListTablesOptions` instance to filter or limit the query results. See [Supported Query Options][query_options] for details about supported query options. + + +```java +ListTablesOptions options = new ListTablesOptions() + .setFilter(String.format("TableName eq '%s'", tableName)); + +for (TableItem tableItem : tableServiceClient.listTables(options)) { + System.out.println(tableItem.getName()); +} +``` + +#### Delete a table +Delete a table by calling the `TableServiceClient`'s `deleteTable` method. An exception will be thrown if no table with the provided name exists. + + +```java +tableServiceClient.deleteTable(tableName); +``` + +### Create, List, and Delete table entities + +#### Construct a `TableClient` +Construct a `TableClient` by creating an instance of `TableClientBuilder`, calling the builder's `tableName` method with the name of the table, and then calling its `buildClient` or `buildAsyncClient` methods. + + +```java +TableClient tableClient = new TableClientBuilder() + .connectionString("") // or use any of the other authentication methods + .tableName(tableName) + .buildClient(); +``` + +Alternatively, a `TableClient` can be retrieved from an existing `TableServiceClient` by calling its `getTableClient` method. + + +```java +TableClient tableClient = tableServiceClient.getTableClient(tableName); +``` + +#### Create an entity +Create a new `TableEntity` instance, providing the partition key and row key of the entity to create, optionally adding properties to the created object. Then pass the object to the `TableClient`'s `createEntity` method. An exception will be thrown if an entity with the provided partition key and row key exists within the table. + + +```java +TableEntity entity = new TableEntity(partitionKey, rowKey) + .addProperty("Product", "Marker Set") + .addProperty("Price", 5.00) + .addProperty("Quantity", 21); + +tableClient.createEntity(entity); +``` + +#### List entities +List or query the set of entities within the table by calling the `TableClient`'s `listEntities` method, optionally passing in a `ListEntitiesOptions` instance to filter, select, or limit the query results. See [Supported Query Options][query_options] for details about supported query options. + + +```java +ListEntitiesOptions options = new ListEntitiesOptions() + .setFilter(String.format("PartitionKey eq '%s'", partitionKey)) + .setSelect("Product, Price"); + +for (TableEntity entity : tableClient.listEntities(options)) { + Map properties = entity.getProperties(); + System.out.println(String.format("%s: %.2f", properties.get("Product"), properties.get("Price"))); +} +``` + +#### Delete an entity +Delete an entity by calling the `TableClient`'s `deleteEntity` method. An exception will be thrown if no entity with the provided partition key and row key exists. + + +```java +tableClient.deleteEntity(partitionKey, rowKey); +``` ## Troubleshooting +### General +When you interact with Tables service using the Azure Tables library for Java, errors returned by the service correspond to the same HTTP status codes returned for [REST API][rest_api] requests. + +For example, if you try to create a table that already exists, a `409` error is returned, indicating "Conflict". + + +```java +// Create the table if it doesn't already exist. +tableServiceClient.createTableIfNotExists(tableName); + +// Now attempt to create the same table unconditionally. +try { + tableServiceClient.createTable(tableName); +} catch (TableStorageException e) { + System.out.println(e.getStatusCode()); // 409 +} +``` + +### Logging +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to the desired verbosity. See [LogLevel][log_level] for a description of available log levels. + ## Next steps +Get started with our [Table samples][samples]. + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. @@ -51,9 +325,17 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [coc_contact]: mailto:opencode@microsoft.com [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ [coc]: https://opensource.microsoft.com/codeofconduct/ +[cosmosdb_create_cli]: https://docs.microsoft.com/azure/cosmos-db/scripts/cli/table/create +[cosmosdb_create_portal]: https://docs.microsoft.com/azure/cosmos-db/create-table-java#create-a-database-account +[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[log_level]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core/src/main/java/com/azure/core/util/logging/LogLevel.java [package]: https://search.maven.org/artifact/com.azure/azure-data-tables -[samples_readme]: src/samples/README.md +[product_documentation]: https://docs.microsoft.com/azure/cosmos-db/table-storage-overview +[query_options]: https://docs.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-query-options +[rest_api]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api [samples]: src/samples/java/ [source_code]: src +[storage_account_create_cli]: https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-cli +[storage_account_create_portal]: https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Ftables%2Fazure-data-tables%2FREADME.png) \ No newline at end of file +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Ftables%2Fazure-data-tables%2FREADME.png) diff --git a/sdk/tables/azure-data-tables/src/samples/java/ReadmeSamples.java b/sdk/tables/azure-data-tables/src/samples/java/ReadmeSamples.java new file mode 100644 index 0000000000000..a2128783dcb1e --- /dev/null +++ b/sdk/tables/azure-data-tables/src/samples/java/ReadmeSamples.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.data.tables; + +import com.azure.data.tables.models.ListEntitiesOptions; +import com.azure.data.tables.models.ListTablesOptions; +import com.azure.data.tables.models.TableEntity; +import com.azure.data.tables.models.TableItem; +import com.azure.data.tables.models.TableStorageException; + +import java.util.Map; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS ARE USED TO EXTRACT + * APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING LINE NUMBERS OF EXISTING CODE + * SAMPLES. + * + * Class containing code snippets that will be injected to README.md. + */ +public class ReadmeSamples { + private final String partitionKey = ""; + private final String rowKey = ""; + private final String tableName = ""; + private final TableServiceClient tableServiceClient = new TableServiceClient(null); + private final TableClient tableClient = new TableClient(null); + private final TableEntity entity = new TableEntity(partitionKey, rowKey); + + /** + * Code sample for authenticating with a connection string. + */ + public void authenticateWithConnectionString() { + TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .connectionString("") + .buildClient(); + } + + /** + * Code sample for authenticating with a shared key. + */ + public void authenticateWithSharedKey() { + TablesSharedKeyCredential credential = new TablesSharedKeyCredential("", ""); + TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .endpoint("") + .credential(credential) + .buildClient(); + } + + /** + * Code sample for authenticating with a SAS. + */ + public void authenticateWithSAS() { + TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .endpoint("") + .sasToken("") + .buildClient(); + } + + /** + * Code sample for constructing a service client. + */ + public void constructServiceClient() { + TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .connectionString("") // or use any of the other authentication methods + .buildClient(); + } + + /** + * Code sample for creating a table. + * @throws TableStorageException if the table exists. + */ + public void createTable() { + tableServiceClient.createTable(tableName); + } + + /** + * Code sample for creating a table if it doesn't exist. + */ + public void createTableIfNotExists() { + tableServiceClient.createTableIfNotExists(tableName); + } + + /** + * Code sample for listing tables. + */ + public void listTables() { + ListTablesOptions options = new ListTablesOptions() + .setFilter(String.format("TableName eq '%s'", tableName)); + + for (TableItem tableItem : tableServiceClient.listTables(options)) { + System.out.println(tableItem.getName()); + } + } + + /** + * Code sample for deleting a table. + */ + public void deleteTable() { + tableServiceClient.deleteTable(tableName); + } + + /** + * Code sample for constructing a table client. + */ + public void constructTableClient() { + TableClient tableClient = new TableClientBuilder() + .connectionString("") // or use any of the other authentication methods + .tableName(tableName) + .buildClient(); + } + + /** + * Code sample for retrieving a table client from a service client. + */ + public void retrieveTableClient() { + TableClient tableClient = tableServiceClient.getTableClient(tableName); + } + + /** + * Code sample for creating an entity. + * @throws TableStorageException if the entity exists. + */ + public void createEntity() { + TableEntity entity = new TableEntity(partitionKey, rowKey) + .addProperty("Product", "Marker Set") + .addProperty("Price", 5.00) + .addProperty("Quantity", 21); + + tableClient.createEntity(entity); + } + + /** + * Code sample for listing entities. + */ + public void listEntities() { + ListEntitiesOptions options = new ListEntitiesOptions() + .setFilter(String.format("PartitionKey eq '%s'", partitionKey)) + .setSelect("Product, Price"); + + for (TableEntity entity : tableClient.listEntities(options)) { + Map properties = entity.getProperties(); + System.out.println(String.format("%s: %.2f", properties.get("Product"), properties.get("Price"))); + } + } + + /** + * Code sample for deleting an entity. + */ + public void deleteEntity() { + tableClient.deleteEntity(partitionKey, rowKey); + } + + /** + * Code sample for accessing information about an error. + */ + public void accessErrorInfo() { + // Create the table if it doesn't already exist. + tableServiceClient.createTableIfNotExists(tableName); + + // Now attempt to create the same table unconditionally. + try { + tableServiceClient.createTable(tableName); + } catch (TableStorageException e) { + System.out.println(e.getStatusCode()); // 409 + } + } +} From 90bbd5f03d9ee0874cee8c359347f2b8914e2462 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Thu, 3 Sep 2020 15:23:51 -0700 Subject: [PATCH 082/168] [TA] Update samples and readme (#14793) * update samples and readme * remove credential name --- .../azure-ai-textanalytics/README.md | 37 ++++++++++--------- .../azure/ai/textanalytics/ReadmeSamples.java | 5 ++- .../RecognizeLinkedEntities.java | 5 ++- .../RecognizeLinkedEntitiesAsync.java | 5 ++- .../textanalytics/RecognizePiiEntities.java | 5 ++- .../RecognizePiiEntitiesAsync.java | 9 +++-- ...alyticsAsyncClientJavaDocCodeSnippets.java | 37 ++++++++++++------- ...extAnalyticsClientJavaDocCodeSnippets.java | 29 ++++++++++----- ...RecognizeLinkedEntitiesBatchDocuments.java | 6 ++- ...nizeLinkedEntitiesBatchDocumentsAsync.java | 8 ++-- ...izeLinkedEntitiesBatchStringDocuments.java | 10 +++-- ...nkedEntitiesBatchStringDocumentsAsync.java | 9 +++-- .../RecognizePiiEntitiesBatchDocuments.java | 5 ++- ...cognizePiiEntitiesBatchDocumentsAsync.java | 5 ++- ...ognizePiiEntitiesBatchStringDocuments.java | 5 ++- ...ePiiEntitiesBatchStringDocumentsAsync.java | 9 +++-- 16 files changed, 123 insertions(+), 66 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 57ac922e00171..5a0626e301998 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -86,7 +86,7 @@ az cognitiveservices account keys list --resource-group + ```java TextAnalyticsClient textAnalyticsClient = new TextAnalyticsClientBuilder() .credential(new AzureKeyCredential("{key}")) @@ -95,7 +95,7 @@ TextAnalyticsClient textAnalyticsClient = new TextAnalyticsClientBuilder() ``` The Azure Text Analytics client library provides a way to **rotate the existing key**. - + ```java AzureKeyCredential credential = new AzureKeyCredential("{key}"); TextAnalyticsClient textAnalyticsClient = new TextAnalyticsClientBuilder() @@ -133,7 +133,7 @@ Authorization is easiest using [DefaultAzureCredential][wiki_identity]. It finds running environment. For more information about using Azure Active Directory authorization with Text Analytics, please refer to [the associated documentation][aad_authorization]. - + ```java TokenCredential defaultCredential = new DefaultAzureCredentialBuilder().build(); TextAnalyticsAsyncClient textAnalyticsClient = new TextAnalyticsClientBuilder() @@ -194,14 +194,14 @@ The following sections provide several code snippets covering some of the most c Text analytics support both synchronous and asynchronous client creation by using `TextAnalyticsClientBuilder`, - + ``` java TextAnalyticsClient textAnalyticsClient = new TextAnalyticsClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint("{endpoint}") .buildClient(); ``` - + ``` java TextAnalyticsAsyncClient textAnalyticsClient = new TextAnalyticsClientBuilder() .credential(new AzureKeyCredential("{key}")) @@ -213,7 +213,7 @@ TextAnalyticsAsyncClient textAnalyticsClient = new TextAnalyticsClientBuilder() Run a Text Analytics predictive model to identify the positive, negative, neutral or mixed sentiment contained in the provided document or batch of documents. - + ```java String document = "The hotel was dark and unclean. I like microsoft."; DocumentSentiment documentSentiment = textAnalyticsClient.analyzeSentiment(document); @@ -232,7 +232,7 @@ Please refer to the service documentation for a conceptual discussion of [sentim ### Detect language Run a Text Analytics predictive model to determine the language that the provided document or batch of documents are written in. - + ```java String document = "Bonjour tout le monde"; DetectedLanguage detectedLanguage = textAnalyticsClient.detectLanguage(document); @@ -245,7 +245,7 @@ Please refer to the service documentation for a conceptual discussion of [langua ### Extract key phrases Run a model to identify a collection of significant phrases found in the provided document or batch of documents. - + ```java String document = "My cat might need to see a veterinarian."; System.out.println("Extracted phrases:"); @@ -259,7 +259,7 @@ Run a predictive model to identify a collection of named entities in the provide categorize those entities into categories such as person, location, or organization. For more information on available categories, see [Text Analytics Named Entity Categories][named_entities_categories]. - + ```java String document = "Satya Nadella is the CEO of Microsoft"; textAnalyticsClient.recognizeEntities(document).forEach(entity -> @@ -275,13 +275,16 @@ document. It recognizes and categorizes PII entities in its input text, such as Social Security Numbers, bank account information, credit card numbers, and more. This endpoint is only supported for API versions v3.1-preview.1 and above. - + ```java -String document = "My SSN is 859-98-0987"; -textAnalyticsClient.recognizePiiEntities(document).forEach(entity -> System.out.printf( - "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s," - + " confidence score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + String document = "My SSN is 859-98-0987"; + PiiEntityCollection piiEntityCollection = textAnalyticsClient.recognizePiiEntities(document); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( + "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s," + + " confidence score: %f.%n", + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); +} ``` For samples on using the production recommended option `RecognizePiiEntitiesBatch` see [here][recognize_pii_entities_sample]. @@ -291,7 +294,7 @@ Please refer to the service documentation for [supported PII entity types][pii_e Run a predictive model to identify a collection of entities found in the provided document or batch of documents, and include information linking the entities to their corresponding entries in a well-known knowledge base. - + ```java String document = "Old Faithful is a geyser at Yellowstone Park."; @@ -315,7 +318,7 @@ Text Analytics clients raise exceptions. For example, if you try to detect the l document IDs, `400` error is return that indicating bad request. In the following code snippet, the error is handled gracefully by catching the exception and display the additional information about the error. - + ```java List documents = Arrays.asList( new DetectLanguageInput("1", "This is written in English.", "us"), diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/ReadmeSamples.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/ReadmeSamples.java index 0dc438492e3d8..ec4818124ca9b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/ReadmeSamples.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/ReadmeSamples.java @@ -6,6 +6,7 @@ import com.azure.ai.textanalytics.models.DetectLanguageInput; import com.azure.ai.textanalytics.models.DetectedLanguage; import com.azure.ai.textanalytics.models.DocumentSentiment; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.credential.TokenCredential; import com.azure.core.exception.HttpResponseException; @@ -156,7 +157,9 @@ public void extractKeyPhrases() { */ public void recognizePiiEntity() { String document = "My SSN is 859-98-0987"; - textAnalyticsClient.recognizePiiEntities(document).forEach(entity -> System.out.printf( + PiiEntityCollection piiEntityCollection = textAnalyticsClient.recognizePiiEntities(document); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s," + " confidence score: %f.%n", entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntities.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntities.java index 382b0bf44fd67..0bded73e5eff6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntities.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntities.java @@ -26,9 +26,10 @@ public static void main(String[] args) { client.recognizeLinkedEntities(document).forEach(linkedEntity -> { System.out.println("Linked Entities:"); - System.out.printf("Name: %s, entity ID in data source: %s, URL: %s, data source: %s.%n", + System.out.printf("Name: %s, entity ID in data source: %s, URL: %s, data source: %s," + + " Bing Entity Search API ID: %s.%n", linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), - linkedEntity.getDataSource()); + linkedEntity.getDataSource(), linkedEntity.getBingEntitySearchApiId()); linkedEntity.getMatches().forEach(entityMatch -> System.out.printf( "Matched entity: %s, confidence score: %f.%n", entityMatch.getText(), entityMatch.getConfidenceScore())); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntitiesAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntitiesAsync.java index 4365a11684c4e..6142ebaa41615 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntitiesAsync.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizeLinkedEntitiesAsync.java @@ -29,9 +29,10 @@ public static void main(String[] args) { client.recognizeLinkedEntities(document).subscribe( linkedEntityCollection -> linkedEntityCollection.forEach(linkedEntity -> { System.out.println("Linked Entities:"); - System.out.printf("Name: %s, entity ID in data source: %s, URL: %s, data source: %s.%n", + System.out.printf("Name: %s, entity ID in data source: %s, URL: %s, data source: %s, " + + "Bing Entity Search API ID: %s.%n", linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), - linkedEntity.getDataSource()); + linkedEntity.getDataSource(), linkedEntity.getBingEntitySearchApiId()); linkedEntity.getMatches().forEach(entityMatch -> System.out.printf( "Matched entity: %s, confidence score: %f.%n", entityMatch.getText(), entityMatch.getConfidenceScore())); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntities.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntities.java index 9f53a36551c73..8c6a48cdc3a13 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntities.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntities.java @@ -4,6 +4,7 @@ package com.azure.ai.textanalytics; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.core.credential.AzureKeyCredential; /** @@ -26,7 +27,9 @@ public static void main(String[] args) { // The document that needs be analyzed. String document = "My SSN is 859-98-0987"; - client.recognizePiiEntities(document).forEach(entity -> System.out.printf( + PiiEntityCollection piiEntityCollection = client.recognizePiiEntities(document); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personal Identifiable Information entity: %s, entity category: %s, entity sub-category: %s, score: %f.%n", entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntitiesAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntitiesAsync.java index 379acc5cded65..ac3a9ce7bbb7e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntitiesAsync.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/RecognizePiiEntitiesAsync.java @@ -27,9 +27,12 @@ public static void main(String[] args) { String document = "My SSN is 859-98-0987"; client.recognizePiiEntities(document).subscribe( - entityCollection -> entityCollection.forEach(entity -> System.out.printf( - "Recognized Personal Identifiable Information entity: %s, entity category: %s, entity sub-category: %s, score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())), + entityCollection -> { + System.out.printf("Redacted Text: %s%n", entityCollection.getRedactedText()); + entityCollection.forEach(entity -> System.out.printf( + "Recognized Personal Identifiable Information entity: %s, entity category: %s, entity sub-category: %s, score: %f.%n", + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + }, error -> System.err.println("There was an error recognizing PII entities of the text." + error), () -> System.out.println("Entities recognized.") ); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java index 26f5faa0fa561..c5ee6138c9f45 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java @@ -11,6 +11,7 @@ import com.azure.ai.textanalytics.models.DocumentSentiment; import com.azure.ai.textanalytics.models.ExtractKeyPhraseResult; import com.azure.ai.textanalytics.models.OpinionSentiment; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; @@ -246,11 +247,13 @@ public void recognizeBatchEntitiesMaxOverload() { public void recognizePiiEntities() { // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntities#string String document = "My SSN is 859-98-0987"; - textAnalyticsAsyncClient.recognizePiiEntities(document).subscribe(piiEntityCollection -> + textAnalyticsAsyncClient.recognizePiiEntities(document).subscribe(piiEntityCollection -> { + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s," + " entity subcategory: %s, confidence score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore()))); + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + }); // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntities#string } @@ -258,14 +261,16 @@ public void recognizePiiEntities() { * Code snippet for {@link TextAnalyticsAsyncClient#recognizePiiEntities(String, String)} */ public void recognizePiiEntitiesWithLanguage() { - // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntities#string-string String document = "My SSN is 859-98-0987"; textAnalyticsAsyncClient.recognizePiiEntities(document, "en") - .subscribe(piiEntityCollection -> piiEntityCollection.forEach(entity -> System.out.printf( - "Recognized Personally Identifiable Information entity: %s, entity category: %s," - + " entity subcategory: %s, confidence score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore()))); + .subscribe(piiEntityCollection -> { + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( + "Recognized Personally Identifiable Information entity: %s, entity category: %s," + + " entity subcategory: %s, confidence score: %f.%n", + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + }); // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntities#string-string } @@ -290,11 +295,14 @@ public void recognizePiiEntitiesStringListWithOptions() { System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n", batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); - piiEntitiesResults.forEach(recognizePiiEntitiesResult -> - recognizePiiEntitiesResult.getEntities().forEach(entity -> System.out.printf( + piiEntitiesResults.forEach(recognizePiiEntitiesResult -> { + PiiEntityCollection piiEntityCollection = recognizePiiEntitiesResult.getEntities(); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s," + " entity subcategory: %s, confidence score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore()))); + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + }); }); // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-String-TextAnalyticsRequestOptions } @@ -320,11 +328,14 @@ public void recognizeBatchPiiEntitiesMaxOverload() { System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n", batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); - piiEntitiesResults.forEach(recognizePiiEntitiesResult -> - recognizePiiEntitiesResult.getEntities().forEach(entity -> System.out.printf( + piiEntitiesResults.forEach(recognizePiiEntitiesResult -> { + PiiEntityCollection piiEntityCollection = recognizePiiEntitiesResult.getEntities(); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s," + " entity subcategory: %s, confidence score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore()))); + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + }); }); // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-TextAnalyticsRequestOptions } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java index 7a004a6abe9c2..58ddf611b1d3e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java @@ -12,6 +12,7 @@ import com.azure.ai.textanalytics.models.DocumentSentiment; import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.PiiEntity; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; @@ -251,7 +252,9 @@ public void recognizeBatchEntitiesMaxOverload() { */ public void recognizePiiEntities() { // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntities#String - for (PiiEntity entity : textAnalyticsClient.recognizePiiEntities("My SSN is 859-98-0987")) { + PiiEntityCollection piiEntityCollection = textAnalyticsClient.recognizePiiEntities("My SSN is 859-98-0987"); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + for (PiiEntity entity : piiEntityCollection) { System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s," + " entity subcategory: %s, confidence score: %f.%n", @@ -265,8 +268,10 @@ public void recognizePiiEntities() { */ public void recognizePiiEntitiesWithLanguage() { // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntities#String-String - textAnalyticsClient.recognizePiiEntities("My SSN is 859-98-0987", "en") - .forEach(entity -> System.out.printf( + PiiEntityCollection piiEntityCollection = textAnalyticsClient.recognizePiiEntities( + "My SSN is 859-98-0987", "en"); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s," + " entity subcategory: %s, confidence score: %f.%n", entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); @@ -291,11 +296,14 @@ public void recognizePiiEntitiesStringListWithOptions() { System.out.printf("A batch of documents statistics, transaction count: %s, valid document count: %s.%n", batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); - resultCollection.forEach(recognizePiiEntitiesResult -> - recognizePiiEntitiesResult.getEntities().forEach(entity -> System.out.printf( + resultCollection.forEach(recognizePiiEntitiesResult -> { + PiiEntityCollection piiEntityCollection = recognizePiiEntitiesResult.getEntities(); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s," + " entity subcategory: %s, confidence score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore()))); + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + }); // END: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-String-TextAnalyticsRequestOptions } @@ -320,11 +328,14 @@ public void recognizeBatchPiiEntitiesMaxOverload() { System.out.printf("A batch of documents statistics, transaction count: %s, valid document count: %s.%n", batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount()); - resultCollection.forEach(recognizePiiEntitiesResult -> - recognizePiiEntitiesResult.getEntities().forEach(entity -> System.out.printf( + resultCollection.forEach(recognizePiiEntitiesResult -> { + PiiEntityCollection piiEntityCollection = recognizePiiEntitiesResult.getEntities(); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s," + " entity subcategory: %s, confidence score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore()))); + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + }); // END: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-TextAnalyticsRequestOptions-Context } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocuments.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocuments.java index 7e42e74511e7f..b02e3875b2855 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocuments.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocuments.java @@ -69,8 +69,10 @@ public static void main(String[] args) { // Valid document entitiesResult.getEntities().forEach(linkedEntity -> { System.out.println("Linked Entities:"); - System.out.printf("\tName: %s, entity ID in data source: %s, URL: %s, data source: %s.%n", - linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), linkedEntity.getDataSource()); + System.out.printf("\tName: %s, entity ID in data source: %s, URL: %s, data source: %s," + + " Bing Entity Search API ID: %s.%n", + linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), + linkedEntity.getDataSource(), linkedEntity.getBingEntitySearchApiId()); linkedEntity.getMatches().forEach(entityMatch -> System.out.printf( "\tMatched entity: %s, confidence score: %f.%n", entityMatch.getText(), entityMatch.getConfidenceScore())); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocumentsAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocumentsAsync.java index b7766e442b850..b99a126e4898f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocumentsAsync.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchDocumentsAsync.java @@ -6,10 +6,10 @@ import com.azure.ai.textanalytics.TextAnalyticsAsyncClient; import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; import com.azure.ai.textanalytics.models.RecognizeLinkedEntitiesResult; -import com.azure.ai.textanalytics.util.RecognizeLinkedEntitiesResultCollection; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; import com.azure.ai.textanalytics.models.TextDocumentInput; +import com.azure.ai.textanalytics.util.RecognizeLinkedEntitiesResultCollection; import com.azure.core.credential.AzureKeyCredential; import java.util.Arrays; @@ -68,8 +68,10 @@ public static void main(String[] args) { // Valid document entitiesResult.getEntities().forEach(linkedEntity -> { System.out.println("Linked Entities:"); - System.out.printf("\tName: %s, entity ID in data source: %s, URL: %s, data source: %s.%n", - linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), linkedEntity.getDataSource()); + System.out.printf("\tName: %s, entity ID in data source: %s, URL: %s, data source: %s," + + " Bing Entity Search API ID: %s.%n", + linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), + linkedEntity.getDataSource(), linkedEntity.getBingEntitySearchApiId()); linkedEntity.getMatches().forEach(entityMatch -> System.out.printf( "\tMatched entity: %s, confidence score: %f.%n", entityMatch.getText(), entityMatch.getConfidenceScore())); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocuments.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocuments.java index 3ec69a623e6bc..2d0d17db7ce26 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocuments.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocuments.java @@ -60,11 +60,13 @@ public static void main(String[] args) { System.out.printf("Cannot recognize linked entities. Error: %s%n", entitiesResult.getError().getMessage()); } else { // Valid document - entitiesResult.getEntities().forEach(entity -> { + entitiesResult.getEntities().forEach(linkedEntity -> { System.out.println("Linked Entities:"); - System.out.printf("\tName: %s, entity ID in data source: %s, URL: %s, data source: %s.%n", - entity.getName(), entity.getDataSourceEntityId(), entity.getUrl(), entity.getDataSource()); - entity.getMatches().forEach(entityMatch -> System.out.printf( + System.out.printf("\tName: %s, entity ID in data source: %s, URL: %s, data source: %s," + + " Bing Entity Search API ID: %s.%n", + linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), + linkedEntity.getDataSource(), linkedEntity.getBingEntitySearchApiId()); + linkedEntity.getMatches().forEach(entityMatch -> System.out.printf( "\tMatched entity: %s, confidence score: %f.%n", entityMatch.getText(), entityMatch.getConfidenceScore())); }); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocumentsAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocumentsAsync.java index 1bb07827b8244..081b7a20d5204 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocumentsAsync.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizeLinkedEntitiesBatchStringDocumentsAsync.java @@ -62,10 +62,13 @@ public static void main(String[] args) { // Valid document entitiesResult.getEntities().forEach(linkedEntity -> { System.out.println("Linked Entities:"); - System.out.printf("\tName: %s, entity ID in data source: %s, URL: %s, data source: %s.%n", - linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), linkedEntity.getDataSource()); + System.out.printf("\tName: %s, entity ID in data source: %s, URL: %s, data source: %s," + + " Bing Entity Search API ID: %s.%n", + linkedEntity.getName(), linkedEntity.getDataSourceEntityId(), linkedEntity.getUrl(), + linkedEntity.getDataSource(), linkedEntity.getBingEntitySearchApiId()); linkedEntity.getMatches().forEach(entityMatch -> System.out.printf( - "\tMatched entity: %s, confidence score: %f.%n", entityMatch.getText(), entityMatch.getConfidenceScore())); + "\tMatched entity: %s, confidence score: %f.%n", + entityMatch.getText(), entityMatch.getConfidenceScore())); }); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java index bffca948e2a62..a3e7512ec877d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java @@ -5,6 +5,7 @@ import com.azure.ai.textanalytics.TextAnalyticsClient; import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; @@ -70,7 +71,9 @@ public static void main(String[] args) { System.out.printf("Cannot recognize Personally Identifiable Information entities. Error: %s%n", entitiesResult.getError().getMessage()); } else { // Valid document - entitiesResult.getEntities().forEach(entity -> System.out.printf( + PiiEntityCollection piiEntityCollection = entitiesResult.getEntities(); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s, offset: %s, length: %s, confidence score: %f.%n", entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getOffset(), entity.getLength(), entity.getConfidenceScore())); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java index 2776cdb079548..867166b0d4670 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java @@ -5,6 +5,7 @@ import com.azure.ai.textanalytics.TextAnalyticsAsyncClient; import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; @@ -67,7 +68,9 @@ public static void main(String[] args) { System.out.printf("Cannot recognize Personally Identifiable Information entities. Error: %s%n", entitiesResult.getError().getMessage()); } else { // Valid document - entitiesResult.getEntities().forEach(entity -> System.out.printf( + PiiEntityCollection piiEntityCollection = entitiesResult.getEntities(); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s, offset: %s, length: %s, confidence score: %f.%n", entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getOffset(), entity.getLength(), entity.getConfidenceScore())); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java index 8a47516cce996..8df44607f383a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java @@ -5,6 +5,7 @@ import com.azure.ai.textanalytics.TextAnalyticsClient; import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; @@ -62,7 +63,9 @@ public static void main(String[] args) { System.out.printf("Cannot recognize Personally Identifiable Information entities. Error: %s%n", entitiesResult.getError().getMessage()); } else { // Valid document - entitiesResult.getEntities().forEach(entity -> System.out.printf( + PiiEntityCollection piiEntityCollection = entitiesResult.getEntities(); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s, offset: %s, length: %s, confidence score: %f.%n", entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getOffset(), entity.getLength(), entity.getConfidenceScore())); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocumentsAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocumentsAsync.java index 0ec3777d1afff..73e621ef14515 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocumentsAsync.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocumentsAsync.java @@ -5,6 +5,7 @@ import com.azure.ai.textanalytics.TextAnalyticsAsyncClient; import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; +import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; @@ -60,9 +61,11 @@ public static void main(String[] args) { System.out.printf("Cannot recognize Personally Identifiable Information entities. Error: %s%n", entitiesResult.getError().getMessage()); } else { // Valid document - entitiesResult.getEntities().forEach(entity -> System.out.printf( - "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s, confidence score: %f.%n", - entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + PiiEntityCollection piiEntityCollection = entitiesResult.getEntities(); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( + "Recognized Personally Identifiable Information entity: %s, entity category: %s, entity subcategory: %s, offset: %s, length: %s, confidence score: %f.%n", + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getOffset(), entity.getLength(), entity.getConfidenceScore())); } } }, From 5b40cc8cb2556db95e55fb672178040c526b9526 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Thu, 3 Sep 2020 15:25:35 -0700 Subject: [PATCH 083/168] Azure Core API Changes Before Release (#14786) * Make JsonSerializerProvider implementations final * Changes to generic representation and isEnabled to isTracingEnabled * Fix generic reference * Update sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/SerializerAdapter.java Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com> * Update sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/SerializerAdapter.java Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com> Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com> --- .../json/gson/GsonJsonSerializerProvider.java | 2 +- .../jackson/JacksonJsonSerializerProvider.java | 2 +- .../java/com/azure/core/http/rest/RestProxy.java | 4 ++-- .../core/util/serializer/JacksonAdapter.java | 6 +++--- .../core/util/serializer/SerializerAdapter.java | 16 ++++++++-------- .../com/azure/core/util/tracing/TracerProxy.java | 13 ++++++------- 6 files changed, 21 insertions(+), 22 deletions(-) diff --git a/sdk/core/azure-core-serializer-json-gson/src/main/java/com/azure/core/serializer/json/gson/GsonJsonSerializerProvider.java b/sdk/core/azure-core-serializer-json-gson/src/main/java/com/azure/core/serializer/json/gson/GsonJsonSerializerProvider.java index 35da805a7d63a..4e1b3f2278928 100644 --- a/sdk/core/azure-core-serializer-json-gson/src/main/java/com/azure/core/serializer/json/gson/GsonJsonSerializerProvider.java +++ b/sdk/core/azure-core-serializer-json-gson/src/main/java/com/azure/core/serializer/json/gson/GsonJsonSerializerProvider.java @@ -9,7 +9,7 @@ /** * Implementation of {@link JsonSerializerProvider}. */ -public class GsonJsonSerializerProvider implements MemberNameConverterProvider, JsonSerializerProvider { +public final class GsonJsonSerializerProvider implements JsonSerializerProvider, MemberNameConverterProvider { @Override public GsonJsonSerializer createInstance() { return new GsonJsonSerializerBuilder().build(); diff --git a/sdk/core/azure-core-serializer-json-jackson/src/main/java/com/azure/core/serializer/json/jackson/JacksonJsonSerializerProvider.java b/sdk/core/azure-core-serializer-json-jackson/src/main/java/com/azure/core/serializer/json/jackson/JacksonJsonSerializerProvider.java index 9873d254bf34b..0474832cc96da 100644 --- a/sdk/core/azure-core-serializer-json-jackson/src/main/java/com/azure/core/serializer/json/jackson/JacksonJsonSerializerProvider.java +++ b/sdk/core/azure-core-serializer-json-jackson/src/main/java/com/azure/core/serializer/json/jackson/JacksonJsonSerializerProvider.java @@ -9,7 +9,7 @@ /** * Implementation of {@link JsonSerializerProvider} and {@link MemberNameConverterProvider}. */ -public class JacksonJsonSerializerProvider implements JsonSerializerProvider, MemberNameConverterProvider { +public final class JacksonJsonSerializerProvider implements JsonSerializerProvider, MemberNameConverterProvider { @Override public JacksonJsonSerializer createInstance() { return new JacksonJsonSerializerBuilder().build(); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java index 9661afbccd507..c5144ce8f81fc 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java @@ -183,7 +183,7 @@ static Flux validateLength(final HttpRequest request) { * @return The updated context containing the span context. */ private Context startTracingSpan(Method method, Context context) { - if (!TracerProxy.isEnabled()) { + if (!TracerProxy.isTracingEnabled()) { return context; } String spanName = String.format("%s.%s", interfaceParser.getServiceName(), method.getName()); @@ -530,7 +530,7 @@ private Object handleRestReturnType(final Mono asyncHttpDec // This handles each onX for the response mono. // The signal indicates the status and contains the metadata we need to end the tracing span. private static void endTracingSpan(Signal signal) { - if (!TracerProxy.isEnabled()) { + if (!TracerProxy.isTracingEnabled()) { return; } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/JacksonAdapter.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/JacksonAdapter.java index b96e3bbca222f..9dc693db50a1b 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/JacksonAdapter.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/JacksonAdapter.java @@ -174,7 +174,7 @@ public String serializeList(List list, CollectionFormat format) { @Override @SuppressWarnings("unchecked") - public U deserialize(String value, Type type, SerializerEncoding encoding) throws IOException { + public T deserialize(String value, Type type, SerializerEncoding encoding) throws IOException { if (CoreUtils.isNullOrEmpty(value)) { return null; } @@ -182,9 +182,9 @@ public U deserialize(String value, Type type, SerializerEncoding encoding) t final JavaType javaType = createJavaType(type); try { if (encoding == SerializerEncoding.XML) { - return (U) xmlMapper.readValue(value, javaType); + return (T) xmlMapper.readValue(value, javaType); } else { - return (U) serializer().readValue(value, javaType); + return (T) serializer().readValue(value, javaType); } } catch (JsonParseException jpe) { throw logger.logExceptionAsError(new MalformedValueException(jpe.getMessage(), jpe)); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/SerializerAdapter.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/SerializerAdapter.java index 593ddf66d9577..cca521bc3c9b9 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/SerializerAdapter.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/SerializerAdapter.java @@ -64,28 +64,28 @@ default void serialize(final Object object, final SerializerEncoding encoding, O String serializeList(List list, CollectionFormat format); /** - * Deserializes a string into a {@code U} object. + * Deserializes a string into a {@code T} object. * * @param value the string value to deserialize - * @param the type of the deserialized object + * @param the type of the deserialized object * @param type the type to deserialize * @param encoding the encoding used in the serialized value * @return the deserialized object * @throws IOException exception from deserialization */ - U deserialize(String value, Type type, SerializerEncoding encoding) throws IOException; + T deserialize(String value, Type type, SerializerEncoding encoding) throws IOException; /** - * Deserializes a byte[] into a {@code U} object. + * Deserializes a byte[] into a {@code T} object. * * @param inputStream The {@link InputStream} containing the serialized object data to deserialize. * @param type The type to deserialize. * @param encoding The encoding used to serialize value. - * @param The type of the deserialized object. + * @param The type of the deserialized object. * @return The deserialized object, or null if it cannot be deserialized. * @throws IOException exception from deserialization */ - default U deserialize(final InputStream inputStream, final Type type, final SerializerEncoding encoding) + default T deserialize(final InputStream inputStream, final Type type, final SerializerEncoding encoding) throws IOException { if (inputStream == null) { return deserialize((String) null, type, encoding); @@ -137,11 +137,11 @@ default U deserialize(final InputStream inputStream, final Type type, final * {@code headers}. * * @param headers the REST API returned headers - * @param the type of the deserialized object + * @param the type of the deserialized object * @param type the type to deserialize * @return instance of header entity type created based on provided {@code headers}, if header entity model does not * not exists then return null * @throws IOException If an I/O error occurs */ - U deserialize(HttpHeaders headers, Type type) throws IOException; + T deserialize(HttpHeaders headers, Type type) throws IOException; } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/TracerProxy.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/TracerProxy.java index 5a12ade9f6585..5063963de0818 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/TracerProxy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/TracerProxy.java @@ -38,7 +38,6 @@ private TracerProxy() { * * @param methodName Name of the method triggering the span creation. * @param context Additional metadata that is passed through the call stack. - * * @return An updated {@link Context} object. */ public static Context start(String methodName, Context context) { @@ -49,8 +48,8 @@ public static Context start(String methodName, Context context) { } /** - * For the plugged in {@link Tracer tracer}, the key-value pair metadata is added to its current span. If - * the {@code context} does not contain a span, then no metadata is added. + * For the plugged in {@link Tracer tracer}, the key-value pair metadata is added to its current span. If the {@code + * context} does not contain a span, then no metadata is added. * * @param key Name of the metadata. * @param value Value of the metadata. @@ -82,7 +81,6 @@ public static void end(int responseCode, Throwable error, Context context) { * * @param spanName Name of the span. * @param context Additional metadata that is passed through the call stack. - * * @return An updated {@link Context} object. */ public static Context setSpanName(String spanName, Context context) { @@ -93,10 +91,11 @@ public static Context setSpanName(String spanName, Context context) { } /** - * Returns {@code true} if tracing is enabled. - * @return {@code true} if tracing is enabled. + * Returns true if tracing is enabled. + * + * @return true if tracing is enabled. */ - public static boolean isEnabled() { + public static boolean isTracingEnabled() { return tracer != null; } } From f5fbc857e9d99d336bf20de80990a8376da27395 Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Thu, 3 Sep 2020 15:29:11 -0700 Subject: [PATCH 084/168] Add models operations to twin lifecycle sample (#14781) * samples(adt): Add model operations to twin sample --- .../core/DigitalTwinsAsyncClient.java | 8 +- .../DigitalTwinsLifecycleAsyncSample.java | 280 +++++++++++++----- .../azure/digitaltwins/core/SamplesUtil.java | 23 ++ 3 files changed, 235 insertions(+), 76 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesUtil.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 684127700b1c7..b5b64768332eb 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -788,7 +788,7 @@ Mono> createModelsSinglePageAsync(List models, objectPagedResponse.getHeaders(), convertedList, null, - ((PagedResponseBase) objectPagedResponse).getDeserializedHeaders()); + ((ResponseBase) objectPagedResponse).getDeserializedHeaders()); } ); } @@ -909,7 +909,7 @@ Mono> listModelsNextSinglePageAsync(String nextLink, Co @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteModel(String modelId) { return deleteModelWithResponse(modelId) - .map(Response::getValue); + .flatMap(voidResponse -> Mono.empty()); } /** @@ -939,7 +939,7 @@ PagedFlux listRelationships(String digitalTwinId, String relationshipNam */ public Mono decommissionModel(String modelId) { return decommissionModelWithResponse(modelId) - .map(Response::getValue); + .flatMap(voidResponse -> Mono.empty()); } /** @@ -1047,7 +1047,7 @@ Mono> getComponentWithResponse(String digitalTwinId, @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateComponent(String digitalTwinId, String componentPath, List componentUpdateOperations) { return updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, new UpdateComponentRequestOptions()) - .map(DigitalTwinsResponse::getValue); + .flatMap(voidResponse -> Mono.empty()); } /** diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java index 7666b611e5b6f..33740445bf2d4 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java @@ -7,6 +7,9 @@ import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; import com.azure.digitaltwins.core.implementation.serialization.BasicRelationship; import com.azure.identity.ClientSecretCredentialBuilder; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpStatus; import java.io.IOException; @@ -14,10 +17,19 @@ import java.net.URL; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.Map; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; +import static com.azure.digitaltwins.core.SamplesConstants.*; +import static com.azure.digitaltwins.core.SamplesUtil.IgnoreConflictError; +import static com.azure.digitaltwins.core.SamplesUtil.IgnoreNotFoundError; +import static java.util.Arrays.asList; + /** * This sample creates all the models in \DTDL\Models folder in the ADT service instance and creates the corresponding twins in \DTDL\DigitalTwins folder. * The Diagram for the Hospital model looks like this: @@ -44,6 +56,7 @@ public class DigitalTwinsLifecycleAsyncSample { private static final int MaxWaitTimeAsyncOperationsInSeconds = 10; + private static final ObjectMapper mapper = new ObjectMapper(); private static final URL DtdlDirectoryUrl = DigitalTwinsLifecycleAsyncSample.class.getClassLoader().getResource("DTDL"); private static final Path DtDlDirectoryPath; @@ -86,108 +99,231 @@ public static void main(String[] args) throws IOException, InterruptedException // Ensure existing twins with the same name are deleted first deleteTwins(); + // Delete existing models + deleteAllModels(); + + // Create all the models + createAllModels(); + + // Get all models + listAllModels(); + // Create twin counterparts for all the models - createTwins(); + createAllTwins(); + + // TODO: Get all twins + // queryTwins(); + + // Create all the relationships + connectTwinsTogether(); + + // TODO: Creating event route + // createEventRoute(); + + // TODO: Get all event routes + // listEventRoutes(); + + // TODO: Deleting event route + // deleteEventRoute(); } /** * Delete a twin, and any relationships it might have. * @throws IOException If an I/O error is thrown when accessing the starting file. - * @throws InterruptedException If the current thread is interrupted while waiting to acquire permits on a semaphore. + * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void deleteTwins() throws IOException, InterruptedException { System.out.println("DELETE DIGITAL TWINS"); Map twins = FileHelper.loadAllFilesInPath(TwinsPath); - final Semaphore deleteTwinsSemaphore = new Semaphore(0); - final Semaphore deleteRelationshipsSemaphore = new Semaphore(0); // Call APIs to clean up any pre-existing resources that might be referenced by this sample. If digital twin does not exist, ignore. - twins - .forEach((twinId, twinContent) -> { - // Call APIs to delete all relationships. - client.listRelationships(twinId, BasicRelationship.class) - .doOnComplete(deleteRelationshipsSemaphore::release) - .doOnError(throwable -> { - if (throwable instanceof ErrorResponseException && ((ErrorResponseException) throwable).getResponse().getStatusCode() == HttpStatus.SC_NOT_FOUND) { - deleteRelationshipsSemaphore.release(); - } else { - System.err.println("List relationships error: " + throwable); - } - }) - .subscribe( - relationship -> client.deleteRelationship(twinId, relationship.getId()) - .subscribe( - aVoid -> System.out.println("Found and deleted relationship: " + relationship.getId()), - throwable -> System.err.println("Delete relationship error: " + throwable) - )); - - // Call APIs to delete any incoming relationships. - client.listIncomingRelationships(twinId) - .doOnComplete(deleteRelationshipsSemaphore::release) - .doOnError(throwable -> { - if (throwable instanceof ErrorResponseException && ((ErrorResponseException) throwable).getResponse().getStatusCode() == HttpStatus.SC_NOT_FOUND) { - deleteRelationshipsSemaphore.release(); - } else { - System.err.println("List incoming relationships error: " + throwable); - } - }) - .subscribe( - incomingRelationship -> client.deleteRelationship(incomingRelationship.getSourceId(), incomingRelationship.getRelationshipId()) - .subscribe( - aVoid -> System.out.println("Found and deleted incoming relationship: " + incomingRelationship.getRelationshipId()), - throwable -> System.err.println("Delete incoming relationship error: " + throwable) - )); + // Once the async API terminates (either successfully, or with an error), the latch count is decremented, or the semaphore is released. + for (Map.Entry twin : twins.entrySet()) { + String twinId = twin.getKey(); + + // This list contains all the relationships that existing between the twins referenced by this sample. + List relationshipList = Collections.synchronizedList(new ArrayList<>()); + + // These semaphores indicate when the relationship list and relationship delete operations have completed. + // We cannot use a latch here since we do not know the no. of relationships that will be deleted (so we do cannot set the latch initial count). + Semaphore listRelationshipSemaphore = new Semaphore(0); + Semaphore deleteRelationshipsSemaphore = new Semaphore(0); + + // This latch is to ensure that we wait for the delete twin operation to complete, before proceeding. + CountDownLatch deleteTwinsLatch = new CountDownLatch(1); + + // Call APIs to retrieve all relationships. + client.listRelationships(twinId, BasicRelationship.class) + .doOnNext(relationshipList::add) + .doOnError(IgnoreNotFoundError) + .doOnTerminate(listRelationshipSemaphore::release) + .subscribe(); + + // Call APIs to retrieve all incoming relationships. + client.listIncomingRelationships(twinId) + .doOnNext(e -> relationshipList.add(mapper.convertValue(e, BasicRelationship.class))) + .doOnError(IgnoreNotFoundError) + .doOnTerminate(listRelationshipSemaphore::release) + .subscribe(); + + // Call APIs to delete all relationships. + if (listRelationshipSemaphore.tryAcquire(2, MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS)) { + relationshipList + .forEach(relationship -> client.deleteRelationship(relationship.getSourceId(), relationship.getId()) + .doOnSuccess(aVoid -> { + if (twinId.equals(relationship.getSourceId())) { + System.out.println("Found and deleted relationship: " + relationship.getId()); + } else { + System.out.println("Found and deleted incoming relationship: " + relationship.getId()); + } + }) + .doOnError(IgnoreNotFoundError) + .doOnTerminate(deleteRelationshipsSemaphore::release) + .subscribe()); + } + + // Verify that the relationships have been deleted. + if (deleteRelationshipsSemaphore.tryAcquire(relationshipList.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS)) { + // Now the digital twin should be safe to delete + + // Call APIs to delete the twins. + client.deleteDigitalTwin(twinId) + .doOnSuccess(aVoid -> System.out.println("Deleted digital twin: " + twinId)) + .doOnError(IgnoreNotFoundError) + .doOnTerminate(deleteTwinsLatch::countDown) + .subscribe(); + + // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. + deleteTwinsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + } + } + } + + /** + * Delete models created by FullLifecycleSample for the ADT service instance. + * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. + */ + public static void deleteAllModels() throws InterruptedException { + System.out.println("DELETING MODELS"); + // This is to ensure models are deleted in an order such that no other models are referencing it. + List models = asList(RoomModelId, WifiModelId, BuildingModelId, FloorModelId, HvacModelId); + + // Call APIs to delete the models. + // Note that we are blocking the async API call. This is to ensure models are deleted in an order such that no other models are referencing it. + models + .forEach(modelId -> { try { - // Verify that the list relationships and list incoming relationships async operations have completed. - if (deleteRelationshipsSemaphore.tryAcquire(2, MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS)) { - // Now the digital twin should be safe to delete - - // Call APIs to delete the twins. - client.deleteDigitalTwin(twinId) - .doOnSuccess(aVoid -> { - System.out.println("Deleted digital twin: " + twinId); - deleteTwinsSemaphore.release(); - }) - .doOnError(throwable -> { - if (throwable instanceof ErrorResponseException && ((ErrorResponseException) throwable).getResponse().getStatusCode() == HttpStatus.SC_NOT_FOUND) { - deleteTwinsSemaphore.release(); - } else { - System.err.println("Could not delete digital twin " + twinId + " due to " + throwable); - } - }) - .subscribe(); + client.deleteModel(modelId).block(); + System.out.println("Deleted model: " + modelId); + } catch (ErrorResponseException ex) { + if (ex.getResponse().getStatusCode() != HttpStatus.SC_NOT_FOUND) { + System.err.println("Could not delete model " + modelId + " due to " + ex); } - } catch (InterruptedException e) { - throw new RuntimeException("Could not cleanup the pre-existing resources: ", e); } }); + } + + /** + * Loads all the models found in the Models directory into memory and uses CreateModelsAsync API to create all the models in the ADT service instance. + * @throws IOException If an I/O error is thrown when accessing the starting file. + * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. + */ + public static void createAllModels() throws IOException, InterruptedException { + System.out.println("CREATING MODELS"); + List modelsToCreate = new ArrayList<>(FileHelper.loadAllFilesInPath(ModelsPath).values()); + final CountDownLatch createModelsLatch = new CountDownLatch(1); - // Verify that a semaphore has been released for each delete async operation, signifying that the async call has completed successfully.. - boolean created = deleteTwinsSemaphore.tryAcquire(twins.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); - System.out.println("Twins deleted: " + created); + // Call API to create the models. For each async operation, once the operation is completed successfully, a latch is counted down. + client.createModels(modelsToCreate) + .doOnNext(modelData -> System.out.println("Created model: " + modelData.getId())) + .doOnError(IgnoreConflictError) + .doOnTerminate(createModelsLatch::countDown) + .subscribe(); + + // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. + createModelsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + } + + /** + * Gets all the models within the ADT service instance. + * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. + */ + public static void listAllModels() throws InterruptedException { + System.out.println("LISTING MODELS"); + final CountDownLatch listModelsLatch = new CountDownLatch(1); + + // Call API to list the models. For each async operation, once the operation is completed successfully, a latch is counted down. + client.listModels() + .doOnNext(modelData -> System.out.println("Retrieved model: " + modelData.getId() + ", display name '" + modelData.getDisplayName().get("en") + "'," + + " upload time '" + modelData.getUploadTime() + "' and decommissioned '" + modelData.isDecommissioned() + "'")) + .doOnError(throwable -> System.err.println("List models error: " + throwable)) + .doOnTerminate(listModelsLatch::countDown) + .subscribe(); + + // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. + listModelsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); } /** * Creates all twins specified in the DTDL->DigitalTwins directory. * @throws IOException If an I/O error is thrown when accessing the starting file. - * @throws InterruptedException If the current thread is interrupted while waiting to acquire permits on a semaphore. + * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ - public static void createTwins() throws IOException, InterruptedException { + public static void createAllTwins() throws IOException, InterruptedException { System.out.println("CREATE DIGITAL TWINS"); Map twins = FileHelper.loadAllFilesInPath(TwinsPath); - final Semaphore createTwinsSemaphore = new Semaphore(0); + final CountDownLatch createTwinsLatch = new CountDownLatch(twins.size()); - // Call APIs to create the twins. For each async operation, once the operation is completed successfully, a semaphore is released. + // Call APIs to create the twins. For each async operation, once the operation is completed successfully, a latch is counted down. twins - .forEach((twinId, twinContent) -> client.createDigitalTwinWithResponse(twinId, twinContent) + .forEach((twinId, twinContent) -> client.createDigitalTwin(twinId, twinContent) .subscribe( - response -> System.out.println("Created digital twin: " + twinId + "\n\t Body: " + response.getValue()), + twin -> System.out.println("Created digital twin: " + twinId + "\n\t Body: " + twin), throwable -> System.err.println("Could not create digital twin " + twinId + " due to " + throwable), - createTwinsSemaphore::release)); + createTwinsLatch::countDown)); + + // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. + createTwinsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + } + + /** + * Creates all the relationships defined in the DTDL->Relationships directory + * @throws IOException If an I/O error is thrown when accessing the starting file. + * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. + */ + public static void connectTwinsTogether() throws IOException, InterruptedException { + System.out.println("CONNECT DIGITAL TWINS"); + Map allRelationships = FileHelper.loadAllFilesInPath(RelationshipsPath); + final CountDownLatch connectTwinsLatch = new CountDownLatch(4); + + // For each relationship array we deserialize it first. + // We deserialize as BasicRelationship to get the entire custom relationship (custom relationship properties). + allRelationships.values().forEach( + relationshipContent -> { + try { + List relationships = mapper.readValue(relationshipContent, new TypeReference>() { }); + + // From loaded relationships, get the source Id and Id from each one, and create it with full relationship payload. + relationships + .forEach(relationship -> { + try { + client.createRelationship(relationship.getSourceId(), relationship.getId(), mapper.writeValueAsString(relationship)) + .doOnSuccess(s -> System.out.println("Linked twin " + relationship.getSourceId() + " to twin " + relationship.getTargetId() + " as " + relationship.getName())) + .doOnError(IgnoreConflictError) + .doOnTerminate(connectTwinsLatch::countDown) + .subscribe(); + } catch (JsonProcessingException e) { + throw new RuntimeException("JsonProcessingException while serializing relationship string from BasicRelationship: ", e); + } + }); + } catch (JsonProcessingException e) { + throw new RuntimeException("JsonProcessingException while deserializing relationship string to BasicRelationship: ", e); + } + } + ); - // Verify that a semaphore has been released for each async operation, signifying that the async call has completed successfully. - boolean created = createTwinsSemaphore.tryAcquire(twins.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); - System.out.println("Twins created: " + created); + // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. + connectTwinsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesUtil.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesUtil.java new file mode 100644 index 0000000000000..6ca813c4e48b8 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesUtil.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.digitaltwins.core; + +import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; +import org.apache.http.HttpStatus; + +import java.util.function.Consumer; + +public class SamplesUtil { + public static final Consumer IgnoreNotFoundError = throwable -> { + if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HttpStatus.SC_NOT_FOUND) { + System.err.println("Error received: " + throwable); + } + }; + + public static final Consumer IgnoreConflictError = throwable -> { + if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HttpStatus.SC_CONFLICT) { + System.err.println("Error received: " + throwable); + } + }; +} From 04cc3ff990b4d1626555c6cc6a4760f2f5cd1be9 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 3 Sep 2020 16:45:38 -0700 Subject: [PATCH 085/168] Sync eng/common directory with azure-sdk-tools for PR 955 (#14792) --- eng/common/Update-Change-Log.ps1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/eng/common/Update-Change-Log.ps1 b/eng/common/Update-Change-Log.ps1 index 6380e3ff800a2..3d1497f298639 100644 --- a/eng/common/Update-Change-Log.ps1 +++ b/eng/common/Update-Change-Log.ps1 @@ -12,7 +12,8 @@ param ( [Parameter(Mandatory = $true)] [String]$ChangeLogPath, [String]$Unreleased = $True, - [String]$ReplaceVersion = $False + [String]$ReplaceVersion = $False, + [String]$ReleaseDate ) @@ -46,8 +47,12 @@ function Get-VersionTitle($Version, $Unreleased) # Generate version title $newVersionTitle = "## $Version $UNRELEASED_TAG" if ($Unreleased -eq $False) { - $releaseDate = Get-Date -Format "(yyyy-MM-dd)" - $newVersionTitle = "## $Version $releaseDate" + $actualReleaseDate = $ReleaseDate; + + if (!$actualReleaseDate) { + $actualReleaseDate = Get-Date -Format "yyyy-MM-dd" + } + $newVersionTitle = "## $Version ($actualReleaseDate)" } return $newVersionTitle } @@ -95,7 +100,7 @@ function Get-NewChangeLog( [System.Collections.ArrayList]$ChangelogLines, $Versi exit(0) } - if (($ReplaceVersion -eq $True) -and ($Unreleased -eq $False) -and $CurrentTitle.Contains($version) -and (-not $CurrentTitle.Contains($UNRELEASED_TAG))) { + if (($ReplaceVersion -eq $True) -and ($Unreleased -eq $False) -and $CurrentTitle.Contains($version) -and (-not $CurrentTitle.Contains($UNRELEASED_TAG)) -and (-not $ReleaseDate)) { Write-Host "Version is already present in change log with a release date." exit(0) } From 67864dc681d7a5cb28d5ca151e6502f0ab9fd30b Mon Sep 17 00:00:00 2001 From: Soreloser2 <43689321+Soreloser2@users.noreply.github.com> Date: Thu, 3 Sep 2020 17:00:11 -0700 Subject: [PATCH 086/168] Add live tests to EventGrid SDK (#14799) * Add live test files Fix custom event test slightly to be formatted correctly * Fixed test formatting * Small test config changes Co-authored-by: Soren Dahl --- .../EventGridPublisherImplTests.java | 1 + sdk/eventgrid/test-resources.json | 93 +++++++++++++++++++ sdk/eventgrid/tests.yml | 14 +++ 3 files changed, 108 insertions(+) create mode 100644 sdk/eventgrid/test-resources.json create mode 100644 sdk/eventgrid/tests.yml diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java index 4163d0de69df5..72361e48889d0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java @@ -143,6 +143,7 @@ public void publishCustomEventsImpl() throws MalformedURLException { for (int i = 0; i < 5; i++) { events.add(new HashMap() {{ put("id", UUID.randomUUID().toString()); + put("time", OffsetDateTime.now().toString()); put("subject", "Test"); put("foo", "bar"); put("type", "Microsoft.MockPublisher.TestEvent"); diff --git a/sdk/eventgrid/test-resources.json b/sdk/eventgrid/test-resources.json new file mode 100644 index 0000000000000..524b867da595b --- /dev/null +++ b/sdk/eventgrid/test-resources.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "String" + } + }, + "variables": { + "apiVersion": "2020-06-01", + "eventGridTopicName": "[concat(parameters('baseName'), 'topic')]", + "cloudeventTopicName": "[concat(parameters('baseName'), 'cloudevent-topic')]", + "customeventTopicName": "[concat(parameters('baseName'), 'customevent-topic')]" + }, + "resources": [ + { + "type": "Microsoft.EventGrid/topics", + "apiVersion": "[variables('apiVersion')]", + "name": "[variables('eventGridTopicName')]", + "location": "[resourceGroup().location]" + }, + { + "type": "Microsoft.EventGrid/topics", + "apiVersion": "[variables('apiVersion')]", + "name": "[variables('cloudeventTopicName')]", + "location": "[resourceGroup().location]", + "properties": { + "inputSchema": "CloudEventSchemaV1_0" + } + }, + { + "type": "Microsoft.EventGrid/topics", + "apiVersion": "[variables('apiVersion')]", + "name": "[variables('customeventTopicName')]", + "location": "[resourceGroup().location]", + "properties": { + "inputSchema": "CustomEventSchema", + "inputSchemaMapping": { + "inputSchemaMappingType": "Json", + "properties": { + "dataVersion": { + "defaultValue": "default", + "sourceField": "dataVersion" + }, + "eventTime": { + "sourceField": "time" + }, + "eventType": { + "defaultValue": "default", + "sourceField": "type" + }, + "id": { + "sourceField": "id" + }, + "subject": { + "defaultValue": "default", + "sourceField": "subject" + }, + "topic": { + "sourceField": "topic" + } + } + } + } + } + ], + "outputs": { + "AZURE_EVENTGRID_EVENTGRID_ENDPOINT": { + "type": "string", + "value": "[reference(variables('eventGridTopicName')).endpoint]" + }, + "AZURE_EVENTGRID_EVENTGRID_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.EventGrid/topics', variables('eventGridTopicName')), variables('apiVersion')).key1]" + }, + "AZURE_EVENTGRID_CLOUD_ENDPOINT": { + "type": "string", + "value": "[reference(variables('cloudeventTopicName')).endpoint]" + }, + "AZURE_EVENTGRID_CLOUD_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.EventGrid/topics', variables('cloudeventTopicName')), variables('apiVersion')).key1]" + }, + "AZURE_EVENTGRID_CUSTOM_ENDPOINT": { + "type": "string", + "value": "[reference(variables('customeventTopicName')).endpoint]" + }, + "AZURE_EVENTGRID_CUSTOM_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.EventGrid/topics', variables('customeventTopicName')), variables('apiVersion')).key1]" + } + } +} diff --git a/sdk/eventgrid/tests.yml b/sdk/eventgrid/tests.yml new file mode 100644 index 0000000000000..fca653c3748a2 --- /dev/null +++ b/sdk/eventgrid/tests.yml @@ -0,0 +1,14 @@ +trigger: none + +jobs: + - template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests.yml + parameters: + ServiceDirectory: eventgrid + Timeout: 60 + MaxParallel: 6 + EnvVars: + AZURE_EVENTGRID_TEST_MODE: LIVE + Artifacts: + - name: azure-messaging-eventgrid + groupId: com.azure + safeName: azureeventgrid From eecf0ed92b41d7157bae7761387c9ee6ee1f43b4 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Thu, 3 Sep 2020 17:22:01 -0700 Subject: [PATCH 087/168] [TA] Add domainFilter feature to PII endpoint (#14714) * add domainFilter feature --- .../RecognizePiiEntityAsyncClient.java | 41 ++++++++---- .../TextAnalyticsAsyncClient.java | 50 +++++++++++--- .../ai/textanalytics/TextAnalyticsClient.java | 50 +++++++++++--- .../models/PiiEntityDomainType.java | 30 +++++++++ .../models/RecognizePiiEntityOptions.java | 67 +++++++++++++++++++ ...alyticsAsyncClientJavaDocCodeSnippets.java | 41 +++++++++--- ...extAnalyticsClientJavaDocCodeSnippets.java | 34 +++++++--- .../RecognizePiiEntitiesBatchDocuments.java | 8 +-- ...cognizePiiEntitiesBatchDocumentsAsync.java | 8 +-- ...ognizePiiEntitiesBatchStringDocuments.java | 8 +-- ...ePiiEntitiesBatchStringDocumentsAsync.java | 8 +-- .../com/azure/ai/textanalytics/TestUtils.java | 21 ++++++ .../TextAnalyticsAsyncClientTest.java | 36 ++++++++++ .../TextAnalyticsClientTest.java | 35 ++++++++++ .../TextAnalyticsClientTestBase.java | 26 +++++-- ...iEntitiesForBatchInputForDomainFilter.json | 26 +++++++ ...iesForBatchInputStringForDomainFilter.json | 26 +++++++ .../recognizePiiEntitiesForDomainFilter.json | 26 +++++++ 18 files changed, 470 insertions(+), 71 deletions(-) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntityDomainType.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/RecognizePiiEntityOptions.java create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputForDomainFilter.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputStringForDomainFilter.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForDomainFilter.json diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java index 47df7ab157d55..9c10176e32471 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizePiiEntityAsyncClient.java @@ -13,8 +13,9 @@ import com.azure.ai.textanalytics.models.EntityCategory; import com.azure.ai.textanalytics.models.PiiEntity; import com.azure.ai.textanalytics.models.PiiEntityCollection; +import com.azure.ai.textanalytics.models.PiiEntityDomainType; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; -import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.TextAnalyticsWarning; import com.azure.ai.textanalytics.models.TextDocumentInput; import com.azure.ai.textanalytics.models.WarningCode; @@ -67,14 +68,17 @@ class RecognizePiiEntityAsyncClient { * * @param document A single document. * @param language The language code. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. * * @return The {@link Mono} of {@link PiiEntityCollection}. */ - Mono recognizePiiEntities(String document, String language) { + Mono recognizePiiEntities(String document, String language, + RecognizePiiEntityOptions options) { try { Objects.requireNonNull(document, "'document' cannot be null."); return recognizePiiEntitiesBatch( - Collections.singletonList(new TextDocumentInput("0", document).setLanguage(language)), null) + Collections.singletonList(new TextDocumentInput("0", document).setLanguage(language)), options) .map(resultCollectionResponse -> { PiiEntityCollection entityCollection = null; // for each loop will have only one entry inside @@ -97,12 +101,13 @@ Mono recognizePiiEntities(String document, String language) * Helper function for calling service with max overloaded parameters. * * @param documents The list of documents to recognize Personally Identifiable Information entities for. - * @param options The {@link TextAnalyticsRequestOptions} request options. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. * * @return A mono {@link Response} that contains {@link RecognizePiiEntitiesResultCollection}. */ Mono> recognizePiiEntitiesBatch( - Iterable documents, TextAnalyticsRequestOptions options) { + Iterable documents, RecognizePiiEntityOptions options) { try { inputDocumentsValidation(documents); return withContext(context -> getRecognizePiiEntitiesResponse(documents, options, context)); @@ -115,13 +120,14 @@ Mono> recognizePiiEntitiesBatch( * Helper function for calling service with max overloaded parameters with {@link Context} is given. * * @param documents The list of documents to recognize Personally Identifiable Information entities for. - * @param options The {@link TextAnalyticsRequestOptions} request options. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. * @param context Additional context that is passed through the Http pipeline during the service call. * * @return A mono {@link Response} that contains {@link RecognizePiiEntitiesResultCollection}. */ Mono> recognizePiiEntitiesBatchWithContext( - Iterable documents, TextAnalyticsRequestOptions options, Context context) { + Iterable documents, RecognizePiiEntityOptions options, Context context) { try { inputDocumentsValidation(documents); return getRecognizePiiEntitiesResponse(documents, options, context); @@ -184,19 +190,28 @@ private Response toRecognizePiiEntitiesRes * {@link RecognizePiiEntitiesResultCollection} from a {@link SimpleResponse} of {@link EntitiesResult}. * * @param documents The list of documents to recognize Personally Identifiable Information entities for. - * @param options The {@link TextAnalyticsRequestOptions} request options. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. * @param context Additional context that is passed through the Http pipeline during the service call. * * @return A mono {@link Response} that contains {@link RecognizePiiEntitiesResultCollection}. */ private Mono> getRecognizePiiEntitiesResponse( - Iterable documents, TextAnalyticsRequestOptions options, Context context) { + Iterable documents, RecognizePiiEntityOptions options, Context context) { + String modelVersion = null; + Boolean includeStatistics = null; + String domainFilter = null; + if (options != null) { + modelVersion = options.getModelVersion(); + includeStatistics = options.isIncludeStatistics(); + final PiiEntityDomainType domainType = options.getDomainFilter(); + if (domainType != null) { + domainFilter = domainType.toString(); + } + } return service.entitiesRecognitionPiiWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), - options == null ? null : options.getModelVersion(), - options == null ? null : options.isIncludeStatistics(), - null, - StringIndexType.UTF16CODE_UNIT, + modelVersion, includeStatistics, domainFilter, StringIndexType.UTF16CODE_UNIT, context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info( "Start recognizing Personally Identifiable Information entities for a batch of documents.")) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClient.java index a41dc79c274ae..0453a2e026d55 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClient.java @@ -14,6 +14,7 @@ import com.azure.ai.textanalytics.models.KeyPhrasesCollection; import com.azure.ai.textanalytics.models.LinkedEntityCollection; import com.azure.ai.textanalytics.models.PiiEntityCollection; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.TextAnalyticsError; import com.azure.ai.textanalytics.models.TextAnalyticsException; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; @@ -427,7 +428,38 @@ public Mono recognizePiiEntities(String document) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono recognizePiiEntities(String document, String language) { - return recognizePiiEntityAsyncClient.recognizePiiEntities(document, language); + return recognizePiiEntityAsyncClient.recognizePiiEntities(document, language, null); + } + + /** + * Returns a list of Personally Identifiable Information(PII) entities in the provided document + * with provided language code. + * + * For a list of supported entity types, check: this. + * For a list of enabled languages, check: this. + * + *

    Code sample

    + *

    Recognize the PII entities details in a document with provided language code and RecognizePiiEntityOptions. + * Subscribes to the call asynchronously and prints out the entity details when a response is received.

    + * + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntities#string-string-RecognizePiiEntityOptions} + * + * @param document the text to recognize PII entities details for. + * For text length limits, maximum batch size, and supported text encoding, see + * data limits. + * @param language The 2 letter ISO 639-1 representation of language. If not set, uses "en" for English as default. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. + * + * @return A {@link Mono} contains a {@link PiiEntityCollection recognized PII entities collection}. + * + * @throws NullPointerException if {@code document} is null. + * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono recognizePiiEntities(String document, String language, + RecognizePiiEntityOptions options) { + return recognizePiiEntityAsyncClient.recognizePiiEntities(document, language, options); } /** @@ -438,14 +470,14 @@ public Mono recognizePiiEntities(String document, String la *

    Recognize Personally Identifiable Information entities in a document with the provided language code. * Subscribes to the call asynchronously and prints out the entity details when a response is received.

    * - * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-String-TextAnalyticsRequestOptions} + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-String-RecognizePiiEntityOptions} * * @param documents A list of documents to recognize PII entities for. * For text length limits, maximum batch size, and supported text encoding, see * data limits. * @param language The 2 letter ISO 639-1 representation of language. If not set, uses "en" for English as default. - * @param options The {@link TextAnalyticsRequestOptions options} to configure the scoring model for documents - * and show statistics. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. * * @return A {@link Mono} contains a {@link RecognizePiiEntitiesResultCollection}. * @@ -454,7 +486,7 @@ public Mono recognizePiiEntities(String document, String la */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono recognizePiiEntitiesBatch( - Iterable documents, String language, TextAnalyticsRequestOptions options) { + Iterable documents, String language, RecognizePiiEntityOptions options) { try { inputDocumentsValidation(documents); return recognizePiiEntitiesBatchWithResponse( @@ -477,13 +509,13 @@ public Mono recognizePiiEntitiesBatch( * with provided request options. * Subscribes to the call asynchronously and prints out the entity details when a response is received.

    * - * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-TextAnalyticsRequestOptions} + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-RecognizePiiEntityOptions} * * @param documents A list of {@link TextDocumentInput documents} to recognize PII entities for. * For text length limits, maximum batch size, and supported text encoding, see * data limits. - * @param options The {@link TextAnalyticsRequestOptions options} to configure the scoring model for documents - * and show statistics. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. * * @return A {@link Mono} contains a {@link Response} which contains a {@link RecognizePiiEntitiesResultCollection}. * @@ -492,7 +524,7 @@ public Mono recognizePiiEntitiesBatch( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> recognizePiiEntitiesBatchWithResponse( - Iterable documents, TextAnalyticsRequestOptions options) { + Iterable documents, RecognizePiiEntityOptions options) { return recognizePiiEntityAsyncClient.recognizePiiEntitiesBatch(documents, options); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java index 360baf9aacaff..194577388a9d2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java @@ -13,6 +13,7 @@ import com.azure.ai.textanalytics.models.LinkedEntity; import com.azure.ai.textanalytics.models.LinkedEntityCollection; import com.azure.ai.textanalytics.models.PiiEntityCollection; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.TextAnalyticsError; import com.azure.ai.textanalytics.models.TextAnalyticsException; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; @@ -233,7 +234,6 @@ public CategorizedEntityCollection recognizeEntities(String document) { */ @ServiceMethod(returns = ReturnType.SINGLE) public CategorizedEntityCollection recognizeEntities(String document, String language) { - Objects.requireNonNull(document, "'document' cannot be null."); return client.recognizeEntities(document, language).block(); } @@ -344,10 +344,40 @@ public PiiEntityCollection recognizePiiEntities(String document) { */ @ServiceMethod(returns = ReturnType.SINGLE) public PiiEntityCollection recognizePiiEntities(String document, String language) { - Objects.requireNonNull(document, "'document' cannot be null."); return client.recognizePiiEntities(document, language).block(); } + /** + * Returns a list of Personally Identifiable Information(PII) entities in the provided document + * with provided language code. + * + * For a list of supported entity types, check: this + * For a list of enabled languages, check: this + * + *

    Code Sample

    + *

    Recognizes the PII entities details in a document with a provided language code and + * RecognizePiiEntityOptions.

    + * + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntities#String-String-RecognizePiiEntityOptions} + * + * @param document The document to recognize PII entities details for. + * For text length limits, maximum batch size, and supported text encoding, see + * data limits. + * @param language The 2 letter ISO 639-1 representation of language. If not set, uses "en" for English as default. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. + * + * @return The {@link PiiEntityCollection recognized PII entities collection}. + * + * @throws NullPointerException if {@code document} is null. + * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PiiEntityCollection recognizePiiEntities(String document, String language, + RecognizePiiEntityOptions options) { + return client.recognizePiiEntities(document, language, options).block(); + } + /** * Returns a list of Personally Identifiable Information(PII) entities for the provided list of documents with * provided language code and request options. @@ -356,14 +386,14 @@ public PiiEntityCollection recognizePiiEntities(String document, String language *

    Recognizes the PII entities details in a list of documents with a provided language code * and request options.

    * - * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-String-TextAnalyticsRequestOptions} + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-String-RecognizePiiEntityOptions} * * @param documents A list of documents to recognize PII entities for. * For text length limits, maximum batch size, and supported text encoding, see * data limits. * @param language The 2 letter ISO 639-1 representation of language. If not set, uses "en" for English as default. - * @param options The {@link TextAnalyticsRequestOptions options} to configure the scoring model for documents - * and show statistics. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. * * @return A {@link RecognizePiiEntitiesResultCollection}. * @@ -372,7 +402,7 @@ public PiiEntityCollection recognizePiiEntities(String document, String language */ @ServiceMethod(returns = ReturnType.SINGLE) public RecognizePiiEntitiesResultCollection recognizePiiEntitiesBatch( - Iterable documents, String language, TextAnalyticsRequestOptions options) { + Iterable documents, String language, RecognizePiiEntityOptions options) { return client.recognizePiiEntitiesBatch(documents, language, options).block(); } @@ -384,13 +414,13 @@ public RecognizePiiEntitiesResultCollection recognizePiiEntitiesBatch( *

    Recognizes the PII entities details with http response in a list of {@link TextDocumentInput document} * with provided request options.

    * - * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-TextAnalyticsRequestOptions-Context} + * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-RecognizePiiEntityOptions-Context} * * @param documents A list of {@link TextDocumentInput documents} to recognize PII entities for. * For text length limits, maximum batch size, and supported text encoding, see * data limits. - * @param options The {@link TextAnalyticsRequestOptions options} to configure the scoring model for documents - * and show statistics. + * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when + * recognizing PII entities. * @param context Additional context that is passed through the Http pipeline during the service call. * * @return A {@link Response} that contains a {@link RecognizePiiEntitiesResultCollection}. @@ -400,7 +430,7 @@ public RecognizePiiEntitiesResultCollection recognizePiiEntitiesBatch( */ @ServiceMethod(returns = ReturnType.SINGLE) public Response recognizePiiEntitiesBatchWithResponse( - Iterable documents, TextAnalyticsRequestOptions options, Context context) { + Iterable documents, RecognizePiiEntityOptions options, Context context) { return client.recognizePiiEntityAsyncClient.recognizePiiEntitiesBatchWithContext(documents, options, context).block(); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntityDomainType.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntityDomainType.java new file mode 100644 index 0000000000000..14ecd715bc674 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/PiiEntityDomainType.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Defines values for PiiEntityDomainType. + */ +@Immutable +public final class PiiEntityDomainType extends ExpandableStringEnum { + /** + * Protected health information (PHI) as the PiiEntityDomainType. + */ + public static final PiiEntityDomainType PROTECTED_HEALTH_INFORMATION = fromString("PHI"); + + /** + * Creates or finds a {@link EntityCategory} from its string representation. + * + * @param name The string name to look for. + * @return The corresponding {@link EntityCategory}. + */ + @JsonCreator + public static PiiEntityDomainType fromString(String name) { + return fromString(name, PiiEntityDomainType.class); + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/RecognizePiiEntityOptions.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/RecognizePiiEntityOptions.java new file mode 100644 index 0000000000000..0de35c0c888cb --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/models/RecognizePiiEntityOptions.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.textanalytics.models; + +import com.azure.core.annotation.Fluent; + +/** + * The {@link RecognizePiiEntityOptions} model. + */ +@Fluent +public class RecognizePiiEntityOptions extends TextAnalyticsRequestOptions { + private PiiEntityDomainType domainFilter; + + /** + * Set the model version. This value indicates which model will be used for scoring, e.g. "latest", "2019-10-01". + * If a model-version is not specified, the API will default to the latest, non-preview version. + * + * @param modelVersion The model version. + * + * @return The {@link RecognizePiiEntityOptions} object itself. + */ + @Override + public RecognizePiiEntityOptions setModelVersion(String modelVersion) { + super.setModelVersion(modelVersion); + return this; + } + + /** + * Set the value of {@code includeStatistics}. + * + * @param includeStatistics If a boolean value was specified in the request this field will contain + * information about the document payload. + * + * @return the {@link RecognizePiiEntityOptions} object itself. + */ + @Override + public RecognizePiiEntityOptions setIncludeStatistics(boolean includeStatistics) { + super.setIncludeStatistics(includeStatistics); + return this; + } + + /** + * Get the value of domainFilter. It filters the response entities to ones only included in the specified domain. + * I.e., if set to 'PHI', will only return entities in the Protected Healthcare Information domain. + * See https://aka.ms/tanerpii for more information. + * + * @return The value of domainFilter. + */ + public PiiEntityDomainType getDomainFilter() { + return domainFilter; + } + + /** + * Set the value of domainFilter. It filters the response entities to ones only included in the specified domain. + * I.e., if set to 'PHI', will only return entities in the Protected Healthcare Information domain. + * See https://aka.ms/tanerpii for more information. + * + * @param domainFilter It filters the response entities to ones only included in the specified domain. + * + * @return The RecognizePiiEntityOptions object itself. + */ + public RecognizePiiEntityOptions setDomainFilter(PiiEntityDomainType domainFilter) { + this.domainFilter = domainFilter; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java index c5ee6138c9f45..5dc10185aaa58 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientJavaDocCodeSnippets.java @@ -12,6 +12,8 @@ import com.azure.ai.textanalytics.models.ExtractKeyPhraseResult; import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.PiiEntityCollection; +import com.azure.ai.textanalytics.models.PiiEntityDomainType; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; @@ -275,17 +277,35 @@ public void recognizePiiEntitiesWithLanguage() { } /** - * Code snippet for {@link TextAnalyticsAsyncClient#recognizePiiEntitiesBatch(Iterable, String, TextAnalyticsRequestOptions)} + * Code snippet for {@link TextAnalyticsAsyncClient#recognizePiiEntities(String, String, RecognizePiiEntityOptions)} + */ + public void recognizePiiEntitiesWithRecognizePiiEntityOptions() { + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntities#string-string-RecognizePiiEntityOptions + String document = "My SSN is 859-98-0987"; + textAnalyticsAsyncClient.recognizePiiEntities(document, "en", + new RecognizePiiEntityOptions().setDomainFilter(PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION)) + .subscribe(piiEntityCollection -> { + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( + "Recognized Personally Identifiable Information entity: %s, entity category: %s," + + " entity subcategory: %s, confidence score: %f.%n", + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + }); + // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntities#string-string-RecognizePiiEntityOptions + } + + /** + * Code snippet for {@link TextAnalyticsAsyncClient#recognizePiiEntitiesBatch(Iterable, String, RecognizePiiEntityOptions)} */ public void recognizePiiEntitiesStringListWithOptions() { - // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-String-TextAnalyticsRequestOptions + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-String-RecognizePiiEntityOptions List documents = Arrays.asList( "My SSN is 859-98-0987.", "Visa card 0111 1111 1111 1111." ); - // Request options: show statistics and model version - TextAnalyticsRequestOptions requestOptions = new TextAnalyticsRequestOptions().setIncludeStatistics(true) + // Show statistics and model version + RecognizePiiEntityOptions requestOptions = new RecognizePiiEntityOptions().setIncludeStatistics(true) .setModelVersion("latest"); textAnalyticsAsyncClient.recognizePiiEntitiesBatch(documents, "en", requestOptions) @@ -304,21 +324,22 @@ public void recognizePiiEntitiesStringListWithOptions() { entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); }); }); - // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-String-TextAnalyticsRequestOptions + // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-String-RecognizePiiEntityOptions } /** * Code snippet for {@link TextAnalyticsAsyncClient#recognizePiiEntitiesBatchWithResponse(Iterable, - * TextAnalyticsRequestOptions)} + * RecognizePiiEntityOptions)} */ public void recognizeBatchPiiEntitiesMaxOverload() { - // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-TextAnalyticsRequestOptions + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-RecognizePiiEntityOptions List textDocumentInputs1 = Arrays.asList( new TextDocumentInput("0", "My SSN is 859-98-0987."), new TextDocumentInput("1", "Visa card 0111 1111 1111 1111.")); - // Request options: show statistics and model version - TextAnalyticsRequestOptions requestOptions = new TextAnalyticsRequestOptions().setIncludeStatistics(true); + // Show statistics and model version + RecognizePiiEntityOptions requestOptions = new RecognizePiiEntityOptions().setIncludeStatistics(true) + .setModelVersion("latest"); textAnalyticsAsyncClient.recognizePiiEntitiesBatchWithResponse(textDocumentInputs1, requestOptions) .subscribe(response -> { @@ -337,7 +358,7 @@ public void recognizeBatchPiiEntitiesMaxOverload() { entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); }); }); - // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-TextAnalyticsRequestOptions + // END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.recognizePiiEntitiesBatch#Iterable-RecognizePiiEntityOptions } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java index 58ddf611b1d3e..b9e562f69a794 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java @@ -13,6 +13,8 @@ import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.PiiEntity; import com.azure.ai.textanalytics.models.PiiEntityCollection; +import com.azure.ai.textanalytics.models.PiiEntityDomainType; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; @@ -279,17 +281,33 @@ public void recognizePiiEntitiesWithLanguage() { } /** - * Code snippet for {@link TextAnalyticsClient#recognizePiiEntitiesBatch(Iterable, String, TextAnalyticsRequestOptions)} + * Code snippet for {@link TextAnalyticsClient#recognizePiiEntities(String, String, RecognizePiiEntityOptions)} + */ + public void recognizePiiEntitiesWithRecognizePiiEntityOptions() { + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntities#String-String-RecognizePiiEntityOptions + PiiEntityCollection piiEntityCollection = textAnalyticsClient.recognizePiiEntities( + "My SSN is 859-98-0987", "en", + new RecognizePiiEntityOptions().setDomainFilter(PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION)); + System.out.printf("Redacted Text: %s%n", piiEntityCollection.getRedactedText()); + piiEntityCollection.forEach(entity -> System.out.printf( + "Recognized Personally Identifiable Information entity: %s, entity category: %s," + + " entity subcategory: %s, confidence score: %f.%n", + entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); + // END: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntities#String-String-RecognizePiiEntityOptions + } + + /** + * Code snippet for {@link TextAnalyticsClient#recognizePiiEntitiesBatch(Iterable, String, RecognizePiiEntityOptions)} */ public void recognizePiiEntitiesStringListWithOptions() { - // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-String-TextAnalyticsRequestOptions + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-String-RecognizePiiEntityOptions List documents = Arrays.asList( "My SSN is 859-98-0987", "Visa card 4111 1111 1111 1111" ); RecognizePiiEntitiesResultCollection resultCollection = textAnalyticsClient.recognizePiiEntitiesBatch( - documents, "en", new TextAnalyticsRequestOptions().setIncludeStatistics(true)); + documents, "en", new RecognizePiiEntityOptions().setIncludeStatistics(true)); // Batch statistics TextDocumentBatchStatistics batchStatistics = resultCollection.getStatistics(); @@ -304,14 +322,14 @@ public void recognizePiiEntitiesStringListWithOptions() { + " entity subcategory: %s, confidence score: %f.%n", entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); }); - // END: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-String-TextAnalyticsRequestOptions + // END: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-String-RecognizePiiEntityOptions } /** - * Code snippet for {@link TextAnalyticsClient#recognizePiiEntitiesBatchWithResponse(Iterable, TextAnalyticsRequestOptions, Context)} + * Code snippet for {@link TextAnalyticsClient#recognizePiiEntitiesBatchWithResponse(Iterable, RecognizePiiEntityOptions, Context)} */ public void recognizeBatchPiiEntitiesMaxOverload() { - // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-TextAnalyticsRequestOptions-Context + // BEGIN: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-RecognizePiiEntityOptions-Context List textDocumentInputs = Arrays.asList( new TextDocumentInput("0", "My SSN is 859-98-0987"), new TextDocumentInput("1", "Visa card 4111 1111 1111 1111") @@ -319,7 +337,7 @@ public void recognizeBatchPiiEntitiesMaxOverload() { Response response = textAnalyticsClient.recognizePiiEntitiesBatchWithResponse(textDocumentInputs, - new TextAnalyticsRequestOptions().setIncludeStatistics(true), Context.NONE); + new RecognizePiiEntityOptions().setIncludeStatistics(true), Context.NONE); RecognizePiiEntitiesResultCollection resultCollection = response.getValue(); @@ -336,7 +354,7 @@ public void recognizeBatchPiiEntitiesMaxOverload() { + " entity subcategory: %s, confidence score: %f.%n", entity.getText(), entity.getCategory(), entity.getSubcategory(), entity.getConfidenceScore())); }); - // END: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-TextAnalyticsRequestOptions-Context + // END: com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-RecognizePiiEntityOptions-Context } // Linked Entity diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java index a3e7512ec877d..dff74e566dee6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocuments.java @@ -7,7 +7,7 @@ import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; -import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; import com.azure.ai.textanalytics.models.TextDocumentInput; import com.azure.ai.textanalytics.util.RecognizePiiEntitiesResultCollection; @@ -42,12 +42,12 @@ public static void main(String[] args) { new TextDocumentInput("2", "Visa card 4111 1111 1111 1111").setLanguage("en") ); - // Request options: show statistics and model version - TextAnalyticsRequestOptions requestOptions = new TextAnalyticsRequestOptions().setIncludeStatistics(true).setModelVersion("latest"); + // Show statistics and model version + RecognizePiiEntityOptions options = new RecognizePiiEntityOptions().setIncludeStatistics(true).setModelVersion("latest"); // Recognizing Personally Identifiable Information entities for each document in a batch of documents Response piiEntitiesBatchResultResponse = - client.recognizePiiEntitiesBatchWithResponse(documents, requestOptions, Context.NONE); + client.recognizePiiEntitiesBatchWithResponse(documents, options, Context.NONE); // Response's status code System.out.printf("Status code of request response: %d%n", piiEntitiesBatchResultResponse.getStatusCode()); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java index 867166b0d4670..d6bc1e86c4cf6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchDocumentsAsync.java @@ -7,7 +7,7 @@ import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; -import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; import com.azure.ai.textanalytics.models.TextDocumentInput; import com.azure.ai.textanalytics.util.RecognizePiiEntitiesResultCollection; @@ -41,11 +41,11 @@ public static void main(String[] args) { new TextDocumentInput("2", "Visa card 4111 1111 1111 1111").setLanguage("en") ); - // Request options: show statistics and model version - TextAnalyticsRequestOptions requestOptions = new TextAnalyticsRequestOptions().setIncludeStatistics(true).setModelVersion("latest"); + // Show statistics and model version + RecognizePiiEntityOptions options = new RecognizePiiEntityOptions().setIncludeStatistics(true).setModelVersion("latest"); // Recognizing Personally Identifiable Information entities for each document in a batch of documents - client.recognizePiiEntitiesBatchWithResponse(documents, requestOptions).subscribe( + client.recognizePiiEntitiesBatchWithResponse(documents, options).subscribe( entitiesBatchResultResponse -> { // Response's status code System.out.printf("Status code of request response: %d%n", entitiesBatchResultResponse.getStatusCode()); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java index 8df44607f383a..99004a677d1f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocuments.java @@ -7,7 +7,7 @@ import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; -import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; import com.azure.ai.textanalytics.util.RecognizePiiEntitiesResultCollection; import com.azure.core.credential.AzureKeyCredential; @@ -39,11 +39,11 @@ public static void main(String[] args) { "Visa card 4111 1111 1111 1111" ); - // Request options: show statistics and model version - TextAnalyticsRequestOptions requestOptions = new TextAnalyticsRequestOptions().setIncludeStatistics(true).setModelVersion("latest"); + // Show statistics and model version + RecognizePiiEntityOptions options = new RecognizePiiEntityOptions().setIncludeStatistics(true).setModelVersion("latest"); // Recognizing Personally Identifiable Information entities for each document in a batch of documents - RecognizePiiEntitiesResultCollection recognizePiiEntitiesResultCollection = client.recognizePiiEntitiesBatch(documents, "en", requestOptions); + RecognizePiiEntitiesResultCollection recognizePiiEntitiesResultCollection = client.recognizePiiEntitiesBatch(documents, "en", options); // Model version System.out.printf("Results of Azure Text Analytics \"Personally Identifiable Information Entities Recognition\" Model, version: %s%n", recognizePiiEntitiesResultCollection.getModelVersion()); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocumentsAsync.java b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocumentsAsync.java index 73e621ef14515..76e17975e2438 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocumentsAsync.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/samples/java/com/azure/ai/textanalytics/batch/RecognizePiiEntitiesBatchStringDocumentsAsync.java @@ -7,7 +7,7 @@ import com.azure.ai.textanalytics.TextAnalyticsClientBuilder; import com.azure.ai.textanalytics.models.PiiEntityCollection; import com.azure.ai.textanalytics.models.RecognizePiiEntitiesResult; -import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.TextDocumentBatchStatistics; import com.azure.core.credential.AzureKeyCredential; @@ -39,12 +39,12 @@ public static void main(String[] args) { "Visa card 4111 1111 1111 1111" ); - // Request options: show statistics and model version - TextAnalyticsRequestOptions requestOptions = new TextAnalyticsRequestOptions().setIncludeStatistics(true).setModelVersion("latest"); + // Show statistics and model version + RecognizePiiEntityOptions options = new RecognizePiiEntityOptions().setIncludeStatistics(true).setModelVersion("latest"); // Recognizing Personally Identifiable Information entities for each document in a batch of documents AtomicInteger counter = new AtomicInteger(); - client.recognizePiiEntitiesBatch(documents, "en", requestOptions).subscribe( + client.recognizePiiEntitiesBatch(documents, "en", options).subscribe( recognizePiiEntitiesResultCollection -> { // Model version System.out.printf("Results of Azure Text Analytics \"Personally Identifiable Information Entities Recognition\" Model, version: %s%n", recognizePiiEntitiesResultCollection.getModelVersion()); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java index 1cc804da9f57f..9ffa80b854bb0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TestUtils.java @@ -247,6 +247,27 @@ static RecognizePiiEntitiesResultCollection getExpectedBatchPiiEntities() { new TextDocumentBatchStatistics(2, 2, 0, 2)); } + /** + * Helper method to get the expected batch of Personally Identifiable Information entities for domain filter + */ + static RecognizePiiEntitiesResultCollection getExpectedBatchPiiEntitiesForDomainFilter() { + PiiEntityCollection piiEntityCollection = new PiiEntityCollection( + new IterableStream<>(Arrays.asList(getPiiEntitiesList1().get(1))), + "Microsoft employee with ssn *********** is using our awesome API's.", null); + PiiEntityCollection piiEntityCollection2 = new PiiEntityCollection( + new IterableStream<>(Arrays.asList(getPiiEntitiesList2().get(0), getPiiEntitiesList2().get(1), getPiiEntitiesList2().get(2))), + "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", null); + TextDocumentStatistics textDocumentStatistics1 = new TextDocumentStatistics(67, 1); + TextDocumentStatistics textDocumentStatistics2 = new TextDocumentStatistics(105, 1); + RecognizePiiEntitiesResult recognizeEntitiesResult1 = new RecognizePiiEntitiesResult("0", textDocumentStatistics1, null, piiEntityCollection); + RecognizePiiEntitiesResult recognizeEntitiesResult2 = new RecognizePiiEntitiesResult("1", textDocumentStatistics2, null, piiEntityCollection2); + + return new RecognizePiiEntitiesResultCollection( + asList(recognizeEntitiesResult1, recognizeEntitiesResult2), + DEFAULT_MODEL_VERSION, + new TextDocumentBatchStatistics(2, 2, 0, 2)); + } + /** * Helper method to get the expected Categorized Entities List 1 */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java index eaea7f9d9d599..f12b48da5ddde 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java @@ -5,6 +5,8 @@ import com.azure.ai.textanalytics.models.AnalyzeSentimentOptions; import com.azure.ai.textanalytics.models.DocumentSentiment; +import com.azure.ai.textanalytics.models.PiiEntityDomainType; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.SentimentConfidenceScores; import com.azure.ai.textanalytics.models.TextAnalyticsError; @@ -37,6 +39,7 @@ import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchKeyPhrases; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchLinkedEntities; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchPiiEntities; +import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchPiiEntitiesForDomainFilter; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchTextSentiment; import static com.azure.ai.textanalytics.TestUtils.getExpectedDocumentSentiment; import static com.azure.ai.textanalytics.TestUtils.getLinkedEntitiesList1; @@ -739,6 +742,39 @@ public void recognizePiiEntitiesZalgoText(HttpClient httpClient, TextAnalyticsSe ); } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + recognizePiiDomainFilterRunner((document, options) -> + StepVerifier.create(client.recognizePiiEntities(document, "en", options)) + .assertNext(response -> validatePiiEntities(Arrays.asList(getPiiEntitiesList1().get(1)), + response.stream().collect(Collectors.toList()))) + .verifyComplete()); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesForBatchInputStringForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + recognizePiiLanguageHintRunner((inputs, language) -> + StepVerifier.create(client.recognizePiiEntitiesBatch(inputs, language, + new RecognizePiiEntityOptions().setDomainFilter(PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION))) + .assertNext(response -> validatePiiEntitiesResultCollection(false, getExpectedBatchPiiEntitiesForDomainFilter(), response)) + .verifyComplete()); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesForBatchInputForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); + recognizeBatchPiiEntitiesRunner((inputs) -> + StepVerifier.create(client.recognizePiiEntitiesBatchWithResponse(inputs, + new RecognizePiiEntityOptions().setDomainFilter(PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION))) + .assertNext(response -> validatePiiEntitiesResultCollectionWithResponse(false, getExpectedBatchPiiEntitiesForDomainFilter(), 200, response)) + .verifyComplete()); + } + // Linked Entities @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java index 8eeec4158af8e..a629245699734 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTest.java @@ -8,6 +8,8 @@ import com.azure.ai.textanalytics.models.DocumentSentiment; import com.azure.ai.textanalytics.models.LinkedEntity; import com.azure.ai.textanalytics.models.PiiEntityCollection; +import com.azure.ai.textanalytics.models.PiiEntityDomainType; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.SentimentConfidenceScores; import com.azure.ai.textanalytics.models.TextAnalyticsError; @@ -42,6 +44,7 @@ import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchKeyPhrases; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchLinkedEntities; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchPiiEntities; +import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchPiiEntitiesForDomainFilter; import static com.azure.ai.textanalytics.TestUtils.getExpectedBatchTextSentiment; import static com.azure.ai.textanalytics.TestUtils.getExpectedDocumentSentiment; import static com.azure.ai.textanalytics.TestUtils.getLinkedEntitiesList1; @@ -713,6 +716,38 @@ public void recognizePiiEntitiesZalgoText(HttpClient httpClient, TextAnalyticsSe }, PII_ENTITY_OFFSET_INPUT); } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + recognizePiiDomainFilterRunner((document, options) -> { + final PiiEntityCollection entities = client.recognizePiiEntities(document, "en", options); + validatePiiEntities(Arrays.asList(getPiiEntitiesList1().get(1)), entities.stream().collect(Collectors.toList())); + }); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesForBatchInputStringForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + recognizePiiLanguageHintRunner((inputs, language) -> { + final RecognizePiiEntitiesResultCollection response = client.recognizePiiEntitiesBatch(inputs, language, + new RecognizePiiEntityOptions().setDomainFilter(PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION)); + validatePiiEntitiesResultCollection(false, getExpectedBatchPiiEntitiesForDomainFilter(), response); + }); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.textanalytics.TestUtils#getTestParameters") + public void recognizePiiEntitiesForBatchInputForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion) { + client = getTextAnalyticsClient(httpClient, serviceVersion); + recognizeBatchPiiEntitiesRunner((inputs) -> { + final Response response = client.recognizePiiEntitiesBatchWithResponse(inputs, + new RecognizePiiEntityOptions().setDomainFilter(PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION), Context.NONE); + validatePiiEntitiesResultCollectionWithResponse(false, getExpectedBatchPiiEntitiesForDomainFilter(), 200, response); + }); + } + // Recognize linked entity @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java index b03c9a39779a5..843411186104c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java @@ -15,6 +15,8 @@ import com.azure.ai.textanalytics.models.OpinionSentiment; import com.azure.ai.textanalytics.models.PiiEntity; import com.azure.ai.textanalytics.models.PiiEntityCollection; +import com.azure.ai.textanalytics.models.PiiEntityDomainType; +import com.azure.ai.textanalytics.models.RecognizePiiEntityOptions; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.TextAnalyticsError; import com.azure.ai.textanalytics.models.TextAnalyticsRequestOptions; @@ -157,6 +159,15 @@ public abstract class TextAnalyticsClientTestBase extends TestBase { @Test abstract void recognizePiiEntitiesBatchTooManyDocuments(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + @Test + abstract void recognizePiiEntitiesForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void recognizePiiEntitiesForBatchInputStringForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + + @Test + abstract void recognizePiiEntitiesForBatchInputForDomainFilter(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); + // Linked Entities @Test abstract void recognizeLinkedEntitiesForTextInput(HttpClient httpClient, TextAnalyticsServiceVersion serviceVersion); @@ -369,6 +380,11 @@ void recognizePiiSingleDocumentRunner(Consumer testRunner) { testRunner.accept(PII_ENTITY_INPUTS.get(0)); } + void recognizePiiDomainFilterRunner(BiConsumer testRunner) { + testRunner.accept(PII_ENTITY_INPUTS.get(0), + new RecognizePiiEntityOptions().setDomainFilter(PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION)); + } + void recognizePiiLanguageHintRunner(BiConsumer, String> testRunner) { testRunner.accept(PII_ENTITY_INPUTS, "en"); } @@ -391,16 +407,16 @@ void recognizeBatchPiiEntitiesRunner(Consumer> testRunne } void recognizeBatchPiiEntitiesShowStatsRunner( - BiConsumer, TextAnalyticsRequestOptions> testRunner) { + BiConsumer, RecognizePiiEntityOptions> testRunner) { final List textDocumentInputs = TestUtils.getTextDocumentInputs(PII_ENTITY_INPUTS); - TextAnalyticsRequestOptions options = new TextAnalyticsRequestOptions().setIncludeStatistics(true); + RecognizePiiEntityOptions options = new RecognizePiiEntityOptions().setIncludeStatistics(true); testRunner.accept(textDocumentInputs, options); } void recognizeStringBatchPiiEntitiesShowStatsRunner( - BiConsumer, TextAnalyticsRequestOptions> testRunner) { - testRunner.accept(PII_ENTITY_INPUTS, new TextAnalyticsRequestOptions().setIncludeStatistics(true)); + BiConsumer, RecognizePiiEntityOptions> testRunner) { + testRunner.accept(PII_ENTITY_INPUTS, new RecognizePiiEntityOptions().setIncludeStatistics(true)); } // Linked Entity runner @@ -439,7 +455,7 @@ void recognizeBatchLinkedEntityDuplicateIdRunner(Consumer testRunner) { testRunner.accept(KEY_PHRASE_INPUTS.get(1)); - }; + } void extractBatchStringKeyPhrasesShowStatsRunner(BiConsumer, TextAnalyticsRequestOptions> testRunner) { testRunner.accept(KEY_PHRASE_INPUTS, new TextAnalyticsRequestOptions().setIncludeStatistics(true)); diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputForDomainFilter.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputForDomainFilter.json new file mode 100644 index 0000000000000..daf76590799c6 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputForDomainFilter.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d12860b5-4b4d-4277-9064-1512b84f289c", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "122", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", + "apim-request-id" : "8eddd6a4-0d46-438e-b359-16ef4b9085ec", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"Microsoft employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 22:35:33 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputStringForDomainFilter.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputStringForDomainFilter.json new file mode 100644 index 0000000000000..d6a86af10902e --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForBatchInputStringForDomainFilter.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7051662f-b272-4857-951f-327fd231943c", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "123", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", + "apim-request-id" : "43ac1d18-4460-4fef-8dbc-9f8b0371e11d", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"Microsoft employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"redactedText\":\"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.\",\"id\":\"1\",\"entities\":[{\"text\":\"111000025\",\"category\":\"Phone Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"111000025\",\"category\":\"ABA Routing Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.75},{\"text\":\"111000025\",\"category\":\"New Zealand Social Welfare Number\",\"offset\":18,\"length\":9,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 22:35:52 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForDomainFilter.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForDomainFilter.json new file mode 100644 index 0000000000000..49046bfa7c2e3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizePiiEntitiesForDomainFilter.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.azure-api.net/text/analytics/v3.1-preview.2//entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=Utf16CodeUnit", + "Headers" : { + "User-Agent" : "azsdk-java-azure-ai-textanalytics/5.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8be63659-d554-4018-87e4-60c9d3d6fcf6", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-envoy-upstream-service-time" : "100", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", + "x-content-type-options" : "nosniff", + "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", + "apim-request-id" : "ccca32ce-1053-4ad0-b7ef-adec5308bd68", + "retry-after" : "0", + "StatusCode" : "200", + "Body" : "{\"documents\":[{\"redactedText\":\"Microsoft employee with ssn *********** is using our awesome API's.\",\"id\":\"0\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"U.S. Social Security Number (SSN)\",\"offset\":28,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-07-01\"}", + "Date" : "Thu, 03 Sep 2020 22:35:58 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file From 3d918ccc66e0d91d517353f34e8773e33a8250d5 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Thu, 3 Sep 2020 17:34:10 -0700 Subject: [PATCH 088/168] Updated CHANGELOGs and READMEs for September 2020 release (#14761) --- eng/jacoco-test-coverage/pom.xml | 10 ++++---- eng/versioning/version_client.txt | 14 +++++------ sdk/core/azure-core-amqp/pom.xml | 2 +- sdk/core/azure-core-experimental/CHANGELOG.md | 4 +++- sdk/core/azure-core-experimental/README.md | 2 +- sdk/core/azure-core-experimental/pom.xml | 2 +- .../azure-core-http-jdk-httpclient/pom.xml | 8 +++---- sdk/core/azure-core-http-netty/CHANGELOG.md | 6 ++++- sdk/core/azure-core-http-netty/README.md | 2 +- sdk/core/azure-core-http-netty/pom.xml | 10 ++++---- sdk/core/azure-core-http-okhttp/CHANGELOG.md | 6 ++++- sdk/core/azure-core-http-okhttp/README.md | 2 +- sdk/core/azure-core-http-okhttp/pom.xml | 10 ++++---- sdk/core/azure-core-management/pom.xml | 4 ++-- .../CHANGELOG.md | 4 +++- .../README.md | 2 +- .../azure-core-serializer-avro-apache/pom.xml | 2 +- .../pom.xml | 2 +- .../CHANGELOG.md | 3 ++- .../azure-core-serializer-json-gson/README.md | 2 +- .../azure-core-serializer-json-gson/pom.xml | 4 ++-- .../CHANGELOG.md | 3 ++- .../README.md | 2 +- .../pom.xml | 4 ++-- sdk/core/azure-core-test/CHANGELOG.md | 3 ++- sdk/core/azure-core-test/README.md | 2 +- sdk/core/azure-core-test/pom.xml | 4 ++-- .../azure-core-tracing-opentelemetry/pom.xml | 4 ++-- sdk/core/azure-core/CHANGELOG.md | 12 ++++++---- sdk/core/azure-core/README.md | 24 +++++++++---------- sdk/core/azure-core/pom.xml | 2 +- sdk/e2e/pom.xml | 6 ++--- sdk/tables/azure-data-tables/pom.xml | 2 +- 33 files changed, 94 insertions(+), 75 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 73c7a64ef1219..1cd6d904b8566 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -54,7 +54,7 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 com.azure @@ -74,12 +74,12 @@ com.azure azure-core-http-netty - 1.6.0-beta.1 + 1.6.0 com.azure azure-core-http-okhttp - 1.3.0-beta.1 + 1.3.0 com.azure @@ -94,12 +94,12 @@ com.azure azure-core-serializer-json-gson - 1.0.0-beta.4 + 1.0.0 com.azure azure-core-serializer-json-jackson - 1.0.0-beta.4 + 1.0.0 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 2f0c65e388a67..6ab9606da2c7c 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -7,18 +7,18 @@ com.azure:azure-client-sdk-parent;1.7.0;1.7.0 com.azure:azure-ai-anomalydetector;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-ai-formrecognizer;3.0.0;3.1.0-beta.1 com.azure:azure-ai-textanalytics;5.0.0;5.1.0-beta.1 -com.azure:azure-core;1.7.0;1.8.0-beta.1 +com.azure:azure-core;1.7.0;1.8.0 com.azure:azure-core-amqp;1.4.0;1.5.0-beta.1 com.azure:azure-core-experimental;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-core-http-netty;1.5.4;1.6.0-beta.1 -com.azure:azure-core-http-okhttp;1.2.5;1.3.0-beta.1 +com.azure:azure-core-http-netty;1.5.4;1.6.0 +com.azure:azure-core-http-okhttp;1.2.5;1.3.0 com.azure:azure-core-management;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-core-serializer-avro-apache;1.0.0-beta.1;1.0.0-beta.2 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.0.0-beta.3;1.0.0-beta.4 -com.azure:azure-core-serializer-json-jackson;1.0.0-beta.3;1.0.0-beta.4 -com.azure:azure-core-test;1.4.0;1.5.0-beta.1 +com.azure:azure-core-serializer-json-gson;1.0.0-beta.3;1.0.0 +com.azure:azure-core-serializer-json-jackson;1.0.0-beta.3;1.0.0 +com.azure:azure-core-test;1.4.0;1.4.1 com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.6;1.0.0-beta.7 com.azure:azure-cosmos;4.3.1;4.4.0-beta.2 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 @@ -129,7 +129,7 @@ com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;1.2.8-beta.1;1.2. # Format; # unreleased_:;dependency-version # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. -unreleased_com.azure:azure-core;1.8.0-beta.1 +unreleased_com.azure:azure-core;1.8.0 unreleased_com.azure:azure-core-amqp;1.5.0-beta.1 unreleased_com.azure:azure-messaging-servicebus;7.0.0-beta.5 unreleased_com.azure:azure-security-keyvault-keys;4.3.0-beta.1 diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml index 4d760e6c9bfb7..b5a4414e75a87 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.8.0-beta.1 + 1.8.0 com.microsoft.azure diff --git a/sdk/core/azure-core-experimental/CHANGELOG.md b/sdk/core/azure-core-experimental/CHANGELOG.md index 5ed7147bf574a..ab66d7a57dcdb 100644 --- a/sdk/core/azure-core-experimental/CHANGELOG.md +++ b/sdk/core/azure-core-experimental/CHANGELOG.md @@ -1,7 +1,9 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.3 (2020-09-03) +- Added `AvroSerializer` interface containing Avro specific serializer APIs. +- Added `AvroSerializerProvider` interface as a service provider for `AvroSerializer`. ## 1.0.0-beta.2 (2020-08-07) diff --git a/sdk/core/azure-core-experimental/README.md b/sdk/core/azure-core-experimental/README.md index 60a4defc39581..92eafdb5a578d 100644 --- a/sdk/core/azure-core-experimental/README.md +++ b/sdk/core/azure-core-experimental/README.md @@ -17,7 +17,7 @@ Azure Core Experimental contains types that are being evaluated and might eventu com.azure azure-core-experimental - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-experimental/pom.xml b/sdk/core/azure-core-experimental/pom.xml index 4a9bc1432a6a8..3b41467420919 100644 --- a/sdk/core/azure-core-experimental/pom.xml +++ b/sdk/core/azure-core-experimental/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 diff --git a/sdk/core/azure-core-http-jdk-httpclient/pom.xml b/sdk/core/azure-core-http-jdk-httpclient/pom.xml index 1c270690998b0..3fd3958871780 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.8.0-beta.1 + 1.8.0 com.azure azure-core - 1.8.0-beta.1 + 1.8.0 test-jar test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.1 test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.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 8bf434fd5fab4..f2648881cce7e 100644 --- a/sdk/core/azure-core-http-netty/CHANGELOG.md +++ b/sdk/core/azure-core-http-netty/CHANGELOG.md @@ -1,7 +1,11 @@ # Release History -## 1.6.0-beta.1 (Unreleased) +## 1.6.0 (2020-09-03) +- Added new APIs to configure request write timeout, response timeout, and response body read timeout. +- Changed default timeouts from infinite to 60 seconds. +- Updated `reactor-core` version to `3.3.9.RELEASE`. +- Updated `reactor-netty` version to `0.9.11.RELEASE`. ## 1.5.4 (2020-08-07) diff --git a/sdk/core/azure-core-http-netty/README.md b/sdk/core/azure-core-http-netty/README.md index 8566d3cc33823..c87567b981a7b 100644 --- a/sdk/core/azure-core-http-netty/README.md +++ b/sdk/core/azure-core-http-netty/README.md @@ -15,7 +15,7 @@ Azure Core Netty HTTP client is a plugin for the `azure-core` HTTP client API. com.azure azure-core-http-netty - 1.5.4 + 1.6.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml index 5ad4bf299b9d7..a220d926bea37 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.6.0-beta.1 + 1.6.0 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.8.0-beta.1 + 1.8.0 @@ -117,20 +117,20 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 test-jar test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.1 test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.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 689bfab90119d..dd70b44544b61 100644 --- a/sdk/core/azure-core-http-okhttp/CHANGELOG.md +++ b/sdk/core/azure-core-http-okhttp/CHANGELOG.md @@ -1,7 +1,11 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0 (2020-09-03) +- Updated `okhttp` dependency from `4.2.2` to `4.8.1`. +- Fixed bug where `Configuration` proxy would lead to a `NullPointerException` when set. +- Added request timeout configuration. +- Changed default connect timeout from 60 seconds to 10 and default read timeout from 120 seconds to 60 seconds. ## 1.2.5 (2020-08-07) diff --git a/sdk/core/azure-core-http-okhttp/README.md b/sdk/core/azure-core-http-okhttp/README.md index aeeb676d32400..34a5a5d17a0fd 100644 --- a/sdk/core/azure-core-http-okhttp/README.md +++ b/sdk/core/azure-core-http-okhttp/README.md @@ -15,7 +15,7 @@ Azure Core OkHttp HTTP client is a plugin for the `azure-core` HTTP client API. com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml index 97d28946d6371..19f2f1e55861a 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.3.0-beta.1 + 1.3.0 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.8.0-beta.1 + 1.8.0 @@ -73,20 +73,20 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 test-jar test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.1 test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.1 test-jar test diff --git a/sdk/core/azure-core-management/pom.xml b/sdk/core/azure-core-management/pom.xml index 984abfcc49c1e..19ad0867f3810 100644 --- a/sdk/core/azure-core-management/pom.xml +++ b/sdk/core/azure-core-management/pom.xml @@ -59,7 +59,7 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.6.0-beta.1 + 1.6.0 test diff --git a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md index 148d9840f5cab..096eade31d3f9 100644 --- a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md @@ -1,7 +1,9 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2020-09-03) +- Updated `ApacheAvroSerializer` to implement `AvroSerializer` instead of `ObjectSerializer`. +- Added implementation for `AvroSerializerProvider`. ## 1.0.0-beta.1 (2020-07-16) diff --git a/sdk/core/azure-core-serializer-avro-apache/README.md b/sdk/core/azure-core-serializer-avro-apache/README.md index 0206e732ce4a1..6363759389b6c 100644 --- a/sdk/core/azure-core-serializer-avro-apache/README.md +++ b/sdk/core/azure-core-serializer-avro-apache/README.md @@ -15,7 +15,7 @@ Azure Core Apache Avro Serializer is a plugin for the `azure-core` `AvroSerializ com.azure azure-core-serializer-avro-apache - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-serializer-avro-apache/pom.xml b/sdk/core/azure-core-serializer-avro-apache/pom.xml index e566fac2112f1..f8d28bff2411b 100644 --- a/sdk/core/azure-core-serializer-avro-apache/pom.xml +++ b/sdk/core/azure-core-serializer-avro-apache/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 com.azure diff --git a/sdk/core/azure-core-serializer-avro-jackson/pom.xml b/sdk/core/azure-core-serializer-avro-jackson/pom.xml index c0a29501f3200..eec3239746c5f 100644 --- a/sdk/core/azure-core-serializer-avro-jackson/pom.xml +++ b/sdk/core/azure-core-serializer-avro-jackson/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 com.azure diff --git a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md index a46a69379259c..52ea81359c3fb 100644 --- a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0 (2020-09-03) +- Initial GA. ## 1.0.0-beta.3 (2020-08-12) diff --git a/sdk/core/azure-core-serializer-json-gson/README.md b/sdk/core/azure-core-serializer-json-gson/README.md index 92e479394b3ab..c324c60ddf3bf 100644 --- a/sdk/core/azure-core-serializer-json-gson/README.md +++ b/sdk/core/azure-core-serializer-json-gson/README.md @@ -15,7 +15,7 @@ Azure Core Gson JSON Serializer is a plugin for the `azure-core` `JsonSerializer com.azure azure-core-serializer-json-gson - 1.0.0-beta.3 + 1.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-serializer-json-gson/pom.xml b/sdk/core/azure-core-serializer-json-gson/pom.xml index b455861b91f70..a49b0caf7714a 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.0.0-beta.4 + 1.0.0 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.8.0-beta.1 + 1.8.0 diff --git a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md index fe38ef682db27..d31da6e5a28a3 100644 --- a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0 (2020-09-03) +- Initial GA. ## 1.0.0-beta.3 (2020-08-12) diff --git a/sdk/core/azure-core-serializer-json-jackson/README.md b/sdk/core/azure-core-serializer-json-jackson/README.md index 06d4ea5fb8611..99f51c87d72ae 100644 --- a/sdk/core/azure-core-serializer-json-jackson/README.md +++ b/sdk/core/azure-core-serializer-json-jackson/README.md @@ -15,7 +15,7 @@ Azure Core Jackson JSON Serializer is a plugin for the `azure-core` `JsonSeriali com.azure azure-core-serializer-json-jackson - 1.0.0-beta.3 + 1.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-serializer-json-jackson/pom.xml b/sdk/core/azure-core-serializer-json-jackson/pom.xml index a9edcbebff664..efe57f0708990 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.0.0-beta.4 + 1.0.0 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.8.0-beta.1 + 1.8.0 diff --git a/sdk/core/azure-core-test/CHANGELOG.md b/sdk/core/azure-core-test/CHANGELOG.md index 4b64902dbec67..8a204e2c404ae 100644 --- a/sdk/core/azure-core-test/CHANGELOG.md +++ b/sdk/core/azure-core-test/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.5.0-beta.1 (Unreleased) +## 1.4.1 (2020-09-03) +- Updated `azure-core` dependency. ## 1.4.0 (2020-08-07) diff --git a/sdk/core/azure-core-test/README.md b/sdk/core/azure-core-test/README.md index 82121890e55a7..1f3a054649ee9 100644 --- a/sdk/core/azure-core-test/README.md +++ b/sdk/core/azure-core-test/README.md @@ -18,7 +18,7 @@ To use this package, add the following to your _pom.xml_. com.azure azure-core-test - 1.4.0 + 1.4.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index fd299b6c6e882..5d3d64ccb0e13 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.5.0-beta.1 + 1.4.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.8.0-beta.1 + 1.8.0 diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml index 88b874aeacfd9..11a28e9170207 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml +++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml @@ -40,7 +40,7 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 io.grpc @@ -58,7 +58,7 @@ com.azure azure-core-http-netty - 1.6.0-beta.1 + 1.6.0 test diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 391723c39f5b0..3a41b7a587f2a 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,14 +1,18 @@ # Release History -## 1.8.0-beta.1 (Unreleased) +## 1.8.0 (2020-09-03) +- General performance fixes for serialization, URL modification and parsing, and more. +- New `InputStream` and `OutputStream` APIs for serialization and deserialization. +- Added logging for the request attempt count to better correlate when requests are retried. +- Improved request and response body logging performance by using bulk `ByteBuffer` reading instead of byte by byte reading. +- Fixed bug where header logging checked for a log level of not equals `verbose` instead of equals `verbose`. +- Updated `reactor-core` version to `3.3.9.RELEASE`. +- Updated FasterXML Jackson versions to `2.11.2`. ## 1.7.0 (2020-08-07) - Updated `reactor-core` version to `3.3.8.RELEASE`. -- Updated `reactor-netty` version to `0.9.10.RELEASE`. -- Updated `netty` version to `4.1.51.Final`. -- Updated `netty-tcnative` version to `2.0.31.Final`. - Updated handling of `OffsetDateTime` serialization to implicitly convert date strings missing time zone into UTC. - Updated `PollerFlux` and `SyncPoller` to propagate exceptions when polling instead of only on failed statuses. - Redesigned `SimpleTokenCache` to gracefully attempt a token refresh 5 minutes before actual expiry diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index 0bb93e1a0b026..a6aaa1b3dd844 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -2,13 +2,13 @@ [![Build Documentation](https://img.shields.io/badge/documentation-published-blue.svg)](https://azure.github.io/azure-sdk-for-java) -Azure Core provides shared primitives, abstractions, and helpers for modern Java Azure SDK client libraries. -These libraries follow the [Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java_introduction.html) -and can be easily identified by package names starting with `com.azure` and module names starting with `azure-`, -e.g. `com.azure.storage.blobs` would be found within the `/sdk/storage/azure-storage-blob` directory. A more complete +Azure Core provides shared primitives, abstractions, and helpers for modern Java Azure SDK client libraries. +These libraries follow the [Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java_introduction.html) +and can be easily identified by package names starting with `com.azure` and module names starting with `azure-`, +e.g. `com.azure.storage.blobs` would be found within the `/sdk/storage/azure-storage-blob` directory. A more complete list of client libraries using Azure Core can be found [here](https://azure.github.io/azure-sdk/releases/latest/#java-packages). -Azure Core allows client libraries to expose common functionality consistently, so that once you learn how to use these +Azure Core allows client libraries to expose common functionality consistently, so that once you learn how to use these APIs in one client library, you will know how to use them in other client libraries. ## Getting started @@ -19,7 +19,7 @@ APIs in one client library, you will know how to use them in other client librar ### Include the package -Typically, you won't need to install or depend on Azure Core, instead it will be transitively downloaded by your build +Typically, you won't need to install or depend on Azure Core, instead it will be transitively downloaded by your build tool when you depend on client libraries using it. [//]: # ({x-version-update-start;com.azure:azure-core;current}) @@ -27,7 +27,7 @@ tool when you depend on client libraries using it. com.azure azure-core - 1.7.0 + 1.8.0 ``` [//]: # ({x-version-update-end}) @@ -51,22 +51,22 @@ These will be introduced by way of the examples presented below. _Service clients_ have methods that call Azure services, we refer call these methods _service methods_. -_Service methods_ can return a shared Azure Core type `Response`. This type provides access to both the +_Service methods_ can return a shared Azure Core type `Response`. This type provides access to both the deserialized result of the service call and to the details of the HTTP response returned from the server. ### HTTP pipelines with `HttpPipeline` -`HttpPipeline` is a construct that contains a list of `HttpPipelinePolicy` which are applied to a request +`HttpPipeline` is a construct that contains a list of `HttpPipelinePolicy` which are applied to a request sequentially to prepare it being sent by an `HttpClient`. ### Exception Hierarchy with `AzureException` -`AzureException` is the root exception in the hierarchy used in Azure Core. Additional exceptions such as +`AzureException` is the root exception in the hierarchy used in Azure Core. Additional exceptions such as `HttpRequestException` and `HttpResponseException` are used to reduce the scope of exception reasons. ### Pagination with `ContinuablePagedFlux` -`ContinuablePageFlux` manages sending an initial page request to a service and retrieving additional pages as the +`ContinuablePageFlux` manages sending an initial page request to a service and retrieving additional pages as the consumer requests more data until the consumer finishes processing or all pages have been consumed. ### Long Running Operations with `PollerFlux` @@ -79,7 +79,7 @@ Get started with Azure libraries that are [built using Azure Core](https://azure ## Troubleshooting -If you encounter any bugs, please file issues via [GitHub Issues](https://github.com/Azure/azure-sdk-for-java/issues/new/choose) +If you encounter any bugs, please file issues via [GitHub Issues](https://github.com/Azure/azure-sdk-for-java/issues/new/choose) or checkout [StackOverflow for Azure Java SDK](http://stackoverflow.com/questions/tagged/azure-java-sdk). ### Enabling Logging diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index 991a3ad4ef0ef..d7f115097f6f3 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.8.0-beta.1 + 1.8.0 Microsoft Azure Java Core Library This package contains core types for Azure Java clients. diff --git a/sdk/e2e/pom.xml b/sdk/e2e/pom.xml index b2f3bd1c81d42..3a309bfecf74d 100644 --- a/sdk/e2e/pom.xml +++ b/sdk/e2e/pom.xml @@ -23,12 +23,12 @@ com.azure azure-core - 1.8.0-beta.1 + 1.8.0 com.azure azure-core-http-netty - 1.6.0-beta.1 + 1.6.0 com.azure @@ -64,7 +64,7 @@ com.azure azure-core-test - 1.5.0-beta.1 + 1.4.1 test diff --git a/sdk/tables/azure-data-tables/pom.xml b/sdk/tables/azure-data-tables/pom.xml index 13d4fa21a6b6e..1a4c6a1d3a8f8 100644 --- a/sdk/tables/azure-data-tables/pom.xml +++ b/sdk/tables/azure-data-tables/pom.xml @@ -40,7 +40,7 @@ Licensed under the MIT License. com.azure azure-core - 1.8.0-beta.1 + 1.8.0 com.azure From be68aad777c1c2d1d08c2722febdae067737fa55 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Fri, 4 Sep 2020 10:04:45 +0800 Subject: [PATCH 089/168] Network: regenerate package-2020-06 (#14773) * regenerate package-2020-06 * update pom * fix compile errors --- sdk/network/mgmt-v2020_06_01/pom.xml | 2 +- .../network/v2020_06_01/HopLink.java | 8 +- .../v2020_06_01/InboundSecurityRule.java | 175 +++++++++ .../InboundSecurityRuleOperations.java | 19 + .../v2020_06_01/InboundSecurityRules.java | 97 +++++ .../InboundSecurityRulesProtocol.java | 41 ++ .../v2020_06_01/NetworkVirtualAppliance.java | 5 + .../network/v2020_06_01/PeerRoute.java | 122 ++++++ .../network/v2020_06_01/PeerRouteList.java | 26 ++ .../v2020_06_01/VirtualHubBgpConnections.java | 22 ++ .../InboundSecurityRuleImpl.java | 130 +++++++ .../InboundSecurityRuleInner.java | 121 ++++++ .../InboundSecurityRuleOperationsImpl.java | 40 ++ .../InboundSecurityRuleOperationsInner.java | 248 +++++++++++++ .../NetworkManagementClientImpl.java | 14 + .../implementation/NetworkManager.java | 12 + .../NetworkVirtualApplianceImpl.java | 5 + .../NetworkVirtualApplianceInner.java | 15 + .../implementation/PeerRouteListImpl.java | 33 ++ .../implementation/PeerRouteListInner.java | 45 +++ .../VirtualHubBgpConnectionsImpl.java | 25 ++ .../VirtualHubBgpConnectionsInner.java | 351 ++++++++++++++++++ 22 files changed, 1551 insertions(+), 5 deletions(-) create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRule.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRuleOperations.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRules.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRulesProtocol.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/PeerRoute.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/PeerRouteList.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleImpl.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleInner.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleOperationsImpl.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleOperationsInner.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PeerRouteListImpl.java create mode 100644 sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PeerRouteListInner.java diff --git a/sdk/network/mgmt-v2020_06_01/pom.xml b/sdk/network/mgmt-v2020_06_01/pom.xml index ea28a281a3cea..13eab17617eb0 100644 --- a/sdk/network/mgmt-v2020_06_01/pom.xml +++ b/sdk/network/mgmt-v2020_06_01/pom.xml @@ -15,7 +15,7 @@ ../../parents/azure-arm-parent/pom.xml azure-mgmt-network - 1.0.0-beta + 1.0.0-beta-1 jar Microsoft Azure SDK for Network Management This package contains Microsoft Network Management SDK. diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/HopLink.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/HopLink.java index 962c3a8803976..f306de0333972 100644 --- a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/HopLink.java +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/HopLink.java @@ -55,10 +55,10 @@ public class HopLink { private List issues; /** - * Provides additional context on the issue. + * Provides additional context on links. */ @JsonProperty(value = "context", access = JsonProperty.Access.WRITE_ONLY) - private List> context; + private Map context; /** * Resource ID. @@ -121,11 +121,11 @@ public List issues() { } /** - * Get provides additional context on the issue. + * Get provides additional context on links. * * @return the context value */ - public List> context() { + public Map context() { return this.context; } diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRule.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRule.java new file mode 100644 index 0000000000000..454bf61c92338 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRule.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2020_06_01.implementation.InboundSecurityRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2020_06_01.implementation.NetworkManager; +import java.util.List; + +/** + * Type representing InboundSecurityRule. + */ +public interface InboundSecurityRule extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the rules value. + */ + List rules(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the InboundSecurityRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNetworkVirtualAppliance, DefinitionStages.WithCreate { + } + + /** + * Grouping of InboundSecurityRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a InboundSecurityRule definition. + */ + interface Blank extends WithNetworkVirtualAppliance { + } + + /** + * The stage of the inboundsecurityrule definition allowing to specify NetworkVirtualAppliance. + */ + interface WithNetworkVirtualAppliance { + /** + * Specifies resourceGroupName, networkVirtualApplianceName. + * @param resourceGroupName The name of the resource group + * @param networkVirtualApplianceName The name of the Network Virtual Appliance + * @return the next definition stage + */ + WithCreate withExistingNetworkVirtualAppliance(String resourceGroupName, String networkVirtualApplianceName); + } + + /** + * The stage of the inboundsecurityrule definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the inboundsecurityrule definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name Name of security rule collection + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the inboundsecurityrule definition allowing to specify Rules. + */ + interface WithRules { + /** + * Specifies rules. + * @param rules List of allowed rules + * @return the next definition stage + */ + WithCreate withRules(List rules); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithRules { + } + } + /** + * The template for a InboundSecurityRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithRules { + } + + /** + * Grouping of InboundSecurityRule update stages. + */ + interface UpdateStages { + /** + * The stage of the inboundsecurityrule update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the inboundsecurityrule update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name Name of security rule collection + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the inboundsecurityrule update allowing to specify Rules. + */ + interface WithRules { + /** + * Specifies rules. + * @param rules List of allowed rules + * @return the next update stage + */ + Update withRules(List rules); + } + + } +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRuleOperations.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRuleOperations.java new file mode 100644 index 0000000000000..e3f70e85dce09 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRuleOperations.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.management.network.v2020_06_01.implementation.InboundSecurityRuleOperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing InboundSecurityRuleOperations. + */ +public interface InboundSecurityRuleOperations extends SupportsCreating, HasInner { +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRules.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRules.java new file mode 100644 index 0000000000000..1f885f8ab7cd2 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRules.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the Inbound Security Rules resource. + */ +public class InboundSecurityRules { + /** + * Protocol. This should be either TCP or UDP. Possible values include: + * 'TCP', 'UDP'. + */ + @JsonProperty(value = "protocol") + private InboundSecurityRulesProtocol protocol; + + /** + * The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are + * allowed. + */ + @JsonProperty(value = "sourceAddressPrefix") + private String sourceAddressPrefix; + + /** + * NVA port ranges to be opened up. One needs to provide specific ports. + */ + @JsonProperty(value = "destinationPortRange") + private Integer destinationPortRange; + + /** + * Get protocol. This should be either TCP or UDP. Possible values include: 'TCP', 'UDP'. + * + * @return the protocol value + */ + public InboundSecurityRulesProtocol protocol() { + return this.protocol; + } + + /** + * Set protocol. This should be either TCP or UDP. Possible values include: 'TCP', 'UDP'. + * + * @param protocol the protocol value to set + * @return the InboundSecurityRules object itself. + */ + public InboundSecurityRules withProtocol(InboundSecurityRulesProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the CIDR or source IP range. Only /30, /31 and /32 Ip ranges are allowed. + * + * @return the sourceAddressPrefix value + */ + public String sourceAddressPrefix() { + return this.sourceAddressPrefix; + } + + /** + * Set the CIDR or source IP range. Only /30, /31 and /32 Ip ranges are allowed. + * + * @param sourceAddressPrefix the sourceAddressPrefix value to set + * @return the InboundSecurityRules object itself. + */ + public InboundSecurityRules withSourceAddressPrefix(String sourceAddressPrefix) { + this.sourceAddressPrefix = sourceAddressPrefix; + return this; + } + + /** + * Get nVA port ranges to be opened up. One needs to provide specific ports. + * + * @return the destinationPortRange value + */ + public Integer destinationPortRange() { + return this.destinationPortRange; + } + + /** + * Set nVA port ranges to be opened up. One needs to provide specific ports. + * + * @param destinationPortRange the destinationPortRange value to set + * @return the InboundSecurityRules object itself. + */ + public InboundSecurityRules withDestinationPortRange(Integer destinationPortRange) { + this.destinationPortRange = destinationPortRange; + return this; + } + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRulesProtocol.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRulesProtocol.java new file mode 100644 index 0000000000000..5f140b9a24b27 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/InboundSecurityRulesProtocol.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for InboundSecurityRulesProtocol. + */ +public final class InboundSecurityRulesProtocol extends ExpandableStringEnum { + /** Static value TCP for InboundSecurityRulesProtocol. */ + public static final InboundSecurityRulesProtocol TCP = fromString("TCP"); + + /** Static value UDP for InboundSecurityRulesProtocol. */ + public static final InboundSecurityRulesProtocol UDP = fromString("UDP"); + + /** + * Creates or finds a InboundSecurityRulesProtocol from its string representation. + * @param name a name to look for + * @return the corresponding InboundSecurityRulesProtocol + */ + @JsonCreator + public static InboundSecurityRulesProtocol fromString(String name) { + return fromString(name, InboundSecurityRulesProtocol.class); + } + + /** + * @return known InboundSecurityRulesProtocol values + */ + public static Collection values() { + return values(InboundSecurityRulesProtocol.class); + } +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/NetworkVirtualAppliance.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/NetworkVirtualAppliance.java index 0b1c2d276bcdb..ae35119e4930a 100644 --- a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/NetworkVirtualAppliance.java +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/NetworkVirtualAppliance.java @@ -56,6 +56,11 @@ public interface NetworkVirtualAppliance extends HasInner inboundSecurityRules(); + /** * @return the nvaSku value. */ diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/PeerRoute.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/PeerRoute.java new file mode 100644 index 0000000000000..62a599f4c9e4a --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/PeerRoute.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Peer routing details. + */ +public class PeerRoute { + /** + * The peer's local address. + */ + @JsonProperty(value = "localAddress", access = JsonProperty.Access.WRITE_ONLY) + private String localAddress; + + /** + * The route's network prefix. + */ + @JsonProperty(value = "network", access = JsonProperty.Access.WRITE_ONLY) + private String network; + + /** + * The route's next hop. + */ + @JsonProperty(value = "nextHop", access = JsonProperty.Access.WRITE_ONLY) + private String nextHop; + + /** + * The peer this route was learned from. + */ + @JsonProperty(value = "sourcePeer", access = JsonProperty.Access.WRITE_ONLY) + private String sourcePeer; + + /** + * The source this route was learned from. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private String origin; + + /** + * The route's AS path sequence. + */ + @JsonProperty(value = "asPath", access = JsonProperty.Access.WRITE_ONLY) + private String asPath; + + /** + * The route's weight. + */ + @JsonProperty(value = "weight", access = JsonProperty.Access.WRITE_ONLY) + private Integer weight; + + /** + * Get the peer's local address. + * + * @return the localAddress value + */ + public String localAddress() { + return this.localAddress; + } + + /** + * Get the route's network prefix. + * + * @return the network value + */ + public String network() { + return this.network; + } + + /** + * Get the route's next hop. + * + * @return the nextHop value + */ + public String nextHop() { + return this.nextHop; + } + + /** + * Get the peer this route was learned from. + * + * @return the sourcePeer value + */ + public String sourcePeer() { + return this.sourcePeer; + } + + /** + * Get the source this route was learned from. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Get the route's AS path sequence. + * + * @return the asPath value + */ + public String asPath() { + return this.asPath; + } + + /** + * Get the route's weight. + * + * @return the weight value + */ + public Integer weight() { + return this.weight; + } + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/PeerRouteList.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/PeerRouteList.java new file mode 100644 index 0000000000000..9fbabbf45f490 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/PeerRouteList.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2020_06_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2020_06_01.implementation.PeerRouteListInner; +import java.util.List; + +/** + * Type representing PeerRouteList. + */ +public interface PeerRouteList extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/VirtualHubBgpConnections.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/VirtualHubBgpConnections.java index c8e2a40965458..753720865353b 100644 --- a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/VirtualHubBgpConnections.java +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/VirtualHubBgpConnections.java @@ -18,6 +18,28 @@ * Type representing VirtualHubBgpConnections. */ public interface VirtualHubBgpConnections extends SupportsCreating, HasInner { + /** + * Retrieves a list of routes the virtual hub bgp connection has learned. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listLearnedRoutesAsync(String resourceGroupName, String hubName, String connectionName); + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAdvertisedRoutesAsync(String resourceGroupName, String hubName, String connectionName); + /** * Retrieves the details of a Virtual Hub Bgp Connection. * diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleImpl.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleImpl.java new file mode 100644 index 0000000000000..79e4f78e0f292 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleImpl.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01.implementation; + +import com.microsoft.azure.management.network.v2020_06_01.InboundSecurityRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.network.v2020_06_01.InboundSecurityRules; +import com.microsoft.azure.management.network.v2020_06_01.ProvisioningState; + +class InboundSecurityRuleImpl extends CreatableUpdatableImpl implements InboundSecurityRule, InboundSecurityRule.Definition, InboundSecurityRule.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String networkVirtualApplianceName; + private String ruleCollectionName; + + InboundSecurityRuleImpl(String name, NetworkManager manager) { + super(name, new InboundSecurityRuleInner()); + this.manager = manager; + // Set resource name + this.ruleCollectionName = name; + // + } + + InboundSecurityRuleImpl(InboundSecurityRuleInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.ruleCollectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.networkVirtualApplianceName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkVirtualAppliances"); + this.ruleCollectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "inboundSecurityRules"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + InboundSecurityRuleOperationsInner client = this.manager().inner().inboundSecurityRuleOperations(); + return client.createOrUpdateAsync(this.resourceGroupName, this.networkVirtualApplianceName, this.ruleCollectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + InboundSecurityRuleOperationsInner client = this.manager().inner().inboundSecurityRuleOperations(); + return client.createOrUpdateAsync(this.resourceGroupName, this.networkVirtualApplianceName, this.ruleCollectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + InboundSecurityRuleOperationsInner client = this.manager().inner().inboundSecurityRuleOperations(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public List rules() { + return this.inner().rules(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public InboundSecurityRuleImpl withExistingNetworkVirtualAppliance(String resourceGroupName, String networkVirtualApplianceName) { + this.resourceGroupName = resourceGroupName; + this.networkVirtualApplianceName = networkVirtualApplianceName; + return this; + } + + @Override + public InboundSecurityRuleImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public InboundSecurityRuleImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public InboundSecurityRuleImpl withRules(List rules) { + this.inner().withRules(rules); + return this; + } + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleInner.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleInner.java new file mode 100644 index 0000000000000..d97ada7cc52dd --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleInner.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2020_06_01.InboundSecurityRules; +import com.microsoft.azure.management.network.v2020_06_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * NVA Inbound Security Rule resource. + */ +@JsonFlatten +public class InboundSecurityRuleInner extends SubResource { + /** + * List of allowed rules. + */ + @JsonProperty(value = "properties.rules") + private List rules; + + /** + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Name of security rule collection. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * NVA inbound security rule type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get list of allowed rules. + * + * @return the rules value + */ + public List rules() { + return this.rules; + } + + /** + * Set list of allowed rules. + * + * @param rules the rules value to set + * @return the InboundSecurityRuleInner object itself. + */ + public InboundSecurityRuleInner withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Get the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name of security rule collection. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of security rule collection. + * + * @param name the name value to set + * @return the InboundSecurityRuleInner object itself. + */ + public InboundSecurityRuleInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get nVA inbound security rule type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleOperationsImpl.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleOperationsImpl.java new file mode 100644 index 0000000000000..83f401801c166 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleOperationsImpl.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.network.v2020_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2020_06_01.InboundSecurityRuleOperations; + +class InboundSecurityRuleOperationsImpl extends WrapperImpl implements InboundSecurityRuleOperations { + private final NetworkManager manager; + + InboundSecurityRuleOperationsImpl(NetworkManager manager) { + super(manager.inner().inboundSecurityRuleOperations()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public InboundSecurityRuleImpl define(String name) { + return wrapModel(name); + } + + private InboundSecurityRuleImpl wrapModel(InboundSecurityRuleInner inner) { + return new InboundSecurityRuleImpl(inner, manager()); + } + + private InboundSecurityRuleImpl wrapModel(String name) { + return new InboundSecurityRuleImpl(name, this.manager()); + } + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleOperationsInner.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleOperationsInner.java new file mode 100644 index 0000000000000..2c06aeebe21ed --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/InboundSecurityRuleOperationsInner.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in InboundSecurityRuleOperations. + */ +public class InboundSecurityRuleOperationsInner { + /** The Retrofit service to perform REST calls. */ + private InboundSecurityRuleOperationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of InboundSecurityRuleOperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public InboundSecurityRuleOperationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(InboundSecurityRuleOperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for InboundSecurityRuleOperations to be + * used by Retrofit to perform actually REST calls. + */ + interface InboundSecurityRuleOperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2020_06_01.InboundSecurityRuleOperations createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkVirtualApplianceName") String networkVirtualApplianceName, @Path("ruleCollectionName") String ruleCollectionName, @Path("subscriptionId") String subscriptionId, @Body InboundSecurityRuleInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2020_06_01.InboundSecurityRuleOperations beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkVirtualApplianceName") String networkVirtualApplianceName, @Path("ruleCollectionName") String ruleCollectionName, @Path("subscriptionId") String subscriptionId, @Body InboundSecurityRuleInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkVirtualApplianceName The name of the Network Virtual Appliance. + * @param ruleCollectionName The name of security rule collection. + * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InboundSecurityRuleInner object if successful. + */ + public InboundSecurityRuleInner createOrUpdate(String resourceGroupName, String networkVirtualApplianceName, String ruleCollectionName, InboundSecurityRuleInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkVirtualApplianceName The name of the Network Virtual Appliance. + * @param ruleCollectionName The name of security rule collection. + * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String networkVirtualApplianceName, String ruleCollectionName, InboundSecurityRuleInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkVirtualApplianceName The name of the Network Virtual Appliance. + * @param ruleCollectionName The name of security rule collection. + * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkVirtualApplianceName, String ruleCollectionName, InboundSecurityRuleInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters).map(new Func1, InboundSecurityRuleInner>() { + @Override + public InboundSecurityRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkVirtualApplianceName The name of the Network Virtual Appliance. + * @param ruleCollectionName The name of security rule collection. + * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkVirtualApplianceName, String ruleCollectionName, InboundSecurityRuleInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkVirtualApplianceName == null) { + throw new IllegalArgumentException("Parameter networkVirtualApplianceName is required and cannot be null."); + } + if (ruleCollectionName == null) { + throw new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2020-06-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkVirtualApplianceName, ruleCollectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkVirtualApplianceName The name of the Network Virtual Appliance. + * @param ruleCollectionName The name of security rule collection. + * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the InboundSecurityRuleInner object if successful. + */ + public InboundSecurityRuleInner beginCreateOrUpdate(String resourceGroupName, String networkVirtualApplianceName, String ruleCollectionName, InboundSecurityRuleInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkVirtualApplianceName The name of the Network Virtual Appliance. + * @param ruleCollectionName The name of security rule collection. + * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String networkVirtualApplianceName, String ruleCollectionName, InboundSecurityRuleInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkVirtualApplianceName The name of the Network Virtual Appliance. + * @param ruleCollectionName The name of security rule collection. + * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InboundSecurityRuleInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String networkVirtualApplianceName, String ruleCollectionName, InboundSecurityRuleInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters).map(new Func1, InboundSecurityRuleInner>() { + @Override + public InboundSecurityRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + * + * @param resourceGroupName The name of the resource group. + * @param networkVirtualApplianceName The name of the Network Virtual Appliance. + * @param ruleCollectionName The name of security rule collection. + * @param parameters Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InboundSecurityRuleInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkVirtualApplianceName, String ruleCollectionName, InboundSecurityRuleInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkVirtualApplianceName == null) { + throw new IllegalArgumentException("Parameter networkVirtualApplianceName is required and cannot be null."); + } + if (ruleCollectionName == null) { + throw new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2020-06-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkVirtualApplianceName, ruleCollectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkManagementClientImpl.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkManagementClientImpl.java index b8371cada7457..1ccd0d665b581 100644 --- a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkManagementClientImpl.java +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkManagementClientImpl.java @@ -813,6 +813,19 @@ public VirtualApplianceSkusInner virtualApplianceSkus() { return this.virtualApplianceSkus; } + /** + * The InboundSecurityRuleOperationsInner object to access its operations. + */ + private InboundSecurityRuleOperationsInner inboundSecurityRuleOperations; + + /** + * Gets the InboundSecurityRuleOperationsInner object to access its operations. + * @return the InboundSecurityRuleOperationsInner object. + */ + public InboundSecurityRuleOperationsInner inboundSecurityRuleOperations() { + return this.inboundSecurityRuleOperations; + } + /** * The NetworkWatchersInner object to access its operations. */ @@ -1574,6 +1587,7 @@ protected void initialize() { this.networkVirtualAppliances = new NetworkVirtualAppliancesInner(restClient().retrofit(), this); this.virtualApplianceSites = new VirtualApplianceSitesInner(restClient().retrofit(), this); this.virtualApplianceSkus = new VirtualApplianceSkusInner(restClient().retrofit(), this); + this.inboundSecurityRuleOperations = new InboundSecurityRuleOperationsInner(restClient().retrofit(), this); this.networkWatchers = new NetworkWatchersInner(restClient().retrofit(), this); this.packetCaptures = new PacketCapturesInner(restClient().retrofit(), this); this.connectionMonitors = new ConnectionMonitorsInner(restClient().retrofit(), this); diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkManager.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkManager.java index c9c6fec8366ce..59a2e6f6d1662 100644 --- a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkManager.java +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkManager.java @@ -66,6 +66,7 @@ import com.microsoft.azure.management.network.v2020_06_01.NetworkVirtualAppliances; import com.microsoft.azure.management.network.v2020_06_01.VirtualApplianceSites; import com.microsoft.azure.management.network.v2020_06_01.VirtualApplianceSkus; +import com.microsoft.azure.management.network.v2020_06_01.InboundSecurityRuleOperations; import com.microsoft.azure.management.network.v2020_06_01.NetworkWatchers; import com.microsoft.azure.management.network.v2020_06_01.PacketCaptures; import com.microsoft.azure.management.network.v2020_06_01.ConnectionMonitors; @@ -175,6 +176,7 @@ public final class NetworkManager extends ManagerCore inboundSecurityRules() { + return this.inner().inboundSecurityRules(); + } + @Override public VirtualApplianceSkuProperties nvaSku() { return this.inner().nvaSku(); diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkVirtualApplianceInner.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkVirtualApplianceInner.java index 4f1c99bdae2e0..763aa13102b6c 100644 --- a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkVirtualApplianceInner.java +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkVirtualApplianceInner.java @@ -79,6 +79,12 @@ public class NetworkVirtualApplianceInner extends Resource { @JsonProperty(value = "properties.virtualApplianceSites", access = JsonProperty.Access.WRITE_ONLY) private List virtualApplianceSites; + /** + * List of references to InboundSecurityRules. + */ + @JsonProperty(value = "properties.inboundSecurityRules", access = JsonProperty.Access.WRITE_ONLY) + private List inboundSecurityRules; + /** * The provisioning state of the resource. Possible values include: * 'Succeeded', 'Updating', 'Deleting', 'Failed'. @@ -252,6 +258,15 @@ public List virtualApplianceSites() { return this.virtualApplianceSites; } + /** + * Get list of references to InboundSecurityRules. + * + * @return the inboundSecurityRules value + */ + public List inboundSecurityRules() { + return this.inboundSecurityRules; + } + /** * Get the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PeerRouteListImpl.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PeerRouteListImpl.java new file mode 100644 index 0000000000000..d6b71a87e5e88 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PeerRouteListImpl.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01.implementation; + +import com.microsoft.azure.management.network.v2020_06_01.PeerRouteList; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.network.v2020_06_01.PeerRoute; + +class PeerRouteListImpl extends WrapperImpl implements PeerRouteList { + private final NetworkManager manager; + PeerRouteListImpl(PeerRouteListInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PeerRouteListInner.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PeerRouteListInner.java new file mode 100644 index 0000000000000..0ffe2131a1d94 --- /dev/null +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PeerRouteListInner.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2020_06_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2020_06_01.PeerRoute; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of virtual router peer routes. + */ +public class PeerRouteListInner { + /** + * List of peer routes. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get list of peer routes. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set list of peer routes. + * + * @param value the value value to set + * @return the PeerRouteListInner object itself. + */ + public PeerRouteListInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualHubBgpConnectionsImpl.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualHubBgpConnectionsImpl.java index a2f7275e264aa..4b16673398a04 100644 --- a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualHubBgpConnectionsImpl.java +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualHubBgpConnectionsImpl.java @@ -15,6 +15,7 @@ import rx.Observable; import rx.functions.Func1; import com.microsoft.azure.Page; +import com.microsoft.azure.management.network.v2020_06_01.PeerRouteList; import com.microsoft.azure.management.network.v2020_06_01.BgpConnection; class VirtualHubBgpConnectionsImpl extends WrapperImpl implements VirtualHubBgpConnections { @@ -42,6 +43,30 @@ private BgpConnectionImpl wrapModel(String name) { return new BgpConnectionImpl(name, this.manager()); } + @Override + public Observable listLearnedRoutesAsync(String resourceGroupName, String hubName, String connectionName) { + VirtualHubBgpConnectionsInner client = this.inner(); + return client.listLearnedRoutesAsync(resourceGroupName, hubName, connectionName) + .map(new Func1() { + @Override + public PeerRouteList call(PeerRouteListInner inner) { + return new PeerRouteListImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAdvertisedRoutesAsync(String resourceGroupName, String hubName, String connectionName) { + VirtualHubBgpConnectionsInner client = this.inner(); + return client.listAdvertisedRoutesAsync(resourceGroupName, hubName, connectionName) + .map(new Func1() { + @Override + public PeerRouteList call(PeerRouteListInner inner) { + return new PeerRouteListImpl(inner, manager()); + } + }); + } + @Override public Observable listAsync(final String resourceGroupName, final String virtualHubName) { VirtualHubBgpConnectionsInner client = this.inner(); diff --git a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualHubBgpConnectionsInner.java b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualHubBgpConnectionsInner.java index 0e97ae9bc739b..cc1dabcf7c1be 100644 --- a/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualHubBgpConnectionsInner.java +++ b/sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualHubBgpConnectionsInner.java @@ -28,12 +28,15 @@ import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; +import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -85,6 +88,22 @@ interface VirtualHubBgpConnectionsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections") Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualHubName") String virtualHubName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2020_06_01.VirtualHubBgpConnections listLearnedRoutes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes") + Observable> listLearnedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2020_06_01.VirtualHubBgpConnections beginListLearnedRoutes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes") + Observable> beginListLearnedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2020_06_01.VirtualHubBgpConnections listAdvertisedRoutes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes") + Observable> listAdvertisedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2020_06_01.VirtualHubBgpConnections beginListAdvertisedRoutes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes") + Observable> beginListAdvertisedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String hubName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2020_06_01.VirtualHubBgpConnections listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -650,6 +669,338 @@ private ServiceResponse> listDelegate(Response listLearnedRoutesAsync(String resourceGroupName, String hubName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listLearnedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName), serviceCallback); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection has learned. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listLearnedRoutesAsync(String resourceGroupName, String hubName, String connectionName) { + return listLearnedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName).map(new Func1, PeerRouteListInner>() { + @Override + public PeerRouteListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection has learned. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String hubName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hubName == null) { + throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2020-06-01"; + Observable> observable = service.listLearnedRoutes(resourceGroupName, hubName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection has learned. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeerRouteListInner object if successful. + */ + public PeerRouteListInner beginListLearnedRoutes(String resourceGroupName, String hubName, String connectionName) { + return beginListLearnedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName).toBlocking().single().body(); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection has learned. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginListLearnedRoutesAsync(String resourceGroupName, String hubName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListLearnedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName), serviceCallback); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection has learned. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerRouteListInner object + */ + public Observable beginListLearnedRoutesAsync(String resourceGroupName, String hubName, String connectionName) { + return beginListLearnedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName).map(new Func1, PeerRouteListInner>() { + @Override + public PeerRouteListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection has learned. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerRouteListInner object + */ + public Observable> beginListLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String hubName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hubName == null) { + throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2020-06-01"; + return service.beginListLearnedRoutes(resourceGroupName, hubName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListLearnedRoutesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListLearnedRoutesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeerRouteListInner object if successful. + */ + public PeerRouteListInner listAdvertisedRoutes(String resourceGroupName, String hubName, String connectionName) { + return listAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName).toBlocking().last().body(); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAdvertisedRoutesAsync(String resourceGroupName, String hubName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName), serviceCallback); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listAdvertisedRoutesAsync(String resourceGroupName, String hubName, String connectionName) { + return listAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName).map(new Func1, PeerRouteListInner>() { + @Override + public PeerRouteListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listAdvertisedRoutesWithServiceResponseAsync(String resourceGroupName, String hubName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hubName == null) { + throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2020-06-01"; + Observable> observable = service.listAdvertisedRoutes(resourceGroupName, hubName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeerRouteListInner object if successful. + */ + public PeerRouteListInner beginListAdvertisedRoutes(String resourceGroupName, String hubName, String connectionName) { + return beginListAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName).toBlocking().single().body(); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginListAdvertisedRoutesAsync(String resourceGroupName, String hubName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName), serviceCallback); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerRouteListInner object + */ + public Observable beginListAdvertisedRoutesAsync(String resourceGroupName, String hubName, String connectionName) { + return beginListAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, hubName, connectionName).map(new Func1, PeerRouteListInner>() { + @Override + public PeerRouteListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + * + * @param resourceGroupName The name of the resource group. + * @param hubName The name of the virtual hub. + * @param connectionName The name of the virtual hub bgp connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerRouteListInner object + */ + public Observable> beginListAdvertisedRoutesWithServiceResponseAsync(String resourceGroupName, String hubName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hubName == null) { + throw new IllegalArgumentException("Parameter hubName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2020-06-01"; + return service.beginListAdvertisedRoutes(resourceGroupName, hubName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListAdvertisedRoutesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListAdvertisedRoutesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Retrieves the details of all VirtualHubBgpConnections. * From 9f8ce5befcdf5c94fb0d1f7c6609568512b8083e Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Fri, 4 Sep 2020 10:05:05 +0800 Subject: [PATCH 090/168] mgmt move Manager and ManagerBase to non-implementation package (#14733) --- .../azure/resourcemanager/appplatform/AppPlatformManager.java | 2 +- .../com/azure/resourcemanager/appservice/AppServiceManager.java | 2 +- .../java/com/azure/resourcemanager/compute/ComputeManager.java | 2 +- .../containerinstance/ContainerInstanceManager.java | 2 +- .../containerregistry/ContainerRegistryManager.java | 2 +- .../containerservice/ContainerServiceManager.java | 2 +- .../java/com/azure/resourcemanager/cosmos/CosmosManager.java | 2 +- .../main/java/com/azure/resourcemanager/dns/DnsZoneManager.java | 2 +- .../com/azure/resourcemanager/eventhubs/EventHubsManager.java | 2 +- .../com/azure/resourcemanager/keyvault/KeyVaultManager.java | 2 +- .../java/com/azure/resourcemanager/monitor/MonitorManager.java | 2 +- .../src/main/java/com/azure/resourcemanager/msi/MSIManager.java | 2 +- .../java/com/azure/resourcemanager/network/NetworkManager.java | 2 +- .../implementation/GroupableParentResourceWithTagsImpl.java | 2 +- .../azure/resourcemanager/privatedns/PrivateDnsZoneManager.java | 2 +- .../main/java/com/azure/resourcemanager/redis/RedisManager.java | 2 +- .../com/azure/resourcemanager/resources/ResourceManager.java | 2 +- .../resources/fluentcore/arm/{implementation => }/Manager.java | 2 +- .../fluentcore/arm/{implementation => }/ManagerBase.java | 2 +- .../arm/collection/implementation/GroupableResourcesImpl.java | 2 +- .../implementation/IndependentChildResourcesImpl.java | 2 +- .../arm/collection/implementation/IndependentChildrenImpl.java | 2 +- .../implementation/TopLevelModifiableResourcesImpl.java | 2 +- .../arm/models/implementation/GroupableParentResourceImpl.java | 2 +- .../arm/models/implementation/GroupableResourceImpl.java | 2 +- .../java/com/azure/resourcemanager/sql/SqlServerManager.java | 2 +- .../java/com/azure/resourcemanager/storage/StorageManager.java | 2 +- .../azure/resourcemanager/trafficmanager/TrafficManager.java | 2 +- .../src/test/java/com/azure/resourcemanager/TestTemplate.java | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/{implementation => }/Manager.java (93%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/{implementation => }/ManagerBase.java (96%) diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java index 0b99ba99d4c8c..2909523ab1e7d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.appplatform.models.SpringServices; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java index 092d7bacda61c..06c1ae169343f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java @@ -22,7 +22,7 @@ import com.azure.resourcemanager.keyvault.KeyVaultManager; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java index a31143964a538..ec9284cd2f5f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java @@ -36,7 +36,7 @@ import com.azure.resourcemanager.network.NetworkManager; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java index 8ddf37199dbfb..95af5fef35461 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.network.NetworkManager; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java index 4496c74009c53..f40b42adde283 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.containerregistry.models.RegistryTasks; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java index ebaa0c6ff847c..79f40adcb3260 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.containerservice.models.KubernetesClusters; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java index 974efd141866a..6398053baa2d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.cosmos.models.CosmosDBAccounts; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java index d8e051dced9ea..c30f80faa7891 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.dns.models.DnsZones; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java index 38a464f49588e..8e4b174984696 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java @@ -21,7 +21,7 @@ import com.azure.resourcemanager.eventhubs.models.EventHubs; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java index 593633e4622ad..0938468cc6189 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.keyvault.models.Vaults; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java index 67a2ec3390e0e..55ad3d5fd778e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java @@ -19,7 +19,7 @@ import com.azure.resourcemanager.monitor.models.MetricDefinitions; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java index 141a9f3c466d1..83e3d6412d9fc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java @@ -10,7 +10,7 @@ import com.azure.resourcemanager.msi.models.Identities; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java index a1b2dcf764c1c..3a3acac477459 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java @@ -40,7 +40,7 @@ import com.azure.resourcemanager.network.models.VirtualNetworkGateways; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/GroupableParentResourceWithTagsImpl.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/GroupableParentResourceWithTagsImpl.java index 684c31e57bf09..aa05eaa8dd87f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/GroupableParentResourceWithTagsImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/GroupableParentResourceWithTagsImpl.java @@ -4,7 +4,7 @@ import com.azure.resourcemanager.network.models.AppliableWithTags; import com.azure.resourcemanager.network.models.UpdatableWithTags; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.GroupableParentResourceImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java index a6428a0ebca61..277daa9955da5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.privatedns.models.PrivateDnsZones; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java index 4f6700ee73400..6c3d693ddf79a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.redis.models.RedisCaches; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java index f10da5212547f..2577361ae2596 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java @@ -25,7 +25,7 @@ import com.azure.resourcemanager.resources.models.Tenants; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/Manager.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/Manager.java similarity index 93% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/Manager.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/Manager.java index 999ef43791651..57b87db4c558a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/Manager.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/Manager.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.resourcemanager.resources.fluentcore.arm.implementation; +package com.azure.resourcemanager.resources.fluentcore.arm; import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/ManagerBase.java similarity index 96% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/ManagerBase.java index ea572a70e5664..57c6aa294fe3c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/implementation/ManagerBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/ManagerBase.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.resourcemanager.resources.fluentcore.arm.implementation; +package com.azure.resourcemanager.resources.fluentcore.arm; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/GroupableResourcesImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/GroupableResourcesImpl.java index 9c4f3d73d1a63..14ee8184afe4d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/GroupableResourcesImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/GroupableResourcesImpl.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/IndependentChildResourcesImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/IndependentChildResourcesImpl.java index be7af44170417..cec5cadbaca64 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/IndependentChildResourcesImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/IndependentChildResourcesImpl.java @@ -3,7 +3,7 @@ package com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.arm.models.HasResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChildResource; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/IndependentChildrenImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/IndependentChildrenImpl.java index 5a745a6a60705..226b0d4cbe3cf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/IndependentChildrenImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/IndependentChildrenImpl.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByParent; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByParent; import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; import com.azure.resourcemanager.resources.fluentcore.arm.models.HasResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChild; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/TopLevelModifiableResourcesImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/TopLevelModifiableResourcesImpl.java index 178f8cddbe1da..920e0352a1f95 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/TopLevelModifiableResourcesImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/collection/implementation/TopLevelModifiableResourcesImpl.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion; import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByResourceGroup; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/implementation/GroupableParentResourceImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/implementation/GroupableParentResourceImpl.java index dc2a2cbf3474a..7ddc330b4b346 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/implementation/GroupableParentResourceImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/implementation/GroupableParentResourceImpl.java @@ -3,7 +3,7 @@ package com.azure.resourcemanager.resources.fluentcore.arm.models.implementation; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/implementation/GroupableResourceImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/implementation/GroupableResourceImpl.java index 229a5aa61c072..31ce177cd8a85 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/implementation/GroupableResourceImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/implementation/GroupableResourceImpl.java @@ -7,7 +7,7 @@ import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java index 79da2778885e1..9138436accd37 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java @@ -7,7 +7,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java index 3a4d7374234b9..a74dc289bb3c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java @@ -7,7 +7,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java index 0e71a0d093822..ec29e96c94015 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java @@ -8,7 +8,7 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.trafficmanager.implementation.TrafficManagerProfilesImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTemplate.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTemplate.java index 6edbde8f07479..59d27c6dc10f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTemplate.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestTemplate.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup; -import com.azure.resourcemanager.resources.fluentcore.arm.implementation.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; From 65f4820cd9d9fa624a051b72b6d1a48b83677835 Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Fri, 4 Sep 2020 10:05:29 +0800 Subject: [PATCH 091/168] mgmt compute update test dependency (#14731) * mgmt compute update test dependency * remove azure-storage from external dependency list --- eng/versioning/external_dependencies.txt | 3 - .../azure-resourcemanager-compute/pom.xml | 6 +- ...VirtualMachineScaleSetOperationsTests.java | 59 +- ...caleSetWithExtensionProtectedSettings.json | 1538 +++++++++-------- 4 files changed, 892 insertions(+), 714 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 1a3db7bd607d6..f91fbef43d4a1 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -311,9 +311,6 @@ media_com.microsoft.azure:adal4j;1.2.0 # sdk\resourcemanager\azure-resourcemanager-compute\pom.xml resourcemanager_com.jcraft:jsch;0.1.55 -# sdk\resourcemanager\azure-resourcemanager-compute\pom.xml -resourcemanager_com.microsoft.azure:azure-storage;6.1.0 - # sdk\storage\azure-storage-blob-cryptography\pom.xml storage_com.microsoft.azure:azure-storage;8.4.0 diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml index 3a44981d6871e..4ace74afbae8a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml @@ -111,9 +111,9 @@ test - com.microsoft.azure - azure-storage - 6.1.0 + com.azure + azure-storage-blob + 12.8.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java index f0ae86ea46041..e1f20566882e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineScaleSetOperationsTests.java @@ -45,6 +45,7 @@ import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNetworkInterface; import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNicIpConfiguration; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId; @@ -52,16 +53,17 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.models.StorageAccountKey; -import com.microsoft.azure.storage.CloudStorageAccount; -import com.microsoft.azure.storage.blob.CloudBlobClient; -import com.microsoft.azure.storage.blob.CloudBlobContainer; -import com.microsoft.azure.storage.blob.CloudBlockBlob; -import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.InputStream; import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Map; + +import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobServiceClient; +import com.azure.storage.blob.BlobServiceClientBuilder; +import com.azure.storage.blob.specialized.BlockBlobClient; import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; @@ -106,39 +108,32 @@ public void canUpdateVirtualMachineScaleSetWithExtensionProtectedSettings() thro Assertions.assertTrue(keys.size() > 0); String storageAccountKey = keys.get(0).value(); - final String storageConnectionString = - String - .format( - "DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s", - storageAccount.name(), storageAccountKey); - // Get the script to upload - // - InputStream scriptFileAsStream = - VirtualMachineScaleSetOperationsTests.class.getResourceAsStream("/install_apache.sh"); - // Get the size of the stream - // - int fileSize; - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - byte[] buffer = new byte[256]; - int bytesRead; - while ((bytesRead = scriptFileAsStream.read(buffer)) != -1) { - outputStream.write(buffer, 0, bytesRead); - } - fileSize = outputStream.size(); - outputStream.close(); // Upload the script file as block blob // URI fileUri; if (isPlaybackMode()) { fileUri = new URI("http://nonexisting.blob.core.windows.net/scripts/install_apache.sh"); } else { - CloudStorageAccount account = CloudStorageAccount.parse(storageConnectionString); - CloudBlobClient cloudBlobClient = account.createCloudBlobClient(); - CloudBlobContainer container = cloudBlobClient.getContainerReference("scripts"); - container.createIfNotExists(); - CloudBlockBlob blob = container.getBlockBlobReference("install_apache.sh"); - blob.upload(scriptFileAsStream, fileSize); - fileUri = blob.getUri(); + final String storageConnectionString = Utils.getStorageConnectionString( + storageAccount.name(), storageAccountKey, storageManager.environment()); + // Get the script to upload + // + String filePath = VirtualMachineScaleSetOperationsTests.class.getResource("/install_apache.sh").getPath(); + File file = new File(filePath); + InputStream inputStream = VirtualMachineScaleSetOperationsTests.class + .getResourceAsStream("/install_apache.sh"); + + BlobServiceClient storageClient = new BlobServiceClientBuilder() + .connectionString(storageConnectionString) + .httpClient(storageManager.httpPipeline().getHttpClient()) + .buildClient(); + BlobContainerClient blobContainerClient = storageClient.getBlobContainerClient("scripts"); + blobContainerClient.create(); + + BlockBlobClient blockBlobClient = blobContainerClient.getBlobClient("install_apache.sh") + .getBlockBlobClient(); + blockBlobClient.upload(inputStream, file.length()); + fileUri = new URI(blockBlobClient.getBlobUrl()); } List fileUris = new ArrayList<>(); fileUris.add(fileUri.toString()); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/resources/session-records/canUpdateVirtualMachineScaleSetWithExtensionProtectedSettings.json b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/resources/session-records/canUpdateVirtualMachineScaleSetWithExtensionProtectedSettings.json index 031785993c3f6..7d71ef259c47c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/resources/session-records/canUpdateVirtualMachineScaleSetWithExtensionProtectedSettings.json +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/resources/session-records/canUpdateVirtualMachineScaleSetWithExtensionProtectedSettings.json @@ -1,953 +1,1139 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg55520?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg90053?api-version=2020-06-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4762d2fd-10c1-41ec-b25d-f9ec003b2e0d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:09 GMT", - "content-length" : "315", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1151", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "201", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "9949e62a-a271-4efe-a695-ef210767b3c1", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080509Z:9949e62a-a271-4efe-a695-ef210767b3c1", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "9949e62a-a271-4efe-a695-ef210767b3c1", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520\",\"name\":\"javacsmrg55520\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2020-07-28T08:05:07.819806100Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } + "Date" : "Wed, 02 Sep 2020 09:34:24 GMT", + "x-ms-correlation-request-id" : "d81a020b-6935-4371-b8ab-3ca9830b0673", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093424Z:d81a020b-6935-4371-b8ab-3ca9830b0673", + "Expires" : "-1", + "Content-Length" : "225", + "x-ms-request-id" : "d81a020b-6935-4371-b8ab-3ca9830b0673", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053\",\"name\":\"javacsmrg90053\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg7bd53239b9?api-version=2019-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg39420054?api-version=2019-06-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "34dedaa9-546f-4acc-b54b-6b3bcd2e5bc0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:11 GMT", - "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1115", - "retry-after" : "0", + "Server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "0b564d53-db4f-4314-acd2-1b2049f7c3f3", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080512Z:0b564d53-db4f-4314-acd2-1b2049f7c3f3", - "content-type" : "text/plain; charset=utf-8", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/18310f3c-da13-4d9a-9254-019e267e352b?monitor=true&api-version=2019-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "18310f3c-da13-4d9a-9254-019e267e352b", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:34:31 GMT", + "x-ms-correlation-request-id" : "be45abed-27a1-4d99-9e70-d54f65f2bfe2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093431Z:be45abed-27a1-4d99-9e70-d54f65f2bfe2", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "b8df60d5-7431-40a1-b306-4bad415d126f", + "Body" : "", + "x-ms-client-request-id" : "34dedaa9-546f-4acc-b54b-6b3bcd2e5bc0", + "Content-Type" : "text/plain; charset=utf-8", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/b8df60d5-7431-40a1-b306-4bad415d126f?monitor=true&api-version=2019-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/18310f3c-da13-4d9a-9254-019e267e352b?monitor=true&api-version=2019-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/b8df60d5-7431-40a1-b306-4bad415d126f?monitor=true&api-version=2019-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "50b6ad52-9832-4663-a87a-e7d1fb25a8ae" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:29 GMT", - "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "1174", - "expires" : "-1", + "Server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4578", + "x-ms-ratelimit-remaining-subscription-reads" : "11972", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "62c82070-9ded-492c-81d0-88e8f8ba9587", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080530Z:62c82070-9ded-492c-81d0-88e8f8ba9587", - "content-type" : "application/json", - "cache-control" : "no-cache", - "x-ms-request-id" : "699ef1e7-4551-4f63-ad13-5222d066c3cc", - "Body" : "{\"sku\":{\"name\":\"Standard_GRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg7bd53239b9\",\"name\":\"stg7bd53239b9\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-07-28T08:05:12.0966813Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-07-28T08:05:12.0966813Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-07-28T08:05:12.0185601Z\",\"primaryEndpoints\":{\"blob\":\"https://stg7bd53239b9.blob.core.windows.net/\",\"queue\":\"https://stg7bd53239b9.queue.core.windows.net/\",\"table\":\"https://stg7bd53239b9.table.core.windows.net/\",\"file\":\"https://stg7bd53239b9.file.core.windows.net/\"},\"primaryLocation\":\"westus\",\"statusOfPrimary\":\"available\",\"secondaryLocation\":\"eastus\",\"statusOfSecondary\":\"available\"}}" - } + "Date" : "Wed, 02 Sep 2020 09:34:48 GMT", + "x-ms-correlation-request-id" : "4f6e004f-a67c-4aaa-a372-3305f7ba6980", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093449Z:4f6e004f-a67c-4aaa-a372-3305f7ba6980", + "Expires" : "-1", + "Content-Length" : "1162", + "x-ms-request-id" : "5c92cd84-5b67-4836-97e1-9a7968ecfd69", + "Body" : "{\"sku\":{\"name\":\"Standard_GRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg39420054\",\"name\":\"stg39420054\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-09-02T09:34:30.8109945Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-09-02T09:34:30.8109945Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-09-02T09:34:30.7641205Z\",\"primaryEndpoints\":{\"blob\":\"https://stg39420054.blob.core.windows.net/\",\"queue\":\"https://stg39420054.queue.core.windows.net/\",\"table\":\"https://stg39420054.table.core.windows.net/\",\"file\":\"https://stg39420054.file.core.windows.net/\"},\"primaryLocation\":\"westus\",\"statusOfPrimary\":\"available\",\"secondaryLocation\":\"eastus\",\"statusOfSecondary\":\"available\"}}", + "x-ms-client-request-id" : "50b6ad52-9832-4663-a87a-e7d1fb25a8ae", + "Content-Type" : "application/json" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg7bd53239b9?api-version=2019-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg39420054?api-version=2019-06-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d284e969-025f-4ace-a92b-ffdb6bd01265", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:29 GMT", - "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "1174", - "expires" : "-1", + "Server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "6974", + "x-ms-ratelimit-remaining-subscription-reads" : "11971", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "8ae08730-fa0f-4f99-b508-0337ae5ec6a6", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080530Z:8ae08730-fa0f-4f99-b508-0337ae5ec6a6", - "content-type" : "application/json", - "cache-control" : "no-cache", - "x-ms-request-id" : "52c8e9d1-9e59-43f7-95ec-7c539b1d39c7", - "Body" : "{\"sku\":{\"name\":\"Standard_GRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg7bd53239b9\",\"name\":\"stg7bd53239b9\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-07-28T08:05:12.0966813Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-07-28T08:05:12.0966813Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-07-28T08:05:12.0185601Z\",\"primaryEndpoints\":{\"blob\":\"https://stg7bd53239b9.blob.core.windows.net/\",\"queue\":\"https://stg7bd53239b9.queue.core.windows.net/\",\"table\":\"https://stg7bd53239b9.table.core.windows.net/\",\"file\":\"https://stg7bd53239b9.file.core.windows.net/\"},\"primaryLocation\":\"westus\",\"statusOfPrimary\":\"available\",\"secondaryLocation\":\"eastus\",\"statusOfSecondary\":\"available\"}}" - } + "Date" : "Wed, 02 Sep 2020 09:34:49 GMT", + "x-ms-correlation-request-id" : "546f2564-8671-4d44-84e4-4d230f84cac6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093449Z:546f2564-8671-4d44-84e4-4d230f84cac6", + "Expires" : "-1", + "Content-Length" : "1162", + "x-ms-request-id" : "67074412-7cdf-45dd-9cbc-7e07dd11c879", + "Body" : "{\"sku\":{\"name\":\"Standard_GRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg39420054\",\"name\":\"stg39420054\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-09-02T09:34:30.8109945Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-09-02T09:34:30.8109945Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-09-02T09:34:30.7641205Z\",\"primaryEndpoints\":{\"blob\":\"https://stg39420054.blob.core.windows.net/\",\"queue\":\"https://stg39420054.queue.core.windows.net/\",\"table\":\"https://stg39420054.table.core.windows.net/\",\"file\":\"https://stg39420054.file.core.windows.net/\"},\"primaryLocation\":\"westus\",\"statusOfPrimary\":\"available\",\"secondaryLocation\":\"eastus\",\"statusOfSecondary\":\"available\"}}", + "x-ms-client-request-id" : "d284e969-025f-4ace-a92b-ffdb6bd01265", + "Content-Type" : "application/json" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg7bd53239b9/listKeys?api-version=2019-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg39420054/listKeys?api-version=2019-06-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b096fb24-b676-4303-a9cf-bacaee7f9faf", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:30 GMT", - "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "288", - "expires" : "-1", + "Server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "f304265c-5219-45bc-83c6-b7f63cb061b8", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-subscription-resource-requests" : "11999", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080531Z:f304265c-5219-45bc-83c6-b7f63cb061b8", - "content-type" : "application/json", - "cache-control" : "no-cache", - "x-ms-request-id" : "177adc7f-2529-4a68-bc34-0e89f8eadde7", - "Body" : "{\"keys\":[{\"keyName\":\"key1\",\"value\":\"***REMOVED***\",\"permissions\":\"FULL\"},{\"keyName\":\"key2\",\"value\":\"***REMOVED***\",\"permissions\":\"FULL\"}]}" - } + "Date" : "Wed, 02 Sep 2020 09:34:49 GMT", + "x-ms-correlation-request-id" : "f873d083-5128-465e-b728-ab2964776685", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "11996", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093449Z:f873d083-5128-465e-b728-ab2964776685", + "Expires" : "-1", + "Content-Length" : "288", + "x-ms-request-id" : "ef8f62ff-3578-43c7-8592-81c2ab66bc47", + "Body" : "{\"keys\":[{\"keyName\":\"key1\",\"value\":\"***REMOVED***\",\"permissions\":\"FULL\"},{\"keyName\":\"key2\",\"value\":\"***REMOVED***\",\"permissions\":\"FULL\"}]}", + "x-ms-client-request-id" : "b096fb24-b676-4303-a9cf-bacaee7f9faf", + "Content-Type" : "application/json" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096?api-version=2020-05-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670?api-version=2020-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "172e2d86-6729-4059-880f-660697b43395", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:40 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "azure-asyncnotification" : "Enabled", - "content-length" : "1342", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1145", - "retry-after" : "0", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", "StatusCode" : "201", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "bc92d302-5c37-4d29-b7a5-0f9a977f9ce8", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-arm-service-request-id" : "31a7d382-5b35-4906-9d4d-f96c495feb12", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080540Z:bc92d302-5c37-4d29-b7a5-0f9a977f9ce8", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "e3740db4-46bb-45dc-b297-0b321891f0c1", - "Body" : "{\r\n \"name\": \"vmssvnet636096\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096\",\r\n \"etag\": \"W/\\\"60816e1b-ffbc-4849-babc-bba1f6d18bd2\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"701a1dd3-0d2c-4c82-a01b-985379cbcf30\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/28\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096/subnets/subnet1\",\r\n \"etag\": \"W/\\\"60816e1b-ffbc-4849-babc-bba1f6d18bd2\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/28\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e3740db4-46bb-45dc-b297-0b321891f0c1?api-version=2020-05-01" - } + "Date" : "Wed, 02 Sep 2020 09:35:01 GMT", + "x-ms-correlation-request-id" : "839fb833-d0f6-4a35-b75e-666bb148fc0b", + "x-ms-arm-service-request-id" : "b296f211-31f2-44c1-983a-239bf03b3382", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093501Z:839fb833-d0f6-4a35-b75e-666bb148fc0b", + "Expires" : "-1", + "Content-Length" : "1342", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3d32f023-7f1d-4bf1-bc59-d531a75f12f9?api-version=2020-05-01", + "x-ms-request-id" : "3d32f023-7f1d-4bf1-bc59-d531a75f12f9", + "Body" : "{\r\n \"name\": \"vmssvnet746670\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670\",\r\n \"etag\": \"W/\\\"4f9b5059-2b56-4b46-9201-cda6202147a4\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"daa67159-8a5d-45b2-be40-9d53a6febfda\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/28\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670/subnets/subnet1\",\r\n \"etag\": \"W/\\\"4f9b5059-2b56-4b46-9201-cda6202147a4\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/28\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "172e2d86-6729-4059-880f-660697b43395", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e3740db4-46bb-45dc-b297-0b321891f0c1?api-version=2020-05-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3d32f023-7f1d-4bf1-bc59-d531a75f12f9?api-version=2020-05-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "40e33d94-f137-4fdc-95eb-95ed4ba2f566" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:43 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "29", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "3590", + "x-ms-ratelimit-remaining-subscription-reads" : "11970", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "f1893b76-d206-4941-b899-cd028c825b8a", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-arm-service-request-id" : "1dd48b5c-b2b0-4fb4-8074-420db2e3ad9f", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080544Z:f1893b76-d206-4941-b899-cd028c825b8a", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "2a4f5a38-0707-439b-a0c6-d4daffa52d35", - "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:35:05 GMT", + "x-ms-correlation-request-id" : "a79b2e6d-d737-4f70-90d8-75ea117f7320", + "x-ms-arm-service-request-id" : "a40c0d02-34c2-44a4-973f-9e7cef755f2b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093505Z:a79b2e6d-d737-4f70-90d8-75ea117f7320", + "Expires" : "-1", + "Content-Length" : "29", + "x-ms-request-id" : "86d756f7-2888-4de8-a5c8-fe8334b9d24f", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}", + "x-ms-client-request-id" : "40e33d94-f137-4fdc-95eb-95ed4ba2f566", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096?api-version=2020-05-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670?api-version=2020-05-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c9096fa-13f3-44cb-b292-451f41535d8a" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:44 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "1344", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2871", + "x-ms-ratelimit-remaining-subscription-reads" : "11969", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "8a73e26d-4ad3-43cd-86ac-14876badbee1", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-arm-service-request-id" : "fc0f9010-daaf-4d43-b20e-5946d6b80f07", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080545Z:8a73e26d-4ad3-43cd-86ac-14876badbee1", - "etag" : "W/\"a7514b7b-bcc2-4c28-8c04-5fe80d3e504a\"", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "4feb8e78-89e7-4bf5-94ab-15170fa4972c", - "Body" : "{\r\n \"name\": \"vmssvnet636096\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096\",\r\n \"etag\": \"W/\\\"a7514b7b-bcc2-4c28-8c04-5fe80d3e504a\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"701a1dd3-0d2c-4c82-a01b-985379cbcf30\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/28\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096/subnets/subnet1\",\r\n \"etag\": \"W/\\\"a7514b7b-bcc2-4c28-8c04-5fe80d3e504a\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/28\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:35:05 GMT", + "x-ms-correlation-request-id" : "0f9bce61-8ced-4078-9193-51489b717559", + "x-ms-arm-service-request-id" : "b0efda03-56d8-40d2-9541-1ad6bb8fd61f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"13f3cf02-b9a9-4158-988e-40afb239bc6a\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093506Z:0f9bce61-8ced-4078-9193-51489b717559", + "Expires" : "-1", + "Content-Length" : "1344", + "x-ms-request-id" : "d4b8a2e3-b86e-48da-aee8-d2794ce967ff", + "Body" : "{\r\n \"name\": \"vmssvnet746670\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670\",\r\n \"etag\": \"W/\\\"13f3cf02-b9a9-4158-988e-40afb239bc6a\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"daa67159-8a5d-45b2-be40-9d53a6febfda\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/28\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670/subnets/subnet1\",\r\n \"etag\": \"W/\\\"13f3cf02-b9a9-4158-988e-40afb239bc6a\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/28\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "x-ms-client-request-id" : "3c9096fa-13f3-44cb-b292-451f41535d8a", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg4243703852?api-version=2019-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg41186ec6?api-version=2019-06-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "940daffe-8c38-461e-894e-ba992be657c4", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:05:48 GMT", - "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1142", - "retry-after" : "0", + "Server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "2b7a98bf-6d78-42bb-87eb-573415b962c9", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080548Z:2b7a98bf-6d78-42bb-87eb-573415b962c9", - "content-type" : "text/plain; charset=utf-8", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/978f06e5-fa4f-47a6-b6d5-d0965b88c57d?monitor=true&api-version=2019-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "978f06e5-fa4f-47a6-b6d5-d0965b88c57d", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:35:09 GMT", + "x-ms-correlation-request-id" : "7e7b0b24-6415-41e3-a3dc-1c94df85d2a6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093509Z:7e7b0b24-6415-41e3-a3dc-1c94df85d2a6", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "8bef5eb6-2f0e-43e5-92dc-c71074cb046b", + "Body" : "", + "x-ms-client-request-id" : "940daffe-8c38-461e-894e-ba992be657c4", + "Content-Type" : "text/plain; charset=utf-8", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/8bef5eb6-2f0e-43e5-92dc-c71074cb046b?monitor=true&api-version=2019-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/978f06e5-fa4f-47a6-b6d5-d0965b88c57d?monitor=true&api-version=2019-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/8bef5eb6-2f0e-43e5-92dc-c71074cb046b?monitor=true&api-version=2019-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b63bcf6-ec2e-4399-8313-ffd0a622cb19" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:06:05 GMT", - "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "1174", - "expires" : "-1", + "Server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4557", + "x-ms-ratelimit-remaining-subscription-reads" : "11968", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "1648a826-3c93-447f-9336-1d7a161ad17a", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080605Z:1648a826-3c93-447f-9336-1d7a161ad17a", - "content-type" : "application/json", - "cache-control" : "no-cache", - "x-ms-request-id" : "c0d792e9-64f6-4277-b3b0-ae4c092d9932", - "Body" : "{\"sku\":{\"name\":\"Standard_GRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg4243703852\",\"name\":\"stg4243703852\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-07-28T08:05:47.5661886Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-07-28T08:05:47.5661886Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-07-28T08:05:47.5036907Z\",\"primaryEndpoints\":{\"blob\":\"https://stg4243703852.blob.core.windows.net/\",\"queue\":\"https://stg4243703852.queue.core.windows.net/\",\"table\":\"https://stg4243703852.table.core.windows.net/\",\"file\":\"https://stg4243703852.file.core.windows.net/\"},\"primaryLocation\":\"westus\",\"statusOfPrimary\":\"available\",\"secondaryLocation\":\"eastus\",\"statusOfSecondary\":\"available\"}}" - } + "Date" : "Wed, 02 Sep 2020 09:35:26 GMT", + "x-ms-correlation-request-id" : "4175bbb2-9bd5-469f-b6d8-72f7ed0132c3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093526Z:4175bbb2-9bd5-469f-b6d8-72f7ed0132c3", + "Expires" : "-1", + "Content-Length" : "1162", + "x-ms-request-id" : "5ac85bb6-fa0e-4649-a4e2-27829dcd06c0", + "Body" : "{\"sku\":{\"name\":\"Standard_GRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg41186ec6\",\"name\":\"stg41186ec6\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-09-02T09:35:08.7962162Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-09-02T09:35:08.7962162Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-09-02T09:35:08.7337542Z\",\"primaryEndpoints\":{\"blob\":\"https://stg41186ec6.blob.core.windows.net/\",\"queue\":\"https://stg41186ec6.queue.core.windows.net/\",\"table\":\"https://stg41186ec6.table.core.windows.net/\",\"file\":\"https://stg41186ec6.file.core.windows.net/\"},\"primaryLocation\":\"westus\",\"statusOfPrimary\":\"available\",\"secondaryLocation\":\"eastus\",\"statusOfSecondary\":\"available\"}}", + "x-ms-client-request-id" : "3b63bcf6-ec2e-4399-8313-ffd0a622cb19", + "Content-Type" : "application/json" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg4243703852?api-version=2019-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg41186ec6?api-version=2019-06-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.storage/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8654583f-2e6d-4ac7-8ab0-c2cb7e499837", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:06:05 GMT", - "server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "content-length" : "1174", - "expires" : "-1", + "Server" : "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2858", + "x-ms-ratelimit-remaining-subscription-reads" : "11967", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "532a1acf-fa83-4c70-8ad0-b787cb8e97cc", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080606Z:532a1acf-fa83-4c70-8ad0-b787cb8e97cc", - "content-type" : "application/json", - "cache-control" : "no-cache", - "x-ms-request-id" : "22c791d2-1516-46f9-b1cc-da0112ccabb6", - "Body" : "{\"sku\":{\"name\":\"Standard_GRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Storage/storageAccounts/stg4243703852\",\"name\":\"stg4243703852\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-07-28T08:05:47.5661886Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-07-28T08:05:47.5661886Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-07-28T08:05:47.5036907Z\",\"primaryEndpoints\":{\"blob\":\"https://stg4243703852.blob.core.windows.net/\",\"queue\":\"https://stg4243703852.queue.core.windows.net/\",\"table\":\"https://stg4243703852.table.core.windows.net/\",\"file\":\"https://stg4243703852.file.core.windows.net/\"},\"primaryLocation\":\"westus\",\"statusOfPrimary\":\"available\",\"secondaryLocation\":\"eastus\",\"statusOfSecondary\":\"available\"}}" - } + "Date" : "Wed, 02 Sep 2020 09:35:26 GMT", + "x-ms-correlation-request-id" : "b7b2a834-3ca1-49f5-b1eb-8e2735f1dc75", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093526Z:b7b2a834-3ca1-49f5-b1eb-8e2735f1dc75", + "Expires" : "-1", + "Content-Length" : "1162", + "x-ms-request-id" : "112878b3-18ab-41c9-930b-869d9a0ca4c9", + "Body" : "{\"sku\":{\"name\":\"Standard_GRS\",\"tier\":\"Standard\"},\"kind\":\"Storage\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Storage/storageAccounts/stg41186ec6\",\"name\":\"stg41186ec6\",\"type\":\"Microsoft.Storage/storageAccounts\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"privateEndpointConnections\":[],\"networkAcls\":{\"bypass\":\"AzureServices\",\"virtualNetworkRules\":[],\"ipRules\":[],\"defaultAction\":\"Allow\"},\"supportsHttpsTrafficOnly\":true,\"encryption\":{\"services\":{\"file\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-09-02T09:35:08.7962162Z\"},\"blob\":{\"keyType\":\"Account\",\"enabled\":true,\"lastEnabledTime\":\"2020-09-02T09:35:08.7962162Z\"}},\"keySource\":\"Microsoft.Storage\"},\"provisioningState\":\"Succeeded\",\"creationTime\":\"2020-09-02T09:35:08.7337542Z\",\"primaryEndpoints\":{\"blob\":\"https://stg41186ec6.blob.core.windows.net/\",\"queue\":\"https://stg41186ec6.queue.core.windows.net/\",\"table\":\"https://stg41186ec6.table.core.windows.net/\",\"file\":\"https://stg41186ec6.file.core.windows.net/\"},\"primaryLocation\":\"westus\",\"statusOfPrimary\":\"available\",\"secondaryLocation\":\"eastus\",\"statusOfSecondary\":\"available\"}}", + "x-ms-client-request-id" : "8654583f-2e6d-4ac7-8ab0-c2cb7e499837", + "Content-Type" : "application/json" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749?api-version=2019-12-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.compute/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c53dc5f0-b960-4d1f-bacb-71207b18d35d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:06:09 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "azure-asyncnotification" : "Enabled", - "content-length" : "2584", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", "x-ms-request-charge" : "4", - "x-ms-ratelimit-remaining-subscription-writes" : "1119", - "retry-after" : "0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", "StatusCode" : "201", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "8b0a6bfc-deb2-4d69-ab66-69b267471cf5", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/CreateVMScaleSet3Min;56,Microsoft.Compute/CreateVMScaleSet30Min;293,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;1178,Microsoft.Compute/VmssQueuedVMOperations;4796", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080609Z:8b0a6bfc-deb2-4d69-ab66-69b267471cf5", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "74a1f23f-d16e-4d90-9476-c8affbb56e59", - "Body" : "{\r\n \"name\": \"vmss93850\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss93850-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg4243703852.blob.core.windows.net/vhds\",\r\n \"https://stg7bd53239b9.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss93850-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg7bd53239b9.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Creating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"90f162cc-152b-4d0d-8387-ff6daed77e35\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/74a1f23f-d16e-4d90-9476-c8affbb56e59?api-version=2019-12-01" - } + "Date" : "Wed, 02 Sep 2020 09:35:30 GMT", + "x-ms-correlation-request-id" : "0b39cdeb-3dd5-4e8e-8810-366c22fa93c3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/CreateVMScaleSet3Min;59,Microsoft.Compute/CreateVMScaleSet30Min;299,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;1196,Microsoft.Compute/VmssQueuedVMOperations;4796", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093530Z:0b39cdeb-3dd5-4e8e-8810-366c22fa93c3", + "Expires" : "-1", + "Content-Length" : "2578", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/700897c1-5d2d-4033-9991-7dbabc1e485e?api-version=2019-12-01", + "x-ms-request-id" : "700897c1-5d2d-4033-9991-7dbabc1e485e", + "Body" : "{\r\n \"name\": \"vmss59749\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss59749-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg41186ec6.blob.core.windows.net/vhds\",\r\n \"https://stg39420054.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss59749-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg39420054.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Creating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"70dce7df-cc2b-4381-a8d7-92f0b0b8dbe3\"\r\n }\r\n}", + "x-ms-client-request-id" : "c53dc5f0-b960-4d1f-bacb-71207b18d35d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/74a1f23f-d16e-4d90-9476-c8affbb56e59?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/700897c1-5d2d-4033-9991-7dbabc1e485e?api-version=2019-12-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5970b893-e7e9-4046-9bff-542cf421733e" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:06:19 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11966", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 09:35:40 GMT", + "x-ms-correlation-request-id" : "2c826dda-5d64-471c-93c3-626f3b8822ff", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29999", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093541Z:2c826dda-5d64-471c-93c3-626f3b8822ff", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "7ed0f7a3-5bc2-4159-baf1-738eea5b8073", + "Body" : "{\r\n \"startTime\": \"2020-09-02T09:35:29.0605825+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"700897c1-5d2d-4033-9991-7dbabc1e485e\"\r\n}", + "x-ms-client-request-id" : "5970b893-e7e9-4046-9bff-542cf421733e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/700897c1-5d2d-4033-9991-7dbabc1e485e?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a2f72621-569a-42c1-b1b3-085d1a14846b" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11965", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 09:36:42 GMT", + "x-ms-correlation-request-id" : "63cca511-58ce-458f-8339-d5a32ac2a8a7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29998", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093642Z:63cca511-58ce-458f-8339-d5a32ac2a8a7", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "fba0d235-292a-4d15-8e4c-15273f29a67f", + "Body" : "{\r\n \"startTime\": \"2020-09-02T09:35:29.0605825+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"700897c1-5d2d-4033-9991-7dbabc1e485e\"\r\n}", + "x-ms-client-request-id" : "a2f72621-569a-42c1-b1b3-085d1a14846b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/700897c1-5d2d-4033-9991-7dbabc1e485e?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "21ecf3aa-7ab9-467e-996f-74bea7865253" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11964", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 09:37:13 GMT", + "x-ms-correlation-request-id" : "9131966a-49b9-4c52-9a37-1aae104e49fe", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29997", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093713Z:9131966a-49b9-4c52-9a37-1aae104e49fe", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "ab3730fa-e379-4670-98e5-fc4eeb1dcba9", + "Body" : "{\r\n \"startTime\": \"2020-09-02T09:35:29.0605825+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"700897c1-5d2d-4033-9991-7dbabc1e485e\"\r\n}", + "x-ms-client-request-id" : "21ecf3aa-7ab9-467e-996f-74bea7865253", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/700897c1-5d2d-4033-9991-7dbabc1e485e?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b38625c4-c606-420d-b73f-a9ac71adb48c" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "3561", + "x-ms-ratelimit-remaining-subscription-reads" : "11963", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "289410e8-e055-4602-9436-f9574e424b17", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29974", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080620Z:289410e8-e055-4602-9436-f9574e424b17", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "6fd755c2-7f14-4677-a084-0d12bb065531", - "Body" : "{\r\n \"startTime\": \"2020-07-28T08:06:08.4762491+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"74a1f23f-d16e-4d90-9476-c8affbb56e59\"\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:37:43 GMT", + "x-ms-correlation-request-id" : "73e453e0-cbbf-4da6-80ed-3718e27cdb06", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29995", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093743Z:73e453e0-cbbf-4da6-80ed-3718e27cdb06", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "23a41223-988e-4489-b5ac-8ad3e60b9308", + "Body" : "{\r\n \"startTime\": \"2020-09-02T09:35:29.0605825+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"700897c1-5d2d-4033-9991-7dbabc1e485e\"\r\n}", + "x-ms-client-request-id" : "b38625c4-c606-420d-b73f-a9ac71adb48c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/74a1f23f-d16e-4d90-9476-c8affbb56e59?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/700897c1-5d2d-4033-9991-7dbabc1e485e?api-version=2019-12-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "19952eb3-60c1-4e65-bb0f-d904e6685fd2" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:07:21 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4516", + "x-ms-ratelimit-remaining-subscription-reads" : "11962", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "3c654716-f3f0-4a26-abe8-f5577b9b86df", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29968", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080721Z:3c654716-f3f0-4a26-abe8-f5577b9b86df", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "198d4127-e617-4abf-a022-28e9efcf42aa", - "Body" : "{\r\n \"startTime\": \"2020-07-28T08:06:08.4762491+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"74a1f23f-d16e-4d90-9476-c8affbb56e59\"\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:38:13 GMT", + "x-ms-correlation-request-id" : "a2656b13-5fa1-4d8f-bb56-27b3b5093fd8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29994", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093814Z:a2656b13-5fa1-4d8f-bb56-27b3b5093fd8", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "cee14389-0c83-4566-abb1-e7c0e974f320", + "Body" : "{\r\n \"startTime\": \"2020-09-02T09:35:29.0605825+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"700897c1-5d2d-4033-9991-7dbabc1e485e\"\r\n}", + "x-ms-client-request-id" : "19952eb3-60c1-4e65-bb0f-d904e6685fd2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/74a1f23f-d16e-4d90-9476-c8affbb56e59?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/700897c1-5d2d-4033-9991-7dbabc1e485e?api-version=2019-12-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5fca734-5775-479e-b87e-e8f6cf0e1e75" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:07:51 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "134", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "6911", + "x-ms-ratelimit-remaining-subscription-reads" : "11961", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "34dac967-74b7-4a92-99e7-f84113ed89fe", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14981,Microsoft.Compute/GetOperation30Min;29963", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080752Z:34dac967-74b7-4a92-99e7-f84113ed89fe", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "ec4ab3a8-f0b0-44fa-9efb-0ab526d3bb48", - "Body" : "{\r\n \"startTime\": \"2020-07-28T08:06:08.4762491+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"74a1f23f-d16e-4d90-9476-c8affbb56e59\"\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:38:44 GMT", + "x-ms-correlation-request-id" : "6cb0502a-ed41-4d77-8004-9a4a3c7781e2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29993", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093845Z:6cb0502a-ed41-4d77-8004-9a4a3c7781e2", + "Expires" : "-1", + "Content-Length" : "134", + "x-ms-request-id" : "0ad7b40e-69ea-4dca-8067-864e956bf39a", + "Body" : "{\r\n \"startTime\": \"2020-09-02T09:35:29.0605825+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"700897c1-5d2d-4033-9991-7dbabc1e485e\"\r\n}", + "x-ms-client-request-id" : "e5fca734-5775-479e-b87e-e8f6cf0e1e75", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/74a1f23f-d16e-4d90-9476-c8affbb56e59?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/700897c1-5d2d-4033-9991-7dbabc1e485e?api-version=2019-12-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "346b70bf-7b0e-488c-a7bd-849496d7f722" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:08:22 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "184", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2760", + "x-ms-ratelimit-remaining-subscription-reads" : "11960", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "e7cfe400-a034-4493-a797-0eb46c60b6f2", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14977,Microsoft.Compute/GetOperation30Min;29957", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080822Z:e7cfe400-a034-4493-a797-0eb46c60b6f2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "6c8092fe-62d8-4fd2-916c-1518fc11d94e", - "Body" : "{\r\n \"startTime\": \"2020-07-28T08:06:08.4762491+00:00\",\r\n \"endTime\": \"2020-07-28T08:08:21.9824665+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"74a1f23f-d16e-4d90-9476-c8affbb56e59\"\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:39:14 GMT", + "x-ms-correlation-request-id" : "bda48cee-ad2c-46a7-bbde-3d6532d5e2a0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29992", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093915Z:bda48cee-ad2c-46a7-bbde-3d6532d5e2a0", + "Expires" : "-1", + "Content-Length" : "184", + "x-ms-request-id" : "67f4b648-b34f-42aa-bbcc-e272139c257b", + "Body" : "{\r\n \"startTime\": \"2020-09-02T09:35:29.0605825+00:00\",\r\n \"endTime\": \"2020-09-02T09:39:13.6335899+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"700897c1-5d2d-4033-9991-7dbabc1e485e\"\r\n}", + "x-ms-client-request-id" : "346b70bf-7b0e-488c-a7bd-849496d7f722", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749?api-version=2019-12-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3593f03e-2535-4c04-a7ca-a786b0ecbf39" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:08:22 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2585", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2759", + "x-ms-ratelimit-remaining-subscription-reads" : "11959", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "0c8cf48a-c75f-43c7-8c44-baed9af6e22d", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetVMScaleSet3Min;182,Microsoft.Compute/GetVMScaleSet30Min;1263", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080823Z:0c8cf48a-c75f-43c7-8c44-baed9af6e22d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "a9fddc75-4b3c-484c-84ae-67b5da8aae07", - "Body" : "{\r\n \"name\": \"vmss93850\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss93850-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg4243703852.blob.core.windows.net/vhds\",\r\n \"https://stg7bd53239b9.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss93850-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg7bd53239b9.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"90f162cc-152b-4d0d-8387-ff6daed77e35\"\r\n }\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:39:14 GMT", + "x-ms-correlation-request-id" : "dde2ba59-7523-4753-816d-f543bc754532", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetVMScaleSet3Min;199,Microsoft.Compute/GetVMScaleSet30Min;1299", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093915Z:dde2ba59-7523-4753-816d-f543bc754532", + "Expires" : "-1", + "Content-Length" : "2579", + "x-ms-request-id" : "ff885838-125d-4887-9d24-cc12c181a4ca", + "Body" : "{\r\n \"name\": \"vmss59749\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss59749-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg41186ec6.blob.core.windows.net/vhds\",\r\n \"https://stg39420054.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss59749-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg39420054.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"70dce7df-cc2b-4381-a8d7-92f0b0b8dbe3\"\r\n }\r\n}", + "x-ms-client-request-id" : "3593f03e-2535-4c04-a7ca-a786b0ecbf39", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749?api-version=2019-12-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.compute/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f6595a5-425c-45fe-9aed-9ff59d7f57a3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:08:24 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2585", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "3484", + "x-ms-ratelimit-remaining-subscription-reads" : "11958", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "b63c2b29-8f6c-4cba-9c6f-37e030cae32b", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetVMScaleSet3Min;181,Microsoft.Compute/GetVMScaleSet30Min;1262", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080824Z:b63c2b29-8f6c-4cba-9c6f-37e030cae32b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "135cd312-70df-4ceb-8c2d-f218af2dc067", - "Body" : "{\r\n \"name\": \"vmss93850\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss93850-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg4243703852.blob.core.windows.net/vhds\",\r\n \"https://stg7bd53239b9.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss93850-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg7bd53239b9.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"90f162cc-152b-4d0d-8387-ff6daed77e35\"\r\n }\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:39:15 GMT", + "x-ms-correlation-request-id" : "17842893-98e0-442e-8d21-0d30255eebc8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetVMScaleSet3Min;198,Microsoft.Compute/GetVMScaleSet30Min;1298", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093915Z:17842893-98e0-442e-8d21-0d30255eebc8", + "Expires" : "-1", + "Content-Length" : "2579", + "x-ms-request-id" : "37d9c233-536a-4c85-a9fb-cbfc4508388f", + "Body" : "{\r\n \"name\": \"vmss59749\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss59749-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg41186ec6.blob.core.windows.net/vhds\",\r\n \"https://stg39420054.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss59749-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg39420054.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"70dce7df-cc2b-4381-a8d7-92f0b0b8dbe3\"\r\n }\r\n}", + "x-ms-client-request-id" : "3f6595a5-425c-45fe-9aed-9ff59d7f57a3", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PATCH", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749?api-version=2019-12-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.compute/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7276f779-d7e5-460f-a6b7-d36928ce13ec", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:08:27 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "azure-asyncnotification" : "Enabled", - "content-length" : "2584", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", "x-ms-request-charge" : "2", - "x-ms-ratelimit-remaining-subscription-writes" : "1134", - "retry-after" : "0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", + "Azure-AsyncNotification" : "Enabled", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "4cc19f39-cb73-4ad0-8e45-f25dce62ff6b", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1197,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;1166,Microsoft.Compute/VmssQueuedVMOperations;4798", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080828Z:4cc19f39-cb73-4ad0-8e45-f25dce62ff6b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "851e8914-4ea2-453d-96ab-09fb068ac007", - "Body" : "{\r\n \"name\": \"vmss93850\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 3\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss93850-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg4243703852.blob.core.windows.net/vhds\",\r\n \"https://stg7bd53239b9.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss93850-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg7bd53239b9.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Updating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"90f162cc-152b-4d0d-8387-ff6daed77e35\"\r\n }\r\n}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/851e8914-4ea2-453d-96ab-09fb068ac007?api-version=2019-12-01" - } + "Date" : "Wed, 02 Sep 2020 09:39:19 GMT", + "x-ms-correlation-request-id" : "35bef94f-5317-4860-a8b3-899cef344de3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/VMScaleSetActions3Min;239,Microsoft.Compute/VMScaleSetActions30Min;1199,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;1194,Microsoft.Compute/VmssQueuedVMOperations;4798", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093919Z:35bef94f-5317-4860-a8b3-899cef344de3", + "Expires" : "-1", + "Content-Length" : "2578", + "Azure-AsyncOperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/1f298fe8-7f24-4fab-9dc1-9cc7b4a42031?api-version=2019-12-01", + "x-ms-request-id" : "1f298fe8-7f24-4fab-9dc1-9cc7b4a42031", + "Body" : "{\r\n \"name\": \"vmss59749\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 3\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss59749-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg41186ec6.blob.core.windows.net/vhds\",\r\n \"https://stg39420054.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss59749-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg39420054.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Updating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"70dce7df-cc2b-4381-a8d7-92f0b0b8dbe3\"\r\n }\r\n}", + "x-ms-client-request-id" : "7276f779-d7e5-460f-a6b7-d36928ce13ec", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850?api-version=2019-12-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749?api-version=2019-12-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "dcd15a98-283f-41c2-a8aa-9a9254eba658" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:08:38 GMT", - "server" : "Microsoft-HTTPAPI/2.0", - "content-length" : "2585", - "expires" : "-1", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4471", + "x-ms-ratelimit-remaining-subscription-reads" : "11957", "StatusCode" : "200", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "c6900624-1a07-4bff-9f29-7d0f060ef853", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetVMScaleSet3Min;196,Microsoft.Compute/GetVMScaleSet30Min;1296", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080839Z:c6900624-1a07-4bff-9f29-7d0f060ef853", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "bce269ca-2144-4efd-9743-84b95976bbdb", - "Body" : "{\r\n \"name\": \"vmss93850\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Compute/virtualMachineScaleSets/vmss93850\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 3\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss93850-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg4243703852.blob.core.windows.net/vhds\",\r\n \"https://stg7bd53239b9.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss93850-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg55520/providers/Microsoft.Network/virtualNetworks/vmssvnet636096/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg7bd53239b9.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"90f162cc-152b-4d0d-8387-ff6daed77e35\"\r\n }\r\n}" - } + "Date" : "Wed, 02 Sep 2020 09:39:30 GMT", + "x-ms-correlation-request-id" : "83cc2a6a-8dfe-468d-a22b-2e2e04e9740c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-ratelimit-remaining-resource" : "Microsoft.Compute/GetVMScaleSet3Min;193,Microsoft.Compute/GetVMScaleSet30Min;1293", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093930Z:83cc2a6a-8dfe-468d-a22b-2e2e04e9740c", + "Expires" : "-1", + "Content-Length" : "2579", + "x-ms-request-id" : "49559694-a9db-4277-853d-75384d9ac442", + "Body" : "{\r\n \"name\": \"vmss59749\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Compute/virtualMachineScaleSets/vmss59749\",\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_A0\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 3\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Automatic\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss59749-vm\",\r\n \"adminUsername\": \"jvuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"vhdContainers\": [\r\n \"https://stg41186ec6.blob.core.windows.net/vhds\",\r\n \"https://stg39420054.blob.core.windows.net/vhds\"\r\n ],\r\n \"name\": \"vmss59749-os-disk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04.0-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"primary-nic-cfg\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"primary-nic-ip-cfg\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg90053/providers/Microsoft.Network/virtualNetworks/vmssvnet746670/subnets/subnet1\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n \"extensionProfile\": {\r\n \"extensions\": [\r\n {\r\n \"name\": \"CustomScriptForLinux\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\": true,\r\n \"publisher\": \"Microsoft.OSTCExtensions\",\r\n \"type\": \"CustomScriptForLinux\",\r\n \"typeHandlerVersion\": \"1.4\",\r\n \"settings\": {\"fileUris\":[\"https://stg39420054.blob.core.windows.net/scripts/install_apache.sh\"]}\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": \"70dce7df-cc2b-4381-a8d7-92f0b0b8dbe3\"\r\n }\r\n}", + "x-ms-client-request-id" : "dcd15a98-283f-41c2-a8aa-9a9254eba658", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg55520?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg90053?api-version=2020-06-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f16246d-02da-4d19-93ac-fe4f38e308b7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:08:41 GMT", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14975", - "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-deletes" : "14996", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "a30d0e12-d43a-4f24-9a91-3e1ceab190c6", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080841Z:a30d0e12-d43a-4f24-9a91-3e1ceab190c6", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "a30d0e12-d43a-4f24-9a91-3e1ceab190c6", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:39:33 GMT", + "x-ms-correlation-request-id" : "70a7ef85-b21b-46e5-9fa5-be0dc34b29c8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093933Z:70a7ef85-b21b-46e5-9fa5-be0dc34b29c8", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "70a7ef85-b21b-46e5-9fa5-be0dc34b29c8", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce543dd1-c329-4ace-bdd4-2f07df4e3a9d" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:08:56 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "3460", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11956", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "1f8b2bce-80ca-4c49-9da1-f4e22f7eded8", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080857Z:1f8b2bce-80ca-4c49-9da1-f4e22f7eded8", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "1f8b2bce-80ca-4c49-9da1-f4e22f7eded8", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:39:49 GMT", + "x-ms-correlation-request-id" : "1f0cfc1c-bc34-4d01-883d-4682b864bb88", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T093949Z:1f0cfc1c-bc34-4d01-883d-4682b864bb88", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "1f0cfc1c-bc34-4d01-883d-4682b864bb88", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8c3f3de-a733-45d5-8e16-c5255241ef69" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:09:12 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "3451", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11957", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "54791333-5446-461a-abf6-38ffea984e5b", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080912Z:54791333-5446-461a-abf6-38ffea984e5b", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "54791333-5446-461a-abf6-38ffea984e5b", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:40:04 GMT", + "x-ms-correlation-request-id" : "d9228643-d9f2-4ed5-9376-7f99ad18114f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094004Z:d9228643-d9f2-4ed5-9376-7f99ad18114f", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "d9228643-d9f2-4ed5-9376-7f99ad18114f", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd700e82-16da-41a4-990e-5501ebad8075" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:09:28 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2725", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11956", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "f498af70-a408-4696-aba1-8a54e5276569", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080928Z:f498af70-a408-4696-aba1-8a54e5276569", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "f498af70-a408-4696-aba1-8a54e5276569", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:40:19 GMT", + "x-ms-correlation-request-id" : "a34b4257-62ab-4cbb-a9cf-7a74106d1a79", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094020Z:a34b4257-62ab-4cbb-a9cf-7a74106d1a79", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a34b4257-62ab-4cbb-a9cf-7a74106d1a79", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "026d5271-beef-4436-a843-df3847cf52b9" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:09:44 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4442", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11955", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "0dad2964-92e3-46e8-9ef3-d1bcf9f74b18", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080944Z:0dad2964-92e3-46e8-9ef3-d1bcf9f74b18", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "0dad2964-92e3-46e8-9ef3-d1bcf9f74b18", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:40:35 GMT", + "x-ms-correlation-request-id" : "4f2ef149-1f6f-473a-a41a-4ec3f5148010", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094035Z:4f2ef149-1f6f-473a-a41a-4ec3f5148010", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "4f2ef149-1f6f-473a-a41a-4ec3f5148010", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f29ea0b-f289-41af-86b6-440bf567ed75" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:09:59 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2701", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11954", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "eef5289a-a3f1-43cc-a860-71a626816db1", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T080959Z:eef5289a-a3f1-43cc-a860-71a626816db1", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "eef5289a-a3f1-43cc-a860-71a626816db1", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:40:50 GMT", + "x-ms-correlation-request-id" : "0d3abf9a-91d6-4da6-9bc7-8cebb95b1067", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094051Z:0d3abf9a-91d6-4da6-9bc7-8cebb95b1067", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "0d3abf9a-91d6-4da6-9bc7-8cebb95b1067", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "24b86595-71c6-4d82-ae97-c73bf43977b2" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:10:14 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4478", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11953", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "b68d0d7f-21b7-45ae-aa84-28d3ff40721a", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081015Z:b68d0d7f-21b7-45ae-aa84-28d3ff40721a", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "b68d0d7f-21b7-45ae-aa84-28d3ff40721a", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:41:05 GMT", + "x-ms-correlation-request-id" : "91560073-57d5-4b60-ad53-3a26894f0184", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094106Z:91560073-57d5-4b60-ad53-3a26894f0184", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "91560073-57d5-4b60-ad53-3a26894f0184", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "91c7d02d-33aa-4f43-8242-b8883c8b61ef" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:10:30 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2745", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11952", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "8676496c-1262-4b81-9de0-da522093ab8b", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081031Z:8676496c-1262-4b81-9de0-da522093ab8b", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "8676496c-1262-4b81-9de0-da522093ab8b", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:41:21 GMT", + "x-ms-correlation-request-id" : "e6aab104-8291-4f0f-82ac-4eb2653be6a3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094122Z:e6aab104-8291-4f0f-82ac-4eb2653be6a3", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "e6aab104-8291-4f0f-82ac-4eb2653be6a3", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3e0a17f-5106-4ca2-910c-626fd0e52ca2" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:10:46 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "6887", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11951", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "20e56b52-dde4-48a6-9c69-ef88cf172615", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081046Z:20e56b52-dde4-48a6-9c69-ef88cf172615", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "20e56b52-dde4-48a6-9c69-ef88cf172615", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:41:36 GMT", + "x-ms-correlation-request-id" : "74672578-70e7-4acc-9b6e-b683c0f5e54f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094137Z:74672578-70e7-4acc-9b6e-b683c0f5e54f", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "74672578-70e7-4acc-9b6e-b683c0f5e54f", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f75ccafe-f808-468a-b9d0-a6bdfb712005" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:11:01 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "6880", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11950", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 09:41:52 GMT", + "x-ms-correlation-request-id" : "eb75c21a-0f62-47cd-acb7-e17dc74541eb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094152Z:eb75c21a-0f62-47cd-acb7-e17dc74541eb", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "eb75c21a-0f62-47cd-acb7-e17dc74541eb", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d056cb2d-4dba-4240-8277-404c03b04a66" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11949", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "8dca99e9-894a-47a6-8f98-2e89f9fbef5a", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081102Z:8dca99e9-894a-47a6-8f98-2e89f9fbef5a", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "8dca99e9-894a-47a6-8f98-2e89f9fbef5a", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:42:07 GMT", + "x-ms-correlation-request-id" : "97f22efd-9bbc-486a-aaa0-f47514815fa9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094208Z:97f22efd-9bbc-486a-aaa0-f47514815fa9", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "97f22efd-9bbc-486a-aaa0-f47514815fa9", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "38cad920-6684-4633-b278-4270d793b64c" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:11:17 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4431", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11948", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "fd0fe9f7-aa4c-449f-9131-873e7ebb2e53", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081118Z:fd0fe9f7-aa4c-449f-9131-873e7ebb2e53", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "fd0fe9f7-aa4c-449f-9131-873e7ebb2e53", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:42:23 GMT", + "x-ms-correlation-request-id" : "3b895851-2ad5-4605-8bf1-e41fde79473d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094223Z:3b895851-2ad5-4605-8bf1-e41fde79473d", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "3b895851-2ad5-4605-8bf1-e41fde79473d", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a597bc1a-0120-4e1d-9446-8970ece24fe6" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:11:33 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2693", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11947", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "d545f8d1-24ed-4294-ad02-45baddc1d2f7", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081133Z:d545f8d1-24ed-4294-ad02-45baddc1d2f7", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "d545f8d1-24ed-4294-ad02-45baddc1d2f7", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:42:39 GMT", + "x-ms-correlation-request-id" : "fdfd8ade-bed0-4589-b8ac-b80115de1200", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094239Z:fdfd8ade-bed0-4589-b8ac-b80115de1200", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "fdfd8ade-bed0-4589-b8ac-b80115de1200", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f01c406e-4d76-4dc7-86e4-6c2028aca0b2" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:11:48 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2680", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11946", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "5888fb81-8344-4de4-820e-381ef81a139f", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081149Z:5888fb81-8344-4de4-820e-381ef81a139f", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "5888fb81-8344-4de4-820e-381ef81a139f", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:42:54 GMT", + "x-ms-correlation-request-id" : "aa69627e-ec24-41ae-82e5-cb409bfae5ed", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094254Z:aa69627e-ec24-41ae-82e5-cb409bfae5ed", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "aa69627e-ec24-41ae-82e5-cb409bfae5ed", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ebcda7d-7ff8-4b72-82d9-93a97d01df12" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:12:04 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4413", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11945", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "8a1e1639-375c-4959-9f2a-335ff3137387", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081204Z:8a1e1639-375c-4959-9f2a-335ff3137387", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "8a1e1639-375c-4959-9f2a-335ff3137387", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:43:09 GMT", + "x-ms-correlation-request-id" : "5bff7249-a2e3-4129-b50b-7803a8d1d2ae", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094310Z:5bff7249-a2e3-4129-b50b-7803a8d1d2ae", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "5bff7249-a2e3-4129-b50b-7803a8d1d2ae", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ddd6442b-31a6-405a-bd9f-0feac8e3958b" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:12:20 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2664", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11944", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "20f5066a-2ebc-4cd1-b2e3-c305f84c5312", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081220Z:20f5066a-2ebc-4cd1-b2e3-c305f84c5312", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "20f5066a-2ebc-4cd1-b2e3-c305f84c5312", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:43:25 GMT", + "x-ms-correlation-request-id" : "a6b65353-d740-4ee9-8ca0-9476b200e0e8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094325Z:a6b65353-d740-4ee9-8ca0-9476b200e0e8", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a6b65353-d740-4ee9-8ca0-9476b200e0e8", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "63e8acc0-d03e-449c-b72e-4f8d6ddf8c8c" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:12:35 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "3395", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11943", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "ecaea40b-8984-4620-9636-14a8667b4db6", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081236Z:ecaea40b-8984-4620-9636-14a8667b4db6", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "ecaea40b-8984-4620-9636-14a8667b4db6", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:43:40 GMT", + "x-ms-correlation-request-id" : "b7b3a30e-16eb-4f5f-aa53-c846602696fc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094340Z:b7b3a30e-16eb-4f5f-aa53-c846602696fc", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "b7b3a30e-16eb-4f5f-aa53-c846602696fc", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "36c25341-1444-4e93-9b9d-825c5e64e679" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:12:51 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "4385", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11942", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "59dfc36f-202b-4650-b8f2-1c8d32f8a059", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081251Z:59dfc36f-202b-4650-b8f2-1c8d32f8a059", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "59dfc36f-202b-4650-b8f2-1c8d32f8a059", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:43:56 GMT", + "x-ms-correlation-request-id" : "a172f15b-a166-43a1-80b7-75877c2a5a59", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094356Z:a172f15b-a166-43a1-80b7-75877c2a5a59", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a172f15b-a166-43a1-80b7-75877c2a5a59", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ff4f7e4-02b1-49f8-aed8-84fa6d113cb9" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:13:07 GMT", - "content-length" : "0", - "expires" : "-1", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "6811", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11941", "StatusCode" : "202", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "334ddc8e-15ef-40ba-a9d1-13039d7e4cb3", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081307Z:334ddc8e-15ef-40ba-a9d1-13039d7e4cb3", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "334ddc8e-15ef-40ba-a9d1-13039d7e4cb3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:44:11 GMT", + "x-ms-correlation-request-id" : "04332533-cb5e-43c2-9a4d-11395662e0cf", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094412Z:04332533-cb5e-43c2-9a4d-11395662e0cf", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "04332533-cb5e-43c2-9a4d-11395662e0cf", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc1NTUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5MDA1My1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "659aafd8-03a4-4d4e-89f0-2240b73ce2df" }, "Response" : { - "date" : "Tue, 28 Jul 2020 08:13:23 GMT", - "content-length" : "0", - "expires" : "-1", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "2599", + "x-ms-ratelimit-remaining-subscription-reads" : "11940", "StatusCode" : "200", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "pragma" : "no-cache", - "x-ms-correlation-request-id" : "bd7ac00c-6501-4333-8b3f-3601eac0f311", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "KOREASOUTH:20200728T081323Z:bd7ac00c-6501-4333-8b3f-3601eac0f311", - "cache-control" : "no-cache", - "x-ms-request-id" : "bd7ac00c-6501-4333-8b3f-3601eac0f311", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 09:44:27 GMT", + "x-ms-correlation-request-id" : "32740b33-51dc-419a-8d19-b826d2652689", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T094427Z:32740b33-51dc-419a-8d19-b826d2652689", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "32740b33-51dc-419a-8d19-b826d2652689" + }, + "Exception" : null } ], - "variables" : [ "javacsmrg55520", "vmss93850", "stg7bd53239b9", "vmssvnet636096", "stg4243703852" ] + "variables" : [ "javacsmrg90053", "vmss59749", "stg39420054", "vmssvnet746670", "stg41186ec6" ] } \ No newline at end of file From d890893932b3bf6225d907b25de50fa4b90a5aa4 Mon Sep 17 00:00:00 2001 From: Xiaolu Dai <31124698+saragluna@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:13:37 +0800 Subject: [PATCH 092/168] Support java modules for azure-spring-data-cosmos (#14636) * add module info * fix split packages and runtime exceptions * fix compilation error * fix tests failure * fix checkstyle * extend surefire plugin in spring-data-cosmos * inherit plugin from profile * fix broken link caused by changing samples package name * use plain Java reflection instead of commons.lang3, hence opens to spring module Co-authored-by: Xiaolu Dai --- eng/versioning/external_dependencies.txt | 1 - .../src/main/java/module-info.java | 2 +- .../azure-spring-data-2-2-cosmos/README.md | 2 +- .../azure-spring-data-2-2-cosmos/pom.xml | 19 +++++++ .../azure-spring-data-2-3-cosmos/README.md | 2 +- .../azure-spring-data-2-3-cosmos/pom.xml | 13 +++++ .../azure-spring-data-cosmos-core/README.md | 2 +- .../azure-spring-data-cosmos-core/pom.xml | 53 ++++++++++++++++--- .../spring/data/cosmos/CosmosFactory.java | 12 ++--- .../generator/AbstractQueryGenerator.java | 20 +++---- .../src/main/java/module-info.java | 32 +++++++++++ .../data}/cosmos/AppConfiguration.java | 5 +- .../cosmos/AppConfigurationCodeSnippet.java | 5 +- .../data}/cosmos/AuditableUser.java | 2 +- .../CosmosIndexingPolicyCodeSnippet.java | 3 +- .../data}/cosmos/CosmosProperties.java | 2 +- .../data}/cosmos/GeneratedIdEntity.java | 2 +- .../{ => spring/data}/cosmos/MyItem.java | 2 +- .../ObjectMapperConfigurationCodeSnippet.java | 2 +- .../cosmos/PageableRepositoryCodeSnippet.java | 2 +- .../data}/cosmos/SampleApplication.java | 2 +- .../azure/{ => spring/data}/cosmos/User.java | 2 +- .../data}/cosmos/UserRepository.java | 2 +- .../cosmos/UserRepositoryConfiguration.java | 7 +-- .../{ => spring/data}/cosmos/UserSample.java | 2 +- .../DatabaseConfiguration.java | 4 +- .../MultiDatasourceApplication.java | 10 ++-- .../primarydatasource/first/User.java | 2 +- .../first/UserRepository.java | 2 +- .../secondarydatasource/first/Book.java | 2 +- .../first/BookRepository.java | 2 +- .../azure-spring-data-cosmos-test/pom.xml | 6 --- .../data/cosmos/common/PageTestUtils.java | 11 +++- 33 files changed, 173 insertions(+), 64 deletions(-) create mode 100644 sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/module-info.java rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/AppConfiguration.java (94%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/AppConfigurationCodeSnippet.java (93%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/AuditableUser.java (95%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/CosmosIndexingPolicyCodeSnippet.java (92%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/CosmosProperties.java (97%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/GeneratedIdEntity.java (88%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/MyItem.java (94%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/ObjectMapperConfigurationCodeSnippet.java (95%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/PageableRepositoryCodeSnippet.java (97%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/SampleApplication.java (97%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/User.java (97%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/UserRepository.java (94%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/UserRepositoryConfiguration.java (92%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/UserSample.java (93%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/multidatasource/DatabaseConfiguration.java (98%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/multidatasource/MultiDatasourceApplication.java (82%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/multidatasource/primarydatasource/first/User.java (95%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/multidatasource/primarydatasource/first/UserRepository.java (89%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/multidatasource/secondarydatasource/first/Book.java (94%) rename sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/{ => spring/data}/cosmos/multidatasource/secondarydatasource/first/BookRepository.java (86%) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index f91fbef43d4a1..02cb28990d00c 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -74,7 +74,6 @@ org.codehaus.groovy:groovy-eclipse-batch;2.5.8-01 org.codehaus.groovy:groovy-eclipse-compiler;3.4.0-01 org.hibernate.validator:hibernate-validator;6.1.5.Final org.javatuples:javatuples;1.2 -org.json:json;20140107 org.linguafranca.pwdb:KeePassJava2;2.1.4 org.powermock:powermock-api-mockito2;2.0.2 org.powermock:powermock-module-junit4;2.0.2 diff --git a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java index 5c530cdee1127..27e4b8b2e1395 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java @@ -32,7 +32,7 @@ exports com.azure.cosmos.util; // exporting some packages specifically for Jackson - opens com.azure.cosmos to com.fasterxml.jackson.databind; + opens com.azure.cosmos to com.fasterxml.jackson.databind, com.azure.spring.data.cosmos; opens com.azure.cosmos.implementation to com.fasterxml.jackson.databind, java.logging; opens com.azure.cosmos.implementation.caches to com.fasterxml.jackson.databind; opens com.azure.cosmos.implementation.changefeed to com.fasterxml.jackson.databind; diff --git a/sdk/cosmos/azure-spring-data-2-2-cosmos/README.md b/sdk/cosmos/azure-spring-data-2-2-cosmos/README.md index ff29b93d8e54a..0f18443c03976 100644 --- a/sdk/cosmos/azure-spring-data-2-2-cosmos/README.md +++ b/sdk/cosmos/azure-spring-data-2-2-cosmos/README.md @@ -59,7 +59,7 @@ or contact [opencode@microsoft.com][coc_contact] with any additional questions o [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ [coc_contact]: mailto:opencode@microsoft.com -[samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos +[samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos [sql_api_query]: https://docs.microsoft.com/azure/cosmos-db/sql-api-sql-query [spring_data_2_2_commons]: https://mvnrepository.com/artifact/org.springframework.data/spring-data-commons/2.2.0.RELEASE [api_documentation]: https://azure.github.io/azure-sdk-for-java/cosmos.html#azure-spring-data-2-2-cosmos diff --git a/sdk/cosmos/azure-spring-data-2-2-cosmos/pom.xml b/sdk/cosmos/azure-spring-data-2-2-cosmos/pom.xml index 3365e5774f60b..293fa81b9bb27 100644 --- a/sdk/cosmos/azure-spring-data-2-2-cosmos/pom.xml +++ b/sdk/cosmos/azure-spring-data-2-2-cosmos/pom.xml @@ -29,6 +29,11 @@ azure-spring-data-cosmos-core 3.0.0-beta.2 + + org.slf4j + slf4j-api + 1.7.30 + @@ -42,11 +47,25 @@ org.springframework.data:spring-data-commons:[2.2.9.RELEASE] + org.slf4j:slf4j-api:[1.7.30] + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + com.azure.spring.data.cosmos.pom + + + + diff --git a/sdk/cosmos/azure-spring-data-2-3-cosmos/README.md b/sdk/cosmos/azure-spring-data-2-3-cosmos/README.md index 59c2c76f2523d..0cbfe442af997 100644 --- a/sdk/cosmos/azure-spring-data-2-3-cosmos/README.md +++ b/sdk/cosmos/azure-spring-data-2-3-cosmos/README.md @@ -59,7 +59,7 @@ or contact [opencode@microsoft.com][coc_contact] with any additional questions o [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ [coc_contact]: mailto:opencode@microsoft.com -[samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos +[samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos [sql_api_query]: https://docs.microsoft.com/azure/cosmos-db/sql-api-sql-query [spring_data_2_3_commons]: https://mvnrepository.com/artifact/org.springframework.data/spring-data-commons/2.3.0.RELEASE [api_documentation]: https://azure.github.io/azure-sdk-for-java/cosmos.html#azure-spring-data-2-3-cosmos diff --git a/sdk/cosmos/azure-spring-data-2-3-cosmos/pom.xml b/sdk/cosmos/azure-spring-data-2-3-cosmos/pom.xml index 69322ef703289..246fb67fb4601 100644 --- a/sdk/cosmos/azure-spring-data-2-3-cosmos/pom.xml +++ b/sdk/cosmos/azure-spring-data-2-3-cosmos/pom.xml @@ -47,6 +47,19 @@ + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + com.azure.spring.data.cosmos.pom + + + + diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/README.md b/sdk/cosmos/azure-spring-data-cosmos-core/README.md index d61ad5d59904b..eefb47653384b 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/README.md +++ b/sdk/cosmos/azure-spring-data-cosmos-core/README.md @@ -634,7 +634,7 @@ or contact [opencode@microsoft.com][coc_contact] with any additional questions o [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ [coc_contact]: mailto:opencode@microsoft.com [azure_subscription]: https://azure.microsoft.com/free/ -[samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos +[samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos [sql_api_query]: https://docs.microsoft.com/azure/cosmos-db/sql-api-sql-query [local_emulator]: https://docs.microsoft.com/azure/cosmos-db/local-emulator [local_emulator_export_ssl_certificates]: https://docs.microsoft.com/azure/cosmos-db/local-emulator-export-ssl-certificates diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/pom.xml b/sdk/cosmos/azure-spring-data-cosmos-core/pom.xml index 02a0d7e5ebfc4..08ea1e04cda21 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/pom.xml +++ b/sdk/cosmos/azure-spring-data-cosmos-core/pom.xml @@ -61,6 +61,12 @@ spring-data-commons 2.3.3.RELEASE true + + + org.slf4j + slf4j-api + + org.springframework @@ -87,11 +93,6 @@ jackson-datatype-jsr310 2.11.2 - - org.json - json - 20140107 - org.javatuples javatuples @@ -163,6 +164,12 @@ 3.0.2 provided + + + org.slf4j + slf4j-api + 1.7.30 + @@ -194,10 +201,10 @@ org.javatuples:javatuples:[1.2] com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.11.2] com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.11.2] - org.json:json:[20140107] com.fasterxml.jackson.module:jackson-module-parameter-names:[2.11.2] javax.annotation:javax.annotation-api:[1.3.2] org.apache.commons:commons-lang3:[3.10] + org.slf4j:slf4j-api:[1.7.30] @@ -221,7 +228,41 @@ + + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.common=spring.core + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.core=ALL-UNNAMED + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.core.convert=com.fasterxml.jackson.databind + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.core.converter=ALL-UNNAMED + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.core.mapping=spring.core + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.repository=ALL-UNNAMED + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.repository.query=ALL-UNNAMED + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.repository.support=ALL-UNNAMED,spring.core + --add-opens com.azure.spring.data.cosmos/com.azure.spring.data.cosmos.domain=com.fasterxml.jackson.databind,spring.core,spring.data.commons + + + + + + + + + diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java index f6085600a8ce1..3408e72249da0 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java @@ -6,13 +6,11 @@ import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.common.PropertyLoader; -import org.apache.commons.lang3.reflect.FieldUtils; +import java.lang.reflect.Field; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.Assert; -import java.lang.reflect.Field; - /** * Factory class for CosmosDb to create client */ @@ -84,11 +82,11 @@ private static CosmosClientBuilder updateCosmosClientBuilderWithUASuffix(CosmosC } private static String getUserAgentSuffixValue(CosmosClientBuilder cosmosClientBuilder) { - final Field userAgentSuffix = FieldUtils.getDeclaredField(CosmosClientBuilder.class, - "userAgentSuffix", true); try { - return (String) userAgentSuffix.get(cosmosClientBuilder); - } catch (IllegalAccessException e) { + final Field userAgentSuffixField = cosmosClientBuilder.getClass().getDeclaredField("userAgentSuffix"); + userAgentSuffixField.setAccessible(true); + return (String) userAgentSuffixField.get(cosmosClientBuilder); + } catch (IllegalAccessException | NoSuchFieldException e) { LOGGER.error("Error occurred while getting userAgentSuffix from CosmosClientBuilder", e); } diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java index 43dee3c90d5d4..b50f5cf7c66cb 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java @@ -8,9 +8,9 @@ import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.exception.IllegalQueryException; -import org.javatuples.Pair; import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; +import org.springframework.data.util.Pair; import org.springframework.lang.NonNull; import org.springframework.util.Assert; import org.springframework.util.StringUtils; @@ -56,7 +56,7 @@ private String generateBinaryQuery(@NonNull Criteria criteria, @NonNull List>> generateQueryBody(@NonNull Cosm queryString = String.join(" ", "WHERE", queryString); } - return Pair.with(queryString, parameters); + return Pair.of(queryString, parameters); } private String getParameter(@NonNull Sort.Order order) { @@ -246,12 +246,12 @@ private String generateQueryTail(@NonNull CosmosQuery query) { protected SqlQuerySpec generateCosmosQuery(@NonNull CosmosQuery query, @NonNull String queryHead) { final Pair>> queryBody = generateQueryBody(query); - String queryString = String.join(" ", queryHead, queryBody.getValue0(), generateQueryTail(query)); - final List> parameters = queryBody.getValue1(); + String queryString = String.join(" ", queryHead, queryBody.getFirst(), generateQueryTail(query)); + final List> parameters = queryBody.getSecond(); List sqlParameters = parameters.stream() - .map(p -> new SqlParameter("@" + p.getValue0(), - toCosmosDbValue(p.getValue1()))) + .map(p -> new SqlParameter("@" + p.getFirst(), + toCosmosDbValue(p.getSecond()))) .collect(Collectors.toList()); if (query.getLimit() > 0) { diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/module-info.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/module-info.java new file mode 100644 index 0000000000000..366c26b85f406 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/module-info.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.spring.data.cosmos { + + requires transitive com.azure.cosmos; + requires com.fasterxml.jackson.datatype.jdk8; + requires com.fasterxml.jackson.module.paramnames; + requires java.desktop; + requires org.apache.commons.lang3; + requires org.slf4j; + requires spring.beans; + requires spring.context; + requires spring.core; + requires spring.data.commons; + requires spring.expression; + requires spring.tx; + + exports com.azure.spring.data.cosmos; + exports com.azure.spring.data.cosmos.common; + exports com.azure.spring.data.cosmos.config; + exports com.azure.spring.data.cosmos.core.convert; + exports com.azure.spring.data.cosmos.core; + exports com.azure.spring.data.cosmos.core.mapping; + exports com.azure.spring.data.cosmos.exception; + exports com.azure.spring.data.cosmos.repository; + exports com.azure.spring.data.cosmos.repository.config; + exports com.azure.spring.data.cosmos.repository.support; + + opens com.azure.spring.data.cosmos.config to spring.core; + opens com.azure.spring.data.cosmos.repository.support to spring.beans; +} diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AppConfiguration.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AppConfiguration.java similarity index 94% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AppConfiguration.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AppConfiguration.java index 61a2fcdc00e51..b03be03f0706f 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AppConfiguration.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AppConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING @@ -8,6 +8,9 @@ */ import com.azure.core.credential.AzureKeyCredential; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.DirectConnectionConfig; +import com.azure.cosmos.GatewayConnectionConfig; import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.ResponseDiagnostics; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AppConfigurationCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AppConfigurationCodeSnippet.java similarity index 93% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AppConfigurationCodeSnippet.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AppConfigurationCodeSnippet.java index 18e02804866c0..0fd65e371da1d 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AppConfigurationCodeSnippet.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AppConfigurationCodeSnippet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS @@ -8,6 +8,9 @@ * LINE NUMBERS OF EXISTING CODE SAMPLES. */ +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.DirectConnectionConfig; +import com.azure.cosmos.GatewayConnectionConfig; import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.ResponseDiagnostics; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AuditableUser.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AuditableUser.java similarity index 95% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AuditableUser.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AuditableUser.java index 7702fd4278cae..2a1d22dfe5a65 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/AuditableUser.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AuditableUser.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; import com.azure.spring.data.cosmos.core.mapping.Container; import org.springframework.data.annotation.CreatedBy; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/CosmosIndexingPolicyCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/CosmosIndexingPolicyCodeSnippet.java similarity index 92% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/CosmosIndexingPolicyCodeSnippet.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/CosmosIndexingPolicyCodeSnippet.java index 18bad443d43db..6551db3b42150 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/CosmosIndexingPolicyCodeSnippet.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/CosmosIndexingPolicyCodeSnippet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS @@ -9,7 +9,6 @@ */ import com.azure.cosmos.models.IndexingMode; -import com.azure.spring.data.cosmos.Constants; public @interface CosmosIndexingPolicyCodeSnippet { diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/CosmosProperties.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/CosmosProperties.java similarity index 97% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/CosmosProperties.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/CosmosProperties.java index b073a18479a48..62e04c1c95e5d 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/CosmosProperties.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/CosmosProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/GeneratedIdEntity.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/GeneratedIdEntity.java similarity index 88% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/GeneratedIdEntity.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/GeneratedIdEntity.java index 17885fb943674..17f427048ec70 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/GeneratedIdEntity.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/GeneratedIdEntity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; import com.azure.spring.data.cosmos.core.mapping.GeneratedValue; import org.springframework.data.annotation.Id; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/MyItem.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/MyItem.java similarity index 94% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/MyItem.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/MyItem.java index c8e692eab1aa7..d709b0dc62c24 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/MyItem.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/MyItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/ObjectMapperConfigurationCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/ObjectMapperConfigurationCodeSnippet.java similarity index 95% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/ObjectMapperConfigurationCodeSnippet.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/ObjectMapperConfigurationCodeSnippet.java index 37737913b7b81..d23f5a681370a 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/ObjectMapperConfigurationCodeSnippet.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/ObjectMapperConfigurationCodeSnippet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.context.annotation.Bean; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/PageableRepositoryCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/PageableRepositoryCodeSnippet.java similarity index 97% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/PageableRepositoryCodeSnippet.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/PageableRepositoryCodeSnippet.java index 29217df895c44..4adad5c3385c7 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/PageableRepositoryCodeSnippet.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/PageableRepositoryCodeSnippet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/SampleApplication.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/SampleApplication.java similarity index 97% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/SampleApplication.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/SampleApplication.java index db46116814d09..7aac8e6976010 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/SampleApplication.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/SampleApplication.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/User.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/User.java similarity index 97% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/User.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/User.java index 446bad1f07e35..a89db0fcf72fc 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/User.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/User.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserRepository.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserRepository.java similarity index 94% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserRepository.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserRepository.java index 13cd1fcb5d9c2..171dd818f92ef 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserRepository.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserRepositoryConfiguration.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserRepositoryConfiguration.java similarity index 92% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserRepositoryConfiguration.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserRepositoryConfiguration.java index d0fbda4511942..8b80eaa5a957d 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserRepositoryConfiguration.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserRepositoryConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING @@ -8,6 +8,7 @@ */ import com.azure.core.credential.AzureKeyCredential; +import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.ResponseDiagnostics; @@ -27,7 +28,7 @@ @EnableReactiveCosmosRepositories @PropertySource("classpath:application.properties") public class UserRepositoryConfiguration extends AbstractCosmosConfiguration { - private static final Logger logger = LoggerFactory.getLogger(UserRepositoryConfiguration.class); + private static final Logger LOGGER = LoggerFactory.getLogger(UserRepositoryConfiguration.class); @Autowired private CosmosProperties properties; @@ -69,7 +70,7 @@ private static class ResponseDiagnosticsProcessorImplementation implements Respo @Override public void processResponseDiagnostics(@Nullable ResponseDiagnostics responseDiagnostics) { - logger.info("Response Diagnostics {}", responseDiagnostics); + LOGGER.info("Response Diagnostics {}", responseDiagnostics); } } } diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserSample.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserSample.java similarity index 93% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserSample.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserSample.java index 2f6ab68b72dc7..9cc3c17d503f1 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/UserSample.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/UserSample.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; +package com.azure.spring.data.cosmos; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/DatabaseConfiguration.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/DatabaseConfiguration.java similarity index 98% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/DatabaseConfiguration.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/DatabaseConfiguration.java index 66044275e946f..a3518fbc3f717 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/DatabaseConfiguration.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/DatabaseConfiguration.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.multidatasource; +package com.azure.spring.data.cosmos.multidatasource; import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; -import com.azure.cosmos.CosmosProperties; +import com.azure.spring.data.cosmos.CosmosProperties; import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; import com.azure.spring.data.cosmos.config.CosmosConfig; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/MultiDatasourceApplication.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/MultiDatasourceApplication.java similarity index 82% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/MultiDatasourceApplication.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/MultiDatasourceApplication.java index b6f37adc2ec4d..d755caab02861 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/MultiDatasourceApplication.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/MultiDatasourceApplication.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.multidatasource; +package com.azure.spring.data.cosmos.multidatasource; -import com.azure.cosmos.multidatasource.primarydatasource.first.User; -import com.azure.cosmos.multidatasource.primarydatasource.first.UserRepository; -import com.azure.cosmos.multidatasource.secondarydatasource.first.Book; -import com.azure.cosmos.multidatasource.secondarydatasource.first.BookRepository; +import com.azure.spring.data.cosmos.multidatasource.primarydatasource.first.User; +import com.azure.spring.data.cosmos.multidatasource.primarydatasource.first.UserRepository; +import com.azure.spring.data.cosmos.multidatasource.secondarydatasource.first.Book; +import com.azure.spring.data.cosmos.multidatasource.secondarydatasource.first.BookRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/first/User.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/primarydatasource/first/User.java similarity index 95% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/first/User.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/primarydatasource/first/User.java index 589a12d411bb1..6a6c6c6ba09ef 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/first/User.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/primarydatasource/first/User.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.multidatasource.primarydatasource.first; +package com.azure.spring.data.cosmos.multidatasource.primarydatasource.first; import com.azure.spring.data.cosmos.core.mapping.Container; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/first/UserRepository.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/primarydatasource/first/UserRepository.java similarity index 89% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/first/UserRepository.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/primarydatasource/first/UserRepository.java index 5054d18a5c79f..a6dd31ab8ae2f 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/first/UserRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/primarydatasource/first/UserRepository.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.multidatasource.primarydatasource.first; +package com.azure.spring.data.cosmos.multidatasource.primarydatasource.first; import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; import reactor.core.publisher.Flux; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/first/Book.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/secondarydatasource/first/Book.java similarity index 94% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/first/Book.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/secondarydatasource/first/Book.java index 3bdbf8a660785..8668fa618a7fe 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/first/Book.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/secondarydatasource/first/Book.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.multidatasource.secondarydatasource.first; +package com.azure.spring.data.cosmos.multidatasource.secondarydatasource.first; import com.azure.spring.data.cosmos.core.mapping.Container; import org.springframework.data.annotation.Id; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/first/BookRepository.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/secondarydatasource/first/BookRepository.java similarity index 86% rename from sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/first/BookRepository.java rename to sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/secondarydatasource/first/BookRepository.java index 64659ea321980..e8906d22dc6bd 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/first/BookRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/multidatasource/secondarydatasource/first/BookRepository.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.multidatasource.secondarydatasource.first; +package com.azure.spring.data.cosmos.multidatasource.secondarydatasource.first; import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/pom.xml b/sdk/cosmos/azure-spring-data-cosmos-test/pom.xml index 2da0882f7576e..9704c2480ea25 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-test/pom.xml +++ b/sdk/cosmos/azure-spring-data-cosmos-test/pom.xml @@ -57,12 +57,6 @@ spring-boot-starter-test 2.3.3.RELEASE test - - - com.vaadin.external.google - android-json - - io.projectreactor diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java index 77136280e0954..9c0b4b3e198e9 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java +++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java @@ -3,6 +3,7 @@ package com.azure.spring.data.cosmos.common; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; +import org.json.JSONException; import org.json.JSONObject; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; @@ -34,8 +35,14 @@ private static boolean continuationTokenIsNull(CosmosPageRequest pageRequest) { return true; } - final JSONObject jsonObject = new JSONObject(tokenJson); + final JSONObject jsonObject; + try { + jsonObject = new JSONObject(tokenJson); + return jsonObject.isNull("compositeToken"); + } catch (JSONException e) { + e.printStackTrace(); + return false; + } - return jsonObject.isNull("compositeToken"); } } From 3b8c18207eb9de9a3ad71b135d0b358116a7bf17 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Thu, 3 Sep 2020 22:04:45 -0700 Subject: [PATCH 093/168] [TA] test live tests in private endpoint (#14800) * add disable azure resource creation --- sdk/textanalytics/tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/textanalytics/tests.yml b/sdk/textanalytics/tests.yml index 53543a2eb9310..655e31584e870 100644 --- a/sdk/textanalytics/tests.yml +++ b/sdk/textanalytics/tests.yml @@ -8,5 +8,9 @@ jobs: - name: azure-ai-textanalytics groupId: com.azure safeName: azureaitextanalytics + # resource creation is disabled because we are trying to test the private endpoint. + # Will enable it when service rolls out the changes to all region. + DisableAzureResourceCreation: true EnvVars: - AZURE_TEST_MODE: RECORD + AZURE_TEXT_ANALYTICS_API_KEY: $(java-textanalytics-test-api-key) + AZURE_TEXT_ANALYTICS_ENDPOINT: $(java-textanalytics-test-ppe-endpoint-string) From 3e041ec20a24500953c90c28b3b093deaac98c43 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 3 Sep 2020 22:31:09 -0700 Subject: [PATCH 094/168] Increment version for core releases (#14803) * Increment package version after release of com.azure azure-core * Increment package version after release of com.azure azure-core-experimental * Increment package version after release of com.azure azure-core-test * Increment package version after release of com.azure azure-core-serializer-json-jackson * Increment package version after release of com.azure azure-core-http-okhttp * Increment package version after release of com.azure azure-core-http-netty * Increment package version after release of com.azure azure-core-serializer-json-gson * Increment package version after release of com.azure azure-core-serializer-avro-apache * Remove unreleased azure-core Co-authored-by: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> --- common/perf-test-core/pom.xml | 2 +- eng/jacoco-test-coverage/pom.xml | 14 +++++++------- eng/versioning/version_client.txt | 17 ++++++++--------- .../azure-ai-anomalydetector/pom.xml | 6 +++--- .../azure-data-appconfiguration/pom.xml | 8 ++++---- .../pom.xml | 4 ++-- sdk/core/azure-core-amqp/pom.xml | 2 +- sdk/core/azure-core-experimental/CHANGELOG.md | 3 +++ sdk/core/azure-core-experimental/pom.xml | 4 ++-- sdk/core/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/pom.xml | 4 ++-- .../CHANGELOG.md | 3 +++ .../azure-core-serializer-avro-apache/pom.xml | 6 +++--- .../azure-core-serializer-avro-jackson/pom.xml | 4 ++-- .../CHANGELOG.md | 3 +++ .../azure-core-serializer-json-gson/pom.xml | 4 ++-- .../CHANGELOG.md | 3 +++ .../azure-core-serializer-json-jackson/pom.xml | 4 ++-- sdk/core/azure-core-test/CHANGELOG.md | 3 +++ sdk/core/azure-core-test/pom.xml | 4 ++-- .../azure-core-tracing-opentelemetry/pom.xml | 4 ++-- sdk/core/azure-core/CHANGELOG.md | 3 +++ sdk/core/azure-core/pom.xml | 2 +- sdk/cosmos/azure-cosmos/pom.xml | 2 +- .../azure-digitaltwins-core/pom.xml | 8 ++++---- sdk/e2e/pom.xml | 6 +++--- sdk/eventgrid/azure-messaging-eventgrid/pom.xml | 8 ++++---- sdk/eventhubs/azure-messaging-eventhubs/pom.xml | 4 ++-- .../azure-ai-formrecognizer/pom.xml | 8 ++++---- sdk/identity/azure-identity/pom.xml | 4 ++-- .../pom.xml | 8 ++++---- .../azure-security-keyvault-keys/pom.xml | 8 ++++---- .../azure-security-keyvault-secrets/pom.xml | 8 ++++---- .../microsoft-azure-loganalytics/pom.xml | 2 +- .../azure-resourcemanager-appplatform/pom.xml | 2 +- .../azure-resourcemanager-appservice/pom.xml | 2 +- .../azure-resourcemanager-authorization/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 | 2 +- .../azure-resourcemanager-sql/pom.xml | 2 +- .../azure-resourcemanager-storage/pom.xml | 2 +- .../azure-resourcemanager-test/pom.xml | 4 ++-- .../pom.xml | 2 +- .../azure-resourcemanager/pom.xml | 2 +- .../azure-data-schemaregistry/pom.xml | 4 ++-- sdk/search/azure-search-documents/pom.xml | 8 ++++---- .../azure-messaging-servicebus/pom.xml | 8 ++++---- 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 | 2 +- sdk/storage/azure-storage-blob/pom.xml | 6 +++--- sdk/storage/azure-storage-common/pom.xml | 6 +++--- sdk/storage/azure-storage-file-datalake/pom.xml | 4 ++-- sdk/storage/azure-storage-file-share/pom.xml | 4 ++-- sdk/storage/azure-storage-queue/pom.xml | 6 +++--- sdk/tables/azure-data-tables/pom.xml | 4 ++-- sdk/template/azure-sdk-template/pom.xml | 2 +- .../azure-ai-textanalytics/pom.xml | 8 ++++---- 75 files changed, 178 insertions(+), 155 deletions(-) diff --git a/common/perf-test-core/pom.xml b/common/perf-test-core/pom.xml index 4517de9510623..6187de26c007b 100644 --- a/common/perf-test-core/pom.xml +++ b/common/perf-test-core/pom.xml @@ -78,7 +78,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 1cd6d904b8566..3ef40edcf53fa 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -54,7 +54,7 @@ com.azure azure-core - 1.8.0 + 1.9.0-beta.1 com.azure @@ -64,7 +64,7 @@ com.azure azure-core-experimental - 1.0.0-beta.3 + 1.0.0-beta.4 com.azure @@ -74,12 +74,12 @@ com.azure azure-core-http-netty - 1.6.0 + 1.7.0-beta.1 com.azure azure-core-http-okhttp - 1.3.0 + 1.4.0-beta.1 com.azure @@ -89,17 +89,17 @@ com.azure azure-core-serializer-avro-apache - 1.0.0-beta.2 + 1.0.0-beta.3 com.azure azure-core-serializer-json-gson - 1.0.0 + 1.1.0-beta.1 com.azure azure-core-serializer-json-jackson - 1.0.0 + 1.1.0-beta.1 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 6ab9606da2c7c..0529873b1e7a1 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -7,18 +7,18 @@ com.azure:azure-client-sdk-parent;1.7.0;1.7.0 com.azure:azure-ai-anomalydetector;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-ai-formrecognizer;3.0.0;3.1.0-beta.1 com.azure:azure-ai-textanalytics;5.0.0;5.1.0-beta.1 -com.azure:azure-core;1.7.0;1.8.0 +com.azure:azure-core;1.8.0;1.9.0-beta.1 com.azure:azure-core-amqp;1.4.0;1.5.0-beta.1 -com.azure:azure-core-experimental;1.0.0-beta.2;1.0.0-beta.3 +com.azure:azure-core-experimental;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-core-http-netty;1.5.4;1.6.0 -com.azure:azure-core-http-okhttp;1.2.5;1.3.0 +com.azure:azure-core-http-netty;1.6.0;1.7.0-beta.1 +com.azure:azure-core-http-okhttp;1.3.0;1.4.0-beta.1 com.azure:azure-core-management;1.0.0-beta.3;1.0.0-beta.4 -com.azure:azure-core-serializer-avro-apache;1.0.0-beta.1;1.0.0-beta.2 +com.azure:azure-core-serializer-avro-apache;1.0.0-beta.2;1.0.0-beta.3 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.0.0-beta.3;1.0.0 -com.azure:azure-core-serializer-json-jackson;1.0.0-beta.3;1.0.0 -com.azure:azure-core-test;1.4.0;1.4.1 +com.azure:azure-core-serializer-json-gson;1.0.0;1.1.0-beta.1 +com.azure:azure-core-serializer-json-jackson;1.0.0;1.1.0-beta.1 +com.azure:azure-core-test;1.4.1;1.5.0-beta.1 com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.6;1.0.0-beta.7 com.azure:azure-cosmos;4.3.1;4.4.0-beta.2 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 @@ -129,7 +129,6 @@ com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;1.2.8-beta.1;1.2. # Format; # unreleased_:;dependency-version # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. -unreleased_com.azure:azure-core;1.8.0 unreleased_com.azure:azure-core-amqp;1.5.0-beta.1 unreleased_com.azure:azure-messaging-servicebus;7.0.0-beta.5 unreleased_com.azure:azure-security-keyvault-keys;4.3.0-beta.1 diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml index 7ce431082b526..193fc1af0d86a 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 @@ -68,7 +68,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index f06f7e68eed52..49743d4228d2f 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 test diff --git a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml index 60f3ff30c3bb4..1a94983e3a53e 100644 --- a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml +++ b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml @@ -57,7 +57,7 @@ com.azure azure-core - 1.7.0 + 1.8.0 com.azure @@ -77,7 +77,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 org.hibernate.validator diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml index b5a4414e75a87..5110e8b7dc950 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.8.0 + 1.9.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 ab66d7a57dcdb..56de7d38d9038 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.4 (Unreleased) + + ## 1.0.0-beta.3 (2020-09-03) - Added `AvroSerializer` interface containing Avro specific serializer APIs. diff --git a/sdk/core/azure-core-experimental/pom.xml b/sdk/core/azure-core-experimental/pom.xml index 3b41467420919..5550c59fe4987 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.3 + 1.0.0-beta.4 Microsoft Azure Java Core Experimental Library This package contains experimental core types for Azure Java clients. @@ -58,7 +58,7 @@ com.azure azure-core - 1.8.0 + 1.9.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 3fd3958871780..e5590b70f9a03 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.8.0 + 1.9.0-beta.1 com.azure azure-core - 1.8.0 + 1.9.0-beta.1 test-jar test com.azure azure-core-test - 1.4.1 + 1.5.0-beta.1 test com.azure azure-core-test - 1.4.1 + 1.5.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 f2648881cce7e..ec93f6b213965 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.7.0-beta.1 (Unreleased) + + ## 1.6.0 (2020-09-03) - Added new APIs to configure request write timeout, response timeout, and response body read timeout. diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml index a220d926bea37..1198a61507293 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.6.0 + 1.7.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.8.0 + 1.9.0-beta.1 @@ -117,20 +117,20 @@ com.azure azure-core - 1.8.0 + 1.9.0-beta.1 test-jar test com.azure azure-core-test - 1.4.1 + 1.5.0-beta.1 test com.azure azure-core-test - 1.4.1 + 1.5.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 dd70b44544b61..ca86acf1ee5a3 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.4.0-beta.1 (Unreleased) + + ## 1.3.0 (2020-09-03) - Updated `okhttp` dependency from `4.2.2` to `4.8.1`. diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml index 19f2f1e55861a..2d1deb20b2962 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.3.0 + 1.4.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.8.0 + 1.9.0-beta.1 @@ -73,20 +73,20 @@ com.azure azure-core - 1.8.0 + 1.9.0-beta.1 test-jar test com.azure azure-core-test - 1.4.1 + 1.5.0-beta.1 test com.azure azure-core-test - 1.4.1 + 1.5.0-beta.1 test-jar test diff --git a/sdk/core/azure-core-management/pom.xml b/sdk/core/azure-core-management/pom.xml index 19ad0867f3810..79f77538c1f33 100644 --- a/sdk/core/azure-core-management/pom.xml +++ b/sdk/core/azure-core-management/pom.xml @@ -59,7 +59,7 @@ com.azure azure-core - 1.8.0 + 1.9.0-beta.1 @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.7.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 096eade31d3f9..d4a8d96145e42 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.3 (Unreleased) + + ## 1.0.0-beta.2 (2020-09-03) - Updated `ApacheAvroSerializer` to implement `AvroSerializer` instead of `ObjectSerializer`. diff --git a/sdk/core/azure-core-serializer-avro-apache/pom.xml b/sdk/core/azure-core-serializer-avro-apache/pom.xml index f8d28bff2411b..32e0343ed2481 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.2 + 1.0.0-beta.3 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.8.0 + 1.9.0-beta.1 com.azure azure-core-experimental - 1.0.0-beta.3 + 1.0.0-beta.4 diff --git a/sdk/core/azure-core-serializer-avro-jackson/pom.xml b/sdk/core/azure-core-serializer-avro-jackson/pom.xml index eec3239746c5f..8862fe9c3b08e 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.8.0 + 1.9.0-beta.1 com.azure azure-core-experimental - 1.0.0-beta.3 + 1.0.0-beta.4 diff --git a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md index 52ea81359c3fb..c03901f74bbb4 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.1.0-beta.1 (Unreleased) + + ## 1.0.0 (2020-09-03) - Initial GA. diff --git a/sdk/core/azure-core-serializer-json-gson/pom.xml b/sdk/core/azure-core-serializer-json-gson/pom.xml index a49b0caf7714a..f6d14c0eb15d9 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.0.0 + 1.1.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.8.0 + 1.9.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 d31da6e5a28a3..e577e84b2da95 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.1.0-beta.1 (Unreleased) + + ## 1.0.0 (2020-09-03) - Initial GA. diff --git a/sdk/core/azure-core-serializer-json-jackson/pom.xml b/sdk/core/azure-core-serializer-json-jackson/pom.xml index efe57f0708990..0a9eaf4476096 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.0.0 + 1.1.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.8.0 + 1.9.0-beta.1 diff --git a/sdk/core/azure-core-test/CHANGELOG.md b/sdk/core/azure-core-test/CHANGELOG.md index 8a204e2c404ae..91fb991278674 100644 --- a/sdk/core/azure-core-test/CHANGELOG.md +++ b/sdk/core/azure-core-test/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.5.0-beta.1 (Unreleased) + + ## 1.4.1 (2020-09-03) - Updated `azure-core` dependency. diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index 5d3d64ccb0e13..0285e31bf6943 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.4.1 + 1.5.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.8.0 + 1.9.0-beta.1 diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml index 11a28e9170207..bcd00b18502ea 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml +++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml @@ -40,7 +40,7 @@ com.azure azure-core - 1.8.0 + 1.9.0-beta.1 io.grpc @@ -58,7 +58,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.7.0-beta.1 test diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 3a41b7a587f2a..e8b1da313c746 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.9.0-beta.1 (Unreleased) + + ## 1.8.0 (2020-09-03) - General performance fixes for serialization, URL modification and parsing, and more. diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index d7f115097f6f3..79fe83364e68b 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.8.0 + 1.9.0-beta.1 Microsoft Azure Java Core Library This package contains core types for Azure Java clients. diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index 2b74a1c6b08c9..d72b79f091f97 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -120,7 +120,7 @@ Licensed under the MIT License. com.azure azure-core - 1.7.0 + 1.8.0 com.fasterxml.jackson.module diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml index faf02a2bfc764..2d704698820c3 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml +++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml @@ -25,12 +25,12 @@ com.azure azure-core - 1.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.fasterxml.jackson.core @@ -42,7 +42,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test @@ -54,7 +54,7 @@ com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 test diff --git a/sdk/e2e/pom.xml b/sdk/e2e/pom.xml index 3a309bfecf74d..5c373c3b882a1 100644 --- a/sdk/e2e/pom.xml +++ b/sdk/e2e/pom.xml @@ -23,12 +23,12 @@ com.azure azure-core - 1.8.0 + 1.9.0-beta.1 com.azure azure-core-http-netty - 1.6.0 + 1.7.0-beta.1 com.azure @@ -64,7 +64,7 @@ com.azure azure-core-test - 1.4.1 + 1.5.0-beta.1 test diff --git a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml index f44852421c256..cc1da003a1da4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml @@ -62,17 +62,17 @@ com.azure azure-core - 1.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure azure-core-serializer-json-jackson - 1.0.0-beta.3 + 1.0.0 @@ -103,7 +103,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml index a655e18055e14..a84ca5e9e0761 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.7.0 + 1.8.0 com.azure @@ -55,7 +55,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index 319c7b5e3fc77..cba43d5f080b3 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 test diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index df7ef398a15e2..fd9b15a1d0fb6 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -27,7 +27,7 @@ com.azure azure-core - 1.7.0 + 1.8.0 com.microsoft.azure @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml index 6003b22f1f440..7f720a3cf10a1 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 @@ -84,14 +84,14 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 test diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml index 69789571ca3de..9a983a60e9bc9 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 @@ -93,13 +93,13 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 test diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml index 466decca05033..d5b4fb33f7c19 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 test @@ -98,7 +98,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/loganalytics/microsoft-azure-loganalytics/pom.xml b/sdk/loganalytics/microsoft-azure-loganalytics/pom.xml index 3ee70cb15ebdf..299f8d7e15afd 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.4.0 + 1.4.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml index 6e2cc54d4918d..71f8cf549384b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml @@ -80,7 +80,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml index ee22f52dde41e..13a82983031c6 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml index 6e2c4a8d78a72..ab98ee7cdfd0c 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml index 4ace74afbae8a..e33aed9405250 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml index 6b9e8da1391ff..adeb43968dc5e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml @@ -90,7 +90,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml index 112e477fef4fa..33cb20f06c3ad 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml index ea86ee56cf0df..b8964233564b0 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml index 5c76744b75df2..7d20335f9798d 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml index da8c7fe564be5..a3500c74dc8d5 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml index ef47a1a3d99e1..7bc45715cc6de 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml index dd4d786bdbd0f..202c64b6ce99c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml @@ -84,7 +84,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml index 77053ba32de57..a7bdf8fc50780 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml index 6a99b3e819642..008820d2041db 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml index 8ec947c300a75..249fedc4331e8 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml index d128f6bb098e1..9a475aea306fe 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml index 1d1d8b8a88783..99450fc495e35 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml index fdfbea79ce120..a33d3c3e7e0c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml @@ -92,7 +92,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml index 9ce3764a4affa..95935b2e57681 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.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml index 0d825167a078f..62e9cd38204e2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml @@ -76,7 +76,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml index 160868c95a13c..6bf8305d5c9fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml @@ -52,7 +52,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 com.azure @@ -67,7 +67,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml index a380bf171bb49..5a3badb5d9f9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml @@ -76,7 +76,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 366d876ba194d..9652b5ef84541 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -177,7 +177,7 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/schemaregistry/azure-data-schemaregistry/pom.xml b/sdk/schemaregistry/azure-data-schemaregistry/pom.xml index c08a9c1e91f71..f7a32bf0fc06c 100644 --- a/sdk/schemaregistry/azure-data-schemaregistry/pom.xml +++ b/sdk/schemaregistry/azure-data-schemaregistry/pom.xml @@ -47,12 +47,12 @@ com.azure azure-core - 1.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 diff --git a/sdk/search/azure-search-documents/pom.xml b/sdk/search/azure-search-documents/pom.xml index 76fd47ded6c33..ba212bc78a867 100644 --- a/sdk/search/azure-search-documents/pom.xml +++ b/sdk/search/azure-search-documents/pom.xml @@ -28,17 +28,17 @@ com.azure azure-core - 1.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure azure-core-serializer-json-jackson - 1.0.0-beta.3 + 1.0.0 + 1.4.1 test diff --git a/sdk/servicebus/azure-messaging-servicebus/pom.xml b/sdk/servicebus/azure-messaging-servicebus/pom.xml index 13d7b6f29d9ee..816ceae3df891 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.7.0 + 1.8.0 com.azure @@ -52,20 +52,20 @@ com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 test diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml index b6eee94f07d62..a046674a0da3b 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure @@ -81,7 +81,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/storage/azure-storage-blob-changefeed/pom.xml b/sdk/storage/azure-storage-blob-changefeed/pom.xml index bd00fea825202..ef72d9a25881f 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure @@ -81,7 +81,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml index 43b8be5c6d828..69b3055b16a4a 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 com.azure @@ -56,7 +56,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/storage/azure-storage-blob-nio/pom.xml b/sdk/storage/azure-storage-blob-nio/pom.xml index e0c4f7169a2ac..c1ae2740a1189 100644 --- a/sdk/storage/azure-storage-blob-nio/pom.xml +++ b/sdk/storage/azure-storage-blob-nio/pom.xml @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 25e2ea912aaed..1c9741956ac18 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -55,7 +55,7 @@ com.azure azure-core - 1.7.0 + 1.8.0 com.azure @@ -80,13 +80,13 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml index 3c269c7178d04..29496ef00f27b 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 + 1.4.1 test diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 26c5bf1dd5981..2a2de8a14162f 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -71,13 +71,13 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/storage/azure-storage-file-share/pom.xml b/sdk/storage/azure-storage-file-share/pom.xml index e37688a3a9698..88b45a5dcb455 100644 --- a/sdk/storage/azure-storage-file-share/pom.xml +++ b/sdk/storage/azure-storage-file-share/pom.xml @@ -52,13 +52,13 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index 7917204546a1c..7a2a8d0190b90 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -36,7 +36,7 @@ com.azure azure-core - 1.7.0 + 1.8.0 com.azure @@ -46,13 +46,13 @@ com.azure azure-core-test - 1.4.0 + 1.4.1 test com.azure azure-core-http-netty - 1.5.4 + 1.6.0 test diff --git a/sdk/tables/azure-data-tables/pom.xml b/sdk/tables/azure-data-tables/pom.xml index 1a4c6a1d3a8f8..f452f59153bbd 100644 --- a/sdk/tables/azure-data-tables/pom.xml +++ b/sdk/tables/azure-data-tables/pom.xml @@ -40,7 +40,7 @@ Licensed under the MIT License. com.azure azure-core - 1.8.0 + 1.8.0 com.azure @@ -74,7 +74,7 @@ Licensed under the MIT License. com.azure azure-core-test - 1.4.0 + 1.4.1 test diff --git a/sdk/template/azure-sdk-template/pom.xml b/sdk/template/azure-sdk-template/pom.xml index 4a873906f5f4d..ec06fb79f67c5 100644 --- a/sdk/template/azure-sdk-template/pom.xml +++ b/sdk/template/azure-sdk-template/pom.xml @@ -31,7 +31,7 @@ com.azure azure-core - 1.7.0 + 1.8.0 org.junit.jupiter diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index a9e80a847cfaf..7b8eeea35fc73 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.7.0 + 1.8.0 com.azure azure-core-http-netty - 1.5.4 + 1.6.0 + 1.4.1 test com.azure azure-core-http-okhttp - 1.2.5 + 1.3.0 test From 1c32ebaa7a67ae13f4707c6338c19bc536c6257f Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 3 Sep 2020 23:44:11 -0700 Subject: [PATCH 095/168] Increment version for resourcemanager releases (#14768) * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-containerinstance * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-keyvault * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-containerservice * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-sql * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-containerregistry * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-appplatform * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-monitor * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-msi * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-compute * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-cosmos * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-authorization * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-dns * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-appservice * Increment package version after release of com.azure.resourcemanager azure-resourcemanager * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-storage * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-resources * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-network * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-redis * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-trafficmanager * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-privatedns * Increment package version after release of com.azure.resourcemanager azure-resourcemanager-eventhubs * update version for sample and test * update version * update readme * update change log version Co-authored-by: Tanyi Chen --- eng/jacoco-test-coverage/pom.xml | 34 +++++++------- eng/versioning/version_client.txt | 46 +++++++++---------- sdk/resourcemanager/README.md | 8 ++-- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-appplatform/pom.xml | 14 +++--- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-appservice/pom.xml | 16 +++---- .../CHANGELOG.md | 3 ++ .../pom.xml | 8 ++-- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-compute/pom.xml | 18 ++++---- .../CHANGELOG.md | 3 ++ .../pom.xml | 16 +++---- .../CHANGELOG.md | 3 ++ .../pom.xml | 10 ++-- .../CHANGELOG.md | 3 ++ .../pom.xml | 8 ++-- .../azure-resourcemanager-cosmos/CHANGELOG.md | 3 ++ .../azure-resourcemanager-cosmos/pom.xml | 12 ++--- .../azure-resourcemanager-dns/CHANGELOG.md | 3 ++ .../azure-resourcemanager-dns/pom.xml | 8 ++-- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-eventhubs/pom.xml | 10 ++-- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-keyvault/pom.xml | 10 ++-- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-monitor/pom.xml | 14 +++--- .../azure-resourcemanager-msi/CHANGELOG.md | 3 ++ .../azure-resourcemanager-msi/pom.xml | 12 ++--- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-network/pom.xml | 12 ++--- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-privatedns/pom.xml | 10 ++-- .../azure-resourcemanager-redis/CHANGELOG.md | 3 ++ .../azure-resourcemanager-redis/pom.xml | 10 ++-- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-resources/pom.xml | 6 +-- .../CHANGELOG.md | 2 +- .../azure-resourcemanager-samples/pom.xml | 8 ++-- .../azure-resourcemanager-sql/CHANGELOG.md | 3 ++ .../azure-resourcemanager-sql/pom.xml | 10 ++-- .../CHANGELOG.md | 3 ++ .../azure-resourcemanager-storage/pom.xml | 8 ++-- .../azure-resourcemanager-test/CHANGELOG.md | 2 +- .../azure-resourcemanager-test/pom.xml | 2 +- .../CHANGELOG.md | 3 ++ .../pom.xml | 8 ++-- .../azure-resourcemanager/CHANGELOG.md | 5 +- .../azure-resourcemanager/pom.xml | 46 +++++++++---------- 49 files changed, 248 insertions(+), 185 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 3ef40edcf53fa..a1714e5c7f398 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -239,87 +239,87 @@ com.azure.resourcemanager azure-resourcemanager - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-appplatform - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-appservice - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-authorization - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-compute - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-containerinstance - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-containerservice - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-cosmos - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-dns - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-keyvault - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-monitor - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-msi - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-network - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-sql - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 0529873b1e7a1..d43b12c3da0bd 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -64,29 +64,29 @@ com.azure:azure-spring-boot-test-keyvault;1.0.0;1.0.0 com.azure:azure-spring-boot-test-servicebus-jms;1.0.0;1.0.0 com.azure:azure-spring-cloud-test-eventhubs;1.0.0;1.0.0 com.azure:azure-spring-data-gremlin;2.3.1-beta.1;2.3.1-beta.1 -com.azure.resourcemanager:azure-resourcemanager;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-appplatform;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-appservice;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-authorization;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-compute;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-containerservice;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-cosmos;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-dns;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.0.0-beta.4;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-keyvault;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-monitor;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-msi;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-network;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-privatedns;2.0.0-beta.4;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-resources;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-redis;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-sql;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-storage;2.0.0-beta.3;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.0.0-beta.4;2.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.4;2.0.0-beta.4 +com.azure.resourcemanager:azure-resourcemanager;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-appplatform;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-appservice;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-authorization;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-compute;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-containerservice;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-cosmos;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-dns;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-keyvault;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-monitor;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-msi;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-network;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-privatedns;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-resources;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-redis;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-sql;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-storage;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.4;2.0.0-beta.5 com.microsoft.azure:azure-active-directory-b2c-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter;2.4.0-beta.1;2.4.0-beta.1 diff --git a/sdk/resourcemanager/README.md b/sdk/resourcemanager/README.md index 4ee27610d1103..0d02c433f3780 100644 --- a/sdk/resourcemanager/README.md +++ b/sdk/resourcemanager/README.md @@ -23,12 +23,12 @@ If you are an existing user of the older version of Azure management library for ### Include the package -[//]: # ({x-version-update-start;com.azure:azure-resourcemanager;current}) +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager;current}) ```xml com.azure.resourcemanager azure-resourcemanager - 2.0.0-beta.3 + 2.0.0-beta.4 ``` [//]: # ({x-version-update-end}) @@ -263,12 +263,12 @@ Instead of include the complete Azure Management Libraries, you can choose to in For example, here is sample maven dependency for Compute package. -[//]: # ({x-version-update-start;com.azure:azure-resourcemanager-compute;current}) +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-compute;current}) ```xml com.azure.resourcemanager azure-resourcemanager-compute - 2.0.0-beta.3 + 2.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md index 08476b843de45..821c40047ca38 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated `api-version` to `2020-07-01` diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml index 71f8cf549384b..f30e5b5bb736c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-appplatform - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for App Platform Management @@ -52,7 +52,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure @@ -86,7 +86,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -98,19 +98,19 @@ com.azure.resourcemanager azure-resourcemanager-keyvault - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-dns - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-appservice - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -126,7 +126,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md index 4cabd7b58c813..2ed5c837a6d3f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Fixed function app slot diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml index 13a82983031c6..6a6a128bdbde9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-appservice - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for App Service Management @@ -52,27 +52,27 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-msi - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-keyvault - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-dns - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -101,7 +101,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -141,7 +141,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-authorization/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml index ab98ee7cdfd0c..fc1562ef119cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-authorization - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Authorization Management @@ -52,7 +52,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 org.slf4j @@ -81,7 +81,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -97,7 +97,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md index fd360249242b4..5b1a236152c14 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Supported beginCreate/beginDelete for VirtualMachine and Disk diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml index e33aed9405250..e9954dbf5cd58 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-compute - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Compute Management @@ -52,27 +52,27 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-network - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-msi - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-authorization - 2.0.0-beta.4 + 2.0.0-beta.5 org.slf4j @@ -101,13 +101,13 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-keyvault - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -153,7 +153,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerinstance/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml index adeb43968dc5e..c8e468249e8c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-containerinstance - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Container Instance Management @@ -48,27 +48,27 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-authorization - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-msi - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-network - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure @@ -96,7 +96,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -112,7 +112,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml index 33cb20f06c3ad..e58ba86179027 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Container Registry Management @@ -48,12 +48,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 org.slf4j @@ -82,7 +82,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -98,7 +98,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md index 24ccaee88d2e8..fc9829bf34d83 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated `api-version` to `2020-06-01` diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml index b8964233564b0..51b0b958e498d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-containerservice - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Container Service Management @@ -48,7 +48,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -77,7 +77,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -93,7 +93,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml index 7d20335f9798d..dd8e0c2166efc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-cosmos - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for CosmosDB Management @@ -48,7 +48,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -65,13 +65,13 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-network - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -89,7 +89,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -105,7 +105,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-dns/CHANGELOG.md index a9880e2324531..722fbf8aab0ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-dns/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Disallowed setting access type diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml index a3500c74dc8d5..630391c538b9a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-dns - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for DNS Management @@ -52,7 +52,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 commons-io @@ -87,7 +87,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -103,7 +103,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md index d573ad5df7d7f..fe68e60579e31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml index 7bc45715cc6de..9e01925a89172 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-eventhubs - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for EventHubs Management @@ -52,12 +52,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -80,7 +80,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -96,7 +96,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml index 202c64b6ce99c..47ce306dda608 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-keyvault - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Key Vault Management @@ -52,12 +52,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-authorization - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure @@ -90,7 +90,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -112,7 +112,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-monitor/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml index a7bdf8fc50780..db91d88f64279 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-monitor - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Monitor Management @@ -48,7 +48,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -71,25 +71,25 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-compute - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-appservice - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -117,7 +117,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-msi/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-msi/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml index 008820d2041db..b85cf2ea7a7ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-msi - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Managed Service Identity (MSI) Management @@ -48,12 +48,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-authorization - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -70,13 +70,13 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -98,7 +98,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md index 0e185fc7cfc8d..912a890170411 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Supported beginCreate/beginDelete for PublicIpAddress and NetworkInterface diff --git a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml index 249fedc4331e8..f0cad3cbdf6b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Network Management @@ -52,7 +52,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -75,19 +75,19 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-keyvault - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-msi - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -115,7 +115,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-privatedns/CHANGELOG.md index d573ad5df7d7f..fe68e60579e31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml index 9a475aea306fe..2b3b776795d16 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-privatedns - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Private DNS Management @@ -52,12 +52,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-network - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -81,7 +81,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -97,7 +97,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md index d573ad5df7d7f..fe68e60579e31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml index 99450fc495e35..c749bfa02f829 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-redis - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Redis Cache Management @@ -52,7 +52,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -75,13 +75,13 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -103,7 +103,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md index afee53c305f81..79317d0675099 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated `azure-core-management` dependency diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml index a33d3c3e7e0c3..12754bead5843 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Resource Management @@ -86,7 +86,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -108,7 +108,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-samples/CHANGELOG.md index 003c434ede62c..7817c48a5b7a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-samples/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.5 (Unreleased) - TODO diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index a48dfa03796a0..546c19714b0ad 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -16,7 +16,7 @@ com.azure.resourcemanager azure-resourcemanager-samples - 2.0.0-beta.4 + 2.0.0-beta.5 Microsoft Azure SDK for Management samples This package contains Microsoft Azure SDK for Management samples. @@ -47,12 +47,12 @@ com.azure.resourcemanager azure-resourcemanager - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -177,7 +177,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-sql/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-sql/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml index 95935b2e57681..d5e7b81d71889 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-sql - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Sql Management @@ -52,12 +52,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -86,7 +86,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -102,7 +102,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md index b18d13187911f..ebd3d9f1d5107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Updated core dependency from resources diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml index 62e9cd38204e2..4b474852eb1e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Storage Management @@ -52,7 +52,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 org.slf4j @@ -82,7 +82,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -98,7 +98,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager-test/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-test/CHANGELOG.md index 003c434ede62c..7817c48a5b7a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-test/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.5 (Unreleased) - TODO diff --git a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml index 6bf8305d5c9fb..12b2eee0b9f1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure Resource Manager Test Library diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md index d573ad5df7d7f..fe68e60579e31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml index 5a3badb5d9f9f..2cf316ed1308a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-trafficmanager - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Traffic Manager Management @@ -52,7 +52,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 org.slf4j @@ -82,7 +82,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -98,7 +98,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index acbe2654cf9e0..18f1f3780712c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -1,9 +1,12 @@ # Release History +## 2.0.0-beta.5 (Unreleased) + + ## 2.0.0-beta.4 (2020-09-02) - Added `PrivateDns` - Added `Redis` - Added `EventHubs` - Added `TrafficMananger` -- Exposed `subscriptions`, `tenants` and `tenantId` API \ No newline at end of file +- Exposed `subscriptions`, `tenants` and `tenantId` API diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 9652b5ef84541..5546c591a0672 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -15,7 +15,7 @@ com.azure.resourcemanager azure-resourcemanager - 2.0.0-beta.4 + 2.0.0-beta.5 jar Microsoft Azure SDK for Management @@ -53,102 +53,102 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-storage - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-compute - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-network - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-keyvault - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-msi - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-sql - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-authorization - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-appservice - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-cosmos - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-containerservice - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-monitor - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-dns - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-appplatform - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-containerinstance - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-privatedns - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-redis - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-eventhubs - 2.0.0-beta.4 + 2.0.0-beta.5 com.azure.resourcemanager azure-resourcemanager-trafficmanager - 2.0.0-beta.4 + 2.0.0-beta.5 org.junit.jupiter @@ -183,7 +183,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test @@ -205,7 +205,7 @@ com.azure.resourcemanager azure-resourcemanager-test - 2.0.0-beta.4 + 2.0.0-beta.5 test From f4ee6aa998dbf5788d48c9b99dba07c93cd1bbfa Mon Sep 17 00:00:00 2001 From: Chuang <54572251+xccc-msft@users.noreply.github.com> Date: Fri, 4 Sep 2020 16:54:28 +0800 Subject: [PATCH 096/168] mgmt support azure-resourcemanager-servicebus (#14723) * copy service bus from azure-libraries-for-java * reformat code * update api-spec * generate servicebus * update versioning * fix compile errors * manual changes for inner classes * update tests and session records * update azure and samples * update test after credcheck * update TimeSpan * update TimeSpan javadoc * update version of azure-resourcemanager-servicebus * update version of azure-resourcemanager-servicebus * update maven profile * update maven profile * update after moving ManagerBase and TestUtilities * update CHANGELOG * update pom --- eng/versioning/version_client.txt | 1 + sdk/resourcemanager/api-specs.json | 2 +- .../azure-resourcemanager-samples/pom.xml | 5 + .../azure/resourcemanager/samples/Utils.java | 416 +-- ...iceBusPublishSubscribeAdvanceFeatures.java | 231 ++ .../ServiceBusPublishSubscribeBasic.java | 215 ++ .../ServiceBusQueueAdvanceFeatures.java | 207 ++ .../samples/ServiceBusQueueBasic.java | 211 ++ ...ServiceBusWithClaimBasedAuthorization.java | 171 + .../servicebus/samples/package-info.java | 7 + .../ServiceBusSampleLiveOnlyTests.java | 60 + ...iceBusPublishSubscribeAdvanceFeatures.json | 1008 +++--- .../testServiceBusPublishSubscribeBasic.json | 1006 +++--- .../testServiceBusQueueAdvanceFeatures.json | 791 ++--- .../testServiceBusQueueBasic.json | 967 +++--- ...ServiceBusWithClaimBasedAuthorization.json | 744 ++--- .../CHANGELOG.md | 5 + .../README.md | 42 + .../azure-resourcemanager-servicebus/pom.xml | 129 + .../ServiceBusManagementClient.java | 189 ++ .../ServiceBusManagementClientBuilder.java | 149 + .../servicebus/ServiceBusManager.java | 116 + .../servicebus/fluent/NamespacesClient.java | 2954 +++++++++++++++++ .../servicebus/fluent/OperationsClient.java | 245 ++ .../servicebus/fluent/QueuesClient.java | 2653 +++++++++++++++ .../fluent/SubscriptionsClient.java | 1022 ++++++ .../servicebus/fluent/TopicsClient.java | 2653 +++++++++++++++ .../CheckNameAvailabilityResultInner.java | 95 + .../inner/NamespaceListResultInner.java | 83 + .../fluent/inner/NamespaceResourceInner.java | 197 ++ .../fluent/inner/OperationInner.java | 69 + .../inner/OperationListResultInner.java | 59 + .../fluent/inner/QueueListResultInner.java | 83 + .../fluent/inner/QueueResourceInner.java | 605 ++++ .../fluent/inner/ResourceListKeysInner.java | 158 + ...ccessAuthorizationRuleListResultInner.java | 85 + ...dAccessAuthorizationRuleResourceInner.java | 81 + .../inner/SubscriptionListResultInner.java | 83 + .../inner/SubscriptionResourceInner.java | 440 +++ .../fluent/inner/TopicListResultInner.java | 83 + .../fluent/inner/TopicResourceInner.java | 540 +++ .../servicebus/fluent/inner/package-info.java | 6 + .../servicebus/fluent/package-info.java | 6 + .../implementation/AuthorizationKeysImpl.java | 40 + .../AuthorizationRuleBaseImpl.java | 132 + .../CheckNameAvailabilityResultImpl.java | 41 + .../NamespaceAuthorizationRuleImpl.java | 84 + .../NamespaceAuthorizationRulesImpl.java | 120 + .../QueueAuthorizationRuleImpl.java | 96 + .../QueueAuthorizationRulesImpl.java | 130 + .../servicebus/implementation/QueueImpl.java | 414 +++ .../servicebus/implementation/QueuesImpl.java | 116 + .../ServiceBusChildResourcesImpl.java | 84 + .../ServiceBusNamespaceImpl.java | 231 ++ .../ServiceBusNamespacesImpl.java | 59 + .../ServiceBusSubscriptionImpl.java | 293 ++ .../ServiceBusSubscriptionsImpl.java | 122 + .../servicebus/implementation/TimeSpan.java | 450 +++ .../TopicAuthorizationRuleImpl.java | 96 + .../TopicAuthorizationRulesImpl.java | 130 + .../servicebus/implementation/TopicImpl.java | 396 +++ .../servicebus/implementation/TopicsImpl.java | 117 + .../servicebus/models/AccessRights.java | 50 + .../servicebus/models/AuthorizationKeys.java | 31 + .../servicebus/models/AuthorizationRule.java | 173 + .../servicebus/models/AuthorizationRules.java | 24 + .../models/CheckNameAvailability.java | 59 + .../models/CheckNameAvailabilityResult.java | 30 + .../models/EntityAvailabilityStatus.java | 56 + .../servicebus/models/EntityStatus.java | 68 + .../models/MessageCountDetails.java | 99 + .../models/NamespaceAuthorizationRule.java | 57 + .../models/NamespaceAuthorizationRules.java | 19 + .../NamespaceCreateOrUpdateParameters.java | 253 ++ .../servicebus/models/NamespaceSku.java | 116 + .../servicebus/models/NamespaceState.java | 80 + .../models/NamespaceUpdateParameters.java | 80 + .../servicebus/models/OperationDisplay.java | 69 + .../servicebus/models/Policykey.java | 47 + .../servicebus/models/Queue.java | 579 ++++ .../models/QueueAuthorizationRule.java | 63 + .../models/QueueAuthorizationRules.java | 19 + .../models/QueueCreateOrUpdateParameters.java | 636 ++++ .../servicebus/models/Queues.java | 28 + .../models/RegenerateKeysParameters.java | 50 + .../models/ServiceBusNamespace.java | 278 ++ .../models/ServiceBusNamespaces.java | 53 + .../models/ServiceBusSubscription.java | 446 +++ .../models/ServiceBusSubscriptions.java | 27 + ...orizationRuleCreateOrUpdateParameters.java | 106 + .../servicebus/models/Sku.java | 106 + .../servicebus/models/SkuName.java | 37 + .../servicebus/models/SkuTier.java | 37 + .../SubscriptionCreateOrUpdateParameters.java | 470 +++ .../servicebus/models/Topic.java | 476 +++ .../models/TopicAuthorizationRule.java | 64 + .../models/TopicAuthorizationRules.java | 19 + .../models/TopicCreateOrUpdateParameters.java | 571 ++++ .../servicebus/models/Topics.java | 27 + .../servicebus/models/UnavailableReason.java | 47 + .../servicebus/models/package-info.java | 6 + .../servicebus/package-info.java | 6 + .../servicebus/ServiceBusOperationsTests.java | 547 +++ .../servicebus/TimeSpanTests.java | 323 ++ .../canCRUDOnSimpleNamespace.json | 525 +++ .../canCreateDeleteQueueWithNamespace.json | 506 +++ .../canCreateDeleteTopicWithNamespace.json | 506 +++ .../canCreateNamespaceThenCRUDOnQueue.json | 425 +++ .../canCreateNamespaceThenCRUDOnTopic.json | 449 +++ .../canOperateOnAuthorizationRules.json | 912 +++++ .../canPerformCRUDOnSubscriptions.json | 536 +++ .../canPerformOnNamespaceActions.json | 33 + .../test/ResourceManagerTestBase.java | 5 +- .../azure-resourcemanager/pom.xml | 5 + .../java/com/azure/resourcemanager/Azure.java | 18 +- sdk/resourcemanager/pom.xml | 1 + 116 files changed, 29917 insertions(+), 2359 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeAdvanceFeatures.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeBasic.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueAdvanceFeatures.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueBasic.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusWithClaimBasedAuthorization.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ServiceBusSampleLiveOnlyTests.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/CHANGELOG.md create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/README.md create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClientBuilder.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManager.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/NamespacesClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/OperationsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/QueuesClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/SubscriptionsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/CheckNameAvailabilityResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/NamespaceListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/NamespaceResourceInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/OperationInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/OperationListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/QueueListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/QueueResourceInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/ResourceListKeysInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SharedAccessAuthorizationRuleListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SharedAccessAuthorizationRuleResourceInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SubscriptionListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SubscriptionResourceInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/TopicListResultInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/TopicResourceInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/AuthorizationKeysImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/AuthorizationRuleBaseImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/CheckNameAvailabilityResultImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/NamespaceAuthorizationRuleImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/NamespaceAuthorizationRulesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueAuthorizationRuleImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueAuthorizationRulesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueuesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusChildResourcesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusNamespaceImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusNamespacesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusSubscriptionImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusSubscriptionsImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TimeSpan.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicAuthorizationRuleImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicAuthorizationRulesImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicsImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AccessRights.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationKeys.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/CheckNameAvailability.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/CheckNameAvailabilityResult.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/EntityAvailabilityStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/EntityStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/MessageCountDetails.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceAuthorizationRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceAuthorizationRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceCreateOrUpdateParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceSku.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceState.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceUpdateParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/OperationDisplay.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Policykey.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Queue.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueAuthorizationRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueAuthorizationRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueCreateOrUpdateParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Queues.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/RegenerateKeysParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusNamespace.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusNamespaces.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscription.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscriptions.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SharedAccessAuthorizationRuleCreateOrUpdateParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Sku.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SkuName.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SkuTier.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SubscriptionCreateOrUpdateParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Topic.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicAuthorizationRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicAuthorizationRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicCreateOrUpdateParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Topics.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/UnavailableReason.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/package-info.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/ServiceBusOperationsTests.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/TimeSpanTests.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCRUDOnSimpleNamespace.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateDeleteQueueWithNamespace.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateDeleteTopicWithNamespace.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateNamespaceThenCRUDOnQueue.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateNamespaceThenCRUDOnTopic.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canOperateOnAuthorizationRules.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canPerformCRUDOnSubscriptions.json create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canPerformOnNamespaceActions.json diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index d43b12c3da0bd..a88688b0b358c 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -83,6 +83,7 @@ com.azure.resourcemanager:azure-resourcemanager-privatedns;2.0.0-beta.4;2.0.0-be com.azure.resourcemanager:azure-resourcemanager-resources;2.0.0-beta.4;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-redis;2.0.0-beta.4;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.4;2.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-servicebus;2.0.0-beta.5;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-sql;2.0.0-beta.4;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-storage;2.0.0-beta.4;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.0.0-beta.4;2.0.0-beta.5 diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 08edb3b44cc70..9b731d9776575 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -295,7 +295,7 @@ "servicebus": { "dir": "azure-resourcemanager-servicebus", "source": "specification/servicebus/resource-manager/readme.md", - "package": "com.microsoft.azure.resourcemanager.servicebus", + "package": "com.azure.resourcemanager.servicebus", "args": "--payload-flattening-threshold=1 --tag=package-2015-08" }, "servicefabric": { diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index 546c19714b0ad..c71f3b7e7d1f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -116,6 +116,11 @@ azure-security-keyvault-certificates 4.1.0 + + com.azure + azure-messaging-servicebus + 7.0.0-beta.5 + io.fabric8 kubernetes-client diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java index 790842c4c3f39..9e9145d41b367 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java @@ -168,6 +168,14 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.ResourceGroup; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.QueueAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscription; +import com.azure.resourcemanager.servicebus.models.Topic; +import com.azure.resourcemanager.servicebus.models.TopicAuthorizationRule; import com.azure.resourcemanager.sql.models.ElasticPoolActivity; import com.azure.resourcemanager.sql.models.ElasticPoolDatabaseActivity; import com.azure.resourcemanager.sql.models.PartnerInfo; @@ -2183,215 +2191,215 @@ private Utils() { } -// /** -// * Print service bus namespace info. -// * -// * @param serviceBusNamespace a service bus namespace -// */ -// public static void print(ServiceBusNamespace serviceBusNamespace) { -// StringBuilder builder = new StringBuilder() -// .append("Service bus Namespace: ").append(serviceBusNamespace.id()) -// .append("\n\tName: ").append(serviceBusNamespace.name()) -// .append("\n\tRegion: ").append(serviceBusNamespace.regionName()) -// .append("\n\tResourceGroupName: ").append(serviceBusNamespace.resourceGroupName()) -// .append("\n\tCreatedAt: ").append(serviceBusNamespace.createdAt()) -// .append("\n\tUpdatedAt: ").append(serviceBusNamespace.updatedAt()) -// .append("\n\tDnsLabel: ").append(serviceBusNamespace.dnsLabel()) -// .append("\n\tFQDN: ").append(serviceBusNamespace.fqdn()) -// .append("\n\tSku: ") -// .append("\n\t\tCapacity: ").append(serviceBusNamespace.sku().capacity()) -// .append("\n\t\tSkuName: ").append(serviceBusNamespace.sku().name()) -// .append("\n\t\tTier: ").append(serviceBusNamespace.sku().tier()); -// -// System.out.println(builder.toString()); -// } + /** + * Print service bus namespace info. + * + * @param serviceBusNamespace a service bus namespace + */ + public static void print(ServiceBusNamespace serviceBusNamespace) { + StringBuilder builder = new StringBuilder() + .append("Service bus Namespace: ").append(serviceBusNamespace.id()) + .append("\n\tName: ").append(serviceBusNamespace.name()) + .append("\n\tRegion: ").append(serviceBusNamespace.regionName()) + .append("\n\tResourceGroupName: ").append(serviceBusNamespace.resourceGroupName()) + .append("\n\tCreatedAt: ").append(serviceBusNamespace.createdAt()) + .append("\n\tUpdatedAt: ").append(serviceBusNamespace.updatedAt()) + .append("\n\tDnsLabel: ").append(serviceBusNamespace.dnsLabel()) + .append("\n\tFQDN: ").append(serviceBusNamespace.fqdn()) + .append("\n\tSku: ") + .append("\n\t\tCapacity: ").append(serviceBusNamespace.sku().capacity()) + .append("\n\t\tSkuName: ").append(serviceBusNamespace.sku().name()) + .append("\n\t\tTier: ").append(serviceBusNamespace.sku().tier()); -// /** -// * Print service bus queue info. -// * -// * @param queue a service bus queue -// */ -// public static void print(Queue queue) { -// StringBuilder builder = new StringBuilder() -// .append("Service bus Queue: ").append(queue.id()) -// .append("\n\tName: ").append(queue.name()) -// .append("\n\tResourceGroupName: ").append(queue.resourceGroupName()) -// .append("\n\tCreatedAt: ").append(queue.createdAt()) -// .append("\n\tUpdatedAt: ").append(queue.updatedAt()) -// .append("\n\tAccessedAt: ").append(queue.accessedAt()) -// .append("\n\tActiveMessageCount: ").append(queue.activeMessageCount()) -// .append("\n\tCurrentSizeInBytes: ").append(queue.currentSizeInBytes()) -// .append("\n\tDeadLetterMessageCount: ").append(queue.deadLetterMessageCount()) -// .append("\n\tDefaultMessageTtlDuration: ").append(queue.defaultMessageTtlDuration()) -// .append("\n\tDuplicateMessageDetectionHistoryDuration: ").append(queue.duplicateMessageDetectionHistoryDuration()) -// .append("\n\tIsBatchedOperationsEnabled: ").append(queue.isBatchedOperationsEnabled()) -// .append("\n\tIsDeadLetteringEnabledForExpiredMessages: ").append(queue.isDeadLetteringEnabledForExpiredMessages()) -// .append("\n\tIsDuplicateDetectionEnabled: ").append(queue.isDuplicateDetectionEnabled()) -// .append("\n\tIsExpressEnabled: ").append(queue.isExpressEnabled()) -// .append("\n\tIsPartitioningEnabled: ").append(queue.isPartitioningEnabled()) -// .append("\n\tIsSessionEnabled: ").append(queue.isSessionEnabled()) -// .append("\n\tDeleteOnIdleDurationInMinutes: ").append(queue.deleteOnIdleDurationInMinutes()) -// .append("\n\tMaxDeliveryCountBeforeDeadLetteringMessage: ").append(queue.maxDeliveryCountBeforeDeadLetteringMessage()) -// .append("\n\tMaxSizeInMB: ").append(queue.maxSizeInMB()) -// .append("\n\tMessageCount: ").append(queue.messageCount()) -// .append("\n\tScheduledMessageCount: ").append(queue.scheduledMessageCount()) -// .append("\n\tStatus: ").append(queue.status()) -// .append("\n\tTransferMessageCount: ").append(queue.transferMessageCount()) -// .append("\n\tLockDurationInSeconds: ").append(queue.lockDurationInSeconds()) -// .append("\n\tTransferDeadLetterMessageCount: ").append(queue.transferDeadLetterMessageCount()); -// -// System.out.println(builder.toString()); -// -// } -// -// /** -// * Print service bus queue authorization keys info. -// * -// * @param queueAuthorizationRule a service bus queue authorization keys -// */ -// public static void print(QueueAuthorizationRule queueAuthorizationRule) { -// StringBuilder builder = new StringBuilder() -// .append("Service bus queue authorization rule: ").append(queueAuthorizationRule.id()) -// .append("\n\tName: ").append(queueAuthorizationRule.name()) -// .append("\n\tResourceGroupName: ").append(queueAuthorizationRule.resourceGroupName()) -// .append("\n\tNamespace Name: ").append(queueAuthorizationRule.namespaceName()) -// .append("\n\tQueue Name: ").append(queueAuthorizationRule.queueName()); -// -// List rights = queueAuthorizationRule.rights(); -// builder.append("\n\tNumber of access rights in queue: ").append(rights.size()); -// for (AccessRights right : rights) { -// builder.append("\n\t\tAccessRight: ") -// .append("\n\t\t\tName :").append(right.name()); -// } -// -// System.out.println(builder.toString()); -// } -// -// /** -// * Print service bus namespace authorization keys info. -// * -// * @param keys a service bus namespace authorization keys -// */ -// public static void print(AuthorizationKeys keys) { -// StringBuilder builder = new StringBuilder() -// .append("Authorization keys: ") -// .append("\n\tPrimaryKey: ").append(keys.primaryKey()) -// .append("\n\tPrimaryConnectionString: ").append(keys.primaryConnectionString()) -// .append("\n\tSecondaryKey: ").append(keys.secondaryKey()) -// .append("\n\tSecondaryConnectionString: ").append(keys.secondaryConnectionString()); -// -// System.out.println(builder.toString()); -// } + System.out.println(builder.toString()); + } -// /** -// * Print service bus namespace authorization rule info. -// * -// * @param namespaceAuthorizationRule a service bus namespace authorization rule -// */ -// public static void print(NamespaceAuthorizationRule namespaceAuthorizationRule) { -// StringBuilder builder = new StringBuilder() -// .append("Service bus queue authorization rule: ").append(namespaceAuthorizationRule.id()) -// .append("\n\tName: ").append(namespaceAuthorizationRule.name()) -// .append("\n\tResourceGroupName: ").append(namespaceAuthorizationRule.resourceGroupName()) -// .append("\n\tNamespace Name: ").append(namespaceAuthorizationRule.namespaceName()); -// -// List rights = namespaceAuthorizationRule.rights(); -// builder.append("\n\tNumber of access rights in queue: ").append(rights.size()); -// for (AccessRights right : rights) { -// builder.append("\n\t\tAccessRight: ") -// .append("\n\t\t\tName :").append(right.name()); -// } -// -// System.out.println(builder.toString()); -// } + /** + * Print service bus queue info. + * + * @param queue a service bus queue + */ + public static void print(Queue queue) { + StringBuilder builder = new StringBuilder() + .append("Service bus Queue: ").append(queue.id()) + .append("\n\tName: ").append(queue.name()) + .append("\n\tResourceGroupName: ").append(queue.resourceGroupName()) + .append("\n\tCreatedAt: ").append(queue.createdAt()) + .append("\n\tUpdatedAt: ").append(queue.updatedAt()) + .append("\n\tAccessedAt: ").append(queue.accessedAt()) + .append("\n\tActiveMessageCount: ").append(queue.activeMessageCount()) + .append("\n\tCurrentSizeInBytes: ").append(queue.currentSizeInBytes()) + .append("\n\tDeadLetterMessageCount: ").append(queue.deadLetterMessageCount()) + .append("\n\tDefaultMessageTtlDuration: ").append(queue.defaultMessageTtlDuration()) + .append("\n\tDuplicateMessageDetectionHistoryDuration: ").append(queue.duplicateMessageDetectionHistoryDuration()) + .append("\n\tIsBatchedOperationsEnabled: ").append(queue.isBatchedOperationsEnabled()) + .append("\n\tIsDeadLetteringEnabledForExpiredMessages: ").append(queue.isDeadLetteringEnabledForExpiredMessages()) + .append("\n\tIsDuplicateDetectionEnabled: ").append(queue.isDuplicateDetectionEnabled()) + .append("\n\tIsExpressEnabled: ").append(queue.isExpressEnabled()) + .append("\n\tIsPartitioningEnabled: ").append(queue.isPartitioningEnabled()) + .append("\n\tIsSessionEnabled: ").append(queue.isSessionEnabled()) + .append("\n\tDeleteOnIdleDurationInMinutes: ").append(queue.deleteOnIdleDurationInMinutes()) + .append("\n\tMaxDeliveryCountBeforeDeadLetteringMessage: ").append(queue.maxDeliveryCountBeforeDeadLetteringMessage()) + .append("\n\tMaxSizeInMB: ").append(queue.maxSizeInMB()) + .append("\n\tMessageCount: ").append(queue.messageCount()) + .append("\n\tScheduledMessageCount: ").append(queue.scheduledMessageCount()) + .append("\n\tStatus: ").append(queue.status()) + .append("\n\tTransferMessageCount: ").append(queue.transferMessageCount()) + .append("\n\tLockDurationInSeconds: ").append(queue.lockDurationInSeconds()) + .append("\n\tTransferDeadLetterMessageCount: ").append(queue.transferDeadLetterMessageCount()); -// /** -// * Print service bus topic info. -// * -// * @param topic a service bus topic -// */ -// public static void print(Topic topic) { -// StringBuilder builder = new StringBuilder() -// .append("Service bus topic: ").append(topic.id()) -// .append("\n\tName: ").append(topic.name()) -// .append("\n\tResourceGroupName: ").append(topic.resourceGroupName()) -// .append("\n\tCreatedAt: ").append(topic.createdAt()) -// .append("\n\tUpdatedAt: ").append(topic.updatedAt()) -// .append("\n\tAccessedAt: ").append(topic.accessedAt()) -// .append("\n\tActiveMessageCount: ").append(topic.activeMessageCount()) -// .append("\n\tCurrentSizeInBytes: ").append(topic.currentSizeInBytes()) -// .append("\n\tDeadLetterMessageCount: ").append(topic.deadLetterMessageCount()) -// .append("\n\tDefaultMessageTtlDuration: ").append(topic.defaultMessageTtlDuration()) -// .append("\n\tDuplicateMessageDetectionHistoryDuration: ").append(topic.duplicateMessageDetectionHistoryDuration()) -// .append("\n\tIsBatchedOperationsEnabled: ").append(topic.isBatchedOperationsEnabled()) -// .append("\n\tIsDuplicateDetectionEnabled: ").append(topic.isDuplicateDetectionEnabled()) -// .append("\n\tIsExpressEnabled: ").append(topic.isExpressEnabled()) -// .append("\n\tIsPartitioningEnabled: ").append(topic.isPartitioningEnabled()) -// .append("\n\tDeleteOnIdleDurationInMinutes: ").append(topic.deleteOnIdleDurationInMinutes()) -// .append("\n\tMaxSizeInMB: ").append(topic.maxSizeInMB()) -// .append("\n\tScheduledMessageCount: ").append(topic.scheduledMessageCount()) -// .append("\n\tStatus: ").append(topic.status()) -// .append("\n\tTransferMessageCount: ").append(topic.transferMessageCount()) -// .append("\n\tSubscriptionCount: ").append(topic.subscriptionCount()) -// .append("\n\tTransferDeadLetterMessageCount: ").append(topic.transferDeadLetterMessageCount()); -// -// System.out.println(builder.toString()); -// } + System.out.println(builder.toString()); -// /** -// * Print service bus subscription info. -// * -// * @param serviceBusSubscription a service bus subscription -// */ -// public static void print(ServiceBusSubscription serviceBusSubscription) { -// StringBuilder builder = new StringBuilder() -// .append("Service bus subscription: ").append(serviceBusSubscription.id()) -// .append("\n\tName: ").append(serviceBusSubscription.name()) -// .append("\n\tResourceGroupName: ").append(serviceBusSubscription.resourceGroupName()) -// .append("\n\tCreatedAt: ").append(serviceBusSubscription.createdAt()) -// .append("\n\tUpdatedAt: ").append(serviceBusSubscription.updatedAt()) -// .append("\n\tAccessedAt: ").append(serviceBusSubscription.accessedAt()) -// .append("\n\tActiveMessageCount: ").append(serviceBusSubscription.activeMessageCount()) -// .append("\n\tDeadLetterMessageCount: ").append(serviceBusSubscription.deadLetterMessageCount()) -// .append("\n\tDefaultMessageTtlDuration: ").append(serviceBusSubscription.defaultMessageTtlDuration()) -// .append("\n\tIsBatchedOperationsEnabled: ").append(serviceBusSubscription.isBatchedOperationsEnabled()) -// .append("\n\tDeleteOnIdleDurationInMinutes: ").append(serviceBusSubscription.deleteOnIdleDurationInMinutes()) -// .append("\n\tScheduledMessageCount: ").append(serviceBusSubscription.scheduledMessageCount()) -// .append("\n\tStatus: ").append(serviceBusSubscription.status()) -// .append("\n\tTransferMessageCount: ").append(serviceBusSubscription.transferMessageCount()) -// .append("\n\tIsDeadLetteringEnabledForExpiredMessages: ").append(serviceBusSubscription.isDeadLetteringEnabledForExpiredMessages()) -// .append("\n\tIsSessionEnabled: ").append(serviceBusSubscription.isSessionEnabled()) -// .append("\n\tLockDurationInSeconds: ").append(serviceBusSubscription.lockDurationInSeconds()) -// .append("\n\tMaxDeliveryCountBeforeDeadLetteringMessage: ").append(serviceBusSubscription.maxDeliveryCountBeforeDeadLetteringMessage()) -// .append("\n\tIsDeadLetteringEnabledForFilterEvaluationFailedMessages: ").append(serviceBusSubscription.isDeadLetteringEnabledForFilterEvaluationFailedMessages()) -// .append("\n\tTransferMessageCount: ").append(serviceBusSubscription.transferMessageCount()) -// .append("\n\tTransferDeadLetterMessageCount: ").append(serviceBusSubscription.transferDeadLetterMessageCount()); -// -// System.out.println(builder.toString()); -// } + } -// /** -// * Print topic Authorization Rule info. -// * -// * @param topicAuthorizationRule a topic Authorization Rule -// */ -// public static void print(TopicAuthorizationRule topicAuthorizationRule) { -// StringBuilder builder = new StringBuilder() -// .append("Service bus topic authorization rule: ").append(topicAuthorizationRule.id()) -// .append("\n\tName: ").append(topicAuthorizationRule.name()) -// .append("\n\tResourceGroupName: ").append(topicAuthorizationRule.resourceGroupName()) -// .append("\n\tNamespace Name: ").append(topicAuthorizationRule.namespaceName()) -// .append("\n\tTopic Name: ").append(topicAuthorizationRule.topicName()); -// -// List rights = topicAuthorizationRule.rights(); -// builder.append("\n\tNumber of access rights in queue: ").append(rights.size()); -// for (AccessRights right : rights) { -// builder.append("\n\t\tAccessRight: ") -// .append("\n\t\t\tName :").append(right.name()); -// } -// -// System.out.println(builder.toString()); -// } + /** + * Print service bus queue authorization keys info. + * + * @param queueAuthorizationRule a service bus queue authorization keys + */ + public static void print(QueueAuthorizationRule queueAuthorizationRule) { + StringBuilder builder = new StringBuilder() + .append("Service bus queue authorization rule: ").append(queueAuthorizationRule.id()) + .append("\n\tName: ").append(queueAuthorizationRule.name()) + .append("\n\tResourceGroupName: ").append(queueAuthorizationRule.resourceGroupName()) + .append("\n\tNamespace Name: ").append(queueAuthorizationRule.namespaceName()) + .append("\n\tQueue Name: ").append(queueAuthorizationRule.queueName()); + + List rights = queueAuthorizationRule.rights(); + builder.append("\n\tNumber of access rights in queue: ").append(rights.size()); + for (com.azure.resourcemanager.servicebus.models.AccessRights right : rights) { + builder.append("\n\t\tAccessRight: ") + .append("\n\t\t\tName :").append(right.name()); + } + + System.out.println(builder.toString()); + } + + /** + * Print service bus namespace authorization keys info. + * + * @param keys a service bus namespace authorization keys + */ + public static void print(AuthorizationKeys keys) { + StringBuilder builder = new StringBuilder() + .append("Authorization keys: ") + .append("\n\tPrimaryKey: ").append(keys.primaryKey()) + .append("\n\tPrimaryConnectionString: ").append(keys.primaryConnectionString()) + .append("\n\tSecondaryKey: ").append(keys.secondaryKey()) + .append("\n\tSecondaryConnectionString: ").append(keys.secondaryConnectionString()); + + System.out.println(builder.toString()); + } + + /** + * Print service bus namespace authorization rule info. + * + * @param namespaceAuthorizationRule a service bus namespace authorization rule + */ + public static void print(NamespaceAuthorizationRule namespaceAuthorizationRule) { + StringBuilder builder = new StringBuilder() + .append("Service bus queue authorization rule: ").append(namespaceAuthorizationRule.id()) + .append("\n\tName: ").append(namespaceAuthorizationRule.name()) + .append("\n\tResourceGroupName: ").append(namespaceAuthorizationRule.resourceGroupName()) + .append("\n\tNamespace Name: ").append(namespaceAuthorizationRule.namespaceName()); + + List rights = namespaceAuthorizationRule.rights(); + builder.append("\n\tNumber of access rights in queue: ").append(rights.size()); + for (com.azure.resourcemanager.servicebus.models.AccessRights right : rights) { + builder.append("\n\t\tAccessRight: ") + .append("\n\t\t\tName :").append(right.name()); + } + + System.out.println(builder.toString()); + } + + /** + * Print service bus topic info. + * + * @param topic a service bus topic + */ + public static void print(Topic topic) { + StringBuilder builder = new StringBuilder() + .append("Service bus topic: ").append(topic.id()) + .append("\n\tName: ").append(topic.name()) + .append("\n\tResourceGroupName: ").append(topic.resourceGroupName()) + .append("\n\tCreatedAt: ").append(topic.createdAt()) + .append("\n\tUpdatedAt: ").append(topic.updatedAt()) + .append("\n\tAccessedAt: ").append(topic.accessedAt()) + .append("\n\tActiveMessageCount: ").append(topic.activeMessageCount()) + .append("\n\tCurrentSizeInBytes: ").append(topic.currentSizeInBytes()) + .append("\n\tDeadLetterMessageCount: ").append(topic.deadLetterMessageCount()) + .append("\n\tDefaultMessageTtlDuration: ").append(topic.defaultMessageTtlDuration()) + .append("\n\tDuplicateMessageDetectionHistoryDuration: ").append(topic.duplicateMessageDetectionHistoryDuration()) + .append("\n\tIsBatchedOperationsEnabled: ").append(topic.isBatchedOperationsEnabled()) + .append("\n\tIsDuplicateDetectionEnabled: ").append(topic.isDuplicateDetectionEnabled()) + .append("\n\tIsExpressEnabled: ").append(topic.isExpressEnabled()) + .append("\n\tIsPartitioningEnabled: ").append(topic.isPartitioningEnabled()) + .append("\n\tDeleteOnIdleDurationInMinutes: ").append(topic.deleteOnIdleDurationInMinutes()) + .append("\n\tMaxSizeInMB: ").append(topic.maxSizeInMB()) + .append("\n\tScheduledMessageCount: ").append(topic.scheduledMessageCount()) + .append("\n\tStatus: ").append(topic.status()) + .append("\n\tTransferMessageCount: ").append(topic.transferMessageCount()) + .append("\n\tSubscriptionCount: ").append(topic.subscriptionCount()) + .append("\n\tTransferDeadLetterMessageCount: ").append(topic.transferDeadLetterMessageCount()); + + System.out.println(builder.toString()); + } + + /** + * Print service bus subscription info. + * + * @param serviceBusSubscription a service bus subscription + */ + public static void print(ServiceBusSubscription serviceBusSubscription) { + StringBuilder builder = new StringBuilder() + .append("Service bus subscription: ").append(serviceBusSubscription.id()) + .append("\n\tName: ").append(serviceBusSubscription.name()) + .append("\n\tResourceGroupName: ").append(serviceBusSubscription.resourceGroupName()) + .append("\n\tCreatedAt: ").append(serviceBusSubscription.createdAt()) + .append("\n\tUpdatedAt: ").append(serviceBusSubscription.updatedAt()) + .append("\n\tAccessedAt: ").append(serviceBusSubscription.accessedAt()) + .append("\n\tActiveMessageCount: ").append(serviceBusSubscription.activeMessageCount()) + .append("\n\tDeadLetterMessageCount: ").append(serviceBusSubscription.deadLetterMessageCount()) + .append("\n\tDefaultMessageTtlDuration: ").append(serviceBusSubscription.defaultMessageTtlDuration()) + .append("\n\tIsBatchedOperationsEnabled: ").append(serviceBusSubscription.isBatchedOperationsEnabled()) + .append("\n\tDeleteOnIdleDurationInMinutes: ").append(serviceBusSubscription.deleteOnIdleDurationInMinutes()) + .append("\n\tScheduledMessageCount: ").append(serviceBusSubscription.scheduledMessageCount()) + .append("\n\tStatus: ").append(serviceBusSubscription.status()) + .append("\n\tTransferMessageCount: ").append(serviceBusSubscription.transferMessageCount()) + .append("\n\tIsDeadLetteringEnabledForExpiredMessages: ").append(serviceBusSubscription.isDeadLetteringEnabledForExpiredMessages()) + .append("\n\tIsSessionEnabled: ").append(serviceBusSubscription.isSessionEnabled()) + .append("\n\tLockDurationInSeconds: ").append(serviceBusSubscription.lockDurationInSeconds()) + .append("\n\tMaxDeliveryCountBeforeDeadLetteringMessage: ").append(serviceBusSubscription.maxDeliveryCountBeforeDeadLetteringMessage()) + .append("\n\tIsDeadLetteringEnabledForFilterEvaluationFailedMessages: ").append(serviceBusSubscription.isDeadLetteringEnabledForFilterEvaluationFailedMessages()) + .append("\n\tTransferMessageCount: ").append(serviceBusSubscription.transferMessageCount()) + .append("\n\tTransferDeadLetterMessageCount: ").append(serviceBusSubscription.transferDeadLetterMessageCount()); + + System.out.println(builder.toString()); + } + + /** + * Print topic Authorization Rule info. + * + * @param topicAuthorizationRule a topic Authorization Rule + */ + public static void print(TopicAuthorizationRule topicAuthorizationRule) { + StringBuilder builder = new StringBuilder() + .append("Service bus topic authorization rule: ").append(topicAuthorizationRule.id()) + .append("\n\tName: ").append(topicAuthorizationRule.name()) + .append("\n\tResourceGroupName: ").append(topicAuthorizationRule.resourceGroupName()) + .append("\n\tNamespace Name: ").append(topicAuthorizationRule.namespaceName()) + .append("\n\tTopic Name: ").append(topicAuthorizationRule.topicName()); + + List rights = topicAuthorizationRule.rights(); + builder.append("\n\tNumber of access rights in queue: ").append(rights.size()); + for (com.azure.resourcemanager.servicebus.models.AccessRights right : rights) { + builder.append("\n\t\tAccessRight: ") + .append("\n\t\t\tName :").append(right.name()); + } + + System.out.println(builder.toString()); + } /** * Print CosmosDB info. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeAdvanceFeatures.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeAdvanceFeatures.java new file mode 100644 index 0000000000000..28f48be51a3a5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeAdvanceFeatures.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.messaging.servicebus.ServiceBusClientBuilder; +import com.azure.messaging.servicebus.ServiceBusMessage; +import com.azure.messaging.servicebus.ServiceBusSenderClient; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.NamespaceSku; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscription; +import com.azure.resourcemanager.servicebus.models.Topic; +import com.azure.resourcemanager.servicebus.models.TopicAuthorizationRule; + +import java.time.Duration; + +/** + * Azure Service Bus basic scenario sample. + * - Create namespace. + * - Create a service bus subscription in the topic with session and dead-letter enabled. + * - Create another subscription in the topic with auto deletion of idle entities. + * - Create second topic with new Send Authorization rule, partitioning enabled and a new Service bus Subscription. + * - Update second topic to change time for AutoDeleteOnIdle time, without Send rule and with a new manage authorization rule. + * - Get the keys from default authorization rule to connect to topic. + * - Send a "Hello" message to topic using Data plan sdk for Service Bus. + * - Delete a topic + * - Delete namespace + */ +public final class ServiceBusPublishSubscribeAdvanceFeatures { + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + // New resources + final String rgName = azure.sdkContext().randomResourceName("rgSB04_", 24); + final String namespaceName = azure.sdkContext().randomResourceName("namespace", 20); + final String topic1Name = azure.sdkContext().randomResourceName("topic1_", 24); + final String topic2Name = azure.sdkContext().randomResourceName("topic2_", 24); + final String subscription1Name = azure.sdkContext().randomResourceName("subs_", 24); + final String subscription2Name = azure.sdkContext().randomResourceName("subs_", 24); + final String subscription3Name = azure.sdkContext().randomResourceName("subs_", 24); + final String sendRuleName = "SendRule"; + final String manageRuleName = "ManageRule"; + + try { + //============================================================ + // Create a namespace. + + System.out.println("Creating name space " + namespaceName + " in resource group " + rgName + "..."); + + ServiceBusNamespace serviceBusNamespace = azure.serviceBusNamespaces() + .define(namespaceName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withSku(NamespaceSku.STANDARD) + .withNewTopic(topic1Name, 1024) + .create(); + + System.out.println("Created service bus " + serviceBusNamespace.name()); + Utils.print(serviceBusNamespace); + + System.out.println("Created topic following topic along with namespace " + namespaceName); + + Topic firstTopic = serviceBusNamespace.topics().getByName(topic1Name); + Utils.print(firstTopic); + + //============================================================ + // Create a service bus subscription in the topic with session and dead-letter enabled. + + System.out.println("Creating subscription " + subscription1Name + " in topic " + topic1Name + "..."); + ServiceBusSubscription firstSubscription = firstTopic.subscriptions().define(subscription1Name) + .withSession() + .withDefaultMessageTTL(Duration.ofMinutes(20)) + .withMessageMovedToDeadLetterSubscriptionOnMaxDeliveryCount(20) + .withExpiredMessageMovedToDeadLetterSubscription() + .withMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException() + .create(); + System.out.println("Created subscription " + subscription1Name + " in topic " + topic1Name + "..."); + + Utils.print(firstSubscription); + + //============================================================ + // Create another subscription in the topic with auto deletion of idle entities. + System.out.println("Creating another subscription " + subscription2Name + " in topic " + topic1Name + "..."); + + ServiceBusSubscription secondSubscription = firstTopic.subscriptions().define(subscription2Name) + .withSession() + .withDeleteOnIdleDurationInMinutes(20) + .create(); + System.out.println("Created subscription " + subscription2Name + " in topic " + topic1Name + "..."); + + Utils.print(secondSubscription); + + //============================================================ + // Create second topic with new Send Authorization rule, partitioning enabled and a new Service bus Subscription. + + System.out.println("Creating second topic " + topic2Name + ", with De-duplication and AutoDeleteOnIdle features..."); + + Topic secondTopic = serviceBusNamespace.topics().define(topic2Name) + .withNewSendRule(sendRuleName) + .withPartitioning() + .withNewSubscription(subscription3Name) + .create(); + + System.out.println("Created second topic in namespace"); + + Utils.print(secondTopic); + + System.out.println("Creating following authorization rules in second topic "); + + PagedIterable authorizationRules = secondTopic.authorizationRules().list(); + for (TopicAuthorizationRule authorizationRule: authorizationRules) { + Utils.print(authorizationRule); + } + + //============================================================ + // Update second topic to change time for AutoDeleteOnIdle time, without Send rule and with a new manage authorization rule. + System.out.println("Updating second topic " + topic2Name + "..."); + + secondTopic = secondTopic.update() + .withDeleteOnIdleDurationInMinutes(5) + .withoutAuthorizationRule(sendRuleName) + .withNewManageRule(manageRuleName) + .apply(); + + System.out.println("Updated second topic to change its auto deletion time"); + + Utils.print(secondTopic); + System.out.println("Updated following authorization rules in second topic, new list of authorization rules are "); + + authorizationRules = secondTopic.authorizationRules().list(); + for (TopicAuthorizationRule authorizationRule: authorizationRules) { + Utils.print(authorizationRule); + } + + //============================================================= + // Get connection string for default authorization rule of namespace + + PagedIterable namespaceAuthorizationRules = serviceBusNamespace.authorizationRules().list(); + System.out.println("Number of authorization rule for namespace :" + Utils.getSize(namespaceAuthorizationRules)); + + + for (NamespaceAuthorizationRule namespaceAuthorizationRule: namespaceAuthorizationRules) { + Utils.print(namespaceAuthorizationRule); + } + + System.out.println("Getting keys for authorization rule ..."); + + AuthorizationKeys keys = namespaceAuthorizationRules.iterator().next().getKeys(); + Utils.print(keys); + + //============================================================= + // Send a message to topic. + ServiceBusSenderClient sender = new ServiceBusClientBuilder() + .connectionString(keys.primaryConnectionString()) + .sender() + .topicName(topic1Name) + .buildClient(); + sender.sendMessage(new ServiceBusMessage("Hello World").setMessageId("1")); + sender.close(); + + //============================================================= + // Delete a topic and namespace + System.out.println("Deleting topic " + topic1Name + "in namespace " + namespaceName + "..."); + serviceBusNamespace.topics().deleteByName(topic1Name); + System.out.println("Deleted topic " + topic1Name + "..."); + + System.out.println("Deleting namespace " + namespaceName + "..."); + // This will delete the namespace and topic within it. + azure.serviceBusNamespaces().deleteById(serviceBusNamespace.id()); + System.out.println("Deleted namespace " + namespaceName + "..."); + + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeBasic.java new file mode 100644 index 0000000000000..01b8df470b50f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeBasic.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.messaging.servicebus.ServiceBusClientBuilder; +import com.azure.messaging.servicebus.ServiceBusMessage; +import com.azure.messaging.servicebus.ServiceBusSenderClient; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.NamespaceSku; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscription; +import com.azure.resourcemanager.servicebus.models.Topic; + +/** + * Azure Service Bus basic scenario sample. + * - Create namespace. + * - Create a topic. + * - Update topic with new size and a new ServiceBus subscription. + * - Create another ServiceBus subscription in the topic. + * - List topic + * - List ServiceBus subscriptions + * - Get default authorization rule. + * - Regenerate the keys in the authorization rule. + * - Send a message to topic using Data plan sdk for Service Bus. + * - Delete one ServiceBus subscription as part of update of topic. + * - Delete another ServiceBus subscription. + * - Delete topic + * - Delete namespace + */ +public final class ServiceBusPublishSubscribeBasic { + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + // New resources + final String rgName = azure.sdkContext().randomResourceName("rgSB02_", 24); + final String namespaceName = azure.sdkContext().randomResourceName("namespace", 20); + final String topicName = azure.sdkContext().randomResourceName("topic_", 24); + final String subscription1Name = azure.sdkContext().randomResourceName("sub1_", 24); + final String subscription2Name = azure.sdkContext().randomResourceName("sub2_", 24); + + try { + //============================================================ + // Create a namespace. + + System.out.println("Creating name space " + namespaceName + " in resource group " + rgName + "..."); + + ServiceBusNamespace serviceBusNamespace = azure.serviceBusNamespaces() + .define(namespaceName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withSku(NamespaceSku.STANDARD) + .create(); + + System.out.println("Created service bus " + serviceBusNamespace.name()); + Utils.print(serviceBusNamespace); + + //============================================================ + // Create a topic in namespace + + System.out.println("Creating topic " + topicName + " in namespace " + namespaceName + "..."); + + Topic topic = serviceBusNamespace.topics().define(topicName) + .withSizeInMB(2048) + .create(); + + System.out.println("Created second queue in namespace"); + + Utils.print(topic); + + //============================================================ + // Get and update topic with new size and a subscription + System.out.println("Updating topic " + topicName + " with new size and a subscription..."); + topic = serviceBusNamespace.topics().getByName(topicName); + topic = topic.update() + .withNewSubscription(subscription1Name) + .withSizeInMB(3072) + .apply(); + + System.out.println("Updated topic to change its size in MB along with a subscription"); + + Utils.print(topic); + + ServiceBusSubscription firstSubscription = topic.subscriptions().getByName(subscription1Name); + Utils.print(firstSubscription); + //============================================================ + // Create a subscription + System.out.println("Adding second subscription" + subscription2Name + " to topic " + topicName + "..."); + ServiceBusSubscription secondSubscription = topic.subscriptions().define(subscription2Name).withDeleteOnIdleDurationInMinutes(10).create(); + System.out.println("Added second subscription" + subscription2Name + " to topic " + topicName + "..."); + + Utils.print(secondSubscription); + + //============================================================= + // List topics in namespaces + + PagedIterable topics = serviceBusNamespace.topics().list(); + System.out.println("Number of topics in namespace :" + Utils.getSize(topics)); + + for (Topic topicInNamespace : topics) { + Utils.print(topicInNamespace); + } + + //============================================================= + // List all subscriptions for topic in namespaces + + PagedIterable subscriptions = topic.subscriptions().list(); + System.out.println("Number of subscriptions to topic: " + Utils.getSize(subscriptions)); + + for (ServiceBusSubscription subscription : subscriptions) { + Utils.print(subscription); + } + + //============================================================= + // Get connection string for default authorization rule of namespace + + PagedIterable namespaceAuthorizationRules = serviceBusNamespace.authorizationRules().list(); + System.out.println("Number of authorization rule for namespace :" + Utils.getSize(namespaceAuthorizationRules)); + + + for (NamespaceAuthorizationRule namespaceAuthorizationRule: namespaceAuthorizationRules) { + Utils.print(namespaceAuthorizationRule); + } + + System.out.println("Getting keys for authorization rule ..."); + + AuthorizationKeys keys = namespaceAuthorizationRules.iterator().next().getKeys(); + Utils.print(keys); + System.out.println("Regenerating secondary key for authorization rule ..."); + keys = namespaceAuthorizationRules.iterator().next().regenerateKey(Policykey.SECONDARY_KEY); + Utils.print(keys); + + //============================================================= + // Send a message to topic. + ServiceBusSenderClient sender = new ServiceBusClientBuilder() + .connectionString(keys.primaryConnectionString()) + .sender() + .topicName(topicName) + .buildClient(); + sender.sendMessage(new ServiceBusMessage("Hello World").setMessageId("1")); + sender.close(); + + //============================================================= + // Delete a queue and namespace + System.out.println("Deleting subscription " + subscription1Name + " in topic " + topicName + " via update flow..."); + topic = topic.update().withoutSubscription(subscription1Name).apply(); + System.out.println("Deleted subscription " + subscription1Name + "..."); + + System.out.println("Number of subscriptions in the topic after deleting first subscription: " + topic.subscriptionCount()); + + System.out.println("Deleting namespace " + namespaceName + "..."); + // This will delete the namespace and queue within it. + azure.serviceBusNamespaces().deleteById(serviceBusNamespace.id()); + System.out.println("Deleted namespace " + namespaceName + "..."); + + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueAdvanceFeatures.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueAdvanceFeatures.java new file mode 100644 index 0000000000000..8d869bea05457 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueAdvanceFeatures.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.messaging.servicebus.ServiceBusClientBuilder; +import com.azure.messaging.servicebus.ServiceBusMessage; +import com.azure.messaging.servicebus.ServiceBusSenderClient; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.NamespaceSku; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; + +import java.time.Duration; + +/** + * Azure Service Bus basic scenario sample. + * - Create namespace. + * - Add a queue in namespace with features session and dead-lettering. + * - Create another queue with auto-forwarding to first queue. [Remove] + * - Create another queue with dead-letter auto-forwarding to first queue. [Remove] + * - Create second queue with Deduplication and AutoDeleteOnIdle feature + * - Update second queue to change time for AutoDeleteOnIdle. + * - Update first queue to disable dead-letter forwarding and with new Send authorization rule + * - Update queue to remove the Send Authorization rule. + * - Get default authorization rule. + * - Get the keys from authorization rule to connect to queue. + * - Send a "Hello" message to queue using Data plan sdk for Service Bus. + * - Delete queue + * - Delete namespace + */ +public final class ServiceBusQueueAdvanceFeatures { + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + // New resources + final String rgName = azure.sdkContext().randomResourceName("rgSB04_", 24); + final String namespaceName = azure.sdkContext().randomResourceName("namespace", 20); + final String queue1Name = azure.sdkContext().randomResourceName("queue1_", 24); + final String queue2Name = azure.sdkContext().randomResourceName("queue2_", 24); + final String sendRuleName = "SendRule"; + + try { + //============================================================ + // Create a namespace. + + System.out.println("Creating name space " + namespaceName + " in resource group " + rgName + "..."); + + ServiceBusNamespace serviceBusNamespace = azure.serviceBusNamespaces() + .define(namespaceName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withSku(NamespaceSku.STANDARD) + .create(); + + System.out.println("Created service bus " + serviceBusNamespace.name()); + Utils.print(serviceBusNamespace); + + //============================================================ + // Add a queue in namespace with features session and dead-lettering. + System.out.println("Creating first queue " + queue1Name + ", with session, time to live and move to dead-letter queue features..."); + + Queue firstQueue = serviceBusNamespace.queues().define(queue1Name) + .withSession() + .withDefaultMessageTTL(Duration.ofMinutes(10)) + .withExpiredMessageMovedToDeadLetterQueue() + .withMessageMovedToDeadLetterQueueOnMaxDeliveryCount(40) + .create(); + Utils.print(firstQueue); + + //============================================================ + // Create second queue with Deduplication and AutoDeleteOnIdle feature + + System.out.println("Creating second queue " + queue2Name + ", with De-duplication and AutoDeleteOnIdle features..."); + + Queue secondQueue = serviceBusNamespace.queues().define(queue2Name) + .withSizeInMB(2048) + .withDuplicateMessageDetection(Duration.ofMinutes(10)) + .withDeleteOnIdleDurationInMinutes(10) + .create(); + + System.out.println("Created second queue in namespace"); + + Utils.print(secondQueue); + + //============================================================ + // Update second queue to change time for AutoDeleteOnIdle. + + secondQueue = secondQueue.update() + .withDeleteOnIdleDurationInMinutes(5) + .apply(); + + System.out.println("Updated second queue to change its auto deletion time"); + + Utils.print(secondQueue); + + //============================================================= + // Update first queue to disable dead-letter forwarding and with new Send authorization rule + secondQueue = firstQueue.update() + .withoutExpiredMessageMovedToDeadLetterQueue() + .withNewSendRule(sendRuleName) + .apply(); + + System.out.println("Updated first queue to change dead-letter forwarding"); + + Utils.print(secondQueue); + + //============================================================= + // Get connection string for default authorization rule of namespace + + PagedIterable namespaceAuthorizationRules = serviceBusNamespace.authorizationRules().list(); + System.out.println("Number of authorization rule for namespace :" + Utils.getSize(namespaceAuthorizationRules)); + + + for (NamespaceAuthorizationRule namespaceAuthorizationRule: namespaceAuthorizationRules) { + Utils.print(namespaceAuthorizationRule); + } + + System.out.println("Getting keys for authorization rule ..."); + + AuthorizationKeys keys = namespaceAuthorizationRules.iterator().next().getKeys(); + Utils.print(keys); + + //============================================================= + // Update first queue to remove Send Authorization rule. + firstQueue.update().withoutAuthorizationRule(sendRuleName).apply(); + + //============================================================= + // Send a message to queue. + ServiceBusSenderClient sender = new ServiceBusClientBuilder() + .connectionString(keys.primaryConnectionString()) + .sender() + .queueName(queue1Name) + .buildClient(); + sender.sendMessage(new ServiceBusMessage("Hello").setSessionId("23424")); + sender.close(); + + //============================================================= + // Delete a queue and namespace + System.out.println("Deleting queue " + queue1Name + "in namespace " + namespaceName + "..."); + serviceBusNamespace.queues().deleteByName(queue1Name); + System.out.println("Deleted queue " + queue1Name + "..."); + + System.out.println("Deleting namespace " + namespaceName + "..."); + // This will delete the namespace and queue within it. + azure.serviceBusNamespaces().deleteById(serviceBusNamespace.id()); + System.out.println("Deleted namespace " + namespaceName + "..."); + + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueBasic.java new file mode 100644 index 0000000000000..b5c6cc913885b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueBasic.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.messaging.servicebus.ServiceBusClientBuilder; +import com.azure.messaging.servicebus.ServiceBusMessage; +import com.azure.messaging.servicebus.ServiceBusSenderClient; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.NamespaceSku; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; + +/** + * Azure Service Bus basic scenario sample. + * - Create namespace with a queue. + * - Add another queue in same namespace. + * - Update Queue. + * - Update namespace + * - List namespaces + * - List queues + * - Get default authorization rule. + * - Regenerate the keys in the authorization rule. + * - Get the keys from authorization rule to connect to queue. + * - Send a "Hello" message to queue using Data plan sdk for Service Bus. + * - Delete queue + * - Delete namespace + */ +public final class ServiceBusQueueBasic { + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + // New resources + final String rgName = azure.sdkContext().randomResourceName("rgSB01_", 24); + final String namespaceName = azure.sdkContext().randomResourceName("namespace", 20); + final String queue1Name = azure.sdkContext().randomResourceName("queue1_", 24); + final String queue2Name = azure.sdkContext().randomResourceName("queue2_", 24); + + try { + //============================================================ + // Create a namespace. + + System.out.println("Creating name space " + namespaceName + " in resource group " + rgName + "..."); + + ServiceBusNamespace serviceBusNamespace = azure.serviceBusNamespaces() + .define(namespaceName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withSku(NamespaceSku.BASIC) + .withNewQueue(queue1Name, 1024) + .create(); + + System.out.println("Created service bus " + serviceBusNamespace.name()); + Utils.print(serviceBusNamespace); + + Queue firstQueue = serviceBusNamespace.queues().getByName(queue1Name); + Utils.print(firstQueue); + + //============================================================ + // Create a second queue in same namespace + + System.out.println("Creating second queue " + queue2Name + " in namespace " + namespaceName + "..."); + + Queue secondQueue = serviceBusNamespace.queues().define(queue2Name) + .withExpiredMessageMovedToDeadLetterQueue() + .withSizeInMB(2048) + .withMessageLockDurationInSeconds(20) + .create(); + + System.out.println("Created second queue in namespace"); + + Utils.print(secondQueue); + + //============================================================ + // Get and update second queue. + + secondQueue = serviceBusNamespace.queues().getByName(queue2Name); + secondQueue = secondQueue.update().withSizeInMB(3072).apply(); + + System.out.println("Updated second queue to change its size in MB"); + + Utils.print(secondQueue); + + //============================================================= + // Update namespace + System.out.println("Updating sku of namespace " + serviceBusNamespace.name() + "..."); + + serviceBusNamespace = serviceBusNamespace + .update() + .withSku(NamespaceSku.STANDARD) + .apply(); + System.out.println("Updated sku of namespace " + serviceBusNamespace.name()); + + //============================================================= + // List namespaces + + System.out.println("List of namespaces in resource group " + rgName + "..."); + + for (ServiceBusNamespace serviceBusNamespace1 : azure.serviceBusNamespaces().listByResourceGroup(rgName)) { + Utils.print(serviceBusNamespace1); + } + + //============================================================= + // List queues in namespaces + + PagedIterable queues = serviceBusNamespace.queues().list(); + System.out.println("Number of queues in namespace :" + Utils.getSize(queues)); + + for (Queue queue : queues) { + Utils.print(queue); + } + + //============================================================= + // Get connection string for default authorization rule of namespace + + PagedIterable namespaceAuthorizationRules = serviceBusNamespace.authorizationRules().list(); + System.out.println("Number of authorization rule for namespace :" + Utils.getSize(namespaceAuthorizationRules)); + + for (NamespaceAuthorizationRule namespaceAuthorizationRule: namespaceAuthorizationRules) { + Utils.print(namespaceAuthorizationRule); + } + + System.out.println("Getting keys for authorization rule ..."); + + AuthorizationKeys keys = namespaceAuthorizationRules.iterator().next().getKeys(); + Utils.print(keys); + System.out.println("Regenerating secondary key for authorization rule ..."); + keys = namespaceAuthorizationRules.iterator().next().regenerateKey(Policykey.SECONDARY_KEY); + Utils.print(keys); + + //============================================================= + // Send a message to queue. + ServiceBusSenderClient sender = new ServiceBusClientBuilder() + .connectionString(keys.primaryConnectionString()) + .sender() + .queueName(queue1Name) + .buildClient(); + sender.sendMessage(new ServiceBusMessage("Hello World").setSessionId("23424")); + sender.close(); + + //============================================================= + // Delete a queue and namespace + System.out.println("Deleting queue " + queue1Name + "in namespace " + namespaceName + "..."); + serviceBusNamespace.queues().deleteByName(queue1Name); + System.out.println("Deleted queue " + queue1Name + "..."); + + System.out.println("Deleting namespace " + namespaceName + "..."); + // This will delete the namespace and queue within it. + azure.serviceBusNamespaces().deleteById(serviceBusNamespace.id()); + System.out.println("Deleted namespace " + namespaceName + "..."); + + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusWithClaimBasedAuthorization.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusWithClaimBasedAuthorization.java new file mode 100644 index 0000000000000..178df4e73c045 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusWithClaimBasedAuthorization.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.messaging.servicebus.ServiceBusClientBuilder; +import com.azure.messaging.servicebus.ServiceBusMessage; +import com.azure.messaging.servicebus.ServiceBusSenderClient; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.NamespaceSku; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscription; +import com.azure.resourcemanager.servicebus.models.Topic; + +/** + * Azure Service Bus basic scenario sample. + * - Create namespace with a queue and a topic + * - Create 2 subscriptions for topic using different methods. + * - Create send authorization rule for queue. + * - Create send and listener authorization rule for Topic. + * - Get the keys from authorization rule to connect to queue. + * - Send a "Hello" message to queue using Data plan sdk for Service Bus. + * - Send a "Hello" message to topic using Data plan sdk for Service Bus. + * - Delete namespace + */ +public final class ServiceBusWithClaimBasedAuthorization { + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + // New resources + final String rgName = azure.sdkContext().randomResourceName("rgSB03_", 24); + final String namespaceName = azure.sdkContext().randomResourceName("namespace", 20); + final String queueName = azure.sdkContext().randomResourceName("queue1_", 24); + final String topicName = azure.sdkContext().randomResourceName("topic_", 24); + final String subscription1Name = azure.sdkContext().randomResourceName("sub1_", 24); + final String subscription2Name = azure.sdkContext().randomResourceName("sub2_", 24); + + try { + //============================================================ + // Create a namespace. + + System.out.println("Creating name space " + namespaceName + " along with a queue " + queueName + " and a topic " + topicName + " in resource group " + rgName + "..."); + + ServiceBusNamespace serviceBusNamespace = azure.serviceBusNamespaces() + .define(namespaceName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withSku(NamespaceSku.STANDARD) + .withNewQueue(queueName, 1024) + .withNewTopic(topicName, 1024) + .create(); + + System.out.println("Created service bus " + serviceBusNamespace.name() + " (with queue and topic)"); + Utils.print(serviceBusNamespace); + + Queue queue = serviceBusNamespace.queues().getByName(queueName); + Utils.print(queue); + + Topic topic = serviceBusNamespace.topics().getByName(topicName); + Utils.print(topic); + + //============================================================ + // Create 2 subscriptions in topic using different methods. + System.out.println("Creating a subscription in the topic using update on topic"); + topic = topic.update().withNewSubscription(subscription1Name).apply(); + + ServiceBusSubscription subscription1 = topic.subscriptions().getByName(subscription1Name); + + System.out.println("Creating another subscription in the topic using direct create method for subscription"); + ServiceBusSubscription subscription2 = topic.subscriptions().define(subscription2Name).create(); + + Utils.print(subscription1); + Utils.print(subscription2); + + //============================================================= + // Create new authorization rule for queue to send message. + System.out.println("Create authorization rule for queue ..."); + NamespaceAuthorizationRule sendQueueAuthorizationRule = serviceBusNamespace.authorizationRules().define("SendRule").withSendingEnabled().create(); + Utils.print(sendQueueAuthorizationRule); + + System.out.println("Getting keys for authorization rule ..."); + AuthorizationKeys keys = sendQueueAuthorizationRule.getKeys(); + Utils.print(keys); + + //============================================================= + // Send a message to queue. + ServiceBusSenderClient sender = new ServiceBusClientBuilder() + .connectionString(keys.primaryConnectionString()) + .sender() + .queueName(queueName) + .buildClient(); + sender.sendMessage(new ServiceBusMessage("Hello").setMessageId("1")); + sender.close(); + + + //============================================================= + // Send a message to topic. + sender = new ServiceBusClientBuilder() + .connectionString(keys.primaryConnectionString()) + .sender() + .topicName(topicName) + .buildClient(); + sender.sendMessage(new ServiceBusMessage("Hello").setMessageId("1")); + sender.close(); + + //============================================================= + // Delete a namespace + System.out.println("Deleting namespace " + namespaceName + " [topic, queues and subscription will delete along with that]..."); + // This will delete the namespace and queue within it. + azure.serviceBusNamespaces().deleteById(serviceBusNamespace.id()); + System.out.println("Deleted namespace " + namespaceName + "..."); + + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/package-info.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/package-info.java new file mode 100644 index 0000000000000..89a4bb0f46c04 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * This package contains the classes for servicebus samples. + */ +package com.azure.resourcemanager.servicebus.samples; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ServiceBusSampleLiveOnlyTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ServiceBusSampleLiveOnlyTests.java new file mode 100644 index 0000000000000..25c028812bf2b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ServiceBusSampleLiveOnlyTests.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.samples; + +import com.azure.core.test.annotation.DoNotRecord; +import com.azure.resourcemanager.servicebus.samples.ServiceBusPublishSubscribeAdvanceFeatures; +import com.azure.resourcemanager.servicebus.samples.ServiceBusPublishSubscribeBasic; +import com.azure.resourcemanager.servicebus.samples.ServiceBusQueueAdvanceFeatures; +import com.azure.resourcemanager.servicebus.samples.ServiceBusQueueBasic; +import com.azure.resourcemanager.servicebus.samples.ServiceBusWithClaimBasedAuthorization; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class ServiceBusSampleLiveOnlyTests extends SamplesTestBase { + @Test + @DoNotRecord + public void testServiceBusQueueBasic() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ServiceBusQueueBasic.runSample(azure)); + } + + @Test + @DoNotRecord + public void testServiceBusPublishSubscribeBasic() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ServiceBusPublishSubscribeBasic.runSample(azure)); + } + + @Test + @DoNotRecord + public void testServiceBusWithClaimBasedAuthorization() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ServiceBusWithClaimBasedAuthorization.runSample(azure)); + } + + @Test + @DoNotRecord + public void testServiceBusQueueAdvanceFeatures() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ServiceBusQueueAdvanceFeatures.runSample(azure)); + } + + @Test + @DoNotRecord + public void testServiceBusPublishSubscribeAdvanceFeatures() { + if (skipInPlayback()) { + return; + } + Assertions.assertTrue(ServiceBusPublishSubscribeAdvanceFeatures.runSample(azure)); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeAdvanceFeatures.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeAdvanceFeatures.json index 77b712742e652..e3b216cb68ecc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeAdvanceFeatures.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeAdvanceFeatures.json @@ -1,650 +1,682 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb04_fb550278c74d?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb04_470703d754e?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d3714aed-e019-40e3-9c94-6015d3fe7788", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:59:24 GMT", - "content-length" : "319", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "70ea5d13-bbec-4293-9b22-d6bd805521da", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135925Z:70ea5d13-bbec-4293-9b22-d6bd805521da", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "70ea5d13-bbec-4293-9b22-d6bd805521da", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d\",\"name\":\"rgsb04_fb550278c74d\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2019-10-17T13:59:20.426Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d?api-version=2015-08-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", + "Date" : "Wed, 02 Sep 2020 04:38:34 GMT", + "x-ms-correlation-request-id" : "893cd6cc-476b-49cb-a1ea-88c32e52d0a1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043835Z:893cd6cc-476b-49cb-a1ea-88c32e52d0a1", + "Expires" : "-1", + "Content-Length" : "233", + "x-ms-request-id" : "893cd6cc-476b-49cb-a1ea-88c32e52d0a1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e\",\"name\":\"rgsb04_470703d754e\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", "Content-Type" : "application/json; charset=utf-8" }, - "Response" : { - "date" : "Thu, 17 Oct 2019 13:59:27 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "494", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", - "retry-after" : "0", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ea62e724-e967-4012-bb66-f3483c761a1f", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135928Z:ea62e724-e967-4012-bb66-f3483c761a1f", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "aaec088d-260c-4582-8424-907a7fca38b0_M13CH3_M13CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d\",\"name\":\"namespacebe847995d\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespacebe847995d\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d?api-version=2015-08-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "32b336bb-f91c-4d89-bee0-2fd040be8ece", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:59:28 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "698", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11965", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "576de78e-cecb-4f5b-87fe-3a31f1a17274", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135929Z:576de78e-cecb-4f5b-87fe-3a31f1a17274", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "7dbb9dd6-4c57-40e1-a5a9-3993445c00c6_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d\",\"name\":\"namespacebe847995d\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespacebe847995d\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T13:59:27.447Z\",\"serviceBusEndpoint\":\"https://namespacebe847995d.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:59:27.447Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:38:42 GMT", + "x-ms-correlation-request-id" : "1ffdb127-1687-4d38-a9cf-b26527769a8e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043843Z:1ffdb127-1687-4d38-a9cf-b26527769a8e", + "Expires" : "-1", + "Content-Length" : "490", + "x-ms-request-id" : "c225d3bd-2faf-4171-8faa-20791963fd2c_M8CH3_M8CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67\",\"name\":\"namespace70852f67\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace70852f67\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "32b336bb-f91c-4d89-bee0-2fd040be8ece", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2b2dc3fa-2dfb-46d8-a0e9-6848c36759b6" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:59:59 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "698", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f7c2ca28-3a23-4571-a708-418d570f5568", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140000Z:f7c2ca28-3a23-4571-a708-418d570f5568", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "0f97aa62-e9fe-45ef-b509-44706262bee7_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d\",\"name\":\"namespacebe847995d\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespacebe847995d\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T13:59:27.447Z\",\"serviceBusEndpoint\":\"https://namespacebe847995d.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:59:27.447Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:13 GMT", + "x-ms-correlation-request-id" : "c3c67da1-fca1-4d1c-9027-04d322620b8d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043913Z:c3c67da1-fca1-4d1c-9027-04d322620b8d", + "Expires" : "-1", + "Content-Length" : "693", + "x-ms-request-id" : "aaaaffe7-77a9-45c7-b6c8-8495bb52f8fc_M8CH3_M8CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67\",\"name\":\"namespace70852f67\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace70852f67\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T04:38:41.793Z\",\"serviceBusEndpoint\":\"https://namespace70852f67.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:38:41.793Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "2b2dc3fa-2dfb-46d8-a0e9-6848c36759b6", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec60cde6-bf25-441d-8fd4-721b7d2456e8" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:00:33 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "697", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11973", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "93072831-0567-4a13-ab02-397307994864", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140033Z:93072831-0567-4a13-ab02-397307994864", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "a936157f-ee40-4dd1-8c8a-14ac6043490a_M7CH3_M7CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d\",\"name\":\"namespacebe847995d\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespacebe847995d\",\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:59:27.447Z\",\"serviceBusEndpoint\":\"https://namespacebe847995d.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T14:00:11.7Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:44 GMT", + "x-ms-correlation-request-id" : "1a7dff4e-46ab-4eed-91a8-0d41c7125fc1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043944Z:1a7dff4e-46ab-4eed-91a8-0d41c7125fc1", + "Expires" : "-1", + "Content-Length" : "693", + "x-ms-request-id" : "f91ab8fb-a1ec-4d27-bd28-0b649d0c9fa9_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67\",\"name\":\"namespace70852f67\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace70852f67\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:38:41.793Z\",\"serviceBusEndpoint\":\"https://namespace70852f67.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:39:26.48Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "ec60cde6-bf25-441d-8fd4-721b7d2456e8", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "551e0219-74e6-47d3-9b05-d1b1ac5d9f94", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:00:36 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "920", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "64aece83-ce3c-42b0-a089-a4a0bc26f8b2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140036Z:64aece83-ce3c-42b0-a089-a4a0bc26f8b2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "4288e224-874a-47c5-bd74-2d4d4673e38b_M7CH3_M7CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2\",\"name\":\"topic1_273443103bd2\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic1_273443103bd2\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:00:35.187Z\",\"updatedAt\":\"2019-10-17T14:00:35.243Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"isExpress\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:46 GMT", + "x-ms-correlation-request-id" : "a95c79c5-a2d0-4530-babb-54bd765b01c6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043946Z:a95c79c5-a2d0-4530-babb-54bd765b01c6", + "Expires" : "-1", + "Content-Length" : "896", + "x-ms-request-id" : "cd4a08f7-42a7-40c5-9458-3da49ca029e5_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91\",\"name\":\"topic1_16587db2d91\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic1_16587db2d91\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:46.21Z\",\"updatedAt\":\"2020-09-02T04:39:46.253Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "551e0219-74e6-47d3-9b05-d1b1ac5d9f94", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a25c65e5-d896-4cf3-b8e3-d9c37d463984", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:00:36 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1131", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11972", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2a592970-7c09-4d49-a260-dc8737406072", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140037Z:2a592970-7c09-4d49-a260-dc8737406072", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "0c877f4f-b86c-4378-849c-0c242668348c_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2\",\"name\":\"topic1_273443103bd2\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic1_273443103bd2\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:00:35.187Z\",\"updatedAt\":\"2019-10-17T14:00:35.243Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"isExpress\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:47 GMT", + "x-ms-correlation-request-id" : "db2c3fc5-b55e-4dd1-9eee-06ac7b61d42b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043947Z:db2c3fc5-b55e-4dd1-9eee-06ac7b61d42b", + "Expires" : "-1", + "Content-Length" : "1107", + "x-ms-request-id" : "262f61cb-73ad-470a-ab76-3d32f12453fe_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91\",\"name\":\"topic1_16587db2d91\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic1_16587db2d91\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:46.21Z\",\"updatedAt\":\"2020-09-02T04:39:46.253Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "a25c65e5-d896-4cf3-b8e3-d9c37d463984", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2/subscriptions/subs_85281992623b4?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91/subscriptions/subs_96677b0ac284?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4deb9c2d-8409-43ef-8f19-08d82080be97", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:00:39 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "886", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "372cad2f-da98-42cc-93b8-1b8aa6787bdd", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140039Z:372cad2f-da98-42cc-93b8-1b8aa6787bdd", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "0e901b71-55d9-4491-9572-e7b89fa2ec0d_M7CH3_M7CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2/subscriptions/subs_85281992623b4\",\"name\":\"subs_85281992623b4\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic1_273443103bd2\",\"subscriptionName\":\"subs_85281992623b4\",\"lockDuration\":\"00:01:00\",\"requiresSession\":true,\"defaultMessageTimeToLive\":\"00:20:00\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":20,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:00:38.7042378Z\",\"updatedAt\":\"2019-10-17T14:00:38.7042378Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:48 GMT", + "x-ms-correlation-request-id" : "d41cee21-918b-4aa6-a8a3-f43775bac0ec", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043949Z:d41cee21-918b-4aa6-a8a3-f43775bac0ec", + "Expires" : "-1", + "Content-Length" : "879", + "x-ms-request-id" : "514be98e-06ae-4236-876d-b47c68d00808_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91/subscriptions/subs_96677b0ac284\",\"name\":\"subs_96677b0ac284\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic1_16587db2d91\",\"subscriptionName\":\"subs_96677b0ac284\",\"lockDuration\":\"00:01:00\",\"requiresSession\":true,\"defaultMessageTimeToLive\":\"00:20:00\",\"deadLetteringOnMessageExpiration\":true,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":20,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.6803536Z\",\"updatedAt\":\"2020-09-02T04:39:48.6803536Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "4deb9c2d-8409-43ef-8f19-08d82080be97", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2/subscriptions/subs_95d24053230ec?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91/subscriptions/subs_94180409edfc?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae54fef2-9a8e-49d5-9d50-34cd7fa3a903", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:00:40 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "887", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5b2c17ea-d6a5-4122-8268-8dcc6763917d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140040Z:5b2c17ea-d6a5-4122-8268-8dcc6763917d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "71087966-72b6-452e-9f0b-ab2915c2770e_M7CH3_M7CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2/subscriptions/subs_95d24053230ec\",\"name\":\"subs_95d24053230ec\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic1_273443103bd2\",\"subscriptionName\":\"subs_95d24053230ec\",\"lockDuration\":\"00:01:00\",\"requiresSession\":true,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:00:40.6574141Z\",\"updatedAt\":\"2019-10-17T14:00:40.6574141Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"00:20:00\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:50 GMT", + "x-ms-correlation-request-id" : "5c4885dc-23c4-46e9-bd81-9fe2f3699f75", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043951Z:5c4885dc-23c4-46e9-bd81-9fe2f3699f75", + "Expires" : "-1", + "Content-Length" : "878", + "x-ms-request-id" : "b9a51c9e-d314-473d-9d1a-48b5d5564918_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91/subscriptions/subs_94180409edfc\",\"name\":\"subs_94180409edfc\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic1_16587db2d91\",\"subscriptionName\":\"subs_94180409edfc\",\"lockDuration\":\"00:01:00\",\"requiresSession\":true,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:50.891015Z\",\"updatedAt\":\"2020-09-02T04:39:50.891015Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"00:20:00\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "ae54fef2-9a8e-49d5-9d50-34cd7fa3a903", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "46086bc7-27a6-4531-8311-a8c12a51ed4d", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:00:48 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "920", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5d3d004c-304e-428b-9023-35a8af0fb0e7", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140048Z:5d3d004c-304e-428b-9023-35a8af0fb0e7", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "56b24d9a-56f4-4866-9864-b9830f8ea96d_M7CH3_M7CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9\",\"name\":\"topic2_50a4354592a9\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic2_50a4354592a9\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":16384,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:00:42.55Z\",\"updatedAt\":\"2019-10-17T14:00:47.593Z\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":true,\"isExpress\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:53 GMT", + "x-ms-correlation-request-id" : "e2107a75-b6db-45d5-9f8e-0f0c1f83af50", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043954Z:e2107a75-b6db-45d5-9f8e-0f0c1f83af50", + "Expires" : "-1", + "Content-Length" : "897", + "x-ms-request-id" : "5a20ab5e-e57d-4966-aeac-6b5f627e19b0_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad\",\"name\":\"topic2_6210887d6ad\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic2_6210887d6ad\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":16384,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:53.167Z\",\"updatedAt\":\"2020-09-02T04:39:53.33Z\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":true,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "46086bc7-27a6-4531-8311-a8c12a51ed4d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/subscriptions/subs_39b395335114d?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/subscriptions/subs_747582caa2e4?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6f2fc76-aca1-4857-bbb0-54b49fb74b5e", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:00:52 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "905", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5427aa6d-8249-49f4-9107-0347a9ef8dda", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140052Z:5427aa6d-8249-49f4-9107-0347a9ef8dda", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "d56366c5-5d7c-45f9-bd2b-9b57b50d120f_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/subscriptions/subs_39b395335114d\",\"name\":\"subs_39b395335114d\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic2_50a4354592a9\",\"subscriptionName\":\"subs_39b395335114d\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:00:50.9614025Z\",\"updatedAt\":\"2019-10-17T14:00:50.9614025Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:56 GMT", + "x-ms-correlation-request-id" : "5a6aeb6c-bb3c-463e-ad28-99853fcd1fdd", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043956Z:5a6aeb6c-bb3c-463e-ad28-99853fcd1fdd", + "Expires" : "-1", + "Content-Length" : "898", + "x-ms-request-id" : "80edbc80-4af3-4cb7-9d8d-239c5a0827ad_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/subscriptions/subs_747582caa2e4\",\"name\":\"subs_747582caa2e4\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic2_6210887d6ad\",\"subscriptionName\":\"subs_747582caa2e4\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:55.8037311Z\",\"updatedAt\":\"2020-09-02T04:39:55.8037311Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "c6f2fc76-aca1-4857-bbb0-54b49fb74b5e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules/SendRule?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules/SendRule?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e73a15ac-840e-419e-9be7-0df6294ac140", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:00:59 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "344", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8e4f8a42-b304-4b01-a669-111e5cf79d6a", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140100Z:8e4f8a42-b304-4b01-a669-111e5cf79d6a", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "5689baf9-9006-45be-8f32-3b99cf50b2d1_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:58 GMT", + "x-ms-correlation-request-id" : "3150eb01-7db7-4206-b2ab-d2f6b469bf21", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043959Z:3150eb01-7db7-4206-b2ab-d2f6b469bf21", + "Expires" : "-1", + "Content-Length" : "341", + "x-ms-request-id" : "84609d09-01f5-4e1b-9c56-36fef00e48f1_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}", + "x-ms-client-request-id" : "e73a15ac-840e-419e-9be7-0df6294ac140", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6c8af2fb-41df-4b97-b207-139797dd8311", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:04 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "372", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11971", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fa6906af-769b-45ca-9653-4c29d12a013f", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140105Z:fa6906af-769b-45ca-9653-4c29d12a013f", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "0e01f33a-d9fe-4f81-afef-aca928552e70_M11CH3_M11CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:39:59 GMT", + "x-ms-correlation-request-id" : "755f9ba5-6103-4693-b833-1e3a82dbf6ef", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044000Z:755f9ba5-6103-4693-b833-1e3a82dbf6ef", + "Expires" : "-1", + "Content-Length" : "369", + "x-ms-request-id" : "f826bf7b-b270-49d5-87b8-6139c4cdaf41_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "6c8af2fb-41df-4b97-b207-139797dd8311", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "56652bc4-6bf4-4bc3-a180-a171d6414020", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:40:00 GMT", + "x-ms-correlation-request-id" : "daddc75e-c15b-4cf5-a669-d0a298b08046", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044001Z:daddc75e-c15b-4cf5-a669-d0a298b08046", + "Expires" : "-1", + "Content-Length" : "748", + "x-ms-request-id" : "a08dc749-b8ae-4567-a660-688c58961bfb_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad\",\"name\":\"topic2_6210887d6ad\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic2_6210887d6ad\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":16384,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":false,\"autoDeleteOnIdle\":\"00:05:00\",\"enablePartitioning\":true,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "56652bc4-6bf4-4bc3-a180-a171d6414020", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules/SendRule?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b22f685-bc5b-41a5-8471-02952e7c9d68", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:13 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "624", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "58742fce-4f59-492c-a85c-7e465169ca64", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140113Z:58742fce-4f59-492c-a85c-7e465169ca64", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "1085811c-88d7-418b-8e71-e456f3e2168c_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9\",\"name\":\"topic2_50a4354592a9\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic2_50a4354592a9\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":16384,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"supportOrdering\":false,\"autoDeleteOnIdle\":\"00:05:00\",\"enablePartitioning\":true,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:40:00 GMT", + "x-ms-correlation-request-id" : "0f6cd909-563f-4de9-81ce-e7aa9c0e9f6d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044001Z:0f6cd909-563f-4de9-81ce-e7aa9c0e9f6d", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a791c439-04c3-49ef-ab87-2558392ab64d_M7SN1_M7SN1", + "x-ms-client-request-id" : "3b22f685-bc5b-41a5-8471-02952e7c9d68" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules/ManageRule?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules/ManageRule?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "348f50c3-e122-4a22-8f97-7f97c462eab3", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:19 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "366", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2f5dd701-1afe-4a85-bf29-0a0d146bc9ea", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140119Z:2f5dd701-1afe-4a85-bf29-0a0d146bc9ea", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "9ac1e750-8123-4481-848c-f350098884de_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules/ManageRule\",\"name\":\"ManageRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}" - } + "Date" : "Wed, 02 Sep 2020 04:40:06 GMT", + "x-ms-correlation-request-id" : "76e6b92b-c67e-4e23-a585-d1e411421260", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044006Z:76e6b92b-c67e-4e23-a585-d1e411421260", + "Expires" : "-1", + "Content-Length" : "363", + "x-ms-request-id" : "e1b42bdc-8532-447e-ab74-156e8d8822d7_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules/ManageRule\",\"name\":\"ManageRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}", + "x-ms-client-request-id" : "348f50c3-e122-4a22-8f97-7f97c462eab3", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules/SendRule?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e40b17e-c7e8-42ca-b3b0-76596a847967", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:25 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ba638697-f057-436a-ae89-cc118274fd36", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140126Z:ba638697-f057-436a-ae89-cc118274fd36", - "cache-control" : "no-cache", - "x-ms-request-id" : "2f4ff9d6-345f-4630-958d-45c408249844_M11CH3_M11CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:06 GMT", + "x-ms-correlation-request-id" : "26a29e7f-dd91-4529-a706-09cdcba2631a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044007Z:26a29e7f-dd91-4529-a706-09cdcba2631a", + "Expires" : "-1", + "Content-Length" : "733", + "x-ms-request-id" : "e6abd424-eaf5-45fa-b418-33a494bfca46_M1CH3_M1CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic2_6210887d6ad/authorizationRules/ManageRule\",\"name\":\"ManageRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "3e40b17e-c7e8-42ca-b3b0-76596a847967", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0c72810f-17fb-4ae3-8e63-f49bb8113006", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:26 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "394", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11970", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "905e789b-d27d-42b2-8280-07d7eed9970a", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140126Z:905e789b-d27d-42b2-8280-07d7eed9970a", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "da1d8dcd-e1af-4d45-9275-b06b74379f93_M4CH3_M4CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic2_50a4354592a9/authorizationRules/ManageRule\",\"name\":\"ManageRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:40:07 GMT", + "x-ms-correlation-request-id" : "834fb112-31c8-480b-9387-dc46da37baa9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044008Z:834fb112-31c8-480b-9387-dc46da37baa9", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "a19fc1a3-39ec-4363-9bcf-9af9e25f86d7_M2CH3_M2CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "0c72810f-17fb-4ae3-8e63-f49bb8113006", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/AuthorizationRules?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e9104e9c-b8dd-4782-818b-4189c32acc90", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:28 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "403", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11969", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b959ac29-f181-4e2f-a9a0-61831491ac7d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140129Z:b959ac29-f181-4e2f-a9a0-61831491ac7d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "a45f9819-7d0f-4e73-8bf6-9a9dc955994f_M0CH3_M0CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:40:08 GMT", + "x-ms-correlation-request-id" : "c2a4bfef-c4bd-4b57-ade4-d855dfe7c022", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044008Z:c2a4bfef-c4bd-4b57-ade4-d855dfe7c022", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "1aebed07-96ed-4d8f-946b-9bd7d872f309_M7SN1_M7SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "e9104e9c-b8dd-4782-818b-4189c32acc90", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b48eb9c0-375f-4eb7-8984-ca0c6ee0f125", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:31 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "547", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9f7961df-484b-4d12-a6fa-25ada991d2b4", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140131Z:9f7961df-484b-4d12-a6fa-25ada991d2b4", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "af43f2f0-d150-4e90-9f92-db71dd5d51c7_M10CH3_M10CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacebe847995d.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespacebe847995d.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" - } + "Date" : "Wed, 02 Sep 2020 04:40:09 GMT", + "x-ms-correlation-request-id" : "706c9932-d56b-4a22-b935-66235f3753de", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044009Z:706c9932-d56b-4a22-b935-66235f3753de", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "a5d06898-62e6-47e8-b01d-397c38c7eac3_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "b48eb9c0-375f-4eb7-8984-ca0c6ee0f125", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/topics/topic1_273443103bd2?api-version=2015-08-01", + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d99a6117-90c6-4674-89ea-4219a3f7edfa", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:33 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14996", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "53eece2c-736d-44e9-919b-e77b47cd2e36", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140134Z:53eece2c-736d-44e9-919b-e77b47cd2e36", - "cache-control" : "no-cache", - "x-ms-request-id" : "53eece2c-736d-44e9-919b-e77b47cd2e36", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:09 GMT", + "x-ms-correlation-request-id" : "e9c2e6d7-cc05-481b-8f75-8a06cc800eca", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044010Z:e9c2e6d7-cc05-481b-8f75-8a06cc800eca", + "Expires" : "-1", + "Content-Length" : "545", + "x-ms-request-id" : "7eef1d26-4f64-4947-9bb5-21c0dbd427c0_M5CH3_M5CH3", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace70852f67.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace70852f67.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}", + "x-ms-client-request-id" : "d99a6117-90c6-4674-89ea-4219a3f7edfa", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/topics/topic1_16587db2d91?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bdd7c020-27cc-4ca8-b258-481ea6b716d5", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:34 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14995", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a2874b15-dfca-4a8c-8c20-9423a7d406f0", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140135Z:a2874b15-dfca-4a8c-8c20-9423a7d406f0", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/operationresults/namespacebe847995d?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "b68d120d-7c55-4ac4-909d-3a971df991ba_M7CH3_M7CH3", - "Body" : "" - } + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:40:13 GMT", + "x-ms-correlation-request-id" : "a03da71f-a686-49c9-a95b-4cfbc6f74f9e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044014Z:a03da71f-a686-49c9-a95b-4cfbc6f74f9e", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a03da71f-a686-49c9-a95b-4cfbc6f74f9e" + }, + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/operationresults/namespacebe847995d?api-version=2015-08-01", + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ceac746c-242f-46d2-a5b4-169caaa9f0f4", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:01:35 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11968", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c6b6debb-4ce5-4848-9b86-1667644c5ff6", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140135Z:c6b6debb-4ce5-4848-9b86-1667644c5ff6", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/operationresults/namespacebe847995d?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "16faf1a6-d919-4a50-a33c-440c0a3eabf5_M7CH3_M7CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:15 GMT", + "x-ms-correlation-request-id" : "79b6b9f4-fcd6-4ea7-afe0-f2b4cfb55b3d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044015Z:79b6b9f4-fcd6-4ea7-afe0-f2b4cfb55b3d", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "0864a087-f583-4de4-a574-0c136bd69738_M3CH3_M3CH3", + "x-ms-client-request-id" : "ceac746c-242f-46d2-a5b4-169caaa9f0f4", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/operationresults/namespace70852f67?api-version=2015-08-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_fb550278c74d/providers/Microsoft.ServiceBus/namespaces/namespacebe847995d/operationresults/namespacebe847995d?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_470703d754e/providers/Microsoft.ServiceBus/namespaces/namespace70852f67/operationresults/namespace70852f67?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed90d3d4-8fd5-469f-9128-f2b5fea76590" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:02:06 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11967", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3f9217a4-9365-402d-93e6-06bd36813757", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140206Z:3f9217a4-9365-402d-93e6-06bd36813757", - "cache-control" : "no-cache", - "x-ms-request-id" : "aab256fa-043f-4a49-ab6f-0fb42cdfdae8_M7CH3_M7CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:45 GMT", + "x-ms-correlation-request-id" : "24e5eab1-01b6-4d5a-8b00-9c1c3cce3804", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044046Z:24e5eab1-01b6-4d5a-8b00-9c1c3cce3804", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "cfdf1810-42e9-420b-9c9e-c12d1de64927_M10CH3_M10CH3", + "x-ms-client-request-id" : "ed90d3d4-8fd5-469f-9128-f2b5fea76590" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb04_fb550278c74d?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb04_470703d754e?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff55cafd-23f0-4fac-a9ad-85061a99318f", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:02:11 GMT", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14994", - "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fbdcabb2-800a-4994-b175-1954c0f95ed9", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140211Z:fbdcabb2-800a-4994-b175-1954c0f95ed9", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDQ6NUZGQjU1MDI3OEM3NEQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "fbdcabb2-800a-4994-b175-1954c0f95ed9", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:47 GMT", + "x-ms-correlation-request-id" : "b4cdd9e3-35ec-4561-86a4-8831bf358f5f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044047Z:b4cdd9e3-35ec-4561-86a4-8831bf358f5f", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "b4cdd9e3-35ec-4561-86a4-8831bf358f5f", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDQ6NUY0NzA3MDNENzU0RS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null } ], - "variables" : [ "rgsb04_fb550278c74d", "namespacebe847995d", "topic1_273443103bd2", "topic2_50a4354592a9", "subs_85281992623b4", "subs_95d24053230ec", "subs_39b395335114d", "d4f6f4a3-f3d1-4acc-8c49-8ad86c79621a", "0163717a-bf49-4136-91c7-b3ee95cf944c", "1b9721b7-aa9a-46b9-b3c7-d02dad0f0ef9", "cb81eb37-d588-4ffa-a275-24915e43ec2c", "26a96741-372b-4fe2-b494-0090284f5980", "f3eee251-807c-40ff-92e7-be81f1626435", "8b448f5d-2eb1-473a-ac4c-d18df6bd91f6", "85fce47a-f07b-491a-bcad-71f744ae24c9", "bc8f2526-6ce3-43ca-8054-8301854ab541", "b3a5d254-ed92-417a-85b0-2e086c151ff4", "81a7f5d7-4445-4050-a9ee-724c74a257e3", "f9b01641-580f-4a99-b776-e4b490e04549", "93386711-8560-4138-b24c-0fa6a3d6442a", "45320b2d-8247-4bd8-9afa-5259a16aeaf4", "62fcfd11-e1c2-4f02-a9b3-5f84d58865ae", "4c9c53f1-e5a9-4cdf-8389-f840cac8db16", "c44fb48a-615d-41df-80a2-d7ad629d86b0" ] + "variables" : [ "rgsb04_470703d754e", "namespace70852f67", "topic1_16587db2d91", "topic2_6210887d6ad", "subs_96677b0ac284", "subs_94180409edfc", "subs_747582caa2e4" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeBasic.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeBasic.json index 34dbed31b7a69..7a6caa68bb733 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeBasic.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusPublishSubscribeBasic.json @@ -1,597 +1,713 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb02_eb279057cf6e?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb02_25691a6cb10?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc540499-5a6a-4ff3-8dd1-eba173dfa487", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:52:11 GMT", - "content-length" : "319", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5ee5a547-8412-4104-aa78-e56df991a002", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135211Z:5ee5a547-8412-4104-aa78-e56df991a002", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "5ee5a547-8412-4104-aa78-e56df991a002", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e\",\"name\":\"rgsb02_eb279057cf6e\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2019-10-17T13:52:07.966Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:38:34 GMT", + "x-ms-correlation-request-id" : "d3f57c8c-e6a9-49b0-a1ba-d06a9fa588e1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043834Z:d3f57c8c-e6a9-49b0-a1ba-d06a9fa588e1", + "Expires" : "-1", + "Content-Length" : "233", + "x-ms-request-id" : "d3f57c8c-e6a9-49b0-a1ba-d06a9fa588e1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10\",\"name\":\"rgsb02_25691a6cb10\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a99b541e-42a4-47a6-bd8c-d3e2bb4007fd", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:52:14 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "494", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4e1c23d8-fdf6-4841-af10-e04d1381a000", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135214Z:4e1c23d8-fdf6-4841-af10-e04d1381a000", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "73ded105-0646-44b2-aee0-c67532873d0c_M2CH3_M2CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456\",\"name\":\"namespacee21084456\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespacee21084456\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:38:42 GMT", + "x-ms-correlation-request-id" : "efd781e2-b4dd-414b-aa70-c11c2fe3fed4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043842Z:efd781e2-b4dd-414b-aa70-c11c2fe3fed4", + "Expires" : "-1", + "Content-Length" : "490", + "x-ms-request-id" : "8171730c-a3b0-411c-b81e-27bedd8d385e_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a\",\"name\":\"namespace43516a2a\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace43516a2a\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "a99b541e-42a4-47a6-bd8c-d3e2bb4007fd", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4761144-24e0-4592-a3dc-a249c3706561" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:52:14 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "696", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5feb3e43-eafb-4fae-b455-42959c0bd007", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135214Z:5feb3e43-eafb-4fae-b455-42959c0bd007", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "00585855-5065-46c7-bfaa-1ac225ef85b8_M2CH3_M2CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456\",\"name\":\"namespacee21084456\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespacee21084456\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T13:52:13.63Z\",\"serviceBusEndpoint\":\"https://namespacee21084456.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:52:13.63Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:12 GMT", + "x-ms-correlation-request-id" : "e00875be-07f1-43e1-8041-335903524bc3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043912Z:e00875be-07f1-43e1-8041-335903524bc3", + "Expires" : "-1", + "Content-Length" : "693", + "x-ms-request-id" : "4905c0c7-0e45-4d7a-89a5-62bb4056341b_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a\",\"name\":\"namespace43516a2a\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace43516a2a\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T04:38:41.063Z\",\"serviceBusEndpoint\":\"https://namespace43516a2a.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:38:41.063Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "d4761144-24e0-4592-a3dc-a249c3706561", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "613b5b24-c648-477a-9225-e7bcce62e271" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:52:44 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "696", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4eb265b6-5ca2-4217-9217-35b7e9613f83", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135245Z:4eb265b6-5ca2-4217-9217-35b7e9613f83", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "e165e62b-48af-4686-8591-54b42bb2f2f3_M4CH3_M4CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456\",\"name\":\"namespacee21084456\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespacee21084456\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T13:52:13.63Z\",\"serviceBusEndpoint\":\"https://namespacee21084456.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:52:13.63Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:42 GMT", + "x-ms-correlation-request-id" : "afdc2193-d1da-4681-9c1f-582e1378d263", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043943Z:afdc2193-d1da-4681-9c1f-582e1378d263", + "Expires" : "-1", + "Content-Length" : "694", + "x-ms-request-id" : "a48ce62f-26d8-4395-9fe7-89f397efb733_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a\",\"name\":\"namespace43516a2a\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace43516a2a\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:38:41.063Z\",\"serviceBusEndpoint\":\"https://namespace43516a2a.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:39:23.567Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "613b5b24-c648-477a-9225-e7bcce62e271", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "65f7470a-4c3d-46eb-9d9e-0f2a47709d07", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:39:45 GMT", + "x-ms-correlation-request-id" : "d6de28c4-f7b0-438a-8c77-3bf70c3714de", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043945Z:d6de28c4-f7b0-438a-8c77-3bf70c3714de", + "Expires" : "-1", + "Content-Length" : "894", + "x-ms-request-id" : "fc8a1453-d244-4c24-ae36-970a83ad4357_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696\",\"name\":\"topic_79794509696\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_79794509696\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.153Z\",\"updatedAt\":\"2020-09-02T04:39:45.187Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "65f7470a-4c3d-46eb-9d9e-0f2a47709d07", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4e18ca6-8c7d-44af-bcf7-605d0c3a2356", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:14 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "698", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "bd79d433-ac01-40d5-82f6-4f799fdc2e8b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135315Z:bd79d433-ac01-40d5-82f6-4f799fdc2e8b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "119589a1-ca91-4a2e-a082-a01f86eb8eb6_M4CH3_M4CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456\",\"name\":\"namespacee21084456\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespacee21084456\",\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:52:13.63Z\",\"serviceBusEndpoint\":\"https://namespacee21084456.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:52:57.017Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:45 GMT", + "x-ms-correlation-request-id" : "c9ce2e17-d5eb-4f74-b9e4-b76a9c05d70d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043946Z:c9ce2e17-d5eb-4f74-b9e4-b76a9c05d70d", + "Expires" : "-1", + "Content-Length" : "1105", + "x-ms-request-id" : "cd79ccfb-c7e1-4515-be8a-956a891f4597_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696\",\"name\":\"topic_79794509696\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_79794509696\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.153Z\",\"updatedAt\":\"2020-09-02T04:39:45.187Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "b4e18ca6-8c7d-44af-bcf7-605d0c3a2356", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d6bf780-dd72-46c5-9e0e-5ab4b643b4be", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:39:46 GMT", + "x-ms-correlation-request-id" : "f3b53dd5-1dd6-4118-b6cd-98af4076c90d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043946Z:f3b53dd5-1dd6-4118-b6cd-98af4076c90d", + "Expires" : "-1", + "Content-Length" : "761", + "x-ms-request-id" : "a1f32e97-b283-4e20-861a-1be32f51efe0_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696\",\"name\":\"topic_79794509696\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_79794509696\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "5d6bf780-dd72-46c5-9e0e-5ab4b643b4be", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub1_48486a3c19de?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0c5dc4e-50f6-45c3-9423-33edebf8d54e", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:17 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "919", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "87234955-9572-4bda-bcf0-8c3404d6e089", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135318Z:87234955-9572-4bda-bcf0-8c3404d6e089", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "1cb13fdb-6bcd-4c3c-8526-2f15ea737c87_M4CH3_M4CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55\",\"name\":\"topic_e684162654a55\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_e684162654a55\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:53:17.673Z\",\"updatedAt\":\"2019-10-17T13:53:17.73Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"isExpress\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:48 GMT", + "x-ms-correlation-request-id" : "4f2de00c-2b64-4f30-8dd6-0d238e116659", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043949Z:4f2de00c-2b64-4f30-8dd6-0d238e116659", + "Expires" : "-1", + "Content-Length" : "896", + "x-ms-request-id" : "713b3711-0c7f-4456-844b-2c93eac8aa83_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub1_48486a3c19de\",\"name\":\"sub1_48486a3c19de\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_79794509696\",\"subscriptionName\":\"sub1_48486a3c19de\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.6316592Z\",\"updatedAt\":\"2020-09-02T04:39:48.6316592Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "e0c5dc4e-50f6-45c3-9423-33edebf8d54e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub1_48486a3c19de?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "892f57ff-1a46-445f-9e6f-07e010c7534d", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:18 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1130", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e1d18465-8021-46c4-9ae1-a84ef1aba0c2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135319Z:e1d18465-8021-46c4-9ae1-a84ef1aba0c2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "70658162-257e-4aa7-b6cb-f40fe7ae572f_M4CH3_M4CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55\",\"name\":\"topic_e684162654a55\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_e684162654a55\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:53:17.673Z\",\"updatedAt\":\"2019-10-17T13:53:17.73Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"isExpress\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:48 GMT", + "x-ms-correlation-request-id" : "bd1da165-7081-440c-8cda-88c1e20dddc5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043949Z:bd1da165-7081-440c-8cda-88c1e20dddc5", + "Expires" : "-1", + "Content-Length" : "1058", + "x-ms-request-id" : "75643d42-69f8-4c89-ada3-d1a0ecc08dbd_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub1_48486a3c19de\",\"name\":\"sub1_48486a3c19de\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_79794509696\",\"subscriptionName\":\"sub1_48486a3c19de\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.6314368Z\",\"updatedAt\":\"2020-09-02T04:39:48.6314368Z\",\"accessedAt\":\"2020-09-02T04:39:48.6314368Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "892f57ff-1a46-445f-9e6f-07e010c7534d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub2_2916632d6b9c?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d0055f50-14b6-4428-b1e7-98a13aead433", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:19 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "640", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "78f70e85-36a9-40cf-85a1-966e642a50c6", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135320Z:78f70e85-36a9-40cf-85a1-966e642a50c6", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "24039179-1070-4a2d-ae9b-0dc679ba6981_M4CH3_M4CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55\",\"name\":\"topic_e684162654a55\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_e684162654a55\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:50 GMT", + "x-ms-correlation-request-id" : "abf517a3-28cc-4143-91cc-5d1e68fb8b43", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043951Z:abf517a3-28cc-4143-91cc-5d1e68fb8b43", + "Expires" : "-1", + "Content-Length" : "879", + "x-ms-request-id" : "9dc0e507-22f1-422b-92d2-a9e10f6bd114_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub2_2916632d6b9c\",\"name\":\"sub2_2916632d6b9c\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_79794509696\",\"subscriptionName\":\"sub2_2916632d6b9c\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:50.9136553Z\",\"updatedAt\":\"2020-09-02T04:39:50.9136553Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"00:10:00\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "d0055f50-14b6-4428-b1e7-98a13aead433", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub1_77e63545549a1?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc04efe6-f32b-41c1-9e85-9172961b3fcd", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:22 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "905", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "6b6c43a0-4aac-4ba7-87e8-82b42c880f36", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135322Z:6b6c43a0-4aac-4ba7-87e8-82b42c880f36", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "892a1499-109a-47be-8974-1d66d7d88fa4_M4CH3_M4CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub1_77e63545549a1\",\"name\":\"sub1_77e63545549a1\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_e684162654a55\",\"subscriptionName\":\"sub1_77e63545549a1\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:53:21.9406562Z\",\"updatedAt\":\"2019-10-17T13:53:21.9406562Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:51 GMT", + "x-ms-correlation-request-id" : "1191dc01-d6e7-41b1-86e9-f8732ce0280f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043951Z:1191dc01-d6e7-41b1-86e9-f8732ce0280f", + "Expires" : "-1", + "Content-Length" : "1148", + "x-ms-request-id" : "6d6d3675-b721-48bb-8aa9-422e2d7f32b1_M2CH3_M2CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696\",\"name\":\"topic_79794509696\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_79794509696\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.1609229Z\",\"updatedAt\":\"2020-09-02T04:39:46.770433Z\",\"accessedAt\":\"2020-09-02T04:39:50.9127666Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":2,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "dc04efe6-f32b-41c1-9e85-9172961b3fcd", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub1_77e63545549a1?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "91f4c8ba-ff9f-4213-ad17-a3c09b210520", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:22 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1063", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8594b3bb-8c3f-4b23-8b11-71a32de8896e", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135322Z:8594b3bb-8c3f-4b23-8b11-71a32de8896e", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "f31032a6-48a4-41fc-baf1-854c9458d685_M4CH3_M4CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub1_77e63545549a1\",\"name\":\"sub1_77e63545549a1\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_e684162654a55\",\"subscriptionName\":\"sub1_77e63545549a1\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:53:21.9450796Z\",\"updatedAt\":\"2019-10-17T13:53:21.9450796Z\",\"accessedAt\":\"2019-10-17T13:53:21.947Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:52 GMT", + "x-ms-correlation-request-id" : "fb2066ff-e3b5-425b-b0cd-594a1b918325", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043952Z:fb2066ff-e3b5-425b-b0cd-594a1b918325", + "Expires" : "-1", + "Content-Length" : "1148", + "x-ms-request-id" : "9c255960-d27e-402c-9797-b1c332592c21_M11CH3_M11CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696\",\"name\":\"topic_79794509696\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_79794509696\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.1609229Z\",\"updatedAt\":\"2020-09-02T04:39:46.770433Z\",\"accessedAt\":\"2020-09-02T04:39:50.9127666Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":2,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "91f4c8ba-ff9f-4213-ad17-a3c09b210520", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub2_4e883646d006c?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c087fdce-331b-40c0-bcfa-391928d0d120", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:25 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "888", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a0c8fd0d-9508-47a6-a6f6-c0dd7c68e021", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135325Z:a0c8fd0d-9508-47a6-a6f6-c0dd7c68e021", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "464fbf53-c972-487d-b2b0-e03146849e13_M4CH3_M4CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub2_4e883646d006c\",\"name\":\"sub2_4e883646d006c\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_e684162654a55\",\"subscriptionName\":\"sub2_4e883646d006c\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:53:24.4885123Z\",\"updatedAt\":\"2019-10-17T13:53:24.4885123Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"00:10:00\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:52 GMT", + "x-ms-correlation-request-id" : "f76496e0-68ee-4a7f-be51-f8f096a96373", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043953Z:f76496e0-68ee-4a7f-be51-f8f096a96373", + "Expires" : "-1", + "Content-Length" : "2128", + "x-ms-request-id" : "0065643e-8caf-4953-b75a-d7d58bce138e_M2CH3_M2CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub1_48486a3c19de\",\"name\":\"sub1_48486a3c19de\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_79794509696\",\"subscriptionName\":\"sub1_48486a3c19de\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.6314368Z\",\"updatedAt\":\"2020-09-02T04:39:48.6314368Z\",\"accessedAt\":\"2020-09-02T04:39:48.6314368Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub2_2916632d6b9c\",\"name\":\"sub2_2916632d6b9c\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_79794509696\",\"subscriptionName\":\"sub2_2916632d6b9c\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:50.9127666Z\",\"updatedAt\":\"2020-09-02T04:39:50.9127666Z\",\"accessedAt\":\"2020-09-02T04:39:50.9127666Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"00:10:00\",\"entityAvailabilityStatus\":\"Available\"}}],\"nextLink\":null}", + "x-ms-client-request-id" : "c087fdce-331b-40c0-bcfa-391928d0d120", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "73df3a82-47dc-47eb-9a7b-88590c36bfd9", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:25 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1175", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "26850ba6-572a-49c9-b309-de8a43db8f89", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135325Z:26850ba6-572a-49c9-b309-de8a43db8f89", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "d436d18b-9985-4d38-8dd9-e4a06989865a_M4CH3_M4CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55\",\"name\":\"topic_e684162654a55\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_e684162654a55\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:53:17.6792523Z\",\"updatedAt\":\"2019-10-17T13:53:19.9605711Z\",\"accessedAt\":\"2019-10-17T13:53:24.6191151Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":2,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"isExpress\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:39:53 GMT", + "x-ms-correlation-request-id" : "8874ce25-4cbf-4a98-859d-b3e58b630957", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043953Z:8874ce25-4cbf-4a98-859d-b3e58b630957", + "Expires" : "-1", + "Content-Length" : "2128", + "x-ms-request-id" : "8935cddf-03d5-4301-b77e-a997b06946d7_M11CH3_M11CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub1_48486a3c19de\",\"name\":\"sub1_48486a3c19de\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_79794509696\",\"subscriptionName\":\"sub1_48486a3c19de\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.6314368Z\",\"updatedAt\":\"2020-09-02T04:39:48.6314368Z\",\"accessedAt\":\"2020-09-02T04:39:48.6314368Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub2_2916632d6b9c\",\"name\":\"sub2_2916632d6b9c\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_79794509696\",\"subscriptionName\":\"sub2_2916632d6b9c\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:50.9127666Z\",\"updatedAt\":\"2020-09-02T04:39:50.9127666Z\",\"accessedAt\":\"2020-09-02T04:39:50.9127666Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"00:10:00\",\"entityAvailabilityStatus\":\"Available\"}}],\"nextLink\":null}", + "x-ms-client-request-id" : "73df3a82-47dc-47eb-9a7b-88590c36bfd9", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1357641-4090-428c-8322-72123492ea07", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:26 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "2142", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8e9d89d4-4165-4b04-b772-3fcd8b34e4bb", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135326Z:8e9d89d4-4165-4b04-b772-3fcd8b34e4bb", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "e727a63e-6b62-4e13-94cb-8b51e0cb2627_M4CH3_M4CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub1_77e63545549a1\",\"name\":\"sub1_77e63545549a1\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_e684162654a55\",\"subscriptionName\":\"sub1_77e63545549a1\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:53:21.9450796Z\",\"updatedAt\":\"2019-10-17T13:53:21.9450796Z\",\"accessedAt\":\"2019-10-17T13:53:21.947Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub2_4e883646d006c\",\"name\":\"sub2_4e883646d006c\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_e684162654a55\",\"subscriptionName\":\"sub2_4e883646d006c\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:53:24.6191151Z\",\"updatedAt\":\"2019-10-17T13:53:24.6191151Z\",\"accessedAt\":\"2019-10-17T13:53:24.6191151Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"00:10:00\",\"entityAvailabilityStatus\":\"Available\"}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:39:54 GMT", + "x-ms-correlation-request-id" : "dd985add-3ece-4ccd-ae5b-a3b54bc57da1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043954Z:dd985add-3ece-4ccd-ae5b-a3b54bc57da1", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "0e778eae-416a-44e2-8a48-fe770d69ddc9_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "f1357641-4090-428c-8322-72123492ea07", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/AuthorizationRules?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bdc9ca09-2369-4bc4-94a8-81910c2d791c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:39:54 GMT", + "x-ms-correlation-request-id" : "4a412aeb-4455-477d-bce4-d0483105c69a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043955Z:4a412aeb-4455-477d-bce4-d0483105c69a", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "f4b717e8-9228-44cb-8587-d8be1fe5763d_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "bdc9ca09-2369-4bc4-94a8-81910c2d791c", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8d9e700-762a-4a86-8fbb-3304528b08a6", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:27 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "403", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7d6f99d7-c022-4e6c-a011-16b6af5f2a09", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135327Z:7d6f99d7-c022-4e6c-a011-16b6af5f2a09", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "7541e203-b875-4701-846f-4be845cd5e52_M9CH3_M9CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:39:55 GMT", + "x-ms-correlation-request-id" : "568ab294-125c-45e6-b03d-a08a948925ee", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043956Z:568ab294-125c-45e6-b03d-a08a948925ee", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "e1765da1-8305-4c19-9922-efba12cc01dd_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "e8d9e700-762a-4a86-8fbb-3304528b08a6", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f682894a-789c-45ad-92a3-596c36ae0d4d", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:28 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "547", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ff61779a-e67b-441d-8b23-b7685d9d37f1", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135328Z:ff61779a-e67b-441d-8b23-b7685d9d37f1", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "81a1c11b-c1e1-40a8-aa4c-3e9517090d0e_M9CH3_M9CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" - } + "Date" : "Wed, 02 Sep 2020 04:39:56 GMT", + "x-ms-correlation-request-id" : "fdaedff6-b82e-43c2-a99b-dd220015c8ca", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043957Z:fdaedff6-b82e-43c2-a99b-dd220015c8ca", + "Expires" : "-1", + "Content-Length" : "545", + "x-ms-request-id" : "155e49e5-6bb1-40e1-9ae2-9e7fcaa0c91a_M3CH3_M3CH3", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace43516a2a.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace43516a2a.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}", + "x-ms-client-request-id" : "f682894a-789c-45ad-92a3-596c36ae0d4d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/AuthorizationRules/RootManageSharedAccessKey/regenerateKeys?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "56f21b90-080f-4746-acc1-7015309baff7", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:44 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "547", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3de50036-a5d8-4691-9282-54558127f397", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135344Z:3de50036-a5d8-4691-9282-54558127f397", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "1dcff976-8365-415d-8d7e-4332edbe2941_M9CH3_M9CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespacee21084456.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" - } + "Date" : "Wed, 02 Sep 2020 04:39:57 GMT", + "x-ms-correlation-request-id" : "875d5bc2-881d-41bd-820e-e503f63f9548", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043957Z:875d5bc2-881d-41bd-820e-e503f63f9548", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "99c6965e-1cf6-4d9f-8a70-d930b54f7ada_M7SN1_M7SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "56f21b90-080f-4746-acc1-7015309baff7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55?api-version=2015-08-01", + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/AuthorizationRules/RootManageSharedAccessKey/regenerateKeys?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cdf31ef1-4f27-4599-8ce4-6f43a0a3594c", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:46 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "640", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4e7a0711-4b58-47c7-bd3a-7cc190fad8a7", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135347Z:4e7a0711-4b58-47c7-bd3a-7cc190fad8a7", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "d2c98dd2-8880-4803-9e63-6e94e7687175_M9CH3_M9CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55\",\"name\":\"topic_e684162654a55\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_e684162654a55\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:40:04 GMT", + "x-ms-correlation-request-id" : "de23e54d-8b7f-4f29-a515-32add3f8d7f3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044004Z:de23e54d-8b7f-4f29-a515-32add3f8d7f3", + "Expires" : "-1", + "Content-Length" : "545", + "x-ms-request-id" : "ae2fc444-77c9-47a6-bd97-88066aa21cb0_M10CH3_M10CH3", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace43516a2a.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace43516a2a.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}", + "x-ms-client-request-id" : "cdf31ef1-4f27-4599-8ce4-6f43a0a3594c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/topics/topic_e684162654a55/subscriptions/sub1_77e63545549a1?api-version=2015-08-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e9cd1faa-e649-47f5-a43a-7a81ead39ab4", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:47 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b33fc373-6098-42a7-a119-2cddd890b31b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135347Z:b33fc373-6098-42a7-a119-2cddd890b31b", - "cache-control" : "no-cache", - "x-ms-request-id" : "b33fc373-6098-42a7-a119-2cddd890b31b", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:08 GMT", + "x-ms-correlation-request-id" : "8a608c71-cf73-44b1-a693-896b89161a59", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044008Z:8a608c71-cf73-44b1-a693-896b89161a59", + "Expires" : "-1", + "Content-Length" : "761", + "x-ms-request-id" : "eb990abf-de93-46a3-b980-f5001bc41515_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696\",\"name\":\"topic_79794509696\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_79794509696\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "e9cd1faa-e649-47f5-a43a-7a81ead39ab4", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/topics/topic_79794509696/subscriptions/sub1_48486a3c19de?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9631af37-e5db-4208-b5a3-b86c98d3ef26", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:48 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14996", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "06594f76-2f97-4b7c-8214-1a49ae205fcb", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135349Z:06594f76-2f97-4b7c-8214-1a49ae205fcb", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/operationresults/namespacee21084456?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "36a2855b-f4ae-4bbf-ad52-544891b7631c_M9CH3_M9CH3", - "Body" : "" - } + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:40:10 GMT", + "x-ms-correlation-request-id" : "fe9d5f2f-589f-4970-9d62-74820c46b85f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044010Z:fe9d5f2f-589f-4970-9d62-74820c46b85f", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "fe9d5f2f-589f-4970-9d62-74820c46b85f" + }, + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/operationresults/namespacee21084456?api-version=2015-08-01", + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a04b99e-648e-41b3-a6b7-6e7624ae7556", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:53:48 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11975", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "23b4b2ba-b854-4dfa-87d3-41584c443ef2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135349Z:23b4b2ba-b854-4dfa-87d3-41584c443ef2", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/operationresults/namespacee21084456?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "718cce30-242c-4162-80bf-b5ce02181641_M9CH3_M9CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:10 GMT", + "x-ms-correlation-request-id" : "544e3d5a-c558-446d-8c9a-fec1220695a9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044011Z:544e3d5a-c558-446d-8c9a-fec1220695a9", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "0a7790d4-6aa3-4fb0-907b-3feb827e02d9_M2CH3_M2CH3", + "x-ms-client-request-id" : "4a04b99e-648e-41b3-a6b7-6e7624ae7556", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/operationresults/namespace43516a2a?api-version=2015-08-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_eb279057cf6e/providers/Microsoft.ServiceBus/namespaces/namespacee21084456/operationresults/namespacee21084456?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb02_25691a6cb10/providers/Microsoft.ServiceBus/namespaces/namespace43516a2a/operationresults/namespace43516a2a?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5671a37f-170e-4472-bb56-91f15cba4f08" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:54:18 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ecbe47e0-8aff-4720-901b-184e5ce61efb", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135419Z:ecbe47e0-8aff-4720-901b-184e5ce61efb", - "cache-control" : "no-cache", - "x-ms-request-id" : "00cfd918-e22d-48ac-8f41-c958b1ad9151_M9CH3_M9CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:41 GMT", + "x-ms-correlation-request-id" : "4d44fd0e-8cba-404a-8913-9a28a4c29946", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044041Z:4d44fd0e-8cba-404a-8913-9a28a4c29946", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a7117b39-260f-46d9-b22b-3df629b6029c_M6CH3_M6CH3", + "x-ms-client-request-id" : "5671a37f-170e-4472-bb56-91f15cba4f08" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb02_eb279057cf6e?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb02_25691a6cb10?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "562557b9-8285-4ec8-93ff-6a01fb0029fd", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:54:24 GMT", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14995", - "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fa8f0ce7-4d0f-4dd4-bcc7-0685ca981ecd", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135424Z:fa8f0ce7-4d0f-4dd4-bcc7-0685ca981ecd", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDI6NUZFQjI3OTA1N0NGNkUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "fa8f0ce7-4d0f-4dd4-bcc7-0685ca981ecd", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:44 GMT", + "x-ms-correlation-request-id" : "d44bad45-7895-4b9b-9529-996ab22a04f1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044045Z:d44bad45-7895-4b9b-9529-996ab22a04f1", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "d44bad45-7895-4b9b-9529-996ab22a04f1", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDI6NUYyNTY5MUE2Q0IxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null } ], - "variables" : [ "rgsb02_eb279057cf6e", "namespacee21084456", "topic_e684162654a55", "sub1_77e63545549a1", "sub2_4e883646d006c", "f6201a93-859d-427a-a92f-2c574687a91c", "fa2d1681-a330-45db-bb70-c28652592822", "84d4f3e6-73b0-4fd6-878d-29a58a28e0c9", "7adc7e6d-12a7-4e04-8d5a-5d1116b87e8a", "87a0b887-3f95-444a-b6ef-254509e30d3c", "44bffef5-095a-4e9b-a83d-661f970cde57", "cbcacf88-dc04-4725-8d9f-64fba3ab7eee", "20b2b31e-8193-4dee-be30-e39e23ad983c", "517a47b9-af24-410e-8b5e-55d4af605cb7", "fac38792-3475-454b-ae54-4384f973f80e", "3dc55df1-5936-4143-bff5-2c0d8caf77d1", "8d0af5a3-e575-400e-bd12-644a61050650" ] + "variables" : [ "rgsb02_25691a6cb10", "namespace43516a2a", "topic_79794509696", "sub1_48486a3c19de", "sub2_2916632d6b9c" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueAdvanceFeatures.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueAdvanceFeatures.json index 05b542f66c6fb..ee2f80f368322 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueAdvanceFeatures.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueAdvanceFeatures.json @@ -1,510 +1,537 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb04_ec93669789b8?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb04_11406ae7f91?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4b5c717-5505-4c48-82fa-1e87b7074a69", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:02:15 GMT", - "content-length" : "319", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7b85776e-62cb-4e6e-8ac4-b2f315f10fa9", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140215Z:7b85776e-62cb-4e6e-8ac4-b2f315f10fa9", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "7b85776e-62cb-4e6e-8ac4-b2f315f10fa9", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8\",\"name\":\"rgsb04_ec93669789b8\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2019-10-17T14:02:12.108Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:38:35 GMT", + "x-ms-correlation-request-id" : "df00ecb1-f4bf-4430-9c52-bfb9653ef7ab", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043835Z:df00ecb1-f4bf-4430-9c52-bfb9653ef7ab", + "Expires" : "-1", + "Content-Length" : "233", + "x-ms-request-id" : "df00ecb1-f4bf-4430-9c52-bfb9653ef7ab", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91\",\"name\":\"rgsb04_11406ae7f91\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ac3e574-b41f-4eab-a716-7471cad4f0db", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:02:19 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "494", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1187", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e4eeec99-133a-4eb0-aafb-bfb1514b3652", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140220Z:e4eeec99-133a-4eb0-aafb-bfb1514b3652", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "e48032a9-81bb-4381-8783-73207b88508a_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598\",\"name\":\"namespace839795598\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace839795598\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:38:41 GMT", + "x-ms-correlation-request-id" : "9acbd91b-a5de-47ed-9ea2-cbd9d77b97b3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043841Z:9acbd91b-a5de-47ed-9ea2-cbd9d77b97b3", + "Expires" : "-1", + "Content-Length" : "490", + "x-ms-request-id" : "3bfefa5c-10a6-4db9-a388-817683056f04_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365\",\"name\":\"namespace34974365\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace34974365\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "2ac3e574-b41f-4eab-a716-7471cad4f0db", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "44ecbccf-2d16-4ef9-b562-25103bacbcbf" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:02:20 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "696", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11975", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "85543fdd-1203-48a7-9fab-8b2d1c02c686", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140221Z:85543fdd-1203-48a7-9fab-8b2d1c02c686", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "f0269760-3bc6-4bdf-80e0-a877b877ae94_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598\",\"name\":\"namespace839795598\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace839795598\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T14:02:19.04Z\",\"serviceBusEndpoint\":\"https://namespace839795598.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T14:02:19.04Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:11 GMT", + "x-ms-correlation-request-id" : "7aa12a10-e32d-4c0d-be54-3a46a4c2de03", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043912Z:7aa12a10-e32d-4c0d-be54-3a46a4c2de03", + "Expires" : "-1", + "Content-Length" : "693", + "x-ms-request-id" : "9f865771-f01c-4d0c-b056-8c13592a566e_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365\",\"name\":\"namespace34974365\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace34974365\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T04:38:40.117Z\",\"serviceBusEndpoint\":\"https://namespace34974365.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:38:40.117Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "44ecbccf-2d16-4ef9-b562-25103bacbcbf", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "da891a33-be80-4c2c-9388-979721498a31" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:02:50 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "696", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "12de8ca5-b7b7-4af0-94fc-ae0824ba37cc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140251Z:12de8ca5-b7b7-4af0-94fc-ae0824ba37cc", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eb2aade6-7d61-47e7-8fac-6953fd5c9259_M14CH3_M14CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598\",\"name\":\"namespace839795598\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace839795598\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T14:02:19.04Z\",\"serviceBusEndpoint\":\"https://namespace839795598.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T14:02:19.04Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:42 GMT", + "x-ms-correlation-request-id" : "c9aced1a-32d6-435b-b49c-81a88d7d18f2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043942Z:c9aced1a-32d6-435b-b49c-81a88d7d18f2", + "Expires" : "-1", + "Content-Length" : "693", + "x-ms-request-id" : "e5889cc6-35ef-4cfa-8a37-5e8c084561f3_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365\",\"name\":\"namespace34974365\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace34974365\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:38:40.117Z\",\"serviceBusEndpoint\":\"https://namespace34974365.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:39:25.32Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "da891a33-be80-4c2c-9388-979721498a31", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598?api-version=2015-08-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "006036db-556b-4df6-88e0-aeeb30abea44", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:21 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "698", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11973", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "08ba14e0-cc66-4b50-a370-4caabc2f50d2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140321Z:08ba14e0-cc66-4b50-a370-4caabc2f50d2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "35c7bd07-249c-4319-9544-36de04ffc5b1_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598\",\"name\":\"namespace839795598\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace839795598\",\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:02:19.04Z\",\"serviceBusEndpoint\":\"https://namespace839795598.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T14:03:02.017Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:44 GMT", + "x-ms-correlation-request-id" : "e702b885-7001-4d2d-8ff2-2c82701aff57", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043945Z:e702b885-7001-4d2d-8ff2-2c82701aff57", + "Expires" : "-1", + "Content-Length" : "927", + "x-ms-request-id" : "91056647-43c3-4347-80ba-15de18807f43_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba\",\"name\":\"queue1_35093f29aba\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_35093f29aba\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"00:10:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":40,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:44.327Z\",\"updatedAt\":\"2020-09-02T04:39:44.44Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "006036db-556b-4df6-88e0-aeeb30abea44", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue2_465781e8ac4?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "692cb73a-01bf-4602-89ae-fcaf57c05bd9", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:24 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "932", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1186", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "cb84e9a7-1088-42d7-abdb-53589e556a03", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140324Z:cb84e9a7-1088-42d7-abdb-53589e556a03", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "bd817e34-2216-4518-9c3f-79f6839c8d24_M14CH3_M14CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff\",\"name\":\"queue1_589093323fff\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_589093323fff\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"00:10:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":40,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:03:23.86Z\",\"updatedAt\":\"2019-10-17T14:03:23.927Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:46 GMT", + "x-ms-correlation-request-id" : "c7cd8974-5dc0-4cea-9efe-670e7860809a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043947Z:c7cd8974-5dc0-4cea-9efe-670e7860809a", + "Expires" : "-1", + "Content-Length" : "928", + "x-ms-request-id" : "d8686811-2381-452a-9b1d-4bd28bd9494a_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue2_465781e8ac4\",\"name\":\"queue2_465781e8ac4\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_465781e8ac4\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:46.897Z\",\"updatedAt\":\"2020-09-02T04:39:46.93Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"00:10:00\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "692cb73a-01bf-4602-89ae-fcaf57c05bd9", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue2_b1354583b13e?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue2_465781e8ac4?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a40d45d-6fd1-40b5-9523-2cab4f9c780f", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:27 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "934", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1185", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8072ff3c-a7f1-4e83-bc95-198604bf20e0", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140327Z:8072ff3c-a7f1-4e83-bc95-198604bf20e0", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "726a3a0f-1ce0-4764-89e4-f95dd4f88f69_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue2_b1354583b13e\",\"name\":\"queue2_b1354583b13e\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_b1354583b13e\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T14:03:26.877Z\",\"updatedAt\":\"2019-10-17T14:03:26.937Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"00:10:00\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:48 GMT", + "x-ms-correlation-request-id" : "cbf1c09f-3f5f-4a0a-a9e4-9b669c88d1a0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043948Z:cbf1c09f-3f5f-4a0a-a9e4-9b669c88d1a0", + "Expires" : "-1", + "Content-Length" : "818", + "x-ms-request-id" : "caa375ba-6b94-40c0-9ce3-65405b814d13_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue2_465781e8ac4\",\"name\":\"queue2_465781e8ac4\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_465781e8ac4\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"00:05:00\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "8a40d45d-6fd1-40b5-9523-2cab4f9c780f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue2_b1354583b13e?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad56b64b-c1f3-4393-be47-4885dade9b16", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:29 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "736", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1184", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e9c567d1-066b-4ead-8ab5-faf3a0f30465", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140329Z:e9c567d1-066b-4ead-8ab5-faf3a0f30465", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "d9883c5e-a3c1-4712-8b45-310f1de2b798_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue2_b1354583b13e\",\"name\":\"queue2_b1354583b13e\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_b1354583b13e\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":true,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"supportOrdering\":true,\"autoDeleteOnIdle\":\"00:05:00\",\"enablePartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:50 GMT", + "x-ms-correlation-request-id" : "2cf96afa-a403-4720-9e23-b827d2e30489", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043950Z:2cf96afa-a403-4720-9e23-b827d2e30489", + "Expires" : "-1", + "Content-Length" : "818", + "x-ms-request-id" : "6694550d-440a-4a83-b24b-c7708ba800e1_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba\",\"name\":\"queue1_35093f29aba\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_35093f29aba\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"00:10:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":40,\"enableBatchedOperations\":true,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "ad56b64b-c1f3-4393-be47-4885dade9b16", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba/authorizationRules/SendRule?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "44c864e7-04a2-4441-a846-8295b01973b1", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:30 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "736", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1183", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "138be125-6e78-4d20-a68d-aa0b7a3e10a9", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140330Z:138be125-6e78-4d20-a68d-aa0b7a3e10a9", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "684d0be1-97e0-4492-b119-d1cd067d538c_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff\",\"name\":\"queue1_589093323fff\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_589093323fff\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"00:10:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":40,\"enableBatchedOperations\":true,\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:55 GMT", + "x-ms-correlation-request-id" : "5520db3f-44b1-4eaa-b633-608375a12f2c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043955Z:5520db3f-44b1-4eaa-b633-608375a12f2c", + "Expires" : "-1", + "Content-Length" : "341", + "x-ms-request-id" : "7fddd85c-ecde-4949-afad-9317e3d3daa5_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba/authorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}", + "x-ms-client-request-id" : "44c864e7-04a2-4441-a846-8295b01973b1", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff/authorizationRules/SendRule?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8da39c4-ed83-42cf-8f08-468f916d9ce3", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:36 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "344", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1182", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3e7f1250-1f63-47b0-b6a7-91b2837e6acf", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140336Z:3e7f1250-1f63-47b0-b6a7-91b2837e6acf", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "9d0a3d4a-1d0a-4426-8084-213de804428c_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff/authorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:55 GMT", + "x-ms-correlation-request-id" : "6dcdc795-0952-414d-9a11-2b89b963b3ca", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043956Z:6dcdc795-0952-414d-9a11-2b89b963b3ca", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "f896a9fc-e432-43f4-a405-ad6176544694_M7SN1_M7SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "e8da39c4-ed83-42cf-8f08-468f916d9ce3", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/AuthorizationRules?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fc21133-022e-46b7-a8d3-3f431b760d0f", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:37 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "403", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11972", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "314de482-c229-47b6-9738-8f7623055452", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140337Z:314de482-c229-47b6-9738-8f7623055452", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "d809433f-2fc6-4511-8b6e-95f8ef0950dd_M5CH3_M5CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:39:56 GMT", + "x-ms-correlation-request-id" : "2523c7c4-4199-4086-b864-582f7d5ccf35", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043957Z:2523c7c4-4199-4086-b864-582f7d5ccf35", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "3e2b67f8-dde5-4585-931c-74fccb0b1662_M11CH3_M11CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "6fc21133-022e-46b7-a8d3-3f431b760d0f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab28829c-54e6-46ae-acbb-9f76b2d5c76a", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:38 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "547", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4dd6b0e6-a85b-4a18-8e4d-728cdfc9756b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140338Z:4dd6b0e6-a85b-4a18-8e4d-728cdfc9756b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "c81e69e3-ddb0-43c5-bd95-3e16f03a035e_M5CH3_M5CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace839795598.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace839795598.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" - } + "Date" : "Wed, 02 Sep 2020 04:39:57 GMT", + "x-ms-correlation-request-id" : "6dd9a25a-e2cc-4be5-8a60-f3150ded71d2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043958Z:6dd9a25a-e2cc-4be5-8a60-f3150ded71d2", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "6e84eff5-1dd2-46bc-ad72-6d3abe05a815_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "ab28829c-54e6-46ae-acbb-9f76b2d5c76a", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff?api-version=2015-08-01", + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb6cebf0-cb4b-4d57-a0fc-c49fff839c00", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:39 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "736", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1181", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "04e8a289-7567-4997-95fd-d98f0ff8282c", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140339Z:04e8a289-7567-4997-95fd-d98f0ff8282c", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "f02f545b-cc13-4fe1-819b-e37d51dc10ec_M5CH3_M5CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff\",\"name\":\"queue1_589093323fff\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_589093323fff\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"00:10:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":40,\"enableBatchedOperations\":true,\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:58 GMT", + "x-ms-correlation-request-id" : "47f839db-fd05-45e2-93ed-2070784b585d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043958Z:47f839db-fd05-45e2-93ed-2070784b585d", + "Expires" : "-1", + "Content-Length" : "545", + "x-ms-request-id" : "c31bbf03-2ce5-4c3f-a591-44935e3fbab5_M7SN1_M7SN1", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace34974365.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace34974365.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}", + "x-ms-client-request-id" : "fb6cebf0-cb4b-4d57-a0fc-c49fff839c00", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff/authorizationRules/SendRule?api-version=2015-08-01", + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e875e7e-25ad-49d4-a281-8afcd6771320", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:40 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14994", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a7fcbefd-8e7f-4417-9ec9-ab4caf9ef37a", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140340Z:a7fcbefd-8e7f-4417-9ec9-ab4caf9ef37a", - "cache-control" : "no-cache", - "x-ms-request-id" : "4f55108b-8a72-4767-bc94-48d3f618793d_M5CH3_M5CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:39:59 GMT", + "x-ms-correlation-request-id" : "6afcaf67-8518-43ee-ad09-addadad7e3a2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043959Z:6afcaf67-8518-43ee-ad09-addadad7e3a2", + "Expires" : "-1", + "Content-Length" : "818", + "x-ms-request-id" : "ac576e6d-5482-4d63-a120-ff0ff8a5c9da_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba\",\"name\":\"queue1_35093f29aba\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_35093f29aba\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":true,\"defaultMessageTimeToLive\":\"00:10:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":40,\"enableBatchedOperations\":true,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "3e875e7e-25ad-49d4-a281-8afcd6771320", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/queues/queue1_589093323fff?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba/authorizationRules/SendRule?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7e0220b-d70b-4e5b-a99f-0cbb51dab8a0", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:42 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14993", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "82692040-d634-4c66-a98c-a8befd9c4cef", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140343Z:82692040-d634-4c66-a98c-a8befd9c4cef", - "cache-control" : "no-cache", - "x-ms-request-id" : "82692040-d634-4c66-a98c-a8befd9c4cef", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:39:59 GMT", + "x-ms-correlation-request-id" : "f61bca94-85be-4469-8f85-4cf4ad34b89c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043959Z:f61bca94-85be-4469-8f85-4cf4ad34b89c", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "faf297e8-e522-4adf-a0d8-269c574d47a2_M7SN1_M7SN1", + "x-ms-client-request-id" : "a7e0220b-d70b-4e5b-a99f-0cbb51dab8a0" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/queues/queue1_35093f29aba?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f83b0824-4579-465d-b65c-0e899fc125d3", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:44 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14992", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7bfce95a-216c-4b0b-8b07-bcbad957bc1b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140344Z:7bfce95a-216c-4b0b-8b07-bcbad957bc1b", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/operationresults/namespace839795598?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "52c10dca-eb44-4b7c-9a57-cccc28e47e3f_M5CH3_M5CH3", - "Body" : "" - } + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:40:03 GMT", + "x-ms-correlation-request-id" : "8da0abfe-e616-4f14-86b5-a1b9f16c33eb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044004Z:8da0abfe-e616-4f14-86b5-a1b9f16c33eb", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "8da0abfe-e616-4f14-86b5-a1b9f16c33eb" + }, + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/operationresults/namespace839795598?api-version=2015-08-01", + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1da60b1-41bf-400c-9710-6554dba6fb20", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:03:44 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11971", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "117b63e0-e82b-470a-a3f1-d095951d0664", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140345Z:117b63e0-e82b-470a-a3f1-d095951d0664", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/operationresults/namespace839795598?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "372d944c-a627-438c-b4f3-91f2aa9ac7ee_M5CH3_M5CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:06 GMT", + "x-ms-correlation-request-id" : "216cbb13-7f7a-4db7-8c04-8ae114b0371c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044006Z:216cbb13-7f7a-4db7-8c04-8ae114b0371c", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "223cbdc5-0dd7-4428-8806-75820cd55ab3_M9CH3_M9CH3", + "x-ms-client-request-id" : "f1da60b1-41bf-400c-9710-6554dba6fb20", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/operationresults/namespace34974365?api-version=2015-08-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_ec93669789b8/providers/Microsoft.ServiceBus/namespaces/namespace839795598/operationresults/namespace839795598?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb04_11406ae7f91/providers/Microsoft.ServiceBus/namespaces/namespace34974365/operationresults/namespace34974365?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "07da1b8a-4dfc-4812-b9a5-7ae154198ed5" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:04:14 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11970", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "bdb48440-a5d8-4ed1-86a7-49c822637970", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140415Z:bdb48440-a5d8-4ed1-86a7-49c822637970", - "cache-control" : "no-cache", - "x-ms-request-id" : "16200037-e4db-4ea6-ab55-d7db8046e3f5_M7CH3_M7CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:36 GMT", + "x-ms-correlation-request-id" : "bc630110-a755-4768-b952-ae365accb833", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044036Z:bc630110-a755-4768-b952-ae365accb833", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "664cda4a-fe0a-4bc6-bec1-b67e74a69ad0_M10CH3_M10CH3", + "x-ms-client-request-id" : "07da1b8a-4dfc-4812-b9a5-7ae154198ed5" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb04_ec93669789b8?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb04_11406ae7f91?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b527ca1a-148a-473f-8402-13142cef15c9", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 14:04:19 GMT", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14991", - "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "6aa95b7c-71ce-43fc-a1c4-d12fa636457a", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T140420Z:6aa95b7c-71ce-43fc-a1c4-d12fa636457a", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDQ6NUZFQzkzNjY5Nzg5QjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "6aa95b7c-71ce-43fc-a1c4-d12fa636457a", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:39 GMT", + "x-ms-correlation-request-id" : "24be301a-cd83-4b0a-916d-c69a90ea1f85", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044040Z:24be301a-cd83-4b0a-916d-c69a90ea1f85", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "24be301a-cd83-4b0a-916d-c69a90ea1f85", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDQ6NUYxMTQwNkFFN0Y5MS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null } ], - "variables" : [ "rgsb04_ec93669789b8", "namespace839795598", "queue1_589093323fff", "queue2_b1354583b13e", "163c5ca2-279b-4941-85d5-a41f5ac9d3de", "0c6569b7-455b-4d09-95af-4adbd0d9e973", "34e3f236-7c51-461e-aac2-4855702c1f56", "fd07a33b-ecb8-41d5-8448-39dd40f7c1cb", "aa66dc42-c56a-4b26-b279-dc4cd23dddc0", "6f0dad9d-092b-4c67-8b20-ad2bab3504f4", "01be34ab-9b1b-49f8-9bde-2e50df8c1da8" ] + "variables" : [ "rgsb04_11406ae7f91", "namespace34974365", "queue1_35093f29aba", "queue2_465781e8ac4" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueBasic.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueBasic.json index a06c8d12e4bfd..33a8efca2d1e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueBasic.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusQueueBasic.json @@ -1,596 +1,683 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb01_a1d23841f524?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb01_67510650c85?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "da03b086-8e91-4f29-8d09-30a435b22000", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:50 GMT", - "content-length" : "319", - "expires" : "-1", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8964ef67-6ec7-4d88-beb2-dc17ad4cbbbc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135651Z:8964ef67-6ec7-4d88-beb2-dc17ad4cbbbc", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "8964ef67-6ec7-4d88-beb2-dc17ad4cbbbc", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524\",\"name\":\"rgsb01_a1d23841f524\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2019-10-17T13:56:46.735Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:38:35 GMT", + "x-ms-correlation-request-id" : "21605dca-9943-457d-b9aa-cf4fd9d6872d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043835Z:21605dca-9943-457d-b9aa-cf4fd9d6872d", + "Expires" : "-1", + "Content-Length" : "233", + "x-ms-request-id" : "21605dca-9943-457d-b9aa-cf4fd9d6872d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85\",\"name\":\"rgsb01_67510650c85\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "40ce72b6-4359-445e-8176-89f6c0e90067", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:54 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "488", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f009bafb-5365-4154-879d-273f7d63bac9", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135654Z:f009bafb-5365-4154-879d-273f7d63bac9", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "fc7c70d6-64fa-4bd0-8167-cc1265c75e19_M8CH3_M8CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f\",\"name\":\"namespace66415624f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace66415624f\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":1}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f?api-version=2015-08-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "Date" : "Wed, 02 Sep 2020 04:38:42 GMT", + "x-ms-correlation-request-id" : "ea442603-bc5a-4339-bd02-e52c30fe95a5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043842Z:ea442603-bc5a-4339-bd02-e52c30fe95a5", + "Expires" : "-1", + "Content-Length" : "484", + "x-ms-request-id" : "bfce44e6-09b7-4239-88d3-23ccf8f3f160_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b\",\"name\":\"namespace4814531b\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace4814531b\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":1}}", + "x-ms-client-request-id" : "40ce72b6-4359-445e-8176-89f6c0e90067", + "Content-Type" : "application/json; charset=utf-8" }, - "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:54 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "690", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11998", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f5573d70-97fc-409f-a60b-e08b1d34969b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135655Z:f5573d70-97fc-409f-a60b-e08b1d34969b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "2a9937a3-5bba-49e9-9d8b-0f481c3cd84c_M8CH3_M8CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f\",\"name\":\"namespace66415624f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace66415624f\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T13:56:53.44Z\",\"serviceBusEndpoint\":\"https://namespace66415624f.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:56:53.44Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}" - } + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "68e27a4f-22b5-4a51-a33c-0bdd3989b04c" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:57:25 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "690", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7351870a-7359-4eb2-80da-669b823f90b5", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135726Z:7351870a-7359-4eb2-80da-669b823f90b5", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "2c7ce6cd-4fd8-420e-8b1c-d3f90b029643_M10CH3_M10CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f\",\"name\":\"namespace66415624f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace66415624f\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T13:56:53.44Z\",\"serviceBusEndpoint\":\"https://namespace66415624f.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:56:53.44Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:12 GMT", + "x-ms-correlation-request-id" : "925ad254-362c-4f0d-947f-64222a290efc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043913Z:925ad254-362c-4f0d-947f-64222a290efc", + "Expires" : "-1", + "Content-Length" : "687", + "x-ms-request-id" : "abaabce8-f191-4ec7-923d-c55b6d6ab09d_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b\",\"name\":\"namespace4814531b\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace4814531b\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T04:38:41.527Z\",\"serviceBusEndpoint\":\"https://namespace4814531b.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:38:41.527Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}", + "x-ms-client-request-id" : "68e27a4f-22b5-4a51-a33c-0bdd3989b04c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fd58e45-5737-4e30-8697-870e475a7f16" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:57:56 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "692", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "59ce7957-1d70-446e-afdd-607101830e49", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135756Z:59ce7957-1d70-446e-afdd-607101830e49", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "7e624098-9957-4434-bdc4-2b5b68020a28_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f\",\"name\":\"namespace66415624f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace66415624f\",\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:56:53.44Z\",\"serviceBusEndpoint\":\"https://namespace66415624f.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:57:35.173Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:43 GMT", + "x-ms-correlation-request-id" : "843010bd-e7d0-4bd0-937c-5e599c8f392c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043943Z:843010bd-e7d0-4bd0-937c-5e599c8f392c", + "Expires" : "-1", + "Content-Length" : "687", + "x-ms-request-id" : "319dbeaf-c2ba-4d74-a854-9d2fa8284737_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b\",\"name\":\"namespace4814531b\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace4814531b\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:38:41.527Z\",\"serviceBusEndpoint\":\"https://namespace4814531b.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:39:23.76Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}", + "x-ms-client-request-id" : "7fd58e45-5737-4e30-8697-870e475a7f16", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue1_1a585399ba5f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue1_06109131785?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b41de38-f37f-4af8-a807-5ef9890474c2", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:57:58 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "938", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3666bf49-100a-4262-83b9-fbad643f1d69", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135759Z:3666bf49-100a-4262-83b9-fbad643f1d69", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "dc356db0-5553-41a1-9e69-fd1a4b0d97f9_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue1_1a585399ba5f\",\"name\":\"queue1_1a585399ba5f\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_1a585399ba5f\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:57:58.337Z\",\"updatedAt\":\"2019-10-17T13:57:58.403Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:45 GMT", + "x-ms-correlation-request-id" : "0efebc42-7277-4953-bb51-6ddc4842540a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043945Z:0efebc42-7277-4953-bb51-6ddc4842540a", + "Expires" : "-1", + "Content-Length" : "933", + "x-ms-request-id" : "c60a3ceb-ac3b-413f-bd76-b5cf8c8f87f4_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue1_06109131785\",\"name\":\"queue1_06109131785\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_06109131785\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.087Z\",\"updatedAt\":\"2020-09-02T04:39:45.163Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "3b41de38-f37f-4af8-a807-5ef9890474c2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue1_1a585399ba5f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue1_06109131785?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "24fd8301-89fa-4bac-81c5-535c0edefe54", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:57:59 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1127", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2fbc94ea-ed7d-462f-a49d-d5059c98615d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135759Z:2fbc94ea-ed7d-462f-a49d-d5059c98615d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "99792607-27f3-43d4-9916-b59551165398_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue1_1a585399ba5f\",\"name\":\"queue1_1a585399ba5f\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_1a585399ba5f\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:57:58.337Z\",\"updatedAt\":\"2019-10-17T13:57:58.403Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:46 GMT", + "x-ms-correlation-request-id" : "fd2f2add-f75c-4e5f-9d39-ba8a00eab9f1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043946Z:fd2f2add-f75c-4e5f-9d39-ba8a00eab9f1", + "Expires" : "-1", + "Content-Length" : "1122", + "x-ms-request-id" : "878c7fc3-02f2-45b3-af0e-64aba040a355_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue1_06109131785\",\"name\":\"queue1_06109131785\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_06109131785\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.087Z\",\"updatedAt\":\"2020-09-02T04:39:45.163Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "24fd8301-89fa-4bac-81c5-535c0edefe54", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue2_640616784998?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue2_1074519cd47?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2b9bd890-8566-4846-b1c8-530abc39dc30", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:01 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "936", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "cdeda29e-9b5c-498c-88b3-016c7da6b1a2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135801Z:cdeda29e-9b5c-498c-88b3-016c7da6b1a2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "c19ead2b-757e-4bfa-8a8d-aa5b2e134bdf_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue2_640616784998\",\"name\":\"queue2_640616784998\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_640616784998\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:58:01.163Z\",\"updatedAt\":\"2019-10-17T13:58:01.22Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:48 GMT", + "x-ms-correlation-request-id" : "efa60e3f-e663-4377-8d71-6b178bbc6fe6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043948Z:efa60e3f-e663-4377-8d71-6b178bbc6fe6", + "Expires" : "-1", + "Content-Length" : "931", + "x-ms-request-id" : "7e35f4b8-6794-4208-86c3-50afbeffcbcd_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue2_1074519cd47\",\"name\":\"queue2_1074519cd47\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_1074519cd47\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.15Z\",\"updatedAt\":\"2020-09-02T04:39:48.197Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "2b9bd890-8566-4846-b1c8-530abc39dc30", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue2_640616784998?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue2_1074519cd47?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4788f7d5-d5e0-4597-9392-b30443899aab", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:01 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1125", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8d8a8ba1-1d92-4f71-835f-1fa7be9595b9", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135802Z:8d8a8ba1-1d92-4f71-835f-1fa7be9595b9", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "57457070-d4b3-45c8-8e85-0aebfab0334e_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue2_640616784998\",\"name\":\"queue2_640616784998\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_640616784998\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:58:01.163Z\",\"updatedAt\":\"2019-10-17T13:58:01.22Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:48 GMT", + "x-ms-correlation-request-id" : "6ed9dc45-472c-4155-bd0b-c833001605d6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043949Z:6ed9dc45-472c-4155-bd0b-c833001605d6", + "Expires" : "-1", + "Content-Length" : "1120", + "x-ms-request-id" : "861d3c94-7005-4afb-b1d0-a88714148fd0_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue2_1074519cd47\",\"name\":\"queue2_1074519cd47\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_1074519cd47\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":2048,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.15Z\",\"updatedAt\":\"2020-09-02T04:39:48.197Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "4788f7d5-d5e0-4597-9392-b30443899aab", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue2_640616784998?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue2_1074519cd47?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "684b89f4-92a9-46bb-84bc-a05742300950", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:03 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "739", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "261beaa9-8ea6-4f54-9f55-e030d63f65b8", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135803Z:261beaa9-8ea6-4f54-9f55-e030d63f65b8", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "a7da1365-f1a1-4b11-9662-a45ec4b9e991_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue2_640616784998\",\"name\":\"queue2_640616784998\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_640616784998\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:51 GMT", + "x-ms-correlation-request-id" : "2a74aee3-c030-4417-b086-cb9420314110", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043951Z:2a74aee3-c030-4417-b086-cb9420314110", + "Expires" : "-1", + "Content-Length" : "821", + "x-ms-request-id" : "386bc581-3b88-4fa6-8811-eeb24a147439_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue2_1074519cd47\",\"name\":\"queue2_1074519cd47\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_1074519cd47\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "684b89f4-92a9-46bb-84bc-a05742300950", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "631a8b4b-ee6e-41c8-be26-4cba099420dc", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:20 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "494", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9ea321f2-fb45-48cf-9a3c-82f4801cab5e", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135821Z:9ea321f2-fb45-48cf-9a3c-82f4801cab5e", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "02a18a73-0439-4686-825d-568d3eac77ec_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f\",\"name\":\"namespace66415624f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace66415624f\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:40:02 GMT", + "x-ms-correlation-request-id" : "623f7040-2c05-461c-8ce1-6ea52489d456", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044003Z:623f7040-2c05-461c-8ce1-6ea52489d456", + "Expires" : "-1", + "Content-Length" : "489", + "x-ms-request-id" : "46d66b42-e17a-4b7b-83f6-06521ffcd191_M4CH3_M4CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b\",\"name\":\"namespace4814531b\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace4814531b\",\"enabled\":true,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "631a8b4b-ee6e-41c8-be26-4cba099420dc", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "db487bef-7355-445d-9263-d9158bd50967" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:21 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "698", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5348e28d-1f80-4947-8c38-14a64d97c42d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135821Z:5348e28d-1f80-4947-8c38-14a64d97c42d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "bce54797-803b-4033-9da8-4cb998bb4fbf_M3CH3_M3CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f\",\"name\":\"namespace66415624f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace66415624f\",\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:56:53.44Z\",\"serviceBusEndpoint\":\"https://namespace66415624f.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:58:20.133Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:40:34 GMT", + "x-ms-correlation-request-id" : "f7dbf1cb-b8e1-44b4-9032-d0096407a752", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044034Z:f7dbf1cb-b8e1-44b4-9032-d0096407a752", + "Expires" : "-1", + "Content-Length" : "694", + "x-ms-request-id" : "699a47e4-0592-485a-bcc5-e4cbd9ff7519_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b\",\"name\":\"namespace4814531b\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace4814531b\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:38:41.527Z\",\"serviceBusEndpoint\":\"https://namespace4814531b.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:39:59.647Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "db487bef-7355-445d-9263-d9158bd50967", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e2ee7aaf-f96a-43a8-ba26-815532af185e", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:21 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "726", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c519d147-9c77-4605-b319-3f13a6f41948", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135821Z:c519d147-9c77-4605-b319-3f13a6f41948", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "50d2fb5e-b796-47a1-a604-2d760bdff078_M12CH3_M12CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f\",\"name\":\"namespace66415624f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace66415624f\",\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:56:53.44Z\",\"serviceBusEndpoint\":\"https://namespace66415624f.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:58:20.133Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:40:34 GMT", + "x-ms-correlation-request-id" : "7f460474-d6d1-4fcd-95ce-6e4746de69f4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044034Z:7f460474-d6d1-4fcd-95ce-6e4746de69f4", + "Expires" : "-1", + "Content-Length" : "722", + "x-ms-request-id" : "adbadee1-10ba-404c-8e0b-039d101aee44_M7CH3_M7CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b\",\"name\":\"namespace4814531b\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace4814531b\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:38:41.527Z\",\"serviceBusEndpoint\":\"https://namespace4814531b.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:39:59.647Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}],\"nextLink\":null}", + "x-ms-client-request-id" : "e2ee7aaf-f96a-43a8-ba26-815532af185e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0014052-fa64-4b40-9ed8-0ab0433fc580", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:22 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "2287", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "93cdcab0-dc08-4b39-bb82-4c319bbd4161", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135822Z:93cdcab0-dc08-4b39-bb82-4c319bbd4161", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "deb2f700-6910-4d7b-9a7f-73247b85326d_M12CH3_M12CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue1_1a585399ba5f\",\"name\":\"queue1_1a585399ba5f\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_1a585399ba5f\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:57:58.3548555Z\",\"updatedAt\":\"2019-10-17T13:57:58.3548555Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue2_640616784998\",\"name\":\"queue2_640616784998\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_640616784998\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:58:01.163Z\",\"updatedAt\":\"2019-10-17T13:58:03.07Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Unknown\",\"enableExpress\":false}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:40:35 GMT", + "x-ms-correlation-request-id" : "056b5301-983f-41f2-9f02-b83dec817a4a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044036Z:056b5301-983f-41f2-9f02-b83dec817a4a", + "Expires" : "-1", + "Content-Length" : "2288", + "x-ms-request-id" : "405a2a20-e2b1-407a-9ac2-ad72322a2119_M1SN1_M1SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue1_06109131785\",\"name\":\"queue1_06109131785\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_06109131785\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.0987129Z\",\"updatedAt\":\"2020-09-02T04:39:45.0987129Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue2_1074519cd47\",\"name\":\"queue2_1074519cd47\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_1074519cd47\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.1524995Z\",\"updatedAt\":\"2020-09-02T04:39:51.4182048Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "c0014052-fa64-4b40-9ed8-0ab0433fc580", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/AuthorizationRules?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8a0ecee-4750-4a31-bff3-bca65afdbdc2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:40:36 GMT", + "x-ms-correlation-request-id" : "aadc0906-e83f-4f3d-b1d0-495afa42fa81", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044037Z:aadc0906-e83f-4f3d-b1d0-495afa42fa81", + "Expires" : "-1", + "Content-Length" : "2288", + "x-ms-request-id" : "4880604a-0653-421d-813b-b86df86ff81a_M6CH3_M6CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue1_06109131785\",\"name\":\"queue1_06109131785\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_06109131785\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.0987129Z\",\"updatedAt\":\"2020-09-02T04:39:45.0987129Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue2_1074519cd47\",\"name\":\"queue2_1074519cd47\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue2_1074519cd47\",\"lockDuration\":\"00:00:20\",\"maxSizeInMegabytes\":3072,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"14.00:00:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:48.1524995Z\",\"updatedAt\":\"2020-09-02T04:39:51.4182048Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "c8a0ecee-4750-4a31-bff3-bca65afdbdc2", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ce17a91-604b-4780-ba35-5e060198543b", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:22 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "403", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "129690cd-0d14-4d42-99b8-57cf5cd6299b", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135823Z:129690cd-0d14-4d42-99b8-57cf5cd6299b", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "4f58b136-c09e-4a31-bd1b-b13082c4f025_M3CH3_M3CH3", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}" - } + "Date" : "Wed, 02 Sep 2020 04:40:37 GMT", + "x-ms-correlation-request-id" : "2bf5243b-6d43-44ad-9ec4-bf136d5b65a7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044037Z:2bf5243b-6d43-44ad-9ec4-bf136d5b65a7", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "d22e69dd-8a32-454a-bc06-14fbaaf53d9a_M6CH3_M6CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "4ce17a91-604b-4780-ba35-5e060198543b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc04023a-39a2-4a51-98a9-73a1a202f3c1", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:40:40 GMT", + "x-ms-correlation-request-id" : "a11c9cad-8ecd-43cf-b857-7254ce4529ea", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044040Z:a11c9cad-8ecd-43cf-b857-7254ce4529ea", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "e98b22cf-904d-40c7-9e17-f5f88f98a814_M8CH3_M8CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "fc04023a-39a2-4a51-98a9-73a1a202f3c1", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "759b7c53-2e8b-4488-afd7-5b0ddf86e1cd", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:23 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "547", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7e63464b-de9b-4802-a4b9-d222e4a5eccc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135824Z:7e63464b-de9b-4802-a4b9-d222e4a5eccc", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "662d7b71-9a51-4edf-b884-e72023c3a0bb_M3CH3_M3CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" - } + "Date" : "Wed, 02 Sep 2020 04:40:40 GMT", + "x-ms-correlation-request-id" : "bddd0f1c-c496-4f86-911e-b1dc0705c47c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044041Z:bddd0f1c-c496-4f86-911e-b1dc0705c47c", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "f18e3b5e-5a69-4b26-be1b-cc8e01c5cf6f_M1SN1_M1SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "759b7c53-2e8b-4488-afd7-5b0ddf86e1cd", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/AuthorizationRules/RootManageSharedAccessKey/regenerateKeys?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules/RootManageSharedAccessKey/listKeys?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "68933bfc-27bf-4bc4-b691-dcf462d3024c", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:39 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "547", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a42db7d9-4e25-4082-a908-d997b9c95fac", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135840Z:a42db7d9-4e25-4082-a908-d997b9c95fac", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "047de933-15c4-461c-88df-0aaa43eb2e55_M3CH3_M3CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace66415624f.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}" - } + "Date" : "Wed, 02 Sep 2020 04:40:41 GMT", + "x-ms-correlation-request-id" : "d50d46b1-cb9d-4da3-8c0f-54fe02a32161", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044042Z:d50d46b1-cb9d-4da3-8c0f-54fe02a32161", + "Expires" : "-1", + "Content-Length" : "545", + "x-ms-request-id" : "33e93af8-47c4-4702-92bb-1e636e209ecd_M10CH3_M10CH3", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace4814531b.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace4814531b.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}", + "x-ms-client-request-id" : "68933bfc-27bf-4bc4-b691-dcf462d3024c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { - "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/queues/queue1_1a585399ba5f?api-version=2015-08-01", + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bfd08a32-58d9-4fd1-bfe4-56d786cc1d9b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:40:44 GMT", + "x-ms-correlation-request-id" : "a1d49f52-1072-47c5-b0d8-2cbb1b133720", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044044Z:a1d49f52-1072-47c5-b0d8-2cbb1b133720", + "Expires" : "-1", + "Content-Length" : "401", + "x-ms-request-id" : "20878d0d-77fe-4b0f-94e1-d1f16454b664_M4CH3_M4CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "bfd08a32-58d9-4fd1-bfe4-56d786cc1d9b", "Content-Type" : "application/json; charset=utf-8" }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/AuthorizationRules/RootManageSharedAccessKey/regenerateKeys?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "30ba19b2-8c77-46df-b532-3eae928ee831", + "Content-Type" : "application/json" + }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:41 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2975ee9c-f447-4748-b467-fd07f5a52a02", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135842Z:2975ee9c-f447-4748-b467-fd07f5a52a02", - "cache-control" : "no-cache", - "x-ms-request-id" : "2975ee9c-f447-4748-b467-fd07f5a52a02", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:51 GMT", + "x-ms-correlation-request-id" : "70a0865f-2825-4bf2-8892-ea77c04e5153", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044051Z:70a0865f-2825-4bf2-8892-ea77c04e5153", + "Expires" : "-1", + "Content-Length" : "545", + "x-ms-request-id" : "12bbb51e-1c22-42ed-a845-325cc03fee25_M5CH3_M5CH3", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace4814531b.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace4814531b.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"RootManageSharedAccessKey\"}", + "x-ms-client-request-id" : "30ba19b2-8c77-46df-b532-3eae928ee831", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/queues/queue1_06109131785?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "77046243-3bb5-4d31-85c2-25f107ec2f02", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:42 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d99452c0-7526-40d7-9f19-1cb8416464ac", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135843Z:d99452c0-7526-40d7-9f19-1cb8416464ac", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/operationresults/namespace66415624f?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "4bc68486-6d81-4de0-9340-8ee6959e4ee5_M3CH3_M3CH3", - "Body" : "" - } + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 04:40:56 GMT", + "x-ms-correlation-request-id" : "2db76f47-3333-481f-9284-e4ee930a0619", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044056Z:2db76f47-3333-481f-9284-e4ee930a0619", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "2db76f47-3333-481f-9284-e4ee930a0619" + }, + "Exception" : null }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/operationresults/namespace66415624f?api-version=2015-08-01", + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7d227aab-02de-402f-8960-a1a47cb2eb72", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:58:43 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "x-ms-ratelimit-remaining-subscription-deletes" : "14996", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "756ffa20-1ea6-47d3-ac55-98e323543b16", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135844Z:756ffa20-1ea6-47d3-ac55-98e323543b16", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/operationresults/namespace66415624f?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "037803d3-43af-4912-a1fc-df4354f8c59c_M3CH3_M3CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:56 GMT", + "x-ms-correlation-request-id" : "fa96d7eb-bae0-4401-b6ed-c7bce89a8ea5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044057Z:fa96d7eb-bae0-4401-b6ed-c7bce89a8ea5", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "41670911-d5e7-497f-8987-578a3465a576_M0CH3_M0CH3", + "x-ms-client-request-id" : "7d227aab-02de-402f-8960-a1a47cb2eb72", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/operationresults/namespace4814531b?api-version=2015-08-01" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_a1d23841f524/providers/Microsoft.ServiceBus/namespaces/namespace66415624f/operationresults/namespace66415624f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb01_67510650c85/providers/Microsoft.ServiceBus/namespaces/namespace4814531b/operationresults/namespace4814531b?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b79c8c54-f3b0-45f9-9fce-68223a167eb0" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:59:14 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ee53b825-0d18-44f0-b295-1a4a1f03b8c0", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135914Z:ee53b825-0d18-44f0-b295-1a4a1f03b8c0", - "cache-control" : "no-cache", - "x-ms-request-id" : "f9e1e869-98e9-46ef-8d99-ab0832213cb0_M12CH3_M12CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:41:26 GMT", + "x-ms-correlation-request-id" : "25e28fc1-6540-4fd5-a100-2da83f652b20", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044127Z:25e28fc1-6540-4fd5-a100-2da83f652b20", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "ed8ae275-380a-4338-8651-dd5e012f71d6_M7SN1_M7SN1", + "x-ms-client-request-id" : "b79c8c54-f3b0-45f9-9fce-68223a167eb0" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb01_a1d23841f524?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb01_67510650c85?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6c3d5ba-c230-4c22-8f34-5e67cdfead7c", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:59:19 GMT", - "content-length" : "0", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14997", - "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-deletes" : "14996", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "bc792179-feb5-46e5-9144-76a21759a5ef", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135919Z:bc792179-feb5-46e5-9144-76a21759a5ef", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDE6NUZBMUQyMzg0MUY1MjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "bc792179-feb5-46e5-9144-76a21759a5ef", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:41:30 GMT", + "x-ms-correlation-request-id" : "4437c58e-b4e0-4710-918e-0d1e8e960ccd", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044131Z:4437c58e-b4e0-4710-918e-0d1e8e960ccd", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "4437c58e-b4e0-4710-918e-0d1e8e960ccd", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDE6NUY2NzUxMDY1MEM4NS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null } ], - "variables" : [ "rgsb01_a1d23841f524", "namespace66415624f", "queue1_1a585399ba5f", "queue2_640616784998", "897fbdb0-3819-4da4-b0ec-a7ebc0fecd33", "4144a200-99a0-4191-b73e-f4c99f0ffe5c", "6321ed1c-8275-43b0-baea-d9c496da0840", "18364aad-8eac-4630-92b5-c91500def79d", "44ac9bde-63d8-43e0-b677-9ad1fa494b84", "1d41faf6-6da4-44c7-ab01-96528dcd067b", "d71a86ee-ba1e-4c29-9319-6e54e4b368b5", "d971bdce-5be1-4d2f-93e0-aa0cac7dc0d2", "9517dc8f-4e7e-4292-8f4d-f897e1ead914", "f15133a5-1b6c-4ed5-9163-6f162f7c48db", "deaa7691-1b11-4cd6-bdee-da9e6d2ed8df" ] + "variables" : [ "rgsb01_67510650c85", "namespace4814531b", "queue1_06109131785", "queue2_1074519cd47" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusWithClaimBasedAuthorization.json b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusWithClaimBasedAuthorization.json index 8ee5ccb4a229e..b8fa5d74cade2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusWithClaimBasedAuthorization.json +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/session-records/testServiceBusWithClaimBasedAuthorization.json @@ -1,516 +1,484 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb03_374554545bc6?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb03_40339224cf4?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "98c31f02-5ba7-4a63-ab98-5229ab0bae7e", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:54:29 GMT", - "content-length" : "319", - "expires" : "-1", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "201", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "86db3715-58de-4629-8a57-f09bb01fe9fe", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135430Z:86db3715-58de-4629-8a57-f09bb01fe9fe", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "86db3715-58de-4629-8a57-f09bb01fe9fe", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6\",\"name\":\"rgsb03_374554545bc6\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2019-10-17T13:54:25.697Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:38:34 GMT", + "x-ms-correlation-request-id" : "058807d5-3031-45ca-9b40-39ee08ea1dce", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043834Z:058807d5-3031-45ca-9b40-39ee08ea1dce", + "Expires" : "-1", + "Content-Length" : "233", + "x-ms-request-id" : "058807d5-3031-45ca-9b40-39ee08ea1dce", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4\",\"name\":\"rgsb03_40339224cf4\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0574c697-9a82-458d-b9a0-8b295ef030a7", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:54:33 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "494", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "6da5a8ad-b664-4248-bbff-ba0fe6afe9c8", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135434Z:6da5a8ad-b664-4248-bbff-ba0fe6afe9c8", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "fda6d4a2-1769-40c8-94ab-23cc4c6395dc_M7CH3_M7CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f\",\"name\":\"namespace82e20752f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace82e20752f\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f?api-version=2015-08-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "Date" : "Wed, 02 Sep 2020 04:38:41 GMT", + "x-ms-correlation-request-id" : "481c27dd-b1dd-4161-806c-2428cb9c6a71", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043842Z:481c27dd-b1dd-4161-806c-2428cb9c6a71", + "Expires" : "-1", + "Content-Length" : "490", + "x-ms-request-id" : "f2c9c529-62a0-4cb5-b51f-9add6c369ece_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2\",\"name\":\"namespace661648a2\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace661648a2\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "0574c697-9a82-458d-b9a0-8b295ef030a7", + "Content-Type" : "application/json; charset=utf-8" }, - "Response" : { - "date" : "Thu, 17 Oct 2019 13:54:33 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "696", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11969", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a1935be8-e825-41b7-9e4d-3c6c0faceb50", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135434Z:a1935be8-e825-41b7-9e4d-3c6c0faceb50", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "6dc47dfa-7f27-4d92-819d-cac854a7ae21_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f\",\"name\":\"namespace82e20752f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace82e20752f\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T13:54:32.99Z\",\"serviceBusEndpoint\":\"https://namespace82e20752f.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:54:32.99Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "89431533-a4ba-4b9c-8816-e0ec7310264e" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:04 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "696", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11968", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7a1433fc-d52d-453f-91a0-b14e9331c3c6", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135504Z:7a1433fc-d52d-453f-91a0-b14e9331c3c6", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "a0fbaba6-9184-4877-8772-53909f80ac6a_M7CH3_M7CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f\",\"name\":\"namespace82e20752f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace82e20752f\",\"status\":\"Created\",\"createdAt\":\"2019-10-17T13:54:32.99Z\",\"serviceBusEndpoint\":\"https://namespace82e20752f.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:54:32.99Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:12 GMT", + "x-ms-correlation-request-id" : "62089634-6cdc-46c0-9dc5-f782348530cb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043912Z:62089634-6cdc-46c0-9dc5-f782348530cb", + "Expires" : "-1", + "Content-Length" : "693", + "x-ms-request-id" : "177d149a-9670-4c59-8e13-87ecf9e2e4fe_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2\",\"name\":\"namespace661648a2\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace661648a2\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T04:38:41.073Z\",\"serviceBusEndpoint\":\"https://namespace661648a2.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:38:41.073Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "89431533-a4ba-4b9c-8816-e0ec7310264e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "07cc1bf5-02ca-4010-8582-eb1099a0b1fa" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:34 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "698", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11967", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e0988499-2e3b-49d2-8d30-c72b4f56ce1f", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135535Z:e0988499-2e3b-49d2-8d30-c72b4f56ce1f", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "06eeb624-e954-4070-80f3-d76c62ea9f99_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f\",\"name\":\"namespace82e20752f\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace82e20752f\",\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:54:32.99Z\",\"serviceBusEndpoint\":\"https://namespace82e20752f.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2019-10-17T13:55:16.563Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:42 GMT", + "x-ms-correlation-request-id" : "78eba333-b54a-4e0d-9130-a345abaa1c9e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043943Z:78eba333-b54a-4e0d-9130-a345abaa1c9e", + "Expires" : "-1", + "Content-Length" : "694", + "x-ms-request-id" : "58320ae3-1663-40b0-8d5b-01d0542d5492_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2\",\"name\":\"namespace661648a2\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"West US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:namespace661648a2\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:38:41.073Z\",\"serviceBusEndpoint\":\"https://namespace661648a2.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T04:39:26.047Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "07cc1bf5-02ca-4010-8582-eb1099a0b1fa", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/queues/queue1_ba5578792032?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "eeef88d2-f4df-4cd6-b778-11e6888cf412", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:36 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "952", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a2a2be8d-7df4-449c-92e4-ff14b115cd54", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135537Z:a2a2be8d-7df4-449c-92e4-ff14b115cd54", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "2ce7a723-9543-48f1-b6c5-8474d1643ae6_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/queues/queue1_ba5578792032\",\"name\":\"queue1_ba5578792032\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_ba5578792032\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:55:36.687Z\",\"updatedAt\":\"2019-10-17T13:55:36.747Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:44 GMT", + "x-ms-correlation-request-id" : "d73d8a5c-3233-4d19-88f9-9a48fc0c44f3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043945Z:d73d8a5c-3233-4d19-88f9-9a48fc0c44f3", + "Expires" : "-1", + "Content-Length" : "894", + "x-ms-request-id" : "d67a61e2-0395-42e6-8180-21d6d4b4716e_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314\",\"name\":\"topic_55042951314\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_55042951314\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:44.797Z\",\"updatedAt\":\"2020-09-02T04:39:44.837Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "eeef88d2-f4df-4cd6-b778-11e6888cf412", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/queues/queue1_875170adf08?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd6fcb0a-b6c7-43b9-a011-e8c8cf0bd963", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:39 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "918", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f64f8149-b176-46a7-b7b6-384144f8abc0", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135540Z:f64f8149-b176-46a7-b7b6-384144f8abc0", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "198bfe65-be4d-4b85-b43b-9e85953d99f5_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d\",\"name\":\"topic_6ab154111966d\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_6ab154111966d\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:55:39.78Z\",\"updatedAt\":\"2019-10-17T13:55:39.81Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"isExpress\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:45 GMT", + "x-ms-correlation-request-id" : "3a407491-98c3-4692-80f5-4afce3a63405", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043945Z:3a407491-98c3-4692-80f5-4afce3a63405", + "Expires" : "-1", + "Content-Length" : "946", + "x-ms-request-id" : "7f97013d-2b4e-4880-b5d7-f89d9c6d7427_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/queues/queue1_875170adf08\",\"name\":\"queue1_875170adf08\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_875170adf08\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.027Z\",\"updatedAt\":\"2020-09-02T04:39:45.08Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "fd6fcb0a-b6c7-43b9-a011-e8c8cf0bd963", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/queues/queue1_ba5578792032?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/queues/queue1_875170adf08?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8478c2c2-b8c6-408a-a7e3-499233ecd8e7", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:40 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1141", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11966", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fb8d59ac-8d9d-44df-89d0-b98cc094a6e3", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135540Z:fb8d59ac-8d9d-44df-89d0-b98cc094a6e3", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "8f73dc94-c3dd-4ce6-92a2-f0d415be53a9_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/queues/queue1_ba5578792032\",\"name\":\"queue1_ba5578792032\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_ba5578792032\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:55:36.687Z\",\"updatedAt\":\"2019-10-17T13:55:36.747Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:45 GMT", + "x-ms-correlation-request-id" : "67a4ef1b-3c02-42b3-8e01-3e0d20698dea", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043946Z:67a4ef1b-3c02-42b3-8e01-3e0d20698dea", + "Expires" : "-1", + "Content-Length" : "1135", + "x-ms-request-id" : "ecc23e74-d28a-4eaa-8bc9-8a430263dc34_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/queues/queue1_875170adf08\",\"name\":\"queue1_875170adf08\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"queue1_875170adf08\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:45.027Z\",\"updatedAt\":\"2020-09-02T04:39:45.08Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "8478c2c2-b8c6-408a-a7e3-499233ecd8e7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "42a5995a-ee63-4587-ad59-52f99075ddea", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:40 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1129", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11965", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "76403264-7abf-4b08-a1f5-034e0806f645", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135541Z:76403264-7abf-4b08-a1f5-034e0806f645", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "00e93e52-0e94-4e07-ae15-b50f28fdb711_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d\",\"name\":\"topic_6ab154111966d\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_6ab154111966d\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:55:39.78Z\",\"updatedAt\":\"2019-10-17T13:55:39.81Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"isExpress\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:46 GMT", + "x-ms-correlation-request-id" : "8ca6a626-5e93-403c-bd95-49f6f34bebc8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043946Z:8ca6a626-5e93-403c-bd95-49f6f34bebc8", + "Expires" : "-1", + "Content-Length" : "1105", + "x-ms-request-id" : "f4edb063-f135-4950-8031-ada2ca9253d7_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314\",\"name\":\"topic_55042951314\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_55042951314\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:44.797Z\",\"updatedAt\":\"2020-09-02T04:39:44.837Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "42a5995a-ee63-4587-ad59-52f99075ddea", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "34d96041-70bb-43cf-ad9a-31033fed35a7", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:41 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "640", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c038d602-6ff9-41a7-8530-e4604722d45d", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135542Z:c038d602-6ff9-41a7-8530-e4604722d45d", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "a71ee6f1-d13c-40ba-9c07-d2d27f1e3f09_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d\",\"name\":\"topic_6ab154111966d\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_6ab154111966d\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"enableExpress\":false}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:47 GMT", + "x-ms-correlation-request-id" : "c683e1bc-57c7-460c-af17-89f3db30e1b8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043947Z:c683e1bc-57c7-460c-af17-89f3db30e1b8", + "Expires" : "-1", + "Content-Length" : "761", + "x-ms-request-id" : "4268c515-a67a-4cf5-b41e-0f2ae84667d8_M11CH3_M11CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314\",\"name\":\"topic_55042951314\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"path\":\"topic_55042951314\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "34d96041-70bb-43cf-ad9a-31033fed35a7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d/subscriptions/sub1_eaf79818a4364?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314/subscriptions/sub1_6446542acd22?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "64060db2-1bcc-46b2-96e6-db05ed4002f7", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:42 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "905", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "73190235-07e5-47be-9572-cfd76514efa6", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135543Z:73190235-07e5-47be-9572-cfd76514efa6", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "edab6840-9e93-47b0-85f3-864b1aec978d_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d/subscriptions/sub1_eaf79818a4364\",\"name\":\"sub1_eaf79818a4364\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_6ab154111966d\",\"subscriptionName\":\"sub1_eaf79818a4364\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:55:43.4381282Z\",\"updatedAt\":\"2019-10-17T13:55:43.4381282Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:50 GMT", + "x-ms-correlation-request-id" : "7442a380-1e36-4ed5-a854-66c642ca311a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043950Z:7442a380-1e36-4ed5-a854-66c642ca311a", + "Expires" : "-1", + "Content-Length" : "896", + "x-ms-request-id" : "47c9fd1c-ff7a-4301-b02b-dbd6a14f956c_M5CH3_M5CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314/subscriptions/sub1_6446542acd22\",\"name\":\"sub1_6446542acd22\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_55042951314\",\"subscriptionName\":\"sub1_6446542acd22\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:50.4571361Z\",\"updatedAt\":\"2020-09-02T04:39:50.4571361Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "64060db2-1bcc-46b2-96e6-db05ed4002f7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d/subscriptions/sub1_eaf79818a4364?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314/subscriptions/sub1_6446542acd22?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "63f48ef9-0397-4d49-86d1-13cb38e0e9c1", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:43 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "1061", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11964", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "377383fe-5a83-4c85-abd1-06934faaf536", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135544Z:377383fe-5a83-4c85-abd1-06934faaf536", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "95b1c491-2209-4929-b68b-e3ac62a1328e_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d/subscriptions/sub1_eaf79818a4364\",\"name\":\"sub1_eaf79818a4364\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_6ab154111966d\",\"subscriptionName\":\"sub1_eaf79818a4364\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:55:43.432369Z\",\"updatedAt\":\"2019-10-17T13:55:43.432369Z\",\"accessedAt\":\"2019-10-17T13:55:43.433Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:51 GMT", + "x-ms-correlation-request-id" : "46137a9e-730a-443f-b45a-b14dc2b56ceb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043951Z:46137a9e-730a-443f-b45a-b14dc2b56ceb", + "Expires" : "-1", + "Content-Length" : "1058", + "x-ms-request-id" : "be83951c-5d0b-4a0c-aba7-d421bed97a6a_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314/subscriptions/sub1_6446542acd22\",\"name\":\"sub1_6446542acd22\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_55042951314\",\"subscriptionName\":\"sub1_6446542acd22\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:50.4616185Z\",\"updatedAt\":\"2020-09-02T04:39:50.4616185Z\",\"accessedAt\":\"2020-09-02T04:39:50.4616185Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "63f48ef9-0397-4d49-86d1-13cb38e0e9c1", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d/subscriptions/sub2_bc7103703226a?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314/subscriptions/sub2_40894ab4269d?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0dde98d7-2d2d-48e0-b596-d15d7f05aaa4", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:55:45 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "905", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "53104b28-b187-48e4-8034-ad061a1d8887", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135545Z:53104b28-b187-48e4-8034-ad061a1d8887", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "35c977b1-6b4a-4e47-8cd3-9acf5a6b0614_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/topics/topic_6ab154111966d/subscriptions/sub2_bc7103703226a\",\"name\":\"sub2_bc7103703226a\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_6ab154111966d\",\"subscriptionName\":\"sub2_bc7103703226a\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2019-10-17T13:55:45.6569313Z\",\"updatedAt\":\"2019-10-17T13:55:45.6569313Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}" - } + "Date" : "Wed, 02 Sep 2020 04:39:52 GMT", + "x-ms-correlation-request-id" : "2e6f0f63-b9ae-4da1-b7c5-fb7e84ab101d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T043953Z:2e6f0f63-b9ae-4da1-b7c5-fb7e84ab101d", + "Expires" : "-1", + "Content-Length" : "894", + "x-ms-request-id" : "b0fedf8c-6f49-4285-8e56-c712b4a494b4_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/topics/topic_55042951314/subscriptions/sub2_40894ab4269d\",\"name\":\"sub2_40894ab4269d\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"West US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic_55042951314\",\"subscriptionName\":\"sub2_40894ab4269d\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T04:39:52.828536Z\",\"updatedAt\":\"2020-09-02T04:39:52.828536Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "0dde98d7-2d2d-48e0-b596-d15d7f05aaa4", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/AuthorizationRules/SendRule?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/AuthorizationRules/SendRule?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e037da0-32af-4fde-bd59-7f4bb92541f3", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:07 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "323", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d112a9c9-f28b-42d2-ac83-075b900fa3f7", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135607Z:d112a9c9-f28b-42d2-ac83-075b900fa3f7", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "f7bff035-c822-44fa-bf56-c6bf55476c1b_M11CH3_M11CH3", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/AuthorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}" - } + "Date" : "Wed, 02 Sep 2020 04:40:03 GMT", + "x-ms-correlation-request-id" : "1d29fd41-bf3a-4c09-a576-fa624a2dca7a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044004Z:1d29fd41-bf3a-4c09-a576-fa624a2dca7a", + "Expires" : "-1", + "Content-Length" : "321", + "x-ms-request-id" : "5c7e4029-c508-4e86-8f2e-9afcbddde4bd_M2CH3_M2CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/AuthorizationRules/SendRule\",\"name\":\"SendRule\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}", + "x-ms-client-request-id" : "3e037da0-32af-4fde-bd59-7f4bb92541f3", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/AuthorizationRules/SendRule/listKeys?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/AuthorizationRules/SendRule/listKeys?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "089d46e2-c215-4096-b67d-9bd7e7afaf47", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:07 GMT", - "server" : "Service-Bus-Resource-Provider/CH3", - "content-length" : "496", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "34ef8f98-3dc4-40f9-bc17-c53a45a9c0a4", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135607Z:34ef8f98-3dc4-40f9-bc17-c53a45a9c0a4", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "5ad02cee-7b6b-435f-8438-614354403ec5_M11CH3_M11CH3", - "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace82e20752f.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace82e20752f.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"SendRule\"}" - } + "Date" : "Wed, 02 Sep 2020 04:40:04 GMT", + "x-ms-correlation-request-id" : "7a6296dd-ced7-4b78-a1c8-cd1a6d7011d8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044005Z:7a6296dd-ced7-4b78-a1c8-cd1a6d7011d8", + "Expires" : "-1", + "Content-Length" : "494", + "x-ms-request-id" : "b7f83f88-3f87-4ac7-b0eb-20634b3ff93e_M7SN1_M7SN1", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://namespace661648a2.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://namespace661648a2.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"SendRule\"}", + "x-ms-client-request-id" : "089d46e2-c215-4096-b67d-9bd7e7afaf47", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "08998ff5-e18a-410e-8375-a2a9816c66ba", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:10 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "0e52982f-496f-4803-b474-81d635f1cf95", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135610Z:0e52982f-496f-4803-b474-81d635f1cf95", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/operationresults/namespace82e20752f?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "32782a9d-e7be-4d1f-980f-9385fd8c500b_M11CH3_M11CH3", - "Body" : "" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/operationresults/namespace82e20752f?api-version=2015-08-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "Date" : "Wed, 02 Sep 2020 04:40:11 GMT", + "x-ms-correlation-request-id" : "05849477-798f-404a-9e5d-166d1192314c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044012Z:05849477-798f-404a-9e5d-166d1192314c", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "86678e86-715b-4aa9-8dbd-0ae66c7afd82_M1CH3_M1CH3", + "x-ms-client-request-id" : "08998ff5-e18a-410e-8375-a2a9816c66ba", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/operationresults/namespace661648a2?api-version=2015-08-01" }, - "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:10 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11963", - "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a88fe8c8-bcf7-4fa6-9dd2-5e602acaf1cc", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135610Z:a88fe8c8-bcf7-4fa6-9dd2-5e602acaf1cc", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/operationresults/namespace82e20752f?api-version=2015-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "1b5d0ee6-c1f8-4525-bdfa-8b87d716bb7d_M11CH3_M11CH3", - "Body" : "" - } + "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_374554545bc6/providers/Microsoft.ServiceBus/namespaces/namespace82e20752f/operationresults/namespace82e20752f?api-version=2015-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgsb03_40339224cf4/providers/Microsoft.ServiceBus/namespaces/namespace661648a2/operationresults/namespace661648a2?api-version=2015-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ServiceBusManagementClient, 2015-08-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "35567fdc-73c7-49d3-ad0a-2813af05d5d9" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:40 GMT", - "content-length" : "0", - "server" : "Service-Bus-Resource-Provider/CH3", - "expires" : "-1", - "server-sb" : "Service-Bus-Resource-Provider/CH3", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11961", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "19ca2b8c-6cb3-4a67-9fb9-c5123f6a14c2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135641Z:19ca2b8c-6cb3-4a67-9fb9-c5123f6a14c2", - "cache-control" : "no-cache", - "x-ms-request-id" : "959dbbe5-e302-470d-9d04-10cb48301d18_M11CH3_M11CH3", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:41 GMT", + "x-ms-correlation-request-id" : "a3a84c21-de7d-495c-8f0d-b231917d7071", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044042Z:a3a84c21-de7d-495c-8f0d-b231917d7071", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "91e6d805-be84-4a1c-a718-604eb96feb99_M11CH3_M11CH3", + "x-ms-client-request-id" : "35567fdc-73c7-49d3-ad0a-2813af05d5d9" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb03_374554545bc6?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgsb03_40339224cf4?api-version=2020-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "dff543ee-0a3f-46c8-ae02-bb7a1b1aeb57", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 13:56:45 GMT", - "content-length" : "0", - "expires" : "-1", "x-ms-ratelimit-remaining-subscription-deletes" : "14998", - "retry-after" : "0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", "StatusCode" : "202", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f9ce4565-c623-488d-91d6-34bc495dd4c7", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T135646Z:f9ce4565-c623-488d-91d6-34bc495dd4c7", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDM6NUYzNzQ1NTQ1NDVCQzYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", - "cache-control" : "no-cache", - "x-ms-request-id" : "f9ce4565-c623-488d-91d6-34bc495dd4c7", - "Body" : "" - } + "Date" : "Wed, 02 Sep 2020 04:40:45 GMT", + "x-ms-correlation-request-id" : "7a2488a3-2d41-45dd-ab28-e80340e435de", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T044045Z:7a2488a3-2d41-45dd-ab28-e80340e435de", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "7a2488a3-2d41-45dd-ab28-e80340e435de", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR1NCMDM6NUY0MDMzOTIyNENGNC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2020-06-01" + }, + "Exception" : null } ], - "variables" : [ "rgsb03_374554545bc6", "namespace82e20752f", "queue1_ba5578792032", "topic_6ab154111966d", "sub1_eaf79818a4364", "sub2_bc7103703226a", "8a84c5dd-73a0-4ba3-818c-88e320139d92", "5141bdb4-8b97-4034-8c70-101916cfb8f7", "14022619-af04-403d-895c-03e0e3d98fb5", "fc230d53-e6c2-4547-b726-456700cf8bec", "0913c837-39a9-4526-bf0f-ee5bc013ae82", "e0e899a8-2c85-4230-a285-55baaaf7b5c5", "6ce7772e-d5b8-4fdf-851a-2b9fefb95721", "7c76b6a6-1633-4ed1-9d01-3ca63a6dc0d0", "5e3bf200-d3bd-468d-8f0e-f5cb92d9f283", "01b194c2-8e32-472d-89c8-805135842ec7", "4de5c5d0-5d4a-4054-ba96-19922eb6aca6", "d0eb4f77-b85d-49eb-8c5a-977538c84e16", "6ec95e58-bdd5-436d-afed-b8d55a881cb4" ] + "variables" : [ "rgsb03_40339224cf4", "namespace661648a2", "queue1_875170adf08", "topic_55042951314", "sub1_6446542acd22", "sub2_40894ab4269d" ] } \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-servicebus/CHANGELOG.md new file mode 100644 index 0000000000000..f2748da0bd1b2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 2.0.0-beta.5 (Unreleased) + +- Migrated from previous sdk diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/README.md b/sdk/resourcemanager/azure-resourcemanager-servicebus/README.md new file mode 100644 index 0000000000000..414cb1244c8ca --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/README.md @@ -0,0 +1,42 @@ +# Azure Resource Manager ServiceBus client library for Java + +Azure Resource Manager ServiceBus client library for Java + +For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azure-sdk-java-mgmt). + +## Getting started + +### Prerequisites + +- Java Development Kit (JDK) with version 8 or above + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-servicebus;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-servicebus + 2.0.0-beta.5 + +``` +[//]: # ({x-version-update-end}) + +## Key concepts + +## Examples + +## Troubleshooting + +## Next steps + +## Contributing + +If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft +Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml b/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml new file mode 100644 index 0000000000000..36f469d691215 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml @@ -0,0 +1,129 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-servicebus + 2.0.0-beta.5 + jar + + Microsoft Azure SDK for ServiceBus Management + This package contains Microsoft Azure ServiceBus Management SDK. For documentation on how to use this package, please see https://aka.ms/azure-sdk-java-mgmt + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + 0.10 + 0.10 + + + + + microsoft + Microsoft + + + + + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.0.0-beta.5 + + + org.junit.jupiter + junit-jupiter-engine + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-api + 5.6.2 + test + + + com.azure + azure-core-http-netty + 1.6.0 + test + + + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.5 + test + + + + + azure-mgmt-sdk-test-jar + + + !maven.test.skip + + + + + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.5 + test + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + true + true + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + com/azure/resourcemanager/**/fluent/**/* + com/azure/resourcemanager/**/models/**/* + + + + + + diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClient.java new file mode 100644 index 0000000000000..4df30830a7175 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClient.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; +import com.azure.resourcemanager.servicebus.fluent.NamespacesClient; +import com.azure.resourcemanager.servicebus.fluent.OperationsClient; +import com.azure.resourcemanager.servicebus.fluent.QueuesClient; +import com.azure.resourcemanager.servicebus.fluent.SubscriptionsClient; +import com.azure.resourcemanager.servicebus.fluent.TopicsClient; +import java.time.Duration; + +/** Initializes a new instance of the ServiceBusManagementClient type. */ +@ServiceClient(builder = ServiceBusManagementClientBuilder.class) +public final class ServiceBusManagementClient extends AzureServiceClient { + private final ClientLogger logger = new ClientLogger(ServiceBusManagementClient.class); + + /** + * Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. + */ + private final String subscriptionId; + + /** + * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** The NamespacesClient object to access its operations. */ + private final NamespacesClient namespaces; + + /** + * Gets the NamespacesClient object to access its operations. + * + * @return the NamespacesClient object. + */ + public NamespacesClient getNamespaces() { + return this.namespaces; + } + + /** The QueuesClient object to access its operations. */ + private final QueuesClient queues; + + /** + * Gets the QueuesClient object to access its operations. + * + * @return the QueuesClient object. + */ + public QueuesClient getQueues() { + return this.queues; + } + + /** The TopicsClient object to access its operations. */ + private final TopicsClient topics; + + /** + * Gets the TopicsClient object to access its operations. + * + * @return the TopicsClient object. + */ + public TopicsClient getTopics() { + return this.topics; + } + + /** The SubscriptionsClient object to access its operations. */ + private final SubscriptionsClient subscriptions; + + /** + * Gets the SubscriptionsClient object to access its operations. + * + * @return the SubscriptionsClient object. + */ + public SubscriptionsClient getSubscriptions() { + return this.subscriptions; + } + + /** + * Initializes an instance of ServiceBusManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + */ + ServiceBusManagementClient( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + super(httpPipeline, serializerAdapter, environment); + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2015-08-01"; + this.operations = new OperationsClient(this); + this.namespaces = new NamespacesClient(this); + this.queues = new QueuesClient(this); + this.topics = new TopicsClient(this); + this.subscriptions = new SubscriptionsClient(this); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClientBuilder.java new file mode 100644 index 0000000000000..fc9cf1698e8a9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClientBuilder.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.AzureJacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the ServiceBusManagementClient type. */ +@ServiceClientBuilder(serviceClients = {ServiceBusManagementClient.class}) +public final class ServiceBusManagementClientBuilder { + /* + * Subscription credentials that uniquely identify a Microsoft Azure + * subscription. The subscription ID forms part of the URI for every + * service call. + */ + private String subscriptionId; + + /** + * Sets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the ServiceBusManagementClientBuilder. + */ + public ServiceBusManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the ServiceBusManagementClientBuilder. + */ + public ServiceBusManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the ServiceBusManagementClientBuilder. + */ + public ServiceBusManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the ServiceBusManagementClientBuilder. + */ + public ServiceBusManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the ServiceBusManagementClientBuilder. + */ + public ServiceBusManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the ServiceBusManagementClientBuilder. + */ + public ServiceBusManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /** + * Builds an instance of ServiceBusManagementClient with the provided parameters. + * + * @return an instance of ServiceBusManagementClient. + */ + public ServiceBusManagementClient buildClient() { + if (endpoint == null) { + this.endpoint = "https://management.azure.com"; + } + if (environment == null) { + this.environment = AzureEnvironment.AZURE; + } + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = new AzureJacksonAdapter(); + } + if (defaultPollInterval == null) { + this.defaultPollInterval = Duration.ofSeconds(30); + } + ServiceBusManagementClient client = + new ServiceBusManagementClient( + pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + return client; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManager.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManager.java new file mode 100644 index 0000000000000..4fd9973c23bc9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManager.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpPipeline; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; +import com.azure.resourcemanager.resources.fluentcore.arm.Manager; +import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.servicebus.implementation.ServiceBusNamespacesImpl; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespaces; + +/** + * Entry point to Azure ServiceBus management. + */ +public final class ServiceBusManager extends Manager { + // Collections + private ServiceBusNamespaces namespaces; + /** + * Get a Configurable instance that can be used to create {@link ServiceBusManager} + * with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new ServiceBusManager.ConfigurableImpl(); + } + + /** + * Creates an instance of ServiceBusManager that exposes servicebus management API entry points. + * + * @param credential the credential to use + * @param profile the profile to use + * @return the ServiceBusManager + */ + public static ServiceBusManager authenticate(TokenCredential credential, AzureProfile profile) { + return authenticate(HttpPipelineProvider.buildHttpPipeline(credential, profile), profile); + } + + /** + * Creates an instance of ServiceBusManager that exposes servicebus management API entry points. + * + * @param httpPipeline the HttpPipeline to be used for API calls. + * @param profile the profile to use + * @return the ServiceBusManager + */ + public static ServiceBusManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + return authenticate(httpPipeline, profile, new SdkContext()); + } + + /** + * Creates an instance of ServiceBusManager that exposes servicebus management API entry points. + * + * @param httpPipeline the HttpPipeline to be used for API calls. + * @param profile the profile to use + * @param sdkContext the sdk context + * @return the ServiceBusManager + */ + public static ServiceBusManager authenticate( + HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { + return new ServiceBusManager(httpPipeline, profile, sdkContext); + } + + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of TrafficManager that exposes servicebus management API entry points. + * + * @param credential the credential to use + * @param profile the profile to use + * @return the interface exposing ServiceBus manager management API entry points that work across subscriptions + */ + ServiceBusManager authenticate(TokenCredential credential, AzureProfile profile); + } + + /** + * The implementation for Configurable interface. + */ + private static class ConfigurableImpl + extends AzureConfigurableImpl + implements Configurable { + + public ServiceBusManager authenticate(TokenCredential credential, AzureProfile profile) { + return ServiceBusManager.authenticate(buildHttpPipeline(credential, profile), profile); + } + } + + private ServiceBusManager(HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { + super( + httpPipeline, + profile, + new ServiceBusManagementClientBuilder() + .pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .buildClient(), + sdkContext + ); + } + + /** + * @return the Service Bus namespace management API entry point + */ + public ServiceBusNamespaces namespaces() { + if (namespaces == null) { + namespaces = new ServiceBusNamespacesImpl(this.inner().getNamespaces(), this); + } + return namespaces; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/NamespacesClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/NamespacesClient.java new file mode 100644 index 0000000000000..0b31387ecf314 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/NamespacesClient.java @@ -0,0 +1,2954 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; +import com.azure.resourcemanager.servicebus.fluent.inner.CheckNameAvailabilityResultInner; +import com.azure.resourcemanager.servicebus.fluent.inner.NamespaceListResultInner; +import com.azure.resourcemanager.servicebus.fluent.inner.NamespaceResourceInner; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleListResultInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.CheckNameAvailability; +import com.azure.resourcemanager.servicebus.models.NamespaceCreateOrUpdateParameters; +import com.azure.resourcemanager.servicebus.models.NamespaceUpdateParameters; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.RegenerateKeysParameters; +import com.azure.resourcemanager.servicebus.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Namespaces. */ +public final class NamespacesClient + implements InnerSupportsGet, + InnerSupportsListing, + InnerSupportsDelete { + private final ClientLogger logger = new ClientLogger(NamespacesClient.class); + + /** The proxy service used to perform REST calls. */ + private final NamespacesService service; + + /** The service client containing this operation class. */ + private final ServiceBusManagementClient client; + + /** + * Initializes an instance of NamespacesClient. + * + * @param client the instance of the service client containing this operation class. + */ + public NamespacesClient(ServiceBusManagementClient client) { + this.service = + RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ServiceBusManagementClientNamespaces to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ServiceBusManagement") + private interface NamespacesService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") CheckNameAvailability parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") NamespaceCreateOrUpdateParameters parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") NamespaceUpdateParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/AuthorizationRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRules( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdateAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") RegenerateKeysParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Check the give namespace name availability. + * + * @param name The Name to check the namespace name availability and The namespace name can contain only letters, + * numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. + * @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 description of a Check Name availability request properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkNameAvailabilityWithResponseAsync(String name) { + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + CheckNameAvailability parameters = new CheckNameAvailability(); + parameters.withName(name); + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Check the give namespace name availability. + * + * @param name The Name to check the namespace name availability and The namespace name can contain only letters, + * numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. + * @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 description of a Check Name availability request properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkNameAvailabilityWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + CheckNameAvailability parameters = new CheckNameAvailability(); + parameters.withName(name); + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Check the give namespace name availability. + * + * @param name The Name to check the namespace name availability and The namespace name can contain only letters, + * numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. + * @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 description of a Check Name availability request properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync(String name) { + return checkNameAvailabilityWithResponseAsync(name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Check the give namespace name availability. + * + * @param name The Name to check the namespace name availability and The namespace name can contain only letters, + * numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. + * @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 description of a Check Name availability request properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync(String name, Context context) { + return checkNameAvailabilityWithResponseAsync(name, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Check the give namespace name availability. + * + * @param name The Name to check the namespace name availability and The namespace name can contain only letters, + * numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. + * @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 description of a Check Name availability request properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResultInner checkNameAvailability(String name) { + return checkNameAvailabilityAsync(name).block(); + } + + /** + * Check the give namespace name availability. + * + * @param name The Name to check the namespace name availability and The namespace name can contain only letters, + * numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. + * @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 description of a Check Name availability request properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResultInner checkNameAvailability(String name, Context context) { + return checkNameAvailabilityAsync(name, context).block(); + } + + /** + * Gets all the available namespaces within the subscription, irrespective of the resource groups. + * + * @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 all the available namespaces within the subscription, irrespective of the resource groups. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + 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.")); + } + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets all the available namespaces within the subscription, irrespective of the resource groups. + * + * @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 all the available namespaces within the subscription, irrespective of the resource groups. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(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.")); + } + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all the available namespaces within the subscription, irrespective of the resource groups. + * + * @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 all the available namespaces within the subscription, irrespective of the resource groups. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the available namespaces within the subscription, irrespective of the resource groups. + * + * @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 all the available namespaces within the subscription, irrespective of the resource groups. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the available namespaces within the subscription, irrespective of the resource groups. + * + * @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 all the available namespaces within the subscription, irrespective of the resource groups. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets all the available namespaces within the subscription, irrespective of the resource groups. + * + * @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 all the available namespaces within the subscription, irrespective of the resource groups. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Gets the available namespaces within a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @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 the available namespaces within a resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the available namespaces within a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @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 the available namespaces within a resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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.")); + } + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the available namespaces within a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @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 the available namespaces within a resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets the available namespaces within a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @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 the available namespaces within a resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the available namespaces within a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @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 the available namespaces within a resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Gets the available namespaces within a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @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 the available namespaces within a resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace 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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace operation. + * @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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace 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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, NamespaceResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NamespaceResourceInner.class, + NamespaceResourceInner.class, + Context.NONE); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace operation. + * @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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, NamespaceResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NamespaceResourceInner.class, + NamespaceResourceInner.class, + context); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace 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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, NamespaceResourceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace operation. + * @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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, NamespaceResourceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace 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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace operation. + * @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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace 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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceResourceInner createOrUpdate( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { + return createOrUpdateAsync(resourceGroupName, namespaceName, parameters).block(); + } + + /** + * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This + * operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Create Or Update Namespace operation. + * @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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceResourceInner createOrUpdate( + String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).block(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName) { + return beginDeleteAsync(resourceGroupName, namespaceName).getSyncPoller(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, context).getSyncPoller(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName) { + return beginDeleteAsync(resourceGroupName, namespaceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName) { + deleteAsync(resourceGroupName, namespaceName).block(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, Context context) { + deleteAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * Gets a description for the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 description for the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets a description for the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 description for the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets a description for the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 description for the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a description for the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 description for the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync( + String resourceGroupName, String namespaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a description for the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 description for the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName) { + return getByResourceGroupAsync(resourceGroupName, namespaceName).block(); + } + + /** + * Gets a description for the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 description for the specified namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName, Context context) { + return getByResourceGroupAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Patch Namespace 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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Patch Namespace operation. + * @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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Patch Namespace 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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters parameters) { + return updateWithResponseAsync(resourceGroupName, namespaceName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Patch Namespace operation. + * @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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, namespaceName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Patch Namespace 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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceResourceInner update( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters parameters) { + return updateAsync(resourceGroupName, namespaceName, parameters).block(); + } + + /** + * Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param parameters Parameters supplied to the Patch Namespace operation. + * @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 description of a namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceResourceInner update( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters parameters, Context context) { + return updateAsync(resourceGroupName, namespaceName, parameters, context).block(); + } + + /** + * Gets the authorization rules for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the authorization rules for a namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the authorization rules for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the authorization rules for a namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the authorization rules for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the authorization rules for a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + } + + /** + * Gets the authorization rules for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the authorization rules for a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, Context context) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the authorization rules for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the authorization rules for a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets the authorization rules for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the authorization rules for a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, Context context) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, context)); + } + + /** + * Creates or updates an authorization rule for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates an authorization rule for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates an authorization rule for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, authorizationRuleName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an authorization rule for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, authorizationRuleName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an authorization rule for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + return createOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters) + .block(); + } + + /** + * Creates or updates an authorization rule for a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAuthorizationRuleAsync( + resourceGroupName, namespaceName, authorizationRuleName, parameters, context) + .block(); + } + + /** + * Deletes a namespace authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a namespace authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a namespace authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return deleteAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a namespace authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return deleteAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, authorizationRuleName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a namespace authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName).block(); + } + + /** + * Deletes a namespace authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName, context).block(); + } + + /** + * Gets an authorization rule for a namespace by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets an authorization rule for a namespace by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets an authorization rule for a namespace by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an authorization rule for a namespace by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an authorization rule for a namespace by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName).block(); + } + + /** + * Gets an authorization rule for a namespace by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName, context).block(); + } + + /** + * Gets the primary and secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the primary and secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets the primary and secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner listKeys( + String resourceGroupName, String namespaceName, String authorizationRuleName) { + return listKeysAsync(resourceGroupName, namespaceName, authorizationRuleName).block(); + } + + /** + * Gets the primary and secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner listKeys( + String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) { + return listKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, context).block(); + } + + /** + * Regenerates the primary or secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Policykey policykey) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + RegenerateKeysParameters parameters = new RegenerateKeysParameters(); + parameters.withPolicykey(policykey); + return FluxUtil + .withContext( + context -> + service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Regenerates the primary or secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + Policykey policykey, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + RegenerateKeysParameters parameters = new RegenerateKeysParameters(); + parameters.withPolicykey(policykey); + context = this.client.mergeContext(context); + return service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Regenerates the primary or secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, String namespaceName, String authorizationRuleName, Policykey policykey) { + return regenerateKeysWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, policykey) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates the primary or secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + Policykey policykey, + Context context) { + return regenerateKeysWithResponseAsync( + resourceGroupName, namespaceName, authorizationRuleName, policykey, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates the primary or secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner regenerateKeys( + String resourceGroupName, String namespaceName, String authorizationRuleName, Policykey policykey) { + return regenerateKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, policykey).block(); + } + + /** + * Regenerates the primary or secondary connection strings for the namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String authorizationRuleName, + Policykey policykey, + Context context) { + return regenerateKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, policykey, context).block(); + } + + /** + * 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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listBySubscriptionNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listByResourceGroupNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response of the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the response to the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAuthorizationRulesNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response to the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRulesNext(nextLink, 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-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/OperationsClient.java new file mode 100644 index 0000000000000..5c62751ff4bf2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/OperationsClient.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; +import com.azure.resourcemanager.servicebus.fluent.inner.OperationInner; +import com.azure.resourcemanager.servicebus.fluent.inner.OperationListResultInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Operations. */ +public final class OperationsClient { + private final ClientLogger logger = new ClientLogger(OperationsClient.class); + + /** The proxy service used to perform REST calls. */ + private final OperationsService service; + + /** The service client containing this operation class. */ + private final ServiceBusManagementClient client; + + /** + * Initializes an instance of OperationsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public OperationsClient(ServiceBusManagementClient client) { + this.service = + RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ServiceBusManagementClientOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ServiceBusManagement") + private interface OperationsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/providers/Microsoft.ServiceBus/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Lists all of the available ServiceBus REST API operations. + * + * @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 result of the request to list ServiceBus operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Lists all of the available ServiceBus REST API operations. + * + * @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 result of the request to list ServiceBus operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all of the available ServiceBus REST API operations. + * + * @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 result of the request to list ServiceBus operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the available ServiceBus REST API operations. + * + * @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 result of the request to list ServiceBus operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the available ServiceBus REST API operations. + * + * @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 result of the request to list ServiceBus operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all of the available ServiceBus REST API operations. + * + * @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 result of the request to list ServiceBus operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * 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 result of the request to list ServiceBus operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 result of the request to list ServiceBus operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listNext(nextLink, 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-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/QueuesClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/QueuesClient.java new file mode 100644 index 0000000000000..d04e825b020b7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/QueuesClient.java @@ -0,0 +1,2653 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; +import com.azure.resourcemanager.servicebus.fluent.inner.QueueListResultInner; +import com.azure.resourcemanager.servicebus.fluent.inner.QueueResourceInner; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleListResultInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.QueueCreateOrUpdateParameters; +import com.azure.resourcemanager.servicebus.models.RegenerateKeysParameters; +import com.azure.resourcemanager.servicebus.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Queues. */ +public final class QueuesClient { + private final ClientLogger logger = new ClientLogger(QueuesClient.class); + + /** The proxy service used to perform REST calls. */ + private final QueuesService service; + + /** The service client containing this operation class. */ + private final ServiceBusManagementClient client; + + /** + * Initializes an instance of QueuesClient. + * + * @param client the instance of the service client containing this operation class. + */ + public QueuesClient(ServiceBusManagementClient client) { + this.service = RestProxy.create(QueuesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ServiceBusManagementClientQueues to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ServiceBusManagement") + private interface QueuesService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAll( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") QueueCreateOrUpdateParameters parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}/authorizationRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRules( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdateAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> postAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/ListKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}" + + "/regenerateKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("queueName") String queueName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") RegenerateKeysParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Gets the queues within a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the queues within a namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllSinglePageAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAll( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the queues within a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the queues within a namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllSinglePageAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .listAll( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the queues within a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the queues within a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(String resourceGroupName, String namespaceName) { + return new PagedFlux<>( + () -> listAllSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Gets the queues within a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the queues within a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(String resourceGroupName, String namespaceName, Context context) { + return new PagedFlux<>( + () -> listAllSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the queues within a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the queues within a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listAllAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets the queues within a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 the queues within a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String namespaceName, Context context) { + return new PagedIterable<>(listAllAsync(resourceGroupName, namespaceName, context)); + } + + /** + * Creates or updates a Service Bus queue. This operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param parameters Parameters supplied to the Create Or Update Queue 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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName, QueueCreateOrUpdateParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates or updates a Service Bus queue. This operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param parameters Parameters supplied to the Create Or Update Queue operation. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + QueueCreateOrUpdateParameters parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates or updates a Service Bus queue. This operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param parameters Parameters supplied to the Create Or Update Queue 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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String queueName, QueueCreateOrUpdateParameters parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, queueName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a Service Bus queue. This operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param parameters Parameters supplied to the Create Or Update Queue operation. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String queueName, + QueueCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, queueName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a Service Bus queue. This operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param parameters Parameters supplied to the Create Or Update Queue 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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public QueueResourceInner createOrUpdate( + String resourceGroupName, String namespaceName, String queueName, QueueCreateOrUpdateParameters parameters) { + return createOrUpdateAsync(resourceGroupName, namespaceName, queueName, parameters).block(); + } + + /** + * Creates or updates a Service Bus queue. This operation is idempotent. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param parameters Parameters supplied to the Create Or Update Queue operation. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public QueueResourceInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String queueName, + QueueCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, queueName, parameters, context).block(); + } + + /** + * Deletes a queue from the specified namespace in a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a queue from the specified namespace in a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a queue from the specified namespace in a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, String queueName) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, queueName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a queue from the specified namespace in a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, String queueName, Context context) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, queueName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a queue from the specified namespace in a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String queueName) { + deleteAsync(resourceGroupName, namespaceName, queueName).block(); + } + + /** + * Deletes a queue from the specified namespace in a resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String queueName, Context context) { + deleteAsync(resourceGroupName, namespaceName, queueName, context).block(); + } + + /** + * Returns a description for the specified queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Returns a description for the specified queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName 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.")); + } + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Returns a description for the specified queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, String queueName) { + return getWithResponseAsync(resourceGroupName, namespaceName, queueName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns a description for the specified queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String namespaceName, String queueName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, queueName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns a description for the specified queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public QueueResourceInner get(String resourceGroupName, String namespaceName, String queueName) { + return getAsync(resourceGroupName, namespaceName, queueName).block(); + } + + /** + * Returns a description for the specified queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 description of queue Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public QueueResourceInner get(String resourceGroupName, String namespaceName, String queueName, Context context) { + return getAsync(resourceGroupName, namespaceName, queueName, context).block(); + } + + /** + * Gets all authorization rules for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 all authorization rules for a queue. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, String queueName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets all authorization rules for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 all authorization rules for a queue. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, String queueName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName 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.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all authorization rules for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 all authorization rules for a queue. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, String queueName) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, queueName), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + } + + /** + * Gets all authorization rules for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 all authorization rules for a queue. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, String queueName, Context context) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, queueName, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all authorization rules for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 all authorization rules for a queue. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, String queueName) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, queueName)); + } + + /** + * Gets all authorization rules for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @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 all authorization rules for a queue. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, String queueName, Context context) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, queueName, context)); + } + + /** + * Creates an authorization rule for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates an authorization rule for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates an authorization rule for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates an authorization rule for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates an authorization rule for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + return createOrUpdateAuthorizationRuleAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, parameters) + .block(); + } + + /** + * Creates an authorization rule for a queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAuthorizationRuleAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, parameters, context) + .block(); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> postAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .postAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> postAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .postAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono postAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + return postAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono postAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + return postAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner postAuthorizationRule( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + return postAuthorizationRuleAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName).block(); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner postAuthorizationRule( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + return postAuthorizationRuleAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName, context) + .block(); + } + + /** + * Deletes a queue authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a queue authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a queue authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + return deleteAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a queue authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + return deleteAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a queue authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName).block(); + } + + /** + * Deletes a queue authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName, context) + .block(); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + return getAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName).block(); + } + + /** + * Gets an authorization rule for a queue by rule name. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 an authorization rule for a queue by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner getAuthorizationRule( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName, context) + .block(); + } + + /** + * Primary and secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Primary and secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Primary and secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Primary and secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Primary and secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner listKeys( + String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName) { + return listKeysAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName).block(); + } + + /** + * Primary and secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner listKeys( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Context context) { + return listKeysAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName, context).block(); + } + + /** + * Regenerates the primary or secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Policykey policykey) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + RegenerateKeysParameters parameters = new RegenerateKeysParameters(); + parameters.withPolicykey(policykey); + return FluxUtil + .withContext( + context -> + service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Regenerates the primary or secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Policykey policykey, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (queueName == null) { + return Mono.error(new IllegalArgumentException("Parameter queueName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + RegenerateKeysParameters parameters = new RegenerateKeysParameters(); + parameters.withPolicykey(policykey); + context = this.client.mergeContext(context); + return service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + queueName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Regenerates the primary or secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Policykey policykey) { + return regenerateKeysWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, policykey) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates the primary or secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Policykey policykey, + Context context) { + return regenerateKeysWithResponseAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, policykey, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates the primary or secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Policykey policykey) { + return regenerateKeysAsync(resourceGroupName, namespaceName, queueName, authorizationRuleName, policykey) + .block(); + } + + /** + * Regenerates the primary or secondary connection strings to the queue. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param queueName The queue name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String queueName, + String authorizationRuleName, + Policykey policykey, + Context context) { + return regenerateKeysAsync( + resourceGroupName, namespaceName, queueName, authorizationRuleName, policykey, context) + .block(); + } + + /** + * 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 the response to the List Queues operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response to the List Queues operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAllNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the response to the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAuthorizationRulesNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response to the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRulesNext(nextLink, 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-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/SubscriptionsClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/SubscriptionsClient.java new file mode 100644 index 0000000000000..28b97d7995d73 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/SubscriptionsClient.java @@ -0,0 +1,1022 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; +import com.azure.resourcemanager.servicebus.fluent.inner.SubscriptionListResultInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SubscriptionResourceInner; +import com.azure.resourcemanager.servicebus.models.SubscriptionCreateOrUpdateParameters; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Subscriptions. */ +public final class SubscriptionsClient { + private final ClientLogger logger = new ClientLogger(SubscriptionsClient.class); + + /** The proxy service used to perform REST calls. */ + private final SubscriptionsService service; + + /** The service client containing this operation class. */ + private final ServiceBusManagementClient client; + + /** + * Initializes an instance of SubscriptionsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public SubscriptionsClient(ServiceBusManagementClient client) { + this.service = + RestProxy.create(SubscriptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ServiceBusManagementClientSubscriptions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ServiceBusManagement") + private interface SubscriptionsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/subscriptions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAll( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("subscriptionName") String subscriptionName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") SubscriptionCreateOrUpdateParameters parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("subscriptionName") String subscriptionName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("subscriptionName") String subscriptionName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * List all the subscriptions under a specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the response to the List Subscriptions operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllSinglePageAsync( + String resourceGroupName, String namespaceName, String topicName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAll( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * List all the subscriptions under a specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the response to the List Subscriptions operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllSinglePageAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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.")); + } + context = this.client.mergeContext(context); + return service + .listAll( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all the subscriptions under a specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the response to the List Subscriptions operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync( + String resourceGroupName, String namespaceName, String topicName) { + return new PagedFlux<>( + () -> listAllSinglePageAsync(resourceGroupName, namespaceName, topicName), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * List all the subscriptions under a specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the response to the List Subscriptions operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + return new PagedFlux<>( + () -> listAllSinglePageAsync(resourceGroupName, namespaceName, topicName, context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); + } + + /** + * List all the subscriptions under a specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the response to the List Subscriptions operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll( + String resourceGroupName, String namespaceName, String topicName) { + return new PagedIterable<>(listAllAsync(resourceGroupName, namespaceName, topicName)); + } + + /** + * List all the subscriptions under a specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the response to the List Subscriptions operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll( + String resourceGroupName, String namespaceName, String topicName, Context context) { + return new PagedIterable<>(listAllAsync(resourceGroupName, namespaceName, topicName, context)); + } + + /** + * Creates a topic subscription. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @param parameters Parameters supplied to the Create Or Update Subscription 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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String subscriptionName, + SubscriptionCreateOrUpdateParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (subscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter subscriptionName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + subscriptionName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates a topic subscription. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @param parameters Parameters supplied to the Create Or Update Subscription operation. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String subscriptionName, + SubscriptionCreateOrUpdateParameters parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (subscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter subscriptionName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + subscriptionName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates a topic subscription. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @param parameters Parameters supplied to the Create Or Update Subscription 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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String subscriptionName, + SubscriptionCreateOrUpdateParameters parameters) { + return createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, topicName, subscriptionName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a topic subscription. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @param parameters Parameters supplied to the Create Or Update Subscription operation. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String subscriptionName, + SubscriptionCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, topicName, subscriptionName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a topic subscription. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @param parameters Parameters supplied to the Create Or Update Subscription 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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionResourceInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String subscriptionName, + SubscriptionCreateOrUpdateParameters parameters) { + return createOrUpdateAsync(resourceGroupName, namespaceName, topicName, subscriptionName, parameters).block(); + } + + /** + * Creates a topic subscription. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @param parameters Parameters supplied to the Create Or Update Subscription operation. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionResourceInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String subscriptionName, + SubscriptionCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, topicName, subscriptionName, parameters, context) + .block(); + } + + /** + * Deletes a subscription from the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (subscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter subscriptionName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + subscriptionName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a subscription from the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (subscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter subscriptionName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + subscriptionName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a subscription from the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, topicName, subscriptionName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a subscription from the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName, Context context) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, topicName, subscriptionName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a subscription from the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String topicName, String subscriptionName) { + deleteAsync(resourceGroupName, namespaceName, topicName, subscriptionName).block(); + } + + /** + * Deletes a subscription from the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName, Context context) { + deleteAsync(resourceGroupName, namespaceName, topicName, subscriptionName, context).block(); + } + + /** + * Returns a subscription description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (subscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter subscriptionName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + subscriptionName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Returns a subscription description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (subscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter subscriptionName 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.")); + } + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + subscriptionName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Returns a subscription description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicName, subscriptionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns a subscription description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicName, subscriptionName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns a subscription description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionResourceInner get( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName) { + return getAsync(resourceGroupName, namespaceName, topicName, subscriptionName).block(); + } + + /** + * Returns a subscription description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param subscriptionName The subscription name. + * @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 description of subscription resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionResourceInner get( + String resourceGroupName, String namespaceName, String topicName, String subscriptionName, Context context) { + return getAsync(resourceGroupName, namespaceName, topicName, subscriptionName, context).block(); + } + + /** + * 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 the response to the List Subscriptions operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response to the List Subscriptions operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAllNext(nextLink, 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-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java new file mode 100644 index 0000000000000..27adebb86bb0e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java @@ -0,0 +1,2653 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleListResultInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.fluent.inner.TopicListResultInner; +import com.azure.resourcemanager.servicebus.fluent.inner.TopicResourceInner; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.RegenerateKeysParameters; +import com.azure.resourcemanager.servicebus.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters; +import com.azure.resourcemanager.servicebus.models.TopicCreateOrUpdateParameters; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Topics. */ +public final class TopicsClient { + private final ClientLogger logger = new ClientLogger(TopicsClient.class); + + /** The proxy service used to perform REST calls. */ + private final TopicsService service; + + /** The service client containing this operation class. */ + private final ServiceBusManagementClient client; + + /** + * Initializes an instance of TopicsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public TopicsClient(ServiceBusManagementClient client) { + this.service = RestProxy.create(TopicsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ServiceBusManagementClientTopics to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ServiceBusManagement") + private interface TopicsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAll( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") TopicCreateOrUpdateParameters parameters, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/authorizationRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRules( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdateAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> postAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteAuthorizationRule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}/ListKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus" + + "/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}" + + "/regenerateKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") RegenerateKeysParameters parameters, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAuthorizationRulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Gets all the topics in a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 all the topics in a namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllSinglePageAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAll( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets all the topics in a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 all the topics in a namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllSinglePageAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.")); + } + context = this.client.mergeContext(context); + return service + .listAll( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all the topics in a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 all the topics in a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(String resourceGroupName, String namespaceName) { + return new PagedFlux<>( + () -> listAllSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the topics in a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 all the topics in a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(String resourceGroupName, String namespaceName, Context context) { + return new PagedFlux<>( + () -> listAllSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the topics in a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 all the topics in a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listAllAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets all the topics in a namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @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 all the topics in a namespace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String namespaceName, Context context) { + return new PagedIterable<>(listAllAsync(resourceGroupName, namespaceName, context)); + } + + /** + * Creates a topic in the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param parameters Parameters supplied to the Create Or Update Topic 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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, TopicCreateOrUpdateParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates a topic in the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param parameters Parameters supplied to the Create Or Update Topic operation. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + TopicCreateOrUpdateParameters parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates a topic in the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param parameters Parameters supplied to the Create Or Update Topic 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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String topicName, TopicCreateOrUpdateParameters parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, topicName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a topic in the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param parameters Parameters supplied to the Create Or Update Topic operation. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + TopicCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, topicName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a topic in the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param parameters Parameters supplied to the Create Or Update Topic 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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicResourceInner createOrUpdate( + String resourceGroupName, String namespaceName, String topicName, TopicCreateOrUpdateParameters parameters) { + return createOrUpdateAsync(resourceGroupName, namespaceName, topicName, parameters).block(); + } + + /** + * Creates a topic in the specified namespace. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param parameters Parameters supplied to the Create Or Update Topic operation. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicResourceInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + TopicCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, topicName, parameters, context).block(); + } + + /** + * Deletes a topic from the specified namespace and resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a topic from the specified namespace and resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a topic from the specified namespace and resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, String topicName) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, topicName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a topic from the specified namespace and resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String namespaceName, String topicName, Context context) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, topicName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a topic from the specified namespace and resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String topicName) { + deleteAsync(resourceGroupName, namespaceName, topicName).block(); + } + + /** + * Deletes a topic from the specified namespace and resource group. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String topicName, Context context) { + deleteAsync(resourceGroupName, namespaceName, topicName, context).block(); + } + + /** + * Returns a description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Returns a description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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.")); + } + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Returns a description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, String topicName) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns a description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns a description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicResourceInner get(String resourceGroupName, String namespaceName, String topicName) { + return getAsync(resourceGroupName, namespaceName, topicName).block(); + } + + /** + * Returns a description for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 description of topic resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicResourceInner get(String resourceGroupName, String namespaceName, String topicName, Context context) { + return getAsync(resourceGroupName, namespaceName, topicName, context).block(); + } + + /** + * Gets authorization rules for a topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 authorization rules for a topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, String topicName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets authorization rules for a topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 authorization rules for a topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesSinglePageAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName 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.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRules( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets authorization rules for a topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 authorization rules for a topic. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, String topicName) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, topicName), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + } + + /** + * Gets authorization rules for a topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 authorization rules for a topic. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, topicName, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets authorization rules for a topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 authorization rules for a topic. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, String topicName) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, topicName)); + } + + /** + * Gets authorization rules for a topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @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 authorization rules for a topic. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules( + String resourceGroupName, String namespaceName, String topicName, Context context) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, topicName, context)); + } + + /** + * Creates an authorization rule for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Creates an authorization rule for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdateAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Creates an authorization rule for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates an authorization rule for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, parameters, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates an authorization rule for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules 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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { + return createOrUpdateAuthorizationRuleAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, parameters) + .block(); + } + + /** + * Creates an authorization rule for the specified topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to the Create Or Update Authorization Rules operation. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, + Context context) { + return createOrUpdateAuthorizationRuleAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, parameters, context) + .block(); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> postAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .postAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> postAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .postAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono postAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + return postAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono postAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + return postAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner postAuthorizationRule( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + return postAuthorizationRuleAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName).block(); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner postAuthorizationRule( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + return postAuthorizationRuleAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, context) + .block(); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .getAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + return getAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner getAuthorizationRule( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName).block(); + } + + /** + * Returns the specified authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 description of a namespace authorization rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedAccessAuthorizationRuleResourceInner getAuthorizationRule( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + return getAuthorizationRuleAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, context) + .block(); + } + + /** + * Deletes a topic authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Deletes a topic authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteAuthorizationRuleWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .deleteAuthorizationRule( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Deletes a topic authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + return deleteAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a topic authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + return deleteAuthorizationRuleWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a topic authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName).block(); + } + + /** + * Deletes a topic authorization rule. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, context) + .block(); + } + + /** + * Gets the primary and secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + return FluxUtil + .withContext( + context -> + service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the primary and secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + context = this.client.mergeContext(context); + return service + .listKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + context); + } + + /** + * Gets the primary and secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKeysAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + return listKeysWithResponseAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner listKeys( + String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName) { + return listKeysAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName).block(); + } + + /** + * Gets the primary and secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @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 the primary and secondary connection strings for the topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner listKeys( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Context context) { + return listKeysAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, context).block(); + } + + /** + * Regenerates primary or secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Policykey policykey) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + RegenerateKeysParameters parameters = new RegenerateKeysParameters(); + parameters.withPolicykey(policykey); + return FluxUtil + .withContext( + context -> + service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Regenerates primary or secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateKeysWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Policykey policykey, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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.")); + } + RegenerateKeysParameters parameters = new RegenerateKeysParameters(); + parameters.withPolicykey(policykey); + context = this.client.mergeContext(context); + return service + .regenerateKeys( + this.client.getEndpoint(), + resourceGroupName, + namespaceName, + topicName, + authorizationRuleName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + context); + } + + /** + * Regenerates primary or secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Policykey policykey) { + return regenerateKeysWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, policykey) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates primary or secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono regenerateKeysAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Policykey policykey, + Context context) { + return regenerateKeysWithResponseAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, policykey, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerates primary or secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Policykey policykey) { + return regenerateKeysAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, policykey) + .block(); + } + + /** + * Regenerates primary or secondary connection strings for the topic. + * + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param namespaceName The namespace name. + * @param topicName The topic name. + * @param authorizationRuleName The authorization rule name. + * @param policykey Key that needs to be regenerated. + * @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 namespace/ServiceBus Connection String. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceListKeysInner regenerateKeys( + String resourceGroupName, + String namespaceName, + String topicName, + String authorizationRuleName, + Policykey policykey, + Context context) { + return regenerateKeysAsync( + resourceGroupName, namespaceName, topicName, authorizationRuleName, policykey, context) + .block(); + } + + /** + * 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 the response to the List Topics operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response to the List Topics operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAllNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAllNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 the response to the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listAuthorizationRulesNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * 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 the response to the List Namespace operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAuthorizationRulesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listAuthorizationRulesNext(nextLink, 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-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/CheckNameAvailabilityResultInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/CheckNameAvailabilityResultInner.java new file mode 100644 index 0000000000000..b6c6428d3f0b2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/CheckNameAvailabilityResultInner.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.models.UnavailableReason; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CheckNameAvailabilityResult model. */ +@Fluent +public final class CheckNameAvailabilityResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityResultInner.class); + + /* + * Value indicating namespace is availability, true if the namespace is + * available; otherwise, false. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /* + * The reason for unavailability of a namespace. + */ + @JsonProperty(value = "reason") + private UnavailableReason reason; + + /* + * The detailed info regarding the reason associated with the namespace. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the nameAvailable property: Value indicating namespace is availability, true if the namespace is available; + * otherwise, false. + * + * @return the nameAvailable value. + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set the nameAvailable property: Value indicating namespace is availability, true if the namespace is available; + * otherwise, false. + * + * @param nameAvailable the nameAvailable value to set. + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason property: The reason for unavailability of a namespace. + * + * @return the reason value. + */ + public UnavailableReason reason() { + return this.reason; + } + + /** + * Set the reason property: The reason for unavailability of a namespace. + * + * @param reason the reason value to set. + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withReason(UnavailableReason reason) { + this.reason = reason; + return this; + } + + /** + * Get the message property: The detailed info regarding the reason associated with the namespace. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/NamespaceListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/NamespaceListResultInner.java new file mode 100644 index 0000000000000..5adeca55400d8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/NamespaceListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +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; + +/** The NamespaceListResult model. */ +@Fluent +public final class NamespaceListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NamespaceListResultInner.class); + + /* + * Result of the List Namespace operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of Namespaces. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List Namespace operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List Namespace operation. + * + * @param value the value value to set. + * @return the NamespaceListResultInner object itself. + */ + public NamespaceListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Namespaces. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Namespaces. + * + * @param nextLink the nextLink value to set. + * @return the NamespaceListResultInner object itself. + */ + public NamespaceListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/NamespaceResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/NamespaceResourceInner.java new file mode 100644 index 0000000000000..5ffad4109a399 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/NamespaceResourceInner.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.models.NamespaceState; +import com.azure.resourcemanager.servicebus.models.Sku; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The NamespaceResource model. */ +@JsonFlatten +@Fluent +public class NamespaceResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NamespaceResourceInner.class); + + /* + * SKU of the namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * Provisioning state of the namespace. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * State of the namespace. + */ + @JsonProperty(value = "properties.status") + private NamespaceState status; + + /* + * The time the namespace was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The time the namespace was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * Endpoint you can use to perform Service Bus operations. + */ + @JsonProperty(value = "properties.serviceBusEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String serviceBusEndpoint; + + /* + * Indicates whether to create an ACS namespace. + */ + @JsonProperty(value = "properties.createACSNamespace") + private Boolean createAcsNamespace; + + /* + * Specifies whether this instance is enabled. + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * Get the sku property: SKU of the namespace. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: SKU of the namespace. + * + * @param sku the sku value to set. + * @return the NamespaceResourceInner object itself. + */ + public NamespaceResourceInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the namespace. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: State of the namespace. + * + * @return the status value. + */ + public NamespaceState status() { + return this.status; + } + + /** + * Set the status property: State of the namespace. + * + * @param status the status value to set. + * @return the NamespaceResourceInner object itself. + */ + public NamespaceResourceInner withStatus(NamespaceState status) { + this.status = status; + return this; + } + + /** + * Get the createdAt property: The time the namespace was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the updatedAt property: The time the namespace was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the serviceBusEndpoint property: Endpoint you can use to perform Service Bus operations. + * + * @return the serviceBusEndpoint value. + */ + public String serviceBusEndpoint() { + return this.serviceBusEndpoint; + } + + /** + * Get the createAcsNamespace property: Indicates whether to create an ACS namespace. + * + * @return the createAcsNamespace value. + */ + public Boolean createAcsNamespace() { + return this.createAcsNamespace; + } + + /** + * Set the createAcsNamespace property: Indicates whether to create an ACS namespace. + * + * @param createAcsNamespace the createAcsNamespace value to set. + * @return the NamespaceResourceInner object itself. + */ + public NamespaceResourceInner withCreateAcsNamespace(Boolean createAcsNamespace) { + this.createAcsNamespace = createAcsNamespace; + return this; + } + + /** + * Get the enabled property: Specifies whether this instance is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Specifies whether this instance is enabled. + * + * @param enabled the enabled value to set. + * @return the NamespaceResourceInner object itself. + */ + public NamespaceResourceInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/OperationInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/OperationInner.java new file mode 100644 index 0000000000000..9aa2f819fe9ef --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/OperationInner.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.models.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Operation model. */ +@Fluent +public final class OperationInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); + + /* + * Operation name: {provider}/{resource}/{operation} + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The object that represents the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Get the name property: Operation name: {provider}/{resource}/{operation}. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the display property: The object that represents the operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: The object that represents the operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/OperationListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/OperationListResultInner.java new file mode 100644 index 0000000000000..350342cee501c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/OperationListResultInner.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The OperationListResult model. */ +@Immutable +public final class OperationListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class); + + /* + * List of ServiceBus operations supported by the Microsoft.ServiceBus + * resource provider. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results if there are any. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: List of ServiceBus operations supported by the Microsoft.ServiceBus resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results if there are any. + * + * @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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/QueueListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/QueueListResultInner.java new file mode 100644 index 0000000000000..9d3978deb2ea6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/QueueListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +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; + +/** The QueueListResult model. */ +@Fluent +public final class QueueListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueueListResultInner.class); + + /* + * Result of the List Queues operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of queues. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List Queues operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List Queues operation. + * + * @param value the value value to set. + * @return the QueueListResultInner object itself. + */ + public QueueListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * queues. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * queues. + * + * @param nextLink the nextLink value to set. + * @return the QueueListResultInner object itself. + */ + public QueueListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/QueueResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/QueueResourceInner.java new file mode 100644 index 0000000000000..cf03fd6862bfc --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/QueueResourceInner.java @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.models.EntityAvailabilityStatus; +import com.azure.resourcemanager.servicebus.models.EntityStatus; +import com.azure.resourcemanager.servicebus.models.MessageCountDetails; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The QueueResource model. */ +@JsonFlatten +@Fluent +public class QueueResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueueResourceInner.class); + + /* + * The duration of a peek-lock; that is, the amount of time that the + * message is locked for other receivers. The maximum value for + * LockDuration is 5 minutes; the default value is 1 minute. + */ + @JsonProperty(value = "properties.lockDuration") + private String lockDuration; + + /* + * Last time a message was sent, or the last time there was a receive + * request to this queue. + */ + @JsonProperty(value = "properties.accessedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime accessedAt; + + /* + * the TimeSpan idle interval after which the queue is automatically + * deleted. The minimum duration is 5 minutes. + */ + @JsonProperty(value = "properties.autoDeleteOnIdle") + private String autoDeleteOnIdle; + + /* + * Entity availability status for the queue. + */ + @JsonProperty(value = "properties.entityAvailabilityStatus") + private EntityAvailabilityStatus entityAvailabilityStatus; + + /* + * The exact time the message was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service + * Bus. This is the default value used when TimeToLive is not set on a + * message itself. + */ + @JsonProperty(value = "properties.defaultMessageTimeToLive") + private String defaultMessageTimeToLive; + + /* + * TimeSpan structure that defines the duration of the duplicate detection + * history. The default value is 10 minutes. + */ + @JsonProperty(value = "properties.duplicateDetectionHistoryTimeWindow") + private String duplicateDetectionHistoryTimeWindow; + + /* + * A value that indicates whether server-side batched operations are + * enabled. + */ + @JsonProperty(value = "properties.enableBatchedOperations") + private Boolean enableBatchedOperations; + + /* + * A value that indicates whether this queue has dead letter support when a + * message expires. + */ + @JsonProperty(value = "properties.deadLetteringOnMessageExpiration") + private Boolean deadLetteringOnMessageExpiration; + + /* + * A value that indicates whether Express Entities are enabled. An express + * queue holds a message in memory temporarily before writing it to + * persistent storage. + */ + @JsonProperty(value = "properties.enableExpress") + private Boolean enableExpress; + + /* + * A value that indicates whether the queue is to be partitioned across + * multiple message brokers. + */ + @JsonProperty(value = "properties.enablePartitioning") + private Boolean enablePartitioning; + + /* + * A value that indicates whether the message is accessible anonymously. + */ + @JsonProperty(value = "properties.isAnonymousAccessible") + private Boolean isAnonymousAccessible; + + /* + * The maximum delivery count. A message is automatically deadlettered + * after this number of deliveries. + */ + @JsonProperty(value = "properties.maxDeliveryCount") + private Integer maxDeliveryCount; + + /* + * The maximum size of the queue in megabytes, which is the size of memory + * allocated for the queue. + */ + @JsonProperty(value = "properties.maxSizeInMegabytes") + private Long maxSizeInMegabytes; + + /* + * The number of messages in the queue. + */ + @JsonProperty(value = "properties.messageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long messageCount; + + /* + * Message Count Details. + */ + @JsonProperty(value = "properties.countDetails", access = JsonProperty.Access.WRITE_ONLY) + private MessageCountDetails countDetails; + + /* + * A value indicating if this queue requires duplicate detection. + */ + @JsonProperty(value = "properties.requiresDuplicateDetection") + private Boolean requiresDuplicateDetection; + + /* + * A value that indicates whether the queue supports the concept of + * sessions. + */ + @JsonProperty(value = "properties.requiresSession") + private Boolean requiresSession; + + /* + * The size of the queue, in bytes. + */ + @JsonProperty(value = "properties.sizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long sizeInBytes; + + /* + * Enumerates the possible values for the status of a messaging entity. + */ + @JsonProperty(value = "properties.status") + private EntityStatus status; + + /* + * A value that indicates whether the queue supports ordering. + */ + @JsonProperty(value = "properties.supportOrdering") + private Boolean supportOrdering; + + /* + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the lockDuration property: The duration of a peek-lock; that is, the amount of time that the message is + * locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. + * + * @return the lockDuration value. + */ + public String lockDuration() { + return this.lockDuration; + } + + /** + * Set the lockDuration property: The duration of a peek-lock; that is, the amount of time that the message is + * locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. + * + * @param lockDuration the lockDuration value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withLockDuration(String lockDuration) { + this.lockDuration = lockDuration; + return this; + } + + /** + * Get the accessedAt property: Last time a message was sent, or the last time there was a receive request to this + * queue. + * + * @return the accessedAt value. + */ + public OffsetDateTime accessedAt() { + return this.accessedAt; + } + + /** + * Get the autoDeleteOnIdle property: the TimeSpan idle interval after which the queue is automatically deleted. The + * minimum duration is 5 minutes. + * + * @return the autoDeleteOnIdle value. + */ + public String autoDeleteOnIdle() { + return this.autoDeleteOnIdle; + } + + /** + * Set the autoDeleteOnIdle property: the TimeSpan idle interval after which the queue is automatically deleted. The + * minimum duration is 5 minutes. + * + * @param autoDeleteOnIdle the autoDeleteOnIdle value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withAutoDeleteOnIdle(String autoDeleteOnIdle) { + this.autoDeleteOnIdle = autoDeleteOnIdle; + return this; + } + + /** + * Get the entityAvailabilityStatus property: Entity availability status for the queue. + * + * @return the entityAvailabilityStatus value. + */ + public EntityAvailabilityStatus entityAvailabilityStatus() { + return this.entityAvailabilityStatus; + } + + /** + * Set the entityAvailabilityStatus property: Entity availability status for the queue. + * + * @param entityAvailabilityStatus the entityAvailabilityStatus value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withEntityAvailabilityStatus(EntityAvailabilityStatus entityAvailabilityStatus) { + this.entityAvailabilityStatus = entityAvailabilityStatus; + return this; + } + + /** + * Get the createdAt property: The exact time the message was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the defaultMessageTimeToLive property: The default message time to live value. This is the duration after + * which the message expires, starting from when the message is sent to Service Bus. This is the default value used + * when TimeToLive is not set on a message itself. + * + * @return the defaultMessageTimeToLive value. + */ + public String defaultMessageTimeToLive() { + return this.defaultMessageTimeToLive; + } + + /** + * Set the defaultMessageTimeToLive property: The default message time to live value. This is the duration after + * which the message expires, starting from when the message is sent to Service Bus. This is the default value used + * when TimeToLive is not set on a message itself. + * + * @param defaultMessageTimeToLive the defaultMessageTimeToLive value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withDefaultMessageTimeToLive(String defaultMessageTimeToLive) { + this.defaultMessageTimeToLive = defaultMessageTimeToLive; + return this; + } + + /** + * Get the duplicateDetectionHistoryTimeWindow property: TimeSpan structure that defines the duration of the + * duplicate detection history. The default value is 10 minutes. + * + * @return the duplicateDetectionHistoryTimeWindow value. + */ + public String duplicateDetectionHistoryTimeWindow() { + return this.duplicateDetectionHistoryTimeWindow; + } + + /** + * Set the duplicateDetectionHistoryTimeWindow property: TimeSpan structure that defines the duration of the + * duplicate detection history. The default value is 10 minutes. + * + * @param duplicateDetectionHistoryTimeWindow the duplicateDetectionHistoryTimeWindow value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withDuplicateDetectionHistoryTimeWindow(String duplicateDetectionHistoryTimeWindow) { + this.duplicateDetectionHistoryTimeWindow = duplicateDetectionHistoryTimeWindow; + return this; + } + + /** + * Get the enableBatchedOperations property: A value that indicates whether server-side batched operations are + * enabled. + * + * @return the enableBatchedOperations value. + */ + public Boolean enableBatchedOperations() { + return this.enableBatchedOperations; + } + + /** + * Set the enableBatchedOperations property: A value that indicates whether server-side batched operations are + * enabled. + * + * @param enableBatchedOperations the enableBatchedOperations value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withEnableBatchedOperations(Boolean enableBatchedOperations) { + this.enableBatchedOperations = enableBatchedOperations; + return this; + } + + /** + * Get the deadLetteringOnMessageExpiration property: A value that indicates whether this queue has dead letter + * support when a message expires. + * + * @return the deadLetteringOnMessageExpiration value. + */ + public Boolean deadLetteringOnMessageExpiration() { + return this.deadLetteringOnMessageExpiration; + } + + /** + * Set the deadLetteringOnMessageExpiration property: A value that indicates whether this queue has dead letter + * support when a message expires. + * + * @param deadLetteringOnMessageExpiration the deadLetteringOnMessageExpiration value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withDeadLetteringOnMessageExpiration(Boolean deadLetteringOnMessageExpiration) { + this.deadLetteringOnMessageExpiration = deadLetteringOnMessageExpiration; + return this; + } + + /** + * Get the enableExpress property: A value that indicates whether Express Entities are enabled. An express queue + * holds a message in memory temporarily before writing it to persistent storage. + * + * @return the enableExpress value. + */ + public Boolean enableExpress() { + return this.enableExpress; + } + + /** + * Set the enableExpress property: A value that indicates whether Express Entities are enabled. An express queue + * holds a message in memory temporarily before writing it to persistent storage. + * + * @param enableExpress the enableExpress value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withEnableExpress(Boolean enableExpress) { + this.enableExpress = enableExpress; + return this; + } + + /** + * Get the enablePartitioning property: A value that indicates whether the queue is to be partitioned across + * multiple message brokers. + * + * @return the enablePartitioning value. + */ + public Boolean enablePartitioning() { + return this.enablePartitioning; + } + + /** + * Set the enablePartitioning property: A value that indicates whether the queue is to be partitioned across + * multiple message brokers. + * + * @param enablePartitioning the enablePartitioning value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withEnablePartitioning(Boolean enablePartitioning) { + this.enablePartitioning = enablePartitioning; + return this; + } + + /** + * Get the isAnonymousAccessible property: A value that indicates whether the message is accessible anonymously. + * + * @return the isAnonymousAccessible value. + */ + public Boolean isAnonymousAccessible() { + return this.isAnonymousAccessible; + } + + /** + * Set the isAnonymousAccessible property: A value that indicates whether the message is accessible anonymously. + * + * @param isAnonymousAccessible the isAnonymousAccessible value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withIsAnonymousAccessible(Boolean isAnonymousAccessible) { + this.isAnonymousAccessible = isAnonymousAccessible; + return this; + } + + /** + * Get the maxDeliveryCount property: The maximum delivery count. A message is automatically deadlettered after this + * number of deliveries. + * + * @return the maxDeliveryCount value. + */ + public Integer maxDeliveryCount() { + return this.maxDeliveryCount; + } + + /** + * Set the maxDeliveryCount property: The maximum delivery count. A message is automatically deadlettered after this + * number of deliveries. + * + * @param maxDeliveryCount the maxDeliveryCount value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withMaxDeliveryCount(Integer maxDeliveryCount) { + this.maxDeliveryCount = maxDeliveryCount; + return this; + } + + /** + * Get the maxSizeInMegabytes property: The maximum size of the queue in megabytes, which is the size of memory + * allocated for the queue. + * + * @return the maxSizeInMegabytes value. + */ + public Long maxSizeInMegabytes() { + return this.maxSizeInMegabytes; + } + + /** + * Set the maxSizeInMegabytes property: The maximum size of the queue in megabytes, which is the size of memory + * allocated for the queue. + * + * @param maxSizeInMegabytes the maxSizeInMegabytes value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withMaxSizeInMegabytes(Long maxSizeInMegabytes) { + this.maxSizeInMegabytes = maxSizeInMegabytes; + return this; + } + + /** + * Get the messageCount property: The number of messages in the queue. + * + * @return the messageCount value. + */ + public Long messageCount() { + return this.messageCount; + } + + /** + * Get the countDetails property: Message Count Details. + * + * @return the countDetails value. + */ + public MessageCountDetails countDetails() { + return this.countDetails; + } + + /** + * Get the requiresDuplicateDetection property: A value indicating if this queue requires duplicate detection. + * + * @return the requiresDuplicateDetection value. + */ + public Boolean requiresDuplicateDetection() { + return this.requiresDuplicateDetection; + } + + /** + * Set the requiresDuplicateDetection property: A value indicating if this queue requires duplicate detection. + * + * @param requiresDuplicateDetection the requiresDuplicateDetection value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withRequiresDuplicateDetection(Boolean requiresDuplicateDetection) { + this.requiresDuplicateDetection = requiresDuplicateDetection; + return this; + } + + /** + * Get the requiresSession property: A value that indicates whether the queue supports the concept of sessions. + * + * @return the requiresSession value. + */ + public Boolean requiresSession() { + return this.requiresSession; + } + + /** + * Set the requiresSession property: A value that indicates whether the queue supports the concept of sessions. + * + * @param requiresSession the requiresSession value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withRequiresSession(Boolean requiresSession) { + this.requiresSession = requiresSession; + return this; + } + + /** + * Get the sizeInBytes property: The size of the queue, in bytes. + * + * @return the sizeInBytes value. + */ + public Long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Get the status property: Enumerates the possible values for the status of a messaging entity. + * + * @return the status value. + */ + public EntityStatus status() { + return this.status; + } + + /** + * Set the status property: Enumerates the possible values for the status of a messaging entity. + * + * @param status the status value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withStatus(EntityStatus status) { + this.status = status; + return this; + } + + /** + * Get the supportOrdering property: A value that indicates whether the queue supports ordering. + * + * @return the supportOrdering value. + */ + public Boolean supportOrdering() { + return this.supportOrdering; + } + + /** + * Set the supportOrdering property: A value that indicates whether the queue supports ordering. + * + * @param supportOrdering the supportOrdering value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withSupportOrdering(Boolean supportOrdering) { + this.supportOrdering = supportOrdering; + return this; + } + + /** + * Get the updatedAt property: The exact time the message was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the QueueResourceInner object itself. + */ + public QueueResourceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (countDetails() != null) { + countDetails().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/ResourceListKeysInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/ResourceListKeysInner.java new file mode 100644 index 0000000000000..9af4f934f4426 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/ResourceListKeysInner.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +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; + +/** The ResourceListKeys model. */ +@Fluent +public final class ResourceListKeysInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceListKeysInner.class); + + /* + * Primary connection string of the created namespace authorization rule. + */ + @JsonProperty(value = "primaryConnectionString") + private String primaryConnectionString; + + /* + * Secondary connection string of the created namespace authorization rule. + */ + @JsonProperty(value = "secondaryConnectionString") + private String secondaryConnectionString; + + /* + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "primaryKey") + private String primaryKey; + + /* + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "secondaryKey") + private String secondaryKey; + + /* + * A string that describes the authorization rule. + */ + @JsonProperty(value = "keyName") + private String keyName; + + /** + * Get the primaryConnectionString property: Primary connection string of the created namespace authorization rule. + * + * @return the primaryConnectionString value. + */ + public String primaryConnectionString() { + return this.primaryConnectionString; + } + + /** + * Set the primaryConnectionString property: Primary connection string of the created namespace authorization rule. + * + * @param primaryConnectionString the primaryConnectionString value to set. + * @return the ResourceListKeysInner object itself. + */ + public ResourceListKeysInner withPrimaryConnectionString(String primaryConnectionString) { + this.primaryConnectionString = primaryConnectionString; + return this; + } + + /** + * Get the secondaryConnectionString property: Secondary connection string of the created namespace authorization + * rule. + * + * @return the secondaryConnectionString value. + */ + public String secondaryConnectionString() { + return this.secondaryConnectionString; + } + + /** + * Set the secondaryConnectionString property: Secondary connection string of the created namespace authorization + * rule. + * + * @param secondaryConnectionString the secondaryConnectionString value to set. + * @return the ResourceListKeysInner object itself. + */ + public ResourceListKeysInner withSecondaryConnectionString(String secondaryConnectionString) { + this.secondaryConnectionString = secondaryConnectionString; + return this; + } + + /** + * Get the primaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the primaryKey value. + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Set the primaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @param primaryKey the primaryKey value to set. + * @return the ResourceListKeysInner object itself. + */ + public ResourceListKeysInner withPrimaryKey(String primaryKey) { + this.primaryKey = primaryKey; + return this; + } + + /** + * Get the secondaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the secondaryKey value. + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Set the secondaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @param secondaryKey the secondaryKey value to set. + * @return the ResourceListKeysInner object itself. + */ + public ResourceListKeysInner withSecondaryKey(String secondaryKey) { + this.secondaryKey = secondaryKey; + return this; + } + + /** + * Get the keyName property: A string that describes the authorization rule. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the keyName property: A string that describes the authorization rule. + * + * @param keyName the keyName value to set. + * @return the ResourceListKeysInner object itself. + */ + public ResourceListKeysInner withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SharedAccessAuthorizationRuleListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SharedAccessAuthorizationRuleListResultInner.java new file mode 100644 index 0000000000000..84ed7bcb6f508 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SharedAccessAuthorizationRuleListResultInner.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +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; + +/** The SharedAccessAuthorizationRuleListResult model. */ +@Fluent +public final class SharedAccessAuthorizationRuleListResultInner { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(SharedAccessAuthorizationRuleListResultInner.class); + + /* + * Result of the List Authorization Rules operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of Authorization Rules. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List Authorization Rules operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List Authorization Rules operation. + * + * @param value the value value to set. + * @return the SharedAccessAuthorizationRuleListResultInner object itself. + */ + public SharedAccessAuthorizationRuleListResultInner withValue( + List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Authorization Rules. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Authorization Rules. + * + * @param nextLink the nextLink value to set. + * @return the SharedAccessAuthorizationRuleListResultInner object itself. + */ + public SharedAccessAuthorizationRuleListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SharedAccessAuthorizationRuleResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SharedAccessAuthorizationRuleResourceInner.java new file mode 100644 index 0000000000000..4c0f806f7046e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SharedAccessAuthorizationRuleResourceInner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.models.AccessRights; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The SharedAccessAuthorizationRuleResource model. */ +@JsonFlatten +@Fluent +public class SharedAccessAuthorizationRuleResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedAccessAuthorizationRuleResourceInner.class); + + /* + * The rights associated with the rule. + */ + @JsonProperty(value = "properties.rights") + private List rights; + + /* + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the rights property: The rights associated with the rule. + * + * @return the rights value. + */ + public List rights() { + return this.rights; + } + + /** + * Set the rights property: The rights associated with the rule. + * + * @param rights the rights value to set. + * @return the SharedAccessAuthorizationRuleResourceInner object itself. + */ + public SharedAccessAuthorizationRuleResourceInner withRights(List rights) { + this.rights = rights; + return this; + } + + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the SharedAccessAuthorizationRuleResourceInner object itself. + */ + public SharedAccessAuthorizationRuleResourceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SubscriptionListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SubscriptionListResultInner.java new file mode 100644 index 0000000000000..24af408791ece --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SubscriptionListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +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; + +/** The SubscriptionListResult model. */ +@Fluent +public final class SubscriptionListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionListResultInner.class); + + /* + * Result of the List Subscriptions operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of subscriptions. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List Subscriptions operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List Subscriptions operation. + * + * @param value the value value to set. + * @return the SubscriptionListResultInner object itself. + */ + public SubscriptionListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * subscriptions. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * subscriptions. + * + * @param nextLink the nextLink value to set. + * @return the SubscriptionListResultInner object itself. + */ + public SubscriptionListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SubscriptionResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SubscriptionResourceInner.java new file mode 100644 index 0000000000000..562bd720e282d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/SubscriptionResourceInner.java @@ -0,0 +1,440 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.models.EntityAvailabilityStatus; +import com.azure.resourcemanager.servicebus.models.EntityStatus; +import com.azure.resourcemanager.servicebus.models.MessageCountDetails; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The SubscriptionResource model. */ +@JsonFlatten +@Fluent +public class SubscriptionResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionResourceInner.class); + + /* + * Last time there was a receive request to this subscription. + */ + @JsonProperty(value = "properties.accessedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime accessedAt; + + /* + * TimeSpan idle interval after which the topic is automatically deleted. + * The minimum duration is 5 minutes. + */ + @JsonProperty(value = "properties.autoDeleteOnIdle") + private String autoDeleteOnIdle; + + /* + * Message Count Details. + */ + @JsonProperty(value = "properties.countDetails", access = JsonProperty.Access.WRITE_ONLY) + private MessageCountDetails countDetails; + + /* + * Exact time the message was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * Default message time to live value. This is the duration after which the + * message expires, starting from when the message is sent to Service Bus. + * This is the default value used when TimeToLive is not set on a message + * itself. + */ + @JsonProperty(value = "properties.defaultMessageTimeToLive") + private String defaultMessageTimeToLive; + + /* + * Value that indicates whether a subscription has dead letter support on + * filter evaluation exceptions. + */ + @JsonProperty(value = "properties.deadLetteringOnFilterEvaluationExceptions") + private Boolean deadLetteringOnFilterEvaluationExceptions; + + /* + * Value that indicates whether a subscription has dead letter support when + * a message expires. + */ + @JsonProperty(value = "properties.deadLetteringOnMessageExpiration") + private Boolean deadLetteringOnMessageExpiration; + + /* + * Value that indicates whether server-side batched operations are enabled. + */ + @JsonProperty(value = "properties.enableBatchedOperations") + private Boolean enableBatchedOperations; + + /* + * Entity availability status for the topic. + */ + @JsonProperty(value = "properties.entityAvailabilityStatus") + private EntityAvailabilityStatus entityAvailabilityStatus; + + /* + * Value that indicates whether the entity description is read-only. + */ + @JsonProperty(value = "properties.isReadOnly") + private Boolean isReadOnly; + + /* + * The lock duration time span for the subscription. + */ + @JsonProperty(value = "properties.lockDuration") + private String lockDuration; + + /* + * Number of maximum deliveries. + */ + @JsonProperty(value = "properties.maxDeliveryCount") + private Integer maxDeliveryCount; + + /* + * Number of messages. + */ + @JsonProperty(value = "properties.messageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long messageCount; + + /* + * Value indicating if a subscription supports the concept of sessions. + */ + @JsonProperty(value = "properties.requiresSession") + private Boolean requiresSession; + + /* + * Enumerates the possible values for the status of a messaging entity. + */ + @JsonProperty(value = "properties.status") + private EntityStatus status; + + /* + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the accessedAt property: Last time there was a receive request to this subscription. + * + * @return the accessedAt value. + */ + public OffsetDateTime accessedAt() { + return this.accessedAt; + } + + /** + * Get the autoDeleteOnIdle property: TimeSpan idle interval after which the topic is automatically deleted. The + * minimum duration is 5 minutes. + * + * @return the autoDeleteOnIdle value. + */ + public String autoDeleteOnIdle() { + return this.autoDeleteOnIdle; + } + + /** + * Set the autoDeleteOnIdle property: TimeSpan idle interval after which the topic is automatically deleted. The + * minimum duration is 5 minutes. + * + * @param autoDeleteOnIdle the autoDeleteOnIdle value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withAutoDeleteOnIdle(String autoDeleteOnIdle) { + this.autoDeleteOnIdle = autoDeleteOnIdle; + return this; + } + + /** + * Get the countDetails property: Message Count Details. + * + * @return the countDetails value. + */ + public MessageCountDetails countDetails() { + return this.countDetails; + } + + /** + * Get the createdAt property: Exact time the message was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the defaultMessageTimeToLive property: Default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service Bus. This is the default value used when + * TimeToLive is not set on a message itself. + * + * @return the defaultMessageTimeToLive value. + */ + public String defaultMessageTimeToLive() { + return this.defaultMessageTimeToLive; + } + + /** + * Set the defaultMessageTimeToLive property: Default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service Bus. This is the default value used when + * TimeToLive is not set on a message itself. + * + * @param defaultMessageTimeToLive the defaultMessageTimeToLive value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withDefaultMessageTimeToLive(String defaultMessageTimeToLive) { + this.defaultMessageTimeToLive = defaultMessageTimeToLive; + return this; + } + + /** + * Get the deadLetteringOnFilterEvaluationExceptions property: Value that indicates whether a subscription has dead + * letter support on filter evaluation exceptions. + * + * @return the deadLetteringOnFilterEvaluationExceptions value. + */ + public Boolean deadLetteringOnFilterEvaluationExceptions() { + return this.deadLetteringOnFilterEvaluationExceptions; + } + + /** + * Set the deadLetteringOnFilterEvaluationExceptions property: Value that indicates whether a subscription has dead + * letter support on filter evaluation exceptions. + * + * @param deadLetteringOnFilterEvaluationExceptions the deadLetteringOnFilterEvaluationExceptions value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withDeadLetteringOnFilterEvaluationExceptions( + Boolean deadLetteringOnFilterEvaluationExceptions) { + this.deadLetteringOnFilterEvaluationExceptions = deadLetteringOnFilterEvaluationExceptions; + return this; + } + + /** + * Get the deadLetteringOnMessageExpiration property: Value that indicates whether a subscription has dead letter + * support when a message expires. + * + * @return the deadLetteringOnMessageExpiration value. + */ + public Boolean deadLetteringOnMessageExpiration() { + return this.deadLetteringOnMessageExpiration; + } + + /** + * Set the deadLetteringOnMessageExpiration property: Value that indicates whether a subscription has dead letter + * support when a message expires. + * + * @param deadLetteringOnMessageExpiration the deadLetteringOnMessageExpiration value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withDeadLetteringOnMessageExpiration(Boolean deadLetteringOnMessageExpiration) { + this.deadLetteringOnMessageExpiration = deadLetteringOnMessageExpiration; + return this; + } + + /** + * Get the enableBatchedOperations property: Value that indicates whether server-side batched operations are + * enabled. + * + * @return the enableBatchedOperations value. + */ + public Boolean enableBatchedOperations() { + return this.enableBatchedOperations; + } + + /** + * Set the enableBatchedOperations property: Value that indicates whether server-side batched operations are + * enabled. + * + * @param enableBatchedOperations the enableBatchedOperations value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withEnableBatchedOperations(Boolean enableBatchedOperations) { + this.enableBatchedOperations = enableBatchedOperations; + return this; + } + + /** + * Get the entityAvailabilityStatus property: Entity availability status for the topic. + * + * @return the entityAvailabilityStatus value. + */ + public EntityAvailabilityStatus entityAvailabilityStatus() { + return this.entityAvailabilityStatus; + } + + /** + * Set the entityAvailabilityStatus property: Entity availability status for the topic. + * + * @param entityAvailabilityStatus the entityAvailabilityStatus value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withEntityAvailabilityStatus(EntityAvailabilityStatus entityAvailabilityStatus) { + this.entityAvailabilityStatus = entityAvailabilityStatus; + return this; + } + + /** + * Get the isReadOnly property: Value that indicates whether the entity description is read-only. + * + * @return the isReadOnly value. + */ + public Boolean isReadOnly() { + return this.isReadOnly; + } + + /** + * Set the isReadOnly property: Value that indicates whether the entity description is read-only. + * + * @param isReadOnly the isReadOnly value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withIsReadOnly(Boolean isReadOnly) { + this.isReadOnly = isReadOnly; + return this; + } + + /** + * Get the lockDuration property: The lock duration time span for the subscription. + * + * @return the lockDuration value. + */ + public String lockDuration() { + return this.lockDuration; + } + + /** + * Set the lockDuration property: The lock duration time span for the subscription. + * + * @param lockDuration the lockDuration value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withLockDuration(String lockDuration) { + this.lockDuration = lockDuration; + return this; + } + + /** + * Get the maxDeliveryCount property: Number of maximum deliveries. + * + * @return the maxDeliveryCount value. + */ + public Integer maxDeliveryCount() { + return this.maxDeliveryCount; + } + + /** + * Set the maxDeliveryCount property: Number of maximum deliveries. + * + * @param maxDeliveryCount the maxDeliveryCount value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withMaxDeliveryCount(Integer maxDeliveryCount) { + this.maxDeliveryCount = maxDeliveryCount; + return this; + } + + /** + * Get the messageCount property: Number of messages. + * + * @return the messageCount value. + */ + public Long messageCount() { + return this.messageCount; + } + + /** + * Get the requiresSession property: Value indicating if a subscription supports the concept of sessions. + * + * @return the requiresSession value. + */ + public Boolean requiresSession() { + return this.requiresSession; + } + + /** + * Set the requiresSession property: Value indicating if a subscription supports the concept of sessions. + * + * @param requiresSession the requiresSession value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withRequiresSession(Boolean requiresSession) { + this.requiresSession = requiresSession; + return this; + } + + /** + * Get the status property: Enumerates the possible values for the status of a messaging entity. + * + * @return the status value. + */ + public EntityStatus status() { + return this.status; + } + + /** + * Set the status property: Enumerates the possible values for the status of a messaging entity. + * + * @param status the status value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withStatus(EntityStatus status) { + this.status = status; + return this; + } + + /** + * Get the updatedAt property: The exact time the message was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the SubscriptionResourceInner object itself. + */ + public SubscriptionResourceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (countDetails() != null) { + countDetails().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/TopicListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/TopicListResultInner.java new file mode 100644 index 0000000000000..abadf872c7bee --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/TopicListResultInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +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; + +/** The TopicListResult model. */ +@Fluent +public final class TopicListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopicListResultInner.class); + + /* + * Result of the List Topics operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. Not empty if Value contains incomplete + * list of topics. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Result of the List Topics operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Result of the List Topics operation. + * + * @param value the value value to set. + * @return the TopicListResultInner object itself. + */ + public TopicListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * topics. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * topics. + * + * @param nextLink the nextLink value to set. + * @return the TopicListResultInner object itself. + */ + public TopicListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/TopicResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/TopicResourceInner.java new file mode 100644 index 0000000000000..a0fe57762a68a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/TopicResourceInner.java @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.servicebus.models.EntityAvailabilityStatus; +import com.azure.resourcemanager.servicebus.models.EntityStatus; +import com.azure.resourcemanager.servicebus.models.MessageCountDetails; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TopicResource model. */ +@JsonFlatten +@Fluent +public class TopicResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopicResourceInner.class); + + /* + * Last time the message was sent, or a request was received, for this + * topic. + */ + @JsonProperty(value = "properties.accessedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime accessedAt; + + /* + * TimeSpan idle interval after which the topic is automatically deleted. + * The minimum duration is 5 minutes. + */ + @JsonProperty(value = "properties.autoDeleteOnIdle") + private String autoDeleteOnIdle; + + /* + * Entity availability status for the topic. + */ + @JsonProperty(value = "properties.entityAvailabilityStatus") + private EntityAvailabilityStatus entityAvailabilityStatus; + + /* + * Exact time the message was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * Message Count Details. + */ + @JsonProperty(value = "properties.countDetails", access = JsonProperty.Access.WRITE_ONLY) + private MessageCountDetails countDetails; + + /* + * Default message time to live value. This is the duration after which the + * message expires, starting from when the message is sent to Service Bus. + * This is the default value used when TimeToLive is not set on a message + * itself. + */ + @JsonProperty(value = "properties.defaultMessageTimeToLive") + private String defaultMessageTimeToLive; + + /* + * TimeSpan structure that defines the duration of the duplicate detection + * history. The default value is 10 minutes. + */ + @JsonProperty(value = "properties.duplicateDetectionHistoryTimeWindow") + private String duplicateDetectionHistoryTimeWindow; + + /* + * Value that indicates whether server-side batched operations are enabled. + */ + @JsonProperty(value = "properties.enableBatchedOperations") + private Boolean enableBatchedOperations; + + /* + * Value that indicates whether Express Entities are enabled. An express + * topic holds a message in memory temporarily before writing it to + * persistent storage. + */ + @JsonProperty(value = "properties.enableExpress") + private Boolean enableExpress; + + /* + * Value that indicates whether the topic to be partitioned across multiple + * message brokers is enabled. + */ + @JsonProperty(value = "properties.enablePartitioning") + private Boolean enablePartitioning; + + /* + * Whether messages should be filtered before publishing. + */ + @JsonProperty(value = "properties.filteringMessagesBeforePublishing") + private Boolean filteringMessagesBeforePublishing; + + /* + * Value that indicates whether the message is accessible anonymously. + */ + @JsonProperty(value = "properties.isAnonymousAccessible") + private Boolean isAnonymousAccessible; + + /* + * The isExpress property. + */ + @JsonProperty(value = "properties.isExpress") + private Boolean isExpress; + + /* + * Maximum size of the topic in megabytes, which is the size of the memory + * allocated for the topic. + */ + @JsonProperty(value = "properties.maxSizeInMegabytes") + private Long maxSizeInMegabytes; + + /* + * Value indicating if this topic requires duplicate detection. + */ + @JsonProperty(value = "properties.requiresDuplicateDetection") + private Boolean requiresDuplicateDetection; + + /* + * Size of the topic, in bytes. + */ + @JsonProperty(value = "properties.sizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long sizeInBytes; + + /* + * Enumerates the possible values for the status of a messaging entity. + */ + @JsonProperty(value = "properties.status") + private EntityStatus status; + + /* + * Number of subscriptions. + */ + @JsonProperty(value = "properties.subscriptionCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer subscriptionCount; + + /* + * Value that indicates whether the topic supports ordering. + */ + @JsonProperty(value = "properties.supportOrdering") + private Boolean supportOrdering; + + /* + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the accessedAt property: Last time the message was sent, or a request was received, for this topic. + * + * @return the accessedAt value. + */ + public OffsetDateTime accessedAt() { + return this.accessedAt; + } + + /** + * Get the autoDeleteOnIdle property: TimeSpan idle interval after which the topic is automatically deleted. The + * minimum duration is 5 minutes. + * + * @return the autoDeleteOnIdle value. + */ + public String autoDeleteOnIdle() { + return this.autoDeleteOnIdle; + } + + /** + * Set the autoDeleteOnIdle property: TimeSpan idle interval after which the topic is automatically deleted. The + * minimum duration is 5 minutes. + * + * @param autoDeleteOnIdle the autoDeleteOnIdle value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withAutoDeleteOnIdle(String autoDeleteOnIdle) { + this.autoDeleteOnIdle = autoDeleteOnIdle; + return this; + } + + /** + * Get the entityAvailabilityStatus property: Entity availability status for the topic. + * + * @return the entityAvailabilityStatus value. + */ + public EntityAvailabilityStatus entityAvailabilityStatus() { + return this.entityAvailabilityStatus; + } + + /** + * Set the entityAvailabilityStatus property: Entity availability status for the topic. + * + * @param entityAvailabilityStatus the entityAvailabilityStatus value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withEntityAvailabilityStatus(EntityAvailabilityStatus entityAvailabilityStatus) { + this.entityAvailabilityStatus = entityAvailabilityStatus; + return this; + } + + /** + * Get the createdAt property: Exact time the message was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the countDetails property: Message Count Details. + * + * @return the countDetails value. + */ + public MessageCountDetails countDetails() { + return this.countDetails; + } + + /** + * Get the defaultMessageTimeToLive property: Default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service Bus. This is the default value used when + * TimeToLive is not set on a message itself. + * + * @return the defaultMessageTimeToLive value. + */ + public String defaultMessageTimeToLive() { + return this.defaultMessageTimeToLive; + } + + /** + * Set the defaultMessageTimeToLive property: Default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service Bus. This is the default value used when + * TimeToLive is not set on a message itself. + * + * @param defaultMessageTimeToLive the defaultMessageTimeToLive value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withDefaultMessageTimeToLive(String defaultMessageTimeToLive) { + this.defaultMessageTimeToLive = defaultMessageTimeToLive; + return this; + } + + /** + * Get the duplicateDetectionHistoryTimeWindow property: TimeSpan structure that defines the duration of the + * duplicate detection history. The default value is 10 minutes. + * + * @return the duplicateDetectionHistoryTimeWindow value. + */ + public String duplicateDetectionHistoryTimeWindow() { + return this.duplicateDetectionHistoryTimeWindow; + } + + /** + * Set the duplicateDetectionHistoryTimeWindow property: TimeSpan structure that defines the duration of the + * duplicate detection history. The default value is 10 minutes. + * + * @param duplicateDetectionHistoryTimeWindow the duplicateDetectionHistoryTimeWindow value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withDuplicateDetectionHistoryTimeWindow(String duplicateDetectionHistoryTimeWindow) { + this.duplicateDetectionHistoryTimeWindow = duplicateDetectionHistoryTimeWindow; + return this; + } + + /** + * Get the enableBatchedOperations property: Value that indicates whether server-side batched operations are + * enabled. + * + * @return the enableBatchedOperations value. + */ + public Boolean enableBatchedOperations() { + return this.enableBatchedOperations; + } + + /** + * Set the enableBatchedOperations property: Value that indicates whether server-side batched operations are + * enabled. + * + * @param enableBatchedOperations the enableBatchedOperations value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withEnableBatchedOperations(Boolean enableBatchedOperations) { + this.enableBatchedOperations = enableBatchedOperations; + return this; + } + + /** + * Get the enableExpress property: Value that indicates whether Express Entities are enabled. An express topic holds + * a message in memory temporarily before writing it to persistent storage. + * + * @return the enableExpress value. + */ + public Boolean enableExpress() { + return this.enableExpress; + } + + /** + * Set the enableExpress property: Value that indicates whether Express Entities are enabled. An express topic holds + * a message in memory temporarily before writing it to persistent storage. + * + * @param enableExpress the enableExpress value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withEnableExpress(Boolean enableExpress) { + this.enableExpress = enableExpress; + return this; + } + + /** + * Get the enablePartitioning property: Value that indicates whether the topic to be partitioned across multiple + * message brokers is enabled. + * + * @return the enablePartitioning value. + */ + public Boolean enablePartitioning() { + return this.enablePartitioning; + } + + /** + * Set the enablePartitioning property: Value that indicates whether the topic to be partitioned across multiple + * message brokers is enabled. + * + * @param enablePartitioning the enablePartitioning value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withEnablePartitioning(Boolean enablePartitioning) { + this.enablePartitioning = enablePartitioning; + return this; + } + + /** + * Get the filteringMessagesBeforePublishing property: Whether messages should be filtered before publishing. + * + * @return the filteringMessagesBeforePublishing value. + */ + public Boolean filteringMessagesBeforePublishing() { + return this.filteringMessagesBeforePublishing; + } + + /** + * Set the filteringMessagesBeforePublishing property: Whether messages should be filtered before publishing. + * + * @param filteringMessagesBeforePublishing the filteringMessagesBeforePublishing value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withFilteringMessagesBeforePublishing(Boolean filteringMessagesBeforePublishing) { + this.filteringMessagesBeforePublishing = filteringMessagesBeforePublishing; + return this; + } + + /** + * Get the isAnonymousAccessible property: Value that indicates whether the message is accessible anonymously. + * + * @return the isAnonymousAccessible value. + */ + public Boolean isAnonymousAccessible() { + return this.isAnonymousAccessible; + } + + /** + * Set the isAnonymousAccessible property: Value that indicates whether the message is accessible anonymously. + * + * @param isAnonymousAccessible the isAnonymousAccessible value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withIsAnonymousAccessible(Boolean isAnonymousAccessible) { + this.isAnonymousAccessible = isAnonymousAccessible; + return this; + } + + /** + * Get the isExpress property: The isExpress property. + * + * @return the isExpress value. + */ + public Boolean isExpress() { + return this.isExpress; + } + + /** + * Set the isExpress property: The isExpress property. + * + * @param isExpress the isExpress value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withIsExpress(Boolean isExpress) { + this.isExpress = isExpress; + return this; + } + + /** + * Get the maxSizeInMegabytes property: Maximum size of the topic in megabytes, which is the size of the memory + * allocated for the topic. + * + * @return the maxSizeInMegabytes value. + */ + public Long maxSizeInMegabytes() { + return this.maxSizeInMegabytes; + } + + /** + * Set the maxSizeInMegabytes property: Maximum size of the topic in megabytes, which is the size of the memory + * allocated for the topic. + * + * @param maxSizeInMegabytes the maxSizeInMegabytes value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withMaxSizeInMegabytes(Long maxSizeInMegabytes) { + this.maxSizeInMegabytes = maxSizeInMegabytes; + return this; + } + + /** + * Get the requiresDuplicateDetection property: Value indicating if this topic requires duplicate detection. + * + * @return the requiresDuplicateDetection value. + */ + public Boolean requiresDuplicateDetection() { + return this.requiresDuplicateDetection; + } + + /** + * Set the requiresDuplicateDetection property: Value indicating if this topic requires duplicate detection. + * + * @param requiresDuplicateDetection the requiresDuplicateDetection value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withRequiresDuplicateDetection(Boolean requiresDuplicateDetection) { + this.requiresDuplicateDetection = requiresDuplicateDetection; + return this; + } + + /** + * Get the sizeInBytes property: Size of the topic, in bytes. + * + * @return the sizeInBytes value. + */ + public Long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Get the status property: Enumerates the possible values for the status of a messaging entity. + * + * @return the status value. + */ + public EntityStatus status() { + return this.status; + } + + /** + * Set the status property: Enumerates the possible values for the status of a messaging entity. + * + * @param status the status value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withStatus(EntityStatus status) { + this.status = status; + return this; + } + + /** + * Get the subscriptionCount property: Number of subscriptions. + * + * @return the subscriptionCount value. + */ + public Integer subscriptionCount() { + return this.subscriptionCount; + } + + /** + * Get the supportOrdering property: Value that indicates whether the topic supports ordering. + * + * @return the supportOrdering value. + */ + public Boolean supportOrdering() { + return this.supportOrdering; + } + + /** + * Set the supportOrdering property: Value that indicates whether the topic supports ordering. + * + * @param supportOrdering the supportOrdering value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withSupportOrdering(Boolean supportOrdering) { + this.supportOrdering = supportOrdering; + return this; + } + + /** + * Get the updatedAt property: The exact time the message was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the TopicResourceInner object itself. + */ + public TopicResourceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (countDetails() != null) { + countDetails().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/package-info.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/package-info.java new file mode 100644 index 0000000000000..df9989641bc09 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/inner/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the inner classes for ServiceBusManagementClient. Azure Service Bus client. */ +package com.azure.resourcemanager.servicebus.fluent.inner; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/package-info.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/package-info.java new file mode 100644 index 0000000000000..e4af9f5365295 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the client classes for ServiceBusManagementClient. Azure Service Bus client. */ +package com.azure.resourcemanager.servicebus.fluent; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/AuthorizationKeysImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/AuthorizationKeysImpl.java new file mode 100644 index 0000000000000..8c3793ad25b79 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/AuthorizationKeysImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; + +/** + * Implementation for AuthorizationKeys. + */ +class AuthorizationKeysImpl + extends WrapperImpl + implements AuthorizationKeys { + + AuthorizationKeysImpl(ResourceListKeysInner inner) { + super(inner); + } + + @Override + public String primaryKey() { + return this.inner().primaryKey(); + } + + @Override + public String secondaryKey() { + return this.inner().secondaryKey(); + } + + @Override + public String primaryConnectionString() { + return this.inner().primaryConnectionString(); + } + + @Override + public String secondaryConnectionString() { + return this.inner().secondaryConnectionString(); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/AuthorizationRuleBaseImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/AuthorizationRuleBaseImpl.java new file mode 100644 index 0000000000000..4e27d0d2e6ff1 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/AuthorizationRuleBaseImpl.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChildResource; +import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.IndependentChildResourceImpl; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.AccessRights; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters; +import reactor.core.publisher.Mono; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Base type for various entity specific authorization rules. + * + * @param the rule fluent interface + * @param the rule parent fluent interface + * @param the rule inner model + * @param the parent fluent implementation + * @param the manager + */ +abstract class AuthorizationRuleBaseImpl< + FluentModelT extends IndependentChildResource, + FluentParentModelT extends Resource & HasResourceGroup, + InnerModelT extends SharedAccessAuthorizationRuleResourceInner, + FluentModelImplT extends IndependentChildResourceImpl< + FluentModelT, + FluentParentModelT, + InnerModelT, + FluentModelImplT, + ManagerT>, + ManagerT> extends IndependentChildResourceImpl { + protected AuthorizationRuleBaseImpl(String name, InnerModelT innerObject, ManagerT manager) { + super(name, innerObject, manager); + } + + /** + * @return stream that emits primary, secondary keys and connection strings + */ + public Mono getKeysAsync() { + return this.getKeysInnerAsync() + .map(inner -> new AuthorizationKeysImpl(inner)); + } + + /** + * @return primary, secondary keys and connection strings + */ + public AuthorizationKeys getKeys() { + return getKeysAsync().block(); + } + + /** + * Regenerates primary or secondary keys. + * + * @param policykey the key to regenerate + * @return stream that emits primary, secondary keys and connection strings + */ + public Mono regenerateKeyAsync(Policykey policykey) { + return this.regenerateKeysInnerAsync(policykey) + .map(inner -> new AuthorizationKeysImpl(inner)); + } + + /** + * Regenerates primary or secondary keys. + * + * @param policykey the key to regenerate + * @return primary, secondary keys and connection strings + */ + public AuthorizationKeys regenerateKey(Policykey policykey) { + return regenerateKeyAsync(policykey).block(); + } + + public List rights() { + if (this.inner().rights() == null) { + return Collections.unmodifiableList(new ArrayList()); + } + return Collections.unmodifiableList(this.inner().rights()); + } + + @SuppressWarnings("unchecked") + public FluentModelImplT withListeningEnabled() { + if (this.inner().rights() == null) { + this.inner().withRights(new ArrayList()); + } + if (!this.inner().rights().contains(AccessRights.LISTEN)) { + this.inner().rights().add(AccessRights.LISTEN); + } + return (FluentModelImplT) this; + } + + @SuppressWarnings("unchecked") + public FluentModelImplT withSendingEnabled() { + if (this.inner().rights() == null) { + this.inner().withRights(new ArrayList()); + } + if (!this.inner().rights().contains(AccessRights.SEND)) { + this.inner().rights().add(AccessRights.SEND); + } + return (FluentModelImplT) this; + } + + @SuppressWarnings("unchecked") + public FluentModelImplT withManagementEnabled() { + withListeningEnabled(); + withSendingEnabled(); + if (!this.inner().rights().contains(AccessRights.MANAGE)) { + this.inner().rights().add(AccessRights.MANAGE); + } + return (FluentModelImplT) this; + } + + protected SharedAccessAuthorizationRuleCreateOrUpdateParameters prepareForCreate( + SharedAccessAuthorizationRuleResourceInner inner) { + return new SharedAccessAuthorizationRuleCreateOrUpdateParameters().withRights(inner.rights()); + } + + protected abstract Mono getKeysInnerAsync(); + protected abstract Mono regenerateKeysInnerAsync(Policykey policykey); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/CheckNameAvailabilityResultImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/CheckNameAvailabilityResultImpl.java new file mode 100644 index 0000000000000..2f6ba3348cc28 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/CheckNameAvailabilityResultImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import com.azure.resourcemanager.servicebus.fluent.inner.CheckNameAvailabilityResultInner; +import com.azure.resourcemanager.servicebus.models.CheckNameAvailabilityResult; +import com.azure.resourcemanager.servicebus.models.UnavailableReason; + +/** + * Implementation for CheckNameAvailabilityResult. + */ +class CheckNameAvailabilityResultImpl + extends WrapperImpl + implements CheckNameAvailabilityResult { + /** + * Creates an instance of the check name availability result object. + * + * @param inner the inner object + */ + CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner inner) { + super(inner); + } + + @Override + public boolean isAvailable() { + return inner().nameAvailable(); + } + + @Override + public UnavailableReason unavailabilityReason() { + return inner().reason(); + } + + @Override + public String unavailabilityMessage() { + return inner().message(); + } +} + diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/NamespaceAuthorizationRuleImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/NamespaceAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..1303711310249 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/NamespaceAuthorizationRuleImpl.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.Policykey; +import reactor.core.publisher.Mono; + +/** + * Implementation for NamespaceAuthorizationRule. + */ +class NamespaceAuthorizationRuleImpl extends AuthorizationRuleBaseImpl + implements + NamespaceAuthorizationRule, + NamespaceAuthorizationRule.Definition, + NamespaceAuthorizationRule.Update { + private final Region region; + + NamespaceAuthorizationRuleImpl(String resourceGroupName, + String namespaceName, + String name, + Region region, + SharedAccessAuthorizationRuleResourceInner inner, + ServiceBusManager manager) { + super(name, inner, manager); + this.region = region; + this.withExistingParentResource(resourceGroupName, namespaceName); + if (inner.location() == null) { + inner.withLocation(this.region.toString()); + } + } + + @Override + public String namespaceName() { + return this.parentName; + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getNamespaces() + .getAuthorizationRuleAsync(this.resourceGroupName(), + this.namespaceName(), + this.name()); + } + + @Override + protected Mono createChildResourceAsync() { + final NamespaceAuthorizationRule self = this; + return this.manager().inner().getNamespaces().createOrUpdateAuthorizationRuleAsync(this.resourceGroupName(), + this.namespaceName(), + this.name(), + prepareForCreate(this.inner())) + .map(inner -> { + setInner(inner); + return self; + }); + } + + @Override + protected Mono getKeysInnerAsync() { + return this.manager().inner().getNamespaces() + .listKeysAsync(this.resourceGroupName(), + this.namespaceName(), + this.name()); + } + + @Override + protected Mono regenerateKeysInnerAsync(Policykey policykey) { + return this.manager().inner().getNamespaces() + .regenerateKeysAsync(this.resourceGroupName(), + this.namespaceName(), + this.name(), + policykey); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/NamespaceAuthorizationRulesImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/NamespaceAuthorizationRulesImpl.java new file mode 100644 index 0000000000000..5663d6338cf2c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/NamespaceAuthorizationRulesImpl.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.NamespacesClient; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRules; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import reactor.core.publisher.Mono; + +/** + * Implementation for NamespaceAuthorizationRules. + */ +class NamespaceAuthorizationRulesImpl + extends ServiceBusChildResourcesImpl< + NamespaceAuthorizationRule, + NamespaceAuthorizationRuleImpl, + SharedAccessAuthorizationRuleResourceInner, + NamespacesClient, + ServiceBusManager, + ServiceBusNamespace> + implements NamespaceAuthorizationRules { + private final String resourceGroupName; + private final String namespaceName; + private final Region region; + + private final ClientLogger logger = new ClientLogger(NamespaceAuthorizationRulesImpl.class); + + NamespaceAuthorizationRulesImpl(String resourceGroupName, + String namespaceName, + Region region, + ServiceBusManager manager) { + super(manager.inner().getNamespaces(), manager); + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.region = region; + } + + @Override + public NamespaceAuthorizationRuleImpl define(String name) { + return wrapModel(name); + } + + @Override + public Mono deleteByNameAsync(String name) { + return this.inner().deleteAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, name); + } + + @Override + protected Mono getInnerByNameAsync(String name) { + return this.inner().getAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, name); + } + + @Override + protected PagedFlux listInnerAsync() { + return this.inner().listAuthorizationRulesAsync(this.resourceGroupName, this.namespaceName); + } + + @Override + protected PagedIterable listInner() { + return this.inner().listAuthorizationRules(this.resourceGroupName, + this.namespaceName); + } + + @Override + protected NamespaceAuthorizationRuleImpl wrapModel(String name) { + return new NamespaceAuthorizationRuleImpl(this.resourceGroupName, + this.namespaceName, + name, + this.region, + new SharedAccessAuthorizationRuleResourceInner(), + this.manager()); + } + + + @Override + protected NamespaceAuthorizationRuleImpl wrapModel(SharedAccessAuthorizationRuleResourceInner inner) { + if (inner == null) { + return null; + } + return new NamespaceAuthorizationRuleImpl(this.resourceGroupName, + this.namespaceName, + inner.name(), + this.region, + inner, + this.manager()); + } + + + @Override + public PagedIterable listByParent(String resourceGroupName, String parentName) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono deleteByParentAsync(String groupName, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono getByParentAsync(String resourceGroup, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueAuthorizationRuleImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..efeb4e270a60b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueAuthorizationRuleImpl.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.QueueAuthorizationRule; +import reactor.core.publisher.Mono; + +/** + * Implementation for QueueAuthorizationRule. + */ +class QueueAuthorizationRuleImpl extends AuthorizationRuleBaseImpl + implements + QueueAuthorizationRule, + QueueAuthorizationRule.Definition, + QueueAuthorizationRule.Update { + private final String namespaceName; + private final Region region; + + QueueAuthorizationRuleImpl(String resourceGroupName, + String namespaceName, + String queueName, + String name, + Region region, + SharedAccessAuthorizationRuleResourceInner inner, + ServiceBusManager manager) { + super(name, inner, manager); + this.namespaceName = namespaceName; + this.region = region; + this.withExistingParentResource(resourceGroupName, queueName); + if (inner.location() == null) { + inner.withLocation(this.region.toString()); + } + } + + @Override + public String namespaceName() { + return this.namespaceName; + } + + @Override + public String queueName() { + return this.parentName; + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getQueues() + .getAuthorizationRuleAsync(this.resourceGroupName(), + this.namespaceName(), + this.queueName(), + this.name()); + } + + @Override + protected Mono createChildResourceAsync() { + final QueueAuthorizationRule self = this; + return this.manager().inner().getQueues().createOrUpdateAuthorizationRuleAsync(this.resourceGroupName(), + this.namespaceName(), + this.queueName(), + this.name(), + prepareForCreate(this.inner())) + .map(inner -> { + setInner(inner); + return self; + }); + } + + @Override + protected Mono getKeysInnerAsync() { + return this.manager().inner().getQueues() + .listKeysAsync(this.resourceGroupName(), + this.namespaceName(), + this.queueName(), + this.name()); + } + + @Override + protected Mono regenerateKeysInnerAsync(Policykey policykey) { + return this.manager().inner().getQueues() + .regenerateKeysAsync(this.resourceGroupName(), + this.namespaceName(), + this.queueName(), + this.name(), + policykey); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueAuthorizationRulesImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueAuthorizationRulesImpl.java new file mode 100644 index 0000000000000..5d780d56fff47 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueAuthorizationRulesImpl.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.QueuesClient; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.QueueAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.QueueAuthorizationRules; +import reactor.core.publisher.Mono; + +/** + * Implementation for QueueAuthorizationRules. + */ +class QueueAuthorizationRulesImpl + extends ServiceBusChildResourcesImpl< + QueueAuthorizationRule, + QueueAuthorizationRuleImpl, + SharedAccessAuthorizationRuleResourceInner, + QueuesClient, + ServiceBusManager, + Queue> + implements QueueAuthorizationRules { + private final String resourceGroupName; + private final String namespaceName; + private final String queueName; + private final Region region; + + private final ClientLogger logger = new ClientLogger(QueueAuthorizationRulesImpl.class); + + QueueAuthorizationRulesImpl(String resourceGroupName, + String namespaceName, + String queueName, + Region region, + ServiceBusManager manager) { + super(manager.inner().getQueues(), manager); + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.queueName = queueName; + this.region = region; + } + + @Override + public QueueAuthorizationRuleImpl define(String name) { + return wrapModel(name); + } + + @Override + public Mono deleteByNameAsync(String name) { + return this.inner().deleteAuthorizationRuleAsync(this.resourceGroupName, + this.namespaceName, + this.queueName, + name); + } + + @Override + protected Mono getInnerByNameAsync(String name) { + return this.inner().getAuthorizationRuleAsync(this.resourceGroupName, + this.namespaceName, + this.queueName, + name); + } + + @Override + protected PagedFlux listInnerAsync() { + return this.inner().listAuthorizationRulesAsync(this.resourceGroupName, this.namespaceName, this.queueName); + } + + @Override + protected PagedIterable listInner() { + return this.inner().listAuthorizationRules(this.resourceGroupName, + this.namespaceName, + this.queueName); + } + + @Override + protected QueueAuthorizationRuleImpl wrapModel(String name) { + return new QueueAuthorizationRuleImpl(this.resourceGroupName, + this.namespaceName, + this.queueName, + name, + this.region, + new SharedAccessAuthorizationRuleResourceInner(), + this.manager()); + } + + @Override + protected QueueAuthorizationRuleImpl wrapModel(SharedAccessAuthorizationRuleResourceInner inner) { + if (inner == null) { + return null; + } + return new QueueAuthorizationRuleImpl(this.resourceGroupName, + this.namespaceName, + this.queueName, + inner.name(), + this.region, + inner, + this.manager()); + } + + @Override + public PagedIterable listByParent(String resourceGroupName, String parentName) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono deleteByParentAsync(String groupName, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono getByParentAsync(String resourceGroup, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueImpl.java new file mode 100644 index 0000000000000..413bcfec77549 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueueImpl.java @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.IndependentChildResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.inner.QueueResourceInner; +import com.azure.resourcemanager.servicebus.models.EntityStatus; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.QueueAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.QueueCreateOrUpdateParameters; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * Implementation for Queue. + */ +class QueueImpl + extends IndependentChildResourceImpl< + Queue, + ServiceBusNamespaceImpl, + QueueResourceInner, + QueueImpl, + ServiceBusManager> + implements + Queue, + Queue.Definition, + Queue.Update { + private List> rulesToCreate; + private List rulesToDelete; + + QueueImpl(String resourceGroupName, + String namespaceName, + String name, + Region region, + QueueResourceInner inner, + ServiceBusManager manager) { + super(name, inner, manager); + this.withExistingParentResource(resourceGroupName, namespaceName); + initChildrenOperationsCache(); + if (inner.location() == null) { + inner.withLocation(region.toString()); + } + } + + @Override + public OffsetDateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public OffsetDateTime accessedAt() { + return this.inner().accessedAt(); + } + + @Override + public OffsetDateTime updatedAt() { + return this.inner().updatedAt(); + } + + @Override + public long maxSizeInMB() { + return Utils.toPrimitiveLong(this.inner().maxSizeInMegabytes()); + } + + @Override + public long currentSizeInBytes() { + return Utils.toPrimitiveLong(this.inner().sizeInBytes()); + } + + @Override + public boolean isBatchedOperationsEnabled() { + return Utils.toPrimitiveBoolean(this.inner().enableBatchedOperations()); + } + + @Override + public boolean isDeadLetteringEnabledForExpiredMessages() { + return Utils.toPrimitiveBoolean(this.inner().deadLetteringOnMessageExpiration()); + } + + @Override + public boolean isExpressEnabled() { + return Utils.toPrimitiveBoolean(this.inner().enableExpress()); + } + + @Override + public boolean isPartitioningEnabled() { + return Utils.toPrimitiveBoolean(this.inner().enablePartitioning()); + } + + @Override + public boolean isSessionEnabled() { + return Utils.toPrimitiveBoolean(this.inner().requiresSession()); + } + + @Override + public boolean isDuplicateDetectionEnabled() { + return Utils.toPrimitiveBoolean(this.inner().requiresDuplicateDetection()); + } + + @Override + public long lockDurationInSeconds() { + if (this.inner().lockDuration() == null) { + return 0; + } + TimeSpan timeSpan = TimeSpan.parse(this.inner().lockDuration()); + return (long) timeSpan.totalSeconds(); + } + + @Override + public long deleteOnIdleDurationInMinutes() { + if (this.inner().autoDeleteOnIdle() == null) { + return 0; + } + TimeSpan timeSpan = TimeSpan.parse(this.inner().autoDeleteOnIdle()); + return (long) timeSpan.totalMinutes(); + } + + @Override + public Duration defaultMessageTtlDuration() { + if (this.inner().defaultMessageTimeToLive() == null) { + return null; + } + return TimeSpan.parse(this.inner().defaultMessageTimeToLive()).toDuration(); + } + + @Override + public Duration duplicateMessageDetectionHistoryDuration() { + if (this.inner().duplicateDetectionHistoryTimeWindow() == null) { + return null; + } + return TimeSpan.parse(this.inner().duplicateDetectionHistoryTimeWindow()).toDuration(); + } + + @Override + public int maxDeliveryCountBeforeDeadLetteringMessage() { + return Utils.toPrimitiveInt(this.inner().maxDeliveryCount()); + } + + @Override + public long messageCount() { + return Utils.toPrimitiveLong(this.inner().messageCount()); + } + + @Override + public long activeMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().activeMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().activeMessageCount()); + } + + @Override + public long deadLetterMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().deadLetterMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().deadLetterMessageCount()); + } + + @Override + public long scheduledMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().scheduledMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().scheduledMessageCount()); + } + + @Override + public long transferDeadLetterMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().transferDeadLetterMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().transferDeadLetterMessageCount()); + } + + @Override + public long transferMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().transferMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().transferMessageCount()); + } + + @Override + public EntityStatus status() { + return this.inner().status(); + } + + @Override + public QueueAuthorizationRulesImpl authorizationRules() { + return new QueueAuthorizationRulesImpl(this.resourceGroupName(), + this.parentName, + this.name(), + this.region(), + manager()); + } + + @Override + public QueueImpl withSizeInMB(long sizeInMB) { + this.inner().withMaxSizeInMegabytes(sizeInMB); + return this; + } + + @Override + public QueueImpl withPartitioning() { + this.inner().withEnablePartitioning(true); + return this; + } + + @Override + public QueueImpl withoutPartitioning() { + this.inner().withEnablePartitioning(false); + return this; + } + + @Override + public QueueImpl withDeleteOnIdleDurationInMinutes(int durationInMinutes) { + TimeSpan timeSpan = new TimeSpan().withMinutes(durationInMinutes); + this.inner().withAutoDeleteOnIdle(timeSpan.toString()); + return this; + } + + @Override + public QueueImpl withMessageLockDurationInSeconds(int durationInSeconds) { + TimeSpan timeSpan = new TimeSpan().withSeconds(durationInSeconds); + this.inner().withLockDuration(timeSpan.toString()); + return this; + } + + @Override + public QueueImpl withDefaultMessageTTL(Duration ttl) { + this.inner().withDefaultMessageTimeToLive(TimeSpan.fromDuration(ttl).toString()); + return this; + } + + @Override + public QueueImpl withSession() { + this.inner().withRequiresSession(true); + return this; + } + + @Override + public QueueImpl withoutSession() { + this.inner().withRequiresSession(false); + return this; + } + + @Override + public QueueImpl withExpressMessage() { + this.inner().withEnableExpress(true); + return this; + } + + @Override + public QueueImpl withoutExpressMessage() { + this.inner().withEnableExpress(false); + return this; + } + + @Override + public QueueImpl withMessageBatching() { + this.inner().withEnableBatchedOperations(true); + return this; + } + + @Override + public QueueImpl withoutMessageBatching() { + this.inner().withEnableBatchedOperations(false); + return this; + } + + @Override + public QueueImpl withExpiredMessageMovedToDeadLetterQueue() { + this.inner().withDeadLetteringOnMessageExpiration(true); + return this; + } + + @Override + public QueueImpl withoutExpiredMessageMovedToDeadLetterQueue() { + this.inner().withDeadLetteringOnMessageExpiration(false); + return this; + } + + @Override + public QueueImpl withMessageMovedToDeadLetterQueueOnMaxDeliveryCount(int deliveryCount) { + this.inner().withMaxDeliveryCount(deliveryCount); + return this; + } + + @Override + public QueueImpl withDuplicateMessageDetection(Duration duplicateDetectionHistoryDuration) { + this.inner().withRequiresDuplicateDetection(true); + this.inner().withDuplicateDetectionHistoryTimeWindow(TimeSpan + .fromDuration(duplicateDetectionHistoryDuration) + .toString()); + return this; + } + + @Override + public QueueImpl withDuplicateMessageDetectionHistoryDuration(Duration duration) { + return withDuplicateMessageDetection(duration); + } + + @Override + public QueueImpl withoutDuplicateMessageDetection() { + this.inner().withRequiresDuplicateDetection(false); + return this; + } + + @Override + public QueueImpl withNewSendRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withSendingEnabled()); + return this; + } + + @Override + public QueueImpl withNewListenRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withListeningEnabled()); + return this; + } + + @Override + public QueueImpl withNewManageRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withManagementEnabled()); + return this; + } + + @Override + public QueueImpl withoutAuthorizationRule(String name) { + this.rulesToDelete.add(name); + return this; + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getQueues() + .getAsync(this.resourceGroupName(), + this.parentName, + this.name()); + } + + @Override + protected Mono createChildResourceAsync() { + + Mono createTask = this.manager().inner().getQueues() + .createOrUpdateAsync(this.resourceGroupName(), + this.parentName, + this.name(), + prepareForCreate(this.inner())) + .map(inner -> { + setInner(inner); + return inner; + }); + Flux childOperationTasks = submitChildrenOperationsAsync(); + final Queue self = this; + return Flux.concat(createTask, childOperationTasks) + .doOnTerminate(() -> initChildrenOperationsCache()) + .then(Mono.just(self)); + } + + private void initChildrenOperationsCache() { + this.rulesToCreate = new ArrayList<>(); + this.rulesToDelete = new ArrayList<>(); + } + + private Flux submitChildrenOperationsAsync() { + Flux rulesCreateStream = Flux.empty(); + if (this.rulesToCreate.size() > 0) { + rulesCreateStream = this.authorizationRules().createAsync(this.rulesToCreate).then().flux(); + } + Flux rulesDeleteStream = Flux.empty(); + if (this.rulesToDelete.size() > 0) { + rulesDeleteStream = this.authorizationRules().deleteByNameAsync(this.rulesToDelete); + } + return Flux.mergeDelayError(32, rulesCreateStream, + rulesDeleteStream); + } + + private QueueCreateOrUpdateParameters prepareForCreate(QueueResourceInner inner) { + return new QueueCreateOrUpdateParameters() + .withLockDuration(inner.lockDuration()) + .withAutoDeleteOnIdle(inner.autoDeleteOnIdle()) + .withEntityAvailabilityStatus(inner.entityAvailabilityStatus()) + .withDefaultMessageTimeToLive(inner.defaultMessageTimeToLive()) + .withDuplicateDetectionHistoryTimeWindow(inner.duplicateDetectionHistoryTimeWindow()) + .withEnableBatchedOperations(inner.enableBatchedOperations()) + .withDeadLetteringOnMessageExpiration(inner.deadLetteringOnMessageExpiration()) + .withEnableExpress(inner.enableExpress()) + .withEnablePartitioning(inner.enablePartitioning()) + .withIsAnonymousAccessible(inner.isAnonymousAccessible()) + .withMaxDeliveryCount(inner.maxDeliveryCount()) + .withMaxSizeInMegabytes(inner.maxSizeInMegabytes()) + .withRequiresDuplicateDetection(inner.requiresDuplicateDetection()) + .withRequiresSession(inner.requiresSession()) + .withStatus(inner.status()) + .withSupportOrdering(inner.supportOrdering()) + .withLocation(inner.location()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueuesImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueuesImpl.java new file mode 100644 index 0000000000000..6f36f00e05687 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/QueuesImpl.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.QueuesClient; +import com.azure.resourcemanager.servicebus.fluent.inner.QueueResourceInner; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.Queues; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import reactor.core.publisher.Mono; + +/** + * Implementation for Queues. + */ +class QueuesImpl + extends ServiceBusChildResourcesImpl< + Queue, + QueueImpl, + QueueResourceInner, + QueuesClient, + ServiceBusManager, + ServiceBusNamespace> + implements Queues { + private final String resourceGroupName; + private final String namespaceName; + private final Region region; + + private final ClientLogger logger = new ClientLogger(QueuesImpl.class); + + QueuesImpl(String resourceGroupName, String namespaceName, Region region, ServiceBusManager manager) { + super(manager.inner().getQueues(), manager); + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.region = region; + } + + @Override + public QueueImpl define(String name) { + return wrapModel(name); + } + + @Override + public Mono deleteByNameAsync(String name) { + return this.inner().deleteAsync(this.resourceGroupName, + this.namespaceName, + name); + } + + @Override + protected Mono getInnerByNameAsync(String name) { + return this.inner().getAsync(this.resourceGroupName, this.namespaceName, name); + } + + @Override + protected PagedFlux listInnerAsync() { + return this.inner().listAllAsync(this.resourceGroupName, this.namespaceName); + } + + @Override + protected PagedIterable listInner() { + return this.inner().listAll(this.resourceGroupName, this.namespaceName); + } + + @Override + protected QueueImpl wrapModel(String name) { + return new QueueImpl(this.resourceGroupName, + this.namespaceName, + name, + this.region, + new QueueResourceInner(), + this.manager()); + } + + @Override + protected QueueImpl wrapModel(QueueResourceInner inner) { + if (inner == null) { + return null; + } + return new QueueImpl(this.resourceGroupName, + this.namespaceName, + inner.name(), + this.region, + inner, + this.manager()); + } + + @Override + public PagedIterable listByParent(String resourceGroupName, String parentName) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono deleteByParentAsync(String groupName, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono getByParentAsync(String resourceGroup, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusChildResourcesImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusChildResourcesImpl.java new file mode 100644 index 0000000000000..3d5d7bd0cc60d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusChildResourcesImpl.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.resources.fluentcore.arm.ManagerBase; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.IndependentChildResourcesImpl; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChildResource; +import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingByName; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * Base class for Service Bus child entities. + * Note: When we refactor 'IndependentChildResourcesImpl', move features of this type + * to 'IndependentChildResourcesImpl' and remove this type. + * + * @param the model interface type + * @param the model interface implementation + * @param the inner model + * @param the inner collection + * @param the manager + * @param the parent model interface type + */ +abstract class ServiceBusChildResourcesImpl< + T extends IndependentChildResource, + ImplT extends T, + InnerT, + InnerCollectionT, + ManagerT extends ManagerBase, + ParentT extends Resource & HasResourceGroup> + extends IndependentChildResourcesImpl + implements SupportsGettingByName, SupportsListing, SupportsDeletingByName { + protected ServiceBusChildResourcesImpl(InnerCollectionT innerCollection, ManagerT manager) { + super(innerCollection, manager); + } + + @Override + public Mono getByNameAsync(String name) { + return getInnerByNameAsync(name) + .map(this::wrapModel); + } + + @Override + public T getByName(String name) { + return getByNameAsync(name).block(); + } + + @Override + public PagedFlux listAsync() { + return this.listInnerAsync() + .mapPage(this::wrapModel); + } + + @Override + public PagedIterable list() { + return this.wrapList(this.listInner()); + } + + @Override + public void deleteByName(String name) { + this.deleteByNameAsync(name).block(); + } + + public Flux deleteByNameAsync(List names) { + if (names == null) { + return Flux.empty(); + } + return Flux.fromIterable(names) + .flatMapDelayError(name -> deleteByNameAsync(name), 32, 32); + } + + protected abstract Mono getInnerByNameAsync(String name); + protected abstract PagedFlux listInnerAsync(); + protected abstract PagedIterable listInner(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusNamespaceImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusNamespaceImpl.java new file mode 100644 index 0000000000000..4e28057aeda4b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusNamespaceImpl.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.GroupableResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.inner.NamespaceResourceInner; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.NamespaceCreateOrUpdateParameters; +import com.azure.resourcemanager.servicebus.models.NamespaceSku; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import com.azure.resourcemanager.servicebus.models.Sku; +import com.azure.resourcemanager.servicebus.models.Topic; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * Implementation for ServiceBusNamespace. + */ +class ServiceBusNamespaceImpl + extends GroupableResourceImpl< + ServiceBusNamespace, + NamespaceResourceInner, + ServiceBusNamespaceImpl, + ServiceBusManager> + implements + ServiceBusNamespace, + ServiceBusNamespace.Definition, + ServiceBusNamespace.Update { + private List> queuesToCreate; + private List> topicsToCreate; + private List> rulesToCreate; + private List queuesToDelete; + private List topicsToDelete; + private List rulesToDelete; + + ServiceBusNamespaceImpl(String name, NamespaceResourceInner inner, ServiceBusManager manager) { + super(name, inner, manager); + this.initChildrenOperationsCache(); + } + + @Override + public String dnsLabel() { + return this.inner().name(); + } + + @Override + public String fqdn() { + return this.inner().serviceBusEndpoint(); + } + + @Override + public NamespaceSku sku() { + return new NamespaceSku(this.inner().sku()); + } + + @Override + public OffsetDateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public OffsetDateTime updatedAt() { + return this.inner().updatedAt(); + } + + @Override + public QueuesImpl queues() { + return new QueuesImpl(this.resourceGroupName(), + this.name(), + this.region(), + this.manager()); + } + + @Override + public TopicsImpl topics() { + return new TopicsImpl(this.resourceGroupName(), + this.name(), + this.region(), + this.manager()); + } + + @Override + public NamespaceAuthorizationRulesImpl authorizationRules() { + return new NamespaceAuthorizationRulesImpl(this.resourceGroupName(), + this.name(), + this.region(), + manager()); + } + + @Override + public ServiceBusNamespaceImpl withSku(NamespaceSku namespaceSku) { + this.inner().withSku(new Sku() + .withName(namespaceSku.name()) + .withTier(namespaceSku.tier()) + .withCapacity(namespaceSku.capacity())); + return this; + } + + @Override + public ServiceBusNamespaceImpl withNewQueue(String name, int maxSizeInMB) { + this.queuesToCreate.add(queues().define(name).withSizeInMB(maxSizeInMB)); + return this; + } + + @Override + public ServiceBusNamespaceImpl withoutQueue(String name) { + this.queuesToDelete.add(name); + return this; + } + + @Override + public ServiceBusNamespaceImpl withNewTopic(String name, int maxSizeInMB) { + this.topicsToCreate.add(topics().define(name).withSizeInMB(maxSizeInMB)); + return this; + } + + @Override + public ServiceBusNamespaceImpl withoutTopic(String name) { + this.topicsToDelete.add(name); + return this; + } + + @Override + public ServiceBusNamespaceImpl withNewSendRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withSendingEnabled()); + return this; + } + + @Override + public ServiceBusNamespaceImpl withNewListenRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withListeningEnabled()); + return this; + } + + @Override + public ServiceBusNamespaceImpl withNewManageRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withManagementEnabled()); + return this; + } + + @Override + public ServiceBusNamespaceImpl withoutAuthorizationRule(String name) { + this.rulesToDelete.add(name); + return this; + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getNamespaces().getByResourceGroupAsync(this.resourceGroupName(), + this.name()); + } + + @Override + public Mono createResourceAsync() { + Mono createTask = this.manager().inner().getNamespaces() + .createOrUpdateAsync(this.resourceGroupName(), + this.name(), + prepareForCreate(this.inner())) + .map(inner -> { + setInner(inner); + return inner; + }); + + Flux childOperationTasks = submitChildrenOperationsAsync(); + final ServiceBusNamespace self = this; + return Flux.concat(createTask, childOperationTasks) + .doOnTerminate(() -> initChildrenOperationsCache()) + .then(Mono.just(self)); + } + + private void initChildrenOperationsCache() { + this.queuesToCreate = new ArrayList<>(); + this.topicsToCreate = new ArrayList<>(); + this.rulesToCreate = new ArrayList<>(); + this.queuesToDelete = new ArrayList<>(); + this.topicsToDelete = new ArrayList<>(); + this.rulesToDelete = new ArrayList<>(); + } + + private Flux submitChildrenOperationsAsync() { + Flux queuesCreateStream = Flux.empty(); + if (this.queuesToCreate.size() > 0) { + queuesCreateStream = this.queues().createAsync(this.queuesToCreate).then().flux(); + } + Flux topicsCreateStream = Flux.empty(); + if (this.topicsToCreate.size() > 0) { + topicsCreateStream = this.topics().createAsync(this.topicsToCreate).then().flux(); + } + Flux rulesCreateStream = Flux.empty(); + if (this.rulesToCreate.size() > 0) { + rulesCreateStream = this.authorizationRules().createAsync(this.rulesToCreate).then().flux(); + } + Flux queuesDeleteStream = Flux.empty(); + if (this.queuesToDelete.size() > 0) { + queuesDeleteStream = this.queues().deleteByNameAsync(this.queuesToDelete); + } + Flux topicsDeleteStream = Flux.empty(); + if (this.topicsToDelete.size() > 0) { + topicsDeleteStream = this.topics().deleteByNameAsync(this.topicsToDelete); + } + Flux rulesDeleteStream = Flux.empty(); + if (this.rulesToDelete.size() > 0) { + rulesDeleteStream = this.authorizationRules().deleteByNameAsync(this.rulesToDelete); + } + return Flux.mergeDelayError(32, + queuesCreateStream, + topicsCreateStream, + rulesCreateStream, + queuesDeleteStream, + topicsDeleteStream, + rulesDeleteStream); + } + + private NamespaceCreateOrUpdateParameters prepareForCreate(NamespaceResourceInner inner) { + return new NamespaceCreateOrUpdateParameters() + .withSku(inner.sku()) + .withStatus(inner.status()) + .withEnabled(inner.enabled()) + .withCreateAcsNamespace(inner.createAcsNamespace()) + .withLocation(inner.location()) + .withTags(inner.tags()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusNamespacesImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusNamespacesImpl.java new file mode 100644 index 0000000000000..1a6501722a9fb --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusNamespacesImpl.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.TopLevelModifiableResourcesImpl; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.NamespacesClient; +import com.azure.resourcemanager.servicebus.fluent.inner.NamespaceResourceInner; +import com.azure.resourcemanager.servicebus.models.CheckNameAvailabilityResult; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespaces; +import reactor.core.publisher.Mono; + +/** + * Implementation for ServiceBusNamespaces. + */ +public final class ServiceBusNamespacesImpl extends TopLevelModifiableResourcesImpl< + ServiceBusNamespace, + ServiceBusNamespaceImpl, + NamespaceResourceInner, + NamespacesClient, + ServiceBusManager> + implements ServiceBusNamespaces { + + public ServiceBusNamespacesImpl(NamespacesClient innerCollection, ServiceBusManager manager) { + super(innerCollection, manager); + } + + @Override + public ServiceBusNamespace.DefinitionStages.Blank define(String name) { + return wrapModel(name); + } + + @Override + public CheckNameAvailabilityResult checkNameAvailability(String name) { + return this.checkNameAvailabilityAsync(name).block(); + } + + @Override + public Mono checkNameAvailabilityAsync(String name) { + return this.inner().checkNameAvailabilityAsync(name) + .map(inner -> new CheckNameAvailabilityResultImpl(inner)); + } + + @Override + protected ServiceBusNamespaceImpl wrapModel(String name) { + return new ServiceBusNamespaceImpl(name, + new NamespaceResourceInner(), + this.manager()); + } + + @Override + protected ServiceBusNamespaceImpl wrapModel(NamespaceResourceInner inner) { + return new ServiceBusNamespaceImpl(inner.name(), + inner, + this.manager()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusSubscriptionImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusSubscriptionImpl.java new file mode 100644 index 0000000000000..c1491586b3266 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusSubscriptionImpl.java @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.IndependentChildResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.inner.SubscriptionResourceInner; +import com.azure.resourcemanager.servicebus.models.EntityStatus; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscription; +import com.azure.resourcemanager.servicebus.models.SubscriptionCreateOrUpdateParameters; +import com.azure.resourcemanager.servicebus.models.Topic; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.time.OffsetDateTime; + +/** + * Implementation for Subscription. + */ +class ServiceBusSubscriptionImpl extends + IndependentChildResourceImpl< + ServiceBusSubscription, + Topic, + SubscriptionResourceInner, + ServiceBusSubscriptionImpl, + ServiceBusManager> + implements + ServiceBusSubscription, + ServiceBusSubscription.Definition, + ServiceBusSubscription.Update { + private final String namespaceName; + private final Region region; + + ServiceBusSubscriptionImpl(String resourceGroupName, + String namespaceName, + String topicName, + String name, + Region region, + SubscriptionResourceInner inner, + ServiceBusManager manager) { + super(name, inner, manager); + this.namespaceName = namespaceName; + this.region = region; + this.withExistingParentResource(resourceGroupName, topicName); + if (inner.location() == null) { + inner.withLocation(this.region.toString()); + } + } + + @Override + public OffsetDateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public OffsetDateTime accessedAt() { + return this.inner().accessedAt(); + } + + @Override + public OffsetDateTime updatedAt() { + return this.inner().updatedAt(); + } + + @Override + public boolean isBatchedOperationsEnabled() { + return Utils.toPrimitiveBoolean(this.inner().enableBatchedOperations()); + } + + @Override + public boolean isDeadLetteringEnabledForExpiredMessages() { + return Utils.toPrimitiveBoolean(this.inner().deadLetteringOnMessageExpiration()); + } + + @Override + public boolean isSessionEnabled() { + return Utils.toPrimitiveBoolean(this.inner().requiresSession()); + } + + @Override + public long lockDurationInSeconds() { + if (this.inner().lockDuration() == null) { + return 0; + } + TimeSpan timeSpan = TimeSpan.parse(this.inner().lockDuration()); + return (long) timeSpan.totalSeconds(); + } + + @Override + public long deleteOnIdleDurationInMinutes() { + if (this.inner().autoDeleteOnIdle() == null) { + return 0; + } + TimeSpan timeSpan = TimeSpan.parse(this.inner().autoDeleteOnIdle()); + return (long) timeSpan.totalMinutes(); + } + + @Override + public Duration defaultMessageTtlDuration() { + if (this.inner().defaultMessageTimeToLive() == null) { + return null; + } + return TimeSpan.parse(this.inner().defaultMessageTimeToLive()).toDuration(); + } + + @Override + public int maxDeliveryCountBeforeDeadLetteringMessage() { + return Utils.toPrimitiveInt(this.inner().maxDeliveryCount()); + } + + @Override + public long messageCount() { + return Utils.toPrimitiveLong(this.inner().messageCount()); + } + + @Override + public long activeMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().activeMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().activeMessageCount()); + } + + @Override + public long deadLetterMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().deadLetterMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().deadLetterMessageCount()); + } + + @Override + public long scheduledMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().scheduledMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().scheduledMessageCount()); + } + + @Override + public long transferDeadLetterMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().transferDeadLetterMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().transferDeadLetterMessageCount()); + } + + @Override + public long transferMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().transferMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().transferMessageCount()); + } + + @Override + public EntityStatus status() { + return this.inner().status(); + } + + @Override + public boolean isDeadLetteringEnabledForFilterEvaluationFailedMessages() { + return Utils.toPrimitiveBoolean(this.inner().deadLetteringOnFilterEvaluationExceptions()); + } + + @Override + public ServiceBusSubscriptionImpl withDeleteOnIdleDurationInMinutes(int durationInMinutes) { + TimeSpan timeSpan = new TimeSpan().withMinutes(durationInMinutes); + this.inner().withAutoDeleteOnIdle(timeSpan.toString()); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withMessageLockDurationInSeconds(int durationInSeconds) { + TimeSpan timeSpan = new TimeSpan().withSeconds(durationInSeconds); + this.inner().withLockDuration(timeSpan.toString()); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withDefaultMessageTTL(Duration ttl) { + this.inner().withDefaultMessageTimeToLive(TimeSpan.fromDuration(ttl).toString()); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withSession() { + this.inner().withRequiresSession(true); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withoutSession() { + this.inner().withRequiresSession(false); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withMessageBatching() { + this.inner().withEnableBatchedOperations(true); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withoutMessageBatching() { + this.inner().withEnableBatchedOperations(false); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withMessageMovedToDeadLetterSubscriptionOnMaxDeliveryCount(int deliveryCount) { + this.inner().withMaxDeliveryCount(deliveryCount); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException() { + this.inner().withDeadLetteringOnFilterEvaluationExceptions(true); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withoutMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException() { + this.inner().withDeadLetteringOnFilterEvaluationExceptions(false); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withExpiredMessageMovedToDeadLetterSubscription() { + this.inner().withDeadLetteringOnMessageExpiration(true); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withoutExpiredMessageMovedToDeadLetterSubscription() { + this.inner().withDeadLetteringOnMessageExpiration(false); + return this; + } + + @Override + public ServiceBusSubscriptionImpl withMessageMovedToDeadLetterQueueOnMaxDeliveryCount(int deliveryCount) { + this.inner().withMaxDeliveryCount(deliveryCount); + return this; + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getSubscriptions() + .getAsync(this.resourceGroupName(), + this.namespaceName, + this.parentName, + this.name()); + } + + @Override + protected Mono createChildResourceAsync() { + final ServiceBusSubscription self = this; + return this.manager().inner().getSubscriptions() + .createOrUpdateAsync(this.resourceGroupName(), + this.namespaceName, + this.parentName, + this.name(), + prepareForCreate(this.inner())) + .map(inner -> { + setInner(inner); + return self; + }); + } + + private SubscriptionCreateOrUpdateParameters prepareForCreate(SubscriptionResourceInner inner) { + return new SubscriptionCreateOrUpdateParameters() + .withAutoDeleteOnIdle(inner.autoDeleteOnIdle()) + .withDefaultMessageTimeToLive(inner.defaultMessageTimeToLive()) + .withDeadLetteringOnFilterEvaluationExceptions(inner.deadLetteringOnFilterEvaluationExceptions()) + .withDeadLetteringOnMessageExpiration(inner.deadLetteringOnMessageExpiration()) + .withEnableBatchedOperations(inner.enableBatchedOperations()) + .withEntityAvailabilityStatus(inner.entityAvailabilityStatus()) + .withIsReadOnly(inner.isReadOnly()) + .withLockDuration(inner.lockDuration()) + .withMaxDeliveryCount(inner.maxDeliveryCount()) + .withRequiresSession(inner.requiresSession()) + .withStatus(inner.status()) + .withLocation(inner.location()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusSubscriptionsImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusSubscriptionsImpl.java new file mode 100644 index 0000000000000..17f3a48e5e155 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/ServiceBusSubscriptionsImpl.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.SubscriptionsClient; +import com.azure.resourcemanager.servicebus.fluent.inner.SubscriptionResourceInner; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscription; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscriptions; +import com.azure.resourcemanager.servicebus.models.Topic; +import reactor.core.publisher.Mono; + +/** + * Implementation for Subscriptions. + */ +class ServiceBusSubscriptionsImpl + extends ServiceBusChildResourcesImpl< + ServiceBusSubscription, + ServiceBusSubscriptionImpl, + SubscriptionResourceInner, + SubscriptionsClient, + ServiceBusManager, + Topic> + implements ServiceBusSubscriptions { + private final String resourceGroupName; + private final String namespaceName; + private final String topicName; + private final Region region; + + private final ClientLogger logger = new ClientLogger(ServiceBusSubscriptionsImpl.class); + + protected ServiceBusSubscriptionsImpl(String resourceGroupName, + String namespaceName, + String topicName, + Region region, + ServiceBusManager manager) { + super(manager.inner().getSubscriptions(), manager); + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.topicName = topicName; + this.region = region; + } + + @Override + public ServiceBusSubscriptionImpl define(String name) { + return wrapModel(name); + } + + @Override + public Mono deleteByNameAsync(String name) { + return this.inner().deleteAsync(this.resourceGroupName, + this.namespaceName, + this.topicName, + name); + } + + @Override + protected Mono getInnerByNameAsync(String name) { + return this.inner().getAsync(this.resourceGroupName, this.namespaceName, this.topicName, name); + } + + @Override + protected PagedFlux listInnerAsync() { + return this.inner().listAllAsync(this.resourceGroupName, this.namespaceName, this.topicName); + } + + @Override + protected PagedIterable listInner() { + return this.inner().listAll(this.resourceGroupName, this.namespaceName, this.topicName); + } + + @Override + protected ServiceBusSubscriptionImpl wrapModel(String name) { + return new ServiceBusSubscriptionImpl(this.resourceGroupName, + this.namespaceName, + this.topicName, + name, + this.region, + new SubscriptionResourceInner(), + this.manager()); + } + + @Override + protected ServiceBusSubscriptionImpl wrapModel(SubscriptionResourceInner inner) { + return new ServiceBusSubscriptionImpl(this.resourceGroupName, + this.namespaceName, + this.topicName, + inner.name(), + this.region, + inner, + this.manager()); + } + + @Override + public PagedIterable listByParent(String resourceGroupName, String parentName) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono deleteByParentAsync(String groupName, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono getByParentAsync(String resourceGroup, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TimeSpan.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TimeSpan.java new file mode 100644 index 0000000000000..09f3ccb5615d3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TimeSpan.java @@ -0,0 +1,450 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.core.util.logging.ClientLogger; + +import java.time.Duration; +import java.util.concurrent.Callable; + +/** + * Represents a time interval. + */ +public class TimeSpan { + private static long ticksPerMillisecond = 10000; + private static long ticksPerSecond = ticksPerMillisecond * 1000; + private static long ticksPerMinute = ticksPerSecond * 60; + private static long ticksPerHour = ticksPerMinute * 60; + private static long ticksPerDay = ticksPerHour * 24; + private static double millisecondsPerTick = 1.0 / ticksPerMillisecond; + private static double secondsPerTick = 1.0 / ticksPerSecond; + private static double minutesPerTick = 1.0 / ticksPerMinute; + + private long days; + private long hours; + private long minutes; + private long seconds; + private long milliseconds; + + /** + * Creates TimeSpan. + */ + public TimeSpan() { + } + + /** + * Specifies the number of days. + * + * @param days number of days + * @return TimeSpan + */ + public TimeSpan withDays(final long days) { + this.days = days; + return this; + } + + /** + * Specifies the number of hours. + * + * @param hours number of hours + * @return TimeSpan + */ + public TimeSpan withHours(final long hours) { + this.hours = hours; + return this; + } + + /** + * Specifies the number of minutes. + * + * @param minutes number of minutes + * @return TimeSpan + */ + public TimeSpan withMinutes(final long minutes) { + this.minutes = minutes; + return this; + } + + /** + * Specifies the number of seconds. + * + * @param seconds number of seconds + * @return TimeSpan + */ + public TimeSpan withSeconds(final long seconds) { + this.seconds = seconds; + return this; + } + + /** + * Specifies the number of milliseconds. + * + * @param milliseconds number of milliseconds + * @return TimeSpan + */ + public TimeSpan withMilliseconds(final long milliseconds) { + this.milliseconds = milliseconds; + return this; + } + + /** + * @return days value + */ + public long days() { + return this.days; + } + + /** + * @return hours value + */ + public long hours() { + return this.hours; + } + + /** + * @return minutes value + */ + public long minutes() { + return this.minutes; + } + + /** + * @return seconds value + */ + public long seconds() { + return this.seconds; + } + + /** + * @return milliseconds value + */ + public long milliseconds() { + return this.milliseconds; + } + + /** + * @return total number of milliseconds represented by this instance + */ + public double totalMilliseconds() { + return totalTicks() * millisecondsPerTick; + } + + /** + * @return the duration represented by this instance + */ + public Duration toDuration() { + Double millis = Double.valueOf(totalMilliseconds()); + return Duration.ofMillis(millis.longValue()); + } + + /** + * @return total number of seconds represented by this instance + */ + public double totalSeconds() { + return totalTicks() * secondsPerTick; + } + + /** + * @return total number of minutes represented by this instance + */ + public double totalMinutes() { + return totalTicks() * minutesPerTick; + } + + /** + * Gets TimeSpan from given duration. + * + * @param duration duration + * @return TimeSpan + */ + public static TimeSpan fromDuration(Duration duration) { + long totalTicks = duration.toMillis() * ticksPerMillisecond; + long days = Math.abs(totalTicks / ticksPerDay); + totalTicks = Math.abs(totalTicks % ticksPerDay); + long hours = totalTicks / ticksPerHour % 24; + long minutes = totalTicks / ticksPerMinute % 60; + long seconds = totalTicks / ticksPerSecond % 60; + long milliseconds = duration.toMillis() - (days * 3600 * 24 + hours * 3600 + minutes * 60 + seconds) * 1000; + + return new TimeSpan().withDays(days) + .withHours(hours) + .withMinutes(minutes) + .withSeconds(seconds) + .withMilliseconds(milliseconds); + } + + /** + * Parses the TimeSpan in string format. + * + * Valid formats for TimeSpan are: + * [-]d\0 + * [-]d.hh:mm\0 + * [-]hh:mm\0 + * [-]dd.hh:mm:ss\0 + * [-]hh:mm:ss\0 + * [-]dd.hh:mm:ss:ffffffff\0 + * [-]hh:mm:ss:ffffffff\0 + * + * @param input the string representation of TimeSpan + * @return TimeSpan + */ + public static TimeSpan parse(String input) { + if (input == null) { + throw new ClientLogger(TimeSpan.class) + .logExceptionAsError(new IllegalArgumentException("input cannot be null")); + } + final String str = input.trim(); + TimeSpan timeSpan = new TimeSpan(); + TokenParser parser = new TokenParser(str, str.charAt(0) == '-' ? 1 : 0); + Token token = parser.nextToken(); + // Empty string not allowed + // + token.throwIfEmpty(); + int sign = str.charAt(0) == '-' ? -1 : 1; + if (token.isTerminalCharNull()) { + // 'dd\0' + // + timeSpan.withDays(toInt(token.getRawValue()) * sign); + return timeSpan; + } + if (token.isTerminalMatched('.')) { + // 'dd.hh' + // + timeSpan.withDays(toInt(token.getRawValue()) * sign); + token = parser.nextToken(); + // If '.' follows 'dd' then there must be 'hh' token + // + token.throwIfEmpty(); + timeSpan.withHours(toInt(token.getRawValue()) * sign); + } else { + // 'hh' + // + timeSpan.withDays(0); + timeSpan.withHours(toInt(token.getRawValue()) * sign); + } + if (timeSpan.hours() > 23) { + TokenParser.throwOutOfRange(); + } + // there must be ':' followed by 'dd.hh' or 'hh' + // + token.throwIfTerminalCharNotMatch(':'); + token = parser.nextToken(); + // there must be 'mm' token + // + token.throwIfEmpty(); + timeSpan.withMinutes(toInt(token.getRawValue()) * sign); + if (timeSpan.minutes() > 59) { + TokenParser.throwOutOfRange(); + } + if (token.isTerminalCharNull()) { + // 'dd.hh:mm\0' or 'hh:mm\0' + // + return timeSpan; + } + token.throwIfTerminalCharNotMatch(':'); + token = parser.nextToken(); + // There must be 'ss' token + // + token.throwIfEmpty(); + timeSpan.withSeconds(toInt(token.getRawValue()) * sign); + if (timeSpan.seconds() > 59) { + TokenParser.throwOutOfRange(); + } + if (token.isTerminalCharNull()) { + // 'dd.hh:mm:ss\0' or 'hh:mm:ss\0' + // + return timeSpan; + } + token.throwIfTerminalCharNotMatch('.'); + token = parser.nextToken(); + // There must be 'fraction' token + // + token.throwIfEmpty(); + String milliStr = "." + token.getRawValue(); + if (milliStr.length() > 8) { + TokenParser.throwOutOfRange(); + } + int milliSeconds = (int) (Double.parseDouble(milliStr) * 1000); + timeSpan.withMilliseconds(milliSeconds * sign); + // There should not be more tokens + // + if (!token.isTerminalCharNull()) { + TokenParser.throwParseError(); + } + return timeSpan; + } + + /** + * @return TimeSpan in [-][d.]hh:mm:ss[.fffffff] format + */ + public String toString() { + long totalTicks = totalTicks(); + long days = Math.abs(totalTicks / ticksPerDay); + StringBuilder stringBuilder = new StringBuilder(); + // Sign part + // + if (totalTicks < 0) { + stringBuilder.append("-"); + } + // Days part + // + if (days != 0) { + stringBuilder.append(String.format("%d.", days)); + } + long remainingTicks = Math.abs(totalTicks % ticksPerDay); + long hours = remainingTicks / ticksPerHour % 24; + long minutes = remainingTicks / ticksPerMinute % 60; + long seconds = remainingTicks / ticksPerSecond % 60; + // Hour, Minute, Second part + // + stringBuilder.append(String.format("%02d:%02d:%02d", hours, minutes, seconds)); + int fraction = (int) (remainingTicks % ticksPerSecond); + // Fraction part + // + if (fraction != 0) { + stringBuilder.append(String.format(".%07d", fraction)); + } + return stringBuilder.toString(); + } + + /** + * @return total number of ticks represented by this instance + */ + private long totalTicks() { + long totalMilliSeconds = (days * 3600 * 24 + hours * 3600 + minutes * 60 + seconds) * 1000 + + milliseconds; + return totalMilliSeconds * ticksPerMillisecond; + } + + private static int toInt(String intStr) { + return Integer.parseInt(intStr); + } +} + +/** + * Parses the TimeSpan in string format. + */ +class TokenParser { + private final String str; + private final int startIndex; + private Callable nextTokenProvider; + private final ClientLogger logger = new ClientLogger(TokenParser.class); + + TokenParser(final String str, final int startIndex) { + this.str = str; + this.startIndex = startIndex; + this.nextTokenProvider = nextTokenProvider(); + } + + /** + * Gets the next token from the string represented in TimeSpan format. + * Each token is a number followed by single char. For the last token-character + * will be null. This method return an empty token if there is no more token left + * in the string. + * + * @return next token + */ + Token nextToken() { + try { + return nextTokenProvider.call(); + } catch (Exception e) { + e.printStackTrace(); + throw logger.logExceptionAsError(new RuntimeException("TimeSpan::nextToken() failed.")); + } + } + + static void throwParseError() { + throw new ClientLogger(TokenParser.class) + .logExceptionAsError(new IllegalArgumentException("String was not recognized as a valid TimeSpan")); + } + + static void throwOutOfRange() { + throw new ClientLogger(TokenParser.class) + .logExceptionAsError( + new IllegalArgumentException( + "The TimeSpan could not be parsed because at least one of the numeric " + + "components is out of range or contains too many digits")); + } + + private Callable nextTokenProvider() { + return new Callable() { + int currentIndex = startIndex; + int length = str.length(); + + @Override + public Token call() { + if (currentIndex >= length) { + return new Token(null, null); + } + StringBuilder builder = new StringBuilder(); + while (currentIndex < length + && Character.isDigit(str.charAt(currentIndex))) { + builder.append(str.charAt(currentIndex)); + currentIndex++; + } + String val = builder.toString(); + if (val.isEmpty()) { + throwParseError(); + } + try { + Integer.parseInt(val); + } catch (Exception ex) { + throwOutOfRange(); + } + if (currentIndex < length) { + return new Token(val, str.charAt(currentIndex++)); + } + return new Token(val, null); + } + }; + } +} + +/** + * Represents a token (part of) a TimeSpan represented in string format. + */ +class Token { + private String rawValue; + private Character terminalChar; + + private final ClientLogger logger = new ClientLogger(Token.class); + + Token(String rawValue, Character terminalChar) { + this.rawValue = rawValue; + this.terminalChar = terminalChar; + } + + String getRawValue() { + return this.rawValue; + } + + boolean isTerminalMatched(Character charToMatch) { + if (terminalChar == null && charToMatch == null) { + return true; + } + return terminalChar != null && charToMatch != null && terminalChar.equals(charToMatch); + } + + boolean isTerminalCharNull() { + return isTerminalMatched(null); + } + + void throwIfTerminalCharNotMatch(Character matchChar) { + if (!isTerminalMatched(matchChar)) { + throw logger.logExceptionAsError( + new IllegalArgumentException("String was not recognized as a valid TimeSpan")); + } + } + + void throwIfEmpty() { + if (isEmpty()) { + throw logger.logExceptionAsError( + new IllegalArgumentException("String was not recognized as a valid TimeSpan")); + } + } + + boolean isEmpty() { + return this.rawValue == null && this.terminalChar == null; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicAuthorizationRuleImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..d429d87fe7beb --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicAuthorizationRuleImpl.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.TopicAuthorizationRule; +import reactor.core.publisher.Mono; + +/** + * Implementation for TopicAuthorizationRule. + */ +class TopicAuthorizationRuleImpl + extends AuthorizationRuleBaseImpl + implements + TopicAuthorizationRule, + TopicAuthorizationRule.Definition, + TopicAuthorizationRule.Update { + private final String namespaceName; + private final Region region; + + TopicAuthorizationRuleImpl(String resourceGroupName, + String namespaceName, + String topicName, + String name, + Region region, + SharedAccessAuthorizationRuleResourceInner inner, + ServiceBusManager manager) { + super(name, inner, manager); + this.namespaceName = namespaceName; + this.region = region; + this.withExistingParentResource(resourceGroupName, topicName); + if (inner.location() == null) { + inner.withLocation(this.region.toString()); + } + } + + @Override + public String namespaceName() { + return this.namespaceName; + } + + @Override + public String topicName() { + return this.parentName; + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getTopics() + .getAuthorizationRuleAsync(this.resourceGroupName(), + this.namespaceName(), + this.topicName(), + this.name()); + } + + @Override + protected Mono createChildResourceAsync() { + final TopicAuthorizationRule self = this; + return this.manager().inner().getTopics().createOrUpdateAuthorizationRuleAsync(this.resourceGroupName(), + this.namespaceName(), + this.topicName(), + this.name(), + prepareForCreate(this.inner())) + .map(inner -> { + setInner(inner); + return self; + }); + } + + @Override + protected Mono getKeysInnerAsync() { + return this.manager().inner().getTopics() + .listKeysAsync(this.resourceGroupName(), + this.namespaceName(), + this.topicName(), + this.name()); + } + + @Override + protected Mono regenerateKeysInnerAsync(Policykey policykey) { + return this.manager().inner().getTopics().regenerateKeysAsync(this.resourceGroupName(), + this.namespaceName(), + this.topicName(), + this.name(), + policykey); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicAuthorizationRulesImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicAuthorizationRulesImpl.java new file mode 100644 index 0000000000000..d0807055ff0de --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicAuthorizationRulesImpl.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.TopicsClient; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.models.Topic; +import com.azure.resourcemanager.servicebus.models.TopicAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.TopicAuthorizationRules; +import reactor.core.publisher.Mono; + +/** + * Implementation for TopicAuthorizationRules. + */ +class TopicAuthorizationRulesImpl + extends ServiceBusChildResourcesImpl< + TopicAuthorizationRule, + TopicAuthorizationRuleImpl, + SharedAccessAuthorizationRuleResourceInner, + TopicsClient, + ServiceBusManager, + Topic> + implements TopicAuthorizationRules { + private final String resourceGroupName; + private final String namespaceName; + private final String topicName; + private final Region region; + + private final ClientLogger logger = new ClientLogger(TopicAuthorizationRulesImpl.class); + + TopicAuthorizationRulesImpl(String resourceGroupName, + String namespaceName, + String topicName, + Region region, + ServiceBusManager manager) { + super(manager.inner().getTopics(), manager); + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.topicName = topicName; + this.region = region; + } + + @Override + public TopicAuthorizationRuleImpl define(String name) { + return wrapModel(name); + } + + @Override + public Mono deleteByNameAsync(String name) { + return this.inner().deleteAuthorizationRuleAsync(this.resourceGroupName, + this.namespaceName, + this.topicName, + name); + } + + @Override + protected Mono getInnerByNameAsync(String name) { + return this.inner().getAuthorizationRuleAsync(this.resourceGroupName, + this.namespaceName, + this.topicName, + name); + } + + @Override + protected PagedFlux listInnerAsync() { + return this.inner().listAuthorizationRulesAsync(this.resourceGroupName, this.namespaceName, this.topicName); + } + + @Override + protected PagedIterable listInner() { + return this.inner().listAuthorizationRules(this.resourceGroupName, + this.namespaceName, + this.topicName); + } + + @Override + protected TopicAuthorizationRuleImpl wrapModel(String name) { + return new TopicAuthorizationRuleImpl(this.resourceGroupName, + this.namespaceName, + this.topicName, + name, + this.region, + new SharedAccessAuthorizationRuleResourceInner(), + this.manager()); + } + + @Override + protected TopicAuthorizationRuleImpl wrapModel(SharedAccessAuthorizationRuleResourceInner inner) { + if (inner == null) { + return null; + } + return new TopicAuthorizationRuleImpl(this.resourceGroupName, + this.namespaceName, + this.topicName, + inner.name(), + this.region, + inner, + this.manager()); + } + + @Override + public PagedIterable listByParent(String resourceGroupName, String parentName) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono deleteByParentAsync(String groupName, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono getByParentAsync(String resourceGroup, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicImpl.java new file mode 100644 index 0000000000000..5a895270ad63d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicImpl.java @@ -0,0 +1,396 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.IndependentChildResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.inner.TopicResourceInner; +import com.azure.resourcemanager.servicebus.models.EntityStatus; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscription; +import com.azure.resourcemanager.servicebus.models.Topic; +import com.azure.resourcemanager.servicebus.models.TopicAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.TopicCreateOrUpdateParameters; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * Implementation for Topic. + */ +class TopicImpl + extends IndependentChildResourceImpl< + Topic, + ServiceBusNamespaceImpl, + TopicResourceInner, + TopicImpl, + ServiceBusManager> + implements + Topic, + Topic.Definition, + Topic.Update { + private List> subscriptionsToCreate; + private List> rulesToCreate; + private List subscriptionsToDelete; + private List rulesToDelete; + + TopicImpl(String resourceGroupName, + String namespaceName, + String name, + Region region, + TopicResourceInner inner, + ServiceBusManager manager) { + super(name, inner, manager); + this.withExistingParentResource(resourceGroupName, namespaceName); + initChildrenOperationsCache(); + if (inner.location() == null) { + inner.withLocation(region.toString()); + } + } + + @Override + public OffsetDateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public OffsetDateTime accessedAt() { + return this.inner().accessedAt(); + } + + @Override + public OffsetDateTime updatedAt() { + return this.inner().updatedAt(); + } + + @Override + public long maxSizeInMB() { + return Utils.toPrimitiveLong(this.inner().maxSizeInMegabytes()); + } + + @Override + public long currentSizeInBytes() { + return Utils.toPrimitiveLong(this.inner().sizeInBytes()); + } + + @Override + public boolean isBatchedOperationsEnabled() { + return Utils.toPrimitiveBoolean(this.inner().enableBatchedOperations()); + } + + @Override + public boolean isExpressEnabled() { + return Utils.toPrimitiveBoolean(this.inner().enableExpress()); + } + + @Override + public boolean isPartitioningEnabled() { + return Utils.toPrimitiveBoolean(this.inner().enablePartitioning()); + } + + @Override + public boolean isDuplicateDetectionEnabled() { + return Utils.toPrimitiveBoolean(this.inner().requiresDuplicateDetection()); + } + + @Override + public long deleteOnIdleDurationInMinutes() { + if (this.inner().autoDeleteOnIdle() == null) { + return 0; + } + TimeSpan timeSpan = TimeSpan.parse(this.inner().autoDeleteOnIdle()); + return (long) timeSpan.totalMinutes(); + } + + @Override + public Duration defaultMessageTtlDuration() { + if (this.inner().defaultMessageTimeToLive() == null) { + return null; + } + return TimeSpan.parse(this.inner().defaultMessageTimeToLive()).toDuration(); + } + + @Override + public Duration duplicateMessageDetectionHistoryDuration() { + if (this.inner().duplicateDetectionHistoryTimeWindow() == null) { + return null; + } + return TimeSpan.parse(this.inner().duplicateDetectionHistoryTimeWindow()).toDuration(); + } + + @Override + public long activeMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().activeMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().activeMessageCount()); + } + + @Override + public long deadLetterMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().deadLetterMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().deadLetterMessageCount()); + } + + @Override + public long scheduledMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().scheduledMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().scheduledMessageCount()); + } + + @Override + public long transferDeadLetterMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().transferDeadLetterMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().transferDeadLetterMessageCount()); + } + + @Override + public long transferMessageCount() { + if (this.inner().countDetails() == null + || this.inner().countDetails().transferMessageCount() == null) { + return 0; + } + return Utils.toPrimitiveLong(this.inner().countDetails().transferMessageCount()); + } + + @Override + public int subscriptionCount() { + if (this.inner().subscriptionCount() == null) { + return 0; + } + return Utils.toPrimitiveInt(this.inner().subscriptionCount()); + } + + @Override + public EntityStatus status() { + return this.inner().status(); + } + + @Override + public ServiceBusSubscriptionsImpl subscriptions() { + return new ServiceBusSubscriptionsImpl(this.resourceGroupName(), + this.parentName, + this.name(), + this.region(), + manager()); + } + + @Override + public TopicAuthorizationRulesImpl authorizationRules() { + return new TopicAuthorizationRulesImpl(this.resourceGroupName(), + this.parentName, + this.name(), + this.region(), + manager()); + } + + @Override + public TopicImpl withSizeInMB(long sizeInMB) { + this.inner().withMaxSizeInMegabytes(sizeInMB); + return this; + } + + @Override + public TopicImpl withPartitioning() { + this.inner().withEnablePartitioning(true); + return this; + } + + @Override + public TopicImpl withoutPartitioning() { + this.inner().withEnablePartitioning(false); + return this; + } + + @Override + public TopicImpl withDeleteOnIdleDurationInMinutes(int durationInMinutes) { + TimeSpan timeSpan = new TimeSpan().withMinutes(durationInMinutes); + this.inner().withAutoDeleteOnIdle(timeSpan.toString()); + return this; + } + + @Override + public TopicImpl withDefaultMessageTTL(Duration ttl) { + this.inner().withDefaultMessageTimeToLive(TimeSpan.fromDuration(ttl).toString()); + return this; + } + + @Override + public TopicImpl withExpressMessage() { + this.inner().withEnableExpress(true); + return this; + } + + @Override + public TopicImpl withoutExpressMessage() { + this.inner().withEnableExpress(false); + return this; + } + + @Override + public TopicImpl withMessageBatching() { + this.inner().withEnableBatchedOperations(true); + return this; + } + + @Override + public TopicImpl withoutMessageBatching() { + this.inner().withEnableBatchedOperations(false); + return this; + } + + @Override + public TopicImpl withDuplicateMessageDetection(Duration duplicateDetectionHistoryDuration) { + this.inner().withRequiresDuplicateDetection(true); + this.inner().withDuplicateDetectionHistoryTimeWindow(TimeSpan + .fromDuration(duplicateDetectionHistoryDuration) + .toString()); + return this; + } + + @Override + public TopicImpl withDuplicateMessageDetectionHistoryDuration(Duration duration) { + this.inner().withDuplicateDetectionHistoryTimeWindow(TimeSpan + .fromDuration(duration) + .toString()); + // Below shortcut cannot be used as 'withRequiresDuplicateDetection' cannot be changed + // once the topic is created. + // return withDuplicateMessageDetection(duration); + return this; + } + + @Override + public TopicImpl withoutDuplicateMessageDetection() { + this.inner().withRequiresDuplicateDetection(false); + return this; + } + + @Override + public TopicImpl withNewSendRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withSendingEnabled()); + return this; + } + + @Override + public TopicImpl withNewListenRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withListeningEnabled()); + return this; + } + + @Override + public TopicImpl withNewManageRule(String name) { + this.rulesToCreate.add(this.authorizationRules().define(name).withManagementEnabled()); + return this; + } + + @Override + public TopicImpl withoutAuthorizationRule(String name) { + this.rulesToDelete.add(name); + return this; + } + + @Override + public TopicImpl withNewSubscription(String name) { + this.subscriptionsToCreate.add(this.subscriptions().define(name)); + return this; + } + + @Override + public TopicImpl withoutSubscription(String name) { + this.subscriptionsToDelete.add(name); + return this; + } + + @Override + protected Mono getInnerAsync() { + return this.manager().inner().getTopics() + .getAsync(this.resourceGroupName(), + this.parentName, + this.name()); + } + + @Override + protected Mono createChildResourceAsync() { + Mono createTask = this.manager().inner().getTopics() + .createOrUpdateAsync(this.resourceGroupName(), + this.parentName, + this.name(), + prepareForCreate(this.inner())) + .map(inner -> { + setInner(inner); + return inner; + }); + Flux childOperationTasks = submitChildrenOperationsAsync(); + final Topic self = this; + return Flux.concat(createTask, childOperationTasks) + .doOnTerminate(() -> initChildrenOperationsCache()) + .then(Mono.just(self)); + } + + private void initChildrenOperationsCache() { + this.subscriptionsToCreate = new ArrayList<>(); + this.rulesToCreate = new ArrayList<>(); + this.subscriptionsToDelete = new ArrayList<>(); + this.rulesToDelete = new ArrayList<>(); + } + + private Flux submitChildrenOperationsAsync() { + Flux subscriptionsCreateStream = Flux.empty(); + if (this.subscriptionsToCreate.size() > 0) { + subscriptionsCreateStream = this.subscriptions().createAsync(this.subscriptionsToCreate).then().flux(); + } + Flux rulesCreateStream = Flux.empty(); + if (this.rulesToCreate.size() > 0) { + rulesCreateStream = this.authorizationRules().createAsync(this.rulesToCreate).then().flux(); + } + Flux subscriptionsDeleteStream = Flux.empty(); + if (this.subscriptionsToDelete.size() > 0) { + subscriptionsDeleteStream = this.subscriptions().deleteByNameAsync(this.subscriptionsToDelete); + } + Flux rulesDeleteStream = Flux.empty(); + if (this.rulesToDelete.size() > 0) { + rulesDeleteStream = this.authorizationRules().deleteByNameAsync(this.rulesToDelete); + } + return Flux.mergeDelayError(32, + subscriptionsCreateStream, + rulesCreateStream, + subscriptionsDeleteStream, + rulesDeleteStream); + } + + private TopicCreateOrUpdateParameters prepareForCreate(TopicResourceInner inner) { + return new TopicCreateOrUpdateParameters() + .withAutoDeleteOnIdle(inner.autoDeleteOnIdle()) + .withEntityAvailabilityStatus(inner.entityAvailabilityStatus()) + .withDefaultMessageTimeToLive(inner.defaultMessageTimeToLive()) + .withDuplicateDetectionHistoryTimeWindow(inner.duplicateDetectionHistoryTimeWindow()) + .withEnableBatchedOperations(inner.enableBatchedOperations()) + .withEnableExpress(inner.enableExpress()) + .withEnablePartitioning(inner.enablePartitioning()) + .withFilteringMessagesBeforePublishing(inner.filteringMessagesBeforePublishing()) + .withIsAnonymousAccessible(inner.isAnonymousAccessible()) + .withIsExpress(inner.isExpress()) + .withMaxSizeInMegabytes(inner.maxSizeInMegabytes()) + .withRequiresDuplicateDetection(inner.requiresDuplicateDetection()) + .withStatus(inner.status()) + .withSupportOrdering(inner.supportOrdering()) + .withLocation(inner.location()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicsImpl.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicsImpl.java new file mode 100644 index 0000000000000..c87716208c7e5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/TopicsImpl.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.TopicsClient; +import com.azure.resourcemanager.servicebus.fluent.inner.TopicResourceInner; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import com.azure.resourcemanager.servicebus.models.Topic; +import com.azure.resourcemanager.servicebus.models.Topics; +import reactor.core.publisher.Mono; + +/** + * Implementation for Topics. + */ +class TopicsImpl + extends ServiceBusChildResourcesImpl< + Topic, + TopicImpl, + TopicResourceInner, + TopicsClient, + ServiceBusManager, + ServiceBusNamespace> + implements Topics { + private final String resourceGroupName; + private final String namespaceName; + private final Region region; + + private final ClientLogger logger = new ClientLogger(TopicsImpl.class); + + TopicsImpl(String resourceGroupName, String namespaceName, Region region, ServiceBusManager manager) { + super(manager.inner().getTopics(), manager); + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.region = region; + } + + @Override + public TopicImpl define(String name) { + return wrapModel(name); + } + + @Override + public Mono deleteByNameAsync(String name) { + return this.inner().deleteAsync(this.resourceGroupName, + this.namespaceName, + name); + } + + @Override + protected Mono getInnerByNameAsync(String name) { + return this.inner().getAsync(this.resourceGroupName, this.namespaceName, name); + } + + @Override + protected PagedFlux listInnerAsync() { + return this.inner().listAllAsync(this.resourceGroupName, this.namespaceName); + } + + @Override + protected PagedIterable listInner() { + return this.inner().listAll(this.resourceGroupName, + this.namespaceName); + } + + @Override + protected TopicImpl wrapModel(String name) { + return new TopicImpl(this.resourceGroupName, + this.namespaceName, + name, + this.region, + new TopicResourceInner(), + this.manager()); + } + + @Override + protected TopicImpl wrapModel(TopicResourceInner inner) { + if (inner == null) { + return null; + } + return new TopicImpl(this.resourceGroupName, + this.namespaceName, + inner.name(), + this.region, + inner, + this.manager()); + } + + @Override + public PagedIterable listByParent(String resourceGroupName, String parentName) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono deleteByParentAsync(String groupName, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } + + @Override + public Mono getByParentAsync(String resourceGroup, String parentName, String name) { + // 'IndependentChildResourcesImpl' will be refactoring to remove all 'ByParent' methods + // This method is not exposed to end user from any of the derived types of IndependentChildResourcesImpl + // + throw logger.logExceptionAsError(new UnsupportedOperationException()); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AccessRights.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AccessRights.java new file mode 100644 index 0000000000000..80ffe6d9bc4a0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AccessRights.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for AccessRights. */ +public enum AccessRights { + /** Enum value Manage. */ + MANAGE("Manage"), + + /** Enum value Send. */ + SEND("Send"), + + /** Enum value Listen. */ + LISTEN("Listen"); + + /** The actual serialized value for a AccessRights instance. */ + private final String value; + + AccessRights(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AccessRights instance. + * + * @param value the serialized value to parse. + * @return the parsed AccessRights object, or null if unable to parse. + */ + @JsonCreator + public static AccessRights fromString(String value) { + AccessRights[] items = AccessRights.values(); + for (AccessRights item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationKeys.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationKeys.java new file mode 100644 index 0000000000000..1df4f312c1293 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationKeys.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; + +/** + * Authorization key and connection string of authorization rule associated with Service Bus entities. + */ +@Fluent +public interface AuthorizationKeys extends HasInner { + /** + * @return primary key associated with the rule + */ + String primaryKey(); + /** + * @return secondary key associated with the rule + */ + String secondaryKey(); + /** + * @return primary connection string + */ + String primaryConnectionString(); + /** + * @return secondary connection string + */ + String secondaryConnectionString(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationRule.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationRule.java new file mode 100644 index 0000000000000..617ec0fdee1a9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationRule.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * Type representing authorization rule. + * + * @param the specific rule type + */ +@Fluent +public interface AuthorizationRule> extends + IndependentChildResource, + Refreshable { + + /** + * @return rights associated with the rule + */ + List rights(); + + /** + * @return a representation of the deferred computation of this call, + * returning the primary, secondary keys and the connection strings + */ + Mono getKeysAsync(); + + /** + * @return the primary, secondary keys and connection strings + */ + AuthorizationKeys getKeys(); + + /** + * Regenerates primary or secondary keys. + * + * @param policykey the key to regenerate + * @return a representation of the deferred computation of this call, + * returning the primary, secondary keys and the connection strings + */ + Mono regenerateKeyAsync(Policykey policykey); + + /** + * Regenerates primary or secondary keys. + * + * @param policykey the key to regenerate + * @return primary, secondary keys and connection strings + */ + AuthorizationKeys regenerateKey(Policykey policykey); + + /** + * Grouping of commons authorization rule definition stages shared between different Service Bus + * entities (namespace, queue, topic, subscription) access rules. + */ + interface DefinitionStages { + /** + * The stage of the Service Bus authorization rule definition allowing to enable listen policy. + * + * @param the next stage of the definition + */ + interface WithListen { + /** + * @return the next stage of the definition + */ + T withListeningEnabled(); + } + + /** + * The stage of the Service Bus authorization rule definition allowing to enable send policy. + * + * @param the next stage of the definition + */ + interface WithSend { + /** + * @return the next stage of the definition + */ + T withSendingEnabled(); + } + + /** + * The stage of the Service Bus authorization rule definition allowing to enable manage policy. + * + * @param the next stage of the definition + */ + interface WithManage { + /** + * @return the next stage of the definition + */ + T withManagementEnabled(); + } + + /** + * The stage of the Service Bus authorization rule definition allowing to enable send or manage policy. + * + * @param the next stage of the definition + */ + interface WithSendOrManage extends WithSend, WithManage { + } + + /** + * The stage of the Service Bus authorization rule definition allowing to enable listen, send or manage policy. + * + * @param the next stage of the definition + */ + interface WithListenOrSendOrManage extends WithListen, WithSendOrManage { + } + } + + /** + * Grouping of commons authorization rule update stages shared between different Service Bus + * entities (namespace, queue, topic, subscription) access rules. + */ + interface UpdateStages { + /** + * The stage of the Service Bus authorization rule update allowing to enable listen policy. + * + * @param the next stage of the update + */ + interface WithListen { + /** + * @return the next stage of the update + */ + T withListeningEnabled(); + } + + /** + * The stage of the Service Bus authorization rule update allowing to enable send policy. + * + * @param the next stage of the update + */ + interface WithSend { + /** + * @return the next stage of the update + */ + T withSendingEnabled(); + } + + /** + * The stage of Service Bus authorization rule update allowing to enable manage policy. + * + * @param the next stage of the update + */ + interface WithManage { + /** + * @return the next stage of the update + */ + T withManagementEnabled(); + } + + /** + * The stage of the Service Bus authorization rule update allowing to enable send or manage policy. + * + * @param the next stage of the update + */ + interface WithSendOrManage extends WithSend, WithManage { + } + + /** + * The stage of the Service Bus authorization rule update allowing to enable listen, send or manage policy. + * + * @param the next stage of the update + */ + interface WithListenOrSendOrManage extends WithListen, WithSendOrManage { + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationRules.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationRules.java new file mode 100644 index 0000000000000..a3f942526c909 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/AuthorizationRules.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingByName; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.servicebus.ServiceBusManager; + +/** + * Entry point to authorization rules management API. + * + * @param the specific rule type + */ +@Fluent +public interface AuthorizationRules extends + SupportsListing, + SupportsGettingByName, + SupportsDeletingByName, + HasManager { +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/CheckNameAvailability.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/CheckNameAvailability.java new file mode 100644 index 0000000000000..9673a336585d1 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/CheckNameAvailability.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.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; + +/** The CheckNameAvailability model. */ +@Fluent +public final class CheckNameAvailability { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailability.class); + + /* + * The Name to check the namespace name availability and The namespace name + * can contain only letters, numbers, and hyphens. The namespace must start + * with a letter, and it must end with a letter or number. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the name property: The Name to check the namespace name availability and The namespace name can contain only + * letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The Name to check the namespace name availability and The namespace name can contain only + * letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. + * + * @param name the name value to set. + * @return the CheckNameAvailability object itself. + */ + public CheckNameAvailability withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model CheckNameAvailability")); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/CheckNameAvailabilityResult.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/CheckNameAvailabilityResult.java new file mode 100644 index 0000000000000..e3aa4bff79795 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/CheckNameAvailabilityResult.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.inner.CheckNameAvailabilityResultInner; + +/** + * The result of checking for Service Bus namespace name availability. + */ +@Fluent +public interface CheckNameAvailabilityResult extends HasInner { + /** + * @return a boolean value that indicates whether the name is available for + * you to use. If true, the name is available. If false, the name has + * already been taken or invalid and cannot be used. + */ + boolean isAvailable(); + /** + * @return the unavailabilityReason that a namespace name could not be used. The + * Reason element is only returned if NameAvailable is false. + */ + UnavailableReason unavailabilityReason(); + /** + * @return an error message explaining the Reason value in more detail + */ + String unavailabilityMessage(); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/EntityAvailabilityStatus.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/EntityAvailabilityStatus.java new file mode 100644 index 0000000000000..7550820796e7d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/EntityAvailabilityStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for EntityAvailabilityStatus. */ +public enum EntityAvailabilityStatus { + /** Enum value Available. */ + AVAILABLE("Available"), + + /** Enum value Limited. */ + LIMITED("Limited"), + + /** Enum value Renaming. */ + RENAMING("Renaming"), + + /** Enum value Restoring. */ + RESTORING("Restoring"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a EntityAvailabilityStatus instance. */ + private final String value; + + EntityAvailabilityStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EntityAvailabilityStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed EntityAvailabilityStatus object, or null if unable to parse. + */ + @JsonCreator + public static EntityAvailabilityStatus fromString(String value) { + EntityAvailabilityStatus[] items = EntityAvailabilityStatus.values(); + for (EntityAvailabilityStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/EntityStatus.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/EntityStatus.java new file mode 100644 index 0000000000000..57efe78273a7b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/EntityStatus.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for EntityStatus. */ +public enum EntityStatus { + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value ReceiveDisabled. */ + RECEIVE_DISABLED("ReceiveDisabled"), + + /** Enum value Renaming. */ + RENAMING("Renaming"), + + /** Enum value Restoring. */ + RESTORING("Restoring"), + + /** Enum value SendDisabled. */ + SEND_DISABLED("SendDisabled"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a EntityStatus instance. */ + private final String value; + + EntityStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EntityStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed EntityStatus object, or null if unable to parse. + */ + @JsonCreator + public static EntityStatus fromString(String value) { + EntityStatus[] items = EntityStatus.values(); + for (EntityStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/MessageCountDetails.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/MessageCountDetails.java new file mode 100644 index 0000000000000..05916e446d378 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/MessageCountDetails.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MessageCountDetails model. */ +@Immutable +public final class MessageCountDetails { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MessageCountDetails.class); + + /* + * Number of active messages in the queue, topic, or subscription. + */ + @JsonProperty(value = "activeMessageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long activeMessageCount; + + /* + * Number of messages that are dead lettered. + */ + @JsonProperty(value = "deadLetterMessageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long deadLetterMessageCount; + + /* + * Number of scheduled messages. + */ + @JsonProperty(value = "scheduledMessageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long scheduledMessageCount; + + /* + * Number of messages transferred into dead letters. + */ + @JsonProperty(value = "transferDeadLetterMessageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long transferDeadLetterMessageCount; + + /* + * Number of messages transferred to another queue, topic, or subscription. + */ + @JsonProperty(value = "transferMessageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long transferMessageCount; + + /** + * Get the activeMessageCount property: Number of active messages in the queue, topic, or subscription. + * + * @return the activeMessageCount value. + */ + public Long activeMessageCount() { + return this.activeMessageCount; + } + + /** + * Get the deadLetterMessageCount property: Number of messages that are dead lettered. + * + * @return the deadLetterMessageCount value. + */ + public Long deadLetterMessageCount() { + return this.deadLetterMessageCount; + } + + /** + * Get the scheduledMessageCount property: Number of scheduled messages. + * + * @return the scheduledMessageCount value. + */ + public Long scheduledMessageCount() { + return this.scheduledMessageCount; + } + + /** + * Get the transferDeadLetterMessageCount property: Number of messages transferred into dead letters. + * + * @return the transferDeadLetterMessageCount value. + */ + public Long transferDeadLetterMessageCount() { + return this.transferDeadLetterMessageCount; + } + + /** + * Get the transferMessageCount property: Number of messages transferred to another queue, topic, or subscription. + * + * @return the transferMessageCount value. + */ + public Long transferMessageCount() { + return this.transferMessageCount; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceAuthorizationRule.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceAuthorizationRule.java new file mode 100644 index 0000000000000..fe7bb1c319886 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceAuthorizationRule.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; + +/** + * Type representing authorization rule defined for namespace. + */ +@Fluent +public interface NamespaceAuthorizationRule extends + AuthorizationRule, + Updatable { + /** + * @return the name of the parent namespace name + */ + String namespaceName(); + + /** + * Grouping of Service Bus namespace authorization rule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of namespace authorization rule definition. + */ + interface Blank extends AuthorizationRule.DefinitionStages.WithListenOrSendOrManage { + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + + /** + * The entirety of the namespace authorization rule definition. + */ + interface Definition extends + NamespaceAuthorizationRule.DefinitionStages.Blank, + NamespaceAuthorizationRule.DefinitionStages.WithCreate { + } + + /** + * The entirety of the namespace authorization rule update. + */ + interface Update extends + Appliable, + AuthorizationRule.UpdateStages.WithListenOrSendOrManage { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceAuthorizationRules.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceAuthorizationRules.java new file mode 100644 index 0000000000000..68bb878bbd1c3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceAuthorizationRules.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.NamespacesClient; + +/** + * Entry point to namespace authorization rules management API. + */ +@Fluent +public interface NamespaceAuthorizationRules extends + AuthorizationRules, + SupportsCreating, + HasInner { +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceCreateOrUpdateParameters.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceCreateOrUpdateParameters.java new file mode 100644 index 0000000000000..2e5cf42a15e84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceCreateOrUpdateParameters.java @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** The NamespaceCreateOrUpdateParameters model. */ +@JsonFlatten +@Fluent +public class NamespaceCreateOrUpdateParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NamespaceCreateOrUpdateParameters.class); + + /* + * Namespace location. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /* + * SKU of the namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * Namespace tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /* + * Provisioning state of the namespace. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * State of the namespace. + */ + @JsonProperty(value = "properties.status") + private NamespaceState status; + + /* + * The time the namespace was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The time the namespace was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /* + * Endpoint you can use to perform Service Bus operations. + */ + @JsonProperty(value = "properties.serviceBusEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String serviceBusEndpoint; + + /* + * Indicates whether to create an ACS namespace. + */ + @JsonProperty(value = "properties.createACSNamespace") + private Boolean createAcsNamespace; + + /* + * Specifies whether this instance is enabled. + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * Get the location property: Namespace location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Namespace location. + * + * @param location the location value to set. + * @return the NamespaceCreateOrUpdateParameters object itself. + */ + public NamespaceCreateOrUpdateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the sku property: SKU of the namespace. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: SKU of the namespace. + * + * @param sku the sku value to set. + * @return the NamespaceCreateOrUpdateParameters object itself. + */ + public NamespaceCreateOrUpdateParameters withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the tags property: Namespace tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Namespace tags. + * + * @param tags the tags value to set. + * @return the NamespaceCreateOrUpdateParameters object itself. + */ + public NamespaceCreateOrUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the namespace. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: State of the namespace. + * + * @return the status value. + */ + public NamespaceState status() { + return this.status; + } + + /** + * Set the status property: State of the namespace. + * + * @param status the status value to set. + * @return the NamespaceCreateOrUpdateParameters object itself. + */ + public NamespaceCreateOrUpdateParameters withStatus(NamespaceState status) { + this.status = status; + return this; + } + + /** + * Get the createdAt property: The time the namespace was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the updatedAt property: The time the namespace was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get the serviceBusEndpoint property: Endpoint you can use to perform Service Bus operations. + * + * @return the serviceBusEndpoint value. + */ + public String serviceBusEndpoint() { + return this.serviceBusEndpoint; + } + + /** + * Get the createAcsNamespace property: Indicates whether to create an ACS namespace. + * + * @return the createAcsNamespace value. + */ + public Boolean createAcsNamespace() { + return this.createAcsNamespace; + } + + /** + * Set the createAcsNamespace property: Indicates whether to create an ACS namespace. + * + * @param createAcsNamespace the createAcsNamespace value to set. + * @return the NamespaceCreateOrUpdateParameters object itself. + */ + public NamespaceCreateOrUpdateParameters withCreateAcsNamespace(Boolean createAcsNamespace) { + this.createAcsNamespace = createAcsNamespace; + return this; + } + + /** + * Get the enabled property: Specifies whether this instance is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Specifies whether this instance is enabled. + * + * @param enabled the enabled value to set. + * @return the NamespaceCreateOrUpdateParameters object itself. + */ + public NamespaceCreateOrUpdateParameters withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (location() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property location in model NamespaceCreateOrUpdateParameters")); + } + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceSku.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceSku.java new file mode 100644 index 0000000000000..03a00fa8b91a0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceSku.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; + +/** + * Defines values for NamespaceSku. + */ +public final class NamespaceSku { + /** Static value NamespaceSku for BASIC. */ + public static final NamespaceSku BASIC = new NamespaceSku( + new Sku().withName(SkuName.BASIC).withTier(SkuTier.BASIC)); + /** Static value NamespaceSku for STANDARD. */ + public static final NamespaceSku STANDARD = new NamespaceSku( + new Sku().withName(SkuName.STANDARD).withTier(SkuTier.STANDARD)); + /** Static value NamespaceSku for PREMIUM_CAPACITY1. */ + public static final NamespaceSku PREMIUM_CAPACITY1 = new NamespaceSku( + new Sku().withCapacity(1).withName(SkuName.PREMIUM).withTier(SkuTier.PREMIUM)); + /** Static value NamespaceSku for PREMIUM_CAPACITY2. */ + public static final NamespaceSku PREMIUM_CAPACITY2 = new NamespaceSku( + new Sku().withCapacity(2).withName(SkuName.PREMIUM).withTier(SkuTier.PREMIUM)); + /** Static value NamespaceSku for PREMIUM_CAPACITY4. */ + public static final NamespaceSku PREMIUM_CAPACITY4 = new NamespaceSku( + new Sku().withCapacity(4).withName(SkuName.PREMIUM).withTier(SkuTier.PREMIUM)); + + private final Sku sku; + + /** + * Creates Service Bus namespace sku. + * + * @param name sku name + * @param tier sku tier + */ + public NamespaceSku(String name, String tier) { + this(new Sku() + .withCapacity(null) + .withName(SkuName.fromString(name)) + .withTier(SkuTier.fromString(tier))); + } + + /** + * Creates Service Bus namespace SKU. + * + * @param name sku name + * @param tier sku tier + * @param capacity factor of resources allocated to host Service Bus + */ + public NamespaceSku(String name, String tier, int capacity) { + this(new Sku() + .withCapacity(capacity) + .withName(SkuName.fromString(name)) + .withTier(SkuTier.fromString(tier))); + } + + /** + * Creates Service Bus namespace SKU. + * + * @param sku inner sku model instance + */ + public NamespaceSku(Sku sku) { + this.sku = sku; + } + + /** + * @return sku name + */ + public SkuName name() { + return this.sku.name(); + } + + /** + * @return sku tier + */ + public SkuTier tier() { + return this.sku.tier(); + } + + /** + * @return sku capacity + */ + public int capacity() { + return Utils.toPrimitiveInt(this.sku.capacity()); + } + + @Override + public String toString() { + if (this.sku.capacity() != null) { + return String.format("%s_%s_%d", this.sku.name(), this.sku.tier(), this.sku.capacity()); + } else { + return String.format("%s_%s", this.sku.name(), this.sku.tier()); + } + } + + @Override + public int hashCode() { + return this.toString().hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof NamespaceSku)) { + return false; + } + if (obj == this) { + return true; + } + NamespaceSku rhs = (NamespaceSku) obj; + if (sku == null) { + return rhs.sku == null; + } else { + return this.toString().equalsIgnoreCase(rhs.toString()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceState.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceState.java new file mode 100644 index 0000000000000..8eb48c19f18b2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceState.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.servicebus.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for NamespaceState. */ +public enum NamespaceState { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Created. */ + CREATED("Created"), + + /** Enum value Activating. */ + ACTIVATING("Activating"), + + /** Enum value Enabling. */ + ENABLING("Enabling"), + + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Disabling. */ + DISABLING("Disabling"), + + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value SoftDeleting. */ + SOFT_DELETING("SoftDeleting"), + + /** Enum value SoftDeleted. */ + SOFT_DELETED("SoftDeleted"), + + /** Enum value Removing. */ + REMOVING("Removing"), + + /** Enum value Removed. */ + REMOVED("Removed"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a NamespaceState instance. */ + private final String value; + + NamespaceState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a NamespaceState instance. + * + * @param value the serialized value to parse. + * @return the parsed NamespaceState object, or null if unable to parse. + */ + @JsonCreator + public static NamespaceState fromString(String value) { + NamespaceState[] items = NamespaceState.values(); + for (NamespaceState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceUpdateParameters.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceUpdateParameters.java new file mode 100644 index 0000000000000..193097a91c5b3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/NamespaceUpdateParameters.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.servicebus.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.Map; + +/** The NamespaceUpdateParameters model. */ +@Fluent +public final class NamespaceUpdateParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NamespaceUpdateParameters.class); + + /* + * Resource tags + */ + @JsonProperty(value = "tags") + private Map tags; + + /* + * The sku of the created namespace + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku property: The sku of the created namespace. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku of the created namespace. + * + * @param sku the sku value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/OperationDisplay.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/OperationDisplay.java new file mode 100644 index 0000000000000..a175f8a3971fd --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/OperationDisplay.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OperationDisplay model. */ +@Immutable +public final class OperationDisplay { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); + + /* + * Service provider: Microsoft.ServiceBus + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * Resource on which the operation is performed: Invoice, etc. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * Operation type: Read, write, delete, etc. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * Get the provider property: Service provider: Microsoft.ServiceBus. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: Resource on which the operation is performed: Invoice, etc. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: Operation type: Read, write, delete, etc. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Policykey.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Policykey.java new file mode 100644 index 0000000000000..32d1e21a6cc1c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Policykey.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for Policykey. */ +public enum Policykey { + /** Enum value PrimaryKey. */ + PRIMARY_KEY("PrimaryKey"), + + /** Enum value SecondaryKey. */ + SECONDARY_KEY("SecondaryKey"); + + /** The actual serialized value for a Policykey instance. */ + private final String value; + + Policykey(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Policykey instance. + * + * @param value the serialized value to parse. + * @return the parsed Policykey object, or null if unable to parse. + */ + @JsonCreator + public static Policykey fromString(String value) { + Policykey[] items = Policykey.values(); + for (Policykey item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Queue.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Queue.java new file mode 100644 index 0000000000000..b02d10e8b85e6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Queue.java @@ -0,0 +1,579 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import com.azure.resourcemanager.servicebus.fluent.inner.QueueResourceInner; +import com.azure.resourcemanager.servicebus.ServiceBusManager; + +import java.time.Duration; +import java.time.OffsetDateTime; + +/** + * Type representing Service Bus queue. + */ +@Fluent +public interface Queue extends + IndependentChildResource, + Refreshable, + Updatable { + /** + * @return the exact time the queue was created + */ + OffsetDateTime createdAt(); + /** + * @return last time a message was sent, or the last time there was a receive request to this queue + */ + OffsetDateTime accessedAt(); + /** + * @return the exact time the queue was updated + */ + OffsetDateTime updatedAt(); + /** + * @return the maximum size of memory allocated for the queue in megabytes + */ + long maxSizeInMB(); + /** + * @return current size of the queue, in bytes + */ + long currentSizeInBytes(); + /** + * @return indicates whether server-side batched operations are enabled + */ + boolean isBatchedOperationsEnabled(); + /** + * @return indicates whether this queue has dead letter support when a message expires + */ + boolean isDeadLetteringEnabledForExpiredMessages(); + /** + * @return indicates whether express entities are enabled + */ + boolean isExpressEnabled(); + /** + * @return indicates whether the queue is to be partitioned across multiple message brokers + */ + boolean isPartitioningEnabled(); + /** + * @return indicates whether the queue supports sessions + */ + boolean isSessionEnabled(); + /** + * @return indicates if this queue requires duplicate detection + */ + boolean isDuplicateDetectionEnabled(); + /** + * @return the duration of peek-lock which is the amount of time that the message is locked for other receivers + */ + long lockDurationInSeconds(); + /** + * @return the idle duration after which the queue is automatically deleted + */ + long deleteOnIdleDurationInMinutes(); + /** + * @return the duration after which the message expires, starting from when the message is sent to queue + */ + Duration defaultMessageTtlDuration(); + /** + * @return the duration of the duplicate detection history + */ + Duration duplicateMessageDetectionHistoryDuration(); + /** + * @return the maximum number of a message delivery before marking it as dead-lettered + */ + int maxDeliveryCountBeforeDeadLetteringMessage(); + /** + * @return the number of messages in the queue + */ + long messageCount(); + /** + * @return number of active messages in the queue + */ + long activeMessageCount(); + /** + * @return number of messages in the dead-letter queue + */ + long deadLetterMessageCount(); + /** + * @return number of messages sent to the queue that are yet to be released + * for consumption + */ + long scheduledMessageCount(); + /** + * @return number of messages transferred into dead letters + */ + long transferDeadLetterMessageCount(); + /** + * @return number of messages transferred to another queue, topic, or subscription + */ + long transferMessageCount(); + /** + * @return the current status of the queue + */ + EntityStatus status(); + /** + * @return entry point to manage authorization rules for the Service Bus queue + */ + QueueAuthorizationRules authorizationRules(); + + /** + * The entirety of the Service Bus queue definition. + */ + interface Definition extends + Queue.DefinitionStages.Blank, + Queue.DefinitionStages.WithCreate { + } + + /** + * Grouping of Service Bus queue definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a queue definition. + */ + interface Blank extends WithCreate { + } + + /** + * The stage of the queue definition allowing to specify size. + */ + interface WithSize { + /** + * Specifies the maximum size of memory allocated for the queue. + * + * @param sizeInMB size in MB + * @return the next stage of queue definition + */ + WithCreate withSizeInMB(long sizeInMB); + } + + /** + * The stage of the queue definition allowing to specify partitioning behaviour. + */ + interface WithPartitioning { + /** + * Specifies that partitioning should be enabled on this queue. + * + * @return the next stage of queue definition + */ + WithCreate withPartitioning(); + + /** + * Specifies that the default partitioning should be disabled on this queue. + * Note: if the parent Service Bus is Premium SKU then partition cannot be + * disabled + * + * @return the next stage of queue definition + */ + WithCreate withoutPartitioning(); + } + + /** + * The stage of the queue definition allowing to define auto delete behaviour. + */ + interface WithDeleteOnIdle { + /** + * The idle interval after which the queue is automatically deleted. + * Note: unless it is explicitly overridden the default delete on idle duration + * is infinite (TimeSpan.Max). + * + * @param durationInMinutes idle duration in minutes + * @return the next stage of queue definition + */ + WithCreate withDeleteOnIdleDurationInMinutes(int durationInMinutes); + } + + /** + * The stage of the queue definition allowing to define duration for message lock. + */ + interface WithMessageLockDuration { + /** + * Specifies the amount of time that the message is locked for other receivers. + * Note: unless it is explicitly overridden the default lock duration is 60 seconds, + * the maximum allowed value is 300 seconds. + * + * @param durationInSeconds duration of a lock in seconds + * @return the next stage of queue definition + */ + WithCreate withMessageLockDurationInSeconds(int durationInSeconds); + } + + /** + * The stage of the queue definition allowing to define default TTL for messages. + */ + interface WithDefaultMessageTTL { + /** + * Specifies the duration after which the message expires. + * Note: unless it is explicitly overridden the default ttl is infinite (TimeSpan.Max). + * + * @param ttl time to live duration + * @return the next stage of queue definition + */ + WithCreate withDefaultMessageTTL(Duration ttl); + } + + /** + * The stage of the queue definition allowing to enable session support. + */ + interface WithSession { + /** + * Specifies that session support should be enabled for the queue. + * + * @return the next stage of queue definition + */ + WithCreate withSession(); + } + + /** + * The stage of the queue definition allowing to mark messages as express messages. + */ + interface WithExpressMessage { + /** + * Specifies that messages in this queue are express hence they can be cached in memory + * for some time before storing it in messaging store. + * Note: By default queue is not express. + * + * @return the next stage of queue definition + */ + WithCreate withExpressMessage(); + } + + /** + * The stage of the queue definition allowing specify batching behaviour. + */ + interface WithMessageBatching { + /** + * Specifies that the default batching should be disabled on this queue. + * With batching Service Bus can batch multiple message when it write or delete messages + * from it's internal store. + * + * @return the next stage of queue definition + */ + WithCreate withoutMessageBatching(); + } + + /** + * The stage of the queue definition allowing to specify duration of the duplicate message + * detection history. + */ + interface WithDuplicateMessageDetection { + /** + * Specifies the duration of the duplicate message detection history. + * + * @param duplicateDetectionHistoryDuration duration of the history + * @return the next stage of queue definition + */ + WithCreate withDuplicateMessageDetection(Duration duplicateDetectionHistoryDuration); + } + + /** + * The stage of the queue definition allowing to specify whether expired message can be moved + * to secondary dead-letter queue. + */ + interface WithExpiredMessageMovedToDeadLetterQueue { + /** + * Specifies that expired message must be moved to dead-letter queue. + * + * @return the next stage of queue definition + */ + WithCreate withExpiredMessageMovedToDeadLetterQueue(); + } + + /** + * The stage of the queue definition allowing to specify maximum delivery count of message before + * moving it to dead-letter queue. + */ + interface WithMessageMovedToDeadLetterQueueOnMaxDeliveryCount { + /** + * Specifies maximum number of times a message can be delivered. Once this count has exceeded, + * message will be moved to dead-letter queue. + * + * @param deliveryCount maximum delivery count + * @return the next stage of queue definition + */ + WithCreate withMessageMovedToDeadLetterQueueOnMaxDeliveryCount(int deliveryCount); + } + + /** + * The stage of the queue definition allowing to add an authorization rule for accessing + * the queue. + */ + interface WithAuthorizationRule { + /** + * Creates a send authorization rule for the queue. + * + * @param name rule name + * @return next stage of the queue definition + */ + WithCreate withNewSendRule(String name); + /** + * Creates a listen authorization rule for the queue. + * + * @param name rule name + * @return next stage of the queue definition + */ + WithCreate withNewListenRule(String name); + /** + * Creates a manage authorization rule for the queue. + * + * @param name rule name + * @return next stage of the queue definition + */ + WithCreate withNewManageRule(String name); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends + Creatable, + Queue.DefinitionStages.WithSize, + Queue.DefinitionStages.WithPartitioning, + Queue.DefinitionStages.WithDeleteOnIdle, + Queue.DefinitionStages.WithMessageLockDuration, + Queue.DefinitionStages.WithDefaultMessageTTL, + Queue.DefinitionStages.WithSession, + Queue.DefinitionStages.WithExpressMessage, + Queue.DefinitionStages.WithMessageBatching, + Queue.DefinitionStages.WithDuplicateMessageDetection, + Queue.DefinitionStages.WithExpiredMessageMovedToDeadLetterQueue, + Queue.DefinitionStages.WithMessageMovedToDeadLetterQueueOnMaxDeliveryCount, + Queue.DefinitionStages.WithAuthorizationRule { + } + } + + /** + * The template for Service Bus queue update operation, containing all the settings that can be modified. + */ + interface Update extends + Appliable, + Queue.UpdateStages.WithSize, + Queue.UpdateStages.WithDeleteOnIdle, + Queue.UpdateStages.WithMessageLockDuration, + Queue.UpdateStages.WithDefaultMessageTTL, + Queue.UpdateStages.WithSession, + Queue.UpdateStages.WithExpressMessage, + Queue.UpdateStages.WithMessageBatching, + Queue.UpdateStages.WithDuplicateMessageDetection, + Queue.UpdateStages.WithExpiredMessageMovedToDeadLetterQueue, + Queue.UpdateStages.WithMessageMovedToDeadLetterQueueOnMaxDeliveryCount, + Queue.UpdateStages.WithAuthorizationRule { + } + + /** + * Grouping of Service Bus queue update stages. + */ + interface UpdateStages { + /** + * The stage of the queue definition allowing to specify size. + */ + interface WithSize { + /** + * Specifies the maximum size of memory allocated for the queue. + * + * @param sizeInMB size in MB + * @return the next stage of queue update + */ + Update withSizeInMB(long sizeInMB); + } + + /** + * The stage of the queue definition allowing to define auto delete behaviour. + */ + interface WithDeleteOnIdle { + /** + * The idle interval after which the queue is automatically deleted. + * + * @param durationInMinutes idle duration in minutes + * @return the next stage of queue update + */ + Update withDeleteOnIdleDurationInMinutes(int durationInMinutes); + } + + /** + * The stage of the queue definition allowing to define duration for message lock. + */ + interface WithMessageLockDuration { + /** + * Specifies the amount of time that the message is locked for other receivers. + * + * @param durationInSeconds duration of a lock in seconds + * @return the next stage of queue update + */ + Update withMessageLockDurationInSeconds(int durationInSeconds); + } + + /** + * The stage of the queue definition allowing to define default TTL for messages. + */ + interface WithDefaultMessageTTL { + /** + * Specifies the duration after which the message expires. + * + * @param ttl time to live duration + * @return the next stage of queue update + */ + Update withDefaultMessageTTL(Duration ttl); + } + + /** + * The stage of the queue definition allowing to enable session support. + */ + interface WithSession { + /** + * Specifies that session support should be enabled for the queue. + * + * @return the next stage of queue update + */ + Update withSession(); + + /** + * Specifies that session support should be disabled for the queue. + * + * @return the next stage of queue update + */ + Update withoutSession(); + } + + /** + * The stage of the queue definition allowing to mark it as either holding regular or express + * messages. + */ + interface WithExpressMessage { + /** + * Specifies that messages in this queue are express hence they can be cached in memory + * for some time before storing it in messaging store. + * + * @return the next stage of queue update + */ + Update withExpressMessage(); + + /** + * Specifies that messages in this queue are not express hence they should be cached in memory. + * + * @return the next stage of queue update + */ + Update withoutExpressMessage(); + } + + /** + * The stage of the queue definition allowing configure message batching behaviour. + */ + interface WithMessageBatching { + /** + * Specifies that Service Bus can batch multiple message when it write messages to or delete + * messages from it's internal store. This increases the throughput. + * + * @return the next stage of queue update + */ + Update withMessageBatching(); + + /** + * Specifies that batching of messages should be disabled when Service Bus write messages to + * or delete messages from it's internal store. + * + * @return the next stage of queue update + */ + Update withoutMessageBatching(); + } + + /** + * The stage of the queue definition allowing to specify duration of the duplicate message + * detection history. + */ + interface WithDuplicateMessageDetection { + /** + * Specifies the duration of the duplicate message detection history. + * + * @param duration duration of the history + * @return the next stage of queue update + */ + Update withDuplicateMessageDetectionHistoryDuration(Duration duration); + + /** + * Specifies that duplicate message detection needs to be disabled. + * + * @return the next stage of queue update + */ + Update withoutDuplicateMessageDetection(); + } + + /** + * The stage of the queue definition allowing to specify whether expired message can be moved + * to secondary dead-letter queue. + */ + interface WithExpiredMessageMovedToDeadLetterQueue { + /** + * Specifies that expired message must be moved to dead-letter queue. + * + * @return the next stage of queue update + */ + Update withExpiredMessageMovedToDeadLetterQueue(); + + /** + * Specifies that expired message should not be moved to dead-letter queue. + * + * @return the next stage of queue update + */ + Update withoutExpiredMessageMovedToDeadLetterQueue(); + } + + /** + * The stage of the queue definition allowing to specify maximum delivery count of message before + * moving it to dead-letter queue. + */ + interface WithMessageMovedToDeadLetterQueueOnMaxDeliveryCount { + /** + * Specifies maximum number of times a message can be delivered. Once this count has exceeded, + * message will be moved to dead-letter queue. + * + * @param deliveryCount maximum delivery count + * @return the next stage of queue update + */ + Update withMessageMovedToDeadLetterQueueOnMaxDeliveryCount(int deliveryCount); + } + + /** + * The stage of the queue definition allowing to add an authorization rule for accessing + * the queue. + */ + interface WithAuthorizationRule { + /** + * Creates a send authorization rule for the queue. + * + * @param name rule name + * @return next stage of the queue update + */ + Update withNewSendRule(String name); + /** + * Creates a listen authorization rule for the queue. + * + * @param name rule name + * @return next stage of the queue update + */ + Update withNewListenRule(String name); + /** + * Creates a manage authorization rule for the queue. + * + * @param name rule name + * @return next stage of the queue update + */ + Update withNewManageRule(String name); + + /** + * Removes an authorization rule for the queue. + * + * @param name rule name + * @return next stage of the queue update + */ + Update withoutAuthorizationRule(String name); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueAuthorizationRule.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueAuthorizationRule.java new file mode 100644 index 0000000000000..bcffb5b0488c2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueAuthorizationRule.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; + +/** + * Type representing authorization rule defined for queue. + */ +@Fluent +public interface QueueAuthorizationRule extends + AuthorizationRule, + Updatable { + /** + * @return the name of the namespace that the parent queue belongs to + */ + String namespaceName(); + + /** + * @return the name of the parent queue name + */ + String queueName(); + + /** + * Grouping of Service Bus queue authorization rule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of queue authorization rule definition. + */ + interface Blank extends AuthorizationRule.DefinitionStages.WithListenOrSendOrManage< + QueueAuthorizationRule.DefinitionStages.WithCreate> { + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + + /** + * The entirety of the queue authorization rule definition. + */ + interface Definition extends + QueueAuthorizationRule.DefinitionStages.Blank, + QueueAuthorizationRule.DefinitionStages.WithCreate { + } + + /** + * The entirety of the queue authorization rule update. + */ + interface Update extends + Appliable, + AuthorizationRule.UpdateStages.WithListenOrSendOrManage { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueAuthorizationRules.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueAuthorizationRules.java new file mode 100644 index 0000000000000..193f8b85fc302 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueAuthorizationRules.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.QueuesClient; + +/** + * Entry point to queue authorization rules management API. + */ +@Fluent +public interface QueueAuthorizationRules extends + AuthorizationRules, + SupportsCreating, + HasInner { +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueCreateOrUpdateParameters.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueCreateOrUpdateParameters.java new file mode 100644 index 0000000000000..d45372acc08c2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/QueueCreateOrUpdateParameters.java @@ -0,0 +1,636 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The QueueCreateOrUpdateParameters model. */ +@JsonFlatten +@Fluent +public class QueueCreateOrUpdateParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueueCreateOrUpdateParameters.class); + + /* + * Queue name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * location of the resource. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /* + * The duration of a peek-lock; that is, the amount of time that the + * message is locked for other receivers. The maximum value for + * LockDuration is 5 minutes; the default value is 1 minute. + */ + @JsonProperty(value = "properties.lockDuration") + private String lockDuration; + + /* + * Last time a message was sent, or the last time there was a receive + * request to this queue. + */ + @JsonProperty(value = "properties.accessedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime accessedAt; + + /* + * the TimeSpan idle interval after which the queue is automatically + * deleted. The minimum duration is 5 minutes. + */ + @JsonProperty(value = "properties.autoDeleteOnIdle") + private String autoDeleteOnIdle; + + /* + * Entity availability status for the queue. + */ + @JsonProperty(value = "properties.entityAvailabilityStatus") + private EntityAvailabilityStatus entityAvailabilityStatus; + + /* + * The exact time the message was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service + * Bus. This is the default value used when TimeToLive is not set on a + * message itself. + */ + @JsonProperty(value = "properties.defaultMessageTimeToLive") + private String defaultMessageTimeToLive; + + /* + * TimeSpan structure that defines the duration of the duplicate detection + * history. The default value is 10 minutes. + */ + @JsonProperty(value = "properties.duplicateDetectionHistoryTimeWindow") + private String duplicateDetectionHistoryTimeWindow; + + /* + * A value that indicates whether server-side batched operations are + * enabled. + */ + @JsonProperty(value = "properties.enableBatchedOperations") + private Boolean enableBatchedOperations; + + /* + * A value that indicates whether this queue has dead letter support when a + * message expires. + */ + @JsonProperty(value = "properties.deadLetteringOnMessageExpiration") + private Boolean deadLetteringOnMessageExpiration; + + /* + * A value that indicates whether Express Entities are enabled. An express + * queue holds a message in memory temporarily before writing it to + * persistent storage. + */ + @JsonProperty(value = "properties.enableExpress") + private Boolean enableExpress; + + /* + * A value that indicates whether the queue is to be partitioned across + * multiple message brokers. + */ + @JsonProperty(value = "properties.enablePartitioning") + private Boolean enablePartitioning; + + /* + * A value that indicates whether the message is accessible anonymously. + */ + @JsonProperty(value = "properties.isAnonymousAccessible") + private Boolean isAnonymousAccessible; + + /* + * The maximum delivery count. A message is automatically deadlettered + * after this number of deliveries. + */ + @JsonProperty(value = "properties.maxDeliveryCount") + private Integer maxDeliveryCount; + + /* + * The maximum size of the queue in megabytes, which is the size of memory + * allocated for the queue. + */ + @JsonProperty(value = "properties.maxSizeInMegabytes") + private Long maxSizeInMegabytes; + + /* + * The number of messages in the queue. + */ + @JsonProperty(value = "properties.messageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long messageCount; + + /* + * Message Count Details. + */ + @JsonProperty(value = "properties.countDetails", access = JsonProperty.Access.WRITE_ONLY) + private MessageCountDetails countDetails; + + /* + * A value indicating if this queue requires duplicate detection. + */ + @JsonProperty(value = "properties.requiresDuplicateDetection") + private Boolean requiresDuplicateDetection; + + /* + * A value that indicates whether the queue supports the concept of + * sessions. + */ + @JsonProperty(value = "properties.requiresSession") + private Boolean requiresSession; + + /* + * The size of the queue, in bytes. + */ + @JsonProperty(value = "properties.sizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long sizeInBytes; + + /* + * Enumerates the possible values for the status of a messaging entity. + */ + @JsonProperty(value = "properties.status") + private EntityStatus status; + + /* + * A value that indicates whether the queue supports ordering. + */ + @JsonProperty(value = "properties.supportOrdering") + private Boolean supportOrdering; + + /* + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /** + * Get the name property: Queue name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Queue name. + * + * @param name the name value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the location property: location of the resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: location of the resource. + * + * @param location the location value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the lockDuration property: The duration of a peek-lock; that is, the amount of time that the message is + * locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. + * + * @return the lockDuration value. + */ + public String lockDuration() { + return this.lockDuration; + } + + /** + * Set the lockDuration property: The duration of a peek-lock; that is, the amount of time that the message is + * locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. + * + * @param lockDuration the lockDuration value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withLockDuration(String lockDuration) { + this.lockDuration = lockDuration; + return this; + } + + /** + * Get the accessedAt property: Last time a message was sent, or the last time there was a receive request to this + * queue. + * + * @return the accessedAt value. + */ + public OffsetDateTime accessedAt() { + return this.accessedAt; + } + + /** + * Get the autoDeleteOnIdle property: the TimeSpan idle interval after which the queue is automatically deleted. The + * minimum duration is 5 minutes. + * + * @return the autoDeleteOnIdle value. + */ + public String autoDeleteOnIdle() { + return this.autoDeleteOnIdle; + } + + /** + * Set the autoDeleteOnIdle property: the TimeSpan idle interval after which the queue is automatically deleted. The + * minimum duration is 5 minutes. + * + * @param autoDeleteOnIdle the autoDeleteOnIdle value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withAutoDeleteOnIdle(String autoDeleteOnIdle) { + this.autoDeleteOnIdle = autoDeleteOnIdle; + return this; + } + + /** + * Get the entityAvailabilityStatus property: Entity availability status for the queue. + * + * @return the entityAvailabilityStatus value. + */ + public EntityAvailabilityStatus entityAvailabilityStatus() { + return this.entityAvailabilityStatus; + } + + /** + * Set the entityAvailabilityStatus property: Entity availability status for the queue. + * + * @param entityAvailabilityStatus the entityAvailabilityStatus value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withEntityAvailabilityStatus( + EntityAvailabilityStatus entityAvailabilityStatus) { + this.entityAvailabilityStatus = entityAvailabilityStatus; + return this; + } + + /** + * Get the createdAt property: The exact time the message was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the defaultMessageTimeToLive property: The default message time to live value. This is the duration after + * which the message expires, starting from when the message is sent to Service Bus. This is the default value used + * when TimeToLive is not set on a message itself. + * + * @return the defaultMessageTimeToLive value. + */ + public String defaultMessageTimeToLive() { + return this.defaultMessageTimeToLive; + } + + /** + * Set the defaultMessageTimeToLive property: The default message time to live value. This is the duration after + * which the message expires, starting from when the message is sent to Service Bus. This is the default value used + * when TimeToLive is not set on a message itself. + * + * @param defaultMessageTimeToLive the defaultMessageTimeToLive value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withDefaultMessageTimeToLive(String defaultMessageTimeToLive) { + this.defaultMessageTimeToLive = defaultMessageTimeToLive; + return this; + } + + /** + * Get the duplicateDetectionHistoryTimeWindow property: TimeSpan structure that defines the duration of the + * duplicate detection history. The default value is 10 minutes. + * + * @return the duplicateDetectionHistoryTimeWindow value. + */ + public String duplicateDetectionHistoryTimeWindow() { + return this.duplicateDetectionHistoryTimeWindow; + } + + /** + * Set the duplicateDetectionHistoryTimeWindow property: TimeSpan structure that defines the duration of the + * duplicate detection history. The default value is 10 minutes. + * + * @param duplicateDetectionHistoryTimeWindow the duplicateDetectionHistoryTimeWindow value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withDuplicateDetectionHistoryTimeWindow( + String duplicateDetectionHistoryTimeWindow) { + this.duplicateDetectionHistoryTimeWindow = duplicateDetectionHistoryTimeWindow; + return this; + } + + /** + * Get the enableBatchedOperations property: A value that indicates whether server-side batched operations are + * enabled. + * + * @return the enableBatchedOperations value. + */ + public Boolean enableBatchedOperations() { + return this.enableBatchedOperations; + } + + /** + * Set the enableBatchedOperations property: A value that indicates whether server-side batched operations are + * enabled. + * + * @param enableBatchedOperations the enableBatchedOperations value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withEnableBatchedOperations(Boolean enableBatchedOperations) { + this.enableBatchedOperations = enableBatchedOperations; + return this; + } + + /** + * Get the deadLetteringOnMessageExpiration property: A value that indicates whether this queue has dead letter + * support when a message expires. + * + * @return the deadLetteringOnMessageExpiration value. + */ + public Boolean deadLetteringOnMessageExpiration() { + return this.deadLetteringOnMessageExpiration; + } + + /** + * Set the deadLetteringOnMessageExpiration property: A value that indicates whether this queue has dead letter + * support when a message expires. + * + * @param deadLetteringOnMessageExpiration the deadLetteringOnMessageExpiration value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withDeadLetteringOnMessageExpiration( + Boolean deadLetteringOnMessageExpiration) { + this.deadLetteringOnMessageExpiration = deadLetteringOnMessageExpiration; + return this; + } + + /** + * Get the enableExpress property: A value that indicates whether Express Entities are enabled. An express queue + * holds a message in memory temporarily before writing it to persistent storage. + * + * @return the enableExpress value. + */ + public Boolean enableExpress() { + return this.enableExpress; + } + + /** + * Set the enableExpress property: A value that indicates whether Express Entities are enabled. An express queue + * holds a message in memory temporarily before writing it to persistent storage. + * + * @param enableExpress the enableExpress value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withEnableExpress(Boolean enableExpress) { + this.enableExpress = enableExpress; + return this; + } + + /** + * Get the enablePartitioning property: A value that indicates whether the queue is to be partitioned across + * multiple message brokers. + * + * @return the enablePartitioning value. + */ + public Boolean enablePartitioning() { + return this.enablePartitioning; + } + + /** + * Set the enablePartitioning property: A value that indicates whether the queue is to be partitioned across + * multiple message brokers. + * + * @param enablePartitioning the enablePartitioning value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withEnablePartitioning(Boolean enablePartitioning) { + this.enablePartitioning = enablePartitioning; + return this; + } + + /** + * Get the isAnonymousAccessible property: A value that indicates whether the message is accessible anonymously. + * + * @return the isAnonymousAccessible value. + */ + public Boolean isAnonymousAccessible() { + return this.isAnonymousAccessible; + } + + /** + * Set the isAnonymousAccessible property: A value that indicates whether the message is accessible anonymously. + * + * @param isAnonymousAccessible the isAnonymousAccessible value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withIsAnonymousAccessible(Boolean isAnonymousAccessible) { + this.isAnonymousAccessible = isAnonymousAccessible; + return this; + } + + /** + * Get the maxDeliveryCount property: The maximum delivery count. A message is automatically deadlettered after this + * number of deliveries. + * + * @return the maxDeliveryCount value. + */ + public Integer maxDeliveryCount() { + return this.maxDeliveryCount; + } + + /** + * Set the maxDeliveryCount property: The maximum delivery count. A message is automatically deadlettered after this + * number of deliveries. + * + * @param maxDeliveryCount the maxDeliveryCount value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withMaxDeliveryCount(Integer maxDeliveryCount) { + this.maxDeliveryCount = maxDeliveryCount; + return this; + } + + /** + * Get the maxSizeInMegabytes property: The maximum size of the queue in megabytes, which is the size of memory + * allocated for the queue. + * + * @return the maxSizeInMegabytes value. + */ + public Long maxSizeInMegabytes() { + return this.maxSizeInMegabytes; + } + + /** + * Set the maxSizeInMegabytes property: The maximum size of the queue in megabytes, which is the size of memory + * allocated for the queue. + * + * @param maxSizeInMegabytes the maxSizeInMegabytes value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withMaxSizeInMegabytes(Long maxSizeInMegabytes) { + this.maxSizeInMegabytes = maxSizeInMegabytes; + return this; + } + + /** + * Get the messageCount property: The number of messages in the queue. + * + * @return the messageCount value. + */ + public Long messageCount() { + return this.messageCount; + } + + /** + * Get the countDetails property: Message Count Details. + * + * @return the countDetails value. + */ + public MessageCountDetails countDetails() { + return this.countDetails; + } + + /** + * Get the requiresDuplicateDetection property: A value indicating if this queue requires duplicate detection. + * + * @return the requiresDuplicateDetection value. + */ + public Boolean requiresDuplicateDetection() { + return this.requiresDuplicateDetection; + } + + /** + * Set the requiresDuplicateDetection property: A value indicating if this queue requires duplicate detection. + * + * @param requiresDuplicateDetection the requiresDuplicateDetection value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withRequiresDuplicateDetection(Boolean requiresDuplicateDetection) { + this.requiresDuplicateDetection = requiresDuplicateDetection; + return this; + } + + /** + * Get the requiresSession property: A value that indicates whether the queue supports the concept of sessions. + * + * @return the requiresSession value. + */ + public Boolean requiresSession() { + return this.requiresSession; + } + + /** + * Set the requiresSession property: A value that indicates whether the queue supports the concept of sessions. + * + * @param requiresSession the requiresSession value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withRequiresSession(Boolean requiresSession) { + this.requiresSession = requiresSession; + return this; + } + + /** + * Get the sizeInBytes property: The size of the queue, in bytes. + * + * @return the sizeInBytes value. + */ + public Long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Get the status property: Enumerates the possible values for the status of a messaging entity. + * + * @return the status value. + */ + public EntityStatus status() { + return this.status; + } + + /** + * Set the status property: Enumerates the possible values for the status of a messaging entity. + * + * @param status the status value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withStatus(EntityStatus status) { + this.status = status; + return this; + } + + /** + * Get the supportOrdering property: A value that indicates whether the queue supports ordering. + * + * @return the supportOrdering value. + */ + public Boolean supportOrdering() { + return this.supportOrdering; + } + + /** + * Set the supportOrdering property: A value that indicates whether the queue supports ordering. + * + * @param supportOrdering the supportOrdering value to set. + * @return the QueueCreateOrUpdateParameters object itself. + */ + public QueueCreateOrUpdateParameters withSupportOrdering(Boolean supportOrdering) { + this.supportOrdering = supportOrdering; + return this; + } + + /** + * Get the updatedAt property: The exact time the message was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (location() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property location in model QueueCreateOrUpdateParameters")); + } + if (countDetails() != null) { + countDetails().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Queues.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Queues.java new file mode 100644 index 0000000000000..94883ce57aa84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Queues.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingByName; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.QueuesClient; +import com.azure.resourcemanager.servicebus.ServiceBusManager; + + +/** + * Entry point to service bus queue management API in Azure. + */ +@Fluent +public interface Queues extends + SupportsCreating, + SupportsListing, + SupportsGettingByName, + SupportsDeletingByName, + HasManager, + HasInner { +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/RegenerateKeysParameters.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/RegenerateKeysParameters.java new file mode 100644 index 0000000000000..8dcc2ce2fb8cc --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/RegenerateKeysParameters.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.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; + +/** The RegenerateKeysParameters model. */ +@Fluent +public final class RegenerateKeysParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RegenerateKeysParameters.class); + + /* + * Key that needs to be regenerated. + */ + @JsonProperty(value = "Policykey") + private Policykey policykey; + + /** + * Get the policykey property: Key that needs to be regenerated. + * + * @return the policykey value. + */ + public Policykey policykey() { + return this.policykey; + } + + /** + * Set the policykey property: Key that needs to be regenerated. + * + * @param policykey the policykey value to set. + * @return the RegenerateKeysParameters object itself. + */ + public RegenerateKeysParameters withPolicykey(Policykey policykey) { + this.policykey = policykey; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusNamespace.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusNamespace.java new file mode 100644 index 0000000000000..187b1d2f267bb --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusNamespace.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; +import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import com.azure.resourcemanager.servicebus.fluent.inner.NamespaceResourceInner; +import com.azure.resourcemanager.servicebus.ServiceBusManager; + +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of an Azure Service Bus namespace. + */ +@Fluent +public interface ServiceBusNamespace extends + GroupableResource, + Refreshable, + Updatable { + /** + * @return the relative DNS name of the Service Bus namespace + */ + String dnsLabel(); + /** + * @return fully qualified domain name (FQDN) of the Service Bus namespace + */ + String fqdn(); + /** + * @return sku value + */ + NamespaceSku sku(); + /** + * @return time the namespace was created + */ + OffsetDateTime createdAt(); + /** + * @return time the namespace was updated + */ + OffsetDateTime updatedAt(); + + /** + * @return entry point to manage queue entities in the Service Bus namespace + */ + Queues queues(); + /** + * @return entry point to manage topics entities in the Service Bus namespace + */ + Topics topics(); + /** + * @return entry point to manage authorization rules for the Service Bus namespace + */ + NamespaceAuthorizationRules authorizationRules(); + + /** + * The entirety of the Service Bus namespace definition. + */ + interface Definition extends + ServiceBusNamespace.DefinitionStages.Blank, + ServiceBusNamespace.DefinitionStages.WithGroup, + ServiceBusNamespace.DefinitionStages.WithCreate { + } + + /** + * Grouping of Service Bus namespace definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Service Bus namespace definition. + */ + interface Blank extends GroupableResource.DefinitionWithRegion { + } + + /** + * The stage of the Service Bus namespace definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResource.DefinitionStages.WithGroup { + } + + /** + * The stage of the Service Bus namespace definition allowing to specify the sku. + */ + interface WithSku { + /** + * Specifies the namespace sku. + * + * @param namespaceSku the sku + * @return next stage of the Service Bus namespace definition + */ + WithCreate withSku(NamespaceSku namespaceSku); + } + + /** + * The stage of the Service Bus namespace definition allowing to add a new queue in the namespace. + */ + interface WithQueue { + /** + * Creates a queue entity in the Service Bus namespace. + * + * @param name queue name + * @param maxSizeInMB maximum size of memory allocated for the queue entity + * @return next stage of the Service Bus namespace definition + */ + WithCreate withNewQueue(String name, int maxSizeInMB); + } + + /** + * The stage of the Service Bus namespace definition allowing to add a new topic in the namespace. + */ + interface WithTopic { + /** + * Creates a topic entity in the Service Bus namespace. + * + * @param name topic name + * @param maxSizeInMB maximum size of memory allocated for the topic entity + * @return next stage of the Service Bus namespace definition + */ + WithCreate withNewTopic(String name, int maxSizeInMB); + } + + /** + * The stage of the Service Bus namespace definition allowing to add an authorization rule for accessing + * the namespace. + */ + interface WithAuthorizationRule { + /** + * Creates a send authorization rule for the Service Bus namespace. + * + * @param name rule name + * @return next stage of the Service Bus namespace definition + */ + WithCreate withNewSendRule(String name); + /** + * Creates a listen authorization rule for the Service Bus namespace. + * + * @param name rule name + * @return next stage of the Service Bus namespace definition + */ + WithCreate withNewListenRule(String name); + /** + * Creates a manage authorization rule for the Service Bus namespace. + * + * @param name rule name + * @return next stage of the Service Bus namespace definition + */ + WithCreate withNewManageRule(String name); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends + Creatable, + Resource.DefinitionWithTags, + ServiceBusNamespace.DefinitionStages.WithSku, + ServiceBusNamespace.DefinitionStages.WithQueue, + ServiceBusNamespace.DefinitionStages.WithTopic, + ServiceBusNamespace.DefinitionStages.WithAuthorizationRule { + } + } + + /** + * The template for a Service Bus namespace update operation, containing all the settings that can be modified. + */ + interface Update extends + Appliable, + Resource.UpdateWithTags, + ServiceBusNamespace.UpdateStages.WithSku, + ServiceBusNamespace.UpdateStages.WithQueue, + ServiceBusNamespace.UpdateStages.WithTopic, + ServiceBusNamespace.UpdateStages.WithAuthorizationRule { + } + + /** + * Grouping of all the Service Bus namespace update stages. + */ + interface UpdateStages { + /** + * The stage of the Service Bus namespace update allowing to change the sku. + */ + interface WithSku { + /** + * Specifies the namespace sku. + * + * @param namespaceSku the sku + * @return next stage of the Service Bus namespace update + */ + Update withSku(NamespaceSku namespaceSku); + } + + /** + * The stage of the Service Bus namespace update allowing to manage queues in the namespace. + */ + interface WithQueue { + /** + * Creates a queue entity in the Service Bus namespace. + * + * @param name queue name + * @param maxSizeInMB maximum size of memory allocated for the queue entity + * @return next stage of the Service Bus namespace update + */ + Update withNewQueue(String name, int maxSizeInMB); + + /** + * Removes a queue entity from the Service Bus namespace. + * + * @param name queue name + * @return next stage of the Service Bus namespace update + */ + Update withoutQueue(String name); + } + + /** + * The stage of the Service Bus namespace update allowing to manage topics in the namespace. + */ + interface WithTopic { + /** + * Creates a topic entity in the Service Bus namespace. + * + * @param name topic name + * @param maxSizeInMB maximum size of memory allocated for the topic entity + * @return next stage of the Service Bus namespace update + */ + Update withNewTopic(String name, int maxSizeInMB); + + /** + * Removes a topic entity from the Service Bus namespace. + * + * @param name topic name + * @return next stage of the Service Bus namespace update + */ + Update withoutTopic(String name); + } + + /** + * The stage of the Service Bus namespace update allowing manage authorization rules + * for the namespace. + */ + interface WithAuthorizationRule { + /** + * Creates a send authorization rule for the Service Bus namespace. + * + * @param name rule name + * @return next stage of the Service Bus namespace update + */ + Update withNewSendRule(String name); + /** + * Creates a listen authorization rule for the Service Bus namespace. + * + * @param name rule name + * @return next stage of the Service Bus namespace update + */ + Update withNewListenRule(String name); + /** + * Creates a manage authorization rule for the Service Bus namespace. + * + * @param name rule name + * @return next stage of the Service Bus namespace update + */ + Update withNewManageRule(String name); + /** + * Removes an authorization rule from the Service Bus namespace. + * + * @param name rule name + * @return next stage of the Service Bus namespace update + */ + Update withoutAuthorizationRule(String name); + } + } + +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusNamespaces.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusNamespaces.java new file mode 100644 index 0000000000000..265945175e529 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusNamespaces.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsBatchCreation; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.NamespacesClient; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import reactor.core.publisher.Mono; + +/** + * Entry point to Service Bus namespace API in Azure. + */ +@Fluent +public interface ServiceBusNamespaces extends + SupportsCreating, + SupportsBatchCreation, + SupportsBatchDeletion, + SupportsListing, + SupportsListingByResourceGroup, + SupportsGettingByResourceGroup, + SupportsGettingById, + SupportsDeletingById, + SupportsDeletingByResourceGroup, + HasManager, + HasInner { + /** + * Checks if namespace name is valid and is not in use. + * + * @param name the account name to check + * @return whether the name is available and other info if not + */ + CheckNameAvailabilityResult checkNameAvailability(String name); + + /** + * Checks if namespace name is valid and is not in use asynchronously. + * + * @param name the namespace name to check + * @return a representation of the deferred computation of this call, + * returning whether the name is available or other info if not + */ + Mono checkNameAvailabilityAsync(String name); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscription.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscription.java new file mode 100644 index 0000000000000..cbc0e55d3e2e0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscription.java @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.fluent.inner.SubscriptionResourceInner; + +import java.time.Duration; +import java.time.OffsetDateTime; + +/** + * Type representing service bus topic subscription. + */ +@Fluent +public interface ServiceBusSubscription extends + IndependentChildResource, + Refreshable, + Updatable { + /** + * @return the exact time the message was created + */ + OffsetDateTime createdAt(); + /** + * @return last time there was a receive request to this subscription + */ + OffsetDateTime accessedAt(); + /** + * @return the exact time the message was updated + */ + OffsetDateTime updatedAt(); + /** + * @return indicates whether server-side batched operations are enabled + */ + boolean isBatchedOperationsEnabled(); + /** + * @return indicates whether this subscription has dead letter support when a message expires + */ + boolean isDeadLetteringEnabledForExpiredMessages(); + /** + * @return indicates whether the subscription supports sessions + */ + boolean isSessionEnabled(); + /** + * @return the duration of peek-lock which is the amount of time that the message is locked for other receivers + */ + long lockDurationInSeconds(); + /** + * @return the idle duration after which the subscription is automatically deleted. + */ + long deleteOnIdleDurationInMinutes(); + /** + * @return the duration after which the message expires, starting from when the message is sent to subscription. + */ + Duration defaultMessageTtlDuration(); + /** + * @return the maximum number of a message delivery before marking it as dead-lettered + */ + int maxDeliveryCountBeforeDeadLetteringMessage(); + /** + * @return the number of messages in the subscription + */ + long messageCount(); + /** + * @return number of active messages in the subscription + */ + long activeMessageCount(); + /** + * @return number of messages in the dead-letter subscription + */ + long deadLetterMessageCount(); + /** + * @return number of messages sent to the subscription that are yet to be released + * for consumption + */ + long scheduledMessageCount(); + /** + * @return number of messages transferred into dead letters + */ + long transferDeadLetterMessageCount(); + /** + * @return number of messages transferred to another queue, topic, or subscription + */ + long transferMessageCount(); + /** + * @return the current status of the subscription + */ + EntityStatus status(); + /** + * @return indicates whether subscription has dead letter support on filter evaluation exceptions + */ + boolean isDeadLetteringEnabledForFilterEvaluationFailedMessages(); + + /** + * The entirety of the subscription definition. + */ + interface Definition extends + ServiceBusSubscription.DefinitionStages.Blank, + ServiceBusSubscription.DefinitionStages.WithCreate { + } + + /** + * Grouping of queue definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a subscription definition. + */ + interface Blank extends WithCreate { + } + + /** + * The stage of the subscription definition allowing to define auto delete behaviour. + */ + interface WithDeleteOnIdle { + /** + * The idle interval after which the subscription is automatically deleted. + * Note: unless it is explicitly overridden the default delete on idle duration + * is infinite (TimeSpan.Max). + * + * @param durationInMinutes idle duration in minutes + * @return the next stage of subscription definition + */ + WithCreate withDeleteOnIdleDurationInMinutes(int durationInMinutes); + } + + /** + * The stage of the subscription definition allowing to define duration for message lock. + */ + interface WithMessageLockDuration { + /** + * Specifies the amount of time that the message is locked for other receivers. + * Note: unless it is explicitly overridden the default lock duration is 60 seconds, + * the maximum allowed value is 300 seconds. + * + * @param durationInSeconds duration of a lock in seconds + * @return the next stage of subscription definition + */ + WithCreate withMessageLockDurationInSeconds(int durationInSeconds); + } + + /** + * The stage of the subscription definition allowing to define default TTL for messages. + */ + interface WithDefaultMessageTTL { + /** + * Specifies the duration after which the message expires. + * Note: unless it is explicitly overridden the default ttl is infinite (TimeSpan.Max). + * + * @param ttl time to live duration + * @return the next stage of subscription definition + */ + WithCreate withDefaultMessageTTL(Duration ttl); + } + + /** + * The stage of the subscription definition allowing to enable session support. + */ + interface WithSession { + /** + * Specifies that session support should be enabled for the subscription. + * + * @return the next stage of subscription definition + */ + WithCreate withSession(); + } + + /** + * The stage of the subscription definition allowing specify batching behaviour. + */ + interface WithMessageBatching { + /** + * Specifies that the default batching should be disabled on this subscription. + * With batching service bus can batch multiple message when it write or delete messages + * from it's internal store. + * + * @return the next stage of subscription definition + */ + WithCreate withoutMessageBatching(); + } + + /** + * The stage of the subscription definition allowing to specify whether expired message can be moved + * to secondary dead-letter subscription. + */ + interface WithExpiredMessageMovedToDeadLetterSubscription { + /** + * Specifies that expired message must be moved to dead-letter subscription. + * + * @return the next stage of subscription definition + */ + WithCreate withExpiredMessageMovedToDeadLetterSubscription(); + + /** + * Specifies that expired message should not be moved to dead-letter subscription. + * + * @return the next stage of subscription definition + */ + WithCreate withoutExpiredMessageMovedToDeadLetterSubscription(); + } + + /** + * The stage of the subscription definition allowing to specify maximum delivery count of message before + * moving it to dead-letter subscription. + */ + interface WithMessageMovedToDeadLetterSubscriptionOnMaxDeliveryCount { + /** + * Specifies maximum number of times a message can be delivered. Once this count has exceeded, + * message will be moved to dead-letter subscription. + * + * @param deliveryCount maximum delivery count + * @return the next stage of subscription definition + */ + WithCreate withMessageMovedToDeadLetterSubscriptionOnMaxDeliveryCount(int deliveryCount); + } + + /** + * The stage of the subscription definition allowing to specify whether message those are failed on + * filter evaluation can be moved to secondary dead-letter subscription. + */ + interface WithMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException { + /** + * Specifies that filter evaluation failed message must be moved to dead-letter subscription. + * + * @return the next stage of subscription definition + */ + WithCreate withMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException(); + } + + /** + * The stage of the queue definition allowing to add an authorization rule for accessing + * the subscription. + */ + interface WithAuthorizationRule { + /** + * Creates an authorization rule for the subscription. + * + * @param name rule name + * @param rights rule rights + * @return next stage of the subscription definition + */ + WithCreate withNewAuthorizationRule(String name, AccessRights... rights); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends + Creatable, + ServiceBusSubscription.DefinitionStages.WithDeleteOnIdle, + ServiceBusSubscription.DefinitionStages.WithMessageLockDuration, + ServiceBusSubscription.DefinitionStages.WithDefaultMessageTTL, + ServiceBusSubscription.DefinitionStages.WithSession, + ServiceBusSubscription.DefinitionStages.WithMessageBatching, + ServiceBusSubscription.DefinitionStages.WithExpiredMessageMovedToDeadLetterSubscription, + ServiceBusSubscription.DefinitionStages.WithMessageMovedToDeadLetterSubscriptionOnMaxDeliveryCount, + ServiceBusSubscription.DefinitionStages. + WithMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException { + } + } + + /** + * The template for a subscription update operation, containing all the settings that can be modified. + */ + interface Update extends + Appliable, + ServiceBusSubscription.UpdateStages.WithDeleteOnIdle, + ServiceBusSubscription.UpdateStages.WithMessageLockDuration, + ServiceBusSubscription.UpdateStages.WithDefaultMessageTTL, + ServiceBusSubscription.UpdateStages.WithSession, + ServiceBusSubscription.UpdateStages.WithMessageBatching, + ServiceBusSubscription.UpdateStages.WithExpiredMessageMovedToDeadLetterSubscription, + ServiceBusSubscription.UpdateStages.WithMessageMovedToDeadLetterQueueOnMaxDeliveryCount, + ServiceBusSubscription.UpdateStages.WithMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException { + } + + /** + * Grouping of subscription update stages. + */ + interface UpdateStages { + /** + * The stage of the subscription definition allowing to define auto delete behaviour. + */ + interface WithDeleteOnIdle { + /** + * The idle interval after which the subscription is automatically deleted. + * + * @param durationInMinutes idle duration in minutes + * @return the next stage of subscription update + */ + Update withDeleteOnIdleDurationInMinutes(int durationInMinutes); + } + + /** + * The stage of the subscription definition allowing to define duration for message lock. + */ + interface WithMessageLockDuration { + /** + * Specifies the amount of time that the message is locked for other receivers. + * + * @param durationInSeconds duration of a lock in seconds + * @return the next stage of subscription update + */ + Update withMessageLockDurationInSeconds(int durationInSeconds); + } + + /** + * The stage of the subscription definition allowing to define default TTL for messages. + */ + interface WithDefaultMessageTTL { + /** + * Specifies the duration after which the message expires. + * + * @param ttl time to live duration + * @return the next stage of subscription update + */ + Update withDefaultMessageTTL(Duration ttl); + } + + /** + * The stage of the subscription definition allowing to enable session support. + */ + interface WithSession { + /** + * Specifies that session support should be enabled for the subscription. + * + * @return the next stage of subscription update + */ + Update withSession(); + + /** + * Specifies that session support should be disabled for the subscription. + * + * @return the next stage of subscription update + */ + Update withoutSession(); + } + + /** + * The stage of the subscription definition allowing configure message batching behaviour. + */ + interface WithMessageBatching { + /** + * Specifies that service bus can batch multiple message when it write messages to or delete + * messages from it's internal store. This increases the throughput. + * + * @return the next stage of subscription update + */ + Update withMessageBatching(); + + /** + * Specifies that batching of messages should be disabled when service bus write messages to + * or delete messages from it's internal store. + * + * @return the next stage of subscription update + */ + Update withoutMessageBatching(); + } + + /** + * The stage of the subscription update allowing to specify whether expired message can be moved + * to secondary dead-letter subscription. + */ + interface WithExpiredMessageMovedToDeadLetterSubscription { + /** + * Specifies that expired message must be moved to dead-letter subscription. + * + * @return the next stage of subscription update + */ + Update withExpiredMessageMovedToDeadLetterSubscription(); + + /** + * Specifies that expired message should not be moved to dead-letter subscription. + * + * @return the next stage of subscription update + */ + Update withoutExpiredMessageMovedToDeadLetterSubscription(); + } + + /** + * The stage of the subscription definition allowing to specify maximum delivery count of message before + * moving it to dead-letter queue. + */ + interface WithMessageMovedToDeadLetterQueueOnMaxDeliveryCount { + /** + * Specifies maximum number of times a message can be delivered. Once this count has exceeded, + * message will be moved to dead-letter subscription. + * + * @param deliveryCount maximum delivery subscription + * @return the next stage of subscription update + */ + Update withMessageMovedToDeadLetterQueueOnMaxDeliveryCount(int deliveryCount); + } + + /** + * The stage of the subscription definition allowing to specify whether message those are failed on + * filter evaluation can be moved to secondary dead-letter subscription. + */ + interface WithMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException { + /** + * Specifies that filter evaluation failed message must be moved to dead-letter subscription. + * + * @return the next stage of subscription update + */ + Update withMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException(); + + /** + * Specifies that filter evaluation failed message should not be moved to dead-letter subscription. + * + * @return the next stage of subscription update + */ + Update withoutMessageMovedToDeadLetterSubscriptionOnFilterEvaluationException(); + } + + /** + * The stage of the queue definition allowing to add an authorization rule for accessing + * the subscription. + */ + interface WithAuthorizationRule { + /** + * Creates an authorization rule for the subscription. + * + * @param name rule name + * @param rights rule rights + * @return next stage of the subscription update + */ + Update withNewAuthorizationRule(String name, AccessRights... rights); + + /** + * Removes an authorization rule for the subscription. + * + * @param name rule name + * @return next stage of the subscription update + */ + Update withoutNewAuthorizationRule(String name); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscriptions.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscriptions.java new file mode 100644 index 0000000000000..fcaed602404f5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscriptions.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingByName; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.SubscriptionsClient; +import com.azure.resourcemanager.servicebus.ServiceBusManager; + +/** + * Entry point to service bus queue management API in Azure. + */ +@Fluent +public interface ServiceBusSubscriptions extends + SupportsCreating, + SupportsListing, + SupportsGettingByName, + SupportsDeletingByName, + HasManager, + HasInner { +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SharedAccessAuthorizationRuleCreateOrUpdateParameters.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SharedAccessAuthorizationRuleCreateOrUpdateParameters.java new file mode 100644 index 0000000000000..590b79c667ca7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SharedAccessAuthorizationRuleCreateOrUpdateParameters.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The SharedAccessAuthorizationRuleCreateOrUpdateParameters model. */ +@JsonFlatten +@Fluent +public class SharedAccessAuthorizationRuleCreateOrUpdateParameters { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(SharedAccessAuthorizationRuleCreateOrUpdateParameters.class); + + /* + * data center location. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Name of the authorization rule. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The rights associated with the rule. + */ + @JsonProperty(value = "properties.rights") + private List rights; + + /** + * Get the location property: data center location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: data center location. + * + * @param location the location value to set. + * @return the SharedAccessAuthorizationRuleCreateOrUpdateParameters object itself. + */ + public SharedAccessAuthorizationRuleCreateOrUpdateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the name property: Name of the authorization rule. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the authorization rule. + * + * @param name the name value to set. + * @return the SharedAccessAuthorizationRuleCreateOrUpdateParameters object itself. + */ + public SharedAccessAuthorizationRuleCreateOrUpdateParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the rights property: The rights associated with the rule. + * + * @return the rights value. + */ + public List rights() { + return this.rights; + } + + /** + * Set the rights property: The rights associated with the rule. + * + * @param rights the rights value to set. + * @return the SharedAccessAuthorizationRuleCreateOrUpdateParameters object itself. + */ + public SharedAccessAuthorizationRuleCreateOrUpdateParameters withRights(List rights) { + this.rights = rights; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Sku.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Sku.java new file mode 100644 index 0000000000000..2c6c75cfd8416 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Sku.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.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; + +/** The Sku model. */ +@Fluent +public final class Sku { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); + + /* + * Name of this SKU. + */ + @JsonProperty(value = "name") + private SkuName name; + + /* + * The billing tier of this particular SKU. + */ + @JsonProperty(value = "tier", required = true) + private SkuTier tier; + + /* + * The specified messaging units for the tier. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Get the name property: Name of this SKU. + * + * @return the name value. + */ + public SkuName name() { + return this.name; + } + + /** + * Set the name property: Name of this SKU. + * + * @param name the name value to set. + * @return the Sku object itself. + */ + public Sku withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get the tier property: The billing tier of this particular SKU. + * + * @return the tier value. + */ + public SkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: The billing tier of this particular SKU. + * + * @param tier the tier value to set. + * @return the Sku object itself. + */ + public Sku withTier(SkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Get the capacity property: The specified messaging units for the tier. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The specified messaging units for the tier. + * + * @param capacity the capacity value to set. + * @return the Sku object itself. + */ + public Sku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (tier() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property tier in model Sku")); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SkuName.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SkuName.java new file mode 100644 index 0000000000000..667d79c22ba0d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SkuName.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.resourcemanager.servicebus.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuName. */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Basic for SkuName. */ + public static final SkuName BASIC = fromString("Basic"); + + /** Static value Standard for SkuName. */ + public static final SkuName STANDARD = fromString("Standard"); + + /** Static value Premium for SkuName. */ + public static final SkuName PREMIUM = fromString("Premium"); + + /** + * Creates or finds a SkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuName. + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** @return known SkuName values. */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SkuTier.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SkuTier.java new file mode 100644 index 0000000000000..80ddd84cb674a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SkuTier.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.resourcemanager.servicebus.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuTier. */ +public final class SkuTier extends ExpandableStringEnum { + /** Static value Basic for SkuTier. */ + public static final SkuTier BASIC = fromString("Basic"); + + /** Static value Standard for SkuTier. */ + public static final SkuTier STANDARD = fromString("Standard"); + + /** Static value Premium for SkuTier. */ + public static final SkuTier PREMIUM = fromString("Premium"); + + /** + * Creates or finds a SkuTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuTier. + */ + @JsonCreator + public static SkuTier fromString(String name) { + return fromString(name, SkuTier.class); + } + + /** @return known SkuTier values. */ + public static Collection values() { + return values(SkuTier.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SubscriptionCreateOrUpdateParameters.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SubscriptionCreateOrUpdateParameters.java new file mode 100644 index 0000000000000..26131b8272aaa --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/SubscriptionCreateOrUpdateParameters.java @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The SubscriptionCreateOrUpdateParameters model. */ +@JsonFlatten +@Fluent +public class SubscriptionCreateOrUpdateParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionCreateOrUpdateParameters.class); + + /* + * Subscription data center location. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /* + * Resource manager type of the resource. + */ + @JsonProperty(value = "type") + private String type; + + /* + * Last time there was a receive request to this subscription. + */ + @JsonProperty(value = "properties.accessedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime accessedAt; + + /* + * TimeSpan idle interval after which the topic is automatically deleted. + * The minimum duration is 5 minutes. + */ + @JsonProperty(value = "properties.autoDeleteOnIdle") + private String autoDeleteOnIdle; + + /* + * Message Count Details. + */ + @JsonProperty(value = "properties.countDetails", access = JsonProperty.Access.WRITE_ONLY) + private MessageCountDetails countDetails; + + /* + * Exact time the message was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * Default message time to live value. This is the duration after which the + * message expires, starting from when the message is sent to Service Bus. + * This is the default value used when TimeToLive is not set on a message + * itself. + */ + @JsonProperty(value = "properties.defaultMessageTimeToLive") + private String defaultMessageTimeToLive; + + /* + * Value that indicates whether a subscription has dead letter support on + * filter evaluation exceptions. + */ + @JsonProperty(value = "properties.deadLetteringOnFilterEvaluationExceptions") + private Boolean deadLetteringOnFilterEvaluationExceptions; + + /* + * Value that indicates whether a subscription has dead letter support when + * a message expires. + */ + @JsonProperty(value = "properties.deadLetteringOnMessageExpiration") + private Boolean deadLetteringOnMessageExpiration; + + /* + * Value that indicates whether server-side batched operations are enabled. + */ + @JsonProperty(value = "properties.enableBatchedOperations") + private Boolean enableBatchedOperations; + + /* + * Entity availability status for the topic. + */ + @JsonProperty(value = "properties.entityAvailabilityStatus") + private EntityAvailabilityStatus entityAvailabilityStatus; + + /* + * Value that indicates whether the entity description is read-only. + */ + @JsonProperty(value = "properties.isReadOnly") + private Boolean isReadOnly; + + /* + * The lock duration time span for the subscription. + */ + @JsonProperty(value = "properties.lockDuration") + private String lockDuration; + + /* + * Number of maximum deliveries. + */ + @JsonProperty(value = "properties.maxDeliveryCount") + private Integer maxDeliveryCount; + + /* + * Number of messages. + */ + @JsonProperty(value = "properties.messageCount", access = JsonProperty.Access.WRITE_ONLY) + private Long messageCount; + + /* + * Value indicating if a subscription supports the concept of sessions. + */ + @JsonProperty(value = "properties.requiresSession") + private Boolean requiresSession; + + /* + * Enumerates the possible values for the status of a messaging entity. + */ + @JsonProperty(value = "properties.status") + private EntityStatus status; + + /* + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /** + * Get the location property: Subscription data center location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Subscription data center location. + * + * @param location the location value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the type property: Resource manager type of the resource. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Resource manager type of the resource. + * + * @param type the type value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withType(String type) { + this.type = type; + return this; + } + + /** + * Get the accessedAt property: Last time there was a receive request to this subscription. + * + * @return the accessedAt value. + */ + public OffsetDateTime accessedAt() { + return this.accessedAt; + } + + /** + * Get the autoDeleteOnIdle property: TimeSpan idle interval after which the topic is automatically deleted. The + * minimum duration is 5 minutes. + * + * @return the autoDeleteOnIdle value. + */ + public String autoDeleteOnIdle() { + return this.autoDeleteOnIdle; + } + + /** + * Set the autoDeleteOnIdle property: TimeSpan idle interval after which the topic is automatically deleted. The + * minimum duration is 5 minutes. + * + * @param autoDeleteOnIdle the autoDeleteOnIdle value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withAutoDeleteOnIdle(String autoDeleteOnIdle) { + this.autoDeleteOnIdle = autoDeleteOnIdle; + return this; + } + + /** + * Get the countDetails property: Message Count Details. + * + * @return the countDetails value. + */ + public MessageCountDetails countDetails() { + return this.countDetails; + } + + /** + * Get the createdAt property: Exact time the message was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the defaultMessageTimeToLive property: Default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service Bus. This is the default value used when + * TimeToLive is not set on a message itself. + * + * @return the defaultMessageTimeToLive value. + */ + public String defaultMessageTimeToLive() { + return this.defaultMessageTimeToLive; + } + + /** + * Set the defaultMessageTimeToLive property: Default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service Bus. This is the default value used when + * TimeToLive is not set on a message itself. + * + * @param defaultMessageTimeToLive the defaultMessageTimeToLive value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withDefaultMessageTimeToLive(String defaultMessageTimeToLive) { + this.defaultMessageTimeToLive = defaultMessageTimeToLive; + return this; + } + + /** + * Get the deadLetteringOnFilterEvaluationExceptions property: Value that indicates whether a subscription has dead + * letter support on filter evaluation exceptions. + * + * @return the deadLetteringOnFilterEvaluationExceptions value. + */ + public Boolean deadLetteringOnFilterEvaluationExceptions() { + return this.deadLetteringOnFilterEvaluationExceptions; + } + + /** + * Set the deadLetteringOnFilterEvaluationExceptions property: Value that indicates whether a subscription has dead + * letter support on filter evaluation exceptions. + * + * @param deadLetteringOnFilterEvaluationExceptions the deadLetteringOnFilterEvaluationExceptions value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withDeadLetteringOnFilterEvaluationExceptions( + Boolean deadLetteringOnFilterEvaluationExceptions) { + this.deadLetteringOnFilterEvaluationExceptions = deadLetteringOnFilterEvaluationExceptions; + return this; + } + + /** + * Get the deadLetteringOnMessageExpiration property: Value that indicates whether a subscription has dead letter + * support when a message expires. + * + * @return the deadLetteringOnMessageExpiration value. + */ + public Boolean deadLetteringOnMessageExpiration() { + return this.deadLetteringOnMessageExpiration; + } + + /** + * Set the deadLetteringOnMessageExpiration property: Value that indicates whether a subscription has dead letter + * support when a message expires. + * + * @param deadLetteringOnMessageExpiration the deadLetteringOnMessageExpiration value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withDeadLetteringOnMessageExpiration( + Boolean deadLetteringOnMessageExpiration) { + this.deadLetteringOnMessageExpiration = deadLetteringOnMessageExpiration; + return this; + } + + /** + * Get the enableBatchedOperations property: Value that indicates whether server-side batched operations are + * enabled. + * + * @return the enableBatchedOperations value. + */ + public Boolean enableBatchedOperations() { + return this.enableBatchedOperations; + } + + /** + * Set the enableBatchedOperations property: Value that indicates whether server-side batched operations are + * enabled. + * + * @param enableBatchedOperations the enableBatchedOperations value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withEnableBatchedOperations(Boolean enableBatchedOperations) { + this.enableBatchedOperations = enableBatchedOperations; + return this; + } + + /** + * Get the entityAvailabilityStatus property: Entity availability status for the topic. + * + * @return the entityAvailabilityStatus value. + */ + public EntityAvailabilityStatus entityAvailabilityStatus() { + return this.entityAvailabilityStatus; + } + + /** + * Set the entityAvailabilityStatus property: Entity availability status for the topic. + * + * @param entityAvailabilityStatus the entityAvailabilityStatus value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withEntityAvailabilityStatus( + EntityAvailabilityStatus entityAvailabilityStatus) { + this.entityAvailabilityStatus = entityAvailabilityStatus; + return this; + } + + /** + * Get the isReadOnly property: Value that indicates whether the entity description is read-only. + * + * @return the isReadOnly value. + */ + public Boolean isReadOnly() { + return this.isReadOnly; + } + + /** + * Set the isReadOnly property: Value that indicates whether the entity description is read-only. + * + * @param isReadOnly the isReadOnly value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withIsReadOnly(Boolean isReadOnly) { + this.isReadOnly = isReadOnly; + return this; + } + + /** + * Get the lockDuration property: The lock duration time span for the subscription. + * + * @return the lockDuration value. + */ + public String lockDuration() { + return this.lockDuration; + } + + /** + * Set the lockDuration property: The lock duration time span for the subscription. + * + * @param lockDuration the lockDuration value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withLockDuration(String lockDuration) { + this.lockDuration = lockDuration; + return this; + } + + /** + * Get the maxDeliveryCount property: Number of maximum deliveries. + * + * @return the maxDeliveryCount value. + */ + public Integer maxDeliveryCount() { + return this.maxDeliveryCount; + } + + /** + * Set the maxDeliveryCount property: Number of maximum deliveries. + * + * @param maxDeliveryCount the maxDeliveryCount value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withMaxDeliveryCount(Integer maxDeliveryCount) { + this.maxDeliveryCount = maxDeliveryCount; + return this; + } + + /** + * Get the messageCount property: Number of messages. + * + * @return the messageCount value. + */ + public Long messageCount() { + return this.messageCount; + } + + /** + * Get the requiresSession property: Value indicating if a subscription supports the concept of sessions. + * + * @return the requiresSession value. + */ + public Boolean requiresSession() { + return this.requiresSession; + } + + /** + * Set the requiresSession property: Value indicating if a subscription supports the concept of sessions. + * + * @param requiresSession the requiresSession value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withRequiresSession(Boolean requiresSession) { + this.requiresSession = requiresSession; + return this; + } + + /** + * Get the status property: Enumerates the possible values for the status of a messaging entity. + * + * @return the status value. + */ + public EntityStatus status() { + return this.status; + } + + /** + * Set the status property: Enumerates the possible values for the status of a messaging entity. + * + * @param status the status value to set. + * @return the SubscriptionCreateOrUpdateParameters object itself. + */ + public SubscriptionCreateOrUpdateParameters withStatus(EntityStatus status) { + this.status = status; + return this; + } + + /** + * Get the updatedAt property: The exact time the message was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (location() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property location in model SubscriptionCreateOrUpdateParameters")); + } + if (countDetails() != null) { + countDetails().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Topic.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Topic.java new file mode 100644 index 0000000000000..5ac0a6d9fa115 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Topic.java @@ -0,0 +1,476 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import com.azure.resourcemanager.servicebus.fluent.inner.TopicResourceInner; +import com.azure.resourcemanager.servicebus.ServiceBusManager; + +import java.time.Duration; +import java.time.OffsetDateTime; + +/** + * Type representing Service Bus topic. + */ +@Fluent +public interface Topic extends + IndependentChildResource, + Refreshable, + Updatable, + HasInner { + + /** + * @return the exact time the topic was created + */ + OffsetDateTime createdAt(); + /** + * @return last time a message was sent, or the last time there was a receive request to this topic + */ + OffsetDateTime accessedAt(); + /** + * @return the exact time the topic was updated + */ + OffsetDateTime updatedAt(); + /** + * @return the maximum size of memory allocated for the topic in megabytes + */ + long maxSizeInMB(); + /** + * @return current size of the topic, in bytes + */ + long currentSizeInBytes(); + /** + * @return indicates whether server-side batched operations are enabled + */ + boolean isBatchedOperationsEnabled(); + /** + * @return indicates whether express entities are enabled + */ + boolean isExpressEnabled(); + /** + * @return indicates whether the topic is to be partitioned across multiple message brokers + */ + boolean isPartitioningEnabled(); + /** + * @return indicates if this topic requires duplicate detection + */ + boolean isDuplicateDetectionEnabled(); + /** + * @return the idle duration after which the topic is automatically deleted + */ + long deleteOnIdleDurationInMinutes(); + /** + * @return the duration after which the message expires, starting from when the message is sent to topic + */ + Duration defaultMessageTtlDuration(); + /** + * @return the duration of the duplicate detection history + */ + Duration duplicateMessageDetectionHistoryDuration(); + /** + * @return number of active messages in the topic + */ + long activeMessageCount(); + /** + * @return number of messages in the dead-letter topic + */ + long deadLetterMessageCount(); + /** + * @return number of messages sent to the topic that are yet to be released + * for consumption + */ + long scheduledMessageCount(); + /** + * @return number of messages transferred into dead letters + */ + long transferDeadLetterMessageCount(); + /** + * @return number of messages transferred to another topic, topic, or subscription + */ + long transferMessageCount(); + /** + * @return number of subscriptions for the topic + */ + int subscriptionCount(); + /** + * @return the current status of the topic + */ + EntityStatus status(); + /** + * @return entry point to manage subscriptions associated with the topic + */ + ServiceBusSubscriptions subscriptions(); + /** + * @return entry point to manage authorization rules for the Service Bus topic + */ + TopicAuthorizationRules authorizationRules(); + + /** + * The entirety of the Service Bus topic definition. + */ + interface Definition extends + Topic.DefinitionStages.Blank, + Topic.DefinitionStages.WithCreate { + } + + /** + * Grouping of Service Bus topic definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a topic definition. + */ + interface Blank extends WithCreate { + } + + /** + * The stage of the topic definition allowing to specify size. + */ + interface WithSize { + /** + * Specifies the maximum size of memory allocated for the topic. + * + * @param sizeInMB size in MB + * @return the next stage of topic definition + */ + WithCreate withSizeInMB(long sizeInMB); + } + + /** + * The stage of the topic definition allowing to specify partitioning behaviour. + */ + interface WithPartitioning { + /** + * Specifies that partitioning should be enabled on this topic. + * + * @return the next stage of topic definition + */ + WithCreate withPartitioning(); + + /** + * Specifies that the default partitioning should be disabled on this topic. + * Note: if the parent Service Bus is Premium SKU then partition cannot be + * disabled + * + * @return the next stage of topic definition + */ + WithCreate withoutPartitioning(); + } + + /** + * The stage of the topic definition allowing to define auto delete behaviour. + */ + interface WithDeleteOnIdle { + /** + * The idle interval after which the topic is automatically deleted. + * Note: unless it is explicitly overridden the default delete on idle duration + * is infinite (TimeSpan.Max). + * + * @param durationInMinutes idle duration in minutes + * @return the next stage of topic definition + */ + WithCreate withDeleteOnIdleDurationInMinutes(int durationInMinutes); + } + + /** + * The stage of the topic definition allowing to define default TTL for messages. + */ + interface WithDefaultMessageTTL { + /** + * Specifies the duration after which the message expires. + * Note: unless it is explicitly overridden the default ttl is infinite (TimeSpan.Max). + * + * @param ttl time to live duration + * @return the next stage of topic definition + */ + WithCreate withDefaultMessageTTL(Duration ttl); + } + + /** + * The stage of the topic definition allowing to mark messages as express messages. + */ + interface WithExpressMessage { + /** + * Specifies that messages in this topic are express hence they can be cached in memory + * for some time before storing it in messaging store. + * Note: By default topic is not express. + * + * @return the next stage of topic definition + */ + WithCreate withExpressMessage(); + } + + /** + * The stage of the topic definition allowing specify batching behaviour. + */ + interface WithMessageBatching { + /** + * Specifies that the default batching should be disabled on this topic. + * With batching Service Bus can batch multiple message when it write or delete messages + * from it's internal store. + * + * @return the next stage of topic definition + */ + WithCreate withoutMessageBatching(); + } + + /** + * The stage of the topic definition allowing to specify duration of the duplicate message + * detection history. + */ + interface WithDuplicateMessageDetection { + /** + * Specifies the duration of the duplicate message detection history. + * + * @param duplicateDetectionHistoryDuration duration of the history + * @return the next stage of topic definition + */ + WithCreate withDuplicateMessageDetection(Duration duplicateDetectionHistoryDuration); + } + + /** + * The stage of the Service Bus namespace update allowing to manage subscriptions for the topic. + */ + interface WithSubscription { + /** + * Creates a subscription entity for the Service Bus topic. + * + * @param name queue name + * @return the next stage of topic definition + */ + WithCreate withNewSubscription(String name); + } + + /** + * The stage of the topic definition allowing to add an authorization rule for accessing + * the topic. + */ + interface WithAuthorizationRule { + /** + * Creates a send authorization rule for the topic. + * + * @param name rule name + * @return next stage of the topic definition + */ + WithCreate withNewSendRule(String name); + /** + * Creates a listen authorization rule for the topic. + * + * @param name rule name + * @return next stage of the topic definition + */ + WithCreate withNewListenRule(String name); + /** + * Creates a manage authorization rule for the topic. + * + * @param name rule name + * @return next stage of the topic definition + */ + WithCreate withNewManageRule(String name); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends + Creatable, + Topic.DefinitionStages.WithSize, + Topic.DefinitionStages.WithPartitioning, + Topic.DefinitionStages.WithDeleteOnIdle, + Topic.DefinitionStages.WithDefaultMessageTTL, + Topic.DefinitionStages.WithExpressMessage, + Topic.DefinitionStages.WithMessageBatching, + Topic.DefinitionStages.WithDuplicateMessageDetection, + Topic.DefinitionStages.WithSubscription, + Topic.DefinitionStages.WithAuthorizationRule { + } + } + + /** + * The template for a Service Bus topic update operation, containing all the settings that can be modified. + */ + interface Update extends + Appliable, + Topic.UpdateStages.WithSize, + Topic.UpdateStages.WithDeleteOnIdle, + Topic.UpdateStages.WithDefaultMessageTTL, + Topic.UpdateStages.WithExpressMessage, + Topic.UpdateStages.WithMessageBatching, + Topic.UpdateStages.WithDuplicateMessageDetection, + Topic.UpdateStages.WithSubscription, + Topic.UpdateStages.WithAuthorizationRule { + } + + /** + * Grouping of Service Bus topic update stages. + */ + interface UpdateStages { + /** + * The stage of the topic definition allowing to specify size. + */ + interface WithSize { + /** + * Specifies the maximum size of memory allocated for the topic. + * + * @param sizeInMB size in MB + * @return the next stage of topic update + */ + Update withSizeInMB(long sizeInMB); + } + + /** + * The stage of the topic definition allowing to define auto delete behaviour. + */ + interface WithDeleteOnIdle { + /** + * The idle interval after which the topic is automatically deleted. + * + * @param durationInMinutes idle duration in minutes + * @return the next stage of topic update + */ + Update withDeleteOnIdleDurationInMinutes(int durationInMinutes); + } + + /** + * The stage of the topic definition allowing to define default TTL for messages. + */ + interface WithDefaultMessageTTL { + /** + * Specifies the duration after which the message expires. + * + * @param ttl time to live duration + * @return the next stage of topic update + */ + Update withDefaultMessageTTL(Duration ttl); + } + + /** + * The stage of the topic definition allowing to mark it as either holding regular or express + * messages. + */ + interface WithExpressMessage { + /** + * Specifies that messages in this topic are express hence they can be cached in memory + * for some time before storing it in messaging store. + * + * @return the next stage of topic update + */ + Update withExpressMessage(); + + /** + * Specifies that messages in this topic are not express hence they should be cached in memory. + * + * @return the next stage of topic update + */ + Update withoutExpressMessage(); + } + + /** + * The stage of the topic definition allowing configure message batching behaviour. + */ + interface WithMessageBatching { + /** + * Specifies that service bus can batch multiple message when it write messages to or delete + * messages from it's internal store. This increases the throughput. + * + * @return the next stage of topic update + */ + Update withMessageBatching(); + + /** + * Specifies that batching of messages should be disabled when Service Bus write messages to + * or delete messages from it's internal store. + * + * @return the next stage of topic update + */ + Update withoutMessageBatching(); + } + + /** + * The stage of the topic definition allowing to specify duration of the duplicate message + * detection history. + */ + interface WithDuplicateMessageDetection { + /** + * Specifies the duration of the duplicate message detection history. + * + * @param duration duration of the history + * @return the next stage of topic update + */ + Update withDuplicateMessageDetectionHistoryDuration(Duration duration); + + /** + * Specifies that duplicate message detection needs to be disabled. + * + * @return the next stage of topic update + */ + Update withoutDuplicateMessageDetection(); + } + + /** + * The stage of the Service Bus namespace update allowing to manage subscriptions for the topic. + */ + interface WithSubscription { + /** + * Creates a subscription entity for the Service Bus topic. + * + * @param name queue name + * @return next stage of the Service Bus topic update + */ + Update withNewSubscription(String name); + + /** + * Removes a subscription entity associated with the Service Bus topic. + * + * @param name subscription name + * @return next stage of the Service Bus topic update + */ + Update withoutSubscription(String name); + } + + /** + * The stage of the topic definition allowing to add an authorization rule for accessing + * the topic. + */ + interface WithAuthorizationRule { + /** + * Creates a send authorization rule for the topic. + * + * @param name rule name + * @return next stage of the topic update + */ + Update withNewSendRule(String name); + /** + * Creates a listen authorization rule for the topic. + * + * @param name rule name + * @return next stage of the topic update + */ + Update withNewListenRule(String name); + /** + * Creates a manage authorization rule for the topic. + * + * @param name rule name + * @return next stage of the topic update + */ + Update withNewManageRule(String name); + + /** + * Removes an authorization rule for the topic. + * + * @param name rule name + * @return next stage of the topic update + */ + Update withoutAuthorizationRule(String name); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicAuthorizationRule.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicAuthorizationRule.java new file mode 100644 index 0000000000000..94f2358d84c2b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicAuthorizationRule.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; + +/** + * Type representing authorization rule defined for topic. + */ +@Fluent +public interface TopicAuthorizationRule extends + AuthorizationRule, + Updatable { + /** + * @return the name of the namespace that the parent topic belongs to + */ + String namespaceName(); + + /** + * @return the name of the parent topic name + */ + String topicName(); + + /** + * Grouping of Service Bus topic authorization rule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of topic authorization rule definition. + */ + interface Blank extends AuthorizationRule + .DefinitionStages + .WithListenOrSendOrManage { + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + + /** + * The entirety of the topic authorization rule definition. + */ + interface Definition extends + TopicAuthorizationRule.DefinitionStages.Blank, + TopicAuthorizationRule.DefinitionStages.WithCreate { + } + + /** + * The entirety of the topic authorization rule update. + */ + interface Update extends + Appliable, + AuthorizationRule.UpdateStages.WithListenOrSendOrManage { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicAuthorizationRules.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicAuthorizationRules.java new file mode 100644 index 0000000000000..d52b53757c727 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicAuthorizationRules.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.TopicsClient; + +/** + * Entry point to topic authorization rules management API. + */ +@Fluent +public interface TopicAuthorizationRules extends + AuthorizationRules, + SupportsCreating, + HasInner { +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicCreateOrUpdateParameters.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicCreateOrUpdateParameters.java new file mode 100644 index 0000000000000..13e3e358c5415 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/TopicCreateOrUpdateParameters.java @@ -0,0 +1,571 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TopicCreateOrUpdateParameters model. */ +@JsonFlatten +@Fluent +public class TopicCreateOrUpdateParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopicCreateOrUpdateParameters.class); + + /* + * Topic name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Location of the resource. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /* + * Last time the message was sent, or a request was received, for this + * topic. + */ + @JsonProperty(value = "properties.accessedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime accessedAt; + + /* + * TimeSpan idle interval after which the topic is automatically deleted. + * The minimum duration is 5 minutes. + */ + @JsonProperty(value = "properties.autoDeleteOnIdle") + private String autoDeleteOnIdle; + + /* + * Entity availability status for the topic. + */ + @JsonProperty(value = "properties.entityAvailabilityStatus") + private EntityAvailabilityStatus entityAvailabilityStatus; + + /* + * Exact time the message was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * Message Count Details. + */ + @JsonProperty(value = "properties.countDetails", access = JsonProperty.Access.WRITE_ONLY) + private MessageCountDetails countDetails; + + /* + * Default message time to live value. This is the duration after which the + * message expires, starting from when the message is sent to Service Bus. + * This is the default value used when TimeToLive is not set on a message + * itself. + */ + @JsonProperty(value = "properties.defaultMessageTimeToLive") + private String defaultMessageTimeToLive; + + /* + * TimeSpan structure that defines the duration of the duplicate detection + * history. The default value is 10 minutes. + */ + @JsonProperty(value = "properties.duplicateDetectionHistoryTimeWindow") + private String duplicateDetectionHistoryTimeWindow; + + /* + * Value that indicates whether server-side batched operations are enabled. + */ + @JsonProperty(value = "properties.enableBatchedOperations") + private Boolean enableBatchedOperations; + + /* + * Value that indicates whether Express Entities are enabled. An express + * topic holds a message in memory temporarily before writing it to + * persistent storage. + */ + @JsonProperty(value = "properties.enableExpress") + private Boolean enableExpress; + + /* + * Value that indicates whether the topic to be partitioned across multiple + * message brokers is enabled. + */ + @JsonProperty(value = "properties.enablePartitioning") + private Boolean enablePartitioning; + + /* + * Whether messages should be filtered before publishing. + */ + @JsonProperty(value = "properties.filteringMessagesBeforePublishing") + private Boolean filteringMessagesBeforePublishing; + + /* + * Value that indicates whether the message is accessible anonymously. + */ + @JsonProperty(value = "properties.isAnonymousAccessible") + private Boolean isAnonymousAccessible; + + /* + * The isExpress property. + */ + @JsonProperty(value = "properties.isExpress") + private Boolean isExpress; + + /* + * Maximum size of the topic in megabytes, which is the size of the memory + * allocated for the topic. + */ + @JsonProperty(value = "properties.maxSizeInMegabytes") + private Long maxSizeInMegabytes; + + /* + * Value indicating if this topic requires duplicate detection. + */ + @JsonProperty(value = "properties.requiresDuplicateDetection") + private Boolean requiresDuplicateDetection; + + /* + * Size of the topic, in bytes. + */ + @JsonProperty(value = "properties.sizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long sizeInBytes; + + /* + * Enumerates the possible values for the status of a messaging entity. + */ + @JsonProperty(value = "properties.status") + private EntityStatus status; + + /* + * Number of subscriptions. + */ + @JsonProperty(value = "properties.subscriptionCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer subscriptionCount; + + /* + * Value that indicates whether the topic supports ordering. + */ + @JsonProperty(value = "properties.supportOrdering") + private Boolean supportOrdering; + + /* + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedAt; + + /** + * Get the name property: Topic name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Topic name. + * + * @param name the name value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the location property: Location of the resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Location of the resource. + * + * @param location the location value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the accessedAt property: Last time the message was sent, or a request was received, for this topic. + * + * @return the accessedAt value. + */ + public OffsetDateTime accessedAt() { + return this.accessedAt; + } + + /** + * Get the autoDeleteOnIdle property: TimeSpan idle interval after which the topic is automatically deleted. The + * minimum duration is 5 minutes. + * + * @return the autoDeleteOnIdle value. + */ + public String autoDeleteOnIdle() { + return this.autoDeleteOnIdle; + } + + /** + * Set the autoDeleteOnIdle property: TimeSpan idle interval after which the topic is automatically deleted. The + * minimum duration is 5 minutes. + * + * @param autoDeleteOnIdle the autoDeleteOnIdle value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withAutoDeleteOnIdle(String autoDeleteOnIdle) { + this.autoDeleteOnIdle = autoDeleteOnIdle; + return this; + } + + /** + * Get the entityAvailabilityStatus property: Entity availability status for the topic. + * + * @return the entityAvailabilityStatus value. + */ + public EntityAvailabilityStatus entityAvailabilityStatus() { + return this.entityAvailabilityStatus; + } + + /** + * Set the entityAvailabilityStatus property: Entity availability status for the topic. + * + * @param entityAvailabilityStatus the entityAvailabilityStatus value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withEntityAvailabilityStatus( + EntityAvailabilityStatus entityAvailabilityStatus) { + this.entityAvailabilityStatus = entityAvailabilityStatus; + return this; + } + + /** + * Get the createdAt property: Exact time the message was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the countDetails property: Message Count Details. + * + * @return the countDetails value. + */ + public MessageCountDetails countDetails() { + return this.countDetails; + } + + /** + * Get the defaultMessageTimeToLive property: Default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service Bus. This is the default value used when + * TimeToLive is not set on a message itself. + * + * @return the defaultMessageTimeToLive value. + */ + public String defaultMessageTimeToLive() { + return this.defaultMessageTimeToLive; + } + + /** + * Set the defaultMessageTimeToLive property: Default message time to live value. This is the duration after which + * the message expires, starting from when the message is sent to Service Bus. This is the default value used when + * TimeToLive is not set on a message itself. + * + * @param defaultMessageTimeToLive the defaultMessageTimeToLive value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withDefaultMessageTimeToLive(String defaultMessageTimeToLive) { + this.defaultMessageTimeToLive = defaultMessageTimeToLive; + return this; + } + + /** + * Get the duplicateDetectionHistoryTimeWindow property: TimeSpan structure that defines the duration of the + * duplicate detection history. The default value is 10 minutes. + * + * @return the duplicateDetectionHistoryTimeWindow value. + */ + public String duplicateDetectionHistoryTimeWindow() { + return this.duplicateDetectionHistoryTimeWindow; + } + + /** + * Set the duplicateDetectionHistoryTimeWindow property: TimeSpan structure that defines the duration of the + * duplicate detection history. The default value is 10 minutes. + * + * @param duplicateDetectionHistoryTimeWindow the duplicateDetectionHistoryTimeWindow value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withDuplicateDetectionHistoryTimeWindow( + String duplicateDetectionHistoryTimeWindow) { + this.duplicateDetectionHistoryTimeWindow = duplicateDetectionHistoryTimeWindow; + return this; + } + + /** + * Get the enableBatchedOperations property: Value that indicates whether server-side batched operations are + * enabled. + * + * @return the enableBatchedOperations value. + */ + public Boolean enableBatchedOperations() { + return this.enableBatchedOperations; + } + + /** + * Set the enableBatchedOperations property: Value that indicates whether server-side batched operations are + * enabled. + * + * @param enableBatchedOperations the enableBatchedOperations value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withEnableBatchedOperations(Boolean enableBatchedOperations) { + this.enableBatchedOperations = enableBatchedOperations; + return this; + } + + /** + * Get the enableExpress property: Value that indicates whether Express Entities are enabled. An express topic holds + * a message in memory temporarily before writing it to persistent storage. + * + * @return the enableExpress value. + */ + public Boolean enableExpress() { + return this.enableExpress; + } + + /** + * Set the enableExpress property: Value that indicates whether Express Entities are enabled. An express topic holds + * a message in memory temporarily before writing it to persistent storage. + * + * @param enableExpress the enableExpress value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withEnableExpress(Boolean enableExpress) { + this.enableExpress = enableExpress; + return this; + } + + /** + * Get the enablePartitioning property: Value that indicates whether the topic to be partitioned across multiple + * message brokers is enabled. + * + * @return the enablePartitioning value. + */ + public Boolean enablePartitioning() { + return this.enablePartitioning; + } + + /** + * Set the enablePartitioning property: Value that indicates whether the topic to be partitioned across multiple + * message brokers is enabled. + * + * @param enablePartitioning the enablePartitioning value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withEnablePartitioning(Boolean enablePartitioning) { + this.enablePartitioning = enablePartitioning; + return this; + } + + /** + * Get the filteringMessagesBeforePublishing property: Whether messages should be filtered before publishing. + * + * @return the filteringMessagesBeforePublishing value. + */ + public Boolean filteringMessagesBeforePublishing() { + return this.filteringMessagesBeforePublishing; + } + + /** + * Set the filteringMessagesBeforePublishing property: Whether messages should be filtered before publishing. + * + * @param filteringMessagesBeforePublishing the filteringMessagesBeforePublishing value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withFilteringMessagesBeforePublishing( + Boolean filteringMessagesBeforePublishing) { + this.filteringMessagesBeforePublishing = filteringMessagesBeforePublishing; + return this; + } + + /** + * Get the isAnonymousAccessible property: Value that indicates whether the message is accessible anonymously. + * + * @return the isAnonymousAccessible value. + */ + public Boolean isAnonymousAccessible() { + return this.isAnonymousAccessible; + } + + /** + * Set the isAnonymousAccessible property: Value that indicates whether the message is accessible anonymously. + * + * @param isAnonymousAccessible the isAnonymousAccessible value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withIsAnonymousAccessible(Boolean isAnonymousAccessible) { + this.isAnonymousAccessible = isAnonymousAccessible; + return this; + } + + /** + * Get the isExpress property: The isExpress property. + * + * @return the isExpress value. + */ + public Boolean isExpress() { + return this.isExpress; + } + + /** + * Set the isExpress property: The isExpress property. + * + * @param isExpress the isExpress value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withIsExpress(Boolean isExpress) { + this.isExpress = isExpress; + return this; + } + + /** + * Get the maxSizeInMegabytes property: Maximum size of the topic in megabytes, which is the size of the memory + * allocated for the topic. + * + * @return the maxSizeInMegabytes value. + */ + public Long maxSizeInMegabytes() { + return this.maxSizeInMegabytes; + } + + /** + * Set the maxSizeInMegabytes property: Maximum size of the topic in megabytes, which is the size of the memory + * allocated for the topic. + * + * @param maxSizeInMegabytes the maxSizeInMegabytes value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withMaxSizeInMegabytes(Long maxSizeInMegabytes) { + this.maxSizeInMegabytes = maxSizeInMegabytes; + return this; + } + + /** + * Get the requiresDuplicateDetection property: Value indicating if this topic requires duplicate detection. + * + * @return the requiresDuplicateDetection value. + */ + public Boolean requiresDuplicateDetection() { + return this.requiresDuplicateDetection; + } + + /** + * Set the requiresDuplicateDetection property: Value indicating if this topic requires duplicate detection. + * + * @param requiresDuplicateDetection the requiresDuplicateDetection value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withRequiresDuplicateDetection(Boolean requiresDuplicateDetection) { + this.requiresDuplicateDetection = requiresDuplicateDetection; + return this; + } + + /** + * Get the sizeInBytes property: Size of the topic, in bytes. + * + * @return the sizeInBytes value. + */ + public Long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Get the status property: Enumerates the possible values for the status of a messaging entity. + * + * @return the status value. + */ + public EntityStatus status() { + return this.status; + } + + /** + * Set the status property: Enumerates the possible values for the status of a messaging entity. + * + * @param status the status value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withStatus(EntityStatus status) { + this.status = status; + return this; + } + + /** + * Get the subscriptionCount property: Number of subscriptions. + * + * @return the subscriptionCount value. + */ + public Integer subscriptionCount() { + return this.subscriptionCount; + } + + /** + * Get the supportOrdering property: Value that indicates whether the topic supports ordering. + * + * @return the supportOrdering value. + */ + public Boolean supportOrdering() { + return this.supportOrdering; + } + + /** + * Set the supportOrdering property: Value that indicates whether the topic supports ordering. + * + * @param supportOrdering the supportOrdering value to set. + * @return the TopicCreateOrUpdateParameters object itself. + */ + public TopicCreateOrUpdateParameters withSupportOrdering(Boolean supportOrdering) { + this.supportOrdering = supportOrdering; + return this; + } + + /** + * Get the updatedAt property: The exact time the message was updated. + * + * @return the updatedAt value. + */ + public OffsetDateTime updatedAt() { + return this.updatedAt; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (location() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property location in model TopicCreateOrUpdateParameters")); + } + if (countDetails() != null) { + countDetails().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Topics.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Topics.java new file mode 100644 index 0000000000000..c4c7a1e639d30 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/Topics.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingByName; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.servicebus.fluent.TopicsClient; +import com.azure.resourcemanager.servicebus.ServiceBusManager; + +/** + * Entry point to Service Bus topic management API in Azure. + */ +@Fluent +public interface Topics extends + SupportsCreating, + SupportsListing, + SupportsGettingByName, + SupportsDeletingByName, + HasManager, + HasInner { +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/UnavailableReason.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/UnavailableReason.java new file mode 100644 index 0000000000000..8bcabef42c170 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/UnavailableReason.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicebus.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for UnavailableReason. */ +public final class UnavailableReason extends ExpandableStringEnum { + /** Static value None for UnavailableReason. */ + public static final UnavailableReason NONE = fromString("None"); + + /** Static value InvalidName for UnavailableReason. */ + public static final UnavailableReason INVALID_NAME = fromString("InvalidName"); + + /** Static value SubscriptionIsDisabled for UnavailableReason. */ + public static final UnavailableReason SUBSCRIPTION_IS_DISABLED = fromString("SubscriptionIsDisabled"); + + /** Static value NameInUse for UnavailableReason. */ + public static final UnavailableReason NAME_IN_USE = fromString("NameInUse"); + + /** Static value NameInLockdown for UnavailableReason. */ + public static final UnavailableReason NAME_IN_LOCKDOWN = fromString("NameInLockdown"); + + /** Static value TooManyNamespaceInCurrentSubscription for UnavailableReason. */ + public static final UnavailableReason TOO_MANY_NAMESPACE_IN_CURRENT_SUBSCRIPTION = + fromString("TooManyNamespaceInCurrentSubscription"); + + /** + * Creates or finds a UnavailableReason from its string representation. + * + * @param name a name to look for. + * @return the corresponding UnavailableReason. + */ + @JsonCreator + public static UnavailableReason fromString(String name) { + return fromString(name, UnavailableReason.class); + } + + /** @return known UnavailableReason values. */ + public static Collection values() { + return values(UnavailableReason.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/package-info.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/package-info.java new file mode 100644 index 0000000000000..7279a02f884af --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for ServiceBusManagementClient. Azure Service Bus client. */ +package com.azure.resourcemanager.servicebus.models; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/package-info.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/package-info.java new file mode 100644 index 0000000000000..7d9e06c001b22 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for ServiceBusManagementClient. Azure Service Bus client. */ +package com.azure.resourcemanager.servicebus; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/ServiceBusOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/ServiceBusOperationsTests.java new file mode 100644 index 0000000000000..b0fe15ce7034f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/ServiceBusOperationsTests.java @@ -0,0 +1,547 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.resources.models.ResourceGroup; +import com.azure.resourcemanager.servicebus.implementation.TimeSpan; +import com.azure.resourcemanager.servicebus.models.AccessRights; +import com.azure.resourcemanager.servicebus.models.AuthorizationKeys; +import com.azure.resourcemanager.servicebus.models.CheckNameAvailabilityResult; +import com.azure.resourcemanager.servicebus.models.NamespaceAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.NamespaceSku; +import com.azure.resourcemanager.servicebus.models.Policykey; +import com.azure.resourcemanager.servicebus.models.Queue; +import com.azure.resourcemanager.servicebus.models.QueueAuthorizationRule; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespace; +import com.azure.resourcemanager.servicebus.models.ServiceBusSubscription; +import com.azure.resourcemanager.servicebus.models.Topic; +import com.azure.resourcemanager.servicebus.models.TopicAuthorizationRule; +import com.azure.resourcemanager.test.ResourceManagerTestBase; +import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestUtilities; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.List; + +public class ServiceBusOperationsTests extends ResourceManagerTestBase { + private ResourceManager resourceManager; + private ServiceBusManager serviceBusManager; + private String rgName = ""; + + @Override + protected HttpPipeline buildHttpPipeline( + TokenCredential credential, + AzureProfile profile, + HttpLogOptions httpLogOptions, + List policies, + HttpClient httpClient) { + return HttpPipelineProvider.buildHttpPipeline( + credential, + profile, + null, + httpLogOptions, + null, + new RetryPolicy("Retry-After", ChronoUnit.SECONDS), + policies, + httpClient); + } + + @Override + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { + rgName = generateRandomResourceName("javasb", 20); + + SdkContext.setDelayProvider(new TestDelayProvider(!isPlaybackMode())); + resourceManager = ResourceManager.authenticate(httpPipeline, profile).withDefaultSubscription(); + serviceBusManager = ServiceBusManager.authenticate(httpPipeline, profile); + } + + @Override + protected void cleanUpResources() { + if (rgName != null && resourceManager != null) { + resourceManager.resourceGroups().deleteByName(rgName); + } + } + + @Test + public void canCRUDOnSimpleNamespace() { + Region region = Region.US_EAST; + Creatable rgCreatable = resourceManager.resourceGroups() + .define(rgName) + .withRegion(region); + + String namespaceDNSLabel = generateRandomResourceName("jvsbns", 15); + serviceBusManager.namespaces() + .define(namespaceDNSLabel) + .withRegion(region) + .withNewResourceGroup(rgCreatable) + .withSku(NamespaceSku.BASIC) + .create(); + + ServiceBusNamespace namespace = serviceBusManager.namespaces() + .getByResourceGroup(rgName, namespaceDNSLabel); + Assertions.assertNotNull(namespace); + Assertions.assertNotNull(namespace.inner()); + + PagedIterable namespaces = serviceBusManager.namespaces().listByResourceGroup(rgName); + Assertions.assertNotNull(namespaces); + Assertions.assertTrue(TestUtilities.getSize(namespaces) > 0); + boolean found = false; + for (ServiceBusNamespace n : namespaces) { + if (n.name().equalsIgnoreCase(namespace.name())) { + found = true; + break; + } + } + Assertions.assertTrue(found); + + Assertions.assertNotNull(namespace.dnsLabel()); + Assertions.assertTrue(namespace.dnsLabel().equalsIgnoreCase(namespaceDNSLabel)); + Assertions.assertNotNull(namespace.fqdn()); + Assertions.assertTrue(namespace.fqdn().contains(namespaceDNSLabel)); + Assertions.assertNotNull(namespace.sku()); + Assertions.assertTrue(namespace.sku().name().equals(NamespaceSku.BASIC.name())); + Assertions.assertNotNull(namespace.region()); + Assertions.assertTrue(namespace.region().equals(region)); + Assertions.assertNotNull(namespace.resourceGroupName()); + Assertions.assertTrue(namespace.resourceGroupName().equalsIgnoreCase(rgName)); + Assertions.assertNotNull(namespace.createdAt()); + Assertions.assertNotNull(namespace.queues()); + Assertions.assertEquals(0, TestUtilities.getSize(namespace.queues().list())); + Assertions.assertNotNull(namespace.topics()); + Assertions.assertEquals(0, TestUtilities.getSize(namespace.topics().list())); + Assertions.assertNotNull(namespace.authorizationRules()); + PagedIterable defaultNsRules = namespace.authorizationRules().list(); + Assertions.assertEquals(1, TestUtilities.getSize(defaultNsRules)); + NamespaceAuthorizationRule defaultNsRule = defaultNsRules.iterator().next(); + Assertions.assertTrue(defaultNsRule.name().equalsIgnoreCase("RootManageSharedAccessKey")); + Assertions.assertNotNull(defaultNsRule.rights()); + Assertions.assertNotNull(defaultNsRule.namespaceName()); + Assertions.assertTrue(defaultNsRule.namespaceName().equalsIgnoreCase(namespaceDNSLabel)); + Assertions.assertNotNull(defaultNsRule.resourceGroupName()); + Assertions.assertTrue(defaultNsRule.resourceGroupName().equalsIgnoreCase(rgName)); + namespace.update() + .withSku(NamespaceSku.STANDARD) + .apply(); + Assertions.assertTrue(namespace.sku().name().equals(NamespaceSku.STANDARD.name())); + serviceBusManager.namespaces().deleteByResourceGroup(rgName, namespace.name()); + } + + @Test + public void canCreateNamespaceThenCRUDOnQueue() { + Region region = Region.US_EAST; + Creatable rgCreatable = resourceManager.resourceGroups() + .define(rgName) + .withRegion(region); + + String namespaceDNSLabel = generateRandomResourceName("jvsbns", 15); + ServiceBusNamespace namespace = serviceBusManager.namespaces() + .define(namespaceDNSLabel) + .withRegion(region) + .withNewResourceGroup(rgCreatable) + .withSku(NamespaceSku.STANDARD) + .create(); + Assertions.assertNotNull(namespace); + Assertions.assertNotNull(namespace.inner()); + + String queueName = generateRandomResourceName("queue1-", 15); + Queue queue = namespace.queues() + .define(queueName) + .create(); + + Assertions.assertNotNull(queue); + Assertions.assertNotNull(queue.inner()); + Assertions.assertNotNull(queue.name()); + Assertions.assertTrue(queue.name().equalsIgnoreCase(queueName)); + // Default lock duration is 1 minute, assert TimeSpan("00:01:00") parsing + // + Assertions.assertEquals("00:01:00", queue.inner().lockDuration()); + Assertions.assertEquals(60, queue.lockDurationInSeconds()); + + Duration dupDetectionDuration = queue.duplicateMessageDetectionHistoryDuration(); + Assertions.assertNotNull(dupDetectionDuration); + Assertions.assertEquals(10, TimeSpan.fromDuration(dupDetectionDuration).minutes()); + // Default message TTL is TimeSpan.Max, assert parsing + // + Assertions.assertEquals("10675199.02:48:05.4775807", queue.inner().defaultMessageTimeToLive()); + Duration msgTtlDuration = queue.defaultMessageTtlDuration(); + Assertions.assertNotNull(msgTtlDuration); + // Assertions the default ttl TimeSpan("10675199.02:48:05.4775807") parsing + // + TimeSpan timeSpan = TimeSpan.fromDuration(msgTtlDuration); + Assertions.assertEquals(10675199, timeSpan.days()); + Assertions.assertEquals(2, timeSpan.hours()); + Assertions.assertEquals(48, timeSpan.minutes()); + // Assertions the default max size In MB + // + Assertions.assertEquals(1024, queue.maxSizeInMB()); + + PagedIterable queuesInNamespace = namespace.queues().list(); + Assertions.assertNotNull(queuesInNamespace); + Assertions.assertTrue(TestUtilities.getSize(queuesInNamespace) > 0); + Queue foundQueue = null; + for (Queue q : queuesInNamespace) { + if (q.name().equalsIgnoreCase(queueName)) { + foundQueue = q; + break; + } + } + Assertions.assertNotNull(foundQueue); + // Dead lettering disabled by default + // + Assertions.assertFalse(foundQueue.isDeadLetteringEnabledForExpiredMessages()); + foundQueue = foundQueue.update() + .withMessageLockDurationInSeconds(120) + .withDefaultMessageTTL(Duration.ofMinutes(20)) + .withExpiredMessageMovedToDeadLetterQueue() + .withMessageMovedToDeadLetterQueueOnMaxDeliveryCount(25) + .apply(); + Assertions.assertEquals(120, foundQueue.lockDurationInSeconds()); + Assertions.assertTrue(foundQueue.isDeadLetteringEnabledForExpiredMessages()); + Assertions.assertEquals(25, foundQueue.maxDeliveryCountBeforeDeadLetteringMessage()); + namespace.queues().deleteByName(foundQueue.name()); + } + + @Test + public void canCreateDeleteQueueWithNamespace() { + Region region = Region.US_EAST; + Creatable rgCreatable = resourceManager.resourceGroups() + .define(rgName) + .withRegion(region); + + String namespaceDNSLabel = generateRandomResourceName("jvsbns", 15); + String queueName = generateRandomResourceName("queue1-", 15); + // Create NS with Queue + // + ServiceBusNamespace namespace = serviceBusManager.namespaces() + .define(namespaceDNSLabel) + .withRegion(region) + .withNewResourceGroup(rgCreatable) + .withSku(NamespaceSku.STANDARD) + .withNewQueue(queueName, 1024) + .create(); + Assertions.assertNotNull(namespace); + Assertions.assertNotNull(namespace.inner()); + // Lookup queue + // + PagedIterable queuesInNamespace = namespace.queues().list(); + Assertions.assertNotNull(queuesInNamespace); + Assertions.assertEquals(1, TestUtilities.getSize(queuesInNamespace)); + Queue foundQueue = null; + for (Queue q : queuesInNamespace) { + if (q.name().equalsIgnoreCase(queueName)) { + foundQueue = q; + break; + } + } + Assertions.assertNotNull(foundQueue); + // Remove Queue + // + namespace.update() + .withoutQueue(queueName) + .apply(); + queuesInNamespace = namespace.queues().list(); + Assertions.assertNotNull(queuesInNamespace); + Assertions.assertEquals(0, TestUtilities.getSize(queuesInNamespace)); + } + + @Test + public void canCreateNamespaceThenCRUDOnTopic() { + Region region = Region.US_EAST; + Creatable rgCreatable = resourceManager.resourceGroups() + .define(rgName) + .withRegion(region); + + String namespaceDNSLabel = generateRandomResourceName("jvsbns", 15); + ServiceBusNamespace namespace = serviceBusManager.namespaces() + .define(namespaceDNSLabel) + .withRegion(region) + .withNewResourceGroup(rgCreatable) + .withSku(NamespaceSku.STANDARD) + .create(); + Assertions.assertNotNull(namespace); + Assertions.assertNotNull(namespace.inner()); + + String topicName = generateRandomResourceName("topic1-", 15); + Topic topic = namespace.topics() + .define(topicName) + .create(); + + Assertions.assertNotNull(topic); + Assertions.assertNotNull(topic.inner()); + Assertions.assertNotNull(topic.name()); + Assertions.assertTrue(topic.name().equalsIgnoreCase(topicName)); + + Duration dupDetectionDuration = topic.duplicateMessageDetectionHistoryDuration(); + Assertions.assertNotNull(dupDetectionDuration); + Assertions.assertEquals(10, TimeSpan.fromDuration(dupDetectionDuration).minutes()); + // Default message TTL is TimeSpan.Max, assert parsing + // + Assertions.assertEquals("10675199.02:48:05.4775807", topic.inner().defaultMessageTimeToLive()); + Duration msgTtlDuration = topic.defaultMessageTtlDuration(); + Assertions.assertNotNull(msgTtlDuration); + // Assertions the default ttl TimeSpan("10675199.02:48:05.4775807") parsing + // + TimeSpan timeSpan = TimeSpan.fromDuration(msgTtlDuration); + Assertions.assertEquals(10675199, timeSpan.days()); + Assertions.assertEquals(2, timeSpan.hours()); + Assertions.assertEquals(48, timeSpan.minutes()); + // Assertions the default max size In MB + // + Assertions.assertEquals(1024, topic.maxSizeInMB()); + + PagedIterable topicsInNamespace = namespace.topics().list(); + Assertions.assertNotNull(topicsInNamespace); + Assertions.assertTrue(TestUtilities.getSize(topicsInNamespace) > 0); + Topic foundTopic = null; + for (Topic t : topicsInNamespace) { + if (t.name().equalsIgnoreCase(topic.name())) { + foundTopic = t; + break; + } + } + Assertions.assertNotNull(foundTopic); + foundTopic = foundTopic.update() + .withDefaultMessageTTL(Duration.ofMinutes(20)) + .withDuplicateMessageDetectionHistoryDuration(Duration.ofMinutes(15)) + .withDeleteOnIdleDurationInMinutes(25) + .apply(); + Duration ttlDuration = foundTopic.defaultMessageTtlDuration(); + Assertions.assertNotNull(ttlDuration); + Assertions.assertEquals(20, TimeSpan.fromDuration(ttlDuration).minutes()); + Duration duplicateDetectDuration = foundTopic.duplicateMessageDetectionHistoryDuration(); + Assertions.assertNotNull(duplicateDetectDuration); + Assertions.assertEquals(15, TimeSpan.fromDuration(duplicateDetectDuration).minutes()); + Assertions.assertEquals(25, foundTopic.deleteOnIdleDurationInMinutes()); + // Delete + namespace.topics().deleteByName(foundTopic.name()); + } + + @Test + public void canCreateDeleteTopicWithNamespace() { + Region region = Region.US_EAST; + Creatable rgCreatable = resourceManager.resourceGroups() + .define(rgName) + .withRegion(region); + + String namespaceDNSLabel = generateRandomResourceName("jvsbns", 15); + String topicName = generateRandomResourceName("topic1-", 15); + // Create NS with Topic + // + ServiceBusNamespace namespace = serviceBusManager.namespaces() + .define(namespaceDNSLabel) + .withRegion(region) + .withNewResourceGroup(rgCreatable) + .withSku(NamespaceSku.STANDARD) + .withNewTopic(topicName, 1024) + .create(); + Assertions.assertNotNull(namespace); + Assertions.assertNotNull(namespace.inner()); + // Lookup topic + // + PagedIterable topicsInNamespace = namespace.topics().list(); + Assertions.assertNotNull(topicsInNamespace); + Assertions.assertEquals(1, TestUtilities.getSize(topicsInNamespace)); + Topic foundTopic = null; + for (Topic t : topicsInNamespace) { + if (t.name().equalsIgnoreCase(topicName)) { + foundTopic = t; + break; + } + } + Assertions.assertNotNull(foundTopic); + // Remove Topic + // + namespace.update() + .withoutTopic(topicName) + .apply(); + topicsInNamespace = namespace.topics().list(); + Assertions.assertNotNull(topicsInNamespace); + Assertions.assertEquals(0, TestUtilities.getSize(topicsInNamespace)); + } + + @Test + public void canOperateOnAuthorizationRules() { + Region region = Region.US_EAST; + Creatable rgCreatable = resourceManager.resourceGroups() + .define(rgName) + .withRegion(region); + + String namespaceDNSLabel = generateRandomResourceName("jvsbns", 15); + String queueName = generateRandomResourceName("queue1-", 15); + String topicName = generateRandomResourceName("topic1-", 15); + String nsRuleName = generateRandomResourceName("nsrule1-", 15); + // Create NS with Queue, Topic and authorization rule + // + ServiceBusNamespace namespace = serviceBusManager.namespaces() + .define(namespaceDNSLabel) + .withRegion(region) + .withNewResourceGroup(rgCreatable) + .withSku(NamespaceSku.STANDARD) + .withNewQueue(queueName, 1024) + .withNewTopic(topicName, 1024) + .withNewManageRule(nsRuleName) + .create(); + // Lookup ns authorization rule + // + PagedIterable rulesInNamespace = namespace.authorizationRules().list(); + Assertions.assertNotNull(rulesInNamespace); + Assertions.assertEquals(2, TestUtilities.getSize(rulesInNamespace)); // Default + one explicit + + NamespaceAuthorizationRule foundNsRule = null; + for (NamespaceAuthorizationRule rule : rulesInNamespace) { + if (rule.name().equalsIgnoreCase(nsRuleName)) { + foundNsRule = rule; + break; + } + } + Assertions.assertNotNull(foundNsRule); + AuthorizationKeys nsRuleKeys = foundNsRule.getKeys(); + Assertions.assertNotNull(nsRuleKeys); + Assertions.assertNotNull(nsRuleKeys.inner()); + String primaryKey = nsRuleKeys.primaryKey(); + Assertions.assertNotNull(primaryKey); + Assertions.assertNotNull(nsRuleKeys.secondaryKey()); + Assertions.assertNotNull(nsRuleKeys.primaryConnectionString()); + Assertions.assertNotNull(nsRuleKeys.secondaryConnectionString()); + nsRuleKeys = foundNsRule.regenerateKey(Policykey.PRIMARY_KEY); + if (!isPlaybackMode()) { + Assertions.assertNotEquals(nsRuleKeys.primaryKey(), primaryKey); + } + // Lookup queue & operate on auth rules + // + PagedIterable queuesInNamespace = namespace.queues().list(); + Assertions.assertNotNull(queuesInNamespace); + Assertions.assertEquals(1, TestUtilities.getSize(queuesInNamespace)); + Queue queue = queuesInNamespace.iterator().next(); + Assertions.assertNotNull(queue); + Assertions.assertNotNull(queue.inner()); + + QueueAuthorizationRule qRule = queue.authorizationRules() + .define("rule1") + .withListeningEnabled() + .create(); + Assertions.assertNotNull(qRule); + Assertions.assertNotNull(qRule.rights().contains(AccessRights.LISTEN)); + qRule = qRule.update() + .withManagementEnabled() + .apply(); + Assertions.assertNotNull(qRule.rights().contains(AccessRights.MANAGE)); + PagedIterable rulesInQueue = queue.authorizationRules().list(); + Assertions.assertTrue(TestUtilities.getSize(rulesInQueue) > 0); + boolean foundQRule = false; + for (QueueAuthorizationRule r : rulesInQueue) { + if (r.name().equalsIgnoreCase(qRule.name())) { + foundQRule = true; + break; + } + } + Assertions.assertTrue(foundQRule); + queue.authorizationRules().deleteByName(qRule.name()); + // Lookup topic & operate on auth rules + // + PagedIterable topicsInNamespace = namespace.topics().list(); + Assertions.assertNotNull(topicsInNamespace); + Assertions.assertEquals(1, TestUtilities.getSize(topicsInNamespace)); + Topic topic = topicsInNamespace.iterator().next(); + Assertions.assertNotNull(topic); + Assertions.assertNotNull(topic.inner()); + TopicAuthorizationRule tRule = topic.authorizationRules() + .define("rule2") + .withSendingEnabled() + .create(); + Assertions.assertNotNull(tRule); + Assertions.assertNotNull(tRule.rights().contains(AccessRights.SEND)); + tRule = tRule.update() + .withManagementEnabled() + .apply(); + Assertions.assertNotNull(tRule.rights().contains(AccessRights.MANAGE)); + PagedIterable rulesInTopic = topic.authorizationRules().list(); + Assertions.assertTrue(TestUtilities.getSize(rulesInTopic) > 0); + boolean foundTRule = false; + for (TopicAuthorizationRule r : rulesInTopic) { + if (r.name().equalsIgnoreCase(tRule.name())) { + foundTRule = true; + break; + } + } + Assertions.assertTrue(foundTRule); + topic.authorizationRules().deleteByName(tRule.name()); + } + + @Test + public void canPerformOnNamespaceActions() { + rgName = null; + String namespaceDNSLabel = generateRandomResourceName("jvsbns", 15); + CheckNameAvailabilityResult availabilityResult = serviceBusManager + .namespaces() + .checkNameAvailability(namespaceDNSLabel); + Assertions.assertNotNull(availabilityResult); + if (!availabilityResult.isAvailable()) { + Assertions.assertNotNull(availabilityResult.unavailabilityReason()); + Assertions.assertNotNull(availabilityResult.unavailabilityMessage()); + } + } + + @Test + public void canPerformCRUDOnSubscriptions() { + Region region = Region.US_EAST; + Creatable rgCreatable = resourceManager.resourceGroups() + .define(rgName) + .withRegion(region); + + String namespaceDNSLabel = generateRandomResourceName("jvsbns", 15); + String topicName = generateRandomResourceName("topic1-", 15); + String subscriptionName = generateRandomResourceName("sub1-", 15); + // Create NS with Topic + // + ServiceBusNamespace namespace = serviceBusManager.namespaces() + .define(namespaceDNSLabel) + .withRegion(region) + .withNewResourceGroup(rgCreatable) + .withSku(NamespaceSku.STANDARD) + .withNewTopic(topicName, 1024) + .create(); + // Create Topic subscriptions and list it + // + Topic topic = namespace.topics().getByName(topicName); + ServiceBusSubscription subscription = topic.subscriptions().define(subscriptionName) + .withDefaultMessageTTL(Duration.ofMinutes(20)) + .create(); + Assertions.assertNotNull(subscription); + Assertions.assertNotNull(subscription.inner()); + Assertions.assertEquals(20, TimeSpan.fromDuration(subscription.defaultMessageTtlDuration()).minutes()); + subscription = topic.subscriptions().getByName(subscriptionName); + Assertions.assertNotNull(subscription); + Assertions.assertNotNull(subscription.inner()); + PagedIterable subscriptionsInTopic = topic.subscriptions().list(); + Assertions.assertTrue(TestUtilities.getSize(subscriptionsInTopic) > 0); + boolean foundSubscription = false; + for (ServiceBusSubscription s : subscriptionsInTopic) { + if (s.name().equalsIgnoreCase(subscription.name())) { + foundSubscription = true; + break; + } + } + Assertions.assertTrue(foundSubscription); + topic.subscriptions().deleteByName(subscriptionName); + subscriptionsInTopic = topic.subscriptions().list(); + Assertions.assertTrue(TestUtilities.getSize(subscriptionsInTopic) == 0); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/TimeSpanTests.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/TimeSpanTests.java new file mode 100644 index 0000000000000..a697edb75acc1 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/TimeSpanTests.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.servicebus; + +import com.azure.resourcemanager.servicebus.implementation.TimeSpan; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.time.Duration; + +public class TimeSpanTests { + @Test + public void testTimeSpanFromPeriod() { + Duration duration = Duration.ofDays(366) + .plus(Duration.ofHours(25)) + .plus(Duration.ofMinutes(10)) + .plus(Duration.ofSeconds(70)) + .plus(Duration.ofMillis(1001)); + + TimeSpan timeSpan = new TimeSpan() + .withDays(366) + .withHours(25) + .withMinutes(10) + .withSeconds(70) + .withMilliseconds(1001); + Assertions.assertEquals(duration.toMillis(), timeSpan.toDuration().toMillis()); + + duration = Duration.ofDays(12 * 7 + 366) + .plus(Duration.ofHours(25)) + .plus(Duration.ofMinutes(10)) + .plus(Duration.ofSeconds(70)) + .plus(Duration.ofMillis(1001)); + // Days -> 12 * 7 + 366 + 1 + Assertions.assertEquals("451.01:11:11.0010000", TimeSpan.fromDuration(duration).toString()); + } + + @Test + public void testTimeSpanStringParse() { + TimeSpan timeSpan1 = TimeSpan.parse("366.01:02:00.12345"); + Assertions.assertEquals(366, timeSpan1.days()); + Assertions.assertEquals(1, timeSpan1.hours()); + Assertions.assertEquals(2, timeSpan1.minutes()); + Assertions.assertEquals(0, timeSpan1.seconds()); + Assertions.assertEquals(123, timeSpan1.milliseconds()); + Assertions.assertEquals("366.01:02:00.1230000", timeSpan1.toString()); + + TimeSpan timeSpan2 = TimeSpan.parse("366"); + Assertions.assertEquals(366, timeSpan2.days()); + Assertions.assertEquals(0, timeSpan2.hours()); + Assertions.assertEquals(0, timeSpan2.minutes()); + Assertions.assertEquals(0, timeSpan2.seconds()); + Assertions.assertEquals(0, timeSpan2.milliseconds()); + Assertions.assertEquals("366.00:00:00", timeSpan2.toString()); + + TimeSpan timeSpan3 = TimeSpan.parse("01:02"); + Assertions.assertEquals(0, timeSpan3.days()); + Assertions.assertEquals(1, timeSpan3.hours()); + Assertions.assertEquals(2, timeSpan3.minutes()); + Assertions.assertEquals(0, timeSpan3.seconds()); + Assertions.assertEquals(0, timeSpan3.milliseconds()); + Assertions.assertEquals("01:02:00", timeSpan3.toString()); + + TimeSpan timeSpan4 = TimeSpan.parse("01:02:34"); + Assertions.assertEquals(0, timeSpan4.days()); + Assertions.assertEquals(1, timeSpan4.hours()); + Assertions.assertEquals(2, timeSpan4.minutes()); + Assertions.assertEquals(34, timeSpan4.seconds()); + Assertions.assertEquals(0, timeSpan4.milliseconds()); + Assertions.assertEquals("01:02:34", timeSpan4.toString()); + + TimeSpan timeSpan5 = TimeSpan.parse("01:02:34.001"); + Assertions.assertEquals(0, timeSpan5.days()); + Assertions.assertEquals(1, timeSpan5.hours()); + Assertions.assertEquals(2, timeSpan5.minutes()); + Assertions.assertEquals(34, timeSpan5.seconds()); + Assertions.assertEquals(1, timeSpan5.milliseconds()); + Assertions.assertEquals("01:02:34.0010000", timeSpan5.toString()); + + TimeSpan timeSpan6 = TimeSpan.parse("01:02:34.00011"); + Assertions.assertEquals(0, timeSpan6.days()); + Assertions.assertEquals(1, timeSpan6.hours()); + Assertions.assertEquals(2, timeSpan6.minutes()); + Assertions.assertEquals(34, timeSpan6.seconds()); + Assertions.assertEquals(0, timeSpan6.milliseconds()); + Assertions.assertEquals("01:02:34", timeSpan6.toString()); + + TimeSpan timeSpan7 = TimeSpan.parse("-366.23:1:1.100000"); + Assertions.assertEquals(-366, timeSpan7.days()); + Assertions.assertEquals(-23, timeSpan7.hours()); + Assertions.assertEquals(-1, timeSpan7.minutes()); + Assertions.assertEquals(-1, timeSpan7.seconds()); + Assertions.assertEquals(-100, timeSpan7.milliseconds()); + Assertions.assertEquals("-366.23:01:01.1000000", timeSpan7.toString()); + + Exception exception = null; + try { + TimeSpan.parse("366.24:02:00.12345"); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366.01:66:00.12345"); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366.01:02:77.12345"); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366.01:02:00.12345678"); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366."); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366.01"); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366.01:"); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366.01:02:"); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366.01:02:00."); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse("366.01:02:00.89.00"); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse(""); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + exception = null; + try { + TimeSpan.parse(null); + } catch (Exception ex) { + exception = ex; + } + Assertions.assertNotNull(exception); + + } + + @Test + public void testTimeSpanStringConversion() { + TimeSpan timeSpan = new TimeSpan(); + timeSpan.withDays(0) + .withHours(0) + .withMinutes(0) + .withSeconds(0) + .withMilliseconds(0); + Assertions.assertEquals(timeSpan.toString(), "00:00:00"); + + timeSpan.withDays(1) + .withHours(1) + .withMinutes(1) + .withSeconds(1) + .withMilliseconds(1); + Assertions.assertEquals(timeSpan.toString(), "1.01:01:01.0010000"); + + timeSpan.withDays(1) + .withHours(48) + .withMinutes(0) + .withSeconds(0) + .withMilliseconds(0); + Assertions.assertEquals(timeSpan.toString(), "3.00:00:00"); + + timeSpan.withDays(1) + .withHours(0) + .withMinutes(120) + .withSeconds(0) + .withMilliseconds(0); + Assertions.assertEquals(timeSpan.toString(), "1.02:00:00"); + + timeSpan.withDays(1) + .withHours(0) + .withMinutes(121) + .withSeconds(0) + .withMilliseconds(0); + Assertions.assertEquals(timeSpan.toString(), "1.02:01:00"); + + timeSpan.withDays(1) + .withHours(49) + .withMinutes(121) + .withSeconds(0) + .withMilliseconds(0); + Assertions.assertEquals(timeSpan.toString(), "3.03:01:00"); + + timeSpan.withDays(1) + .withHours(49) + .withMinutes(121) + .withSeconds(59) + .withMilliseconds(0); + Assertions.assertEquals(timeSpan.toString(), "3.03:01:59"); + + timeSpan.withDays(1) + .withHours(49) + .withMinutes(121) + .withSeconds(60) + .withMilliseconds(0); + Assertions.assertEquals(timeSpan.toString(), "3.03:02:00"); + + timeSpan.withDays(1) + .withHours(49) + .withMinutes(121) + .withSeconds(60) + .withMilliseconds(100); + Assertions.assertEquals(timeSpan.toString(), "3.03:02:00.1000000"); + + timeSpan.withDays(1) + .withHours(49) + .withMinutes(121) + .withSeconds(60) + .withMilliseconds(999); + Assertions.assertEquals(timeSpan.toString(), "3.03:02:00.9990000"); + + timeSpan.withDays(1) + .withHours(49) + .withMinutes(121) + .withSeconds(60) + .withMilliseconds(1000); + Assertions.assertEquals(timeSpan.toString(), "3.03:02:01"); + + timeSpan.withDays(1) + .withHours(49) + .withMinutes(121) + .withSeconds(60) + .withMilliseconds(1500); + Assertions.assertEquals(timeSpan.toString(), "3.03:02:01.5000000"); + + timeSpan.withDays(368) + .withHours(49) + .withMinutes(121) + .withSeconds(60) + .withMilliseconds(1500); + Assertions.assertEquals(timeSpan.toString(), "370.03:02:01.5000000"); + + timeSpan.withDays(368) + .withHours(-49) + .withMinutes(121) + .withSeconds(60) + .withMilliseconds(1500); + Assertions.assertEquals(timeSpan.toString(), "366.01:02:01.5000000"); + + timeSpan.withDays(-368) + .withHours(-49) + .withMinutes(121) + .withSeconds(60) + .withMilliseconds(1500); + Assertions.assertEquals(timeSpan.toString(), "-369.22:57:58.5000000"); + + timeSpan.withDays(-368) + .withHours(-49) + .withMinutes(-121) + .withSeconds(60) + .withMilliseconds(1500); + Assertions.assertEquals(timeSpan.toString(), "-370.02:59:58.5000000"); + + timeSpan.withDays(-368) + .withHours(-49) + .withMinutes(-121) + .withSeconds(-60) + .withMilliseconds(1500); + Assertions.assertEquals(timeSpan.toString(), "-370.03:01:58.5000000"); + + timeSpan.withDays(-368) + .withHours(-49) + .withMinutes(-121) + .withSeconds(-60) + .withMilliseconds(-1500); + Assertions.assertEquals(timeSpan.toString(), "-370.03:02:01.5000000"); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCRUDOnSimpleNamespace.json b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCRUDOnSimpleNamespace.json new file mode 100644 index 0000000000000..97683b5974632 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCRUDOnSimpleNamespace.json @@ -0,0 +1,525 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb1170674ea?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f69f0f8c-a916-4e99-b22f-cd197d5a95c5", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Wed, 02 Sep 2020 02:44:08 GMT", + "x-ms-correlation-request-id" : "2cfbc233-3ffb-4c20-b272-6bc825a5df22", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024409Z:2cfbc233-3ffb-4c20-b272-6bc825a5df22", + "Expires" : "-1", + "Content-Length" : "227", + "x-ms-request-id" : "2cfbc233-3ffb-4c20-b272-6bc825a5df22", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea\",\"name\":\"javasb1170674ea\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "016fdd86-267b-434c-a9cc-56431f0e4d76", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:17 GMT", + "x-ms-correlation-request-id" : "0fe742fb-b059-4a52-9e42-0e29174ae9a1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024417Z:0fe742fb-b059-4a52-9e42-0e29174ae9a1", + "Expires" : "-1", + "Content-Length" : "469", + "x-ms-request-id" : "246de7b1-685a-436d-a951-b4f5e284275e_M4SN1_M4SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7\",\"name\":\"jvsbns05220c7\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns05220c7\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":1}}", + "x-ms-client-request-id" : "016fdd86-267b-434c-a9cc-56431f0e4d76", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ae6a860-97d9-4582-9f2a-9d23cdf2be01" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:47 GMT", + "x-ms-correlation-request-id" : "b44b07a6-f201-469e-a9d5-7ec0c6891e4a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024447Z:b44b07a6-f201-469e-a9d5-7ec0c6891e4a", + "Expires" : "-1", + "Content-Length" : "666", + "x-ms-request-id" : "843faa34-bfb8-449a-82fd-a7b965e0a858_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7\",\"name\":\"jvsbns05220c7\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns05220c7\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T02:44:14.98Z\",\"serviceBusEndpoint\":\"https://jvsbns05220c7.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:14.98Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}", + "x-ms-client-request-id" : "1ae6a860-97d9-4582-9f2a-9d23cdf2be01", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c2a2dee4-c3e9-4ec0-901b-5a082aa3be95" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "b946b03d-3e7e-4c75-8288-3ef22ca41349", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024517Z:b946b03d-3e7e-4c75-8288-3ef22ca41349", + "Expires" : "-1", + "Content-Length" : "668", + "x-ms-request-id" : "e534963a-7cf6-49ae-b3aa-f6e877bfe3f5_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7\",\"name\":\"jvsbns05220c7\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns05220c7\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.98Z\",\"serviceBusEndpoint\":\"https://jvsbns05220c7.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:57.593Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}", + "x-ms-client-request-id" : "c2a2dee4-c3e9-4ec0-901b-5a082aa3be95", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "864a173b-6df9-4ee4-9cf3-336aca11cf84", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "e37d8617-f690-49f8-a0b4-f19fde198b90", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024518Z:e37d8617-f690-49f8-a0b4-f19fde198b90", + "Expires" : "-1", + "Content-Length" : "668", + "x-ms-request-id" : "fdc5041c-8609-4c76-9be4-a6f5dbafab53_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7\",\"name\":\"jvsbns05220c7\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns05220c7\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.98Z\",\"serviceBusEndpoint\":\"https://jvsbns05220c7.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:57.593Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}", + "x-ms-client-request-id" : "864a173b-6df9-4ee4-9cf3-336aca11cf84", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "19ad91c9-723f-414c-8fae-6dbb1ed5fe86", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "7aa6133a-54cc-4052-a2c2-e90dcea8140a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024518Z:7aa6133a-54cc-4052-a2c2-e90dcea8140a", + "Expires" : "-1", + "Content-Length" : "696", + "x-ms-request-id" : "fc7d0ccb-4358-4a52-a2dd-0c9601fb8d81_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7\",\"name\":\"jvsbns05220c7\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns05220c7\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.98Z\",\"serviceBusEndpoint\":\"https://jvsbns05220c7.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:57.593Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}],\"nextLink\":null}", + "x-ms-client-request-id" : "19ad91c9-723f-414c-8fae-6dbb1ed5fe86", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b364548b-c79e-47bf-a458-ba7c84dc8692", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:18 GMT", + "x-ms-correlation-request-id" : "760968b5-cc38-4bf2-b89d-7f0174ab05d2", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024518Z:760968b5-cc38-4bf2-b89d-7f0174ab05d2", + "Expires" : "-1", + "Content-Length" : "696", + "x-ms-request-id" : "612cb530-15c9-4d99-a119-bd689971f657_M0SN1_M0SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7\",\"name\":\"jvsbns05220c7\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns05220c7\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.98Z\",\"serviceBusEndpoint\":\"https://jvsbns05220c7.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:57.593Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":1}}],\"nextLink\":null}", + "x-ms-client-request-id" : "b364548b-c79e-47bf-a458-ba7c84dc8692", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7/queues?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e841cac-44f4-475e-82f9-a7839ea2ee4b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:19 GMT", + "x-ms-correlation-request-id" : "63f380a6-eae4-4117-bd49-756a465fe713", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024519Z:63f380a6-eae4-4117-bd49-756a465fe713", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "d281c5c4-e9e3-480b-ba58-1b3f771adbad_M3CH3_M3CH3", + "Body" : "{\"value\":[],\"nextLink\":null}", + "x-ms-client-request-id" : "2e841cac-44f4-475e-82f9-a7839ea2ee4b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7/topics?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "caa3a837-234c-4572-bcee-5d66ca062be0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:19 GMT", + "x-ms-correlation-request-id" : "2cb4a32a-761f-4b52-952d-af28d3ebe5d3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024520Z:2cb4a32a-761f-4b52-952d-af28d3ebe5d3", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "211403ec-c179-45f9-899a-9e583ad4864d_M7CH3_M7CH3", + "Body" : "{\"value\":[],\"nextLink\":null}", + "x-ms-client-request-id" : "caa3a837-234c-4572-bcee-5d66ca062be0", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7/AuthorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e9906e3f-cb10-4c3b-83db-f03737fe5f6d", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:22 GMT", + "x-ms-correlation-request-id" : "4b6bc31a-644b-417f-a2e1-c4118f48651b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024523Z:4b6bc31a-644b-417f-a2e1-c4118f48651b", + "Expires" : "-1", + "Content-Length" : "394", + "x-ms-request-id" : "2ed49b80-3c06-4e4d-b44e-deb797c74fa8_M7CH3_M7CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "e9906e3f-cb10-4c3b-83db-f03737fe5f6d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7/AuthorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d1799b4-1dec-4bdc-b38b-019965fb9613", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:25 GMT", + "x-ms-correlation-request-id" : "cf4452a0-2d38-41dc-8b83-303efebff602", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024525Z:cf4452a0-2d38-41dc-8b83-303efebff602", + "Expires" : "-1", + "Content-Length" : "394", + "x-ms-request-id" : "99ed9601-76db-4ff6-b233-c86ca4de7e83_M0CH3_M0CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "2d1799b4-1dec-4bdc-b38b-019965fb9613", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "08c418cc-ae66-4107-ba65-05bcc42cd564", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:36 GMT", + "x-ms-correlation-request-id" : "78dcb04f-672e-4772-929a-80fddf6f646d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024536Z:78dcb04f-672e-4772-929a-80fddf6f646d", + "Expires" : "-1", + "Content-Length" : "474", + "x-ms-request-id" : "1800bf02-6c22-446c-bc53-e106221571dd_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7\",\"name\":\"jvsbns05220c7\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns05220c7\",\"enabled\":true,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "08c418cc-ae66-4107-ba65-05bcc42cd564", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "12c4088b-5fb7-4e1d-a0c8-3d9f4ddf583c" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:07 GMT", + "x-ms-correlation-request-id" : "19b68af7-5cd7-4944-894f-d07ed5485e03", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024607Z:19b68af7-5cd7-4944-894f-d07ed5485e03", + "Expires" : "-1", + "Content-Length" : "673", + "x-ms-request-id" : "26916ae1-d838-40c3-9b5b-6402a748ebc1_M5CH3_M5CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7\",\"name\":\"jvsbns05220c7\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns05220c7\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.98Z\",\"serviceBusEndpoint\":\"https://jvsbns05220c7.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:45:32.68Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "12c4088b-5fb7-4e1d-a0c8-3d9f4ddf583c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b070cee-0a45-4ae5-b96b-2682224caa89", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14996", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:08 GMT", + "x-ms-correlation-request-id" : "1c719c16-b11d-4310-819c-078d52f81fd3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024608Z:1c719c16-b11d-4310-819c-078d52f81fd3", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "1e2fb14a-1b5c-4104-a10c-1b747f5106d5_M5CH3_M5CH3", + "x-ms-client-request-id" : "3b070cee-0a45-4ae5-b96b-2682224caa89", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7/operationresults/jvsbns05220c7?api-version=2015-08-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb1170674ea/providers/Microsoft.ServiceBus/namespaces/jvsbns05220c7/operationresults/jvsbns05220c7?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "023c17ef-307c-4d05-8871-70a6a1132a1a" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11975", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:38 GMT", + "x-ms-correlation-request-id" : "4da62d34-ef63-41b1-b4b3-2c7823fa9e7e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024638Z:4da62d34-ef63-41b1-b4b3-2c7823fa9e7e", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "d6dfbdf0-d1c8-47a7-80e4-0f5afe8ab091_M6SN1_M6SN1", + "x-ms-client-request-id" : "023c17ef-307c-4d05-8871-70a6a1132a1a" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb1170674ea?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d14de1aa-3732-475c-ab76-cd7456327550", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:42 GMT", + "x-ms-correlation-request-id" : "09b32726-9947-43fc-ac71-d8f15838061f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024642Z:09b32726-9947-43fc-ac71-d8f15838061f", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "09b32726-9947-43fc-ac71-d8f15838061f", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTcwNjc0RUEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTcwNjc0RUEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "86607204-157d-4f10-80ef-b2ba7bb4471a" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:57 GMT", + "x-ms-correlation-request-id" : "4812a394-7d8c-400d-b815-7795503dc48b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024658Z:4812a394-7d8c-400d-b815-7795503dc48b", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "4812a394-7d8c-400d-b815-7795503dc48b", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTcwNjc0RUEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTcwNjc0RUEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c14ccea-5a09-4c8f-b96e-e6aab920a3ca" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:13 GMT", + "x-ms-correlation-request-id" : "4926f402-55ed-40c0-bd6a-443f5e6eb08a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024713Z:4926f402-55ed-40c0-bd6a-443f5e6eb08a", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "4926f402-55ed-40c0-bd6a-443f5e6eb08a", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTcwNjc0RUEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTcwNjc0RUEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d817e2b-52f1-40f4-ac88-77fbf78a3bd0" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:47:28 GMT", + "x-ms-correlation-request-id" : "8d2c737c-819a-4f27-a373-83b6cacd3e49", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024729Z:8d2c737c-819a-4f27-a373-83b6cacd3e49", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "8d2c737c-819a-4f27-a373-83b6cacd3e49" + }, + "Exception" : null + } ], + "variables" : [ "javasb1170674ea", "jvsbns05220c7" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateDeleteQueueWithNamespace.json b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateDeleteQueueWithNamespace.json new file mode 100644 index 0000000000000..9a91bcd67a311 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateDeleteQueueWithNamespace.json @@ -0,0 +1,506 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb5472199d1?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8f6bc094-104d-463d-9441-9888453e46b3", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Wed, 02 Sep 2020 02:44:06 GMT", + "x-ms-correlation-request-id" : "45c7736e-f077-472b-b784-acb2e4284f86", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024407Z:45c7736e-f077-472b-b784-acb2e4284f86", + "Expires" : "-1", + "Content-Length" : "227", + "x-ms-request-id" : "45c7736e-f077-472b-b784-acb2e4284f86", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1\",\"name\":\"javasb5472199d1\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f17f6516-5f48-401d-993d-503a0ded4e72", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:16 GMT", + "x-ms-correlation-request-id" : "773906a7-f4dc-42fc-8fd3-ae71ca039d2b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024416Z:773906a7-f4dc-42fc-8fd3-ae71ca039d2b", + "Expires" : "-1", + "Content-Length" : "475", + "x-ms-request-id" : "74437b68-f168-410a-bf03-f87b0c65c9c6_M4CH3_M4CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc\",\"name\":\"jvsbns03993bc\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns03993bc\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "f17f6516-5f48-401d-993d-503a0ded4e72", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "407fa871-79da-4f49-a6b2-001c1c8d6005" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:46 GMT", + "x-ms-correlation-request-id" : "75eb1914-9859-444d-870c-687a92e21856", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024446Z:75eb1914-9859-444d-870c-687a92e21856", + "Expires" : "-1", + "Content-Length" : "670", + "x-ms-request-id" : "37742dc4-348f-405a-b7d6-50fd26d48f54_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc\",\"name\":\"jvsbns03993bc\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns03993bc\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T02:44:14.2Z\",\"serviceBusEndpoint\":\"https://jvsbns03993bc.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:14.2Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "407fa871-79da-4f49-a6b2-001c1c8d6005", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8109f44-b592-457d-ad3f-a4b24b27553d" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "00808cd2-db6c-4ca0-911e-d6c20ab9c9a0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024518Z:00808cd2-db6c-4ca0-911e-d6c20ab9c9a0", + "Expires" : "-1", + "Content-Length" : "673", + "x-ms-request-id" : "0b79e9b2-1ec4-4489-962a-331c91c312b6_M0SN1_M0SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc\",\"name\":\"jvsbns03993bc\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns03993bc\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.2Z\",\"serviceBusEndpoint\":\"https://jvsbns03993bc.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:57.567Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "c8109f44-b592-457d-ad3f-a4b24b27553d", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc/queues/queue1-21070e?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "783632b4-458e-4a68-965f-21a6dd6a9fc9", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:20 GMT", + "x-ms-correlation-request-id" : "3424388a-ecec-4b9a-9168-f879da6aeb93", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024520Z:3424388a-ecec-4b9a-9168-f879da6aeb93", + "Expires" : "-1", + "Content-Length" : "924", + "x-ms-request-id" : "f6e01b9f-e6c9-47a8-bacc-fea89b3bb30e_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc/queues/queue1-21070e\",\"name\":\"queue1-21070e\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-21070e\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:19.757Z\",\"updatedAt\":\"2020-09-02T02:45:19.82Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "783632b4-458e-4a68-965f-21a6dd6a9fc9", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc/queues?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f4863a76-b304-4327-9ee9-6b536c4c9abd", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:21 GMT", + "x-ms-correlation-request-id" : "7c04a840-29d0-4855-ab94-9d8f12c259e0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024522Z:7c04a840-29d0-4855-ab94-9d8f12c259e0", + "Expires" : "-1", + "Content-Length" : "1141", + "x-ms-request-id" : "1f445dd3-3e6e-4ac7-859c-aba53e57cadd_M10CH3_M10CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc/queues/queue1-21070e\",\"name\":\"queue1-21070e\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-21070e\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:19.757Z\",\"updatedAt\":\"2020-09-02T02:45:19.82Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "f4863a76-b304-4327-9ee9-6b536c4c9abd", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc/queues?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "94bd2bb3-a376-45ca-b8fc-6e520911764c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:22 GMT", + "x-ms-correlation-request-id" : "48c1c1ec-67ce-4744-ab19-8ff68235e480", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024523Z:48c1c1ec-67ce-4744-ab19-8ff68235e480", + "Expires" : "-1", + "Content-Length" : "1141", + "x-ms-request-id" : "eb1a1e9b-852a-48a6-a990-3d375afbfba2_M7SN1_M7SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc/queues/queue1-21070e\",\"name\":\"queue1-21070e\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-21070e\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:19.757Z\",\"updatedAt\":\"2020-09-02T02:45:19.82Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "94bd2bb3-a376-45ca-b8fc-6e520911764c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "00d8f8b3-ccfe-4564-8b90-885878818252", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:35 GMT", + "x-ms-correlation-request-id" : "33f5295f-a6b2-4170-88a7-a9040cea1451", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024535Z:33f5295f-a6b2-4170-88a7-a9040cea1451", + "Expires" : "-1", + "Content-Length" : "487", + "x-ms-request-id" : "dcff2be1-4624-4c60-b644-f03df2042b5f_M9CH3_M9CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc\",\"name\":\"jvsbns03993bc\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns03993bc\",\"enabled\":true,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "00d8f8b3-ccfe-4564-8b90-885878818252", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ed2d3d8-6480-4282-9807-7df1c9ed938e" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:06 GMT", + "x-ms-correlation-request-id" : "de62e866-88d4-42ba-84dd-c6c422155bce", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024606Z:de62e866-88d4-42ba-84dd-c6c422155bce", + "Expires" : "-1", + "Content-Length" : "672", + "x-ms-request-id" : "06640aad-035c-48dc-90f0-263268ae8e7d_M9CH3_M9CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc\",\"name\":\"jvsbns03993bc\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns03993bc\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.2Z\",\"serviceBusEndpoint\":\"https://jvsbns03993bc.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:45:32.22Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "3ed2d3d8-6480-4282-9807-7df1c9ed938e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc/queues/queue1-21070e?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1c70faf-37fb-430f-a614-dfdcced25e71", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:07 GMT", + "x-ms-correlation-request-id" : "13a9914c-d2fa-4f29-9d4d-1c4ff38a49b8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024607Z:13a9914c-d2fa-4f29-9d4d-1c4ff38a49b8", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "13a9914c-d2fa-4f29-9d4d-1c4ff38a49b8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb5472199d1/providers/Microsoft.ServiceBus/namespaces/jvsbns03993bc/queues?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cf820782-3808-4aa4-9218-16c66a28c07f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:07 GMT", + "x-ms-correlation-request-id" : "17db295d-9bac-4a23-b853-f6e32b696487", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024608Z:17db295d-9bac-4a23-b853-f6e32b696487", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "820bf7d8-a7b9-4519-a2d9-d1c2237d3bb6_M3CH3_M3CH3", + "Body" : "{\"value\":[],\"nextLink\":null}", + "x-ms-client-request-id" : "cf820782-3808-4aa4-9218-16c66a28c07f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb5472199d1?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ab84542-c8d7-492a-802d-2fbef5092b0d", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:09 GMT", + "x-ms-correlation-request-id" : "0fb64266-4995-4395-b391-94cd3c51876d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024610Z:0fb64266-4995-4395-b391-94cd3c51876d", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "0fb64266-4995-4395-b391-94cd3c51876d", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7c4b11f-1a2d-401b-b838-3c19edda0902" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:25 GMT", + "x-ms-correlation-request-id" : "57d5f349-41f1-45ae-8439-630e0a933d43", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024625Z:57d5f349-41f1-45ae-8439-630e0a933d43", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "57d5f349-41f1-45ae-8439-630e0a933d43", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5209a222-cb5e-47b9-a237-c7bd0ceea1fc" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:40 GMT", + "x-ms-correlation-request-id" : "6a349e67-225a-4549-853b-28a5e82c0553", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024641Z:6a349e67-225a-4549-853b-28a5e82c0553", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "6a349e67-225a-4549-853b-28a5e82c0553", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c5f1ad42-e554-4000-ba8d-1628955513a7" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:55 GMT", + "x-ms-correlation-request-id" : "f2b10d42-2fde-4878-8b0a-a13e9867be8b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024656Z:f2b10d42-2fde-4878-8b0a-a13e9867be8b", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "f2b10d42-2fde-4878-8b0a-a13e9867be8b", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf435523-268e-420e-9b8a-7cbed77125a5" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11973", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:11 GMT", + "x-ms-correlation-request-id" : "32317a68-8473-4ef8-b184-454a64c80803", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024712Z:32317a68-8473-4ef8-b184-454a64c80803", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "32317a68-8473-4ef8-b184-454a64c80803", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f9f3344-a94d-43a4-8b41-0425fa96e56f" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:27 GMT", + "x-ms-correlation-request-id" : "54cac392-85b7-4049-8893-70a981a4d110", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024727Z:54cac392-85b7-4049-8893-70a981a4d110", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "54cac392-85b7-4049-8893-70a981a4d110", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ad8199b-af1a-4a94-8b6e-5666aed95f61" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:42 GMT", + "x-ms-correlation-request-id" : "6d78c9a8-f49c-4ac1-b982-8ef451658d35", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024743Z:6d78c9a8-f49c-4ac1-b982-8ef451658d35", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "6d78c9a8-f49c-4ac1-b982-8ef451658d35", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I1NDcyMTk5RDEtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5fc05fac-2c70-4e7b-b4d3-370472cb2c28" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11973", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:47:58 GMT", + "x-ms-correlation-request-id" : "5a3f363e-f3f4-437e-b85f-c5ed990069ea", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024758Z:5a3f363e-f3f4-437e-b85f-c5ed990069ea", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "5a3f363e-f3f4-437e-b85f-c5ed990069ea" + }, + "Exception" : null + } ], + "variables" : [ "javasb5472199d1", "jvsbns03993bc", "queue1-21070e" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateDeleteTopicWithNamespace.json b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateDeleteTopicWithNamespace.json new file mode 100644 index 0000000000000..e1e4e30507bd2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateDeleteTopicWithNamespace.json @@ -0,0 +1,506 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb291664e74?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fdf659b1-bacc-4b41-8b2f-16693009c3b7", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Wed, 02 Sep 2020 02:44:08 GMT", + "x-ms-correlation-request-id" : "7e12c784-c37b-4249-b153-aecb1080786f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024408Z:7e12c784-c37b-4249-b153-aecb1080786f", + "Expires" : "-1", + "Content-Length" : "227", + "x-ms-request-id" : "7e12c784-c37b-4249-b153-aecb1080786f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74\",\"name\":\"javasb291664e74\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9209d0a6-d7ac-478e-973e-7c3cdc62a190", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:15 GMT", + "x-ms-correlation-request-id" : "794dc004-624d-4b42-907c-733bf43fea4f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024416Z:794dc004-624d-4b42-907c-733bf43fea4f", + "Expires" : "-1", + "Content-Length" : "475", + "x-ms-request-id" : "b8ae250a-e30b-4e22-8ae7-94c2b220e116_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928\",\"name\":\"jvsbns2637928\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns2637928\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "9209d0a6-d7ac-478e-973e-7c3cdc62a190", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "af69101c-e22c-4564-a838-6ea19d58ac31" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:47 GMT", + "x-ms-correlation-request-id" : "5ae3f76f-f0f6-47de-9a46-7055ab2bec54", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024447Z:5ae3f76f-f0f6-47de-9a46-7055ab2bec54", + "Expires" : "-1", + "Content-Length" : "674", + "x-ms-request-id" : "3be5a7ad-8e9f-4ccd-b4cc-71508fb1c5f8_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928\",\"name\":\"jvsbns2637928\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns2637928\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T02:44:14.627Z\",\"serviceBusEndpoint\":\"https://jvsbns2637928.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:14.627Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "af69101c-e22c-4564-a838-6ea19d58ac31", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "37179496-2f19-48cc-8ab7-9c22ab193b0f" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "1743f7fb-006c-4e99-b17f-18bca9274f58", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024518Z:1743f7fb-006c-4e99-b17f-18bca9274f58", + "Expires" : "-1", + "Content-Length" : "674", + "x-ms-request-id" : "868744b7-2e86-4644-b6a6-29a139f38517_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928\",\"name\":\"jvsbns2637928\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns2637928\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.627Z\",\"serviceBusEndpoint\":\"https://jvsbns2637928.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:57.01Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "37179496-2f19-48cc-8ab7-9c22ab193b0f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928/topics/topic1-314407?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4323fad-53ae-4fc1-ac5e-ddbaccc10e5a", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:19 GMT", + "x-ms-correlation-request-id" : "db7b2fa0-dad7-4050-bf14-1bf8ba1194d3", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024520Z:db7b2fa0-dad7-4050-bf14-1bf8ba1194d3", + "Expires" : "-1", + "Content-Length" : "875", + "x-ms-request-id" : "b78adb49-7a86-4c09-8d03-1dfc8d5903cb_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928/topics/topic1-314407\",\"name\":\"topic1-314407\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-314407\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:19.857Z\",\"updatedAt\":\"2020-09-02T02:45:19.917Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "d4323fad-53ae-4fc1-ac5e-ddbaccc10e5a", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928/topics?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1b992af-b15c-4e3c-af47-e405286d26b5", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:20 GMT", + "x-ms-correlation-request-id" : "26546831-52e9-481d-8211-b68d49851f1a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024521Z:26546831-52e9-481d-8211-b68d49851f1a", + "Expires" : "-1", + "Content-Length" : "1122", + "x-ms-request-id" : "19adc021-d846-43de-b0ab-b18ab564a96e_M1CH3_M1CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928/topics/topic1-314407\",\"name\":\"topic1-314407\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-314407\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:19.8969944Z\",\"updatedAt\":\"2020-09-02T02:45:19.8969944Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "b1b992af-b15c-4e3c-af47-e405286d26b5", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928/topics?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6c4d3088-5423-4119-8e6c-ccf4655d95d2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:21 GMT", + "x-ms-correlation-request-id" : "c3f77822-b326-49cc-8052-182a48d96fef", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024522Z:c3f77822-b326-49cc-8052-182a48d96fef", + "Expires" : "-1", + "Content-Length" : "1122", + "x-ms-request-id" : "ae4e8af6-784e-462e-ba12-691ade69d463_M7CH3_M7CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928/topics/topic1-314407\",\"name\":\"topic1-314407\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-314407\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:19.8969944Z\",\"updatedAt\":\"2020-09-02T02:45:19.8969944Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "6c4d3088-5423-4119-8e6c-ccf4655d95d2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e40318e9-34fd-4fe5-ba11-c678a18f73f7", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:33 GMT", + "x-ms-correlation-request-id" : "588b4bc7-10fc-49d8-ba57-b85ed965d8a0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024534Z:588b4bc7-10fc-49d8-ba57-b85ed965d8a0", + "Expires" : "-1", + "Content-Length" : "487", + "x-ms-request-id" : "99f20ff9-f7e9-4765-ac79-cf158abff724_M7CH3_M7CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928\",\"name\":\"jvsbns2637928\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns2637928\",\"enabled\":true,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "e40318e9-34fd-4fe5-ba11-c678a18f73f7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a541f2ca-6468-49dc-93ca-2d6446ba0f0c" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:04 GMT", + "x-ms-correlation-request-id" : "00deb39e-c5cf-4317-88a3-70783aeea6d6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024604Z:00deb39e-c5cf-4317-88a3-70783aeea6d6", + "Expires" : "-1", + "Content-Length" : "675", + "x-ms-request-id" : "c2eb0d8d-11b1-4e36-91a9-2a697a5316c2_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928\",\"name\":\"jvsbns2637928\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns2637928\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.627Z\",\"serviceBusEndpoint\":\"https://jvsbns2637928.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:45:30.503Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "a541f2ca-6468-49dc-93ca-2d6446ba0f0c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928/topics/topic1-314407?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a58cfa4-d763-4dc9-bdcd-2cee7c0b15b5", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14995", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:06 GMT", + "x-ms-correlation-request-id" : "114f0b2d-7347-467e-ba2d-78c74262cd37", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024606Z:114f0b2d-7347-467e-ba2d-78c74262cd37", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "114f0b2d-7347-467e-ba2d-78c74262cd37" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb291664e74/providers/Microsoft.ServiceBus/namespaces/jvsbns2637928/topics?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "84ceb453-1ac8-47c8-98e3-70446f496cb6", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:07 GMT", + "x-ms-correlation-request-id" : "f36ae425-b0b0-4813-9cc6-863670118fa7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024607Z:f36ae425-b0b0-4813-9cc6-863670118fa7", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "abc000b8-4bd0-4539-8bcf-d15617629457_M7CH3_M7CH3", + "Body" : "{\"value\":[],\"nextLink\":null}", + "x-ms-client-request-id" : "84ceb453-1ac8-47c8-98e3-70446f496cb6", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb291664e74?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "128116f9-c782-40de-8174-342cbce0f2fb", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14994", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:11 GMT", + "x-ms-correlation-request-id" : "8309f13b-7a7e-4ece-8618-2819ec587f71", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024612Z:8309f13b-7a7e-4ece-8618-2819ec587f71", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "8309f13b-7a7e-4ece-8618-2819ec587f71", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c8fa0f5-4156-4a88-ae43-1222eb93fdaa" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:27 GMT", + "x-ms-correlation-request-id" : "3d60156d-8722-405e-ad60-32c55f7fcc75", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024627Z:3d60156d-8722-405e-ad60-32c55f7fcc75", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "3d60156d-8722-405e-ad60-32c55f7fcc75", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "58da0a06-5032-4cd6-8d24-f4267a0ec8e7" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:42 GMT", + "x-ms-correlation-request-id" : "6f59bedf-1a8b-4d46-a85a-a9c126e64448", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024643Z:6f59bedf-1a8b-4d46-a85a-a9c126e64448", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "6f59bedf-1a8b-4d46-a85a-a9c126e64448", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "667c85c4-2ef7-45f8-9999-87d8b10434c7" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:58 GMT", + "x-ms-correlation-request-id" : "3e31d9e1-613b-4684-9bc6-d80fdee4bbbf", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024658Z:3e31d9e1-613b-4684-9bc6-d80fdee4bbbf", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "3e31d9e1-613b-4684-9bc6-d80fdee4bbbf", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f5c58bd-c21f-4394-a7e8-5c12cd7e93f9" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:13 GMT", + "x-ms-correlation-request-id" : "b5a15e80-ad5e-4355-8f6f-0b28daf93eef", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024714Z:b5a15e80-ad5e-4355-8f6f-0b28daf93eef", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "b5a15e80-ad5e-4355-8f6f-0b28daf93eef", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "74cc8fa6-0caf-4bb3-9355-76c5310bc9ed" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11972", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:29 GMT", + "x-ms-correlation-request-id" : "91dda435-3958-420b-95ca-4d3375a07f6c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024730Z:91dda435-3958-420b-95ca-4d3375a07f6c", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "91dda435-3958-420b-95ca-4d3375a07f6c", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb6d8aa3-3509-416b-8c5c-5e917eeb4a2c" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:45 GMT", + "x-ms-correlation-request-id" : "f0234d7a-301a-4390-83f2-05f6e448e4cb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024745Z:f0234d7a-301a-4390-83f2-05f6e448e4cb", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "f0234d7a-301a-4390-83f2-05f6e448e4cb", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyOTE2NjRFNzQtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4a3f745-420b-457b-be11-c41c90862bad" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:48:00 GMT", + "x-ms-correlation-request-id" : "a9622076-689b-47e6-94b2-4f9eb70cb15f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024801Z:a9622076-689b-47e6-94b2-4f9eb70cb15f", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a9622076-689b-47e6-94b2-4f9eb70cb15f" + }, + "Exception" : null + } ], + "variables" : [ "javasb291664e74", "jvsbns2637928", "topic1-314407" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateNamespaceThenCRUDOnQueue.json b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateNamespaceThenCRUDOnQueue.json new file mode 100644 index 0000000000000..4dc91e29ea400 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateNamespaceThenCRUDOnQueue.json @@ -0,0 +1,425 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb11273e44c?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2a3d56f-8ef1-476b-8276-0bd495111a00", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Wed, 02 Sep 2020 02:44:08 GMT", + "x-ms-correlation-request-id" : "6182eed3-b061-4090-ab90-1975ee205894", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024408Z:6182eed3-b061-4090-ab90-1975ee205894", + "Expires" : "-1", + "Content-Length" : "227", + "x-ms-request-id" : "6182eed3-b061-4090-ab90-1975ee205894", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c\",\"name\":\"javasb11273e44c\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "11cb1564-bc9a-449e-8938-8274ce60d950", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:18 GMT", + "x-ms-correlation-request-id" : "2f736238-103d-45e7-84c4-a2ac6aaf89ea", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024418Z:2f736238-103d-45e7-84c4-a2ac6aaf89ea", + "Expires" : "-1", + "Content-Length" : "475", + "x-ms-request-id" : "ca003c9a-8888-49a9-b842-07e744f152ec_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503\",\"name\":\"jvsbns6158503\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns6158503\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "11cb1564-bc9a-449e-8938-8274ce60d950", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a58ac829-b8cf-41e8-b137-997fca295747" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:49 GMT", + "x-ms-correlation-request-id" : "b7b9c39e-c490-45a7-843c-baa1d0120153", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024449Z:b7b9c39e-c490-45a7-843c-baa1d0120153", + "Expires" : "-1", + "Content-Length" : "674", + "x-ms-request-id" : "8d69d488-e5f3-4ad2-bc6f-763653224c06_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503\",\"name\":\"jvsbns6158503\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns6158503\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T02:44:16.183Z\",\"serviceBusEndpoint\":\"https://jvsbns6158503.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:16.183Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "a58ac829-b8cf-41e8-b137-997fca295747", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0e8724c6-64dc-4842-a6ec-ae3f13cfe63c" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:19 GMT", + "x-ms-correlation-request-id" : "f9ebb30d-d9c8-447e-aad4-47ca32eed906", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024520Z:f9ebb30d-d9c8-447e-aad4-47ca32eed906", + "Expires" : "-1", + "Content-Length" : "675", + "x-ms-request-id" : "17b71c40-6bf0-482e-9d50-80a82cf894bb_M0SN1_M0SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503\",\"name\":\"jvsbns6158503\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns6158503\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:16.183Z\",\"serviceBusEndpoint\":\"https://jvsbns6158503.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:58.933Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "0e8724c6-64dc-4842-a6ec-ae3f13cfe63c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues/queue1-907091?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "98d5f299-f312-4ed2-b88f-7b19db3ba068", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:24 GMT", + "x-ms-correlation-request-id" : "ca3b5430-576b-4e6d-b891-4e078f1362b1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024524Z:ca3b5430-576b-4e6d-b891-4e078f1362b1", + "Expires" : "-1", + "Content-Length" : "924", + "x-ms-request-id" : "fec2148b-0196-414e-b984-f051a97c54e6_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues/queue1-907091\",\"name\":\"queue1-907091\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-907091\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:21.627Z\",\"updatedAt\":\"2020-09-02T02:45:24.07Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "98d5f299-f312-4ed2-b88f-7b19db3ba068", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce4746dc-b1ce-411e-bdfb-198145334bf7", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:25 GMT", + "x-ms-correlation-request-id" : "6f277027-1618-428e-9599-545d7f871353", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024526Z:6f277027-1618-428e-9599-545d7f871353", + "Expires" : "-1", + "Content-Length" : "1141", + "x-ms-request-id" : "21c4cca0-4ee4-496b-91bc-ceca918dc894_M6SN1_M6SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues/queue1-907091\",\"name\":\"queue1-907091\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-907091\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:21.627Z\",\"updatedAt\":\"2020-09-02T02:45:24.07Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "ce4746dc-b1ce-411e-bdfb-198145334bf7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6783e86-d904-4e13-a7f5-94ce8ddacac9", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:28 GMT", + "x-ms-correlation-request-id" : "732a1aea-6c80-4b81-ae2f-09224afac425", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024528Z:732a1aea-6c80-4b81-ae2f-09224afac425", + "Expires" : "-1", + "Content-Length" : "1141", + "x-ms-request-id" : "92263dbe-c67b-4562-b740-3fc039e0da6b_M8CH3_M8CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues/queue1-907091\",\"name\":\"queue1-907091\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-907091\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:21.627Z\",\"updatedAt\":\"2020-09-02T02:45:24.07Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "c6783e86-d904-4e13-a7f5-94ce8ddacac9", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues/queue1-907091?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a140de79-f761-4873-8790-2095b5afd90f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:28 GMT", + "x-ms-correlation-request-id" : "6bd256f0-eef8-48ca-9282-9133363e6bf7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024529Z:6bd256f0-eef8-48ca-9282-9133363e6bf7", + "Expires" : "-1", + "Content-Length" : "796", + "x-ms-request-id" : "19e1ecc5-983b-4d4f-b228-a68ec1195b73_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues/queue1-907091\",\"name\":\"queue1-907091\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-907091\",\"lockDuration\":\"00:02:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"00:20:00\",\"deadLetteringOnMessageExpiration\":true,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":25,\"enableBatchedOperations\":true,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "a140de79-f761-4873-8790-2095b5afd90f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb11273e44c/providers/Microsoft.ServiceBus/namespaces/jvsbns6158503/queues/queue1-907091?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2b0f3541-b086-4406-b076-c57161e15463", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:30 GMT", + "x-ms-correlation-request-id" : "32f41ae6-772b-4d59-8cb2-da2a71ae409c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024530Z:32f41ae6-772b-4d59-8cb2-da2a71ae409c", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "32f41ae6-772b-4d59-8cb2-da2a71ae409c" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb11273e44c?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4cd2811-6250-4f60-81ab-f4f362aa5103", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:45:34 GMT", + "x-ms-correlation-request-id" : "b315c4b4-0e91-4e40-adab-5e7567d2f5bd", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024535Z:b315c4b4-0e91-4e40-adab-5e7567d2f5bd", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "b315c4b4-0e91-4e40-adab-5e7567d2f5bd", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "888edac6-a3c1-40eb-a5f3-333a2c9b7e94" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:45:50 GMT", + "x-ms-correlation-request-id" : "bb13387d-338f-4b12-99c7-cc94c933553b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024550Z:bb13387d-338f-4b12-99c7-cc94c933553b", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "bb13387d-338f-4b12-99c7-cc94c933553b", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "76febaa2-b07f-4333-9c2f-3c865f224a38" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:06 GMT", + "x-ms-correlation-request-id" : "ef26e4be-b831-4fd2-bcbe-52ae24aaf25d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024606Z:ef26e4be-b831-4fd2-bcbe-52ae24aaf25d", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "ef26e4be-b831-4fd2-bcbe-52ae24aaf25d", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b11fd633-0edb-4f11-a7ce-6be76d4ed312" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:22 GMT", + "x-ms-correlation-request-id" : "f8737db6-3b94-4e43-82d7-578ebfbccbff", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024622Z:f8737db6-3b94-4e43-82d7-578ebfbccbff", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "f8737db6-3b94-4e43-82d7-578ebfbccbff", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "69c31a82-b5db-4d12-bd46-407fa74a98e5" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:37 GMT", + "x-ms-correlation-request-id" : "fab2bcc3-51e6-4fa8-9e30-f49479f382dc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024638Z:fab2bcc3-51e6-4fa8-9e30-f49479f382dc", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "fab2bcc3-51e6-4fa8-9e30-f49479f382dc", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "21fadd72-813a-4bf1-9ff0-f1179b123765" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:53 GMT", + "x-ms-correlation-request-id" : "f3b6e93f-3f95-43e8-927d-9a4f3b4240f4", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024653Z:f3b6e93f-3f95-43e8-927d-9a4f3b4240f4", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "f3b6e93f-3f95-43e8-927d-9a4f3b4240f4", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IxMTI3M0U0NEMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ed202b4-7514-4c25-bdad-6cbda2836374" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:47:08 GMT", + "x-ms-correlation-request-id" : "b62a9806-fbc4-4667-8a54-0bae5da05d24", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024709Z:b62a9806-fbc4-4667-8a54-0bae5da05d24", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "b62a9806-fbc4-4667-8a54-0bae5da05d24" + }, + "Exception" : null + } ], + "variables" : [ "javasb11273e44c", "jvsbns6158503", "queue1-907091" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateNamespaceThenCRUDOnTopic.json b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateNamespaceThenCRUDOnTopic.json new file mode 100644 index 0000000000000..113902cbbf1a2 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canCreateNamespaceThenCRUDOnTopic.json @@ -0,0 +1,449 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb829555aa3?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d6d2ed9e-7930-4700-afbd-3083be99338c", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Wed, 02 Sep 2020 02:44:06 GMT", + "x-ms-correlation-request-id" : "53dd3463-7d62-4847-bbed-08c23611890e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024407Z:53dd3463-7d62-4847-bbed-08c23611890e", + "Expires" : "-1", + "Content-Length" : "227", + "x-ms-request-id" : "53dd3463-7d62-4847-bbed-08c23611890e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3\",\"name\":\"javasb829555aa3\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "131ea312-4255-41fa-8a0e-ff81775d5b3b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:16 GMT", + "x-ms-correlation-request-id" : "841c581e-e757-4468-8874-cefaf85e1975", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024417Z:841c581e-e757-4468-8874-cefaf85e1975", + "Expires" : "-1", + "Content-Length" : "475", + "x-ms-request-id" : "d0cc03be-af61-4060-b014-e9adafa7afb7_M7CH3_M7CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8\",\"name\":\"jvsbns84929d8\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns84929d8\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "131ea312-4255-41fa-8a0e-ff81775d5b3b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1c6da90-72fa-4688-8819-2dabcf3c12e0" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:46 GMT", + "x-ms-correlation-request-id" : "335a2a74-d13a-4565-8d5a-af1640743325", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024447Z:335a2a74-d13a-4565-8d5a-af1640743325", + "Expires" : "-1", + "Content-Length" : "670", + "x-ms-request-id" : "5acff98a-caa1-4a7f-9cee-5832e865cc46_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8\",\"name\":\"jvsbns84929d8\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns84929d8\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T02:44:15.4Z\",\"serviceBusEndpoint\":\"https://jvsbns84929d8.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:15.4Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "b1c6da90-72fa-4688-8819-2dabcf3c12e0", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d127a954-e398-4197-b979-8461d0a6fc1f" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "6d76d149-a29c-429f-bd7d-574cb23aa7c6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024518Z:6d76d149-a29c-429f-bd7d-574cb23aa7c6", + "Expires" : "-1", + "Content-Length" : "673", + "x-ms-request-id" : "0eb4d861-9356-4a60-9620-d51752792e4d_M7CH3_M7CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8\",\"name\":\"jvsbns84929d8\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns84929d8\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:15.4Z\",\"serviceBusEndpoint\":\"https://jvsbns84929d8.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:58.457Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "d127a954-e398-4197-b979-8461d0a6fc1f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics/topic1-349345?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1d416df-a259-4b14-a0dd-e3a54bba7a7f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:20 GMT", + "x-ms-correlation-request-id" : "21a1f320-3a34-4ddc-b2b0-b6e05d7c4c8e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024521Z:21a1f320-3a34-4ddc-b2b0-b6e05d7c4c8e", + "Expires" : "-1", + "Content-Length" : "873", + "x-ms-request-id" : "b919062c-4124-444a-8454-0d6b409167ed_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics/topic1-349345\",\"name\":\"topic1-349345\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-349345\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:20.45Z\",\"updatedAt\":\"2020-09-02T02:45:20.55Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "e1d416df-a259-4b14-a0dd-e3a54bba7a7f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0cdf7dce-e88c-4468-b270-cd17079c12f2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:22 GMT", + "x-ms-correlation-request-id" : "4b7d079f-3afa-4f32-a5f6-c599b1f8cb47", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024522Z:4b7d079f-3afa-4f32-a5f6-c599b1f8cb47", + "Expires" : "-1", + "Content-Length" : "1112", + "x-ms-request-id" : "af695d87-6954-40ed-85cc-fcdbbf3b0526_M0SN1_M0SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics/topic1-349345\",\"name\":\"topic1-349345\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-349345\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:20.45Z\",\"updatedAt\":\"2020-09-02T02:45:20.55Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "0cdf7dce-e88c-4468-b270-cd17079c12f2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fbd183b5-97db-4094-b37b-eb48ee9e0688", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:22 GMT", + "x-ms-correlation-request-id" : "3d95c816-5c2a-414c-a9f5-efa70db0ca20", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024523Z:3d95c816-5c2a-414c-a9f5-efa70db0ca20", + "Expires" : "-1", + "Content-Length" : "1112", + "x-ms-request-id" : "1292af96-f76b-4465-bb89-52969866cf3d_M10CH3_M10CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics/topic1-349345\",\"name\":\"topic1-349345\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-349345\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:20.45Z\",\"updatedAt\":\"2020-09-02T02:45:20.55Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "fbd183b5-97db-4094-b37b-eb48ee9e0688", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics/topic1-349345?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "93ae1312-1660-4eac-bf66-9eb42d8365ba", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:24 GMT", + "x-ms-correlation-request-id" : "1fa274e8-89e2-4e6e-b610-3325b7550fcc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024525Z:1fa274e8-89e2-4e6e-b610-3325b7550fcc", + "Expires" : "-1", + "Content-Length" : "708", + "x-ms-request-id" : "ffddae04-a2af-4d57-a0e3-f79a7582b10c_M3CH3_M3CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics/topic1-349345\",\"name\":\"topic1-349345\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-349345\",\"defaultMessageTimeToLive\":\"00:20:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:15:00\",\"enableBatchedOperations\":true,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"00:25:00\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "93ae1312-1660-4eac-bf66-9eb42d8365ba", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb829555aa3/providers/Microsoft.ServiceBus/namespaces/jvsbns84929d8/topics/topic1-349345?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7cc653e-6a2e-4153-96f7-cb75b928d3be", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:25 GMT", + "x-ms-correlation-request-id" : "46001dbd-2c45-4cf2-ac63-dcf3aef41987", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024526Z:46001dbd-2c45-4cf2-ac63-dcf3aef41987", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "46001dbd-2c45-4cf2-ac63-dcf3aef41987" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb829555aa3?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c60218a4-e93e-4487-b3a3-fc711605ce0f", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:45:30 GMT", + "x-ms-correlation-request-id" : "e48f494a-f880-43da-992f-e2dd76ce6c66", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024530Z:e48f494a-f880-43da-992f-e2dd76ce6c66", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "e48f494a-f880-43da-992f-e2dd76ce6c66", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d0ebc42-d4fb-4b5a-8fe0-0a0ebc56f757" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:45:45 GMT", + "x-ms-correlation-request-id" : "16fc6b3c-eef8-4112-bb32-b1404abf421e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024546Z:16fc6b3c-eef8-4112-bb32-b1404abf421e", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "16fc6b3c-eef8-4112-bb32-b1404abf421e", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0dcde832-8975-4b5f-bbfd-7529718911f9" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:01 GMT", + "x-ms-correlation-request-id" : "eeddd88a-acaf-4075-b2e4-c8ca204ddfe7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024601Z:eeddd88a-acaf-4075-b2e4-c8ca204ddfe7", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "eeddd88a-acaf-4075-b2e4-c8ca204ddfe7", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7224e3b-929c-4c4a-97a9-7fa9b1a8db1c" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:17 GMT", + "x-ms-correlation-request-id" : "c9c10618-26c5-44cb-a3cf-48ce87900ddf", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024617Z:c9c10618-26c5-44cb-a3cf-48ce87900ddf", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "c9c10618-26c5-44cb-a3cf-48ce87900ddf", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c90d97a2-0d1c-467d-bb80-93ba6daa03f7" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:32 GMT", + "x-ms-correlation-request-id" : "d14cc46d-957f-44c3-8709-abf4a3b00c17", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024633Z:d14cc46d-957f-44c3-8709-abf4a3b00c17", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "d14cc46d-957f-44c3-8709-abf4a3b00c17", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2bdbda5-7b12-4471-ac59-696c0e2c1a06" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:47 GMT", + "x-ms-correlation-request-id" : "359c0980-623f-4671-88a8-f322a89e8508", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024648Z:359c0980-623f-4671-88a8-f322a89e8508", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "359c0980-623f-4671-88a8-f322a89e8508", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2403d9e4-ac95-41ac-a3ea-ab57420161e3" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:03 GMT", + "x-ms-correlation-request-id" : "87a19a70-157b-455d-ac38-f931551b7247", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024704Z:87a19a70-157b-455d-ac38-f931551b7247", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "87a19a70-157b-455d-ac38-f931551b7247", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0I4Mjk1NTVBQTMtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "14ef4c9c-faec-4f61-986a-b4d0ef83cfba" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:47:18 GMT", + "x-ms-correlation-request-id" : "6167204f-8cf8-488c-9b19-b58fe04f893c", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024719Z:6167204f-8cf8-488c-9b19-b58fe04f893c", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "6167204f-8cf8-488c-9b19-b58fe04f893c" + }, + "Exception" : null + } ], + "variables" : [ "javasb829555aa3", "jvsbns84929d8", "topic1-349345" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canOperateOnAuthorizationRules.json b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canOperateOnAuthorizationRules.json new file mode 100644 index 0000000000000..081c913a15c33 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canOperateOnAuthorizationRules.json @@ -0,0 +1,912 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb36566d735?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f35c9f8-9c87-4439-808e-c45133f7d8a9", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Wed, 02 Sep 2020 02:44:06 GMT", + "x-ms-correlation-request-id" : "e8aceccc-85f0-42b0-9061-bf3e3d1a9f7a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024407Z:e8aceccc-85f0-42b0-9061-bf3e3d1a9f7a", + "Expires" : "-1", + "Content-Length" : "227", + "x-ms-request-id" : "e8aceccc-85f0-42b0-9061-bf3e3d1a9f7a", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735\",\"name\":\"javasb36566d735\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d95b6130-6ca7-4b1e-8e3e-450e61bec134", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:14 GMT", + "x-ms-correlation-request-id" : "97a8a819-b991-4baf-b0f5-c7599bac4648", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024415Z:97a8a819-b991-4baf-b0f5-c7599bac4648", + "Expires" : "-1", + "Content-Length" : "475", + "x-ms-request-id" : "f145b0b8-b0c3-4fff-b3fe-a4d1aa2dc4c2_M6CH3_M6CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104\",\"name\":\"jvsbns1391104\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns1391104\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "d95b6130-6ca7-4b1e-8e3e-450e61bec134", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "89d3541a-dc31-4a76-b3ef-512213368a0c" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:44 GMT", + "x-ms-correlation-request-id" : "da4e2a25-f4b0-4112-8d99-6a7ff4440fc0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024445Z:da4e2a25-f4b0-4112-8d99-6a7ff4440fc0", + "Expires" : "-1", + "Content-Length" : "674", + "x-ms-request-id" : "81d6f819-f140-43bc-bde7-da2123f2a830_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104\",\"name\":\"jvsbns1391104\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns1391104\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T02:44:13.543Z\",\"serviceBusEndpoint\":\"https://jvsbns1391104.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:13.543Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "89d3541a-dc31-4a76-b3ef-512213368a0c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "33f7b33e-4794-4cb9-a8ba-24645ad94952" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:15 GMT", + "x-ms-correlation-request-id" : "8b157970-d215-4ecf-adfa-39e2e4253086", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024515Z:8b157970-d215-4ecf-adfa-39e2e4253086", + "Expires" : "-1", + "Content-Length" : "675", + "x-ms-request-id" : "303bc1f2-ce32-4782-92c9-44f4f8114baa_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104\",\"name\":\"jvsbns1391104\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns1391104\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:13.543Z\",\"serviceBusEndpoint\":\"https://jvsbns1391104.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:57.177Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "33f7b33e-4794-4cb9-a8ba-24645ad94952", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8eb0090f-9d9d-47c6-943d-0d389e9bcb8f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "fa421466-9dae-4853-8d7f-a1978decb2df", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024518Z:fa421466-9dae-4853-8d7f-a1978decb2df", + "Expires" : "-1", + "Content-Length" : "875", + "x-ms-request-id" : "76c1aaa3-2df4-4a57-a547-f476a942b56e_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887\",\"name\":\"topic1-459887\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-459887\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:17.473Z\",\"updatedAt\":\"2020-09-02T02:45:17.547Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "8eb0090f-9d9d-47c6-943d-0d389e9bcb8f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc699fe9-d4dd-4463-924c-457fe4c4c619", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "b84a85d7-3c46-4a59-842f-3ad04fa3fee6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024518Z:b84a85d7-3c46-4a59-842f-3ad04fa3fee6", + "Expires" : "-1", + "Content-Length" : "923", + "x-ms-request-id" : "ee506b13-b68a-47c9-981f-10807ab9fb54_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e\",\"name\":\"queue1-95023e\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-95023e\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:17.67Z\",\"updatedAt\":\"2020-09-02T02:45:17.71Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}", + "x-ms-client-request-id" : "fc699fe9-d4dd-4463-924c-457fe4c4c619", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules/nsrule1-744936?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad1d3e0c-5766-49ab-b498-14e6461a0ee9", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:27 GMT", + "x-ms-correlation-request-id" : "4b9ada1e-a1b2-4b48-b57f-103a227c7337", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024528Z:4b9ada1e-a1b2-4b48-b57f-103a227c7337", + "Expires" : "-1", + "Content-Length" : "344", + "x-ms-request-id" : "afceadf9-7a5f-422c-848a-7102a874658d_M7SN1_M7SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules/nsrule1-744936\",\"name\":\"nsrule1-744936\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}", + "x-ms-client-request-id" : "ad1d3e0c-5766-49ab-b498-14e6461a0ee9", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b8438c3-7eff-4c20-9b80-c0870d26d728", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11979", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:29 GMT", + "x-ms-correlation-request-id" : "4d6b5fd3-2063-4a2c-a869-e5a3b8a4a183", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024529Z:4d6b5fd3-2063-4a2c-a869-e5a3b8a4a183", + "Expires" : "-1", + "Content-Length" : "739", + "x-ms-request-id" : "98ddb2db-32a9-4ecf-976e-8511cc86db5d_M6SN1_M6SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules/nsrule1-744936\",\"name\":\"nsrule1-744936\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "9b8438c3-7eff-4c20-9b80-c0870d26d728", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "37507f0c-c1fe-4d0a-a1f0-c32c8e038412", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:29 GMT", + "x-ms-correlation-request-id" : "280ebcfb-300c-4724-9bdb-887bf11794ca", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024530Z:280ebcfb-300c-4724-9bdb-887bf11794ca", + "Expires" : "-1", + "Content-Length" : "739", + "x-ms-request-id" : "1ba934c8-31cb-400b-93ee-a7f109b30f3b_M8CH3_M8CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules/nsrule1-744936\",\"name\":\"nsrule1-744936\",\"type\":\"Microsoft.ServiceBus/Namespaces/AuthorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "37507f0c-c1fe-4d0a-a1f0-c32c8e038412", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules/nsrule1-744936/listKeys?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "94b9bbaf-a703-4f1f-8b89-39102f686007", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:30 GMT", + "x-ms-correlation-request-id" : "ef9c2fd7-74dd-422b-bc74-b9273e1f58b0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024531Z:ef9c2fd7-74dd-422b-bc74-b9273e1f58b0", + "Expires" : "-1", + "Content-Length" : "504", + "x-ms-request-id" : "6f8b13cf-86db-437a-b59b-397b80ebf4f6_M7SN1_M7SN1", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://jvsbns1391104.servicebus.windows.net/;SharedAccessKeyName=nsrule1-744936;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://jvsbns1391104.servicebus.windows.net/;SharedAccessKeyName=nsrule1-744936;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"nsrule1-744936\"}", + "x-ms-client-request-id" : "94b9bbaf-a703-4f1f-8b89-39102f686007", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/AuthorizationRules/nsrule1-744936/regenerateKeys?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c910fc64-dea7-44b8-b531-a379c6e5c94c", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:37 GMT", + "x-ms-correlation-request-id" : "ca50fc5b-8ed8-4078-905d-3f7cacb1174e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024537Z:ca50fc5b-8ed8-4078-905d-3f7cacb1174e", + "Expires" : "-1", + "Content-Length" : "504", + "x-ms-request-id" : "c871e263-fefe-4d58-954e-cb6d89cc0d79_M6SN1_M6SN1", + "Body" : "{\"primaryConnectionString\":\"Endpoint=sb://jvsbns1391104.servicebus.windows.net/;SharedAccessKeyName=nsrule1-744936;SharedAccessKey=***REMOVED***\",\"secondaryConnectionString\":\"Endpoint=sb://jvsbns1391104.servicebus.windows.net/;SharedAccessKeyName=nsrule1-744936;SharedAccessKey=***REMOVED***\",\"primaryKey\":\"***REMOVED***\",\"secondaryKey\":\"***REMOVED***\",\"keyName\":\"nsrule1-744936\"}", + "x-ms-client-request-id" : "c910fc64-dea7-44b8-b531-a379c6e5c94c", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4a40240-fd24-4009-bffb-fe567782cd9e", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:37 GMT", + "x-ms-correlation-request-id" : "a9e25ce4-7faa-4458-a102-74abcc1bffd1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024538Z:a9e25ce4-7faa-4458-a102-74abcc1bffd1", + "Expires" : "-1", + "Content-Length" : "1150", + "x-ms-request-id" : "b400cbcd-774b-4690-817c-305e335df5a3_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e\",\"name\":\"queue1-95023e\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-95023e\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:17.6818712Z\",\"updatedAt\":\"2020-09-02T02:45:17.6818712Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "c4a40240-fd24-4009-bffb-fe567782cd9e", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0935d0a2-e174-4838-a0a2-203f732a7608", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:39 GMT", + "x-ms-correlation-request-id" : "b8e3f88e-ebc6-4dc0-b40f-cfecd8a3eab8", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024539Z:b8e3f88e-ebc6-4dc0-b40f-cfecd8a3eab8", + "Expires" : "-1", + "Content-Length" : "1150", + "x-ms-request-id" : "d86219e1-18a4-4351-8179-5a2ce4eaff8b_M7SN1_M7SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e\",\"name\":\"queue1-95023e\",\"type\":\"Microsoft.ServiceBus/Queues\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"queue1-95023e\",\"lockDuration\":\"00:01:00\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"requiresSession\":false,\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"deadLetteringOnMessageExpiration\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"messageCount\":0,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:17.6818712Z\",\"updatedAt\":\"2020-09-02T02:45:17.6818712Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "0935d0a2-e174-4838-a0a2-203f732a7608", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules/rule1?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec84e384-0ba3-45ef-8e10-bbb322ae8291", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:44 GMT", + "x-ms-correlation-request-id" : "c25d5fcd-6bef-4b80-925e-0ab2756e6131", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024544Z:c25d5fcd-6bef-4b80-925e-0ab2756e6131", + "Expires" : "-1", + "Content-Length" : "325", + "x-ms-request-id" : "5d5463d7-d892-43ef-9aaa-1c687e1a8430_M5CH3_M5CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules/rule1\",\"name\":\"rule1\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"rights\":[\"Listen\"]}}", + "x-ms-client-request-id" : "ec84e384-0ba3-45ef-8e10-bbb322ae8291", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules/rule1?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "93ba3cae-c62c-4864-acd9-d9e3606fa9e7", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:50 GMT", + "x-ms-correlation-request-id" : "120310cf-bccc-483a-9ef7-981849154676", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024550Z:120310cf-bccc-483a-9ef7-981849154676", + "Expires" : "-1", + "Content-Length" : "341", + "x-ms-request-id" : "b27829b0-4d7d-4d38-94f3-123475165168_M7CH3_M7CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules/rule1\",\"name\":\"rule1\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}", + "x-ms-client-request-id" : "93ba3cae-c62c-4864-acd9-d9e3606fa9e7", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b1704ac-ce20-4b4c-9c36-bbe68e507909", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:51 GMT", + "x-ms-correlation-request-id" : "ad18fb5d-e677-4dcd-ab19-d1d1db353a89", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024551Z:ad18fb5d-e677-4dcd-ab19-d1d1db353a89", + "Expires" : "-1", + "Content-Length" : "369", + "x-ms-request-id" : "45210f0f-2249-40ab-9882-dd447f84cf54_M6SN1_M6SN1", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules/rule1\",\"name\":\"rule1\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "4b1704ac-ce20-4b4c-9c36-bbe68e507909", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d70ebeb6-a488-453b-9ea5-3d47a2f44dd2", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:51 GMT", + "x-ms-correlation-request-id" : "fefe9b4e-103c-49c5-82bd-3a3ef2fdaa39", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024551Z:fefe9b4e-103c-49c5-82bd-3a3ef2fdaa39", + "Expires" : "-1", + "Content-Length" : "369", + "x-ms-request-id" : "0688761f-71b9-4951-8b91-4f50566e8676_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules/rule1\",\"name\":\"rule1\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\",\"Manage\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "d70ebeb6-a488-453b-9ea5-3d47a2f44dd2", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/queues/queue1-95023e/authorizationRules/rule1?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "231a71a9-f8b0-4a67-b6ea-27c8a24d8d4d", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14996", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:52 GMT", + "x-ms-correlation-request-id" : "4260c7b6-5eeb-4700-8824-13e8effa89f9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024552Z:4260c7b6-5eeb-4700-8824-13e8effa89f9", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "50290090-99ce-45f8-94ff-d387ffa2f46b_M7SN1_M7SN1", + "x-ms-client-request-id" : "231a71a9-f8b0-4a67-b6ea-27c8a24d8d4d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9b1bf84-c732-42b9-b6e0-b5a0d4e32a53", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:52 GMT", + "x-ms-correlation-request-id" : "bffc4614-cb1e-4b57-b4cd-11b251885951", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024553Z:bffc4614-cb1e-4b57-b4cd-11b251885951", + "Expires" : "-1", + "Content-Length" : "1114", + "x-ms-request-id" : "54ac1e65-1469-42ec-873e-0f0e177482e5_M5CH3_M5CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887\",\"name\":\"topic1-459887\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-459887\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:17.473Z\",\"updatedAt\":\"2020-09-02T02:45:17.547Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "f9b1bf84-c732-42b9-b6e0-b5a0d4e32a53", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "146a00ee-4961-4539-a3fe-650a3604ba57", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:53 GMT", + "x-ms-correlation-request-id" : "5750ddf5-14e7-4392-a9c0-2986070b5317", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024553Z:5750ddf5-14e7-4392-a9c0-2986070b5317", + "Expires" : "-1", + "Content-Length" : "1114", + "x-ms-request-id" : "31a38cad-8c8a-4095-a75f-dc76c8e34481_M5CH3_M5CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887\",\"name\":\"topic1-459887\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-459887\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:17.473Z\",\"updatedAt\":\"2020-09-02T02:45:17.547Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}],\"nextLink\":null}", + "x-ms-client-request-id" : "146a00ee-4961-4539-a3fe-650a3604ba57", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules/rule2?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "28ded077-c7f5-4487-bd59-96490f506be0", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:59 GMT", + "x-ms-correlation-request-id" : "ba56033c-4c7f-4acc-a602-148ba7494d73", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024559Z:ba56033c-4c7f-4acc-a602-148ba7494d73", + "Expires" : "-1", + "Content-Length" : "323", + "x-ms-request-id" : "190cae98-1059-4300-bf44-988d57651da1_M9CH3_M9CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules/rule2\",\"name\":\"rule2\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\"]}}", + "x-ms-client-request-id" : "28ded077-c7f5-4487-bd59-96490f506be0", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules/rule2?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac4e2a20-857b-4be6-8282-e096b99baa5f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:05 GMT", + "x-ms-correlation-request-id" : "1fa40dcb-f4bb-4449-a863-9b40108a1c68", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024605Z:1fa40dcb-f4bb-4449-a863-9b40108a1c68", + "Expires" : "-1", + "Content-Length" : "341", + "x-ms-request-id" : "48cb6d21-3151-415e-95c0-7e45128c6eb0_M7CH3_M7CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules/rule2\",\"name\":\"rule2\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\",\"Listen\",\"Manage\"]}}", + "x-ms-client-request-id" : "ac4e2a20-857b-4be6-8282-e096b99baa5f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "56968d99-ae67-4234-9eb1-38cbbf541089", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:05 GMT", + "x-ms-correlation-request-id" : "055ea0c5-d63a-4ad5-8153-7e90270d2656", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024606Z:055ea0c5-d63a-4ad5-8153-7e90270d2656", + "Expires" : "-1", + "Content-Length" : "369", + "x-ms-request-id" : "50db0b42-46fb-4aaa-ab58-ff0b3d1f817c_M5CH3_M5CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules/rule2\",\"name\":\"rule2\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\",\"Listen\",\"Manage\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "56968d99-ae67-4234-9eb1-38cbbf541089", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "819a7230-489c-4834-bed0-ad1427821aba", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:05 GMT", + "x-ms-correlation-request-id" : "755aba0d-6c63-4925-94be-f0e36568328f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024606Z:755aba0d-6c63-4925-94be-f0e36568328f", + "Expires" : "-1", + "Content-Length" : "369", + "x-ms-request-id" : "ab4209ec-da79-4f70-a7f0-1d016a32d438_M3CH3_M3CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules/rule2\",\"name\":\"rule2\",\"type\":\"Microsoft.ServiceBus/AuthorizationRules\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"rights\":[\"Send\",\"Listen\",\"Manage\"]}}],\"nextLink\":null}", + "x-ms-client-request-id" : "819a7230-489c-4834-bed0-ad1427821aba", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb36566d735/providers/Microsoft.ServiceBus/namespaces/jvsbns1391104/topics/topic1-459887/authorizationRules/rule2?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d150415-9053-4dad-8e50-ab13610c1640", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:46:06 GMT", + "x-ms-correlation-request-id" : "dd0185ae-f653-45d2-9637-cb46d651993f", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024606Z:dd0185ae-f653-45d2-9637-cb46d651993f", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "8ab3d5c3-07ab-4866-91c7-808cfda278d8_M3CH3_M3CH3", + "x-ms-client-request-id" : "6d150415-9053-4dad-8e50-ab13610c1640" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb36566d735?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "01ecc76a-11ab-473b-9935-62a495be81bd", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:09 GMT", + "x-ms-correlation-request-id" : "cb8080bf-df83-44d0-8fc2-e6574f26c1c6", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024609Z:cb8080bf-df83-44d0-8fc2-e6574f26c1c6", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "cb8080bf-df83-44d0-8fc2-e6574f26c1c6", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e86a8da8-e2ee-4933-a515-e71664f9a4ce" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:24 GMT", + "x-ms-correlation-request-id" : "21247b45-52dc-4c6e-a806-f84f820ad2f1", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024625Z:21247b45-52dc-4c6e-a806-f84f820ad2f1", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "21247b45-52dc-4c6e-a806-f84f820ad2f1", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2410733c-c3f0-464e-9cba-e2c7959d8eb4" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:40 GMT", + "x-ms-correlation-request-id" : "efc748c8-e56c-488f-ae24-9e2baa8a44fc", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024640Z:efc748c8-e56c-488f-ae24-9e2baa8a44fc", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "efc748c8-e56c-488f-ae24-9e2baa8a44fc", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ea6d925-be32-44ee-b737-b8e2d989ef64" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:55 GMT", + "x-ms-correlation-request-id" : "a72e99da-e654-43dc-a1c8-c0843091c00d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024656Z:a72e99da-e654-43dc-a1c8-c0843091c00d", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a72e99da-e654-43dc-a1c8-c0843091c00d", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "57604525-491a-42fc-9d6d-f20d8899182a" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:11 GMT", + "x-ms-correlation-request-id" : "2baacb66-7a33-4608-a929-208dc06491b7", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024712Z:2baacb66-7a33-4608-a929-208dc06491b7", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "2baacb66-7a33-4608-a929-208dc06491b7", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f27239bf-1378-4149-bfa7-71cafb9156ec" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11975", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:27 GMT", + "x-ms-correlation-request-id" : "4f215993-c8ef-46d1-897c-10316baa8554", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024727Z:4f215993-c8ef-46d1-897c-10316baa8554", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "4f215993-c8ef-46d1-897c-10316baa8554", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "df66ceff-6720-4d95-9402-c97222e7face" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11974", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:42 GMT", + "x-ms-correlation-request-id" : "75ef49a7-51a9-4348-83f8-2fc2709ce1c9", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024743Z:75ef49a7-51a9-4348-83f8-2fc2709ce1c9", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "75ef49a7-51a9-4348-83f8-2fc2709ce1c9", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IzNjU2NkQ3MzUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f6164fe4-95e7-4909-a966-1d221f574499" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:47:58 GMT", + "x-ms-correlation-request-id" : "67fc22e0-2853-4a93-8b02-822774e5cc63", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024758Z:67fc22e0-2853-4a93-8b02-822774e5cc63", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "67fc22e0-2853-4a93-8b02-822774e5cc63" + }, + "Exception" : null + } ], + "variables" : [ "javasb36566d735", "jvsbns1391104", "queue1-95023e", "topic1-459887", "nsrule1-744936" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canPerformCRUDOnSubscriptions.json b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canPerformCRUDOnSubscriptions.json new file mode 100644 index 0000000000000..aa1f1333b3322 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canPerformCRUDOnSubscriptions.json @@ -0,0 +1,536 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb208569a15?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "39945814-baaa-4f47-857f-40c29051f4d5", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "201", + "Date" : "Wed, 02 Sep 2020 02:44:08 GMT", + "x-ms-correlation-request-id" : "191d8a14-a4db-4cec-b52d-2a88d72926d5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024409Z:191d8a14-a4db-4cec-b52d-2a88d72926d5", + "Expires" : "-1", + "Content-Length" : "227", + "x-ms-request-id" : "191d8a14-a4db-4cec-b52d-2a88d72926d5", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15\",\"name\":\"javasb208569a15\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "07aef394-2e3b-436e-a48f-494f892b975b", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:16 GMT", + "x-ms-correlation-request-id" : "b2c45ab2-de3b-45db-95bf-b3b3d8899686", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024416Z:b2c45ab2-de3b-45db-95bf-b3b3d8899686", + "Expires" : "-1", + "Content-Length" : "475", + "x-ms-request-id" : "ffe175c4-c80a-4c7f-bdff-26e345ea1da7_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a\",\"name\":\"jvsbns148583a\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\"},\"tags\":{},\"properties\":{\"provisioningState\":\"Unknown\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns148583a\",\"enabled\":false,\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "07aef394-2e3b-436e-a48f-494f892b975b", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c99b645-864e-42fe-84ce-e1c32f143aa8" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:46 GMT", + "x-ms-correlation-request-id" : "a36c8008-3f18-4d63-be8b-b275e77feb56", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024447Z:a36c8008-3f18-4d63-be8b-b275e77feb56", + "Expires" : "-1", + "Content-Length" : "674", + "x-ms-request-id" : "c48350ae-de44-40f7-ac1c-245a281744f2_M4CH3_M4CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a\",\"name\":\"jvsbns148583a\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Created\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns148583a\",\"status\":\"Created\",\"createdAt\":\"2020-09-02T02:44:14.843Z\",\"serviceBusEndpoint\":\"https://jvsbns148583a.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:14.843Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "3c99b645-864e-42fe-84ce-e1c32f143aa8", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a7a8ba7-bbab-4d8a-9014-dc965386adb6" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:17 GMT", + "x-ms-correlation-request-id" : "5296f4fd-5c6f-46b1-ad8d-80d747a1696b", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024517Z:5296f4fd-5c6f-46b1-ad8d-80d747a1696b", + "Expires" : "-1", + "Content-Length" : "674", + "x-ms-request-id" : "cae0bfd1-69bf-4e20-b7a2-b64aed81e9e7_M10CH3_M10CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a\",\"name\":\"jvsbns148583a\",\"type\":\"Microsoft.ServiceBus/namespaces\",\"location\":\"East US\",\"kind\":\"Messaging\",\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"tags\":{},\"properties\":{\"provisioningState\":\"Succeeded\",\"metricId\":\"00000000-0000-0000-0000-000000000000:jvsbns148583a\",\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:44:14.843Z\",\"serviceBusEndpoint\":\"https://jvsbns148583a.servicebus.windows.net:443/\",\"enabled\":true,\"critical\":false,\"updatedAt\":\"2020-09-02T02:44:57.25Z\",\"namespaceType\":\"Messaging\",\"messagingSku\":2}}", + "x-ms-client-request-id" : "1a7a8ba7-bbab-4d8a-9014-dc965386adb6", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "62993c8c-5ea4-4533-89f7-3b0a887ff731", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:19 GMT", + "x-ms-correlation-request-id" : "a24f069c-46f1-46d1-87be-301ba12273cb", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024520Z:a24f069c-46f1-46d1-87be-301ba12273cb", + "Expires" : "-1", + "Content-Length" : "875", + "x-ms-request-id" : "d5fa7b48-c043-4a65-bba8-66f7e5e46b3c_M1CH3_M1CH3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a\",\"name\":\"topic1-45641a\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-45641a\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:19.463Z\",\"updatedAt\":\"2020-09-02T02:45:19.617Z\",\"supportOrdering\":true,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "62993c8c-5ea4-4533-89f7-3b0a887ff731", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f0109513-a96b-43e1-a58f-eb542584b7dc", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:20 GMT", + "x-ms-correlation-request-id" : "725745dd-0ee3-4e6c-b8d0-3fda8b78712a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024520Z:725745dd-0ee3-4e6c-b8d0-3fda8b78712a", + "Expires" : "-1", + "Content-Length" : "1086", + "x-ms-request-id" : "e5451293-6285-413d-abd2-c66a02e17cd6_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a\",\"name\":\"topic1-45641a\",\"type\":\"Microsoft.ServiceBus/Topic\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"path\":\"topic1-45641a\",\"defaultMessageTimeToLive\":\"10675199.02:48:05.4775807\",\"maxSizeInMegabytes\":1024,\"requiresDuplicateDetection\":false,\"duplicateDetectionHistoryTimeWindow\":\"00:10:00\",\"enableBatchedOperations\":true,\"sizeInBytes\":0,\"filteringMessagesBeforePublishing\":false,\"isAnonymousAccessible\":false,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:19.463Z\",\"updatedAt\":\"2020-09-02T02:45:19.617Z\",\"accessedAt\":\"0001-01-01T00:00:00Z\",\"supportOrdering\":true,\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"subscriptionCount\":0,\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"enablePartitioning\":false,\"entityAvailabilityStatus\":\"Available\",\"enableSubscriptionPartitioning\":false,\"enableExpress\":false}}", + "x-ms-client-request-id" : "f0109513-a96b-43e1-a58f-eb542584b7dc", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions/sub1-9737880?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1bfdac17-e558-4941-be74-9c72bf492a3f", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:22 GMT", + "x-ms-correlation-request-id" : "171f73a0-512a-4869-80bd-ae02160bcb23", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024522Z:171f73a0-512a-4869-80bd-ae02160bcb23", + "Expires" : "-1", + "Content-Length" : "849", + "x-ms-request-id" : "6bb1ac37-50ea-4098-bf5f-75b0f84d1215_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions/sub1-9737880\",\"name\":\"sub1-9737880\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic1-45641a\",\"subscriptionName\":\"sub1-9737880\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"00:20:00\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:22.4235837Z\",\"updatedAt\":\"2020-09-02T02:45:22.4235837Z\",\"accessedAt\":\"0001-01-01T00:00:00\",\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "1bfdac17-e558-4941-be74-9c72bf492a3f", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions/sub1-9737880?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d9973a7-089f-428d-92f3-3fbdc1f91e09", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:22 GMT", + "x-ms-correlation-request-id" : "a5ceec5f-9163-4122-9cde-f711dc8cf737", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024523Z:a5ceec5f-9163-4122-9cde-f711dc8cf737", + "Expires" : "-1", + "Content-Length" : "1006", + "x-ms-request-id" : "90a2f1d7-5757-4bbd-ba0c-add727928a33_M6SN1_M6SN1", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions/sub1-9737880\",\"name\":\"sub1-9737880\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic1-45641a\",\"subscriptionName\":\"sub1-9737880\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"00:20:00\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:22.4290861Z\",\"updatedAt\":\"2020-09-02T02:45:22.4290861Z\",\"accessedAt\":\"2020-09-02T02:45:22.43Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}", + "x-ms-client-request-id" : "6d9973a7-089f-428d-92f3-3fbdc1f91e09", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1f7dc100-7ecd-424a-a03b-60743ef20123", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:24 GMT", + "x-ms-correlation-request-id" : "b58802c6-5079-421a-8b07-722ebe32c798", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024525Z:b58802c6-5079-421a-8b07-722ebe32c798", + "Expires" : "-1", + "Content-Length" : "1034", + "x-ms-request-id" : "83303067-a9c0-4fa5-b3a6-92bc8f146fef_M10CH3_M10CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions/sub1-9737880\",\"name\":\"sub1-9737880\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic1-45641a\",\"subscriptionName\":\"sub1-9737880\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"00:20:00\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:22.4290861Z\",\"updatedAt\":\"2020-09-02T02:45:22.4290861Z\",\"accessedAt\":\"2020-09-02T02:45:22.43Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}],\"nextLink\":null}", + "x-ms-client-request-id" : "1f7dc100-7ecd-424a-a03b-60743ef20123", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0bd3db8-c40f-4b50-95e2-a396b233d8d5", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:26 GMT", + "x-ms-correlation-request-id" : "e3a00979-bd4e-48d9-acec-dcc22b2d8fd0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024526Z:e3a00979-bd4e-48d9-acec-dcc22b2d8fd0", + "Expires" : "-1", + "Content-Length" : "1034", + "x-ms-request-id" : "267e9d1b-5fad-43fb-aeb1-eb6a823274b0_M1CH3_M1CH3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions/sub1-9737880\",\"name\":\"sub1-9737880\",\"type\":\"Microsoft.ServiceBus/TopicSubscriptions\",\"location\":\"East US\",\"tags\":null,\"properties\":{\"topicPath\":\"topic1-45641a\",\"subscriptionName\":\"sub1-9737880\",\"lockDuration\":\"00:01:00\",\"requiresSession\":false,\"defaultMessageTimeToLive\":\"00:20:00\",\"deadLetteringOnMessageExpiration\":false,\"deadLetteringOnFilterEvaluationExceptions\":true,\"messageCount\":0,\"maxDeliveryCount\":10,\"enableBatchedOperations\":true,\"status\":\"Active\",\"createdAt\":\"2020-09-02T02:45:22.4290861Z\",\"updatedAt\":\"2020-09-02T02:45:22.4290861Z\",\"accessedAt\":\"2020-09-02T02:45:22.43Z\",\"countDetails\":{\"activeMessageCount\":0,\"deadLetterMessageCount\":0,\"scheduledMessageCount\":0,\"transferMessageCount\":0,\"transferDeadLetterMessageCount\":0},\"autoDeleteOnIdle\":\"10675199.02:48:05.4775807\",\"entityAvailabilityStatus\":\"Available\"}}],\"nextLink\":null}", + "x-ms-client-request-id" : "c0bd3db8-c40f-4b50-95e2-a396b233d8d5", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions/sub1-9737880?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3e107c6-b604-430f-96f4-b5ea896a07b7", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:26 GMT", + "x-ms-correlation-request-id" : "c323864d-db77-4677-8f00-ee2c87d6b2ce", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024527Z:c323864d-db77-4677-8f00-ee2c87d6b2ce", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "c323864d-db77-4677-8f00-ee2c87d6b2ce" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javasb208569a15/providers/Microsoft.ServiceBus/namespaces/jvsbns148583a/topics/topic1-45641a/subscriptions?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f259dbab-b5b8-45c7-87c1-a2333dd041de", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:45:27 GMT", + "x-ms-correlation-request-id" : "12cbdc56-55ca-4b8c-8c24-f2b0f7abe476", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/SN1", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024527Z:12cbdc56-55ca-4b8c-8c24-f2b0f7abe476", + "Expires" : "-1", + "Content-Length" : "28", + "x-ms-request-id" : "10614f37-8858-423f-9e15-a0f6b5a8aecf_M6SN1_M6SN1", + "Body" : "{\"value\":[],\"nextLink\":null}", + "x-ms-client-request-id" : "f259dbab-b5b8-45c7-87c1-a2333dd041de", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javasb208569a15?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "66cc6376-4008-4291-8c69-2021de4864d7", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:45:31 GMT", + "x-ms-correlation-request-id" : "82c1e736-b307-4b09-b0df-78290fa51e3d", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024532Z:82c1e736-b307-4b09-b0df-78290fa51e3d", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "82c1e736-b307-4b09-b0df-78290fa51e3d", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "03d44331-325f-4269-8ad4-c2178cfd5c7e" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:45:47 GMT", + "x-ms-correlation-request-id" : "29e39cf0-91d0-4c22-af75-3d02a6d83105", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024548Z:29e39cf0-91d0-4c22-af75-3d02a6d83105", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "29e39cf0-91d0-4c22-af75-3d02a6d83105", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2879761c-b6c4-445a-8734-b366823036f5" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11977", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:04 GMT", + "x-ms-correlation-request-id" : "986e3f4d-53c2-4c7b-b402-c6da768fd4b5", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024604Z:986e3f4d-53c2-4c7b-b402-c6da768fd4b5", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "986e3f4d-53c2-4c7b-b402-c6da768fd4b5", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "03cbc0cb-5522-4eb9-adf0-84958155d8eb" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11976", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:19 GMT", + "x-ms-correlation-request-id" : "6e936f64-0237-49ef-88b3-9e682c5b0234", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024620Z:6e936f64-0237-49ef-88b3-9e682c5b0234", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "6e936f64-0237-49ef-88b3-9e682c5b0234", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "95163d7d-f31d-4b8d-ba1e-d1d8f96f4ab3" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:34 GMT", + "x-ms-correlation-request-id" : "3da86003-5d58-4ddd-8dab-8c88a583121e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024635Z:3da86003-5d58-4ddd-8dab-8c88a583121e", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "3da86003-5d58-4ddd-8dab-8c88a583121e", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2b389602-8aa6-4efe-91c0-37e3b2e62f55" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:46:50 GMT", + "x-ms-correlation-request-id" : "a57e53c6-205b-422f-8908-cf3896120e1e", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024651Z:a57e53c6-205b-422f-8908-cf3896120e1e", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a57e53c6-205b-422f-8908-cf3896120e1e", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9424ff05-eb18-444c-b4eb-447872d2924d" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-reads" : "11978", + "StatusCode" : "202", + "Date" : "Wed, 02 Sep 2020 02:47:05 GMT", + "x-ms-correlation-request-id" : "a3c8743a-a66d-492f-8508-d2527627351a", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Retry-After" : "0", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024706Z:a3c8743a-a66d-492f-8508-d2527627351a", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "a3c8743a-a66d-492f-8508-d2527627351a", + "Location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBU0IyMDg1NjlBMTUtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "56425c89-a819-438c-9ea7-4f2d70fc8eeb" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:47:21 GMT", + "x-ms-correlation-request-id" : "e58ba4a9-3cb7-4bc6-b119-3eefba560fa0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024722Z:e58ba4a9-3cb7-4bc6-b119-3eefba560fa0", + "Expires" : "-1", + "Content-Length" : "0", + "x-ms-request-id" : "e58ba4a9-3cb7-4bc6-b119-3eefba560fa0" + }, + "Exception" : null + } ], + "variables" : [ "javasb208569a15", "jvsbns148583a", "topic1-45641a", "sub1-9737880" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canPerformOnNamespaceActions.json b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canPerformOnNamespaceActions.json new file mode 100644 index 0000000000000..02c9c59f0a2d0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/session-records/canPerformOnNamespaceActions.json @@ -0,0 +1,33 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceBus/CheckNameAvailability?api-version=2015-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.servicebus/2.0.0-beta.4 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "edbcf1f3-c126-4cbf-8652-1bc54e994350", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 02 Sep 2020 02:44:05 GMT", + "x-ms-correlation-request-id" : "317e4996-21c2-401e-a8ae-f00cea04a0c0", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "Server-SB" : "Service-Bus-Resource-Provider/CH3", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200902T024405Z:317e4996-21c2-401e-a8ae-f00cea04a0c0", + "Expires" : "-1", + "Content-Length" : "53", + "x-ms-request-id" : "680ee2e0-e1f8-4357-8f53-41c8e908cd56_M4CH3_M4CH3", + "Body" : "{\"nameAvailable\":true,\"reason\":\"None\",\"message\":null}", + "x-ms-client-request-id" : "edbcf1f3-c126-4cbf-8652-1bc54e994350", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "javasb290084363", "jvsbns9129695" ] +} \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java index b346d89380478..446a3cddbf2fa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java @@ -135,14 +135,13 @@ protected void beforeTest() { } catch (Exception e) { if (isPlaybackMode()) { httpLogDetailLevel = HttpLogDetailLevel.NONE; - logger.error("Environment variable '{}' has not been set yet. Using 'NONE' for PLAYBACK.", new Object[]{"AZURE_LOG_LEVEL"}); + logger.error("Environment variable '{}' has not been set yet. Using 'NONE' for PLAYBACK.", new Object[]{AZURE_TEST_LOG_LEVEL}); } else { httpLogDetailLevel = HttpLogDetailLevel.BODY_AND_HEADERS; - logger.error("Environment variable '{}' has not been set yet. Using 'BODY_AND_HEADERS' for RECORD/LIVE.", new Object[]{"AZURE_LOG_LEVEL"}); + logger.error("Environment variable '{}' has not been set yet. Using 'BODY_AND_HEADERS' for RECORD/LIVE.", new Object[]{AZURE_TEST_LOG_LEVEL}); } } - if (httpLogDetailLevel == HttpLogDetailLevel.NONE) { try { System.setOut(new PrintStream(EMPTY_OUTPUT_STREAM, false, Charset.defaultCharset().name())); diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 5546c591a0672..b07ee6c6db657 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -150,6 +150,11 @@ azure-resourcemanager-trafficmanager 2.0.0-beta.5 + + com.azure.resourcemanager + azure-resourcemanager-servicebus + 2.0.0-beta.5 + org.junit.jupiter junit-jupiter-engine diff --git a/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java index d780045f40cfa..400a613e5f788 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/Azure.java @@ -101,6 +101,8 @@ import com.azure.resourcemanager.resources.models.Subscription; import com.azure.resourcemanager.resources.models.Subscriptions; import com.azure.resourcemanager.resources.models.Tenants; +import com.azure.resourcemanager.servicebus.ServiceBusManager; +import com.azure.resourcemanager.servicebus.models.ServiceBusNamespaces; import com.azure.resourcemanager.sql.SqlServerManager; import com.azure.resourcemanager.sql.models.SqlServers; import com.azure.resourcemanager.storage.StorageManager; @@ -129,7 +131,7 @@ public final class Azure { private final DnsZoneManager dnsZoneManager; private final AppServiceManager appServiceManager; private final SqlServerManager sqlServerManager; - // private final ServiceBusManager serviceBusManager; + private final ServiceBusManager serviceBusManager; private final ContainerInstanceManager containerInstanceManager; private final ContainerRegistryManager containerRegistryManager; private final ContainerServiceManager containerServiceManager; @@ -378,7 +380,7 @@ private Azure(HttpPipeline httpPipeline, AzureProfile profile, Authenticated aut this.dnsZoneManager = DnsZoneManager.authenticate(httpPipeline, profile, sdkContext); this.appServiceManager = AppServiceManager.authenticate(httpPipeline, profile, sdkContext); this.sqlServerManager = SqlServerManager.authenticate(httpPipeline, profile, sdkContext); - // this.serviceBusManager = ServiceBusManager.authenticate(restClient, subscriptionId, sdkContext); + this.serviceBusManager = ServiceBusManager.authenticate(httpPipeline, profile, sdkContext); this.containerInstanceManager = ContainerInstanceManager.authenticate(httpPipeline, profile, sdkContext); this.containerRegistryManager = ContainerRegistryManager.authenticate(httpPipeline, profile, sdkContext); this.containerServiceManager = ContainerServiceManager.authenticate(httpPipeline, profile, sdkContext); @@ -683,12 +685,12 @@ public SqlServers sqlServers() { return sqlServerManager.sqlServers(); } - // /** - // * @return entry point to managing Service Bus. - // */ - // public ServiceBusNamespaces serviceBusNamespaces() { - // return serviceBusManager.namespaces(); - // } + /** + * @return entry point to managing Service Bus. + */ + public ServiceBusNamespaces serviceBusNamespaces() { + return serviceBusManager.namespaces(); + } /** @return entry point to managing Service Bus operations. */ // TODO: To be revisited in the future diff --git a/sdk/resourcemanager/pom.xml b/sdk/resourcemanager/pom.xml index 9b730d82bed25..ab4f528454dcf 100644 --- a/sdk/resourcemanager/pom.xml +++ b/sdk/resourcemanager/pom.xml @@ -29,6 +29,7 @@ azure-resourcemanager-redis azure-resourcemanager-samples azure-resourcemanager-sql + azure-resourcemanager-servicebus azure-resourcemanager-storage azure-resourcemanager-trafficmanager azure-resourcemanager-test From 7c648963834cf2c59942c592b4035cf6e78ee140 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 4 Sep 2020 17:15:48 +0800 Subject: [PATCH 097/168] mgmt, port fixes from track1 (#14827) --- .../implementation/AppServicePlanImpl.java | 10 +++------- .../implementation/AppServicePlansImpl.java | 6 ++++++ .../implementation/FunctionAppImpl.java | 10 +++++++++- .../appservice/implementation/KuduClient.java | 19 +++++++++++++++---- 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServicePlanImpl.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServicePlanImpl.java index f5ebaf0dbcb26..5493a802c4572 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServicePlanImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServicePlanImpl.java @@ -13,8 +13,6 @@ import com.azure.resourcemanager.resources.fluentcore.utils.Utils; import reactor.core.publisher.Mono; -import java.util.Locale; - /** The implementation for AppServicePlan. */ class AppServicePlanImpl extends GroupableResourceImpl @@ -68,11 +66,9 @@ public PricingTier pricingTier() { @Override public OperatingSystem operatingSystem() { - if (inner().kind().toLowerCase(Locale.ROOT).contains("linux")) { - return OperatingSystem.LINUX; - } else { - return OperatingSystem.WINDOWS; - } + return (inner().reserved() == null || !inner().reserved()) + ? OperatingSystem.WINDOWS + : OperatingSystem.LINUX; } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServicePlansImpl.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServicePlansImpl.java index 85a07c60c3a0a..6fff264f3fb5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServicePlansImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServicePlansImpl.java @@ -3,6 +3,7 @@ package com.azure.resourcemanager.appservice.implementation; +import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.appservice.AppServiceManager; import com.azure.resourcemanager.appservice.models.AppServicePlan; import com.azure.resourcemanager.appservice.models.AppServicePlans; @@ -37,4 +38,9 @@ protected AppServicePlanImpl wrapModel(AppServicePlanInner inner) { public AppServicePlanImpl define(String name) { return wrapModel(name); } + + @Override + public PagedFlux listAsync() { + return wrapPageAsync(inner().listAsync(true)); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/FunctionAppImpl.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/FunctionAppImpl.java index 8aedd35bb03ca..66ef8e507ab67 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/FunctionAppImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/FunctionAppImpl.java @@ -39,6 +39,9 @@ import com.azure.resourcemanager.appservice.models.SkuName; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; +import com.azure.resourcemanager.resources.fluentcore.policy.AuthenticationPolicy; +import com.azure.resourcemanager.resources.fluentcore.policy.AuxiliaryAuthenticationPolicy; +import com.azure.resourcemanager.resources.fluentcore.policy.ProviderRegistrationPolicy; import com.azure.resourcemanager.storage.models.StorageAccount; import com.azure.resourcemanager.storage.models.StorageAccountKey; import com.azure.resourcemanager.storage.models.StorageAccountSkuType; @@ -119,7 +122,12 @@ private void initializeFunctionService() { List policies = new ArrayList<>(); for (int i = 0, count = manager().httpPipeline().getPolicyCount(); i < count; ++i) { - policies.add(manager().httpPipeline().getPolicy(i)); + HttpPipelinePolicy policy = manager().httpPipeline().getPolicy(i); + if (!(policy instanceof AuthenticationPolicy) + && !(policy instanceof ProviderRegistrationPolicy) + && !(policy instanceof AuxiliaryAuthenticationPolicy)) { + policies.add(policy); + } } policies.add(new FunctionAuthenticationPolicy(this)); HttpPipeline httpPipeline = new HttpPipelineBuilder() diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/KuduClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/KuduClient.java index 2f704de4c5d9e..f8c0bc2e4d207 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/KuduClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/KuduClient.java @@ -23,6 +23,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appservice.models.KuduAuthenticationPolicy; import com.azure.resourcemanager.appservice.models.WebAppBase; +import com.azure.resourcemanager.resources.fluentcore.policy.AuthenticationPolicy; +import com.azure.resourcemanager.resources.fluentcore.policy.AuxiliaryAuthenticationPolicy; +import com.azure.resourcemanager.resources.fluentcore.policy.ProviderRegistrationPolicy; import com.fasterxml.jackson.core.JsonParseException; import java.io.ByteArrayInputStream; @@ -65,7 +68,12 @@ class KuduClient { this.host = "https://" + host; List policies = new ArrayList<>(); for (int i = 0, count = webAppBase.manager().httpPipeline().getPolicyCount(); i < count; ++i) { - policies.add(webAppBase.manager().httpPipeline().getPolicy(i)); + HttpPipelinePolicy policy = webAppBase.manager().httpPipeline().getPolicy(i); + if (!(policy instanceof AuthenticationPolicy) + && !(policy instanceof ProviderRegistrationPolicy) + && !(policy instanceof AuxiliaryAuthenticationPolicy)) { + policies.add(policy); + } } policies.add(new KuduAuthenticationPolicy(webAppBase)); HttpPipeline httpPipeline = new HttpPipelineBuilder() @@ -326,17 +334,20 @@ private Mono withRetry(Mono observable) { flux -> flux .zipWith( - Flux.range(1, 30), + Flux.range(1, 6), (Throwable throwable, Integer integer) -> { if (throwable instanceof ManagementException && ((ManagementException) throwable).getResponse().getStatusCode() == 502 - || throwable instanceof JsonParseException) { + || throwable instanceof JsonParseException +// || throwable instanceof TimeoutException +// || throwable instanceof SocketTimeoutException + ) { return integer; } else { throw logger.logExceptionAsError(Exceptions.propagate(throwable)); } }) - .flatMap(i -> Mono.delay(Duration.ofSeconds(i)))); + .flatMap(i -> Mono.delay(Duration.ofSeconds(((long) i) * 10)))); } } From 99537ed48bfe55e8aea54de34b5ea5afedd31622 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 4 Sep 2020 17:16:33 +0800 Subject: [PATCH 098/168] mgmt update vm test (#14834) --- .../fluentcore/model/implementation/AcceptedImpl.java | 3 ++- .../resources/fluentcore/utils/SdkContext.java | 2 +- .../azure/resourcemanager/test/ResourceManagerTestBase.java | 2 +- .../src/test/java/com/azure/resourcemanager/AzureTests.java | 4 ---- .../azure/resourcemanager/TestVirtualMachineSyncPoller.java | 3 ++- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java index f025d6e09f38b..7c53a11ee5d67 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java @@ -23,6 +23,7 @@ import com.azure.resourcemanager.resources.fluentcore.model.Accepted; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; import com.azure.resourcemanager.resources.fluentcore.rest.ActivationResponse; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -285,7 +286,7 @@ public static , InnerT> Accepted newAccepted( activationResponse, client.getSerializerAdapter(), client.getHttpPipeline(), - client.getDefaultPollInterval(), + SdkContext.getDelayDuration(client.getDefaultPollInterval()), innerType, innerType, convertOperation); diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java index 03a299a9fcda7..b2b588815141d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/SdkContext.java @@ -94,7 +94,7 @@ public static void setDelayProvider(DelayProvider delayProvider) { * * @param milliseconds number of millisecond for which thread should put on sleep. */ - public static void sleep(int milliseconds) { + public static void sleep(long milliseconds) { try { Thread.sleep(delayProvider.getDelayDuration(Duration.ofMillis(milliseconds)).toMillis()); } catch (InterruptedException e) { diff --git a/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java index 446a3cddbf2fa..71306845dd3cf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-test/src/main/java/com/azure/resourcemanager/test/ResourceManagerTestBase.java @@ -95,7 +95,7 @@ protected String generateRandomUuid() { public static String password() { // do not record String password = new ResourceNamer("").randomName("Pa5$", 12); - new ClientLogger(ResourceManagerTestBase.class).info("Password: %s%n", password); + new ClientLogger(ResourceManagerTestBase.class).info("Password: {}", password); return password; } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java index 65f1f59d14403..74f069285c485 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java @@ -1010,10 +1010,6 @@ public void testVirtualMachineInAvailabilitySet() throws Exception { @Test public void testVirtualMachineSyncPoller() throws Exception { - if (skipInPlayback()) { - return; // skip now as taking too long time for PLAYBACK - } - new TestVirtualMachineSyncPoller(azure.networks().manager()) .runTest(azure.virtualMachines(), azure.resourceGroups()); } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java index 12e6b7e76b007..a9626f7471be4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java @@ -17,6 +17,7 @@ import com.azure.resourcemanager.network.models.PublicIpAddress; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.model.Accepted; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.test.ResourceManagerTestBase; import org.junit.jupiter.api.Assertions; @@ -89,7 +90,7 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc PollResponse networkInterfacePollResponse = networkInterfaceSyncPoller.poll(); PollResponse diskPollResponse = diskSyncPoller.poll(); while (!networkInterfacePollResponse.getStatus().isComplete() || !diskPollResponse.getStatus().isComplete()) { - Thread.sleep(Duration.ofSeconds(10).toMillis()); + SdkContext.sleep(Duration.ofSeconds(2).toMillis()); if (!networkInterfacePollResponse.getStatus().isComplete()) { networkInterfacePollResponse = networkInterfaceSyncPoller.poll(); From 8e7f5c0775ba869903be31d1fdca8047c702c163 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 4 Sep 2020 17:16:51 +0800 Subject: [PATCH 099/168] mgmt doc on throttling (#14777) --- sdk/resourcemanager/README.md | 4 +++ .../utils/ResourceManagerThrottlingInfo.java | 10 +++++--- sdk/resourcemanager/docs/THROTTLING.md | 25 +++++++++++++++++++ 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 sdk/resourcemanager/docs/THROTTLING.md diff --git a/sdk/resourcemanager/README.md b/sdk/resourcemanager/README.md index 0d02c433f3780..c1236fc9f4c2a 100644 --- a/sdk/resourcemanager/README.md +++ b/sdk/resourcemanager/README.md @@ -118,6 +118,10 @@ The key concepts of Azure Management Libraries includes: - Web app and Function app - Key Vault - Cosmos +- Monitor +- Spring Cloud +- Event Hubs +- Redis Cache ## Examples diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceManagerThrottlingInfo.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceManagerThrottlingInfo.java index 87c0a417028f0..c958282183f10 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceManagerThrottlingInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/ResourceManagerThrottlingInfo.java @@ -51,10 +51,12 @@ public ResourceManagerThrottlingInfo(HttpHeaders headers) { } } resourceRateLimit = headers.getValue(RESOURCE_RATE_LIMIT_HEADER); - Matcher matcher = RESOURCE_RATE_LIMIT_HEADER_PATTERN.matcher(resourceRateLimit); - while (matcher.find()) { - commonRateLimits.put( - String.format("%s-%s", RESOURCE_RATE_LIMIT_HEADER, matcher.group(1)), matcher.group(2)); + if (resourceRateLimit != null) { + Matcher matcher = RESOURCE_RATE_LIMIT_HEADER_PATTERN.matcher(resourceRateLimit); + while (matcher.find()) { + commonRateLimits.put( + String.format("%s-%s", RESOURCE_RATE_LIMIT_HEADER, matcher.group(1)), matcher.group(2)); + } } } diff --git a/sdk/resourcemanager/docs/THROTTLING.md b/sdk/resourcemanager/docs/THROTTLING.md new file mode 100644 index 0000000000000..f9b866b681f9f --- /dev/null +++ b/sdk/resourcemanager/docs/THROTTLING.md @@ -0,0 +1,25 @@ +# Guidance on ARM throttling + +Azure Resource Manager applies [throttling][arm-throttling] on the number of requests sent from client within certain span of time. + +Azure Management Libraries for Java provides some utilities to help on the challenge of throttling. + +## Retry when Too Many Requests + +By default, `RetryPolicy` is added to the HTTP pipeline. It will automatically re-attempt the request if it encounter Server error (500-599) as well as Too Many Requests (429). + +## Information on remaining requests + +HTTP policy `ResourceManagerThrottlingPolicy` can be added to HTTP pipeline, to provide real-time information on remaining requests, before throttling kick-in. + +```java +Azure azure = Azure.configure() + .withPolicy(new ResourceManagerThrottlingPolicy((response, throttlingInfo) -> { + // throttlingInfo.getRateLimit() + })) + ... +``` + +Be aware that many resource providers do not give rate information in response. `ResourceManagerThrottlingPolicy` provides best information on Azure Resource Manager throttling limit and limit from compute resource provider. + +[arm-throttling]: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/request-limits-and-throttling From 5eb479879edb8d96570d2265ed11e7cfac5cbe1c Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Fri, 4 Sep 2020 03:21:19 -0700 Subject: [PATCH 100/168] Initial KeyVaultAccessControlClient for Java (#12405) * Created azure-security-keyvault-administration module including its POM, README and CHANGELOG files. * Created AutoRest README and generated artifacts. * Added sync methods * Modified the AutoRest specification to generate async methods only. Renamed the generated AccessControl client and builder. * Created the AccessControl builder and clients (sync + async), public API for getting Role Definitions and some helper classes and resources. * Regenerated classes with AutoRest v4 instead of v3. * Added the 'KeyVault' prefix to all access control clients, implementation classes and their builders. * Added an API for listing role definitions. * Added APIs for creating, getting, deleting and listing role assignments. * Polished README. * Added the an entry for Key Vault Administration in version_client.txt * Renamed to not break the CI build. * Fixed copy/paste error on autorest.md * Changed README references (keys -> administration). * Addressed PR comments. Added a new ExpandableStringEnum: RoleScope. Corrected some of the Javadoc. * Addressed more PR feedback. * Added the new Key Vault Administration library to eng/jacoco-test-coverage/pom.xml * Re-generated code from the Swagger specification. * Renamed many of the implementation models. * Added additional null checks for members in public methods that accept KeyVaultRoleAssignmentProperties. * Added a module-info file. * Made small formatting corrections. * Removed an entry from module-info.java. Modified how KeyVaultAccessControlAsyncClient get error messages for parameter validation. * Added missing package-info.java files. * Corrected errors highlighted by APIView. * Reverted implementation classes to their original names and hid them from public API signatures. Added convenience layer models to be exposed as public API. * Renamed KeyVaultRoleScope to KeyVaultRoleAssignmentScope. * Fixed build issues. * Made model classes final. * Updated module-info.java * Renamed input parameter "scope" to "roleScope" in a multitude of public APIs. Corrected version number in files inside /eng. * Fixed package-info.java Javadoc. * Fixed some strings used for logging. * Fixed JavaDoc formatting issues pointed out by @g2vinay. * Added samples to README.md * Fixed build analysis issues with the module's POM. * Fixed Build analysis issue related to README. * Fixed broken links in autorest.md and README.md * Fixed a bug in `KeyVaultAccessControlAsyncClient.createRoleAssignmentWithResponse()`. Made fixes for tests cases. * Updated azure-core versions. --- eng/.docsettings.yml | 1 + eng/jacoco-test-coverage/pom.xml | 5 + eng/versioning/version_client.txt | 1 + .../CHANGELOG.md | 3 + .../README.md | 308 +++++++++ .../pom.xml | 121 ++++ .../KeyVaultAccessControlAsyncClient.java | 628 ++++++++++++++++++ .../KeyVaultAccessControlClient.java | 209 ++++++ .../KeyVaultAccessControlClientBuilder.java | 287 ++++++++ .../KeyVaultAccessControlClientImpl.java | 108 +++ ...eyVaultAccessControlClientImplBuilder.java | 69 ++ .../KeyVaultCredentialPolicy.java | 125 ++++ .../KeyVaultErrorCodeStrings.java | 53 ++ .../implementation/RoleAssignmentsImpl.java | 217 ++++++ .../implementation/RoleDefinitionsImpl.java | 121 ++++ .../implementation/ScopeTokenCache.java | 60 ++ .../implementation/models/Error.java | 57 ++ .../implementation/models/KeyVaultError.java | 27 + .../models/KeyVaultErrorException.java | 37 ++ .../implementation/models/Permission.java | 117 ++++ .../implementation/models/RoleAssignment.java | 83 +++ .../RoleAssignmentCreateParameters.java | 38 ++ .../models/RoleAssignmentFilter.java | 38 ++ .../models/RoleAssignmentListResult.java | 65 ++ .../models/RoleAssignmentProperties.java | 68 ++ .../RoleAssignmentPropertiesWithScope.java | 90 +++ .../implementation/models/RoleDefinition.java | 190 ++++++ .../models/RoleDefinitionFilter.java | 38 ++ .../models/RoleDefinitionListResult.java | 65 ++ .../implementation/models/package-info.java | 9 + .../implementation/package-info.java | 9 + .../models/KeyVaultPermission.java | 67 ++ .../models/KeyVaultRoleAssignment.java | 79 +++ .../KeyVaultRoleAssignmentProperties.java | 56 ++ .../models/KeyVaultRoleAssignmentScope.java | 36 + .../models/KeyVaultRoleDefinition.java | 69 ++ .../KeyVaultRoleDefinitionProperties.java | 81 +++ .../administration/models/package-info.java | 10 + .../keyvault/administration/package-info.java | 10 + .../src/main/java/module-info.java | 16 + .../azure-key-vault-administration.properties | 2 + .../main/resources/kvErrorStrings.properties | 3 + .../swagger/autorest.md | 52 ++ sdk/keyvault/pom.xml | 3 +- 44 files changed, 3730 insertions(+), 1 deletion(-) create mode 100644 sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md create mode 100644 sdk/keyvault/azure-security-keyvault-administration/README.md create mode 100644 sdk/keyvault/azure-security-keyvault-administration/pom.xml create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImpl.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImplBuilder.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultCredentialPolicy.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultErrorCodeStrings.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleAssignmentsImpl.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleDefinitionsImpl.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Error.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultError.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultErrorException.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Permission.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignment.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentCreateParameters.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentFilter.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentListResult.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentProperties.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentPropertiesWithScope.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinition.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionFilter.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionListResult.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentScope.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/module-info.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/resources/azure-key-vault-administration.properties create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/resources/kvErrorStrings.properties create mode 100644 sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index cc07234ec979d..708b726e87cf6 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -135,6 +135,7 @@ known_content_issues: - ['sdk/eventhubs/README.md', '#3113'] - ['sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md', '#3113'] - ['sdk/keyvault/README.md', '#3113'] + - ['sdk/keyvault/azure-security-keyvault-administration/README.md', '#3113'] - ['sdk/loganalytics/microsoft-azure-loganalytics/README.md', '#3113'] - ['sdk/parents/azure-client-sdk-parent/README.md', '#3113'] - ['sdk/search/azure-search-documents/swagger/readme.md', '#3113'] diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index a1714e5c7f398..1859e75b95e3f 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -166,6 +166,11 @@ azure-search-documents 11.1.0-beta.2 + + com.azure + azure-security-keyvault-administration + 4.0.0-beta.1 + com.azure azure-security-keyvault-certificates diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index a88688b0b358c..2b0a2fb0f2940 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -37,6 +37,7 @@ com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.1.2;1.2.0-beta.3 com.azure:azure-messaging-servicebus;7.0.0-beta.5;7.0.0-beta.6 com.azure:azure-search-documents;11.0.0;11.1.0-beta.2 com.azure:azure-search-perf;1.0.0-beta.1;1.0.0-beta.1 +com.azure:azure-security-keyvault-administration;4.0.0-beta.1;4.0.0-beta.1 com.azure:azure-security-keyvault-certificates;4.1.0;4.2.0-beta.1 com.azure:azure-security-keyvault-keys;4.2.0;4.3.0-beta.1 com.azure:azure-security-keyvault-secrets;4.2.0;4.3.0-beta.1 diff --git a/sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md new file mode 100644 index 0000000000000..6844fbdfbbd07 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History +## 4.0.0-beta.1 (Unreleased) +- Added `KeyVaultAccessControlClient`. diff --git a/sdk/keyvault/azure-security-keyvault-administration/README.md b/sdk/keyvault/azure-security-keyvault-administration/README.md new file mode 100644 index 0000000000000..ad6226a67d83d --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/README.md @@ -0,0 +1,308 @@ +# Azure Key Vault Administration library for Java + +## Getting started +### Adding the package to your project +Maven dependency for the Azure Key Vault Administration library. Add it to your project's POM file. + +[//]: # ({x-version-update-start;com.azure:azure-security-keyvault-administration;current}) +```xml + + com.azure + azure-security-keyvault-administration + 4.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- An existing [Azure Key Vault][azure_keyvault]. If you need to create a Key Vault, you can use the [Azure Cloud Shell](https://shell.azure.com/bash) to create one with this Azure CLI command. Replace `` and `` with your own, unique names: + + ```Bash + az keyvault create --resource-group --name + ``` + +### Authenticate the client +In order to interact with the Azure Key Vault service, you'll need to create an instance of the [KeyVaultAccessControlClient](#create-access-control-client) class. You would need a **vault url** and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object using the default `DefaultAzureCredential` examples shown in this document. + +The `DefaultAzureCredential` way of authentication by providing client secret credentials is being used in this getting started section but you can find more ways to authenticate with [azure-identity][azure_identity]. + +#### Create/Get credentials +To create/get client secret credentials you can use the [Azure Portal][azure_create_application_in_portal], [Azure CLI][azure_keyvault_cli_full] or [Azure Cloud Shell](https://shell.azure.com/bash) + +Here is an [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to + + * Create a service principal and configure its access to Azure resources: + + ```Bash + az ad sp create-for-rbac -n --skip-assignment + ``` + + Output: + + ```json + { + "appId": "generated-app-ID", + "displayName": "dummy-app-name", + "name": "http://dummy-app-name", + "password": "random-password", + "tenant": "tenant-ID" + } + ``` + +* Use the above returned credentials information to set the **AZURE_CLIENT_ID** (appId), **AZURE_CLIENT_SECRET** (password), and **AZURE_TENANT_ID** (tenantId) environment variables. The following example shows a way to do this in Bash: + + ```Bash + export AZURE_CLIENT_ID="generated-app-ID" + export AZURE_CLIENT_SECRET="random-password" + export AZURE_TENANT_ID="tenant-ID" + ``` + +* Take note of the service principal objectId + ```Bash + az ad sp show --id --query objectId + ``` + + Output: + ``` + "" + ``` + +* Use the aforementioned Key Vault name to retrieve details of your Key Vault, which also contain your Key Vault URL: + + ```Bash + az keyvault show --name + ``` + +#### Create Access Control client +Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET**, and **AZURE_TENANT_ID** environment variables and replaced **your-key-vault-url** with the URI returned above, you can create the KeyVaultAccessControlClient: + +```Java +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.security.keyvault.administration.KeyVaultAccessControlClient; +import com.azure.security.keyvault.administration.KeyVaultAccessControlClientBuilder; + +KeyVaultAccessControlClient accessControlClient = new KeyVaultAccessControlClientBuilder() + .vaultUrl("") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); +``` + +> NOTE: For using an asynchronous client use KeyVaultAccessControlAsyncClient instead of KeyVaultAccessControlClient and call `buildAsyncClient()` + +## Key concepts +### Role Definition +A role definition is a collection of permissions. It defines the operations that can be performed, such as read, write, and delete. It can also define the operations that are excluded from allowed operations. + +Role definitions can be listed and specified as part of a role assignment. + +### Role Assignment +A role assignment is the association of a role definition to a service principal. They can be created, listed, fetched individually, and deleted. + +### Key Vault Access Control client: +The Key Vault Access Control client performs the interactions with the Azure Key Vault service for getting, setting, deleting, and listing role assignments, as well as listing role definitions. Asynchronous (KeyVaultAccessControlAsyncClient) and synchronous (KeyVaultAccessControlClient) clients exist in the SDK allowing for the selection of a client based on an application's use case. Once you've initialized a role assignment, you can interact with the primary resource types in Key Vault. + +## Examples +### Sync API +The following sections provide several code snippets covering some of the most common Azure Key Vault Access Control service tasks, including: +- [List role definitions](#list-role-definitions) +- [List role assignments](#list-role-assignments) +- [Create a role assignment](#create-a-role-assignment) +- [Retrieve a role assignment](#retrieve-a-role-assignment) +- [Delete a role assignment](#delete-a-role-assignment) + +### List role definitions +List the role definitions in the key vault by calling `listRoleDefinitions`. + +```java +KeyVaultRoleAssignmentScope roleAssignmentScope = KeyVaultRoleAssignmentScope.GLOBAL; + +for (KeyVaultRoleDefinition roleDefinition : accessControlClient.listRoleDefinitions(roleAssignmentScope)) { + System.out.printf("Retrieved role definition with name \"%s\" and type \"%s\"%n", roleDefinition.getName(), + roleDefinition.getType()); +} +``` + +### List role assignments +List the role assignments in the key vault by calling `listRoleAssignments`. + +```java +KeyVaultRoleAssignmentScope roleAssignmentScope = KeyVaultRoleAssignmentScope.GLOBAL; + +for (KeyVaultRoleAssignment roleAssignment : accessControlClient.listRoleAssignments(roleAssignmentScope)) { + System.out.printf("Retrieved role assignment with name \"%s\" and type \"%s\"%n", roleAssignment.getName(), + roleAssignment.getType()); +} +``` + +### Create a role assignment +Create a role assignment to in the Azure Key Vault. To do this a role definition ID and a service principal object ID are required. + +A role definition ID can be obtained from the 'id' property of one of the role definitions returned from `listRoleDefinitions`. + +See the [Create/Get Credentials section](#createget-credentials) for links and instructions on how to generate a new service principal and obtain it's object ID. You can also get the object ID for your currently signed in account by running the following Azure CLI command: + +```Bash +az ad signed-in-user show --query objectId +``` + +```java +String roleDefinitionIdToAssign = ""; +String servicePrincipalObjectId = ""; + +KeyVaultRoleAssignmentProperties properties = + new KeyVaultRoleAssignmentProperties(roleDefinitionIdToAssign, servicePrincipalObjectId); +KeyVaultRoleAssignment createdAssignment = + accessControlClient.createRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, properties); + +System.out.printf("Created role assignment with name \"%s\" and type \"%s\"%n", createdAssignment.getName(), + createdAssignment.getType()); +``` + +### Retrieve a role assignment +Get an existing role assignment. To do this, the 'name' property from an existing role assignment is required. Let's use the `createdAssignment` from the previous example. + +```java +KeyVaultRoleAssignment retrievedAssignment = + accessControlClient.getRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, createdAssignment.getName()); + +System.out.printf("Retrieved role assignment with name \"%s\" and type \"%s\"%n", retrievedAssignment.getName(), + retrievedAssignment.getType()); +``` +### Delete a role assignment +To remove a role assignment from a service principal, the role assignment must be deleted. Let's delete the `createdAssignment` from the previous example. + +```java +KeyVaultRoleAssignment deletedAssignment = + accessControlClient.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, createdAssignment.getName()); + +System.out.printf("Deleted role assignment with name \"%s\" and type \"%s\"%n", deletedAssignment.getName(), + deletedAssignment.getType()); +``` + +### Async API +The following sections provide several code snippets covering some of the most common asynchronous Azure Key Vault Access Control service tasks, including: +- [List role definitions asynchronously](#list-role-definitions-asynchronously) +- [List role assignments asynchronously](#list-role-assignments-asynchronously) +- [Create a role assignment asynchronously](#create-a-role-assignment-asynchronously) +- [Retrieve a role assignment asynchronously](#retrieve-a-role-assignment-asynchronously) +- [Delete a role assignment asynchronously](#delete-a-role-assignment-asynchronously) + +> Note : You should add `System.in.read()` or `Thread.sleep()` after the function calls in the main class/thread to allow async functions/operations to execute and finish before the main application/thread exits. + +### List role definitions asynchronously +List the role definitions in the key vault by calling `listRoleDefinitions`. + +```java +KeyVaultRoleAssignmentScope roleAssignmentScope = KeyVaultRoleAssignmentScope.GLOBAL; + +accessControlAsyncClient.listRoleDefinitions(roleAssignmentScope)) + .subscribe(roleDefinition -> + System.out.printf("Retrieved role definition with name \"%s\" and type \"%s\"%n", roleDefinition.getName(), + roleDefinition.getType())); +``` + +### List role assignments asynchronously +List the role assignments in the key vault by calling `listRoleAssignments`. + +```java +KeyVaultRoleAssignmentScope roleAssignmentScope = KeyVaultRoleAssignmentScope.GLOBAL; + +accessControlAsyncClient.listRoleAssignments(roleAssignmentScope)) + .subscribe(roleAssignment -> + System.out.printf("Retrieved role assignment with name \"%s\" and type \"%s\"%n", roleAssignment.getName(), + roleAssignment.getType())); +``` + +### Create a role assignment asynchronously +Create a role assignment to in the Azure Key Vault. To do this a role definition ID and a service principal object ID are required. + +A role definition ID can be obtained from the 'id' property of one of the role definitions returned from `listRoleDefinitions`. + +See the [Create/Get Credentials section](#createget-credentials) for links and instructions on how to generate a new service principal and obtain it's object ID. You can also get the object ID for your currently signed in account by running the following Azure CLI command: + +```Bash +az ad signed-in-user show --query objectId +``` + +```java +String roleDefinitionIdToAssign = ""; +String servicePrincipalObjectId = ""; + +KeyVaultRoleAssignmentProperties properties = + new KeyVaultRoleAssignmentProperties(roleDefinitionIdToAssign, servicePrincipalObjectId); + +accessControlAsyncClient.createRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, properties) + .subscribe(createdAssignment -> + System.out.printf("Created role assignment with name \"%s\" and type \"%s\"%n", createdAssignment.getName(), + createdAssignment.getType())); +``` + +### Retrieve a role assignment asynchronously +Get an existing role assignment. To do this, the 'name' property from an existing role assignment is required. Let's use the `createdAssignment` from the previous example. + +```java +accessControlAsyncClient.getRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, createdAssignment.getName()) + .subscribe(retrievedAssignment -> + System.out.printf("Retrieved role assignment with name \"%s\" and type \"%s\"%n", retrievedAssignment.getName(), + retrievedAssignment.getType())); +``` +### Delete a role assignment asynchronously +To remove a role assignment from a service principal, the role assignment must be deleted. Let's delete the `createdAssignment` from the previous example. + +```java +accessControlAsyncClient.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, createdAssignment.getName()) + .subscribe(deletedAssignment -> + System.out.printf("Deleted role assignment with name \"%s\" and type \"%s\"%n", deletedAssignment.getName(), + deletedAssignment.getType())); +``` + +## Troubleshooting +### General +Azure Key Vault Access Control clients raise exceptions. For example, if you try to retrieve a role assignment after it is deleted a `404` error is returned, indicating the resource was not found. In the following snippet, the error is handled gracefully by catching the exception and displaying additional information about the error. + +```java +try { + accessControlClient.getRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, "") +} catch (HttpResponseException e) { + System.out.println(e.getMessage()); +} +``` + +### Default HTTP client +All client libraries by default use the Netty HTTP client. Adding the above dependency will automatically configure the client library to use the Netty HTTP client. Configuring or changing the HTTP client is detailed in the [HTTP clients wiki](https://github.com/Azure/azure-sdk-for-java/wiki/HTTP-clients). + +### Default SSL library +All client libraries, by default, use the Tomcat-native Boring SSL library to enable native-level performance for SSL operations. The Boring SSL library is an Uber JAR containing native libraries for Linux / macOS / Windows, and provides better performance compared to the default SSL implementation within the JDK. For more information, including how to reduce the dependency size, refer to the [performance tuning][performance_tuning] section of the wiki. + +## Next steps +Several Key Vault Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Azure Key Vault. + +### Additional documentation +For more extensive documentation on Azure Key Vault, see the [API reference documentation][azkeyvault_rest]. + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact with any additional questions or comments. + + +[source_code]: src +[api_documentation]: https://azure.github.io/azure-sdk-for-java +[azkeyvault_docs]: https://docs.microsoft.com/azure/key-vault/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/identity/azure-identity +[maven]: https://maven.apache.org/ +[azure_subscription]: https://azure.microsoft.com/ +[azure_keyvault]: https://docs.microsoft.com/azure/key-vault/quick-create-portal +[azure_cli]: https://docs.microsoft.com/cli/azure +[rest_api]: https://docs.microsoft.com/rest/api/keyvault/ +[azkeyvault_rest]: https://docs.microsoft.com/rest/api/keyvault/ +[azure_create_application_in_portal]: https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +[azure_keyvault_cli]: https://docs.microsoft.com/azure/key-vault/quick-create-cli +[azure_keyvault_cli_full]: https://docs.microsoft.com/cli/azure/keyvault?view=azure-cli-latest +[performance_tuning]: https://github.com/Azure/azure-sdk-for-java/wiki/Performance-Tuning + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fkeyvault%2Fazure-security-keyvault-administration%2FREADME.png) diff --git a/sdk/keyvault/azure-security-keyvault-administration/pom.xml b/sdk/keyvault/azure-security-keyvault-administration/pom.xml new file mode 100644 index 0000000000000..08da987d5cab5 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/pom.xml @@ -0,0 +1,121 @@ + + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + 4.0.0 + + com.azure + azure-security-keyvault-administration + 4.0.0-beta.1 + + Microsoft Azure client library for KeyVault Administration + This module contains client library for Microsoft Azure KeyVault Administration. + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + com.azure + azure-core + 1.8.0 + + + com.azure + azure-core-http-netty + 1.6.0 + + + + org.junit.jupiter + junit-jupiter-api + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-params + 5.6.2 + test + + + org.hamcrest + hamcrest-library + 2.2 + test + + + io.projectreactor + reactor-test + 3.3.9.RELEASE + test + + + com.azure + azure-core-test + 1.4.1 + test + + + com.azure + azure-core-http-okhttp + 1.3.0 + test + + + com.azure + azure-identity + 1.1.0 + test + + + + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + + --add-opens com.azure.security.keyvault.administration/com.azure.security.keyvault.administration=ALL-UNNAMED + + + + + + + + diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java new file mode 100644 index 0000000000000..ba8ccdb048eab --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.IterableStream; +import com.azure.core.util.logging.ClientLogger; +import com.azure.security.keyvault.administration.implementation.KeyVaultAccessControlClientImpl; +import com.azure.security.keyvault.administration.implementation.KeyVaultAccessControlClientImplBuilder; +import com.azure.security.keyvault.administration.implementation.KeyVaultErrorCodeStrings; +import com.azure.security.keyvault.administration.implementation.models.*; +import com.azure.security.keyvault.administration.models.*; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.withContext; +import static com.azure.core.util.tracing.Tracer.AZ_TRACING_NAMESPACE_KEY; + +/** + * The {@link KeyVaultAccessControlAsyncClient} provides asynchronous methods to view and manage Role Based Access + * for the Azure Key Vault. The client supports creating, listing, updating, and deleting + * {@link KeyVaultRoleAssignment role assignments}. Additionally, the client supports listing + * {@link KeyVaultRoleDefinition role definitions}. + */ +@ServiceClient(builder = KeyVaultAccessControlClientBuilder.class, isAsync = true) +public final class KeyVaultAccessControlAsyncClient { + // Please see here + // for more information on Azure resource provider namespaces. + private static final String KEYVAULT_TRACING_NAMESPACE_VALUE = "Microsoft.KeyVault"; + + /** + * The logger to be used. + */ + private final ClientLogger logger = new ClientLogger(KeyVaultAccessControlAsyncClient.class); + + /** + * The underlying AutoRest client used to interact with the Key Vault service. + */ + private final KeyVaultAccessControlClientImpl clientImpl; + + /** + * The Kay Vault URL this client is associated to. + */ + private final String vaultUrl; + + /** + * Package private constructor to be used by {@link KeyVaultAccessControlClientBuilder}. + */ + KeyVaultAccessControlAsyncClient(URL vaultUrl, HttpPipeline httpPipeline) { + Objects.requireNonNull(vaultUrl, + KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED)); + + this.vaultUrl = vaultUrl.toString(); + + clientImpl = new KeyVaultAccessControlClientImplBuilder() + .pipeline(httpPipeline) + .buildClient(); + } + + /** + * Gets the URL for the Key Vault this client is associated with. + * + * @return The Key Vault URL. + */ + public String getVaultUrl() { + return vaultUrl; + } + + /** + * Lists all {@link KeyVaultRoleDefinition role definitions} that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleDefinition role + * definitions}. + * @return A {@link PagedFlux} containing the {@link KeyVaultRoleDefinition role definitions} for the given + * {@link KeyVaultRoleAssignmentScope roleScope}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRoleDefinitions(KeyVaultRoleAssignmentScope roleScope) { + return new PagedFlux<>( + () -> withContext(context -> listRoleDefinitionsFirstPage(vaultUrl, roleScope, context)), + continuationToken -> withContext(context -> listRoleDefinitionsNextPage(continuationToken, context))); + } + + /** + * Lists all {@link KeyVaultRoleDefinition role definitions} that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleDefinition role + * definitions}. + * @param context Additional {@link Context} that is passed through the HTTP pipeline during the service call. + * @return A {@link PagedFlux} containing the {@link KeyVaultRoleDefinition role definitions} for the given + * {@link KeyVaultRoleAssignmentScope roleScope}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + PagedFlux listRoleDefinitions(KeyVaultRoleAssignmentScope roleScope, Context context) { + return new PagedFlux<>( + () -> listRoleDefinitionsFirstPage(vaultUrl, roleScope, context), + continuationToken -> listRoleDefinitionsNextPage(continuationToken, context)); + } + + /** + * Lists all {@link KeyVaultRoleDefinition role definitions} in the first page that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param vaultUrl The URL for the Key Vault this client is associated with. + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleDefinition}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link Mono} containing a {@link PagedResponse} of {@link KeyVaultRoleDefinition role definitions} + * for the given {@link KeyVaultRoleAssignmentScope roleScope} from the first page of results. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + Mono> listRoleDefinitionsFirstPage(String vaultUrl, KeyVaultRoleAssignmentScope roleScope, Context context) { + Objects.requireNonNull(roleScope, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'roleScope'")); + + try { + return clientImpl.getRoleDefinitions() + .listSinglePageAsync(vaultUrl, roleScope.toString(), null, + context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Listing role definitions for roleScope - {}", roleScope)) + .doOnSuccess(response -> logger.info("Listed role definitions for roleScope - {}", roleScope)) + .doOnError(error -> logger.warning(String.format("Failed to list role definitions for roleScope - %s", + roleScope), error)) + .map(this::transformRoleDefinitionsPagedResponse); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + /** + * Lists all {@link KeyVaultRoleDefinition role definitions} given by the {@code nextPageLink} that was retrieved + * from a call to + * {@link KeyVaultAccessControlAsyncClient#listRoleDefinitionsFirstPage(String, KeyVaultRoleAssignmentScope, Context)}. + * + * @param continuationToken The {@link PagedResponse#getContinuationToken() continuationToken} from a previous, + * successful call to one of the {@code listKeyVaultRoleDefinitions} operations. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link Mono} containing a {@link PagedResponse} of {@link KeyVaultRoleDefinition role definitions} + * for the given {@link KeyVaultRoleAssignmentScope roleScope} from the next page of results. + */ + Mono> listRoleDefinitionsNextPage(String continuationToken, Context context) { + try { + return clientImpl.getRoleDefinitions() + .listNextSinglePageAsync(continuationToken, context.addData(AZ_TRACING_NAMESPACE_KEY, + KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Listing next role definitions page - Page {}", continuationToken)) + .doOnSuccess(response -> logger.info("Listed next role definitions page - Page {}", continuationToken)) + .doOnError(error -> logger.warning("Failed to list next role definitions page - Page {}", + continuationToken, error)) + .map(this::transformRoleDefinitionsPagedResponse); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + /** + * Lists all {@link KeyVaultRoleAssignment role assignments} that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @return A {@link PagedFlux} containing the {@link KeyVaultRoleAssignment role assignments} for the given + * {@link KeyVaultRoleAssignmentScope roleScope}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRoleAssignments(KeyVaultRoleAssignmentScope roleScope) { + return new PagedFlux<>( + () -> withContext(context -> listRoleAssignmentsFirstPage(vaultUrl, roleScope, context)), + continuationToken -> withContext(context -> listRoleAssignmentsNextPage(continuationToken, context))); + } + + /** + * Lists all {@link KeyVaultRoleAssignment role assignments} that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link PagedFlux} containing the {@link KeyVaultRoleAssignment role assignments} for the given + * {@link KeyVaultRoleAssignmentScope roleScope}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + PagedFlux listRoleAssignments(KeyVaultRoleAssignmentScope roleScope, Context context) { + return new PagedFlux<>( + () -> listRoleAssignmentsFirstPage(vaultUrl, roleScope, context), + continuationToken -> listRoleAssignmentsNextPage(continuationToken, context)); + } + + /** + * Lists all {@link KeyVaultRoleAssignment role assignments} in the first page that are applicable at + * the given {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param vaultUrl The URL for the Key Vault this client is associated with. + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link Mono} containing a {@link PagedResponse} of {@link KeyVaultRoleAssignment role assignments} + * in the given {@link KeyVaultRoleAssignmentScope roleScope} from the first page of results. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + Mono> listRoleAssignmentsFirstPage(String vaultUrl, KeyVaultRoleAssignmentScope roleScope, Context context) { + Objects.requireNonNull(roleScope, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'roleScope'")); + + try { + return clientImpl.getRoleAssignments() + .listForScopeSinglePageAsync(vaultUrl, roleScope.toString(), null, + context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Listing role assignments for roleScope - {}", roleScope)) + .doOnSuccess(response -> logger.info("Listed role assignments for roleScope - {}", roleScope)) + .doOnError(error -> logger.warning(String.format("Failed to list role assignments for roleScope - %s", + roleScope), error)) + .map(this::transformRoleAssignmentsPagedResponse); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + /** + * Lists all {@link KeyVaultRoleAssignment role assignments} given by the {@code nextPageLink} that was + * retrieved from a call to + * {@link KeyVaultAccessControlAsyncClient#listRoleAssignments(KeyVaultRoleAssignmentScope)}. + * + * @param continuationToken The {@link PagedResponse#getContinuationToken() continuationToken} from a previous, + * successful call to one of the {@code listKeyVaultRoleAssignments} operations. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link Mono} containing a {@link PagedResponse} of {@link KeyVaultRoleAssignment role assignments} + * for the given {@link KeyVaultRoleAssignmentScope roleScope} from the first page of results. + */ + Mono> listRoleAssignmentsNextPage(String continuationToken, Context context) { + try { + return clientImpl.getRoleAssignments() + .listForScopeNextSinglePageAsync(continuationToken, context.addData(AZ_TRACING_NAMESPACE_KEY, + KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Listing next role assignments page - Page {}", continuationToken)) + .doOnSuccess(response -> logger.info("Listed next role assignments page - Page {}", continuationToken)) + .doOnError(error -> logger.warning("Failed to list next role assignments page - Page {}", + continuationToken, error)) + .map(this::transformRoleAssignmentsPagedResponse); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + /** + * Creates a {@link KeyVaultRoleAssignment} with a randomly generated {@link UUID name}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment} to + * create. + * @param properties Properties for the {@link KeyVaultRoleAssignment}. + * @return A {@link Mono} containing the created {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or + * {@link KeyVaultRoleAssignmentProperties properties} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRoleAssignment(KeyVaultRoleAssignmentScope roleScope, KeyVaultRoleAssignmentProperties properties) { + return createRoleAssignment(roleScope, UUID.randomUUID(), properties); + } + + /** + * Creates a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment} to + * create. + * @param name The name used to create the {@link KeyVaultRoleAssignment}. It can be any valid UUID. + * @param properties Properties for the {@link KeyVaultRoleAssignment}. + * @return A {@link Mono} containing the created {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope}, {@link UUID name} or + * {@link KeyVaultRoleAssignmentProperties properties} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRoleAssignment(KeyVaultRoleAssignmentScope roleScope, UUID name, KeyVaultRoleAssignmentProperties properties) { + return createRoleAssignmentWithResponse(roleScope, name, properties).flatMap(FluxUtil::toMono); + } + + /** + * Creates a {@link KeyVaultRoleAssignment} with a randomly generated {@link UUID name}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment} to + * create. + * @param properties Properties for the {@link KeyVaultRoleAssignment}. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the created + * {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or + * {@link KeyVaultRoleAssignmentProperties properties} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, KeyVaultRoleAssignmentProperties properties) { + return createRoleAssignmentWithResponse(roleScope, UUID.randomUUID(), properties); + } + + /** + * Creates a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment} to + * create. + * @param name The name used to create the {@link KeyVaultRoleAssignment}. It can be any valid UUID. + * @param properties Properties for the {@link KeyVaultRoleAssignment}. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the created + * {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope}, {@link UUID name} or + * {@link KeyVaultRoleAssignmentProperties properties} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, UUID name, KeyVaultRoleAssignmentProperties properties) { + return withContext(context -> createRoleAssignmentWithResponse(roleScope, name, properties, context)); + } + + /** + * Creates a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment} to + * create. + * @param name The name used to create the {@link KeyVaultRoleAssignment}. It can be any valid UUID. + * @param properties Properties for the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the created + * {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope}, {@link UUID name} or + * {@link KeyVaultRoleAssignmentProperties properties} are {@code null}. + */ + Mono> createRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, UUID name, KeyVaultRoleAssignmentProperties properties, Context context) { + Objects.requireNonNull(roleScope, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'roleScope'")); + Objects.requireNonNull(name, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'name'")); + Objects.requireNonNull(properties, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'properties'")); + + RoleAssignmentProperties roleAssignmentProperties = + new RoleAssignmentProperties() + .setRoleDefinitionId(properties.getRoleDefinitionId()) + .setPrincipalId(properties.getPrincipalId()); + RoleAssignmentCreateParameters parameters = + new RoleAssignmentCreateParameters() + .setProperties(roleAssignmentProperties); + + return clientImpl.getRoleAssignments() + .createWithResponseAsync(vaultUrl, roleScope.toString(), name.toString(), parameters, + context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Creating role assignment - {}", name)) + .doOnSuccess(response -> logger.info("Created role assignment - {}", response.getValue().getName())) + .doOnError(error -> logger.warning("Failed to create role assignment - {}", name, error)) + .map(this::transformRoleAssignmentResponse); + } + + /** + * Gets a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name used of the {@link KeyVaultRoleAssignment}. + * @return A {@link Mono} containing the {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link String name} are + * {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRoleAssignment(KeyVaultRoleAssignmentScope roleScope, String name) { + return getRoleAssignmentWithResponse(roleScope, name).flatMap(FluxUtil::toMono); + } + + /** + * Gets a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the + * {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link String name} are + * {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, String name) { + return withContext(context -> getRoleAssignmentWithResponse(roleScope, name, context)); + } + + /** + * Gets a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the + * {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link String name} are + * {@code null}. + */ + Mono> getRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, String name, Context context) { + Objects.requireNonNull(roleScope, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'roleScope'")); + Objects.requireNonNull(name, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'name'")); + + try { + return clientImpl.getRoleAssignments() + .getWithResponseAsync(vaultUrl, roleScope.toString(), name, context.addData(AZ_TRACING_NAMESPACE_KEY, + KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Retrieving role assignment - {}", name)) + .doOnSuccess(response -> logger.info("Retrieved role assignment - {}", response.getValue().getName())) + .doOnError(error -> logger.warning("Failed to retrieved role assignment - {}", name, error)) + .map(this::transformRoleAssignmentResponse); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + /** + * Deletes a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @return A {@link Mono} containing the {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link String name} are + * {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRoleAssignment(KeyVaultRoleAssignmentScope roleScope, String name) { + return deleteRoleAssignmentWithResponse(roleScope, name).flatMap(FluxUtil::toMono); + } + + /** + * Deletes a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the + * {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link String name} are + * {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, String name) { + return withContext(context -> deleteRoleAssignmentWithResponse(roleScope, name, context)); + } + + /** + * Deletes a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the + * {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link String name} are + * {@code null}. + */ + Mono> deleteRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, String name, Context context) { + Objects.requireNonNull(roleScope, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'roleScope'")); + Objects.requireNonNull(name, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'name'")); + + try { + return clientImpl.getRoleAssignments() + .deleteWithResponseAsync(vaultUrl, roleScope.toString(), name, context.addData(AZ_TRACING_NAMESPACE_KEY, + KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Deleting role assignment - {}", name)) + .doOnSuccess(response -> logger.info("Deleted role assignment - {}", response.getValue().getName())) + .doOnError(error -> logger.warning("Failed to delete role assignment - {}", name, error)) + .map(this::transformRoleAssignmentResponse); + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + private PagedResponse transformRoleDefinitionsPagedResponse(PagedResponse pagedResponse) { + List keyVaultRoleDefinitions = new ArrayList<>(); + + for (RoleDefinition roleDefinition : pagedResponse.getValue()) { + keyVaultRoleDefinitions.add(roleDefinitionToKeyVaultRoleDefinition(roleDefinition)); + } + + return new PagedResponse() { + @Override + public void close() throws IOException { + } + + @Override + public IterableStream getElements() { + return new IterableStream<>(keyVaultRoleDefinitions); + } + + @Override + public String getContinuationToken() { + return pagedResponse.getContinuationToken(); + } + + @Override + public int getStatusCode() { + return pagedResponse.getStatusCode(); + } + + @Override + public HttpHeaders getHeaders() { + return pagedResponse.getHeaders(); + } + + @Override + public HttpRequest getRequest() { + return pagedResponse.getRequest(); + } + + @Override + public List getValue() { + return keyVaultRoleDefinitions; + } + }; + } + + private Response transformRoleAssignmentResponse(Response response) { + KeyVaultRoleAssignment keyVaultRoleAssignment = roleAssignmentToKeyVaultRoleAssignment(response.getValue()); + + return new Response() { + @Override + public int getStatusCode() { + return response.getStatusCode(); + } + + @Override + public HttpHeaders getHeaders() { + return response.getHeaders(); + } + + @Override + public HttpRequest getRequest() { + return response.getRequest(); + } + + @Override + public KeyVaultRoleAssignment getValue() { + return keyVaultRoleAssignment; + } + }; + } + + private KeyVaultRoleDefinition roleDefinitionToKeyVaultRoleDefinition(RoleDefinition roleDefinition) { + List keyVaultPermissions = new ArrayList<>(); + + for (Permission permission : roleDefinition.getPermissions()) { + keyVaultPermissions.add( + new KeyVaultPermission(permission.getActions(), permission.getDataActions(), + permission.getDataActions(), permission.getNotDataActions())); + } + + return new KeyVaultRoleDefinition(roleDefinition.getId(), roleDefinition.getName(), roleDefinition.getType(), + new KeyVaultRoleDefinitionProperties(roleDefinition.getRoleName(), + roleDefinition.getDescription(), roleDefinition.getRoleType(), keyVaultPermissions, + roleDefinition.getAssignableScopes())); + } + + private PagedResponse transformRoleAssignmentsPagedResponse(PagedResponse pagedResponse) { + List keyVaultRoleAssignments = new ArrayList<>(); + + for (RoleAssignment roleAssignment : pagedResponse.getValue()) { + keyVaultRoleAssignments.add(roleAssignmentToKeyVaultRoleAssignment(roleAssignment)); + } + + return new PagedResponse() { + @Override + public void close() throws IOException { + } + + @Override + public IterableStream getElements() { + return new IterableStream<>(keyVaultRoleAssignments); + } + + @Override + public String getContinuationToken() { + return pagedResponse.getContinuationToken(); + } + + @Override + public int getStatusCode() { + return pagedResponse.getStatusCode(); + } + + @Override + public HttpHeaders getHeaders() { + return pagedResponse.getHeaders(); + } + + @Override + public HttpRequest getRequest() { + return pagedResponse.getRequest(); + } + + @Override + public List getValue() { + return keyVaultRoleAssignments; + } + }; + } + + private KeyVaultRoleAssignment roleAssignmentToKeyVaultRoleAssignment(RoleAssignment roleAssignment) { + RoleAssignmentPropertiesWithScope propertiesWithScope = roleAssignment.getProperties(); + + return new KeyVaultRoleAssignment(roleAssignment.getId(), roleAssignment.getName(), roleAssignment.getType(), + new KeyVaultRoleAssignmentProperties(propertiesWithScope.getRoleDefinitionId(), + propertiesWithScope.getPrincipalId()), KeyVaultRoleAssignmentScope.fromString(propertiesWithScope.getScope())); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java new file mode 100644 index 0000000000000..d4cdcff2808ae --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.security.keyvault.administration.models.*; +import reactor.core.publisher.Mono; + +import java.util.UUID; + +/** + * The {@link KeyVaultAccessControlClient} provides synchronous methods to view and manage Role Based Access for the + * Azure Key Vault. The client supports creating, listing, updating, and deleting {@link KeyVaultRoleAssignment role + * assignments}. Additionally, the client supports listing {@link KeyVaultRoleDefinition role definitions}. + */ +@ServiceClient(builder = KeyVaultAccessControlClientBuilder.class) +public final class KeyVaultAccessControlClient { + private final KeyVaultAccessControlAsyncClient asyncClient; + + /** + * Creates an {@link KeyVaultAccessControlClient} that uses a {@link com.azure.core.http.HttpPipeline pipeline} + * to service requests. + * + * @param asyncClient The {@link KeyVaultAccessControlAsyncClient} that this client routes its request through. + */ + KeyVaultAccessControlClient(KeyVaultAccessControlAsyncClient asyncClient) { + this.asyncClient = asyncClient; + } + + /** + * Gets the URL for the Key Vault this client is associated with. + * + * @return The Key Vault URL. + */ + public String getVaultUrl() { + return asyncClient.getVaultUrl(); + } + + /** + * Get all {@link KeyVaultRoleDefinition role definitions} that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleDefinition role + * definitions}. + * @return A {@link PagedIterable} containing the {@link KeyVaultRoleDefinition role definitions} for the given + * {@link KeyVaultRoleAssignmentScope roleScope}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRoleDefinitions(KeyVaultRoleAssignmentScope roleScope) { + return new PagedIterable<>(asyncClient.listRoleDefinitions(roleScope, Context.NONE)); + } + + /** + * Get all {@link KeyVaultRoleDefinition role definitions} that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleDefinition role + * definitions}. + * @param context Additional {@link Context} that is passed through the HTTP pipeline during the service call. + * @return A {@link PagedIterable} containing the {@link KeyVaultRoleDefinition role definitions} for the given + * {@link KeyVaultRoleAssignmentScope roleScope}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRoleDefinitions(KeyVaultRoleAssignmentScope roleScope, Context context) { + return new PagedIterable<>(asyncClient.listRoleDefinitions(roleScope, context)); + } + + /** + * Get all {@link KeyVaultRoleAssignment role assignments} that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @return A {@link PagedIterable} containing the {@link KeyVaultRoleAssignment role assignments} for the given + * {@link KeyVaultRoleAssignmentScope roleScope}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRoleAssignments(KeyVaultRoleAssignmentScope roleScope) { + return new PagedIterable<>(asyncClient.listRoleAssignments(roleScope, Context.NONE)); + } + + /** + * Get all {@link KeyVaultRoleAssignment role assignments} that are applicable at the given + * {@link KeyVaultRoleAssignmentScope roleScope} and above. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link PagedIterable} containing the {@link KeyVaultRoleAssignment role assignments} for the given + * {@link KeyVaultRoleAssignmentScope roleScope}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} is {@code null}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRoleAssignments(KeyVaultRoleAssignmentScope roleScope, Context context) { + return new PagedIterable<>(asyncClient.listRoleAssignments(roleScope, context)); + } + + /** + * Creates a {@link KeyVaultRoleAssignment} with a randomly generated {@link UUID name}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment} to + * create. + * @param properties Properties for the {@link KeyVaultRoleAssignment}. + * @return The created {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or + * {@link KeyVaultRoleAssignmentProperties properties} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyVaultRoleAssignment createRoleAssignment(KeyVaultRoleAssignmentScope roleScope, KeyVaultRoleAssignmentProperties properties) { + return createRoleAssignmentWithResponse(roleScope, UUID.randomUUID(), properties, Context.NONE).getValue(); + } + + /** + * Creates a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment} to + * create. + * @param name The name used to create the {@link KeyVaultRoleAssignment}. It can be any valid UUID. + * @param properties Properties for the {@link KeyVaultRoleAssignment}. + * @return The created {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope}, {@link UUID name} or + * {@link KeyVaultRoleAssignmentProperties properties} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyVaultRoleAssignment createRoleAssignment(KeyVaultRoleAssignmentScope roleScope, UUID name, KeyVaultRoleAssignmentProperties properties) { + return createRoleAssignmentWithResponse(roleScope, name, properties, Context.NONE).getValue(); + } + + /** + * Creates a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment} to + * create. + * @param name The name used to create the {@link KeyVaultRoleAssignment}. It can be any valid UUID. + * @param properties Properties for the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains the created + * {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope}, {@link UUID name} or + * {@link KeyVaultRoleAssignmentProperties properties} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, UUID name, KeyVaultRoleAssignmentProperties properties, Context context) { + return asyncClient.createRoleAssignmentWithResponse(roleScope, name, properties, context).block(); + } + + /** + * Gets a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @return The {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link UUID name} are + * {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyVaultRoleAssignment getRoleAssignment(KeyVaultRoleAssignmentScope roleScope, String name) { + return getRoleAssignmentWithResponse(roleScope, name, Context.NONE).getValue(); + } + + /** + * Gets a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @return The {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link UUID name} are + * {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, String name, Context context) { + return asyncClient.getRoleAssignmentWithResponse(roleScope, name, context).block(); + } + + /** + * Deletes a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @return The {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link UUID name} are + * {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyVaultRoleAssignment deleteRoleAssignment(KeyVaultRoleAssignmentScope roleScope, String name) { + return deleteRoleAssignmentWithResponse(roleScope, name, Context.NONE).getValue(); + } + + /** + * Deletes a {@link KeyVaultRoleAssignment}. + * + * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. + * @param name The name of the {@link KeyVaultRoleAssignment}. + * @return The {@link KeyVaultRoleAssignment}. + * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link UUID name} are + * {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, String name, Context context) { + return asyncClient.deleteRoleAssignmentWithResponse(roleScope, name, context).block(); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java new file mode 100644 index 0000000000000..2bfa61f3a75f4 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.*; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.security.keyvault.administration.implementation.KeyVaultCredentialPolicy; +import com.azure.security.keyvault.administration.implementation.KeyVaultErrorCodeStrings; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * This class provides a fluent builder API to help aid the configuration and instantiation of the + * {@link KeyVaultAccessControlAsyncClient} and {@link KeyVaultAccessControlClient}, by calling + * {@link KeyVaultAccessControlClientBuilder#buildAsyncClient()} and + * {@link KeyVaultAccessControlClientBuilder#buildClient()} respectively. It constructs an instance of the desired + * client. + * + *

    The minimal configuration options required by {@link KeyVaultAccessControlClientBuilder} to build an + * an {@link KeyVaultAccessControlAsyncClient} are {@link String vaultUrl} and {@link TokenCredential credential}.

    + * + *

    The {@link HttpLogDetailLevel}, multiple custom {@link HttpLoggingPolicy policies} and custom + * {@link HttpClient} can be optionally configured in the {@link KeyVaultAccessControlClientBuilder}.

    + * + *

    Alternatively, a custom {@link HttpPipeline} with custom {@link HttpPipelinePolicy} policies and {@link String + * vaultUrl} can be specified. It provides finer control over the construction of + * {@link KeyVaultAccessControlAsyncClient} and {@link KeyVaultAccessControlClient} instances.

    + * + *

    The minimal configuration options required by {@link KeyVaultAccessControlClientBuilder} to build an + * {@link KeyVaultAccessControlClient} are {@link String vaultUrl} and {@link TokenCredential credential}.

    + * + * @see KeyVaultAccessControlAsyncClient + * @see KeyVaultAccessControlClient + */ +@ServiceClientBuilder(serviceClients = {KeyVaultAccessControlClient.class, KeyVaultAccessControlAsyncClient.class}) +public final class KeyVaultAccessControlClientBuilder { + // This is the properties file name. + private static final String AZURE_KEY_VAULT_RBAC = "azure-key-vault-administration.properties"; + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; + + private final ClientLogger logger = new ClientLogger(KeyVaultAccessControlClientBuilder.class); + private final List policies; + private final Map properties; + + private TokenCredential credential; + private HttpPipeline pipeline; + private URL vaultUrl; + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private RetryPolicy retryPolicy; + private Configuration configuration; + + /** + * Creates a {@link KeyVaultAccessControlClientBuilder} instance that is able to configure and construct + * instances of {@link KeyVaultAccessControlClient} and {@link KeyVaultAccessControlAsyncClient}. + */ + public KeyVaultAccessControlClientBuilder() { + retryPolicy = new RetryPolicy(); + httpLogOptions = new HttpLogOptions(); + policies = new ArrayList<>(); + properties = CoreUtils.getProperties(AZURE_KEY_VAULT_RBAC); + } + + /** + * Creates an {@link KeyVaultAccessControlClient} based on options set in the Builder. Every time {@code + * buildClient()} is called a new instance of {@link KeyVaultAccessControlClient} is created. + *

    + * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline} and + * {@link #vaultUrl(String) vaultUrl} are used to create the {@link KeyVaultAccessControlClient client}. All other + * builder settings are ignored. + * + * @return An {@link KeyVaultAccessControlClient} with the options set from the builder. + * @throws NullPointerException If {@code vaultUrl} is {@code null}. + */ + public KeyVaultAccessControlClient buildClient() { + return new KeyVaultAccessControlClient(buildAsyncClient()); + } + + /** + * Creates a {@link KeyVaultAccessControlAsyncClient} based on options set in the Builder. Every time {@code + * buildAsyncClient()} is called a new instance of {@link KeyVaultAccessControlAsyncClient} is created. + *

    + * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline} and + * {@link #vaultUrl(String) endpoint} are used to create the {@link KeyVaultAccessControlAsyncClient client}. All + * other builder settings are ignored. + * + * @return An {@link KeyVaultAccessControlAsyncClient} with the options set from the builder. + * @throws NullPointerException If {@code vaultUrl} is {@code null}. + */ + public KeyVaultAccessControlAsyncClient buildAsyncClient() { + Configuration buildConfiguration = (configuration == null) + ? Configuration.getGlobalConfiguration().clone() + : configuration; + + URL buildEndpoint = getBuildEndpoint(buildConfiguration); + + if (buildEndpoint == null) { + throw logger.logExceptionAsError( + new IllegalStateException( + KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED))); + } + + if (pipeline != null) { + return new KeyVaultAccessControlAsyncClient(vaultUrl, pipeline); + } + + // Closest to API goes first, closest to wire goes last. + final List policies = new ArrayList<>(); + + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + + policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, + buildConfiguration)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + this.policies.add(new KeyVaultCredentialPolicy(credential)); + policies.addAll(this.policies); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + + HttpPipeline buildPipeline = new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + + return new KeyVaultAccessControlAsyncClient(vaultUrl, buildPipeline); + } + + /** + * Sets the URL to the Key Vault on which the client operates. Appears as "DNS Name" in the Azure portal. + * + * @param vaultUrl The vault URL is used as destination on Azure to send requests to. + * @return The updated {@link KeyVaultAccessControlClientBuilder} object. + * @throws IllegalArgumentException If {@code vaultUrl} is null or it cannot be parsed into a valid URL. + */ + public KeyVaultAccessControlClientBuilder vaultUrl(String vaultUrl) { + try { + this.vaultUrl = new URL(vaultUrl); + } catch (MalformedURLException e) { + throw logger.logExceptionAsWarning( + new IllegalArgumentException("The Azure Key Vault URL is malformed.", e)); + } + + return this; + } + + /** + * Sets the credential to use when authenticating HTTP requests. + * + * @param credential The credential to use for authenticating HTTP requests. + * @return The updated {@link KeyVaultAccessControlClientBuilder} object. + * @throws NullPointerException If {@code credential} is {@code null}. + */ + public KeyVaultAccessControlClientBuilder credential(TokenCredential credential) { + Objects.requireNonNull(credential); + + this.credential = credential; + + return this; + } + + /** + * Sets the logging configuration for HTTP requests and responses. + * + *

    If logLevel is not provided, default value of {@link HttpLogDetailLevel#NONE} is set.

    + * + * @param logOptions The logging configuration to use when sending and receiving HTTP requests/responses. + * @return The updated {@link KeyVaultAccessControlClientBuilder} object. + */ + public KeyVaultAccessControlClientBuilder httpLogOptions(HttpLogOptions logOptions) { + httpLogOptions = logOptions; + + return this; + } + + /** + * Adds a policy to the set of existing policies that are executed after and {@link KeyVaultAccessControlClient} + * {@link KeyVaultAccessControlAsyncClient} required policies. + * + * @param policy The {@link HttpPipelinePolicy policy} to be added. + * @return The updated {@link KeyVaultAccessControlClientBuilder} object. + * @throws NullPointerException If {@code policy} is {@code null}. + */ + public KeyVaultAccessControlClientBuilder addPolicy(HttpPipelinePolicy policy) { + Objects.requireNonNull(policy); + + policies.add(policy); + + return this; + } + + /** + * Sets the HTTP client to use for sending and receiving requests to and from the service. + * + * @param client The HTTP client to use for requests. + * @return The updated {@link KeyVaultAccessControlClientBuilder} object. + * @throws NullPointerException If {@code client} is {@code null}. + */ + public KeyVaultAccessControlClientBuilder httpClient(HttpClient client) { + Objects.requireNonNull(client); + + this.httpClient = client; + + return this; + } + + /** + * Sets the HTTP pipeline to use for the service client. + *

    + * If {@code pipeline} is set, all other settings are ignored, aside from + * {@link KeyVaultAccessControlClientBuilder#vaultUrl(String) vaultUrl} to build {@link KeyVaultAccessControlClient} + * or {@link KeyVaultAccessControlAsyncClient}. + * + * @param pipeline The HTTP pipeline to use for sending service requests and receiving responses. + * @return The updated {@link KeyVaultAccessControlClientBuilder} object. + */ + public KeyVaultAccessControlClientBuilder pipeline(HttpPipeline pipeline) { + Objects.requireNonNull(pipeline); + this.pipeline = pipeline; + return this; + } + + /** + * Sets the configuration store that is used during construction of the service client. + *

    + * The default configuration store is a clone of the {@link Configuration#getGlobalConfiguration() global + * configuration store}, use {@link Configuration#NONE} to bypass using configuration settings during construction. + * + * @param configuration The configuration store used to get configuration details. + * @return The updated {@link KeyVaultAccessControlClientBuilder} object. + */ + public KeyVaultAccessControlClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + + return this; + } + + /** + * Sets the {@link RetryPolicy} that is used when each request is sent. + *

    + * The default retry policy will be used in the pipeline, if not provided. + * + * @param retryPolicy User's retry policy applied to each request. + * @return The updated {@link KeyVaultAccessControlClientBuilder} object. + * @throws NullPointerException If the specified {@code retryPolicy} is null. + */ + public KeyVaultAccessControlClientBuilder retryPolicy(RetryPolicy retryPolicy) { + Objects.requireNonNull(retryPolicy, "The retry policy cannot be bull"); + + this.retryPolicy = retryPolicy; + + return this; + } + + private URL getBuildEndpoint(Configuration configuration) { + if (vaultUrl != null) { + return vaultUrl; + } + + String configEndpoint = configuration.get("AZURE_KEYVAULT_ENDPOINT"); + + if (CoreUtils.isNullOrEmpty(configEndpoint)) { + return null; + } + + try { + return new URL(configEndpoint); + } catch (MalformedURLException ex) { + return null; + } + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImpl.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImpl.java new file mode 100644 index 0000000000000..1eedce941db53 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImpl.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** Initializes a new instance of the KeyVaultAccessControlClient type. */ +public final class KeyVaultAccessControlClientImpl { + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The RoleDefinitionsImpl object to access its operations. */ + private final RoleDefinitionsImpl roleDefinitions; + + /** + * Gets the RoleDefinitionsImpl object to access its operations. + * + * @return the RoleDefinitionsImpl object. + */ + public RoleDefinitionsImpl getRoleDefinitions() { + return this.roleDefinitions; + } + + /** The RoleAssignmentsImpl object to access its operations. */ + private final RoleAssignmentsImpl roleAssignments; + + /** + * Gets the RoleAssignmentsImpl object to access its operations. + * + * @return the RoleAssignmentsImpl object. + */ + public RoleAssignmentsImpl getRoleAssignments() { + return this.roleAssignments; + } + + /** Initializes an instance of KeyVaultAccessControlClient client. */ + KeyVaultAccessControlClientImpl() { + this( + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(), + JacksonAdapter.createDefaultSerializerAdapter()); + } + + /** + * Initializes an instance of KeyVaultAccessControlClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + */ + KeyVaultAccessControlClientImpl(HttpPipeline httpPipeline) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter()); + } + + /** + * Initializes an instance of KeyVaultAccessControlClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + */ + KeyVaultAccessControlClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.apiVersion = "7.2-preview"; + this.roleDefinitions = new RoleDefinitionsImpl(this); + this.roleAssignments = new RoleAssignmentsImpl(this); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImplBuilder.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImplBuilder.java new file mode 100644 index 0000000000000..d135ff4387b13 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImplBuilder.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** A builder for creating a new instance of the KeyVaultAccessControlClient type. */ +@ServiceClientBuilder(serviceClients = {KeyVaultAccessControlClientImpl.class}) +public final class KeyVaultAccessControlClientImplBuilder { + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the KeyVaultAccessControlClientImplBuilder. + */ + public KeyVaultAccessControlClientImplBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the KeyVaultAccessControlClientImplBuilder. + */ + public KeyVaultAccessControlClientImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of KeyVaultAccessControlClientImpl with the provided parameters. + * + * @return an instance of KeyVaultAccessControlClientImpl. + */ + public KeyVaultAccessControlClientImpl buildClient() { + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); + } + KeyVaultAccessControlClientImpl client = new KeyVaultAccessControlClientImpl(pipeline, serializerAdapter); + return client; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultCredentialPolicy.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultCredentialPolicy.java new file mode 100644 index 0000000000000..947721a0cdc4a --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultCredentialPolicy.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.implementation; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.credential.TokenRequestContext; +import com.azure.core.http.HttpPipelineCallContext; +import com.azure.core.http.HttpPipelineNextPolicy; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.publisher.Mono; + +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; + +/** + * A policy that authenticates requests with Azure Key Vault service. The content added by this policy is leveraged + * in {@link TokenCredential} to get and set the correct "Authorization" header value. + * + * @see TokenCredential + */ +public final class KeyVaultCredentialPolicy implements HttpPipelinePolicy { + private final ClientLogger logger = new ClientLogger(KeyVaultCredentialPolicy.class); + private static final String WWW_AUTHENTICATE = "WWW-Authenticate"; + private static final String BEARER_TOKEN_PREFIX = "Bearer "; + private static final String AUTHORIZATION = "Authorization"; + private final ScopeTokenCache cache; + + /** + * Creates KeyVaultCredentialPolicy. + * + * @param credential the token credential to authenticate the request + */ + public KeyVaultCredentialPolicy(TokenCredential credential) { + Objects.requireNonNull(credential); + + this.cache = new ScopeTokenCache(credential::getToken); + } + + /** + * Adds the required header to authenticate a request to Azure Key Vault service. + * + * @param context The request {@link HttpPipelineCallContext context}. + * @param next The next HTTP pipeline policy to process the {@link HttpPipelineCallContext context's} request + * after this policy completes. + * @return A {@link Mono} representing the {@link HttpResponse HTTP response} that will arrive asynchronously. + */ + @Override + public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { + if (!context.getHttpRequest().getUrl().getProtocol().startsWith("https")) { + return Mono.error(new RuntimeException("Token credentials require a URL using the HTTPS protocol scheme")); + } + + return next.clone().process() + .doOnNext(httpResponse -> { + // KV follows challenge based auth. Currently every service + // call hit the endpoint for challenge and then resend the + // request with token. The challenge response body is not + // consumed, not draining/closing the body will result in leak. + // Ref: https://github.com/Azure/azure-sdk-for-java/issues/7934 + // https://github.com/Azure/azure-sdk-for-java/issues/10467 + try { + httpResponse.getBody().subscribe().dispose(); + } catch (RuntimeException ignored) { + logger.logExceptionAsWarning(ignored); + } + // The ReactorNettyHttpResponse::close() should be sufficient + // and should take care similar body disposal but looks like that + // is not happening, need to re-visit the close() method. + }) + .map(res -> res.getHeaderValue(WWW_AUTHENTICATE)) + .map(header -> extractChallenge(header, BEARER_TOKEN_PREFIX)) + .flatMap(map -> { + cache.setTokenRequest(new TokenRequestContext().addScopes(map.get("resource") + "/.default")); + return cache.getToken(); + }) + .flatMap(token -> { + context.getHttpRequest().setHeader(AUTHORIZATION, BEARER_TOKEN_PREFIX + token.getToken()); + return next.process(); + }); + } + + /** + * Extracts the challenge off the authentication header. + * + * @param authenticateHeader The authentication header containing all the challenges. + * @param authChallengePrefix The authentication challenge name. + * @return A challenge map. + */ + private static Map extractChallenge(String authenticateHeader, String authChallengePrefix) { + if (!isValidChallenge(authenticateHeader, authChallengePrefix)) { + return null; + } + + authenticateHeader = + authenticateHeader.toLowerCase(Locale.ROOT).replace(authChallengePrefix.toLowerCase(Locale.ROOT), ""); + + String[] challenges = authenticateHeader.split(", "); + Map challengeMap = new HashMap<>(); + + for (String pair : challenges) { + String[] keyValue = pair.split("="); + challengeMap.put(keyValue[0].replaceAll("\"", ""), keyValue[1].replaceAll("\"", "")); + } + + return challengeMap; + } + + /** + * Verifies whether a challenge is bearer or not. + * + * @param authenticateHeader The authentication header containing all the challenges. + * @param authChallengePrefix The authentication challenge name. + * @return A boolean indicating tha challenge is valid or not. + */ + private static boolean isValidChallenge(String authenticateHeader, String authChallengePrefix) { + return (!CoreUtils.isNullOrEmpty(authenticateHeader) + && authenticateHeader.toLowerCase(Locale.ROOT).startsWith(authChallengePrefix.toLowerCase(Locale.ROOT))); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultErrorCodeStrings.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultErrorCodeStrings.java new file mode 100644 index 0000000000000..9421a205af76b --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultErrorCodeStrings.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.implementation; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +public class KeyVaultErrorCodeStrings { + static final String ERROR_STRINGS_FILE_NAME = "kvErrorStrings.properties"; + private static Properties errorStrings; + + /** + * The property name of Azure Key Vault Credentials required error string. + */ + public static final String CREDENTIAL_REQUIRED = "credential_required"; + + /** + * The property name of Azure Key Vault Endpoint required error string. + */ + public static final String VAULT_END_POINT_REQUIRED = "vault_endpoint_required"; + + /** + * The property name of Azure Key Vault Parameter required error string. + */ + public static final String PARAMETER_REQUIRED = "parameter_required"; + + /** + * Gets the error String for the specified property. + * + * @param propertyName the property name for which error string is required. + * @return The {@link String value} containing the error message. + */ + public static String getErrorString(String propertyName) { + loadProperties(); + return errorStrings.getProperty(propertyName); + } + + private static synchronized void loadProperties() { + if (errorStrings == null) { + try (InputStream fileInputStream = + KeyVaultErrorCodeStrings.class.getClassLoader().getResource((ERROR_STRINGS_FILE_NAME)).openStream()) { + errorStrings = new Properties(); + errorStrings.load(fileInputStream); + } catch (IOException ex) { + ex.printStackTrace(); + } + } + } +} + + diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleAssignmentsImpl.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleAssignmentsImpl.java new file mode 100644 index 0000000000000..ef7d31d6b48bf --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleAssignmentsImpl.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.security.keyvault.administration.implementation.models.KeyVaultErrorException; +import com.azure.security.keyvault.administration.implementation.models.RoleAssignment; +import com.azure.security.keyvault.administration.implementation.models.RoleAssignmentCreateParameters; +import com.azure.security.keyvault.administration.implementation.models.RoleAssignmentListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RoleAssignments. */ +public final class RoleAssignmentsImpl { + /** The proxy service used to perform REST calls. */ + private final RoleAssignmentsService service; + + /** The service client containing this operation class. */ + private final KeyVaultAccessControlClientImpl client; + + /** + * Initializes an instance of RoleAssignmentsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RoleAssignmentsImpl(KeyVaultAccessControlClientImpl client) { + this.service = + RestProxy.create(RoleAssignmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for KeyVaultAccessControlClientRoleAssignments to be used by the proxy + * service to perform REST calls. + */ + @Host("{vaultBaseUrl}") + @ServiceInterface(name = "KeyVaultAccessContro") + private interface RoleAssignmentsService { + @Delete("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> delete( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @PathParam(value = "scope", encoded = true) String scope, + @PathParam("roleAssignmentName") String roleAssignmentName, + @QueryParam("api-version") String apiVersion, + Context context); + + @Put("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> create( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @PathParam(value = "scope", encoded = true) String scope, + @PathParam("roleAssignmentName") String roleAssignmentName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RoleAssignmentCreateParameters parameters, + Context context); + + @Get("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> get( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @PathParam(value = "scope", encoded = true) String scope, + @PathParam("roleAssignmentName") String roleAssignmentName, + @QueryParam("api-version") String apiVersion, + Context context); + + @Get("/{scope}/providers/Microsoft.Authorization/roleAssignments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> listForScope( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @PathParam(value = "scope", encoded = true) String scope, + @QueryParam("$filter") String filter, + @QueryParam("api-version") String apiVersion, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> listForScopeNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Deletes a role assignment. + * + * @param vaultBaseUrl simple string. + * @param scope The scope of the role assignment to delete. + * @param roleAssignmentName The name of the role assignment to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String vaultBaseUrl, String scope, String roleAssignmentName, Context context) { + return service.delete(vaultBaseUrl, scope, roleAssignmentName, this.client.getApiVersion(), context); + } + + /** + * Creates a role assignment. + * + * @param vaultBaseUrl simple string. + * @param scope The scope of the role assignment to create. + * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID. + * @param parameters Role assignment create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponseAsync( + String vaultBaseUrl, + String scope, + String roleAssignmentName, + RoleAssignmentCreateParameters parameters, + Context context) { + return service.create( + vaultBaseUrl, scope, roleAssignmentName, this.client.getApiVersion(), parameters, context); + } + + /** + * Get the specified role assignment. + * + * @param vaultBaseUrl simple string. + * @param scope The scope of the role assignment. + * @param roleAssignmentName The name of the role assignment to get. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified role assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String vaultBaseUrl, String scope, String roleAssignmentName, Context context) { + return service.get(vaultBaseUrl, scope, roleAssignmentName, this.client.getApiVersion(), context); + } + + /** + * Gets role assignments for a scope. + * + * @param vaultBaseUrl simple string. + * @param scope The scope of the role assignments. + * @param filter The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or + * above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope + * for the specified principal. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignments for a scope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listForScopeSinglePageAsync( + String vaultBaseUrl, String scope, String filter, Context context) { + return service.listForScope(vaultBaseUrl, scope, filter, this.client.getApiVersion(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getValue(), + res.getValue().getNextLink(), + null)); + } + + /** + * 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 KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment list operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listForScopeNextSinglePageAsync(String nextLink, Context context) { + return service.listForScopeNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getValue(), + res.getValue().getNextLink(), + null)); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleDefinitionsImpl.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleDefinitionsImpl.java new file mode 100644 index 0000000000000..0bb245c326f43 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleDefinitionsImpl.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.security.keyvault.administration.implementation.models.KeyVaultErrorException; +import com.azure.security.keyvault.administration.implementation.models.RoleDefinition; +import com.azure.security.keyvault.administration.implementation.models.RoleDefinitionListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RoleDefinitions. */ +public final class RoleDefinitionsImpl { + /** The proxy service used to perform REST calls. */ + private final RoleDefinitionsService service; + + /** The service client containing this operation class. */ + private final KeyVaultAccessControlClientImpl client; + + /** + * Initializes an instance of RoleDefinitionsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RoleDefinitionsImpl(KeyVaultAccessControlClientImpl client) { + this.service = + RestProxy.create(RoleDefinitionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for KeyVaultAccessControlClientRoleDefinitions to be used by the proxy + * service to perform REST calls. + */ + @Host("{vaultBaseUrl}") + @ServiceInterface(name = "KeyVaultAccessContro") + private interface RoleDefinitionsService { + @Get("/{scope}/providers/Microsoft.Authorization/roleDefinitions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> list( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @PathParam(value = "scope", encoded = true) String scope, + @QueryParam("$filter") String filter, + @QueryParam("api-version") String apiVersion, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Get all role definitions that are applicable at scope and above. + * + * @param vaultBaseUrl simple string. + * @param scope The scope of the role definition. + * @param filter The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as + * well. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all role definitions that are applicable at scope and above. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync( + String vaultBaseUrl, String scope, String filter, Context context) { + return service.list(vaultBaseUrl, scope, filter, this.client.getApiVersion(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getValue(), + res.getValue().getNextLink(), + null)); + } + + /** + * 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 KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition list operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, Context context) { + return service.listNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getValue(), + res.getValue().getNextLink(), + null)); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java new file mode 100644 index 0000000000000..c7f1aaba7b6da --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.implementation; + +import com.azure.core.credential.AccessToken; +import com.azure.core.credential.TokenRequestContext; +import reactor.core.publisher.FluxSink; +import reactor.core.publisher.Mono; +import reactor.core.publisher.ReplayProcessor; + +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.Function; + +/** + * A token cache that supports caching a token and refreshing it. + */ +class ScopeTokenCache { + private final AtomicBoolean wip; + private AccessToken cache; + private final ReplayProcessor emitterProcessor = ReplayProcessor.create(1); + private final FluxSink sink = emitterProcessor.sink(FluxSink.OverflowStrategy.BUFFER); + private final Function> getNew; + private TokenRequestContext request; + + + /** + * Creates an instance of RefreshableTokenCredential with default scheme "Bearer". + * + * @param getNew a method to get a new token + */ + ScopeTokenCache(Function> getNew) { + this.wip = new AtomicBoolean(false); + this.getNew = getNew; + } + + public void setTokenRequest(TokenRequestContext request) { + this.request = request; + } + + /** + * Asynchronously get a token from either the cache or replenish the cache with a new token. + * @return a Publisher that emits an AccessToken + */ + public Mono getToken() { + if (cache != null && !cache.isExpired()) { + return Mono.just(cache); + } + return Mono.defer(() -> { + if (!wip.getAndSet(true)) { + return getNew.apply(request).doOnNext(ac -> cache = ac) + .doOnNext(sink::next) + .doOnError(sink::error) + .doOnTerminate(() -> wip.set(false)); + } else { + return emitterProcessor.next(); + } + }); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Error.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Error.java new file mode 100644 index 0000000000000..7d7efb8e170e7 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Error.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Error model. */ +@Immutable +public final class Error { + /* + * The error code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * The error message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * The key vault server error. + */ + @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) + private Error innerError; + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Get the innerError property: The key vault server error. + * + * @return the innerError value. + */ + public Error getInnerError() { + return this.innerError; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultError.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultError.java new file mode 100644 index 0000000000000..e7a84828d10c0 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultError.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyVaultError model. */ +@Immutable +public final class KeyVaultError { + /* + * The key vault server error. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private Error error; + + /** + * Get the error property: The key vault server error. + * + * @return the error value. + */ + public Error getError() { + return this.error; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultErrorException.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultErrorException.java new file mode 100644 index 0000000000000..77b9441be30ee --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultErrorException.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.security.keyvault.administration.implementation.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** Exception thrown for an invalid response with KeyVaultError information. */ +public final class KeyVaultErrorException extends HttpResponseException { + /** + * Initializes a new instance of the KeyVaultErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public KeyVaultErrorException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the KeyVaultErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public KeyVaultErrorException(String message, HttpResponse response, KeyVaultError value) { + super(message, response, value); + } + + @Override + public KeyVaultError getValue() { + return (KeyVaultError) super.getValue(); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Permission.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Permission.java new file mode 100644 index 0000000000000..d1feaf6d24e4d --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Permission.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Permission model. */ +@Fluent +public final class Permission { + /* + * Allowed actions. + */ + @JsonProperty(value = "actions") + private List actions; + + /* + * Denied actions. + */ + @JsonProperty(value = "notActions") + private List notActions; + + /* + * Allowed Data actions. + */ + @JsonProperty(value = "dataActions") + private List dataActions; + + /* + * Denied Data actions. + */ + @JsonProperty(value = "notDataActions") + private List notDataActions; + + /** + * Get the actions property: Allowed actions. + * + * @return the actions value. + */ + public List getActions() { + return this.actions; + } + + /** + * Set the actions property: Allowed actions. + * + * @param actions the actions value to set. + * @return the Permission object itself. + */ + public Permission setActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the notActions property: Denied actions. + * + * @return the notActions value. + */ + public List getNotActions() { + return this.notActions; + } + + /** + * Set the notActions property: Denied actions. + * + * @param notActions the notActions value to set. + * @return the Permission object itself. + */ + public Permission setNotActions(List notActions) { + this.notActions = notActions; + return this; + } + + /** + * Get the dataActions property: Allowed Data actions. + * + * @return the dataActions value. + */ + public List getDataActions() { + return this.dataActions; + } + + /** + * Set the dataActions property: Allowed Data actions. + * + * @param dataActions the dataActions value to set. + * @return the Permission object itself. + */ + public Permission setDataActions(List dataActions) { + this.dataActions = dataActions; + return this; + } + + /** + * Get the notDataActions property: Denied Data actions. + * + * @return the notDataActions value. + */ + public List getNotDataActions() { + return this.notDataActions; + } + + /** + * Set the notDataActions property: Denied Data actions. + * + * @param notDataActions the notDataActions value to set. + * @return the Permission object itself. + */ + public Permission setNotDataActions(List notDataActions) { + this.notDataActions = notDataActions; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignment.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignment.java new file mode 100644 index 0000000000000..1d06ce14088f8 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignment.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RoleAssignment model. */ +@Fluent +public final class RoleAssignment { + /* + * The role assignment ID. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The role assignment name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The role assignment type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Role assignment properties. + */ + @JsonProperty(value = "properties") + private RoleAssignmentPropertiesWithScope properties; + + /** + * Get the id property: The role assignment ID. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Get the name property: The role assignment name. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Get the type property: The role assignment type. + * + * @return the type value. + */ + public String getType() { + return this.type; + } + + /** + * Get the properties property: Role assignment properties. + * + * @return the properties value. + */ + public RoleAssignmentPropertiesWithScope getProperties() { + return this.properties; + } + + /** + * Set the properties property: Role assignment properties. + * + * @param properties the properties value to set. + * @return the RoleAssignment object itself. + */ + public RoleAssignment setProperties(RoleAssignmentPropertiesWithScope properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentCreateParameters.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentCreateParameters.java new file mode 100644 index 0000000000000..56d16b847a065 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentCreateParameters.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RoleAssignmentCreateParameters model. */ +@Fluent +public final class RoleAssignmentCreateParameters { + /* + * Role assignment properties. + */ + @JsonProperty(value = "properties", required = true) + private RoleAssignmentProperties properties; + + /** + * Get the properties property: Role assignment properties. + * + * @return the properties value. + */ + public RoleAssignmentProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Role assignment properties. + * + * @param properties the properties value to set. + * @return the RoleAssignmentCreateParameters object itself. + */ + public RoleAssignmentCreateParameters setProperties(RoleAssignmentProperties properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentFilter.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentFilter.java new file mode 100644 index 0000000000000..c04d69f36bd93 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentFilter.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RoleAssignmentFilter model. */ +@Fluent +public final class RoleAssignmentFilter { + /* + * Returns role assignment of the specific principal. + */ + @JsonProperty(value = "principalId") + private String principalId; + + /** + * Get the principalId property: Returns role assignment of the specific principal. + * + * @return the principalId value. + */ + public String getPrincipalId() { + return this.principalId; + } + + /** + * Set the principalId property: Returns role assignment of the specific principal. + * + * @param principalId the principalId value to set. + * @return the RoleAssignmentFilter object itself. + */ + public RoleAssignmentFilter setPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentListResult.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentListResult.java new file mode 100644 index 0000000000000..72a6eb8440a6d --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentListResult.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The RoleAssignmentListResult model. */ +@Fluent +public final class RoleAssignmentListResult { + /* + * Role assignment list. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to use for getting the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Role assignment list. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: Role assignment list. + * + * @param value the value value to set. + * @return the RoleAssignmentListResult object itself. + */ + public RoleAssignmentListResult setValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to use for getting the next set of results. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL to use for getting the next set of results. + * + * @param nextLink the nextLink value to set. + * @return the RoleAssignmentListResult object itself. + */ + public RoleAssignmentListResult setNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentProperties.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentProperties.java new file mode 100644 index 0000000000000..0ab892817a1ee --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentProperties.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RoleAssignmentProperties model. */ +@Fluent +public final class RoleAssignmentProperties { + /* + * The role definition ID used in the role assignment. + */ + @JsonProperty(value = "roleDefinitionId", required = true) + private String roleDefinitionId; + + /* + * The principal ID assigned to the role. This maps to the ID inside the + * Active Directory. It can point to a user, service principal, or security + * group. + */ + @JsonProperty(value = "principalId", required = true) + private String principalId; + + /** + * Get the roleDefinitionId property: The role definition ID used in the role assignment. + * + * @return the roleDefinitionId value. + */ + public String getRoleDefinitionId() { + return this.roleDefinitionId; + } + + /** + * Set the roleDefinitionId property: The role definition ID used in the role assignment. + * + * @param roleDefinitionId the roleDefinitionId value to set. + * @return the RoleAssignmentProperties object itself. + */ + public RoleAssignmentProperties setRoleDefinitionId(String roleDefinitionId) { + this.roleDefinitionId = roleDefinitionId; + return this; + } + + /** + * Get the principalId property: The principal ID assigned to the role. This maps to the ID inside the Active + * Directory. It can point to a user, service principal, or security group. + * + * @return the principalId value. + */ + public String getPrincipalId() { + return this.principalId; + } + + /** + * Set the principalId property: The principal ID assigned to the role. This maps to the ID inside the Active + * Directory. It can point to a user, service principal, or security group. + * + * @param principalId the principalId value to set. + * @return the RoleAssignmentProperties object itself. + */ + public RoleAssignmentProperties setPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentPropertiesWithScope.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentPropertiesWithScope.java new file mode 100644 index 0000000000000..ff50c91dc2aea --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentPropertiesWithScope.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RoleAssignmentPropertiesWithScope model. */ +@Fluent +public final class RoleAssignmentPropertiesWithScope { + /* + * The role assignment scope. + */ + @JsonProperty(value = "scope") + private String scope; + + /* + * The role definition ID. + */ + @JsonProperty(value = "roleDefinitionId") + private String roleDefinitionId; + + /* + * The principal ID. + */ + @JsonProperty(value = "principalId") + private String principalId; + + /** + * Get the scope property: The role assignment scope. + * + * @return the scope value. + */ + public String getScope() { + return this.scope; + } + + /** + * Set the scope property: The role assignment scope. + * + * @param scope the scope value to set. + * @return the RoleAssignmentPropertiesWithScope object itself. + */ + public RoleAssignmentPropertiesWithScope setScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get the roleDefinitionId property: The role definition ID. + * + * @return the roleDefinitionId value. + */ + public String getRoleDefinitionId() { + return this.roleDefinitionId; + } + + /** + * Set the roleDefinitionId property: The role definition ID. + * + * @param roleDefinitionId the roleDefinitionId value to set. + * @return the RoleAssignmentPropertiesWithScope object itself. + */ + public RoleAssignmentPropertiesWithScope setRoleDefinitionId(String roleDefinitionId) { + this.roleDefinitionId = roleDefinitionId; + return this; + } + + /** + * Get the principalId property: The principal ID. + * + * @return the principalId value. + */ + public String getPrincipalId() { + return this.principalId; + } + + /** + * Set the principalId property: The principal ID. + * + * @param principalId the principalId value to set. + * @return the RoleAssignmentPropertiesWithScope object itself. + */ + public RoleAssignmentPropertiesWithScope setPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinition.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinition.java new file mode 100644 index 0000000000000..5383e4acbb8a1 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinition.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The RoleDefinition model. */ +@JsonFlatten +@Fluent +public class RoleDefinition { + /* + * The role definition ID. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The role definition name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The role definition type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The role name. + */ + @JsonProperty(value = "properties.roleName") + private String roleName; + + /* + * The role definition description. + */ + @JsonProperty(value = "properties.description") + private String description; + + /* + * The role type. + */ + @JsonProperty(value = "properties.type") + private String roleType; + + /* + * Role definition permissions. + */ + @JsonProperty(value = "properties.permissions") + private List permissions; + + /* + * Role definition assignable scopes. + */ + @JsonProperty(value = "properties.assignableScopes") + private List assignableScopes; + + /** + * Get the id property: The role definition ID. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Get the name property: The role definition name. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Get the type property: The role definition type. + * + * @return the type value. + */ + public String getType() { + return this.type; + } + + /** + * Get the roleName property: The role name. + * + * @return the roleName value. + */ + public String getRoleName() { + return this.roleName; + } + + /** + * Set the roleName property: The role name. + * + * @param roleName the roleName value to set. + * @return the RoleDefinition object itself. + */ + public RoleDefinition setRoleName(String roleName) { + this.roleName = roleName; + return this; + } + + /** + * Get the description property: The role definition description. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: The role definition description. + * + * @param description the description value to set. + * @return the RoleDefinition object itself. + */ + public RoleDefinition setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the roleType property: The role type. + * + * @return the roleType value. + */ + public String getRoleType() { + return this.roleType; + } + + /** + * Set the roleType property: The role type. + * + * @param roleType the roleType value to set. + * @return the RoleDefinition object itself. + */ + public RoleDefinition setRoleType(String roleType) { + this.roleType = roleType; + return this; + } + + /** + * Get the permissions property: Role definition permissions. + * + * @return the permissions value. + */ + public List getPermissions() { + return this.permissions; + } + + /** + * Set the permissions property: Role definition permissions. + * + * @param permissions the permissions value to set. + * @return the RoleDefinition object itself. + */ + public RoleDefinition setPermissions(List permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get the assignableScopes property: Role definition assignable scopes. + * + * @return the assignableScopes value. + */ + public List getAssignableScopes() { + return this.assignableScopes; + } + + /** + * Set the assignableScopes property: Role definition assignable scopes. + * + * @param assignableScopes the assignableScopes value to set. + * @return the RoleDefinition object itself. + */ + public RoleDefinition setAssignableScopes(List assignableScopes) { + this.assignableScopes = assignableScopes; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionFilter.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionFilter.java new file mode 100644 index 0000000000000..ce01792ed37f0 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionFilter.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RoleDefinitionFilter model. */ +@Fluent +public final class RoleDefinitionFilter { + /* + * Returns role definition with the specific name. + */ + @JsonProperty(value = "roleName") + private String roleName; + + /** + * Get the roleName property: Returns role definition with the specific name. + * + * @return the roleName value. + */ + public String getRoleName() { + return this.roleName; + } + + /** + * Set the roleName property: Returns role definition with the specific name. + * + * @param roleName the roleName value to set. + * @return the RoleDefinitionFilter object itself. + */ + public RoleDefinitionFilter setRoleName(String roleName) { + this.roleName = roleName; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionListResult.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionListResult.java new file mode 100644 index 0000000000000..fa52f012f1541 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionListResult.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The RoleDefinitionListResult model. */ +@Fluent +public final class RoleDefinitionListResult { + /* + * Role definition list. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to use for getting the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: Role definition list. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: Role definition list. + * + * @param value the value value to set. + * @return the RoleDefinitionListResult object itself. + */ + public RoleDefinitionListResult setValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to use for getting the next set of results. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL to use for getting the next set of results. + * + * @param nextLink the nextLink value to set. + * @return the RoleDefinitionListResult object itself. + */ + public RoleDefinitionListResult setNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java new file mode 100644 index 0000000000000..3ad2fecedd55a --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for KeyVaultAccessControlClient. The key vault client performs cryptographic key + * operations and vault operations against the Key Vault service. + */ +package com.azure.security.keyvault.administration.implementation.models; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java new file mode 100644 index 0000000000000..2f88bbe093558 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations and inner classes for KeyVaultAccessControlClient. The key vault client + * performs cryptographic key operations and vault operations against the Key Vault service. + */ +package com.azure.security.keyvault.administration.implementation; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java new file mode 100644 index 0000000000000..d987cbb040726 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +import java.util.List; + +/** + * A class describing allowed and denied actions and data actions of a {@link KeyVaultRoleDefinition}. + */ +public final class KeyVaultPermission { + private List actions; + private List deniedActions; + private List dataActions; + private List deniedDataActions; + + /** + * Creates a new {@link KeyVaultPermission} with the specified allowed and denied actions and data actions. + * + * @param actions The actions this {@link KeyVaultPermission permission} allows. + * @param deniedActions The actions this {@link KeyVaultPermission permission} denies. + * @param dataActions The data actions this {@link KeyVaultPermission permission} allows. + * @param deniedDataActions The data actions this {@link KeyVaultPermission permission} denies. + */ + public KeyVaultPermission(List actions, List deniedActions, List dataActions, List deniedDataActions) { + this.actions = actions; + this.deniedActions = deniedActions; + this.dataActions = dataActions; + this.deniedDataActions = deniedDataActions; + } + + /** + * Get the actions this {@link KeyVaultPermission permission} allows. + * + * @return The allowed actions. + */ + public List getActions() { + return actions; + } + + /** + * Get the actions this {@link KeyVaultPermission permission} denies. + * + * @return The denied actions. + */ + public List getDeniedActions() { + return deniedActions; + } + + /** + * Get the data actions this {@link KeyVaultPermission permission} allows. + * + * @return The allowed data actions. + */ + public List getDataActions() { + return dataActions; + } + + /** + * Get the data actions this {@link KeyVaultPermission permission} denies. + * + * @return The denied data actions. + */ + public List getDeniedDataActions() { + return deniedDataActions; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java new file mode 100644 index 0000000000000..ef085aea877b3 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +/** + * A class that defines a role assignment. + */ +public final class KeyVaultRoleAssignment { + private String id; + private String name; + private String type; + private KeyVaultRoleAssignmentProperties properties; + private KeyVaultRoleAssignmentScope scope; + + /** + * Creates a new {@link KeyVaultRoleAssignment role assignment} with the specified details. + * + * @param id The ID for this {@link KeyVaultRoleAssignment role assignment}. + * @param name The name of this {@link KeyVaultRoleAssignment role assignment}. + * @param type The type of this {@link KeyVaultRoleAssignment role assignment}. + * @param properties {@link KeyVaultRoleAssignmentProperties properties} of this {@link KeyVaultRoleAssignment + * role assignment}. + * @param roleScope The {@link KeyVaultRoleAssignmentScope scope} of this {@link KeyVaultRoleAssignment role + * assignment}. + */ + public KeyVaultRoleAssignment(String id, String name, String type, KeyVaultRoleAssignmentProperties properties, KeyVaultRoleAssignmentScope roleScope) { + this.id = id; + this.name = name; + this.type = type; + this.properties = properties; + this.scope = roleScope; + } + + /** + * Get the {@link KeyVaultRoleAssignment role assignment} ID. + * + * @return The {@link KeyVaultRoleAssignment role assignment} ID. + */ + public String getId() { + return id; + } + + /** + * Get the {@link KeyVaultRoleAssignment role assignment} name. + * + * @return The {@link KeyVaultRoleAssignment role assignment} name. + */ + public String getName() { + return name; + } + + /** + * Get the {@link KeyVaultRoleAssignment role assignment} type. + * + * @return The {@link KeyVaultRoleAssignment role assignment} type. + */ + public String getType() { + return type; + } + + /** + * Get the {@link KeyVaultRoleAssignment role assignment} {@link KeyVaultRoleAssignmentProperties properties}. + * + * @return The {@link KeyVaultRoleAssignment role assignment} {@link KeyVaultRoleAssignmentProperties properties}. + */ + public KeyVaultRoleAssignmentProperties getProperties() { + return properties; + } + + /** + * Get the {@link KeyVaultRoleAssignment role assignment} {@link KeyVaultRoleAssignmentScope scope}. + * + * @return The {@link KeyVaultRoleAssignment role assignment} {@link KeyVaultRoleAssignmentScope scope}. + */ + public KeyVaultRoleAssignmentScope getScope() { + return scope; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java new file mode 100644 index 0000000000000..cc0a945730e77 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +import com.azure.security.keyvault.administration.implementation.KeyVaultErrorCodeStrings; + +import java.util.Objects; + +/** + * A class that defines a role assignment's properties. + */ +public final class KeyVaultRoleAssignmentProperties { + private String roleDefinitionId; + private String principalId; + + /** + * Creates a new {@link KeyVaultRoleAssignmentProperties role assignment properties} object with the specified + * details. + * + * @param roleDefinitionId The {@link KeyVaultRoleDefinition role definition} ID used in the + * {@link KeyVaultRoleAssignment role assignment}. + * @param principalId The principal ID assigned to the role. This maps to the ID inside the Active Directory. + * It can point to a user, service principal, or security group. + */ + public KeyVaultRoleAssignmentProperties(String roleDefinitionId, String principalId) { + Objects.requireNonNull(roleDefinitionId, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'roleDefinitionId' in 'properties'")); + Objects.requireNonNull(principalId, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'principalId' in 'properties'")); + + this.roleDefinitionId = roleDefinitionId; + this.principalId = principalId; + } + + /** + * Get the {@link KeyVaultRoleDefinition role definition} ID used in the {@link KeyVaultRoleAssignment role + * assignment}. + * + * @return The {@link KeyVaultRoleDefinition role definition} ID. + */ + public String getRoleDefinitionId() { + return roleDefinitionId; + } + + /** + * Get the principal ID assigned to the role. + * + * @return The principal ID. + */ + public String getPrincipalId() { + return principalId; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentScope.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentScope.java new file mode 100644 index 0000000000000..0356d3fde614f --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentScope.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.net.URI; + +/** + * A class that defines the scope of a role. + */ +public final class KeyVaultRoleAssignmentScope extends ExpandableStringEnum { + public static final KeyVaultRoleAssignmentScope GLOBAL = fromString("/"); + public static final KeyVaultRoleAssignmentScope KEYS = fromString("/keys"); + + /** + * Creates or finds a {@link KeyVaultRoleAssignmentScope} from its string representation. + * + * @param name A name to look for. + * @return The corresponding {@link KeyVaultRoleAssignmentScope} + */ + public static KeyVaultRoleAssignmentScope fromString(String name) { + return fromString(name, KeyVaultRoleAssignmentScope.class); + } + + /** + * Creates or finds a {@link KeyVaultRoleAssignmentScope} from its string representation. + * + * @param uri A URI to look for. + * @return The corresponding {@link KeyVaultRoleAssignmentScope} + */ + public static KeyVaultRoleAssignmentScope fromUri(URI uri) { + return fromString(uri.getRawPath(), KeyVaultRoleAssignmentScope.class); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java new file mode 100644 index 0000000000000..9d4a7465ffc53 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +import java.util.List; + +/** + * A class that defines a role. + */ +public final class KeyVaultRoleDefinition { + private String id; + private String name; + private String type; + private KeyVaultRoleDefinitionProperties properties; + private List scopes; + + /** + * Creates a new {@link KeyVaultRoleDefinition role definition} with the specified details. + * + * @param id The ID for this {@link KeyVaultRoleDefinition role definition}. + * @param name The name for this {@link KeyVaultRoleDefinition role definition}. + * @param type The type for this {@link KeyVaultRoleDefinition role definition}. + * @param properties {@link KeyVaultRoleDefinitionProperties properties} of this {@link KeyVaultRoleDefinition + * role assignment}. + */ + public KeyVaultRoleDefinition(String id, String name, String type, KeyVaultRoleDefinitionProperties properties) { + this.id = id; + this.name = name; + this.type = type; + this.properties = properties; + } + + /** + * Get the {@link KeyVaultRoleDefinition role definition} ID. + * + * @return The {@link KeyVaultRoleDefinition role definition} ID. + */ + public String getId() { + return id; + } + + /** + * Get the {@link KeyVaultRoleDefinition role definition} name. + * + * @return The {@link KeyVaultRoleDefinition role definition} name. + */ + public String getName() { + return name; + } + + /** + * Get the {@link KeyVaultRoleDefinition role assignment} type. + * + * @return The {@link KeyVaultRoleDefinition role assignment} type. + */ + public String getType() { + return type; + } + + /** + * Get the {@link KeyVaultRoleDefinition role definition} {@link KeyVaultRoleDefinitionProperties properties}. + * + * @return The {@link KeyVaultRoleDefinition role assignment} {@link KeyVaultRoleDefinitionProperties properties}. + */ + public KeyVaultRoleDefinitionProperties getProperties() { + return properties; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java new file mode 100644 index 0000000000000..599a6ceae1f0c --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +import java.util.List; + +/** + * A class that defines a role definition's properties. + */ +public final class KeyVaultRoleDefinitionProperties { + private String roleName; + private String description; + private String roleType; + private List permissions; + private List assignableScopes; + + /** + * Creates a new {@link KeyVaultRoleDefinitionProperties role definition properties} object with the specified + * details. + * + * @param roleName The name of the role. + * @param roleDescription The description of the role. + * @param roleType The type of the role. + * @param permissions The {@link KeyVaultPermission permissions} the {@link KeyVaultRoleDefinition role + * definition} has. + * @param assignableScopes The assignable scopes of the {@link KeyVaultRoleDefinition role definition}. + */ + public KeyVaultRoleDefinitionProperties(String roleName, String roleDescription, String roleType, List permissions, List assignableScopes) { + this.roleName = roleName; + this.description = roleDescription; + this.roleType = roleType; + this.permissions = permissions; + this.assignableScopes = assignableScopes; + } + + /** + * Get the role name. + * + * @return The role name. + */ + public String getRoleName() { + return roleName; + } + + /** + * Get the role description. + * + * @return The role description. + */ + public String getDescription() { + return description; + } + + /** + * Get the role type. + * + * @return The role type. + */ + public String getRoleType() { + return roleType; + } + + /** + * Get the {@link KeyVaultRoleDefinition role definition}'s {@link KeyVaultPermission permissions}. + * + * @return The {@link KeyVaultRoleDefinition role definition}'s {@link KeyVaultPermission permissions}. + */ + public List getPermissions() { + return permissions; + } + + /** + * Get the {@link KeyVaultRoleDefinition role definition}'s assignable scopes. + * + * @return The {@link KeyVaultRoleDefinition role definition}'s assignable scopes. + */ + public List getAssignableScopes() { + return assignableScopes; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java new file mode 100644 index 0000000000000..a53d8c9c2c32f --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing classes used by + * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlAsyncClient} and + * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlClient} to perform access control + * operations on Azure Key Vault resources. + */ +package com.azure.security.keyvault.administration.models; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java new file mode 100644 index 0000000000000..b1e6ea894df04 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing classes for creating clients + * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlAsyncClient} and + * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlClient} that perform access control + * operations on Azure Key Vault resources. + */ +package com.azure.security.keyvault.administration; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/module-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/module-info.java new file mode 100644 index 0000000000000..8bd509800fd72 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/module-info.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.security.keyvault.administration { + requires transitive com.azure.core; + + exports com.azure.security.keyvault.administration; + exports com.azure.security.keyvault.administration.models; + exports com.azure.security.keyvault.administration.implementation; + exports com.azure.security.keyvault.administration.implementation.models; + + opens com.azure.security.keyvault.administration to com.fasterxml.jackson.databind; + opens com.azure.security.keyvault.administration.models to com.fasterxml.jackson.databind; + opens com.azure.security.keyvault.administration.implementation to com.fasterxml.jackson.databind; + opens com.azure.security.keyvault.administration.implementation.models to com.fasterxml.jackson.databind; +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/azure-key-vault-administration.properties b/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/azure-key-vault-administration.properties new file mode 100644 index 0000000000000..ca812989b4f27 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/azure-key-vault-administration.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/kvErrorStrings.properties b/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/kvErrorStrings.properties new file mode 100644 index 0000000000000..664cfe25c2c10 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/kvErrorStrings.properties @@ -0,0 +1,3 @@ +credential_required=Azure Key Vault credentials are required. +vault_endpoint_required=Azure Key Vault endpoint url is required. +parameter_required=%s cannot be null. diff --git a/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md b/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md new file mode 100644 index 0000000000000..3c96b1a3de642 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md @@ -0,0 +1,52 @@ +# Azure Key Vault Administration for Java +> see https://aka.ms/autorest + +### Setup +Increase max memory if you're using Autorest older than 3. Set the environment variable `NODE_OPTIONS` to `--max-old-space-size=8192`. + +This is the AutoRest configuration file for KeyVaultAccessControlClient. +--- +## Getting Started +To build the SDK for KeyVaultAccessControlClient, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +### Generation +There is one swagger for KeyVault Administration: rbac. It uses the following tag: `--tag=rbac-preview`. + +```ps +cd +autorest --use=@microsoft.azure/autorest.java@4.0.0 --tag=${package} +``` + +e.g. +```ps +cd +autorest --use=@microsoft.azure/autorest.java@4.0.0 --tag=rbac-preview +``` + +## Code generation settings +``` yaml +java: true +output-folder: ../ +namespace: com.azure.security.keyvault.administration +license-header: MICROSOFT_MIT_SMALL +models-subpackage: implementation.models +custom-types-subpackage: models +generate-client-as-impl: true +sync-methods: none +add-context-parameter: true +context-client-method-parameter: true +``` + +### Tag: rbac-preview +These settings apply only when `--tag=rbac-preview` is specified on the command line. + +``` yaml $(tag) == 'rbac-preview' +input-file: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json +title: KeyVaultAccessControlClient +``` diff --git a/sdk/keyvault/pom.xml b/sdk/keyvault/pom.xml index 5f620284c6a4a..6042dcedc8afd 100644 --- a/sdk/keyvault/pom.xml +++ b/sdk/keyvault/pom.xml @@ -1,6 +1,6 @@ - 4.0.0 com.azure @@ -16,6 +16,7 @@ microsoft-azure-keyvault-cryptography microsoft-azure-keyvault-extensions microsoft-azure-keyvault-test + azure-security-keyvault-administration azure-security-keyvault-certificates azure-security-keyvault-keys azure-security-keyvault-secrets From f01cc0bf72f18fa72c9a0a193b5b825fd1691663 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 4 Sep 2020 21:12:40 +0800 Subject: [PATCH 101/168] mgmt core Region (#14470) --- sdk/core/azure-core-management/CHANGELOG.md | 1 + .../com/azure/core/management/Region.java | 349 ++++++++++++++++++ .../azure/core/management/RegionTests.java | 68 ++++ .../resources/fluentcore/arm/Region.java | 1 + .../com/azure/resourcemanager/AzureTests.java | 79 +++- 5 files changed, 490 insertions(+), 8 deletions(-) create mode 100644 sdk/core/azure-core-management/src/main/java/com/azure/core/management/Region.java create mode 100644 sdk/core/azure-core-management/src/test/java/com/azure/core/management/RegionTests.java diff --git a/sdk/core/azure-core-management/CHANGELOG.md b/sdk/core/azure-core-management/CHANGELOG.md index 83027fef550ab..75d53c8a0f0f1 100644 --- a/sdk/core/azure-core-management/CHANGELOG.md +++ b/sdk/core/azure-core-management/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.0.0-beta.4 (Unreleased) +- Added `Region` class. ## 1.0.0-beta.3 (2020-08-07) diff --git a/sdk/core/azure-core-management/src/main/java/com/azure/core/management/Region.java b/sdk/core/azure-core-management/src/main/java/com/azure/core/management/Region.java new file mode 100644 index 0000000000000..5331652a0c014 --- /dev/null +++ b/sdk/core/azure-core-management/src/main/java/com/azure/core/management/Region.java @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.management; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.util.Collection; +import java.util.Locale; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + +/** + * Enumeration of the Azure datacenter regions. See https://azure.microsoft.com/regions/ + */ +public final class Region { + // This needs to be at the beginning for the initialization to happen correctly + private static final ConcurrentMap VALUES_BY_NAME = new ConcurrentHashMap<>(); + + /* + * Azure Cloud - Americas + */ + /** + * East US (US) (recommended) + */ + public static final Region US_EAST = new Region("eastus", "East US"); + /** + * East US 2 (US) (recommended) + */ + public static final Region US_EAST2 = new Region("eastus2", "East US 2"); + /** + * South Central US (US) (recommended) + */ + public static final Region US_SOUTH_CENTRAL = new Region("southcentralus", "South Central US"); + /** + * West US 2 (US) (recommended) + */ + public static final Region US_WEST2 = new Region("westus2", "West US 2"); + /** + * Central US (US) (recommended) + */ + public static final Region US_CENTRAL = new Region("centralus", "Central US"); + /** + * North Central US (US) (recommended) + */ + public static final Region US_NORTH_CENTRAL = new Region("northcentralus", "North Central US"); + /** + * West US (US) (recommended) + */ + public static final Region US_WEST = new Region("westus", "West US"); + /** + * West Central US (US) + */ + public static final Region US_WEST_CENTRAL = new Region("westcentralus", "West Central US"); + /** + * Canada Central (Canada) (recommended) + */ + public static final Region CANADA_CENTRAL = new Region("canadacentral", "Canada Central"); + /** + * Canada East (Canada) + */ + public static final Region CANADA_EAST = new Region("canadaeast", "Canada East"); + /** + * Brazil South (South America) (recommended) + */ + public static final Region BRAZIL_SOUTH = new Region("brazilsouth", "Brazil South"); + /** + * Brazil Southeast (South America) + */ + public static final Region BRAZIL_SOUTHEAST = new Region("brazilsoutheast", "Brazil Southeast"); + /* + * Azure Cloud - Europe + */ + /** + * North Europe (Europe) (recommended) + */ + public static final Region EUROPE_NORTH = new Region("northeurope", "North Europe"); + /** + * UK South (Europe) (recommended) + */ + public static final Region UK_SOUTH = new Region("uksouth", "UK South"); + /** + * West Europe (Europe) (recommended) + */ + public static final Region EUROPE_WEST = new Region("westeurope", "West Europe"); + /** + * France Central (Europe) (recommended) + */ + public static final Region FRANCE_CENTRAL = new Region("francecentral", "France Central"); + /** + * Germany West Central (Europe) (recommended) + */ + public static final Region GERMANY_WEST_CENTRAL = new Region("germanywestcentral", "Germany West Central"); + /** + * Norway East (Europe) (recommended) + */ + public static final Region NORWAY_EAST = new Region("norwayeast", "Norway East"); + /** + * Switzerland North (Europe) (recommended) + */ + public static final Region SWITZERLAND_NORTH = new Region("switzerlandnorth", "Switzerland North"); + /** + * France South (Europe) + */ + public static final Region FRANCE_SOUTH = new Region("francesouth", "France South"); + /** + * Germany North (Europe) + */ + public static final Region GERMANY_NORTH = new Region("germanynorth", "Germany North"); + /** + * Norway West (Europe) + */ + public static final Region NORWAY_WEST = new Region("norwaywest", "Norway West"); + /** + * Switzerland West (Europe) + */ + public static final Region SWITZERLAND_WEST = new Region("switzerlandwest", "Switzerland West"); + /** + * UK West (Europe) + */ + public static final Region UK_WEST = new Region("ukwest", "UK West"); + /* + * Azure Cloud - Asia + */ + /** + * Australia East (Asia Pacific) (recommended) + */ + public static final Region AUSTRALIA_EAST = new Region("australiaeast", "Australia East"); + /** + * Southeast Asia (Asia Pacific) (recommended) + */ + public static final Region ASIA_SOUTHEAST = new Region("southeastasia", "Southeast Asia"); + /** + * Central India (Asia Pacific) (recommended) + */ + public static final Region INDIA_CENTRAL = new Region("centralindia", "Central India"); + /** + * East Asia (Asia Pacific) (recommended) + */ + public static final Region ASIA_EAST = new Region("eastasia", "East Asia"); + /** + * Japan East (Asia Pacific) (recommended) + */ + public static final Region JAPAN_EAST = new Region("japaneast", "Japan East"); + /** + * Korea Central (Asia Pacific) (recommended) + */ + public static final Region KOREA_CENTRAL = new Region("koreacentral", "Korea Central"); + /** + * Australia Central (Asia Pacific) + */ + public static final Region AUSTRALIA_CENTRAL = new Region("australiacentral", "Australia Central"); + /** + * Australia Central 2 (Asia Pacific) + */ + public static final Region AUSTRALIA_CENTRAL2 = new Region("australiacentral2", "Australia Central 2"); + /** + * Australia Southeast (Asia Pacific) + */ + public static final Region AUSTRALIA_SOUTHEAST = new Region("australiasoutheast", "Australia Southeast"); + /** + * Japan West (Asia Pacific) + */ + public static final Region JAPAN_WEST = new Region("japanwest", "Japan West"); + /** + * Korea South (Asia Pacific) + */ + public static final Region KOREA_SOUTH = new Region("koreasouth", "Korea South"); + /** + * South India (Asia Pacific) + */ + public static final Region INDIA_SOUTH = new Region("southindia", "South India"); + /** + * West India (Asia Pacific) + */ + public static final Region INDIA_WEST = new Region("westindia", "West India"); + /* + * Azure Cloud - Middle East and Africa + */ + /** + * UAE North (Middle East) (recommended) + */ + public static final Region UAE_NORTH = new Region("uaenorth", "UAE North"); + /** + * UAE Central (Middle East) + */ + public static final Region UAE_CENTRAL = new Region("uaecentral", "UAE Central"); + /** + * South Africa North (Africa) (recommended) + */ + public static final Region SOUTHAFRICA_NORTH = new Region("southafricanorth", "South Africa North"); + /** + * South Africa West (Africa) + */ + public static final Region SOUTHAFRICA_WEST = new Region("southafricawest", "South Africa West"); + /* + * Azure China Cloud + */ + /** + * China North + */ + public static final Region CHINA_NORTH = new Region("chinanorth", "China North"); + /** + * China East + */ + public static final Region CHINA_EAST = new Region("chinaeast", "China East"); + /** + * China North 2 + */ + public static final Region CHINA_NORTH2 = new Region("chinanorth2", "China North 2"); + /** + * China East 2 + */ + public static final Region CHINA_EAST2 = new Region("chinaeast2", "China East 2"); + /* + * Azure German Cloud + */ + /** + * Germany Central + */ + public static final Region GERMANY_CENTRAL = new Region("germanycentral", "Germany Central"); + /** + * Germany Northeast + */ + public static final Region GERMANY_NORTHEAST = new Region("germanynortheast", "Germany Northeast"); + /* + * Azure Government Cloud + */ + /** + * U.S. government cloud in Virginia. + */ + public static final Region GOV_US_VIRGINIA = new Region("usgovvirginia", "US Gov Virginia"); + + /** + * U.S. government cloud in Iowa. + */ + public static final Region GOV_US_IOWA = new Region("usgoviowa", "US Gov Iowa"); + + /** + * U.S. government cloud in Arizona. + */ + public static final Region GOV_US_ARIZONA = new Region("usgovarizona", "US Gov Arizona"); + + /** + * U.S. government cloud in Texas. + */ + public static final Region GOV_US_TEXAS = new Region("usgovtexas", "US Gov Texas"); + + /** + * U.S. Department of Defense cloud - East. + */ + public static final Region GOV_US_DOD_EAST = new Region("usdodeast", "US DoD East"); + + /** + * U.S. Department of Defense cloud - Central. + */ + public static final Region GOV_US_DOD_CENTRAL = new Region("usdodcentral", "US DoD Central"); + + private final String name; + private final String label; + + /** + * @return predefined Azure regions. + */ + public static Collection values() { + return VALUES_BY_NAME.values(); + } + + private Region(String name, String label) { + this.name = name; + this.label = label; + VALUES_BY_NAME.put(name.toLowerCase(Locale.ROOT), this); + } + + /** + * Creates a region from a name and a label. + * + * @param name the uniquely identifiable name of the region. + * @param label the label of the region. + * @return the newly created region. + */ + public static Region create(String name, String label) { + Objects.requireNonNull(name, "'name' cannot be null."); + + Region region = VALUES_BY_NAME.get(name.toLowerCase(Locale.ROOT)); + if (region != null) { + return region; + } else { + return new Region(name, label); + } + } + + @JsonValue + @Override + public String toString() { + return name(); + } + + /** + * @return the name of the region. + */ + public String name() { + return this.name; + } + + /** + * @return the label of the region. + */ + public String label() { + return this.label; + } + + /** + * Parses a name into a Region object and creates a new Region instance if not found among the existing ones. + * + * @param name the name of the region. + * @return the parsed or created region. + */ + public static Region fromName(String name) { + if (name == null) { + return null; + } + + Region region = VALUES_BY_NAME.get(name.toLowerCase(Locale.ROOT).replace(" ", "")); + if (region != null) { + return region; + } else { + return Region.create(name.toLowerCase(Locale.ROOT).replace(" ", ""), name); + } + } + + @Override + public int hashCode() { + return this.name.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Region)) { + return false; + } else if (obj == this) { + return true; + } else { + Region rhs = (Region) obj; + return this.name.equalsIgnoreCase(rhs.name); + } + } +} diff --git a/sdk/core/azure-core-management/src/test/java/com/azure/core/management/RegionTests.java b/sdk/core/azure-core-management/src/test/java/com/azure/core/management/RegionTests.java new file mode 100644 index 0000000000000..d61a61ad2996e --- /dev/null +++ b/sdk/core/azure-core-management/src/test/java/com/azure/core/management/RegionTests.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.management; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class RegionTests { + + @Test + public void testPredefined() { + Region region = Region.US_WEST; + + Region sameRegion = Region.US_WEST; + Assertions.assertTrue(region.equals(sameRegion)); + Assertions.assertTrue(region == sameRegion); + + Region differentRegion = Region.US_WEST2; + Assertions.assertTrue(!region.equals(differentRegion)); + Assertions.assertTrue(region != differentRegion); + } + + @Test + public void testCreate() { + // reuse region if exist + Region sameRegion = Region.create("WESTUS", "WEST US"); + Assertions.assertEquals(Region.US_WEST, sameRegion); + Assertions.assertTrue(Region.US_WEST == sameRegion); + + int size = Region.values().size(); + + // create region with new name + Region newRegion = Region.create("centraluseuap2", "Central US 2 EUAP"); + Assertions.assertTrue(Region.values().size() >= size + 1); // 'testFromLabel' might create region in parallel, hence use >= instead of == + Region newRegionSame = Region.fromName("centraluseuap2"); + Assertions.assertTrue(newRegion.equals(newRegionSame)); + Assertions.assertEquals("Central US 2 EUAP", newRegionSame.label()); + } + + @Test + public void testFromLabel() { + // reuse region if exist + Region region = Region.fromName("westus"); + Assertions.assertEquals(Region.US_WEST, region); + + // space is ignored + Region sameRegion = Region.fromName("west us"); + Assertions.assertEquals(Region.US_WEST, sameRegion); + + // case is ignored + sameRegion = Region.fromName("WEST US"); + Assertions.assertEquals(Region.US_WEST, sameRegion); + + // create region if not exist + Region newRegion = Region.fromName("newregion"); + Assertions.assertEquals("newregion", newRegion.label()); + Assertions.assertTrue(Region.values().stream().anyMatch(r -> r.name().equals("newregion"))); + + // null + Assertions.assertNull(Region.fromName(null)); + } + + @Test + public void testNegative() { + Assertions.assertThrows(NullPointerException.class, () -> Region.create(null, "desc")); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/Region.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/Region.java index 43af0b5741d40..9fed929d1c594 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/Region.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/Region.java @@ -32,6 +32,7 @@ public final class Region { public static final Region CANADA_CENTRAL = new Region("canadacentral", "Canada Central"); public static final Region CANADA_EAST = new Region("canadaeast", "Canada East"); public static final Region BRAZIL_SOUTH = new Region("brazilsouth", "Brazil South"); + public static final Region BRAZIL_SOUTHEAST = new Region("brazilsoutheast", "Brazil Southeast"); /************************************************** * Azure Cloud - Europe **************************************************/ diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java index 74f069285c485..21603714094f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureTests.java @@ -55,6 +55,7 @@ import com.azure.resourcemanager.resources.models.DeploymentMode; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.models.Location; +import com.azure.resourcemanager.resources.models.RegionCategory; import com.azure.resourcemanager.resources.models.RegionType; import com.azure.resourcemanager.resources.models.Subscription; import com.azure.resourcemanager.storage.models.SkuName; @@ -1323,23 +1324,85 @@ public void generateMissingRegion() { azure .getCurrentSubscription() .listLocations(); // note the region is not complete since it depends on current subscription + + List locationGroupByGeography = new ArrayList<>(); + List geographies = Arrays.asList( + "US", "Canada", "South America", "Europe", "Asia Pacific", "Middle East", "Africa"); + for (String geography : geographies) { + for (Location location : locations) { + if (location.regionType() == RegionType.PHYSICAL) { + if (geography.equals(location.inner().metadata().geographyGroup())) { + locationGroupByGeography.add(location); + } + } + } + } for (Location location : locations) { + if (location.regionType() == RegionType.PHYSICAL) { + if (!geographies.contains(location.inner().metadata().geographyGroup())) { + locationGroupByGeography.add(location); + } + } + } + + for (Location location : locationGroupByGeography) { if (location.regionType() == RegionType.PHYSICAL) { Region region = Region.findByLabelOrName(location.name()); if (region == null) { sb - .append("\n") - .append( - MessageFormat - .format( - "public static final Region {0} = new Region(\"{1}\", \"{2}\");", - location.displayName().toUpperCase().replace(" ", "_"), - location.name(), - location.displayName())); + .append("\n").append("/**") + .append("\n").append(MessageFormat.format( + " * {0} ({1})", + location.displayName(), + location.inner().metadata().geographyGroup())) + .append(location.inner().metadata().regionCategory() == RegionCategory.RECOMMENDED + ? " (recommended)" : "") + .append("\n").append(" */") + .append("\n").append(MessageFormat.format( + "public static final Region {0} = new Region(\"{1}\", \"{2}\");", + getLocationVariableName(location), + location.name(), + location.displayName())); } } } Assertions.assertTrue(sb.length() == 0, sb.toString()); } + + private static String getLocationVariableName(Location location) { + final String geographyGroup = location.inner().metadata().geographyGroup(); + String displayName = location.displayName(); + if ("US".equals(geographyGroup)) { + if (displayName.contains(" US")) { + displayName = displayName.replace(" US", ""); + displayName = "US " + displayName; + } + } else if ("Europe".equals(geographyGroup)) { + if (displayName.contains(" Europe")) { + displayName = displayName.replace(" Europe", ""); + displayName = "Europe " + displayName; + } + } else if ("Asia Pacific".equals(geographyGroup)) { + if (displayName.contains(" Asia")) { + displayName = displayName.replace(" Asia", ""); + displayName = "Asia " + displayName; + } else if (displayName.contains(" India")) { + displayName = displayName.replace(" India", ""); + displayName = "India " + displayName; + } + + } else if ("Africa".equals(geographyGroup)) { + if (displayName.startsWith("South Africa")) { + displayName = displayName.replace("South Africa", "SouthAfrica"); + } + } + if (displayName.length() > 2 && displayName.charAt(displayName.length() - 1) >= '0' + && displayName.charAt(displayName.length() - 1) <= '9' + && displayName.charAt(displayName.length() - 2) == ' ') { + displayName = displayName.replace(displayName.substring(displayName.length() - 2), + displayName.substring(displayName.length() - 1)); + } + return displayName.toUpperCase().replace(" ", "_"); + } } From a50c4f09aeb0d578c9fa14223061ca51fa94cbab Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Fri, 4 Sep 2020 08:26:26 -0700 Subject: [PATCH 102/168] Update LockRenewalOperation API (#14705) * Removing public from LockRenewalOperation. * Update LockRenewalOperation to return a completion Mono. --- .../servicebus/LockRenewalOperation.java | 75 +++++---- .../ServiceBusReceiverAsyncClient.java | 9 +- .../servicebus/ServiceBusReceiverClient.java | 29 +++- .../servicebus/LockRenewalOperationTest.java | 37 +++-- ...BusReceiverAsyncClientIntegrationTest.java | 45 ++--- .../ServiceBusReceiverAsyncClientTest.java | 51 ++---- .../ServiceBusReceiverClientTest.java | 155 +++++++++++++++++- 7 files changed, 273 insertions(+), 128 deletions(-) diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/LockRenewalOperation.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/LockRenewalOperation.java index 353c422866387..3895b3fca3cf8 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/LockRenewalOperation.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/LockRenewalOperation.java @@ -6,7 +6,6 @@ import com.azure.messaging.servicebus.implementation.MessageUtils; import com.azure.messaging.servicebus.models.LockRenewalStatus; import reactor.core.Disposable; -import reactor.core.Disposables; import reactor.core.publisher.EmitterProcessor; import reactor.core.publisher.Flux; import reactor.core.publisher.FluxSink; @@ -23,13 +22,14 @@ /** * Represents a renewal session or message lock renewal operation that. */ -public class LockRenewalOperation implements AutoCloseable { +class LockRenewalOperation implements AutoCloseable { private final ClientLogger logger = new ClientLogger(LockRenewalOperation.class); private final AtomicBoolean isDisposed = new AtomicBoolean(); private final AtomicReference lockedUntil = new AtomicReference<>(); private final AtomicReference throwable = new AtomicReference<>(); private final AtomicReference status = new AtomicReference<>(LockRenewalStatus.RUNNING); private final MonoProcessor cancellationProcessor = MonoProcessor.create(); + private final Mono completionMono; private final String lockToken; private final boolean isSession; @@ -53,27 +53,55 @@ public class LockRenewalOperation implements AutoCloseable { * Creates a new lock renewal operation. * * @param lockToken Lock or session id to renew. - * @param lockedUntil The initial period the message or session is locked until. + * @param tokenLockedUntil The initial period the message or session is locked until. * @param maxLockRenewalDuration The maximum duration this lock should be renewed. * @param isSession Whether the lock represents a session lock or message lock. * @param renewalOperation The renewal operation to call. */ LockRenewalOperation(String lockToken, Duration maxLockRenewalDuration, boolean isSession, - Function> renewalOperation, OffsetDateTime lockedUntil) { + Function> renewalOperation, OffsetDateTime tokenLockedUntil) { this.lockToken = Objects.requireNonNull(lockToken, "'lockToken' cannot be null."); this.renewalOperation = Objects.requireNonNull(renewalOperation, "'renewalOperation' cannot be null."); this.isSession = isSession; - Objects.requireNonNull(lockedUntil, "'lockedUntil cannot be null.'"); + Objects.requireNonNull(tokenLockedUntil, "'lockedUntil cannot be null.'"); Objects.requireNonNull(maxLockRenewalDuration, "'maxLockRenewalDuration' cannot be null."); if (maxLockRenewalDuration.isNegative()) { - throw logger.logThrowableAsError(new IllegalArgumentException( + throw logger.logExceptionAsError(new IllegalArgumentException( "'maxLockRenewalDuration' cannot be negative.")); } - this.lockedUntil.set(lockedUntil); - this.subscription = getRenewLockOperation(lockedUntil, maxLockRenewalDuration); + this.lockedUntil.set(tokenLockedUntil); + + final Flux renewLockOperation = getRenewLockOperation(tokenLockedUntil, + maxLockRenewalDuration) + .takeUntilOther(cancellationProcessor) + .cache(Duration.ofMinutes(2)); + + this.completionMono = renewLockOperation.then(); + this.subscription = renewLockOperation.subscribe(until -> this.lockedUntil.set(until), + error -> { + logger.error("token[{}]. Error occurred while renewing lock token.", error); + status.set(LockRenewalStatus.FAILED); + throwable.set(error); + cancellationProcessor.onComplete(); + }, () -> { + if (status.compareAndSet(LockRenewalStatus.RUNNING, LockRenewalStatus.COMPLETE)) { + logger.verbose("token[{}]. Renewing session lock task completed.", lockToken); + } + + cancellationProcessor.onComplete(); + }); + } + + /** + * Gets a mono that completes when the operation does. + * + * @return A mono that completes when the renewal operation does. + */ + Mono getCompletionOperation() { + return completionMono; } /** @@ -81,7 +109,7 @@ public class LockRenewalOperation implements AutoCloseable { * * @return the datetime the message or session is locked until. */ - public OffsetDateTime getLockedUntil() { + OffsetDateTime getLockedUntil() { return lockedUntil.get(); } @@ -90,7 +118,7 @@ public OffsetDateTime getLockedUntil() { * * @return The message lock token or {@code null} if a session is being renewed instead. */ - public String getLockToken() { + String getLockToken() { return isSession ? null : lockToken; } @@ -99,7 +127,7 @@ public String getLockToken() { * * @return The session id or {@code null} if it is not a session renewal. */ - public String getSessionId() { + String getSessionId() { return isSession ? lockToken : null; } @@ -108,7 +136,7 @@ public String getSessionId() { * * @return The current status of the renewal operation. */ - public LockRenewalStatus getStatus() { + LockRenewalStatus getStatus() { return status.get(); } @@ -117,7 +145,7 @@ public LockRenewalStatus getStatus() { * * @return the exception if an error occurred whilst renewing the message or session lock, otherwise {@code null}. */ - public Throwable getThrowable() { + Throwable getThrowable() { return throwable.get(); } @@ -146,10 +174,11 @@ public void close() { * @param maxLockRenewalDuration Duration to renew lock for. * @return The subscription for the operation. */ - private Disposable getRenewLockOperation(OffsetDateTime initialLockedUntil, Duration maxLockRenewalDuration) { + private Flux getRenewLockOperation(OffsetDateTime initialLockedUntil, + Duration maxLockRenewalDuration) { if (maxLockRenewalDuration.isZero()) { status.set(LockRenewalStatus.COMPLETE); - return Disposables.single(); + return Flux.empty(); } final OffsetDateTime now = OffsetDateTime.now(); @@ -174,7 +203,6 @@ private Disposable getRenewLockOperation(OffsetDateTime initialLockedUntil, Dura sink.next(initialInterval); final Flux cancellationSignals = Flux.first(cancellationProcessor, Mono.delay(maxLockRenewalDuration)); - return Flux.switchOnNext(emitterProcessor.map(interval -> Mono.delay(interval) .thenReturn(Flux.create(s -> s.next(interval))))) .takeUntilOther(cancellationSignals) @@ -189,19 +217,6 @@ private Disposable getRenewLockOperation(OffsetDateTime initialLockedUntil, Dura sink.next(MessageUtils.adjustServerTimeout(next)); return offsetDateTime; - }) - .subscribe(until -> lockedUntil.set(until), - error -> { - logger.error("token[{}]. Error occurred while renewing lock token.", error); - status.set(LockRenewalStatus.FAILED); - throwable.set(error); - cancellationProcessor.onComplete(); - }, () -> { - if (status.compareAndSet(LockRenewalStatus.RUNNING, LockRenewalStatus.COMPLETE)) { - logger.verbose("token[{}]. Renewing session lock task completed.", lockToken); - } - - cancellationProcessor.onComplete(); - }); + }); } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java index 8ae330e745d46..510b877f43f5f 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java @@ -449,7 +449,7 @@ public Mono deadLetter(ServiceBusReceivedMessage message, DeadLetterOption * @throws IllegalArgumentException if {@code lockToken} is an empty string. * @throws IllegalStateException if the receiver is a session receiver or the receiver is disposed. */ - public LockRenewalOperation getAutoRenewMessageLock(String lockToken, Duration maxLockRenewalDuration) { + public Mono getAutoRenewMessageLock(String lockToken, Duration maxLockRenewalDuration) { if (isDisposed.get()) { throw logger.logExceptionAsError(new IllegalStateException( String.format(INVALID_OPERATION_DISPOSED_RECEIVER, "getAutoRenewMessageLock"))); @@ -470,7 +470,8 @@ public LockRenewalOperation getAutoRenewMessageLock(String lockToken, Duration m final LockRenewalOperation operation = new LockRenewalOperation(lockToken, maxLockRenewalDuration, false, this::renewMessageLock); renewalContainer.addOrUpdate(lockToken, Instant.now().plus(maxLockRenewalDuration), operation); - return operation; + + return operation.getCompletionOperation(); } /** @@ -484,7 +485,7 @@ public LockRenewalOperation getAutoRenewMessageLock(String lockToken, Duration m * @throws IllegalArgumentException if {@code lockToken} is an empty string. * @throws IllegalStateException if the receiver is a non-session receiver or the receiver is disposed. */ - public LockRenewalOperation getAutoRenewSessionLock(String sessionId, Duration maxLockRenewalDuration) { + public Mono getAutoRenewSessionLock(String sessionId, Duration maxLockRenewalDuration) { if (isDisposed.get()) { throw logger.logExceptionAsError(new IllegalStateException( String.format(INVALID_OPERATION_DISPOSED_RECEIVER, "getAutoRenewSessionLock"))); @@ -506,7 +507,7 @@ public LockRenewalOperation getAutoRenewSessionLock(String sessionId, Duration m this::renewSessionLock); renewalContainer.addOrUpdate(sessionId, Instant.now().plus(maxLockRenewalDuration), operation); - return operation; + return operation.getCompletionOperation(); } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java index f0dc9c1ad7d9f..6b68488da5262 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java @@ -18,6 +18,7 @@ import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; /** * A synchronous receiver responsible for receiving {@link ServiceBusReceivedMessage} from a specific queue or @@ -254,13 +255,20 @@ public void deadLetter(ServiceBusReceivedMessage message, DeadLetterOptions dead * * @param lockToken Lock token of the message. * @param maxLockRenewalDuration Maximum duration to keep renewing the lock token. - * @return A lock renewal operation for the message. + * @param onError A function to call when an error occurs during lock renewal. * @throws NullPointerException if {@code lockToken} or {@code maxLockRenewalDuration} is null. * @throws IllegalArgumentException if {@code lockToken} is an empty string. * @throws IllegalStateException if the receiver is a session receiver or the receiver is disposed. */ - public LockRenewalOperation getAutoRenewMessageLock(String lockToken, Duration maxLockRenewalDuration) { - return asyncClient.getAutoRenewMessageLock(lockToken, maxLockRenewalDuration); + public void getAutoRenewMessageLock(String lockToken, Duration maxLockRenewalDuration, + Consumer onError) { + final Consumer throwableConsumer = onError != null + ? onError + : error -> logger.warning("Exception occurred while renewing lock token: '{}'.", lockToken, error); + + asyncClient.getAutoRenewMessageLock(lockToken, maxLockRenewalDuration).subscribe( + v -> logger.verbose("Completed renewing lock token: '{}'", lockToken), + throwableConsumer); } /** @@ -268,13 +276,20 @@ public LockRenewalOperation getAutoRenewMessageLock(String lockToken, Duration m * * @param sessionId Id for the session to renew. * @param maxLockRenewalDuration Maximum duration to keep renewing the lock token. - * @return A lock renewal operation for the message. + * @param onError A function to call when an error occurs during lock renewal. * @throws NullPointerException if {@code sessionId} or {@code maxLockRenewalDuration} is null. - * @throws IllegalArgumentException if {@code lockToken} is an empty string. + * @throws IllegalArgumentException if {@code sessionId} is an empty string. * @throws IllegalStateException if the receiver is a non-session receiver or the receiver is disposed. */ - public LockRenewalOperation getAutoRenewSessionLock(String sessionId, Duration maxLockRenewalDuration) { - return asyncClient.getAutoRenewSessionLock(sessionId, maxLockRenewalDuration); + public void getAutoRenewSessionLock(String sessionId, Duration maxLockRenewalDuration, + Consumer onError) { + final Consumer throwableConsumer = onError != null + ? onError + : error -> logger.warning("Exception occurred while renewing session: '{}'.", sessionId, error); + + asyncClient.getAutoRenewSessionLock(sessionId, maxLockRenewalDuration).subscribe( + v -> logger.verbose("Completed renewing session: '{}'", sessionId), + throwableConsumer); } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/LockRenewalOperationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/LockRenewalOperationTest.java index 467b5d23988f4..07830ed53d3c5 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/LockRenewalOperationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/LockRenewalOperationTest.java @@ -14,12 +14,12 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; import java.time.Duration; import java.time.OffsetDateTime; import java.util.ArrayDeque; import java.util.Deque; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; @@ -87,7 +87,7 @@ void constructor(boolean isSession) { * Verify that when an error occurs, it is displayed. */ @Test - void errors() throws InterruptedException { + void errors() { // Arrange final boolean isSession = true; final Duration renewalPeriod = Duration.ofSeconds(2); @@ -119,7 +119,11 @@ void errors() throws InterruptedException { operation = new LockRenewalOperation(A_LOCK_TOKEN, maxDuration, isSession, renewalOperation, lockedUntil); // Act - TimeUnit.MILLISECONDS.sleep(totalSleepPeriod.toMillis()); + StepVerifier.create(operation.getCompletionOperation()) + .thenAwait(totalSleepPeriod) + .expectErrorMatches(e -> e instanceof IllegalAccessException + && e.getMessage().equals(testError.getMessage())) + .verify(); // Assert assertEquals(LockRenewalStatus.FAILED, operation.getStatus()); @@ -131,7 +135,7 @@ void errors() throws InterruptedException { * Verifies that it stops renewing after the duration has elapsed. */ @Test - void completes() throws InterruptedException { + void completes() { // Arrange final Duration maxDuration = Duration.ofSeconds(8); final Duration renewalPeriod = Duration.ofSeconds(3); @@ -147,10 +151,11 @@ void completes() throws InterruptedException { operation = new LockRenewalOperation(A_LOCK_TOKEN, maxDuration, false, renewalOperation, lockedUntil); // Act - Thread.sleep(totalSleepPeriod.toMillis()); - logger.info("Finished renewals for first sleep."); - Thread.sleep(2000); - System.out.println("Finished second sleep. Should not have any more renewals."); + StepVerifier.create(operation.getCompletionOperation()) + .thenAwait(totalSleepPeriod) + .then(() -> logger.info("Finished renewals for first sleep.")) + .expectComplete() + .verify(Duration.ofMillis(2000)); // Assert assertEquals(LockRenewalStatus.COMPLETE, operation.getStatus()); @@ -165,7 +170,7 @@ void completes() throws InterruptedException { * Verify that we can cancel the operation. */ @Test - void cancellation() throws InterruptedException { + void cancellation() { // Arrange final Duration maxDuration = Duration.ofSeconds(20); final Duration renewalPeriod = Duration.ofSeconds(3); @@ -181,12 +186,14 @@ void cancellation() throws InterruptedException { operation = new LockRenewalOperation(A_LOCK_TOKEN, maxDuration, false, renewalOperation, lockedUntil); // Act - Thread.sleep(totalSleepPeriod.toMillis()); - logger.info("Finished renewals for first sleep. Cancelling"); - operation.close(); - - Thread.sleep(2000); - System.out.println("Finished second sleep. Should not have any more renewals."); + StepVerifier.create(operation.getCompletionOperation()) + .thenAwait(totalSleepPeriod) + .then(() -> { + logger.info("Finished renewals for first sleep. Cancelling"); + operation.close(); + }) + .expectComplete() + .verify(Duration.ofMillis(1000)); // Assert assertEquals(LockRenewalStatus.CANCELLED, operation.getStatus()); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java index dbf904550cda7..fddf42cc1e944 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java @@ -7,7 +7,6 @@ import com.azure.messaging.servicebus.administration.models.DeadLetterOptions; import com.azure.messaging.servicebus.implementation.DispositionStatus; import com.azure.messaging.servicebus.implementation.MessagingEntityType; -import com.azure.messaging.servicebus.models.LockRenewalStatus; import com.azure.messaging.servicebus.models.ReceiveMode; import com.azure.messaging.servicebus.models.SubQueue; import org.junit.jupiter.api.Assertions; @@ -930,37 +929,27 @@ void renewMessageLock(MessagingEntityType entityType) throws InterruptedExceptio final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); - sendMessage(message).block(TIMEOUT); - - // Assert & Act - StepVerifier.create(receiver.receiveMessages()) - .assertNext(receivedContext -> { - final ServiceBusReceivedMessage receivedMessage = receivedContext.getMessage(); - assertNotNull(receivedMessage); - - final OffsetDateTime lockedUntil = receivedMessage.getLockedUntil(); - assertNotNull(lockedUntil); + final ServiceBusReceivedMessageContext receivedContext = sendMessage(message) + .then(receiver.receiveMessages().next()) + .block(TIMEOUT); + assertNotNull(receivedContext); - final LockRenewalOperation operation = receiver.getAutoRenewMessageLock( - receivedMessage.getLockToken(), maximumDuration); + final ServiceBusReceivedMessage receivedMessage = receivedContext.getMessage(); + assertNotNull(receivedMessage); - assertEquals(LockRenewalStatus.RUNNING, operation.getStatus()); - try { - Thread.sleep(sleepDuration.toMillis()); + final OffsetDateTime lockedUntil = receivedMessage.getLockedUntil(); + assertNotNull(lockedUntil); - assertTrue(lockedUntil.isBefore(operation.getLockedUntil())); - assertEquals(LockRenewalStatus.COMPLETE, operation.getStatus()); - } catch (InterruptedException e) { - logger.error("Could not sleep.", e); + // Assert & Act + StepVerifier.create(receiver.getAutoRenewMessageLock(receivedMessage.getLockToken(), maximumDuration)) + .thenAwait(sleepDuration) + .then(() -> { + logger.info("Completing message."); + int numberCompleted = completeMessages(receiver, Collections.singletonList(receivedMessage)); - operation.close(); - assertEquals(LockRenewalStatus.CANCELLED, operation.getStatus()); - } finally { - int numberCompleted = completeMessages(receiver, - Collections.singletonList(receivedMessage)); - messagesPending.addAndGet(-numberCompleted); - } - }).thenCancel() + messagesPending.addAndGet(-numberCompleted); + }) + .expectComplete() .verify(Duration.ofMinutes(3)); } 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 788f6507ab03b..a0e6f6d2ef81d 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 @@ -22,7 +22,6 @@ import com.azure.messaging.servicebus.implementation.ServiceBusConnectionProcessor; import com.azure.messaging.servicebus.implementation.ServiceBusManagementNode; import com.azure.messaging.servicebus.implementation.ServiceBusReactorReceiver; -import com.azure.messaging.servicebus.models.LockRenewalStatus; import com.azure.messaging.servicebus.models.ReceiveMode; import org.apache.qpid.proton.amqp.messaging.Rejected; import org.apache.qpid.proton.amqp.transport.DeliveryState.DeliveryStateType; @@ -58,15 +57,11 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.IntStream; import static com.azure.messaging.servicebus.TestUtils.getMessage; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; @@ -103,7 +98,6 @@ class ServiceBusReceiverAsyncClientTest { private ServiceBusConnectionProcessor connectionProcessor; private ServiceBusReceiverAsyncClient receiver; private ServiceBusReceiverAsyncClient sessionReceiver; - private Duration maxAutoLockRenewalDuration; @Mock private ServiceBusReactorReceiver amqpReceiveLink; @@ -125,8 +119,6 @@ class ServiceBusReceiverAsyncClientTest { private ServiceBusReceivedMessage receivedMessage2; @Mock private Runnable onClientClose; - @Mock - private Function> renewalOperation; @BeforeAll static void beforeAll() { @@ -246,7 +238,7 @@ void peekWithSequenceOneMessage() { void receivesNumberOfEvents() { // Arrange final int numberOfEvents = 1; - final List messages = getMessages(10); + final List messages = getMessages(); ServiceBusReceivedMessage receivedMessage = mock(ServiceBusReceivedMessage.class); when(receivedMessage.getLockToken()).thenReturn(UUID.randomUUID().toString()); @@ -737,12 +729,11 @@ void cannotRenewMessageLockInSession() { * Verifies that we can auto-renew a message lock. */ @Test - void autoRenewMessageLock() throws InterruptedException { + void autoRenewMessageLock() { // Arrange final Duration maxDuration = Duration.ofSeconds(8); final Duration renewalPeriod = Duration.ofSeconds(3); final String lockToken = "some-token"; - final OffsetDateTime startTime = OffsetDateTime.now(); // At most 4 times because we renew the lock before it expires (by some seconds). final int atMost = 5; @@ -752,30 +743,24 @@ void autoRenewMessageLock() throws InterruptedException { .thenReturn(Mono.fromCallable(() -> Instant.now().plus(renewalPeriod))); // Act & Assert - final LockRenewalOperation operation = receiver.getAutoRenewMessageLock(lockToken, maxDuration); - Thread.sleep(totalSleepPeriod.toMillis()); - logger.info("Finished renewals for first sleep."); - - // Assert - assertEquals(LockRenewalStatus.COMPLETE, operation.getStatus()); - assertNull(operation.getThrowable()); - assertTrue(startTime.isBefore(operation.getLockedUntil()), String.format( - "initial lockedUntil[%s] is not before lockedUntil[%s]", startTime, operation.getLockedUntil())); + StepVerifier.create(receiver.getAutoRenewMessageLock(lockToken, maxDuration)) + .thenAwait(totalSleepPeriod) + .then(() -> logger.info("Finished renewals for first sleep.")) + .expectComplete() + .verify(Duration.ofSeconds(5)); verify(managementNode, Mockito.atMost(atMost)).renewMessageLock(lockToken, null); } - /** - * Verifies that we can auto-renew a message lock. + * Verifies that we can auto-renew a session lock. */ @Test - void autoRenewSessionLock() throws InterruptedException { + void autoRenewSessionLock() { // Arrange final Duration maxDuration = Duration.ofSeconds(8); final Duration renewalPeriod = Duration.ofSeconds(3); final String sessionId = "some-token"; - final OffsetDateTime startTime = OffsetDateTime.now(); // At most 4 times because we renew the lock before it expires (by some seconds). final int atMost = 5; @@ -785,23 +770,19 @@ void autoRenewSessionLock() throws InterruptedException { .thenReturn(Mono.fromCallable(() -> Instant.now().plus(renewalPeriod))); // Act & Assert - final LockRenewalOperation operation = sessionReceiver.getAutoRenewSessionLock(sessionId, maxDuration); - Thread.sleep(totalSleepPeriod.toMillis()); - logger.info("Finished renewals for first sleep."); - - // Assert - assertEquals(LockRenewalStatus.COMPLETE, operation.getStatus()); - assertNull(operation.getThrowable()); - assertTrue(startTime.isBefore(operation.getLockedUntil()), String.format( - "initial lockedUntil[%s] is not before lockedUntil[%s]", startTime, operation.getLockedUntil())); + StepVerifier.create(sessionReceiver.getAutoRenewSessionLock(sessionId, maxDuration)) + .thenAwait(totalSleepPeriod) + .then(() -> logger.info("Finished renewals for first sleep.")) + .expectComplete() + .verify(Duration.ofSeconds(5)); verify(managementNode, Mockito.atMost(atMost)).renewSessionLock(sessionId, null); } - private List getMessages(int numberOfEvents) { + private List getMessages() { final Map map = Collections.singletonMap("SAMPLE_HEADER", "foo"); - return IntStream.range(0, numberOfEvents) + return IntStream.range(0, 10) .mapToObj(index -> getMessage(PAYLOAD_BYTES, messageTrackingUUID, map)) .collect(Collectors.toList()); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java index de17dcb097c1b..c200b1f0fcf5d 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientTest.java @@ -15,6 +15,7 @@ import org.mockito.MockitoAnnotations; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.test.publisher.TestPublisher; import java.time.Duration; import java.time.Instant; @@ -25,17 +26,21 @@ import java.util.Map; import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; import java.util.stream.Collectors; 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.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isNull; +import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -59,9 +64,10 @@ class ServiceBusReceiverClientTest { private Map propertiesToModify; @Mock private ServiceBusTransactionContext transactionContext; - @Mock private ServiceBusReceivedMessage message; + @Mock + private Consumer onErrorConsumer; @BeforeEach void setup() { @@ -126,6 +132,138 @@ void abandonMessageWithProperties() { verify(asyncClient).abandon(eq(message), eq(propertiesToModify)); } + /** + * Verifies that we can auto-renew a message lock. + */ + @Test + void autoRenewMessageLock() { + // Arrange + final Duration maxDuration = Duration.ofSeconds(8); + final TestPublisher publisher = TestPublisher.create(); + + doAnswer(answer -> { + fail("On error should not have been invoked."); + return null; + }).when(onErrorConsumer).accept(any()); + when(asyncClient.getAutoRenewMessageLock(LOCK_TOKEN, maxDuration)).thenReturn(publisher.mono()); + + // Act + client.getAutoRenewMessageLock(LOCK_TOKEN, maxDuration, onErrorConsumer); + + // Assert + verify(asyncClient).getAutoRenewMessageLock(LOCK_TOKEN, maxDuration); + } + + /** + * Verifies that we can auto-renew a message lock and it calls the error consumer. + */ + @Test + void autoRenewMessageLockFails() { + // Arrange + final Duration maxDuration = Duration.ofSeconds(8); + final TestPublisher publisher = TestPublisher.create(); + final Throwable testError = new IllegalAccessException("Some exception"); + + when(asyncClient.getAutoRenewMessageLock(LOCK_TOKEN, maxDuration)).thenReturn(publisher.mono()); + + client.getAutoRenewMessageLock(LOCK_TOKEN, maxDuration, onErrorConsumer); + + // Act + publisher.error(testError); + + // Assert + verify(asyncClient).getAutoRenewMessageLock(LOCK_TOKEN, maxDuration); + verify(onErrorConsumer).accept(testError); + } + + /** + * Verifies that we can auto-renew a message lock and it will not fail with an NPE when we have a null onError. + */ + @Test + void autoRenewMessageLockFailsNull() { + // Arrange + final Duration maxDuration = Duration.ofSeconds(8); + final TestPublisher publisher = TestPublisher.create(); + final Throwable testError = new IllegalAccessException("Some exception"); + + when(asyncClient.getAutoRenewMessageLock(LOCK_TOKEN, maxDuration)).thenReturn(publisher.mono()); + + client.getAutoRenewMessageLock(LOCK_TOKEN, maxDuration, null); + + // Act + publisher.error(testError); + + // Assert + verify(asyncClient).getAutoRenewMessageLock(LOCK_TOKEN, maxDuration); + verify(onErrorConsumer, never()).accept(testError); + } + + /** + * Verifies that we can auto-renew a session lock. + */ + @Test + void autoRenewSessionLock() { + // Arrange + final Duration maxDuration = Duration.ofSeconds(8); + final TestPublisher publisher = TestPublisher.create(); + + doAnswer(answer -> { + fail("On error should not have been invoked."); + return null; + }).when(onErrorConsumer).accept(any()); + when(asyncClient.getAutoRenewSessionLock(LOCK_TOKEN, maxDuration)).thenReturn(publisher.mono()); + + // Act + client.getAutoRenewSessionLock(LOCK_TOKEN, maxDuration, onErrorConsumer); + + // Assert + verify(asyncClient).getAutoRenewSessionLock(LOCK_TOKEN, maxDuration); + } + + /** + * Verifies that we can auto-renew a session lock and it calls the error consumer. + */ + @Test + void autoRenewSessionLockFails() { + // Arrange + final Duration maxDuration = Duration.ofSeconds(8); + final TestPublisher publisher = TestPublisher.create(); + final Throwable testError = new IllegalAccessException("Some exception"); + + when(asyncClient.getAutoRenewSessionLock(LOCK_TOKEN, maxDuration)).thenReturn(publisher.mono()); + + client.getAutoRenewSessionLock(LOCK_TOKEN, maxDuration, onErrorConsumer); + + // Act + publisher.error(testError); + + // Assert + verify(asyncClient).getAutoRenewSessionLock(LOCK_TOKEN, maxDuration); + verify(onErrorConsumer).accept(testError); + } + + /** + * Verifies that we can auto-renew a message lock and it will not fail with an NPE when we have a null onError. + */ + @Test + void autoRenewSessionLockFailsNull() { + // Arrange + final Duration maxDuration = Duration.ofSeconds(8); + final TestPublisher publisher = TestPublisher.create(); + final Throwable testError = new IllegalAccessException("Some exception"); + + when(asyncClient.getAutoRenewSessionLock(LOCK_TOKEN, maxDuration)).thenReturn(publisher.mono()); + + client.getAutoRenewSessionLock(LOCK_TOKEN, maxDuration, null); + + // Act + publisher.error(testError); + + // Assert + verify(asyncClient).getAutoRenewSessionLock(LOCK_TOKEN, maxDuration); + verify(onErrorConsumer, never()).accept(testError); + } + @Test void completeMessageWithTransaction() { // Arrange @@ -318,6 +456,7 @@ void peekBatchMessagesMax() { } }); }); + when(asyncClient.peekMessages(maxMessages)).thenReturn(messages); // Act @@ -382,15 +521,13 @@ void peekBatchMessagesMaxSequenceNumber() { // Arrange final int maxMessages = 10; final long sequenceNumber = 100; - final Flux messages = Flux.create(sink -> { - sink.onRequest(number -> { - for (int i = 0; i < maxMessages; i++) { - sink.next(mock(ServiceBusReceivedMessage.class)); - } + final Flux messages = Flux.create(sink -> sink.onRequest(number -> { + for (int i = 0; i < maxMessages; i++) { + sink.next(mock(ServiceBusReceivedMessage.class)); + } - sink.complete(); - }); - }); + sink.complete(); + })); when(asyncClient.peekMessagesAt(maxMessages, sequenceNumber)).thenReturn(messages); // Act From 9e556048c72bb98ba499eef51c82cc200728771d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 4 Sep 2020 08:39:26 -0700 Subject: [PATCH 103/168] Sync eng/common directory with azure-sdk-tools repository for Tools PR 926 (#14517) --- eng/common/Update-Change-Log.ps1 | 13 +--- .../templates/steps/publish-blobs.yml | 4 + .../scripts/artifact-metadata-parsing.ps1 | 74 +++++++++++++------ .../scripts/copy-docs-to-blobstorage.ps1 | 47 +++++++++--- eng/common/scripts/update-docs-metadata.ps1 | 6 ++ 5 files changed, 102 insertions(+), 42 deletions(-) diff --git a/eng/common/Update-Change-Log.ps1 b/eng/common/Update-Change-Log.ps1 index 3d1497f298639..6380e3ff800a2 100644 --- a/eng/common/Update-Change-Log.ps1 +++ b/eng/common/Update-Change-Log.ps1 @@ -12,8 +12,7 @@ param ( [Parameter(Mandatory = $true)] [String]$ChangeLogPath, [String]$Unreleased = $True, - [String]$ReplaceVersion = $False, - [String]$ReleaseDate + [String]$ReplaceVersion = $False ) @@ -47,12 +46,8 @@ function Get-VersionTitle($Version, $Unreleased) # Generate version title $newVersionTitle = "## $Version $UNRELEASED_TAG" if ($Unreleased -eq $False) { - $actualReleaseDate = $ReleaseDate; - - if (!$actualReleaseDate) { - $actualReleaseDate = Get-Date -Format "yyyy-MM-dd" - } - $newVersionTitle = "## $Version ($actualReleaseDate)" + $releaseDate = Get-Date -Format "(yyyy-MM-dd)" + $newVersionTitle = "## $Version $releaseDate" } return $newVersionTitle } @@ -100,7 +95,7 @@ function Get-NewChangeLog( [System.Collections.ArrayList]$ChangelogLines, $Versi exit(0) } - if (($ReplaceVersion -eq $True) -and ($Unreleased -eq $False) -and $CurrentTitle.Contains($version) -and (-not $CurrentTitle.Contains($UNRELEASED_TAG)) -and (-not $ReleaseDate)) { + if (($ReplaceVersion -eq $True) -and ($Unreleased -eq $False) -and $CurrentTitle.Contains($version) -and (-not $CurrentTitle.Contains($UNRELEASED_TAG))) { Write-Host "Version is already present in change log with a release date." exit(0) } diff --git a/eng/common/pipelines/templates/steps/publish-blobs.yml b/eng/common/pipelines/templates/steps/publish-blobs.yml index 682cc4d4f7c88..5888edff87d12 100644 --- a/eng/common/pipelines/templates/steps/publish-blobs.yml +++ b/eng/common/pipelines/templates/steps/publish-blobs.yml @@ -4,6 +4,8 @@ parameters: TargetLanguage: '' BlobName: '' ScriptPath: '' + ArtifactLocation: '' + RepoId: $(Build.Repository.Name) steps: - pwsh: | @@ -21,6 +23,8 @@ steps: -SASKey "${{ parameters.BlobSASKey }}" -Language "${{ parameters.TargetLanguage }}" -BlobName "${{ parameters.BlobName }}" + -PublicArtifactLocation "${{ parameters.ArtifactLocation }}" + -RepoReplaceRegex "(https://github.com/${{ parameters.RepoId }}/(?:blob|tree)/)master" pwsh: true workingDirectory: $(Pipeline.Workspace) displayName: Copy Docs to Blob diff --git a/eng/common/scripts/artifact-metadata-parsing.ps1 b/eng/common/scripts/artifact-metadata-parsing.ps1 index f17e59700b69a..94e95ca170d2b 100644 --- a/eng/common/scripts/artifact-metadata-parsing.ps1 +++ b/eng/common/scripts/artifact-metadata-parsing.ps1 @@ -69,6 +69,7 @@ function ParseMavenPackage($pkg, $workingDirectory) { PackageId = $pkgId GroupId = $groupId PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsMavenPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion -groupId $groupId.Replace(".", "/")) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -150,6 +151,7 @@ function ParseNPMPackage($pkg, $workingDirectory) { $resultObj = New-Object PSObject -Property @{ PackageId = $pkgId PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsNPMPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -208,6 +210,7 @@ function ParseNugetPackage($pkg, $workingDirectory) { return New-Object PSObject -Property @{ PackageId = $pkgId PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsNugetPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -272,6 +275,7 @@ function ParsePyPIPackage($pkg, $workingDirectory) { return New-Object PSObject -Property @{ PackageId = $pkgId PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsPythonPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -300,6 +304,7 @@ function ParseCArtifact($pkg, $workingDirectory) { return New-Object PSObject -Property @{ PackageId = '' PackageVersion = $pkgVersion + ReleaseTag = $pkgVersion # Artifact info is always considered deployable for C becasue it is not # deployed anywhere. Dealing with duplicate tags happens downstream in # CheckArtifactShaAgainstTagsList @@ -331,6 +336,7 @@ function ParseCppArtifact($pkg, $workingDirectory) { return New-Object PSObject -Property @{ PackageId = $pkgName PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" # Artifact info is always considered deployable for now becasue it is not # deployed anywhere. Dealing with duplicate tags happens downstream in # CheckArtifactShaAgainstTagsList @@ -387,39 +393,65 @@ function GetExistingTags($apiUrl) { } } -# Walk across all build artifacts, check them against the appropriate repository, return a list of tags/releases -function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $continueOnError = $false) { - $pkgList = [array]@() - $ParsePkgInfoFn = "" +# Retrieve release tag for artiface package. If multiple packages, then output the first one. +function RetrieveReleaseTag($pkgRepository, $artifactLocation, $continueOnError = $true) { + if (!$artifactLocation) { + return "" + } + try { + $pkgs, $parsePkgInfoFn = RetrievePackages -pkgRepository $pkgRepository -artifactLocation $artifactLocation + if (!$pkgs -or !$pkgs[0]) { + Write-Host "No packages retrieved from artifact location." + return "" + } + if ($pkgs.Count -gt 1) { + Write-Host "There are more than 1 packages retieved from artifact location." + foreach ($pkg in $pkgs) { + Write-Host "The package name is $($pkg.BaseName)" + } + return "" + } + $parsedPackage = &$parsePkgInfoFn -pkg $pkgs[0] -workingDirectory $artifactLocation + return $parsedPackage.ReleaseTag + } + catch { + if ($continueOnError) { + return "" + } + Write-Error "No release tag retrieved from $artifactLocation" + } +} +function RetrievePackages($pkgRepository, $artifactLocation) { + $parsePkgInfoFn = "" $packagePattern = "" - + $pkgRepository = $pkgRepository.Trim() switch ($pkgRepository) { "Maven" { - $ParsePkgInfoFn = "ParseMavenPackage" + $parsePkgInfoFn = "ParseMavenPackage" $packagePattern = "*.pom" break } "Nuget" { - $ParsePkgInfoFn = "ParseNugetPackage" + $parsePkgInfoFn = "ParseNugetPackage" $packagePattern = "*.nupkg" break } "NPM" { - $ParsePkgInfoFn = "ParseNPMPackage" + $parsePkgInfoFn = "ParseNPMPackage" $packagePattern = "*.tgz" break } "PyPI" { - $ParsePkgInfoFn = "ParsePyPIPackage" + $parsePkgInfoFn = "ParsePyPIPackage" $packagePattern = "*.zip" break } "C" { - $ParsePkgInfoFn = "ParseCArtifact" + $parsePkgInfoFn = "ParseCArtifact" $packagePattern = "*.json" } "CPP" { - $ParsePkgInfoFn = "ParseCppArtifact" + $parsePkgInfoFn = "ParseCppArtifact" $packagePattern = "*.json" } default { @@ -427,12 +459,18 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a exit(1) } } + $pkgs = Get-ChildItem -Path $artifactLocation -Include $packagePattern -Recurse -File + return $pkgs, $parsePkgInfoFn +} - $pkgs = (Get-ChildItem -Path $artifactLocation -Include $packagePattern -Recurse -File) +# Walk across all build artifacts, check them against the appropriate repository, return a list of tags/releases +function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $continueOnError = $false) { + $pkgList = [array]@() + $pkgs, $parsePkgInfoFn = RetrievePackages -pkgRepository $pkgRepository -artifactLocation $artifactLocation foreach ($pkg in $pkgs) { try { - $parsedPackage = &$ParsePkgInfoFn -pkg $pkg -workingDirectory $workingDirectory + $parsedPackage = &$parsePkgInfoFn -pkg $pkg -workingDirectory $workingDirectory if ($parsedPackage -eq $null) { continue @@ -444,17 +482,11 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a exit(1) } - $tag = if ($parsedPackage.packageId) { - "$($parsedPackage.packageId)_$($parsedPackage.PackageVersion)" - } else { - $parsedPackage.PackageVersion - } - $pkgList += New-Object PSObject -Property @{ PackageId = $parsedPackage.PackageId PackageVersion = $parsedPackage.PackageVersion GroupId = $parsedPackage.GroupId - Tag = $tag + Tag = $parsedPackage.ReleaseTag ReleaseNotes = $parsedPackage.ReleaseNotes ReadmeContent = $parsedPackage.ReadmeContent IsPrerelease = [AzureEngSemanticVersion]::ParseVersionString($parsedPackage.PackageVersion).IsPrerelease @@ -511,4 +543,4 @@ function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $ap Write-Host "Tags already existing with different SHA versions. Exiting." exit(1) } -} \ No newline at end of file +} diff --git a/eng/common/scripts/copy-docs-to-blobstorage.ps1 b/eng/common/scripts/copy-docs-to-blobstorage.ps1 index a0893099293a0..9b7dea48b1d5d 100644 --- a/eng/common/scripts/copy-docs-to-blobstorage.ps1 +++ b/eng/common/scripts/copy-docs-to-blobstorage.ps1 @@ -7,8 +7,11 @@ param ( $Language, $BlobName, $ExitOnError=1, - $UploadLatest=1 + $UploadLatest=1, + $PublicArtifactLocation = "", + $RepoReplaceRegex = "(https://github.com/.*/(?:blob|tree)/)master" ) +. (Join-Path $PSScriptRoot artifact-metadata-parsing.ps1) $Language = $Language.ToLower() @@ -186,7 +189,8 @@ function Upload-Blobs Param ( [Parameter(Mandatory=$true)] [String]$DocDir, [Parameter(Mandatory=$true)] [String]$PkgName, - [Parameter(Mandatory=$true)] [String]$DocVersion + [Parameter(Mandatory=$true)] [String]$DocVersion, + [Parameter(Mandatory=$false)] [String]$ReleaseTag ) #eg : $BlobName = "https://azuresdkdocs.blob.core.windows.net" $DocDest = "$($BlobName)/`$web/$($Language)" @@ -196,7 +200,23 @@ function Upload-Blobs Write-Host "DocVersion $($DocVersion)" Write-Host "DocDir $($DocDir)" Write-Host "Final Dest $($DocDest)/$($PkgName)/$($DocVersion)" + Write-Host "Release Tag $($ReleaseTag)" + # Use the step to replace master link to release tag link + if ($ReleaseTag) { + foreach ($htmlFile in (Get-ChildItem $DocDir -include *.html -r)) + { + $fileContent = Get-Content -Path $htmlFile + $updatedFileContent = $fileContent -replace $RepoReplaceRegex, "`${1}$ReleaseTag" + if ($updatedFileContent -ne $fileContent) { + Set-Content -Path $htmlFile -Value $updatedFileContent + } + } + } + else { + Write-Warning "Not able to do the master link replacement, since no release tag found for the release. Please manually check." + } + Write-Host "Uploading $($PkgName)/$($DocVersion) to $($DocDest)..." & $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/$($DocVersion)$($SASKey)" --recursive=true @@ -213,7 +233,6 @@ function Upload-Blobs } } - if ($Language -eq "javascript") { $PublishedDocs = Get-ChildItem "$($DocLocation)/documentation" | Where-Object -FilterScript {$_.Name.EndsWith(".zip")} @@ -227,7 +246,8 @@ if ($Language -eq "javascript") if($dirList.Length -eq 1){ $DocVersion = $dirList[0].Name Write-Host "Uploading Doc for $($PkgName) Version:- $($DocVersion)..." - Upload-Blobs -DocDir "$($DocLocation)/documentation/$($Item.BaseName)/$($Item.BaseName)/$($DocVersion)" -PkgName $PkgName -DocVersion $DocVersion + $releaseTag = RetrieveReleaseTag "NPM" $PublicArtifactLocation + Upload-Blobs -DocDir "$($DocLocation)/documentation/$($Item.BaseName)/$($Item.BaseName)/$($DocVersion)" -PkgName $PkgName -DocVersion $DocVersion -ReleaseTag $releaseTag } else{ Write-Host "found more than 1 folder under the documentation for package - $($Item.Name)" @@ -252,7 +272,8 @@ if ($Language -eq "dotnet") Write-Host "DocDir $($Item)" Write-Host "PkgName $($PkgName)" Write-Host "DocVersion $($DocVersion)" - Upload-Blobs -DocDir "$($Item)" -PkgName $PkgName -DocVersion $DocVersion + $releaseTag = RetrieveReleaseTag "Nuget" $PublicArtifactLocation + Upload-Blobs -DocDir "$($Item)" -PkgName $PkgName -DocVersion $DocVersion -ReleaseTag $releaseTag } else { @@ -279,8 +300,8 @@ if ($Language -eq "python") Write-Host "Discovered Package Name: $PkgName" Write-Host "Discovered Package Version: $Version" Write-Host "Directory for Upload: $UnzippedDocumentationPath" - - Upload-Blobs -DocDir $UnzippedDocumentationPath -PkgName $PkgName -DocVersion $Version + $releaseTag = RetrieveReleaseTag "PyPI" $PublicArtifactLocation + Upload-Blobs -DocDir $UnzippedDocumentationPath -PkgName $PkgName -DocVersion $Version -ReleaseTag $releaseTag } } @@ -326,8 +347,8 @@ if ($Language -eq "java") Write-Host "DocDir $($UnjarredDocumentationPath)" Write-Host "PkgName $($ArtifactId)" Write-Host "DocVersion $($Version)" - - Upload-Blobs -DocDir $UnjarredDocumentationPath -PkgName $ArtifactId -DocVersion $Version + $releaseTag = RetrieveReleaseTag "Maven" $PublicArtifactLocation + Upload-Blobs -DocDir $UnjarredDocumentationPath -PkgName $ArtifactId -DocVersion $Version -ReleaseTag $releaseTag } Finally { if (![string]::IsNullOrEmpty($UnjarredDocumentationPath)) { @@ -349,11 +370,13 @@ if ($Language -eq "c") # Those loops are left over from previous versions of this script which were # used to publish multiple docs packages in a single invocation. $pkgInfo = Get-Content $DocLocation/package-info.json | ConvertFrom-Json - Upload-Blobs -DocDir $DocLocation -PkgName 'docs' -DocVersion $pkgInfo.version + $releaseTag = RetrieveReleaseTag "C" $PublicArtifactLocation + Upload-Blobs -DocDir $DocLocation -PkgName 'docs' -DocVersion $pkgInfo.version -ReleaseTag $releaseTag } if ($Language -eq "cpp") { $packageInfo = (Get-Content (Join-Path $DocLocation 'package-info.json') | ConvertFrom-Json) - Upload-Blobs -DocDir $DocLocation -PkgName $packageInfo.name -DocVersion $packageInfo.version -} \ No newline at end of file + $releaseTag = RetrieveReleaseTag "CPP" $PublicArtifactLocation + Upload-Blobs -DocDir $DocLocation -PkgName $packageInfo.name -DocVersion $packageInfo.version -ReleaseTag $releaseTag +} diff --git a/eng/common/scripts/update-docs-metadata.ps1 b/eng/common/scripts/update-docs-metadata.ps1 index 42ca30894fd6d..7cf65fa7d2a4d 100644 --- a/eng/common/scripts/update-docs-metadata.ps1 +++ b/eng/common/scripts/update-docs-metadata.ps1 @@ -17,6 +17,8 @@ param ( . (Join-Path $PSScriptRoot artifact-metadata-parsing.ps1) . (Join-Path $PSScriptRoot SemVer.ps1) +$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)master" + function GetMetaData($lang){ switch ($lang) { "java" { @@ -75,6 +77,10 @@ function GetAdjustedReadmeContent($pkgInfo, $lang){ if ($headerContentMatches) { $foundTitle = $headerContentMatches.Matches[0] $fileContent = $pkgInfo.ReadmeContent -replace $foundTitle, "$foundTitle - Version $($pkgInfo.PackageVersion) `n" + + # Replace github master link with release tag. + $ReplacementPattern = "`${1}$($pkgInfo.Tag)" + $fileContent = $fileContent -replace $releaseReplaceRegex, $ReplacementPattern } $header = "---`ntitle: $foundTitle`nkeywords: Azure, $lang, SDK, API, $($pkgInfo.PackageId), $service`nauthor: maggiepint`nms.author: magpint`nms.date: $date`nms.topic: article`nms.prod: azure`nms.technology: azure`nms.devlang: $lang`nms.service: $service`n---`n" From e97bfad0b6025eff8aacd34f80711f4256a8969e Mon Sep 17 00:00:00 2001 From: Sameeksha Vaity Date: Fri, 4 Sep 2020 10:34:41 -0700 Subject: [PATCH 104/168] Add Anomaly detector package to Java service mapper (#14782) --- eng/docgeneration/service-mapper.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/docgeneration/service-mapper.json b/eng/docgeneration/service-mapper.json index cdc8fef6f2533..e6b56032c0c73 100644 --- a/eng/docgeneration/service-mapper.json +++ b/eng/docgeneration/service-mapper.json @@ -1,6 +1,7 @@ { "advisor": "Advisor", "analysisservices": "Analysis Services", + "anomalydetector": "Anomaly Detector", "apimanagement": "Api Management", "appconfiguration": "App Configuration", "applicationinsights": "Application Insights", @@ -97,6 +98,7 @@ "resourcegraph": "Resource Graph", "resourcehealth": "Resource Health", "resources": "Resources", + "resourcemanager": "Resource Manager", "schemaregistry": "Schema Registry", "search": "Search", "security": "Security", From e41c370d0b6ede422adc3701b1fdebc898ac6e75 Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel Date: Fri, 4 Sep 2020 17:45:36 +0000 Subject: [PATCH 105/168] Stopping Pair of implementation package from leaking into public surface area (#14795) * Removing Pair of implementation package from leaking into public surface area for readMany API * Making CosmosItemIdentity class sealed/final * Adding Beta-Annotation to CosmosItemIdentity * Fixing build error due to corrupt link after spring data samples were moved * Fixing SpotBug issue in ItemOperations * Fixing unit test failure due to conversion error in ItemOperations --- .../azure/cosmos/CosmosAsyncContainer.java | 16 +++--- .../com/azure/cosmos/CosmosContainer.java | 16 +++--- .../implementation/AsyncDocumentClient.java | 6 +-- .../cosmos/implementation/ItemOperations.java | 26 +++++++-- .../implementation/RxDocumentClientImpl.java | 45 ++++++++-------- .../cosmos/models/CosmosItemIdentity.java | 53 +++++++++++++++++++ .../cosmos/rx/ParallelDocumentQueryTest.java | 40 +++++++++++--- 7 files changed, 148 insertions(+), 54 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemIdentity.java diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncContainer.java index c9ec729fb4c5a..19c30c48d536c 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncContainer.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncContainer.java @@ -15,12 +15,12 @@ import com.azure.cosmos.implementation.TracerProvider; import com.azure.cosmos.implementation.Utils; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; -import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import com.azure.cosmos.implementation.query.QueryInfo; import com.azure.cosmos.models.CosmosConflictProperties; import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.CosmosContainerRequestOptions; import com.azure.cosmos.models.CosmosContainerResponse; +import com.azure.cosmos.models.CosmosItemIdentity; import com.azure.cosmos.models.CosmosItemRequestOptions; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; @@ -538,30 +538,30 @@ public Mono> readItem( * Reads many documents. * * @param the type parameter - * @param itemKeyList document id and partition key pair that needs to be read + * @param itemIdentityList CosmosItem id and partition key tuple of items that that needs to be read * @param classType class type * @return a Mono with feed response of cosmos items */ @Beta(Beta.SinceVersion.V4_4_0) public Mono> readMany( - List> itemKeyList, + List itemIdentityList, Class classType) { - return this.readMany(itemKeyList, null, classType); + return this.readMany(itemIdentityList, null, classType); } /** * Reads many documents. * * @param the type parameter - * @param itemKeyList document id and partition key pair that needs to be read + * @param itemIdentityList CosmosItem id and partition key tuple of items that that needs to be read * @param sessionToken the optional Session token - null if the read can be made without specific session token * @param classType class type * @return a Mono with feed response of cosmos items */ @Beta(Beta.SinceVersion.V4_4_0) public Mono> readMany( - List> itemKeyList, + List itemIdentityList, String sessionToken, Class classType) { @@ -574,7 +574,7 @@ public Mono> readMany( options.setMaxDegreeOfParallelism(-1); return CosmosBridgeInternal .getAsyncDocumentClient(this.getDatabase()) - .readMany(itemKeyList, BridgeInternal.getLink(this), options, classType); + .readMany(itemIdentityList, BridgeInternal.getLink(this), options, classType); } /** @@ -590,7 +590,6 @@ public Mono> readMany( * @return a {@link CosmosPagedFlux} containing one or several feed response pages * of the read Cosmos items or an error. */ - @Beta(Beta.SinceVersion.V4_4_0) public CosmosPagedFlux readAllItems( PartitionKey partitionKey, Class classType) { @@ -612,7 +611,6 @@ public CosmosPagedFlux readAllItems( * @return a {@link CosmosPagedFlux} containing one or several feed response pages * of the read Cosmos items or an error. */ - @Beta(Beta.SinceVersion.V4_4_0) public CosmosPagedFlux readAllItems( PartitionKey partitionKey, CosmosQueryRequestOptions options, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosContainer.java index f014322eb57ea..a9f14e603b010 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosContainer.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosContainer.java @@ -3,7 +3,7 @@ package com.azure.cosmos; -import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; +import com.azure.cosmos.models.CosmosItemIdentity; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.CosmosContainerRequestOptions; @@ -312,36 +312,36 @@ public CosmosPagedIterable queryItems(SqlQuerySpec querySpec, CosmosQuery * Reads many documents. * * @param the type parameter - * @param itemKeyList document id and partition key pair that needs to be read + * @param itemIdentityList CosmosItem id and partition key tuple of items that that needs to be read * @param classType class type * @return a Mono with feed response of cosmos items */ @Beta(Beta.SinceVersion.V4_4_0) public FeedResponse readMany( - List> itemKeyList, + List itemIdentityList, Class classType) { - return this.readMany(itemKeyList, null, classType); + return this.readMany(itemIdentityList, null, classType); } /** * Reads many documents. * * @param the type parameter - * @param itemKeyList document id and partition key pair that needs to be read + * @param itemIdentityList CosmosItem id and partition key tuple of items that that needs to be read * @param sessionToken the optional Session token - null if the read can be made without specific session token * @param classType class type * @return a Mono with feed response of cosmos items */ @Beta(Beta.SinceVersion.V4_4_0) public FeedResponse readMany( - List> itemKeyList, + List itemIdentityList, String sessionToken, Class classType) { return this.blockFeedResponse( this.asyncContainer.readMany( - itemKeyList, + itemIdentityList, sessionToken, classType)); } @@ -354,7 +354,6 @@ public FeedResponse readMany( * @param classType the class type. * @return the {@link CosmosPagedIterable}. */ - @Beta(Beta.SinceVersion.V4_4_0) public CosmosPagedIterable readAllItems( PartitionKey partitionKey, Class classType) { @@ -372,7 +371,6 @@ public CosmosPagedIterable readAllItems( * @param classType the class type. * @return the {@link CosmosPagedIterable}. */ - @Beta(Beta.SinceVersion.V4_4_0) public CosmosPagedIterable readAllItems( PartitionKey partitionKey, CosmosQueryRequestOptions options, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java index 7b7c5a38345f9..8cc921f0aa02f 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java @@ -5,11 +5,11 @@ import com.azure.core.credential.AzureKeyCredential; import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.models.CosmosItemIdentity; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.models.SqlQuerySpec; -import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1369,14 +1369,14 @@ Flux> queryUserDefinedFunctions(String collect /** * Reads many documents at once - * @param itemKeyList document id and partition key pair that needs to be read + * @param itemIdentityList CosmosItem id and partition key tuple of items that that needs to be read * @param collectionLink link for the documentcollection/container to be queried * @param options the query request options * @param klass class type * @return a Mono with feed response of documents */ Mono> readMany( - List> itemKeyList, + List itemIdentityList, String collectionLink, CosmosQueryRequestOptions options, Class klass); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemOperations.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemOperations.java index 02c9a57b2744f..caec3734a06ac 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemOperations.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemOperations.java @@ -3,16 +3,16 @@ package com.azure.cosmos.implementation; -import com.azure.cosmos.BridgeInternal; import com.azure.cosmos.CosmosAsyncContainer; import com.azure.cosmos.CosmosBridgeInternal; import com.azure.cosmos.CosmosContainer; -import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.CosmosItemIdentity; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import reactor.core.publisher.Mono; +import java.util.ArrayList; import java.util.List; final public class ItemOperations { @@ -31,6 +31,7 @@ final public class ItemOperations { public static FeedResponse readMany(CosmosContainer container, List> itemKeyList, Class classType) { + return readManyAsync(CosmosBridgeInternal.getCosmosAsyncContainer(container), itemKeyList, classType).block(); } @@ -53,7 +54,26 @@ public static Mono> readManyAsync(CosmosAsyncContainer conta throw new IllegalArgumentException("Parameter container is required and cannot be null."); } - return container.readMany(itemKeyList, classType); + return container.readMany(convertItemKeyList(itemKeyList), classType); + } + + private static List convertItemKeyList( + List> itemKeyList) { + + if (itemKeyList != null) { + List itemIdentities = new ArrayList<>(itemKeyList.size()); + for (int i = 0; i < itemKeyList.size(); i++) { + + itemIdentities.add( + new CosmosItemIdentity( + itemKeyList.get(i).getRight(), + itemKeyList.get(i).getLeft())); + } + + return itemIdentities; + } + + return new ArrayList<>(); } private ItemOperations() {} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index e24e4c8c2e94c..8ebcc254febbe 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -8,7 +8,6 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.DirectConnectionConfig; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; -import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import com.azure.cosmos.implementation.caches.RxClientCollectionCache; import com.azure.cosmos.implementation.caches.RxCollectionCache; import com.azure.cosmos.implementation.caches.RxPartitionKeyRangeCache; @@ -30,6 +29,7 @@ import com.azure.cosmos.implementation.routing.PartitionKeyAndResourceTokenPair; import com.azure.cosmos.implementation.routing.PartitionKeyInternal; import com.azure.cosmos.implementation.routing.PartitionKeyInternalHelper; +import com.azure.cosmos.models.CosmosItemIdentity; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.ModelBridgeInternal; @@ -1539,7 +1539,7 @@ public Flux> readDocuments(String collectionLink, CosmosQ @Override public Mono> readMany( - List> itemKeyList, + List itemIdentityList, String collectionLink, CosmosQueryRequestOptions options, Class klass) { @@ -1569,18 +1569,19 @@ public Mono> readMany( null, null); return valueHolderMono.flatMap(collectionRoutingMapValueHolder -> { - Map>> partitionRangeItemKeyMap = + Map> partitionRangeItemKeyMap = new HashMap<>(); CollectionRoutingMap routingMap = collectionRoutingMapValueHolder.v; if (routingMap == null) { throw new IllegalStateException("Failed to get routing map."); } - itemKeyList - .forEach(stringPartitionKeyPair -> { + itemIdentityList + .forEach(itemIdentity -> { String effectivePartitionKeyString = PartitionKeyInternalHelper .getEffectivePartitionKeyString( - BridgeInternal.getPartitionKeyInternal(stringPartitionKeyPair.getRight()), + BridgeInternal.getPartitionKeyInternal( + itemIdentity.getPartitionKey()), pkDefinition); //use routing map to find the partitionKeyRangeId of each @@ -1590,13 +1591,13 @@ public Mono> readMany( //group the itemKeyList based on partitionKeyRangeId if (partitionRangeItemKeyMap.get(range) == null) { - List> list = new ArrayList<>(); - list.add(stringPartitionKeyPair); + List list = new ArrayList<>(); + list.add(itemIdentity); partitionRangeItemKeyMap.put(range, list); } else { - List> pairs = + List pairs = partitionRangeItemKeyMap.get(range); - pairs.add(stringPartitionKeyPair); + pairs.add(itemIdentity); partitionRangeItemKeyMap.put(range, pairs); } @@ -1655,14 +1656,14 @@ public Mono> readMany( } private Map getRangeQueryMap( - Map>> partitionRangeItemKeyMap, + Map> partitionRangeItemKeyMap, PartitionKeyDefinition partitionKeyDefinition) { //TODO: Optimise this to include all types of partitionkeydefinitions. ex: c["prop1./ab"]["key1"] Map rangeQueryMap = new HashMap<>(); String partitionKeySelector = createPkSelector(partitionKeyDefinition); - for(Map.Entry>> entry: partitionRangeItemKeyMap.entrySet()) { + for(Map.Entry> entry: partitionRangeItemKeyMap.entrySet()) { SqlQuerySpec sqlQuerySpec; if (partitionKeySelector.equals("[\"id\"]")) { @@ -1679,7 +1680,7 @@ private Map getRangeQueryMap( } private SqlQuerySpec createReadManyQuerySpecPartitionKeyIdSame( - List> idPartitionKeyPairList, + List idPartitionKeyPairList, String partitionKeySelector) { StringBuilder queryStringBuilder = new StringBuilder(); @@ -1687,12 +1688,12 @@ private SqlQuerySpec createReadManyQuerySpecPartitionKeyIdSame( queryStringBuilder.append("SELECT * FROM c WHERE c.id IN ( "); for (int i = 0; i < idPartitionKeyPairList.size(); i++) { - Pair pair = idPartitionKeyPairList.get(i); + CosmosItemIdentity itemIdentity = idPartitionKeyPairList.get(i); - String idValue = pair.getLeft(); + String idValue = itemIdentity.getId(); String idParamName = "@param" + i; - PartitionKey pkValueAsPartitionKey = pair.getRight(); + PartitionKey pkValueAsPartitionKey = itemIdentity.getPartitionKey(); Object pkValue = ModelBridgeInternal.getPartitionKeyObject(pkValueAsPartitionKey); if (!Objects.equals(idValue, pkValue)) { @@ -1712,20 +1713,20 @@ private SqlQuerySpec createReadManyQuerySpecPartitionKeyIdSame( return new SqlQuerySpec(queryStringBuilder.toString(), parameters); } - private SqlQuerySpec createReadManyQuerySpec(List> idPartitionKeyPairList, String partitionKeySelector) { + private SqlQuerySpec createReadManyQuerySpec(List itemIdentities, String partitionKeySelector) { StringBuilder queryStringBuilder = new StringBuilder(); List parameters = new ArrayList<>(); queryStringBuilder.append("SELECT * FROM c WHERE ( "); - for (int i = 0; i < idPartitionKeyPairList.size(); i++) { - Pair pair = idPartitionKeyPairList.get(i); + for (int i = 0; i < itemIdentities.size(); i++) { + CosmosItemIdentity itemIdentity = itemIdentities.get(i); - PartitionKey pkValueAsPartitionKey = pair.getRight(); + PartitionKey pkValueAsPartitionKey = itemIdentity.getPartitionKey(); Object pkValue = ModelBridgeInternal.getPartitionKeyObject(pkValueAsPartitionKey); String pkParamName = "@param" + (2 * i); parameters.add(new SqlParameter(pkParamName, pkValue)); - String idValue = pair.getLeft(); + String idValue = itemIdentity.getId(); String idParamName = "@param" + (2 * i + 1); parameters.add(new SqlParameter(idParamName, idValue)); @@ -1740,7 +1741,7 @@ private SqlQuerySpec createReadManyQuerySpec(List> id queryStringBuilder.append(pkParamName); queryStringBuilder.append(" )"); - if (i < idPartitionKeyPairList.size() - 1) { + if (i < itemIdentities.size() - 1) { queryStringBuilder.append(" OR "); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemIdentity.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemIdentity.java new file mode 100644 index 0000000000000..f933e2068f76e --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemIdentity.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.models; + +import com.azure.cosmos.util.Beta; + +/** + * Encapsulates the PartitionKey/id tuple that uniquely identifies a CosmosItem + */ +@Beta(Beta.SinceVersion.V4_4_0) +public final class CosmosItemIdentity { + private final PartitionKey partitionKey; + private final String id; + + /** + * Instantiates an instance of the CosmosItemIdentity class + * @param partitionKey the partition key - must not be null + * @param id the item id value - must be unique within the scope of a logical partition, must not be null or empty + */ + public CosmosItemIdentity(PartitionKey partitionKey, String id) { + + if (partitionKey == null) { + throw new IllegalArgumentException("partitionKey is null."); + } + + if (id == null || id.isEmpty()) { + throw new IllegalArgumentException("id is null or empty"); + } + + this.partitionKey = partitionKey; + this.id = id; + } + + /** + *

    Gets the partition key

    + * + * @return the partition key - must not be null + */ + public PartitionKey getPartitionKey() { + return this.partitionKey; + } + + /** + *

    Gets the id value uniquely identifying this item within the scope of a logical partition

    + * + * @return the id value uniquely identifying this item within the scope of a logical + * partition - must not be null or empty + */ + public String getId() { + return this.id; + } +} diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java index 0783edf8e211b..6a6b3a89e362d 100644 --- a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java @@ -10,6 +10,7 @@ import com.azure.cosmos.CosmosBridgeInternal; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosException; +import com.azure.cosmos.models.CosmosItemIdentity; import com.azure.cosmos.models.ModelBridgeInternal; import com.azure.cosmos.util.CosmosPagedFlux; import com.azure.cosmos.implementation.ItemOperations; @@ -675,7 +676,7 @@ private List queryWithContinuationTokens(String query, int p //TODO: Fix the test for GW mode @Test(groups = { "simple" }, timeOut = TIMEOUT) - public void readMany() throws Exception { + public void readManyWithItemOperations() throws Exception { if (this.getConnectionPolicy().getConnectionMode() == ConnectionMode.GATEWAY) { throw new SkipException("Skipping gateway mode. This needs to be fixed"); } @@ -686,12 +687,33 @@ public void readMany() throws Exception { new PartitionKey(ModelBridgeInternal.getObjectFromJsonSerializable(createdDocuments.get(i), "mypk")))); } FeedResponse documentFeedResponse = - createdCollection.readMany(pairList, JsonNode.class).block(); + ItemOperations.readManyAsync(createdCollection, pairList, JsonNode.class).block(); assertThat(documentFeedResponse.getResults().size()).isEqualTo(pairList.size()); assertThat(documentFeedResponse.getResults().stream().map(jsonNode -> jsonNode.get("id").textValue()).collect(Collectors.toList())) .containsAll(pairList.stream().map(p -> p.getLeft()).collect(Collectors.toList())); } + //TODO: Fix the test for GW mode + @Test(groups = { "simple" }, timeOut = TIMEOUT) + public void readMany() throws Exception { + if (this.getConnectionPolicy().getConnectionMode() == ConnectionMode.GATEWAY) { + throw new SkipException("Skipping gateway mode. This needs to be fixed"); + } + + List itemIdentities = new ArrayList<>(); + for (int i = 0; i < createdDocuments.size(); i = i + 3) { + itemIdentities.add( + new CosmosItemIdentity( + new PartitionKey(ModelBridgeInternal.getObjectFromJsonSerializable(createdDocuments.get(i), "mypk")), + createdDocuments.get(i).getId())); + } + FeedResponse documentFeedResponse = + createdCollection.readMany(itemIdentities, JsonNode.class).block(); + assertThat(documentFeedResponse.getResults().size()).isEqualTo(itemIdentities.size()); + assertThat(documentFeedResponse.getResults().stream().map(jsonNode -> jsonNode.get("id").textValue()).collect(Collectors.toList())) + .containsAll(itemIdentities.stream().map(i -> i.getId()).collect(Collectors.toList())); + } + //TODO: Fix the test for GW mode @Test(groups = { "simple" }, timeOut = TIMEOUT) public void readManyIdSameAsPartitionKey() throws Exception { @@ -701,15 +723,17 @@ public void readManyIdSameAsPartitionKey() throws Exception { CosmosAsyncContainer containerWithIdAsPartitionKey = getSharedMultiPartitionCosmosContainerWithIdAsPartitionKey(client); List newItems = prepareCosmosContainer(containerWithIdAsPartitionKey); - List> pairList = new ArrayList<>(); + List itemIdentities = new ArrayList<>(); for (int i = 0; i < newItems.size(); i = i + 3) { - pairList.add(Pair.of(newItems.get(i).getId(), - new PartitionKey(ModelBridgeInternal.getObjectFromJsonSerializable(newItems.get(i), "id")))); + itemIdentities.add( + new CosmosItemIdentity( + new PartitionKey(ModelBridgeInternal.getObjectFromJsonSerializable(newItems.get(i), "id")), + newItems.get(i).getId())); } FeedResponse documentFeedResponse = - containerWithIdAsPartitionKey.readMany(pairList, JsonNode.class).block(); - assertThat(documentFeedResponse.getResults().size()).isEqualTo(pairList.size()); + containerWithIdAsPartitionKey.readMany(itemIdentities, JsonNode.class).block(); + assertThat(documentFeedResponse.getResults().size()).isEqualTo(itemIdentities.size()); assertThat(documentFeedResponse.getResults().stream().map(jsonNode -> jsonNode.get("id").textValue()).collect(Collectors.toList())) - .containsAll(pairList.stream().map(p -> p.getLeft()).collect(Collectors.toList())); + .containsAll(itemIdentities.stream().map(i -> i.getId()).collect(Collectors.toList())); } } From 6149c79b1bbc3a4e7dc7dd7ec48669ecfd5fe284 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 4 Sep 2020 10:52:58 -0700 Subject: [PATCH 106/168] Sync eng/common directory with azure-sdk-tools repository for Tools PR 823 (#14573) --- .../templates/steps/verify-changelog.yml | 7 +- eng/common/scripts/Package-Properties.ps1 | 102 +++++++++--------- eng/common/scripts/Verify-ChangeLog.ps1 | 28 +---- eng/common/scripts/common.ps1 | 30 +++--- 4 files changed, 75 insertions(+), 92 deletions(-) diff --git a/eng/common/pipelines/templates/steps/verify-changelog.yml b/eng/common/pipelines/templates/steps/verify-changelog.yml index f6005124a87f3..8173c8ec599b0 100644 --- a/eng/common/pipelines/templates/steps/verify-changelog.yml +++ b/eng/common/pipelines/templates/steps/verify-changelog.yml @@ -5,6 +5,9 @@ parameters: - name: ServiceName type: string default: 'not-specified' +- name: ServiceDirectory + type: string + default: '' - name: ForRelease type: boolean default: false @@ -15,9 +18,7 @@ steps: filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLog.ps1 arguments: > -PackageName ${{ parameters.PackageName }} - -ServiceName ${{ parameters.ServiceName }} - -RepoRoot $(Build.SourcesDirectory) - -RepoName $(Build.Repository.Name) + -ServiceDirectory ${{ coalesce(parameters.ServiceDirectory, parameters.ServiceName) }} -ForRelease $${{ parameters.ForRelease }} pwsh: true workingDirectory: $(Pipeline.Workspace) diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index cba89157a8799..2ca4aacdbef1d 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -1,66 +1,65 @@ # Helper functions for retireving useful information from azure-sdk-for-* repo -# Example Use : Import-Module .\eng\common\scripts\modules class PackageProps { - [string]$pkgName - [string]$pkgVersion - [string]$pkgDirectoryPath - [string]$pkgServiceName - [string]$pkgReadMePath - [string]$pkgChangeLogPath - [string]$pkgGroup - - PackageProps([string]$pkgName,[string]$pkgVersion,[string]$pkgDirectoryPath,[string]$pkgServiceName) + [string]$Name + [string]$Version + [string]$DirectoryPath + [string]$ServiceDirectory + [string]$ReadMePath + [string]$ChangeLogPath + [string]$Group + + PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory) { - $this.Initialize($pkgName, $pkgVersion, $pkgDirectoryPath, $pkgServiceName) + $this.Initialize($name, $version, $directoryPath, $serviceDirectory) } - PackageProps([string]$pkgName,[string]$pkgVersion,[string]$pkgDirectoryPath,[string]$pkgServiceName,[string]$pkgGroup="") + PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory, [string]$group = "") { - $this.Initialize($pkgName, $pkgVersion, $pkgDirectoryPath, $pkgServiceName, $pkgGroup) + $this.Initialize($name, $version, $directoryPath, $serviceDirectory, $group) } hidden [void]Initialize( - [string]$pkgName, - [string]$pkgVersion, - [string]$pkgDirectoryPath, - [string]$pkgServiceName + [string]$name, + [string]$version, + [string]$directoryPath, + [string]$serviceDirectory ) { - $this.pkgName = $pkgName - $this.pkgVersion = $pkgVersion - $this.pkgDirectoryPath = $pkgDirectoryPath - $this.pkgServiceName = $pkgServiceName + $this.Name = $name + $this.Version = $version + $this.DirectoryPath = $directoryPath + $this.ServiceDirectory = $serviceDirectory - if (Test-Path (Join-Path $pkgDirectoryPath "README.md")) + if (Test-Path (Join-Path $directoryPath "README.md")) { - $this.pkgReadMePath = Join-Path $pkgDirectoryPath "README.md" + $this.ReadMePath = Join-Path $directoryPath "README.md" } else { - $this.pkgReadMePath = $null + $this.ReadMePath = $null } - if (Test-Path (Join-Path $pkgDirectoryPath "CHANGELOG.md")) + if (Test-Path (Join-Path $directoryPath "CHANGELOG.md")) { - $this.pkgChangeLogPath = Join-Path $pkgDirectoryPath "CHANGELOG.md" + $this.ChangeLogPath = Join-Path $directoryPath "CHANGELOG.md" } else { - $this.pkgChangeLogPath = $null + $this.ChangeLogPath = $null } } hidden [void]Initialize( - [string]$pkgName, - [string]$pkgVersion, - [string]$pkgDirectoryPath, - [string]$pkgServiceName, - [string]$pkgGroup + [string]$name, + [string]$version, + [string]$directoryPath, + [string]$serviceDirectory, + [string]$group ) { - $this.Initialize($pkgName, $pkgVersion, $pkgDirectoryPath, $pkgServiceName) - $this.pkgGroup = $pkgGroup + $this.Initialize($name, $version, $directoryPath, $serviceDirectory) + $this.Group = $group } } @@ -72,18 +71,17 @@ function Get-PkgProperties { Param ( - [Parameter(Mandatory=$true)] + [Parameter(Mandatory = $true)] [string]$PackageName, - [Parameter(Mandatory=$true)] - [string]$ServiceName + [Parameter(Mandatory = $true)] + [string]$ServiceDirectory ) - $pkgDirectoryName = $null $pkgDirectoryPath = $null - $serviceDirectoryPath = Join-Path $RepoRoot "sdk" $ServiceName + $serviceDirectoryPath = Join-Path $RepoRoot "sdk" $ServiceDirectory if (!(Test-Path $serviceDirectoryPath)) { - Write-Error "Service Directory $ServiceName does not exist" + Write-Error "Service Directory $ServiceDirectory does not exist" exit 1 } @@ -92,13 +90,13 @@ function Get-PkgProperties foreach ($directory in $directoriesPresent) { $pkgDirectoryPath = Join-Path $serviceDirectoryPath $directory.Name - if ($ExtractPkgProps) + if ($GetPackageInfoFromRepoFn) { - $pkgProps = &$ExtractPkgProps -pkgPath $pkgDirectoryPath -serviceName $ServiceName -pkgName $PackageName + $pkgProps = &$GetPackageInfoFromRepoFn -pkgPath $pkgDirectoryPath -serviceDirectory $ServiceDirectory -pkgName $PackageName } else { - Write-Error "The function '${ExtractPkgProps}' was not found." + Write-Error "The function 'Get-${Language}-PackageInfoFromRepo' was not found." } if ($pkgProps -ne $null) @@ -112,11 +110,11 @@ function Get-PkgProperties # Takes ServiceName and Repo Root Directory # Returns important properties for each package in the specified service, or entire repo if the serviceName is not specified # Returns an Table of service key to array values of PS Object with properties @ { pkgName, pkgVersion, pkgDirectoryPath, pkgReadMePath, pkgChangeLogPath } -function Get-AllPkgProperties ([string]$ServiceName=$null) +function Get-AllPkgProperties ([string]$ServiceDirectory = $null) { $pkgPropsResult = @() - if ([string]::IsNullOrEmpty($ServiceName)) + if ([string]::IsNullOrEmpty($ServiceDirectory)) { $searchDir = Join-Path $RepoRoot "sdk" foreach ($dir in (Get-ChildItem $searchDir -Directory)) @@ -128,20 +126,20 @@ function Get-AllPkgProperties ([string]$ServiceName=$null) $activePkgList = Get-PkgListFromYml -ciYmlPath (Join-Path $serviceDir "ci.yml") if ($activePkgList -ne $null) { - $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -serviceName $dir.Name -pkgPropsResult $pkgPropsResult + $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -ServiceDirectory $dir.Name -pkgPropsResult $pkgPropsResult } } } } else { - $serviceDir = Join-Path $RepoRoot "sdk" $ServiceName + $serviceDir = Join-Path $RepoRoot "sdk" $ServiceDirectory if (Test-Path (Join-Path $serviceDir "ci.yml")) { $activePkgList = Get-PkgListFromYml -ciYmlPath (Join-Path $serviceDir "ci.yml") if ($activePkgList -ne $null) { - $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -serviceName $ServiceName -pkgPropsResult $pkgPropsResult + $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -ServiceDirectory $ServiceDirectory -pkgPropsResult $pkgPropsResult } } } @@ -149,11 +147,11 @@ function Get-AllPkgProperties ([string]$ServiceName=$null) return $pkgPropsResult } -function Operate-OnPackages ($activePkgList, $serviceName, [Array]$pkgPropsResult) +function Operate-OnPackages ($activePkgList, $ServiceDirectory, [Array]$pkgPropsResult) { foreach ($pkg in $activePkgList) { - $pkgProps = Get-PkgProperties -PackageName $pkg["name"] -ServiceName $serviceName + $pkgProps = Get-PkgProperties -PackageName $pkg["name"] -ServiceDirectory $ServiceDirectory $pkgPropsResult += $pkgProps } return $pkgPropsResult @@ -168,11 +166,11 @@ function Get-PkgListFromYml ($ciYmlPath) $ciYmlObj = ConvertFrom-Yaml $ciYmlContent -Ordered if ($ciYmlObj.Contains("stages")) { - $artifactsInCI = $ciYmlObj["stages"][0]["parameters"]["Artifacts"] + $artifactsInCI = $ciYmlObj["stages"][0]["parameters"]["Artifacts"] } elseif ($ciYmlObj.Contains("extends")) { - $artifactsInCI = $ciYmlObj["extends"]["parameters"]["Artifacts"] + $artifactsInCI = $ciYmlObj["extends"]["parameters"]["Artifacts"] } if ($artifactsInCI -eq $null) { diff --git a/eng/common/scripts/Verify-ChangeLog.ps1 b/eng/common/scripts/Verify-ChangeLog.ps1 index 26218d988df28..e56994a30e836 100644 --- a/eng/common/scripts/Verify-ChangeLog.ps1 +++ b/eng/common/scripts/Verify-ChangeLog.ps1 @@ -3,17 +3,11 @@ param ( [String]$ChangeLogLocation, [String]$VersionString, [string]$PackageName, - [string]$ServiceName, - [string]$RepoRoot, - [ValidateSet("net", "java", "js", "python")] - [string]$Language, - [string]$RepoName, + [string]$ServiceDirectory, [boolean]$ForRelease = $False ) -$ProgressPreference = "SilentlyContinue" -. (Join-Path $PSScriptRoot SemVer.ps1) -Import-Module (Join-Path $PSScriptRoot modules ChangeLog-Operations.psm1) +. (Join-Path $PSScriptRoot common.ps1) $validChangeLog = $false if ($ChangeLogLocation -and $VersionString) @@ -22,22 +16,8 @@ if ($ChangeLogLocation -and $VersionString) } else { - Import-Module (Join-Path $PSScriptRoot modules Package-Properties.psm1) - if ([System.String]::IsNullOrEmpty($Language)) - { - if ($RepoName -match "azure-sdk-for-(?[^-]+)") - { - $Language = $matches["lang"] - } - else - { - Write-Error "Failed to set Language automatically. Please pass the appropriate Language as a parameter." - exit 1 - } - } - - $PackageProp = Get-PkgProperties -PackageName $PackageName -ServiceName $ServiceName -Language $Language -RepoRoot $RepoRoot - $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.pkgChangeLogPath -VersionString $PackageProp.pkgVersion -ForRelease $ForRelease + $PackageProp = Get-PkgProperties -PackageName $PackageName -ServiceDirectory $ServiceDirectory + $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $ForRelease } if (!$validChangeLog) diff --git a/eng/common/scripts/common.ps1 b/eng/common/scripts/common.ps1 index f1677b21425fc..6a1f1487832ba 100644 --- a/eng/common/scripts/common.ps1 +++ b/eng/common/scripts/common.ps1 @@ -1,25 +1,29 @@ -$global:RepoRoot = Resolve-Path "${PSScriptRoot}..\..\..\.." -$global:EngDir = Join-Path $global:RepoRoot "eng" -$global:EngCommonDir = Join-Path $global:EngDir "common" -$global:EngCommonScriptsDir = Join-Path $global:EngCommonDir "scripts" -$global:EngScriptsDir = Join-Path $global:EngDir "scripts" +$RepoRoot = Resolve-Path "${PSScriptRoot}..\..\..\.." +$EngDir = Join-Path $RepoRoot "eng" +$EngCommonDir = Join-Path $EngDir "common" +$EngCommonScriptsDir = Join-Path $EngCommonDir "scripts" +$EngScriptsDir = Join-Path $EngDir "scripts" # Import required scripts -. (Join-Path $global:EngCommonScriptsDir SemVer.ps1) -. (Join-Path $global:EngCommonScriptsDir Changelog-Operations.ps1) -. (Join-Path $global:EngCommonScriptsDir Package-Properties.ps1) +. (Join-Path $EngCommonScriptsDir SemVer.ps1) +. (Join-Path $EngCommonScriptsDir ChangeLog-Operations.ps1) +. (Join-Path $EngCommonScriptsDir Package-Properties.ps1) # Setting expected from common languages settings -$global:Language = "Unknown" -$global:PackageRepository = "Unknown" -$global:packagePattern = "Unknown" -$global:MetadataUri = "Unknown" +$Language = "Unknown" +$PackageRepository = "Unknown" +$packagePattern = "Unknown" +$MetadataUri = "Unknown" # Import common language settings -$EngScriptsLanguageSettings = Join-path $global:EngScriptsDir "Language-Settings.ps1" +$EngScriptsLanguageSettings = Join-path $EngScriptsDir "Language-Settings.ps1" if (Test-Path $EngScriptsLanguageSettings) { . $EngScriptsLanguageSettings } +If ($LanguageShort -eq $null) +{ + $LangaugeShort = $Language +} # Transformed Functions $GetPackageInfoFromRepoFn = "Get-${Language}-PackageInfoFromRepo" From 949133463d54010de0c440701b646d81123e25e4 Mon Sep 17 00:00:00 2001 From: Brandon Siegel <96068+bsiegel@users.noreply.github.com> Date: Fri, 4 Sep 2020 12:48:24 -0700 Subject: [PATCH 107/168] Add tables samples README (#14841) --- .../azure-data-tables/src/samples/README.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sdk/tables/azure-data-tables/src/samples/README.md diff --git a/sdk/tables/azure-data-tables/src/samples/README.md b/sdk/tables/azure-data-tables/src/samples/README.md new file mode 100644 index 0000000000000..3ded9b97ed988 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/samples/README.md @@ -0,0 +1,64 @@ +--- +page_type: sample +languages: + - java +products: + - azure + - azure-tables +urlFragment: tables-samples +--- + +# Azure Tables client library samples for Java + +Azure Tables samples are a set of self-contained Java programs that demonstrate interacting with Azure Tables +using the client library. Each sample focuses on a specific scenario and can be executed independently. + +## Key concepts +Key concepts are explained in detail [here][sdk_readme_key_concepts]. + +## Getting started +Please refer to the [Getting Started][sdk_readme_getting_started] section. + +### Obtaining a Tables account connection string + +Most of the samples authorize with Tables using a connection string generated for that Storage or Cosmos DB Tables API +account. You can obtain your connection string from the Azure Portal (click **Access keys** under **Settings** in the +Portal Storage account blade, or **Connection String** under **Settings** in the Portal Cosmos DB account blade) or +using the Azure CLI: + +```bash +# Storage account +az storage account show-connection-string \ + --resource-group \ + --name + +# Cosmos DB Table API account +az cosmosdb list-connection-strings \ + --resource-group \ + --name +``` + +## Examples + +- [Interact with the Tables service using the async clients][sample_async_client_code_snippets] +- [Interact with the Tables service using the synchronous clients][sample_sync_client_code_snippets] + +## Troubleshooting +See [Troubleshooting][sdk_readme_troubleshooting]. + +## Next steps +See [Next steps][sdk_readme_next_steps]. + +## Contributing +This project welcomes contributions and suggestions. See [Contributing][sdk_readme_contributing] for guidelines. + + +[sdk_readme_key_concepts]: ../../README.md#key-concepts +[sdk_readme_getting_started]: ../../README.md#getting-started +[sdk_readme_troubleshooting]: ../../README.md#troubleshooting +[sdk_readme_next_steps]: ../../README.md#next-steps +[sdk_readme_contributing]: ../../README.md#contributing +[sample_async_client_code_snippets]: ./java/TableServiceAsyncClientCodeSnippets.java +[sample_sync_client_code_snippets]: ./java/TableServiceClientCodeSnippets.java + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%tables%2Fazure-data-tables%2Fsrc%2Fsamples%2README.png) From b455a61f4c6daece13590a0f4136bab3c4f30546 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 4 Sep 2020 14:54:28 -0700 Subject: [PATCH 108/168] Sync eng/common directory with azure-sdk-tools repository (#14846) --- eng/common/Update-Change-Log.ps1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/eng/common/Update-Change-Log.ps1 b/eng/common/Update-Change-Log.ps1 index 6380e3ff800a2..3d1497f298639 100644 --- a/eng/common/Update-Change-Log.ps1 +++ b/eng/common/Update-Change-Log.ps1 @@ -12,7 +12,8 @@ param ( [Parameter(Mandatory = $true)] [String]$ChangeLogPath, [String]$Unreleased = $True, - [String]$ReplaceVersion = $False + [String]$ReplaceVersion = $False, + [String]$ReleaseDate ) @@ -46,8 +47,12 @@ function Get-VersionTitle($Version, $Unreleased) # Generate version title $newVersionTitle = "## $Version $UNRELEASED_TAG" if ($Unreleased -eq $False) { - $releaseDate = Get-Date -Format "(yyyy-MM-dd)" - $newVersionTitle = "## $Version $releaseDate" + $actualReleaseDate = $ReleaseDate; + + if (!$actualReleaseDate) { + $actualReleaseDate = Get-Date -Format "yyyy-MM-dd" + } + $newVersionTitle = "## $Version ($actualReleaseDate)" } return $newVersionTitle } @@ -95,7 +100,7 @@ function Get-NewChangeLog( [System.Collections.ArrayList]$ChangelogLines, $Versi exit(0) } - if (($ReplaceVersion -eq $True) -and ($Unreleased -eq $False) -and $CurrentTitle.Contains($version) -and (-not $CurrentTitle.Contains($UNRELEASED_TAG))) { + if (($ReplaceVersion -eq $True) -and ($Unreleased -eq $False) -and $CurrentTitle.Contains($version) -and (-not $CurrentTitle.Contains($UNRELEASED_TAG)) -and (-not $ReleaseDate)) { Write-Host "Version is already present in change log with a release date." exit(0) } From b637366e32edefb0fe63962983715a02c1ad2631 Mon Sep 17 00:00:00 2001 From: Brandon Siegel <96068+bsiegel@users.noreply.github.com> Date: Fri, 4 Sep 2020 15:38:40 -0700 Subject: [PATCH 109/168] Update tables version number and changelog (#14852) --- eng/jacoco-test-coverage/pom.xml | 2 +- eng/versioning/version_client.txt | 2 +- sdk/tables/azure-data-tables/CHANGELOG.md | 22 +++++++++++++++++++++- sdk/tables/azure-data-tables/README.md | 2 +- sdk/tables/azure-data-tables/pom.xml | 2 +- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 1859e75b95e3f..8320394d3a31e 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -134,7 +134,7 @@ com.azure azure-data-tables - 1.0.0-beta.1 + 12.0.0-beta.1 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 2b0a2fb0f2940..99923bb848830 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -26,7 +26,7 @@ com.azure:azure-cosmos-encryption;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-appconfiguration;1.1.4;1.2.0-beta.1 com.azure:azure-data-schemaregistry;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-data-schemaregistry-avro;1.0.0-beta.2;1.0.0-beta.3 -com.azure:azure-data-tables;1.0.0-beta.1;1.0.0-beta.1 +com.azure:azure-data-tables;12.0.0-beta.1;12.0.0-beta.1 com.azure:azure-digitaltwins-core;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-identity;1.1.0;1.2.0-beta.1 diff --git a/sdk/tables/azure-data-tables/CHANGELOG.md b/sdk/tables/azure-data-tables/CHANGELOG.md index 4144f75694a03..4a4e62fb08c9b 100644 --- a/sdk/tables/azure-data-tables/CHANGELOG.md +++ b/sdk/tables/azure-data-tables/CHANGELOG.md @@ -1,3 +1,23 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 12.0.0-beta.1 (Unreleased): + +Version 12.0.0-beta.1 is a beta of our efforts in creating a client library that is developer-friendly, idiomatic to +the Java ecosystem, and as consistent across different languages and platforms as possible. The principles that guide +our efforts can be found in the [Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java_introduction.html). + +### Features + +- Support for both [Azure Table storage](https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-overview) and + the [Cosmos DB Table API](https://docs.microsoft.com/en-us/azure/cosmos-db/table-introduction). +- Reactive streams support using [Project Reactor](https://projectreactor.io/). +- Create, list, query, and delete tables. +- Insert, update, upsert, merge, list, query, and delete table entities. + +### Known issues + +- Entity merge operations using the Cosmos DB Table API are currently broken. +- When using the Cosmos DB Table API, if a client is rate-limited by the service, the client returns the error to the + caller rather than automatically retrying the request after a delay. +- Upon failure, operations do not correctly throw a `TableStorageException` as documented, but instead currently throw + the internal type `TableServiceErrorException`. diff --git a/sdk/tables/azure-data-tables/README.md b/sdk/tables/azure-data-tables/README.md index 1e5415848b442..f325c093e30f4 100644 --- a/sdk/tables/azure-data-tables/README.md +++ b/sdk/tables/azure-data-tables/README.md @@ -15,7 +15,7 @@ best parts of Azure cloud. com.azure azure-data-tables - 1.0.0-beta.1 + 12.0.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/tables/azure-data-tables/pom.xml b/sdk/tables/azure-data-tables/pom.xml index f452f59153bbd..13cf21cd7092c 100644 --- a/sdk/tables/azure-data-tables/pom.xml +++ b/sdk/tables/azure-data-tables/pom.xml @@ -14,7 +14,7 @@ Licensed under the MIT License. com.azure azure-data-tables - 1.0.0-beta.1 + 12.0.0-beta.1 Microsoft Azure SDK for Azure Table This package contains the Microsoft Azure Table storage client library. https://github.com/Azure/azure-sdk-for-java From 18528bdd315cc07525b57e17e731103566923d0c Mon Sep 17 00:00:00 2001 From: Soreloser2 <43689321+Soreloser2@users.noreply.github.com> Date: Fri, 4 Sep 2020 17:41:51 -0700 Subject: [PATCH 110/168] Add convenience layer to generated code for Event Grid Track 2 (#14442) * Regenerate SDK from Autorest v4 Autorest regenerated using up to date version for track 2 pom file incorporated to jacoco and dependencies for module handled issue around capitalization of etag discrepancy fixed no test coverage yet * Regenerate SDK from Autorest v4 Autorest regenerated using up to date version for track 2 pom file incorporated to jacoco and dependencies for module handled issue around capitalization of etag discrepancy fixed no test coverage yet * EventGrid Track 2 Autogenerated Autogenerate EventGrid track 2 classes using the swagger. All files except EventGridPublisherImplTests.java, pom.xml, and the swagger readme.md are autogenerated. * EventGrid Track 2 written code Convenience layer for EventGrid Track 2 on top of autogenerated code. * Add Javadoc comments Add a few missing javadoc comments and remove a few comments from private methods. * Merge in changes from autogenerated PR test and pom edits mostly * Fix tests Rename methods and use StepVerifier instead of blocking * Add Changelog * Rework CloudEvent serialization Drop explicit support for non-JSON data. Modify/fix tests slightly. * Abbreviate SAS SharedAccessSignature -> SAS, refactor methods and classes * Small formatting changes * Readme and changelog formatting issues Maven artifact not included since it hasn't published yet, some github links are broken since they point to folders that are included in this commit, however they should work once the changes are merged. * Changed CustomEvent test conforms to live test expected custom event properties * Address review comments Variety of changes, major ones include: - Async methods on generic getData - Lazy list creation for send methods - Credential methods both renamed to `credential` - Logging errors instead of throwing - Additional missing javadoc comments * Final set of review comments mostly minor changes, except a small license change to all source files, including generated ones. Co-authored-by: Soren Dahl --- eng/.docsettings.yml | 1 + .../azure-messaging-eventgrid/CHANGELOG.md | 14 + .../azure-messaging-eventgrid/README.md | 313 +++++ .../azure-messaging-eventgrid/pom.xml | 2 - .../azure/messaging/eventgrid/CloudEvent.java | 363 ++++++ .../messaging/eventgrid/EventGridEvent.java | 289 +++++ .../EventGridPublisherAsyncClient.java | 163 +++ .../eventgrid/EventGridPublisherClient.java | 98 ++ .../EventGridPublisherClientBuilder.java | 297 +++++ .../eventgrid/EventGridSasCredential.java | 101 ++ .../eventgrid/EventGridServiceVersion.java | 38 + .../eventgrid/SystemEventMappings.java | 442 +++++++ .../EventGridPublisherClientImpl.java | 4 +- .../EventGridPublisherClientImplBuilder.java | 4 +- .../implementation/models/CloudEvent.java | 4 +- .../implementation/models/EventGridEvent.java | 4 +- .../implementation/models/package-info.java | 4 +- .../implementation/package-info.java | 4 +- .../messaging/eventgrid/package-info.java | 3 +- .../eventgrid/systemevents/AppAction.java | 4 +- ...ConfigurationKeyValueDeletedEventData.java | 4 +- ...onfigurationKeyValueModifiedEventData.java | 4 +- .../systemevents/AppEventTypeDetail.java | 4 +- .../systemevents/AppServicePlanAction.java | 4 +- .../AppServicePlanEventTypeDetail.java | 4 +- .../eventgrid/systemevents/AsyncStatus.java | 4 +- .../ContainerRegistryArtifactEventData.java | 4 +- .../ContainerRegistryArtifactEventTarget.java | 4 +- ...ontainerRegistryChartDeletedEventData.java | 4 +- ...ContainerRegistryChartPushedEventData.java | 4 +- .../ContainerRegistryEventActor.java | 4 +- .../ContainerRegistryEventData.java | 4 +- .../ContainerRegistryEventRequest.java | 4 +- .../ContainerRegistryEventSource.java | 4 +- .../ContainerRegistryEventTarget.java | 4 +- ...ontainerRegistryImageDeletedEventData.java | 4 +- ...ContainerRegistryImagePushedEventData.java | 4 +- .../DeviceConnectionStateEventInfo.java | 4 +- .../DeviceConnectionStateEventProperties.java | 4 +- .../DeviceLifeCycleEventProperties.java | 4 +- .../DeviceTelemetryEventProperties.java | 4 +- .../systemevents/DeviceTwinInfo.java | 4 +- .../DeviceTwinInfoProperties.java | 4 +- .../DeviceTwinInfoX509Thumbprint.java | 4 +- .../systemevents/DeviceTwinMetadata.java | 4 +- .../systemevents/DeviceTwinProperties.java | 4 +- .../EventHubCaptureFileCreatedEventData.java | 4 +- .../IotHubDeviceConnectedEventData.java | 4 +- .../IotHubDeviceCreatedEventData.java | 4 +- .../IotHubDeviceDeletedEventData.java | 4 +- .../IotHubDeviceDisconnectedEventData.java | 4 +- .../IotHubDeviceTelemetryEventData.java | 4 +- .../KeyVaultCertificateExpiredEventData.java | 4 +- ...eyVaultCertificateNearExpiryEventData.java | 4 +- ...CertificateNewVersionCreatedEventData.java | 4 +- .../KeyVaultKeyExpiredEventData.java | 4 +- .../KeyVaultKeyNearExpiryEventData.java | 4 +- ...KeyVaultKeyNewVersionCreatedEventData.java | 4 +- .../KeyVaultSecretExpiredEventData.java | 4 +- .../KeyVaultSecretNearExpiryEventData.java | 4 +- ...VaultSecretNewVersionCreatedEventData.java | 4 +- ...ServicesDatasetDriftDetectedEventData.java | 4 +- ...earningServicesModelDeployedEventData.java | 4 +- ...rningServicesModelRegisteredEventData.java | 4 +- ...LearningServicesRunCompletedEventData.java | 4 +- ...ningServicesRunStatusChangedEventData.java | 4 +- .../MapsGeofenceEnteredEventData.java | 4 +- .../MapsGeofenceEventProperties.java | 4 +- .../MapsGeofenceExitedEventData.java | 4 +- .../systemevents/MapsGeofenceGeometry.java | 4 +- .../MapsGeofenceResultEventData.java | 4 +- .../MediaJobCanceledEventData.java | 4 +- .../MediaJobCancelingEventData.java | 4 +- .../eventgrid/systemevents/MediaJobError.java | 4 +- .../systemevents/MediaJobErrorCategory.java | 4 +- .../systemevents/MediaJobErrorCode.java | 4 +- .../systemevents/MediaJobErrorDetail.java | 4 +- .../MediaJobErroredEventData.java | 4 +- .../MediaJobFinishedEventData.java | 4 +- .../systemevents/MediaJobOutput.java | 4 +- .../systemevents/MediaJobOutputAsset.java | 4 +- .../MediaJobOutputCanceledEventData.java | 4 +- .../MediaJobOutputCancelingEventData.java | 4 +- .../MediaJobOutputErroredEventData.java | 4 +- .../MediaJobOutputFinishedEventData.java | 4 +- .../MediaJobOutputProcessingEventData.java | 4 +- .../MediaJobOutputProgressEventData.java | 4 +- .../MediaJobOutputScheduledEventData.java | 4 +- .../MediaJobOutputStateChangeEventData.java | 4 +- .../MediaJobProcessingEventData.java | 4 +- .../eventgrid/systemevents/MediaJobRetry.java | 4 +- .../MediaJobScheduledEventData.java | 4 +- .../eventgrid/systemevents/MediaJobState.java | 4 +- .../MediaJobStateChangeEventData.java | 4 +- ...aLiveEventConnectionRejectedEventData.java | 4 +- ...diaLiveEventEncoderConnectedEventData.java | 4 +- ...LiveEventEncoderDisconnectedEventData.java | 4 +- ...ventIncomingDataChunkDroppedEventData.java | 4 +- ...eEventIncomingStreamReceivedEventData.java | 4 +- ...ventIncomingStreamsOutOfSyncEventData.java | 4 +- ...ncomingVideoStreamsOutOfSyncEventData.java | 4 +- ...ediaLiveEventIngestHeartbeatEventData.java | 4 +- ...ntTrackDiscontinuityDetectedEventData.java | 4 +- .../RedisExportRDBCompletedEventData.java | 4 +- .../RedisImportRDBCompletedEventData.java | 4 +- .../RedisPatchingCompletedEventData.java | 4 +- .../RedisScalingCompletedEventData.java | 4 +- .../ResourceActionCancelData.java | 4 +- .../ResourceActionFailureData.java | 4 +- .../ResourceActionSuccessData.java | 4 +- .../ResourceDeleteCancelData.java | 4 +- .../ResourceDeleteFailureData.java | 4 +- .../ResourceDeleteSuccessData.java | 4 +- .../systemevents/ResourceWriteCancelData.java | 4 +- .../ResourceWriteFailureData.java | 4 +- .../ResourceWriteSuccessData.java | 4 +- ...agesAvailableWithNoListenersEventData.java | 4 +- ...agesAvailableWithNoListenersEventData.java | 4 +- ...iceClientConnectionConnectedEventData.java | 4 +- ...ClientConnectionDisconnectedEventData.java | 4 +- .../eventgrid/systemevents/StampKind.java | 4 +- .../StorageBlobCreatedEventData.java | 4 +- .../StorageBlobDeletedEventData.java | 4 +- .../StorageBlobRenamedEventData.java | 4 +- .../StorageDirectoryCreatedEventData.java | 4 +- .../StorageDirectoryDeletedEventData.java | 4 +- .../StorageDirectoryRenamedEventData.java | 4 +- ...ageLifecyclePolicyActionSummaryDetail.java | 4 +- ...rageLifecyclePolicyCompletedEventData.java | 4 +- .../SubscriptionDeletedEventData.java | 4 +- .../SubscriptionValidationEventData.java | 4 +- .../SubscriptionValidationResponse.java | 4 +- .../WebAppServicePlanUpdatedEventData.java | 4 +- .../WebAppServicePlanUpdatedEventDataSku.java | 4 +- .../systemevents/WebAppUpdatedEventData.java | 4 +- .../WebBackupOperationCompletedEventData.java | 4 +- .../WebBackupOperationFailedEventData.java | 4 +- .../WebBackupOperationStartedEventData.java | 4 +- ...WebRestoreOperationCompletedEventData.java | 4 +- .../WebRestoreOperationFailedEventData.java | 4 +- .../WebRestoreOperationStartedEventData.java | 4 +- .../WebSlotSwapCompletedEventData.java | 4 +- .../WebSlotSwapFailedEventData.java | 4 +- .../WebSlotSwapStartedEventData.java | 4 +- ...SlotSwapWithPreviewCancelledEventData.java | 4 +- ...ebSlotSwapWithPreviewStartedEventData.java | 4 +- .../eventgrid/systemevents/package-info.java | 4 +- .../azure/messaging/eventgrid/ClassTime.java | 88 ++ .../messaging/eventgrid/PublishClassTime.java | 89 ++ .../messaging/eventgrid/ReadmeSamples.java | 111 ++ .../eventgrid/DeserializationTests.java | 1146 +++++++++++++++++ .../EventGridPublisherClientTests.java | 299 +++++ .../EventGridPublisherImplTests.java | 3 +- .../models/ContosoItemReceivedEventData.java | 22 + .../models/ContosoItemSentEventData.java | 17 + .../eventgrid/models/DroneShippingInfo.java | 21 + .../eventgrid/models/RocketShippingInfo.java | 21 + .../eventgrid/models/ShippingInfo.java | 26 + .../AppConfigurationKeyValueDeleted.json | 16 + .../AppConfigurationKeyValueModified.json | 16 + .../resources/customization/CloudEvent.json | 15 + .../customization/CloudEventBinaryData.json | 12 + .../customization/CloudEventNoArray.json | 13 + .../customization/CloudEventNullData.json | 11 + .../customization/CloudEventXmlData.json | 11 + .../ContainerRegistryChartDeletedEvent.json | 22 + .../ContainerRegistryChartPushedEvent.json | 22 + .../ContainerRegistryImageDeletedEvent.json | 39 + .../ContainerRegistryImagePushedEvent.json | 39 + .../CustomEventWithArrayData.json | 17 + .../CustomEventWithBooleanData.json | 12 + .../CustomEventWithPolymorphicData.json | 34 + .../CustomEventWithStringData.json | 12 + .../resources/customization/CustomEvents.json | 15 + .../customization/EventGridEventNoArray.json | 20 + .../customization/EventGridNullData.json | 11 + .../EventGridSubscriptionDeletedEvent.json | 14 + .../EventGridSubscriptionValidationEvent.json | 15 + .../EventHubCaptureFileCreatedEvent.json | 22 + .../IoTHubDeviceConnectedEvent.json | 19 + .../IoTHubDeviceCreatedEvent.json | 46 + .../IoTHubDeviceDeletedEvent.json | 46 + .../IoTHubDeviceDisconnectedEvent.json | 19 + .../IoTHubDeviceTelemetryEvent.json | 31 + .../MapsGeofenceEnteredEvent.json | 29 + .../MapsGeofenceExitedEvent.json | 29 + .../MapsGeofenceResultEvent.json | 29 + .../customization/MediaJobCanceledEvent.json | 26 + .../customization/MediaJobCancelingEvent.json | 16 + .../customization/MediaJobErroredEvent.json | 37 + .../customization/MediaJobFinishedEvent.json | 26 + .../MediaJobOutputCanceledEvent.json | 23 + .../MediaJobOutputCancelingEvent.json | 23 + .../MediaJobOutputErroredEvent.json | 34 + .../MediaJobOutputFinishedEvent.json | 22 + .../MediaJobOutputProcessingEvent.json | 23 + .../MediaJobOutputProgressEvent.json | 19 + .../MediaJobOutputScheduledEvent.json | 23 + .../MediaJobOutputStateChangeEvent.json | 23 + .../MediaJobProcessingEvent.json | 16 + .../customization/MediaJobScheduledEvent.json | 16 + .../MediaJobStateChangeEvent.json | 16 + ...MediaLiveEventConnectionRejectedEvent.json | 18 + .../MediaLiveEventEncoderConnectedEvent.json | 17 + ...ediaLiveEventEncoderDisconnectedEvent.json | 18 + ...iveEventIncomingDataChunkDroppedEvent.json | 19 + ...aLiveEventIncomingStreamReceivedEvent.json | 1 + ...iveEventIncomingStreamsOutOfSyncEvent.json | 19 + ...entIncomingVideoStreamsOutOfSyncEvent.json | 18 + .../MediaLiveEventIngestHeartbeatEvent.json | 25 + ...eEventTrackDiscontinuityDetectedEvent.json | 20 + .../MediaServicesJobStateChangedEvent.json | 15 + .../MultipleEventsInSameBatch.json | 79 ++ .../ResourceActionCancelEvent.json | 23 + .../ResourceActionFailureEvent.json | 23 + .../ResourceActionSuccessEvent.json | 23 + .../ResourceDeleteCancelEvent.json | 23 + .../ResourceDeleteFailureEvent.json | 23 + .../ResourceDeleteSuccessEvent.json | 23 + .../ResourceWriteCancelEvent.json | 23 + .../ResourceWriteFailureEvent.json | 23 + .../ResourceWriteSuccessEvent.json | 23 + ...MessagesAvailableWithNoListenersEvent.json | 19 + ...MessagesAvailableWithNoListenersEvent.json | 19 + .../StorageBlobCreatedEvent.json | 22 + .../StorageBlobDeletedEvent.json | 22 + ...rageBlobDeletedEventWithExtraProperty.json | 24 + .../session-records/publishCloudEvents.json | 23 + .../publishCloudEventsCustomSerializer.json | 23 + .../publishCloudEventsSync.json | 23 + .../session-records/publishCustomEvents.json | 24 + .../publishCustomEventsSync.json | 23 + .../publishEventGridEvents.json | 23 + .../publishEventGridEventsSync.json | 23 + .../session-records/publishWithSasToken.json | 23 + .../swagger/README.md | 9 +- 236 files changed, 5825 insertions(+), 413 deletions(-) create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/README.md create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/CloudEvent.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridEvent.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherAsyncClient.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClient.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClientBuilder.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridSasCredential.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridServiceVersion.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventMappings.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/ClassTime.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/PublishClassTime.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/ReadmeSamples.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/DeserializationTests.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherClientTests.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ContosoItemReceivedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ContosoItemSentEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/DroneShippingInfo.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/RocketShippingInfo.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ShippingInfo.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/AppConfigurationKeyValueDeleted.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/AppConfigurationKeyValueModified.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventBinaryData.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventNoArray.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventNullData.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventXmlData.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryChartDeletedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryChartPushedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryImageDeletedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryImagePushedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithArrayData.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithBooleanData.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithPolymorphicData.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithStringData.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEvents.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridEventNoArray.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridNullData.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridSubscriptionDeletedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridSubscriptionValidationEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventHubCaptureFileCreatedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceConnectedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceCreatedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceDeletedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceDisconnectedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceTelemetryEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceEnteredEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceExitedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceResultEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobCanceledEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobCancelingEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobErroredEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobFinishedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputCanceledEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputCancelingEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputErroredEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputFinishedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputProcessingEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputProgressEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputScheduledEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputStateChangeEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobProcessingEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobScheduledEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobStateChangeEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventConnectionRejectedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventEncoderConnectedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventEncoderDisconnectedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingDataChunkDroppedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingStreamReceivedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingStreamsOutOfSyncEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingVideoStreamsOutOfSyncEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIngestHeartbeatEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventTrackDiscontinuityDetectedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaServicesJobStateChangedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MultipleEventsInSameBatch.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionCancelEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionFailureEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionSuccessEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteCancelEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteFailureEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteSuccessEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteCancelEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteFailureEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteSuccessEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ServiceBusActiveMessagesAvailableWithNoListenersEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ServiceBusDeadletterMessagesAvailableWithNoListenersEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobCreatedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobDeletedEvent.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobDeletedEventWithExtraProperty.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEvents.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsCustomSerializer.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsSync.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEvents.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEventsSync.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEvents.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEventsSync.json create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishWithSasToken.json diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index 708b726e87cf6..691726fdbe939 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -94,6 +94,7 @@ known_presence_issues: - ['sdk/cosmos/azure-cosmos-examples/CHANGELOG.md', '#2847'] - ['sdk/cosmos/azure-cosmos-benchmark/CHANGELOG.md', '#2847'] - ['sdk/cosmos/CHANGELOG.md', '#2847'] + - ['sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md', '#2847'] - ['sdk/eventgrid/microsoft-azure-eventgrid/CHANGELOG.md', '#2847'] - ['sdk/eventhubs/microsoft-azure-eventhubs/CHANGELOG.md', '#2847'] - ['sdk/eventhubs/microsoft-azure-eventhubs-eph/CHANGELOG.md', '#2847'] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md new file mode 100644 index 0000000000000..b31b774369aa5 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md @@ -0,0 +1,14 @@ +# Release History + +## 2.0.0-beta.1 (2020-09-09): + +Initial preview of the Event Grid library with an effort to create a Java idiomatic +set of libraries that are consistent across multiple services as well as different languages. + +### Features: + ++ Configurable synchronous and asynchronous publishing clients, supporting sending of user-defined events in + Event Grid, Cloud Event, or a custom schema. ++ Parsing and deserialization of system and user-defined events from JSON payload + at an event destination in EventGrid or Cloud Event schema. + diff --git a/sdk/eventgrid/azure-messaging-eventgrid/README.md b/sdk/eventgrid/azure-messaging-eventgrid/README.md new file mode 100644 index 0000000000000..71d8a61f60739 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/README.md @@ -0,0 +1,313 @@ +# Azure Event Grid client library for Java + +This project provides client tools or utilities in Java that make it easy to interact with [Azure Event Grid][eventgrid]. + +Azure Event Grid is a fully-managed intelligent event routing service that provides reliable and scalable event delivery. + +The client library can be used to: + +- Publish events in the Event Grid, Cloud Event (1.0), or custom schema +- Decode and process events and event data at the event destination +- Generate shared access signatures that connect to an event topic + +[Sources][sources] | +[API Reference Documentation][javadocs] | +[Product Documentation][service_docs] | +[Samples][samples] + + +## Getting started + +### Install the Package + +To get the binaries of the official Microsoft Azure Event Grid Java SDK as distributed by Microsoft, ready for use +within your project, you can use [Maven][maven]. + +[//]: # ({x-version-update-start;com.azure:azure-messaging-eventgrid;current}) +```xml + + com.azure + azure-messaging-eventgrid + 2.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Prerequisites + +- [Java Development Kit (JDK) with version 8 or above][jdk] +- An [Azure subscription][azure_subscription] +- An [Event Grid][eventgrid] topic or domain. To create the resource, you can use [Azure portal][portal] or +[Azure CLI][cli] + +If you use the Azure CLI, replace `` and `` with your own unique names +and `` with a valid Azure service location. + +#### Creating a topic ([Azure CLI][cli]) + +```bash +az eventgrid topic create --location --resource-group --name +``` + + +#### Creating a domain ([Azure CLI][cli]) + +```bash +az eventgrid domain create --location --resource-group --name +``` + +### Authenticate the Client + +In order to send events, we need an endpoint to send to and some authentication for the endpoint, either as a +key credential or a shared access signature (which will in turn need an endpoint and key). +The endpoint and key can both be obtained through [Azure Portal][portal] or [Azure CLI][cli]. + +#### Endpoint + +The endpoint is listed on the dashboard of the topic or domain in the [Azure Portal][portal], +or can be obtained using the following command in [Azure CLI][cli]. +```bash +az eventgrid topic show --name --resource-group --query "endpoint" +``` + +#### Access Key + +The keys are listed in the "Access Keys" tab of the [Azure Portal][portal], or can be obtained +using the following command in [Azure CLI][cli]. + +#### Creating a shared access signature + +A shared access signature is an alternative way to authenticate requests to an [Event Grid][eventgrid] +topic or domain. They behave similarly to keys, and require a key to produce, but can be configured +with an expiration time, so they can be used to restrict access to a topic or domain. +Here is sample code to produce a shared access signature that expires after 20 minutes: + + +```java +OffsetDateTime expiration = OffsetDateTime.now().plusMinutes(20); +String credentialString = EventGridSharedAccessSignatureCredential + .createSharedAccessSignature(endpoint, expiration, new AzureKeyCredential(key)); +EventGridSharedAccessSignatureCredential signature = new EventGridSharedAccessSignatureCredential(credentialString); +``` + +#### Creating the Client + +In order to start sending events, we need an `EventGridPublisherClient`. Here is code to +create the synchronous and the asynchronous versions. Note that a shared access signature can +be used instead of a key in any of these samples by calling the `sharedAccessSignatureCredential` +method instead of `keyCredential`. + + + +```java +EventGridPublisherClient egClient = new EventGridPublisherClientBuilder() + .endpoint(endpoint) + .keyCredential(new AzureKeyCredential(key)) + .buildClient(); +``` + +or + + +```java +EventGridPublisherAsyncClient egAsyncClient = new EventGridPublisherClientBuilder() + .endpoint(endpoint) + .keyCredential(new AzureKeyCredential(key)) + .buildAsyncClient(); +``` + +## Key concepts + +### EventGridPublisherClient + +`EventGridPublisherClient` is used sending events to an Event Grid Topic or an Event Grid Domain. + +### Event Schemas + +Event Grid supports multiple schemas for encoding events. When a Custom Topic or Domain is created, you specify the +schema that will be used when publishing events. While you may configure your topic to use a _custom schema_ it is +more common to use the already defined _Event Grid schema_ or _CloudEvents 1.0 schema_. +[CloudEvents](https://cloudevents.io/) is a Cloud Native Computing Foundation project which produces a specification +for describing event data in a common way. Regardless of what schema your topic or domain is configured to use, +`EventGridPublisherClient` will be used to publish events to it. However, you must use the correct method for +publishing: + +| Schema | Publishing Method | +| ------------ | --------------------- | +| Event Grid | `publishEvents` | +| Cloud Events | `publishCloudEvents` | +| Custom | `publishCustomEvents` | + +Using the wrong method will result in an error from the service and your events will not be published. + +### Consumption + +Events can be consumed from the event destination using respective schema class' `parse` method, passing the JSON string +received from the destination. + +## Examples + +### Sending Events + +Events can be sent in the `EventGridEvent`, `CloudEvent`, or a custom schema, as detailed in the Key Concepts above. +The topic or domain must be configured to accept the schema being sent. For simplicity, +the synchronous client is used for samples, however the asynchronous client has the same method names. + +#### `EventGridEvent` +The `EventGridEvent` model has 3 required properties to set: +- the subject, similar to a title or subject line of an email +- the event type, defining what kind of event happened +- the data version, identifying the current version of the data being sent + +These are set in the constructor, and a variety of other properties can be optionally set or overridden. +Learn more [here][EventGridEvent]. + +```java +List events = new ArrayList<>(); +events.add( + new EventGridEvent("exampleSubject", "Com.Example.ExampleEventType", "1") + .setData("Example Data") +); + +egClient.sendEvents(events); +``` + +#### `CloudEvent` +The `CloudEvent` model has 2 required properties to set: +- the source, a URI identifying the source of the event +- the type, defining what kind of event happened. Note that this aligns with the "event type" of `EventGridEvent` + +These are set in the constructor, and a variety of other properties can be optionally set or overridden. +Learn more [here][CloudEvent]. + +```java +List events = new ArrayList<>(); +events.add( + new CloudEvent("com/example/source", "Com.Example.ExampleEventType") + .setData("Example Data") +); + +egClient.sendCloudEvents(events); +``` + +#### Custom Events + +To send custom events in any defined schema, use the `sendCustomEvents` method +on the `PublisherClient`. + +### Recieving and Consuming Events + +Events can be sent to a variety of locations, including Azure services such as ServiceBus +or external endpoints such as a WebHook endpoint. However, currently all events will be +sent as encoded JSON data. Here is some basic code that details the handling +of an event. Again, the handling is different based on the event schema being received +from the topic/subscription. + +#### `EventGridEvent` + +```java +List events = EventGridEvent.parse(jsonData); + +for (EventGridEvent event : events) { + // system event data will be turned into it's rich object, + // while custom event data will be turned into a byte[]. + Object data = event.getData(); + + // this event type goes to any non-azure endpoint (such as a WebHook) when the subscription is created. + if (data instanceof SubscriptionValidationEventData) { + SubscriptionValidationEventData validationData = (SubscriptionValidationEventData) data; + System.out.println(validationData.getValidationCode()); + } else if (data instanceof byte[]) { + // we can turn the data into the correct type by calling this method. + // since we set the data as a string when sending, we pass the String class in to get it back. + String stringData = event.getData(String.class); + System.out.println(stringData); // "Example Data" + } +} +``` + +#### `CloudEvent` + +```java +List events = CloudEvent.parse(jsonData); + +for (CloudEvent event : events) { + // system event data will be turned into it's rich object, + // while custom event data will be turned into a byte[]. + Object data = event.getData(); + + // this event type goes to any non-azure endpoint (such as a WebHook) when the subscription is created. + if (data instanceof SubscriptionValidationEventData) { + SubscriptionValidationEventData validationData = (SubscriptionValidationEventData) data; + System.out.println(validationData.getValidationCode()); + } else if (data instanceof byte[]) { + // we can turn the data into the correct type by calling this method. + // since we set the data as a string when sending, we pass the String class in to get it back. + String stringData = event.getData(String.class); + System.out.println(stringData); // "Example Data" + } +} +``` + +Some additional sample code can be found [here][samples]. +Be sure to check back for more samples in the future. + +## Troubleshooting + +### Responses and error codes + +Service responses are returned in the form of Http status codes, including a number +of error codes. These codes can optionally be returned by the `PublisherClient`. +Unexpected status codes are thrown as [`HttpResponseException`][HttpResponseException] +which wraps the error code. + +Reference documentation for the event grid service can be found [here][service_docs]. This is a +good place to start for problems involving configuration of topics/endpoints, as well as for +problems involving error codes from the service. + +### Help and Issues + +Reference documentation for the SDK can be found [here][javadocs]. This is a good first step +to understanding the purpose of each method called, as well as possible reasons for errors +or unexpected behavior. + +If you encounter any bugs with these SDKs, please file issues via [Issues](https://github.com/Azure/azure-sdk-for-java/issues) or checkout [StackOverflow for Azure Java SDK](http://stackoverflow.com/questions/tagged/azure-java-sdk). + +## Next steps + +- [Azure Java SDKs](https://docs.microsoft.com/java/azure/) +- If you don't have a Microsoft Azure subscription you can get a FREE trial account [here](http://go.microsoft.com/fwlink/?LinkId=330212) +- Some additional sample code can be found [here][samples] +- Additional Event Grid tutorials can be found [here][service_docs] + +## Contributing + +If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request + +--- + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + + +[jdk]: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable +[javadocs]: https://azure.github.io/azure-sdk-for-java/eventgrid.html +[azure_subscription]: https://azure.microsoft.com/free +[maven]: https://maven.apache.org/ +[HttpResponseException]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core/src/main/java/com/azure/core/exception/HttpResponseException.java +[samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/eventgrid/azure-messaging/eventgrid/src/samples/java/com/azure/messaging/eventgrid +[eventgrid]: https://azure.com/eventgrid +[portal]: https://ms.portal.azure.com/ +[cli]: https://docs.microsoft.com/cli/azure +[service_docs]: https://docs.microsoft.com/azure/event-grid/ +[sources]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/eventgrid/azure/messaging/eventgrid/src +[EventGridEvent]: https://docs.microsoft.com/azure/event-grid/event-schema +[CloudEvent]: https://github.com/cloudevents/spec/blob/master/spec.md + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Feventgrid%2Fazure-messaging-eventgrid%2FREADME.png) diff --git a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml index cc1da003a1da4..3ee9bf0478b8f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml @@ -118,6 +118,4 @@ 3.3.9.RELEASE - - diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/CloudEvent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/CloudEvent.java new file mode 100644 index 0000000000000..2a8915dc60cec --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/CloudEvent.java @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.annotation.Fluent; +import com.azure.core.serializer.json.jackson.JacksonJsonSerializerBuilder; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.JsonSerializer; +import com.azure.core.util.serializer.TypeReference; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.UUID; + +/** + * The CloudEvent model. This represents a cloud event as specified by the CNCF, for sending event based data. + * @see EventGridPublisherAsyncClient + * @see EventGridPublisherClient + **/ +@Fluent +public final class CloudEvent { + + private static final String SPEC_VERSION = "1.0"; + + private final com.azure.messaging.eventgrid.implementation.models.CloudEvent cloudEvent; + + private static final ClientLogger logger = new ClientLogger(CloudEvent.class); + + private boolean parsed = false; + + private static final JsonSerializer deserializer = new JacksonJsonSerializerBuilder() + .serializer(new JacksonAdapter().serializer() // this is a workaround to get the FlatteningDeserializer + .registerModule(new JavaTimeModule())) // probably also change this to DateTimeDeserializer when/if it + .build(); // becomes public in core + + /** + * Create an instance of a CloudEvent. The source and type are required fields to publish. + * @param source a URI identifying the origin of the event. + * @param type the type of event, e.g. "Contoso.Items.ItemReceived". + */ + public CloudEvent(String source, String type) { + if (CoreUtils.isNullOrEmpty(source)) { + throw logger.logExceptionAsError(new IllegalArgumentException("Source cannot be null or empty")); + } else if (CoreUtils.isNullOrEmpty(type)) { + throw logger.logExceptionAsError(new IllegalArgumentException("type cannot be null or empty")); + } + + this.cloudEvent = new com.azure.messaging.eventgrid.implementation.models.CloudEvent() + .setId(UUID.randomUUID().toString()) + .setSource(source) + .setType(type) + .setSpecversion(SPEC_VERSION); + } + + /** + * Parse the Cloud Event from a JSON string. This can be used to interpret the event at the event destination + * from raw JSON into rich event(s). + * @param json the JSON payload containing one or more events. + * + * @return all of the events in the payload parsed as CloudEvents. + */ + public static List parse(String json) { + return Flux.fromArray(deserializer + .deserialize(new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8)), + TypeReference.createInstance(com.azure.messaging.eventgrid.implementation.models.CloudEvent[].class)) + ) + .map(event1 -> { + if (event1.getData() != null) { + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + deserializer.serialize(stream, event1.getData()); + return new CloudEvent(event1).setData(stream.toByteArray()); // use BinaryData instead? + } else { // both null, don't set data and keep null + return new CloudEvent(event1); + } + }) + .collectList() + .block(); + } + + /** + * Get the id of the cloud event. + * @return the id. + */ + public String getId() { + return this.cloudEvent.getId(); + } + + /** + * Set a custom id. Note that a random id is already set by default. + * @param id the id to set. + * + * @return the cloud event itself. + */ + public CloudEvent setId(String id) { + if (CoreUtils.isNullOrEmpty(id)) { + throw new IllegalArgumentException("id cannot be null or empty"); + } + this.cloudEvent.setId(id); + return this; + } + + /** + * Get the URI source of the event. + * @return the source. + */ + public String getSource() { + return this.cloudEvent.getSource(); + } + + /** + * Get the data associated with this event. For use in a parsed event only. + * @return If the event was parsed from a Json, this method will return the rich + * system event data if it is a system event, and a {@code byte[]} otherwise, such as in the case of binary event + * data, including data set through {@link CloudEvent#setData(byte[], String)}. + * @throws IllegalStateException If the event was not created through {@link EventGridEvent#parse(String)}. + */ + public Object getData() { + if (!parsed) { + // data was set instead of parsed, throw error + throw logger.logExceptionAsError(new IllegalStateException( + "This method should only be called on events created through the parse method")); + } + if (cloudEvent.getDataBase64() != null) { // this means normal data is null + return cloudEvent.getDataBase64(); + } + String eventType = SystemEventMappings.canonicalizeEventType(cloudEvent.getType()); + if (SystemEventMappings.getSystemEventMappings().containsKey(eventType)) { + // system event + return deserializer.deserialize(new ByteArrayInputStream((byte[]) this.cloudEvent.getData()), + TypeReference.createInstance(SystemEventMappings.getSystemEventMappings().get(eventType))); + } + return cloudEvent.getData(); + } + + /** + * Get the deserialized data property from the parsed event. Note that this is only intended to work on + * events with {@code application/json} data and has unspecified results on other media types, such as binary data. + * @param clazz the class of the type to deserialize the data into, using a default deserializer. + * @param the type to deserialize the data into. + * + * @return the data deserialized into the given type using a default deserializer. + * @throws IllegalStateException If the event was not created through {@link CloudEvent#parse(String)}. + */ + public T getData(Class clazz) { + return getDataAsync(clazz, deserializer).block(); + } + + /** + * Get the deserialized data property from the parsed event. Note that this is only intended to work on + * events with {@code application/json} data and has unspecified results on other media types, such as binary data. + * @param clazz the class of the type to deserialize the data into, using a default deserializer. + * @param the type to deserialize the data into. + * + * @return the data deserialized into the given type using a default deserializer, wrapped asynchronously in a + * {@link Mono}. + * @throws IllegalStateException If the event was not created through {@link CloudEvent#parse(String)}. + */ + public Mono getDataAsync(Class clazz) { + return getDataAsync(clazz, deserializer); + } + + /** + * Deserialize and get the data property from the parsed event. Note that this is only intended to work on + * events with {@code application/json} data and has unspecified results on other media types. + * @param clazz the class of the type to deserialize the data into. + * @param dataDeserializer the deserializer to use. + * @param the type to deserialize the data into. + * + * @return the data deserialized into the given type using the given deserializer. + * @throws IllegalStateException If the event was not created through {@link CloudEvent#parse(String)}. + */ + public T getData(Class clazz, JsonSerializer dataDeserializer) { + return getDataAsync(clazz, dataDeserializer).block(); + } + + /** + * Deserialize and get the data property from the parsed event. Note that this is only intended to work on + * events with {@code application/json} data and has unspecified results on other media types. + * @param clazz the class of the type to deserialize the data into. + * @param dataDeserializer the deserializer to use. + * @param the type to deserialize the data into. + * + * @return the data deserialized into the given type using the given deserializer, wrapped asynchronously in a + * {@link Mono}. + * @throws IllegalStateException If the event was not created through {@link CloudEvent#parse(String)}. + */ + public Mono getDataAsync(Class clazz, JsonSerializer dataDeserializer) { + if (!parsed) { + // data was set instead of parsed, throw exception because we don't know how the data relates to clazz + return FluxUtil.monoError(logger, new IllegalStateException( + "This method should only be called on events created through the parse method")); + } + + return dataDeserializer.deserializeAsync(new ByteArrayInputStream((byte[]) this.cloudEvent.getData()), + TypeReference.createInstance(clazz)); + } + + /** + * Set the data associated with this event. + * @param data the data to set. Should be serializable with the serializer set on the publisher client. + * + * @return the cloud event itself. + */ + public CloudEvent setData(Object data) { + this.cloudEvent.setData(data); + return this; + } + + /** + * Set the data associated with this event, along with a content type URI + * @param data the data to set. Should be serializable by the serializer set on the publisher client. + * @param dataContentType a URI identifying the MIME type of the data. + * For example, if the data was an XML string, the data content type could be + * {@code "application/xml"}. + * @return the cloud event itself. + */ + public CloudEvent setData(Object data, String dataContentType) { + this.cloudEvent.setData(data); + this.cloudEvent.setDatacontenttype(dataContentType); + return this; + } + + /** + * Set byte data associated with this event, as well as the content type of the byte data. The data content + * type should be a string identifying the media type of the data. + * @param data the data to set. + * @param dataContentType the string identifying the media type of the byte data, as a MIME type. A null value will + * be interpreted as the {@code application/json} type. + * + * @return the cloud event itself. + */ + public CloudEvent setData(byte[] data, String dataContentType) { + this.cloudEvent + .setDataBase64(data) + .setDatacontenttype(dataContentType); + return this; + } + + /** + * Get the type of event, e.g. "Contoso.Items.ItemReceived". + * @return the type of the event. + */ + public String getType() { + return this.cloudEvent.getType(); + } + + /** + * Get the time associated with the occurrence of the event. + * @return the event time, or null if the time is not set. + */ + public OffsetDateTime getTime() { + return this.cloudEvent.getTime(); + } + + /** + * Set the time associated with the occurrence of the event. + * @param time the time to set. + * + * @return the cloud event itself. + */ + public CloudEvent setTime(OffsetDateTime time) { + this.cloudEvent.setTime(time); + return this; + } + + /** + * Get the content MIME type that the data is in. A null value indicates that the data is either nonexistent or in the + * "application/json" type. Note that "application/json" is still a possible value for this field. + * @return the content type the data is in, or null if the data is nonexistent or in "application/json" format. + */ + public String getDataContentType() { + return this.cloudEvent.getDatacontenttype(); + } + + /** + * Get the schema that the data adheres to. + * @return a URI of the data schema, or null if it is not set. + */ + public String getDataSchema() { + return this.cloudEvent.getDataschema(); + } + + /** + * Set the schema that the data adheres to. + * @param dataSchema a URI identifying the schema of the data. + * + * @return the cloud event itself. + */ + public CloudEvent setDataSchema(String dataSchema) { + this.cloudEvent.setDataschema(dataSchema); + return this; + } + + /** + * Get the subject associated with this event. + * @return the subject, or null if the subject was not set. + */ + public String getSubject() { + return this.cloudEvent.getSubject(); + } + + /** + * Set the subject of the event. + * @param subject the subject to set. + * + * @return the cloud event itself. + */ + public CloudEvent setSubject(String subject) { + this.cloudEvent.setSubject(subject); + return this; + } + + /** + * Get the spec version that this cloud event adheres to. Note that only CloudEvents spec version 1.0 is supported. + * @return the cloud event spec version. + */ + public String getSpecVersion() { + return this.cloudEvent.getSpecversion(); + } + + /** + * Get a map of the additional user-defined attributes associated with this event. + * @return the extension attributes as an unmodifiable map. + */ + public Map getExtensionAttributes() { + return Collections.unmodifiableMap(this.cloudEvent.getAdditionalProperties()); + } + + /** + * Add/Overwrite a single extension attribute to the cloud event envelope. The property name will be transformed + * to lowercase and must not share a name with any reserved cloud event properties. + * @param name the name of the attribute. + * @param value the value to associate with the name. + * + * @return the cloud event itself. + */ + public CloudEvent addExtensionAttribute(String name, Object value) { + this.cloudEvent.getAdditionalProperties().put(name.toLowerCase(Locale.ENGLISH), value); + return this; + } + + private CloudEvent(com.azure.messaging.eventgrid.implementation.models.CloudEvent impl) { + this.cloudEvent = impl; + this.parsed = true; + } + + com.azure.messaging.eventgrid.implementation.models.CloudEvent toImpl() { + return this.cloudEvent; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridEvent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridEvent.java new file mode 100644 index 0000000000000..83eb4a611b53d --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridEvent.java @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.annotation.Fluent; +import com.azure.core.serializer.json.jackson.JacksonJsonSerializerBuilder; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.JsonSerializer; +import com.azure.core.util.serializer.TypeReference; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** + * The EventGridEvent model. This represents events in the EventGrid schema to be used with the EventGrid service. + * @see EventGridPublisherAsyncClient + * @see EventGridPublisherClient + **/ +@Fluent +public final class EventGridEvent { + + private final com.azure.messaging.eventgrid.implementation.models.EventGridEvent event; + + private static final ClientLogger logger = new ClientLogger(EventGridEvent.class); + + private boolean parsed = false; + + private static final JsonSerializer deserializer = new JacksonJsonSerializerBuilder() + .serializer(new JacksonAdapter().serializer() // this is a workaround to get the FlatteningDeserializer + .registerModule(new JavaTimeModule())) // probably also change this to DateTimeDeserializer when/if it + .build(); // becomes public in core + + /** + * Create a new instance of the EventGridEvent, with the given required fields. + * @param subject the subject of the event. + * @param eventType the type of the event, e.g. "Contoso.Items.ItemReceived". + * @param dataVersion the version of the data sent along with the event. + */ + public EventGridEvent(String subject, String eventType, String dataVersion) { + if (CoreUtils.isNullOrEmpty(subject)) { + throw logger.logExceptionAsError(new IllegalArgumentException("subject cannot be null or empty")); + } else if (CoreUtils.isNullOrEmpty(eventType)) { + throw logger.logExceptionAsError(new IllegalArgumentException("event type cannot be null or empty")); + } else if (CoreUtils.isNullOrEmpty(dataVersion)) { + throw logger.logExceptionAsError(new IllegalArgumentException("data version cannot be null or empty")); + } + + this.event = new com.azure.messaging.eventgrid.implementation.models.EventGridEvent() + .setEventTime(OffsetDateTime.now()) + .setId(UUID.randomUUID().toString()) + .setSubject(subject) + .setEventType(eventType) + .setDataVersion(dataVersion); + } + + /** + * Parse the EventGrid Event from a JSON string. This can be used to interpret the event at the event destination + * from raw JSON into rich event(s). + * @param json the JSON payload containing one or more events. + * + * @return all of the events in the payload parsed as CloudEvents. + */ + public static List parse(String json) { + return Flux.fromArray(deserializer + .deserialize(new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8)), + TypeReference.createInstance(com.azure.messaging.eventgrid.implementation.models.EventGridEvent[].class)) + ) + .map(event1 -> { + if (event1.getData() == null) { + return new EventGridEvent(event1); + } + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + deserializer.serialize(stream, event1.getData()); + return new EventGridEvent(event1).setData(stream.toByteArray()); // use BinaryData instead? + }) + .collectList() + .block(); + } + + + /** + * Get the unique id associated with this event. + * @return the id. + */ + public String getId() { + return this.event.getId(); + } + + /** + * Set the unique id of the event. Note that a random id has already been set by default. + * @param id the unique id to set. + * + * @return the event itself. + */ + public EventGridEvent setId(String id) { + if (CoreUtils.isNullOrEmpty(id)) { + throw logger.logExceptionAsError(new IllegalArgumentException("id cannot be null or empty")); + } + this.event.setId(id); + return this; + } + + /** + * Get the topic associated with this event if it is associated with a domain. + * @return the topic, or null if the topic is not set (i.e. the event came from or is going to a domain). + */ + public String getTopic() { + return this.event.getTopic(); + } + + /** + * Set the topic associated with this event. Used to route events from domain endpoints. + * @param topic the topic to set. + * + * @return the event itself. + */ + public EventGridEvent setTopic(String topic) { + this.event.setTopic(topic); + return this; + } + + /** + * Get the subject associated with this event. + * @return the subject. + */ + public String getSubject() { + return this.event.getSubject(); + } + + + /** + * Get the data associated with this event. For use in a parsed event only. + * @return If the event was parsed from a Json, this method will return the rich + * system event data if it is a system event, and a {@code byte[]} otherwise, such as in the case of custom event + * data. + * @throws IllegalStateException If the event was not created through {@link EventGridEvent#parse(String)}. + */ + public Object getData() { + if (!parsed) { + // data was set instead of parsed, throw error + throw logger.logExceptionAsError(new IllegalStateException( + "This method should only be called on events created through the parse method")); + } + String eventType = SystemEventMappings.canonicalizeEventType(event.getEventType()); + if (SystemEventMappings.getSystemEventMappings().containsKey(eventType)) { + // system event + return deserializer.deserialize(new ByteArrayInputStream((byte[]) this.event.getData()), + TypeReference.createInstance(SystemEventMappings.getSystemEventMappings().get(eventType))); + } + return event.getData(); + } + + /** + * Get the deserialized data property from the parsed event. The behavior is undefined if this method is called + * on an event that was not created through the parse method. + * @param clazz the class of the type to deserialize the data into. + * @param the type to deserialize the data into. + * + * @return the data deserialized into the given type using a default deserializer. + * @throws IllegalStateException If the event was not created through {@link EventGridEvent#parse(String)}. + */ + public T getData(Class clazz) { + return getDataAsync(clazz, deserializer).block(); + } + + /** + * Get the deserialized data property from the parsed event. + * @param clazz the class of the type to deserialize the data into. + * @param the type to deserialize the data into. + * + * @return the data deserialized into the given type using a default deserializer, delivered asynchronously through + * a {@link Mono}. + * @throws IllegalStateException If the event was not created through {@link EventGridEvent#parse(String)}. + */ + public Mono getDataAsync(Class clazz) { + return getDataAsync(clazz, deserializer); + } + + /** + * Get the deserialized data property from the parsed event. + * @param clazz the class of the type to deserialize the data into. + * @param dataDeserializer the deserializer to use. + * @param the type to deserialize the data into. + * + * @return the data deserialized into the given type using the given deserializer. + * @throws IllegalStateException If the event was not created through {@link EventGridEvent#parse(String)}. + */ + public T getData(Class clazz, JsonSerializer dataDeserializer) { + return getDataAsync(clazz, dataDeserializer).block(); + } + + /** + * Get the deserialized data property from the parsed event. + * @param clazz the class of the type to deserialize the data into. + * @param dataDeserializer the deserializer to use. + * @param the type to deserialize the data into. + * + * @return the data deserialized into the given type using the given deserializer, delivered asynchronously through + * a {@link Mono}. + * @throws IllegalStateException If the event was not created through {@link EventGridEvent#parse(String)}. + */ + public Mono getDataAsync(Class clazz, JsonSerializer dataDeserializer) { + if (!parsed) { + // data was set instead of parsed, throw exception because we don't know how the data relates to clazz + return FluxUtil.monoError(logger, new IllegalStateException( + "This method should only be called on events created through the parse method")); + } + + return dataDeserializer.deserializeAsync(new ByteArrayInputStream((byte[]) this.event.getData()), + TypeReference.createInstance(clazz)); + } + + /** + * Set the data associated with this event. It will be serialized into Json format using a default Json serializer + * when the event is sent from the publisher. + * @param data the data to set. + * + * @return the event itself. + */ + public EventGridEvent setData(Object data) { + this.event.setData(data); + return this; + } + + /** + * Get the type of this event. + * @return the event type. + */ + public String getEventType() { + return this.event.getEventType(); + } + + /** + * Get the time associated with the occurrence of this event. + * @return the event time. + */ + public OffsetDateTime getEventTime() { + return this.event.getEventTime(); + } + + /** + * Set the time associated with the event. Note that a default time has already been set when the event was + * constructed. + * @param time the time to set. + * + * @return the event itself. + */ + public EventGridEvent setEventTime(OffsetDateTime time) { + this.event.setEventTime(time); + return this; + } + + /** + * Get the version of the data in the event. This can be used to specify versioning of event data schemas over time. + * @return the version of the event data. + */ + public String getDataVersion() { + return this.event.getDataVersion(); + } + + /** + * Get the metadata version of this event. Note that metadata version is a read-only property set by the service. + * @return the metadata version of this event. + */ + public String getMetadataVersion() { + return this.event.getMetadataVersion(); + } + + private EventGridEvent(com.azure.messaging.eventgrid.implementation.models.EventGridEvent impl) { + this.event = impl; + parsed = true; + } + + com.azure.messaging.eventgrid.implementation.models.EventGridEvent toImpl() { + return this.event; + } + +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherAsyncClient.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherAsyncClient.java new file mode 100644 index 0000000000000..8d2254218393e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherAsyncClient.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.messaging.eventgrid.implementation.EventGridPublisherClientImpl; +import com.azure.messaging.eventgrid.implementation.EventGridPublisherClientImplBuilder; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import static com.azure.core.util.FluxUtil.withContext; + +/** + * A service client that publishes events to an EventGrid topic or domain. Use {@link EventGridPublisherClientBuilder} + * to create an instance of this client. This uses Project Reactor (https://projectreactor.io/) to handle asynchronous + * programming. + * @see EventGridEvent + * @see CloudEvent + */ +@ServiceClient(builder = EventGridPublisherClientBuilder.class, isAsync = true) +public final class EventGridPublisherAsyncClient { + + private final String hostname; + + private final EventGridPublisherClientImpl impl; + + private final EventGridServiceVersion serviceVersion; + + EventGridPublisherAsyncClient(HttpPipeline pipeline, String hostname, SerializerAdapter serializerAdapter, + EventGridServiceVersion serviceVersion) { + this.impl = new EventGridPublisherClientImplBuilder() + .pipeline(pipeline) + .serializerAdapter(serializerAdapter) + .buildClient(); + + // currently the service version is hardcoded into the Impl client, but once another service version gets + // released we should add this to the impl builder options + this.serviceVersion = serviceVersion; + + this.hostname = hostname; + } + + /** + * Get the service version of the Rest API. + * @return the Service version of the rest API + */ + public EventGridServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * Publishes the given EventGrid events to the set topic or domain. + * @param events the EventGrid events to publish. + * + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono sendEvents(Iterable events) { + return withContext(context -> sendEvents(events, context)); + } + + Mono sendEvents(Iterable events, Context context) { + return Flux.fromIterable(events) + .map(EventGridEvent::toImpl) + .collectList() + .flatMap(list -> this.impl.publishEventsAsync(this.hostname, list, context)); + } + + /** + * Publishes the given cloud events to the set topic or domain. + * @param events the cloud events to publish. + * + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono sendCloudEvents(Iterable events) { + return withContext(context -> sendCloudEvents(events, context)); + } + + Mono sendCloudEvents(Iterable events, Context context) { + return Flux.fromIterable(events) + .map(CloudEvent::toImpl) + .collectList() + .flatMap(list -> this.impl.publishCloudEventEventsAsync(this.hostname, list, context)); + } + + /** + * Publishes the given custom events to the set topic or domain. + * @param events the custom events to publish. + * + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono sendCustomEvents(Iterable events) { + return withContext(context -> sendCustomEvents(events, context)); + } + + Mono sendCustomEvents(Iterable events, Context context) { + return Flux.fromIterable(events) + .collectList() + .flatMap(list -> this.impl.publishCustomEventEventsAsync(this.hostname, list, context)); + } + + /** + * Publishes the given EventGrid events to the set topic or domain and gives the response issued by EventGrid. + * @param events the EventGrid events to publish. + * + * @return the response from the EventGrid service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> sendEventsWithResponse(Iterable events) { + return withContext(context -> sendEventsWithResponse(events, context)); + } + + Mono> sendEventsWithResponse(Iterable events, Context context) { + return Flux.fromIterable(events) + .map(EventGridEvent::toImpl) + .collectList() + .flatMap(list -> this.impl.publishEventsWithResponseAsync(this.hostname, list, context)); + } + + /** + * Publishes the given cloud events to the set topic or domain and gives the response issued by EventGrid. + * @param events the cloud events to publish. + * + * @return the response from the EventGrid service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> sendCloudEventsWithResponse(Iterable events) { + return withContext(context -> sendCloudEventsWithResponse(events, context)); + } + + Mono> sendCloudEventsWithResponse(Iterable events, Context context) { + return Flux.fromIterable(events) + .map(CloudEvent::toImpl) + .collectList() + .flatMap(list -> this.impl.publishCloudEventEventsWithResponseAsync(this.hostname, list, context)); + } + + /** + * Publishes the given custom events to the set topic or domain and gives the response issued by EventGrid. + * @param events the custom events to publish. + * + * @return the response from the EventGrid service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> sendCustomEventsWithResponse(Iterable events) { + return withContext(context -> sendCustomEventsWithResponse(events, context)); + } + + Mono> sendCustomEventsWithResponse(Iterable events, Context context) { + return Flux.fromIterable(events) + .collectList() + .flatMap(list -> this.impl.publishCustomEventEventsWithResponseAsync(this.hostname, list, context)); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClient.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClient.java new file mode 100644 index 0000000000000..dda8793ac7c5a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClient.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * A service client that publishes events to an EventGrid topic or domain. Use {@link EventGridPublisherClientBuilder} + * to create an instance of this client. Note that this is simply a synchronous convenience layer over the + * {@link EventGridPublisherAsyncClient}, which has more efficient asynchronous functionality and is recommended. + * @see EventGridEvent + * @see CloudEvent + */ +@ServiceClient(builder = EventGridPublisherClientBuilder.class) +public final class EventGridPublisherClient { + + EventGridPublisherAsyncClient asyncClient; + + EventGridPublisherClient(EventGridPublisherAsyncClient client) { + this.asyncClient = client; + } + + /** + * Get the service version of the Rest API. + * @return the Service version of the rest API + */ + public EventGridServiceVersion getServiceVersion() { + return asyncClient.getServiceVersion(); + } + + /** + * Publishes the given EventGrid events to the given topic or domain. + * @param events the EventGrid events to publish. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void sendEvents(Iterable events) { + asyncClient.sendEvents(events, Context.NONE).block(); + } + + /** + * Publishes the given cloud events to the given topic or domain. + * @param events the cloud events to publish. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void sendCloudEvents(Iterable events) { + asyncClient.sendCloudEvents(events, Context.NONE).block(); + } + + /** + * Publishes the given custom events to the given topic or domain. + * @param events the custom events to publish. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void sendCustomEvents(Iterable events) { + asyncClient.sendCustomEvents(events, Context.NONE).block(); + } + + /** + * Publishes the given EventGrid events to the given topic or domain and gives the response issued by EventGrid. + * @param events the EventGrid events to publish. + * @param context the context to use along the pipeline. + * + * @return the response given by the EventGrid service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response sendEventsWithResponse(Iterable events, Context context) { + return asyncClient.sendEventsWithResponse(events, context).block(); + } + + /** + * Publishes the given cloud events to the given topic or domain and gives the response issued by EventGrid. + * @param events the cloud events to publish. + * @param context the context to use along the pipeline. + * + * @return the response given by the EventGrid service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response sendCloudEventsWithResponse(Iterable events, Context context) { + return asyncClient.sendCloudEventsWithResponse(events, context).block(); + } + + /** + * Publishes the given custom events to the given topic or domain and gives the response issued by EventGrid. + * @param events the custom events to publish. + * @param context the context to use along the pipeline. + * + * @return the response given by the EventGrid service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response sendCustomEventsWithResponse(Iterable events, Context context) { + return asyncClient.sendCustomEventsWithResponse(events, context).block(); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClientBuilder.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClientBuilder.java new file mode 100644 index 0000000000000..eda03f156985d --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClientBuilder.java @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A Builder class to create service clients that can publish events to EventGrid. + * @see EventGridPublisherAsyncClient + * @see EventGridEvent + * @see CloudEvent + */ +@ServiceClientBuilder(serviceClients = {EventGridPublisherClient.class, EventGridPublisherAsyncClient.class}) +public final class EventGridPublisherClientBuilder { + + private static final String AEG_SAS_KEY = "aeg-sas-key"; + + private static final String AEG_SAS_TOKEN = "aeg-sas-token"; + + private static final String EVENTGRID_PROPERTIES = "azure-messaging-eventgrid.properties"; + private static final String NAME = "name"; + private static final String VERSION = "version"; + + private final String clientName; + + private final String clientVersion; + + private final ClientLogger logger = new ClientLogger(EventGridPublisherClientBuilder.class); + + private final List policies = new ArrayList<>(); + + private Configuration configuration; + + private AzureKeyCredential keyCredential; + + private EventGridSasCredential sasToken; + + private EventGridServiceVersion serviceVersion; + + private String endpoint; + + private HttpClient httpClient; + + private HttpLogOptions httpLogOptions; + + private HttpPipeline httpPipeline; + + private RetryPolicy retryPolicy; + + private SerializerAdapter serializer; + + /** + * Construct a new instance with default building settings. The endpoint and one credential method must be set + * in order for the client to be built. + */ + public EventGridPublisherClientBuilder() { + this.httpLogOptions = new HttpLogOptions(); + Map properties = CoreUtils.getProperties(EVENTGRID_PROPERTIES); + clientName = properties.getOrDefault(NAME, "UnknownName"); + clientVersion = properties.getOrDefault(VERSION, "UnknownVersion"); + } + + + /** + * Build a publisher client with asynchronous publishing methods and the current settings. An endpoint must be set, + * and either a pipeline with correct authentication must be set, or a credential must be set in the form of + * an {@link EventGridSasCredential} or a {@link AzureKeyCredential} at the respective methods. + * All other settings have defaults and are optional. + * @return a publisher client with asynchronous publishing methods. + */ + public EventGridPublisherAsyncClient buildAsyncClient() { + String hostname; + try { + hostname = new URL(Objects.requireNonNull(endpoint, "endpoint cannot be null")).getHost(); + } catch (MalformedURLException e) { + throw logger.logExceptionAsError(new IllegalArgumentException("Cannot parse endpoint")); + } + + SerializerAdapter buildSerializer = serializer == null ? + JacksonAdapter.createDefaultSerializerAdapter() : + serializer; + + EventGridServiceVersion buildServiceVersion = serviceVersion == null ? + EventGridServiceVersion.getLatest() : + serviceVersion; + + if (httpPipeline != null) { + return new EventGridPublisherAsyncClient(httpPipeline, hostname, buildSerializer, buildServiceVersion); + } + + Configuration buildConfiguration = (configuration == null) + ? Configuration.getGlobalConfiguration() + : configuration; + + // Closest to API goes first, closest to wire goes last. + final List httpPipelinePolicies = new ArrayList<>(); + + httpPipelinePolicies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, + buildConfiguration)); + httpPipelinePolicies.add(new RequestIdPolicy()); + + HttpPolicyProviders.addBeforeRetryPolicies(httpPipelinePolicies); + httpPipelinePolicies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + + httpPipelinePolicies.add(new AddDatePolicy()); + + // Using token before key if both are set + if (sasToken != null) { + httpPipelinePolicies.add((context, next) -> { + context.getHttpRequest().getHeaders().put(AEG_SAS_TOKEN, sasToken.getSas()); + return next.process(); + }); + } else { + httpPipelinePolicies.add(new AzureKeyCredentialPolicy(AEG_SAS_KEY, keyCredential)); + } + + httpPipelinePolicies.addAll(policies); + + HttpPolicyProviders.addAfterRetryPolicies(httpPipelinePolicies); + + httpPipelinePolicies.add(new HttpLoggingPolicy(httpLogOptions)); + + HttpPipeline buildPipeline = new HttpPipelineBuilder() + .httpClient(httpClient) + .policies(httpPipelinePolicies.toArray(new HttpPipelinePolicy[0])) + .build(); + + + return new EventGridPublisherAsyncClient(buildPipeline, hostname, buildSerializer, buildServiceVersion); + } + + /** + * Build a publisher client with synchronous publishing methods and the current settings. Endpoint and a credential + * must be set (either keyCredential or sharedAccessSignatureCredential), all other settings have defaults and/or are optional. + * Note that currently the asynchronous client created by the method above is the recommended version for higher + * performance, as the synchronous client simply blocks on the same asynchronous calls. + * @return a publisher client with synchronous publishing methods. + */ + public EventGridPublisherClient buildClient() { + return new EventGridPublisherClient(buildAsyncClient()); + } + + /** + * Add a policy to the current pipeline. + * @param httpPipelinePolicy the policy to add. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder addPolicy(HttpPipelinePolicy httpPipelinePolicy) { + this.policies.add(Objects.requireNonNull(httpPipelinePolicy)); + return this; + } + + /** + * Add a custom retry policy to the pipeline. The default is {@link RetryPolicy#RetryPolicy()} + * @param retryPolicy the retry policy to add. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Set the configuration of HTTP and Azure values. A default is already set. + * @param configuration the configuration to use. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /** + * Set the domain or topic authentication using a key obtained from Azure CLI, Azure portal, or the ARM SDKs. + * @param credential the key credential to use to authorize the publisher client. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder credential(AzureKeyCredential credential) { + this.keyCredential = credential; + return this; + } + + /** + * Set the domain or topic authentication using an already obtained Shared Access Signature token. + * @param credential the token credential to use. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder credential(EventGridSasCredential credential) { + this.sasToken = credential; + return this; + } + + /** + * Set the domain or topic endpoint. This is the address to publish events to. + * @param endpoint the endpoint as a url. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Set the HTTP Client that sends requests. Will use default if not set. + * @param httpClient the HTTP Client to use. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder httpClient(HttpClient httpClient) { + if (this.httpClient != null && httpClient == null) { + logger.info("Http client is set to null when it was not previously null"); + } + this.httpClient = httpClient; + return this; + } + + /** + * Configure the logging of the HTTP requests and pipeline. + * @param httpLogOptions the log options to use. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /** + * Set the HTTP pipeline to use when sending calls to the service. + * @param httpPipeline the pipeline to use. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder pipeline(HttpPipeline httpPipeline) { + if (this.httpPipeline != null && httpPipeline == null) { + logger.info("Http client is set to null when it was not previously null"); + } + this.httpPipeline = httpPipeline; + return this; + } + + /** + * Set the service version to use for requests to the event grid service. See {@link EventGridServiceVersion} for + * more information about possible service versions. + * @param serviceVersion the service version to set. By default this will use the latest available version. + * + * @return the builder itself + */ + public EventGridPublisherClientBuilder serviceVersion(EventGridServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /** + * Set the serializer to use when serializing events to be sent. Default is + * {@link JacksonAdapter#createDefaultSerializerAdapter()}. + * @param serializer the serializer to set. + * + * @return the builder itself. + */ + public EventGridPublisherClientBuilder serializer(SerializerAdapter serializer) { + this.serializer = serializer; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridSasCredential.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridSasCredential.java new file mode 100644 index 0000000000000..b9b1d0a4be423 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridSasCredential.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.logging.ClientLogger; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.util.Base64; + +/** + * A way to use a generated shared access signature as a credential to publish events to a topic through a client. + */ +public final class EventGridSasCredential { + + private String sas; + + private static final ClientLogger logger = new ClientLogger(EventGridSasCredential.class); + + /** + * Generate a shared access signature to provide time-limited authentication for requests to the Event Grid + * service. + * @param endpoint the endpoint of the Event Grid topic or domain. + * @param expirationTime the time in which the signature should expire, no longer providing authentication. + * @param keyCredential the access key obtained from the Event Grid topic or domain. + * + * @return the shared access signature string which can be used to construct an instance of + * {@link EventGridSasCredential}. + */ + public static String createSas(String endpoint, OffsetDateTime expirationTime, + AzureKeyCredential keyCredential) { + try { + String resKey = "r"; + String expKey = "e"; + String signKey = "s"; + + Charset charset = StandardCharsets.UTF_8; + String encodedResource = URLEncoder.encode(endpoint, charset.name()); + String encodedExpiration = URLEncoder.encode(expirationTime.atZoneSameInstant(ZoneOffset.UTC).format( + DateTimeFormatter.ofPattern("M/d/yyyy h:m:s a")), + charset.name()); + + String unsignedSas = String.format("%s=%s&%s=%s", resKey, encodedResource, expKey, encodedExpiration); + + Mac hmac = Mac.getInstance("hmacSHA256"); + hmac.init(new SecretKeySpec(Base64.getDecoder().decode(keyCredential.getKey()), "hmacSHA256")); + String signature = new String(Base64.getEncoder().encode( + hmac.doFinal(unsignedSas.getBytes(charset))), + charset); + + String encodedSignature = URLEncoder.encode(signature, charset.name()); + + return String.format("%s&%s=%s", unsignedSas, signKey, encodedSignature); + + } catch (NoSuchAlgorithmException | UnsupportedEncodingException | InvalidKeyException e) { + throw logger.logExceptionAsError(new RuntimeException(e)); + } + } + + /** + * Create an instance of this object to authenticate calls to the EventGrid service. + * @param sas the shared access signature to use. + */ + public EventGridSasCredential(String sas) { + if (sas == null) { + throw logger.logExceptionAsError(new IllegalArgumentException("the access signature cannot be null")); + } + if (sas.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException("the access signature cannot be empty")); + } + this.sas = sas; + } + + /** + * Get the token string to authenticate service calls + * @return the Shared Access Signature as a string + */ + public String getSas() { + return sas; + } + + + /** + * Change the shared access signature token to a new one. + * @param sas the shared access signature token to use. + */ + public void update(String sas) { + this.sas = sas; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridServiceVersion.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridServiceVersion.java new file mode 100644 index 0000000000000..aa3c049fb503f --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridServiceVersion.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.util.ServiceVersion; + +/** + * An enum defining the available service versions for the Event Grid service. Note currently only + * one service version, {@code 2018_01_01} is supported. + */ +public enum EventGridServiceVersion implements ServiceVersion { + + V2018_01_01("2018_01_01"); + + private String version; + + EventGridServiceVersion(String version) { + this.version = version; + } + + /** + * Get the version string for this particular service version instance. + * @return the version string corresponding to this service version. + */ + @Override + public String getVersion() { + return version; + } + + /** + * Gets the latest supported service version. + * @return the latest supported service version. + */ + public static EventGridServiceVersion getLatest() { + return V2018_01_01; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventMappings.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventMappings.java new file mode 100644 index 0000000000000..e8129049799c3 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventMappings.java @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData; +import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData; +import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData; +import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartPushedEventData; +import com.azure.messaging.eventgrid.systemevents.ContainerRegistryImageDeletedEventData; +import com.azure.messaging.eventgrid.systemevents.ContainerRegistryImagePushedEventData; +import com.azure.messaging.eventgrid.systemevents.EventHubCaptureFileCreatedEventData; +import com.azure.messaging.eventgrid.systemevents.IotHubDeviceConnectedEventData; +import com.azure.messaging.eventgrid.systemevents.IotHubDeviceCreatedEventData; +import com.azure.messaging.eventgrid.systemevents.IotHubDeviceDeletedEventData; +import com.azure.messaging.eventgrid.systemevents.IotHubDeviceDisconnectedEventData; +import com.azure.messaging.eventgrid.systemevents.IotHubDeviceTelemetryEventData; +import com.azure.messaging.eventgrid.systemevents.MapsGeofenceEnteredEventData; +import com.azure.messaging.eventgrid.systemevents.MapsGeofenceExitedEventData; +import com.azure.messaging.eventgrid.systemevents.MapsGeofenceResultEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobCanceledEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobCancelingEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobErroredEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobFinishedEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobOutputCanceledEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobOutputCancelingEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobOutputErroredEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobOutputFinishedEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobOutputProcessingEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobOutputProgressEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobOutputScheduledEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobOutputStateChangeEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobProcessingEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobScheduledEventData; +import com.azure.messaging.eventgrid.systemevents.MediaJobStateChangeEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventConnectionRejectedEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventEncoderConnectedEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventEncoderDisconnectedEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventIncomingDataChunkDroppedEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventIncomingStreamReceivedEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventIncomingStreamsOutOfSyncEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventIncomingVideoStreamsOutOfSyncEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventIngestHeartbeatEventData; +import com.azure.messaging.eventgrid.systemevents.MediaLiveEventTrackDiscontinuityDetectedEventData; +import com.azure.messaging.eventgrid.systemevents.ResourceActionCancelData; +import com.azure.messaging.eventgrid.systemevents.ResourceActionFailureData; +import com.azure.messaging.eventgrid.systemevents.ResourceActionSuccessData; +import com.azure.messaging.eventgrid.systemevents.ResourceDeleteCancelData; +import com.azure.messaging.eventgrid.systemevents.ResourceDeleteFailureData; +import com.azure.messaging.eventgrid.systemevents.ResourceDeleteSuccessData; +import com.azure.messaging.eventgrid.systemevents.ResourceWriteCancelData; +import com.azure.messaging.eventgrid.systemevents.ResourceWriteFailureData; +import com.azure.messaging.eventgrid.systemevents.ResourceWriteSuccessData; +import com.azure.messaging.eventgrid.systemevents.ServiceBusActiveMessagesAvailableWithNoListenersEventData; +import com.azure.messaging.eventgrid.systemevents.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData; +import com.azure.messaging.eventgrid.systemevents.StorageBlobCreatedEventData; +import com.azure.messaging.eventgrid.systemevents.StorageBlobDeletedEventData; +import com.azure.messaging.eventgrid.systemevents.SubscriptionDeletedEventData; +import com.azure.messaging.eventgrid.systemevents.SubscriptionValidationEventData; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; + +/** + * This class contains a number of constants that correspond to the value of {@code eventType} of {@link EventGridEvent}s + * and {@code type} of {@link CloudEvent}s, when the event originated from an Azure service. This list should be + * updated with all the service event strings. It also contains a mapping from each service event string to the + * model class that the event string corresponds to in the {@code data} field, which is used to automatically deserialize + * system events by their known string. + */ +public final class SystemEventMappings { + // Keep this sorted by the name of the service publishing the events. + + // AppConfiguration events. + /** + * indicate an event of KeyValueDeleted in AppConfiguration. + */ + public static final String APP_CONFIGURATION_KEY_VALUE_DELETED_EVENT = "Microsoft.AppConfiguration.KeyValueDeleted"; + /** + * indicate an event of KeyValueModified in AppConfiguration. + */ + public static final String APP_CONFIGURATION_KEY_VALUE_MODIFIED_EVENT = "Microsoft.AppConfiguration.KeyValueModified"; + + // ContainerRegistry events. + /** + * indicate an event of pushing an image to container registry. + */ + public static final String CONTAINER_REGISTRY_IMAGE_PUSHED_EVENT = "Microsoft.ContainerRegistry.ImagePushed"; + /** + * indicate an event of deleting an image from container registry. + */ + public static final String CONTAINER_REGISTRY_IMAGE_DELETED_EVENT = "Microsoft.ContainerRegistry.ImageDeleted"; + /** + * indicate an event of chart deletion in container registry. + */ + public static final String CONTAINER_REGISTRY_CHART_DELETED_EVENT = "Microsoft.ContainerRegistry.ChartDeleted"; + /** + * indicate an event of chart pushed in container registry. + */ + public static final String CONTAINER_REGISTRY_CHART_PUSHED_EVENT = "Microsoft.ContainerRegistry.ChartPushed"; + + // Device events. + /** + * indicate an event of creating an IoT hub device. + */ + public static final String IOT_HUB_DEVICE_CREATED_EVENT = "Microsoft.Devices.DeviceCreated"; + /** + * indicate an event of deleting an IoT hub device. + */ + public static final String IOT_HUB_DEVICE_DELETED_EVENT = "Microsoft.Devices.DeviceDeleted"; + /** + * indicate an event of connecting an IoT hub device. + */ + public static final String IOT_HUB_DEVICE_CONNECTED_EVENT = "Microsoft.Devices.DeviceConnected"; + /** + * indicate an event of disconnecting an IoT hub device. + */ + public static final String IOT_HUB_DEVICE_DISCONNECTED_EVENT = "Microsoft.Devices.DeviceDisconnected"; + /** + * indicate an event of telemetry from an IoT hub device. + */ + public static final String IOT_HUB_DEVICE_TELEMETRY_EVENT = "Microsoft.Devices.DeviceTelemetry"; + + // EventGrid events. + /** + * indicate an event of validating eventgrid subscription. + */ + public static final String EVENT_GRID_SUBSCRIPTION_VALIDATION_EVENT = "Microsoft.EventGrid.SubscriptionValidationEvent"; + /** + * indicate an event of deleting eventgrid subscription. + */ + public static final String EVENT_GRID_SUBSCRIPTION_DELETED_EVENT = "Microsoft.EventGrid.SubscriptionDeletedEvent"; + + // Event Hub Events. + /** + * indicate an event of creation of capture file in eventhub. + */ + public static final String EVENT_HUB_CAPTURE_FILE_CREATED_EVENT = "Microsoft.EventHub.CaptureFileCreated"; + + // Maps Events. + /** + * Maps GeoFence Entered Event. + */ + public static final String MAPS_GEOFENCE_ENTERED = "Microsoft.Maps.GeofenceEntered"; + + /** + * Maps GeoFence Exited Event. + */ + public static final String MAPS_GEOFENCE_EXITED = "Microsoft.Maps.GeofenceExited"; + + /** + * Maps GeoFence Result Event. + */ + public static final String MAPS_GEOFENCE_RESULT = "Microsoft.Maps.GeofenceResult"; + + // Media Services events. + /** + * Media Services Job Canceled Event. + */ + public static final String MEDIA_JOB_CANCELED_EVENT = "Microsoft.Media.JobCanceled"; + + /** + * Media Services Job Canceling Event. + */ + public static final String MEDIA_JOB_CANCELING_EVENT = "Microsoft.Media.JobCanceling"; + + /** + * Media Services Job Errored event. + */ + public static final String MEDIA_JOB_ERRORED_EVENT = "Microsoft.Media.JobErrored"; + + /** + * Media Services Job Finished event. + */ + public static final String MEDIA_JOB_FINISHED_EVENT = "Microsoft.Media.JobFinished"; + + /** + * Media Services Job Ouput Canceled event. + */ + public static final String MEDIA_JOB_OUTPUT_CANCELED_EVENT = "Microsoft.Media.JobOutputCanceled"; + + /** + * Media Services Job Output Canceling event. + */ + public static final String MEDIA_JOB_OUTPUT_CANCELING_EVENT = "Microsoft.Media.JobOutputCanceling"; + + /** + * Media Services Job Output Errored event. + */ + public static final String MEDIA_JOB_OUTPUT_ERRORED_EVENT = "Microsoft.Media.JobOutputErrored"; + + /** + * Media Services Job Output Finished event. + */ + public static final String MEDIA_JOB_OUTPUT_FINISHED_EVENT = "Microsoft.Media.JobOutputFinished"; + + /** + * Media Services Job Output Processing event. + */ + public static final String MEDIA_JOB_OUTPUT_PROCESSING_EVENT = "Microsoft.Media.JobOutputProcessing"; + + /** + * Media Services Job Output Progress event. + */ + public static final String MEDIA_JOB_OUTPUT_PROGRESS_EVENT = "Microsoft.Media.JobOutputProgress"; + + /** + * Media Services Job Output Scheduled event. + */ + public static final String MEDIA_JOB_OUTPUT_SCHEDULED_EVENT = "Microsoft.Media.JobOutputScheduled"; + + /** + * Media Services Job Output State Change event. + */ + public static final String MEDIA_JOB_OUTPUT_STATE_CHANGE_EVENT = "Microsoft.Media.JobOutputStateChange"; + + /** + * Media Services Job Processing event. + */ + public static final String MEDIA_JOB_PROCESSING_EVENT = "Microsoft.Media.JobProcessing"; + + /** + * Media Services Job Scheduled event. + */ + public static final String MEDIA_JOB_SCHEDULED_EVENT = "Microsoft.Media.JobScheduled"; + + /** + * Media Services Job State Change event. + */ + public static final String MEDIA_JOB_STATE_CHANGE_EVENT = "Microsoft.Media.JobStateChange"; + + /** + * Media Services Live Event Connection Rejected event. + */ + public static final String MEDIA_LIVE_EVENT_CONNECTION_REJECTED_EVENT = "Microsoft.Media.LiveEventConnectionRejected"; + + /** + * Media Services Live Event Encoder Connected event. + */ + public static final String MEDIA_LIVE_EVENT_ENCODER_CONNECTED_EVENT = "Microsoft.Media.LiveEventEncoderConnected"; + + /** + * Media Services Live Event Encoder Disconnected event. + */ + public static final String MEDIA_LIVE_EVENT_ENCODER_DISCONNECTED_EVENT = "Microsoft.Media.LiveEventEncoderDisconnected"; + + /** + * Media Services Live Event Incoming Data Chunk Dropped event. + */ + public static final String MEDIA_LIVE_EVENT_INCOMING_DATA_CHUNK_DROPPED_EVENT = "Microsoft.Media.LiveEventIncomingDataChunkDropped"; + + /** + * Media Services Live Event Incoming Stream Received event. + */ + public static final String MEDIA_LIVE_EVENT_INCOMING_STREAM_RECEIVED_EVENT = "Microsoft.Media.LiveEventIncomingStreamReceived"; + + /** + * Media Services Live Event Incoming Streams OutofSync event. + */ + public static final String MEDIA_LIVE_EVENT_INCOMING_STREAMS_OUTOFSYNC_EVENT = "Microsoft.Media.LiveEventIncomingStreamsOutOfSync"; + + /** + * Media Services Live Event Incoming Video Streams OutOfSync event. + */ + public static final String MEDIA_LIVE_EVENT_INCOMING_VIDEO_STREAMS_OUTOFSYNC_EVENT = "Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync"; + + /** + * Media Services Live Event Ingest Heartbeat event. + */ + public static final String MEDIA_LIVE_EVENT_INGEST_HEARTBEAT_EVENT = "Microsoft.Media.LiveEventIngestHeartbeat"; + + /** + * Media Services Live Event Track Discontinuity Detected event. + */ + public static final String MEDIA_LIVE_EVENT_TRACK_DISCONTINUITY_DETECTED_EVENT = "Microsoft.Media.LiveEventTrackDiscontinuityDetected"; + + + // Resource Manager (Azure Subscription/Resource Group) events + /** + * indicate an event of successful write of a resource. + */ + public static final String RESOURCE_WRITE_SUCCESS_EVENT = "Microsoft.Resources.ResourceWriteSuccess"; + /** + * indicate an event of write failure of a resource. + */ + public static final String RESOURCE_WRITE_FAILURE_EVENT = "Microsoft.Resources.ResourceWriteFailure"; + /** + * indicate an event of write cancellation of a resource. + */ + public static final String RESOURCE_WRITE_CANCEL_EVENT = "Microsoft.Resources.ResourceWriteCancel"; + /** + * indicate an event of successful deletion of a resource. + */ + public static final String RESOURCE_DELETE_SUCCESS_EVENT = "Microsoft.Resources.ResourceDeleteSuccess"; + /** + * indicate an event of failure in deleting a resource. + */ + public static final String RESOURCE_DELETE_FAILURE_EVENT = "Microsoft.Resources.ResourceDeleteFailure"; + /** + * indicate an event of cancellation of resource deletion. + */ + public static final String RESOURCE_DELETE_CANCEL_EVENT = "Microsoft.Resources.ResourceDeleteCancel"; + /** + * indicate an event of successful action on a resource. + */ + public static final String RESOURCE_ACTION_SUCCESS_EVENT = "Microsoft.Resources.ResourceActionSuccess"; + /** + * indicate an event of failure in performing an action on a resource. + */ + public static final String RESOURCE_ACTION_FAILURE_EVENT = "Microsoft.Resources.ResourceActionFailure"; + /** + * indicate an event of cancellation of resource action. + */ + public static final String RESOURCE_ACTION_CANCEL_EVENT = "Microsoft.Resources.ResourceActionCancel"; + + // ServiceBus events. + /** + * indicate an event of active messages with no listener for them. + */ + public static final String SERVICE_BUS_ACTIVE_MESSAGES_AVAILABLE_WITH_NO_LISTENERS_EVENT = "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners"; + /** + * indicate an event of deadletter messages with no listener for them. + */ + public static final String SERVICE_BUS_DEADLETTER_MESSAGES_AVAILABLE_WITH_NO_LISTENER_EVENT = "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener"; + + // Storage events. + /** + * indicates an event of blob creation. + */ + public static final String STORAGE_BLOB_CREATED_EVENT = "Microsoft.Storage.BlobCreated"; + /** + * indicates an event of blob deletion. + */ + public static final String STORAGE_BLOB_DELETED_EVENT = "Microsoft.Storage.BlobDeleted"; + + //TODO: When a new service adds an event, add a constant above and a mapping to the corresponding data class below. + + private static final Map> systemEventMappings = new HashMap>() {{ + // + // AppConfiguration events. + put(canonicalizeEventType(APP_CONFIGURATION_KEY_VALUE_DELETED_EVENT), AppConfigurationKeyValueDeletedEventData.class); + put(canonicalizeEventType(APP_CONFIGURATION_KEY_VALUE_MODIFIED_EVENT), AppConfigurationKeyValueModifiedEventData.class); + // + // ContainerRegistry events. + put(canonicalizeEventType(CONTAINER_REGISTRY_IMAGE_PUSHED_EVENT), ContainerRegistryImagePushedEventData.class); + put(canonicalizeEventType(CONTAINER_REGISTRY_IMAGE_DELETED_EVENT), ContainerRegistryImageDeletedEventData.class); + put(canonicalizeEventType(CONTAINER_REGISTRY_CHART_DELETED_EVENT), ContainerRegistryChartDeletedEventData.class); + put(canonicalizeEventType(CONTAINER_REGISTRY_CHART_PUSHED_EVENT), ContainerRegistryChartPushedEventData.class); + // + // Device events. + put(canonicalizeEventType(IOT_HUB_DEVICE_CREATED_EVENT), IotHubDeviceCreatedEventData.class); + put(canonicalizeEventType(IOT_HUB_DEVICE_DELETED_EVENT), IotHubDeviceDeletedEventData.class); + put(canonicalizeEventType(IOT_HUB_DEVICE_CONNECTED_EVENT), IotHubDeviceConnectedEventData.class); + put(canonicalizeEventType(IOT_HUB_DEVICE_DISCONNECTED_EVENT), IotHubDeviceDisconnectedEventData.class); + put(canonicalizeEventType(IOT_HUB_DEVICE_TELEMETRY_EVENT), IotHubDeviceTelemetryEventData.class); + // + // EventGrid events. + put(canonicalizeEventType(EVENT_GRID_SUBSCRIPTION_VALIDATION_EVENT), SubscriptionValidationEventData.class); + put(canonicalizeEventType(EVENT_GRID_SUBSCRIPTION_DELETED_EVENT), SubscriptionDeletedEventData.class); + // + // Event Hub Events. + put(canonicalizeEventType(EVENT_HUB_CAPTURE_FILE_CREATED_EVENT), EventHubCaptureFileCreatedEventData.class); + // Maps events + put(canonicalizeEventType(MAPS_GEOFENCE_ENTERED), MapsGeofenceEnteredEventData.class); + put(canonicalizeEventType(MAPS_GEOFENCE_EXITED), MapsGeofenceExitedEventData.class); + put(canonicalizeEventType(MAPS_GEOFENCE_RESULT), MapsGeofenceResultEventData.class); + // + // Media Services events. + put(canonicalizeEventType(MEDIA_JOB_CANCELED_EVENT), MediaJobCanceledEventData.class); + put(canonicalizeEventType(MEDIA_JOB_CANCELING_EVENT), MediaJobCancelingEventData.class); + put(canonicalizeEventType(MEDIA_JOB_ERRORED_EVENT), MediaJobErroredEventData.class); + put(canonicalizeEventType(MEDIA_JOB_FINISHED_EVENT), MediaJobFinishedEventData.class); + put(canonicalizeEventType(MEDIA_JOB_OUTPUT_CANCELED_EVENT), MediaJobOutputCanceledEventData.class); + put(canonicalizeEventType(MEDIA_JOB_OUTPUT_CANCELING_EVENT), MediaJobOutputCancelingEventData.class); + put(canonicalizeEventType(MEDIA_JOB_OUTPUT_ERRORED_EVENT), MediaJobOutputErroredEventData.class); + put(canonicalizeEventType(MEDIA_JOB_OUTPUT_FINISHED_EVENT), MediaJobOutputFinishedEventData.class); + put(canonicalizeEventType(MEDIA_JOB_OUTPUT_PROCESSING_EVENT), MediaJobOutputProcessingEventData.class); + put(canonicalizeEventType(MEDIA_JOB_OUTPUT_PROGRESS_EVENT), MediaJobOutputProgressEventData.class); + put(canonicalizeEventType(MEDIA_JOB_OUTPUT_SCHEDULED_EVENT), MediaJobOutputScheduledEventData.class); + put(canonicalizeEventType(MEDIA_JOB_OUTPUT_STATE_CHANGE_EVENT), MediaJobOutputStateChangeEventData.class); + put(canonicalizeEventType(MEDIA_JOB_PROCESSING_EVENT), MediaJobProcessingEventData.class); + put(canonicalizeEventType(MEDIA_JOB_SCHEDULED_EVENT), MediaJobScheduledEventData.class); + put(canonicalizeEventType(MEDIA_JOB_STATE_CHANGE_EVENT), MediaJobStateChangeEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_CONNECTION_REJECTED_EVENT), MediaLiveEventConnectionRejectedEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_ENCODER_CONNECTED_EVENT), MediaLiveEventEncoderConnectedEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_ENCODER_DISCONNECTED_EVENT), MediaLiveEventEncoderDisconnectedEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_INCOMING_DATA_CHUNK_DROPPED_EVENT), MediaLiveEventIncomingDataChunkDroppedEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_INCOMING_STREAMS_OUTOFSYNC_EVENT), MediaLiveEventIncomingStreamsOutOfSyncEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_INCOMING_STREAM_RECEIVED_EVENT), MediaLiveEventIncomingStreamReceivedEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_INCOMING_VIDEO_STREAMS_OUTOFSYNC_EVENT), MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_INGEST_HEARTBEAT_EVENT), MediaLiveEventIngestHeartbeatEventData.class); + put(canonicalizeEventType(MEDIA_LIVE_EVENT_TRACK_DISCONTINUITY_DETECTED_EVENT), MediaLiveEventTrackDiscontinuityDetectedEventData.class); + // + // Resource Manager (Azure Subscription/Resource Group) events. + put(canonicalizeEventType(RESOURCE_WRITE_SUCCESS_EVENT), ResourceWriteSuccessData.class); + put(canonicalizeEventType(RESOURCE_WRITE_FAILURE_EVENT), ResourceWriteFailureData.class); + put(canonicalizeEventType(RESOURCE_WRITE_CANCEL_EVENT), ResourceWriteCancelData.class); + put(canonicalizeEventType(RESOURCE_DELETE_SUCCESS_EVENT), ResourceDeleteSuccessData.class); + put(canonicalizeEventType(RESOURCE_DELETE_FAILURE_EVENT), ResourceDeleteFailureData.class); + put(canonicalizeEventType(RESOURCE_DELETE_CANCEL_EVENT), ResourceDeleteCancelData.class); + put(canonicalizeEventType(RESOURCE_ACTION_SUCCESS_EVENT), ResourceActionSuccessData.class); + put(canonicalizeEventType(RESOURCE_ACTION_FAILURE_EVENT), ResourceActionFailureData.class); + put(canonicalizeEventType(RESOURCE_ACTION_CANCEL_EVENT), ResourceActionCancelData.class); + // + // ServiceBus events. + put(canonicalizeEventType(SERVICE_BUS_ACTIVE_MESSAGES_AVAILABLE_WITH_NO_LISTENERS_EVENT), ServiceBusActiveMessagesAvailableWithNoListenersEventData.class); + put(canonicalizeEventType(SERVICE_BUS_DEADLETTER_MESSAGES_AVAILABLE_WITH_NO_LISTENER_EVENT), ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.class); + // + // Storage events. + put(canonicalizeEventType(STORAGE_BLOB_CREATED_EVENT), StorageBlobCreatedEventData.class); + put(canonicalizeEventType(STORAGE_BLOB_DELETED_EVENT), StorageBlobDeletedEventData.class); + }}; + + /** + * Turn a given event type string into it's canonical string, used to convert strings + * when they may have been changed to upper/lower case. + * @param eventType the string to canonicalize. + * + * @return the canonicalized version. + */ + public static String canonicalizeEventType(String eventType) { + if (eventType == null) { + return null; + } else { + return eventType.toLowerCase(Locale.ENGLISH); + } + } + + /** + * Get a mapping of all the system event type strings to their respective class. This is used by default in + * the {@link EventGridEvent} and {@link CloudEvent} classes. + * @return a mapping of all the system event strings to system event objects. + */ + public static Map> getSystemEventMappings() { + return Collections.unmodifiableMap(systemEventMappings); + } + + private SystemEventMappings() { + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java index 774f24c1f27a6..dee378de56dbe 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java index d2a882247287e..905b966dc7569 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java index 14c93a6b1a1d6..6aca386795a87 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.implementation.models; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java index f78e9b5b07cb4..5b0f34d744215 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.implementation.models; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/package-info.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/package-info.java index 410ee975b7c86..273783a3d5fc0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/package-info.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/package-info.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. /** Package containing classes for EventGridPublisherClient. EventGrid Publisher Client. */ diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/package-info.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/package-info.java index 91d46530ed7e7..4dcdc86881396 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/package-info.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/package-info.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. /** diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/package-info.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/package-info.java index 934d3116d5cf2..c37f1a78c02dd 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/package-info.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/package-info.java @@ -1,6 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. +// Licensed under the MIT License. /** Package containing the classes for EventGridClient. Azure EventGrid Client. */ package com.azure.messaging.eventgrid; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppAction.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppAction.java index a49e4e0957567..053a7fe86266a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppAction.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppAction.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java index ed9d26bc21b1e..827b2c99421b6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java index 6b4d8a3a731f1..717ebc209a633 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java index 037baccf3f6ef..707a438a30c24 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanAction.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanAction.java index dc2a1a3b6fd84..5425d978b418d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanAction.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanAction.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java index c386526ea3ffc..d09026a268cd8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AsyncStatus.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AsyncStatus.java index ecdf8f5c1025b..e20290b5b8158 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AsyncStatus.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AsyncStatus.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java index 3435092fdf06a..9e3a39289ce57 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java index 1eed6d3d5ff49..95ae0c2aa5054 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java index eed911405ca38..f7df423d2e7b6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java index d07b195a8be69..11848fc98d6db 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java index 9557bca67a46e..47999719e6cce 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java index 77c0c2492debe..fd1eae9cd34f8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java index c069dbb096218..8278a5773c444 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java index 7d85649c726bd..63cf25ca8c906 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java index aedf436903178..9176074648688 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java index 0cb7d0034b549..8b62d7dbc9378 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java index f5a97572feb82..e05624e769643 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java index 8c5abc0b6896e..de63f452a8a5d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java index fff57f4fca192..8ed87a50dce88 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java index c7526763fe9a9..5b1e4cac433b8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java index bc7137a8e7e60..c4805244923a1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java index 98b5697abf7dc..f5774562c8cb3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java index 9dfe4d3e0f30c..3701f81f0aea2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java index 414f8de2783f6..ae340c9dfe351 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java index 4be2b51c25170..25f59ce5640a2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java index eb30161c51a77..635223c789ed3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java index 73078586a523b..639e90bc901a2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java index 5a3ca2af659b0..41fc6302a7c99 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java index 181b9b6aef5e7..e5185318b994c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java index e6f8a0be6d274..62898ae25ad74 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java index afc027f410df4..c1cb93a8b796e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java index 99ed284c3a3a2..58e4fdeb76859 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java index e48f92e968a90..eb2a7f9857c7a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java index 85163bf47d631..7b460a145de38 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java index 30aa6a81c89ce..9c97100e66cbc 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java index 3f3ed1c626dc3..cc11905703d08 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java index 780d8d74e5154..4ff5368d330f2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java index 0cbd749f1e598..861dd5f2f6d84 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java index 415492cec3c3e..f3ffa816cf2e4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java index 4ac2015aca346..041c5663f9a06 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java index 922c80ed95129..f770ad6cbe196 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java index 21a4e70169876..e011477eb2fdf 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java index 594ac9d23b302..1c0ee6193978c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java index 2519ae1d95243..e757754a439d7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java index 923719c57f355..ffb9eb124dfb5 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java index 4fba8ddd71e93..18bf117c7fbd8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java index e2861f657e40e..2c8acd4c9b8be 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java index 4836b5e502db7..8b9026d02b083 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java index 0454728cc9b58..5badd546a0cc6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java index 63b9bbfc8d79e..cb9c3eaee1701 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceResultEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceResultEventData.java index c88066cd30381..ba842f59f1c46 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceResultEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceResultEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCanceledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCanceledEventData.java index a851f2471e835..1266fa1ae2769 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCanceledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCanceledEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java index 8445b42b42758..97720cac70dd2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java index 99cc73c832162..3bbc5c36d1bf8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCategory.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCategory.java index 4c8961e12d6fc..ffc258812bda9 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCategory.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCategory.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCode.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCode.java index 51311539ff3df..a703d0bc8eaa2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCode.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorCode.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java index 405e543a397f7..b939c98a50b4b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java index 6c448b5ef0186..f6b3cfcf6d699 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java index 6d45306ff3c5c..4d780c3d3852c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java index c5260164299b5..f891d44e8a0d6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java index d7ac6ca9ab758..8ea7a4556c4d7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java index f8edd7784c79f..d8e2ed2a0f5ac 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java index 986e80f34451c..41c1ba1b93cfd 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputErroredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputErroredEventData.java index 00f87a53c58b5..0f42062c80edd 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputErroredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputErroredEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java index 2261cb940d89a..80547fba49b1b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java index 1d385315f1e6e..b2d01452316ea 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProgressEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProgressEventData.java index a28899969ef6f..491a6d91a927f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProgressEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProgressEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java index f70841a3e912c..b835cd90a91a2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputStateChangeEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputStateChangeEventData.java index 9dd09a6eb44c8..30c06d6356a1a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputStateChangeEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputStateChangeEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobProcessingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobProcessingEventData.java index fd0b7b46b2634..27b8a12b675d0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobProcessingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobProcessingEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobRetry.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobRetry.java index 754ad76954556..efb2f5d3f68b0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobRetry.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobRetry.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java index 1bdb322a006c1..f4f4508fe0341 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobState.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobState.java index 1fdb3d63528f3..6efea84799d1c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobState.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobState.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java index 116584286d917..e4ba411ec4fe2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java index 19ccfee1950ee..97be9a75e19c3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java index e2d136eee3c84..436e4c4da3bed 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java index dcfc355bb9121..0144ccc78cb5b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java index 1758ee3c9b8b3..f52b1ef4f6f12 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java index e6003bbc4d33a..35c1325561eba 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java index 8d4b3db85a149..74b26b071717c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java index 6e7cc52c5668f..3805049e9117e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java index d71b2eb97f900..f08f430f72730 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java index 9b81a4e68878a..d3f1edd580233 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRDBCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRDBCompletedEventData.java index 33e6c15184ead..f0c6dece8a68b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRDBCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRDBCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRDBCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRDBCompletedEventData.java index 6c860d82905eb..7cf19ac784f9e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRDBCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRDBCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java index 9d3d601d0ef2b..bdd9107097a0b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java index 01c5df3ca7056..5ec444d6c6fdd 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelData.java index 994ff4912aea0..308b901f39a92 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureData.java index 1cb7056025282..a74af7cec1944 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessData.java index 00f37ae608234..5c5fea72e4ef5 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelData.java index 03fa2422258da..64c722890ee88 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureData.java index 8b217537c3976..de9d0c916bacd 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessData.java index a82b82a7e60b6..a6bb09eacabb0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteCancelData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteCancelData.java index 4f1ebf8e69edf..32cf34c7b84a2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteCancelData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteCancelData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureData.java index d1666ed902bbf..eb945e71bff01 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessData.java index 5e69800643e0f..c01f168e30e4f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java index 0ff020d629410..5ff6db4be2651 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java index 7c17a5c1ee52a..6784533cfe203 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java index 40cb527c4bb3a..99fd320cd16be 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java index 98d9b035a7740..e925609d744b1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StampKind.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StampKind.java index 880cd72f2bd87..a1a7d0b97e43d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StampKind.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StampKind.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java index d3f0cf3e11467..02e02af12731d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobDeletedEventData.java index 75064011575df..d01876b10b536 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobDeletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java index 4cc91a94ad1e5..7530220003633 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryCreatedEventData.java index c96e2bfab6257..b4a4a9ef9e20d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryCreatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryDeletedEventData.java index 1242dba500759..54507ca0778b0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryDeletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryRenamedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryRenamedEventData.java index 19f7e73c83efe..0bca052d2ed01 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryRenamedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageDirectoryRenamedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyActionSummaryDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyActionSummaryDetail.java index fc16e81b4c6f9..c0314e1bbd435 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyActionSummaryDetail.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyActionSummaryDetail.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyCompletedEventData.java index e353f7e3caed3..70b81d4c2d316 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageLifecyclePolicyCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java index 616b48febe443..21d19fec61eff 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java index 9ed9697d820fc..3cddad0cd723b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java index 0e56f78769296..c426b0ec9234c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java index 0a79c14d3a739..63064a49b8da2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java index 549cc2b2ae781..345ca5df58769 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java index de23838299f14..c6e37bfb75ea8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java index fec8feccb4bad..aeb9bbce11a53 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java index cb929a1c9261c..ffcf25dac6894 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java index 228372f504b56..0cd5231719f48 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java index 78d4f55837638..eb53dde191a8a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java index be076e29fd659..9588b28d7dcb8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java index 7e0ad558b3e63..0d937eca2b7bd 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java index 38d10f7ad0ee1..1f7f31fe047a2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java index 9c82b19250e17..0351f57bcd054 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java index 980356502bcde..28a652b1cb197 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java index 697c983d0d562..3b7349f7144d6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java index bd308fb3a3ffb..ec39486acd671 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.eventgrid.systemevents; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/package-info.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/package-info.java index b5f8062753d38..6f4e684e37b02 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/package-info.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/package-info.java @@ -1,7 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. /** Package containing the data models for EventGridPublisherClient. EventGrid Publisher Client. */ diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/ClassTime.java b/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/ClassTime.java new file mode 100644 index 0000000000000..eeaf475ce206e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/ClassTime.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.Random; + +/** + * This class stores some basic information about college classes and the time they start. + */ +public class ClassTime { + + /** + * All the possible departments/subjects for classes. + */ + public enum Department { + MATH, + PHYS, + BIOL, + ENGL, + CSE + } + + private final Department department; + + private final int courseNumber; + + private final OffsetDateTime startTime; + + /** + * Creates a new instance containing information about the department, course number, and start time of the class. + * @param department the department of the class, e.g. MATH. + * @param courseNumber the course number of the class, e.g. 225 or 101. + * @param time the time the class starts today, e.g. 3:15 pm. + */ + public ClassTime(Department department, int courseNumber, OffsetDateTime time) { + this.department = department; + this.courseNumber = courseNumber; + this.startTime = time; + } + + /** + * Creates a random instance of a class, containing a random department, random realistic course number, and a start + * time that is randomly selected from any 15 minute interval from 7:00 am to 6:00 pm today. + * @param random the random element to use to create the class and time. + * @return a random instance of this class and time. + */ + public static ClassTime getRandom(Random random) { + Department department = Department.values()[random.nextInt(Department.values().length)]; + int courseNumber = random.nextInt(500) + 100; + OffsetDateTime time = OffsetDateTime.of(LocalDate.now(), + LocalTime.MIDNIGHT.plusHours(7).plusMinutes(random.nextInt(44) * 15), ZoneOffset.UTC); + return new ClassTime(department, courseNumber, time); + } + + /** + * Get the starting time of this class. + * @return the start time. + */ + public OffsetDateTime getStartTime() { + return startTime; + } + + /** + * Get the department/subject of the class. + * @return the department. + */ + public String getDepartment() { + return department.toString(); + } + + /** + * Get the course number of this class. + * @return the class course number. + */ + public int getCourseNumber() { + return courseNumber; + } + + @Override + public String toString() { + return getDepartment() + " " + getCourseNumber() + " starts at: " + getStartTime().toLocalTime().toString(); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/PublishClassTime.java b/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/PublishClassTime.java new file mode 100644 index 0000000000000..bc511143698ec --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/PublishClassTime.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.serializer.JacksonAdapter; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.module.SimpleModule; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +/** + * This Sample is an example of using a custom serializer to send custom event data to an EventGrid topic. + * + * To run this sample, first create an EventGrid topic and store the key and endpoint as system environment variables. + * See the README in the library folder for more help on getting started with EventGrid. + * + * Run the main method with no arguments to start publishing! By the end, you should have published 50 batches of + * events to your topic, with each batch containing a number of individual events. + */ +public class PublishClassTime { + + private static final int REPEATS = 50; + + public static void main(String[] args) throws InterruptedException { + publishEvents(); + } + + public static void publishEvents() throws InterruptedException { + String key = System.getenv("TOPIC_KEY"); + String endpoint = System.getenv("TOPIC_ENDPOINT"); + + JacksonAdapter customSerializer = new JacksonAdapter(); + + customSerializer.serializer().registerModule(new SimpleModule().addSerializer(ClassTime.class, + new JsonSerializer() { + + @Override + public void serialize(ClassTime classTime, JsonGenerator jsonGenerator, + SerializerProvider serializerProvider) throws IOException { + jsonGenerator.writeStartObject(); + jsonGenerator.writeStringField("department", classTime.getDepartment()); + jsonGenerator.writeNumberField("courseNumber", classTime.getCourseNumber()); + jsonGenerator.writeStringField("startTime", classTime.getStartTime().toString()); + jsonGenerator.writeEndObject(); + } + })); + + // EG client + EventGridPublisherClient egClient = new EventGridPublisherClientBuilder() + .credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .serializer(customSerializer) + .buildClient(); + + Random random = new Random(); + + for (int i = 0; i < REPEATS; i++) { + + publish(egClient, random); + Thread.sleep(1000); + } + + + } + + + public static void publish(EventGridPublisherClient egClient, Random random) { + List events = new ArrayList<>(); + int times = random.nextInt(4) + 1; + for (int i = 0; i < times; i++) { + ClassTime classTime = ClassTime.getRandom(random); + System.out.println(classTime); + + events.add(new CloudEvent("/microsoft/demo", "Microsoft.Demo.ClassTime") + .setData(classTime)); + } + System.out.println(); + + + egClient.sendCloudEvents(events); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/ReadmeSamples.java b/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/ReadmeSamples.java new file mode 100644 index 0000000000000..63b674bd69ba6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/samples/java/com/azure/messaging/eventgrid/ReadmeSamples.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.messaging.eventgrid.systemevents.SubscriptionValidationEventData; + +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + *

    + * Code samples for the README.md + */ +public class ReadmeSamples { + + private final String endpoint = "endpoint"; + private final String key = "key"; + private final EventGridPublisherClient egClient = new EventGridPublisherClientBuilder().buildClient(); + private final String jsonData = "Json encoded event"; + + public void createPublisherClient() { + EventGridPublisherClient egClient = new EventGridPublisherClientBuilder() + .endpoint(endpoint) + .credential(new AzureKeyCredential(key)) + .buildClient(); + } + + public void createAsyncPublisherClient() { + EventGridPublisherAsyncClient egAsyncClient = new EventGridPublisherClientBuilder() + .endpoint(endpoint) + .credential(new AzureKeyCredential(key)) + .buildAsyncClient(); + } + + public void sendEventGridEvents() { + List events = new ArrayList<>(); + events.add( + new EventGridEvent("exampleSubject", "Com.Example.ExampleEventType", "1") + .setData("Example Data") + ); + + egClient.sendEvents(events); + } + + public void sendCloudEvents() { + List events = new ArrayList<>(); + events.add( + new CloudEvent("com/example/source", "Com.Example.ExampleEventType") + .setData("Example Data") + ); + + egClient.sendCloudEvents(events); + } + + public void consumeEventGridEvent() { + List events = EventGridEvent.parse(jsonData); + + for (EventGridEvent event : events) { + // system event data will be turned into it's rich object, + // while custom event data will be turned into a byte[]. + Object data = event.getData(); + + // this event type goes to any non-azure endpoint (such as a WebHook) when the subscription is created. + if (data instanceof SubscriptionValidationEventData) { + SubscriptionValidationEventData validationData = (SubscriptionValidationEventData) data; + System.out.println(validationData.getValidationCode()); + } else if (data instanceof byte[]) { + // we can turn the data into the correct type by calling this method. + // since we set the data as a string when sending, we pass the String class in to get it back. + String stringData = event.getData(String.class); + System.out.println(stringData); // "Example Data" + } + } + } + + public void consumeCloudEvent() { + List events = CloudEvent.parse(jsonData); + + for (CloudEvent event : events) { + // system event data will be turned into it's rich object, + // while custom event data will be turned into a byte[]. + Object data = event.getData(); + + // this event type goes to any non-azure endpoint (such as a WebHook) when the subscription is created. + if (data instanceof SubscriptionValidationEventData) { + SubscriptionValidationEventData validationData = (SubscriptionValidationEventData) data; + System.out.println(validationData.getValidationCode()); + } else if (data instanceof byte[]) { + // we can turn the data into the correct type by calling this method. + // since we set the data as a string when sending, we pass the String class in to get it back. + String stringData = event.getData(String.class); + System.out.println(stringData); // "Example Data" + } + } + } + + public void createSharedAccessSignature() { + OffsetDateTime expiration = OffsetDateTime.now().plusMinutes(20); + String credentialString = EventGridSasCredential + .createSas(endpoint, expiration, new AzureKeyCredential(key)); + EventGridSasCredential signature = new EventGridSasCredential(credentialString); + } + + +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/DeserializationTests.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/DeserializationTests.java new file mode 100644 index 0000000000000..387d8d1d11d07 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/DeserializationTests.java @@ -0,0 +1,1146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + +import com.azure.messaging.eventgrid.models.ContosoItemReceivedEventData; +import com.azure.messaging.eventgrid.models.ContosoItemSentEventData; +import com.azure.messaging.eventgrid.models.DroneShippingInfo; +import com.azure.messaging.eventgrid.models.RocketShippingInfo; +import com.azure.messaging.eventgrid.systemevents.*; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import org.apache.commons.io.IOUtils; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Base64; +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.*; + +public class DeserializationTests { + + // just test to see if these events can be deserialized + @Test + public void testDeserializeEventGridEvents() throws JsonProcessingException { + String storageEventJson = "{\"topic\": \"/subscriptions/subscriptionID/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/xstoretestaccount\",\"subject\": \"/blobServices/default/containers/testcontainer/blobs/testfile.txt\", \"eventType\": \"Microsoft.Storage.BlobCreated\", \"eventTime\": \"2017-06-26T18:41:00.9584103Z\", \"id\": \"831e1650-001e-001b-66ab-eeb76e069631\", \"data\": { \"api\": \"PutBlockList\", \"clientRequestId\": \"6d79dbfb-0e37-4fc4-981f-442c9ca65760\", \"requestId\": \"831e1650-001e-001b-66ab-eeb76e000000\", \"eTag\": \"0x8D4BCC2E4835CD0\", \"contentType\": \"text/plain\", \"contentLength\": 524288, \"blobType\": \"BlockBlob\", \"url\": \"https://example.blob.core.windows.net/testcontainer/testfile.txt\", \"sequencer\": \"00000000000004420000000000028963\", \"storageDiagnostics\": { \"batchId\": \"b68529f3-68cd-4744-baa4-3c0498ec19f0\" }}, \"dataVersion\": \"\", \"metadataVersion\": \"1\"}"; + + ObjectMapper mapper = new ObjectMapper(); + mapper.registerModule(new SimpleModule() + .addDeserializer(OffsetDateTime.class, new JsonDeserializer() { + @Override + public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + return OffsetDateTime.parse(jsonParser.getValueAsString()); + } + })); + + com.azure.messaging.eventgrid.implementation.models.EventGridEvent eventGridEvent = + mapper.readValue(storageEventJson, com.azure.messaging.eventgrid.implementation.models.EventGridEvent.class); + + assertNotNull(eventGridEvent); + assertEquals("Microsoft.Storage.BlobCreated", eventGridEvent.getEventType(), "Event types do not match"); + } + + // just test to see if these events can be deserialized + @Test + public void testDeserializeCloudEvents() throws JsonProcessingException { + String cloudEventJson = "{\n" + + " \"id\": \"9ddf9b10-fe3d-4a16-94bc-c0298924ded1\",\n" + + " \"data\": {\n" + + " \"Field2\": \"Value2\",\n" + + " \"Field3\": \"Value3\",\n" + + " \"Field1\": \"Value1\"\n" + + " },\n" + + " \"type\": \"Microsoft.MockPublisher.TestEvent\",\n" + + " \"time\": \"2020-07-21T18:41:31.166Z\",\n" + + " \"specversion\": \"1.0\"\n" + + "}"; + + ObjectMapper mapper = new ObjectMapper(); + mapper.registerModule(new SimpleModule() + .addDeserializer(OffsetDateTime.class, new JsonDeserializer() { + @Override + public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + return OffsetDateTime.parse(jsonParser.getValueAsString()); + } + })); + + com.azure.messaging.eventgrid.implementation.models.CloudEvent cloudEvent = mapper.readValue(cloudEventJson, com.azure.messaging.eventgrid.implementation.models.CloudEvent.class); + + assertNotNull(cloudEvent); + assertEquals("Microsoft.MockPublisher.TestEvent", cloudEvent.getType(), "Event types do not match"); + + // actually deserialized as a LinkedHashMap instead of generic object. + Object data = cloudEvent.getData(); + + assertNotNull(data); + } + + @Test + public void consumeStorageBlobDeletedEventWithExtraProperty() throws IOException { + String jsonData = getTestPayloadFromFile("StorageBlobDeletedEventWithExtraProperty.json"); + // + + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof StorageBlobDeletedEventData); + StorageBlobDeletedEventData eventData = (StorageBlobDeletedEventData) events[0].getData(); + assertEquals("https://example.blob.core.windows.net/testcontainer/testfile.txt", eventData.getUrl()); + } + + @Test + public void consumeEventGridEventWithoutArrayBrackets() throws IOException { + // using a storageBlobDeletedEvent + String jsonData = getTestPayloadFromFile("EventGridEventNoArray.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertEquals(1, events.length); + assertTrue(events[0].getData() instanceof StorageBlobDeletedEventData); + StorageBlobDeletedEventData eventData = (StorageBlobDeletedEventData) events[0].getData(); + assertEquals("https://example.blob.core.windows.net/testcontainer/testfile.txt", eventData.getUrl()); + } + + @Test + public void consumeCloudEventWithoutArrayBrackets() throws IOException { + String jsonData = getTestPayloadFromFile("CloudEventNoArray.json"); + + List events = CloudEvent.parse(jsonData); + + assertNotNull(events); + assertEquals(1, events.size()); + + assertEquals(events.get(0).getSpecVersion(), "1.0"); + + ContosoItemReceivedEventData data = events.get(0).getData(ContosoItemReceivedEventData.class); + assertNotNull(data); + + assertEquals("512d38b6-c7b8-40c8-89fe-f46f9e9622b6", data.getItemSku()); + + Map additionalProperties = events.get(0).getExtensionAttributes(); + + assertNotNull(additionalProperties); + assertTrue(additionalProperties.containsKey("foo")); + assertEquals("bar", additionalProperties.get("foo")); + } + + @Test + public void consumeEventGridEventWithNullData() throws IOException { + // using a storageBlobDeletedEvent + String jsonData = getTestPayloadFromFile("EventGridNullData.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertEquals(1, events.length); + assertNull(events[0].getData()); + assertEquals("/blobServices/default/containers/testcontainer/blobs/testfile.txt", events[0].getSubject()); + } + + @Test + public void consumeCloudEventWithNullData() throws IOException { + String jsonData = getTestPayloadFromFile("CloudEventNullData.json"); + + List events = CloudEvent.parse(jsonData); + + assertNotNull(events); + assertEquals(1, events.size()); + + assertEquals("1.0", events.get(0).getSpecVersion()); + + assertNull(events.get(0).getData()); + } + + @Test + public void consumeCloudEventWithBinaryData() throws IOException { + String jsonData = getTestPayloadFromFile("CloudEventBinaryData.json"); + + byte[] data = Base64.getDecoder().decode("samplebinarydata"); + + List events = CloudEvent.parse(jsonData); + + assertNotNull(events); + assertEquals(1, events.size()); + + assertEquals(events.get(0).getSpecVersion(), "1.0"); + + byte[] eventData = (byte[]) events.get(0).getData(); + + assertNotNull(eventData); + + assertArrayEquals(data, eventData); + } + + @Test + public void consumeCloudEvent() throws IOException { + String jsonData = getTestPayloadFromFile("CloudEvent.json"); + + List events = CloudEvent.parse(jsonData); + + assertNotNull(events); + assertEquals(1, events.size()); + + assertEquals(events.get(0).getSpecVersion(), "1.0"); + + ContosoItemReceivedEventData data = events.get(0).getData(ContosoItemReceivedEventData.class); + assertNotNull(data); + + assertEquals("512d38b6-c7b8-40c8-89fe-f46f9e9622b6", data.getItemSku()); + + Map additionalProperties = events.get(0).getExtensionAttributes(); + + assertNotNull(additionalProperties); + assertTrue(additionalProperties.containsKey("foo")); + assertEquals("bar", additionalProperties.get("foo")); + + } + + @Test + public void consumeCloudEventXmlData() throws IOException { + String jsonData = getTestPayloadFromFile("CloudEventXmlData.json"); + + List events = CloudEvent.parse(jsonData); + + assertNotNull(events); + assertEquals(1, events.size()); + + assertEquals(events.get(0).getSpecVersion(), "1.0"); + + assertEquals(events.get(0).getExtensionAttributes().get("comexampleothervalue"), 5); + + String xmlData = events.get(0).getData(String.class); + + assertEquals("", xmlData); + } + + @Test + public void consumeCustomEvents() throws IOException { + String jsonData = getTestPayloadFromFile("CustomEvents.json"); + + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertEquals(1, events.length); + assertNotNull(events[0].getData(ContosoItemReceivedEventData.class)); + ContosoItemReceivedEventData eventData = events[0].getData(ContosoItemReceivedEventData.class); + assertEquals("512d38b6-c7b8-40c8-89fe-f46f9e9622b6", eventData.getItemSku()); + } + + @Test + public void consumeCustomEventWithArrayData() throws IOException { + String jsonData = getTestPayloadFromFile("CustomEventWithArrayData.json"); + // + + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertEquals(1, events.length); + ContosoItemReceivedEventData[] eventData = events[0].getData(ContosoItemReceivedEventData[].class); + assertNotNull(eventData); + + assertEquals("512d38b6-c7b8-40c8-89fe-f46f9e9622b6", (eventData[0]).getItemSku()); + } + + @Test + public void consumeCustomEventWithBooleanData() throws IOException { + String jsonData = getTestPayloadFromFile("CustomEventWithBooleanData.json"); + + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertEquals(1, events.length); + + Boolean eventData = events[0].getData(Boolean.class); + assertNotNull(eventData); + + assertTrue(eventData); + } + + @Test + public void consumeCustomEventWithStringData() throws IOException { + String jsonData = getTestPayloadFromFile("CustomEventWithStringData.json"); + // + + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertEquals(1, events.length); + + String eventData = events[0].getData(String.class); + assertNotNull(eventData); + + assertEquals("stringdata", eventData); + } + + @Test + public void consumeCustomEventWithPolymorphicData() throws IOException { + String jsonData = getTestPayloadFromFile("CustomEventWithPolymorphicData.json"); + + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertEquals(2, events.length); + + ContosoItemSentEventData eventData0 = events[0].getData(ContosoItemSentEventData.class); + ContosoItemSentEventData eventData1 = events[1].getData(ContosoItemSentEventData.class); + + assertNotNull(eventData0); + assertNotNull(eventData1); + + assertTrue(eventData0.getShippingInfo() instanceof DroneShippingInfo); + + assertTrue(eventData1.getShippingInfo() instanceof RocketShippingInfo); + } + + + @Test + public void consumeMultipleEventsInSameBatch() throws IOException { + String jsonData = getTestPayloadFromFile("MultipleEventsInSameBatch.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertEquals(4, events.length); + assertTrue(events[0].getData() instanceof StorageBlobCreatedEventData); + assertTrue(events[1].getData() instanceof StorageBlobDeletedEventData); + assertTrue(events[2].getData() instanceof StorageBlobDeletedEventData); + assertTrue(events[3].getData() instanceof ServiceBusDeadletterMessagesAvailableWithNoListenersEventData); + StorageBlobDeletedEventData eventData = (StorageBlobDeletedEventData) events[2].getData(); + assertEquals("https://example.blob.core.windows.net/testcontainer/testfile.txt", eventData.getUrl()); + } + + // AppConfiguration events + @Test + public void consumeAppConfigurationKeyValueDeletedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("AppConfigurationKeyValueDeleted.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof AppConfigurationKeyValueDeletedEventData); + AppConfigurationKeyValueDeletedEventData eventData = (AppConfigurationKeyValueDeletedEventData) events[0].getData(); + assertEquals("key1", eventData.getKey()); + } + + @Test + public void consumeAppConfigurationKeyValueModifiedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("AppConfigurationKeyValueModified.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof AppConfigurationKeyValueModifiedEventData); + AppConfigurationKeyValueModifiedEventData eventData = (AppConfigurationKeyValueModifiedEventData) events[0].getData(); + assertEquals("key1", eventData.getKey()); + } + + // ContainerRegistry events + @Test + public void consumeContainerRegistryImagePushedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ContainerRegistryImagePushedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ContainerRegistryImagePushedEventData); + ContainerRegistryImagePushedEventData eventData = (ContainerRegistryImagePushedEventData) events[0].getData(); + assertEquals("127.0.0.1", eventData.getRequest().getAddr()); + } + + @Test + public void consumeContainerRegistryImageDeletedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ContainerRegistryImageDeletedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ContainerRegistryImageDeletedEventData); + ContainerRegistryImageDeletedEventData eventData = (ContainerRegistryImageDeletedEventData) events[0].getData(); + assertEquals("testactor", eventData.getActor().getName()); + } + + @Test + public void consumeContainerRegistryChartDeletedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ContainerRegistryChartDeletedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ContainerRegistryChartDeletedEventData); + ContainerRegistryChartDeletedEventData eventData = (ContainerRegistryChartDeletedEventData) events[0].getData(); + assertEquals("mediatype1", eventData.getTarget().getMediaType()); + } + + @Test + public void consumeContainerRegistryChartPushedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ContainerRegistryChartPushedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ContainerRegistryChartPushedEventData); + ContainerRegistryChartPushedEventData eventData = (ContainerRegistryChartPushedEventData) events[0].getData(); + assertEquals("mediatype1", eventData.getTarget().getMediaType()); + } + + // IoTHub Device events + @Test + public void consumeIoTHubDeviceCreatedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("IoTHubDeviceCreatedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof IotHubDeviceCreatedEventData); + IotHubDeviceCreatedEventData eventData = (IotHubDeviceCreatedEventData) events[0].getData(); + assertEquals("enabled", eventData.getTwin().getStatus()); + } + + @Test + public void consumeIoTHubDeviceDeletedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("IoTHubDeviceDeletedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof IotHubDeviceDeletedEventData); + IotHubDeviceDeletedEventData eventData = (IotHubDeviceDeletedEventData) events[0].getData(); + assertEquals("AAAAAAAAAAE=", eventData.getTwin().getEtag()); + } + + @Test + public void consumeIoTHubDeviceConnectedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("IoTHubDeviceConnectedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof IotHubDeviceConnectedEventData); + IotHubDeviceConnectedEventData eventData = (IotHubDeviceConnectedEventData) events[0].getData(); + assertEquals("EGTESTHUB1", eventData.getHubName()); + } + + @Test + public void consumeIoTHubDeviceDisconnectedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("IoTHubDeviceDisconnectedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof IotHubDeviceDisconnectedEventData); + IotHubDeviceDisconnectedEventData eventData = (IotHubDeviceDisconnectedEventData) events[0].getData(); + assertEquals("000000000000000001D4132452F67CE200000002000000000000000000000002", eventData.getDeviceConnectionStateEventInfo().getSequenceNumber()); + } + + @Test + public void consumeIoTHubDeviceTelemetryEvent() throws IOException { + String jsonData = getTestPayloadFromFile("IoTHubDeviceTelemetryEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof IotHubDeviceTelemetryEventData); + IotHubDeviceTelemetryEventData eventData = (IotHubDeviceTelemetryEventData) events[0].getData(); + assertEquals("Active", eventData.getProperties().get("Status")); + } + + // EventGrid events + @Test + public void consumeEventGridSubscriptionValidationEvent() throws IOException { + String jsonData = getTestPayloadFromFile("EventGridSubscriptionValidationEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof SubscriptionValidationEventData); + SubscriptionValidationEventData eventData = (SubscriptionValidationEventData) events[0].getData(); + assertEquals("512d38b6-c7b8-40c8-89fe-f46f9e9622b6", eventData.getValidationCode()); + } + + @Test + public void consumeEventGridSubscriptionDeletedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("EventGridSubscriptionDeletedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof SubscriptionDeletedEventData); + SubscriptionDeletedEventData eventData = (SubscriptionDeletedEventData) events[0].getData(); + assertEquals("/subscriptions/id/resourceGroups/rg/providers/Microsoft.EventGrid/topics/topic1/providers/Microsoft.EventGrid/eventSubscriptions/eventsubscription1", eventData.getEventSubscriptionId()); + } + + // Event Hub Events + @Test + public void consumeEventHubCaptureFileCreatedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("EventHubCaptureFileCreatedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof EventHubCaptureFileCreatedEventData); + EventHubCaptureFileCreatedEventData eventData = (EventHubCaptureFileCreatedEventData) events[0].getData(); + assertEquals("AzureBlockBlob", eventData.getFileType()); + } + + // Maps events + @Test + public void consumeMapsGeoFenceEnteredEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MapsGeofenceEnteredEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MapsGeofenceEnteredEventData); + MapsGeofenceEnteredEventData eventData = (MapsGeofenceEnteredEventData) events[0].getData(); + assertEquals(true, eventData.isEventPublished()); + } + + @Test + public void consumeMapsGeoFenceExitedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MapsGeofenceExitedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MapsGeofenceExitedEventData); + MapsGeofenceExitedEventData eventData = (MapsGeofenceExitedEventData) events[0].getData(); + assertEquals(true, eventData.isEventPublished()); + } + + @Test + public void consumeMapsGeoFenceResultEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MapsGeofenceResultEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MapsGeofenceResultEventData); + MapsGeofenceResultEventData eventData = (MapsGeofenceResultEventData) events[0].getData(); + assertEquals(true, eventData.isEventPublished()); + } + + // Media Services events + @Test + public void consumeMediaJobCanceledEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobCanceledEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobCanceledEventData); + MediaJobCanceledEventData eventData = (MediaJobCanceledEventData) events[0].getData(); + assertEquals(MediaJobState.CANCELING, eventData.getPreviousState()); + assertEquals(MediaJobState.CANCELED, eventData.getState()); + assertEquals(1, eventData.getOutputs().size()); + assertTrue(eventData.getOutputs().get(0) instanceof MediaJobOutputAsset); + + MediaJobOutputAsset outputAsset = (MediaJobOutputAsset) eventData.getOutputs().get(0); + + assertEquals(MediaJobState.CANCELED, outputAsset.getState()); + assertNull(outputAsset.getError()); + assertNotEquals(100, outputAsset.getProgress()); + assertEquals("output-7a8215f9-0f8d-48a6-82ed-1ead772bc221", outputAsset.getAssetName()); + } + + @Test + public void consumeMediaJobCancelingEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobCancelingEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobCancelingEventData); + MediaJobCancelingEventData eventData = (MediaJobCancelingEventData) events[0].getData(); + assertEquals(MediaJobState.PROCESSING, eventData.getPreviousState()); + assertEquals(MediaJobState.CANCELING, eventData.getState()); + } + + @Test + public void consumeMediaJobProcessingEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobProcessingEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobProcessingEventData); + MediaJobProcessingEventData eventData = (MediaJobProcessingEventData) events[0].getData(); + assertEquals(MediaJobState.SCHEDULED, eventData.getPreviousState()); + assertEquals(MediaJobState.PROCESSING, eventData.getState()); + } + + @Test + public void consumeMediaJobFinishedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobFinishedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobFinishedEventData); + MediaJobFinishedEventData eventData = (MediaJobFinishedEventData) events[0].getData(); + assertEquals(MediaJobState.PROCESSING, eventData.getPreviousState()); + assertEquals(MediaJobState.FINISHED, eventData.getState()); + assertEquals(1, eventData.getOutputs().size()); + assertTrue(eventData.getOutputs().get(0) instanceof MediaJobOutputAsset); + MediaJobOutputAsset outputAsset = (MediaJobOutputAsset) eventData.getOutputs().get(0); + + assertEquals(MediaJobState.FINISHED, outputAsset.getState()); + assertNull(outputAsset.getError()); + assertEquals(100, outputAsset.getProgress()); + assertEquals("output-298338bb-f8d1-4d0f-9fde-544e0ac4d983", outputAsset.getAssetName()); + } + + @Test + public void consumeMediaJobErroredEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobErroredEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobErroredEventData); + MediaJobErroredEventData eventData = (MediaJobErroredEventData) events[0].getData(); + assertEquals(MediaJobState.PROCESSING, eventData.getPreviousState()); + assertEquals(MediaJobState.ERROR, eventData.getState()); + assertEquals(1, eventData.getOutputs().size()); + assertTrue(eventData.getOutputs().get(0) instanceof MediaJobOutputAsset); + + assertEquals(MediaJobState.ERROR, eventData.getOutputs().get(0).getState()); + assertNotNull(eventData.getOutputs().get(0).getError()); + assertEquals(MediaJobErrorCategory.SERVICE, eventData.getOutputs().get(0).getError().getCategory()); + assertEquals(MediaJobErrorCode.SERVICE_ERROR, eventData.getOutputs().get(0).getError().getCode()); + } + + @Test + public void consumeMediaJobOutputStateChangeEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobOutputStateChangeEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobOutputStateChangeEventData); + MediaJobOutputStateChangeEventData eventData = (MediaJobOutputStateChangeEventData) events[0].getData(); + assertEquals(MediaJobState.SCHEDULED, eventData.getPreviousState()); + assertEquals(MediaJobState.PROCESSING, eventData.getOutput().getState()); + assertTrue(eventData.getOutput() instanceof MediaJobOutputAsset); + MediaJobOutputAsset outputAsset = (MediaJobOutputAsset) eventData.getOutput(); + assertEquals("output-2ac2fe75-6557-4de5-ab25-5713b74a6901", outputAsset.getAssetName()); + } + + @Test + public void consumeMediaJobScheduledEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobScheduledEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobScheduledEventData); + MediaJobScheduledEventData eventData = (MediaJobScheduledEventData) events[0].getData(); + assertEquals(MediaJobState.QUEUED, eventData.getPreviousState()); + assertEquals(MediaJobState.SCHEDULED, eventData.getState()); + } + + @Test + public void consumeMediaJobOutputCanceledEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobOutputCanceledEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobOutputCanceledEventData); + MediaJobOutputCanceledEventData eventData = (MediaJobOutputCanceledEventData) events[0].getData(); + assertEquals(MediaJobState.CANCELING, eventData.getPreviousState()); + assertEquals(MediaJobState.CANCELED, eventData.getOutput().getState()); + assertTrue(eventData.getOutput() instanceof MediaJobOutputAsset); + } + + @Test + public void consumeMediaJobOutputCancelingEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobOutputCancelingEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobOutputCancelingEventData); + MediaJobOutputCancelingEventData eventData = (MediaJobOutputCancelingEventData) events[0].getData(); + assertEquals(MediaJobState.PROCESSING, eventData.getPreviousState()); + assertEquals(MediaJobState.CANCELING, eventData.getOutput().getState()); + assertTrue(eventData.getOutput() instanceof MediaJobOutputAsset); + } + + @Test + public void consumeMediaJobOutputErroredEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobOutputErroredEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobOutputErroredEventData); + MediaJobOutputErroredEventData eventData = (MediaJobOutputErroredEventData) events[0].getData(); + assertEquals(MediaJobState.PROCESSING, eventData.getPreviousState()); + assertEquals(MediaJobState.ERROR, eventData.getOutput().getState()); + assertTrue(eventData.getOutput() instanceof MediaJobOutputAsset); + assertNotNull(eventData.getOutput().getError()); + assertEquals(MediaJobErrorCategory.SERVICE, eventData.getOutput().getError().getCategory()); + assertEquals(MediaJobErrorCode.SERVICE_ERROR, eventData.getOutput().getError().getCode()); + } + + @Test + public void consumeMediaJobOutputFinishedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobOutputFinishedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobOutputFinishedEventData); + MediaJobOutputFinishedEventData eventData = (MediaJobOutputFinishedEventData) events[0].getData(); + assertEquals(MediaJobState.PROCESSING, eventData.getPreviousState()); + assertEquals(MediaJobState.FINISHED, eventData.getOutput().getState()); + assertTrue(eventData.getOutput() instanceof MediaJobOutputAsset); + assertEquals(100, eventData.getOutput().getProgress()); + + MediaJobOutputAsset outputAsset = (MediaJobOutputAsset) eventData.getOutput(); + assertEquals("output-2ac2fe75-6557-4de5-ab25-5713b74a6901", outputAsset.getAssetName()); + } + + @Test + public void consumeMediaJobOutputProcessingEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobOutputProcessingEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobOutputProcessingEventData); + MediaJobOutputProcessingEventData eventData = (MediaJobOutputProcessingEventData) events[0].getData(); + assertEquals(MediaJobState.SCHEDULED, eventData.getPreviousState()); + assertEquals(MediaJobState.PROCESSING, eventData.getOutput().getState()); + assertTrue(eventData.getOutput() instanceof MediaJobOutputAsset); + } + + @Test + public void consumeMediaJobOutputScheduledEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobOutputScheduledEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobOutputScheduledEventData); + MediaJobOutputScheduledEventData eventData = (MediaJobOutputScheduledEventData) events[0].getData(); + assertEquals(MediaJobState.QUEUED, eventData.getPreviousState()); + assertEquals(MediaJobState.SCHEDULED, eventData.getOutput().getState()); + assertTrue(eventData.getOutput() instanceof MediaJobOutputAsset); + } + + @Test + public void consumeMediaJobOutputProgressEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobOutputProgressEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobOutputProgressEventData); + MediaJobOutputProgressEventData eventData = (MediaJobOutputProgressEventData) events[0].getData(); + assertEquals("TestLabel", eventData.getLabel()); + assertTrue(eventData.getJobCorrelationData().containsKey("Field1")); + assertEquals("test1", eventData.getJobCorrelationData().get("Field1")); + assertTrue(eventData.getJobCorrelationData().containsKey("Field2")); + assertEquals("test2", eventData.getJobCorrelationData().get("Field2")); + } + + @Test + public void consumeMediaJobStateChangeEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaJobStateChangeEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaJobStateChangeEventData); + MediaJobStateChangeEventData eventData = (MediaJobStateChangeEventData) events[0].getData(); + assertEquals(MediaJobState.SCHEDULED, eventData.getPreviousState()); + assertEquals(MediaJobState.PROCESSING, eventData.getState()); + } + + @Test + public void consumeMediaLiveEventEncoderConnectedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventEncoderConnectedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventEncoderConnectedEventData); + MediaLiveEventEncoderConnectedEventData eventData = (MediaLiveEventEncoderConnectedEventData) events[0].getData(); + assertEquals("rtmp://liveevent-ec9d26a8.channel.media.azure.net:1935/live/cb5540b10a5646218c1328be95050c59", eventData.getIngestUrl()); + assertEquals("Mystream1", eventData.getStreamId()); + assertEquals("", eventData.getEncoderIp()); + assertEquals("3557", eventData.getEncoderPort()); + } + + @Test + public void consumeMediaLiveEventConnectionRejectedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventConnectionRejectedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventConnectionRejectedEventData); + MediaLiveEventConnectionRejectedEventData eventData = (MediaLiveEventConnectionRejectedEventData) events[0].getData(); + assertEquals("Mystream1", eventData.getStreamId()); + } + + @Test + public void consumeMediaLiveEventEncoderDisconnectedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventEncoderDisconnectedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventEncoderDisconnectedEventData); + MediaLiveEventEncoderDisconnectedEventData eventData = (MediaLiveEventEncoderDisconnectedEventData) events[0].getData(); + assertEquals("rtmp://liveevent-ec9d26a8.channel.media.azure.net:1935/live/cb5540b10a5646218c1328be95050c59", eventData.getIngestUrl()); + assertEquals("Mystream1", eventData.getStreamId()); + assertEquals("", eventData.getEncoderIp()); + assertEquals("3557", eventData.getEncoderPort()); + } + + @Test + public void consumeMediaLiveEventIncomingStreamReceivedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventIncomingStreamReceivedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventIncomingStreamReceivedEventData); + MediaLiveEventIncomingStreamReceivedEventData eventData = (MediaLiveEventIncomingStreamReceivedEventData) events[0].getData(); + assertEquals("rtmp://liveevent-ec9d26a8.channel.media.azure.net:1935/live/cb5540b10a5646218c1328be95050c59", eventData.getIngestUrl()); + assertEquals("", eventData.getEncoderIp()); + assertEquals("3557", eventData.getEncoderPort()); + + assertEquals("audio", eventData.getTrackType()); + assertEquals("audio_160000", eventData.getTrackName()); + assertEquals("66", eventData.getTimestamp()); + assertEquals("1950", eventData.getDuration()); + assertEquals("1000", eventData.getTimescale()); + } + + @Test + public void consumeMediaLiveEventIncomingStreamsOutOfSyncEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventIncomingStreamsOutOfSyncEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventIncomingStreamsOutOfSyncEventData); + MediaLiveEventIncomingStreamsOutOfSyncEventData eventData = (MediaLiveEventIncomingStreamsOutOfSyncEventData) events[0].getData(); + assertEquals("10999", eventData.getMinLastTimestamp()); + assertEquals("video", eventData.getTypeOfStreamWithMinLastTimestamp()); + assertEquals("100999", eventData.getMaxLastTimestamp()); + assertEquals("audio", eventData.getTypeOfStreamWithMaxLastTimestamp()); + assertEquals("1000", eventData.getTimescaleOfMinLastTimestamp()); + assertEquals("1000", eventData.getTimescaleOfMaxLastTimestamp()); + } + + @Test + public void consumeMediaLiveEventIncomingVideoStreamsOutOfSyncEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventIncomingVideoStreamsOutOfSyncEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventIncomingVideoStreamsOutOfSyncEventData); + MediaLiveEventIncomingVideoStreamsOutOfSyncEventData eventData = (MediaLiveEventIncomingVideoStreamsOutOfSyncEventData) events[0].getData(); + assertEquals("10999", eventData.getFirstTimestamp()); + assertEquals("2000", eventData.getFirstDuration()); + assertEquals("100999", eventData.getSecondTimestamp()); + assertEquals("2000", eventData.getSecondDuration()); + assertEquals("1000", eventData.getTimescale()); + } + + @Test + public void consumeMediaLiveEventIncomingDataChunkDroppedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventIncomingDataChunkDroppedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventIncomingDataChunkDroppedEventData); + MediaLiveEventIncomingDataChunkDroppedEventData eventData = (MediaLiveEventIncomingDataChunkDroppedEventData) events[0].getData(); + assertEquals("8999", eventData.getTimestamp()); + assertEquals("video", eventData.getTrackType()); + assertEquals("video1", eventData.getTrackName()); + assertEquals("1000", eventData.getTimescale()); + assertEquals("FragmentDrop_OverlapTimestamp", eventData.getResultCode()); + } + + @Test + public void consumeMediaLiveEventIngestHeartbeatEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventIngestHeartbeatEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventIngestHeartbeatEventData); + MediaLiveEventIngestHeartbeatEventData eventData = (MediaLiveEventIngestHeartbeatEventData) events[0].getData(); + assertEquals("video", eventData.getTrackType()); + assertEquals("video", eventData.getTrackName()); + assertEquals("11999", eventData.getLastTimestamp()); + assertEquals("1000", eventData.getTimescale()); + assertTrue(eventData.isUnexpectedBitrate()); + assertEquals("Running", eventData.getState()); + assertFalse(eventData.isHealthy()); + } + + @Test + public void consumeMediaLiveEventTrackDiscontinuityDetectedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("MediaLiveEventTrackDiscontinuityDetectedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof MediaLiveEventTrackDiscontinuityDetectedEventData); + MediaLiveEventTrackDiscontinuityDetectedEventData eventData = (MediaLiveEventTrackDiscontinuityDetectedEventData) events[0].getData(); + assertEquals("video", eventData.getTrackType()); + assertEquals("video", eventData.getTrackName()); + assertEquals("10999", eventData.getPreviousTimestamp()); + assertEquals("14999", eventData.getNewTimestamp()); + assertEquals("1000", eventData.getTimescale()); + assertEquals("4000", eventData.getDiscontinuityGap()); + } + + // Resource Manager (Azure Subscription/Resource Group) events + @Test + public void consumeResourceWriteFailureEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceWriteFailureEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceWriteFailureData); + ResourceWriteFailureData eventData = (ResourceWriteFailureData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + @Test + public void consumeResourceWriteCancelEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceWriteCancelEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceWriteCancelData); + ResourceWriteCancelData eventData = (ResourceWriteCancelData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + @Test + public void consumeResourceDeleteSuccessEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceDeleteSuccessEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceDeleteSuccessData); + ResourceDeleteSuccessData eventData = (ResourceDeleteSuccessData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + @Test + public void consumeResourceDeleteFailureEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceDeleteFailureEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceDeleteFailureData); + ResourceDeleteFailureData eventData = (ResourceDeleteFailureData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + @Test + public void consumeResourceDeleteCancelEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceDeleteCancelEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceDeleteCancelData); + ResourceDeleteCancelData eventData = (ResourceDeleteCancelData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + @Test + public void consumeResourceActionSuccessEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceActionSuccessEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceActionSuccessData); + ResourceActionSuccessData eventData = (ResourceActionSuccessData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + @Test + public void consumeResourceActionFailureEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceActionFailureEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceActionFailureData); + ResourceActionFailureData eventData = (ResourceActionFailureData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + @Test + public void consumeResourceActionCancelEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceActionCancelEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceActionCancelData); + ResourceActionCancelData eventData = (ResourceActionCancelData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + // ServiceBus events + @Test + public void consumeServiceBusActiveMessagesAvailableWithNoListenersEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ServiceBusActiveMessagesAvailableWithNoListenersEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ServiceBusActiveMessagesAvailableWithNoListenersEventData); + ServiceBusActiveMessagesAvailableWithNoListenersEventData eventData = (ServiceBusActiveMessagesAvailableWithNoListenersEventData) events[0].getData(); + assertEquals("testns1", eventData.getNamespaceName()); + } + + @Test + public void consumeServiceBusDeadletterMessagesAvailableWithNoListenersEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ServiceBusDeadletterMessagesAvailableWithNoListenersEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ServiceBusDeadletterMessagesAvailableWithNoListenersEventData); + ServiceBusDeadletterMessagesAvailableWithNoListenersEventData eventData = (ServiceBusDeadletterMessagesAvailableWithNoListenersEventData) events[0].getData(); + assertEquals("testns1", eventData.getNamespaceName()); + } + + // Storage events + @Test + public void consumeStorageBlobCreatedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("StorageBlobCreatedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof StorageBlobCreatedEventData); + StorageBlobCreatedEventData eventData = (StorageBlobCreatedEventData) events[0].getData(); + assertEquals("https://myaccount.blob.core.windows.net/testcontainer/file1.txt", eventData.getUrl()); + } + + @Test + public void consumeStorageBlobDeletedEvent() throws IOException { + String jsonData = getTestPayloadFromFile("StorageBlobDeletedEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof StorageBlobDeletedEventData); + StorageBlobDeletedEventData eventData = (StorageBlobDeletedEventData) events[0].getData(); + assertEquals("https://example.blob.core.windows.net/testcontainer/testfile.txt", eventData.getUrl()); + } + + // Resource Manager (Azure Subscription/Resource Group) events + @Test + public void consumeResourceWriteSuccessEvent() throws IOException { + String jsonData = getTestPayloadFromFile("ResourceWriteSuccessEvent.json"); + // + + EventGridEvent[] events = EventGridEvent.parse(jsonData).toArray(new EventGridEvent[0]); + + assertNotNull(events); + assertTrue(events[0].getData() instanceof ResourceWriteSuccessData); + ResourceWriteSuccessData eventData = (ResourceWriteSuccessData) events[0].getData(); + assertEquals("72f988bf-86f1-41af-91ab-2d7cd011db47", eventData.getTenantId()); + } + + // TODO: When new event types are introduced, add one test here for each event type + + private String getTestPayloadFromFile(String fileName) throws IOException { + ClassLoader classLoader = getClass().getClassLoader(); + byte[] bytes = IOUtils.toByteArray(classLoader.getResourceAsStream("customization/" + fileName)); + return new String(bytes); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherClientTests.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherClientTests.java new file mode 100644 index 0000000000000..6f73a2b369de3 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherClientTests.java @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventgrid; + + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.rest.Response; +import com.azure.core.test.TestBase; +import com.azure.core.util.Context; +import com.azure.core.util.serializer.JacksonAdapter; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.module.SimpleModule; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +import java.io.IOException; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + + +public class EventGridPublisherClientTests extends TestBase { + + private EventGridPublisherClientBuilder builder; + + // Event Grid endpoint for a topic accepting EventGrid schema events + private static final String EVENTGRID_ENDPOINT = "AZURE_EVENTGRID_EVENTGRID_ENDPOINT"; + + // Event Grid endpoint for a topic accepting CloudEvents schema events + private static final String CLOUD_ENDPOINT = "AZURE_EVENTGRID_CLOUD_ENDPOINT"; + + // Event Grid endpoint for a topic accepting custom schema events + private static final String CUSTOM_ENDPOINT = "AZURE_EVENTGRID_CUSTOM_ENDPOINT"; + + // Event Grid access key for a topic accepting EventGrid schema events + private static final String EVENTGRID_KEY = "AZURE_EVENTGRID_EVENTGRID_KEY"; + + // Event Grid access key for a topic accepting CloudEvents schema events + private static final String CLOUD_KEY = "AZURE_EVENTGRID_CLOUD_KEY"; + + // Event Grid access key for a topic accepting custom schema events + private static final String CUSTOM_KEY = "AZURE_EVENTGRID_CUSTOM_KEY"; + + private static final String DUMMY_ENDPOINT = "https://www.dummyEndpoint.com"; + + private static final String DUMMY_KEY = "dummyKey"; + + @Override + protected void beforeTest() { + + StepVerifier.setDefaultTimeout(Duration.ofSeconds(30)); + + builder = new EventGridPublisherClientBuilder(); + + if (interceptorManager.isPlaybackMode()) { + builder.httpClient(interceptorManager.getPlaybackClient()); + } else { + builder.addPolicy(interceptorManager.getRecordPolicy()) + .retryPolicy(new RetryPolicy()); + } + } + + @Override + protected void afterTest() { + StepVerifier.resetDefaultTimeout(); + } + + @Test + public void publishEventGridEvents() { + EventGridPublisherAsyncClient egClient = builder + .endpoint(getEndpoint(EVENTGRID_ENDPOINT)) + .credential(getKey(EVENTGRID_KEY)) + .buildAsyncClient(); + + List events = new ArrayList<>(); + events.add(new EventGridEvent("Test", "Microsoft.MockPublisher.TestEvent", "1.0") + .setData(new HashMap() {{ + put("Field1", "Value1"); + put("Field2", "Value2"); + put("Field3", "Value3"); + }}) + .setEventTime(OffsetDateTime.now())); + + StepVerifier.create(egClient.sendEventsWithResponse(events)) + .expectNextMatches(voidResponse -> voidResponse.getStatusCode() == 200) + .verifyComplete(); + } + + @Test + public void publishWithSasToken() { + String sasToken = EventGridSasCredential.createSas( + getEndpoint(EVENTGRID_ENDPOINT), + OffsetDateTime.now().plusMinutes(20), + getKey(EVENTGRID_KEY) + ); + + EventGridPublisherAsyncClient egClient = builder + .credential(new EventGridSasCredential(sasToken)) + .endpoint(getEndpoint(EVENTGRID_ENDPOINT)) + .buildAsyncClient(); + + List events = new ArrayList<>(); + events.add(new EventGridEvent("Test", "Microsoft.MockPublisher.TestEvent", "1.0") + .setData(new HashMap() {{ + put("Field1", "Value1"); + put("Field2", "Value2"); + put("Field3", "Value3"); + }}) + .setEventTime(OffsetDateTime.now())); + + StepVerifier.create(egClient.sendEventsWithResponse(events)) + .expectNextMatches(voidResponse -> voidResponse.getStatusCode() == 200) + .verifyComplete(); + } + + @Test + public void publishCloudEvents() { + EventGridPublisherAsyncClient egClient = builder + .endpoint(getEndpoint(CLOUD_ENDPOINT)) + .credential(getKey(CLOUD_KEY)) + .buildAsyncClient(); + + List events = new ArrayList<>(); + events.add(new CloudEvent("/microsoft/testEvent", "Microsoft.MockPublisher.TestEvent") + .setSubject("Test") + .setData(new HashMap() {{ + put("Field1", "Value1"); + put("Field2", "Value2"); + put("Field3", "Value3"); + }}) + .setTime(OffsetDateTime.now())); + + StepVerifier.create(egClient.sendCloudEventsWithResponse(events)) + .expectNextMatches(voidResponse -> voidResponse.getStatusCode() == 200) + .verifyComplete(); + } + + public static class TestData { + + private String name; + + public TestData setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return this.name; + } + } + + @Test + public void publishCloudEventsCustomSerializer() { + // Custom Serializer for testData + JacksonAdapter customSerializer = new JacksonAdapter(); + customSerializer.serializer().registerModule(new SimpleModule().addSerializer(TestData.class, + new JsonSerializer() { + @Override + public void serialize(TestData testData, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) + throws IOException { + jsonGenerator.writeString(testData.getName()); + } + })); + + EventGridPublisherAsyncClient egClient = builder + .credential(getKey(CLOUD_KEY)) + .endpoint(getEndpoint(CLOUD_ENDPOINT)) + .serializer(customSerializer) + .buildAsyncClient(); + + List events = new ArrayList<>(); + for (int i = 0; i < 5; i++) { + events.add(new CloudEvent("/microsoft/testEvent", "Microsoft.MockPublisher.TestEvent") + .setSubject("Test " + i) + .setData(new TestData().setName("Hello " + i))); + } + + StepVerifier.create(egClient.sendCloudEventsWithResponse(events)) + .expectNextMatches(voidResponse -> voidResponse.getStatusCode() == 200) + .verifyComplete(); + } + + + @Test + public void publishCustomEvents() { + EventGridPublisherAsyncClient egClient = builder + .credential(getKey(CUSTOM_KEY)) + .endpoint(getEndpoint(CUSTOM_ENDPOINT)) + .buildAsyncClient(); + + List events = new ArrayList<>(); + for (int i = 0; i < 5; i++) { + events.add(new HashMap() {{ + put("id", UUID.randomUUID().toString()); + put("time", OffsetDateTime.now().toString()); + put("subject", "Test"); + put("foo", "bar"); + put("type", "Microsoft.MockPublisher.TestEvent"); + }}); + } + StepVerifier.create(egClient.sendCustomEventsWithResponse(events)); + } + + @Test + public void publishEventGridEventsSync() { + EventGridPublisherClient egClient = builder + .credential(getKey(EVENTGRID_KEY)) + .endpoint(getEndpoint(EVENTGRID_ENDPOINT)) + .buildClient(); + + List events = new ArrayList<>(); + events.add(new EventGridEvent("Test", "Microsoft.MockPublisher.TestEvent", "1.0") + .setData(new HashMap() {{ + put("Field1", "Value1"); + put("Field2", "Value2"); + put("Field3", "Value3"); + }}) + .setEventTime(OffsetDateTime.now())); + + Response response = egClient.sendEventsWithResponse(events, Context.NONE); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } + + @Test + public void publishCloudEventsSync() { + EventGridPublisherClient egClient = builder + .credential(getKey(CLOUD_KEY)) + .endpoint(getEndpoint(CLOUD_ENDPOINT)) + .buildClient(); + + List events = new ArrayList<>(); + events.add(new CloudEvent("/microsoft/testEvent", "Microsoft.MockPublisher.TestEvent") + .setId(UUID.randomUUID().toString()) + .setSubject("Test") + .setData(new HashMap() {{ + put("Field1", "Value1"); + put("Field2", "Value2"); + put("Field3", "Value3"); + }}) + .setTime(OffsetDateTime.now())); + + Response response = egClient.sendCloudEventsWithResponse(events, Context.NONE); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } + + @Test + public void publishCustomEventsSync() { + EventGridPublisherClient egClient = builder + .credential(getKey(CUSTOM_KEY)) + .endpoint(getEndpoint(CUSTOM_ENDPOINT)) + .buildClient(); + + List events = new ArrayList<>(); + for (int i = 0; i < 5; i++) { + events.add(new HashMap() {{ + put("id", UUID.randomUUID().toString()); + put("subject", "Test"); + put("foo", "bar"); + put("type", "Microsoft.MockPublisher.TestEvent"); + }}); + } + Response response = egClient.sendCustomEventsWithResponse(events, Context.NONE); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } + + private String getEndpoint(String liveEnvName) { + if (interceptorManager.isPlaybackMode()) { + return DUMMY_ENDPOINT; + } + String endpoint = System.getenv(liveEnvName); + assertNotNull(endpoint, "System environment variable " + liveEnvName + "is null"); + return endpoint; + } + + private AzureKeyCredential getKey(String liveEnvName) { + if (interceptorManager.isPlaybackMode()) { + return new AzureKeyCredential(DUMMY_KEY); + } + AzureKeyCredential key = new AzureKeyCredential(System.getenv(liveEnvName)); + assertNotNull(key.getKey(), "System environment variable " + liveEnvName + "is null"); + return key; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java index 72361e48889d0..dbfa528760ec0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/EventGridPublisherImplTests.java @@ -1,6 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. +// Licensed under the MIT License. package com.azure.messaging.eventgrid; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ContosoItemReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ContosoItemReceivedEventData.java new file mode 100644 index 0000000000000..cace642f209b6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ContosoItemReceivedEventData.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.messaging.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ContosoItemReceivedEventData { + @JsonProperty(value = "itemSku", access = JsonProperty.Access.WRITE_ONLY) + private String itemSku; + + @JsonProperty(value = "itemUri", access = JsonProperty.Access.WRITE_ONLY) + private String itemUri; + + public String getItemSku() { + return this.itemSku; + } + + public String getItemUri() { + return this.itemUri; + } +} + diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ContosoItemSentEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ContosoItemSentEventData.java new file mode 100644 index 0000000000000..7cef72894879b --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ContosoItemSentEventData.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.messaging.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ContosoItemSentEventData { + @JsonProperty(value = "shippingInfo", access = JsonProperty.Access.WRITE_ONLY) + private ShippingInfo shippingInfo; + + /** + * @return the shipping info. + */ + public ShippingInfo getShippingInfo() { + return this.shippingInfo; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/DroneShippingInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/DroneShippingInfo.java new file mode 100644 index 0000000000000..68d94d15f2ae5 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/DroneShippingInfo.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.messaging.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "shippingType") +@JsonTypeName("Drone") +public class DroneShippingInfo extends ShippingInfo { + @JsonProperty(value = "droneId", access = JsonProperty.Access.WRITE_ONLY) + private String droneId; + + /** + * @return the drone id. + */ + public String getDroneId() { + return this.droneId; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/RocketShippingInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/RocketShippingInfo.java new file mode 100644 index 0000000000000..0452a8d517da4 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/RocketShippingInfo.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.messaging.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "shippingType") +@JsonTypeName("Rocket") +public class RocketShippingInfo extends ShippingInfo { + @JsonProperty(value = "rocketNumber", access = JsonProperty.Access.WRITE_ONLY) + private String rocketNumber; + + /** + * @return the rocket number. + */ + public String getRocketNumber() { + return this.rocketNumber; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ShippingInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ShippingInfo.java new file mode 100644 index 0000000000000..79b0f1177c567 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/java/com/azure/messaging/eventgrid/models/ShippingInfo.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.messaging.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "shippingType") +@JsonTypeName("JobOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Drone", value = DroneShippingInfo.class), + @JsonSubTypes.Type(name = "Rocket", value = RocketShippingInfo.class) +}) +public class ShippingInfo { + @JsonProperty(value = "shipmentId", access = JsonProperty.Access.WRITE_ONLY) + private String shipmentId; + + /** + * @return the shipment id. + */ + public String getShipmentId() { + return this.shipmentId; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/AppConfigurationKeyValueDeleted.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/AppConfigurationKeyValueDeleted.json new file mode 100644 index 0000000000000..b4dce3c25c423 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/AppConfigurationKeyValueDeleted.json @@ -0,0 +1,16 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/ID/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.ContainerRegistry/test1", + "subject": "test1", + "eventType": "Microsoft.AppConfiguration.KeyValueDeleted", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "key":"key1", + "label":"label1", + "etag":"etag1" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/AppConfigurationKeyValueModified.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/AppConfigurationKeyValueModified.json new file mode 100644 index 0000000000000..b93b4427b1fe3 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/AppConfigurationKeyValueModified.json @@ -0,0 +1,16 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/ID/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.ContainerRegistry/test1", + "subject": "test1", + "eventType": "Microsoft.AppConfiguration.KeyValueModified", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "key":"key1", + "label":"label1", + "etag":"etag1" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEvent.json new file mode 100644 index 0000000000000..3b356c497e87a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEvent.json @@ -0,0 +1,15 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "source": "contoso/items", + "type": "Contoso.Items.ItemReceived", + "subject": "", + "data": { + "itemSku": "512d38b6-c7b8-40c8-89fe-f46f9e9622b6", + "itemUri": "https://rp-eastus2.eventgrid.azure.net:553/eventsubscriptions/estest/validate?id=B2E34264-7D71-453A-B5FB-B62D0FDC85EE&t=2018-04-26T20:30:54.4538837Z&apiVersion=2018-05-01-preview&token=1BNqCxBBSSE9OnNSfZM4%2b5H9zDegKMY6uJ%2fO2DFRkwQ%3d" + }, + "time": "2018-01-25T22:12:19.4556811Z", + "specversion": "1.0", + "foo": "bar" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventBinaryData.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventBinaryData.json new file mode 100644 index 0000000000000..58141ad0deb61 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventBinaryData.json @@ -0,0 +1,12 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "source": "contoso/items", + "type": "Contoso.Items.ItemReceived", + "subject": "", + "data_base64": "samplebinarydata", + "time": "2018-01-25T22:12:19.4556811Z", + "specversion": "1.0", + "foo": "bar" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventNoArray.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventNoArray.json new file mode 100644 index 0000000000000..24e33f09e0d22 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventNoArray.json @@ -0,0 +1,13 @@ +{ + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "source": "contoso/items", + "type": "Contoso.Items.ItemReceived", + "subject": "", + "data": { + "itemSku": "512d38b6-c7b8-40c8-89fe-f46f9e9622b6", + "itemUri": "https://rp-eastus2.eventgrid.azure.net:553/eventsubscriptions/estest/validate?id=B2E34264-7D71-453A-B5FB-B62D0FDC85EE&t=2018-04-26T20:30:54.4538837Z&apiVersion=2018-05-01-preview&token=1BNqCxBBSSE9OnNSfZM4%2b5H9zDegKMY6uJ%2fO2DFRkwQ%3d" + }, + "time": "2018-01-25T22:12:19.4556811Z", + "specversion": "1.0", + "foo": "bar" +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventNullData.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventNullData.json new file mode 100644 index 0000000000000..5bb3627a8f833 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventNullData.json @@ -0,0 +1,11 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "source": "contoso/items", + "type": "Contoso.Items.ItemReceived", + "subject": "", + "time": "2018-01-25T22:12:19.4556811Z", + "specversion": "1.0", + "foo": "bar" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventXmlData.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventXmlData.json new file mode 100644 index 0000000000000..02524005f4865 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CloudEventXmlData.json @@ -0,0 +1,11 @@ +{ + "specversion": "1.0", + "type": "com.example.someevent", + "source": "/mycontext", + "id": "A234-1234-1234", + "time": "2018-04-05T17:31:00Z", + "comexampleextension1": "value", + "comexampleothervalue": 5, + "datacontenttype": "text/xml", + "data": "" +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryChartDeletedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryChartDeletedEvent.json new file mode 100644 index 0000000000000..11218915e08af --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryChartDeletedEvent.json @@ -0,0 +1,22 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/ID/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.ContainerRegistry/test1", + "subject": "test1", + "eventType": "Microsoft.ContainerRegistry.ChartDeleted", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "id":"id", + "timestamp":null, + "action":"action1", + "target":{ + "mediaType":"mediatype1", + "digest":"digest1", + "name":"name1", + "version":null + } + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryChartPushedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryChartPushedEvent.json new file mode 100644 index 0000000000000..eb1878141e753 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryChartPushedEvent.json @@ -0,0 +1,22 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/ID/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.ContainerRegistry/test1", + "subject": "test1", + "eventType": "Microsoft.ContainerRegistry.ChartPushed", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "id":"id", + "timestamp":null, + "action":"action1", + "target":{ + "mediaType":"mediatype1", + "digest":"digest1", + "name":"name1", + "version":null + } + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryImageDeletedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryImageDeletedEvent.json new file mode 100644 index 0000000000000..21258c6f216fc --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryImageDeletedEvent.json @@ -0,0 +1,39 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/ID/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.ContainerRegistry/test1", + "subject": "test1", + "eventType": "Microsoft.ContainerRegistry.ImageDeleted", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "id": "eventID", + "timestamp": "2018-06-20T12:00:33.6125843-07:00", + "action": "testaction", + "target": { + "mediaType": "test", + "size": 20, + "digest": "digest1", + "length": 20, + "repository": "test", + "url": "url1", + "tag": "test" + }, + "request": { + "id": "id", + "addr": "127.0.0.1", + "host": "test", + "method": "method1", + "useragent": "useragent1" + }, + "actor": { + "name": "testactor" + }, + "source": { + "addr": "127.0.0.1", + "instanceID": "id" + } + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryImagePushedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryImagePushedEvent.json new file mode 100644 index 0000000000000..6de3420add1d4 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ContainerRegistryImagePushedEvent.json @@ -0,0 +1,39 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/ID/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.ContainerRegistry/test1", + "subject": "test1", + "eventType": "Microsoft.ContainerRegistry.ImagePushed", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "id": "eventID", + "timestamp": "2018-06-20T12:00:33.6125843-07:00", + "action": "testaction", + "target": { + "mediaType": "test", + "size": 20, + "digest": "digest1", + "length": 20, + "repository": "test", + "url": "url1", + "tag": "test" + }, + "request": { + "id": "id", + "addr": "127.0.0.1", + "host": "test", + "method": "method1", + "useragent": "useragent1" + }, + "actor": { + "name": "testactor" + }, + "source": { + "addr": "127.0.0.1", + "instanceID": "id" + } + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithArrayData.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithArrayData.json new file mode 100644 index 0000000000000..475c713b4b533 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithArrayData.json @@ -0,0 +1,17 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "subject": "", + "data": [ + { + "itemSku": "512d38b6-c7b8-40c8-89fe-f46f9e9622b6", + "itemUri": "https://rp-eastus2.eventgrid.azure.net:553" + } + ], + "eventType": "Contoso.Items.ItemReceived", + "eventTime": "2018-01-25T22:12:19.4556811Z", + "metadataVersion": "1", + "dataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithBooleanData.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithBooleanData.json new file mode 100644 index 0000000000000..aadb734092d7a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithBooleanData.json @@ -0,0 +1,12 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "subject": "", + "data": true, + "eventType": "Contoso.Items.ItemReceived", + "eventTime": "2018-01-25T22:12:19.4556811Z", + "metadataVersion": "1", + "dataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithPolymorphicData.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithPolymorphicData.json new file mode 100644 index 0000000000000..44e593212cba5 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithPolymorphicData.json @@ -0,0 +1,34 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "subject": "", + "data": { + "shippingInfo": { + "shippingType": "Drone", + "droneId": "Drone1", + "shipmentId": "1" + } + }, + "eventType": "Contoso.Items.ItemSent", + "eventTime": "2018-01-25T22:12:19.4556811Z", + "metadataVersion": "1", + "dataVersion": "1" + }, + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "subject": "", + "data": { + "shippingInfo": { + "shippingType": "Rocket", + "rocketNumber": 1, + "shipmentId": "1" + } + }, + "eventType": "Contoso.Items.ItemSent", + "eventTime": "2018-01-25T22:12:19.4556811Z", + "metadataVersion": "1", + "dataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithStringData.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithStringData.json new file mode 100644 index 0000000000000..36045761e1f44 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEventWithStringData.json @@ -0,0 +1,12 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "subject": "", + "data": "stringdata", + "eventType": "Contoso.Items.ItemReceived", + "eventTime": "2018-01-25T22:12:19.4556811Z", + "metadataVersion": "1", + "dataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEvents.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEvents.json new file mode 100644 index 0000000000000..5999548a30ac1 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/CustomEvents.json @@ -0,0 +1,15 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "subject": "", + "data": { + "itemSku": "512d38b6-c7b8-40c8-89fe-f46f9e9622b6", + "itemUri": "https://rp-eastus2.eventgrid.azure.net:553/eventsubscriptions/estest/validate?id=B2E34264-7D71-453A-B5FB-B62D0FDC85EE&t=2018-04-26T20:30:54.4538837Z&apiVersion=2018-05-01-preview&token=1BNqCxBBSSE9OnNSfZM4%2b5H9zDegKMY6uJ%2fO2DFRkwQ%3d" + }, + "eventType": "Contoso.Items.ItemReceived", + "eventTime": "2018-01-25T22:12:19.4556811Z", + "metadataVersion": "1", + "dataVersion": "1" + } +] \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridEventNoArray.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridEventNoArray.json new file mode 100644 index 0000000000000..99317267c4ae2 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridEventNoArray.json @@ -0,0 +1,20 @@ +{ + "topic": "/subscriptions/id/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/xstoretestaccount", + "subject": "/blobServices/default/containers/testcontainer/blobs/testfile.txt", + "eventType": "Microsoft.Storage.BlobDeleted", + "eventTime": "2017-11-07T20:09:22.5674003Z", + "id": "4c2359fe-001e-00ba-0e04-58586806d298", + "data": { + "api": "DeleteBlob", + "requestId": "4c2359fe-001e-00ba-0e04-585868000000", + "contentType": "text/plain", + "blobType": "BlockBlob", + "url": "https://example.blob.core.windows.net/testcontainer/testfile.txt", + "sequencer": "0000000000000281000000000002F5CA", + "storageDiagnostics": { + "batchId": "b68529f3-68cd-4744-baa4-3c0498ec19f0" + } + }, + "dataVersion": "", + "metadataVersion": "1" +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridNullData.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridNullData.json new file mode 100644 index 0000000000000..8ced2762e9e91 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridNullData.json @@ -0,0 +1,11 @@ +[ + { + "topic": "/subscriptions/id/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/xstoretestaccount", + "subject": "/blobServices/default/containers/testcontainer/blobs/testfile.txt", + "eventType": "Microsoft.Test.Null", + "eventTime": "2017-11-07T20:09:22.5674003Z", + "id": "4c2359fe-001e-00ba-0e04-58586806d298", + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridSubscriptionDeletedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridSubscriptionDeletedEvent.json new file mode 100644 index 0000000000000..c9d01ac0211eb --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridSubscriptionDeletedEvent.json @@ -0,0 +1,14 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "subject": "", + "data": { + "eventSubscriptionId": "/subscriptions/id/resourceGroups/rg/providers/Microsoft.EventGrid/topics/topic1/providers/Microsoft.EventGrid/eventSubscriptions/eventsubscription1" + }, + "eventType": "Microsoft.EventGrid.SubscriptionDeletedEvent", + "eventTime": "2018-01-25T22:12:19.4556811Z", + "metadataVersion": "1", + "dataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridSubscriptionValidationEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridSubscriptionValidationEvent.json new file mode 100644 index 0000000000000..de91404d1296d --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventGridSubscriptionValidationEvent.json @@ -0,0 +1,15 @@ +[ + { + "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66", + "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "subject": "", + "data": { + "validationCode": "512d38b6-c7b8-40c8-89fe-f46f9e9622b6", + "validationUrl": "https://rp-eastus2.eventgrid.azure.net:553/eventsubscriptions/estest/validate?id=B2E34264-7D71-453A-B5FB-B62D0FDC85EE&t=2018-04-26T20:30:54.4538837Z&apiVersion=2018-05-01-preview&token=1BNqCxBBSSE9OnNSfZM4%2b5H9zDegKMY6uJ%2fO2DFRkwQ%3d" + }, + "eventType": "Microsoft.EventGrid.SubscriptionValidationEvent", + "eventTime": "2018-01-25T22:12:19.4556811Z", + "metadataVersion": "1", + "dataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventHubCaptureFileCreatedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventHubCaptureFileCreatedEvent.json new file mode 100644 index 0000000000000..52b58e9c41f66 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/EventHubCaptureFileCreatedEvent.json @@ -0,0 +1,22 @@ +[ + { + "topic": "/subscriptions/guid/resourcegroups/rgDataMigrationSample/providers/Microsoft.EventHub/namespaces/tfdatamigratens", + "subject": "eventhubs/hubdatamigration", + "eventType": "microsoft.EventHUB.CaptureFileCreated", + "eventTime": "2017-08-31T19:12:46.0498024Z", + "id": "14e87d03-6fbf-4bb2-9a21-92bd1281f247", + "data": { + "fileUrl": "https://tf0831datamigrate.blob.core.windows.net/windturbinecapture/tfdatamigratens/hubdatamigration/1/2017/08/31/19/11/45.avro", + "fileType": "AzureBlockBlob", + "partitionId": "1", + "sizeInBytes": 249168, + "eventCount": 1500, + "firstSequenceNumber": 2400, + "lastSequenceNumber": 3899, + "firstEnqueueTime": "2017-08-31T19:12:14.674Z", + "lastEnqueueTime": "2017-08-31T19:12:44.309Z" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceConnectedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceConnectedEvent.json new file mode 100644 index 0000000000000..a8fefeb6aa0a4 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceConnectedEvent.json @@ -0,0 +1,19 @@ +[ + { + "id": "fbfd8ee1-cf78-74c6-dbcf-e1c58638ccbd", + "topic": "/SUBSCRIPTIONS/BDF55CDD-8DAB-4CF4-9B2F-C21E8A780472/RESOURCEGROUPS/EGTESTRG/PROVIDERS/MICROSOFT.DEVICES/IOTHUBS/EGTESTHUB1", + "subject": "devices/48e44e11-1437-4907-83b1-4a8d7e89859e", + "eventType": "Microsoft.Devices.DeviceConnected", + "eventTime": "2018-07-03T23:20:11.6921933+00:00", + "data": { + "deviceConnectionStateEventInfo": { + "sequenceNumber": "000000000000000001D4132452F67CE200000002000000000000000000000001" + }, + "hubName": "EGTESTHUB1", + "deviceId": "48e44e11-1437-4907-83b1-4a8d7e89859e", + "moduleId": "" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceCreatedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceCreatedEvent.json new file mode 100644 index 0000000000000..81eb23a9ec8a6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceCreatedEvent.json @@ -0,0 +1,46 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/ID/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.DEVICES/IOTHUBS/hub1", + "subject": "devices/LogicAppTestDevice", + "eventType": "Microsoft.Devices.DeviceCreated", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "twin": { + "deviceId": "LogicAppTestDevice", + "etag": "AAAAAAAAAAE=", + "status": "enabled", + "statusUpdateTime": "0001-01-01T00:00:00", + "connectionState": "Disconnected", + "lastActivityTime": "0001-01-01T00:00:00", + "cloudToDeviceMessageCount": 0, + "authenticationType": "sas", + "x509Thumbprint": { + "primaryThumbprint": null, + "secondaryThumbprint": null + }, + "version": 2, + "properties": { + "desired": { + "$metadata": { + "$lastUpdated": "2018-01-02T19:17:44.4383997Z" + }, + "$version": 1 + }, + "reported": { + "$metadata": { + "$lastUpdated": "2018-01-02T19:17:44.4383997Z" + }, + "$version": 1 + } + } + }, + "hubName": "egtesthub1", + "deviceId": "LogicAppTestDevice", + "operationTimestamp": "2018-01-02T19:17:44.4383997Z", + "opType": "DeviceCreated" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceDeletedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceDeletedEvent.json new file mode 100644 index 0000000000000..d96fed94ade56 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceDeletedEvent.json @@ -0,0 +1,46 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/id/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.DEVICES/IOTHUBS/hub1", + "subject": "devices/LogicAppTestDevice", + "eventType": "Microsoft.Devices.DeviceDeleted", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "twin": { + "deviceId": "LogicAppTestDevice", + "etag": "AAAAAAAAAAE=", + "status": "enabled", + "statusUpdateTime": "0001-01-01T00:00:00", + "connectionState": "Disconnected", + "lastActivityTime": "0001-01-01T00:00:00", + "cloudToDeviceMessageCount": 0, + "authenticationType": "sas", + "x509Thumbprint": { + "primaryThumbprint": null, + "secondaryThumbprint": null + }, + "version": 2, + "properties": { + "desired": { + "$metadata": { + "$lastUpdated": "2018-01-02T19:17:44.4383997Z" + }, + "$version": 1 + }, + "reported": { + "$metadata": { + "$lastUpdated": "2018-01-02T19:17:44.4383997Z" + }, + "$version": 1 + } + } + }, + "hubName": "egtesthub1", + "deviceId": "LogicAppTestDevice", + "operationTimestamp": "2018-01-02T19:17:44.4383997Z", + "opType": "DeviceCreated" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceDisconnectedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceDisconnectedEvent.json new file mode 100644 index 0000000000000..cf2dbff4cf8ec --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceDisconnectedEvent.json @@ -0,0 +1,19 @@ +[ + { + "id": "877f0b10-a086-98ec-27b8-6ae2dfbf5f67", + "topic": "/SUBSCRIPTIONS/BDF55CDD-8DAB-4CF4-9B2F-C21E8A780472/RESOURCEGROUPS/EGTESTRG/PROVIDERS/MICROSOFT.DEVICES/IOTHUBS/EGTESTHUB1", + "subject": "devices/48e44e11-1437-4907-83b1-4a8d7e89859e", + "eventType": "Microsoft.Devices.DeviceDisconnected", + "eventTime": "2018-07-03T23:20:52.646434+00:00", + "data": { + "deviceConnectionStateEventInfo": { + "sequenceNumber": "000000000000000001D4132452F67CE200000002000000000000000000000002" + }, + "hubName": "EGTESTHUB1", + "deviceId": "48e44e11-1437-4907-83b1-4a8d7e89859e", + "moduleId": "" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceTelemetryEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceTelemetryEvent.json new file mode 100644 index 0000000000000..8a6b0572e5773 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/IoTHubDeviceTelemetryEvent.json @@ -0,0 +1,31 @@ +[ + { + "id": "56afc886-767b-d359-d59e-0da7877166b2", + "topic": "/SUBSCRIPTIONS/id/RESOURCEGROUPS/rg/PROVIDERS/MICROSOFT.DEVICES/IOTHUBS/hub1", + "subject": "devices/LogicAppTestDevice", + "eventType": "Microsoft.Devices.DeviceTelemetry", + "eventTime": "2018-01-02T19:17:44.4383997Z", + "data": { + "body": { + "Weather": { + "Temperature": 900 + }, + "Location": "USA" + }, + "properties": { + "Status": "Active" + }, + "systemProperties": { + "iothub-content-type": "application/json", + "iothub-content-encoding": "utf-8", + "iothub-connection-device-id": "d1", + "iothub-connection-auth-method": "{\"scope\":\"device\",\"type\":\"sas\",\"issuer\":\"iothub\",\"acceptingIpFilterRule\":null}", + "iothub-connection-auth-generation-id": "123455432199234570", + "iothub-enqueuedtime": "2019-01-07T20:58:30.48Z", + "iothub-message-source": "Telemetry" + } + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceEnteredEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceEnteredEvent.json new file mode 100644 index 0000000000000..7fe7f2a308223 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceEnteredEvent.json @@ -0,0 +1,29 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/amsResourceGroup/providers/Microsoft.Media/mediaservices/amsaccount", + "subject": "transforms/VideoAnalyzerTransform/jobs/{job id}", + "eventType": "Microsoft.Maps.GeofenceEntered", + "eventTime": "2018-04-20T21:26:13.8978772Z", + "id": "", + "data": { + "expiredGeofenceGeometryId": [ + "id1", + "id2" + ], + "geometries": [ + { + "deviceId": "id1", + "distance": 1.0, + "geometryId": "gid1", + "nearestLat": 72.4, + "nearestLon": 100.4, + "udId": "id22" + } + ], + "invalidPeriodGeofenceGeometryId": null, + "isEventPublished": true + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceExitedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceExitedEvent.json new file mode 100644 index 0000000000000..70153405c40b0 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceExitedEvent.json @@ -0,0 +1,29 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/amsResourceGroup/providers/Microsoft.Media/mediaservices/amsaccount", + "subject": "transforms/VideoAnalyzerTransform/jobs/{job id}", + "eventType": "Microsoft.Maps.GeofenceExited", + "eventTime": "2018-04-20T21:26:13.8978772Z", + "id": "", + "data": { + "expiredGeofenceGeometryId": [ + "id1", + "id2" + ], + "geometries": [ + { + "deviceId": "id1", + "distance": 1.0, + "geometryId": "gid1", + "nearestLat": 72.4, + "nearestLon": 100.4, + "udId": "id22" + } + ], + "invalidPeriodGeofenceGeometryId": null, + "isEventPublished": true + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceResultEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceResultEvent.json new file mode 100644 index 0000000000000..800bc15255d88 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MapsGeofenceResultEvent.json @@ -0,0 +1,29 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/amsResourceGroup/providers/Microsoft.Media/mediaservices/amsaccount", + "subject": "transforms/VideoAnalyzerTransform/jobs/{job id}", + "eventType": "Microsoft.Maps.GeofenceResult", + "eventTime": "2018-04-20T21:26:13.8978772Z", + "id": "", + "data": { + "expiredGeofenceGeometryId": [ + "id1", + "id2" + ], + "geometries": [ + { + "deviceId": "id1", + "distance": 1.0, + "geometryId": "gid1", + "nearestLat": 72.4, + "nearestLon": 100.4, + "udId": "id22" + } + ], + "invalidPeriodGeofenceGeometryId": null, + "isEventPublished": true + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobCanceledEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobCanceledEvent.json new file mode 100644 index 0000000000000..a431ccd332045 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobCanceledEvent.json @@ -0,0 +1,26 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-7a8215f9-0f8d-48a6-82ed-1ead772bc221", + "eventType": "Microsoft.Media.JobCanceled", + "eventTime": "2018-10-12T15:42:05.6519929Z", + "id": "3fef7871-f916-4980-8a45-e79a2675808b", + "data": { + "outputs": [ + { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-7a8215f9-0f8d-48a6-82ed-1ead772bc221", + "error": null, + "label": "VideoAnalyzerPreset_0", + "progress": 83, + "state": "Canceled" + } + ], + "previousState": "Canceling", + "state": "Canceled", + "correlationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobCancelingEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobCancelingEvent.json new file mode 100644 index 0000000000000..55a61c8cda9ca --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobCancelingEvent.json @@ -0,0 +1,16 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-7a8215f9-0f8d-48a6-82ed-1ead772bc221", + "eventType": "Microsoft.Media.JobCanceling", + "eventTime": "2018-10-12T15:41:50.5513295Z", + "id": "1f9a488b-abe3-4fca-80b8-aae59bf7f123", + "data": { + "previousState": "Processing", + "state": "Canceling", + "correlationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobErroredEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobErroredEvent.json new file mode 100644 index 0000000000000..c4cd9519935d0 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobErroredEvent.json @@ -0,0 +1,37 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobErrored", + "eventTime": "2018-10-12T15:29:20.9954767Z", + "id": "2749e9cf-4095-4723-9bc5-df8e15289135", + "data": { + "outputs": [ + { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "error": { + "category": "Service", + "code": "ServiceError", + "details": [ + { + "code": "Internal", + "message": "Internal error in initializing the task for processing" + } + ], + "message": "Fatal service error, please contact support.", + "retry": "DoNotRetry" + }, + "label": "VideoAnalyzerPreset_0", + "progress": 83, + "state": "Error" + } + ], + "previousState": "Processing", + "state": "Error", + "correlationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobFinishedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobFinishedEvent.json new file mode 100644 index 0000000000000..042a1b5d7d35f --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobFinishedEvent.json @@ -0,0 +1,26 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-298338bb-f8d1-4d0f-9fde-544e0ac4d983", + "eventType": "Microsoft.Media.JobFinished", + "eventTime": "2018-10-01T20:58:26.7886175Z", + "id": "83f8464d-be94-48e5-b67b-46c6199fe28e", + "data": { + "outputs": [ + { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-298338bb-f8d1-4d0f-9fde-544e0ac4d983", + "error": null, + "label": "VideoAnalyzerPreset_0", + "progress": 100, + "state": "Finished" + } + ], + "previousState": "Processing", + "state": "Finished", + "correlationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputCanceledEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputCanceledEvent.json new file mode 100644 index 0000000000000..6da1406471a48 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputCanceledEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-7a8215f9-0f8d-48a6-82ed-1ead772bc221", + "eventType": "Microsoft.Media.JobOutputCanceled", + "eventTime": "2018-10-12T15:42:04.949555Z", + "id": "9297cda2-4a50-4622-a679-c3785d27d512", + "data": { + "previousState": "Canceling", + "output": { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-7a8215f9-0f8d-48a6-82ed-1ead772bc221", + "error": null, + "label": "VideoAnalyzerPreset_0", + "progress": 83, + "state": "Canceled" + }, + "jobCorrelationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputCancelingEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputCancelingEvent.json new file mode 100644 index 0000000000000..85919dcbdd3c2 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputCancelingEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-7a8215f9-0f8d-48a6-82ed-1ead772bc221", + "eventType": "Microsoft.Media.JobOutputCanceling", + "eventTime": "2018-10-12T15:42:04.949555Z", + "id": "9297cda2-4a50-4622-a679-c3785d27d512", + "data": { + "previousState": "Processing", + "output": { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-7a8215f9-0f8d-48a6-82ed-1ead772bc221", + "error": null, + "label": "VideoAnalyzerPreset_0", + "progress": 83, + "state": "Canceling" + }, + "jobCorrelationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputErroredEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputErroredEvent.json new file mode 100644 index 0000000000000..315a8f37fb17d --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputErroredEvent.json @@ -0,0 +1,34 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobOutputErrored", + "eventTime": "2018-10-12T15:29:20.2621252Z", + "id": "bc9e6342-f081-49c2-a579-92f506a622c2", + "data": { + "previousState": "Processing", + "output": { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "error": { + "category": "Service", + "code": "ServiceError", + "details": [ + { + "code": "Internal", + "message": "Internal error in initializing the task for processing" + } + ], + "message": "Fatal service error, please contact support.", + "retry": "DoNotRetry" + }, + "label": "VideoAnalyzerPreset_0", + "progress": 83, + "state": "Error" + }, + "jobCorrelationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputFinishedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputFinishedEvent.json new file mode 100644 index 0000000000000..48d93073c68df --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputFinishedEvent.json @@ -0,0 +1,22 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobOutputFinished", + "eventTime": "2018-10-12T15:29:20.2621252Z", + "id": "bc9e6342-f081-49c2-a579-92f506a622c2", + "data": { + "previousState": "Processing", + "output": { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "label": "VideoAnalyzerPreset_0", + "progress": 100, + "state": "Finished" + }, + "jobCorrelationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputProcessingEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputProcessingEvent.json new file mode 100644 index 0000000000000..bb41a4bce2557 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputProcessingEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobOutputProcessing", + "eventTime": "2018-10-12T15:14:17.8962704Z", + "id": "d48eeb0b-2bfa-4265-a2f8-624654c3781c", + "data": { + "previousState": "Scheduled", + "output": { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "error": null, + "label": "VideoAnalyzerPreset_0", + "progress": 0, + "state": "Processing" + }, + "jobCorrelationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputProgressEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputProgressEvent.json new file mode 100644 index 0000000000000..01a671355b9df --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputProgressEvent.json @@ -0,0 +1,19 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6981", + "eventType": "Microsoft.Media.JobOutputProgress", + "eventTime": "2018-10-12T15:14:11.2244618Z", + "id": "635ca6ea-5306-4590-b2e1-22f172759336", + "data": { + "jobCorrelationData": { + "Field1": "test1", + "Field2": "test2" + }, + "label": "TestLabel", + "progress": 50 + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputScheduledEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputScheduledEvent.json new file mode 100644 index 0000000000000..e96904b71b7ee --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputScheduledEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobOutputScheduled", + "eventTime": "2018-10-12T15:14:11.2244618Z", + "id": "635ca6ea-5306-4590-b2e1-22f172759336", + "data": { + "previousState": "Queued", + "output": { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "error": null, + "label": "VideoAnalyzerPreset_0", + "progress": 0, + "state": "Scheduled" + }, + "jobCorrelationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputStateChangeEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputStateChangeEvent.json new file mode 100644 index 0000000000000..264740d82c896 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobOutputStateChangeEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobOutputStateChange", + "eventTime": "2018-10-12T15:14:17.8962704Z", + "id": "8d0305c0-28c0-4cc9-b613-776e4dd31e9a", + "data": { + "previousState": "Scheduled", + "output": { + "@odata.type": "#Microsoft.Media.JobOutputAsset", + "assetName": "output-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "error": null, + "label": "VideoAnalyzerPreset_0", + "progress": 0, + "state": "Processing" + }, + "jobCorrelationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobProcessingEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobProcessingEvent.json new file mode 100644 index 0000000000000..e1c5a50ac9ecd --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobProcessingEvent.json @@ -0,0 +1,16 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobProcessing", + "eventTime": "2018-10-12T15:14:20.2412317Z", + "id": "72162c44-c7f4-437a-9592-48b83cec2d18", + "data": { + "previousState": "Scheduled", + "state": "Processing", + "correlationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobScheduledEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobScheduledEvent.json new file mode 100644 index 0000000000000..050b04291eb9f --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobScheduledEvent.json @@ -0,0 +1,16 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobScheduled", + "eventTime": "2018-10-12T15:14:11.3028183Z", + "id": "9b17dbf0-355d-4fb0-9a73-e76b150858c8", + "data": { + "previousState": "Queued", + "state": "Scheduled", + "correlationData": {} + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobStateChangeEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobStateChangeEvent.json new file mode 100644 index 0000000000000..2f20f846b1cd1 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaJobStateChangeEvent.json @@ -0,0 +1,16 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6901", + "eventType": "Microsoft.Media.JobStateChange", + "eventTime": "2018-10-12T15:14:20.2412317Z", + "id": "341520d0-dac0-4930-97dd-3085538c624f", + "data": { + "previousState": "Scheduled", + "state": "Processing", + "correlationData": {} + }, + "dataVersion": "2.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventConnectionRejectedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventConnectionRejectedEvent.json new file mode 100644 index 0000000000000..c39f6c741b147 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventConnectionRejectedEvent.json @@ -0,0 +1,18 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "liveEvent/liveevent-ec9d26a8", + "eventType": "Microsoft.Media.LiveEventConnectionRejected", + "eventTime": "2018-10-12T15:52:04.2013501Z", + "id": "3d1f5b26-c466-47e7-927b-900985e0c5d5", + "data": { + "ingestUrl": "rtmp://liveevent-ec9d26a8.channel.media.azure.net:1935/live/cb5540b10a5646218c1328be95050c59", + "streamId": "Mystream1", + "encoderIp": "", + "encoderPort": "3557", + "resultCode": "MPE_INGEST_CODEC_NOT_SUPPORTED" + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventEncoderConnectedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventEncoderConnectedEvent.json new file mode 100644 index 0000000000000..91c7191dc52d1 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventEncoderConnectedEvent.json @@ -0,0 +1,17 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "liveEvent/liveevent-ec9d26a8", + "eventType": "Microsoft.Media.LiveEventEncoderConnected", + "eventTime": "2018-10-12T15:52:04.2013501Z", + "id": "3d1f5b26-c466-47e7-927b-900985e0c5d5", + "data": { + "ingestUrl": "rtmp://liveevent-ec9d26a8.channel.media.azure.net:1935/live/cb5540b10a5646218c1328be95050c59", + "streamId": "Mystream1", + "encoderIp": "", + "encoderPort": "3557" + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventEncoderDisconnectedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventEncoderDisconnectedEvent.json new file mode 100644 index 0000000000000..a6c72eb0fac96 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventEncoderDisconnectedEvent.json @@ -0,0 +1,18 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "liveEvent/liveevent-ec9d26a8", + "eventType": "Microsoft.Media.LiveEventEncoderDisconnected", + "eventTime": "2018-10-12T15:52:19.8982128Z", + "id": "e4b55140-42d2-4c24-b08e-9aa12f1587fc", + "data": { + "ingestUrl": "rtmp://liveevent-ec9d26a8.channel.media.azure.net:1935/live/cb5540b10a5646218c1328be95050c59", + "streamId": "Mystream1", + "encoderIp": "", + "encoderPort": "3557", + "resultCode": "MPE_CLIENT_TERMINATED_SESSION" + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingDataChunkDroppedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingDataChunkDroppedEvent.json new file mode 100644 index 0000000000000..5d0365b78ce8a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingDataChunkDroppedEvent.json @@ -0,0 +1,19 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "liveEvent/liveevent-ec9d26a8", + "eventType": "Microsoft.Media.LiveEventIncomingDataChunkDropped", + "eventTime": "2018-10-12T15:52:37.3710102Z", + "id": "d84727e2-d9c0-4a21-a66b-8d23f06b3e06", + "data": { + "timestamp": "8999", + "trackType": "video", + "trackName": "video1", + "bitrate": 2500000, + "timescale": "1000", + "resultCode": "FragmentDrop_OverlapTimestamp" + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingStreamReceivedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingStreamReceivedEvent.json new file mode 100644 index 0000000000000..c4180d1363dbf --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingStreamReceivedEvent.json @@ -0,0 +1 @@ +[{ "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", "subject": "liveEvent/liveevent-ec9d26a8", "eventType": "Microsoft.Media.LiveEventIncomingStreamReceived", "eventTime": "2018-10-12T15:52:16.5726463Z", "id": "eb688fa1-5a19-4703-8aeb-6a65a09790da", "data": { "ingestUrl": "rtmp://liveevent-ec9d26a8.channel.media.azure.net:1935/live/cb5540b10a5646218c1328be95050c59", "trackType": "audio", "trackName": "audio_160000", "bitrate": 160000, "encoderIp": "", "encoderPort": "3557", "timestamp": "66", "duration": "1950", "timescale": "1000" }, "dataVersion": "1.0", "metadataVersion": "1"}] \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingStreamsOutOfSyncEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingStreamsOutOfSyncEvent.json new file mode 100644 index 0000000000000..119580b002036 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingStreamsOutOfSyncEvent.json @@ -0,0 +1,19 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "liveEvent/liveevent-ec9d26a8", + "eventType": "Microsoft.Media.LiveEventIncomingStreamsOutOfSync", + "eventTime": "2018-10-12T15:52:37.3710102Z", + "id": "d84727e2-d9c0-4a21-a66b-8d23f06b3e06", + "data": { + "minLastTimestamp": "10999", + "typeOfStreamWithMinLastTimestamp": "video", + "maxLastTimestamp": "100999", + "typeOfStreamWithMaxLastTimestamp": "audio", + "timescaleOfMinLastTimestamp": "1000", + "timescaleOfMaxLastTimestamp": "1000" + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingVideoStreamsOutOfSyncEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingVideoStreamsOutOfSyncEvent.json new file mode 100644 index 0000000000000..3516a835de7e8 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIncomingVideoStreamsOutOfSyncEvent.json @@ -0,0 +1,18 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "liveEvent/liveevent-ec9d26a8", + "eventType": "Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync", + "eventTime": "2018-10-12T15:52:37.3710102Z", + "id": "d84727e2-d9c0-4a21-a66b-8d23f06b3e06", + "data": { + "firstTimestamp": "10999", + "firstDuration": "2000", + "secondTimestamp": "100999", + "secondDuration": "2000", + "timescale": "1000" + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIngestHeartbeatEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIngestHeartbeatEvent.json new file mode 100644 index 0000000000000..6e54e8b04ff17 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventIngestHeartbeatEvent.json @@ -0,0 +1,25 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "liveEvent/liveevent-ec9d26a8", + "eventType": "Microsoft.Media.LiveEventIngestHeartbeat", + "eventTime": "2018-10-12T15:52:37.3710102Z", + "id": "d84727e2-d9c0-4a21-a66b-8d23f06b3e06", + "data": { + "trackType": "video", + "trackName": "video", + "bitrate": 2500000, + "incomingBitrate": 500726, + "lastTimestamp": "11999", + "timescale": "1000", + "overlapCount": 0, + "discontinuityCount": 0, + "nonincreasingCount": 0, + "unexpectedBitrate": true, + "state": "Running", + "healthy": false + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventTrackDiscontinuityDetectedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventTrackDiscontinuityDetectedEvent.json new file mode 100644 index 0000000000000..e48185fe87b91 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaLiveEventTrackDiscontinuityDetectedEvent.json @@ -0,0 +1,20 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}", + "subject": "liveEvent/liveevent-ec9d26a8", + "eventType": "Microsoft.Media.LiveEventTrackDiscontinuityDetected", + "eventTime": "2018-10-12T15:52:37.3710102Z", + "id": "d84727e2-d9c0-4a21-a66b-8d23f06b3e06", + "data": { + "trackType": "video", + "trackName": "video", + "bitrate": 2500000, + "previousTimestamp": "10999", + "newTimestamp": "14999", + "timescale": "1000", + "discontinuityGap": 4000 + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaServicesJobStateChangedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaServicesJobStateChangedEvent.json new file mode 100644 index 0000000000000..8e0611788e058 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MediaServicesJobStateChangedEvent.json @@ -0,0 +1,15 @@ +[ + { + "topic": "/subscriptions/{subscription id}/resourceGroups/amsResourceGroup/providers/Microsoft.Media/mediaservices/amsaccount", + "subject": "transforms/VideoAnalyzerTransform/jobs/{job id}", + "eventType": "Microsoft.Media.JobStateChange", + "eventTime": "2018-04-20T21:26:13.8978772", + "id": "", + "data": { + "previousState": "Processing", + "state": "Finished" + }, + "dataVersion": "1.0", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MultipleEventsInSameBatch.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MultipleEventsInSameBatch.json new file mode 100644 index 0000000000000..536bd2e57a9b6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/MultipleEventsInSameBatch.json @@ -0,0 +1,79 @@ +[ + { + "topic": "/subscriptions/319a9601-1ec0-0000-aebc-8fe82724c81e/resourceGroups/testrg/providers/Microsoft.Storage/storageAccounts/myaccount", + "subject": "/blobServices/default/containers/testcontainer/blobs/file1.txt", + "eventType": "Microsoft.Storage.BlobCreated", + "eventTime": "2017-08-16T01:57:26.005121Z", + "id": "602a88ef-0001-00e6-1233-1646070610ea", + "data": { + "api": "PutBlockList", + "clientRequestId": "799304a4-bbc5-45b6-9849-ec2c66be800a", + "requestId": "602a88ef-0001-00e6-1233-164607000000", + "eTag": "0x8D4E44A24ABE7F1", + "contentType": "text/plain", + "contentLength": 447, + "blobType": "BlockBlob", + "url": "https://myaccount.blob.core.windows.net/testcontainer/file1.txt", + "sequencer": "00000000000000EB000000000000C65A" + }, + "dataVersion": "", + "metadataVersion": "1" + }, + { + "topic": "/subscriptions/id/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/xstoretestaccount", + "subject": "/blobServices/default/containers/testcontainer/blobs/testfile.txt", + "eventType": "Microsoft.Storage.BlobDeleted", + "eventTime": "2017-11-07T20:09:22.5674003Z", + "id": "4c2359fe-001e-00ba-0e04-58586806d298", + "data": { + "api": "DeleteBlob", + "requestId": "4c2359fe-001e-00ba-0e04-585868000000", + "contentType": "text/plain", + "blobType": "BlockBlob", + "url": "https://example.blob.core.windows.net/testcontainer/testfile.txt", + "sequencer": "0000000000000281000000000002F5CA", + "storageDiagnostics": { + "batchId": "b68529f3-68cd-4744-baa4-3c0498ec19f0" + } + }, + "dataVersion": "", + "metadataVersion": "1" + }, + { + "topic": "/subscriptions/id/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/xstoretestaccount", + "subject": "/blobServices/default/containers/testcontainer/blobs/testfile.txt", + "eventType": "Microsoft.Storage.BlobDeleted", + "eventTime": "2017-11-07T20:09:22.5674003Z", + "id": "4c2359fe-001e-00ba-0e04-58586806d298", + "data": { + "api": "DeleteBlob", + "requestId": "4c2359fe-001e-00ba-0e04-585868000000", + "contentType": "text/plain", + "blobType": "BlockBlob", + "url": "https://example.blob.core.windows.net/testcontainer/testfile.txt", + "sequencer": "0000000000000281000000000002F5CA", + "storageDiagnostics": { + "batchId": "b68529f3-68cd-4744-baa4-3c0498ec19f0" + } + }, + "dataVersion": "", + "metadataVersion": "1" + }, + { + "topic": "/subscriptions/id/resourcegroups/rg/providers/Microsoft.ServiceBus/namespaces/testns1", + "subject": "topics/topic1/subscriptions/sub1", + "eventType": "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener", + "eventTime": "2018-02-14T05:12:53.4133526Z", + "id": "dede87b0-3656-419c-acaf-70c95ddc60f5", + "data": { + "namespaceName": "testns1", + "requestUri": "https://testns1.servicebus.windows.net/t1/subscriptions/sub1/messages/head", + "entityType": "subscriber", + "queueName": "queue1", + "topicName": "topic1", + "subscriptionName": "sub1" + }, + "dataVersion": "1", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionCancelEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionCancelEvent.json new file mode 100644 index 0000000000000..48c4f902a9bcf --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionCancelEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceActionCancel", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionFailureEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionFailureEvent.json new file mode 100644 index 0000000000000..1b7bd2d75f513 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionFailureEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceActionFailure", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionSuccessEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionSuccessEvent.json new file mode 100644 index 0000000000000..ff88ad7960e15 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceActionSuccessEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceActionSuccess", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteCancelEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteCancelEvent.json new file mode 100644 index 0000000000000..90d898be4f84a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteCancelEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceDeleteCancel", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteFailureEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteFailureEvent.json new file mode 100644 index 0000000000000..6e9f91e58bb9c --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteFailureEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceDeleteFailure", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteSuccessEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteSuccessEvent.json new file mode 100644 index 0000000000000..068c14c4d4abd --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceDeleteSuccessEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceDeleteSuccess", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteCancelEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteCancelEvent.json new file mode 100644 index 0000000000000..6d383f41a1915 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteCancelEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceWriteCancel", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteFailureEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteFailureEvent.json new file mode 100644 index 0000000000000..c8912cc97f0b6 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteFailureEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceWriteFailure", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteSuccessEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteSuccessEvent.json new file mode 100644 index 0000000000000..e4dee418fea57 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ResourceWriteSuccessEvent.json @@ -0,0 +1,23 @@ +[ + { + "topic": "/subscriptions/{subscription-id}", + "subject": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "eventType": "Microsoft.Resources.ResourceWriteSuccess", + "eventTime": "2017-08-16T03:54:38.2696833Z", + "id": "25b3b0d0-d79b-44d5-9963-440d4e6a9bba", + "data": { + "authorization": "{azure_resource_manager_authorizations}", + "claims": "{azure_resource_manager_claims}", + "correlationId": "54ef1e39-6a82-44b3-abc1-bdeb6ce4d3c6", + "httpRequest": "{request-operation}", + "resourceProvider": "Microsoft.EventGrid", + "resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/eventSubscriptions/LogicAppdd584bdf-8347-49c9-b9a9-d1f980783501", + "operationName": "Microsoft.EventGrid/eventSubscriptions/write", + "status": "Succeeded", + "subscriptionId": "{subscription-id}", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ServiceBusActiveMessagesAvailableWithNoListenersEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ServiceBusActiveMessagesAvailableWithNoListenersEvent.json new file mode 100644 index 0000000000000..af12bc4404e3a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ServiceBusActiveMessagesAvailableWithNoListenersEvent.json @@ -0,0 +1,19 @@ +[ + { + "topic": "/subscriptions/id/resourcegroups/rg/providers/Microsoft.ServiceBus/namespaces/testns1", + "subject": "topics/topic1/subscriptions/sub1", + "eventType": "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners", + "eventTime": "2018-02-14T05:12:53.4133526Z", + "id": "dede87b0-3656-419c-acaf-70c95ddc60f5", + "data": { + "namespaceName": "testns1", + "requestUri": "https: //testns1.servicebus.windows.net/t1/subscriptions/sub1/messages/head", + "entityType": "subscriber", + "queueName": "queue1", + "topicName": "topic1", + "subscriptionName": "sub1" + }, + "dataVersion": "1", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ServiceBusDeadletterMessagesAvailableWithNoListenersEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ServiceBusDeadletterMessagesAvailableWithNoListenersEvent.json new file mode 100644 index 0000000000000..a85f575cdf618 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/ServiceBusDeadletterMessagesAvailableWithNoListenersEvent.json @@ -0,0 +1,19 @@ +[ + { + "topic": "/subscriptions/id/resourcegroups/rg/providers/Microsoft.ServiceBus/namespaces/testns1", + "subject": "topics/topic1/subscriptions/sub1", + "eventType": "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener", + "eventTime": "2018-02-14T05:12:53.4133526Z", + "id": "dede87b0-3656-419c-acaf-70c95ddc60f5", + "data": { + "namespaceName": "testns1", + "requestUri": "https://testns1.servicebus.windows.net/t1/subscriptions/sub1/messages/head", + "entityType": "subscriber", + "queueName": "queue1", + "topicName": "topic1", + "subscriptionName": "sub1" + }, + "dataVersion": "1", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobCreatedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobCreatedEvent.json new file mode 100644 index 0000000000000..f051ee38c58d1 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobCreatedEvent.json @@ -0,0 +1,22 @@ +[ + { + "topic": "/subscriptions/319a9601-1ec0-0000-aebc-8fe82724c81e/resourceGroups/testrg/providers/Microsoft.Storage/storageAccounts/myaccount", + "subject": "/blobServices/default/containers/testcontainer/blobs/file1.txt", + "eventType": "Microsoft.Storage.BlobCreated", + "eventTime": "2017-08-16T01:57:26.005121Z", + "id": "602a88ef-0001-00e6-1233-1646070610ea", + "data": { + "api": "PutBlockList", + "clientRequestId": "799304a4-bbc5-45b6-9849-ec2c66be800a", + "requestId": "602a88ef-0001-00e6-1233-164607000000", + "eTag": "0x8D4E44A24ABE7F1", + "contentType": "text/plain", + "contentLength": 447, + "blobType": "BlockBlob", + "url": "https://myaccount.blob.core.windows.net/testcontainer/file1.txt", + "sequencer": "00000000000000EB000000000000C65A" + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobDeletedEvent.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobDeletedEvent.json new file mode 100644 index 0000000000000..d163e0931bbba --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobDeletedEvent.json @@ -0,0 +1,22 @@ +[ + { + "topic": "/subscriptions/id/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/xstoretestaccount", + "subject": "/blobServices/default/containers/testcontainer/blobs/testfile.txt", + "eventType": "Microsoft.Storage.BlobDeleted", + "eventTime": "2017-11-07T20:09:22.5674003Z", + "id": "4c2359fe-001e-00ba-0e04-58586806d298", + "data": { + "api": "DeleteBlob", + "requestId": "4c2359fe-001e-00ba-0e04-585868000000", + "contentType": "text/plain", + "blobType": "BlockBlob", + "url": "https://example.blob.core.windows.net/testcontainer/testfile.txt", + "sequencer": "0000000000000281000000000002F5CA", + "storageDiagnostics": { + "batchId": "b68529f3-68cd-4744-baa4-3c0498ec19f0" + } + }, + "dataVersion": "", + "metadataVersion": "1" + } +] diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobDeletedEventWithExtraProperty.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobDeletedEventWithExtraProperty.json new file mode 100644 index 0000000000000..3758afecd568a --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/customization/StorageBlobDeletedEventWithExtraProperty.json @@ -0,0 +1,24 @@ +[ + { + "topic": "/subscriptions/id/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/xstoretestaccount", + "subject": "/blobServices/default/containers/testcontainer/blobs/testfile.txt", + "eventType": "Microsoft.Storage.BlobDeleted", + "eventTime": "2017-11-07T20:09:22.5674003Z", + "id": "4c2359fe-001e-00ba-0e04-58586806d298", + "data": { + "api": "DeleteBlob", + "requestId": "4c2359fe-001e-00ba-0e04-585868000000", + "contentType": "text/plain", + "blobType": "BlockBlob", + "url": "https://example.blob.core.windows.net/testcontainer/testfile.txt", + "sequencer": "0000000000000281000000000002F5CA", + "brandNewProperty": "0000000000000281000000000002F5CA", + "storageDiagnostics": { + "batchId": "b68529f3-68cd-4744-baa4-3c0498ec19f0" + } + }, + "dataVersion": "", + "metadataVersion": "1" + } +] + diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEvents.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEvents.json new file mode 100644 index 0000000000000..5cac968c57009 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEvents.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (1.8.0_252; Windows 10; 10.0)", + "x-ms-client-request-id" : "d33fe779-c1eb-426f-aa96-4f052036bdb7", + "Content-Type" : "application/cloudevents-batch+json; charset=utf-8" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ffe28d08-d2b6-45b1-94e3-8a45f8fbed54", + "Date" : "Tue, 11 Aug 2020 17:21:10 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsCustomSerializer.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsCustomSerializer.json new file mode 100644 index 0000000000000..810d2e5df84a0 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsCustomSerializer.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (1.8.0_252; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6669339-b393-463b-ac0f-99ce6b45da46", + "Content-Type" : "application/cloudevents-batch+json; charset=utf-8" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "75bd8425-5c77-4499-9af0-0aa835357284", + "Date" : "Tue, 11 Aug 2020 17:19:22 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsSync.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsSync.json new file mode 100644 index 0000000000000..8dd0e697e21ba --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCloudEventsSync.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (1.8.0_252; Windows 10; 10.0)", + "x-ms-client-request-id" : "03ef7d02-18af-425a-9daa-d0075f8a4b43", + "Content-Type" : "application/cloudevents-batch+json; charset=utf-8" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "baa0bc8e-ed85-4ade-ba43-157d7ff76e75", + "Date" : "Tue, 11 Aug 2020 17:41:21 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEvents.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEvents.json new file mode 100644 index 0000000000000..8f944e6ec944c --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEvents.json @@ -0,0 +1,24 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (1.8.0_252; Windows 10; 10.0)", + "x-ms-client-request-id" : "f68db376-0cea-4f04-a27e-f427720546e6", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "Connection" : "close", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "37152ed5-e2ff-4c09-b68a-97988fa484e5", + "Date" : "Tue, 11 Aug 2020 17:19:17 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEventsSync.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEventsSync.json new file mode 100644 index 0000000000000..411f53d47ca6e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishCustomEventsSync.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (1.8.0_252; Windows 10; 10.0)", + "x-ms-client-request-id" : "efa97ec4-6df5-4ca0-99cc-55ddb6a0e18c", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d1c7c818-61e5-4b41-b457-bf52d4346a91", + "Date" : "Tue, 11 Aug 2020 17:41:22 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEvents.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEvents.json new file mode 100644 index 0000000000000..ae3b627b500da --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEvents.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (1.8.0_252; Windows 10; 10.0)", + "x-ms-client-request-id" : "c187684a-ab9a-48d1-ab27-a98dc27a5bae", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5958205a-1ba9-47af-a436-3894de2de98f", + "Date" : "Tue, 11 Aug 2020 17:19:22 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEventsSync.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEventsSync.json new file mode 100644 index 0000000000000..5c85e18996057 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishEventGridEventsSync.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (1.8.0_252; Windows 10; 10.0)", + "x-ms-client-request-id" : "34f4e8c8-8147-472c-afda-ddef9aabb8a7", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d9ba16b2-cf9d-40a4-ade9-832a054682d0", + "Date" : "Tue, 11 Aug 2020 17:19:21 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishWithSasToken.json b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishWithSasToken.json new file mode 100644 index 0000000000000..66bb7f72f1195 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/test/resources/session-records/publishWithSasToken.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.eastus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (1.8.0_252; Windows 10; 10.0)", + "x-ms-client-request-id" : "fbd37dc2-3fcf-4db1-a73d-13ee2b2bcd33", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Server" : "Microsoft-HTTPAPI/2.0", + "api-supported-versions" : "2018-01-01", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "62862a5c-ad95-45ed-b0b2-ee9cae2625ad", + "Date" : "Tue, 11 Aug 2020 17:41:21 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md index e303a67cb0ea6..615ee14548251 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md +++ b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md @@ -26,7 +26,9 @@ in this folder, with the following tags: `--api-spec-location=` If you are adding or updating swagger files, please make sure that they are included -in the input file list. +in the input file list. Also, if you are adding an additional service event, make sure that +its `eventType` string is added as a constant and a mapping to the event data model in the +`SystemEventMappings` file. ``` yaml $(java) title: EventGridPublisherClient @@ -34,7 +36,7 @@ description: EventGrid Publisher Client openapi-type: data-plane output-folder: ../ namespace: com.azure.messaging.eventgrid -license-header: MICROSOFT_MIT_NO_CODEGEN +license-header: MICROSOFT_MIT_SMALL generate-client-as-impl: true context-client-method-parameter: true models-subpackage: systemevents @@ -57,6 +59,3 @@ input-file: - $(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 ``` - - - From 3e7eb21032b827ebd77fd016719b6c5ad749f600 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Fri, 4 Sep 2020 18:51:13 -0700 Subject: [PATCH 111/168] Initial KeyVaultBackupClient for Java (#12671) * Created azure-security-keyvault-administration module including its POM, README and CHANGELOG files. * Created AutoRest README and generated artifacts. * Added sync methods * Modified the AutoRest specification to generate async methods only. Renamed the generated AccessControl client and builder. * Created the AccessControl builder and clients (sync + async), public API for getting Role Definitions and some helper classes and resources. * Regenerated classes with AutoRest v4 instead of v3. * Added the 'KeyVault' prefix to all access control clients, implementation classes and their builders. * Added an API for listing role definitions. * Added APIs for creating, getting, deleting and listing role assignments. * Polished README. * Added the an entry for Key Vault Administration in version_client.txt * Renamed to not break the CI build. * Fixed copy/paste error on autorest.md * Changed README references (keys -> administration). * Addressed PR comments. Added a new ExpandableStringEnum: RoleScope. Corrected some of the Javadoc. * Removed AccessControl classes. Used AutoRest to generate code from the backuprestore swagger. Modified README.md, CHANGELOG.md and autorest.md. * Created the async and syncs backup clients, as well as their builder. * Made small corrections. * Made slight corrections. * Added the new Key Vault Administration library to eng/jacoco-test-coverage/pom.xml * Re-generated code from the Swagger specification. * Renamed LROs to use "begin" instead of "start". Added a way to handle errors when polling LROs. * Created custom models to expose to users instead of the ones in implementation.models * Added package-info.java and module-info.java * Made some small corrections. * Removed and added a couple entries to module-info.java. Moved KeyVaultLongRunningOperation to administration.models * Changed version of the Key Vault Administration package. * Corrected errors highlighted by APIView. * Removed implementation classes from public API signatures and documentation. Added KeyVaultException to take the place of KeyVaultErrorException in the Javadoc of public APIs. * Removed KeyVaultException. * Fixed Javadoc. * Updated module-info.java * Corrected version number in files inside /eng. Fixed package-info.java Javadoc. Updated dependency versions in azure-security-keyvault-administration's POM. * Fixed Javadoc formatting for public APIs. Fixed build analysis issues with the module's POM. Made utility methods in KeyVaultBackupAsyncClient static and ensured we correctly parse long running operation statuses. * Updated Reactor version. * Changed the final result return type of the `beginBackup` operation from `Void` to `String` so it returns the blob storage URI of the resulting backup. Improved logging for LROs. * Added samples to README. Fixed Build analysis issue related to README. * Fixed broken links in autorest.md * Made fixes for test cases. * Updated azure-core versions. * Corrected typos in README. Fixed a couple bugs discovered by live testing. --- .../CHANGELOG.md | 3 +- .../README.md | 182 ++++++- .../KeyVaultBackupAsyncClient.java | 494 ++++++++++++++++++ .../administration/KeyVaultBackupClient.java | 84 +++ .../KeyVaultBackupClientBuilder.java | 287 ++++++++++ .../KeyVaultBackupClientImpl.java | 262 ++++++++++ .../KeyVaultBackupClientImplBuilder.java | 69 +++ .../models/FullBackupHeaders.java | 64 +++ .../models/FullBackupOperation.java | 196 +++++++ .../models/FullBackupResponse.java | 36 ++ .../models/FullRestoreOperationHeaders.java | 64 +++ .../models/FullRestoreOperationResponse.java | 36 ++ .../models/RestoreOperation.java | 168 ++++++ .../models/RestoreOperationParameters.java | 67 +++ .../models/SASTokenParameter.java | 64 +++ .../models/SelectiveKeyRestoreOperation.java | 168 ++++++ .../SelectiveKeyRestoreOperationHeaders.java | 64 +++ ...electiveKeyRestoreOperationParameters.java | 65 +++ .../SelectiveKeyRestoreOperationResponse.java | 37 ++ .../implementation/models/package-info.java | 4 +- .../implementation/package-info.java | 4 +- .../models/KeyVaultBackupOperation.java | 36 ++ .../administration/models/KeyVaultError.java | 53 ++ .../models/KeyVaultLongRunningOperation.java | 89 ++++ .../models/KeyVaultRestoreOperation.java | 23 + .../administration/models/package-info.java | 7 +- .../keyvault/administration/package-info.java | 7 +- .../swagger/autorest.md | 19 +- 28 files changed, 2624 insertions(+), 28 deletions(-) create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClient.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultBackupClientImpl.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultBackupClientImplBuilder.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupHeaders.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupOperation.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupResponse.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullRestoreOperationHeaders.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullRestoreOperationResponse.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RestoreOperation.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RestoreOperationParameters.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SASTokenParameter.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperation.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationHeaders.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationParameters.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationResponse.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultBackupOperation.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultError.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultLongRunningOperation.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRestoreOperation.java diff --git a/sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md index 6844fbdfbbd07..3f320e566e07b 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md @@ -1,3 +1,4 @@ # Release History ## 4.0.0-beta.1 (Unreleased) -- Added `KeyVaultAccessControlClient`. +- Added `KeyVaultBackupClient` and `KeyVaultBackupAsyncClient`. +- Added `KeyVaultAccessControlClient` and `KeyVaultAccessControlAsyncClient`. diff --git a/sdk/keyvault/azure-security-keyvault-administration/README.md b/sdk/keyvault/azure-security-keyvault-administration/README.md index ad6226a67d83d..4dd085455adfd 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/README.md +++ b/sdk/keyvault/azure-security-keyvault-administration/README.md @@ -24,7 +24,7 @@ Maven dependency for the Azure Key Vault Administration library. Add it to your ``` ### Authenticate the client -In order to interact with the Azure Key Vault service, you'll need to create an instance of the [KeyVaultAccessControlClient](#create-access-control-client) class. You would need a **vault url** and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object using the default `DefaultAzureCredential` examples shown in this document. +In order to interact with the Azure Key Vault service, you'll need to either create an instance of the [KeyVaultAccessControlClient](#create-access-control-client) or an instance of the class [KeyVaultBackupClient](#create-backup-client). You would need a **vault url** and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object using the default `DefaultAzureCredential` examples shown in this document. The `DefaultAzureCredential` way of authentication by providing client secret credentials is being used in this getting started section but you can find more ways to authenticate with [azure-identity][azure_identity]. @@ -75,7 +75,30 @@ Here is an [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to az keyvault show --name ``` -#### Create Access Control client +## Key concepts +### Key Vault Access Control client: +The Key Vault Access Control client performs the interactions with the Azure Key Vault service for getting, setting, deleting, and listing role assignments, as well as listing role definitions. Asynchronous (KeyVaultAccessControlAsyncClient) and synchronous (KeyVaultAccessControlClient) clients exist in the SDK allowing for the selection of a client based on an application's use case. Once you've initialized a role assignment, you can interact with the primary resource types in Key Vault. + +### Role Definition +A role definition is a collection of permissions. It defines the operations that can be performed, such as read, write, and delete. It can also define the operations that are excluded from allowed operations. + +Role definitions can be listed and specified as part of a role assignment. + +### Role Assignment +A role assignment is the association of a role definition to a service principal. They can be created, listed, fetched individually, and deleted. + +### Key Vault Backup client +The Key Vault Backup Client provides both synchronous and asynchronous operations for performing full key backups, full key restores, and selective key restores. Asynchronous (KeyVaultBackupAsyncClient) and synchronous (KeyVaultBackupClient) clients exist in the SDK allowing for the selection of a client based on an application's use case. + +> NOTE: The backing store for key backups is a blob storage container using Shared Access Signature authentication. For more details on creating a SAS token using the BlobServiceClient, see the [Azure Storage Blobs client README][storage_readme_sas_token]. Alternatively, it is possible to [generate a SAS token in Storage Explorer][portal_sas_token]. + +### Backup Operation +A backup operation represents a long running operation for a full key backup. + +### Restore Operation +A restore operation represents a long running operation for both a full key and selective key restore. + +## Create an Access Control client Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET**, and **AZURE_TENANT_ID** environment variables and replaced **your-key-vault-url** with the URI returned above, you can create the KeyVaultAccessControlClient: ```Java @@ -91,18 +114,6 @@ KeyVaultAccessControlClient accessControlClient = new KeyVaultAccessControlClien > NOTE: For using an asynchronous client use KeyVaultAccessControlAsyncClient instead of KeyVaultAccessControlClient and call `buildAsyncClient()` -## Key concepts -### Role Definition -A role definition is a collection of permissions. It defines the operations that can be performed, such as read, write, and delete. It can also define the operations that are excluded from allowed operations. - -Role definitions can be listed and specified as part of a role assignment. - -### Role Assignment -A role assignment is the association of a role definition to a service principal. They can be created, listed, fetched individually, and deleted. - -### Key Vault Access Control client: -The Key Vault Access Control client performs the interactions with the Azure Key Vault service for getting, setting, deleting, and listing role assignments, as well as listing role definitions. Asynchronous (KeyVaultAccessControlAsyncClient) and synchronous (KeyVaultAccessControlClient) clients exist in the SDK allowing for the selection of a client based on an application's use case. Once you've initialized a role assignment, you can interact with the primary resource types in Key Vault. - ## Examples ### Sync API The following sections provide several code snippets covering some of the most common Azure Key Vault Access Control service tasks, including: @@ -258,13 +269,150 @@ accessControlAsyncClient.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL deletedAssignment.getType())); ``` +### Create a Backup client +Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET**, and **AZURE_TENANT_ID** environment variables and replaced **your-key-vault-url** with the URI returned above, you can create the KeyVaultBackupClient: + +```Java +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.security.keyvault.administration.KeyVaultBackupClient; +import com.azure.security.keyvault.administration.KeyVaultBackupClientBuilder; + +KeyVaultBackupClient backupClient = new KeyVaultBackupClientBuilder() + .vaultUrl("") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); +``` + +> NOTE: For using an asynchronous client use KeyVaultBackupAsyncClient instead of KeyVaultBackupClient and call `buildAsyncClient()` + +## Examples +### Sync API +The following sections provide several code snippets covering some of the most common Azure Key Vault Backup client tasks, including: +- [Backup a Key Vault](#backup-a-key-vault) +- [Restore a Key Vault](#restore-a-collection-of-keys) +- [Restore a key](#selectively-restore-a-key) + +### Backup a collection of keys +Back up an entire collection of keys using `beginBackup`. + +```java +SyncPoller backupPoller = + backupClient.beginBackup("", ""); + +backupPoller.waitForCompletion(); + +System.out.printf("Backup created"); +``` + +### Restore a collection of keys +Restore an entire collection of keys from a backup using `beginRestore`. + +```java +SyncPoller", "", ""); + +restorePoller.waitForCompletion(); +String blobUri = restorePoller.getFinalResult(); + +System.out.printf("Backup restored from: %s%n", blobUri); +``` + +### Selectively restore a key +Restore a specific key from a backup using `beginSelectiveRestore`. + +```java +SyncPoller selectiveRestorePoller = + backupClient.beginSelectiveRestore("", "", "", + ""); + +selectiveRestorePoller.waitForCompletion(); +String blobUri = selectiveRestorePoller.getFinalResult(); + +System.out.printf("Key backup restored from: %s%n", blobUri); +``` + +### Async API +The following sections provide several code snippets covering some of the most common asynchronous Azure Key Vault Backup client tasks, including: +- [Backup a Key Vault asynchronously](#backup-a-key-vault-asynchronously) +- [Restore a Key Vault asynchronously](#restore-a-collection-of-keys-asynchronously) +- [Restore a key asynchronously](#selectively-restore-a-key-asynchronously) + +> Note : You should add `System.in.read()` or `Thread.sleep()` after the function calls in the main class/thread to allow async functions/operations to execute and finish before the main application/thread exits. + +### Backup a collection of keys asynchronously +Back up an entire collection of keys using `beginBackup`. + +```java +asyncClient.beginBackup(blobStorageUrl, sasToken) + .subscribe( + pollResponse -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println(pollResponse.getStatus()); + System.out.println(pollResponse.getValue().getStatus()); + System.out.println(pollResponse.getValue().getStatusDetails()); + + if (pollResponse.getStatus().isComplete()) { + pollResponse.getFinalResult().subscribe(result -> System.out.println("Backup location: " + result)); + } + }, errorResponse -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println("Error found: " + errorResponse.getMessage()); + errorResponse.printStackTrace(); + }, () -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println("Backup complete"); + }); +``` + +### Restore a collection of keys asynchronously +Restore an entire collection of keys from a backup using `beginRestore`. + +```java +backupAsyncClient.beginRestore("", "", "") + .subscribe( + pollResponse -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println(pollResponse.getStatus()); + System.out.println(pollResponse.getValue().getStatus()); + System.out.println(pollResponse.getValue().getStatusDetails()); + }, errorResponse -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println("Error found: " + errorResponse.getMessage()); + errorResponse.printStackTrace(); + }, () -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println("Restore operation complete"); + }); +``` + +### Selectively restore a key asynchronously +Restore an entire collection of keys from a backup using `beginSelectiveRestore`. + +```java +backupAsyncClient.beginSelectiveRestore("", "", "", + .subscribe( + pollResponse -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println(pollResponse.getStatus()); + System.out.println(pollResponse.getValue().getStatus()); + System.out.println(pollResponse.getValue().getStatusDetails()); + }, errorResponse -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println("Error found: " + errorResponse.getMessage()); + errorResponse.printStackTrace(); + }, () -> { + System.out.println("---------------------------------------------------------------------------------"); + System.out.println("Selective restore operation complete"); + }); +``` + ## Troubleshooting ### General Azure Key Vault Access Control clients raise exceptions. For example, if you try to retrieve a role assignment after it is deleted a `404` error is returned, indicating the resource was not found. In the following snippet, the error is handled gracefully by catching the exception and displaying additional information about the error. ```java try { - accessControlClient.getRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, "") + client.getRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, "") } catch (HttpResponseException e) { System.out.println(e.getMessage()); } @@ -279,7 +427,7 @@ All client libraries, by default, use the Tomcat-native Boring SSL library to en ## Next steps Several Key Vault Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Azure Key Vault. -### Additional documentation +### Additional documentation For more extensive documentation on Azure Key Vault, see the [API reference documentation][azkeyvault_rest]. ## Contributing @@ -303,6 +451,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope [azure_create_application_in_portal]: https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal [azure_keyvault_cli]: https://docs.microsoft.com/azure/key-vault/quick-create-cli [azure_keyvault_cli_full]: https://docs.microsoft.com/cli/azure/keyvault?view=azure-cli-latest +[storage_readme_sas_token]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/storage/azure-storage-blob#get-credentials +[portal_sas_token]: https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer [performance_tuning]: https://github.com/Azure/azure-sdk-for-java/wiki/Performance-Tuning ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fkeyvault%2Fazure-security-keyvault-administration%2FREADME.png) diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java new file mode 100644 index 0000000000000..345fe9dfa231b --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpPipeline; +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.logging.ClientLogger; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingContext; +import com.azure.security.keyvault.administration.implementation.KeyVaultBackupClientImpl; +import com.azure.security.keyvault.administration.implementation.KeyVaultBackupClientImplBuilder; +import com.azure.security.keyvault.administration.implementation.KeyVaultErrorCodeStrings; +import com.azure.security.keyvault.administration.implementation.models.Error; +import com.azure.security.keyvault.administration.implementation.models.*; +import com.azure.security.keyvault.administration.models.KeyVaultBackupOperation; +import com.azure.security.keyvault.administration.models.KeyVaultError; +import com.azure.security.keyvault.administration.models.KeyVaultLongRunningOperation; +import com.azure.security.keyvault.administration.models.KeyVaultRestoreOperation; +import reactor.core.publisher.Mono; + +import java.net.URL; +import java.time.Duration; +import java.util.Objects; +import java.util.function.Function; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.withContext; +import static com.azure.core.util.tracing.Tracer.AZ_TRACING_NAMESPACE_KEY; + +/** + * The {@link KeyVaultBackupAsyncClient} provides asynchronous methods to perform full backup and restore of an Azure + * Key Vault. + */ +@ServiceClient(builder = KeyVaultBackupClientBuilder.class, isAsync = true) +public final class KeyVaultBackupAsyncClient { + // Please see here + // for more information on Azure resource provider namespaces. + private static final String KEYVAULT_TRACING_NAMESPACE_VALUE = "Microsoft.KeyVault"; + + /** + * The logger to be used. + */ + private final ClientLogger logger = new ClientLogger(KeyVaultBackupAsyncClient.class); + + /** + * The underlying AutoRest client used to interact with the Key Vault service. + */ + private final KeyVaultBackupClientImpl clientImpl; + + /** + * The Kay Vault URL this client is associated to. + */ + private final String vaultUrl; + + /** + * Package private constructor to be used by {@link KeyVaultBackupClientBuilder}. + */ + KeyVaultBackupAsyncClient(URL vaultUrl, HttpPipeline httpPipeline) { + Objects.requireNonNull(vaultUrl, + KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED)); + + this.vaultUrl = vaultUrl.toString(); + + clientImpl = new KeyVaultBackupClientImplBuilder() + .pipeline(httpPipeline) + .buildClient(); + } + + /** + * Gets the URL for the Key Vault this client is associated with. + * + * @return The Key Vault URL. + */ + public String getVaultUrl() { + return this.vaultUrl; + } + + /** + * Initiates a full backup of the Key Vault. + * + * @param blobStorageUrl The URL for the Blob Storage resource where the backup will be located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @return A {@link PollerFlux} polling on the {@link KeyVaultBackupOperation backup operation} status. + * @throws NullPointerException if the {@code blobStorageUrl} or {@code sasToken} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux beginBackup(String blobStorageUrl, String sasToken) { + Objects.requireNonNull(blobStorageUrl, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'blobStorageUrl'")); + Objects.requireNonNull(sasToken, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'sasToken'")); + + return new PollerFlux<>(Duration.ofSeconds(1), + backupActivationOperation(blobStorageUrl, sasToken), + backupPollOperation(), + (pollingContext, firstResponse) -> Mono.error(new RuntimeException("Cancellation is not supported")), + backupFetchOperation()); + } + + /** + * Initiates a full backup of the Key Vault. + * + * @param blobStorageUrl The URL for the Blob Storage resource where the backup will be located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link PollerFlux} polling on the {@link KeyVaultBackupOperation backup operation} status. + * @throws KeyVaultErrorException if the operation is unsuccessful. + * @throws NullPointerException if the {@code blobStorageUrl} or {@code sasToken} are {@code null}. + */ + Mono> backupWithResponse(String blobStorageUrl, String sasToken, Context context) { + SASTokenParameter sasTokenParameter = new SASTokenParameter() + .setStorageResourceUri(blobStorageUrl) + .setToken(sasToken); + + return clientImpl.fullBackupWithResponseAsync(vaultUrl, sasTokenParameter, + context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Backing up at URL - {}", blobStorageUrl)) + .doOnSuccess(response -> logger.info("Backed up at URL - {}", + response.getValue().getAzureStorageBlobContainerUri())) + .doOnError(error -> logger.warning("Failed to backup at URL - {}", blobStorageUrl, error)) + .map(backupOperationResponse -> + new SimpleResponse<>(backupOperationResponse.getRequest(), backupOperationResponse.getStatusCode(), + backupOperationResponse.getHeaders(), + (KeyVaultBackupOperation) transformToLongRunningOperation(backupOperationResponse.getValue()))); + } + + private Function, Mono> backupActivationOperation(String blobStorageUrl, String sasToken) { + return (pollingContext) -> { + try { + return withContext(context -> backupWithResponse(blobStorageUrl, sasToken, context)) + .flatMap(backupResponse -> Mono.just(backupResponse.getValue())); + } catch (RuntimeException e) { + return monoError(logger, e); + } + }; + } + + private Function, Mono>> backupPollOperation() { + return (pollingContext) -> { + try { + PollResponse pollResponse = pollingContext.getLatestResponse(); + + if (pollResponse.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED + || pollResponse.getStatus() == LongRunningOperationStatus.FAILED) { + return Mono.just(pollResponse); + } + + final KeyVaultBackupOperation keyVaultBackupOperation = pollResponse.getValue(); + + if (keyVaultBackupOperation == null) { + logger.warning("Backup operation does not exist. Activation operation failed."); + + return Mono.just(new PollResponse( + LongRunningOperationStatus.fromString("BACKUP_START_FAILED", true), null)); + } + + final String jobId = keyVaultBackupOperation.getJobId(); + + return withContext(context -> clientImpl.fullBackupStatusWithResponseAsync(vaultUrl, jobId, + context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE))) + .map(response -> + new SimpleResponse<>(response, + (KeyVaultBackupOperation) transformToLongRunningOperation(response.getValue()))) + .flatMap(KeyVaultBackupAsyncClient::processBackupOperationResponse); + } catch (HttpResponseException e) { + //noinspection ThrowableNotThrown + logger.logExceptionAsError(e); + + return Mono.just(new PollResponse<>(LongRunningOperationStatus.FAILED, null)); + } + }; + } + + private Function, Mono> backupFetchOperation() { + return (pollingContext) -> { + String blobContainerUri = + pollingContext.getLatestResponse().getValue().getAzureStorageBlobContainerUri(); + + if (blobContainerUri == null) { + return Mono.empty(); + } else { + return Mono.just(blobContainerUri); + } + }; + } + + private static Mono> processBackupOperationResponse(Response response) { + String operationStatus = response.getValue().getStatus().toLowerCase(); + + return Mono.just( + new PollResponse<>(toLongRunningOperationStatus(operationStatus.toLowerCase()), response.getValue())); + } + + private static LongRunningOperationStatus toLongRunningOperationStatus(String operationStatus) { + switch (operationStatus) { + case "inprogress": + return LongRunningOperationStatus.IN_PROGRESS; + case "succeeded": + return LongRunningOperationStatus.SUCCESSFULLY_COMPLETED; + case "failed": + return LongRunningOperationStatus.FAILED; + default: + // Should not reach here + return LongRunningOperationStatus.fromString("POLLING_FAILED", true); + } + } + + /** + * Initiates a full restore of the Key Vault. + * + * @param blobStorageUrl The URL for the Blob Storage resource where the backup is located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @param folderName The name of the folder containing the backup data to restore. + * @return A {@link PollerFlux} polling on the {@link KeyVaultRestoreOperation backup operation} status. + * @throws NullPointerException if the {@code blobStorageUrl}, {@code sasToken} or {@code folderName} are {@code + * null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux beginRestore(String blobStorageUrl, String sasToken, String folderName) { + Objects.requireNonNull(blobStorageUrl, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'blobStorageUrl'")); + Objects.requireNonNull(sasToken, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'sasToken'")); + Objects.requireNonNull(folderName, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'folderName'")); + + + return new PollerFlux<>(Duration.ofSeconds(1), + restoreActivationOperation(blobStorageUrl, sasToken, folderName), + restorePollOperation(), + (pollingContext, firstResponse) -> Mono.empty(), + (pollingContext) -> Mono.empty()); + } + + /** + * Initiates a full restore of the Key Vault. + * + * @param blobStorageUrl The URL for the Blob Storage resource where the backup is located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @param folderName The name of the folder containing the backup data to restore. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link PollerFlux} polling on the {@link KeyVaultRestoreOperation backup operation} status. + * @throws KeyVaultErrorException if the operation is unsuccessful. + * @throws NullPointerException if the {@code blobStorageUrl} or {@code sasToken} are {@code null}. + */ + Mono> restoreWithResponse(String blobStorageUrl, String sasToken, String folderName, Context context) { + SASTokenParameter sasTokenParameter = new SASTokenParameter() + .setStorageResourceUri(blobStorageUrl) + .setToken(sasToken); + + RestoreOperationParameters restoreOperationParameters = new RestoreOperationParameters() + .setSasTokenParameters(sasTokenParameter) + .setFolderToRestore(folderName); + + return clientImpl.fullRestoreOperationWithResponseAsync(vaultUrl, restoreOperationParameters, + context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> logger.info("Restoring from location - {}\\{}", blobStorageUrl, folderName)) + .doOnSuccess(response -> logger.info("Restored from location - {}\\{}", blobStorageUrl, folderName)) + .doOnError(error -> + logger.warning("Failed to restore at location - {}\\{}", blobStorageUrl, folderName, error)) + .map(restoreOperationResponse -> + new SimpleResponse<>(restoreOperationResponse.getRequest(), restoreOperationResponse.getStatusCode(), + restoreOperationResponse.getHeaders(), + (KeyVaultRestoreOperation) transformToLongRunningOperation(restoreOperationResponse.getValue()))); + } + + private Function, Mono> restoreActivationOperation(String blobStorageUrl, String sasToken, String folderName) { + return (pollingContext) -> { + try { + return withContext(context -> restoreWithResponse(blobStorageUrl, sasToken, folderName, context)) + .flatMap(restoreResponse -> Mono.just(restoreResponse.getValue())); + } catch (RuntimeException e) { + return monoError(logger, e); + } + }; + } + + private Function, Mono>> restorePollOperation() { + return (pollingContext) -> { + try { + PollResponse pollResponse = pollingContext.getLatestResponse(); + + if (pollResponse.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED + || pollResponse.getStatus() == LongRunningOperationStatus.FAILED) { + + return Mono.just(pollResponse); + } + + final KeyVaultRestoreOperation keyVaultRestoreOperation = pollResponse.getValue(); + + if (keyVaultRestoreOperation == null) { + logger.warning("Restore operation does not exist. Activation operation failed."); + + return Mono.just(new PollResponse( + LongRunningOperationStatus.fromString("RESTORE_START_FAILED", true), null)); + } + + final String jobId = keyVaultRestoreOperation.getJobId(); + + return withContext(context -> clientImpl.restoreStatusWithResponseAsync(vaultUrl, jobId, + context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE))) + .map(response -> + new SimpleResponse<>(response, + (KeyVaultRestoreOperation) transformToLongRunningOperation(response.getValue()))) + .flatMap(KeyVaultBackupAsyncClient::processRestoreOperationResponse); + } catch (HttpResponseException e) { + //noinspection ThrowableNotThrown + logger.logExceptionAsError(e); + + return Mono.just(new PollResponse<>(LongRunningOperationStatus.FAILED, null)); + } + }; + } + + private static Mono> processRestoreOperationResponse(Response response) { + String operationStatus = response.getValue().getStatus().toLowerCase(); + + return Mono.just(new PollResponse<>( + toLongRunningOperationStatus(operationStatus.toLowerCase()), response.getValue())); + } + + /** + * Restores all versions of a given key using the supplied SAS token pointing to a previously stored Azure Blob + * storage backup folder. + * + * @param keyName The name of the key to be restored. + * @param blobStorageUrl The URL for the Blob Storage resource where the backup is located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @param folderName The name of the folder containing the backup data to restore. + * @return A {@link PollerFlux} polling on the {@link KeyVaultRestoreOperation backup operation} status. + * @throws NullPointerException if the {@code keyName}, {@code blobStorageUrl}, {@code sasToken} or {@code + * folderName} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux beginSelectiveRestore(String keyName, String blobStorageUrl, String sasToken, String folderName) { + Objects.requireNonNull(keyName, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'keyName'")); + Objects.requireNonNull(blobStorageUrl, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'blobStorageUrl'")); + Objects.requireNonNull(sasToken, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'sasToken'")); + Objects.requireNonNull(folderName, + String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED), + "'folderName'")); + + return new PollerFlux<>(Duration.ofSeconds(1), + selectiveRestoreActivationOperation(keyName, blobStorageUrl, sasToken, folderName), + selectiveRestorePollOperation(), + (pollingContext, firstResponse) -> Mono.empty(), + (pollingContext) -> Mono.empty()); + } + + /** + * Restores all versions of a given key using the supplied SAS token pointing to a previously stored Azure Blob + * storage backup folder. + * + * @param keyName The name of the key to be restored. + * @param blobStorageUrl The URL for the Blob Storage resource where the backup is located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @param folderName The name of the folder containing the backup data to restore. + * @param context Additional context that is passed through the HTTP pipeline during the service call. + * @return A {@link PollerFlux} polling on the {@link KeyVaultRestoreOperation backup operation} status. + * @throws KeyVaultErrorException if the operation is unsuccessful. + * @throws NullPointerException if the {@code blobStorageUrl} or {@code sasToken} are {@code null}. + */ + Mono> selectiveRestoreWithResponse(String keyName, String blobStorageUrl, String sasToken, String folderName, Context context) { + SASTokenParameter sasTokenParameter = new SASTokenParameter() + .setStorageResourceUri(blobStorageUrl) + .setToken(sasToken); + + SelectiveKeyRestoreOperationParameters selectiveKeyRestoreOperationParameters = + new SelectiveKeyRestoreOperationParameters() + .setSasTokenParameters(sasTokenParameter) + .setFolder(folderName); + + return clientImpl.selectiveKeyRestoreOperationWithResponseAsync(vaultUrl, keyName, + selectiveKeyRestoreOperationParameters, context.addData(AZ_TRACING_NAMESPACE_KEY, + KEYVAULT_TRACING_NAMESPACE_VALUE)) + .doOnRequest(ignored -> + logger.info("Restoring key \"{}\" from location - {}\\{}", keyName, blobStorageUrl, folderName)) + .doOnSuccess(response -> + logger.info("Restored key \"{}\" from location - {}\\{}", keyName, blobStorageUrl, folderName)) + .doOnError(error -> + logger.warning("Failed to restore key \"{}\" from location - {}\\{}", keyName, blobStorageUrl, + folderName, error)) + .map(restoreOperationResponse -> + new SimpleResponse<>(restoreOperationResponse.getRequest(), restoreOperationResponse.getStatusCode(), + restoreOperationResponse.getHeaders(), + (KeyVaultRestoreOperation) transformToLongRunningOperation(restoreOperationResponse.getValue()))); + } + + private Function, Mono> selectiveRestoreActivationOperation(String keyName, String blobStorageUrl, String sasToken, String folderName) { + return (pollingContext) -> { + try { + return withContext(context -> selectiveRestoreWithResponse(keyName, blobStorageUrl, sasToken, + folderName, context)) + .flatMap(selectiveKeyRestoreResponse -> Mono.just(selectiveKeyRestoreResponse.getValue())); + } catch (RuntimeException e) { + return monoError(logger, e); + } + }; + } + + private Function, Mono>> selectiveRestorePollOperation() { + return (pollingContext) -> { + try { + PollResponse pollResponse = pollingContext.getLatestResponse(); + + if (pollResponse.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED + || pollResponse.getStatus() == LongRunningOperationStatus.FAILED) { + + return Mono.just(pollResponse); + } + + final KeyVaultRestoreOperation keyVaultRestoreOperation = pollResponse.getValue(); + + if (keyVaultRestoreOperation == null) { + logger.warning("Restore operation does not exist. Activation operation failed."); + + return Mono.just(new PollResponse( + LongRunningOperationStatus.fromString("SELECTIVE_RESTORE_START_FAILED", true), null)); + } + + final String jobId = keyVaultRestoreOperation.getJobId(); + + return withContext(context -> clientImpl.restoreStatusWithResponseAsync(vaultUrl, jobId, + context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE))) + .map(response -> + new SimpleResponse<>(response, + (KeyVaultRestoreOperation) transformToLongRunningOperation(response.getValue()))) + .flatMap(KeyVaultBackupAsyncClient::processRestoreOperationResponse); + } catch (HttpResponseException e) { + //noinspection ThrowableNotThrown + logger.logExceptionAsError(e); + + return Mono.just(new PollResponse<>(LongRunningOperationStatus.FAILED, null)); + } + }; + } + + private static KeyVaultLongRunningOperation transformToLongRunningOperation(O operation) { + if (operation instanceof RestoreOperation) { + RestoreOperation restoreOperation = (RestoreOperation) operation; + + return new KeyVaultRestoreOperation(restoreOperation.getStatus(), + restoreOperation.getStatusDetails(), + createKeyVaultErrorFromError(restoreOperation.getError()), restoreOperation.getJobId(), + restoreOperation.getStartTime(), restoreOperation.getEndTime()); + } else if (operation instanceof SelectiveKeyRestoreOperation) { + SelectiveKeyRestoreOperation selectiveKeyRestoreOperation = (SelectiveKeyRestoreOperation) operation; + + return new KeyVaultRestoreOperation(selectiveKeyRestoreOperation.getStatus(), + selectiveKeyRestoreOperation.getStatusDetails(), + createKeyVaultErrorFromError(selectiveKeyRestoreOperation.getError()), + selectiveKeyRestoreOperation.getJobId(), selectiveKeyRestoreOperation.getStartTime(), + selectiveKeyRestoreOperation.getEndTime()); + } else if (operation instanceof FullBackupOperation) { + FullBackupOperation fullBackupOperation = (FullBackupOperation) operation; + + return new KeyVaultBackupOperation(fullBackupOperation.getStatus(), fullBackupOperation.getStatusDetails(), + createKeyVaultErrorFromError(fullBackupOperation.getError()), fullBackupOperation.getJobId(), + fullBackupOperation.getStartTime(), fullBackupOperation.getEndTime(), + fullBackupOperation.getAzureStorageBlobContainerUri()); + } else { + throw new IllegalArgumentException("Operation type not supported"); + } + } + + private static KeyVaultError createKeyVaultErrorFromError(Error error) { + if (error == null) { + return null; + } + + return + new KeyVaultError(error.getCode(), error.getMessage(), createKeyVaultErrorFromError(error.getInnerError())); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClient.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClient.java new file mode 100644 index 0000000000000..56dfa801b7d8e --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClient.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.security.keyvault.administration.models.KeyVaultBackupOperation; +import com.azure.security.keyvault.administration.models.KeyVaultRestoreOperation; + +/** + * The {@link KeyVaultBackupClient} provides synchronous methods to perform full backup and restore of an Azure Key + * Vault. + */ +@ServiceClient(builder = KeyVaultBackupClientBuilder.class) +public final class KeyVaultBackupClient { + private final KeyVaultBackupAsyncClient asyncClient; + + /** + * Creates an {@link KeyVaultBackupClient} that uses a {@code pipeline} to service requests + * + * @param asyncClient The {@link KeyVaultBackupAsyncClient} that the client routes its request through. + */ + KeyVaultBackupClient(KeyVaultBackupAsyncClient asyncClient) { + this.asyncClient = asyncClient; + } + + /** + * Get the vault endpoint URL. + * + * @return The vault endpoint URL. + */ + public String getVaultUrl() { + return asyncClient.getVaultUrl(); + } + + /** + * Initiates a full backup of the Key Vault. + * + * @param blobStorageUrl The URL for the Blob Storage resource where the backup will be located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @return A {@link SyncPoller} polling on the {@link KeyVaultBackupOperation backup operation} status. + * @throws NullPointerException if the {@code blobStorageUrl} or {@code sasToken} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginBackup(String blobStorageUrl, String sasToken) { + return asyncClient.beginBackup(blobStorageUrl, sasToken).getSyncPoller(); + } + + /** + * Initiates a full restore of the Key Vault. + * + * @param blobStorageUrl The URL for the Blob Storage resource where the backup is located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @param folderName The name of the folder containing the backup data to restore. + * @return A {@link SyncPoller} polling on the {@link KeyVaultRestoreOperation backup operation} status. + * @throws NullPointerException if the {@code blobStorageUrl}, {@code sasToken} or {@code folderName} are {@code + * null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginRestore(String blobStorageUrl, String sasToken, String folderName) { + return asyncClient.beginRestore(blobStorageUrl, sasToken, folderName).getSyncPoller(); + } + + /** + * Restores all versions of a given key using the supplied SAS token pointing to a previously stored Azure Blob + * storage backup folder. + * + * @param keyName The name of the key to be restored. + * @param blobStorageUrl The URL for the Blob Storage resource where the backup is located. + * @param sasToken A Shared Access Signature (SAS) token to authorize access to the blob. + * @param folderName The name of the folder containing the backup data to restore. + * @return A {@link PollerFlux} polling on the {@link KeyVaultRestoreOperation backup operation} status. + * @throws NullPointerException if the {@code keyName}, {@code blobStorageUrl}, {@code sasToken} or {@code + * folderName} are {@code null}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginSelectiveRestore(String keyName, String blobStorageUrl, String sasToken, String folderName) { + return asyncClient.beginSelectiveRestore(keyName, blobStorageUrl, sasToken, folderName).getSyncPoller(); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java new file mode 100644 index 0000000000000..5231e57bd71b6 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.*; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.security.keyvault.administration.implementation.KeyVaultCredentialPolicy; +import com.azure.security.keyvault.administration.implementation.KeyVaultErrorCodeStrings; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * This class provides a fluent builder API to help aid the configuration and instantiation of the + * {@link KeyVaultBackupAsyncClient} and {@link KeyVaultBackupClient}, by calling + * {@link KeyVaultBackupClientBuilder#buildAsyncClient()} and {@link KeyVaultBackupClientBuilder#buildClient()} + * respectively. It constructs an instance of the desired client. + * + *

    The minimal configuration options required by {@link KeyVaultBackupClientBuilder} to build an + * an {@link KeyVaultBackupAsyncClient} are {@link String vaultUrl} and {@link TokenCredential credential}.

    + * + *

    The {@link HttpLogDetailLevel}, multiple custom {@link HttpLoggingPolicy policies} and custom + * {@link HttpClient} can be optionally configured in the {@link KeyVaultBackupClientBuilder}.

    + * + *

    Alternatively, a custom {@link HttpPipeline} with custom {@link HttpPipelinePolicy} policies and {@link String + * vaultUrl} can be specified. It provides finer control over the construction of {@link KeyVaultBackupAsyncClient} + * and {@link KeyVaultBackupClient} instances.

    + * + *

    The minimal configuration options required by {@link KeyVaultBackupClientBuilder} to build an + * {@link KeyVaultBackupClient} are {@link String vaultUrl} and {@link TokenCredential credential}.

    + * + * @see KeyVaultBackupAsyncClient + * @see KeyVaultBackupClient + */ +@ServiceClientBuilder(serviceClients = {KeyVaultBackupClient.class, KeyVaultBackupAsyncClient.class}) +public final class KeyVaultBackupClientBuilder { + // This is the properties file name. + private static final String AZURE_KEY_VAULT_RBAC = "azure-key-vault-administration.properties"; + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; + + private final ClientLogger logger = new ClientLogger(KeyVaultBackupClientBuilder.class); + private final List policies; + private final Map properties; + + private TokenCredential credential; + private HttpPipeline pipeline; + private URL vaultUrl; + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private RetryPolicy retryPolicy; + private Configuration configuration; + + /** + * Creates a {@link KeyVaultBackupClientBuilder} instance that is able to configure and construct instances of + * {@link KeyVaultBackupClient} and {@link KeyVaultBackupAsyncClient}. + */ + public KeyVaultBackupClientBuilder() { + retryPolicy = new RetryPolicy(); + httpLogOptions = new HttpLogOptions(); + policies = new ArrayList<>(); + properties = CoreUtils.getProperties(AZURE_KEY_VAULT_RBAC); + } + + /** + * Creates an {@link KeyVaultBackupClient} based on options set in the Builder. Every time {@code buildClient()} + * is called a new instance of {@link KeyVaultBackupClient} is created. + *

    + * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline} and + * {@link #vaultUrl(String) vaultUrl} are used to create the {@link KeyVaultBackupClient client}. All other + * builder settings are ignored. + * + * @return A {@link KeyVaultBackupClient} with the options set from the builder. + * @throws NullPointerException If {@code vaultUrl} is {@code null}. + */ + public KeyVaultBackupClient buildClient() { + return new KeyVaultBackupClient(buildAsyncClient()); + } + + /** + * Creates a {@link KeyVaultBackupAsyncClient} based on options set in the Builder. Every time {@code + * buildAsyncClient()} is called a new instance of {@link KeyVaultBackupAsyncClient} is created. + *

    + * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline} and + * {@link #vaultUrl(String) endpoint} are used to create the {@link KeyVaultBackupAsyncClient client}. All other + * builder settings are ignored. + * + * @return A {@link KeyVaultBackupAsyncClient} with the options set from the builder. + * @throws NullPointerException If {@code vaultUrl} is {@code null}. + */ + public KeyVaultBackupAsyncClient buildAsyncClient() { + Configuration buildConfiguration = (configuration == null) + ? Configuration.getGlobalConfiguration().clone() + : configuration; + + URL buildEndpoint = getBuildEndpoint(buildConfiguration); + + if (buildEndpoint == null) { + throw logger.logExceptionAsError( + new IllegalStateException( + KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED))); + } + + if (pipeline != null) { + return new KeyVaultBackupAsyncClient(vaultUrl, pipeline); + } + + // Closest to API goes first, closest to wire goes last. + final List policies = new ArrayList<>(); + + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + + policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, + buildConfiguration)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + this.policies.add(new KeyVaultCredentialPolicy(credential)); + policies.addAll(this.policies); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + + HttpPipeline buildPipeline = new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + + return new KeyVaultBackupAsyncClient(vaultUrl, buildPipeline); + } + + /** + * Sets the URL to the Key Vault on which the client operates. Appears as "DNS Name" in the Azure portal. + * + * @param vaultUrl The vault URL is used as destination on Azure to send requests to. + * @return The updated {@link KeyVaultBackupClientBuilder} object. + * @throws IllegalArgumentException If {@code vaultUrl} is null or it cannot be parsed into a valid URL. + */ + public KeyVaultBackupClientBuilder vaultUrl(String vaultUrl) { + try { + this.vaultUrl = new URL(vaultUrl); + } catch (MalformedURLException e) { + throw logger.logExceptionAsWarning( + new IllegalArgumentException("The Azure Key Vault URL is malformed.", e)); + } + + return this; + } + + /** + * Sets the credential to use when authenticating HTTP requests. + * + * @param credential The credential to use for authenticating HTTP requests. + * @return The updated {@link KeyVaultBackupClientBuilder} object. + * @throws NullPointerException If {@code credential} is {@code null}. + */ + public KeyVaultBackupClientBuilder credential(TokenCredential credential) { + Objects.requireNonNull(credential); + + this.credential = credential; + + return this; + } + + /** + * Sets the logging configuration for HTTP requests and responses. + * + *

    If logLevel is not provided, default value of {@link HttpLogDetailLevel#NONE} is set.

    + * + * @param logOptions The logging configuration to use when sending and receiving HTTP requests/responses. + * @return The updated {@link KeyVaultBackupClientBuilder} object. + */ + public KeyVaultBackupClientBuilder httpLogOptions(HttpLogOptions logOptions) { + httpLogOptions = logOptions; + + return this; + } + + /** + * Adds a policy to the set of existing policies that are executed after and {@link KeyVaultBackupClient} + * {@link KeyVaultBackupAsyncClient} required policies. + * + * @param policy The {@link HttpPipelinePolicy policy} to be added. + * @return The updated {@link KeyVaultBackupClientBuilder} object. + * @throws NullPointerException If {@code policy} is {@code null}. + */ + public KeyVaultBackupClientBuilder addPolicy(HttpPipelinePolicy policy) { + Objects.requireNonNull(policy); + + policies.add(policy); + + return this; + } + + /** + * Sets the HTTP client to use for sending and receiving requests to and from the service. + * + * @param client The HTTP client to use for requests. + * @return The updated {@link KeyVaultBackupClientBuilder} object. + * @throws NullPointerException If {@code client} is {@code null}. + */ + public KeyVaultBackupClientBuilder httpClient(HttpClient client) { + Objects.requireNonNull(client); + + this.httpClient = client; + + return this; + } + + /** + * Sets the HTTP pipeline to use for the service client. + *

    + * If {@code pipeline} is set, all other settings are ignored, aside from + * {@link KeyVaultBackupClientBuilder#vaultUrl(String) vaultUrl} to build {@link KeyVaultBackupClient} or + * {@link KeyVaultBackupAsyncClient}. + * + * @param pipeline The HTTP pipeline to use for sending service requests and receiving responses. + * @return The updated {@link KeyVaultBackupClientBuilder} object. + */ + public KeyVaultBackupClientBuilder pipeline(HttpPipeline pipeline) { + Objects.requireNonNull(pipeline); + this.pipeline = pipeline; + + return this; + } + + /** + * Sets the configuration store that is used during construction of the service client. + *

    + * The default configuration store is a clone of the {@link Configuration#getGlobalConfiguration() global + * configuration store}, use {@link Configuration#NONE} to bypass using configuration settings during construction. + * + * @param configuration The configuration store used to get configuration details. + * @return The updated {@link KeyVaultBackupClientBuilder} object. + */ + public KeyVaultBackupClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + + return this; + } + + /** + * Sets the {@link RetryPolicy} that is used when each request is sent. + *

    + * The default retry policy will be used in the pipeline, if not provided. + * + * @param retryPolicy User's retry policy applied to each request. + * @return The updated {@link KeyVaultBackupClientBuilder} object. + * @throws NullPointerException If the specified {@code retryPolicy} is null. + */ + public KeyVaultBackupClientBuilder retryPolicy(RetryPolicy retryPolicy) { + Objects.requireNonNull(retryPolicy, "The retry policy cannot be bull"); + + this.retryPolicy = retryPolicy; + + return this; + } + + private URL getBuildEndpoint(Configuration configuration) { + if (vaultUrl != null) { + return vaultUrl; + } + + String configEndpoint = configuration.get("AZURE_KEYVAULT_ENDPOINT"); + + if (CoreUtils.isNullOrEmpty(configEndpoint)) { + return null; + } + + try { + return new URL(configEndpoint); + } catch (MalformedURLException ex) { + return null; + } + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultBackupClientImpl.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultBackupClientImpl.java new file mode 100644 index 0000000000000..363058bbf7215 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultBackupClientImpl.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.security.keyvault.administration.implementation.models.FullBackupOperation; +import com.azure.security.keyvault.administration.implementation.models.FullBackupResponse; +import com.azure.security.keyvault.administration.implementation.models.FullRestoreOperationResponse; +import com.azure.security.keyvault.administration.implementation.models.KeyVaultErrorException; +import com.azure.security.keyvault.administration.implementation.models.RestoreOperation; +import com.azure.security.keyvault.administration.implementation.models.RestoreOperationParameters; +import com.azure.security.keyvault.administration.implementation.models.SASTokenParameter; +import com.azure.security.keyvault.administration.implementation.models.SelectiveKeyRestoreOperationParameters; +import com.azure.security.keyvault.administration.implementation.models.SelectiveKeyRestoreOperationResponse; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the KeyVaultBackupClient type. */ +public final class KeyVaultBackupClientImpl { + /** The proxy service used to perform REST calls. */ + private final KeyVaultBackupClientService service; + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** Initializes an instance of KeyVaultBackupClient client. */ + KeyVaultBackupClientImpl() { + this( + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(), + JacksonAdapter.createDefaultSerializerAdapter()); + } + + /** + * Initializes an instance of KeyVaultBackupClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + */ + KeyVaultBackupClientImpl(HttpPipeline httpPipeline) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter()); + } + + /** + * Initializes an instance of KeyVaultBackupClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + */ + KeyVaultBackupClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.apiVersion = "7.2-preview"; + this.service = + RestProxy.create(KeyVaultBackupClientService.class, this.httpPipeline, this.getSerializerAdapter()); + } + + /** + * The interface defining all the services for KeyVaultBackupClient to be used by the proxy service to perform REST + * calls. + */ + @Host("{vaultBaseUrl}") + @ServiceInterface(name = "KeyVaultBackupClient") + private interface KeyVaultBackupClientService { + @Post("/backup") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono fullBackup( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SASTokenParameter azureStorageBlobContainerUri, + Context context); + + @Get("/backup/{jobId}/pending") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> fullBackupStatus( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @PathParam("jobId") String jobId, + @QueryParam("api-version") String apiVersion, + Context context); + + @Put("/restore") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono fullRestoreOperation( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RestoreOperationParameters restoreBlobDetails, + Context context); + + @Get("/restore/{jobId}/pending") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono> restoreStatus( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @PathParam("jobId") String jobId, + @QueryParam("api-version") String apiVersion, + Context context); + + @Put("/keys/{keyName}/restore") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(KeyVaultErrorException.class) + Mono selectiveKeyRestoreOperation( + @HostParam("vaultBaseUrl") String vaultBaseUrl, + @PathParam("keyName") String keyName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SelectiveKeyRestoreOperationParameters restoreBlobDetails, + Context context); + } + + /** + * Creates a full backup using a user-provided SAS token to an Azure blob storage container. + * + * @param vaultBaseUrl simple string. + * @param azureStorageBlobContainerUri Azure blob shared access signature token pointing to a valid Azure blob + * container where full backup needs to be stored. This token needs to be valid for at least next 24 hours from + * the time of making this call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full backup operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono fullBackupWithResponseAsync( + String vaultBaseUrl, SASTokenParameter azureStorageBlobContainerUri, Context context) { + return service.fullBackup(vaultBaseUrl, this.getApiVersion(), azureStorageBlobContainerUri, context); + } + + /** + * Returns the status of full backup operation. + * + * @param vaultBaseUrl simple string. + * @param jobId The id returned as part of the backup request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full backup operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> fullBackupStatusWithResponseAsync( + String vaultBaseUrl, String jobId, Context context) { + return service.fullBackupStatus(vaultBaseUrl, jobId, this.getApiVersion(), context); + } + + /** + * Restores all key materials using the SAS token pointing to a previously stored Azure Blob storage backup folder. + * + * @param vaultBaseUrl simple string. + * @param restoreBlobDetails The Azure blob SAS token pointing to a folder where the previous successful full backup + * was stored. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return restore operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono fullRestoreOperationWithResponseAsync( + String vaultBaseUrl, RestoreOperationParameters restoreBlobDetails, Context context) { + return service.fullRestoreOperation(vaultBaseUrl, this.getApiVersion(), restoreBlobDetails, context); + } + + /** + * Returns the status of restore operation. + * + * @param vaultBaseUrl simple string. + * @param jobId The Job Id returned part of the restore operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return restore operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> restoreStatusWithResponseAsync( + String vaultBaseUrl, String jobId, Context context) { + return service.restoreStatus(vaultBaseUrl, jobId, this.getApiVersion(), context); + } + + /** + * Restores all key versions of a given key using user supplied SAS token pointing to a previously stored Azure Blob + * storage backup folder. + * + * @param vaultBaseUrl simple string. + * @param keyName The name of the key to be restored from the user supplied backup. + * @param restoreBlobDetails The Azure blob SAS token pointing to a folder where the previous successful full backup + * was stored. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws KeyVaultErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return selective Key Restore operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono selectiveKeyRestoreOperationWithResponseAsync( + String vaultBaseUrl, + String keyName, + SelectiveKeyRestoreOperationParameters restoreBlobDetails, + Context context) { + return service.selectiveKeyRestoreOperation( + vaultBaseUrl, keyName, this.getApiVersion(), restoreBlobDetails, context); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultBackupClientImplBuilder.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultBackupClientImplBuilder.java new file mode 100644 index 0000000000000..aaa20c763c262 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultBackupClientImplBuilder.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** A builder for creating a new instance of the KeyVaultBackupClient type. */ +@ServiceClientBuilder(serviceClients = {KeyVaultBackupClientImpl.class}) +public final class KeyVaultBackupClientImplBuilder { + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the KeyVaultBackupClientImplBuilder. + */ + public KeyVaultBackupClientImplBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the KeyVaultBackupClientImplBuilder. + */ + public KeyVaultBackupClientImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of KeyVaultBackupClientImpl with the provided parameters. + * + * @return an instance of KeyVaultBackupClientImpl. + */ + public KeyVaultBackupClientImpl buildClient() { + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); + } + KeyVaultBackupClientImpl client = new KeyVaultBackupClientImpl(pipeline, serializerAdapter); + return client; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupHeaders.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupHeaders.java new file mode 100644 index 0000000000000..fd19d98eb707c --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupHeaders.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The FullBackupHeaders model. */ +@Fluent +public final class FullBackupHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer getRetryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the FullBackupHeaders object itself. + */ + public FullBackupHeaders setRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String getAzureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the FullBackupHeaders object itself. + */ + public FullBackupHeaders setAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupOperation.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupOperation.java new file mode 100644 index 0000000000000..cea344daf5825 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupOperation.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.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The FullBackupOperation model. */ +@Fluent +public final class FullBackupOperation { + /* + * Status of the backup operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The status details of backup operation. + */ + @JsonProperty(value = "statusDetails") + private String statusDetails; + + /* + * Error encountered, if any, during the full backup operation. + */ + @JsonProperty(value = "error") + private Error error; + + /* + * The start time of the backup operation in UTC + */ + @JsonProperty(value = "startTime") + private Long startTime; + + /* + * The end time of the backup operation in UTC + */ + @JsonProperty(value = "endTime") + private Long endTime; + + /* + * Identifier for the full backup operation. + */ + @JsonProperty(value = "jobId") + private String jobId; + + /* + * The Azure blob storage container Uri which contains the full backup + */ + @JsonProperty(value = "azureStorageBlobContainerUri") + private String azureStorageBlobContainerUri; + + /** + * Get the status property: Status of the backup operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the backup operation. + * + * @param status the status value to set. + * @return the FullBackupOperation object itself. + */ + public FullBackupOperation setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the statusDetails property: The status details of backup operation. + * + * @return the statusDetails value. + */ + public String getStatusDetails() { + return this.statusDetails; + } + + /** + * Set the statusDetails property: The status details of backup operation. + * + * @param statusDetails the statusDetails value to set. + * @return the FullBackupOperation object itself. + */ + public FullBackupOperation setStatusDetails(String statusDetails) { + this.statusDetails = statusDetails; + return this; + } + + /** + * Get the error property: Error encountered, if any, during the full backup operation. + * + * @return the error value. + */ + public Error getError() { + return this.error; + } + + /** + * Set the error property: Error encountered, if any, during the full backup operation. + * + * @param error the error value to set. + * @return the FullBackupOperation object itself. + */ + public FullBackupOperation setError(Error error) { + this.error = error; + return this; + } + + /** + * Get the startTime property: The start time of the backup operation in UTC. + * + * @return the startTime value. + */ + public Long getStartTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the backup operation in UTC. + * + * @param startTime the startTime value to set. + * @return the FullBackupOperation object itself. + */ + public FullBackupOperation setStartTime(Long startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the backup operation in UTC. + * + * @return the endTime value. + */ + public Long getEndTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the backup operation in UTC. + * + * @param endTime the endTime value to set. + * @return the FullBackupOperation object itself. + */ + public FullBackupOperation setEndTime(Long endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the jobId property: Identifier for the full backup operation. + * + * @return the jobId value. + */ + public String getJobId() { + return this.jobId; + } + + /** + * Set the jobId property: Identifier for the full backup operation. + * + * @param jobId the jobId value to set. + * @return the FullBackupOperation object itself. + */ + public FullBackupOperation setJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get the azureStorageBlobContainerUri property: The Azure blob storage container Uri which contains the full + * backup. + * + * @return the azureStorageBlobContainerUri value. + */ + public String getAzureStorageBlobContainerUri() { + return this.azureStorageBlobContainerUri; + } + + /** + * Set the azureStorageBlobContainerUri property: The Azure blob storage container Uri which contains the full + * backup. + * + * @param azureStorageBlobContainerUri the azureStorageBlobContainerUri value to set. + * @return the FullBackupOperation object itself. + */ + public FullBackupOperation setAzureStorageBlobContainerUri(String azureStorageBlobContainerUri) { + this.azureStorageBlobContainerUri = azureStorageBlobContainerUri; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupResponse.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupResponse.java new file mode 100644 index 0000000000000..826929edf15d5 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupResponse.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the fullBackup operation. */ +public final class FullBackupResponse extends ResponseBase { + /** + * Creates an instance of FullBackupResponse. + * + * @param request the request which resulted in this FullBackupResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public FullBackupResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + FullBackupOperation value, + FullBackupHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public FullBackupOperation getValue() { + return super.getValue(); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullRestoreOperationHeaders.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullRestoreOperationHeaders.java new file mode 100644 index 0000000000000..035707472745e --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullRestoreOperationHeaders.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The FullRestoreOperationHeaders model. */ +@Fluent +public final class FullRestoreOperationHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer getRetryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the FullRestoreOperationHeaders object itself. + */ + public FullRestoreOperationHeaders setRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String getAzureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the FullRestoreOperationHeaders object itself. + */ + public FullRestoreOperationHeaders setAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullRestoreOperationResponse.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullRestoreOperationResponse.java new file mode 100644 index 0000000000000..e35b341ab4c3e --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullRestoreOperationResponse.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the fullRestoreOperation operation. */ +public final class FullRestoreOperationResponse extends ResponseBase { + /** + * Creates an instance of FullRestoreOperationResponse. + * + * @param request the request which resulted in this FullRestoreOperationResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public FullRestoreOperationResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + RestoreOperation value, + FullRestoreOperationHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public RestoreOperation getValue() { + return super.getValue(); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RestoreOperation.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RestoreOperation.java new file mode 100644 index 0000000000000..0e31d72ee4aa6 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RestoreOperation.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RestoreOperation model. */ +@Fluent +public final class RestoreOperation { + /* + * Status of the restore operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The status details of restore operation. + */ + @JsonProperty(value = "statusDetails") + private String statusDetails; + + /* + * Error encountered, if any, during the restore operation. + */ + @JsonProperty(value = "error") + private Error error; + + /* + * Identifier for the restore operation. + */ + @JsonProperty(value = "jobId") + private String jobId; + + /* + * The start time of the restore operation + */ + @JsonProperty(value = "startTime") + private Long startTime; + + /* + * The end time of the restore operation + */ + @JsonProperty(value = "endTime") + private Long endTime; + + /** + * Get the status property: Status of the restore operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the restore operation. + * + * @param status the status value to set. + * @return the RestoreOperation object itself. + */ + public RestoreOperation setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the statusDetails property: The status details of restore operation. + * + * @return the statusDetails value. + */ + public String getStatusDetails() { + return this.statusDetails; + } + + /** + * Set the statusDetails property: The status details of restore operation. + * + * @param statusDetails the statusDetails value to set. + * @return the RestoreOperation object itself. + */ + public RestoreOperation setStatusDetails(String statusDetails) { + this.statusDetails = statusDetails; + return this; + } + + /** + * Get the error property: Error encountered, if any, during the restore operation. + * + * @return the error value. + */ + public Error getError() { + return this.error; + } + + /** + * Set the error property: Error encountered, if any, during the restore operation. + * + * @param error the error value to set. + * @return the RestoreOperation object itself. + */ + public RestoreOperation setError(Error error) { + this.error = error; + return this; + } + + /** + * Get the jobId property: Identifier for the restore operation. + * + * @return the jobId value. + */ + public String getJobId() { + return this.jobId; + } + + /** + * Set the jobId property: Identifier for the restore operation. + * + * @param jobId the jobId value to set. + * @return the RestoreOperation object itself. + */ + public RestoreOperation setJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get the startTime property: The start time of the restore operation. + * + * @return the startTime value. + */ + public Long getStartTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the restore operation. + * + * @param startTime the startTime value to set. + * @return the RestoreOperation object itself. + */ + public RestoreOperation setStartTime(Long startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the restore operation. + * + * @return the endTime value. + */ + public Long getEndTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the restore operation. + * + * @param endTime the endTime value to set. + * @return the RestoreOperation object itself. + */ + public RestoreOperation setEndTime(Long endTime) { + this.endTime = endTime; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RestoreOperationParameters.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RestoreOperationParameters.java new file mode 100644 index 0000000000000..4048b51aa2b4c --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RestoreOperationParameters.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RestoreOperationParameters model. */ +@Fluent +public final class RestoreOperationParameters { + /* + * The sasTokenParameters property. + */ + @JsonProperty(value = "sasTokenParameters", required = true) + private SASTokenParameter sasTokenParameters; + + /* + * The Folder name of the blob where the previous successful full backup + * was stored + */ + @JsonProperty(value = "folderToRestore", required = true) + private String folderToRestore; + + /** + * Get the sasTokenParameters property: The sasTokenParameters property. + * + * @return the sasTokenParameters value. + */ + public SASTokenParameter getSasTokenParameters() { + return this.sasTokenParameters; + } + + /** + * Set the sasTokenParameters property: The sasTokenParameters property. + * + * @param sasTokenParameters the sasTokenParameters value to set. + * @return the RestoreOperationParameters object itself. + */ + public RestoreOperationParameters setSasTokenParameters(SASTokenParameter sasTokenParameters) { + this.sasTokenParameters = sasTokenParameters; + return this; + } + + /** + * Get the folderToRestore property: The Folder name of the blob where the previous successful full backup was + * stored. + * + * @return the folderToRestore value. + */ + public String getFolderToRestore() { + return this.folderToRestore; + } + + /** + * Set the folderToRestore property: The Folder name of the blob where the previous successful full backup was + * stored. + * + * @param folderToRestore the folderToRestore value to set. + * @return the RestoreOperationParameters object itself. + */ + public RestoreOperationParameters setFolderToRestore(String folderToRestore) { + this.folderToRestore = folderToRestore; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SASTokenParameter.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SASTokenParameter.java new file mode 100644 index 0000000000000..f8f169dca8658 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SASTokenParameter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SASTokenParameter model. */ +@Fluent +public final class SASTokenParameter { + /* + * Azure Blob storage container Uri + */ + @JsonProperty(value = "storageResourceUri", required = true) + private String storageResourceUri; + + /* + * The SAS token pointing to an Azure Blob storage container + */ + @JsonProperty(value = "token", required = true) + private String token; + + /** + * Get the storageResourceUri property: Azure Blob storage container Uri. + * + * @return the storageResourceUri value. + */ + public String getStorageResourceUri() { + return this.storageResourceUri; + } + + /** + * Set the storageResourceUri property: Azure Blob storage container Uri. + * + * @param storageResourceUri the storageResourceUri value to set. + * @return the SASTokenParameter object itself. + */ + public SASTokenParameter setStorageResourceUri(String storageResourceUri) { + this.storageResourceUri = storageResourceUri; + return this; + } + + /** + * Get the token property: The SAS token pointing to an Azure Blob storage container. + * + * @return the token value. + */ + public String getToken() { + return this.token; + } + + /** + * Set the token property: The SAS token pointing to an Azure Blob storage container. + * + * @param token the token value to set. + * @return the SASTokenParameter object itself. + */ + public SASTokenParameter setToken(String token) { + this.token = token; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperation.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperation.java new file mode 100644 index 0000000000000..a182cef2629b5 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperation.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SelectiveKeyRestoreOperation model. */ +@Fluent +public final class SelectiveKeyRestoreOperation { + /* + * Status of the restore operation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The status details of restore operation. + */ + @JsonProperty(value = "statusDetails") + private String statusDetails; + + /* + * Error encountered, if any, during the selective key restore operation. + */ + @JsonProperty(value = "error") + private Error error; + + /* + * Identifier for the selective key restore operation. + */ + @JsonProperty(value = "jobId") + private String jobId; + + /* + * The start time of the restore operation + */ + @JsonProperty(value = "startTime") + private Long startTime; + + /* + * The end time of the restore operation + */ + @JsonProperty(value = "endTime") + private Long endTime; + + /** + * Get the status property: Status of the restore operation. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the restore operation. + * + * @param status the status value to set. + * @return the SelectiveKeyRestoreOperation object itself. + */ + public SelectiveKeyRestoreOperation setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the statusDetails property: The status details of restore operation. + * + * @return the statusDetails value. + */ + public String getStatusDetails() { + return this.statusDetails; + } + + /** + * Set the statusDetails property: The status details of restore operation. + * + * @param statusDetails the statusDetails value to set. + * @return the SelectiveKeyRestoreOperation object itself. + */ + public SelectiveKeyRestoreOperation setStatusDetails(String statusDetails) { + this.statusDetails = statusDetails; + return this; + } + + /** + * Get the error property: Error encountered, if any, during the selective key restore operation. + * + * @return the error value. + */ + public Error getError() { + return this.error; + } + + /** + * Set the error property: Error encountered, if any, during the selective key restore operation. + * + * @param error the error value to set. + * @return the SelectiveKeyRestoreOperation object itself. + */ + public SelectiveKeyRestoreOperation setError(Error error) { + this.error = error; + return this; + } + + /** + * Get the jobId property: Identifier for the selective key restore operation. + * + * @return the jobId value. + */ + public String getJobId() { + return this.jobId; + } + + /** + * Set the jobId property: Identifier for the selective key restore operation. + * + * @param jobId the jobId value to set. + * @return the SelectiveKeyRestoreOperation object itself. + */ + public SelectiveKeyRestoreOperation setJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get the startTime property: The start time of the restore operation. + * + * @return the startTime value. + */ + public Long getStartTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the restore operation. + * + * @param startTime the startTime value to set. + * @return the SelectiveKeyRestoreOperation object itself. + */ + public SelectiveKeyRestoreOperation setStartTime(Long startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the restore operation. + * + * @return the endTime value. + */ + public Long getEndTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the restore operation. + * + * @param endTime the endTime value to set. + * @return the SelectiveKeyRestoreOperation object itself. + */ + public SelectiveKeyRestoreOperation setEndTime(Long endTime) { + this.endTime = endTime; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationHeaders.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationHeaders.java new file mode 100644 index 0000000000000..6202d682a7800 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationHeaders.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SelectiveKeyRestoreOperationHeaders model. */ +@Fluent +public final class SelectiveKeyRestoreOperationHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer getRetryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the SelectiveKeyRestoreOperationHeaders object itself. + */ + public SelectiveKeyRestoreOperationHeaders setRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String getAzureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the SelectiveKeyRestoreOperationHeaders object itself. + */ + public SelectiveKeyRestoreOperationHeaders setAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationParameters.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationParameters.java new file mode 100644 index 0000000000000..9c5e86c532996 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationParameters.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.security.keyvault.administration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SelectiveKeyRestoreOperationParameters model. */ +@Fluent +public final class SelectiveKeyRestoreOperationParameters { + /* + * The sasTokenParameters property. + */ + @JsonProperty(value = "sasTokenParameters", required = true) + private SASTokenParameter sasTokenParameters; + + /* + * The Folder name of the blob where the previous successful full backup + * was stored + */ + @JsonProperty(value = "folder", required = true) + private String folder; + + /** + * Get the sasTokenParameters property: The sasTokenParameters property. + * + * @return the sasTokenParameters value. + */ + public SASTokenParameter getSasTokenParameters() { + return this.sasTokenParameters; + } + + /** + * Set the sasTokenParameters property: The sasTokenParameters property. + * + * @param sasTokenParameters the sasTokenParameters value to set. + * @return the SelectiveKeyRestoreOperationParameters object itself. + */ + public SelectiveKeyRestoreOperationParameters setSasTokenParameters(SASTokenParameter sasTokenParameters) { + this.sasTokenParameters = sasTokenParameters; + return this; + } + + /** + * Get the folder property: The Folder name of the blob where the previous successful full backup was stored. + * + * @return the folder value. + */ + public String getFolder() { + return this.folder; + } + + /** + * Set the folder property: The Folder name of the blob where the previous successful full backup was stored. + * + * @param folder the folder value to set. + * @return the SelectiveKeyRestoreOperationParameters object itself. + */ + public SelectiveKeyRestoreOperationParameters setFolder(String folder) { + this.folder = folder; + return this; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationResponse.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationResponse.java new file mode 100644 index 0000000000000..5e946a826a385 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/SelectiveKeyRestoreOperationResponse.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.security.keyvault.administration.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the selectiveKeyRestoreOperation operation. */ +public final class SelectiveKeyRestoreOperationResponse + extends ResponseBase { + /** + * Creates an instance of SelectiveKeyRestoreOperationResponse. + * + * @param request the request which resulted in this SelectiveKeyRestoreOperationResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public SelectiveKeyRestoreOperationResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + SelectiveKeyRestoreOperation value, + SelectiveKeyRestoreOperationHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public SelectiveKeyRestoreOperation getValue() { + return super.getValue(); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java index 3ad2fecedd55a..4300970afe6ef 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for KeyVaultAccessControlClient. The key vault client performs cryptographic key - * operations and vault operations against the Key Vault service. + * Package containing the data models for KeyVaultAccessControlClient and KeyVaultBackupClient. The key vault client + * performs cryptographic key operations and vault operations against the Key Vault service. */ package com.azure.security.keyvault.administration.implementation.models; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java index 2f88bbe093558..6b89e34ff9e45 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations and inner classes for KeyVaultAccessControlClient. The key vault client - * performs cryptographic key operations and vault operations against the Key Vault service. + * Package containing the implementations and inner classes for KeyVaultAccessControlClient and KeyVaultBackupClient. + * The key vault client performs cryptographic key operations and vault operations against the Key Vault service. */ package com.azure.security.keyvault.administration.implementation; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultBackupOperation.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultBackupOperation.java new file mode 100644 index 0000000000000..c95a5765a6aee --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultBackupOperation.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +/** + * A class that contains the details of a backup operation. + */ +public final class KeyVaultBackupOperation extends KeyVaultLongRunningOperation { + private final String azureStorageBlobContainerUri; + + /** + * Creates an object containing the details of a {@link KeyVaultBackupOperation}. + * + * @param status Status of the {@link KeyVaultBackupOperation}. + * @param statusDetails The status details of the {@link KeyVaultBackupOperation}. + * @param error Error encountered, if any, during the {@link KeyVaultBackupOperation}. + * @param startTime The start time of the {@link KeyVaultBackupOperation} in UTC. + * @param endTime The end time of the {@link KeyVaultBackupOperation} in UTC. + * @param jobId Identifier for the full {@link KeyVaultBackupOperation}. + * @param azureStorageBlobContainerUri The Azure blob storage container URI which contains the backup. + */ + public KeyVaultBackupOperation(String status, String statusDetails, KeyVaultError error, String jobId, Long startTime, Long endTime, String azureStorageBlobContainerUri) { + super(status, statusDetails, error, jobId, startTime, endTime); + this.azureStorageBlobContainerUri = azureStorageBlobContainerUri; + } + + /** + * Get the Azure Blob Storage container URI where the backup resides. + * + * @return The backup URI in {@link String} form. + */ + public String getAzureStorageBlobContainerUri() { + return azureStorageBlobContainerUri; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultError.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultError.java new file mode 100644 index 0000000000000..1dc9e4e71423d --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultError.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +/** + * A class that represents an error occurred in a Key Vault operation. + */ +public final class KeyVaultError { + private String code; + private String message; + private KeyVaultError innerError; + + /** + * Creates an object that represents an error occurred in a Key Vault operation. + * + * @param code The error code. + * @param message The error message. + * @param innerError An Key Vault server-side error. + */ + public KeyVaultError(String code, String message, KeyVaultError innerError) { + this.code = code; + this.message = message; + this.innerError = innerError; + } + + /** + * Get the error code. + * + * @return The error code. + */ + public String getCode() { + return this.code; + } + + /** + * Get the error message. + * + * @return The error message. + */ + public String getMessage() { + return this.message; + } + + /** + * Get the Key Vault server-side error. + * + * @return The Key Vault server-side error. + */ + public KeyVaultError getInnerError() { + return this.innerError; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultLongRunningOperation.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultLongRunningOperation.java new file mode 100644 index 0000000000000..0c39d6ed4231f --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultLongRunningOperation.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +/** + * A class that contains the details of a long running operation. + */ +public class KeyVaultLongRunningOperation { + private final String status; + private final String statusDetails; + private final KeyVaultError error; + private final String jobId; + private final Long startTime; + private final Long endTime; + + /** + * Creates an object containing the details of a {@link KeyVaultLongRunningOperation}. + * + * @param status Status of the {@link KeyVaultLongRunningOperation}. + * @param statusDetails The status details of the {@link KeyVaultLongRunningOperation}. + * @param error Error encountered, if any, during the {@link KeyVaultLongRunningOperation}. + * @param startTime The start time of the {@link KeyVaultLongRunningOperation} in UTC. + * @param endTime The end time of the {@link KeyVaultLongRunningOperation} in UTC. + * @param jobId Identifier for the full {@link KeyVaultLongRunningOperation}. + */ + public KeyVaultLongRunningOperation(String status, String statusDetails, KeyVaultError error, String jobId, Long startTime, Long endTime) { + this.status = status; + this.statusDetails = statusDetails; + this.error = error; + this.startTime = startTime; + this.endTime = endTime; + this.jobId = jobId; + } + + /** + * Get the status of the {@link KeyVaultLongRunningOperation}. + * + * @return The backup status. + */ + public String getStatus() { + return status; + } + + /** + * Get the status details of the {@link KeyVaultLongRunningOperation}. + * + * @return The backup status details. + */ + public String getStatusDetails() { + return statusDetails; + } + + /** + * Get the error encountered, if any, during the {@link KeyVaultLongRunningOperation}. + * + * @return The error. + */ + public KeyVaultError getError() { + return error; + } + + /** + * Get the start time of the {@link KeyVaultLongRunningOperation} in UTC. + * + * @return The start time in UTC. + */ + public Long getStartTime() { + return startTime; + } + + /** + * Get the end time of the {@link KeyVaultLongRunningOperation} in UTC. + * + * @return The end time in UTC. + */ + public Long getEndTime() { + return endTime; + } + + /** + * Get the identifier for the {@link KeyVaultLongRunningOperation}. + * + * @return The job ID. + */ + public String getJobId() { + return jobId; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRestoreOperation.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRestoreOperation.java new file mode 100644 index 0000000000000..3949c121d48d9 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRestoreOperation.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration.models; + +/** + * A class that contains the details of a restore operation. + */ +public final class KeyVaultRestoreOperation extends KeyVaultLongRunningOperation { + /** + * Creates an object containing the details of a {@link KeyVaultRestoreOperation}. + * + * @param status Status of the {@link KeyVaultRestoreOperation}. + * @param statusDetails The status details of the {@link KeyVaultRestoreOperation}. + * @param error Error encountered, if any, during the {@link KeyVaultRestoreOperation}. + * @param startTime The start time of the {@link KeyVaultRestoreOperation} in UTC. + * @param endTime The end time of the {@link KeyVaultRestoreOperation} in UTC. + * @param jobId Identifier for the full {@link KeyVaultRestoreOperation}. + */ + public KeyVaultRestoreOperation(String status, String statusDetails, KeyVaultError error, String jobId, Long startTime, Long endTime) { + super(status, statusDetails, error, jobId, startTime, endTime); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java index a53d8c9c2c32f..6bf900cd9a26a 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java @@ -4,7 +4,10 @@ /** * Package containing classes used by * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlAsyncClient} and - * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlClient} to perform access control - * operations on Azure Key Vault resources. + * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlClient} to perform access control operations + * on Azure Key Vault resources, as well as classes used by + * {@link com.azure.security.keyvault.administration.KeyVaultBackupAsyncClient} and + * {@link com.azure.security.keyvault.administration.KeyVaultBackupClient} to perform backup and restore operations on + * on Azure Key Vault keys. */ package com.azure.security.keyvault.administration.models; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java index b1e6ea894df04..9a917aed7a96f 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java @@ -4,7 +4,10 @@ /** * Package containing classes for creating clients * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlAsyncClient} and - * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlClient} that perform access control - * operations on Azure Key Vault resources. + * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlClient} that perform access control operations + * on Azure Key Vault resources, as well as clients + * {@link com.azure.security.keyvault.administration.KeyVaultBackupAsyncClient} and + * {@link com.azure.security.keyvault.administration.KeyVaultBackupClient} that perform backup and restore operations on + * Azure Key Vault keys. */ package com.azure.security.keyvault.administration; diff --git a/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md b/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md index 3c96b1a3de642..e532b154bf582 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md +++ b/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md @@ -4,10 +4,10 @@ ### Setup Increase max memory if you're using Autorest older than 3. Set the environment variable `NODE_OPTIONS` to `--max-old-space-size=8192`. -This is the AutoRest configuration file for KeyVaultAccessControlClient. +This is the AutoRest configuration file for the KeyVaultAccessControlClient and KeyVaultBackupClient. --- ## Getting Started -To build the SDK for KeyVaultAccessControlClient, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md) and in this folder, run: +To build the SDK for either client, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md) and in this folder, run: > `autorest` @@ -16,7 +16,7 @@ To see additional help and options, run: > `autorest --help` ### Generation -There is one swagger for KeyVault Administration: rbac. It uses the following tag: `--tag=rbac-preview`. +There are two swagger specifications for KeyVault Administration: rbac and backuprestore. They use the following tags: `--tag=rbac-preview` & `--tag=backuprestore-preview`. ```ps cd @@ -29,6 +29,11 @@ cd autorest --use=@microsoft.azure/autorest.java@4.0.0 --tag=rbac-preview ``` +```ps +cd +autorest --use=@microsoft.azure/autorest.java@4.0.0 --tag=backuprestore-preview +``` + ## Code generation settings ``` yaml java: true @@ -50,3 +55,11 @@ These settings apply only when `--tag=rbac-preview` is specified on the command input-file: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json title: KeyVaultAccessControlClient ``` + +### Tag: backuprestore-preview +These settings apply only when `--tag=backuprestore-preview` is specified on the command line. + +``` yaml $(tag) == 'backuprestore-preview' +input-file: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/backuprestore.json +title: KeyVaultBackupClient +``` From b79469c2d8a2eae068f19220a968a4a8d734ad8c Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Fri, 4 Sep 2020 21:43:00 -0700 Subject: [PATCH 112/168] Add Sync samples for Model Lifecycle. (#14849) --- .../core/DigitalTwinsAsyncClient.java | 46 +++---- .../digitaltwins/core/DigitalTwinsClient.java | 19 ++- .../DigitalTwinsLifecycleAsyncSample.java | 8 +- .../core/ModelsLifecycleSyncSamples.java | 115 ++++++++++++++++++ .../digitaltwins/core/SamplesConstants.java | 61 ++++++++++ .../core/helpers/ConsoleLogger.java | 27 ++++ .../core/{ => helpers}/FileHelper.java | 2 +- .../core/{ => helpers}/SamplesArguments.java | 6 +- .../core/{ => helpers}/SamplesUtil.java | 2 +- .../core/helpers/UniqueIdHelper.java | 38 ++++++ 10 files changed, 286 insertions(+), 38 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/ConsoleLogger.java rename sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/{ => helpers}/FileHelper.java (97%) rename sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/{ => helpers}/SamplesArguments.java (97%) rename sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/{ => helpers}/SamplesUtil.java (95%) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index b5b64768332eb..5ef8f999fa02d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -747,23 +747,25 @@ PagedFlux listIncomingRelationships(String digitalTwinId, /** * Creates one or many models. * @param models The list of models to create. Each string corresponds to exactly one model. - * @return A {@link PagedFlux} of created models and the http response. + * @return A List of created models. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux createModels(List models) { - return new PagedFlux<>( - () -> withContext(context -> createModelsSinglePageAsync(models, context)), - nextLink -> withContext(context -> Mono.empty())); + public Mono> createModels(List models) { + return createModelsWithResponse(models) + .map(Response::getValue); } - PagedFlux createModels(List models, Context context){ - return new PagedFlux<>( - () -> createModelsSinglePageAsync(models, context), - nextLink -> Mono.empty()); + /** + * Creates one or many models. + * @param models The list of models to create. Each string corresponds to exactly one model. + * @return A List of created models and the http response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public Mono>> createModelsWithResponse(List models) { + return withContext(context -> createModelsWithResponse(models, context)); } - Mono> createModelsSinglePageAsync(List models, Context context) - { + Mono>> createModelsWithResponse(List models, Context context) { List modelsPayload = new ArrayList<>(); for (String model: models) { try { @@ -776,21 +778,13 @@ Mono> createModelsSinglePageAsync(List models, } return protocolLayer.getDigitalTwinModels().addWithResponseAsync(modelsPayload, context) - .map( - objectPagedResponse -> { - List convertedList = objectPagedResponse.getValue().stream() - .map(ModelDataConverter::map) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - return new PagedResponseBase<>( - objectPagedResponse.getRequest(), - objectPagedResponse.getStatusCode(), - objectPagedResponse.getHeaders(), - convertedList, - null, - ((ResponseBase) objectPagedResponse).getDeserializedHeaders()); - } - ); + .map(listResponse -> { + List convertedList = listResponse.getValue().stream() + .map(ModelDataConverter::map) + .collect(Collectors.toList()); + + return new SimpleResponse<>(listResponse.getRequest(), listResponse.getStatusCode(), listResponse.getHeaders(), convertedList); + }); } /** diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 49b7fedcbd497..75aa1ec6770a3 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -454,15 +454,25 @@ public PagedIterable listIncomingRelationships(String digi // Models APIs //================================================================================================================================================== + /** + * Creates one or many models. + * @param models The list of models to create. Each string corresponds to exactly one model. + * @return A List of created models. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public List createModels(List models) { + return createModelsWithResponse(models, Context.NONE).getValue(); + } + /** * Creates one or many models. * @param models The list of models to create. Each string corresponds to exactly one model. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link PagedIterable} of created models and the http response. + * @return A List of created models and the http response. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable createModels(List models, Context context) { - return new PagedIterable<>(digitalTwinsAsyncClient.createModels(models, context)); + public Response> createModelsWithResponse(List models, Context context) { + return digitalTwinsAsyncClient.createModelsWithResponse(models, context).block(); } /** @@ -472,7 +482,8 @@ public PagedIterable createModels(List models, Context contex */ @ServiceMethod(returns = ReturnType.SINGLE) public ModelData getModel(String modelId) { - return digitalTwinsAsyncClient.getModel(modelId).block(); + + return getModelWithResponse(modelId, Context.NONE).getValue(); } /** diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java index 33740445bf2d4..9bfd91e267283 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java @@ -4,6 +4,8 @@ package com.azure.digitaltwins.core; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.digitaltwins.core.helpers.FileHelper; +import com.azure.digitaltwins.core.helpers.SamplesArguments; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; import com.azure.digitaltwins.core.implementation.serialization.BasicRelationship; import com.azure.identity.ClientSecretCredentialBuilder; @@ -26,8 +28,8 @@ import java.util.concurrent.TimeUnit; import static com.azure.digitaltwins.core.SamplesConstants.*; -import static com.azure.digitaltwins.core.SamplesUtil.IgnoreConflictError; -import static com.azure.digitaltwins.core.SamplesUtil.IgnoreNotFoundError; +import static com.azure.digitaltwins.core.helpers.SamplesUtil.IgnoreConflictError; +import static com.azure.digitaltwins.core.helpers.SamplesUtil.IgnoreNotFoundError; import static java.util.Arrays.asList; /** @@ -236,7 +238,7 @@ public static void createAllModels() throws IOException, InterruptedException { // Call API to create the models. For each async operation, once the operation is completed successfully, a latch is counted down. client.createModels(modelsToCreate) - .doOnNext(modelData -> System.out.println("Created model: " + modelData.getId())) + .doOnNext(listOfModelData -> System.out.println("Count of created models: " + listOfModelData.size())) .doOnError(IgnoreConflictError) .doOnTerminate(createModelsLatch::countDown) .subscribe(); diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java new file mode 100644 index 0000000000000..d4f14d266c2b7 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java @@ -0,0 +1,115 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.digitaltwins.core.helpers.ConsoleLogger; +import com.azure.digitaltwins.core.helpers.SamplesArguments; +import com.azure.digitaltwins.core.helpers.UniqueIdHelper; +import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; +import com.azure.digitaltwins.core.models.ModelData; +import com.azure.identity.ClientSecretCredentialBuilder; +import org.apache.http.HttpStatus; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.util.ArrayList; +import java.util.Arrays; + +/** + * Creates a component with a random Id. + * Creates a new model with a random Id that uses the previously created component. + * Decommission the newly created models (model and component) and check for success. + * Delete all created models and components. + */ +public class ModelsLifecycleSyncSamples { + + private static DigitalTwinsClient client; + + public static void main(String[] args) throws IOException, InterruptedException { + + SamplesArguments parsedArguments = new SamplesArguments(args); + + client = new DigitalTwinsClientBuilder() + .tokenCredential( + new ClientSecretCredentialBuilder() + .tenantId(parsedArguments.getTenantId()) + .clientId(parsedArguments.getClientId()) + .clientSecret(parsedArguments.getClientSecret()) + .build() + ) + .endpoint(parsedArguments.getDigitalTwinEndpoint()) + .httpLogOptions( + new HttpLogOptions() + .setLogLevel(parsedArguments.getHttpLogDetailLevel())) + .buildClient(); + + runModelLifecycleSample(); + } + + public static void runModelLifecycleSample() { + // For the purpose of this sample we will create temporary models using random model Ids and then decommission a model. + // We have to make sure these model Ids are unique within the DigitalTwin instance. + String componentModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TemporaryComponentModelPrefix, client); + String sampleModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TemporaryModelPrefix, client); + + String newComponentModelPayload = SamplesConstants.TemporaryComponentModelPayload + .replace(SamplesConstants.ComponentId, componentModelId); + + String newModelPayload = SamplesConstants.TemporaryModelWithComponentPayload + .replace(SamplesConstants.ModelId, sampleModelId) + .replace(SamplesConstants.ComponentId, componentModelId); + + ConsoleLogger.PrintHeader("Create models"); + + try { + client.createModels(new ArrayList(Arrays.asList(newComponentModelPayload, newModelPayload))); + + ConsoleLogger.PrintSuccess("Created models " + componentModelId + " and " + sampleModelId); + } + catch (ErrorResponseException ex) { + if (ex.getResponse().getStatusCode() == HttpURLConnection.HTTP_CONFLICT) { + ConsoleLogger.PrintWarning("One or more models already existed"); + } + } + catch (Exception ex) { + ConsoleLogger.PrintFatal("Failed to create models due to: \n" + ex); + System.exit(0); + } + + ConsoleLogger.PrintHeader("Get models"); + + try { + ModelData sampleModelResponse = client.getModel(sampleModelId); + ConsoleLogger.PrintSuccess("Retrieved model " + sampleModelResponse.getId()); + } + catch (Exception ex) { + ConsoleLogger.PrintFatal("Failed to get the model due to:\n" + ex); + System.exit(0); + } + + ConsoleLogger.PrintHeader("Decommission models"); + + try { + client.decommissionModel(sampleModelId); + client.decommissionModel(componentModelId); + + ConsoleLogger.PrintSuccess("Decommissioned "+ sampleModelId + " and " + componentModelId); + } + catch (Exception ex) { + ConsoleLogger.PrintFatal("Failed to decommission models due to:\n" + ex); + System.exit(0); + } + + ConsoleLogger.PrintHeader("Delete models"); + + try { + client.deleteModel(sampleModelId); + client.deleteModel(componentModelId); + + ConsoleLogger.PrintSuccess("Deleted "+ sampleModelId + " and " + componentModelId); + } + catch (Exception ex) { + ConsoleLogger.PrintFatal("Failed to deleteModel models due to:\n" + ex); + System.exit(0); + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java index 4838dec3a12a0..0771e7f97e747 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java @@ -9,4 +9,65 @@ public class SamplesConstants { public static final String BuildingModelId = "dtmi:samples:Building;1"; public static final String FloorModelId = "dtmi:samples:Floor;1"; public static final String HvacModelId = "dtmi:samples:HVAC;1"; + + public static final String TemporaryComponentModelPrefix = "dtmi:samples:ComponentModel;"; + public static final String TemporaryModelPrefix = "dtmi:samples:TempModel;"; + + public static final String ComponentId = "COMPONENT_ID"; + public static final String ModelId = "MODEL_ID"; + + public static final String TemporaryComponentModelPayload = + "{" + + "\"@id\": \"" + ComponentId + "\","+ + "\"@type\": \"Interface\"," + + "\"@context\": \"dtmi:dtdl:context;2\"," + + "\"displayName\": \"Component1\"," + + "\"contents\": [" + + "{" + + "\"@type\": \"Property\"," + + "\"name\": \"ComponentProp1\"," + + "\"schema\": \"string\"" + + "}," + + "{" + + "\"@type\": \"Property\"," + + "\"name\": \"ComponentProp2\"," + + "\"schema\": \"integer\"" + + "}," + + "{" + + "\"@type\": \"Telemetry\"," + + "\"name\": \"ComponentTelemetry1\"," + + "\"schema\": \"integer\"" + + "}" + + "]" + + "}"; + + public static final String TemporaryModelWithComponentPayload = + "{" + + "\"@id\": \""+ ModelId + "\"," + + "\"@type\": \"Interface\"," + + "\"@context\": \"dtmi:dtdl:context;2\"," + + "\"displayName\": \"TempModel\"," + + "\"contents\": [" + + "{" + + "\"@type\": \"Property\"," + + "\"name\": \"Prop1\"," + + "\"schema\": \"string\"" + + "}," + + "{" + + "\"@type\": \"Property\"," + + "\"name\": \"Prop2\"," + + "\"schema\": \"integer\"" + + "}," + + "{" + + "\"@type\": \"Component\"," + + "\"name\": \"Component1\"," + + "\"schema\": \"" + ComponentId + "\"" + + "}," + + "{" + + "\"@type\": \"Telemetry\"," + + "\"name\": \"Telemetry1\"," + + "\"schema\": \"integer\"" + + "}" + + "]" + + "}"; } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/ConsoleLogger.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/ConsoleLogger.java new file mode 100644 index 0000000000000..09ea96eef5bd1 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/ConsoleLogger.java @@ -0,0 +1,27 @@ +package com.azure.digitaltwins.core.helpers; + +public class ConsoleLogger { + + // Foreground colors + private static final String ANSI_RESET = "\u001B[0m"; + private static final String ANSI_RED = "\u001B[31m"; + private static final String ANSI_GREEN = "\u001B[32m"; + public static final String ANSI_YELLOW = "\u001B[33m"; + private static final String ANSI_CYAN = "\u001B[36m"; + + public static void PrintHeader(String message) { + System.out.println(ANSI_CYAN + "\n===" + message.toUpperCase() + "===\n" + ANSI_RESET); + } + + public static void PrintSuccess(String message) { + System.out.println(ANSI_GREEN + message + ANSI_RESET); + } + + public static void PrintWarning(String message) { + System.out.println(ANSI_YELLOW + message + ANSI_RESET); + } + + public static void PrintFatal(String message) { + System.out.println(ANSI_RED + message + ANSI_RESET); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/FileHelper.java similarity index 97% rename from sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/FileHelper.java index 80c0a63cecc28..6ab2675fe4a05 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/FileHelper.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/FileHelper.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.helpers; import java.io.IOException; import java.nio.file.Files; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesArguments.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesArguments.java similarity index 97% rename from sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesArguments.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesArguments.java index ebe7fcd03668d..93a80eb95b186 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesArguments.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesArguments.java @@ -1,4 +1,4 @@ -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.helpers; import com.azure.core.http.policy.HttpLogDetailLevel; import org.apache.commons.cli.*; @@ -49,7 +49,7 @@ public SamplesArguments(String[] args) { System.out.println(e.getMessage()); formatter.printHelp("java .jar", options); - System.exit(1); + System.exit(0); } this.digitalTwinEndpoint = cmd.getOptionValue(DIGITALTWINS_URL); @@ -70,7 +70,7 @@ public SamplesArguments(String[] args) { System.out.println("Provided log detail level must be an integer ranging from 0 - 4"); formatter.printHelp("java .jar", options); - System.exit(1); + System.exit(0); } } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesUtil.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java similarity index 95% rename from sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesUtil.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java index 6ca813c4e48b8..6e73ad6e635f5 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesUtil.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.helpers; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; import org.apache.http.HttpStatus; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java new file mode 100644 index 0000000000000..4f0214413b5f6 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java @@ -0,0 +1,38 @@ +package com.azure.digitaltwins.core.helpers; + +import com.azure.digitaltwins.core.DigitalTwinsClient; +import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; + +import java.net.HttpURLConnection; +import java.util.Random; +import java.util.function.Function; + +public class UniqueIdHelper { + private static final Random random = new Random(); + + public static String getUniqueModelId(String baseName, DigitalTwinsClient client) { + return getUniqueId(baseName, (modelId -> client.getModel(modelId).getId())); + } + + + private static String getUniqueId(String baseName, Function getResource) { + int maxAttempts = 10; + int maxVal = 10000; + String id = baseName + random.nextInt(maxVal); + + for (int attemptsMade = 0 ; attemptsMade < maxAttempts ; attemptsMade ++ ) { + try { + getResource.apply(id); + } + catch (ErrorResponseException ex){ + if (ex.getResponse().getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) { + return id; + } + } + + id = baseName + random.nextInt(maxVal); + } + + throw new IllegalStateException("Unique id could not be found with base name" + baseName); + } +} From 75ff7da0fe4573b946f10c8fd22da6533a81dd1b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Sun, 6 Sep 2020 14:57:16 -0700 Subject: [PATCH 113/168] Sync eng/common directory with azure-sdk-tools repository for Tools PR 969 (#14850) --- eng/common/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/README.md b/eng/common/README.md index 10fcb49f2a888..a8f013b05b741 100644 --- a/eng/common/README.md +++ b/eng/common/README.md @@ -20,6 +20,6 @@ The 'Sync eng/common directory' PRs will be created in the language repositories 3. More changes pushed to the **Tools PR**, will automatically triggered new pipeline runs in the respective **Sync PRs**. The **Sync PRs** are used to make sure the changes would not break any of the connected pipelines. 4. Once satisfied with the changes; - First make sure all checks in the **Sync PRs** are green and approved. The **Tools PR** contains links to all the **Sync PRs**. If for some reason the PRs is blocked by a CI gate get someone with permission to override and manually merge the PR. - - To test the state of all the **Sync PRs**, you can download the `PRsCreated.txt` artifact from the `azure-sdk-tools - sync - eng-common` pipeline, with that run the [Verify-And-Merge-PRs.ps1](https://github.com/Azure/azure-sdk-tools/blob/master/scripts/powershell/Verify-And-Merge-PRs.ps1) passing the downloaded `PRsCreated.txt` file path for `PRDataArtifactPath` and `false` to `ShouldMerge`. - - Next approve the `VerifyAndMerge` job for the `azure-sdk-tools - sync - eng-common` pipeline triggered by your **Tools PR** which will automatically merge all the **Sync PRs**. You need `azure-sdk` devops contributor permissions to reach the `azure-sdk-tools - sync - eng-common` pipeline. + - To test the state of all the **Sync PRs**, you can download the `PRsCreated.txt` artifact from your `azure-sdk-tools - sync - eng-common` pipeline, then run `./eng/scripts/Verify-And-Merge.ps1 ` which will output the status of each associated PR. + - Next approve the `VerifyAndMerge` job for the `azure-sdk-tools - sync - eng-common` pipeline triggered by your **Tools PR** which will automatically merge all the **Sync PRs**. You need `azure-sdk` devops contributor permissions to reach the `azure-sdk-tools - sync - eng-common` pipeline. - Finally merge the **Tools PR**. \ No newline at end of file From cc372c8484deed301152035042f6600f3aa976b9 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 7 Sep 2020 11:57:23 +0800 Subject: [PATCH 114/168] revert deleting of @Fluent (#14866) --- .../resourcemanager/trafficmanager/fluent/HeatMapsClient.java | 2 -- .../trafficmanager/fluent/inner/EndpointInner.java | 2 ++ .../trafficmanager/fluent/inner/HeatMapModelInner.java | 2 ++ .../trafficmanager/fluent/inner/ProfileInner.java | 2 ++ .../fluent/inner/TrafficManagerGeographicHierarchyInner.java | 2 ++ .../fluent/inner/TrafficManagerNameAvailabilityInner.java | 2 ++ .../trafficmanager/fluent/inner/UserMetricsModelInner.java | 2 ++ ...heckTrafficManagerRelativeDnsNameAvailabilityParameters.java | 2 ++ .../azure/resourcemanager/trafficmanager/models/DnsConfig.java | 2 ++ .../models/EndpointPropertiesCustomHeadersItem.java | 2 ++ .../trafficmanager/models/EndpointPropertiesSubnetsItem.java | 2 ++ .../resourcemanager/trafficmanager/models/HeatMapEndpoint.java | 2 ++ .../resourcemanager/trafficmanager/models/MonitorConfig.java | 2 ++ .../trafficmanager/models/MonitorConfigCustomHeadersItem.java | 2 ++ .../models/MonitorConfigExpectedStatusCodeRangesItem.java | 2 ++ .../trafficmanager/models/ProfileListResult.java | 2 ++ .../resourcemanager/trafficmanager/models/QueryExperience.java | 2 ++ .../com/azure/resourcemanager/trafficmanager/models/Region.java | 2 ++ .../resourcemanager/trafficmanager/models/TrafficFlow.java | 2 ++ 19 files changed, 36 insertions(+), 2 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java index 09c28e79181be..4e810ce7b1ba9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java @@ -250,7 +250,6 @@ public Mono getAsync( public Mono getAsync(String resourceGroupName, String profileName) { final List topLeft = null; final List botRight = null; - final Context context = null; return getWithResponseAsync(resourceGroupName, profileName, topLeft, botRight) .flatMap( (Response res) -> { @@ -294,7 +293,6 @@ public HeatMapModelInner get( public HeatMapModelInner get(String resourceGroupName, String profileName) { final List topLeft = null; final List botRight = null; - final Context context = null; return getAsync(resourceGroupName, profileName, topLeft, botRight).block(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/EndpointInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/EndpointInner.java index e685c184b6ffd..2fcc3f5e41e7e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/EndpointInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/EndpointInner.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.trafficmanager.fluent.inner; +import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; @@ -17,6 +18,7 @@ /** The Endpoint model. */ @JsonFlatten +@Fluent public class EndpointInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointInner.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/HeatMapModelInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/HeatMapModelInner.java index 292855219a0c4..671cb623dd9df 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/HeatMapModelInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/HeatMapModelInner.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.trafficmanager.fluent.inner; +import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; @@ -16,6 +17,7 @@ /** The HeatMapModel model. */ @JsonFlatten +@Fluent public class HeatMapModelInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(HeatMapModelInner.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/ProfileInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/ProfileInner.java index 54a2817524a14..cad66538f6260 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/ProfileInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/ProfileInner.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.trafficmanager.fluent.inner; +import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; @@ -18,6 +19,7 @@ /** The Profile model. */ @JsonFlatten +@Fluent public class ProfileInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ProfileInner.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerGeographicHierarchyInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerGeographicHierarchyInner.java index 24f11d14d1a87..aa1d7e56ba4e4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerGeographicHierarchyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerGeographicHierarchyInner.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.trafficmanager.fluent.inner; +import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; @@ -13,6 +14,7 @@ /** The TrafficManagerGeographicHierarchy model. */ @JsonFlatten +@Fluent public class TrafficManagerGeographicHierarchyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(TrafficManagerGeographicHierarchyInner.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerNameAvailabilityInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerNameAvailabilityInner.java index 76c9b87e5ba88..389b0e75b3fcc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerNameAvailabilityInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/TrafficManagerNameAvailabilityInner.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.fluent.inner; +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; /** The TrafficManagerNameAvailability model. */ +@Fluent public final class TrafficManagerNameAvailabilityInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(TrafficManagerNameAvailabilityInner.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/UserMetricsModelInner.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/UserMetricsModelInner.java index 498dc277bd492..43cad0dfdfee0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/UserMetricsModelInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/inner/UserMetricsModelInner.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.trafficmanager.fluent.inner; +import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; @@ -12,6 +13,7 @@ /** The UserMetricsModel model. */ @JsonFlatten +@Fluent public class UserMetricsModelInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(UserMetricsModelInner.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java index 42d80888ff78d..0757ffda17682 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.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; /** The CheckTrafficManagerRelativeDnsNameAvailabilityParameters model. */ +@Fluent public final class CheckTrafficManagerRelativeDnsNameAvailabilityParameters { @JsonIgnore private final ClientLogger logger = diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java index ebc140707b75f..67405408cee98 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.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; /** The DnsConfig model. */ +@Fluent public final class DnsConfig { @JsonIgnore private final ClientLogger logger = new ClientLogger(DnsConfig.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java index 8f64a9b2cdea8..8d682d93133a5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.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; /** The EndpointPropertiesCustomHeadersItem model. */ +@Fluent public final class EndpointPropertiesCustomHeadersItem { @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointPropertiesCustomHeadersItem.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java index b0130832dc9c9..adcec43640cfc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.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; /** The EndpointPropertiesSubnetsItem model. */ +@Fluent public final class EndpointPropertiesSubnetsItem { @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointPropertiesSubnetsItem.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java index bb33e2a6998b4..f4eded67b42e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.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; /** The HeatMapEndpoint model. */ +@Fluent public final class HeatMapEndpoint { @JsonIgnore private final ClientLogger logger = new ClientLogger(HeatMapEndpoint.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java index 511229fd443d8..de5e84f41ef4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java @@ -4,12 +4,14 @@ package com.azure.resourcemanager.trafficmanager.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; /** The MonitorConfig model. */ +@Fluent public final class MonitorConfig { @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorConfig.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java index db4b268dffb54..944ff09c87c1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.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; /** The MonitorConfigCustomHeadersItem model. */ +@Fluent public final class MonitorConfigCustomHeadersItem { @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorConfigCustomHeadersItem.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java index af096ef2d2743..a201fbcc6ed57 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.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; /** The MonitorConfigExpectedStatusCodeRangesItem model. */ +@Fluent public final class MonitorConfigExpectedStatusCodeRangesItem { @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorConfigExpectedStatusCodeRangesItem.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java index a37847420ef8d..f1feb1d381131 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.trafficmanager.models; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.trafficmanager.fluent.inner.ProfileInner; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -11,6 +12,7 @@ import java.util.List; /** The ProfileListResult model. */ +@Fluent public final class ProfileListResult { @JsonIgnore private final ClientLogger logger = new ClientLogger(ProfileListResult.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java index 8d8f8f50e4e3e..a537edd18c5f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.trafficmanager.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; /** The QueryExperience model. */ +@Fluent public final class QueryExperience { @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryExperience.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java index 6592906d653fc..027aa239b0abc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java @@ -4,12 +4,14 @@ package com.azure.resourcemanager.trafficmanager.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; /** The Region model. */ +@Fluent public final class Region { @JsonIgnore private final ClientLogger logger = new ClientLogger(Region.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java index 0d8a82dc0a212..1d4629159dc7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java @@ -4,12 +4,14 @@ package com.azure.resourcemanager.trafficmanager.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; /** The TrafficFlow model. */ +@Fluent public final class TrafficFlow { @JsonIgnore private final ClientLogger logger = new ClientLogger(TrafficFlow.class); From b598dcddc9b353788e546609f6468ab2c94c9acb Mon Sep 17 00:00:00 2001 From: Rujun Chen Date: Mon, 7 Sep 2020 12:52:19 +0800 Subject: [PATCH 115/168] Fix pipeline failure caused by install java/maven/git failed. (#14775) * Enable KeyVaultIT.keyVaultWithVirtualMachineMSI. * 1. Remove download script from git. 2. Add retry logic. * Move retry logic into sh script. * ignore KeyVaultIT.keyVaultWithVirtualMachineMSI * Add newline at end of file. * Not install maven and git. * Not ignore keyVaultWithVirtualMachineMSI(). * Reinstall openjsk-9-jre-headless. * reinstall 2 more modules. * Install default-jdk * Add -y in apt-get install * Add install_java_with_retry.sh * Test just try one time. * Update retry logic. * Update until do logic * retry 5 times if install java failed. * Fix error about: Permisstion denied. * ignore test keyVaultWithVirtualMachineMSI. Co-authored-by: Rujun Chen --- .../install_java.sh | 8 ++++++ .../install_java_with_retry.sh | 25 +++++++++++++++++++ .../test-resources.json | 5 ++-- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 sdk/spring/azure-spring-boot-test-keyvault/install_java.sh create mode 100644 sdk/spring/azure-spring-boot-test-keyvault/install_java_with_retry.sh diff --git a/sdk/spring/azure-spring-boot-test-keyvault/install_java.sh b/sdk/spring/azure-spring-boot-test-keyvault/install_java.sh new file mode 100644 index 0000000000000..cef4acf466b8b --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-keyvault/install_java.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -eux + +cd "$(dirname "$0")" + + +sudo apt-get update +sudo apt-get install -y default-jdk diff --git a/sdk/spring/azure-spring-boot-test-keyvault/install_java_with_retry.sh b/sdk/spring/azure-spring-boot-test-keyvault/install_java_with_retry.sh new file mode 100644 index 0000000000000..bb381803d3918 --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-keyvault/install_java_with_retry.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -eux + +cd "$(dirname "$0")" + +chmod +x install_java.sh + +for i in $(seq 1 5) +do + if [ $i -gt 1 ] + then + echo "Failed, retry after 5 seconds." + sleep 5 + fi + if ./install_java.sh + then + s=0 + break + else + s=$? + fi +done + +exit $s diff --git a/sdk/spring/azure-spring-boot-test-keyvault/test-resources.json b/sdk/spring/azure-spring-boot-test-keyvault/test-resources.json index 9c96ee93ab748..df69d72a65558 100644 --- a/sdk/spring/azure-spring-boot-test-keyvault/test-resources.json +++ b/sdk/spring/azure-spring-boot-test-keyvault/test-resources.json @@ -208,9 +208,10 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ - "https://raw.githubusercontent.com/Azure/azure-libraries-for-java/master/azure-samples/src/main/resources/install_jva_mvn_git.sh" + "https://raw.githubusercontent.com/chenrujun/azure-sdk-for-java/enable-KeyVaultIT.keyVaultWithVirtualMachineMSI-1/sdk/spring/azure-spring-boot-test-keyvault/install_java.sh", + "https://raw.githubusercontent.com/chenrujun/azure-sdk-for-java/enable-KeyVaultIT.keyVaultWithVirtualMachineMSI-1/sdk/spring/azure-spring-boot-test-keyvault/install_java_with_retry.sh" ], - "commandToExecute": "bash install_jva_mvn_git.sh" + "commandToExecute": "bash install_java_with_retry.sh" }, "protectedSettings": { "commandToExecute": "" From 7c2443578cd5e6d293a385efb42cfe9dc9e8bc4e Mon Sep 17 00:00:00 2001 From: zhoufenqin Date: Mon, 7 Sep 2020 13:06:45 +0800 Subject: [PATCH 116/168] Revert "Implement new version schema for cosmosdb starter (#14465)" (#14867) This reverts commit a5acccf35cbf14ce990188b4f60920bc7f3a6292. --- .gitignore | 4 - eng/jacoco-test-coverage/pom.xml | 9 +- .../templates/stages/cosmos-sdk-client.yml | 4 +- eng/versioning/external_dependencies.txt | 9 - eng/versioning/version_client.txt | 3 +- sdk/cosmos/tests.yml | 4 +- sdk/spring/README.md | 4 +- .../CHANGELOG.md | 4 - .../README.md | 57 ----- .../pom.xml | 181 ---------------- .../src/main/resources/cosmosdb.enable.config | 1 - .../pom.xml | 4 +- .../azure-spring-boot-sample-cosmosdb/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../CHANGELOG.md | 0 .../README.md | 14 +- .../pom.xml | 8 +- .../src/main/resources/cosmosdb.enable.config | 0 .../azure-spring-boot-starter/README.md | 3 +- .../azure-spring-boot-test-cosmosdb/pom.xml | 6 +- sdk/spring/azure-spring-boot/README.md | 3 +- sdk/spring/ci.yml | 7 +- sdk/spring/pom.xml | 3 +- sdk/spring/scripts/artifact_id_pair.py | 11 - sdk/spring/scripts/replace_artifact.py | 108 ++++++++++ sdk/spring/scripts/replace_util.py | 202 ------------------ sdk/spring/scripts/version_update_item.py | 11 - sdk/spring/tests.yml | 40 ---- 29 files changed, 142 insertions(+), 570 deletions(-) delete mode 100644 sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/CHANGELOG.md delete mode 100644 sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md delete mode 100644 sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/pom.xml delete mode 100644 sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/src/main/resources/cosmosdb.enable.config rename sdk/spring/{azure-spring-boot-2-3-starter-cosmosdb => azure-spring-boot-starter-cosmosdb}/CHANGELOG.md (100%) rename sdk/spring/{azure-spring-boot-2-3-starter-cosmosdb => azure-spring-boot-starter-cosmosdb}/README.md (94%) rename sdk/spring/{azure-spring-boot-2-3-starter-cosmosdb => azure-spring-boot-starter-cosmosdb}/pom.xml (96%) rename sdk/spring/{azure-spring-boot-2-2-starter-cosmosdb => azure-spring-boot-starter-cosmosdb}/src/main/resources/cosmosdb.enable.config (100%) delete mode 100644 sdk/spring/scripts/artifact_id_pair.py create mode 100644 sdk/spring/scripts/replace_artifact.py delete mode 100644 sdk/spring/scripts/replace_util.py delete mode 100644 sdk/spring/scripts/version_update_item.py diff --git a/.gitignore b/.gitignore index 08f1238124660..59d73dd145552 100644 --- a/.gitignore +++ b/.gitignore @@ -80,7 +80,3 @@ jacoco.exec # Generated client pom file ClientAggregatePom.xml - - -# Anaconda virtual -venv diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 8320394d3a31e..e3c74fb2d4ded 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -364,13 +364,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-2-3-starter - 2.4.0-beta.1 - - - com.microsoft.azure - azure-cosmosdb-spring-boot-2-2-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-starter + 2.4.0-beta.1 com.microsoft.azure diff --git a/eng/pipelines/templates/stages/cosmos-sdk-client.yml b/eng/pipelines/templates/stages/cosmos-sdk-client.yml index 2d6e1c7948f2a..5496e68350f6e 100644 --- a/eng/pipelines/templates/stages/cosmos-sdk-client.yml +++ b/eng/pipelines/templates/stages/cosmos-sdk-client.yml @@ -153,9 +153,9 @@ stages: - script: | python --version python -m pip install setuptools termcolor in_place - python sdk/spring/scripts/replace_util.py --module cosmos --log debug --color false + python sdk/spring/scripts/replace_artifact.py --module cosmos --log debug --color false condition: eq(variables['DisplayName'], 'Spring Emulator only Integration Tests') - displayName: 'Run replace_util.py' + displayName: 'Run replace_artifact.py' - task: Maven@3 condition: eq(variables['DisplayName'], 'Spring Emulator only Integration Tests') displayName: 'Run tests again: $(DisplayName)' diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 02cb28990d00c..381f75876cd7e 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -316,14 +316,5 @@ storage_com.microsoft.azure:azure-storage;8.4.0 # sdk\spring\azure-spring-boot\pom.xml spring_com.microsoft.azure:azure;1.34.0 -# sdk\spring\azure-spring-boot-2-2-starter-cosmosdb\pom.xml -springboot22_com.microsoft.azure:spring-data-cosmosdb;2.2.2.M2 -springboot22_org.springframework.boot:spring-boot-starter;2.2.9.RELEASE -springboot22_org.springframework.boot:spring-boot;2.2.9.RELEASE -springboot22_org.springframework.boot:spring-boot-starter-validation;2.2.9.RELEASE -springboot22_org.springframework.boot:spring-boot-starter-test;2.2.9.RELEASE -springboot22_org.springframework.boot:spring-boot-starter-actuator;2.2.9.RELEASE -springboot22_org.springframework.boot:spring-boot-starter-web;2.2.9.RELEASE - # sdk\cosmos springdata22_org.springframework.data:spring-data-commons;2.2.9.RELEASE diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 99923bb848830..958fa887898fb 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -91,8 +91,7 @@ com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.0.0-beta.4;2.0. com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.4;2.0.0-beta.5 com.microsoft.azure:azure-active-directory-b2c-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter;2.4.0-beta.1;2.4.0-beta.1 -com.microsoft.azure:azure-cosmosdb-spring-boot-2-2-starter;2.4.0-beta.1;2.4.0-beta.1 +com.microsoft.azure:azure-cosmosdb-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-data-gremlin-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.3.3;2.4.0-beta.1 diff --git a/sdk/cosmos/tests.yml b/sdk/cosmos/tests.yml index 761a1ca6c0be3..c048cb8791f65 100644 --- a/sdk/cosmos/tests.yml +++ b/sdk/cosmos/tests.yml @@ -270,8 +270,8 @@ jobs: - script: | python --version python -m pip install setuptools termcolor in_place - python sdk/spring/scripts/replace_util.py --module cosmos --log debug --color false - displayName: 'Run replace_util.py' + python sdk/spring/scripts/replace_artifact.py --module cosmos --log debug --color false + displayName: 'Run replace_artifact.py' - task: Maven@3 displayName: 'Build and Install again, JDK Version: $(JavaBuildVersion)' inputs: diff --git a/sdk/spring/README.md b/sdk/spring/README.md index f7f3fc17bf14a..4a831a548a9d5 100644 --- a/sdk/spring/README.md +++ b/sdk/spring/README.md @@ -25,9 +25,7 @@ Starter Name | Version for Spring Boot 2.3.x | Version for Spring Boot 2.2.x | V [azure-storage-spring-boot-starter](azure-spring-boot-starter-storage/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-storage-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.0.*) [azure-keyvault-secrets-spring-boot-starter](azure-spring-boot-starter-keyvault-secrets/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-keyvault-secrets-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.0.*) [azure-active-directory-b2c-spring-boot-starter](azure-spring-boot-starter-active-directory-b2c/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-active-directory-b2c-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.2.*) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.1.*) | N/A -azure-cosmosdb-spring-boot-starter | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*) -[azure-cosmosdb-spring-boot-2-2-starter](azure-spring-boot-2-2-starter-cosmosdb/README.md) | N/A | N/A | N/A | N/A -[azure-cosmosdb-spring-boot-2-3-starter](azure-spring-boot-2-3-starter-cosmosdb/README.md) | N/A | N/A | N/A | N/A +[azure-cosmosdb-spring-boot-starter](azure-spring-boot-starter-cosmosdb/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*) [azure-mediaservices-spring-boot-starter](azure-spring-boot-starter-mediaservices/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-mediaservices-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.0.*) [azure-servicebus-spring-boot-starter](azure-spring-boot-starter-servicebus/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-servicebus-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.0.*) [spring-data-gremlin-boot-starter](azure-spring-boot-starter-data-gremlin/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22spring-data-gremlin-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.0.*) diff --git a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/CHANGELOG.md b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/CHANGELOG.md deleted file mode 100644 index b995c29e5fc99..0000000000000 --- a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -# Release History - - -## 2.4.0-beta.1 (Unreleased) diff --git a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md deleted file mode 100644 index 0d606e3065544..0000000000000 --- a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Azure Cosmos DB Spring Boot 2.2 Starter client library for Java - -[Azure Cosmos DB](https://azure.microsoft.com/services/cosmos-db/) is a globally-distributed database service that allows developers to work with data using a variety of standard APIs, such as SQL, MongoDB, Graph, and Azure Table storage. - -[Package (Maven)][package] | [API reference documentation][refdocs] | [Product documentation][docs] | [Samples][sample] - -## Getting started -### Prerequisites -- Java Development Kit (JDK) with version 8 or above -- [Azure Subscription][azure_subscription] -- [Maven](http://maven.apache.org/) 3.0 and above - -### Include the package -[//]: # ({x-version-update-start;com.microsoft.azure:azure-cosmosdb-spring-boot-2-2-starter;current}) -```xml - - com.microsoft.azure - azure-cosmosdb-spring-boot-2-2-starter - 2.4.0-beta.1 - -``` -[//]: # ({x-version-update-end}) - -## Key concepts -Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_key_concepts] for key concepts. - -## Examples -Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_examples] for examples. - -## Troubleshooting -Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_troubleshooting] for troubleshooting. - -## Next steps - -Besides using this Azure CosmosDb Spring Boot Starter, you can directly use Spring Data for Azure CosmosDb package for more complex scenarios. Please refer to [Spring Data for Azure CosmosDB](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core) for more details. - -The following section provide a sample project illustrating how to use the starter. -### More sample code -- [Cosmos DB SQL API][cosmos_db_sql_api] - -## Contributing -This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. - -Please follow [instructions here][contributing_readme] to build from source or contribute. - - -[docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-cosmos-db -[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#azure-cosmosdb-spring-boot-starter -[package]: https://mvnrepository.com/artifact/com.microsoft.azure/azure-cosmosdb-spring-boot-starter -[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb -[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application -[azure_subscription]: https://azure.microsoft.com/free -[azure_spring_boot_2_3_starter_cosmosdb_readme_key_concepts]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#key-concepts -[azure_spring_boot_2_3_starter_cosmosdb_readme_examples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#examples -[azure_spring_boot_2_3_starter_cosmosdb_readme_troubleshooting]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#troubleshooting -[cosmos_db_sql_api]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb -[contributing_readme]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md diff --git a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/pom.xml deleted file mode 100644 index 7e37ea64bd44c..0000000000000 --- a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/pom.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - 4.0.0 - - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - - - com.microsoft.azure - azure-cosmosdb-spring-boot-2-2-starter - 2.4.0-beta.1 - - Azure Cosmos DB Spring Boot 2.2 Starter - Spring Boot 2.2 Starter for Azure Cosmos DB service - https://github.com/Azure/azure-sdk-for-java - - - - org.springframework.boot - spring-boot-starter - 2.2.9.RELEASE - - - org.springframework.boot - spring-boot-starter-validation - 2.2.9.RELEASE - - - com.microsoft.azure - azure-spring-boot - 2.4.0-beta.1 - - - com.microsoft.azure - spring-data-cosmosdb - 2.2.2.M2 - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M3 - - - - - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] - com.microsoft.azure:spring-data-cosmosdb:[2.2.2.M2] - org.springframework.boot:spring-boot-starter:[2.2.9.RELEASE] - org.springframework.boot:spring-boot-starter-validation:[2.2.9.RELEASE] - - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - - attach-javadocs - - jar - - - true - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - - empty-javadoc-jar-with-readme - package - - jar - - - javadoc - ${project.basedir}/javadocTemp - - - - - - empty-sources-jar-with-readme - package - - jar - - - sources - ${project.basedir}/sourceTemp - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - copy-readme-to-javadocTemp - prepare-package - - - Deleting existing ${project.basedir}/javadocTemp - - - - Copying ${project.basedir}/README.md to - ${project.basedir}/javadocTemp/README.md - - - - - - run - - - - copy-readme-to-sourceTemp - prepare-package - - - Deleting existing ${project.basedir}/sourceTemp - - - - Copying ${project.basedir}/README.md to - ${project.basedir}/sourceTemp/README.md - - - - - - run - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.0.1 - - - attach-sources - none - - - - - - - diff --git a/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/src/main/resources/cosmosdb.enable.config b/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/src/main/resources/cosmosdb.enable.config deleted file mode 100644 index 2995a4d0e7491..0000000000000 --- a/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/src/main/resources/cosmosdb.enable.config +++ /dev/null @@ -1 +0,0 @@ -dummy \ No newline at end of file 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 c37a2dd629992..0679465ad6b90 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 @@ -21,8 +21,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-2-3-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-starter + 2.4.0-beta.1 com.microsoft.azure diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml index 6de0c15674b86..0b34ed7bd23d0 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml @@ -21,8 +21,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-2-3-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-starter + 2.4.0-beta.1 org.springframework.boot diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml index 2e6af04539aec..6433a1c135d9a 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml @@ -30,8 +30,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-2-3-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-starter + 2.4.0-beta.1 com.google.guava diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml index a111862ac459c..644d98045c0a7 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml @@ -31,8 +31,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-2-3-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-starter + 2.4.0-beta.1 com.google.guava diff --git a/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter-cosmosdb/CHANGELOG.md similarity index 100% rename from sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/CHANGELOG.md rename to sdk/spring/azure-spring-boot-starter-cosmosdb/CHANGELOG.md diff --git a/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/README.md b/sdk/spring/azure-spring-boot-starter-cosmosdb/README.md similarity index 94% rename from sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/README.md rename to sdk/spring/azure-spring-boot-starter-cosmosdb/README.md index 99a5854cc9ae4..c75c96d6a5e8b 100644 --- a/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/README.md +++ b/sdk/spring/azure-spring-boot-starter-cosmosdb/README.md @@ -1,4 +1,4 @@ -# Azure Cosmos DB Spring Boot 2.3 Starter client library for Java +# Azure Cosmos DB Spring Boot Starter client library for Java [Azure Cosmos DB](https://azure.microsoft.com/services/cosmos-db/) is a globally-distributed database service that allows developers to work with data using a variety of standard APIs, such as SQL, MongoDB, Graph, and Azure Table storage. @@ -11,12 +11,12 @@ - [Maven](http://maven.apache.org/) 3.0 and above ### Include the package -[//]: # ({x-version-update-start;com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter;current}) +[//]: # ({x-version-update-start;com.microsoft.azure:azure-cosmosdb-spring-boot-starter;current}) ```xml com.microsoft.azure - azure-cosmosdb-spring-boot-2-3-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-starter + 2.3.3 ``` [//]: # ({x-version-update-end}) @@ -235,12 +235,12 @@ Besides using this Azure CosmosDb Spring Boot Starter, you can directly use Spri The following section provide a sample project illustrating how to use the starter. ### More sample code -- [Cosmos DB SQL API][cosmos_db_sql_api] +- [Cosmos DB SQL API](../azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb) ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. -Please follow [instructions here][contributing_readme] to build from source or contribute. +Please follow [instructions here](../CONTRIBUTING.md) to build from source or contribute. [docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-cosmos-db @@ -249,5 +249,3 @@ Please follow [instructions here][contributing_readme] to build from source or c [sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb [logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application [azure_subscription]: https://azure.microsoft.com/free -[cosmos_db_sql_api]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb -[contributing_readme]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md diff --git a/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml similarity index 96% rename from sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/pom.xml rename to sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml index 2893b8da1b2c1..a9c4a380fd0a6 100644 --- a/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml @@ -12,11 +12,11 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-2-3-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-starter + 2.4.0-beta.1 - Azure Cosmos DB Spring Boot 2.3 Starter - Spring Boot 2.3 Starter for Azure Cosmos DB service + Azure Cosmos DB Spring Boot Starter + Spring Boot Starter for Azure Document DB service https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/src/main/resources/cosmosdb.enable.config b/sdk/spring/azure-spring-boot-starter-cosmosdb/src/main/resources/cosmosdb.enable.config similarity index 100% rename from sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/src/main/resources/cosmosdb.enable.config rename to sdk/spring/azure-spring-boot-starter-cosmosdb/src/main/resources/cosmosdb.enable.config diff --git a/sdk/spring/azure-spring-boot-starter/README.md b/sdk/spring/azure-spring-boot-starter/README.md index 9f23a4fff799a..2bf40e9f73681 100644 --- a/sdk/spring/azure-spring-boot-starter/README.md +++ b/sdk/spring/azure-spring-boot-starter/README.md @@ -35,8 +35,7 @@ Starter Name | Version for Spring Boot 2.3.x | Version for Spring Boot 2.2.x | V [azure-storage-spring-boot-starter](../azure-spring-boot-starter-storage/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-storage-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.0.*) [azure-keyvault-secrets-spring-boot-starter](../azure-spring-boot-starter-keyvault-secrets/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-keyvault-secrets-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.0.*) [azure-active-directory-b2c-spring-boot-starter](../azure-spring-boot-starter-active-directory-b2c/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-active-directory-b2c-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.2.*) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.1.*) | N/A -[azure-cosmosdb-spring-boot-2-2-starter](../azure-spring-boot-2-2-starter-cosmosdb/README.md) | N/A | N/A | N/A | N/A -[azure-cosmosdb-spring-boot-2-3-starter](../azure-spring-boot-2-3-starter-cosmosdb/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-2-3-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*) +[azure-cosmosdb-spring-boot-starter](../azure-spring-boot-starter-cosmosdb/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*) [azure-mediaservices-spring-boot-starter](../azure-spring-boot-starter-mediaservices/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-mediaservices-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.0.*) [azure-servicebus-spring-boot-starter](../azure-spring-boot-starter-servicebus/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-servicebus-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.0.*) [spring-data-gremlin-boot-starter](../azure-spring-boot-starter-data-gremlin/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22spring-data-gremlin-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.0.*) diff --git a/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml index 71086b12e90ce..dc244b8da17d3 100644 --- a/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml @@ -17,8 +17,8 @@ com.microsoft.azure - azure-cosmosdb-spring-boot-2-3-starter - 2.4.0-beta.1 + azure-cosmosdb-spring-boot-starter + 2.4.0-beta.1 com.azure @@ -57,7 +57,7 @@ - com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter:[2.4.0-beta.1] + com.microsoft.azure:azure-cosmosdb-spring-boot-starter:[2.4.0-beta.1] org.springframework.boot:spring-boot-starter-web:[2.3.3.RELEASE] org.springframework.boot:spring-boot-starter-actuator:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot/README.md b/sdk/spring/azure-spring-boot/README.md index 1888ceca398cf..65463e267c349 100644 --- a/sdk/spring/azure-spring-boot/README.md +++ b/sdk/spring/azure-spring-boot/README.md @@ -43,8 +43,7 @@ This project provides auto-configuration for the following Azure services: - [Azure Active Directory](../azure-spring-boot-starter-active-directory) - [Azure Active Directory B2C](../azure-spring-boot-starter-active-directory-b2c) -- [Spring Boot 2.2 for Cosmos DB SQL API](../azure-spring-boot-2-2-starter-cosmosdb) -- [Spring Boot 2.3 for Cosmos DB SQL API](../azure-spring-boot-2-3-starter-cosmosdb) +- [Cosmos DB SQL API](../azure-spring-boot-starter-cosmosdb) - [Gremlin SQL API](../azure-spring-boot-starter-data-gremlin) - [Key Vault Secrets](../azure-spring-boot-starter-keyvault-secrets) - [Metrics Service](../azure-spring-boot-starter-metrics) diff --git a/sdk/spring/ci.yml b/sdk/spring/ci.yml index 9a5987522fe44..1d5edd75f02ba 100644 --- a/sdk/spring/ci.yml +++ b/sdk/spring/ci.yml @@ -42,12 +42,9 @@ extends: - name: azure-active-directory-b2c-spring-boot-starter groupId: com.microsoft.azure safeName: azurespringbootstarteractivedirectoryb2c - - name: azure-cosmosdb-spring-boot-2-2-starter + - name: azure-cosmosdb-spring-boot-starter groupId: com.microsoft.azure - safeName: azurespringboot22startercosmosdb - - name: azure-cosmosdb-spring-boot-2-3-starter - groupId: com.microsoft.azure - safeName: azurespringboot23startercosmosdb + safeName: azurespringbootstartercosmosdb - name: azure-data-gremlin-spring-boot-starter groupId: com.microsoft.azure safeName: azurespringbootstarterdatagremlin diff --git a/sdk/spring/pom.xml b/sdk/spring/pom.xml index ac725ef8dae60..cb812169cc9ab 100644 --- a/sdk/spring/pom.xml +++ b/sdk/spring/pom.xml @@ -13,8 +13,7 @@ azure-spring-boot-starter azure-spring-boot-starter-active-directory azure-spring-boot-starter-active-directory-b2c - azure-spring-boot-2-2-starter-cosmosdb - azure-spring-boot-2-3-starter-cosmosdb + azure-spring-boot-starter-cosmosdb azure-spring-boot-starter-data-gremlin azure-spring-boot-starter-keyvault-secrets azure-spring-boot-starter-metrics diff --git a/sdk/spring/scripts/artifact_id_pair.py b/sdk/spring/scripts/artifact_id_pair.py deleted file mode 100644 index 18c2f995445fb..0000000000000 --- a/sdk/spring/scripts/artifact_id_pair.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - - -class ArtifactIdPair: - def __init__(self, old_artifact_id, new_artifact_id): - self.old_artifact_id = old_artifact_id - self.new_artifact_id = new_artifact_id - - def __str__(self): - return '[old_artifact_id: {}; new_artifact_id: {}]'.format(self.old_artifact_id, self.new_artifact_id) diff --git a/sdk/spring/scripts/replace_artifact.py b/sdk/spring/scripts/replace_artifact.py new file mode 100644 index 0000000000000..87eec38c15a5d --- /dev/null +++ b/sdk/spring/scripts/replace_artifact.py @@ -0,0 +1,108 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + + +import argparse +import os +import time + +import in_place + +from log import log, Log + +config = { + 'cosmos': { + 'artifact_dict': { + 'azure-spring-data-2-3-cosmos': 'azure-spring-data-2-2-cosmos' + }, + 'pom_list': [ + 'sdk/cosmos/azure-spring-data-cosmos-test/pom.xml' + ] + } +} + + +def main(): + start_time = time.time() + change_to_root_dir() + log.debug('Current working directory = {}.'.format(os.getcwd())) + args = get_args() + init_log(args) + replace_artifact(args.module) + elapsed_time = time.time() - start_time + log.info('elapsed_time = {}'.format(elapsed_time)) + + +def change_to_root_dir(): + os.chdir(os.path.dirname(os.path.realpath(__file__))) + os.chdir('../../..') + + +def get_args(): + parser = argparse.ArgumentParser( + description = 'Replace artifact id in pom file.' + ) + parser.add_argument( + '--module', + type = str, + choices = ['spring', 'cosmos'], + required = False, + default = 'cosmos', + help = 'Specify the target module.' + ) + parser.add_argument( + '--log', + type = str, + choices = ['debug', 'info', 'warn', 'error', 'none'], + required = False, + default = 'info', + help = 'Set log level.' + ) + parser.add_argument( + '--color', + type = str, + choices = ['true', 'false'], + required = False, + default = 'true', + help = 'Whether need colorful log.' + ) + return parser.parse_args() + + +def init_log(args): + log_dict = { + 'debug': Log.DEBUG, + 'info': Log.INFO, + 'warn': Log.WARN, + 'error': Log.ERROR, + 'none': Log.NONE + } + log.set_log_level(log_dict[args.log]) + color_dict = { + 'true': True, + 'false': False + } + log.set_color(color_dict[args.color]) + + +def replace_artifact(module): + artifact_dict = config[module]['artifact_dict'] + pom_list = config[module]['pom_list'] + for pom in pom_list: + log.info('Processing file: {}'.format(pom)) + with in_place.InPlace(pom) as file: + line_num = 0 + for line in file: + line_num = line_num + 1 + for key, value in artifact_dict.items(): + new_line = line.replace(key, value) + if line != new_line: + log.debug('Updated line {}'.format(line_num)) + log.debug(' old_line = {}.'.format(line.strip('\n'))) + log.debug(' new_line = {}.'.format(new_line.strip('\n'))) + line = new_line + file.write(line) + + +if __name__ == '__main__': + main() diff --git a/sdk/spring/scripts/replace_util.py b/sdk/spring/scripts/replace_util.py deleted file mode 100644 index 884af92eb4f4b..0000000000000 --- a/sdk/spring/scripts/replace_util.py +++ /dev/null @@ -1,202 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - - -import argparse -import os -import time - -import in_place - -from log import log, Log -from artifact_id_pair import ArtifactIdPair -from version_update_item import VersionUpdateItem - -X_VERSION_UPDATE = 'x-version-update' -X_INCLUDE_UPDATE = 'x-include-update' -ARTIFACT_ID_PAIRS = 'artifact_id_pairs' -VERSION_UPDATE_ITEMS = 'version_update_items' - -config = { - 'cosmos': { - 'sdk/cosmos/azure-spring-data-cosmos-test/pom.xml': { - ARTIFACT_ID_PAIRS: ( - ArtifactIdPair('azure-spring-data-2-3-cosmos', 'azure-spring-data-2-2-cosmos'), - ) - } - }, - 'spring': { - 'sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml': { - ARTIFACT_ID_PAIRS: ( - ArtifactIdPair('azure-cosmosdb-spring-boot-2-3-starter', 'azure-cosmosdb-spring-boot-2-2-starter'), - ), - VERSION_UPDATE_ITEMS: ( - VersionUpdateItem('org.springframework.boot:spring-boot-starter-web', '2.2.9.RELEASE'), - VersionUpdateItem('org.springframework.boot:spring-boot-starter-actuator', '2.2.9.RELEASE'), - VersionUpdateItem('org.springframework.boot:spring-boot-starter-test', '2.2.9.RELEASE') - ) - } - } -} - - -def main(): - start_time = time.time() - change_to_root_dir() - log.debug('Current working directory = {}.'.format(os.getcwd())) - args = get_args() - init_log(args) - replace(args.module) - elapsed_time = time.time() - start_time - log.info('elapsed_time = {}'.format(elapsed_time)) - - -def change_to_root_dir(): - os.chdir(os.path.dirname(os.path.realpath(__file__))) - os.chdir('../../..') - - -def get_args(): - parser = argparse.ArgumentParser( - description = 'Replace artifact id in pom file.' - ) - parser.add_argument( - '--module', - type = str, - choices = ['spring', 'cosmos'], - required = False, - default = 'cosmos', - help = 'Specify the target module.' - ) - parser.add_argument( - '--log', - type = str, - choices = ['debug', 'info', 'warn', 'error', 'none'], - required = False, - default = 'info', - help = 'Set log level.' - ) - parser.add_argument( - '--color', - type = str, - choices = ['true', 'false'], - required = False, - default = 'true', - help = 'Whether need colorful log.' - ) - return parser.parse_args() - - -def init_log(args): - log_dict = { - 'debug': Log.DEBUG, - 'info': Log.INFO, - 'warn': Log.WARN, - 'error': Log.ERROR, - 'none': Log.NONE - } - log.set_log_level(log_dict[args.log]) - color_dict = { - 'true': True, - 'false': False - } - log.set_color(color_dict[args.color]) - - -def replace(module): - """ - Replace action - :param module: module name - """ - for pom in config[module].keys(): - replace_artifact_id(module, pom) - replace_version(module, pom) - - -def get_str(tuple_obj): - """ - Return str list for tuple obj for logger. - :param tuple_obj: tuple obj - :return: string list - """ - str_list = list() - for item in tuple_obj: - str_list.append(str(item)) - return str_list - - -def replace_artifact_id(module, pom): - """ - Replace artifactId in dependency and plugin part. - :param module: module name - :param pom: pom file path - """ - log.debug('Replacing artifact id in file: {}'.format(pom, module)) - pom_dict = config[module][pom] - if ARTIFACT_ID_PAIRS not in pom_dict: - log.warn('No config key {} in pom parameters.'.format(ARTIFACT_ID_PAIRS)) - return - - artifact_id_pairs = pom_dict[ARTIFACT_ID_PAIRS] - log.debug('Module: {}, artifact ids: {}'.format(module, get_str(artifact_id_pairs))) - with in_place.InPlace(pom) as file: - line_num = 0 - for line in file: - line_num = line_num + 1 - for artifact_id_pair in artifact_id_pairs: - if artifact_id_pair.old_artifact_id in line: - new_line = line.replace(artifact_id_pair.old_artifact_id, artifact_id_pair.new_artifact_id) - log.debug('Updating artifact id in line {}'.format(line_num)) - log.debug(' old_line = {}.'.format(line.strip('\n'))) - log.debug(' new_line = {}.'.format(new_line.strip('\n'))) - line = new_line - file.write(line) - - -def replace_version(module, pom): - """ - Replace version in dependency and plugin part. - :param module: module name - :param pom: pom file path - """ - log.debug('Replacing version in file: {}'.format(pom)) - pom_dict = config[module][pom] - if VERSION_UPDATE_ITEMS not in pom_dict: - log.warn('No config key {} in pom parameters.'.format(VERSION_UPDATE_ITEMS)) - return - - version_update_items = pom_dict[VERSION_UPDATE_ITEMS] - log.debug('Module: {}, versions: {}'.format(module, get_str(version_update_items))) - with in_place.InPlace(pom) as file: - line_num = 0 - for line in file: - line_num = line_num + 1 - for version_update_item in version_update_items: - if version_update_item.id in line: - # update version in dependency part - if X_VERSION_UPDATE in line: - old_version = line[(line.index('') + 9):line.index('')] - if old_version != version_update_item.new_version: - new_line = line.replace(old_version, version_update_item.new_version) - log.debug('Updating version of dependency in line {}'.format(line_num)) - log.debug(' old_line = {}.'.format(line.strip('\n'))) - log.debug(' new_line = {}.'.format(new_line.strip('\n'))) - line = new_line - else: - log.warn('The same with new version in dependency part.') - # update version in plugin part - elif X_INCLUDE_UPDATE in line: - old_version = line[(line.index('[') + 1):line.index(']')] - if old_version != version_update_item.new_version: - new_line = line.replace(old_version, version_update_item.new_version) - log.debug('Updating line {}'.format(line_num)) - log.debug(' old_line = {}.'.format(line.strip('\n'))) - log.debug(' new_line = {}.'.format(new_line.strip('\n'))) - line = new_line - else: - log.warn('The same with new version in plugin part.') - file.write(line) - - -if __name__ == '__main__': - main() diff --git a/sdk/spring/scripts/version_update_item.py b/sdk/spring/scripts/version_update_item.py deleted file mode 100644 index a4f359893b53c..0000000000000 --- a/sdk/spring/scripts/version_update_item.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - - -class VersionUpdateItem: - def __init__(self, id, new_version): - self.id = id - self.new_version = new_version - - def __str__(self): - return '[id: {}; new_version: {}]'.format(self.id, self.new_version) diff --git a/sdk/spring/tests.yml b/sdk/spring/tests.yml index a298e4d836096..de0904c206cdb 100644 --- a/sdk/spring/tests.yml +++ b/sdk/spring/tests.yml @@ -46,43 +46,3 @@ jobs: AAD_SINGLE_TENANT_CLIENT_SECRET: $(java-spring-aad-single-tenant-secret) AAD_SINGLE_TENANT_CLIENT_ID_WITH_ROLE: $(java-spring-aad-single-tenant-id-with-role) AAD_SINGLE_TENANT_CLIENT_SECRET_WITH_ROLE: $(java-spring-aad-single-tenant-secret-with-role) - - PostRunSteps: - - script: | - python --version - python -m pip install setuptools termcolor in_place - python sdk/spring/scripts/replace_util.py --module spring --log debug --color false - displayName: 'Run replace_util.py' - - - task: Maven@3 - displayName: 'Build and Install again, JDK Version: $(JavaBuildVersion)' - inputs: - mavenPomFile: pom.xml - goals: 'install' - options: '$(DefaultOptions) -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -pl $(ProjectList) -am' - mavenOptions: '$(MemoryOptions) $(LoggingOptions)' - javaHomeOption: 'JDKVersion' - jdkVersionOption: $(JavaBuildVersion) - jdkArchitectureOption: 'x64' - publishJUnitResults: false - - - task: Maven@3 - displayName: 'Run tests again, JDK Version: $(JavaBuildVersion)' - inputs: - mavenPomFile: pom.xml - goals: verify - options: '-Dmaven.wagon.http.pool=false $(DefaultOptions) -Dmaven.javadoc.skip=true -Drevapi.skip=true -DskipSpringITs=false -pl $(ProjectList)' - env: - AZURE_TEST_MODE: LIVE - AAD_TENANT_ID_1: $(java-spring-aad-tenant-id-1) - AAD_USER_NAME_1: $(java-spring-aad-user-name-1) - AAD_USER_PASSWORD_1: $(java-spring-aad-user-password-1) - AAD_TENANT_ID_2: $(java-spring-aad-tenant-id-2) - AAD_USER_NAME_2: $(java-spring-aad-user-name-2) - AAD_USER_PASSWORD_2: $(java-spring-aad-user-password-2) - AAD_MULTI_TENANT_CLIENT_ID: $(java-spring-aad-multi-tenant-client-id) - AAD_MULTI_TENANT_CLIENT_SECRET: $(java-spring-aad-multi-tenant-client-secret) - AAD_SINGLE_TENANT_CLIENT_ID: $(java-spring-aad-single-tenant-id) - AAD_SINGLE_TENANT_CLIENT_SECRET: $(java-spring-aad-single-tenant-secret) - AAD_SINGLE_TENANT_CLIENT_ID_WITH_ROLE: $(java-spring-aad-single-tenant-id-with-role) - AAD_SINGLE_TENANT_CLIENT_SECRET_WITH_ROLE: $(java-spring-aad-single-tenant-secret-with-role) From 9465d618a73a76d54f7bcb5ea609a8127df7a97e Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Mon, 7 Sep 2020 15:33:15 +0800 Subject: [PATCH 117/168] correct sample directory (#14708) --- .../main/java/{com.example => com/example}/CustomProcessor.java | 0 .../example}/ServiceBusQueueMultiBindersApplication.java | 0 .../src/main/java/{com.example => com/example}/SinkExample.java | 0 .../src/main/java/{com.example => com/example}/SourceExample.java | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/{com.example => com/example}/CustomProcessor.java (100%) rename sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/{com.example => com/example}/ServiceBusQueueMultiBindersApplication.java (100%) rename sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/{com.example => com/example}/SinkExample.java (100%) rename sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/{com.example => com/example}/SourceExample.java (100%) diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com.example/CustomProcessor.java b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com/example/CustomProcessor.java similarity index 100% rename from sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com.example/CustomProcessor.java rename to sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com/example/CustomProcessor.java diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com.example/ServiceBusQueueMultiBindersApplication.java b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com/example/ServiceBusQueueMultiBindersApplication.java similarity index 100% rename from sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com.example/ServiceBusQueueMultiBindersApplication.java rename to sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com/example/ServiceBusQueueMultiBindersApplication.java diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com.example/SinkExample.java b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com/example/SinkExample.java similarity index 100% rename from sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com.example/SinkExample.java rename to sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com/example/SinkExample.java diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com.example/SourceExample.java b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com/example/SourceExample.java similarity index 100% rename from sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com.example/SourceExample.java rename to sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample/src/main/java/com/example/SourceExample.java From eac9534c93b2b18d8f7eda4aafbc0b85b1b5039d Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Mon, 7 Sep 2020 15:37:19 +0800 Subject: [PATCH 118/168] modify eventhub reademe (#14778) * modify eventhub reademe * modify link errors * adjust readme links to bottom of the doc * update sample url --- .../README.md | 4 +- .../README.md | 4 +- .../README.md | 4 +- .../README.md | 4 +- .../README.md | 4 +- .../README.md | 4 +- .../azure-spring-boot-starter/README.md | 4 +- sdk/spring/azure-spring-boot/README.md | 4 +- .../README.md | 98 +++++++++++++------ .../README.md | 63 +++++++++++- .../README.md | 66 ++++++++++++- .../README.md | 65 +++++++++++- 12 files changed, 270 insertions(+), 54 deletions(-) diff --git a/sdk/spring/azure-spring-boot-starter-active-directory-b2c/README.md b/sdk/spring/azure-spring-boot-starter-active-directory-b2c/README.md index 6ac45f9c0829c..2c7894c38798d 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory-b2c/README.md +++ b/sdk/spring/azure-spring-boot-starter-active-directory-b2c/README.md @@ -207,7 +207,7 @@ you should be redirected to login page. ## Troubleshooting ### Enable client logging -Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Enable Spring logging Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. @@ -220,7 +220,7 @@ logging.level.org.springframework.web=DEBUG logging.level.org.hibernate=ERROR ``` -For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). +For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). ## Next steps The following section provide a sample project illustrating how to use the starter. diff --git a/sdk/spring/azure-spring-boot-starter-active-directory/README.md b/sdk/spring/azure-spring-boot-starter-active-directory/README.md index d60af8b3ffa67..775298d605667 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory/README.md +++ b/sdk/spring/azure-spring-boot-starter-active-directory/README.md @@ -242,7 +242,7 @@ public class AADOAuth2LoginConditionalPolicyConfigSample extends WebSecurityConf ## Troubleshooting ### Enable client logging -Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Enable Spring logging Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. @@ -255,7 +255,7 @@ logging.level.org.springframework.web=DEBUG logging.level.org.hibernate=ERROR ``` -For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). +For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). ## Next steps diff --git a/sdk/spring/azure-spring-boot-starter-data-gremlin/README.md b/sdk/spring/azure-spring-boot-starter-data-gremlin/README.md index 3e2cfd2bc26cb..452ba5836835c 100644 --- a/sdk/spring/azure-spring-boot-starter-data-gremlin/README.md +++ b/sdk/spring/azure-spring-boot-starter-data-gremlin/README.md @@ -198,7 +198,7 @@ Autowired UserRepository interface, then can do save, delete and find operations ## Troubleshooting ### Enable client logging -Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Enable Spring logging Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. @@ -211,7 +211,7 @@ logging.level.org.springframework.web=DEBUG logging.level.org.hibernate=ERROR ``` -For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). +For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). ## Next steps diff --git a/sdk/spring/azure-spring-boot-starter-keyvault-secrets/README.md b/sdk/spring/azure-spring-boot-starter-keyvault-secrets/README.md index e9c80222123fc..0e015529d3afa 100644 --- a/sdk/spring/azure-spring-boot-starter-keyvault-secrets/README.md +++ b/sdk/spring/azure-spring-boot-starter-keyvault-secrets/README.md @@ -163,7 +163,7 @@ The application will take care of getting the value that is backed by the ## Troubleshooting ### Enable client logging -Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Enable Spring logging Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. @@ -176,7 +176,7 @@ logging.level.org.springframework.web=DEBUG logging.level.org.hibernate=ERROR ``` -For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). +For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). ## Next steps diff --git a/sdk/spring/azure-spring-boot-starter-metrics/README.md b/sdk/spring/azure-spring-boot-starter-metrics/README.md index 44297fb9935f7..35da2225f84aa 100644 --- a/sdk/spring/azure-spring-boot-starter-metrics/README.md +++ b/sdk/spring/azure-spring-boot-starter-metrics/README.md @@ -52,7 +52,7 @@ To solve this issue, you need to add the dependency below into your classpath: ``` ### Enable client logging -Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Enable Spring logging Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. @@ -65,7 +65,7 @@ logging.level.org.springframework.web=DEBUG logging.level.org.hibernate=ERROR ``` -For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). +For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). ## Next steps diff --git a/sdk/spring/azure-spring-boot-starter-servicebus-jms/README.md b/sdk/spring/azure-spring-boot-starter-servicebus-jms/README.md index 1f2015af85be5..86af28f17098d 100644 --- a/sdk/spring/azure-spring-boot-starter-servicebus-jms/README.md +++ b/sdk/spring/azure-spring-boot-starter-servicebus-jms/README.md @@ -194,7 +194,7 @@ To solve this issue, you need to add the dependency below into your classpath: ``` ### Enable client logging -Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Enable Spring logging Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. @@ -207,7 +207,7 @@ logging.level.org.springframework.web=DEBUG logging.level.org.hibernate=ERROR ``` -For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). +For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). ## Next steps diff --git a/sdk/spring/azure-spring-boot-starter/README.md b/sdk/spring/azure-spring-boot-starter/README.md index 2bf40e9f73681..dda57988a77fa 100644 --- a/sdk/spring/azure-spring-boot-starter/README.md +++ b/sdk/spring/azure-spring-boot-starter/README.md @@ -57,7 +57,7 @@ The following section provides sample projects illustrating how to use the Azure ## Troubleshooting ### Enable client logging -Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Enable Spring logging Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. @@ -70,7 +70,7 @@ logging.level.org.springframework.web=DEBUG logging.level.org.hibernate=ERROR ``` -For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). +For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). ## Next steps diff --git a/sdk/spring/azure-spring-boot/README.md b/sdk/spring/azure-spring-boot/README.md index 65463e267c349..bf142c301094d 100644 --- a/sdk/spring/azure-spring-boot/README.md +++ b/sdk/spring/azure-spring-boot/README.md @@ -70,7 +70,7 @@ The following section provides sample projects illustrating how to use the Azure ## Troubleshooting ### Enable client logging -Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Enable Spring logging Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. @@ -83,7 +83,7 @@ logging.level.org.springframework.web=DEBUG logging.level.org.hibernate=ERROR ``` -For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). +For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging). ## Next steps diff --git a/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/README.md b/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/README.md index e687e34b4bbd1..67e33dda39874 100644 --- a/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/README.md +++ b/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/README.md @@ -1,7 +1,26 @@ -# Spring Cloud Azure Event Hubs Stream Binder client library for Java +# Azure Event Hubs Spring Cloud Stream Binder client library for Java The project provides **Spring Cloud Stream Binder for Azure Event Hub** which allows you to build message-driven -microservice using **Spring Cloud Stream** based on [Azure Event Hub](https://azure.microsoft.com/en-us/services/event-hubs/) service. +microservice using **Spring Cloud Stream** based on [Azure Event Hub][azure_event_hub] service. + +[Source code][src] | [Package (Maven)][package] | [API reference documentation][refdocs] | [Product documentation][docs] | [Samples][sample] + +## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # "{x-version-update-start;com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;current}" +```xml + + com.microsoft.azure + spring-cloud-azure-eventhubs-stream-binder + 1.2.8-beta.1 + +``` +[//]: # "{x-version-update-end}" ## Key concepts @@ -25,40 +44,15 @@ consumers and partitions, Event Hub provides a kind of preemptive mode. Storage determine which partition is owned by which consumer. When a new consumer starts, it will try to steal some partitions from most heavy-loaded consumer to achieve workload balancing. -## Getting started - ## Examples Please use this `sample` as a reference for how to use this binder. -### Feature List - -- [Dependency Management](#dependency-management) -- [Configuration Options](#configuration-options) -- [Error Channel](#error-channels) - -#### Dependency Management - -**Maven Coordinates** -``` - - com.microsoft.azure - spring-cloud-azure-eventhub-stream-binder - - -``` -**Gradle Coordinates** -``` -dependencies { - compile group: 'com.microsoft.azure', name: 'spring-cloud-azure-eventhub-stream-binder' -} -``` - -#### Configuration Options +### Configuration Options The binder provides the following configuration options in `application.properties`. -##### Spring Cloud Azure Properties ##### +#### Spring Cloud Azure Properties #### Name | Description | Required | Default ---|---|---|--- @@ -68,7 +62,7 @@ Name | Description | Required | Default spring.cloud.azure.eventhub.namespace | Event Hub Namespace. Auto creating if missing | Yes | spring.cloud.azure.eventhub.checkpoint-storage-account | StorageAccount name for checkpoint message successfully consumed | Yes - ##### Event Hub Producer Properties ##### + #### Event Hub Producer Properties #### It supports the following configurations with the format of `spring.cloud.stream.eventhub.bindings..producer`. @@ -85,7 +79,7 @@ Name | Description | Required | Default Default: `10000` - ##### Event Hub Consumer Properties ##### + #### Event Hub Consumer Properties #### It supports the following configurations with the format of `spring.cloud.stream.eventhub.bindings..consumer`. @@ -124,7 +118,7 @@ Name | Description | Required | Default Default: `5s` -#### Error Channels +### Error Channels **_consumer error channel_** this channel is open by default, you can handle the error message in this way: @@ -154,5 +148,45 @@ you can handle the error message in this way: ``` ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + ## Next steps + +The following section provide a sample project illustrating how to use the starter. +### More sample code +- [Eventhubs Binder Sample][sample] +- [Eventhubs Multibinders Sample][eventhubs_multibinders_sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[src]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/src +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-azure-eventhubs-stream-binder +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-azure-eventhubs-stream-binder +[docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-azure-event-hub +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-eventhubs-binder-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[eventhubs_multibinders_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-eventhubs-multibinders-sample +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ +[azure_event_hub]: https://azure.microsoft.com/services/event-hubs/ diff --git a/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka/README.md b/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka/README.md index 8434b95436453..e7a9735e7c49a 100644 --- a/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka/README.md +++ b/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka/README.md @@ -1,8 +1,67 @@ -# Azure Spring cloud starter Event Hubs Kafka client library for Java +# Azure Event Hubs Kafka Spring cloud starter client library for Java +The Spring Cloud Stream Kafka binder for Azure Event Hubs helps developers to finish the auto-configuration of Event Hubs. + +[Package (Maven)][package] | [API reference documentation][refdocs] | [Product documentation][docs] | [Samples][sample] -## Key concepts ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # "{x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-eventhubs-kafka;current}" +```xml + + com.microsoft.azure + spring-cloud-starter-azure-eventhubs-kafka + 1.2.8-beta.1 + +``` +[//]: # "{x-version-update-end}" + +## Key concepts +Event Hubs provides a Kafka endpoint that can be used by your existing Kafka based applications as an alternative to running your own Kafka cluster. Event Hubs supports Apache Kafka protocol 1.0 and later, and works with your existing Kafka applications, including MirrorMaker. + ## Examples +Please refer to this [sample project][sample] illustrating how to use this starter. + ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + ## Next steps + +The following section provide a sample project illustrating how to use the starter. +### More sample code +- [Eventhubs Kafka Sample][sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-starter-azure-eventhubs-kafka +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-starter-azure-eventhubs-kafka +[docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-kafka-azure-event-hub +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-eventhubs-kafka-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ diff --git a/sdk/spring/azure-spring-cloud-starter-eventhubs/README.md b/sdk/spring/azure-spring-cloud-starter-eventhubs/README.md index 5f1ea85b3a3fd..81752527841c7 100644 --- a/sdk/spring/azure-spring-cloud-starter-eventhubs/README.md +++ b/sdk/spring/azure-spring-cloud-starter-eventhubs/README.md @@ -1,8 +1,70 @@ -# Azure Spring cloud starter Event Hubs client library for Java +# Azure Event Hubs Spring cloud starter client library for Java + +The Spring Cloud Event Hubs starter helps developers to finish the auto-configuration of Event Hubs and provides Spring Integration on Event Hubs. + +For Spring Integration on Event Hubs, please refer to the [source code][source_code]. + +[Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][sample] -## Key concepts ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # "{x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-eventhubs;current}" +```xml + + com.microsoft.azure + spring-cloud-starter-azure-eventhubs + 1.2.8-beta.1 + +``` +[//]: # "{x-version-update-end}" + +## Key concepts +Azure Event Hubs is a big data streaming platform and event ingestion service. It can receive and process millions of events per second. Data sent to an event hub can be transformed and stored by using any real-time analytics provider or batching/storage adapters. + ## Examples +Please refer to this [sample project][sample] illustrating how to use Spring Cloud Event Hubs. + ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + ## Next steps + +The following section provide a sample project illustrating how to use the starter. +### More sample code +- [Eventhubs Integration Sample][sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-starter-azure-eventhubs +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-starter-azure-eventhubs +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-eventhubs-integration-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ +[source_code]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-integration-eventhubs diff --git a/sdk/spring/azure-spring-integration-eventhubs/README.md b/sdk/spring/azure-spring-integration-eventhubs/README.md index c9c85c7fddb34..4a65717b99d94 100644 --- a/sdk/spring/azure-spring-integration-eventhubs/README.md +++ b/sdk/spring/azure-spring-integration-eventhubs/README.md @@ -1,9 +1,70 @@ -# Azure Spring Integration event hubs client library for Java +# Azure Event Hubs Spring Integration client library for Java + +The *Spring Integration for Event Hubs* extension project provides inbound and outbound channel adapters and gateways for Azure Event Hubs. +Event Hubs is a fully managed, real-time data ingestion service that’s simple, trusted, and scalable. Stream millions of events per second from any source to build dynamic data pipelines and immediately respond to business challenges. + +[Source code][src] | [Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][sample] -## Key concepts ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # "{x-version-update-start;com.microsoft.azure:spring-integration-eventhubs;current}" +```xml + + com.microsoft.azure + spring-integration-eventhubs + 1.2.8-beta.1 + +``` +[//]: # "{x-version-update-end}" + ## Key concepts +Spring Integration enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters. Those adapters provide a higher-level of abstraction over Spring’s support for remoting, messaging, and scheduling. + ## Examples +Please refer to this [sample project][sample] illustrating how to use Event Hubs integration. + ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + ## Next steps + +The following section provide a sample project illustrating how to use this package. +### More sample code +- [Eventhubs Integration Sample][sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[src]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-integration-eventhubs/src +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-integration-eventhubs +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-integration-eventhubs +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-eventhubs-integration-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ +[source_code]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-integration-eventhubs From 464f387b3dbd8b54e1d3068f584661785e49f831 Mon Sep 17 00:00:00 2001 From: Rujun Chen Date: Mon, 7 Sep 2020 15:40:24 +0800 Subject: [PATCH 119/168] Update script path. (#14869) Co-authored-by: Rujun Chen --- .../azure-spring-boot-test-keyvault/test-resources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/spring/azure-spring-boot-test-keyvault/test-resources.json b/sdk/spring/azure-spring-boot-test-keyvault/test-resources.json index df69d72a65558..3fa94b879d208 100644 --- a/sdk/spring/azure-spring-boot-test-keyvault/test-resources.json +++ b/sdk/spring/azure-spring-boot-test-keyvault/test-resources.json @@ -208,8 +208,8 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ - "https://raw.githubusercontent.com/chenrujun/azure-sdk-for-java/enable-KeyVaultIT.keyVaultWithVirtualMachineMSI-1/sdk/spring/azure-spring-boot-test-keyvault/install_java.sh", - "https://raw.githubusercontent.com/chenrujun/azure-sdk-for-java/enable-KeyVaultIT.keyVaultWithVirtualMachineMSI-1/sdk/spring/azure-spring-boot-test-keyvault/install_java_with_retry.sh" + "https://raw.githubusercontent.com/Azure/azure-sdk-for-java/master/sdk/spring/azure-spring-boot-test-keyvault/install_java.sh", + "https://raw.githubusercontent.com/Azure/azure-sdk-for-java/master/sdk/spring/azure-spring-boot-test-keyvault/install_java_with_retry.sh" ], "commandToExecute": "bash install_java_with_retry.sh" }, From 53dee37c4a04534be8259ebd06de37c8659cc3d9 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 7 Sep 2020 17:11:44 +0800 Subject: [PATCH 120/168] mgmt, Accepted interface, handle LRO succeeded without poll (#14868) --- .../VirtualMachineOperationsTests.java | 16 ++-- .../model/implementation/AcceptedImpl.java | 93 ++++++++++++++++--- .../resources/DeploymentsTests.java | 28 +++--- .../resources/GenericResourcesTests.java | 12 ++- .../TestVirtualMachineSyncPoller.java | 40 +++++--- sdk/resourcemanager/docs/DESIGN_PREVIEW.md | 8 +- 6 files changed, 147 insertions(+), 50 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java index 1bb37a0505da9..26c590562c6ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java @@ -194,6 +194,8 @@ public void canCreateVirtualMachine() throws Exception { @Test public void canCreateVirtualMachineSyncPoll() throws Exception { + final long defaultDelayInMillis = 10 * 1000; + Accepted acceptedVirtualMachine = computeManager .virtualMachines() .define(vmName) @@ -215,17 +217,17 @@ public void canCreateVirtualMachineSyncPoll() throws Exception { Assertions.assertNotEquals("Succeeded", createdVirtualMachine.provisioningState()); LongRunningOperationStatus pollStatus = acceptedVirtualMachine.getActivationResponse().getStatus(); - int delayInMills = acceptedVirtualMachine.getActivationResponse().getRetryAfter() == null - ? 0 - : (int) acceptedVirtualMachine.getActivationResponse().getRetryAfter().toMillis(); + long delayInMills = acceptedVirtualMachine.getActivationResponse().getRetryAfter() == null + ? defaultDelayInMillis + : acceptedVirtualMachine.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); PollResponse pollResponse = acceptedVirtualMachine.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null - ? 10000 - : (int) pollResponse.getRetryAfter().toMillis(); + ? defaultDelayInMillis + : pollResponse.getRetryAfter().toMillis(); } Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollStatus); VirtualMachine virtualMachine = acceptedVirtualMachine.getFinalResult(); @@ -236,7 +238,7 @@ public void canCreateVirtualMachineSyncPoll() throws Exception { pollStatus = acceptedDelete.getActivationResponse().getStatus(); delayInMills = acceptedDelete.getActivationResponse().getRetryAfter() == null - ? 0 + ? defaultDelayInMillis : (int) acceptedDelete.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { @@ -245,7 +247,7 @@ public void canCreateVirtualMachineSyncPoll() throws Exception { PollResponse pollResponse = acceptedDelete.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null - ? 10000 + ? defaultDelayInMillis : (int) pollResponse.getRetryAfter().toMillis(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java index 7c53a11ee5d67..c2734b3078edb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java @@ -11,6 +11,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.CoreUtils; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -24,6 +25,7 @@ import com.azure.resourcemanager.resources.fluentcore.model.HasInner; import com.azure.resourcemanager.resources.fluentcore.rest.ActivationResponse; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.fasterxml.jackson.annotation.JsonProperty; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -79,23 +81,13 @@ public ActivationResponse getActivationResponse() { Duration retryAfter = getRetryAfter(activationResponse.getHeaders()); return new ActivationResponse<>(activationResponse.getRequest(), activationResponse.getStatusCode(), activationResponse.getHeaders(), value, - LongRunningOperationStatus.IN_PROGRESS, retryAfter); + getActivationResponseStatus(), retryAfter); } catch (IOException e) { throw logger.logExceptionAsError( new IllegalStateException("Failed to deserialize activation response body", e)); } } - private static Duration getRetryAfter(HttpHeaders headers) { - if (headers != null) { - final String value = headers.getValue("Retry-After"); - if (value != null) { - return Duration.ofSeconds(Long.parseLong(value)); - } - } - return null; - } - @Override public SyncPoller getSyncPoller() { if (syncPoller == null) { @@ -159,6 +151,60 @@ public T getFinalResult() { return this.getSyncPoller().getFinalResult(); } + private LongRunningOperationStatus getActivationResponseStatus() { + String responseBody = new String(getResponse(), StandardCharsets.UTF_8); + String provisioningState = null; + // try get "provisioningState" property. + if (!CoreUtils.isNullOrEmpty(responseBody)) { + try { + ResourceWithProvisioningState resource = serializerAdapter.deserialize(responseBody, + ResourceWithProvisioningState.class, SerializerEncoding.JSON); + provisioningState = resource != null + ? resource.getProvisioningState() + : null; + } catch (IOException ignored) { + + } + } + + // get LRO status, default is IN_PROGRESS + LongRunningOperationStatus status = LongRunningOperationStatus.IN_PROGRESS; + if (!CoreUtils.isNullOrEmpty(provisioningState)) { + // LRO status based on provisioningState. + status = toLongRunningOperationStatus(provisioningState); + } else { + // LRO status based on status code. + int statusCode = activationResponse.getStatusCode(); + if (statusCode == 200 || statusCode == 201 || statusCode == 204) { + status = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED; + } + } + return status; + } + + private static LongRunningOperationStatus toLongRunningOperationStatus(String value) { + if (ProvisioningState.SUCCEEDED.equalsIgnoreCase(value)) { + return LongRunningOperationStatus.SUCCESSFULLY_COMPLETED; + } else if (ProvisioningState.FAILED.equalsIgnoreCase(value)) { + return LongRunningOperationStatus.FAILED; + } else if (ProvisioningState.CANCELED.equalsIgnoreCase(value)) { + return LongRunningOperationStatus.USER_CANCELLED; + } else if (ProvisioningState.IN_PROGRESS.equalsIgnoreCase(value)) { + return LongRunningOperationStatus.IN_PROGRESS; + } + return LongRunningOperationStatus.fromString(value, false); + } + + private static Duration getRetryAfter(HttpHeaders headers) { + if (headers != null) { + final String value = headers.getValue("Retry-After"); + if (value != null) { + return Duration.ofSeconds(Long.parseLong(value)); + } + } + return null; + } + private byte[] getResponse() { if (responseBytes == null) { responseBytes = FluxUtil.collectBytesInByteBufferStream(activationResponse.getValue()).block(); @@ -238,6 +284,31 @@ private PollResponse voidResponse(PollResponse> pollRes } } + private static class ResourceWithProvisioningState { + @JsonProperty(value = "properties") + private Properties properties; + + private String getProvisioningState() { + if (this.properties != null) { + return this.properties.provisioningState; + } else { + return null; + } + } + + private static class Properties { + @JsonProperty(value = "provisioningState") + private String provisioningState; + } + } + + private static class ProvisioningState { + static final String IN_PROGRESS = "InProgress"; + static final String SUCCEEDED = "Succeeded"; + static final String FAILED = "Failed"; + static final String CANCELED = "Canceled"; + } + public static Accepted newAccepted( ClientLogger logger, AzureServiceClient client, diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java index 05fc6754d3e3d..5a2464ce179a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java @@ -236,6 +236,8 @@ public void canUpdateVirtualNetworkDeployment() throws Exception { @Test public void canDeployVirtualNetworkSyncPoll() throws Exception { + final long defaultDelayInMillis = 10 * 1000; + final String dp = "dpD" + testId; // Begin create @@ -250,17 +252,17 @@ public void canDeployVirtualNetworkSyncPoll() throws Exception { Assertions.assertNotEquals("Succeeded", createdDeployment.provisioningState()); LongRunningOperationStatus pollStatus = acceptedDeployment.getActivationResponse().getStatus(); - int delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null - ? 0 - : (int) acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); + long delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null + ? defaultDelayInMillis + : acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null - ? 10000 - : (int) pollResponse.getRetryAfter().toMillis(); + ? defaultDelayInMillis + : pollResponse.getRetryAfter().toMillis(); } Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollStatus); Deployment deployment = acceptedDeployment.getFinalResult(); @@ -269,6 +271,8 @@ public void canDeployVirtualNetworkSyncPoll() throws Exception { @Test public void canDeployVirtualNetworkSyncPollWithFailure() throws Exception { + final long defaultDelayInMillis = 10 * 1000; + final String templateJson = "{ \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\", \"contentVersion\": \"1.0.0.0\", \"resources\": [ { \"type\": \"Microsoft.Storage/storageAccounts\", \"apiVersion\": \"2019-04-01\", \"name\": \"satestnameconflict\", \"location\": \"eastus\", \"sku\": { \"name\": \"Standard_LRS\" }, \"kind\": \"StorageV2\", \"properties\": { \"supportsHttpsTrafficOnly\": true } } ] }"; final String dp = "dpE" + testId; @@ -284,17 +288,17 @@ public void canDeployVirtualNetworkSyncPollWithFailure() throws Exception { Assertions.assertNotEquals("Succeeded", createdDeployment.provisioningState()); LongRunningOperationStatus pollStatus = acceptedDeployment.getActivationResponse().getStatus(); - int delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null - ? 0 - : (int) acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); + long delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null + ? defaultDelayInMillis + : acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null - ? 10000 - : (int) pollResponse.getRetryAfter().toMillis(); + ? defaultDelayInMillis + : pollResponse.getRetryAfter().toMillis(); } Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollStatus); Deployment deployment = acceptedDeployment.getFinalResult(); @@ -317,7 +321,7 @@ public void canDeployVirtualNetworkSyncPollWithFailure() throws Exception { pollStatus = acceptedDeployment.getActivationResponse().getStatus(); delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null - ? 0 + ? defaultDelayInMillis : (int) acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); @@ -325,7 +329,7 @@ public void canDeployVirtualNetworkSyncPollWithFailure() throws Exception { PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null - ? 10000 + ? defaultDelayInMillis : (int) pollResponse.getRetryAfter().toMillis(); } Assertions.assertEquals(LongRunningOperationStatus.FAILED, pollStatus); diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java index 5d4019432b3ae..b85cdbca0d4ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java @@ -97,6 +97,8 @@ public void canCreateUpdateMoveResource() throws Exception { @Test public void canCreateDeleteResourceSyncPoll() throws Exception { + final long defaultDelayInMillis = 10 * 1000; + final String resourceName = "rs" + testId; // Create Accepted acceptedResource = genericResources.define(resourceName) @@ -110,17 +112,17 @@ public void canCreateDeleteResourceSyncPoll() throws Exception { .beginCreate(); LongRunningOperationStatus pollStatus = acceptedResource.getActivationResponse().getStatus(); - int delayInMills = acceptedResource.getActivationResponse().getRetryAfter() == null - ? 0 - : (int) acceptedResource.getActivationResponse().getRetryAfter().toMillis(); + long delayInMills = acceptedResource.getActivationResponse().getRetryAfter() == null + ? defaultDelayInMillis + : acceptedResource.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); PollResponse pollResponse = acceptedResource.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null - ? 10000 - : (int) pollResponse.getRetryAfter().toMillis(); + ? defaultDelayInMillis + : pollResponse.getRetryAfter().toMillis(); } Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollStatus); GenericResource resource = acceptedResource.getFinalResult(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java index a9626f7471be4..19ea34a2b56b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestVirtualMachineSyncPoller.java @@ -3,10 +3,12 @@ package com.azure.resourcemanager; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.compute.models.Disk; +import com.azure.resourcemanager.compute.models.DiskSkuTypes; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; @@ -22,11 +24,14 @@ import org.junit.jupiter.api.Assertions; import java.time.Duration; +import java.time.OffsetDateTime; public class TestVirtualMachineSyncPoller extends TestTemplate { private final NetworkManager networkManager; + private final ClientLogger logger = new ClientLogger(TestVirtualMachineSyncPoller.class); + public TestVirtualMachineSyncPoller(NetworkManager networkManager) { this.networkManager = networkManager; } @@ -53,17 +58,21 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc .create(); // public ip address, poll till complete + logger.info("{} {}", OffsetDateTime.now(), "begin create public IP"); Accepted publicIpAddressAccepted = this.networkManager.publicIpAddresses() .define(ipName) .withRegion(region) .withExistingResourceGroup(rgName) .beginCreate(); + logger.info("{} {}", OffsetDateTime.now(), "polling public IP till complete"); PollResponse publicIpAddressResponse = publicIpAddressAccepted.getSyncPoller().waitForCompletion(); Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, publicIpAddressResponse.getStatus()); PublicIpAddress publicIpAddress = publicIpAddressAccepted.getFinalResult(); + logger.info("{} {}", OffsetDateTime.now(), "public IP created"); // nic and disk + logger.info("{} {}", OffsetDateTime.now(), "begin create nic"); Accepted networkInterfaceAccepted = this.networkManager.networkInterfaces() .define(nicName) @@ -75,36 +84,43 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc .withExistingPrimaryPublicIPAddress(publicIpAddress) .beginCreate(); + logger.info("{} {}", OffsetDateTime.now(), "begin create data disk"); Accepted diskAccepted = virtualMachines.manager().disks() .define(diskName) .withRegion(region) .withExistingResourceGroup(rgName) .withData() - .withSizeInGB(2) + .withSizeInGB(100) + .withSku(DiskSkuTypes.STANDARD_LRS) .beginCreate(); // poll nic and disk + LongRunningOperationStatus networkInterfaceLroStatus = networkInterfaceAccepted.getActivationResponse().getStatus(); + LongRunningOperationStatus diskLroStatus = diskAccepted.getActivationResponse().getStatus(); SyncPoller networkInterfaceSyncPoller = networkInterfaceAccepted.getSyncPoller(); SyncPoller diskSyncPoller = diskAccepted.getSyncPoller(); - PollResponse networkInterfacePollResponse = networkInterfaceSyncPoller.poll(); - PollResponse diskPollResponse = diskSyncPoller.poll(); - while (!networkInterfacePollResponse.getStatus().isComplete() || !diskPollResponse.getStatus().isComplete()) { - SdkContext.sleep(Duration.ofSeconds(2).toMillis()); + while (!networkInterfaceLroStatus.isComplete() || !diskLroStatus.isComplete()) { + SdkContext.sleep(Duration.ofSeconds(1).toMillis()); - if (!networkInterfacePollResponse.getStatus().isComplete()) { - networkInterfacePollResponse = networkInterfaceSyncPoller.poll(); + if (!networkInterfaceLroStatus.isComplete()) { + logger.info("{} {}", OffsetDateTime.now(), "poll network interface"); + networkInterfaceLroStatus = networkInterfaceSyncPoller.poll().getStatus(); } - if (!diskPollResponse.getStatus().isComplete()) { - diskPollResponse = diskSyncPoller.poll(); + if (!diskLroStatus.isComplete()) { + logger.info("{} {}", OffsetDateTime.now(), "poll data disk"); + diskLroStatus = diskSyncPoller.poll().getStatus(); } } - Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, networkInterfacePollResponse.getStatus()); - Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, diskPollResponse.getStatus()); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, networkInterfaceLroStatus); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, diskLroStatus); NetworkInterface networkInterface = networkInterfaceSyncPoller.getFinalResult(); + logger.info("{} {}", OffsetDateTime.now(), "network interface created"); Disk disk = diskSyncPoller.getFinalResult(); + logger.info("{} {}", OffsetDateTime.now(), "data disk created"); // virtual machine, poll till complete + logger.info("{} {}", OffsetDateTime.now(), "begin create vm"); Accepted virtualMachineAccepted = virtualMachines .define(vmName) @@ -117,8 +133,10 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc .withExistingDataDisk(disk) .withSize(VirtualMachineSizeTypes.STANDARD_A9) .beginCreate(); + logger.info("{} {}", OffsetDateTime.now(), "polling virtual machine till complete"); PollResponse virtualMachineResponse = virtualMachineAccepted.getSyncPoller().waitForCompletion(); Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, virtualMachineResponse.getStatus()); + logger.info("{} {}", OffsetDateTime.now(), "virtual machine created"); return virtualMachineAccepted.getFinalResult(); } diff --git a/sdk/resourcemanager/docs/DESIGN_PREVIEW.md b/sdk/resourcemanager/docs/DESIGN_PREVIEW.md index 80302108ce1ed..ff5c4dc20fe9b 100644 --- a/sdk/resourcemanager/docs/DESIGN_PREVIEW.md +++ b/sdk/resourcemanager/docs/DESIGN_PREVIEW.md @@ -26,9 +26,9 @@ Accepted acceptedDeployment = azure.deployments() Deployment provisioningDeployment = acceptedDeployment.getActivationResponse().getValue(); LongRunningOperationStatus pollStatus = acceptedDeployment.getActivationResponse().getStatus(); -int delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null - ? 0 - : (int) acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); +long delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null + ? DEFAULT_DELAY_IN_MILLIS + : acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { Thread.sleep(delayInMills); @@ -37,7 +37,7 @@ while (!pollStatus.isComplete()) { pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null ? DEFAULT_DELAY_IN_MILLIS - : (int) pollResponse.getRetryAfter().toMillis(); + : pollResponse.getRetryAfter().toMillis(); } // pollStatus == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, if successful From ecc8944e8c3e16ae6cab0f4811c943be31d00d75 Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Tue, 8 Sep 2020 09:46:34 +0800 Subject: [PATCH 121/168] Mgmt Move Client and ClientBuilder (#14872) * refactor resources * refactor appplatform * refactor appservice * refactor auth * refactor compute * refactor aci * refactor acr * refactor acs * refactor cosmos * refactor dns * refactor eventhub * refactor monitor * msi * network * private dns * redis * service bus * sql * storage * traffic manager * fix compile * fix checkstyle --- .../appplatform/AppPlatformManager.java | 2 + .../AppPlatformManagementClient.java | 12 +-- .../AppPlatformManagementClientBuilder.java | 2 +- .../appplatform/fluent/AppsClient.java | 1 - .../appplatform/fluent/BindingsClient.java | 1 - .../fluent/CertificatesClient.java | 1 - .../fluent/ConfigServersClient.java | 1 - .../fluent/CustomDomainsClient.java | 1 - .../appplatform/fluent/DeploymentsClient.java | 1 - .../fluent/MonitoringSettingsClient.java | 1 - .../appplatform/fluent/OperationsClient.java | 1 - .../appplatform/fluent/ServicesClient.java | 1 - .../appplatform/fluent/SkusClient.java | 1 - .../appservice/AppServiceManager.java | 2 + .../AppServiceCertificateOrdersClient.java | 1 - .../fluent/AppServiceEnvironmentsClient.java | 1 - .../fluent/AppServicePlansClient.java | 1 - ...ertificateRegistrationProvidersClient.java | 1 - .../appservice/fluent/CertificatesClient.java | 1 - .../fluent/DeletedWebAppsClient.java | 1 - .../appservice/fluent/DiagnosticsClient.java | 1 - .../DomainRegistrationProvidersClient.java | 1 - .../appservice/fluent/DomainsClient.java | 1 - .../appservice/fluent/ProvidersClient.java | 1 - .../fluent/RecommendationsClient.java | 1 - .../fluent/ResourceHealthMetadatasClient.java | 1 - .../fluent/ResourceProvidersClient.java | 1 - .../appservice/fluent/StaticSitesClient.java | 1 - .../fluent/TopLevelDomainsClient.java | 1 - .../appservice/fluent/WebAppsClient.java | 1 - .../{ => fluent}/WebSiteManagementClient.java | 19 +--- .../WebSiteManagementClientBuilder.java | 2 +- .../authorization/AuthorizationManager.java | 4 + .../fluent/ApplicationsClient.java | 1 - .../AuthorizationManagementClient.java | 8 +- .../AuthorizationManagementClientBuilder.java | 2 +- .../fluent/ClassicAdministratorsClient.java | 1 - .../fluent/DeletedApplicationsClient.java | 1 - .../authorization/fluent/DomainsClient.java | 1 - .../fluent/GlobalAdministratorsClient.java | 1 - .../GraphRbacManagementClient.java | 11 +- .../GraphRbacManagementClientBuilder.java | 2 +- .../authorization/fluent/GroupsClient.java | 1 - .../fluent/OAuth2PermissionGrantsClient.java | 1 - .../authorization/fluent/ObjectsClient.java | 1 - .../fluent/PermissionsClient.java | 1 - .../ProviderOperationsMetadatasClient.java | 1 - .../fluent/RoleAssignmentsClient.java | 1 - .../fluent/RoleDefinitionsClient.java | 1 - .../fluent/ServicePrincipalsClient.java | 1 - .../fluent/SignedInUsersClient.java | 1 - .../authorization/fluent/UsersClient.java | 1 - .../compute/ComputeManager.java | 2 + .../fluent/AvailabilitySetsClient.java | 1 - .../{ => fluent}/ComputeManagementClient.java | 32 +----- .../ComputeManagementClientBuilder.java | 2 +- .../fluent/ContainerServicesClient.java | 1 - .../fluent/DedicatedHostGroupsClient.java | 1 - .../compute/fluent/DedicatedHostsClient.java | 1 - .../fluent/DiskEncryptionSetsClient.java | 1 - .../compute/fluent/DisksClient.java | 1 - .../compute/fluent/GalleriesClient.java | 1 - .../GalleryApplicationVersionsClient.java | 1 - .../fluent/GalleryApplicationsClient.java | 1 - .../fluent/GalleryImageVersionsClient.java | 1 - .../compute/fluent/GalleryImagesClient.java | 1 - .../compute/fluent/ImagesClient.java | 1 - .../compute/fluent/LogAnalyticsClient.java | 1 - .../compute/fluent/OperationsClient.java | 1 - .../ProximityPlacementGroupsClient.java | 1 - .../compute/fluent/ResourceSkusClient.java | 1 - .../compute/fluent/SnapshotsClient.java | 1 - .../compute/fluent/SshPublicKeysClient.java | 1 - .../compute/fluent/UsagesClient.java | 1 - .../VirtualMachineExtensionImagesClient.java | 1 - .../VirtualMachineExtensionsClient.java | 1 - .../fluent/VirtualMachineImagesClient.java | 1 - .../VirtualMachineRunCommandsClient.java | 1 - ...irtualMachineScaleSetExtensionsClient.java | 1 - ...lMachineScaleSetRollingUpgradesClient.java | 1 - ...tualMachineScaleSetVMExtensionsClient.java | 1 - .../VirtualMachineScaleSetVMsClient.java | 1 - .../fluent/VirtualMachineScaleSetsClient.java | 1 - .../fluent/VirtualMachineSizesClient.java | 1 - .../compute/fluent/VirtualMachinesClient.java | 1 - .../implementation/ComputeUsagesImpl.java | 2 +- .../ContainerInstanceManager.java | 2 + .../fluent/ContainerGroupsClient.java | 1 - .../ContainerInstanceManagementClient.java | 6 +- ...tainerInstanceManagementClientBuilder.java | 2 +- .../fluent/ContainersClient.java | 1 - .../fluent/LocationsClient.java | 1 - .../fluent/OperationsClient.java | 1 - .../ContainerRegistryManager.java | 2 + .../ContainerRegistryManagementClient.java | 8 +- ...tainerRegistryManagementClientBuilder.java | 2 +- .../fluent/OperationsClient.java | 1 - .../fluent/RegistriesClient.java | 1 - .../fluent/ReplicationsClient.java | 1 - .../containerregistry/fluent/RunsClient.java | 1 - .../containerregistry/fluent/TasksClient.java | 1 - .../fluent/WebhooksClient.java | 1 - .../ContainerServiceManager.java | 2 + .../fluent/AgentPoolsClient.java | 1 - .../ContainerServiceManagementClient.java | 8 +- ...ntainerServiceManagementClientBuilder.java | 2 +- .../fluent/ContainerServicesClient.java | 1 - .../fluent/ManagedClustersClient.java | 1 - .../OpenShiftManagedClustersClient.java | 1 - .../fluent/OperationsClient.java | 1 - .../PrivateEndpointConnectionsClient.java | 1 - .../resourcemanager/cosmos/CosmosManager.java | 2 + .../fluent/CassandraResourcesClient.java | 1 - .../CollectionPartitionRegionsClient.java | 1 - .../fluent/CollectionPartitionsClient.java | 1 - .../fluent/CollectionRegionsClient.java | 1 - .../cosmos/fluent/CollectionsClient.java | 1 - .../CosmosDBManagementClient.java | 23 +--- .../CosmosDBManagementClientBuilder.java | 2 +- .../fluent/DatabaseAccountRegionsClient.java | 1 - .../cosmos/fluent/DatabaseAccountsClient.java | 1 - .../cosmos/fluent/DatabasesClient.java | 1 - .../cosmos/fluent/GremlinResourcesClient.java | 1 - .../cosmos/fluent/MongoDBResourcesClient.java | 1 - .../fluent/NotebookWorkspacesClient.java | 1 - .../cosmos/fluent/OperationsClient.java | 1 - .../PartitionKeyRangeIdRegionsClient.java | 1 - .../fluent/PartitionKeyRangeIdsClient.java | 1 - .../fluent/PercentileSourceTargetsClient.java | 1 - .../fluent/PercentileTargetsClient.java | 1 - .../cosmos/fluent/PercentilesClient.java | 1 - .../PrivateEndpointConnectionsClient.java | 1 - .../fluent/PrivateLinkResourcesClient.java | 1 - .../cosmos/fluent/SqlResourcesClient.java | 1 - .../cosmos/fluent/TableResourcesClient.java | 1 - .../resourcemanager/dns/DnsZoneManager.java | 2 + .../dns/{ => fluent}/DnsManagementClient.java | 4 +- .../DnsManagementClientBuilder.java | 2 +- .../dns/fluent/RecordSetsClient.java | 1 - .../dns/fluent/ZonesClient.java | 1 - .../eventhubs/EventHubsManager.java | 2 + .../fluent/ConsumerGroupsClient.java | 1 - .../fluent/DisasterRecoveryConfigsClient.java | 1 - .../EventHubManagementClient.java | 8 +- .../EventHubManagementClientBuilder.java | 2 +- .../eventhubs/fluent/EventHubsClient.java | 1 - .../eventhubs/fluent/NamespacesClient.java | 1 - .../eventhubs/fluent/OperationsClient.java | 1 - .../eventhubs/fluent/RegionsClient.java | 1 - .../keyvault/KeyVaultManager.java | 2 + .../KeyVaultManagementClient.java | 6 +- .../KeyVaultManagementClientBuilder.java | 2 +- .../keyvault/fluent/OperationsClient.java | 1 - .../PrivateEndpointConnectionsClient.java | 1 - .../fluent/PrivateLinkResourcesClient.java | 1 - .../keyvault/fluent/VaultsClient.java | 1 - .../monitor/MonitorManager.java | 2 + .../monitor/fluent/ActionGroupsClient.java | 1 - .../fluent/ActivityLogAlertsClient.java | 1 - .../monitor/fluent/ActivityLogsClient.java | 1 - .../fluent/AlertRuleIncidentsClient.java | 1 - .../monitor/fluent/AlertRulesClient.java | 1 - .../fluent/AutoscaleSettingsClient.java | 1 - .../monitor/fluent/BaselinesClient.java | 1 - .../DiagnosticSettingsCategorysClient.java | 1 - .../fluent/DiagnosticSettingsClient.java | 1 - .../monitor/fluent/EventCategoriesClient.java | 1 - .../monitor/fluent/LogProfilesClient.java | 1 - .../monitor/fluent/MetricAlertsClient.java | 1 - .../fluent/MetricAlertsStatusClient.java | 1 - .../monitor/fluent/MetricBaselinesClient.java | 1 - .../fluent/MetricDefinitionsClient.java | 1 - .../fluent/MetricNamespacesClient.java | 1 - .../monitor/fluent/MetricsClient.java | 1 - .../monitor/{ => fluent}/MonitorClient.java | 23 +--- .../{ => fluent}/MonitorClientBuilder.java | 2 +- .../monitor/fluent/OperationsClient.java | 1 - .../fluent/ScheduledQueryRulesClient.java | 1 - .../fluent/TenantActivityLogsClient.java | 1 - .../monitor/fluent/VMInsightsClient.java | 1 - .../azure/resourcemanager/msi/MSIManager.java | 2 + .../ManagedServiceIdentityClient.java | 5 +- .../ManagedServiceIdentityClientBuilder.java | 2 +- .../msi/fluent/OperationsClient.java | 1 - .../SystemAssignedIdentitiesClient.java | 1 - .../fluent/UserAssignedIdentitiesClient.java | 1 - .../network/NetworkManager.java | 2 + ...tewayPrivateEndpointConnectionsClient.java | 1 - ...tionGatewayPrivateLinkResourcesClient.java | 1 - .../fluent/ApplicationGatewaysClient.java | 1 - .../ApplicationSecurityGroupsClient.java | 1 - .../fluent/AvailableDelegationsClient.java | 1 - .../AvailableEndpointServicesClient.java | 1 - .../AvailablePrivateEndpointTypesClient.java | 1 - ...ailableResourceGroupDelegationsClient.java | 1 - .../fluent/AvailableServiceAliasesClient.java | 1 - .../fluent/AzureFirewallFqdnTagsClient.java | 1 - .../network/fluent/AzureFirewallsClient.java | 1 - .../network/fluent/BastionHostsClient.java | 1 - .../fluent/BgpServiceCommunitiesClient.java | 1 - .../fluent/ConnectionMonitorsClient.java | 1 - .../fluent/DdosCustomPoliciesClient.java | 1 - .../fluent/DdosProtectionPlansClient.java | 1 - .../fluent/DefaultSecurityRulesClient.java | 1 - ...pressRouteCircuitAuthorizationsClient.java | 1 - .../ExpressRouteCircuitConnectionsClient.java | 1 - .../ExpressRouteCircuitPeeringsClient.java | 1 - .../fluent/ExpressRouteCircuitsClient.java | 1 - .../fluent/ExpressRouteConnectionsClient.java | 1 - ...essRouteCrossConnectionPeeringsClient.java | 1 - .../ExpressRouteCrossConnectionsClient.java | 1 - .../fluent/ExpressRouteGatewaysClient.java | 1 - .../fluent/ExpressRouteLinksClient.java | 1 - .../fluent/ExpressRoutePortsClient.java | 1 - .../ExpressRoutePortsLocationsClient.java | 1 - .../ExpressRouteServiceProvidersClient.java | 1 - .../fluent/FirewallPoliciesClient.java | 1 - ...ewallPolicyRuleCollectionGroupsClient.java | 1 - .../network/fluent/FlowLogsClient.java | 1 - .../network/fluent/HubRouteTablesClient.java | 1 - .../HubVirtualNetworkConnectionsClient.java | 1 - .../network/fluent/InboundNatRulesClient.java | 1 - .../network/fluent/IpAllocationsClient.java | 1 - .../network/fluent/IpGroupsClient.java | 1 - ...LoadBalancerBackendAddressPoolsClient.java | 1 - ...alancerFrontendIpConfigurationsClient.java | 1 - .../LoadBalancerLoadBalancingRulesClient.java | 1 - .../LoadBalancerNetworkInterfacesClient.java | 1 - .../LoadBalancerOutboundRulesClient.java | 1 - .../fluent/LoadBalancerProbesClient.java | 1 - .../network/fluent/LoadBalancersClient.java | 1 - .../fluent/LocalNetworkGatewaysClient.java | 1 - .../network/fluent/NatGatewaysClient.java | 1 - ...etworkInterfaceIpConfigurationsClient.java | 1 - .../NetworkInterfaceLoadBalancersClient.java | 1 - ...tworkInterfaceTapConfigurationsClient.java | 1 - .../fluent/NetworkInterfacesClient.java | 1 - .../{ => fluent}/NetworkManagementClient.java | 101 +----------------- .../NetworkManagementClientBuilder.java | 2 +- .../network/fluent/NetworkProfilesClient.java | 1 - .../fluent/NetworkSecurityGroupsClient.java | 1 - .../NetworkVirtualAppliancesClient.java | 1 - .../network/fluent/NetworkWatchersClient.java | 1 - .../network/fluent/OperationsClient.java | 1 - .../network/fluent/P2SVpnGatewaysClient.java | 1 - .../network/fluent/PacketCapturesClient.java | 1 - ...rExpressRouteCircuitConnectionsClient.java | 1 - .../fluent/PrivateDnsZoneGroupsClient.java | 1 - .../fluent/PrivateEndpointsClient.java | 1 - .../fluent/PrivateLinkServicesClient.java | 1 - .../fluent/PublicIpAddressesClient.java | 1 - .../fluent/PublicIpPrefixesClient.java | 1 - .../fluent/ResourceNavigationLinksClient.java | 1 - .../fluent/RouteFilterRulesClient.java | 1 - .../network/fluent/RouteFiltersClient.java | 1 - .../network/fluent/RouteTablesClient.java | 1 - .../network/fluent/RoutesClient.java | 1 - .../SecurityPartnerProvidersClient.java | 1 - .../network/fluent/SecurityRulesClient.java | 1 - .../fluent/ServiceAssociationLinksClient.java | 1 - .../fluent/ServiceEndpointPoliciesClient.java | 1 - ...erviceEndpointPolicyDefinitionsClient.java | 1 - .../network/fluent/ServiceTagsClient.java | 1 - .../network/fluent/SubnetsClient.java | 1 - .../network/fluent/UsagesClient.java | 1 - .../fluent/VirtualApplianceSitesClient.java | 1 - .../fluent/VirtualApplianceSkusClient.java | 1 - .../VirtualHubBgpConnectionsClient.java | 1 - .../VirtualHubIpConfigurationsClient.java | 1 - .../fluent/VirtualHubRouteTableV2SClient.java | 1 - .../network/fluent/VirtualHubsClient.java | 1 - ...irtualNetworkGatewayConnectionsClient.java | 1 - .../fluent/VirtualNetworkGatewaysClient.java | 1 - .../fluent/VirtualNetworkPeeringsClient.java | 1 - .../fluent/VirtualNetworkTapsClient.java | 1 - .../network/fluent/VirtualNetworksClient.java | 1 - .../fluent/VirtualRouterPeeringsClient.java | 1 - .../network/fluent/VirtualRoutersClient.java | 1 - .../network/fluent/VirtualWansClient.java | 1 - .../network/fluent/VpnConnectionsClient.java | 1 - .../network/fluent/VpnGatewaysClient.java | 1 - .../fluent/VpnLinkConnectionsClient.java | 1 - ...ationsAssociatedWithVirtualWansClient.java | 1 - .../fluent/VpnServerConfigurationsClient.java | 1 - .../fluent/VpnSiteLinkConnectionsClient.java | 1 - .../network/fluent/VpnSiteLinksClient.java | 1 - .../network/fluent/VpnSitesClient.java | 1 - .../fluent/VpnSitesConfigurationsClient.java | 1 - .../implementation/NetworkUsagesImpl.java | 2 +- .../privatedns/PrivateDnsZoneManager.java | 2 + .../PrivateDnsManagementClient.java | 5 +- .../PrivateDnsManagementClientBuilder.java | 2 +- .../privatedns/fluent/PrivateZonesClient.java | 1 - .../privatedns/fluent/RecordSetsClient.java | 1 - .../fluent/VirtualNetworkLinksClient.java | 1 - .../resourcemanager/redis/RedisManager.java | 2 + .../redis/fluent/FirewallRulesClient.java | 1 - .../redis/fluent/LinkedServersClient.java | 1 - .../redis/fluent/OperationsClient.java | 1 - .../redis/fluent/PatchSchedulesClient.java | 1 - .../redis/fluent/RedisClient.java | 1 - .../{ => fluent}/RedisManagementClient.java | 7 +- .../RedisManagementClientBuilder.java | 2 +- .../resources/ResourceManager.java | 8 ++ .../fluent/DeploymentOperationsClient.java | 1 - .../resources/fluent/DeploymentsClient.java | 1 - .../resources/{ => fluent}/FeatureClient.java | 3 +- .../{ => fluent}/FeatureClientBuilder.java | 2 +- .../resources/fluent/FeaturesClient.java | 1 - .../resources/fluent/OperationsClient.java | 1 - .../fluent/PolicyAssignmentsClient.java | 1 - .../resources/{ => fluent}/PolicyClient.java | 5 +- .../{ => fluent}/PolicyClientBuilder.java | 2 +- .../fluent/PolicyDefinitionsClient.java | 1 - .../fluent/PolicySetDefinitionsClient.java | 1 - .../resources/fluent/ProvidersClient.java | 1 - .../fluent/ResourceGroupsClient.java | 1 - .../ResourceManagementClient.java | 9 +- .../ResourceManagementClientBuilder.java | 2 +- .../resources/fluent/ResourceNamesClient.java | 1 - .../resources/fluent/ResourcesClient.java | 1 - .../{ => fluent}/SubscriptionClient.java | 5 +- .../SubscriptionClientBuilder.java | 2 +- .../resources/fluent/SubscriptionsClient.java | 1 - .../resources/fluent/TagOperationsClient.java | 1 - .../resources/fluent/TenantsClient.java | 1 - .../implementation/GenericResourceImpl.java | 2 +- .../implementation/ResourceGroupImpl.java | 2 +- .../servicebus/ServiceBusManager.java | 2 + .../servicebus/fluent/NamespacesClient.java | 1 - .../servicebus/fluent/OperationsClient.java | 1 - .../servicebus/fluent/QueuesClient.java | 1 - .../ServiceBusManagementClient.java | 8 +- .../ServiceBusManagementClientBuilder.java | 2 +- .../fluent/SubscriptionsClient.java | 1 - .../servicebus/fluent/TopicsClient.java | 1 - .../resourcemanager/sql/SqlServerManager.java | 2 + ...BackupLongTermRetentionPoliciesClient.java | 1 - ...ackupShortTermRetentionPoliciesClient.java | 1 - .../sql/fluent/CapabilitiesClient.java | 1 - .../sql/fluent/DataMaskingPoliciesClient.java | 1 - .../sql/fluent/DataMaskingRulesClient.java | 1 - .../DatabaseAutomaticTuningsClient.java | 1 - .../DatabaseBlobAuditingPoliciesClient.java | 1 - .../sql/fluent/DatabaseOperationsClient.java | 1 - ...DatabaseThreatDetectionPoliciesClient.java | 1 - .../sql/fluent/DatabaseUsagesClient.java | 1 - ...rabilityAssessmentRuleBaselinesClient.java | 1 - ...aseVulnerabilityAssessmentScansClient.java | 1 - ...atabaseVulnerabilityAssessmentsClient.java | 1 - .../sql/fluent/DatabasesClient.java | 1 - .../fluent/ElasticPoolActivitiesClient.java | 1 - .../ElasticPoolDatabaseActivitiesClient.java | 1 - .../fluent/ElasticPoolOperationsClient.java | 1 - .../sql/fluent/ElasticPoolsClient.java | 1 - .../fluent/EncryptionProtectorsClient.java | 1 - ...dedDatabaseBlobAuditingPoliciesClient.java | 1 - ...endedServerBlobAuditingPoliciesClient.java | 1 - .../sql/fluent/FailoverGroupsClient.java | 1 - .../sql/fluent/FirewallRulesClient.java | 1 - .../sql/fluent/GeoBackupPoliciesClient.java | 1 - .../fluent/InstanceFailoverGroupsClient.java | 1 - .../sql/fluent/InstancePoolsClient.java | 1 - .../sql/fluent/JobAgentsClient.java | 1 - .../sql/fluent/JobCredentialsClient.java | 1 - .../sql/fluent/JobExecutionsClient.java | 1 - .../sql/fluent/JobStepExecutionsClient.java | 1 - .../sql/fluent/JobStepsClient.java | 1 - .../sql/fluent/JobTargetExecutionsClient.java | 1 - .../sql/fluent/JobTargetGroupsClient.java | 1 - .../sql/fluent/JobVersionsClient.java | 1 - .../sql/fluent/JobsClient.java | 1 - .../LongTermRetentionBackupsClient.java | 1 - ...RetentionManagedInstanceBackupsClient.java | 1 - ...ackupShortTermRetentionPoliciesClient.java | 1 - .../ManagedDatabaseRestoreDetailsClient.java | 1 - ...edDatabaseSecurityAlertPoliciesClient.java | 1 - ...anagedDatabaseSensitivityLabelsClient.java | 1 - ...rabilityAssessmentRuleBaselinesClient.java | 1 - ...aseVulnerabilityAssessmentScansClient.java | 1 - ...atabaseVulnerabilityAssessmentsClient.java | 1 - .../sql/fluent/ManagedDatabasesClient.java | 1 - .../ManagedInstanceAdministratorsClient.java | 1 - ...gedInstanceEncryptionProtectorsClient.java | 1 - .../sql/fluent/ManagedInstanceKeysClient.java | 1 - ...stanceLongTermRetentionPoliciesClient.java | 1 - .../ManagedInstanceOperationsClient.java | 1 - .../ManagedInstanceTdeCertificatesClient.java | 1 - ...nstanceVulnerabilityAssessmentsClient.java | 1 - .../sql/fluent/ManagedInstancesClient.java | 1 - ...ackupShortTermRetentionPoliciesClient.java | 1 - ...agedServerSecurityAlertPoliciesClient.java | 1 - .../sql/fluent/OperationsClient.java | 1 - .../PrivateEndpointConnectionsClient.java | 1 - .../fluent/PrivateLinkResourcesClient.java | 1 - .../fluent/RecommendedElasticPoolsClient.java | 1 - .../fluent/RecoverableDatabasesClient.java | 1 - .../RecoverableManagedDatabasesClient.java | 1 - .../sql/fluent/ReplicationLinksClient.java | 1 - .../RestorableDroppedDatabasesClient.java | 1 - ...storableDroppedManagedDatabasesClient.java | 1 - .../sql/fluent/RestorePointsClient.java | 1 - .../sql/fluent/SensitivityLabelsClient.java | 1 - .../fluent/ServerAutomaticTuningsClient.java | 1 - .../ServerAzureADAdministratorsClient.java | 1 - .../ServerBlobAuditingPoliciesClient.java | 1 - .../ServerCommunicationLinksClient.java | 1 - .../ServerConnectionPoliciesClient.java | 1 - .../sql/fluent/ServerDnsAliasesClient.java | 1 - .../sql/fluent/ServerKeysClient.java | 1 - .../ServerSecurityAlertPoliciesClient.java | 1 - .../sql/fluent/ServerUsagesClient.java | 1 - .../ServerVulnerabilityAssessmentsClient.java | 1 - .../sql/fluent/ServersClient.java | 1 - .../sql/fluent/ServiceObjectivesClient.java | 1 - .../sql/fluent/ServiceTierAdvisorsClient.java | 1 - .../sql/{ => fluent}/SqlManagementClient.java | 94 +--------------- .../SqlManagementClientBuilder.java | 2 +- .../sql/fluent/SubscriptionUsagesClient.java | 1 - .../sql/fluent/SyncAgentsClient.java | 1 - .../sql/fluent/SyncGroupsClient.java | 1 - .../sql/fluent/SyncMembersClient.java | 1 - .../sql/fluent/TdeCertificatesClient.java | 1 - ...sparentDataEncryptionActivitiesClient.java | 1 - .../TransparentDataEncryptionsClient.java | 1 - .../sql/fluent/UsagesClient.java | 1 - .../sql/fluent/VirtualClustersClient.java | 1 - .../sql/fluent/VirtualNetworkRulesClient.java | 1 - .../sql/fluent/WorkloadClassifiersClient.java | 1 - .../sql/fluent/WorkloadGroupsClient.java | 1 - .../storage/StorageManager.java | 2 + .../storage/fluent/BlobContainersClient.java | 1 - .../storage/fluent/BlobServicesClient.java | 1 - .../fluent/EncryptionScopesClient.java | 1 - .../storage/fluent/FileServicesClient.java | 1 - .../storage/fluent/FileSharesClient.java | 1 - .../fluent/ManagementPoliciesClient.java | 1 - ...ctReplicationPoliciesOperationsClient.java | 1 - .../storage/fluent/OperationsClient.java | 1 - .../PrivateEndpointConnectionsClient.java | 1 - .../fluent/PrivateLinkResourcesClient.java | 1 - .../storage/fluent/QueueServicesClient.java | 1 - .../storage/fluent/QueuesClient.java | 1 - .../storage/fluent/SkusClient.java | 1 - .../storage/fluent/StorageAccountsClient.java | 1 - .../{ => fluent}/StorageManagementClient.java | 20 +--- .../StorageManagementClientBuilder.java | 2 +- .../storage/fluent/TableServicesClient.java | 1 - .../storage/fluent/TablesClient.java | 1 - .../storage/fluent/UsagesClient.java | 1 - .../trafficmanager/TrafficManager.java | 2 + .../fluent/EndpointsClient.java | 1 - .../fluent/GeographicHierarchiesClient.java | 1 - .../trafficmanager/fluent/HeatMapsClient.java | 1 - .../trafficmanager/fluent/ProfilesClient.java | 1 - .../TrafficManagerManagementClient.java | 8 +- ...TrafficManagerManagementClientBuilder.java | 2 +- .../TrafficManagerUserMetricsKeysClient.java | 1 - 458 files changed, 109 insertions(+), 820 deletions(-) rename sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/{ => fluent}/AppPlatformManagementClient.java (91%) rename sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/{ => fluent}/AppPlatformManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/{ => fluent}/WebSiteManagementClient.java (89%) rename sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/{ => fluent}/WebSiteManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/{ => fluent}/AuthorizationManagementClient.java (91%) rename sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/{ => fluent}/AuthorizationManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/{ => fluent}/GraphRbacManagementClient.java (90%) rename sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/{ => fluent}/GraphRbacManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/{ => fluent}/ComputeManagementClient.java (88%) rename sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/{ => fluent}/ComputeManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/{ => fluent}/ContainerInstanceManagementClient.java (93%) rename sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/{ => fluent}/ContainerInstanceManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => fluent}/ContainerRegistryManagementClient.java (91%) rename sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => fluent}/ContainerRegistryManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => fluent}/ContainerServiceManagementClient.java (92%) rename sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => fluent}/ContainerServiceManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/{ => fluent}/CosmosDBManagementClient.java (89%) rename sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/{ => fluent}/CosmosDBManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/{ => fluent}/DnsManagementClient.java (96%) rename sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/{ => fluent}/DnsManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{ => fluent}/EventHubManagementClient.java (92%) rename sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{ => fluent}/EventHubManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/{ => fluent}/KeyVaultManagementClient.java (94%) rename sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/{ => fluent}/KeyVaultManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/{ => fluent}/MonitorClient.java (88%) rename sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/{ => fluent}/MonitorClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/{ => fluent}/ManagedServiceIdentityClient.java (95%) rename sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/{ => fluent}/ManagedServiceIdentityClientBuilder.java (99%) rename sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/{ => fluent}/NetworkManagementClient.java (95%) rename sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/{ => fluent}/NetworkManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/{ => fluent}/PrivateDnsManagementClient.java (95%) rename sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/{ => fluent}/PrivateDnsManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/{ => fluent}/RedisManagementClient.java (93%) rename sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/{ => fluent}/RedisManagementClientBuilder.java (99%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/FeatureClient.java (99%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/FeatureClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/PolicyClient.java (94%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/PolicyClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/ResourceManagementClient.java (92%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/ResourceManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/SubscriptionClient.java (94%) rename sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/SubscriptionClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/{ => fluent}/ServiceBusManagementClient.java (93%) rename sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/{ => fluent}/ServiceBusManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{ => fluent}/SqlManagementClient.java (87%) rename sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{ => fluent}/SqlManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/{ => fluent}/StorageManagementClient.java (89%) rename sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/{ => fluent}/StorageManagementClientBuilder.java (98%) rename sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/{ => fluent}/TrafficManagerManagementClient.java (93%) rename sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/{ => fluent}/TrafficManagerManagementClientBuilder.java (98%) diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java index 2909523ab1e7d..605c56a37eef2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.appplatform.fluent.AppPlatformManagementClient; +import com.azure.resourcemanager.appplatform.fluent.AppPlatformManagementClientBuilder; import com.azure.resourcemanager.appplatform.implementation.SpringServicesImpl; import com.azure.resourcemanager.appplatform.models.SpringServices; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppPlatformManagementClient.java similarity index 91% rename from sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppPlatformManagementClient.java index edda35b6bd1cd..aa7070a0a3bbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppPlatformManagementClient.java @@ -2,23 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appplatform; +package com.azure.resourcemanager.appplatform.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.appplatform.fluent.AppsClient; -import com.azure.resourcemanager.appplatform.fluent.BindingsClient; -import com.azure.resourcemanager.appplatform.fluent.CertificatesClient; -import com.azure.resourcemanager.appplatform.fluent.ConfigServersClient; -import com.azure.resourcemanager.appplatform.fluent.CustomDomainsClient; -import com.azure.resourcemanager.appplatform.fluent.DeploymentsClient; -import com.azure.resourcemanager.appplatform.fluent.MonitoringSettingsClient; -import com.azure.resourcemanager.appplatform.fluent.OperationsClient; -import com.azure.resourcemanager.appplatform.fluent.ServicesClient; -import com.azure.resourcemanager.appplatform.fluent.SkusClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppPlatformManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppPlatformManagementClientBuilder.java index b7d1fe50ea827..d1e121168e6cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/AppPlatformManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppPlatformManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appplatform; +package com.azure.resourcemanager.appplatform.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppsClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppsClient.java index 8000bbd48a480..a3687d495001f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/AppsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.AppResourceCollectionInner; import com.azure.resourcemanager.appplatform.fluent.inner.AppResourceInner; import com.azure.resourcemanager.appplatform.models.CustomDomainValidatePayload; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/BindingsClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/BindingsClient.java index 5876a9490f990..debf1bff2d4e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/BindingsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/BindingsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.BindingResourceCollectionInner; import com.azure.resourcemanager.appplatform.fluent.inner.BindingResourceInner; import com.azure.resourcemanager.appplatform.models.BindingResourceProperties; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/CertificatesClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/CertificatesClient.java index 11b6366fd4aa7..79d7de5850724 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/CertificatesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/CertificatesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.CertificateResourceCollectionInner; import com.azure.resourcemanager.appplatform.fluent.inner.CertificateResourceInner; import com.azure.resourcemanager.appplatform.models.CertificateProperties; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ConfigServersClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ConfigServersClient.java index 8e8599a54aa14..a4e3735313199 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ConfigServersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ConfigServersClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.ConfigServerResourceInner; import com.azure.resourcemanager.appplatform.models.ConfigServerProperties; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/CustomDomainsClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/CustomDomainsClient.java index 36aa7fd0e3c67..858149d21f35d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/CustomDomainsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/CustomDomainsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceCollectionInner; import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceInner; import com.azure.resourcemanager.appplatform.models.CustomDomainProperties; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/DeploymentsClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/DeploymentsClient.java index eb62347c54ee0..04fc794bb5c65 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/DeploymentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/DeploymentsClient.java @@ -35,7 +35,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.CollectionFormat; import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.DeploymentResourceCollectionInner; import com.azure.resourcemanager.appplatform.fluent.inner.DeploymentResourceInner; import com.azure.resourcemanager.appplatform.fluent.inner.LogFileUrlResponseInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/MonitoringSettingsClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/MonitoringSettingsClient.java index fd9ce56e9b439..d52e43d203e3e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/MonitoringSettingsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/MonitoringSettingsClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.MonitoringSettingResourceInner; import com.azure.resourcemanager.appplatform.models.MonitoringSettingProperties; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/OperationsClient.java index 4639f40d775ae..b55ecdf97ca3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.AvailableOperationsInner; import com.azure.resourcemanager.appplatform.fluent.inner.OperationDetailInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java index b51f15dd53765..f652945847b2c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.ServiceResourceInner; import com.azure.resourcemanager.appplatform.fluent.inner.ServiceResourceListInner; import com.azure.resourcemanager.appplatform.models.NameAvailability; diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/SkusClient.java b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/SkusClient.java index 7365eac3dba78..9e1f213225dd8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/SkusClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/SkusClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.ResourceSkuCollectionInner; import com.azure.resourcemanager.appplatform.models.ResourceSku; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java index 06c1ae169343f..18b93ebf97be4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/AppServiceManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.appservice.fluent.WebSiteManagementClient; +import com.azure.resourcemanager.appservice.fluent.WebSiteManagementClientBuilder; import com.azure.resourcemanager.appservice.implementation.AppServiceCertificateOrdersImpl; import com.azure.resourcemanager.appservice.implementation.AppServiceCertificatesImpl; import com.azure.resourcemanager.appservice.implementation.AppServiceDomainsImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java index 8263f4808db67..99e20651a0211 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AppServiceCertificateCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.AppServiceCertificateOrderCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.AppServiceCertificateOrderInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java index 3f850e2acc9e8..a9c2a34a52cae 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AddressResponseInner; import com.azure.resourcemanager.appservice.fluent.inner.AppServiceEnvironmentCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.AppServiceEnvironmentResourceInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServicePlansClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServicePlansClient.java index 870f4fe24ccc4..9014d7e2dbb3e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServicePlansClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServicePlansClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AppServicePlanCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.AppServicePlanInner; import com.azure.resourcemanager.appservice.fluent.inner.CapabilityInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificateRegistrationProvidersClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificateRegistrationProvidersClient.java index 1ddfbe7c9435d..e5b057140a839 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificateRegistrationProvidersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificateRegistrationProvidersClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.CsmOperationCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.CsmOperationDescriptionInner; import com.azure.resourcemanager.appservice.models.DefaultErrorResponseErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java index 8958e339fdfc9..62cff13522e2e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.CertificateCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.CertificateInner; import com.azure.resourcemanager.appservice.models.CertificatePatchResource; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DeletedWebAppsClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DeletedWebAppsClient.java index eb7bae6e40a3c..d6b61836b5d0e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DeletedWebAppsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DeletedWebAppsClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.DeletedSiteInner; import com.azure.resourcemanager.appservice.fluent.inner.DeletedWebAppCollectionInner; import com.azure.resourcemanager.appservice.models.DefaultErrorResponseErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DiagnosticsClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DiagnosticsClient.java index cdc4df582e87b..57353339e2f97 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DiagnosticsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DiagnosticsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AnalysisDefinitionInner; import com.azure.resourcemanager.appservice.fluent.inner.DetectorDefinitionInner; import com.azure.resourcemanager.appservice.fluent.inner.DetectorResponseCollectionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainRegistrationProvidersClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainRegistrationProvidersClient.java index a062ba0c00dbd..aa3b93776d93f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainRegistrationProvidersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainRegistrationProvidersClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.CsmOperationCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.CsmOperationDescriptionInner; import com.azure.resourcemanager.appservice.models.DefaultErrorResponseErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java index dc740c6e9e64d..cc7afcf2ed25f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.DomainAvailabilityCheckResultInner; import com.azure.resourcemanager.appservice.fluent.inner.DomainCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.DomainControlCenterSsoRequestInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ProvidersClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ProvidersClient.java index 1ab476fc04835..9ee2daa6c8dea 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ProvidersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ProvidersClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.ApplicationStackCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.ApplicationStackResourceInner; import com.azure.resourcemanager.appservice.fluent.inner.CsmOperationCollectionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java index 2fe95505d296f..a9f5d09ab1720 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.RecommendationCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.RecommendationInner; import com.azure.resourcemanager.appservice.fluent.inner.RecommendationRuleInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceHealthMetadatasClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceHealthMetadatasClient.java index f4be042849c63..60b4481ae7472 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceHealthMetadatasClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceHealthMetadatasClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.ResourceHealthMetadataCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.ResourceHealthMetadataInner; import com.azure.resourcemanager.appservice.models.DefaultErrorResponseErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java index 9ee576dbeab98..e807592a91cea 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.BillingMeterCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.BillingMeterInner; import com.azure.resourcemanager.appservice.fluent.inner.DeploymentLocationsInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/StaticSitesClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/StaticSitesClient.java index e4882de9573a2..f657b753f1ffb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/StaticSitesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/StaticSitesClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.StaticSiteArmResourceInner; import com.azure.resourcemanager.appservice.fluent.inner.StaticSiteBuildArmResourceInner; import com.azure.resourcemanager.appservice.fluent.inner.StaticSiteBuildCollectionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/TopLevelDomainsClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/TopLevelDomainsClient.java index 6776cf715b040..03eada206fbdd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/TopLevelDomainsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/TopLevelDomainsClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.TldLegalAgreementCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.TldLegalAgreementInner; import com.azure.resourcemanager.appservice.fluent.inner.TopLevelDomainCollectionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebAppsClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebAppsClient.java index cc37015670a52..e270ae25ee20f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebAppsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebAppsClient.java @@ -34,7 +34,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AzureStoragePropertyDictionaryResourceInner; import com.azure.resourcemanager.appservice.fluent.inner.BackupItemCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.BackupItemInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebSiteManagementClient.java similarity index 89% rename from sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebSiteManagementClient.java index 35f7616fe7297..9b926f7670c28 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebSiteManagementClient.java @@ -2,30 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appservice; +package com.azure.resourcemanager.appservice.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.appservice.fluent.AppServiceCertificateOrdersClient; -import com.azure.resourcemanager.appservice.fluent.AppServiceEnvironmentsClient; -import com.azure.resourcemanager.appservice.fluent.AppServicePlansClient; -import com.azure.resourcemanager.appservice.fluent.CertificateRegistrationProvidersClient; -import com.azure.resourcemanager.appservice.fluent.CertificatesClient; -import com.azure.resourcemanager.appservice.fluent.DeletedWebAppsClient; -import com.azure.resourcemanager.appservice.fluent.DiagnosticsClient; -import com.azure.resourcemanager.appservice.fluent.DomainRegistrationProvidersClient; -import com.azure.resourcemanager.appservice.fluent.DomainsClient; -import com.azure.resourcemanager.appservice.fluent.ProvidersClient; -import com.azure.resourcemanager.appservice.fluent.RecommendationsClient; -import com.azure.resourcemanager.appservice.fluent.ResourceHealthMetadatasClient; -import com.azure.resourcemanager.appservice.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.appservice.fluent.StaticSitesClient; -import com.azure.resourcemanager.appservice.fluent.TopLevelDomainsClient; -import com.azure.resourcemanager.appservice.fluent.WebAppsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; + import java.time.Duration; /** Initializes a new instance of the WebSiteManagementClient type. */ diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebSiteManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebSiteManagementClientBuilder.java index d6f59cf3b372f..d96ec1827a043 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/WebSiteManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appservice; +package com.azure.resourcemanager.appservice.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManager.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManager.java index d751f814a5cfb..3576789cd8439 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManager.java @@ -5,6 +5,10 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.authorization.fluent.AuthorizationManagementClient; +import com.azure.resourcemanager.authorization.fluent.AuthorizationManagementClientBuilder; +import com.azure.resourcemanager.authorization.fluent.GraphRbacManagementClient; +import com.azure.resourcemanager.authorization.fluent.GraphRbacManagementClientBuilder; import com.azure.resourcemanager.authorization.implementation.ActiveDirectoryApplicationsImpl; import com.azure.resourcemanager.authorization.implementation.ActiveDirectoryGroupsImpl; import com.azure.resourcemanager.authorization.implementation.ActiveDirectoryUsersImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ApplicationsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ApplicationsClient.java index ddb91f34166f4..0550b01f12ae3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ApplicationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ApplicationsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.ApplicationInner; import com.azure.resourcemanager.authorization.fluent.inner.ApplicationListResultInner; import com.azure.resourcemanager.authorization.fluent.inner.DirectoryObjectInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/AuthorizationManagementClient.java similarity index 91% rename from sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/AuthorizationManagementClient.java index 454aedc44d3a1..b6d7c1ccf41ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/AuthorizationManagementClient.java @@ -2,19 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.authorization; +package com.azure.resourcemanager.authorization.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.authorization.fluent.ClassicAdministratorsClient; -import com.azure.resourcemanager.authorization.fluent.GlobalAdministratorsClient; -import com.azure.resourcemanager.authorization.fluent.PermissionsClient; -import com.azure.resourcemanager.authorization.fluent.ProviderOperationsMetadatasClient; -import com.azure.resourcemanager.authorization.fluent.RoleAssignmentsClient; -import com.azure.resourcemanager.authorization.fluent.RoleDefinitionsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/AuthorizationManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/AuthorizationManagementClientBuilder.java index 917c7d9c86eed..f2064cb61f4a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/AuthorizationManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/AuthorizationManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.authorization; +package com.azure.resourcemanager.authorization.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ClassicAdministratorsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ClassicAdministratorsClient.java index 9e520fb94fd6d..ca5cfb066d508 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ClassicAdministratorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ClassicAdministratorsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.AuthorizationManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.ClassicAdministratorInner; import com.azure.resourcemanager.authorization.fluent.inner.ClassicAdministratorListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DeletedApplicationsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DeletedApplicationsClient.java index 23caa2e59c79e..6bb4680820959 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DeletedApplicationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DeletedApplicationsClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.ApplicationInner; import com.azure.resourcemanager.authorization.fluent.inner.ApplicationListResultInner; import com.azure.resourcemanager.authorization.models.GraphErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DomainsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DomainsClient.java index b83f952177b71..9ecd54b25b1fa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DomainsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DomainsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.DomainInner; import com.azure.resourcemanager.authorization.fluent.inner.DomainListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GlobalAdministratorsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GlobalAdministratorsClient.java index 0c68c68d7c805..7286472dd6c1f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GlobalAdministratorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GlobalAdministratorsClient.java @@ -20,7 +20,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.AuthorizationManagementClient; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in GlobalAdministrators. */ diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/GraphRbacManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GraphRbacManagementClient.java similarity index 90% rename from sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/GraphRbacManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GraphRbacManagementClient.java index 8593b1705bfbf..01ce2c657171d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/GraphRbacManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GraphRbacManagementClient.java @@ -2,22 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.authorization; +package com.azure.resourcemanager.authorization.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.authorization.fluent.ApplicationsClient; -import com.azure.resourcemanager.authorization.fluent.DeletedApplicationsClient; -import com.azure.resourcemanager.authorization.fluent.DomainsClient; -import com.azure.resourcemanager.authorization.fluent.GroupsClient; -import com.azure.resourcemanager.authorization.fluent.OAuth2PermissionGrantsClient; -import com.azure.resourcemanager.authorization.fluent.ObjectsClient; -import com.azure.resourcemanager.authorization.fluent.ServicePrincipalsClient; -import com.azure.resourcemanager.authorization.fluent.SignedInUsersClient; -import com.azure.resourcemanager.authorization.fluent.UsersClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/GraphRbacManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GraphRbacManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/GraphRbacManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GraphRbacManagementClientBuilder.java index c60717b014309..1168b095da98d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/GraphRbacManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GraphRbacManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.authorization; +package com.azure.resourcemanager.authorization.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GroupsClient.java index 6fa9e65ed3869..84f23db9dd45b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GroupsClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.ADGroupInner; import com.azure.resourcemanager.authorization.fluent.inner.CheckGroupMembershipResultInner; import com.azure.resourcemanager.authorization.fluent.inner.DirectoryObjectInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/OAuth2PermissionGrantsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/OAuth2PermissionGrantsClient.java index 24c73751268d8..c42ccf3182a1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/OAuth2PermissionGrantsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/OAuth2PermissionGrantsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.OAuth2PermissionGrantInner; import com.azure.resourcemanager.authorization.fluent.inner.OAuth2PermissionGrantListResultInner; import com.azure.resourcemanager.authorization.models.GraphErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ObjectsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ObjectsClient.java index 9da699df1e118..37e3da4b2d98b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ObjectsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ObjectsClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.DirectoryObjectInner; import com.azure.resourcemanager.authorization.fluent.inner.DirectoryObjectListResultInner; import com.azure.resourcemanager.authorization.models.GetObjectsParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/PermissionsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/PermissionsClient.java index 394f6e12f49dd..7709603e2787a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/PermissionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/PermissionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.AuthorizationManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.PermissionGetResultInner; import com.azure.resourcemanager.authorization.fluent.inner.PermissionInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ProviderOperationsMetadatasClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ProviderOperationsMetadatasClient.java index aabc522348f5f..ada2da4bd930c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ProviderOperationsMetadatasClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ProviderOperationsMetadatasClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.AuthorizationManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.ProviderOperationsMetadataInner; import com.azure.resourcemanager.authorization.fluent.inner.ProviderOperationsMetadataListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleAssignmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleAssignmentsClient.java index f0b8934252aed..e6999927c203d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleAssignmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleAssignmentsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.AuthorizationManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.RoleAssignmentInner; import com.azure.resourcemanager.authorization.fluent.inner.RoleAssignmentListResultInner; import com.azure.resourcemanager.authorization.models.RoleAssignmentCreateParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleDefinitionsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleDefinitionsClient.java index 135b28b608c85..4537cb690e114 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleDefinitionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleDefinitionsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.AuthorizationManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.RoleDefinitionInner; import com.azure.resourcemanager.authorization.fluent.inner.RoleDefinitionListResultInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java index df25284ecbb79..97db119fee22c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.DirectoryObjectInner; import com.azure.resourcemanager.authorization.fluent.inner.DirectoryObjectListResultInner; import com.azure.resourcemanager.authorization.fluent.inner.KeyCredentialInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/SignedInUsersClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/SignedInUsersClient.java index 98c51d0ab76bc..a70c33ddcdd41 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/SignedInUsersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/SignedInUsersClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.DirectoryObjectInner; import com.azure.resourcemanager.authorization.fluent.inner.DirectoryObjectListResultInner; import com.azure.resourcemanager.authorization.fluent.inner.UserInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/UsersClient.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/UsersClient.java index b951fee863b94..f8811d5cfe13e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/UsersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/UsersClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.authorization.GraphRbacManagementClient; import com.azure.resourcemanager.authorization.fluent.inner.UserGetMemberGroupsResultInner; import com.azure.resourcemanager.authorization.fluent.inner.UserInner; import com.azure.resourcemanager.authorization.fluent.inner.UserListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java index ec9284cd2f5f1..fcf1a92d8ade9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.compute.fluent.ComputeManagementClient; +import com.azure.resourcemanager.compute.fluent.ComputeManagementClientBuilder; import com.azure.resourcemanager.compute.implementation.AvailabilitySetsImpl; import com.azure.resourcemanager.compute.implementation.ComputeSkusImpl; import com.azure.resourcemanager.compute.implementation.ComputeUsagesImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java index 7932df395124f..be906e18ae45f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.AvailabilitySetInner; import com.azure.resourcemanager.compute.fluent.inner.AvailabilitySetListResultInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineSizeInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java similarity index 88% rename from sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java index 74afc770630a4..c665a46fdbea2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java @@ -2,43 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.compute; +package com.azure.resourcemanager.compute.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.compute.fluent.AvailabilitySetsClient; -import com.azure.resourcemanager.compute.fluent.ContainerServicesClient; -import com.azure.resourcemanager.compute.fluent.DedicatedHostGroupsClient; -import com.azure.resourcemanager.compute.fluent.DedicatedHostsClient; -import com.azure.resourcemanager.compute.fluent.DiskEncryptionSetsClient; -import com.azure.resourcemanager.compute.fluent.DisksClient; -import com.azure.resourcemanager.compute.fluent.GalleriesClient; -import com.azure.resourcemanager.compute.fluent.GalleryApplicationVersionsClient; -import com.azure.resourcemanager.compute.fluent.GalleryApplicationsClient; -import com.azure.resourcemanager.compute.fluent.GalleryImageVersionsClient; -import com.azure.resourcemanager.compute.fluent.GalleryImagesClient; -import com.azure.resourcemanager.compute.fluent.ImagesClient; -import com.azure.resourcemanager.compute.fluent.LogAnalyticsClient; -import com.azure.resourcemanager.compute.fluent.OperationsClient; -import com.azure.resourcemanager.compute.fluent.ProximityPlacementGroupsClient; -import com.azure.resourcemanager.compute.fluent.ResourceSkusClient; -import com.azure.resourcemanager.compute.fluent.SnapshotsClient; -import com.azure.resourcemanager.compute.fluent.SshPublicKeysClient; -import com.azure.resourcemanager.compute.fluent.UsagesClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineExtensionImagesClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineExtensionsClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineImagesClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineRunCommandsClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetExtensionsClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetRollingUpgradesClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetVMExtensionsClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetVMsClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetsClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineSizesClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachinesClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClientBuilder.java index bebf2d0ee2cf1..5a45ba5891bfb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.compute; +package com.azure.resourcemanager.compute.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java index 68d7c0741c1e0..a3d18ddd55b31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.ContainerServiceInner; import com.azure.resourcemanager.compute.fluent.inner.ContainerServiceListResultInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java index 758a435fff1f1..ff153d40952d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.DedicatedHostGroupInner; import com.azure.resourcemanager.compute.fluent.inner.DedicatedHostGroupListResultInner; import com.azure.resourcemanager.compute.models.DedicatedHostGroupUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java index 353c4d0bad1ea..f33fa0cb55d21 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.DedicatedHostInner; import com.azure.resourcemanager.compute.fluent.inner.DedicatedHostListResultInner; import com.azure.resourcemanager.compute.models.DedicatedHostUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java index 91da681904310..32e338bbe9b43 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.DiskEncryptionSetInner; import com.azure.resourcemanager.compute.fluent.inner.DiskEncryptionSetListInner; import com.azure.resourcemanager.compute.models.ApiErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java index e8a4e7fb26fc0..ee8413c297d6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.AccessUriInner; import com.azure.resourcemanager.compute.fluent.inner.DiskInner; import com.azure.resourcemanager.compute.fluent.inner.DiskListInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java index c63e1f5edc741..e88e47cf80256 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.GalleryInner; import com.azure.resourcemanager.compute.fluent.inner.GalleryListInner; import com.azure.resourcemanager.compute.models.ApiErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java index 18b3f38b84b17..599973e41a0aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.GalleryApplicationVersionInner; import com.azure.resourcemanager.compute.fluent.inner.GalleryApplicationVersionListInner; import com.azure.resourcemanager.compute.models.ApiErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java index 66331e6c89ccb..bf1a7018850b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.GalleryApplicationInner; import com.azure.resourcemanager.compute.fluent.inner.GalleryApplicationListInner; import com.azure.resourcemanager.compute.models.ApiErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java index d741a4cf635bb..44e8881d117dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.GalleryImageVersionInner; import com.azure.resourcemanager.compute.fluent.inner.GalleryImageVersionListInner; import com.azure.resourcemanager.compute.models.ApiErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java index 2e2e0cd5d4e9d..6cb7e1b007f46 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.GalleryImageInner; import com.azure.resourcemanager.compute.fluent.inner.GalleryImageListInner; import com.azure.resourcemanager.compute.models.ApiErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java index 82d54949e9f73..8d8e49ef57530 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.ImageInner; import com.azure.resourcemanager.compute.fluent.inner.ImageListResultInner; import com.azure.resourcemanager.compute.models.ImageUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java index dd7fe2c30ce6b..e21c542ff9624 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.LogAnalyticsOperationResultInner; import com.azure.resourcemanager.compute.models.LogAnalyticsInputBase; import com.azure.resourcemanager.compute.models.RequestRateByIntervalInput; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java index 8dcd55d1b7e7b..2bf7e03ed7c68 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.ComputeOperationListResultInner; import com.azure.resourcemanager.compute.fluent.inner.ComputeOperationValueInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java index 521e56e0c70ca..c6dfaf4301175 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.ProximityPlacementGroupInner; import com.azure.resourcemanager.compute.fluent.inner.ProximityPlacementGroupListResultInner; import com.azure.resourcemanager.compute.models.UpdateResource; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java index d97f7e4890641..281dd50858b3b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.ResourceSkuInner; import com.azure.resourcemanager.compute.fluent.inner.ResourceSkusResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java index 0ea95cfeed212..69c012aa60c9c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.AccessUriInner; import com.azure.resourcemanager.compute.fluent.inner.SnapshotInner; import com.azure.resourcemanager.compute.fluent.inner.SnapshotListInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java index 130c7fc68f156..e24187e75c86a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.SshPublicKeyGenerateKeyPairResultInner; import com.azure.resourcemanager.compute.fluent.inner.SshPublicKeyResourceInner; import com.azure.resourcemanager.compute.fluent.inner.SshPublicKeysGroupListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java index ef96f08139b3a..0bd095eb8019d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.ListUsagesResultInner; import com.azure.resourcemanager.compute.fluent.inner.UsageInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java index 8fca1070ab839..cc210628d7248 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineExtensionImageInner; import java.util.List; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java index aa9741bdbc865..1e557011abfc5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineExtensionInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineExtensionsListResultInner; import com.azure.resourcemanager.compute.models.VirtualMachineExtensionUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java index c69154278b53a..30ef6a2eb6941 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineImageInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineImageResourceInner; import java.util.List; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java index 16b9dbb818952..0871e2e7367be 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.RunCommandDocumentBaseInner; import com.azure.resourcemanager.compute.fluent.inner.RunCommandDocumentInner; import com.azure.resourcemanager.compute.fluent.inner.RunCommandListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java index 5783188bcc8e9..015077a6c9e2c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineScaleSetExtensionInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineScaleSetExtensionListResultInner; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetExtensionUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java index b86c47fbfea8c..a3981c3f195e0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.RollingUpgradeStatusInfoInner; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java index dd2287ca733ed..273a6dc8bad84 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineExtensionInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineExtensionsListResultInner; import com.azure.resourcemanager.compute.models.ApiErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java index f66588e97cd73..347df3efba1fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.RunCommandResultInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineScaleSetVMInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineScaleSetVMInstanceViewInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java index 46f3789de2ec8..820972dd35a49 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.RecoveryWalkResponseInner; import com.azure.resourcemanager.compute.fluent.inner.UpgradeOperationHistoricalStatusInfoInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineScaleSetInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java index 97e76a35af88f..5e4990a52d371 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineSizeInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineSizeListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java index 1be2ff6f6d0bf..959dd2e81e252 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.compute.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.RunCommandResultInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineCaptureResultInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeUsagesImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeUsagesImpl.java index 0ee9178b71ed6..add339df8b6dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeUsagesImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeUsagesImpl.java @@ -6,7 +6,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.compute.models.ComputeUsage; import com.azure.resourcemanager.compute.models.ComputeUsages; -import com.azure.resourcemanager.compute.ComputeManagementClient; +import com.azure.resourcemanager.compute.fluent.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.inner.UsageInner; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java index 95af5fef35461..477a010b3fa06 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java @@ -6,6 +6,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.authorization.AuthorizationManager; +import com.azure.resourcemanager.containerinstance.fluent.ContainerInstanceManagementClient; +import com.azure.resourcemanager.containerinstance.fluent.ContainerInstanceManagementClientBuilder; import com.azure.resourcemanager.containerinstance.implementation.ContainerGroupsImpl; import com.azure.resourcemanager.containerinstance.models.ContainerGroups; import com.azure.resourcemanager.network.NetworkManager; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java index c1eee704ff3aa..8b2ad3d9e5fa5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java @@ -34,7 +34,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerinstance.ContainerInstanceManagementClient; import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerGroupInner; import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerGroupListResultInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClient.java similarity index 93% rename from sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClient.java index b5e4636013577..06b8ad83ebcd5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClient.java @@ -2,17 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerinstance; +package com.azure.resourcemanager.containerinstance.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.containerinstance.fluent.ContainerGroupsClient; -import com.azure.resourcemanager.containerinstance.fluent.ContainersClient; -import com.azure.resourcemanager.containerinstance.fluent.LocationsClient; -import com.azure.resourcemanager.containerinstance.fluent.OperationsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClientBuilder.java index 79ef1761f2c3e..7fb8c6cb5ea37 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerinstance; +package com.azure.resourcemanager.containerinstance.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java index 2045796462bbd..4154b71f15fd1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.containerinstance.ContainerInstanceManagementClient; import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerExecResponseInner; import com.azure.resourcemanager.containerinstance.fluent.inner.LogsInner; import com.azure.resourcemanager.containerinstance.models.ContainerExecRequest; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java index 65e17a7f43166..a385f2f1c082c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.containerinstance.ContainerInstanceManagementClient; import com.azure.resourcemanager.containerinstance.fluent.inner.CachedImagesListResultInner; import com.azure.resourcemanager.containerinstance.fluent.inner.CapabilitiesListResultInner; import com.azure.resourcemanager.containerinstance.fluent.inner.UsageInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java index 31b6d23887838..7f83291aadc01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.containerinstance.ContainerInstanceManagementClient; import com.azure.resourcemanager.containerinstance.fluent.inner.OperationListResultInner; import com.azure.resourcemanager.containerinstance.models.Operation; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java index f40b42adde283..71c6b2a9f727c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryManagementClient; +import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryManagementClientBuilder; import com.azure.resourcemanager.containerregistry.implementation.RegistriesImpl; import com.azure.resourcemanager.containerregistry.implementation.RegistryTaskRunsImpl; import com.azure.resourcemanager.containerregistry.implementation.RegistryTasksImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java similarity index 91% rename from sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java index 12f3cec08e8fd..218e5f2a0a3c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java @@ -2,19 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerregistry; +package com.azure.resourcemanager.containerregistry.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.containerregistry.fluent.OperationsClient; -import com.azure.resourcemanager.containerregistry.fluent.RegistriesClient; -import com.azure.resourcemanager.containerregistry.fluent.ReplicationsClient; -import com.azure.resourcemanager.containerregistry.fluent.RunsClient; -import com.azure.resourcemanager.containerregistry.fluent.TasksClient; -import com.azure.resourcemanager.containerregistry.fluent.WebhooksClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClientBuilder.java index 8b5120d382110..10ce8cc287d38 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerregistry; +package com.azure.resourcemanager.containerregistry.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java index 08ec12cf8c05f..a9b9d9f939578 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.containerregistry.ContainerRegistryManagementClient; import com.azure.resourcemanager.containerregistry.fluent.inner.OperationDefinitionInner; import com.azure.resourcemanager.containerregistry.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java index bba303af8975a..e22e35deeb06c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerregistry.ContainerRegistryManagementClient; import com.azure.resourcemanager.containerregistry.fluent.inner.RegistryInner; import com.azure.resourcemanager.containerregistry.fluent.inner.RegistryListCredentialsResultInner; import com.azure.resourcemanager.containerregistry.fluent.inner.RegistryListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java index ceb94df0527b7..22ba97e2f60d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerregistry.ContainerRegistryManagementClient; import com.azure.resourcemanager.containerregistry.fluent.inner.ReplicationInner; import com.azure.resourcemanager.containerregistry.fluent.inner.ReplicationListResultInner; import com.azure.resourcemanager.containerregistry.models.ReplicationUpdateParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java index 006ac7684718b..9038e3be4bf91 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerregistry.ContainerRegistryManagementClient; import com.azure.resourcemanager.containerregistry.fluent.inner.RunGetLogResultInner; import com.azure.resourcemanager.containerregistry.fluent.inner.RunInner; import com.azure.resourcemanager.containerregistry.fluent.inner.RunListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java index 25729bda4ef57..aae292f4c7073 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerregistry.ContainerRegistryManagementClient; import com.azure.resourcemanager.containerregistry.fluent.inner.TaskInner; import com.azure.resourcemanager.containerregistry.fluent.inner.TaskListResultInner; import com.azure.resourcemanager.containerregistry.models.TaskUpdateParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java index 623b6a82da075..78027039100ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerregistry.ContainerRegistryManagementClient; import com.azure.resourcemanager.containerregistry.fluent.inner.CallbackConfigInner; import com.azure.resourcemanager.containerregistry.fluent.inner.EventInfoInner; import com.azure.resourcemanager.containerregistry.fluent.inner.EventInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java index 79f40adcb3260..8cd9bac3e8cd0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClientBuilder; import com.azure.resourcemanager.containerservice.implementation.KubernetesClustersImpl; import com.azure.resourcemanager.containerservice.models.KubernetesClusters; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java index 2469d62f55d57..8b5dffa2ebe0d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.ContainerServiceManagementClient; import com.azure.resourcemanager.containerservice.fluent.inner.AgentPoolAvailableVersionsInner; import com.azure.resourcemanager.containerservice.fluent.inner.AgentPoolInner; import com.azure.resourcemanager.containerservice.fluent.inner.AgentPoolListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java similarity index 92% rename from sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java index b12eca842e363..6c47379fbfdaf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -2,19 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerservice; +package com.azure.resourcemanager.containerservice.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; -import com.azure.resourcemanager.containerservice.fluent.ContainerServicesClient; -import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; -import com.azure.resourcemanager.containerservice.fluent.OpenShiftManagedClustersClient; -import com.azure.resourcemanager.containerservice.fluent.OperationsClient; -import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClientBuilder.java index 11e972eb75aaa..0f5d80f6fdd12 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerservice; +package com.azure.resourcemanager.containerservice.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java index c87cba0126c8a..384f0540abe94 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.ContainerServiceManagementClient; import com.azure.resourcemanager.containerservice.fluent.inner.ContainerServiceInner; import com.azure.resourcemanager.containerservice.fluent.inner.ContainerServiceListResultInner; import com.azure.resourcemanager.containerservice.fluent.inner.OrchestratorVersionProfileListResultInner; 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 3e7d1d971ceb4..37768972c1015 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 @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.ContainerServiceManagementClient; import com.azure.resourcemanager.containerservice.fluent.inner.CredentialResultsInner; import com.azure.resourcemanager.containerservice.fluent.inner.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.inner.ManagedClusterInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagedClustersClient.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagedClustersClient.java index d414297c02fa0..6856b9ecac8c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagedClustersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagedClustersClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.ContainerServiceManagementClient; import com.azure.resourcemanager.containerservice.fluent.inner.OpenShiftManagedClusterInner; import com.azure.resourcemanager.containerservice.fluent.inner.OpenShiftManagedClusterListResultInner; import com.azure.resourcemanager.containerservice.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java index 6d4de2d43889c..b24e70d2f0e58 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.containerservice.ContainerServiceManagementClient; import com.azure.resourcemanager.containerservice.fluent.inner.OperationListResultInner; import com.azure.resourcemanager.containerservice.fluent.inner.OperationValueInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java index 096c905602b65..1af7e6aa7c819 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.ContainerServiceManagementClient; import com.azure.resourcemanager.containerservice.fluent.inner.PrivateEndpointConnectionInner; import com.azure.resourcemanager.containerservice.fluent.inner.PrivateEndpointConnectionListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java index 6398053baa2d7..fdd8fdbf08ee9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.cosmos.fluent.CosmosDBManagementClient; +import com.azure.resourcemanager.cosmos.fluent.CosmosDBManagementClientBuilder; import com.azure.resourcemanager.cosmos.implementation.CosmosDBAccountsImpl; import com.azure.resourcemanager.cosmos.models.CosmosDBAccounts; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CassandraResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CassandraResourcesClient.java index de32c5a05df57..906ac1b673c80 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CassandraResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CassandraResourcesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.CassandraKeyspaceGetResultsInner; import com.azure.resourcemanager.cosmos.fluent.inner.CassandraKeyspaceListResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.CassandraTableGetResultsInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionPartitionRegionsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionPartitionRegionsClient.java index b3d88d0ab39fa..299c58faa9106 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionPartitionRegionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionPartitionRegionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionMetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionMetricListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionPartitionsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionPartitionsClient.java index cc523bef073aa..9cb6e6c22d15b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionPartitionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionPartitionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionMetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionMetricListResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionUsageInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionRegionsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionRegionsClient.java index b491793a34697..a8c483ea8e072 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionRegionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionRegionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.MetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.MetricListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionsClient.java index d86ee33940226..ee4c3172a6786 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CollectionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.MetricDefinitionInner; import com.azure.resourcemanager.cosmos.fluent.inner.MetricDefinitionsListResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.MetricInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosDBManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CosmosDBManagementClient.java similarity index 89% rename from sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosDBManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CosmosDBManagementClient.java index 0dded2ed48d62..f9c9038a57cd5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosDBManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CosmosDBManagementClient.java @@ -2,34 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.cosmos; +package com.azure.resourcemanager.cosmos.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.cosmos.fluent.CassandraResourcesClient; -import com.azure.resourcemanager.cosmos.fluent.CollectionPartitionRegionsClient; -import com.azure.resourcemanager.cosmos.fluent.CollectionPartitionsClient; -import com.azure.resourcemanager.cosmos.fluent.CollectionRegionsClient; -import com.azure.resourcemanager.cosmos.fluent.CollectionsClient; -import com.azure.resourcemanager.cosmos.fluent.DatabaseAccountRegionsClient; -import com.azure.resourcemanager.cosmos.fluent.DatabaseAccountsClient; -import com.azure.resourcemanager.cosmos.fluent.DatabasesClient; -import com.azure.resourcemanager.cosmos.fluent.GremlinResourcesClient; -import com.azure.resourcemanager.cosmos.fluent.MongoDBResourcesClient; -import com.azure.resourcemanager.cosmos.fluent.NotebookWorkspacesClient; -import com.azure.resourcemanager.cosmos.fluent.OperationsClient; -import com.azure.resourcemanager.cosmos.fluent.PartitionKeyRangeIdRegionsClient; -import com.azure.resourcemanager.cosmos.fluent.PartitionKeyRangeIdsClient; -import com.azure.resourcemanager.cosmos.fluent.PercentileSourceTargetsClient; -import com.azure.resourcemanager.cosmos.fluent.PercentileTargetsClient; -import com.azure.resourcemanager.cosmos.fluent.PercentilesClient; -import com.azure.resourcemanager.cosmos.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.cosmos.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.cosmos.fluent.SqlResourcesClient; -import com.azure.resourcemanager.cosmos.fluent.TableResourcesClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosDBManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CosmosDBManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosDBManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CosmosDBManagementClientBuilder.java index 695e13c61dc7b..a3b05c9e3a701 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/CosmosDBManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/CosmosDBManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.cosmos; +package com.azure.resourcemanager.cosmos.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabaseAccountRegionsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabaseAccountRegionsClient.java index ee5eaa998a00d..548286d9f0c79 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabaseAccountRegionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabaseAccountRegionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.MetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.MetricListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabaseAccountsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabaseAccountsClient.java index 79c09121e4cc0..74ab838a08c8f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabaseAccountsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabaseAccountsClient.java @@ -34,7 +34,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.DatabaseAccountGetResultsInner; import com.azure.resourcemanager.cosmos.fluent.inner.DatabaseAccountListConnectionStringsResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.DatabaseAccountListKeysResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabasesClient.java index 21bf8b9209f21..adc20a95cd5df 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/DatabasesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.MetricDefinitionInner; import com.azure.resourcemanager.cosmos.fluent.inner.MetricDefinitionsListResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.MetricInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/GremlinResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/GremlinResourcesClient.java index 1094879d1430b..d49e726872193 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/GremlinResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/GremlinResourcesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.GremlinDatabaseGetResultsInner; import com.azure.resourcemanager.cosmos.fluent.inner.GremlinDatabaseListResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.GremlinGraphGetResultsInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/MongoDBResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/MongoDBResourcesClient.java index b0e561010a797..67171de8b94a5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/MongoDBResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/MongoDBResourcesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.MongoDBCollectionGetResultsInner; import com.azure.resourcemanager.cosmos.fluent.inner.MongoDBCollectionListResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.MongoDBDatabaseGetResultsInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/NotebookWorkspacesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/NotebookWorkspacesClient.java index c63f64e7091c0..c807e13d2063a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/NotebookWorkspacesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/NotebookWorkspacesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.NotebookWorkspaceConnectionInfoResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.NotebookWorkspaceInner; import com.azure.resourcemanager.cosmos.fluent.inner.NotebookWorkspaceListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/OperationsClient.java index b7c6ea9e3437a..b5e4b79590d94 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.OperationInner; import com.azure.resourcemanager.cosmos.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PartitionKeyRangeIdRegionsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PartitionKeyRangeIdRegionsClient.java index ad840ff6fae83..a8f2aef4f7c9c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PartitionKeyRangeIdRegionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PartitionKeyRangeIdRegionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionMetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionMetricListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PartitionKeyRangeIdsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PartitionKeyRangeIdsClient.java index bca30fcd8b521..22f55895dc87c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PartitionKeyRangeIdsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PartitionKeyRangeIdsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionMetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.PartitionMetricListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentileSourceTargetsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentileSourceTargetsClient.java index a0aad6b069216..dce422c3f5a78 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentileSourceTargetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentileSourceTargetsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PercentileMetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.PercentileMetricListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentileTargetsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentileTargetsClient.java index 8e23428ceaffd..18242ab475ac0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentileTargetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentileTargetsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PercentileMetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.PercentileMetricListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentilesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentilesClient.java index f51b5593267df..27adb6fd70ae4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentilesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PercentilesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PercentileMetricInner; import com.azure.resourcemanager.cosmos.fluent.inner.PercentileMetricListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PrivateEndpointConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PrivateEndpointConnectionsClient.java index 504e8519bada8..d39bcf82ab455 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PrivateEndpointConnectionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PrivateEndpointConnectionInner; import com.azure.resourcemanager.cosmos.fluent.inner.PrivateEndpointConnectionListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PrivateLinkResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PrivateLinkResourcesClient.java index fb3ce2f4a56c2..0c8368d31d168 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PrivateLinkResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/PrivateLinkResourcesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.PrivateLinkResourceInner; import com.azure.resourcemanager.cosmos.fluent.inner.PrivateLinkResourceListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/SqlResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/SqlResourcesClient.java index 14e3a426c09bc..653c5a2129686 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/SqlResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/SqlResourcesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.SqlContainerGetResultsInner; import com.azure.resourcemanager.cosmos.fluent.inner.SqlContainerListResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.SqlDatabaseGetResultsInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/TableResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/TableResourcesClient.java index 41f674eea46e9..75de664000c01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/TableResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/TableResourcesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cosmos.CosmosDBManagementClient; import com.azure.resourcemanager.cosmos.fluent.inner.TableGetResultsInner; import com.azure.resourcemanager.cosmos.fluent.inner.TableListResultInner; import com.azure.resourcemanager.cosmos.fluent.inner.ThroughputSettingsGetResultsInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java index c30f80faa7891..dc99d29e64309 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.dns.fluent.DnsManagementClient; +import com.azure.resourcemanager.dns.fluent.DnsManagementClientBuilder; import com.azure.resourcemanager.dns.implementation.DnsZonesImpl; import com.azure.resourcemanager.dns.models.DnsZones; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/DnsManagementClient.java similarity index 96% rename from sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/DnsManagementClient.java index 2184479ef968f..57da84e1b9ffe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/DnsManagementClient.java @@ -2,15 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.dns; +package com.azure.resourcemanager.dns.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.dns.fluent.RecordSetsClient; -import com.azure.resourcemanager.dns.fluent.ZonesClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/DnsManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/DnsManagementClientBuilder.java index 89f15c0330a8e..dfa42baa41d53 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/DnsManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.dns; +package com.azure.resourcemanager.dns.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/RecordSetsClient.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/RecordSetsClient.java index e4fef5acaee0d..538b7a243826c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/RecordSetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/RecordSetsClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.dns.DnsManagementClient; import com.azure.resourcemanager.dns.fluent.inner.RecordSetInner; import com.azure.resourcemanager.dns.fluent.inner.RecordSetListResultInner; import com.azure.resourcemanager.dns.models.RecordType; diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/ZonesClient.java b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/ZonesClient.java index 13b0e5b22438b..09b012fe5eb87 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/ZonesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/fluent/ZonesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dns.DnsManagementClient; import com.azure.resourcemanager.dns.fluent.inner.ZoneInner; import com.azure.resourcemanager.dns.fluent.inner.ZoneListResultInner; import com.azure.resourcemanager.dns.models.ZoneUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java index 8e4b174984696..808a678e9ed8f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubsManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.eventhubs.fluent.EventHubManagementClient; +import com.azure.resourcemanager.eventhubs.fluent.EventHubManagementClientBuilder; import com.azure.resourcemanager.eventhubs.implementation.DisasterRecoveryPairingAuthorizationRulesImpl; import com.azure.resourcemanager.eventhubs.implementation.EventHubAuthorizationRulesImpl; import com.azure.resourcemanager.eventhubs.implementation.EventHubConsumerGroupsImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java index 07ed795016fba..deba5cb291de9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.eventhubs.EventHubManagementClient; import com.azure.resourcemanager.eventhubs.fluent.inner.ConsumerGroupInner; import com.azure.resourcemanager.eventhubs.fluent.inner.ConsumerGroupListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java index 9a6f7bbce26f9..46c56492b64aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.eventhubs.EventHubManagementClient; import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; import com.azure.resourcemanager.eventhubs.fluent.inner.ArmDisasterRecoveryInner; import com.azure.resourcemanager.eventhubs.fluent.inner.ArmDisasterRecoveryListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClient.java similarity index 92% rename from sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClient.java index 8c5484367cf92..115dc5aedfb0a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClient.java @@ -2,19 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.eventhubs; +package com.azure.resourcemanager.eventhubs.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.eventhubs.fluent.ConsumerGroupsClient; -import com.azure.resourcemanager.eventhubs.fluent.DisasterRecoveryConfigsClient; -import com.azure.resourcemanager.eventhubs.fluent.EventHubsClient; -import com.azure.resourcemanager.eventhubs.fluent.NamespacesClient; -import com.azure.resourcemanager.eventhubs.fluent.OperationsClient; -import com.azure.resourcemanager.eventhubs.fluent.RegionsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClientBuilder.java index 541ca6cde51af..5a9e00a478016 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/EventHubManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.eventhubs; +package com.azure.resourcemanager.eventhubs.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java index cacb2687bedf3..5f571b1222f5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.eventhubs.EventHubManagementClient; import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java index f313de4adc9c3..e2093366c36ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.eventhubs.EventHubManagementClient; import com.azure.resourcemanager.eventhubs.fluent.inner.AccessKeysInner; import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleInner; import com.azure.resourcemanager.eventhubs.fluent.inner.AuthorizationRuleListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java index 28a017f772cbd..239ba05980f4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.eventhubs.EventHubManagementClient; import com.azure.resourcemanager.eventhubs.fluent.inner.OperationInner; import com.azure.resourcemanager.eventhubs.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/RegionsClient.java b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/RegionsClient.java index 2e67fcd05fe66..7a7bf3d7cc3ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/RegionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/RegionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.eventhubs.EventHubManagementClient; import com.azure.resourcemanager.eventhubs.fluent.inner.MessagingRegionsInner; import com.azure.resourcemanager.eventhubs.fluent.inner.MessagingRegionsListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java index 0938468cc6189..f65f265b712b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManager.java @@ -6,6 +6,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.authorization.AuthorizationManager; +import com.azure.resourcemanager.keyvault.fluent.KeyVaultManagementClient; +import com.azure.resourcemanager.keyvault.fluent.KeyVaultManagementClientBuilder; import com.azure.resourcemanager.keyvault.implementation.VaultsImpl; import com.azure.resourcemanager.keyvault.models.Vaults; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/KeyVaultManagementClient.java similarity index 94% rename from sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/KeyVaultManagementClient.java index cc03378b0ecf1..59cfa210f02a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/KeyVaultManagementClient.java @@ -2,17 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.keyvault; +package com.azure.resourcemanager.keyvault.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.keyvault.fluent.OperationsClient; -import com.azure.resourcemanager.keyvault.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.keyvault.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.keyvault.fluent.VaultsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/KeyVaultManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/KeyVaultManagementClientBuilder.java index 20ba523e8ef67..564423d79c039 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/KeyVaultManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/KeyVaultManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.keyvault; +package com.azure.resourcemanager.keyvault.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/OperationsClient.java index 1218bed5093ad..16ce708b38028 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.keyvault.KeyVaultManagementClient; import com.azure.resourcemanager.keyvault.fluent.inner.OperationInner; import com.azure.resourcemanager.keyvault.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateEndpointConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateEndpointConnectionsClient.java index 18b2428801677..ce2f23dc2db73 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateEndpointConnectionsClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.keyvault.KeyVaultManagementClient; import com.azure.resourcemanager.keyvault.fluent.inner.PrivateEndpointConnectionInner; import com.azure.resourcemanager.keyvault.models.PrivateEndpointConnectionsPutResponse; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateLinkResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateLinkResourcesClient.java index 617a236dd49de..6d529869d176c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateLinkResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateLinkResourcesClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.keyvault.KeyVaultManagementClient; import com.azure.resourcemanager.keyvault.fluent.inner.PrivateLinkResourceListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/VaultsClient.java b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/VaultsClient.java index caa033756a06e..58e08080bcd43 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/VaultsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/VaultsClient.java @@ -34,7 +34,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.keyvault.KeyVaultManagementClient; import com.azure.resourcemanager.keyvault.fluent.inner.CheckNameAvailabilityResultInner; import com.azure.resourcemanager.keyvault.fluent.inner.DeletedVaultInner; import com.azure.resourcemanager.keyvault.fluent.inner.DeletedVaultListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java index 55ad3d5fd778e..8552ced14957a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.monitor.fluent.MonitorClient; +import com.azure.resourcemanager.monitor.fluent.MonitorClientBuilder; import com.azure.resourcemanager.monitor.implementation.ActionGroupsImpl; import com.azure.resourcemanager.monitor.implementation.ActivityLogsImpl; import com.azure.resourcemanager.monitor.implementation.AlertRulesImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java index cfba11e2c0590..0e5c4e2fd4648 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.ActionGroupListInner; import com.azure.resourcemanager.monitor.fluent.inner.ActionGroupResourceInner; import com.azure.resourcemanager.monitor.models.ActionGroupPatchBody; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogAlertsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogAlertsClient.java index 3da899643ba0a..c4c0e268d18e0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogAlertsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogAlertsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.ActivityLogAlertListInner; import com.azure.resourcemanager.monitor.fluent.inner.ActivityLogAlertResourceInner; import com.azure.resourcemanager.monitor.models.ActivityLogAlertPatchBody; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogsClient.java index c9c68a046b796..7947d457595eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.EventDataCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.EventDataInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleIncidentsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleIncidentsClient.java index 53fdca849a303..9485090c182b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleIncidentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleIncidentsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.IncidentInner; import com.azure.resourcemanager.monitor.fluent.inner.IncidentListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRulesClient.java index 6c58768375e39..d29a45c843365 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRulesClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.AlertRuleResourceCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.AlertRuleResourceInner; import com.azure.resourcemanager.monitor.models.AlertRuleResourcePatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AutoscaleSettingsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AutoscaleSettingsClient.java index 2916268a96e85..833d211451854 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AutoscaleSettingsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AutoscaleSettingsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.AutoscaleSettingResourceCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.AutoscaleSettingResourceInner; import com.azure.resourcemanager.monitor.models.AutoscaleSettingResourcePatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/BaselinesClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/BaselinesClient.java index 5b4b0e21d6775..84c22332b2c7d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/BaselinesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/BaselinesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.MetricBaselinesResponseInner; import com.azure.resourcemanager.monitor.fluent.inner.SingleMetricBaselineInner; import com.azure.resourcemanager.monitor.models.ResultType; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategorysClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategorysClient.java index 2ec83cffc1160..afc7c16fcb3d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategorysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategorysClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.DiagnosticSettingsCategoryResourceCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.DiagnosticSettingsCategoryResourceInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsClient.java index 107078e9fe280..153b5ee1b191f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.DiagnosticSettingsResourceCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.DiagnosticSettingsResourceInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/EventCategoriesClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/EventCategoriesClient.java index febd16418efc5..243bc4d87670b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/EventCategoriesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/EventCategoriesClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.EventCategoryCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.LocalizableStringInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/LogProfilesClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/LogProfilesClient.java index 00193028670e9..defc857f19eef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/LogProfilesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/LogProfilesClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.LogProfileCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.LogProfileResourceInner; import com.azure.resourcemanager.monitor.models.LogProfileResourcePatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsClient.java index b1da28a0952d5..4e78e6a26b164 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.MetricAlertResourceCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.MetricAlertResourceInner; import com.azure.resourcemanager.monitor.models.MetricAlertResourcePatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsStatusClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsStatusClient.java index 5d8e69b66bed5..e01c0a38d23f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsStatusClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsStatusClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.MetricAlertStatusCollectionInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricBaselinesClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricBaselinesClient.java index a79b73797e212..0b53cf4189b1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricBaselinesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricBaselinesClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.BaselineResponseInner; import com.azure.resourcemanager.monitor.fluent.inner.CalculateBaselineResponseInner; import com.azure.resourcemanager.monitor.models.ResultType; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricDefinitionsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricDefinitionsClient.java index f20c69cc78969..c70ef8b5154cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricDefinitionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricDefinitionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.MetricDefinitionCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.MetricDefinitionInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricNamespacesClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricNamespacesClient.java index 81b62eeb0210a..e71cb2db39832 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricNamespacesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricNamespacesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.MetricNamespaceCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.MetricNamespaceInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricsClient.java index 746b9e9015872..2d63a3865b2c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MetricsClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.ResponseInner; import com.azure.resourcemanager.monitor.models.ResultType; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java similarity index 88% rename from sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorClient.java rename to sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java index 3249d9d6d3c4e..b79b514dfd74f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java @@ -2,34 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.monitor; +package com.azure.resourcemanager.monitor.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.monitor.fluent.ActionGroupsClient; -import com.azure.resourcemanager.monitor.fluent.ActivityLogAlertsClient; -import com.azure.resourcemanager.monitor.fluent.ActivityLogsClient; -import com.azure.resourcemanager.monitor.fluent.AlertRuleIncidentsClient; -import com.azure.resourcemanager.monitor.fluent.AlertRulesClient; -import com.azure.resourcemanager.monitor.fluent.AutoscaleSettingsClient; -import com.azure.resourcemanager.monitor.fluent.BaselinesClient; -import com.azure.resourcemanager.monitor.fluent.DiagnosticSettingsCategorysClient; -import com.azure.resourcemanager.monitor.fluent.DiagnosticSettingsClient; -import com.azure.resourcemanager.monitor.fluent.EventCategoriesClient; -import com.azure.resourcemanager.monitor.fluent.LogProfilesClient; -import com.azure.resourcemanager.monitor.fluent.MetricAlertsClient; -import com.azure.resourcemanager.monitor.fluent.MetricAlertsStatusClient; -import com.azure.resourcemanager.monitor.fluent.MetricBaselinesClient; -import com.azure.resourcemanager.monitor.fluent.MetricDefinitionsClient; -import com.azure.resourcemanager.monitor.fluent.MetricNamespacesClient; -import com.azure.resourcemanager.monitor.fluent.MetricsClient; -import com.azure.resourcemanager.monitor.fluent.OperationsClient; -import com.azure.resourcemanager.monitor.fluent.ScheduledQueryRulesClient; -import com.azure.resourcemanager.monitor.fluent.TenantActivityLogsClient; -import com.azure.resourcemanager.monitor.fluent.VMInsightsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClientBuilder.java index e5711cd21d44f..2bfbe228d6140 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/MonitorClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.monitor; +package com.azure.resourcemanager.monitor.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/OperationsClient.java index e94c74330c40d..f22d08d4ba088 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/OperationsClient.java @@ -20,7 +20,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ScheduledQueryRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ScheduledQueryRulesClient.java index 41e35222bc01c..b040805a9e4b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ScheduledQueryRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ScheduledQueryRulesClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.LogSearchRuleResourceCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.LogSearchRuleResourceInner; import com.azure.resourcemanager.monitor.models.LogSearchRuleResourcePatch; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActivityLogsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActivityLogsClient.java index 24d1b2a067e29..12f3a596533f6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActivityLogsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActivityLogsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.EventDataCollectionInner; import com.azure.resourcemanager.monitor.fluent.inner.EventDataInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/VMInsightsClient.java b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/VMInsightsClient.java index 74685f684f71a..501cff00fe0cf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/VMInsightsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/VMInsightsClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.monitor.MonitorClient; import com.azure.resourcemanager.monitor.fluent.inner.VMInsightsOnboardingStatusInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java index 83e3d6412d9fc..1b5828ab49beb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/MSIManager.java @@ -6,6 +6,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.authorization.AuthorizationManager; +import com.azure.resourcemanager.msi.fluent.ManagedServiceIdentityClient; +import com.azure.resourcemanager.msi.fluent.ManagedServiceIdentityClientBuilder; import com.azure.resourcemanager.msi.implementation.IdentitesImpl; import com.azure.resourcemanager.msi.models.Identities; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/ManagedServiceIdentityClient.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/ManagedServiceIdentityClient.java similarity index 95% rename from sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/ManagedServiceIdentityClient.java rename to sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/ManagedServiceIdentityClient.java index d262896a0c6e8..cfbdda3225cd8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/ManagedServiceIdentityClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/ManagedServiceIdentityClient.java @@ -2,16 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.msi; +package com.azure.resourcemanager.msi.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.msi.fluent.OperationsClient; -import com.azure.resourcemanager.msi.fluent.SystemAssignedIdentitiesClient; -import com.azure.resourcemanager.msi.fluent.UserAssignedIdentitiesClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/ManagedServiceIdentityClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/ManagedServiceIdentityClientBuilder.java similarity index 99% rename from sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/ManagedServiceIdentityClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/ManagedServiceIdentityClientBuilder.java index 507fe4de5516a..4f66b8c8e787b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/ManagedServiceIdentityClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/ManagedServiceIdentityClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.msi; +package com.azure.resourcemanager.msi.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/OperationsClient.java index 66b354ac368c8..44ddbb648891f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.msi.ManagedServiceIdentityClient; import com.azure.resourcemanager.msi.fluent.inner.OperationInner; import com.azure.resourcemanager.msi.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/SystemAssignedIdentitiesClient.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/SystemAssignedIdentitiesClient.java index e2d0cb556e607..12e679c7048f5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/SystemAssignedIdentitiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/SystemAssignedIdentitiesClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.msi.ManagedServiceIdentityClient; import com.azure.resourcemanager.msi.fluent.inner.SystemAssignedIdentityInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/UserAssignedIdentitiesClient.java b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/UserAssignedIdentitiesClient.java index 29a1f19e124e7..a691020c7bfef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/UserAssignedIdentitiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/UserAssignedIdentitiesClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.msi.ManagedServiceIdentityClient; import com.azure.resourcemanager.msi.fluent.inner.IdentityInner; import com.azure.resourcemanager.msi.fluent.inner.UserAssignedIdentitiesListResultInner; import com.azure.resourcemanager.msi.models.IdentityUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java index 3a3acac477459..4266670ce138d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManager.java @@ -4,6 +4,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.network.fluent.NetworkManagementClient; +import com.azure.resourcemanager.network.fluent.NetworkManagementClientBuilder; import com.azure.resourcemanager.network.implementation.ApplicationGatewaysImpl; import com.azure.resourcemanager.network.implementation.ApplicationSecurityGroupsImpl; import com.azure.resourcemanager.network.implementation.DdosProtectionPlansImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewayPrivateEndpointConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewayPrivateEndpointConnectionsClient.java index 83009d3a32695..05765b48ad857 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewayPrivateEndpointConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewayPrivateEndpointConnectionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ApplicationGatewayPrivateEndpointConnectionInner; import com.azure.resourcemanager.network.fluent.inner.ApplicationGatewayPrivateEndpointConnectionListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewayPrivateLinkResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewayPrivateLinkResourcesClient.java index 4f16bf61a9011..0579bb4a7b76c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewayPrivateLinkResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewayPrivateLinkResourcesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ApplicationGatewayPrivateLinkResourceInner; import com.azure.resourcemanager.network.fluent.inner.ApplicationGatewayPrivateLinkResourceListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewaysClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewaysClient.java index 2645590a354ee..9355a7cffc5b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewaysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationGatewaysClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ApplicationGatewayAvailableSslOptionsInner; import com.azure.resourcemanager.network.fluent.inner.ApplicationGatewayAvailableSslPredefinedPoliciesInner; import com.azure.resourcemanager.network.fluent.inner.ApplicationGatewayAvailableWafRuleSetsResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationSecurityGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationSecurityGroupsClient.java index 1e287b5a634bd..bcba7e7cbd055 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationSecurityGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationSecurityGroupsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ApplicationSecurityGroupInner; import com.azure.resourcemanager.network.fluent.inner.ApplicationSecurityGroupListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableDelegationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableDelegationsClient.java index d9b53935c1361..f6916e672914e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableDelegationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableDelegationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AvailableDelegationInner; import com.azure.resourcemanager.network.fluent.inner.AvailableDelegationsResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableEndpointServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableEndpointServicesClient.java index f91bd9fbb9dfb..252b0e8f3d641 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableEndpointServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableEndpointServicesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.EndpointServiceResultInner; import com.azure.resourcemanager.network.fluent.inner.EndpointServicesListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailablePrivateEndpointTypesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailablePrivateEndpointTypesClient.java index e573a6124a505..514831d84c262 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailablePrivateEndpointTypesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailablePrivateEndpointTypesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AvailablePrivateEndpointTypeInner; import com.azure.resourcemanager.network.fluent.inner.AvailablePrivateEndpointTypesResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableResourceGroupDelegationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableResourceGroupDelegationsClient.java index 8ce8c2a1c4d7b..8251898b706b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableResourceGroupDelegationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableResourceGroupDelegationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AvailableDelegationInner; import com.azure.resourcemanager.network.fluent.inner.AvailableDelegationsResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableServiceAliasesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableServiceAliasesClient.java index 45c6f8a8a16ed..86659396c2b2d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableServiceAliasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AvailableServiceAliasesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AvailableServiceAliasInner; import com.azure.resourcemanager.network.fluent.inner.AvailableServiceAliasesResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AzureFirewallFqdnTagsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AzureFirewallFqdnTagsClient.java index 52ba2a98d3474..be2902538c683 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AzureFirewallFqdnTagsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AzureFirewallFqdnTagsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AzureFirewallFqdnTagInner; import com.azure.resourcemanager.network.fluent.inner.AzureFirewallFqdnTagListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AzureFirewallsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AzureFirewallsClient.java index ef6e24b5b4196..30007da9c3623 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AzureFirewallsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/AzureFirewallsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AzureFirewallInner; import com.azure.resourcemanager.network.fluent.inner.AzureFirewallListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/BastionHostsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/BastionHostsClient.java index 57c3cdffd6e1b..046be842fda6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/BastionHostsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/BastionHostsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.BastionHostInner; import com.azure.resourcemanager.network.fluent.inner.BastionHostListResultInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/BgpServiceCommunitiesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/BgpServiceCommunitiesClient.java index f9cef555b9c68..a1f5158577965 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/BgpServiceCommunitiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/BgpServiceCommunitiesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.BgpServiceCommunityInner; import com.azure.resourcemanager.network.fluent.inner.BgpServiceCommunityListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ConnectionMonitorsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ConnectionMonitorsClient.java index a68150f331ec7..6072bcdc48937 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ConnectionMonitorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ConnectionMonitorsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ConnectionMonitorInner; import com.azure.resourcemanager.network.fluent.inner.ConnectionMonitorListResultInner; import com.azure.resourcemanager.network.fluent.inner.ConnectionMonitorQueryResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosCustomPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosCustomPoliciesClient.java index ff2343795a376..429e91cdf789e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosCustomPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosCustomPoliciesClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.DdosCustomPolicyInner; import com.azure.resourcemanager.network.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosProtectionPlansClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosProtectionPlansClient.java index dd5ccf5d76c67..5291132cf9728 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosProtectionPlansClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosProtectionPlansClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.DdosProtectionPlanInner; import com.azure.resourcemanager.network.fluent.inner.DdosProtectionPlanListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DefaultSecurityRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DefaultSecurityRulesClient.java index 96b80d7b86db2..dcad4f05d2d36 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DefaultSecurityRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DefaultSecurityRulesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.SecurityRuleInner; import com.azure.resourcemanager.network.fluent.inner.SecurityRuleListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitAuthorizationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitAuthorizationsClient.java index d4b186c13d6f0..37ae655cafa4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitAuthorizationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitAuthorizationsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AuthorizationListResultInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitAuthorizationInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitConnectionsClient.java index 0dffa7a3fa24a..748d87874f286 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitConnectionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitConnectionInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitConnectionListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitPeeringsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitPeeringsClient.java index d4f8189c00f96..fdc4398ff90f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitPeeringsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitPeeringsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitPeeringInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitPeeringListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitsClient.java index 94d54a22f389c..2a76e7e9722aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitListResultInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitStatsInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteConnectionsClient.java index 1ee934bbf7e00..3d0cceff6eda0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteConnectionsClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteConnectionInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteConnectionListInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionPeeringsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionPeeringsClient.java index b9274ed560e3e..7b1a6f19f9322 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionPeeringsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionPeeringsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCrossConnectionPeeringInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCrossConnectionPeeringListInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionsClient.java index 9cdf5544db2a4..3d1a304047e4a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitsArpTableListResultInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCircuitsRoutesTableListResultInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteCrossConnectionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteGatewaysClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteGatewaysClient.java index 34133f7d0f4a8..1f603d41ad59b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteGatewaysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteGatewaysClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteGatewayInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteGatewayListInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteLinksClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteLinksClient.java index cbbccea7b8511..04e61564d2471 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteLinksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteLinksClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteLinkInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteLinkListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRoutePortsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRoutePortsClient.java index 4575c6afab2d7..f39bd136d0781 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRoutePortsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRoutePortsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRoutePortInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRoutePortListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRoutePortsLocationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRoutePortsLocationsClient.java index 9e2fa66487310..10ef847c87a8b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRoutePortsLocationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRoutePortsLocationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRoutePortsLocationInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRoutePortsLocationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteServiceProvidersClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteServiceProvidersClient.java index 0aab1f01f8557..86d7e5e73782b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteServiceProvidersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteServiceProvidersClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteServiceProviderInner; import com.azure.resourcemanager.network.fluent.inner.ExpressRouteServiceProviderListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPoliciesClient.java index d5af5ee0badb4..c61f8e4644f6d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPoliciesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.FirewallPolicyInner; import com.azure.resourcemanager.network.fluent.inner.FirewallPolicyListResultInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPolicyRuleCollectionGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPolicyRuleCollectionGroupsClient.java index 858725b5a8812..2cdd0507ea02c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPolicyRuleCollectionGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPolicyRuleCollectionGroupsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.FirewallPolicyRuleCollectionGroupInner; import com.azure.resourcemanager.network.fluent.inner.FirewallPolicyRuleCollectionGroupListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FlowLogsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FlowLogsClient.java index f29bf86976594..7f4099c3c2778 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FlowLogsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FlowLogsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.FlowLogInner; import com.azure.resourcemanager.network.fluent.inner.FlowLogListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/HubRouteTablesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/HubRouteTablesClient.java index 8023363995bb7..436739d65f765 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/HubRouteTablesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/HubRouteTablesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.HubRouteTableInner; import com.azure.resourcemanager.network.fluent.inner.ListHubRouteTablesResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/HubVirtualNetworkConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/HubVirtualNetworkConnectionsClient.java index 2219acc71cfe1..80c4531df0e1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/HubVirtualNetworkConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/HubVirtualNetworkConnectionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.HubVirtualNetworkConnectionInner; import com.azure.resourcemanager.network.fluent.inner.ListHubVirtualNetworkConnectionsResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/InboundNatRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/InboundNatRulesClient.java index 0a7b68b9aa3fd..8c89ab2fae69f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/InboundNatRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/InboundNatRulesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.InboundNatRuleInner; import com.azure.resourcemanager.network.fluent.inner.InboundNatRuleListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/IpAllocationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/IpAllocationsClient.java index a96a50365b150..1a2faa1d62f70 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/IpAllocationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/IpAllocationsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.IpAllocationInner; import com.azure.resourcemanager.network.fluent.inner.IpAllocationListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/IpGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/IpGroupsClient.java index 294737c4be282..97c6bf8424708 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/IpGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/IpGroupsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.IpGroupInner; import com.azure.resourcemanager.network.fluent.inner.IpGroupListResultInner; import com.azure.resourcemanager.network.models.ErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerBackendAddressPoolsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerBackendAddressPoolsClient.java index b34ce9e5ed1d6..8b5a793177179 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerBackendAddressPoolsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerBackendAddressPoolsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.BackendAddressPoolInner; import com.azure.resourcemanager.network.fluent.inner.LoadBalancerBackendAddressPoolListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerFrontendIpConfigurationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerFrontendIpConfigurationsClient.java index 57fc80e9205c0..00fe002889dd6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerFrontendIpConfigurationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerFrontendIpConfigurationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.FrontendIpConfigurationInner; import com.azure.resourcemanager.network.fluent.inner.LoadBalancerFrontendIpConfigurationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerLoadBalancingRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerLoadBalancingRulesClient.java index 2107da61b669f..d59b80c5f3782 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerLoadBalancingRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerLoadBalancingRulesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.LoadBalancerLoadBalancingRuleListResultInner; import com.azure.resourcemanager.network.fluent.inner.LoadBalancingRuleInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerNetworkInterfacesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerNetworkInterfacesClient.java index af8b5c734283f..1d3b936dbb85a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerNetworkInterfacesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerNetworkInterfacesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NetworkInterfaceInner; import com.azure.resourcemanager.network.fluent.inner.NetworkInterfaceListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerOutboundRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerOutboundRulesClient.java index e896b7a9e5d40..077496066d6b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerOutboundRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerOutboundRulesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.LoadBalancerOutboundRuleListResultInner; import com.azure.resourcemanager.network.fluent.inner.OutboundRuleInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerProbesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerProbesClient.java index c84470a6900c2..d4edf1c9846fc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerProbesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancerProbesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.LoadBalancerProbeListResultInner; import com.azure.resourcemanager.network.fluent.inner.ProbeInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancersClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancersClient.java index 2da58833d1b0a..90979ac4ebb7d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LoadBalancersClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.LoadBalancerInner; import com.azure.resourcemanager.network.fluent.inner.LoadBalancerListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LocalNetworkGatewaysClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LocalNetworkGatewaysClient.java index 7143a91669c71..0aa7ee051261d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LocalNetworkGatewaysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LocalNetworkGatewaysClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.LocalNetworkGatewayInner; import com.azure.resourcemanager.network.fluent.inner.LocalNetworkGatewayListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NatGatewaysClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NatGatewaysClient.java index 26cadb655b00c..bd2165cb4c1ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NatGatewaysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NatGatewaysClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NatGatewayInner; import com.azure.resourcemanager.network.fluent.inner.NatGatewayListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceIpConfigurationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceIpConfigurationsClient.java index 2dcd603ec7adc..3ade2a96d80f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceIpConfigurationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceIpConfigurationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NetworkInterfaceIpConfigurationInner; import com.azure.resourcemanager.network.fluent.inner.NetworkInterfaceIpConfigurationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceLoadBalancersClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceLoadBalancersClient.java index 88274e0959601..5cccb1aeb4521 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceLoadBalancersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceLoadBalancersClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.LoadBalancerInner; import com.azure.resourcemanager.network.fluent.inner.NetworkInterfaceLoadBalancerListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceTapConfigurationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceTapConfigurationsClient.java index 311e988489915..e52f9c627339e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceTapConfigurationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceTapConfigurationsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NetworkInterfaceTapConfigurationInner; import com.azure.resourcemanager.network.fluent.inner.NetworkInterfaceTapConfigurationListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java index 92515ec667556..d1f181e3dc907 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.EffectiveNetworkSecurityGroupListResultInner; import com.azure.resourcemanager.network.fluent.inner.EffectiveRouteListResultInner; import com.azure.resourcemanager.network.fluent.inner.NetworkInterfaceInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkManagementClient.java similarity index 95% rename from sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkManagementClient.java index 4c475bf802722..f0c1d6f2ebaa5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkManagementClient.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.network; +package com.azure.resourcemanager.network.fluent; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; @@ -34,105 +34,6 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.network.fluent.ApplicationGatewayPrivateEndpointConnectionsClient; -import com.azure.resourcemanager.network.fluent.ApplicationGatewayPrivateLinkResourcesClient; -import com.azure.resourcemanager.network.fluent.ApplicationGatewaysClient; -import com.azure.resourcemanager.network.fluent.ApplicationSecurityGroupsClient; -import com.azure.resourcemanager.network.fluent.AvailableDelegationsClient; -import com.azure.resourcemanager.network.fluent.AvailableEndpointServicesClient; -import com.azure.resourcemanager.network.fluent.AvailablePrivateEndpointTypesClient; -import com.azure.resourcemanager.network.fluent.AvailableResourceGroupDelegationsClient; -import com.azure.resourcemanager.network.fluent.AvailableServiceAliasesClient; -import com.azure.resourcemanager.network.fluent.AzureFirewallFqdnTagsClient; -import com.azure.resourcemanager.network.fluent.AzureFirewallsClient; -import com.azure.resourcemanager.network.fluent.BastionHostsClient; -import com.azure.resourcemanager.network.fluent.BgpServiceCommunitiesClient; -import com.azure.resourcemanager.network.fluent.ConnectionMonitorsClient; -import com.azure.resourcemanager.network.fluent.DdosCustomPoliciesClient; -import com.azure.resourcemanager.network.fluent.DdosProtectionPlansClient; -import com.azure.resourcemanager.network.fluent.DefaultSecurityRulesClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteCircuitAuthorizationsClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteCircuitConnectionsClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteCircuitPeeringsClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteCircuitsClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteConnectionsClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteCrossConnectionPeeringsClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteCrossConnectionsClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteGatewaysClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteLinksClient; -import com.azure.resourcemanager.network.fluent.ExpressRoutePortsClient; -import com.azure.resourcemanager.network.fluent.ExpressRoutePortsLocationsClient; -import com.azure.resourcemanager.network.fluent.ExpressRouteServiceProvidersClient; -import com.azure.resourcemanager.network.fluent.FirewallPoliciesClient; -import com.azure.resourcemanager.network.fluent.FirewallPolicyRuleCollectionGroupsClient; -import com.azure.resourcemanager.network.fluent.FlowLogsClient; -import com.azure.resourcemanager.network.fluent.HubRouteTablesClient; -import com.azure.resourcemanager.network.fluent.HubVirtualNetworkConnectionsClient; -import com.azure.resourcemanager.network.fluent.InboundNatRulesClient; -import com.azure.resourcemanager.network.fluent.IpAllocationsClient; -import com.azure.resourcemanager.network.fluent.IpGroupsClient; -import com.azure.resourcemanager.network.fluent.LoadBalancerBackendAddressPoolsClient; -import com.azure.resourcemanager.network.fluent.LoadBalancerFrontendIpConfigurationsClient; -import com.azure.resourcemanager.network.fluent.LoadBalancerLoadBalancingRulesClient; -import com.azure.resourcemanager.network.fluent.LoadBalancerNetworkInterfacesClient; -import com.azure.resourcemanager.network.fluent.LoadBalancerOutboundRulesClient; -import com.azure.resourcemanager.network.fluent.LoadBalancerProbesClient; -import com.azure.resourcemanager.network.fluent.LoadBalancersClient; -import com.azure.resourcemanager.network.fluent.LocalNetworkGatewaysClient; -import com.azure.resourcemanager.network.fluent.NatGatewaysClient; -import com.azure.resourcemanager.network.fluent.NetworkInterfaceIpConfigurationsClient; -import com.azure.resourcemanager.network.fluent.NetworkInterfaceLoadBalancersClient; -import com.azure.resourcemanager.network.fluent.NetworkInterfaceTapConfigurationsClient; -import com.azure.resourcemanager.network.fluent.NetworkInterfacesClient; -import com.azure.resourcemanager.network.fluent.NetworkProfilesClient; -import com.azure.resourcemanager.network.fluent.NetworkSecurityGroupsClient; -import com.azure.resourcemanager.network.fluent.NetworkVirtualAppliancesClient; -import com.azure.resourcemanager.network.fluent.NetworkWatchersClient; -import com.azure.resourcemanager.network.fluent.OperationsClient; -import com.azure.resourcemanager.network.fluent.P2SVpnGatewaysClient; -import com.azure.resourcemanager.network.fluent.PacketCapturesClient; -import com.azure.resourcemanager.network.fluent.PeerExpressRouteCircuitConnectionsClient; -import com.azure.resourcemanager.network.fluent.PrivateDnsZoneGroupsClient; -import com.azure.resourcemanager.network.fluent.PrivateEndpointsClient; -import com.azure.resourcemanager.network.fluent.PrivateLinkServicesClient; -import com.azure.resourcemanager.network.fluent.PublicIpAddressesClient; -import com.azure.resourcemanager.network.fluent.PublicIpPrefixesClient; -import com.azure.resourcemanager.network.fluent.ResourceNavigationLinksClient; -import com.azure.resourcemanager.network.fluent.RouteFilterRulesClient; -import com.azure.resourcemanager.network.fluent.RouteFiltersClient; -import com.azure.resourcemanager.network.fluent.RouteTablesClient; -import com.azure.resourcemanager.network.fluent.RoutesClient; -import com.azure.resourcemanager.network.fluent.SecurityPartnerProvidersClient; -import com.azure.resourcemanager.network.fluent.SecurityRulesClient; -import com.azure.resourcemanager.network.fluent.ServiceAssociationLinksClient; -import com.azure.resourcemanager.network.fluent.ServiceEndpointPoliciesClient; -import com.azure.resourcemanager.network.fluent.ServiceEndpointPolicyDefinitionsClient; -import com.azure.resourcemanager.network.fluent.ServiceTagsClient; -import com.azure.resourcemanager.network.fluent.SubnetsClient; -import com.azure.resourcemanager.network.fluent.UsagesClient; -import com.azure.resourcemanager.network.fluent.VirtualApplianceSitesClient; -import com.azure.resourcemanager.network.fluent.VirtualApplianceSkusClient; -import com.azure.resourcemanager.network.fluent.VirtualHubBgpConnectionsClient; -import com.azure.resourcemanager.network.fluent.VirtualHubIpConfigurationsClient; -import com.azure.resourcemanager.network.fluent.VirtualHubRouteTableV2SClient; -import com.azure.resourcemanager.network.fluent.VirtualHubsClient; -import com.azure.resourcemanager.network.fluent.VirtualNetworkGatewayConnectionsClient; -import com.azure.resourcemanager.network.fluent.VirtualNetworkGatewaysClient; -import com.azure.resourcemanager.network.fluent.VirtualNetworkPeeringsClient; -import com.azure.resourcemanager.network.fluent.VirtualNetworkTapsClient; -import com.azure.resourcemanager.network.fluent.VirtualNetworksClient; -import com.azure.resourcemanager.network.fluent.VirtualRouterPeeringsClient; -import com.azure.resourcemanager.network.fluent.VirtualRoutersClient; -import com.azure.resourcemanager.network.fluent.VirtualWansClient; -import com.azure.resourcemanager.network.fluent.VpnConnectionsClient; -import com.azure.resourcemanager.network.fluent.VpnGatewaysClient; -import com.azure.resourcemanager.network.fluent.VpnLinkConnectionsClient; -import com.azure.resourcemanager.network.fluent.VpnServerConfigurationsAssociatedWithVirtualWansClient; -import com.azure.resourcemanager.network.fluent.VpnServerConfigurationsClient; -import com.azure.resourcemanager.network.fluent.VpnSiteLinkConnectionsClient; -import com.azure.resourcemanager.network.fluent.VpnSiteLinksClient; -import com.azure.resourcemanager.network.fluent.VpnSitesClient; -import com.azure.resourcemanager.network.fluent.VpnSitesConfigurationsClient; import com.azure.resourcemanager.network.fluent.inner.BastionActiveSessionInner; import com.azure.resourcemanager.network.fluent.inner.BastionActiveSessionListResultInner; import com.azure.resourcemanager.network.fluent.inner.BastionSessionDeleteResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkManagementClientBuilder.java index 6b858b591ea4b..8172f144c2c3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/NetworkManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.network; +package com.azure.resourcemanager.network.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkProfilesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkProfilesClient.java index e8cc6f99021db..c241a92f3a7db 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkProfilesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkProfilesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NetworkProfileInner; import com.azure.resourcemanager.network.fluent.inner.NetworkProfileListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkSecurityGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkSecurityGroupsClient.java index a00f5b2746cf0..70e0d55afadaf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkSecurityGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkSecurityGroupsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NetworkSecurityGroupInner; import com.azure.resourcemanager.network.fluent.inner.NetworkSecurityGroupListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkVirtualAppliancesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkVirtualAppliancesClient.java index 419381948d17e..b82c427e2cc63 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkVirtualAppliancesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkVirtualAppliancesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NetworkVirtualApplianceInner; import com.azure.resourcemanager.network.fluent.inner.NetworkVirtualApplianceListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkWatchersClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkWatchersClient.java index d610db928ed1f..92a5d14f622b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkWatchersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkWatchersClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AvailableProvidersListInner; import com.azure.resourcemanager.network.fluent.inner.AzureReachabilityReportInner; import com.azure.resourcemanager.network.fluent.inner.ConnectivityInformationInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/OperationsClient.java index 06746a3cf2466..6462cbe0c447d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.OperationInner; import com.azure.resourcemanager.network.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/P2SVpnGatewaysClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/P2SVpnGatewaysClient.java index 770a851f7468c..2f34c85045655 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/P2SVpnGatewaysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/P2SVpnGatewaysClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListP2SVpnGatewaysResultInner; import com.azure.resourcemanager.network.fluent.inner.P2SVpnConnectionHealthInner; import com.azure.resourcemanager.network.fluent.inner.P2SVpnGatewayInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PacketCapturesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PacketCapturesClient.java index f492b91ab0826..b335a093c8768 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PacketCapturesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PacketCapturesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.PacketCaptureInner; import com.azure.resourcemanager.network.fluent.inner.PacketCaptureListResultInner; import com.azure.resourcemanager.network.fluent.inner.PacketCaptureQueryStatusResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PeerExpressRouteCircuitConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PeerExpressRouteCircuitConnectionsClient.java index dc8b02479458e..afff39836ea38 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PeerExpressRouteCircuitConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PeerExpressRouteCircuitConnectionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.PeerExpressRouteCircuitConnectionInner; import com.azure.resourcemanager.network.fluent.inner.PeerExpressRouteCircuitConnectionListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateDnsZoneGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateDnsZoneGroupsClient.java index 4cf505a7b109a..52424b30bd0d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateDnsZoneGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateDnsZoneGroupsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.PrivateDnsZoneGroupInner; import com.azure.resourcemanager.network.fluent.inner.PrivateDnsZoneGroupListResultInner; import com.azure.resourcemanager.network.models.ErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateEndpointsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateEndpointsClient.java index 901312ce33b1b..f5b1f04206f1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateEndpointsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateEndpointsClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.PrivateEndpointInner; import com.azure.resourcemanager.network.fluent.inner.PrivateEndpointListResultInner; import com.azure.resourcemanager.network.models.ErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateLinkServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateLinkServicesClient.java index 182650cc3e866..c951d3904ebe4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateLinkServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateLinkServicesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.AutoApprovedPrivateLinkServiceInner; import com.azure.resourcemanager.network.fluent.inner.AutoApprovedPrivateLinkServicesResultInner; import com.azure.resourcemanager.network.fluent.inner.PrivateEndpointConnectionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpAddressesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpAddressesClient.java index 3ec209c7e319a..c1ebf398ad6bb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpAddressesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpAddressesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.PublicIpAddressInner; import com.azure.resourcemanager.network.fluent.inner.PublicIpAddressListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpPrefixesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpPrefixesClient.java index 7ff2f0292f69c..13a5e36fb72b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpPrefixesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpPrefixesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.PublicIpPrefixInner; import com.azure.resourcemanager.network.fluent.inner.PublicIpPrefixListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ResourceNavigationLinksClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ResourceNavigationLinksClient.java index 866c8f3cab6b7..663f02099cb05 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ResourceNavigationLinksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ResourceNavigationLinksClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ResourceNavigationLinksListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFilterRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFilterRulesClient.java index 0152ebb5a86db..4bc75e2ede3b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFilterRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFilterRulesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.RouteFilterRuleInner; import com.azure.resourcemanager.network.fluent.inner.RouteFilterRuleListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFiltersClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFiltersClient.java index cfe190ed13e23..4d9b4e8a95c87 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFiltersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFiltersClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.RouteFilterInner; import com.azure.resourcemanager.network.fluent.inner.RouteFilterListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteTablesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteTablesClient.java index 77381e35d7c63..d8436ef754d41 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteTablesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteTablesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.RouteTableInner; import com.azure.resourcemanager.network.fluent.inner.RouteTableListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RoutesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RoutesClient.java index 52c5fd1aefde9..a97c62e98af47 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RoutesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RoutesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.RouteInner; import com.azure.resourcemanager.network.fluent.inner.RouteListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SecurityPartnerProvidersClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SecurityPartnerProvidersClient.java index 28f7c90d9907c..0d59b9e6986be 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SecurityPartnerProvidersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SecurityPartnerProvidersClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.SecurityPartnerProviderInner; import com.azure.resourcemanager.network.fluent.inner.SecurityPartnerProviderListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SecurityRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SecurityRulesClient.java index 55e19abb5970d..f780291183c1d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SecurityRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SecurityRulesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.SecurityRuleInner; import com.azure.resourcemanager.network.fluent.inner.SecurityRuleListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceAssociationLinksClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceAssociationLinksClient.java index 8d73d8b4660cd..62350797fc0cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceAssociationLinksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceAssociationLinksClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ServiceAssociationLinksListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceEndpointPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceEndpointPoliciesClient.java index 226202cbcc74b..0d17e454599c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceEndpointPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceEndpointPoliciesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ServiceEndpointPolicyInner; import com.azure.resourcemanager.network.fluent.inner.ServiceEndpointPolicyListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceEndpointPolicyDefinitionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceEndpointPolicyDefinitionsClient.java index e59d875d5e055..ec90478baafa9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceEndpointPolicyDefinitionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceEndpointPolicyDefinitionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ServiceEndpointPolicyDefinitionInner; import com.azure.resourcemanager.network.fluent.inner.ServiceEndpointPolicyDefinitionListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceTagsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceTagsClient.java index 61173ff353066..c0309149eab16 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceTagsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ServiceTagsClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ServiceTagsListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SubnetsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SubnetsClient.java index 0e0b43521a19e..81e1d3881c634 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SubnetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/SubnetsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.SubnetInner; import com.azure.resourcemanager.network.fluent.inner.SubnetListResultInner; import com.azure.resourcemanager.network.models.PrepareNetworkPoliciesRequest; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/UsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/UsagesClient.java index c49fc5a57848d..64959479c426f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/UsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/UsagesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.UsageInner; import com.azure.resourcemanager.network.fluent.inner.UsagesListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSitesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSitesClient.java index 2cf861ccc98a1..dbd8a8afbcffb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSitesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSitesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NetworkVirtualApplianceSiteListResultInner; import com.azure.resourcemanager.network.fluent.inner.VirtualApplianceSiteInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSkusClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSkusClient.java index edb66bf655abc..4c62eaad50147 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSkusClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSkusClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.NetworkVirtualApplianceSkuInner; import com.azure.resourcemanager.network.fluent.inner.NetworkVirtualApplianceSkuListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubBgpConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubBgpConnectionsClient.java index a724340c6f1c7..2a932b63088e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubBgpConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubBgpConnectionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.BgpConnectionInner; import com.azure.resourcemanager.network.fluent.inner.ListVirtualHubBgpConnectionResultsInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubIpConfigurationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubIpConfigurationsClient.java index 6cca5bf572cff..e00358abf3aac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubIpConfigurationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubIpConfigurationsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.HubIpConfigurationInner; import com.azure.resourcemanager.network.fluent.inner.ListVirtualHubIpConfigurationResultsInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubRouteTableV2SClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubRouteTableV2SClient.java index ccaf748931943..82d8af9f8348c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubRouteTableV2SClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubRouteTableV2SClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVirtualHubRouteTableV2SResultInner; import com.azure.resourcemanager.network.fluent.inner.VirtualHubRouteTableV2Inner; import com.azure.resourcemanager.network.models.ErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubsClient.java index f51ab38f0ed01..59f25136fd08d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVirtualHubsResultInner; import com.azure.resourcemanager.network.fluent.inner.VirtualHubInner; import com.azure.resourcemanager.network.models.EffectiveRoutesParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewayConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewayConnectionsClient.java index 1aec899805ecc..0042c7e49efe1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewayConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewayConnectionsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ConnectionResetSharedKeyInner; import com.azure.resourcemanager.network.fluent.inner.ConnectionSharedKeyInner; import com.azure.resourcemanager.network.fluent.inner.VirtualNetworkGatewayConnectionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java index affd267b1b756..e307cdb6f3719 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.BgpPeerStatusListResultInner; import com.azure.resourcemanager.network.fluent.inner.GatewayRouteListResultInner; import com.azure.resourcemanager.network.fluent.inner.VirtualNetworkGatewayConnectionListEntityInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkPeeringsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkPeeringsClient.java index 32eb2631d5572..eec030dab4275 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkPeeringsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkPeeringsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.VirtualNetworkPeeringInner; import com.azure.resourcemanager.network.fluent.inner.VirtualNetworkPeeringListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkTapsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkTapsClient.java index 5328622b27fb3..0cd621ae76f14 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkTapsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkTapsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.VirtualNetworkTapInner; import com.azure.resourcemanager.network.fluent.inner.VirtualNetworkTapListResultInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworksClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworksClient.java index 58c7ede3d8d62..e366f63b899c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworksClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.IpAddressAvailabilityResultInner; import com.azure.resourcemanager.network.fluent.inner.VirtualNetworkInner; import com.azure.resourcemanager.network.fluent.inner.VirtualNetworkListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualRouterPeeringsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualRouterPeeringsClient.java index 9e3aa39c45e47..062e913d6256e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualRouterPeeringsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualRouterPeeringsClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.VirtualRouterPeeringInner; import com.azure.resourcemanager.network.fluent.inner.VirtualRouterPeeringListResultInner; import com.azure.resourcemanager.network.models.ErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualRoutersClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualRoutersClient.java index da0e02eaa72b6..d30b6dca751c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualRoutersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualRoutersClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.VirtualRouterInner; import com.azure.resourcemanager.network.fluent.inner.VirtualRouterListResultInner; import com.azure.resourcemanager.network.models.ErrorException; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualWansClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualWansClient.java index afd8f7641ab5b..9a01e2690e6c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualWansClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualWansClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVirtualWansResultInner; import com.azure.resourcemanager.network.fluent.inner.VirtualWanInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnConnectionsClient.java index 357120d71115c..393dc459f6d0d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnConnectionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVpnConnectionsResultInner; import com.azure.resourcemanager.network.fluent.inner.VpnConnectionInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnGatewaysClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnGatewaysClient.java index 745d96b1eb595..6044034508b95 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnGatewaysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnGatewaysClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVpnGatewaysResultInner; import com.azure.resourcemanager.network.fluent.inner.VpnGatewayInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnLinkConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnLinkConnectionsClient.java index 583f1589cb903..099dbf9cde27f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnLinkConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnLinkConnectionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVpnSiteLinkConnectionsResultInner; import com.azure.resourcemanager.network.fluent.inner.VpnSiteLinkConnectionInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnServerConfigurationsAssociatedWithVirtualWansClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnServerConfigurationsAssociatedWithVirtualWansClient.java index 287fa1e38e2c0..63f46dda2de93 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnServerConfigurationsAssociatedWithVirtualWansClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnServerConfigurationsAssociatedWithVirtualWansClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.VpnServerConfigurationsResponseInner; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnServerConfigurationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnServerConfigurationsClient.java index 509a140d8aed0..73bb3c162aa7b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnServerConfigurationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnServerConfigurationsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVpnServerConfigurationsResultInner; import com.azure.resourcemanager.network.fluent.inner.VpnServerConfigurationInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSiteLinkConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSiteLinkConnectionsClient.java index 197508998c9b0..e94e03c499537 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSiteLinkConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSiteLinkConnectionsClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.VpnSiteLinkConnectionInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSiteLinksClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSiteLinksClient.java index f0fcd1fceeeb8..56fa11850679e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSiteLinksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSiteLinksClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVpnSiteLinksResultInner; import com.azure.resourcemanager.network.fluent.inner.VpnSiteLinkInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesClient.java index 8fd7f5e471223..4300c3a66228e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.ListVpnSitesResultInner; import com.azure.resourcemanager.network.fluent.inner.VpnSiteInner; import com.azure.resourcemanager.network.models.TagsObject; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesConfigurationsClient.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesConfigurationsClient.java index 37a951ed5e18f..b1df3de7d2ee1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesConfigurationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesConfigurationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.network.NetworkManagementClient; import com.azure.resourcemanager.network.models.GetVpnSitesConfigurationRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkUsagesImpl.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkUsagesImpl.java index 3b78c81523acb..e19fbef6cf7f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkUsagesImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkUsagesImpl.java @@ -6,7 +6,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.models.NetworkUsage; import com.azure.resourcemanager.network.models.NetworkUsages; -import com.azure.resourcemanager.network.NetworkManagementClient; +import com.azure.resourcemanager.network.fluent.NetworkManagementClient; import com.azure.resourcemanager.network.fluent.inner.UsageInner; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java index 277daa9955da5..b5c90e7417179 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsZoneManager.java @@ -4,6 +4,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.privatedns.fluent.PrivateDnsManagementClient; +import com.azure.resourcemanager.privatedns.fluent.PrivateDnsManagementClientBuilder; import com.azure.resourcemanager.privatedns.implementation.PrivateDnsZonesImpl; import com.azure.resourcemanager.privatedns.models.PrivateDnsZones; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateDnsManagementClient.java similarity index 95% rename from sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateDnsManagementClient.java index 4859d0df46e85..9d84bbec5df9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateDnsManagementClient.java @@ -2,16 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.privatedns; +package com.azure.resourcemanager.privatedns.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.privatedns.fluent.PrivateZonesClient; -import com.azure.resourcemanager.privatedns.fluent.RecordSetsClient; -import com.azure.resourcemanager.privatedns.fluent.VirtualNetworkLinksClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateDnsManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateDnsManagementClientBuilder.java index c3e622ca3bb95..c57294e611522 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/PrivateDnsManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateDnsManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.privatedns; +package com.azure.resourcemanager.privatedns.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateZonesClient.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateZonesClient.java index 8d52a7a6d23f9..3512e225b056d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateZonesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/PrivateZonesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.privatedns.PrivateDnsManagementClient; import com.azure.resourcemanager.privatedns.fluent.inner.PrivateZoneInner; import com.azure.resourcemanager.privatedns.fluent.inner.PrivateZoneListResultInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/RecordSetsClient.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/RecordSetsClient.java index caca509a82387..522b2b5d97851 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/RecordSetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/RecordSetsClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.privatedns.PrivateDnsManagementClient; import com.azure.resourcemanager.privatedns.fluent.inner.RecordSetInner; import com.azure.resourcemanager.privatedns.fluent.inner.RecordSetListResultInner; import com.azure.resourcemanager.privatedns.models.RecordType; diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/VirtualNetworkLinksClient.java b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/VirtualNetworkLinksClient.java index 510fa7543ebdc..f5c0a9d94ad9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/VirtualNetworkLinksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/VirtualNetworkLinksClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.privatedns.PrivateDnsManagementClient; import com.azure.resourcemanager.privatedns.fluent.inner.VirtualNetworkLinkInner; import com.azure.resourcemanager.privatedns.fluent.inner.VirtualNetworkLinkListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java index 6c3d693ddf79a..90f1659bc18f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManager.java @@ -5,6 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.redis.fluent.RedisManagementClient; +import com.azure.resourcemanager.redis.fluent.RedisManagementClientBuilder; import com.azure.resourcemanager.redis.implementation.RedisCachesImpl; import com.azure.resourcemanager.redis.models.RedisCaches; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/FirewallRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/FirewallRulesClient.java index 4732e547232f5..cb1bdffe463b3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/FirewallRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/FirewallRulesClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.redis.RedisManagementClient; import com.azure.resourcemanager.redis.fluent.inner.RedisFirewallRuleInner; import com.azure.resourcemanager.redis.fluent.inner.RedisFirewallRuleListResultInner; import com.azure.resourcemanager.redis.models.RedisFirewallRuleCreateParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/LinkedServersClient.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/LinkedServersClient.java index cb88db05d4920..0f8f6b99e08cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/LinkedServersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/LinkedServersClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.redis.RedisManagementClient; import com.azure.resourcemanager.redis.fluent.inner.RedisLinkedServerWithPropertiesInner; import com.azure.resourcemanager.redis.fluent.inner.RedisLinkedServerWithPropertiesListInner; import com.azure.resourcemanager.redis.models.RedisLinkedServerCreateParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/OperationsClient.java index 8ebc662e7f977..0d987a3f69186 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.redis.RedisManagementClient; import com.azure.resourcemanager.redis.fluent.inner.OperationInner; import com.azure.resourcemanager.redis.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/PatchSchedulesClient.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/PatchSchedulesClient.java index 9a281c57361e2..1ba9e881f76d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/PatchSchedulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/PatchSchedulesClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.redis.RedisManagementClient; import com.azure.resourcemanager.redis.fluent.inner.RedisPatchScheduleInner; import com.azure.resourcemanager.redis.fluent.inner.RedisPatchScheduleListResultInner; import com.azure.resourcemanager.redis.models.DefaultName; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisClient.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisClient.java index 2ce592228806c..0c6ef13721e8b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.redis.RedisManagementClient; import com.azure.resourcemanager.redis.fluent.inner.NotificationListResponseInner; import com.azure.resourcemanager.redis.fluent.inner.RedisAccessKeysInner; import com.azure.resourcemanager.redis.fluent.inner.RedisForceRebootResponseInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisManagementClient.java similarity index 93% rename from sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisManagementClient.java index 2e53204792415..c099ef4f7c198 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisManagementClient.java @@ -2,18 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.redis; +package com.azure.resourcemanager.redis.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.redis.fluent.FirewallRulesClient; -import com.azure.resourcemanager.redis.fluent.LinkedServersClient; -import com.azure.resourcemanager.redis.fluent.OperationsClient; -import com.azure.resourcemanager.redis.fluent.PatchSchedulesClient; -import com.azure.resourcemanager.redis.fluent.RedisClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisManagementClientBuilder.java similarity index 99% rename from sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisManagementClientBuilder.java index a1ee63f6ff078..cd39282273c66 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/RedisManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/RedisManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.redis; +package com.azure.resourcemanager.redis.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java index 2577361ae2596..490b030362b44 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java @@ -5,6 +5,14 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.resources.fluent.FeatureClient; +import com.azure.resourcemanager.resources.fluent.FeatureClientBuilder; +import com.azure.resourcemanager.resources.fluent.PolicyClient; +import com.azure.resourcemanager.resources.fluent.PolicyClientBuilder; +import com.azure.resourcemanager.resources.fluent.ResourceManagementClient; +import com.azure.resourcemanager.resources.fluent.ResourceManagementClientBuilder; +import com.azure.resourcemanager.resources.fluent.SubscriptionClient; +import com.azure.resourcemanager.resources.fluent.SubscriptionClientBuilder; import com.azure.resourcemanager.resources.implementation.DeploymentsImpl; import com.azure.resourcemanager.resources.implementation.FeaturesImpl; import com.azure.resourcemanager.resources.implementation.GenericResourcesImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentOperationsClient.java index 6229d64a9b94a..e831da3274920 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentOperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.inner.DeploymentOperationInner; import com.azure.resourcemanager.resources.fluent.inner.DeploymentOperationsListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java index 0e614db23a1ee..93ae11e490ddc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.resources.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.inner.DeploymentExportResultInner; import com.azure.resourcemanager.resources.fluent.inner.DeploymentExtendedInner; import com.azure.resourcemanager.resources.fluent.inner.DeploymentInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/FeatureClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeatureClient.java similarity index 99% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/FeatureClient.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeatureClient.java index e9a7300d0ab51..28697f3456e94 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/FeatureClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeatureClient.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources; +package com.azure.resourcemanager.resources.fluent; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; @@ -29,7 +29,6 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.resources.fluent.FeaturesClient; import com.azure.resourcemanager.resources.fluent.inner.OperationInner; import com.azure.resourcemanager.resources.fluent.inner.OperationListResultInner; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/FeatureClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeatureClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/FeatureClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeatureClientBuilder.java index 4db02c8f28f3d..be18c74c71bfa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/FeatureClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeatureClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources; +package com.azure.resourcemanager.resources.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeaturesClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeaturesClient.java index cc2cc9eea47ff..563e7ff251f96 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeaturesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/FeaturesClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.FeatureClient; import com.azure.resourcemanager.resources.fluent.inner.FeatureOperationsListResultInner; import com.azure.resourcemanager.resources.fluent.inner.FeatureResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/OperationsClient.java index 45ee018a61083..647a6a3a73c8d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.inner.OperationInner; import com.azure.resourcemanager.resources.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java index 2bf5563170caa..12eae9b96fe32 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.PolicyClient; import com.azure.resourcemanager.resources.fluent.inner.PolicyAssignmentInner; import com.azure.resourcemanager.resources.fluent.inner.PolicyAssignmentListResultInner; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/PolicyClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClient.java similarity index 94% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/PolicyClient.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClient.java index 6440ac84b54a6..c006881661021 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/PolicyClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClient.java @@ -2,16 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources; +package com.azure.resourcemanager.resources.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.resources.fluent.PolicyAssignmentsClient; -import com.azure.resourcemanager.resources.fluent.PolicyDefinitionsClient; -import com.azure.resourcemanager.resources.fluent.PolicySetDefinitionsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/PolicyClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/PolicyClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClientBuilder.java index fbed0028955bb..7dd20e5897d0e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/PolicyClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources; +package com.azure.resourcemanager.resources.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java index 56a8ba21eee44..acbf47870e667 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.PolicyClient; import com.azure.resourcemanager.resources.fluent.inner.PolicyDefinitionInner; import com.azure.resourcemanager.resources.fluent.inner.PolicyDefinitionListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicySetDefinitionsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicySetDefinitionsClient.java index fec87a2f70340..3324422357a5e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicySetDefinitionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicySetDefinitionsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.PolicyClient; import com.azure.resourcemanager.resources.fluent.inner.PolicySetDefinitionInner; import com.azure.resourcemanager.resources.fluent.inner.PolicySetDefinitionListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ProvidersClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ProvidersClient.java index 2aa9d0f763573..6fad2cef88cdf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ProvidersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ProvidersClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.inner.ProviderInner; import com.azure.resourcemanager.resources.fluent.inner.ProviderListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceGroupsClient.java index ce7e97f536e4a..16cc6084386f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceGroupsClient.java @@ -34,7 +34,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.resources.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.inner.ResourceGroupExportResultInner; import com.azure.resourcemanager.resources.fluent.inner.ResourceGroupInner; import com.azure.resourcemanager.resources.fluent.inner.ResourceGroupListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java similarity index 92% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java index b215891d34474..a622b12681812 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java @@ -2,20 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources; +package com.azure.resourcemanager.resources.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.resources.fluent.DeploymentOperationsClient; -import com.azure.resourcemanager.resources.fluent.DeploymentsClient; -import com.azure.resourcemanager.resources.fluent.OperationsClient; -import com.azure.resourcemanager.resources.fluent.ProvidersClient; -import com.azure.resourcemanager.resources.fluent.ResourceGroupsClient; -import com.azure.resourcemanager.resources.fluent.ResourcesClient; -import com.azure.resourcemanager.resources.fluent.TagOperationsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClientBuilder.java index 8d36cabc24815..ac2986cf1c85f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources; +package com.azure.resourcemanager.resources.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceNamesClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceNamesClient.java index 4a6b584b4ac59..7b93cf17bb519 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceNamesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceNamesClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.SubscriptionClient; import com.azure.resourcemanager.resources.fluent.inner.CheckResourceNameResultInner; import com.azure.resourcemanager.resources.models.ResourceName; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java index be53eead22f69..e140add94a14d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java @@ -34,7 +34,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.resources.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.inner.GenericResourceExpandedInner; import com.azure.resourcemanager.resources.fluent.inner.GenericResourceInner; import com.azure.resourcemanager.resources.fluent.inner.ResourceListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/SubscriptionClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionClient.java similarity index 94% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/SubscriptionClient.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionClient.java index 1066f0dd2deda..e959f4c208998 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/SubscriptionClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionClient.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources; +package com.azure.resourcemanager.resources.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; @@ -10,9 +10,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; //import com.azure.resourcemanager.resources.fluent.OperationsClient; -import com.azure.resourcemanager.resources.fluent.ResourceNamesClient; -import com.azure.resourcemanager.resources.fluent.SubscriptionsClient; -import com.azure.resourcemanager.resources.fluent.TenantsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/SubscriptionClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/SubscriptionClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionClientBuilder.java index a4fac1572387c..be2b92f6c1a64 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/SubscriptionClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources; +package com.azure.resourcemanager.resources.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionsClient.java index 4881abed0775b..597c2f746f7eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/SubscriptionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.SubscriptionClient; import com.azure.resourcemanager.resources.fluent.inner.LocationInner; import com.azure.resourcemanager.resources.fluent.inner.LocationListResultInner; import com.azure.resourcemanager.resources.fluent.inner.SubscriptionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java index 6d9b48393cc5a..bb41058e17270 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.inner.TagDetailsInner; import com.azure.resourcemanager.resources.fluent.inner.TagValueInner; import com.azure.resourcemanager.resources.fluent.inner.TagsListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TenantsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TenantsClient.java index f6f444e384274..77e3d24ba6b0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TenantsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TenantsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.SubscriptionClient; import com.azure.resourcemanager.resources.fluent.inner.TenantIdDescriptionInner; import com.azure.resourcemanager.resources.fluent.inner.TenantListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourceImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourceImpl.java index 76b0bbbad0cb9..d725e8868909e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourceImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourceImpl.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.GroupableResourceImpl; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.fluent.inner.GenericResourceInner; -import com.azure.resourcemanager.resources.ResourceManagementClient; +import com.azure.resourcemanager.resources.fluent.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.ResourcesClient; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupImpl.java index 1c180e92eafe2..02914b55570d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupImpl.java @@ -11,7 +11,7 @@ import com.azure.resourcemanager.resources.fluentcore.model.implementation.CreatableUpdatableImpl; import com.azure.resourcemanager.resources.fluent.inner.ResourceGroupInner; import com.azure.resourcemanager.resources.fluent.ResourceGroupsClient; -import com.azure.resourcemanager.resources.ResourceManagementClient; +import com.azure.resourcemanager.resources.fluent.ResourceManagementClient; import reactor.core.publisher.Mono; import java.util.Arrays; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManager.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManager.java index 4fd9973c23bc9..663798e1360d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManager.java @@ -11,6 +11,8 @@ import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.servicebus.fluent.ServiceBusManagementClient; +import com.azure.resourcemanager.servicebus.fluent.ServiceBusManagementClientBuilder; import com.azure.resourcemanager.servicebus.implementation.ServiceBusNamespacesImpl; import com.azure.resourcemanager.servicebus.models.ServiceBusNamespaces; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/NamespacesClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/NamespacesClient.java index 0b31387ecf314..d50eda7ee3760 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/NamespacesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/NamespacesClient.java @@ -36,7 +36,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; import com.azure.resourcemanager.servicebus.fluent.inner.CheckNameAvailabilityResultInner; import com.azure.resourcemanager.servicebus.fluent.inner.NamespaceListResultInner; import com.azure.resourcemanager.servicebus.fluent.inner.NamespaceResourceInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/OperationsClient.java index 5c62751ff4bf2..ffae3d385a0c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; import com.azure.resourcemanager.servicebus.fluent.inner.OperationInner; import com.azure.resourcemanager.servicebus.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/QueuesClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/QueuesClient.java index d04e825b020b7..1b77cf3e4d122 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/QueuesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/QueuesClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; import com.azure.resourcemanager.servicebus.fluent.inner.QueueListResultInner; import com.azure.resourcemanager.servicebus.fluent.inner.QueueResourceInner; import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/ServiceBusManagementClient.java similarity index 93% rename from sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/ServiceBusManagementClient.java index 4df30830a7175..924edbcea4a64 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/ServiceBusManagementClient.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicebus; +package com.azure.resourcemanager.servicebus.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; @@ -10,11 +10,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; -import com.azure.resourcemanager.servicebus.fluent.NamespacesClient; -import com.azure.resourcemanager.servicebus.fluent.OperationsClient; -import com.azure.resourcemanager.servicebus.fluent.QueuesClient; -import com.azure.resourcemanager.servicebus.fluent.SubscriptionsClient; -import com.azure.resourcemanager.servicebus.fluent.TopicsClient; + import java.time.Duration; /** Initializes a new instance of the ServiceBusManagementClient type. */ diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/ServiceBusManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/ServiceBusManagementClientBuilder.java index fc9cf1698e8a9..db650ada542e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/ServiceBusManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/ServiceBusManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicebus; +package com.azure.resourcemanager.servicebus.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/SubscriptionsClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/SubscriptionsClient.java index 28b97d7995d73..4d2516e514b55 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/SubscriptionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/SubscriptionsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; import com.azure.resourcemanager.servicebus.fluent.inner.SubscriptionListResultInner; import com.azure.resourcemanager.servicebus.fluent.inner.SubscriptionResourceInner; import com.azure.resourcemanager.servicebus.models.SubscriptionCreateOrUpdateParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java index 27adebb86bb0e..1f11b918891de 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.servicebus.ServiceBusManagementClient; import com.azure.resourcemanager.servicebus.fluent.inner.ResourceListKeysInner; import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleListResultInner; import com.azure.resourcemanager.servicebus.fluent.inner.SharedAccessAuthorizationRuleResourceInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java index 9138436accd37..09bf9cdcf3fb3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java @@ -11,6 +11,8 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.sql.fluent.SqlManagementClient; +import com.azure.resourcemanager.sql.fluent.SqlManagementClientBuilder; import com.azure.resourcemanager.sql.implementation.SqlServersImpl; import com.azure.resourcemanager.sql.models.SqlServers; import com.azure.resourcemanager.storage.StorageManager; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupLongTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupLongTermRetentionPoliciesClient.java index 0a90ebffa0a37..e356317c93d3d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupLongTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupLongTermRetentionPoliciesClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.BackupLongTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.LongTermRetentionPolicyName; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java index 015653b1efd21..43de576bd60ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.BackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.BackupShortTermRetentionPolicyListResultInner; import com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java index 8d37805d86a67..a16646d3db944 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.LocationCapabilitiesInner; import com.azure.resourcemanager.sql.models.CapabilityGroup; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java index 6a96d3abb0b15..8f32f3a078910 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DataMaskingPolicyInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java index d6a3316384969..e98576713c3c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DataMaskingRuleInner; import com.azure.resourcemanager.sql.fluent.inner.DataMaskingRuleListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java index 68b495313bd68..55320b3f2f6f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseAutomaticTuningInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java index 8c5a06dd3ca0e..08a40a785cb46 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseBlobAuditingPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.DatabaseBlobAuditingPolicyListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java index df376f1c70ea4..4d74e21573e1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseOperationInner; import com.azure.resourcemanager.sql.fluent.inner.DatabaseOperationListResultInner; import java.util.UUID; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseThreatDetectionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseThreatDetectionPoliciesClient.java index 58d021207cec9..67343a243d66e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseThreatDetectionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseThreatDetectionPoliciesClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseSecurityAlertPolicyInner; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java index 89e04d256b66c..297286277ee46 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseUsageInner; import com.azure.resourcemanager.sql.fluent.inner.DatabaseUsageListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java index fa08e8c6ad2d5..b9825cadeb95e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseVulnerabilityAssessmentRuleBaselineInner; import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java index f189f84d738f2..4723b612ae014 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseVulnerabilityAssessmentScansExportInner; import com.azure.resourcemanager.sql.fluent.inner.VulnerabilityAssessmentScanRecordInner; import com.azure.resourcemanager.sql.fluent.inner.VulnerabilityAssessmentScanRecordListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java index 173be5ae82fd8..ce761c8941354 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseVulnerabilityAssessmentInner; import com.azure.resourcemanager.sql.fluent.inner.DatabaseVulnerabilityAssessmentListResultInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java index 416d3c66b6e5d..baf77853f242c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseInner; import com.azure.resourcemanager.sql.fluent.inner.DatabaseListResultInner; import com.azure.resourcemanager.sql.fluent.inner.ImportExportResponseInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolActivitiesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolActivitiesClient.java index d2e4a953e027f..e00bee5c5bad6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolActivitiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolActivitiesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ElasticPoolActivityInner; import com.azure.resourcemanager.sql.fluent.inner.ElasticPoolActivityListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolDatabaseActivitiesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolDatabaseActivitiesClient.java index d34390a16495c..b23e4546d1b9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolDatabaseActivitiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolDatabaseActivitiesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ElasticPoolDatabaseActivityInner; import com.azure.resourcemanager.sql.fluent.inner.ElasticPoolDatabaseActivityListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java index 9e8189b4975fa..5af893196c71a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ElasticPoolOperationInner; import com.azure.resourcemanager.sql.fluent.inner.ElasticPoolOperationListResultInner; import java.util.UUID; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java index 3d6234ac20bd7..48e4ec559caef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ElasticPoolInner; import com.azure.resourcemanager.sql.fluent.inner.ElasticPoolListResultInner; import com.azure.resourcemanager.sql.fluent.inner.MetricDefinitionInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java index 374d6f48f78db..d79d108067fc7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.EncryptionProtectorInner; import com.azure.resourcemanager.sql.fluent.inner.EncryptionProtectorListResultInner; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java index 50c8ef6be9513..253fe8f7b9277 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ExtendedDatabaseBlobAuditingPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.ExtendedDatabaseBlobAuditingPolicyListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java index e5f27e30d0b5f..c4114ef3d06d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ExtendedServerBlobAuditingPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.ExtendedServerBlobAuditingPolicyListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java index f0dda227ea2a8..09b7791da193f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.FailoverGroupInner; import com.azure.resourcemanager.sql.fluent.inner.FailoverGroupListResultInner; import com.azure.resourcemanager.sql.models.FailoverGroupUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java index 639c78e0638ee..2c82991958001 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.FirewallRuleInner; import com.azure.resourcemanager.sql.fluent.inner.FirewallRuleListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java index 1b5b2b9fd5259..d8266fb03e360 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.GeoBackupPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.GeoBackupPolicyListResultInner; import com.azure.resourcemanager.sql.models.GeoBackupPolicyName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java index af32aae9254ed..d5363ce1957b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.InstanceFailoverGroupInner; import com.azure.resourcemanager.sql.fluent.inner.InstanceFailoverGroupListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java index bd999f05b9258..bf3d1cc6a4876 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java @@ -35,7 +35,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.InstancePoolInner; import com.azure.resourcemanager.sql.fluent.inner.InstancePoolListResultInner; import com.azure.resourcemanager.sql.models.InstancePoolUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java index 6269ed908bf0e..336952bf16651 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobAgentInner; import com.azure.resourcemanager.sql.fluent.inner.JobAgentListResultInner; import com.azure.resourcemanager.sql.models.JobAgentUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java index 590df03aa485e..69ec4a487694e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobCredentialInner; import com.azure.resourcemanager.sql.fluent.inner.JobCredentialListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java index ff08814db01ab..016492f043c6b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobExecutionInner; import com.azure.resourcemanager.sql.fluent.inner.JobExecutionListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java index fb8cfef128182..8ede9760cbc64 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobExecutionInner; import com.azure.resourcemanager.sql.fluent.inner.JobExecutionListResultInner; import java.time.OffsetDateTime; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java index 2ee4868438b5b..a7d5e0fb76c13 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobStepInner; import com.azure.resourcemanager.sql.fluent.inner.JobStepListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java index 0c9db6c934690..4760c54a68ca4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobExecutionInner; import com.azure.resourcemanager.sql.fluent.inner.JobExecutionListResultInner; import java.time.OffsetDateTime; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java index b0617890c7faa..abe6a003bb716 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobTargetGroupInner; import com.azure.resourcemanager.sql.fluent.inner.JobTargetGroupListResultInner; import com.azure.resourcemanager.sql.models.JobTarget; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java index 0591fe8877774..f0b079530c812 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobVersionListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java index cb09830941153..6909675dade12 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.JobInner; import com.azure.resourcemanager.sql.fluent.inner.JobListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java index 0e2201783bae7..92aefe4d5208d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.LongTermRetentionBackupInner; import com.azure.resourcemanager.sql.fluent.inner.LongTermRetentionBackupListResultInner; import com.azure.resourcemanager.sql.models.LongTermRetentionDatabaseState; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java index 8ceecfab1270c..6b9e86fb17a70 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceLongTermRetentionBackupInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceLongTermRetentionBackupListResultInner; import com.azure.resourcemanager.sql.models.DatabaseState; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java index 3ac6763caa73e..ca9e55521aa67 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedBackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedBackupShortTermRetentionPolicyListResultInner; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java index 1b152ffc973c2..1cd82157276f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedDatabaseRestoreDetailsResultInner; import com.azure.resourcemanager.sql.models.RestoreDetailsName; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java index 927e1d24f917c..0afbf233b189a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedDatabaseSecurityAlertPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedDatabaseSecurityAlertPolicyListResultInner; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java index e58f5e4cabe57..4b88dc2e805da 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.SensitivityLabelInner; import com.azure.resourcemanager.sql.fluent.inner.SensitivityLabelListResultInner; import com.azure.resourcemanager.sql.models.SensitivityLabelSource; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java index d194a92837026..7fe90e28e712e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseVulnerabilityAssessmentRuleBaselineInner; import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java index cb12b7ff2b878..47805c7541638 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseVulnerabilityAssessmentScansExportInner; import com.azure.resourcemanager.sql.fluent.inner.VulnerabilityAssessmentScanRecordInner; import com.azure.resourcemanager.sql.fluent.inner.VulnerabilityAssessmentScanRecordListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java index 4bf3955a882d8..d4ddf6e7391f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.DatabaseVulnerabilityAssessmentInner; import com.azure.resourcemanager.sql.fluent.inner.DatabaseVulnerabilityAssessmentListResultInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java index ce5d360f6a463..bc78349e83cf2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedDatabaseInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedDatabaseListResultInner; import com.azure.resourcemanager.sql.models.CompleteDatabaseRestoreDefinition; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java index d8894c0a3fed2..ed4a5baed7a14 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceAdministratorInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceAdministratorListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java index 192ec36ce2108..6fead478ae4a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceEncryptionProtectorInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceEncryptionProtectorListResultInner; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java index 558b788b8621b..72460eab1114d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceKeyInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceKeyListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java index 2d1bf713aa432..a0d681a634712 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceLongTermRetentionPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceLongTermRetentionPolicyListResultInner; import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java index 974fee4850687..0819144c2203a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java @@ -26,7 +26,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceOperationInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceOperationListResultInner; import java.util.UUID; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java index 043aeff601cf1..a13352755965b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.models.TdeCertificate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java index b30bcf373dfc3..20ef54d1b37a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceVulnerabilityAssessmentInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceVulnerabilityAssessmentListResultInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java index f0e4310a61d3b..afdf4fb48d381 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java @@ -36,7 +36,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedInstanceListResultInner; import com.azure.resourcemanager.sql.models.ManagedInstanceUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java index 9042becd0d942..b106d297693ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedBackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedBackupShortTermRetentionPolicyListResultInner; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java index 75e0b53c8a7ea..c5da5ae1bca14 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ManagedServerSecurityAlertPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.ManagedServerSecurityAlertPolicyListResultInner; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java index 278d7a12e0aaf..90c61d82ef461 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.OperationInner; import com.azure.resourcemanager.sql.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java index b52a8981e78f3..1cb22347ecfbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.PrivateEndpointConnectionInner; import com.azure.resourcemanager.sql.fluent.inner.PrivateEndpointConnectionListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java index 05d48f9aa8895..8d67c888e5280 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.PrivateLinkResourceInner; import com.azure.resourcemanager.sql.fluent.inner.PrivateLinkResourceListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedElasticPoolsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedElasticPoolsClient.java index 3cb6c68bde04f..fbf9600d08610 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedElasticPoolsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedElasticPoolsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.RecommendedElasticPoolInner; import com.azure.resourcemanager.sql.fluent.inner.RecommendedElasticPoolListMetricsResultInner; import com.azure.resourcemanager.sql.fluent.inner.RecommendedElasticPoolListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java index 8dd4daeb59347..394bfc52a89fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.RecoverableDatabaseInner; import com.azure.resourcemanager.sql.fluent.inner.RecoverableDatabaseListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java index 70f770e952259..1ecc72dff1364 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.RecoverableManagedDatabaseInner; import com.azure.resourcemanager.sql.fluent.inner.RecoverableManagedDatabaseListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java index 3804db7dcbf7e..84c0727f00f36 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ReplicationLinkInner; import com.azure.resourcemanager.sql.fluent.inner.ReplicationLinkListResultInner; import com.azure.resourcemanager.sql.models.UnlinkParameters; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java index ec8b5c475adba..17c3d675210ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.RestorableDroppedDatabaseInner; import com.azure.resourcemanager.sql.fluent.inner.RestorableDroppedDatabaseListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java index 594cb2f450842..7b0e2008e7ed9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.RestorableDroppedManagedDatabaseInner; import com.azure.resourcemanager.sql.fluent.inner.RestorableDroppedManagedDatabaseListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java index 4dbe754539acc..450cd6b90eee8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.RestorePointInner; import com.azure.resourcemanager.sql.fluent.inner.RestorePointListResultInner; import com.azure.resourcemanager.sql.models.CreateDatabaseRestorePointDefinition; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java index 22dc2e73a2568..f77ed6164f764 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.SensitivityLabelInner; import com.azure.resourcemanager.sql.fluent.inner.SensitivityLabelListResultInner; import com.azure.resourcemanager.sql.models.SensitivityLabelSource; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java index cc0ad7e6dfa8b..7c7d8cbb3ee0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServerAutomaticTuningInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java index f8dc85a142c1e..1af7db33d3bb7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.AdministratorListResultInner; import com.azure.resourcemanager.sql.fluent.inner.ServerAzureADAdministratorInner; import com.azure.resourcemanager.sql.models.AdministratorName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java index e6175773bf856..1a5410505a90b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServerBlobAuditingPolicyInner; import com.azure.resourcemanager.sql.fluent.inner.ServerBlobAuditingPolicyListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerCommunicationLinksClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerCommunicationLinksClient.java index 8d938fbc52d37..0e3585cc5d75c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerCommunicationLinksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerCommunicationLinksClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServerCommunicationLinkInner; import com.azure.resourcemanager.sql.fluent.inner.ServerCommunicationLinkListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java index b67ab11e45363..cbd71fd47a073 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServerConnectionPolicyInner; import com.azure.resourcemanager.sql.models.ConnectionPolicyName; import com.azure.resourcemanager.sql.models.ServerConnectionType; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java index f81d5fb2cdb46..493e5fdd6f8f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServerDnsAliasInner; import com.azure.resourcemanager.sql.fluent.inner.ServerDnsAliasListResultInner; import com.azure.resourcemanager.sql.models.ServerDnsAliasAcquisition; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java index ca73e443342c7..8ed8ca4e00271 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServerKeyInner; import com.azure.resourcemanager.sql.fluent.inner.ServerKeyListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java index 2fc5584c74266..64d7fb8708a1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.LogicalServerSecurityAlertPolicyListResultInner; import com.azure.resourcemanager.sql.fluent.inner.ServerSecurityAlertPolicyInner; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java index cc0e4fbb92302..434f591c10443 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServerUsageInner; import com.azure.resourcemanager.sql.fluent.inner.ServerUsageListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java index 33aa3c5111592..1496aacbf5c26 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServerVulnerabilityAssessmentInner; import com.azure.resourcemanager.sql.fluent.inner.ServerVulnerabilityAssessmentListResultInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java index 7430b004f7e2e..865881cbc63de 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java @@ -36,7 +36,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.sql.fluent.inner.ServerInner; import com.azure.resourcemanager.sql.fluent.inner.ServerListResultInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServiceObjectivesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServiceObjectivesClient.java index 4440835b11a1f..2b79bec89460b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServiceObjectivesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServiceObjectivesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServiceObjectiveInner; import com.azure.resourcemanager.sql.fluent.inner.ServiceObjectiveListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServiceTierAdvisorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServiceTierAdvisorsClient.java index a36ffd5307b0c..e97982882e55c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServiceTierAdvisorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServiceTierAdvisorsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.ServiceTierAdvisorInner; import com.azure.resourcemanager.sql.fluent.inner.ServiceTierAdvisorListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java similarity index 87% rename from sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java index d8b0256f9893e..675751c670768 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql; +package com.azure.resourcemanager.sql.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; @@ -10,97 +10,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; -import com.azure.resourcemanager.sql.fluent.BackupLongTermRetentionPoliciesClient; -import com.azure.resourcemanager.sql.fluent.BackupShortTermRetentionPoliciesClient; -import com.azure.resourcemanager.sql.fluent.CapabilitiesClient; -import com.azure.resourcemanager.sql.fluent.DataMaskingPoliciesClient; -import com.azure.resourcemanager.sql.fluent.DataMaskingRulesClient; -import com.azure.resourcemanager.sql.fluent.DatabaseAutomaticTuningsClient; -import com.azure.resourcemanager.sql.fluent.DatabaseBlobAuditingPoliciesClient; -import com.azure.resourcemanager.sql.fluent.DatabaseOperationsClient; -import com.azure.resourcemanager.sql.fluent.DatabaseThreatDetectionPoliciesClient; -import com.azure.resourcemanager.sql.fluent.DatabaseUsagesClient; -import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentRuleBaselinesClient; -import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentScansClient; -import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.DatabasesClient; -import com.azure.resourcemanager.sql.fluent.ElasticPoolActivitiesClient; -import com.azure.resourcemanager.sql.fluent.ElasticPoolDatabaseActivitiesClient; -import com.azure.resourcemanager.sql.fluent.ElasticPoolOperationsClient; -import com.azure.resourcemanager.sql.fluent.ElasticPoolsClient; -import com.azure.resourcemanager.sql.fluent.EncryptionProtectorsClient; -import com.azure.resourcemanager.sql.fluent.ExtendedDatabaseBlobAuditingPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ExtendedServerBlobAuditingPoliciesClient; -import com.azure.resourcemanager.sql.fluent.FailoverGroupsClient; -import com.azure.resourcemanager.sql.fluent.FirewallRulesClient; -import com.azure.resourcemanager.sql.fluent.GeoBackupPoliciesClient; -import com.azure.resourcemanager.sql.fluent.InstanceFailoverGroupsClient; -import com.azure.resourcemanager.sql.fluent.InstancePoolsClient; -import com.azure.resourcemanager.sql.fluent.JobAgentsClient; -import com.azure.resourcemanager.sql.fluent.JobCredentialsClient; -import com.azure.resourcemanager.sql.fluent.JobExecutionsClient; -import com.azure.resourcemanager.sql.fluent.JobStepExecutionsClient; -import com.azure.resourcemanager.sql.fluent.JobStepsClient; -import com.azure.resourcemanager.sql.fluent.JobTargetExecutionsClient; -import com.azure.resourcemanager.sql.fluent.JobTargetGroupsClient; -import com.azure.resourcemanager.sql.fluent.JobVersionsClient; -import com.azure.resourcemanager.sql.fluent.JobsClient; -import com.azure.resourcemanager.sql.fluent.LongTermRetentionBackupsClient; -import com.azure.resourcemanager.sql.fluent.LongTermRetentionManagedInstanceBackupsClient; -import com.azure.resourcemanager.sql.fluent.ManagedBackupShortTermRetentionPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseRestoreDetailsClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSecurityAlertPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSensitivityLabelsClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentScansClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabasesClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceAdministratorsClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceEncryptionProtectorsClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceKeysClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceLongTermRetentionPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceOperationsClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceTdeCertificatesClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstancesClient; -import com.azure.resourcemanager.sql.fluent.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ManagedServerSecurityAlertPoliciesClient; -import com.azure.resourcemanager.sql.fluent.OperationsClient; -import com.azure.resourcemanager.sql.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.sql.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.sql.fluent.RecommendedElasticPoolsClient; -import com.azure.resourcemanager.sql.fluent.RecoverableDatabasesClient; -import com.azure.resourcemanager.sql.fluent.RecoverableManagedDatabasesClient; -import com.azure.resourcemanager.sql.fluent.ReplicationLinksClient; -import com.azure.resourcemanager.sql.fluent.RestorableDroppedDatabasesClient; -import com.azure.resourcemanager.sql.fluent.RestorableDroppedManagedDatabasesClient; -import com.azure.resourcemanager.sql.fluent.RestorePointsClient; -import com.azure.resourcemanager.sql.fluent.SensitivityLabelsClient; -import com.azure.resourcemanager.sql.fluent.ServerAutomaticTuningsClient; -import com.azure.resourcemanager.sql.fluent.ServerAzureADAdministratorsClient; -import com.azure.resourcemanager.sql.fluent.ServerBlobAuditingPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ServerCommunicationLinksClient; -import com.azure.resourcemanager.sql.fluent.ServerConnectionPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ServerDnsAliasesClient; -import com.azure.resourcemanager.sql.fluent.ServerKeysClient; -import com.azure.resourcemanager.sql.fluent.ServerSecurityAlertPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ServerUsagesClient; -import com.azure.resourcemanager.sql.fluent.ServerVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ServersClient; -import com.azure.resourcemanager.sql.fluent.ServiceObjectivesClient; -import com.azure.resourcemanager.sql.fluent.ServiceTierAdvisorsClient; -import com.azure.resourcemanager.sql.fluent.SubscriptionUsagesClient; -import com.azure.resourcemanager.sql.fluent.SyncAgentsClient; -import com.azure.resourcemanager.sql.fluent.SyncGroupsClient; -import com.azure.resourcemanager.sql.fluent.SyncMembersClient; -import com.azure.resourcemanager.sql.fluent.TdeCertificatesClient; -import com.azure.resourcemanager.sql.fluent.TransparentDataEncryptionActivitiesClient; -import com.azure.resourcemanager.sql.fluent.TransparentDataEncryptionsClient; -import com.azure.resourcemanager.sql.fluent.UsagesClient; -import com.azure.resourcemanager.sql.fluent.VirtualClustersClient; -import com.azure.resourcemanager.sql.fluent.VirtualNetworkRulesClient; -import com.azure.resourcemanager.sql.fluent.WorkloadClassifiersClient; -import com.azure.resourcemanager.sql.fluent.WorkloadGroupsClient; + import java.time.Duration; /** Initializes a new instance of the SqlManagementClient type. */ diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClientBuilder.java index c71ad1fa51564..01c86955e7f96 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/SqlManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql; +package com.azure.resourcemanager.sql.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java index fd24a0e30cb9f..33d1b757a0fe5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.SubscriptionUsageInner; import com.azure.resourcemanager.sql.fluent.inner.SubscriptionUsageListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java index 6894489f79e15..c20484335a02e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java @@ -32,7 +32,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.SyncAgentInner; import com.azure.resourcemanager.sql.fluent.inner.SyncAgentKeyPropertiesInner; import com.azure.resourcemanager.sql.fluent.inner.SyncAgentLinkedDatabaseInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java index 64139d17fff7a..00e0db86f5fc3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.SyncDatabaseIdListResultInner; import com.azure.resourcemanager.sql.fluent.inner.SyncDatabaseIdPropertiesInner; import com.azure.resourcemanager.sql.fluent.inner.SyncFullSchemaPropertiesInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java index 9c14d795433e4..6c3e4f0784ada 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java @@ -33,7 +33,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.SyncFullSchemaPropertiesInner; import com.azure.resourcemanager.sql.fluent.inner.SyncFullSchemaPropertiesListResultInner; import com.azure.resourcemanager.sql.fluent.inner.SyncMemberInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java index affd524d92bd0..3b6d87bb4efe8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.models.TdeCertificate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionActivitiesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionActivitiesClient.java index ad59dade03c34..8fe0a6389edf0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionActivitiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionActivitiesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.TransparentDataEncryptionActivityInner; import com.azure.resourcemanager.sql.fluent.inner.TransparentDataEncryptionActivityListResultInner; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java index 385ee485b21a8..270f4c8f08b73 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.TransparentDataEncryptionInner; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionStatus; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java index 4f1f655ea3767..d509376cdc416 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.UsageInner; import com.azure.resourcemanager.sql.fluent.inner.UsageListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java index a137e7e1ac6db..373c3dd0c615e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java @@ -34,7 +34,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.VirtualClusterInner; import com.azure.resourcemanager.sql.fluent.inner.VirtualClusterListResultInner; import com.azure.resourcemanager.sql.models.VirtualClusterUpdate; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java index 260714ce111da..5c93e3fd50b0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.VirtualNetworkRuleInner; import com.azure.resourcemanager.sql.fluent.inner.VirtualNetworkRuleListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java index 2f86730f6f5af..c01c3d2d6bb07 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.WorkloadClassifierInner; import com.azure.resourcemanager.sql.fluent.inner.WorkloadClassifierListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java index 4ac86236792b6..4764a1d8b7f59 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.inner.WorkloadGroupInner; import com.azure.resourcemanager.sql.fluent.inner.WorkloadGroupListResultInner; import java.nio.ByteBuffer; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java index a74dc289bb3c1..780e01caab9a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManager.java @@ -11,6 +11,8 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.storage.fluent.StorageManagementClient; +import com.azure.resourcemanager.storage.fluent.StorageManagementClientBuilder; import com.azure.resourcemanager.storage.implementation.BlobContainersImpl; import com.azure.resourcemanager.storage.implementation.BlobServicesImpl; import com.azure.resourcemanager.storage.implementation.ManagementPoliciesImpl; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobContainersClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobContainersClient.java index 3ea8474eb925c..428ca6ad4758a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobContainersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobContainersClient.java @@ -31,7 +31,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.BlobContainerInner; import com.azure.resourcemanager.storage.fluent.inner.ImmutabilityPolicyInner; import com.azure.resourcemanager.storage.fluent.inner.LeaseContainerResponseInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobServicesClient.java index 3438d007782ab..3a8330c26dff4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobServicesClient.java @@ -27,7 +27,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.BlobServiceItemsInner; import com.azure.resourcemanager.storage.fluent.inner.BlobServicePropertiesInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/EncryptionScopesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/EncryptionScopesClient.java index 0f3b9322486c0..80ee1318212a5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/EncryptionScopesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/EncryptionScopesClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.EncryptionScopeInner; import com.azure.resourcemanager.storage.fluent.inner.EncryptionScopeListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/FileServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/FileServicesClient.java index 810848e520239..4595e6eeb47f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/FileServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/FileServicesClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.FileServiceItemsInner; import com.azure.resourcemanager.storage.fluent.inner.FileServicePropertiesInner; import com.azure.resourcemanager.storage.models.CorsRules; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/FileSharesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/FileSharesClient.java index 2c5c2aeb6e2d1..60ea61c346a17 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/FileSharesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/FileSharesClient.java @@ -30,7 +30,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.FileShareInner; import com.azure.resourcemanager.storage.fluent.inner.FileShareItemInner; import com.azure.resourcemanager.storage.fluent.inner.FileShareItemsInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ManagementPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ManagementPoliciesClient.java index 74a3bf3154544..31966516fceb6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ManagementPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ManagementPoliciesClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.ManagementPolicyInner; import com.azure.resourcemanager.storage.models.ManagementPolicyName; import com.azure.resourcemanager.storage.models.ManagementPolicySchema; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ObjectReplicationPoliciesOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ObjectReplicationPoliciesOperationsClient.java index 7778f6b3322fb..bd256f3de2c48 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ObjectReplicationPoliciesOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ObjectReplicationPoliciesOperationsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.ObjectReplicationPoliciesInner; import com.azure.resourcemanager.storage.fluent.inner.ObjectReplicationPolicyInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/OperationsClient.java index f0dff5a7d8beb..196cea424e2c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/OperationsClient.java @@ -24,7 +24,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.OperationInner; import com.azure.resourcemanager.storage.fluent.inner.OperationListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/PrivateEndpointConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/PrivateEndpointConnectionsClient.java index 882eca642512f..6200eac05cb0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/PrivateEndpointConnectionsClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.PrivateEndpointConnectionInner; import com.azure.resourcemanager.storage.fluent.inner.PrivateEndpointConnectionListResultInner; import com.azure.resourcemanager.storage.models.PrivateEndpoint; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/PrivateLinkResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/PrivateLinkResourcesClient.java index f2e3c2c282727..325cf889d35ef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/PrivateLinkResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/PrivateLinkResourcesClient.java @@ -21,7 +21,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.PrivateLinkResourceListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueueServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueueServicesClient.java index 5cfa48c2aaa06..d462ab0e90a65 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueueServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueueServicesClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.ListQueueServicesInner; import com.azure.resourcemanager.storage.fluent.inner.QueueServicePropertiesInner; import com.azure.resourcemanager.storage.models.CorsRules; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueuesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueuesClient.java index bdfae04835bc7..c7d183f8c9168 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueuesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueuesClient.java @@ -29,7 +29,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.ListQueueInner; import com.azure.resourcemanager.storage.fluent.inner.ListQueueResourceInner; import com.azure.resourcemanager.storage.fluent.inner.StorageQueueInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/SkusClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/SkusClient.java index 51d3a5bc807af..737164029cc85 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/SkusClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/SkusClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.SkuInformationInner; import com.azure.resourcemanager.storage.fluent.inner.StorageSkuListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageAccountsClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageAccountsClient.java index 463473d3c0fa7..fded2469056a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageAccountsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageAccountsClient.java @@ -36,7 +36,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.BlobRestoreStatusInner; import com.azure.resourcemanager.storage.fluent.inner.CheckNameAvailabilityResultInner; import com.azure.resourcemanager.storage.fluent.inner.ListAccountSasResponseInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java similarity index 89% rename from sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java index 7fa9894d3b371..e067ef55df0a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.storage; +package com.azure.resourcemanager.storage.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; @@ -10,23 +10,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; -import com.azure.resourcemanager.storage.fluent.BlobContainersClient; -import com.azure.resourcemanager.storage.fluent.BlobServicesClient; -import com.azure.resourcemanager.storage.fluent.EncryptionScopesClient; -import com.azure.resourcemanager.storage.fluent.FileServicesClient; -import com.azure.resourcemanager.storage.fluent.FileSharesClient; -import com.azure.resourcemanager.storage.fluent.ManagementPoliciesClient; -import com.azure.resourcemanager.storage.fluent.ObjectReplicationPoliciesOperationsClient; -import com.azure.resourcemanager.storage.fluent.OperationsClient; -import com.azure.resourcemanager.storage.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.storage.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.storage.fluent.QueueServicesClient; -import com.azure.resourcemanager.storage.fluent.QueuesClient; -import com.azure.resourcemanager.storage.fluent.SkusClient; -import com.azure.resourcemanager.storage.fluent.StorageAccountsClient; -import com.azure.resourcemanager.storage.fluent.TableServicesClient; -import com.azure.resourcemanager.storage.fluent.TablesClient; -import com.azure.resourcemanager.storage.fluent.UsagesClient; + import java.time.Duration; /** Initializes a new instance of the StorageManagementClient type. */ diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClientBuilder.java index 5f1d074ceda4c..93ca722e4790d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/StorageManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.storage; +package com.azure.resourcemanager.storage.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/TableServicesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/TableServicesClient.java index 6797a5186e2d3..61d42daf383ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/TableServicesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/TableServicesClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.ListTableServicesInner; import com.azure.resourcemanager.storage.fluent.inner.TableServicePropertiesInner; import com.azure.resourcemanager.storage.models.CorsRules; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/TablesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/TablesClient.java index 1dc26cd8701ea..bbbe66897b2fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/TablesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/TablesClient.java @@ -28,7 +28,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.ListTableResourceInner; import com.azure.resourcemanager.storage.fluent.inner.TableInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/UsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/UsagesClient.java index 05db954d03f97..76fd929847808 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/UsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/UsagesClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storage.StorageManagementClient; import com.azure.resourcemanager.storage.fluent.inner.UsageInner; import com.azure.resourcemanager.storage.fluent.inner.UsageListResultInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java index ec29e96c94015..2052bc68f9418 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManager.java @@ -11,6 +11,8 @@ import com.azure.resourcemanager.resources.fluentcore.arm.Manager; import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.trafficmanager.fluent.TrafficManagerManagementClient; +import com.azure.resourcemanager.trafficmanager.fluent.TrafficManagerManagementClientBuilder; import com.azure.resourcemanager.trafficmanager.implementation.TrafficManagerProfilesImpl; import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfiles; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java index 14b424bacd2d5..d5960b727968a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java @@ -25,7 +25,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; import com.azure.resourcemanager.trafficmanager.fluent.inner.DeleteOperationResultInner; import com.azure.resourcemanager.trafficmanager.fluent.inner.EndpointInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java index 903fe5ee4b469..352f9737b0383 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java @@ -20,7 +20,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; import com.azure.resourcemanager.trafficmanager.fluent.inner.TrafficManagerGeographicHierarchyInner; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java index 4e810ce7b1ba9..9fd72d7e40df0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.CollectionFormat; import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; import com.azure.resourcemanager.trafficmanager.fluent.inner.HeatMapModelInner; import java.util.List; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java index 4927cca89580a..a0baf1fafde32 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java @@ -33,7 +33,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; import com.azure.resourcemanager.trafficmanager.fluent.inner.DeleteOperationResultInner; import com.azure.resourcemanager.trafficmanager.fluent.inner.ProfileInner; import com.azure.resourcemanager.trafficmanager.fluent.inner.TrafficManagerNameAvailabilityInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClient.java similarity index 93% rename from sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClient.java rename to sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClient.java index c3feae1d074c2..1deaa29b94603 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClient.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.trafficmanager; +package com.azure.resourcemanager.trafficmanager.fluent; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; @@ -10,11 +10,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; -import com.azure.resourcemanager.trafficmanager.fluent.EndpointsClient; -import com.azure.resourcemanager.trafficmanager.fluent.GeographicHierarchiesClient; -import com.azure.resourcemanager.trafficmanager.fluent.HeatMapsClient; -import com.azure.resourcemanager.trafficmanager.fluent.ProfilesClient; -import com.azure.resourcemanager.trafficmanager.fluent.TrafficManagerUserMetricsKeysClient; + import java.time.Duration; /** Initializes a new instance of the TrafficManagerManagementClient type. */ diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClientBuilder.java similarity index 98% rename from sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClientBuilder.java rename to sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClientBuilder.java index 962377c8c5d11..982916a7bf1fa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/TrafficManagerManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClientBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.trafficmanager; +package com.azure.resourcemanager.trafficmanager.fluent; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java index d3ef3be9212bc..7f4f4e78a717d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java @@ -23,7 +23,6 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.trafficmanager.TrafficManagerManagementClient; import com.azure.resourcemanager.trafficmanager.fluent.inner.DeleteOperationResultInner; import com.azure.resourcemanager.trafficmanager.fluent.inner.UserMetricsModelInner; import reactor.core.publisher.Mono; From 76a1ce705067d1cba18d7c298c26c90a3e83d299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=B6=B5?= <1135494872@qq.com> Date: Tue, 8 Sep 2020 11:21:57 +0800 Subject: [PATCH 122/168] add readme file for Storage Queue starter (#14880) Co-authored-by: v-gaoh --- .../README.md | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/sdk/spring/azure-spring-cloud-starter-storage-queue/README.md b/sdk/spring/azure-spring-cloud-starter-storage-queue/README.md index c88274b8ccdca..1904840f18420 100644 --- a/sdk/spring/azure-spring-cloud-starter-storage-queue/README.md +++ b/sdk/spring/azure-spring-cloud-starter-storage-queue/README.md @@ -1,8 +1,69 @@ # Azure Spring cloud Starter Storage Queue client library for Java -## Key concepts +The Spring Cloud Storage Queue starter helps developers to finish the auto-configuration of Storage Queue and provides Spring Integration with Storage Queue. + +[Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][sample] + + ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # "{x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-storage-queue;current}" +```xml + + com.microsoft.azure + spring-cloud-starter-azure-storage-queue + 1.2.8-beta.1 + +``` +[//]: # "{x-version-update-end}" + + +## Key concepts + +Azure Queue Storage is a service for storing large numbers of messages. You access messages from anywhere in the world via authenticated calls using HTTP or HTTPS. A queue message can be up to 64 KB in size. A queue may contain millions of messages, up to the total capacity limit of a storage account. Queues are commonly used to create a backlog of work to process asynchronously. + ## Examples +Please refer to this [sample project][sample] illustrating how to use Spring cloud Starter Storage Queue. + ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + ## Next steps + +The following section provides sample projects illustrating how to use the starter in different cases. +### More sample code +- [Storage Queue Integration Sample][sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-starter-azure-storage-queue +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-starter-azure-storage-queue +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-storage-queue-integration-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ From 51b0378b83adc2ba1c6283e6c2b44543398c1539 Mon Sep 17 00:00:00 2001 From: zhoufenqin Date: Tue, 8 Sep 2020 13:19:35 +0800 Subject: [PATCH 123/168] update version for spring release (#14873) Co-authored-by: unknown --- eng/versioning/version_client.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 958fa887898fb..d481b5a2a6c32 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -94,10 +94,10 @@ com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.3;2.4.0-beta. com.microsoft.azure:azure-cosmosdb-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-data-gremlin-spring-boot-starter;2.3.3;2.4.0-beta.1 com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.3.3;2.4.0-beta.1 +com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.3.4;2.4.0-beta.1 com.microsoft.azure:azure-spring-boot-metrics-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-spring-boot;2.3.3;2.4.0-beta.1 +com.microsoft.azure:azure-spring-boot-starter;2.3.4;2.4.0-beta.1 +com.microsoft.azure:azure-spring-boot;2.3.4;2.4.0-beta.1 com.microsoft.azure:spring-cloud-azure-appconfiguration-config-web;1.2.8-beta.1;1.2.8-beta.1 com.microsoft.azure:spring-cloud-azure-appconfiguration-config;1.2.8-beta.1;1.2.8-beta.1 com.microsoft.azure:spring-cloud-azure-context;1.2.8-beta.1;1.2.8-beta.1 From 16059ae283aac5de75ae677ab772643da8215f91 Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Tue, 8 Sep 2020 15:41:33 +0800 Subject: [PATCH 124/168] Mgmt auth: support list by filter (#14893) * add support list by filter * support list by filter for auth * support filter in impl * fix checkstyle * fix checkstyle --- .../ActiveDirectoryApplicationsImpl.java | 37 ++++++++++--------- .../ActiveDirectoryGroupsImpl.java | 10 +++++ .../ActiveDirectoryUsersImpl.java | 14 ++++++- .../implementation/ServicePrincipalsImpl.java | 34 +++++++++-------- .../models/ActiveDirectoryApplications.java | 2 + .../models/ActiveDirectoryGroups.java | 2 + .../models/ActiveDirectoryUsers.java | 2 + .../models/ServicePrincipals.java | 2 + .../collection/SupportsListingByFilter.java | 33 +++++++++++++++++ 9 files changed, 102 insertions(+), 34 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/collection/SupportsListingByFilter.java diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryApplicationsImpl.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryApplicationsImpl.java index 65bbac0e1e592..70976fb4a8c42 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryApplicationsImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryApplicationsImpl.java @@ -14,6 +14,8 @@ import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; import java.util.UUID; + +import com.azure.resourcemanager.resources.fluentcore.utils.PagedConverter; import reactor.core.publisher.Mono; /** The implementation of Applications and its parent interfaces. */ @@ -31,27 +33,15 @@ public ActiveDirectoryApplicationsImpl( @Override public PagedIterable list() { - return this - .innerCollection - .list(null) - .mapPage( - inner -> { - ActiveDirectoryApplicationImpl application = wrapModel(inner); - return application.refreshCredentialsAsync().block(); - }); + return new PagedIterable<>(listAsync()); } @Override public PagedFlux listAsync() { - return this - .innerCollection - .listAsync(null) - .mapPage( - inner -> { - ActiveDirectoryApplicationImpl application = wrapModel(inner); - application.refreshCredentialsAsync(); - return application; - }); + return PagedConverter.flatMapPage(inner().listAsync(), applicationInner -> { + ActiveDirectoryApplicationImpl application = this.wrapModel(applicationInner); + return application.refreshCredentialsAsync().thenReturn(application); + }); } @Override @@ -126,4 +116,17 @@ public AuthorizationManager manager() { public ApplicationsClient inner() { return this.innerCollection; } + + @Override + public PagedIterable listByFilter(String filter) { + return new PagedIterable<>(listByFilterAsync(filter)); + } + + @Override + public PagedFlux listByFilterAsync(String filter) { + return PagedConverter.flatMapPage(inner().listAsync(filter), applicationInner -> { + ActiveDirectoryApplicationImpl application = this.wrapModel(applicationInner); + return application.refreshCredentialsAsync().thenReturn(application); + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryGroupsImpl.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryGroupsImpl.java index 47e3a21789047..e07cb8f3d33f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryGroupsImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryGroupsImpl.java @@ -94,4 +94,14 @@ public AuthorizationManager manager() { public GroupsClient inner() { return manager().inner().getGroups(); } + + @Override + public PagedIterable listByFilter(String filter) { + return new PagedIterable<>(listByFilterAsync(filter)); + } + + @Override + public PagedFlux listByFilterAsync(String filter) { + return inner().listAsync(filter).mapPage(this::wrapModel); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryUsersImpl.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryUsersImpl.java index ea77ec3226c62..06ec74625016e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryUsersImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryUsersImpl.java @@ -6,11 +6,11 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.authorization.AuthorizationManager; +import com.azure.resourcemanager.authorization.fluent.UsersClient; +import com.azure.resourcemanager.authorization.fluent.inner.UserInner; import com.azure.resourcemanager.authorization.models.ActiveDirectoryUser; import com.azure.resourcemanager.authorization.models.ActiveDirectoryUsers; import com.azure.resourcemanager.authorization.models.GraphErrorException; -import com.azure.resourcemanager.authorization.fluent.inner.UserInner; -import com.azure.resourcemanager.authorization.fluent.UsersClient; import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.CreatableWrappersImpl; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; import reactor.core.publisher.Mono; @@ -115,4 +115,14 @@ public AuthorizationManager manager() { public UsersClient inner() { return manager().inner().getUsers(); } + + @Override + public PagedIterable listByFilter(String filter) { + return new PagedIterable<>(listByFilterAsync(filter)); + } + + @Override + public PagedFlux listByFilterAsync(String filter) { + return inner().listAsync(filter, null).mapPage(this::wrapModel); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsImpl.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsImpl.java index eca51340fc1bc..8e335ceb13c2b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsImpl.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.CreatableWrappersImpl; import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import com.azure.resourcemanager.resources.fluentcore.utils.PagedConverter; import reactor.core.publisher.Mono; /** The implementation of ServicePrincipals and its parent interfaces. */ @@ -30,25 +31,15 @@ public ServicePrincipalsImpl( @Override public PagedIterable list() { - return inner() - .list(null) - .mapPage( - servicePrincipalInner -> { - ServicePrincipalImpl servicePrincipal = wrapModel(servicePrincipalInner); - return servicePrincipal.refreshCredentialsAsync().block(); - }); + return new PagedIterable<>(listAsync()); } @Override public PagedFlux listAsync() { - return inner() - .listAsync(null) - .mapPage( - servicePrincipalInner -> { - ServicePrincipalImpl servicePrincipal = wrapModel(servicePrincipalInner); - servicePrincipal.refreshCredentialsAsync(); - return servicePrincipal; - }); + return PagedConverter.flatMapPage(inner().listAsync(), servicePrincipalInner -> { + ServicePrincipalImpl servicePrincipal = this.wrapModel(servicePrincipalInner); + return servicePrincipal.refreshCredentialsAsync().thenReturn(servicePrincipal); + }); } @Override @@ -113,4 +104,17 @@ public AuthorizationManager manager() { public ServicePrincipalsClient inner() { return manager().inner().getServicePrincipals(); } + + @Override + public PagedIterable listByFilter(String filter) { + return new PagedIterable<>(listByFilterAsync(filter)); + } + + @Override + public PagedFlux listByFilterAsync(String filter) { + return PagedConverter.flatMapPage(inner().listAsync(filter), servicePrincipalInner -> { + ServicePrincipalImpl servicePrincipal = this.wrapModel(servicePrincipalInner); + return servicePrincipal.refreshCredentialsAsync().thenReturn(servicePrincipal); + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryApplications.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryApplications.java index fb2d3d55faa65..ab83988635229 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryApplications.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryApplications.java @@ -13,12 +13,14 @@ import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListingByFilter; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; /** Entry point to application management API. */ @Fluent public interface ActiveDirectoryApplications extends SupportsListing, + SupportsListingByFilter, SupportsGettingById, SupportsGettingByName, SupportsCreating, diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryGroups.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryGroups.java index 269d06e3552f9..684abfe78d506 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryGroups.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryGroups.java @@ -12,12 +12,14 @@ import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListingByFilter; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; /** Entry point to AD group management API. */ @Fluent public interface ActiveDirectoryGroups extends SupportsListing, + SupportsListingByFilter, SupportsGettingById, SupportsGettingByName, SupportsCreating, diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryUsers.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryUsers.java index 78e202916c9dd..fa28a5b8bee3f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryUsers.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ActiveDirectoryUsers.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListingByFilter; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; /** Entry point to AD user management API. */ @@ -20,6 +21,7 @@ public interface ActiveDirectoryUsers extends SupportsGettingById, SupportsGettingByName, SupportsListing, + SupportsListingByFilter, SupportsCreating, SupportsDeletingById, HasManager, diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ServicePrincipals.java b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ServicePrincipals.java index 35e33ae53583f..0601533b1fb9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ServicePrincipals.java +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/ServicePrincipals.java @@ -12,12 +12,14 @@ import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListingByFilter; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; /** Entry point to service principal management API. */ @Fluent public interface ServicePrincipals extends SupportsListing, + SupportsListingByFilter, SupportsGettingById, SupportsGettingByName, SupportsCreating, diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/collection/SupportsListingByFilter.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/collection/SupportsListingByFilter.java new file mode 100644 index 0000000000000..4b8921c75c8d1 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/collection/SupportsListingByFilter.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.resources.fluentcore.collection; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; + +/** + * Provides access to listing Azure resources of a specific type filtered based on OData syntax. + * http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752358 + *

    + * (Note: this interface is not intended to be implemented by user code) + * + * @param the fluent type of the resource + */ +public interface SupportsListingByFilter { + /** + * Lists all the resources of the specified type with specific filter. + * + * @param filter the filter based on OData syntax + * @return a {@link PagedIterable} of resources + */ + PagedIterable listByFilter(String filter); + + /** + * Lists all the resources of the specified type with specific filter. + * + * @param filter the filter based on OData syntax + * @return a representation of the deferred computation of this call, returning the requested resources + */ + PagedFlux listByFilterAsync(String filter); +} From 2e87a35ee27f3023e23b561d246ac75b07958e23 Mon Sep 17 00:00:00 2001 From: Xiaolu Dai <31124698+saragluna@users.noreply.github.com> Date: Tue, 8 Sep 2020 16:42:08 +0800 Subject: [PATCH 125/168] Complete / enrich readme files for Spring Cloud integration with Service Bus (#14780) * add readme file for spring integration service bus * add readme for spring cloud starter azure service bus * add readme file for spring cloud stream binder service bus core * add readme file for service bus binder for queue * add readme file for spring cloud stream binder for service bus topic * address comments * fix sample reference links Co-authored-by: Xiaolu Dai --- .../README.md | 121 +++++++++++------ .../README.md | 125 ++++++++---------- .../README.md | 122 +++++++++++------ .../README.md | 67 +++++++++- .../README.md | 69 +++++++++- 5 files changed, 348 insertions(+), 156 deletions(-) diff --git a/sdk/spring/azure-spring-cloud-servicebus-queue-stream-binder/README.md b/sdk/spring/azure-spring-cloud-servicebus-queue-stream-binder/README.md index 936312705629a..afc9aab297ab6 100644 --- a/sdk/spring/azure-spring-cloud-servicebus-queue-stream-binder/README.md +++ b/sdk/spring/azure-spring-cloud-servicebus-queue-stream-binder/README.md @@ -1,60 +1,49 @@ -# Spring Cloud Azure Service Bus Queue Stream Binder client library for Java +# Azure Service Bus Queue Spring Cloud Stream Binder client library for Java The project provides **Spring Cloud Stream Binder for Azure Service Bus Queue** which allows you to build message-driven -microservice using **Spring Cloud Stream** based on [Azure Service Bus Queue](https://azure.microsoft.com/en-us/services/service-bus/) service. +microservice using **Spring Cloud Stream** based on [Azure Service Bus Queue][azure_service_bus]. -## Key concepts +[Source code][src_code] | [Package (Maven)][package] | [API reference documentation][refdocs] | [Product documentation][docs] | [Samples][sample] + +## Getting started -### Service Bus Queue Binder Overview +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-azure-servicebus-queue-stream-binder;current}) +```xml + + com.microsoft.azure + spring-cloud-azure-servicebus-queue-stream-binder + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) + +## Key concepts The Spring Cloud Stream Binder for Azure Service Bus Queue provides the binding implementation for the Spring Cloud Stream. -This implementation uses Spring Integration Service Bus Queue Channel Adapters at its foundation. -#### Scheduled Message +This implementation uses [Spring Integration][spring_integration] Service Bus Queue Channel Adapters at its foundation. +### Scheduled Message This binder supports submitting messages to a queue for delayed processing. Users can send scheduled messages with header `x-delay` expressing in milliseconds a delay time for the message. The message will be delivered to the respective queues after `x-delay` milliseconds. -#### Consumer Group +### Consumer Group This binder has no consumer group support since all consumers share one queue. -#### Partitioning Support - +### Partitioning Support This binder has no partition support even service bus queue supports partition. -## Getting started - -## Examples - -Please use this `sample` as a reference for how to use this binder in your projects. - -### Feature List - -- [Dependency Management](#dependency-management) -- [Configuration Options](#configuration-options) - -#### Dependency Management - -**Maven Coordinates** -``` - - com.microsoft.azure - spring-cloud-azure-servicebus-queue-stream-binder - - -``` -**Gradle Coordinates** -``` -dependencies { - compile group: 'com.microsoft.azure', name: 'spring-cloud-azure-servicebus-queue-stream-binder' -} -``` - -#### Configuration Options +### Configuration Options -The binder provides the following configuration options in `application.properties`. +The binder provides the following configuration options: -##### Spring Cloud Azure Properties ##### +##### Spring Cloud Azure Properties Name | Description | Required | Default ---|---|---|--- @@ -63,7 +52,7 @@ spring.cloud.azure.resource-group | Name of Azure resource group | Yes | spring.cloud.azure.region | Region name of the Azure resource group, e.g. westus | Yes | spring.cloud.azure.servicebus.namespace | Service Bus Namespace. Auto creating if missing | Yes | -##### Serivce Bus Queue Producer Properties ##### +##### Serivce Bus Queue Producer Properties It supports the following configurations with the format of `spring.cloud.stream.servicebus.queue.bindings..producer`. @@ -80,7 +69,7 @@ Effective only if `sync` is set to true. The amount of time to wait for a respon Default: `10000` -##### Service Bus Queue Consumer Properties ##### +##### Service Bus Queue Consumer Properties It supports the following configurations with the format of `spring.cloud.stream.servicebus.queue.bindings..consumer`. @@ -112,6 +101,54 @@ Controls if is a session aware consumer. Set it to `true` if is a queue with ses Default: `false` +## Examples + +Please use this `sample` as a reference for how to use this binder in your projects. +- [Service Bus Queue][spring_cloud_stream_binder_service_bus_queue] + ## Troubleshooting + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using +`logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. +The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +``` +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][spring_boot_logging]. + ## Next steps +The following section provides sample projects illustrating how to use the starter in different cases. + +### More sample code +- [Service Bus Topic][spring_cloud_stream_binder_service_bus_topic] +- [Service Bus Multiple Binders][spring_cloud_stream_binder_service_bus_multiple_binders] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[azure_service_bus]: https://azure.microsoft.com/services/service-bus/ +[azure_subscription]: https://azure.microsoft.com/free +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-with-service-bus +[maven]: http://maven.apache.org +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-azure-servicebus-queue-stream-binder +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-azure-servicebus-queue-stream-binder +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-binder-sample +[spring_boot_logging]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[service_bus_queue_binder]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-queue-stream-binder +[service_bus_topic_binder]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-topic-stream-binder +[spring_cloud_stream_binder_service_bus_multiple_binders]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample +[spring_cloud_stream_binder_service_bus_queue]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-binder-sample +[spring_cloud_stream_binder_service_bus_topic]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-topic-binder-sample +[spring_integration]: https://spring.io/projects/spring-integration +[src_code]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-queue-stream-binder \ No newline at end of file diff --git a/sdk/spring/azure-spring-cloud-servicebus-stream-binder-core/README.md b/sdk/spring/azure-spring-cloud-servicebus-stream-binder-core/README.md index 5aedc3a87ebc3..2dee2715c7b34 100644 --- a/sdk/spring/azure-spring-cloud-servicebus-stream-binder-core/README.md +++ b/sdk/spring/azure-spring-cloud-servicebus-stream-binder-core/README.md @@ -1,93 +1,82 @@ -# Azure Spring Cloud Service Bus Queue Stream Binder client library for Java +# Azure Service Bus Spring Cloud Stream Binder core client library for Java -The project provides **Spring Cloud Stream Binder for Azure Service Bus Queue** which allows you to build message-driven -microservice using **Spring Cloud Stream** based on [Azure Service Bus Queue](https://azure.microsoft.com/en-us/services/service-bus/) service. +The project provides core functionality of **Spring Cloud Stream Binder for Azure Service Bus** which allows you to build message-driven +microservice using **Spring Cloud Stream** based on [Azure Service Bus][azure_service_bus]. -## Key concepts - -### Service Bus Queue Binder Overview - -The Spring Cloud Stream Binder for Azure Service Bus Queue provides the binding implementation for the Spring Cloud Stream. -This implementation uses Spring Integration Service Bus Queue Channel Adapters at its foundation. - -#### Consumer Group - -This binder has no consumer group support since all consumers share one queue. - -#### Partitioning Support - -This binder has no partition support even service bus queue supports partition. +[Source code][src_code] | [Package (Maven)][package] | [API reference documentation][refdocs] | [Product documentation][docs] ## Getting started -## Examples - -Please use this `sample` as a reference for how to use this binder in your projects. - -### Feature List - -- [Dependency Management](#dependency-management) -- [Configuration Options](#configuration-options) +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above -#### Dependency Management - -**Maven Coordinates** -``` +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-azure-servicebus-stream-binder-core;current}) +```xml com.microsoft.azure - spring-cloud-azure-servicebus-queue-stream-binder + spring-cloud-azure-servicebus-stream-binder-core + 1.2.8-beta.1 - ``` -**Gradle Coordinates** -``` -dependencies { - compile group: 'com.microsoft.azure', name: 'spring-cloud-azure-servicebus-queue-stream-binder' -} -``` - -#### Configuration Options - -The binder provides the following configuration options in `application.properties`. +[//]: # ({x-version-update-end}) -##### Spring Cloud Azure Properties #### -Name | Description | Required | Default ----|---|---|--- -spring.cloud.azure.credential-file-path | Location of azure credential file | Yes | -spring.cloud.azure.resource-group | Name of Azure resource group | Yes | -spring.cloud.azure.region | Region name of the Azure resource group, e.g. westus | Yes | -spring.cloud.azure.servicebus.namespace | Service Bus Namespace. Auto creating if missing | Yes | - -##### Serivce Bus Queue Producer Properties ##### +## Key concepts +The Spring Cloud Stream Binder for Azure Service Bus provides the binding implementation for the Spring Cloud Stream. -It supports the following configurations with the format of `spring.cloud.stream.servicebus.queue.bindings..producer`. +This implementation uses [Spring Integration][spring_integration] Service Bus Channel Adapters at its foundation. -**_sync_** +Please refer to [Service Bus Queue Binder][service_bus_queue_binder] and [Service Bus Topic Binder][service_bus_topic_binder] for more details. -Whether the producer should act in a synchronous manner with respect to writing records into a stream. If true, the -producer will wait for a response after a send operation. +## Examples -Default: `false` -**_sendTimeout_** +## Troubleshooting -Effective only if `sync` is set to true. The amount of time to wait for a response after a send operation, in milliseconds. +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using +`logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. +The root logger can be configured by using logging.level.root. -Default: `10000` - -##### Service Bus Queue Consumer Properties ##### +The following example shows potential logging settings in `application.properties`: -It supports the following configurations with the format of `spring.cloud.stream.servicebus.queue.bindings..consumer`. +``` +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` -**_checkpointMode_** +For more information about setting logging in spring, please refer to the [official doc][spring_boot_logging]. -The mode in which checkpoints are updated. -If `RECORD`, checkpoints occur after each record is received by Spring Channel. -If `MANUAL`, checkpoints occur on demand by the user via the `Checkpointer`. You can get `Checkpointer` by `Message.getHeaders.get(AzureHeaders.CHECKPOINTER)`callback. +## Next steps +The following section provides sample projects illustrating how to use the starter in different cases. -Default: `RECORD` +### More sample code +- [Service Bus Queue][spring_cloud_stream_binder_service_bus_queue] +- [Service Bus Topic][spring_cloud_stream_binder_service_bus_topic] +- [Service Bus Multiple Binders][spring_cloud_stream_binder_service_bus_multiple_binders] -## Troubleshooting -## Next steps ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[azure_service_bus]: https://azure.microsoft.com/services/service-bus/ +[azure_subscription]: https://azure.microsoft.com/free +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-with-service-bus +[maven]: http://maven.apache.org +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-azure-servicebus-stream-binder-core +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-azure-servicebus-stream-binder-core +[spring_boot_logging]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[service_bus_queue_binder]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-queue-stream-binder +[service_bus_topic_binder]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-topic-stream-binder +[spring_cloud_stream_binder_service_bus_multiple_binders]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample +[spring_cloud_stream_binder_service_bus_queue]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-binder-sample +[spring_cloud_stream_binder_service_bus_topic]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-topic-binder-sample +[spring_integration]: https://spring.io/projects/spring-integration +[src_code]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-stream-binder-core diff --git a/sdk/spring/azure-spring-cloud-servicebus-topic-stream-binder/README.md b/sdk/spring/azure-spring-cloud-servicebus-topic-stream-binder/README.md index b21233f78e6a2..b2b85c4e18c64 100644 --- a/sdk/spring/azure-spring-cloud-servicebus-topic-stream-binder/README.md +++ b/sdk/spring/azure-spring-cloud-servicebus-topic-stream-binder/README.md @@ -1,63 +1,52 @@ -# Spring Cloud Azure Service Bus Topic Stream Binder client library for Java +# Azure Service Bus Topic Spring Cloud Stream Binder client library for Java The project provides **Spring Cloud Stream Binder for Azure Service Bus Topic** which allows you to build message-driven -microservice using **Spring Cloud Stream** based on [Azure Service Bus Topic](https://azure.microsoft.com/en-us/services/service-bus/) service. +microservice using **Spring Cloud Stream** based on [Azure Service Bus Topic][azure_service_bus]. -## Key concepts +[Source code][src_code] | [Package (Maven)][package] | [API reference documentation][refdocs] | [Product documentation][docs] | [Samples][sample] + +## Getting started + +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-azure-servicebus-topic-stream-binder;current}) +```xml + + com.microsoft.azure + spring-cloud-azure-servicebus-topic-stream-binder + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) -### Service Bus Topic Binder Overview +## Key concepts The Spring Cloud Stream Binder for Azure Service Bus Topic provides the binding implementation for the Spring Cloud Stream. -This implementation uses Spring Integration Service Bus Topic Channel Adapters at its foundation. -#### Scheduled Message +This implementation uses [Spring Integration][spring_integration] Service Bus Topic Channel Adapters at its foundation. +### Scheduled Message This binder supports submitting messages to a topic for delayed processing. Users can send scheduled messages with header `x-delay` expressing in milliseconds a delay time for the message. The message will be delivered to the respective topics after `x-delay` milliseconds. -#### Consumer Group +### Consumer Group Service Bus Topic provides similar support of consumer group as Apache Kafka, but with slight different logic. This binder rely on `Subscription` of a topic to act as a consumer group. -#### Partitioning Support - -## Getting started +### Partitioning Support This binder implementation has no partition support even service bus topic supports partition. -## Examples - -Please use this `sample` as a reference -for how to use this binder in your projects. - -### Feature List +### Configuration Options -- [Dependency Management](#dependency-management) -- [Configuration Options](#configuration-options) +The binder provides the following configuration options: -#### Dependency Management - -**Maven Coordinates** -``` - - com.microsoft.azure - spring-cloud-azure-servicebus-topic-stream-binder - - -``` -**Gradle Coordinates** -``` -dependencies { - compile group: 'com.microsoft.azure', name: 'spring-cloud-azure-servicebus-topic-stream-binder' -} -``` - -#### Configuration Options - -The binder provides the following configuration options in `application.properties`. - -##### Spring Cloud Azure Properties ##### +##### Spring Cloud Azure Properties Name | Description | Required | Default ---|---|---|--- @@ -66,7 +55,7 @@ spring.cloud.azure.resource-group | Name of Azure resource group | Yes | spring.cloud.azure.region | Region name of the Azure resource group, e.g. westus | Yes | spring.cloud.azure.servicebus.namespace | Service Bus Namespace. Auto creating if missing | Yes | -##### Serivce Bus Topic Producer Properties ##### +##### Serivce Bus Topic Producer Properties It supports the following configurations with the format of `spring.cloud.stream.servicebus.topic.bindings..producer`. @@ -83,7 +72,7 @@ Effective only if `sync` is set to true. The amount of time to wait for a respon Default: `10000` -##### Service Bus Topic Consumer Properties ##### +##### Service Bus Topic Consumer Properties It supports the following configurations with the format of `spring.cloud.stream.servicebus.topic.bindings..consumer`. @@ -115,6 +104,55 @@ Controls if is a session aware consumer. Set it to `true` if is a topic with ses Default: `false` +## Examples + +Please use this `sample` as a reference +for how to use this binder in your projects. +- [Service Bus Topic][spring_cloud_stream_binder_service_bus_topic] + ## Troubleshooting + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using +`logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. +The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +``` +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][spring_boot_logging]. + ## Next steps +The following section provides sample projects illustrating how to use the starter in different cases. + +### More sample code +- [Service Bus Queue][spring_cloud_stream_binder_service_bus_queue] +- [Service Bus Multiple Binders][spring_cloud_stream_binder_service_bus_multiple_binders] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[azure_service_bus]: https://azure.microsoft.com/services/service-bus/ +[azure_subscription]: https://azure.microsoft.com/free +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-with-service-bus +[maven]: http://maven.apache.org +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-azure-servicebus-topic-stream-binder +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-azure-servicebus-topic-stream-binder +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-topic-binder-sample +[spring_boot_logging]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[service_bus_queue_binder]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-queue-stream-binder +[service_bus_topic_binder]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-topic-stream-binder +[spring_cloud_stream_binder_service_bus_multiple_binders]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-multibinders-sample +[spring_cloud_stream_binder_service_bus_queue]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-queue-binder-sample +[spring_cloud_stream_binder_service_bus_topic]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-topic-binder-sample +[spring_integration]: https://spring.io/projects/spring-integration +[src_code]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-servicebus-topic-stream-binder \ No newline at end of file diff --git a/sdk/spring/azure-spring-cloud-starter-servicebus/README.md b/sdk/spring/azure-spring-cloud-starter-servicebus/README.md index fe156dc85ca47..272b375b8c55b 100644 --- a/sdk/spring/azure-spring-cloud-starter-servicebus/README.md +++ b/sdk/spring/azure-spring-cloud-starter-servicebus/README.md @@ -1,8 +1,71 @@ -# Azure Spring cloud Starter Service Bus client library for Java +# Azure Service Bus Spring Cloud starter client library for Java + +The Spring Cloud Service Bus starter helps developers to finish the auto-configuration of Service Bus and provides Spring Integration with Service Bus. + +[Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][sample] -## Key concepts ## Getting started + +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-servicebus;current}) +```xml + + com.microsoft.azure + spring-cloud-starter-azure-servicebus + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) + + +## Key concepts +[Spring Integration][spring_integration] enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters. + +This project provides Spring Integration adaption with Azure Service Bus and the ability to auto-configure connection to Azure Service Bus. + ## Examples + + ## Troubleshooting +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using +`logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. +The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +``` +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][spring_boot_logging]. + ## Next steps +The following section provides sample projects illustrating how to use the starter in different cases. + +### More sample code +- [Spring Integration with Service Bus Sample][spring_cloud_starter_sample_with_service_bus] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[azure_subscription]: https://azure.microsoft.com/free +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-starter-azure-servicebus +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-starter-azure-servicebus +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-integration-sample +[spring_boot_logging]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[spring_integration]: https://spring.io/projects/spring-integration +[spring_cloud_starter_sample_with_service_bus]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-integration-sample + diff --git a/sdk/spring/azure-spring-integration-servicebus/README.md b/sdk/spring/azure-spring-integration-servicebus/README.md index 1f2819c88cf3e..dd4bfa6cef7e7 100644 --- a/sdk/spring/azure-spring-integration-servicebus/README.md +++ b/sdk/spring/azure-spring-integration-servicebus/README.md @@ -1,9 +1,74 @@ -# Azure Spring Integration service bus client library for Java +# Azure Service Bus Spring Integration client library for Java + +The Spring Integration for Azure Service Bus extension project provides inbound and outbound channel adapters for Azure Service Bus. +Microsoft Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. +Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. + +[Source code][src_code] | [Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][sample] -## Key concepts ## Getting started + +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-integration-servicebus;current}) +```xml + + com.microsoft.azure + spring-integration-servicebus + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) + + ## Key concepts +[Spring Integration][spring_integration] enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters. + +This project provides inbound and outbound channel adapters for Azure Service Bus. + ## Examples + + ## Troubleshooting +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using +`logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. +The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +``` +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][spring_boot_logging]. + ## Next steps +The following section provides sample projects illustrating how to use the starter in different cases. + +### More sample code +- [Spring Integration with Service Bus Sample][spring_integration_sample_with_service_bus] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[azure_subscription]: https://azure.microsoft.com/free +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-integration-servicebus +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-integration-servicebus +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-integration-sample +[spring_boot_logging]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[spring_integration]: https://spring.io/projects/spring-integration +[spring_integration_sample_with_service_bus]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-integration-sample +[src_code]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-integration-servicebus + From 9f0ec7c98071c73eba0f1c59da06e8b65662ceea Mon Sep 17 00:00:00 2001 From: Jack Lu Date: Tue, 8 Sep 2020 17:30:49 +0800 Subject: [PATCH 126/168] Move the azure-spring-cloud-starter-appconfiguration-config module from sdk/spring to sdk/appconfiguration (#14894) * Move the azure-spring-cloud-starter-appconfiguration-config module from sdk/spring to sdk/appconfiguration * Move the azure-spring-cloud-starter-appconfiguration-config module from sdk/spring to sdk/appconfiguration * Fix links * modify ci.yml --- .../CHANGELOG.md | 0 .../README.md | 0 .../pom.xml | 0 .../src/main/resources/META-INF/spring.provides | 0 sdk/appconfiguration/ci.yml | 3 +++ sdk/appconfiguration/pom.xml | 1 + .../azure-spring-cloud-appconfiguration-sample/README.md | 4 ++-- .../azure-spring-cloud-feature-management-sample/README.md | 2 +- .../README.md | 2 +- sdk/spring/ci.yml | 3 --- sdk/spring/pom.xml | 1 - 11 files changed, 8 insertions(+), 8 deletions(-) rename sdk/{spring => appconfiguration}/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md (100%) rename sdk/{spring => appconfiguration}/azure-spring-cloud-starter-appconfiguration-config/README.md (100%) rename sdk/{spring => appconfiguration}/azure-spring-cloud-starter-appconfiguration-config/pom.xml (100%) rename sdk/{spring => appconfiguration}/azure-spring-cloud-starter-appconfiguration-config/src/main/resources/META-INF/spring.provides (100%) diff --git a/sdk/spring/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md similarity index 100% rename from sdk/spring/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md rename to sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md diff --git a/sdk/spring/azure-spring-cloud-starter-appconfiguration-config/README.md b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md similarity index 100% rename from sdk/spring/azure-spring-cloud-starter-appconfiguration-config/README.md rename to sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md diff --git a/sdk/spring/azure-spring-cloud-starter-appconfiguration-config/pom.xml b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/pom.xml similarity index 100% rename from sdk/spring/azure-spring-cloud-starter-appconfiguration-config/pom.xml rename to sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/pom.xml diff --git a/sdk/spring/azure-spring-cloud-starter-appconfiguration-config/src/main/resources/META-INF/spring.provides b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/src/main/resources/META-INF/spring.provides similarity index 100% rename from sdk/spring/azure-spring-cloud-starter-appconfiguration-config/src/main/resources/META-INF/spring.provides rename to sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/src/main/resources/META-INF/spring.provides diff --git a/sdk/appconfiguration/ci.yml b/sdk/appconfiguration/ci.yml index 6babaf5efe99b..3a810d215d757 100644 --- a/sdk/appconfiguration/ci.yml +++ b/sdk/appconfiguration/ci.yml @@ -48,3 +48,6 @@ extends: - name: spring-cloud-azure-feature-management-web groupId: com.microsoft.azure safeName: springcloudazurefeaturemanagementweb + - name: spring-cloud-starter-azure-appconfiguration-config + groupId: com.microsoft.azure + safeName: springcloudstarterazureappconfigurationconfig diff --git a/sdk/appconfiguration/pom.xml b/sdk/appconfiguration/pom.xml index e934de8dd736a..44bb23e5553ae 100644 --- a/sdk/appconfiguration/pom.xml +++ b/sdk/appconfiguration/pom.xml @@ -14,5 +14,6 @@ azure-spring-cloud-appconfiguration-config-web azure-spring-cloud-feature-management azure-spring-cloud-feature-management-web + azure-spring-cloud-starter-appconfiguration-config diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample/README.md b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample/README.md index 1a7bfd1bda486..9cf23c0c8d25c 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample/README.md +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample/README.md @@ -1,6 +1,6 @@ # Spring Cloud Azure Config Sample client library for Java -This sample describes how to use [spring-cloud-starter-azure-appconfiguration-config](../../azure-spring-cloud-starter-appconfiguration-config/) to load configuration properties from Azure Configuration Service to Spring Environment. +This sample describes how to use [spring-cloud-starter-azure-appconfiguration-config](../../../appconfiguration/azure-spring-cloud-starter-appconfiguration-config/) to load configuration properties from Azure Configuration Service to Spring Environment. ## Key concepts ## Getting started @@ -51,7 +51,7 @@ mvn -Dspring.application.name=foo -Dspring.profiles.active=dev spring-boot:run ### More details -Please refer to this [README](../../azure-spring-cloud-starter-appconfiguration-config/) about more usage details. +Please refer to this [README](../../../appconfiguration/azure-spring-cloud-starter-appconfiguration-config/) about more usage details. ## Examples ## Troubleshooting diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-sample/README.md b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-sample/README.md index 98917788422a4..2aa711a93b4f8 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-sample/README.md +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-sample/README.md @@ -58,7 +58,7 @@ $ mvn -Dspring.application.name=foo -Dspring.profiles.active=dev spring-boot:run ### More details -Please refer to this [README](../../azure-spring-cloud-starter-appconfiguration-config/) about more usage details. +Please refer to this [README](../../../appconfiguration/azure-spring-cloud-starter-appconfiguration-config/) about more usage details. ## Examples ## Troubleshooting diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-web-sample/README.md b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-web-sample/README.md index a09f84702159c..2cb344d0cff97 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-web-sample/README.md +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-web-sample/README.md @@ -63,7 +63,7 @@ $ mvn -Dspring.application.name=foo -Dspring.profiles.active=dev spring-boot:run ### More details -Please refer to this [README](../../azure-spring-cloud-starter-appconfiguration-config/) about more usage details. +Please refer to this [README](../../../appconfiguration/azure-spring-cloud-starter-appconfiguration-config/) about more usage details. ## Examples ## Troubleshooting diff --git a/sdk/spring/ci.yml b/sdk/spring/ci.yml index 1d5edd75f02ba..0a28df78f3152 100644 --- a/sdk/spring/ci.yml +++ b/sdk/spring/ci.yml @@ -87,9 +87,6 @@ extends: - name: spring-cloud-azure-messaging groupId: com.microsoft.azure safeName: springcloudazuremessaging - - name: spring-cloud-starter-azure-appconfiguration-config - groupId: com.microsoft.azure - safeName: springcloudstarterazureappconfigurationconfig - name: spring-starter-azure-cache groupId: com.microsoft.azure safeName: springstarterazurecache diff --git a/sdk/spring/pom.xml b/sdk/spring/pom.xml index cb812169cc9ab..28bebe38efd18 100644 --- a/sdk/spring/pom.xml +++ b/sdk/spring/pom.xml @@ -72,7 +72,6 @@ azure-spring-integration-storage-queue azure-spring-integration-test azure-spring-cloud-messaging - azure-spring-cloud-starter-appconfiguration-config azure-spring-cloud-starter-cache azure-spring-cloud-starter-eventhubs azure-spring-cloud-starter-eventhubs-kafka From 5fd43cda914f80091d7a9703ae596dd19a65a5e2 Mon Sep 17 00:00:00 2001 From: Jack Lu Date: Tue, 8 Sep 2020 20:30:11 +0800 Subject: [PATCH 127/168] Fix relative link to absolute link (#14901) --- .../azure-spring-cloud-appconfiguration-sample/README.md | 4 ++-- .../azure-spring-cloud-feature-management-sample/README.md | 2 +- .../README.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample/README.md b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample/README.md index 9cf23c0c8d25c..b466804c92853 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample/README.md +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample/README.md @@ -1,6 +1,6 @@ # Spring Cloud Azure Config Sample client library for Java -This sample describes how to use [spring-cloud-starter-azure-appconfiguration-config](../../../appconfiguration/azure-spring-cloud-starter-appconfiguration-config/) to load configuration properties from Azure Configuration Service to Spring Environment. +This sample describes how to use [spring-cloud-starter-azure-appconfiguration-config](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config) to load configuration properties from Azure Configuration Service to Spring Environment. ## Key concepts ## Getting started @@ -51,7 +51,7 @@ mvn -Dspring.application.name=foo -Dspring.profiles.active=dev spring-boot:run ### More details -Please refer to this [README](../../../appconfiguration/azure-spring-cloud-starter-appconfiguration-config/) about more usage details. +Please refer to this [README](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md) about more usage details. ## Examples ## Troubleshooting diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-sample/README.md b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-sample/README.md index 2aa711a93b4f8..65bb4594c59e1 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-sample/README.md +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-sample/README.md @@ -58,7 +58,7 @@ $ mvn -Dspring.application.name=foo -Dspring.profiles.active=dev spring-boot:run ### More details -Please refer to this [README](../../../appconfiguration/azure-spring-cloud-starter-appconfiguration-config/) about more usage details. +Please refer to this [README](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md) about more usage details. ## Examples ## Troubleshooting diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-web-sample/README.md b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-web-sample/README.md index 2cb344d0cff97..d5f1c30df2b1a 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-web-sample/README.md +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-feature-management-web-sample/README.md @@ -63,7 +63,7 @@ $ mvn -Dspring.application.name=foo -Dspring.profiles.active=dev spring-boot:run ### More details -Please refer to this [README](../../../appconfiguration/azure-spring-cloud-starter-appconfiguration-config/) about more usage details. +Please refer to this [README](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md) about more usage details. ## Examples ## Troubleshooting From 047180629e2c0f42b3b8d7dcea9d750a79fe3eef Mon Sep 17 00:00:00 2001 From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com> Date: Tue, 8 Sep 2020 09:17:47 -0700 Subject: [PATCH 128/168] Added tests for error case of query (#14788) --- .../blob/specialized/BlobBaseAPITest.groovy | 17 +++ .../BlobBaseAPITestqueryerror.json | 137 ++++++++++++++++++ .../storage/file/datalake/FileAPITest.groovy | 17 +++ .../FileAPITestqueryerror.json | 132 +++++++++++++++++ 4 files changed, 303 insertions(+) create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestqueryerror.json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestqueryerror.json diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy index dc50430530c55..c7cdb2143b4ae 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy @@ -594,6 +594,23 @@ class BlobBaseAPITest extends APISpec { false | true || _ } + def "Query error"() { + setup: + bc = cc.getBlobClient(generateBlobName()) + + when: + bc.openQueryInputStream("SELECT * from BlobStorage") /* Don't need to call read. */ + + then: + thrown(BlobStorageException) + + when: + bc.query(new ByteArrayOutputStream(), "SELECT * from BlobStorage") + + then: + thrown(BlobStorageException) + } + @Unroll def "Query AC"() { setup: diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestqueryerror.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestqueryerror.json new file mode 100644 index 0000000000000..21636a73056cd --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestqueryerror.json @@ -0,0 +1,137 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcqueryerror0blobbaseapitestqueryerror269087320a47c23e?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c4caf43-c4a8-4a91-bc60-5589f59eca44" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D850406D498931", + "Last-Modified" : "Thu, 03 Sep 2020 19:34:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "094521b5-b01e-0040-3b29-8254cc000000", + "Date" : "Thu, 03 Sep 2020 19:34:50 GMT", + "x-ms-client-request-id" : "2c4caf43-c4a8-4a91-bc60-5589f59eca44" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcqueryerror0blobbaseapitestqueryerror269087320a47c23e/javablobqueryerror1blobbaseapitestqueryerror26926881d5842", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae5493b7-d5d0-4a21-bbd7-766fe3bc7b86", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "AAAAAAAAAAA=", + "Last-Modified" : "Thu, 03 Sep 2020 19:34:51 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 03 Sep 2020 19:34:50 GMT", + "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==", + "ETag" : "0x8D850406D7F5FAD", + "Content-Length" : "0", + "x-ms-request-id" : "09452275-b01e-0040-6129-8254cc000000", + "x-ms-client-request-id" : "ae5493b7-d5d0-4a21-bbd7-766fe3bc7b86" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcqueryerror0blobbaseapitestqueryerror269087320a47c23e/javablobqueryerror2blobbaseapitestqueryerror269148364ac38?comp=query", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "783b394d-659b-4ec5-ac87-0d2b6b68369b", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "BlobNotFound", + "retry-after" : "0", + "Content-Length" : "216", + "StatusCode" : "404", + "x-ms-request-id" : "094522b5-b01e-0040-1829-8254cc000000", + "Body" : "\nBlobNotFoundThe specified blob does not exist.\nRequestId:094522b5-b01e-0040-1829-8254cc000000\nTime:2020-09-03T19:34:54.6582500Z", + "Date" : "Thu, 03 Sep 2020 19:34:53 GMT", + "x-ms-client-request-id" : "783b394d-659b-4ec5-ac87-0d2b6b68369b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcqueryerror0blobbaseapitestqueryerror269087320a47c23e/javablobqueryerror2blobbaseapitestqueryerror269148364ac38?comp=query", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b852f6d6-e4dd-41a2-bc52-a95a688dedc9", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "BlobNotFound", + "retry-after" : "0", + "Content-Length" : "216", + "StatusCode" : "404", + "x-ms-request-id" : "09452817-b01e-0040-6b29-8254cc000000", + "Body" : "\nBlobNotFoundThe specified blob does not exist.\nRequestId:09452817-b01e-0040-6b29-8254cc000000\nTime:2020-09-03T19:34:54.7643247Z", + "Date" : "Thu, 03 Sep 2020 19:34:53 GMT", + "x-ms-client-request-id" : "b852f6d6-e4dd-41a2-bc52-a95a688dedc9", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcqueryerror&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f033ed25-59f0-4962-b55c-37548bb983b6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Vary" : "Origin", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "09452856-b01e-0040-2329-8254cc000000", + "Body" : "jtcqueryerrorjtcqueryerror0blobbaseapitestqueryerror269087320a47c23eThu, 03 Sep 2020 19:34:51 GMT\"0x8D850406D498931\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 03 Sep 2020 19:34:54 GMT", + "x-ms-client-request-id" : "f033ed25-59f0-4962-b55c-37548bb983b6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcqueryerror0blobbaseapitestqueryerror269087320a47c23e?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47d4ea53-c0d1-43ea-9a00-21856fa5a770" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "09452892-b01e-0040-5e29-8254cc000000", + "Date" : "Thu, 03 Sep 2020 19:34:54 GMT", + "x-ms-client-request-id" : "47d4ea53-c0d1-43ea-9a00-21856fa5a770" + }, + "Exception" : null + } ], + "variables" : [ "jtcqueryerror0blobbaseapitestqueryerror269087320a47c23e", "javablobqueryerror1blobbaseapitestqueryerror26926881d5842", "javablobqueryerror2blobbaseapitestqueryerror269148364ac38" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy index 52dfa29839289..cf6905053832e 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy @@ -3291,6 +3291,23 @@ class FileAPITest extends APISpec { false | true || _ } + def "Query error"() { + setup: + fc = fsc.getFileClient(generatePathName()) + + when: + fc.openQueryInputStream("SELECT * from BlobStorage") /* Don't need to call read. */ + + then: + thrown(DataLakeStorageException) + + when: + fc.query(new ByteArrayOutputStream(), "SELECT * from BlobStorage") + + then: + thrown(DataLakeStorageException) + } + @Unroll def "Query AC"() { setup: diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestqueryerror.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestqueryerror.json new file mode 100644 index 0000000000000..f0e14cb6f6170 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestqueryerror.json @@ -0,0 +1,132 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsqueryerror0fileapitestqueryerror0ef90156a6885ca61?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "214d41e1-3185-40a0-aea4-3d8769b1c394" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D85040C37A1A60", + "Last-Modified" : "Thu, 03 Sep 2020 19:37:16 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d817ae3e-001e-0074-1529-827950000000", + "Date" : "Thu, 03 Sep 2020 19:37:16 GMT", + "x-ms-client-request-id" : "214d41e1-3185-40a0-aea4-3d8769b1c394" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.dfs.core.windows.net/jtfsqueryerror0fileapitestqueryerror0ef90156a6885ca61/javapathqueryerror1fileapitestqueryerror0ef33545c8ec03d?resource=file", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.3.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5096c9b8-57c1-4084-a3cb-1ed1f1af44e5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D85040C46F1645", + "Last-Modified" : "Thu, 03 Sep 2020 19:37:17 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7f16a623-501f-009d-7729-82bf1a000000", + "Date" : "Thu, 03 Sep 2020 19:37:17 GMT", + "x-ms-client-request-id" : "5096c9b8-57c1-4084-a3cb-1ed1f1af44e5" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsqueryerror0fileapitestqueryerror0ef90156a6885ca61/javapathqueryerror2fileapitestqueryerror0ef796212aec7e7?comp=query", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bcc7d55f-83bc-4117-9409-2751407f82a5", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "BlobNotFound", + "retry-after" : "0", + "Content-Length" : "216", + "StatusCode" : "404", + "x-ms-request-id" : "d817af14-001e-0074-3229-827950000000", + "Body" : "\nBlobNotFoundThe specified blob does not exist.\nRequestId:d817af14-001e-0074-3229-827950000000\nTime:2020-09-03T19:37:18.1648360Z", + "Date" : "Thu, 03 Sep 2020 19:37:17 GMT", + "x-ms-client-request-id" : "bcc7d55f-83bc-4117-9409-2751407f82a5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsqueryerror0fileapitestqueryerror0ef90156a6885ca61/javapathqueryerror2fileapitestqueryerror0ef796212aec7e7?comp=query", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4691ab77-77d8-4884-82bc-da8920b7e871", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "BlobNotFound", + "retry-after" : "0", + "Content-Length" : "216", + "StatusCode" : "404", + "x-ms-request-id" : "d817af40-001e-0074-5329-827950000000", + "Body" : "\nBlobNotFoundThe specified blob does not exist.\nRequestId:d817af40-001e-0074-5329-827950000000\nTime:2020-09-03T19:37:18.3749859Z", + "Date" : "Thu, 03 Sep 2020 19:37:17 GMT", + "x-ms-client-request-id" : "4691ab77-77d8-4884-82bc-da8920b7e871", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtfsqueryerror&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8343d3cb-e24e-4403-83c2-4e492227df49" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d817af4f-001e-0074-6129-827950000000", + "Body" : "jtfsqueryerrorjtfsqueryerror0fileapitestqueryerror0ef90156a6885ca61Thu, 03 Sep 2020 19:37:16 GMT\"0x8D85040C37A1A60\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 03 Sep 2020 19:37:18 GMT", + "x-ms-client-request-id" : "8343d3cb-e24e-4403-83c2-4e492227df49", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtfsqueryerror0fileapitestqueryerror0ef90156a6885ca61?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d4beb12-3bce-4c8f-85d1-40d4a69b1713" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d817af65-001e-0074-7229-827950000000", + "Date" : "Thu, 03 Sep 2020 19:37:18 GMT", + "x-ms-client-request-id" : "3d4beb12-3bce-4c8f-85d1-40d4a69b1713" + }, + "Exception" : null + } ], + "variables" : [ "jtfsqueryerror0fileapitestqueryerror0ef90156a6885ca61", "javapathqueryerror1fileapitestqueryerror0ef33545c8ec03d", "javapathqueryerror2fileapitestqueryerror0ef796212aec7e7" ] +} \ No newline at end of file From 894add3c30d6d3e31b10e606481017499f2d354b Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Tue, 8 Sep 2020 10:58:15 -0700 Subject: [PATCH 129/168] Move load balancing options changes to main branch (#14908) --- .../eventhubs/EventProcessorClient.java | 15 ++-- .../EventProcessorClientBuilder.java | 70 ++++++++++++++- .../eventhubs/LoadBalancingStrategy.java | 29 +++++++ .../eventhubs/PartitionBasedLoadBalancer.java | 40 ++++++--- ...EventProcessorClientErrorHandlingTest.java | 15 +++- .../eventhubs/EventProcessorClientTest.java | 12 +-- .../PartitionBasedLoadBalancerTest.java | 85 ++++++++++++++++--- 7 files changed, 225 insertions(+), 41 deletions(-) create mode 100644 sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/LoadBalancingStrategy.java diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClient.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClient.java index 19760f593738c..618ab3228c5e7 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClient.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClient.java @@ -39,7 +39,6 @@ @ServiceClient(builder = EventProcessorClientBuilder.class) public class EventProcessorClient { - private static final long INTERVAL_IN_SECONDS = 10; // run the load balancer every 10 seconds private static final long BASE_JITTER_IN_SECONDS = 2; // the initial delay jitter before starting the processor private final ClientLogger logger = new ClientLogger(EventProcessorClient.class); @@ -54,6 +53,7 @@ public class EventProcessorClient { private final String fullyQualifiedNamespace; private final String eventHubName; private final String consumerGroup; + private final Duration loadBalancerUpdateInterval; /** * Package-private constructor. Use {@link EventHubClientBuilder} to create an instance. @@ -71,12 +71,16 @@ public class EventProcessorClient { * @param maxWaitTime The maximum time to wait to receive a batch or a single event. * @param batchReceiveMode The boolean value indicating if this processor is configured to receive in batches or * single events. + * @param loadBalancerUpdateInterval The time duration between load balancing update cycles. + * @param partitionOwnershipExpirationInterval The time duration after which the ownership of partition expires. + * @param loadBalancingStrategy The load balancing strategy to use. */ EventProcessorClient(EventHubClientBuilder eventHubClientBuilder, String consumerGroup, Supplier partitionProcessorFactory, CheckpointStore checkpointStore, boolean trackLastEnqueuedEventProperties, TracerProvider tracerProvider, Consumer processError, Map initialPartitionEventPosition, int maxBatchSize, Duration maxWaitTime, - boolean batchReceiveMode) { + boolean batchReceiveMode, Duration loadBalancerUpdateInterval, Duration partitionOwnershipExpirationInterval, + LoadBalancingStrategy loadBalancingStrategy) { Objects.requireNonNull(eventHubClientBuilder, "eventHubClientBuilder cannot be null."); Objects.requireNonNull(consumerGroup, "consumerGroup cannot be null."); @@ -89,6 +93,7 @@ public class EventProcessorClient { this.fullyQualifiedNamespace = eventHubAsyncClient.getFullyQualifiedNamespace().toLowerCase(Locale.ROOT); this.eventHubName = eventHubAsyncClient.getEventHubName().toLowerCase(Locale.ROOT); this.consumerGroup = consumerGroup.toLowerCase(Locale.ROOT); + this.loadBalancerUpdateInterval = loadBalancerUpdateInterval; logger.info("The instance ID for this event processors is {}", this.identifier); this.partitionPumpManager = new PartitionPumpManager(checkpointStore, partitionProcessorFactory, @@ -97,8 +102,8 @@ public class EventProcessorClient { this.partitionBasedLoadBalancer = new PartitionBasedLoadBalancer(this.checkpointStore, eventHubAsyncClient, this.fullyQualifiedNamespace, this.eventHubName, this.consumerGroup, this.identifier, - TimeUnit.MINUTES.toSeconds(1), this.partitionPumpManager, processError); - + partitionOwnershipExpirationInterval.getSeconds(), this.partitionPumpManager, processError, + loadBalancingStrategy); } /** @@ -136,7 +141,7 @@ public synchronized void start() { ThreadLocalRandom.current().nextDouble() * TimeUnit.SECONDS.toMillis(BASE_JITTER_IN_SECONDS); runner.set(scheduler.get().scheduleWithFixedDelay(partitionBasedLoadBalancer::loadBalance, - jitterInMillis.longValue(), TimeUnit.SECONDS.toMillis(INTERVAL_IN_SECONDS), TimeUnit.MILLISECONDS)); + jitterInMillis.longValue(), loadBalancerUpdateInterval.toMillis(), TimeUnit.MILLISECONDS)); } /** diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClientBuilder.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClientBuilder.java index 7c15a6af99b05..a837989ae16a7 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClientBuilder.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClientBuilder.java @@ -70,6 +70,8 @@ @ServiceClientBuilder(serviceClients = EventProcessorClient.class) public class EventProcessorClientBuilder { + public static final Duration DEFAULT_LOAD_BALANCING_UPDATE_INTERVAL = Duration.ofSeconds(10); + public static final int DEFAULT_OWNERSHIP_EXPIRATION_FACTOR = 6; private final ClientLogger logger = new ClientLogger(EventProcessorClientBuilder.class); private final EventHubClientBuilder eventHubClientBuilder; @@ -84,6 +86,9 @@ public class EventProcessorClientBuilder { private Map initialPartitionEventPosition = new HashMap<>(); private int maxBatchSize = 1; // setting this to 1 by default private Duration maxWaitTime; + private Duration loadBalancingUpdateInterval; + private Duration partitionOwnershipExpirationInterval; + private LoadBalancingStrategy loadBalancingStrategy = LoadBalancingStrategy.BALANCED; /** * Creates a new instance of {@link EventProcessorClientBuilder}. @@ -237,6 +242,61 @@ public EventProcessorClientBuilder checkpointStore(CheckpointStore checkpointSto return this; } + /** + * The time interval between load balancing update cycles. This is also generally the interval at which ownership + * of partitions are renewed. By default, this interval is set to 10 seconds. + * + * @param loadBalancingUpdateInterval The time duration between load balancing update cycles. + * @return The updated {@link EventProcessorClientBuilder} instance. + * @throws NullPointerException if {@code loadBalancingUpdateInterval} is {@code null}. + * @throws IllegalArgumentException if {@code loadBalancingUpdateInterval} is zero or a negative duration. + */ + public EventProcessorClientBuilder loadBalancingUpdateInterval(Duration loadBalancingUpdateInterval) { + Objects.requireNonNull(loadBalancingUpdateInterval, "'loadBalancingUpdateInterval' cannot be null"); + if (loadBalancingUpdateInterval.isZero() || loadBalancingUpdateInterval.isNegative()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'loadBalancingUpdateInterval' " + + "should be a positive duration")); + } + this.loadBalancingUpdateInterval = loadBalancingUpdateInterval; + return this; + } + + /** + * The time duration after which the ownership of partition expires if it's not renewed by the owning processor + * instance. This is the duration that this processor instance will wait before taking over the ownership of + * partitions previously owned by an inactive processor. By default, this duration is set to a minute. + * + * @param partitionOwnershipExpirationInterval The time duration after which the ownership of partition expires. + * @return The updated {@link EventProcessorClientBuilder} instance. + * @throws NullPointerException if {@code partitionOwnershipExpirationInterval} is {@code null}. + * @throws IllegalArgumentException if {@code partitionOwnershipExpirationInterval} is zero or a negative duration. + */ + public EventProcessorClientBuilder partitionOwnershipExpirationInterval( + Duration partitionOwnershipExpirationInterval) { + Objects.requireNonNull(partitionOwnershipExpirationInterval, "'partitionOwnershipExpirationInterval' cannot " + + "be null"); + if (partitionOwnershipExpirationInterval.isZero() || partitionOwnershipExpirationInterval.isNegative()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'partitionOwnershipExpirationInterval' " + + "should be a positive duration")); + } + this.partitionOwnershipExpirationInterval = partitionOwnershipExpirationInterval; + return this; + } + + /** + * The {@link LoadBalancingStrategy} the {@link EventProcessorClient event processor} will use for claiming + * partition ownership. By default, a {@link LoadBalancingStrategy#BALANCED Balanced} approach will be used. + * + * @param loadBalancingStrategy The {@link LoadBalancingStrategy} to use. + * @return The updated {@link EventProcessorClientBuilder} instance. + * @throws NullPointerException if {@code loadBalancingStrategy} is {@code null}. + */ + public EventProcessorClientBuilder loadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy) { + this.loadBalancingStrategy = Objects.requireNonNull(loadBalancingStrategy, "'loadBalancingStrategy' cannot be" + + " null"); + return this; + } + /** * The function that is called for each event received by this {@link EventProcessorClient}. The input contains the * partition context and the event data. @@ -421,9 +481,17 @@ public EventProcessorClient buildEventProcessorClient() { } final TracerProvider tracerProvider = new TracerProvider(ServiceLoader.load(Tracer.class)); + if (loadBalancingUpdateInterval == null) { + loadBalancingUpdateInterval = DEFAULT_LOAD_BALANCING_UPDATE_INTERVAL; + } + if (partitionOwnershipExpirationInterval == null) { + partitionOwnershipExpirationInterval = loadBalancingUpdateInterval.multipliedBy( + DEFAULT_OWNERSHIP_EXPIRATION_FACTOR); + } return new EventProcessorClient(eventHubClientBuilder, this.consumerGroup, getPartitionProcessorSupplier(), checkpointStore, trackLastEnqueuedEventProperties, tracerProvider, - processError, initialPartitionEventPosition, maxBatchSize, maxWaitTime, processEventBatch != null); + processError, initialPartitionEventPosition, maxBatchSize, maxWaitTime, processEventBatch != null, + loadBalancingUpdateInterval, partitionOwnershipExpirationInterval, loadBalancingStrategy); } private Supplier getPartitionProcessorSupplier() { diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/LoadBalancingStrategy.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/LoadBalancingStrategy.java new file mode 100644 index 0000000000000..7d56fe7a244d4 --- /dev/null +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/LoadBalancingStrategy.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventhubs; + +/** + * The strategy used by event processor for load balancing the partition ownership to distribute the event processing + * work with other processor instances. + */ +public enum LoadBalancingStrategy { + + /** + * The event processor will use a steady approach to claim ownership of partitions and slowly trend + * towards a stable state where all active processors will have an even distribution of Event Hub partitions. + * This strategy may take longer to settle into a balanced partition distribution among active processor + * instances. This strategy is geared towards minimizing ownership contention and reducing the need to transfer + * ownership frequently, especially when multiple instances are initialized together, until a stable state is + * reached. + */ + BALANCED, + + /** + * The event processor will attempt to claim its fair share of partition ownership greedily. This enables event + * processing of all partitions to start/resume quickly when there is an imbalance detected by the processor. + * This may result in ownership of partitions frequently changing when multiple instances are starting up + * but will eventually converge to a stable state. + */ + GREEDY; +} diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/PartitionBasedLoadBalancer.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/PartitionBasedLoadBalancer.java index 52d5e0e65ae67..e19886d73ecfc 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/PartitionBasedLoadBalancer.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/PartitionBasedLoadBalancer.java @@ -8,12 +8,13 @@ import com.azure.messaging.eventhubs.models.ErrorContext; import com.azure.messaging.eventhubs.models.PartitionContext; import com.azure.messaging.eventhubs.models.PartitionOwnership; + +import java.time.Duration; import java.util.concurrent.atomic.AtomicBoolean; import reactor.core.Exceptions; import reactor.core.publisher.Mono; import reactor.util.function.Tuple2; -import java.time.Duration; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @@ -54,26 +55,28 @@ final class PartitionBasedLoadBalancer { private final Consumer processError; private final PartitionContext partitionAgnosticContext; private final AtomicBoolean isLoadBalancerRunning = new AtomicBoolean(); + private final LoadBalancingStrategy loadBalancingStrategy; + private final AtomicBoolean morePartitionsToClaim = new AtomicBoolean(); /** * Creates an instance of PartitionBasedLoadBalancer for the given Event Hub name and consumer group. - * * @param checkpointStore The partition manager that this load balancer will use to read/update ownership details. * @param eventHubAsyncClient The asynchronous Event Hub client used to consume events. * @param eventHubName The Event Hub name the {@link EventProcessorClient} is associated with. * @param consumerGroupName The consumer group name the {@link EventProcessorClient} is associated with. * @param ownerId The identifier of the {@link EventProcessorClient} that owns this load balancer. * @param inactiveTimeLimitInSeconds The time in seconds to wait for an update on an ownership record before - * assuming the owner of the partition is inactive. +* assuming the owner of the partition is inactive. * @param partitionPumpManager The partition pump manager that keeps track of all EventHubConsumers and partitions - * that this {@link EventProcessorClient} is processing. +* that this {@link EventProcessorClient} is processing. * @param processError The callback that will be called when an error occurs while running the load balancer. + * @param loadBalancingStrategy The load balancing strategy to use. */ PartitionBasedLoadBalancer(final CheckpointStore checkpointStore, final EventHubAsyncClient eventHubAsyncClient, final String fullyQualifiedNamespace, final String eventHubName, final String consumerGroupName, final String ownerId, final long inactiveTimeLimitInSeconds, final PartitionPumpManager partitionPumpManager, - final Consumer processError) { + final Consumer processError, LoadBalancingStrategy loadBalancingStrategy) { this.checkpointStore = checkpointStore; this.eventHubAsyncClient = eventHubAsyncClient; this.fullyQualifiedNamespace = fullyQualifiedNamespace; @@ -85,6 +88,7 @@ final class PartitionBasedLoadBalancer { this.processError = processError; this.partitionAgnosticContext = new PartitionContext(fullyQualifiedNamespace, eventHubName, consumerGroupName, "NONE"); + this.loadBalancingStrategy = loadBalancingStrategy; } /** @@ -125,14 +129,18 @@ void loadBalance() { Mono.zip(partitionOwnershipMono, partitionsMono) .flatMap(this::loadBalance) - // if there was an error, log warning + .then() + .repeat(() -> LoadBalancingStrategy.GREEDY == loadBalancingStrategy && morePartitionsToClaim.get()) .subscribe(ignored -> { }, ex -> { logger.warning(Messages.LOAD_BALANCING_FAILED, ex.getMessage(), ex); ErrorContext errorContext = new ErrorContext(partitionAgnosticContext, ex); processError.accept(errorContext); isLoadBalancerRunning.set(false); - }, () -> logger.info("Load balancing completed successfully")); + morePartitionsToClaim.set(false); + }, + () -> logger.info("Load balancing completed successfully")); + } /* @@ -141,7 +149,7 @@ void loadBalance() { */ private Mono loadBalance(final Tuple2, List> tuple) { return Mono.fromRunnable(() -> { - + logger.info("Starting next iteration of load balancer"); Map partitionOwnershipMap = tuple.getT1(); List partitionIds = tuple.getT2(); @@ -258,7 +266,11 @@ private Mono loadBalance(final Tuple2, Lis }); } + /* + * This method renews the ownership of currently owned partitions + */ private void renewOwnership(Map partitionOwnershipMap) { + morePartitionsToClaim.set(false); // renew ownership of already owned partitions checkpointStore.claimOwnership(partitionPumpManager.getPartitionPumps().keySet() .stream() @@ -396,9 +408,9 @@ private void claimOwnership(final Map partitionOwner .map(partitionId -> createPartitionOwnershipRequest(partitionOwnershipMap, partitionId)) .collect(Collectors.toList())); + morePartitionsToClaim.set(true); checkpointStore .claimOwnership(partitionsToClaim) - .timeout(Duration.ofMinutes(1)) // TODO: configurable .doOnNext(partitionOwnership -> logger.info("Successfully claimed ownership of partition {}", partitionOwnership.getPartitionId())) .doOnError(ex -> logger @@ -418,10 +430,16 @@ private void claimOwnership(final Map partitionOwner logger.warning("Error while listing checkpoints", ex); ErrorContext errorContext = new ErrorContext(partitionAgnosticContext, ex); processError.accept(errorContext); - isLoadBalancerRunning.set(false); + if (loadBalancingStrategy == LoadBalancingStrategy.BALANCED) { + isLoadBalancerRunning.set(false); + } throw logger.logExceptionAsError(new IllegalStateException("Error while listing checkpoints", ex)); }, - () -> isLoadBalancerRunning.set(false)); + () -> { + if (loadBalancingStrategy == LoadBalancingStrategy.BALANCED) { + isLoadBalancerRunning.set(false); + } + }); } private PartitionOwnership createPartitionOwnershipRequest( diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientErrorHandlingTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientErrorHandlingTest.java index a79be245862d5..f58d3e5c845ce 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientErrorHandlingTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientErrorHandlingTest.java @@ -19,6 +19,7 @@ import com.azure.messaging.eventhubs.models.PartitionEvent; import com.azure.messaging.eventhubs.models.PartitionOwnership; import com.azure.messaging.eventhubs.models.ReceiveOptions; +import java.time.Duration; import java.util.HashMap; import java.util.List; import java.util.concurrent.CountDownLatch; @@ -74,7 +75,7 @@ public void testCheckpointStoreErrors(CheckpointStore checkpointStore) throws In Assertions.assertEquals("NONE", errorContext.getPartitionContext().getPartitionId()); Assertions.assertEquals("cg", errorContext.getPartitionContext().getConsumerGroup()); Assertions.assertTrue(errorContext.getThrowable() instanceof IllegalStateException); - }, new HashMap<>(), 1, null, false); + }, new HashMap<>(), 1, null, false, Duration.ofSeconds(10), Duration.ofMinutes(1), LoadBalancingStrategy.BALANCED); client.start(); boolean completed = countDownLatch.await(3, TimeUnit.SECONDS); try { @@ -93,7 +94,9 @@ public void testProcessEventHandlerError() throws InterruptedException { .thenReturn(Flux.just(getEvent(eventData1))); EventProcessorClient client = new EventProcessorClient(eventHubClientBuilder, "cg", () -> new BadProcessEventHandler(countDownLatch), new SampleCheckpointStore(), false, - null, errorContext -> { }, new HashMap<>(), 1, null, false); + null, errorContext -> { + }, new HashMap<>(), 1, null, false, Duration.ofSeconds(10), Duration.ofMinutes(1), + LoadBalancingStrategy.BALANCED); client.start(); boolean completed = countDownLatch.await(3, TimeUnit.SECONDS); client.stop(); @@ -108,7 +111,9 @@ public void testInitHandlerError() throws InterruptedException { .thenReturn(Flux.just(getEvent(eventData1))); EventProcessorClient client = new EventProcessorClient(eventHubClientBuilder, "cg", () -> new BadInitHandler(countDownLatch), new SampleCheckpointStore(), false, - null, errorContext -> { }, new HashMap<>(), 1, null, false); + null, errorContext -> { + }, new HashMap<>(), 1, null, false, Duration.ofSeconds(10), Duration.ofMinutes(1), + LoadBalancingStrategy.BALANCED); client.start(); boolean completed = countDownLatch.await(3, TimeUnit.SECONDS); client.stop(); @@ -123,7 +128,9 @@ public void testCloseHandlerError() throws InterruptedException { .thenReturn(Flux.just(getEvent(eventData1))); EventProcessorClient client = new EventProcessorClient(eventHubClientBuilder, "cg", () -> new BadCloseHandler(countDownLatch), new SampleCheckpointStore(), false, - null, errorContext -> { }, new HashMap<>(), 1, null, false); + null, errorContext -> { + }, new HashMap<>(), 1, null, false, Duration.ofSeconds(10), Duration.ofMinutes(1), + LoadBalancingStrategy.BALANCED); client.start(); boolean completed = countDownLatch.await(3, TimeUnit.SECONDS); client.stop(); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientTest.java index 05888a75f6cb4..9e403105299d5 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorClientTest.java @@ -148,7 +148,7 @@ public void testWithSimplePartitionProcessor() throws Exception { // Act final EventProcessorClient eventProcessorClient = new EventProcessorClient(eventHubClientBuilder, "test-consumer", () -> testPartitionProcessor, checkpointStore, false, tracerProvider, ec -> { }, new HashMap<>(), - 1, null, false); + 1, null, false, Duration.ofSeconds(10), Duration.ofMinutes(1), LoadBalancingStrategy.BALANCED); eventProcessorClient.start(); TimeUnit.SECONDS.sleep(10); @@ -240,7 +240,7 @@ public void testProcessSpans() throws Exception { //Act EventProcessorClient eventProcessorClient = new EventProcessorClient(eventHubClientBuilder, "test-consumer", TestPartitionProcessor::new, checkpointStore, false, tracerProvider, ec -> { }, new HashMap<>(), - 1, null, false); + 1, null, false, Duration.ofSeconds(10), Duration.ofMinutes(1), LoadBalancingStrategy.BALANCED); eventProcessorClient.start(); TimeUnit.SECONDS.sleep(10); @@ -302,7 +302,7 @@ public void testWithMultiplePartitions() throws Exception { final EventProcessorClient eventProcessorClient = new EventProcessorClient(eventHubClientBuilder, "test-consumer", TestPartitionProcessor::new, checkpointStore, false, tracerProvider, ec -> { }, new HashMap<>(), - 1, null, false); + 1, null, false, Duration.ofSeconds(10), Duration.ofMinutes(1), LoadBalancingStrategy.BALANCED); eventProcessorClient.start(); final boolean completed = count.await(10, TimeUnit.SECONDS); eventProcessorClient.stop(); @@ -357,7 +357,7 @@ public void testBatchReceive() throws Exception { final EventProcessorClient eventProcessorClient = new EventProcessorClient(eventHubClientBuilder, "test-consumer", () -> testPartitionProcessor, checkpointStore, false, tracerProvider, ec -> { }, new HashMap<>(), - 2, Duration.ofSeconds(1), true); + 2, Duration.ofSeconds(1), true, Duration.ofSeconds(10), Duration.ofMinutes(1), LoadBalancingStrategy.BALANCED); // Act eventProcessorClient.start(); @@ -399,7 +399,7 @@ public void testBatchReceiveHeartBeat() throws InterruptedException { final EventProcessorClient eventProcessorClient = new EventProcessorClient(eventHubClientBuilder, "test-consumer", () -> testPartitionProcessor, checkpointStore, false, tracerProvider, ec -> { }, new HashMap<>(), - 2, Duration.ofSeconds(1), true); + 2, Duration.ofSeconds(1), true, Duration.ofSeconds(10), Duration.ofMinutes(1), LoadBalancingStrategy.BALANCED); // Act eventProcessorClient.start(); @@ -463,7 +463,7 @@ public void testSingleEventReceiveHeartBeat() throws InterruptedException { final EventProcessorClient eventProcessorClient = new EventProcessorClient(eventHubClientBuilder, "test-consumer", () -> testPartitionProcessor, checkpointStore, false, tracerProvider, ec -> { }, new HashMap<>(), - 1, Duration.ofSeconds(1), false); + 1, Duration.ofSeconds(1), false, Duration.ofSeconds(10), Duration.ofMinutes(1), LoadBalancingStrategy.BALANCED); eventProcessorClient.start(); boolean completed = countDownLatch.await(20, TimeUnit.SECONDS); eventProcessorClient.stop(); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/PartitionBasedLoadBalancerTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/PartitionBasedLoadBalancerTest.java index 53d3d4afc6125..a3379e339ffd1 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/PartitionBasedLoadBalancerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/PartitionBasedLoadBalancerTest.java @@ -120,7 +120,7 @@ public void testSingleEventProcessor() { return new PartitionEvent(partitionContext, eventDataList.get(i), null); })); - PartitionBasedLoadBalancer partitionBasedLoadBalancer = createPartitionLoadBalancer("owner1"); + PartitionBasedLoadBalancer partitionBasedLoadBalancer = createPartitionLoadBalancer("owner1", LoadBalancingStrategy.BALANCED); IntStream.range(0, partitionIds.size()).forEach(index -> { partitionBasedLoadBalancer.loadBalance(); @@ -156,8 +156,8 @@ public void testTwoEventProcessors() { return new PartitionEvent(partitionContext, eventDataList.get(i), null); })); - PartitionBasedLoadBalancer partitionBasedLoadBalancer1 = createPartitionLoadBalancer("owner1"); - PartitionBasedLoadBalancer partitionBasedLoadBalancer2 = createPartitionLoadBalancer("owner2"); + PartitionBasedLoadBalancer partitionBasedLoadBalancer1 = createPartitionLoadBalancer("owner1", LoadBalancingStrategy.BALANCED); + PartitionBasedLoadBalancer partitionBasedLoadBalancer2 = createPartitionLoadBalancer("owner2", LoadBalancingStrategy.BALANCED); IntStream.range(0, partitionIds.size()).forEach(index -> { partitionBasedLoadBalancer1.loadBalance(); @@ -192,7 +192,7 @@ public void testPartitionStealing() { return new PartitionEvent(partitionContext, eventDataList.get(i), null); })); - PartitionBasedLoadBalancer partitionBasedLoadBalancer1 = createPartitionLoadBalancer("owner1"); + PartitionBasedLoadBalancer partitionBasedLoadBalancer1 = createPartitionLoadBalancer("owner1", LoadBalancingStrategy.BALANCED); // First event processor claims all partitions IntStream.range(0, partitionIds.size()).forEach(index -> { @@ -207,7 +207,7 @@ public void testPartitionStealing() { // Now, second event processor comes online and steals a partition as the number of partitions // are not evenly distributed - PartitionBasedLoadBalancer partitionBasedLoadBalancer2 = createPartitionLoadBalancer("owner2"); + PartitionBasedLoadBalancer partitionBasedLoadBalancer2 = createPartitionLoadBalancer("owner2", LoadBalancingStrategy.BALANCED); partitionBasedLoadBalancer2.loadBalance(); List partitionOwnership = checkpointStore.listOwnership(fqNamespace, eventHubName, consumerGroupName).collectList().block(); @@ -233,7 +233,7 @@ public void testMoreEventProcessorsThanPartitions() { })); List loadBalancers = new ArrayList<>(); - IntStream.range(0, 4).forEach(index -> loadBalancers.add(createPartitionLoadBalancer("owner" + index))); + IntStream.range(0, 4).forEach(index -> loadBalancers.add(createPartitionLoadBalancer("owner" + index, LoadBalancingStrategy.BALANCED))); IntStream.range(0, partitionIds.size()).forEach(index -> { loadBalancers.forEach(lb -> lb.loadBalance()); @@ -271,7 +271,7 @@ public void testEventProcessorInactive() { })); List loadBalancers = new ArrayList<>(); - IntStream.range(0, 4).forEach(index -> loadBalancers.add(createPartitionLoadBalancer("owner" + index))); + IntStream.range(0, 4).forEach(index -> loadBalancers.add(createPartitionLoadBalancer("owner" + index, LoadBalancingStrategy.BALANCED))); IntStream.range(0, partitionIds.size()).forEach(index -> { loadBalancers.forEach(lb -> lb.loadBalance()); @@ -335,7 +335,7 @@ public void testReceiveFailure() { PartitionBasedLoadBalancer loadBalancer = new PartitionBasedLoadBalancer(checkpointStore, eventHubAsyncClient, fqNamespace, eventHubName, consumerGroupName, "owner", TimeUnit.SECONDS.toSeconds(5), partitionPumpManager, ec -> { - }); + }, LoadBalancingStrategy.BALANCED); loadBalancer.loadBalance(); sleep(2); verify(partitionProcessor, never()).processEvent(any(EventContext.class)); @@ -360,7 +360,7 @@ public void testCheckpointStoreFailure() { PartitionBasedLoadBalancer loadBalancer = new PartitionBasedLoadBalancer(checkpointStore, eventHubAsyncClient, fqNamespace, eventHubName, consumerGroupName, "owner", TimeUnit.SECONDS.toSeconds(5), partitionPumpManager, ec -> { - }); + }, LoadBalancingStrategy.BALANCED); loadBalancer.loadBalance(); sleep(5); verify(eventHubAsyncClient, atLeast(1)).getPartitionIds(); @@ -386,7 +386,7 @@ public void testEventHubClientFailure() { PartitionBasedLoadBalancer loadBalancer = new PartitionBasedLoadBalancer(checkpointStore, eventHubAsyncClient, fqNamespace, eventHubName, consumerGroupName, "owner", TimeUnit.SECONDS.toSeconds(5), partitionPumpManager, ec -> { - }); + }, LoadBalancingStrategy.BALANCED); loadBalancer.loadBalance(); sleep(2); verify(eventHubAsyncClient, atLeast(1)).getPartitionIds(); @@ -430,7 +430,8 @@ public void testEmptyOwnerId() { })); String ownerName = "owner1"; - PartitionBasedLoadBalancer partitionBasedLoadBalancer = createPartitionLoadBalancer(ownerName); + PartitionBasedLoadBalancer partitionBasedLoadBalancer = createPartitionLoadBalancer(ownerName, + LoadBalancingStrategy.BALANCED); IntStream.range(0, partitionIds.size()).forEach(index -> { partitionBasedLoadBalancer.loadBalance(); @@ -479,7 +480,7 @@ public void testOwnershipRenewal() { PartitionBasedLoadBalancer partitionBasedLoadBalancer = new PartitionBasedLoadBalancer(checkpointStore, eventHubAsyncClient, fqNamespace, eventHubName, consumerGroupName, "owner1", TimeUnit.SECONDS.toSeconds(10), partitionPumpManager, - ec -> { }); + ec -> { }, LoadBalancingStrategy.BALANCED); partitionBasedLoadBalancer.loadBalance(); // after first iteration, both partitions are owned by owner1, so both partitions should be renewed @@ -526,6 +527,62 @@ private PartitionOwnership getPartitionOwnership(String partitionId, String owne .setLastModifiedTime(System.currentTimeMillis()); } + @Test + public void testSingleEventProcessorWithGreedyStrategy() throws InterruptedException { + List partitionIds = Arrays.asList("1", "2", "3"); + when(eventHubAsyncClient.getPartitionIds()).thenReturn(Flux.fromIterable(partitionIds)); + when(eventHubAsyncClient.createConsumer(anyString(), anyInt())).thenReturn(eventHubConsumer); + + when(eventHubConsumer.receiveFromPartition(any(), any(), any(ReceiveOptions.class))) + .thenReturn(Flux.interval(Duration.ofSeconds(1)).map(index -> { + final PartitionContext partitionContext = new PartitionContext("ns", "foo", "bar", "bazz"); + int i = index.intValue() % eventDataList.size(); + return new PartitionEvent(partitionContext, eventDataList.get(i), null); + })); + + PartitionBasedLoadBalancer partitionBasedLoadBalancer = createPartitionLoadBalancer("owner1", + LoadBalancingStrategy.GREEDY); + + // single call to load balance should own all partitions + partitionBasedLoadBalancer.loadBalance(); + + List partitionOwnership = checkpointStore.listOwnership(fqNamespace, eventHubName, + consumerGroupName).collectList().block(); + assertNotNull(partitionOwnership); + assertEquals(3, partitionOwnership.size()); + partitionOwnership.forEach(po -> assertEquals("owner1", partitionOwnership.get(0).getOwnerId())); + assertEquals(3, partitionOwnership.stream().map(po -> po.getPartitionId()).distinct().count()); + } + + + @Test + public void testMultipleEventProcessorsWithGreedyStrategy() { + List partitionIds = Arrays.asList("1", "2", "3", "4", "5"); + when(eventHubAsyncClient.getPartitionIds()).thenReturn(Flux.fromIterable(partitionIds)); + when(eventHubAsyncClient.createConsumer(anyString(), anyInt())).thenReturn(eventHubConsumer); + when(eventHubConsumer.receiveFromPartition(anyString(), any(EventPosition.class), any(ReceiveOptions.class))) + .thenReturn(Flux.interval(Duration.ofSeconds(1)).map(index -> { + final PartitionContext partitionContext = new PartitionContext("ns", "foo", "bar", "bazz"); + int i = index.intValue() % eventDataList.size(); + return new PartitionEvent(partitionContext, eventDataList.get(i), null); + })); + + PartitionBasedLoadBalancer partitionBasedLoadBalancer1 = createPartitionLoadBalancer("owner1", + LoadBalancingStrategy.GREEDY); + PartitionBasedLoadBalancer partitionBasedLoadBalancer2 = createPartitionLoadBalancer("owner2", + LoadBalancingStrategy.GREEDY); + + // one execution of load balancer for both instances should result in a 3-2 split + partitionBasedLoadBalancer1.loadBalance(); + partitionBasedLoadBalancer2.loadBalance(); + List partitionOwnership = checkpointStore.listOwnership(fqNamespace, eventHubName, + consumerGroupName).collectList().block(); + assertEquals(5, partitionOwnership.size()); + assertEquals(2, partitionOwnership.stream().map(PartitionOwnership::getOwnerId).distinct().count()); + assertTrue(partitionOwnership.stream().filter(po -> po.getOwnerId().equals("owner1")).count() >= 2); + assertTrue(partitionOwnership.stream().filter(po -> po.getOwnerId().equals("owner2")).count() >= 2); + } + private PartitionPumpManager getPartitionPumpManager(TracerProvider tracerProvider) { return new PartitionPumpManager(checkpointStore, () -> new PartitionProcessor() { @@ -549,11 +606,11 @@ public void processError(ErrorContext eventProcessingErrorContext) { }, eventHubClientBuilder, false, tracerProvider, new HashMap<>(), 1, null, batchReceiveMode); } - private PartitionBasedLoadBalancer createPartitionLoadBalancer(String owner) { + private PartitionBasedLoadBalancer createPartitionLoadBalancer(String owner, LoadBalancingStrategy loadBalancingStrategy) { PartitionPumpManager partitionPumpManager = getPartitionPumpManager(tracerProvider); return new PartitionBasedLoadBalancer(checkpointStore, eventHubAsyncClient, fqNamespace, eventHubName, consumerGroupName, owner, TimeUnit.SECONDS.toSeconds(5), partitionPumpManager, ec -> { - }); + }, loadBalancingStrategy); } } From ff1d0dcb3a9036fb9207d55655b07ebc205efa84 Mon Sep 17 00:00:00 2001 From: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Date: Tue, 8 Sep 2020 11:23:52 -0700 Subject: [PATCH 130/168] Bump the template version (#14840) * bump it again * Fixed change log * Bump to latest * Added version file * Update CHANGELOG.md --- eng/jacoco-test-coverage/pom.xml | 2 +- eng/versioning/version_client.txt | 2 +- sdk/template/azure-sdk-template/CHANGELOG.md | 5 +++++ sdk/template/azure-sdk-template/pom.xml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index e3c74fb2d4ded..ae4a3f2bd29e8 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -239,7 +239,7 @@ com.azure azure-sdk-template - 1.2.1-beta.1 + 1.2.1-beta.3 com.azure.resourcemanager diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index d481b5a2a6c32..f91905615797d 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -41,7 +41,7 @@ com.azure:azure-security-keyvault-administration;4.0.0-beta.1;4.0.0-beta.1 com.azure:azure-security-keyvault-certificates;4.1.0;4.2.0-beta.1 com.azure:azure-security-keyvault-keys;4.2.0;4.3.0-beta.1 com.azure:azure-security-keyvault-secrets;4.2.0;4.3.0-beta.1 -com.azure:azure-sdk-template;1.1.0;1.2.1-beta.1 +com.azure:azure-sdk-template;1.2.1-beta.2;1.2.1-beta.3 com.azure:azure-spring-data-cosmos-core;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-spring-data-2-2-cosmos;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-spring-data-2-3-cosmos;3.0.0-beta.1;3.0.0-beta.2 diff --git a/sdk/template/azure-sdk-template/CHANGELOG.md b/sdk/template/azure-sdk-template/CHANGELOG.md index 8b59533f4b575..b65ff075fddd7 100644 --- a/sdk/template/azure-sdk-template/CHANGELOG.md +++ b/sdk/template/azure-sdk-template/CHANGELOG.md @@ -1,4 +1,9 @@ # Release History +## 1.2.1-beta.3 (Unreleased) + + +## 1.2.1-beta.2 (2020-09-04) +- Test release tag replacement ## 1.2.1-beta.1 (2020-08-27) - Test alpha and beta qualifiers diff --git a/sdk/template/azure-sdk-template/pom.xml b/sdk/template/azure-sdk-template/pom.xml index ec06fb79f67c5..e253a8c55d367 100644 --- a/sdk/template/azure-sdk-template/pom.xml +++ b/sdk/template/azure-sdk-template/pom.xml @@ -11,7 +11,7 @@ com.azure azure-sdk-template - 1.2.1-beta.1 + 1.2.1-beta.3 Microsoft Azure SDK for Template This package contains Microsoft Azure SDK for Template. From b7b0e66d9171b76b36e7bdb1b8fa8146798387ec Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 8 Sep 2020 11:42:44 -0700 Subject: [PATCH 131/168] Keyvault Administration clients tests (#14856) * Created azure-security-keyvault-administration module including its POM, README and CHANGELOG files. * Created AutoRest README and generated artifacts. * Added sync methods * Modified the AutoRest specification to generate async methods only. Renamed the generated AccessControl client and builder. * Created the AccessControl builder and clients (sync + async), public API for getting Role Definitions and some helper classes and resources. * Regenerated classes with AutoRest v4 instead of v3. * Added the 'KeyVault' prefix to all access control clients, implementation classes and their builders. * Added an API for listing role definitions. * Added APIs for creating, getting, deleting and listing role assignments. * Polished README. * Added the an entry for Key Vault Administration in version_client.txt * Renamed to not break the CI build. * Fixed copy/paste error on autorest.md * Changed README references (keys -> administration). * Addressed PR comments. Added a new ExpandableStringEnum: RoleScope. Corrected some of the Javadoc. * Removed AccessControl classes. Used AutoRest to generate code from the backuprestore swagger. Modified README.md, CHANGELOG.md and autorest.md. * Created the async and syncs backup clients, as well as their builder. * Made small corrections. * Made slight corrections. * Added the new Key Vault Administration library to eng/jacoco-test-coverage/pom.xml * Re-generated code from the Swagger specification. * Renamed LROs to use "begin" instead of "start". Added a way to handle errors when polling LROs. * Created custom models to expose to users instead of the ones in implementation.models * Added package-info.java and module-info.java * Made some small corrections. * Removed and added a couple entries to module-info.java. Moved KeyVaultLongRunningOperation to administration.models * Changed version of the Key Vault Administration package. * Corrected errors highlighted by APIView. * Removed implementation classes from public API signatures and documentation. Added KeyVaultException to take the place of KeyVaultErrorException in the Javadoc of public APIs. * Removed KeyVaultException. * Fixed Javadoc. * Updated module-info.java * Corrected version number in files inside /eng. Fixed package-info.java Javadoc. Updated dependency versions in azure-security-keyvault-administration's POM. * Fixed Javadoc formatting for public APIs. Fixed build analysis issues with the module's POM. Made utility methods in KeyVaultBackupAsyncClient static and ensured we correctly parse long running operation statuses. * Updated Reactor version. * Changed the final result return type of the `beginBackup` operation from `Void` to `String` so it returns the blob storage URI of the resulting backup. Improved logging for LROs. * Added samples to README. Fixed Build analysis issue related to README. * Fixed broken links in autorest.md * Made fixes for test cases. * Updated azure-core versions. * Corrected typos in README. Fixed a couple bugs discovered by live testing. * Created unit tests for the Key Vault Administration clients. Added test recordings. --- .../KeyVaultAccessControlAsyncClientTest.java | 279 ++++++++++++++++++ .../KeyVaultAccessControlClientTest.java | 266 +++++++++++++++++ .../KeyVaultAccessControlClientTestBase.java | 50 ++++ .../KeyVaultAdministrationClientTestBase.java | 85 ++++++ .../KeyVaultBackupAsyncClientTest.java | 110 +++++++ .../KeyVaultBackupClientTest.java | 123 ++++++++ .../KeyVaultBackupClientTestBase.java | 38 +++ .../session-records/beginBackup.json | 83 ++++++ .../session-records/beginRestore.json | 188 ++++++++++++ .../beginSelectiveRestore.json | 188 ++++++++++++ .../session-records/createRoleAssignment.json | 52 ++++ .../session-records/deleteRoleAssignment.json | 75 +++++ .../session-records/getRoleAssignment.json | 76 +++++ .../session-records/listRoleAssignments.json | 52 ++++ .../session-records/listRoleDefinitions.json | 52 ++++ 15 files changed, 1717 insertions(+) create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClientTest.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientTest.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientTestBase.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAdministrationClientTestBase.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClientTest.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTest.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTestBase.java create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginBackup.json create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginRestore.json create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginSelectiveRestore.json create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/createRoleAssignment.json create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/deleteRoleAssignment.json create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/getRoleAssignment.json create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/listRoleAssignments.json create mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/listRoleDefinitions.json diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClientTest.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClientTest.java new file mode 100644 index 0000000000000..02e32e8afddac --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClientTest.java @@ -0,0 +1,279 @@ +package com.azure.security.keyvault.administration; + +import com.azure.core.http.HttpClient; +import com.azure.core.test.TestMode; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignment; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentProperties; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentScope; +import com.azure.security.keyvault.administration.models.KeyVaultRoleDefinition; +import com.azure.security.keyvault.administration.models.KeyVaultRoleDefinitionProperties; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import static org.junit.jupiter.api.Assertions.*; + +public class KeyVaultAccessControlAsyncClientTest extends KeyVaultAccessControlClientTestBase { + private KeyVaultAccessControlAsyncClient asyncClient; + + @Override + protected void beforeTest() { + beforeTestSetup(); + } + + /** + * Tests that existing {@link KeyVaultRoleDefinition role definitions} can be retrieved from the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void listRoleDefinitions(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + asyncClient = getClientBuilder(httpClient, false).buildAsyncClient(); + + List roleDefinitions = new ArrayList<>(); + + asyncClient.listRoleDefinitions(KeyVaultRoleAssignmentScope.GLOBAL).subscribe(roleDefinitions::add); + + assertTrue(roleDefinitions.iterator().hasNext()); + + for (KeyVaultRoleDefinition roleDefinition : roleDefinitions) { + assertNotNull(roleDefinition.getId()); + assertNotNull(roleDefinition.getName()); + assertNotNull(roleDefinition.getType()); + + KeyVaultRoleDefinitionProperties properties = roleDefinition.getProperties(); + + assertNotNull(properties); + assertNotNull(properties.getRoleName()); + assertNotNull(properties.getDescription()); + assertNotNull(properties.getRoleType()); + assertNotEquals(0, properties.getAssignableScopes().size()); + assertNotEquals(0, properties.getPermissions().size()); + } + } + + /** + * Tests that existing {@link KeyVaultRoleAssignment role assignments} can be retrieved from the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void listRoleAssignments(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + asyncClient = getClientBuilder(httpClient, false).buildAsyncClient(); + + List roleAssignments = new ArrayList<>(); + + asyncClient.listRoleAssignments(KeyVaultRoleAssignmentScope.GLOBAL).subscribe(roleAssignments::add); + sleepInLiveOrRecordMode(5000); + + for (KeyVaultRoleAssignment roleAssignment : roleAssignments) { + assertNotNull(roleAssignment.getId()); + assertNotNull(roleAssignment.getName()); + assertNotNull(roleAssignment.getType()); + + KeyVaultRoleAssignmentProperties properties = roleAssignment.getProperties(); + + assertNotNull(properties); + assertNotNull(properties.getRoleDefinitionId()); + assertNotNull(properties.getPrincipalId()); + } + } + + /** + * Tests that a {@link KeyVaultRoleAssignment role assignment} can be created in the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void createRoleAssignment(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + asyncClient = getClientBuilder(httpClient, false).buildAsyncClient(); + + List roleDefinitions = new ArrayList<>(); + + asyncClient.listRoleDefinitions(KeyVaultRoleAssignmentScope.GLOBAL).subscribe(roleDefinitions::add); + sleepInLiveOrRecordMode(5000); + + KeyVaultRoleDefinition roleDefinition = null; + + for (KeyVaultRoleDefinition currentRoleDefinition : roleDefinitions) { + if (currentRoleDefinition.getProperties().getRoleName().equals(ROLE_NAME)) { + roleDefinition = currentRoleDefinition; + } + } + + assertNotNull(roleDefinition); + + UUID roleAssignmentName = UUID.fromString("d0bedeb4-7431-407d-81cd-278929c98218"); + KeyVaultRoleAssignmentProperties creationProperties = + new KeyVaultRoleAssignmentProperties(roleDefinition.getId(), clientId); + + try { + // Create a role assignment. + KeyVaultRoleAssignment roleAssignment = + asyncClient.createRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName, + creationProperties).block(); + + assertNotNull(roleAssignment); + assertNotNull(roleAssignment.getId()); + assertEquals(roleAssignment.getName(), roleAssignmentName.toString()); + assertNotNull(roleAssignment.getType()); + assertNotNull(roleAssignment.getScope()); + + KeyVaultRoleAssignmentProperties properties = roleAssignment.getProperties(); + + assertNotNull(properties); + assertEquals(creationProperties.getPrincipalId(), properties.getPrincipalId()); + assertEquals(creationProperties.getRoleDefinitionId(), properties.getRoleDefinitionId()); + } finally { + if (getTestMode() != TestMode.PLAYBACK) { + // Clean up the role assignment. + KeyVaultAccessControlAsyncClient cleanupClient = getClientBuilder(httpClient, true).buildAsyncClient(); + + cleanupClient.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName.toString()); + } + } + } + + /** + * Tests that an existing {@link KeyVaultRoleAssignment role assignment} can be retrieved from the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void getRoleAssignment(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + asyncClient = getClientBuilder(httpClient, false).buildAsyncClient(); + + List roleDefinitions = new ArrayList<>(); + + asyncClient.listRoleDefinitions(KeyVaultRoleAssignmentScope.GLOBAL).subscribe(roleDefinitions::add); + sleepInLiveOrRecordMode(5000); + + KeyVaultRoleDefinition roleDefinition = null; + + for (KeyVaultRoleDefinition currentRoleDefinition : roleDefinitions) { + if (currentRoleDefinition.getProperties().getRoleName().equals(ROLE_NAME)) { + roleDefinition = currentRoleDefinition; + } + } + + assertNotNull(roleDefinition); + + UUID roleAssignmentName = UUID.fromString("658d6c14-98c2-4a53-a523-be8609eb7f8b"); + KeyVaultRoleAssignmentProperties creationProperties = + new KeyVaultRoleAssignmentProperties(roleDefinition.getId(), clientId); + + try { + // Create a role assignment to retrieve. + KeyVaultRoleAssignment createdRoleAssignment = + asyncClient.createRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName, + creationProperties).block(); + + assertNotNull(createdRoleAssignment); + + // Get the role assignment. + KeyVaultRoleAssignment retrievedRoleAssignment = + asyncClient.getRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName.toString()) + .block(); + + assertNotNull(retrievedRoleAssignment); + assertEquals(createdRoleAssignment.getId(), retrievedRoleAssignment.getId()); + assertEquals(createdRoleAssignment.getName(), retrievedRoleAssignment.getName()); + assertEquals(createdRoleAssignment.getType(), retrievedRoleAssignment.getType()); + assertEquals(createdRoleAssignment.getScope(), retrievedRoleAssignment.getScope()); + + KeyVaultRoleAssignmentProperties retrievedProperties = retrievedRoleAssignment.getProperties(); + + assertNotNull(retrievedProperties); + assertEquals(creationProperties.getPrincipalId(), retrievedProperties.getPrincipalId()); + assertEquals(creationProperties.getRoleDefinitionId(), retrievedProperties.getRoleDefinitionId()); + } finally { + if (getTestMode() != TestMode.PLAYBACK) { + // Clean up the role assignment. + KeyVaultAccessControlAsyncClient cleanupClient = getClientBuilder(httpClient, true).buildAsyncClient(); + + cleanupClient.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName.toString()); + } + } + } + + /** + * Tests that an existing {@link KeyVaultRoleAssignment role assignment} can be deleted from the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void deleteRoleAssignment(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + asyncClient = getClientBuilder(httpClient, false).buildAsyncClient(); + + List roleDefinitions = new ArrayList<>(); + + asyncClient.listRoleDefinitions(KeyVaultRoleAssignmentScope.GLOBAL).subscribe(roleDefinitions::add); + sleepInLiveOrRecordMode(5000); + + KeyVaultRoleDefinition roleDefinition = null; + + for (KeyVaultRoleDefinition currentRoleDefinition : roleDefinitions) { + if (currentRoleDefinition.getProperties().getRoleName().equals(ROLE_NAME)) { + roleDefinition = currentRoleDefinition; + } + } + + assertNotNull(roleDefinition); + + UUID roleAssignmentName = UUID.fromString("33785c35-4196-46b5-9d99-d5bcb2b9ca1d"); + KeyVaultRoleAssignmentProperties creationProperties = + new KeyVaultRoleAssignmentProperties(roleDefinition.getId(), clientId); + + // Create a role assignment to delete. + KeyVaultRoleAssignment createdRoleAssignment = + asyncClient.createRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName, + creationProperties).block(); + + assertNotNull(createdRoleAssignment); + + // Delete the role assignment. + KeyVaultRoleAssignment deletedRoleAssignment = + asyncClient.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName.toString()).block(); + //client.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, "df0c4b30-93b9-4142-9523-ef3ec26ac99f"); + + assertNotNull(deletedRoleAssignment); + assertEquals(createdRoleAssignment.getId(), deletedRoleAssignment.getId()); + assertEquals(createdRoleAssignment.getName(), deletedRoleAssignment.getName()); + assertEquals(createdRoleAssignment.getType(), deletedRoleAssignment.getType()); + assertEquals(createdRoleAssignment.getScope(), deletedRoleAssignment.getScope()); + + KeyVaultRoleAssignmentProperties retrievedProperties = deletedRoleAssignment.getProperties(); + + assertNotNull(retrievedProperties); + assertEquals(creationProperties.getPrincipalId(), retrievedProperties.getPrincipalId()); + assertEquals(creationProperties.getRoleDefinitionId(), retrievedProperties.getRoleDefinitionId()); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientTest.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientTest.java new file mode 100644 index 0000000000000..78db4e4cc8f5b --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientTest.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.test.TestMode; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignment; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentProperties; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentScope; +import com.azure.security.keyvault.administration.models.KeyVaultRoleDefinition; +import com.azure.security.keyvault.administration.models.KeyVaultRoleDefinitionProperties; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.util.UUID; + +import static org.junit.jupiter.api.Assertions.*; + +public class KeyVaultAccessControlClientTest extends KeyVaultAccessControlClientTestBase { + private KeyVaultAccessControlClient client; + + @Override + protected void beforeTest() { + beforeTestSetup(); + } + + /** + * Tests that existing {@link KeyVaultRoleDefinition role definitions} can be retrieved from the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void listRoleDefinitions(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + client = getClientBuilder(httpClient, false).buildClient(); + + PagedIterable roleDefinitions = + client.listRoleDefinitions(KeyVaultRoleAssignmentScope.GLOBAL); + + assertTrue(roleDefinitions.iterator().hasNext()); + + for (KeyVaultRoleDefinition roleDefinition : roleDefinitions) { + assertNotNull(roleDefinition.getId()); + assertNotNull(roleDefinition.getName()); + assertNotNull(roleDefinition.getType()); + + KeyVaultRoleDefinitionProperties properties = roleDefinition.getProperties(); + + assertNotNull(properties); + assertNotNull(properties.getRoleName()); + assertNotNull(properties.getDescription()); + assertNotNull(properties.getRoleType()); + assertNotEquals(0, properties.getAssignableScopes().size()); + assertNotEquals(0, properties.getPermissions().size()); + } + } + + /** + * Tests that existing {@link KeyVaultRoleAssignment role assignments} can be retrieved from the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void listRoleAssignments(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + client = getClientBuilder(httpClient, false).buildClient(); + + PagedIterable roleAssignments = + client.listRoleAssignments(KeyVaultRoleAssignmentScope.GLOBAL); + + assertTrue(roleAssignments.iterator().hasNext()); + + for (KeyVaultRoleAssignment roleAssignment : roleAssignments) { + assertNotNull(roleAssignment.getId()); + assertNotNull(roleAssignment.getName()); + assertNotNull(roleAssignment.getType()); + + KeyVaultRoleAssignmentProperties properties = roleAssignment.getProperties(); + + assertNotNull(properties); + assertNotNull(properties.getRoleDefinitionId()); + assertNotNull(properties.getPrincipalId()); + } + } + + /** + * Tests that a {@link KeyVaultRoleAssignment role assignment} can be created in the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void createRoleAssignment(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + client = getClientBuilder(httpClient, false).buildClient(); + + PagedIterable roleDefinitions = + client.listRoleDefinitions(KeyVaultRoleAssignmentScope.GLOBAL); + + KeyVaultRoleDefinition roleDefinition = null; + + for (KeyVaultRoleDefinition currentRoleDefinition : roleDefinitions) { + if (currentRoleDefinition.getProperties().getRoleName().equals(ROLE_NAME)) { + roleDefinition = currentRoleDefinition; + break; + } + } + + assertNotNull(roleDefinition); + + UUID roleAssignmentName = UUID.fromString("d0bedeb4-7431-407d-81cd-278929c98218"); + KeyVaultRoleAssignmentProperties creationProperties = + new KeyVaultRoleAssignmentProperties(roleDefinition.getId(), clientId); + + try { + // Create a role assignment. + KeyVaultRoleAssignment createdRoleAssignment = + client.createRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName, creationProperties); + + assertNotNull(createdRoleAssignment); + assertNotNull(createdRoleAssignment.getId()); + assertEquals(createdRoleAssignment.getName(), roleAssignmentName.toString()); + assertNotNull(createdRoleAssignment.getType()); + assertNotNull(createdRoleAssignment.getScope()); + + KeyVaultRoleAssignmentProperties properties = createdRoleAssignment.getProperties(); + + assertNotNull(properties); + assertEquals(creationProperties.getPrincipalId(), properties.getPrincipalId()); + assertEquals(creationProperties.getRoleDefinitionId(), properties.getRoleDefinitionId()); + } finally { + if (getTestMode() != TestMode.PLAYBACK) { + // Clean up the role assignment. + KeyVaultAccessControlClient cleanupClient = getClientBuilder(httpClient, true).buildClient(); + + cleanupClient.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName.toString()); + } + } + } + + /** + * Tests that an existing {@link KeyVaultRoleAssignment role assignment} can be retrieved from the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void getRoleAssignment(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + client = getClientBuilder(httpClient, false).buildClient(); + + PagedIterable roleDefinitions = + client.listRoleDefinitions(KeyVaultRoleAssignmentScope.GLOBAL); + + KeyVaultRoleDefinition roleDefinition = null; + + for (KeyVaultRoleDefinition currentRoleDefinition : roleDefinitions) { + if (currentRoleDefinition.getProperties().getRoleName().equals(ROLE_NAME)) { + roleDefinition = currentRoleDefinition; + } + } + + assertNotNull(roleDefinition); + + UUID roleAssignmentName = UUID.fromString("658d6c14-98c2-4a53-a523-be8609eb7f8b"); + KeyVaultRoleAssignmentProperties creationProperties = + new KeyVaultRoleAssignmentProperties(roleDefinition.getId(), clientId); + + try { + // Create a role assignment to retrieve. + KeyVaultRoleAssignment createdRoleAssignment = + client.createRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName, creationProperties); + + // Get the role assignment. + KeyVaultRoleAssignment retrievedRoleAssignment = + client.getRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName.toString()); + + assertNotNull(retrievedRoleAssignment); + assertEquals(createdRoleAssignment.getId(), retrievedRoleAssignment.getId()); + assertEquals(createdRoleAssignment.getName(), retrievedRoleAssignment.getName()); + assertEquals(createdRoleAssignment.getType(), retrievedRoleAssignment.getType()); + assertEquals(createdRoleAssignment.getScope(), retrievedRoleAssignment.getScope()); + + KeyVaultRoleAssignmentProperties retrievedProperties = retrievedRoleAssignment.getProperties(); + + assertNotNull(retrievedProperties); + assertEquals(creationProperties.getPrincipalId(), retrievedProperties.getPrincipalId()); + assertEquals(creationProperties.getRoleDefinitionId(), retrievedProperties.getRoleDefinitionId()); + } finally { + if (getTestMode() != TestMode.PLAYBACK) { + // Clean up the role assignment. + KeyVaultAccessControlClient cleanupClient = getClientBuilder(httpClient, true).buildClient(); + + cleanupClient.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName.toString()); + } + } + } + + /** + * Tests that an existing {@link KeyVaultRoleAssignment role assignment} can be deleted from the Key Vault. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void deleteRoleAssignment(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no test cloud environment for Managed HSM. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + client = getClientBuilder(httpClient, false).buildClient(); + + PagedIterable roleDefinitions = + client.listRoleDefinitions(KeyVaultRoleAssignmentScope.GLOBAL); + + KeyVaultRoleDefinition roleDefinition = null; + + for (KeyVaultRoleDefinition currentRoleDefinition : roleDefinitions) { + if (currentRoleDefinition.getProperties().getRoleName().equals(ROLE_NAME)) { + roleDefinition = currentRoleDefinition; + } + } + + assertNotNull(roleDefinition); + + UUID roleAssignmentName = UUID.fromString("33785c35-4196-46b5-9d99-d5bcb2b9ca1d"); + KeyVaultRoleAssignmentProperties creationProperties = + new KeyVaultRoleAssignmentProperties(roleDefinition.getId(), clientId); + + // Create a role assignment to delete. + KeyVaultRoleAssignment createdRoleAssignment = + client.createRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName, creationProperties); + + // Delete the role assignment. + KeyVaultRoleAssignment deletedRoleAssignment = + client.deleteRoleAssignment(KeyVaultRoleAssignmentScope.GLOBAL, roleAssignmentName.toString()); + + assertNotNull(deletedRoleAssignment); + assertEquals(createdRoleAssignment.getId(), deletedRoleAssignment.getId()); + assertEquals(createdRoleAssignment.getName(), deletedRoleAssignment.getName()); + assertEquals(createdRoleAssignment.getType(), deletedRoleAssignment.getType()); + assertEquals(createdRoleAssignment.getScope(), deletedRoleAssignment.getScope()); + + KeyVaultRoleAssignmentProperties retrievedProperties = deletedRoleAssignment.getProperties(); + + assertNotNull(retrievedProperties); + assertEquals(creationProperties.getPrincipalId(), retrievedProperties.getPrincipalId()); + assertEquals(creationProperties.getRoleDefinitionId(), retrievedProperties.getRoleDefinitionId()); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientTestBase.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientTestBase.java new file mode 100644 index 0000000000000..70e14ea6cbc13 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientTestBase.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.administration; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.test.TestMode; +import org.junit.jupiter.api.Test; + +import java.util.List; + +public abstract class KeyVaultAccessControlClientTestBase extends KeyVaultAdministrationClientTestBase { + protected static final String ROLE_NAME = "Managed HSM Crypto User"; + String clientId = "49acc88b-8f9e-4619-9856-16691db66767"; + + protected KeyVaultAccessControlClientBuilder getClientBuilder(HttpClient httpClient, boolean forCleanup) { + List policies = getPolicies(); + + if (getTestMode() == TestMode.RECORD && !forCleanup) { + policies.add(interceptorManager.getRecordPolicy()); + } + + HttpPipeline httpPipeline = new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient) + .build(); + + return new KeyVaultAccessControlClientBuilder() + .vaultUrl(getEndpoint()) + .pipeline(httpPipeline); + } + + @Test + public abstract void listRoleDefinitions(HttpClient httpClient); + + @Test + public abstract void listRoleAssignments(HttpClient httpClient); + + @Test + public abstract void createRoleAssignment(HttpClient httpClient); + + @Test + public abstract void getRoleAssignment(HttpClient httpClient); + + @Test + public abstract void deleteRoleAssignment(HttpClient httpClient); +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAdministrationClientTestBase.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAdministrationClientTestBase.java new file mode 100644 index 0000000000000..f18bef7cec011 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAdministrationClientTestBase.java @@ -0,0 +1,85 @@ +package com.azure.security.keyvault.administration; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.policy.*; +import com.azure.core.test.TestBase; +import com.azure.core.util.Configuration; +import com.azure.identity.AzureCliCredentialBuilder; +import com.azure.security.keyvault.administration.implementation.KeyVaultCredentialPolicy; +import org.junit.jupiter.params.provider.Arguments; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Stream; + +public abstract class KeyVaultAdministrationClientTestBase extends TestBase { + private static final String SDK_NAME = "client_name"; + private static final String SDK_VERSION = "client_version"; + static final String DISPLAY_NAME = "{displayName}"; + + @Override + protected String getTestName() { + return ""; + } + + void beforeTestSetup() { + } + + protected List getPolicies() { + TokenCredential credential = null; + + if (!interceptorManager.isPlaybackMode()) { + credential = new AzureCliCredentialBuilder().build(); + } + + // Closest to API goes first, closest to wire goes last. + final List policies = new ArrayList<>(); + + policies.add(new UserAgentPolicy(null, SDK_NAME, SDK_VERSION, Configuration.getGlobalConfiguration().clone())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + + RetryStrategy strategy = new ExponentialBackoff(5, Duration.ofSeconds(2), Duration.ofSeconds(16)); + policies.add(new RetryPolicy(strategy)); + + if (credential != null) { + policies.add(new KeyVaultCredentialPolicy(credential)); + } + + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))); + + return policies; + } + + public String getEndpoint() { + final String endpoint = interceptorManager.isPlaybackMode() ? "http://localhost:8080" : + System.getenv("AZURE_KEYVAULT_ENDPOINT"); + Objects.requireNonNull(endpoint); + + return endpoint; + } + + /** + * Returns a stream of arguments that includes all eligible {@link HttpClient HttpClients}. + * + * @return A stream of {@link HttpClient HTTP clients} to test. + */ + static Stream createHttpClients() { + return TestBase.getHttpClients().map(Arguments::of); + } + + public void sleepInLiveOrRecordMode(long millis) { + if (interceptorManager.isPlaybackMode()) { + return; + } + + try { + Thread.sleep(millis); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClientTest.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClientTest.java new file mode 100644 index 0000000000000..3134b16e80b7d --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClientTest.java @@ -0,0 +1,110 @@ +package com.azure.security.keyvault.administration; + +import com.azure.core.http.HttpClient; +import com.azure.core.test.TestMode; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.SyncPoller; +import com.azure.security.keyvault.administration.models.KeyVaultBackupOperation; +import com.azure.security.keyvault.administration.models.KeyVaultRestoreOperation; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.*; + +public class KeyVaultBackupAsyncClientTest extends KeyVaultBackupClientTestBase { + private KeyVaultBackupAsyncClient asyncClient; + + private final String blobStorageUrl = "https://testaccount.blob.core.windows.net/backup"; + private final String sasToken = "someSasToken"; + + @Override + protected void beforeTest() { + beforeTestSetup(); + } + + /** + * Tests that a Key Vault can be backed up. + */ + @SuppressWarnings("ConstantConditions") + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void beginBackup(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no Managed HSM environment for pipeline testing. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + asyncClient = getClientBuilder(httpClient, false).buildAsyncClient(); + + AsyncPollResponse backupPollResponse = + asyncClient.beginBackup(blobStorageUrl, sasToken).blockLast(); + + String backupBlobUri = backupPollResponse.getFinalResult().block(); + + assertNotNull(backupBlobUri); + assertTrue(backupBlobUri.startsWith(blobStorageUrl)); + } + + /** + * Tests that a Key Vault can be restored from a backup. + */ + @SuppressWarnings("ConstantConditions") + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void beginRestore(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no Managed HSM environment for pipeline testing. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + asyncClient = getClientBuilder(httpClient, false).buildAsyncClient(); + + // Create a backup + AsyncPollResponse backupPollResponse = + asyncClient.beginBackup(blobStorageUrl, sasToken).blockLast(); + + // Restore the backup + String backupBlobUri = backupPollResponse.getFinalResult().block(); + String[] segments = backupBlobUri.split("/"); + String folderName = segments[segments.length - 1]; + + AsyncPollResponse restorePollResponse = + asyncClient.beginRestore(blobStorageUrl, sasToken, folderName).blockLast(); + + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, restorePollResponse.getStatus()); + } + + /** + * Tests that a key can be restored from a backup. + */ + @SuppressWarnings("ConstantConditions") + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void beginSelectiveRestore(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no Managed HSM environment for pipeline testing. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + asyncClient = getClientBuilder(httpClient, false).buildAsyncClient(); + + // Create a backup + AsyncPollResponse backupPollResponse = + asyncClient.beginBackup(blobStorageUrl, sasToken).blockLast(); + + // Restore the backup + String backupBlobUri = backupPollResponse.getFinalResult().block(); + String[] segments = backupBlobUri.split("/"); + String folderName = segments[segments.length - 1]; + + AsyncPollResponse selectiveRestorePollResponse = + asyncClient.beginSelectiveRestore("testKey", blobStorageUrl, sasToken, folderName).blockLast(); + + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, selectiveRestorePollResponse.getStatus()); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTest.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTest.java new file mode 100644 index 0000000000000..696f96027e68d --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTest.java @@ -0,0 +1,123 @@ +package com.azure.security.keyvault.administration; + +import com.azure.core.http.HttpClient; +import com.azure.core.test.TestMode; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.SyncPoller; +import com.azure.security.keyvault.administration.models.KeyVaultBackupOperation; +import com.azure.security.keyvault.administration.models.KeyVaultRestoreOperation; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.*; + +public class KeyVaultBackupClientTest extends KeyVaultBackupClientTestBase { + private KeyVaultBackupClient client; + + private final String blobStorageUrl = "https://testaccount.blob.core.windows.net/backup"; + private final String sasToken = "someSasToken"; + + @Override + protected void beforeTest() { + beforeTestSetup(); + } + + /** + * Tests that a Key Vault can be backed up. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void beginBackup(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no Managed HSM environment for pipeline testing. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + client = getClientBuilder(httpClient, false).buildClient(); + + SyncPoller backupPoller = client.beginBackup(blobStorageUrl, sasToken); + + PollResponse backupResponse = backupPoller.waitForCompletion(); + + String backupBlobUri = backupPoller.getFinalResult(); + + assertNotNull(backupBlobUri); + assertTrue(backupBlobUri.startsWith(blobStorageUrl)); + } + + /** + * Tests that a Key Vault can be restored from a backup. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void beginRestore(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no Managed HSM environment for pipeline testing. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + client = getClientBuilder(httpClient, false).buildClient(); + + // Create a backup + SyncPoller backupPoller = client.beginBackup(blobStorageUrl, sasToken); + + backupPoller.waitForCompletion(); + + // Restore the backup + String backupBlobUri = backupPoller.getFinalResult(); + String[] segments = backupBlobUri.split("/"); + String folderName = segments[segments.length - 1]; + + SyncPoller restorePoller = + client.beginRestore(blobStorageUrl, sasToken, folderName); + + restorePoller.waitForCompletion(); + + PollResponse restoreResponse = restorePoller.poll(); + + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, restoreResponse.getStatus()); + } + + /** + * Tests that a key can be restored from a backup. + */ + @ParameterizedTest(name = DISPLAY_NAME) + @MethodSource("com.azure.security.keyvault.administration.KeyVaultAdministrationClientTestBase#createHttpClients") + public void beginSelectiveRestore(HttpClient httpClient) { + if (getTestMode() != TestMode.PLAYBACK) { + // Currently there is no Managed HSM environment for pipeline testing. + // TODO: Remove once there is a proper cloud environment available. + return; + } + + client = getClientBuilder(httpClient, false).buildClient(); + + // Create a backup + SyncPoller backupPoller = client.beginBackup(blobStorageUrl, sasToken); + + backupPoller.waitForCompletion(); + + // Restore one key from said backup + String backupBlobUri = backupPoller.getFinalResult(); + String[] segments = backupBlobUri.split("/"); + String folderName = segments[segments.length - 1]; + + SyncPoller selectiveRestorePoller = + client.beginSelectiveRestore("testKey", blobStorageUrl, sasToken, folderName); + + PollResponse response = selectiveRestorePoller.poll(); + + assertNotNull(response); + assertEquals(LongRunningOperationStatus.IN_PROGRESS, response.getStatus()); + assertNotNull(response.getValue()); + + selectiveRestorePoller.waitForCompletion(); + + response = selectiveRestorePoller.poll(); + + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, response.getStatus()); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTestBase.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTestBase.java new file mode 100644 index 0000000000000..91fe5dea44319 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTestBase.java @@ -0,0 +1,38 @@ +package com.azure.security.keyvault.administration; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.test.TestMode; +import org.junit.jupiter.api.Test; + +import java.util.List; + +public abstract class KeyVaultBackupClientTestBase extends KeyVaultAdministrationClientTestBase { + protected KeyVaultBackupClientBuilder getClientBuilder(HttpClient httpClient, boolean forCleanup) { + List policies = getPolicies(); + + if (getTestMode() == TestMode.RECORD && !forCleanup) { + policies.add(interceptorManager.getRecordPolicy()); + } + + HttpPipeline httpPipeline = new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient) + .build(); + + return new KeyVaultBackupClientBuilder() + .vaultUrl(getEndpoint()) + .pipeline(httpPipeline); + } + + @Test + public abstract void beginBackup(HttpClient httpClient); + + @Test + public abstract void beginRestore(HttpClient httpClient); + + @Test + public abstract void beginSelectiveRestore(HttpClient httpClient); +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginBackup.json b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginBackup.json new file mode 100644 index 0000000000000..82bf7b7f2ad86 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginBackup.json @@ -0,0 +1,83 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 01:44:06 GMT", + "server" : "Kestrel", + "content-length" : "216", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-server-latency" : "4663", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"status\":\"InProgress\",\"statusDetails\":null,\"error\":{\"code\":null,\"message\":null,\"innererror\":null},\"startTime\":1599270244,\"endTime\":null,\"jobId\":\"bff4961da63f44e0ae9cdf6924b37243\",\"azureStorageBlobContainerUri\":null}", + "azure-asyncoperation" : "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/bff4961da63f44e0ae9cdf6924b37243/pending" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup/bff4961da63f44e0ae9cdf6924b37243/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 01:44:07 GMT", + "server" : "Kestrel", + "content-length" : "216", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "580", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"azureStorageBlobContainerUri\":null,\"endTime\":null,\"error\":{\"code\":null,\"innererror\":null,\"message\":null},\"jobId\":\"bff4961da63f44e0ae9cdf6924b37243\",\"startTime\":1599270244,\"status\":\"InProgress\",\"statusDetails\":null}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup/bff4961da63f44e0ae9cdf6924b37243/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 01:44:19 GMT", + "server" : "Kestrel", + "content-length" : "263", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "461", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"azureStorageBlobContainerUri\":\"https://testaccount.blob.core.windows.net/backup/testKeyVault\",\"endTime\":1599270258,\"error\":null,\"jobId\":\"bff4961da63f44e0ae9cdf6924b37243\",\"startTime\":1599270244,\"status\":\"Succeeded\",\"statusDetails\":null}" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginRestore.json b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginRestore.json new file mode 100644 index 0000000000000..1f6962d4d98ef --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginRestore.json @@ -0,0 +1,188 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:10:42 GMT", + "server" : "Kestrel", + "content-length" : "216", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-server-latency" : "956", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "0a92d500-eeee-11ea-ad45-0242ac120005", + "Body" : "{\"status\":\"InProgress\",\"statusDetails\":null,\"error\":{\"code\":null,\"message\":null,\"innererror\":null},\"startTime\":1599271842,\"endTime\":null,\"jobId\":\"41b6e77196cb46f8a1eafe715312d672\",\"azureStorageBlobContainerUri\":null}", + "azure-asyncoperation" : "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/41b6e77196cb46f8a1eafe715312d672/pending" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup/41b6e77196cb46f8a1eafe715312d672/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:10:43 GMT", + "server" : "Kestrel", + "content-length" : "216", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "669", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "0a92d500-eeee-11ea-ad45-0242ac120005", + "Body" : "{\"azureStorageBlobContainerUri\":null,\"endTime\":null,\"error\":{\"code\":null,\"innererror\":null,\"message\":null},\"jobId\":\"41b6e77196cb46f8a1eafe715312d672\",\"startTime\":1599271842,\"status\":\"InProgress\",\"statusDetails\":null}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup/41b6e77196cb46f8a1eafe715312d672/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:10:52 GMT", + "server" : "Kestrel", + "content-length" : "263", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "586", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "0a92d500-eeee-11ea-ad45-0242ac120005", + "Body" : "{\"azureStorageBlobContainerUri\":\"https://testaccount.blob.core.windows.net/backup/testKeyVault\",\"endTime\":1599271853,\"error\":null,\"jobId\":\"41b6e77196cb46f8a1eafe715312d672\",\"startTime\":1599271842,\"status\":\"Succeeded\",\"statusDetails\":null}" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/restore?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:11:04 GMT", + "server" : "Kestrel", + "content-length" : "180", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-server-latency" : "722", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "0a92d500-eeee-11ea-ad45-0242ac120005", + "Body" : "{\"endTime\":null,\"error\":{\"code\":null,\"innererror\":null,\"message\":null},\"jobId\":\"39009818fe314387916f1513179d12cd\",\"startTime\":1599271865,\"status\":\"InProgress\",\"statusDetails\":null}", + "azure-asyncoperation" : "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/39009818fe314387916f1513179d12cd/pending" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/restore/39009818fe314387916f1513179d12cd/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:11:06 GMT", + "server" : "Kestrel", + "content-length" : "180", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "600", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "0a92d500-eeee-11ea-ad45-0242ac120005", + "Body" : "{\"endTime\":null,\"error\":{\"code\":null,\"innererror\":null,\"message\":null},\"jobId\":\"39009818fe314387916f1513179d12cd\",\"startTime\":1599271865,\"status\":\"InProgress\",\"statusDetails\":null}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/restore/39009818fe314387916f1513179d12cd/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:11:23 GMT", + "server" : "Kestrel", + "content-length" : "143", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "558", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "0a92d500-eeee-11ea-ad45-0242ac120005", + "Body" : "{\"endTime\":1599271882,\"error\":null,\"jobId\":\"39009818fe314387916f1513179d12cd\",\"startTime\":1599271865,\"status\":\"Succeeded\",\"statusDetails\":null}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/restore/39009818fe314387916f1513179d12cd/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:11:23 GMT", + "server" : "Kestrel", + "content-length" : "143", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "543", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "0a92d500-eeee-11ea-ad45-0242ac120005", + "Body" : "{\"endTime\":1599271882,\"error\":null,\"jobId\":\"39009818fe314387916f1513179d12cd\",\"startTime\":1599271865,\"status\":\"Succeeded\",\"statusDetails\":null}" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginSelectiveRestore.json b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginSelectiveRestore.json new file mode 100644 index 0000000000000..e5c8e3ed54303 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/beginSelectiveRestore.json @@ -0,0 +1,188 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:18:09 GMT", + "server" : "Kestrel", + "content-length" : "216", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-server-latency" : "738", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"status\":\"InProgress\",\"statusDetails\":null,\"error\":{\"code\":null,\"message\":null,\"innererror\":null},\"startTime\":1599272289,\"endTime\":null,\"jobId\":\"9221e3b978b64dc089d74a64ca5bfbb8\",\"azureStorageBlobContainerUri\":null}", + "azure-asyncoperation" : "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/9221e3b978b64dc089d74a64ca5bfbb8/pending" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup/9221e3b978b64dc089d74a64ca5bfbb8/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:18:10 GMT", + "server" : "Kestrel", + "content-length" : "216", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "486", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"azureStorageBlobContainerUri\":null,\"endTime\":null,\"error\":{\"code\":null,\"innererror\":null,\"message\":null},\"jobId\":\"9221e3b978b64dc089d74a64ca5bfbb8\",\"startTime\":1599272289,\"status\":\"InProgress\",\"statusDetails\":null}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/backup/9221e3b978b64dc089d74a64ca5bfbb8/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:18:21 GMT", + "server" : "Kestrel", + "content-length" : "263", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "452", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"azureStorageBlobContainerUri\":\"https://testaccount.blob.core.windows.net/backup/testKeyVault\",\"endTime\":1599272300,\"error\":null,\"jobId\":\"9221e3b978b64dc089d74a64ca5bfbb8\",\"startTime\":1599272289,\"status\":\"Succeeded\",\"statusDetails\":null}" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/keys/testKey/restore?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:18:24 GMT", + "server" : "Kestrel", + "content-length" : "180", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-server-latency" : "3633", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"endTime\":null,\"error\":{\"code\":null,\"innererror\":null,\"message\":null},\"jobId\":\"46ec38dfbb4b463b8d2f2d971e393cfa\",\"startTime\":1599272302,\"status\":\"InProgress\",\"statusDetails\":null}", + "azure-asyncoperation" : "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/46ec38dfbb4b463b8d2f2d971e393cfa/pending" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/restore/46ec38dfbb4b463b8d2f2d971e393cfa/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:18:25 GMT", + "server" : "Kestrel", + "content-length" : "180", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "465", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"endTime\":null,\"error\":{\"code\":null,\"innererror\":null,\"message\":null},\"jobId\":\"46ec38dfbb4b463b8d2f2d971e393cfa\",\"startTime\":1599272302,\"status\":\"InProgress\",\"statusDetails\":null}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/restore/46ec38dfbb4b463b8d2f2d971e393cfa/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:18:43 GMT", + "server" : "Kestrel", + "content-length" : "233", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "447", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"endTime\":1599272322,\"error\":null,\"jobId\":\"46ec38dfbb4b463b8d2f2d971e393cfa\",\"startTime\":1599272302,\"status\":\"Succeeded\",\"statusDetails\":\"Number of successful key versions restored: 0, Number of key versions could not overwrite: 4\"}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net/restore/46ec38dfbb4b463b8d2f2d971e393cfa/pending?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Sat, 05 Sep 2020 02:18:43 GMT", + "server" : "Kestrel", + "content-length" : "233", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200904-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "449", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "x-ms-keyvault-region" : "EASTUS", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "5a8f20bc-eee5-11ea-bf6e-0242ac120003", + "Body" : "{\"endTime\":1599272322,\"error\":null,\"jobId\":\"46ec38dfbb4b463b8d2f2d971e393cfa\",\"startTime\":1599272302,\"status\":\"Succeeded\",\"statusDetails\":\"Number of successful key versions restored: 0, Number of key versions could not overwrite: 4\"}" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/createRoleAssignment.json b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/createRoleAssignment.json new file mode 100644 index 0000000000000..ec3f5e763add3 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/createRoleAssignment.json @@ -0,0 +1,52 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "6428", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200903-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "1", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "3afdb3e2-ee38-11ea-8011-0242ac120004", + "Body" : "{\"value\":[{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"name\":\"a290e904-7015-4bba-90c8-60543313cdb4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\",\"Microsoft.KeyVault/managedHsm/securitydomain/download/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/read\",\"Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read\",\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/restore/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/restore/status/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"name\":\"515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Officer\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"name\":\"21dbd100-6940-42c2-9190-5d6cb909625b\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto User\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"name\":\"4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Policy Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"name\":\"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Auditor\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17\",\"name\":\"33413926-3206-4cdd-b39a-83574fe37a17\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Service Encryption\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"name\":\"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Backup\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"}]}" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleAssignments/d0bedeb4-7431-407d-81cd-278929c98218?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "content-length" : "398", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "347", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "3afdb3e2-ee38-11ea-8011-0242ac120004", + "Body" : "{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/d0bedeb4-7431-407d-81cd-278929c98218\",\"name\":\"d0bedeb4-7431-407d-81cd-278929c98218\",\"properties\":{\"principalId\":\"49acc88b-8f9e-4619-9856-16691db66767\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"}" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/deleteRoleAssignment.json b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/deleteRoleAssignment.json new file mode 100644 index 0000000000000..f9cc1e2e3e250 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/deleteRoleAssignment.json @@ -0,0 +1,75 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "6428", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200903-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "1", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "e0fcdf70-ee33-11ea-934a-0242ac120003", + "Body" : "{\"value\":[{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"name\":\"a290e904-7015-4bba-90c8-60543313cdb4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\",\"Microsoft.KeyVault/managedHsm/securitydomain/download/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/read\",\"Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read\",\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/restore/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/restore/status/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"name\":\"515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Officer\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"name\":\"21dbd100-6940-42c2-9190-5d6cb909625b\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto User\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"name\":\"4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Policy Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"name\":\"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Auditor\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17\",\"name\":\"33413926-3206-4cdd-b39a-83574fe37a17\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Service Encryption\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"name\":\"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Backup\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"}]}" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleAssignments/33785c35-4196-46b5-9d99-d5bcb2b9ca1d?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "content-length" : "398", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "362", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "e0fcdf70-ee33-11ea-934a-0242ac120003", + "Body" : "{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/33785c35-4196-46b5-9d99-d5bcb2b9ca1d\",\"name\":\"33785c35-4196-46b5-9d99-d5bcb2b9ca1d\",\"properties\":{\"principalId\":\"49acc88b-8f9e-4619-9856-16691db66767\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"}" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleAssignments/33785c35-4196-46b5-9d99-d5bcb2b9ca1d?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "398", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "338", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "e0fcdf70-ee33-11ea-934a-0242ac120003", + "Body" : "{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/33785c35-4196-46b5-9d99-d5bcb2b9ca1d\",\"name\":\"33785c35-4196-46b5-9d99-d5bcb2b9ca1d\",\"properties\":{\"principalId\":\"49acc88b-8f9e-4619-9856-16691db66767\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"}" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/getRoleAssignment.json b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/getRoleAssignment.json new file mode 100644 index 0000000000000..1f9e1187ff442 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/getRoleAssignment.json @@ -0,0 +1,76 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "6428", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200903-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "1", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "6f025072-ee3c-11ea-b181-0242ac120006", + "Body" : "{\"value\":[{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"name\":\"a290e904-7015-4bba-90c8-60543313cdb4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\",\"Microsoft.KeyVault/managedHsm/securitydomain/download/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/read\",\"Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read\",\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/restore/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/restore/status/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"name\":\"515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Officer\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"name\":\"21dbd100-6940-42c2-9190-5d6cb909625b\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto User\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"name\":\"4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Policy Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"name\":\"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Auditor\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17\",\"name\":\"33413926-3206-4cdd-b39a-83574fe37a17\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Service Encryption\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"name\":\"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Backup\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"}]}" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleAssignments/658d6c14-98c2-4a53-a523-be8609eb7f8b?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "content-length" : "398", + "x-frame-options" : "SAMEORIGIN", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "265", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "6f025072-ee3c-11ea-b181-0242ac120006", + "Body" : "{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/658d6c14-98c2-4a53-a523-be8609eb7f8b\",\"name\":\"658d6c14-98c2-4a53-a523-be8609eb7f8b\",\"properties\":{\"principalId\":\"49acc88b-8f9e-4619-9856-16691db66767\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleAssignments/658d6c14-98c2-4a53-a523-be8609eb7f8b?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "398", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200903-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "0", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "6f025072-ee3c-11ea-b181-0242ac120006", + "Body" : "{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/658d6c14-98c2-4a53-a523-be8609eb7f8b\",\"name\":\"658d6c14-98c2-4a53-a523-be8609eb7f8b\",\"properties\":{\"principalId\":\"49acc88b-8f9e-4619-9856-16691db66767\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"}" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/listRoleAssignments.json b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/listRoleAssignments.json new file mode 100644 index 0000000000000..319affbd94404 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/listRoleAssignments.json @@ -0,0 +1,52 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "2804", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200903-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "1", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "3afdb3e2-ee38-11ea-8011-0242ac120004", + "Body" : "{\"value\":[{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/c2883562-e186-42ef-aff3-0acbe297c1ca\",\"name\":\"c2883562-e186-42ef-aff3-0acbe297c1ca\",\"properties\":{\"principalId\":\"c9cea829-776d-41db-9bd6-8bc6f63b507a\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/967a0ebd-73a1-0145-85fc-3b6514ac2581\",\"name\":\"967a0ebd-73a1-0145-85fc-3b6514ac2581\",\"properties\":{\"principalId\":\"e7941875-b7e4-4ba2-9527-d3ef2a9b58fa\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/ca7d5f7e-130d-43e1-b6a4-644c0e18f457\",\"name\":\"ca7d5f7e-130d-43e1-b6a4-644c0e18f457\",\"properties\":{\"principalId\":\"c2101ce9-648a-4bbe-8f0e-3e891ff1658d\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/8e7fe831-35fe-0488-beaf-5b0866306cbb\",\"name\":\"8e7fe831-35fe-0488-beaf-5b0866306cbb\",\"properties\":{\"principalId\":\"4f584d72-47b3-48d1-971c-ce0ae8a47560\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/65e1be51-aa38-4250-967a-8658fdfb260b\",\"name\":\"65e1be51-aa38-4250-967a-8658fdfb260b\",\"properties\":{\"principalId\":\"49acc88b-8f9e-4619-9856-16691db66767\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/1587adcd-1227-4799-03dc-a4194c659c07\",\"name\":\"1587adcd-1227-4799-03dc-a4194c659c07\",\"properties\":{\"principalId\":\"2bca474d-4fac-495d-919a-30376e0fe515\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/129c2001-45e7-0814-13d0-9d933e794b37\",\"name\":\"129c2001-45e7-0814-13d0-9d933e794b37\",\"properties\":{\"principalId\":\"d0596a07-8d8d-433f-a25e-5c6f46787784\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"}]}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "2804", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200903-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "1", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "3afdb3e2-ee38-11ea-8011-0242ac120004", + "Body" : "{\"value\":[{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/c2883562-e186-42ef-aff3-0acbe297c1ca\",\"name\":\"c2883562-e186-42ef-aff3-0acbe297c1ca\",\"properties\":{\"principalId\":\"c9cea829-776d-41db-9bd6-8bc6f63b507a\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/967a0ebd-73a1-0145-85fc-3b6514ac2581\",\"name\":\"967a0ebd-73a1-0145-85fc-3b6514ac2581\",\"properties\":{\"principalId\":\"e7941875-b7e4-4ba2-9527-d3ef2a9b58fa\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/ca7d5f7e-130d-43e1-b6a4-644c0e18f457\",\"name\":\"ca7d5f7e-130d-43e1-b6a4-644c0e18f457\",\"properties\":{\"principalId\":\"c2101ce9-648a-4bbe-8f0e-3e891ff1658d\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/8e7fe831-35fe-0488-beaf-5b0866306cbb\",\"name\":\"8e7fe831-35fe-0488-beaf-5b0866306cbb\",\"properties\":{\"principalId\":\"4f584d72-47b3-48d1-971c-ce0ae8a47560\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/65e1be51-aa38-4250-967a-8658fdfb260b\",\"name\":\"65e1be51-aa38-4250-967a-8658fdfb260b\",\"properties\":{\"principalId\":\"49acc88b-8f9e-4619-9856-16691db66767\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/1587adcd-1227-4799-03dc-a4194c659c07\",\"name\":\"1587adcd-1227-4799-03dc-a4194c659c07\",\"properties\":{\"principalId\":\"2bca474d-4fac-495d-919a-30376e0fe515\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"},{\"id\":\"/providers/Microsoft.Authorization/roleAssignments/129c2001-45e7-0814-13d0-9d933e794b37\",\"name\":\"129c2001-45e7-0814-13d0-9d933e794b37\",\"properties\":{\"principalId\":\"d0596a07-8d8d-433f-a25e-5c6f46787784\",\"roleDefinitionId\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"scope\":\"/\"},\"type\":\"Microsoft.Authorization/roleAssignments\"}]}" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/listRoleDefinitions.json b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/listRoleDefinitions.json new file mode 100644 index 0000000000000..898fcc156451e --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/resources/session-records/listRoleDefinitions.json @@ -0,0 +1,52 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "6428", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200903-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "1", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "e0fcdf70-ee33-11ea-934a-0242ac120003", + "Body" : "{\"value\":[{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"name\":\"a290e904-7015-4bba-90c8-60543313cdb4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\",\"Microsoft.KeyVault/managedHsm/securitydomain/download/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/read\",\"Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read\",\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/restore/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/restore/status/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"name\":\"515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Officer\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"name\":\"21dbd100-6940-42c2-9190-5d6cb909625b\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto User\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"name\":\"4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Policy Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"name\":\"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Auditor\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17\",\"name\":\"33413926-3206-4cdd-b39a-83574fe37a17\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Service Encryption\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"name\":\"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Backup\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"}]}" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.chriss-eu2.managedhsm-int.azure-int.net///providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "6428", + "x-frame-options" : "SAMEORIGIN", + "x-ms-build-version" : "1.0.20200903-1-42b8eab8-develop", + "retry-after" : "0", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-server-latency" : "0", + "content-security-policy" : "default-src 'self'", + "x-content-type-options" : "nosniff", + "content-type" : "application/json; charset=utf-8", + "x-ms-keyvault-region" : "EASTUS", + "x-ms-keyvault-network-info" : "addr=174.127.169.154", + "cache-control" : "no-cache", + "x-ms-request-id" : "e0fcdf70-ee33-11ea-934a-0242ac120003", + "Body" : "{\"value\":[{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4\",\"name\":\"a290e904-7015-4bba-90c8-60543313cdb4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\",\"Microsoft.KeyVault/managedHsm/securitydomain/download/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/action\",\"Microsoft.KeyVault/managedHsm/securitydomain/upload/read\",\"Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read\",\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/restore/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/restore/status/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"name\":\"515eb02d-2335-4d2d-92f2-b1cbdf9c3778\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/restore/action\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/delete\",\"Microsoft.KeyVault/managedHsm/keys/export/action\",\"Microsoft.KeyVault/managedHsm/keys/import/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Officer\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b\",\"name\":\"21dbd100-6940-42c2-9190-5d6cb909625b\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/write/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\",\"Microsoft.KeyVault/managedHsm/keys/create\",\"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\"Microsoft.KeyVault/managedHsm/keys/sign/action\",\"Microsoft.KeyVault/managedHsm/keys/verify/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto User\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"name\":\"4bd23610-cdcf-4971-bdee-bdc562cc28e4\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Policy Administrator\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"name\":\"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Auditor\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17\",\"name\":\"33413926-3206-4cdd-b39a-83574fe37a17\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/keys/read/action\",\"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\"Microsoft.KeyVault/managedHsm/keys/unwrap/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Crypto Service Encryption\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"},{\"id\":\"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"name\":\"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8\",\"properties\":{\"assignableScopes\":[\"/\"],\"description\":\"\",\"permissions\":[{\"actions\":[],\"dataActions\":[\"Microsoft.KeyVault/managedHsm/backup/start/action\",\"Microsoft.KeyVault/managedHsm/backup/status/action\",\"Microsoft.KeyVault/managedHsm/keys/backup/action\"],\"notActions\":[],\"notDataActions\":[]}],\"roleName\":\"Managed HSM Backup\",\"type\":\"\"},\"type\":\"Microsoft.Authorization/roleDefinitions\"}]}" + }, + "Exception" : null + } ], + "variables" : [ ] +} From 4edb33a28a4c9a66d4b57345815d01afd39c6ab8 Mon Sep 17 00:00:00 2001 From: vinagesh Date: Tue, 8 Sep 2020 12:41:14 -0700 Subject: [PATCH 132/168] feat(digital-twins): Add query API implementation (#14910) --- .../azure-digitaltwins-core/API design.md | 53 -------- .../core/DigitalTwinsAsyncClient.java | 125 ++++++++++++++++++ .../digitaltwins/core/DigitalTwinsClient.java | 50 +++++++ 3 files changed, 175 insertions(+), 53 deletions(-) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/API design.md b/sdk/digitaltwins/azure-digitaltwins-core/API design.md index 9750ccf0b3d92..36ae41ea90237 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/API design.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/API design.md @@ -770,59 +770,6 @@ public DigitalTwinsResponse updateComponentWithResponse(String digitalTwin ``` -## Query -

    Async APIs - - ```java - /** - * Query digital twins. - * - * @param query The query string, in SQL-like syntax. - * @return A {@link PagedFlux} of application/json for the query result items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux query(String query) - - /** - * Query digital twins. - * - * @param query The query string, in SQL-like syntax. - * @param clazz The model class to convert the query response to. - * @param The generic type to convert the query response to. - * @return A {@link PagedFlux} of application/json for the query result items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux query(String query, Class clazz) - ``` -
    - -
    Sync APIs - -```java -/** -* Query digital twins. -* -* @param query The query string, in SQL-like syntax. -* @param context Additional context that is passed through the Http pipeline during the service call. -* @return A {@link PagedIterable} of application/json for the query result items. -*/ -@ServiceMethod(returns = ReturnType.COLLECTION) -public PagedIterable query(String query, Context context) - -/** -* Query digital twins. -* -* @param query The query string, in SQL-like syntax. -* @param context Additional context that is passed through the Http pipeline during the service call. -* @param clazz The model class to convert the query response to. -* @param The generic type to convert the query response to. -* @return A {@link PagedIterable} of application/json for the query result items. -*/ -@ServiceMethod(returns = ReturnType.COLLECTION) -public PagedIterable query(String query, Class clazz, Context context) -``` -
    - ## Models
    Examples A model defines the properties, components, and relationships of a given digital twin. A sample model can be seen below diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 5ef8f999fa02d..e4c54bcfeb47f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -15,6 +15,7 @@ import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImplBuilder; import com.azure.digitaltwins.core.implementation.converters.ModelDataConverter; import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; +import com.azure.digitaltwins.core.implementation.models.QuerySpecification; import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; @@ -1067,4 +1068,128 @@ Mono> updateComponentWithResponse(String digitalTwinI return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null, twinHeaders)); }); } + + /** + * Query digital twins. + * @param query The query string, in SQL-like syntax. + * @return A {@link PagedFlux} of application/json query result items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux query(String query) { + return new PagedFlux<>( + () -> withContext(context -> queryFirstPage(query, context)), + nextLink -> withContext(context -> queryNextPage(nextLink, context))); + } + + PagedFlux query(String query, Context context) { + return new PagedFlux<>( + () -> queryFirstPage(query, context), + nextLink -> queryNextPage(nextLink, context)); + } + + /** + * Query digital twins. + * @param query The query string, in SQL-like syntax. + * @param clazz The model class to convert the query response to. + * @param The generic type to convert the query response to. + * @return A {@link PagedFlux} of application/json of the specified type. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux query(String query, Class clazz) { + return new PagedFlux( + () -> withContext(context -> queryFirstPage(query, clazz, context)), + nextLink -> withContext(context -> queryNextPage(nextLink, clazz, context))); + } + + PagedFlux query(String query, Class clazz, Context context) { + return new PagedFlux<>( + () -> queryFirstPage(query, clazz, context), + nextLink -> queryNextPage(nextLink, clazz, context)); + } + + Mono> queryFirstPage(String query, Context context) { + QuerySpecification querySpecification = new QuerySpecification().setQuery(query); + + return protocolLayer + .getQueries() + .queryTwinsWithResponseAsync(querySpecification, context) + .map(objectPagedResponse -> new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + objectPagedResponse.getValue().getItems().stream() + .map(object -> { + try { + return mapper.writeValueAsString(object); + } catch (JsonProcessingException e) { + logger.error("JsonProcessingException occurred while retrieving query result items: ", e); + throw new RuntimeException("JsonProcessingException occurred while retrieving query result items", e); + } + }) + .filter(Objects::nonNull) + .collect(Collectors.toList()), + objectPagedResponse.getValue().getContinuationToken(), + objectPagedResponse.getDeserializedHeaders())); + } + + Mono> queryFirstPage(String query, Class clazz, Context context) { + QuerySpecification querySpecification = new QuerySpecification().setQuery(query); + + return protocolLayer + .getQueries() + .queryTwinsWithResponseAsync(querySpecification, context) + .map(objectPagedResponse -> new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + objectPagedResponse.getValue().getItems().stream() + .map(object -> mapper.convertValue(object, clazz)) + .filter(Objects::nonNull) + .collect(Collectors.toList()), + objectPagedResponse.getValue().getContinuationToken(), + objectPagedResponse.getDeserializedHeaders())); + } + + Mono> queryNextPage(String nextLink, Context context) { + QuerySpecification querySpecification = new QuerySpecification().setContinuationToken(nextLink); + + return protocolLayer + .getQueries() + .queryTwinsWithResponseAsync(querySpecification, context) + .map(objectPagedResponse -> new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + objectPagedResponse.getValue().getItems().stream() + .map(object -> { + try { + return mapper.writeValueAsString(object); + } catch (JsonProcessingException e) { + logger.error("JsonProcessingException occurred while retrieving query result items: ", e); + throw new RuntimeException("JsonProcessingException occurred while retrieving query result items", e); + } + }) + .filter(Objects::nonNull) + .collect(Collectors.toList()), + objectPagedResponse.getValue().getContinuationToken(), + objectPagedResponse.getDeserializedHeaders())); + } + + Mono> queryNextPage(String nextLink, Class clazz, Context context) { + QuerySpecification querySpecification = new QuerySpecification().setContinuationToken(nextLink); + + return protocolLayer + .getQueries() + .queryTwinsWithResponseAsync(querySpecification, context) + .map(objectPagedResponse -> new PagedResponseBase<>( + objectPagedResponse.getRequest(), + objectPagedResponse.getStatusCode(), + objectPagedResponse.getHeaders(), + objectPagedResponse.getValue().getItems().stream() + .map(object -> mapper.convertValue(object, clazz)) + .filter(Objects::nonNull) + .collect(Collectors.toList()), + objectPagedResponse.getValue().getContinuationToken(), + objectPagedResponse.getDeserializedHeaders())); + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 75aa1ec6770a3..cba238e16d2e9 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -636,4 +636,54 @@ public void updateComponent(String digitalTwinId, String componentPath, List updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, UpdateComponentRequestOptions options, Context context) { return digitalTwinsAsyncClient.updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context).block(); } + + /** + * Query digital twins. + * + * @param query The query string, in SQL-like syntax. + * @return A {@link PagedIterable} of application/json query result items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable query(String query) { + return query(query, Context.NONE); + } + + /** + * Query digital twins. + * + * @param query The query string, in SQL-like syntax. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link PagedIterable} of application/json query result items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable query(String query, Context context) { + return new PagedIterable<>(digitalTwinsAsyncClient.query(query, context)); + } + + /** + * Query digital twins. + * + * @param query The query string, in SQL-like syntax. + * @param clazz The model class to convert the query response to. + * @param The generic type to convert the query response to. + * @return A {@link PagedIterable} of application/json query result items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable query(String query, Class clazz) { + return query(query, clazz, Context.NONE); + } + + /** + * Query digital twins. + * + * @param query The query string, in SQL-like syntax. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @param clazz The model class to convert the query response to. + * @param The generic type to convert the query response to. + * @return A {@link PagedIterable} of application/json query result items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable query(String query, Class clazz, Context context) { + return new PagedIterable<>(digitalTwinsAsyncClient.query(query, clazz, context)); + } } From 6c6a2756fb37aed304026e3572c017ba5abef644 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Tue, 8 Sep 2020 13:10:29 -0700 Subject: [PATCH 133/168] Add scripts to update session records and building the project (#14911) --- .../azure-digitaltwins-core/build.ps1 | 16 ++++++++++++++++ .../update-recorded-sessions.ps1 | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/build.ps1 create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/update-recorded-sessions.ps1 diff --git a/sdk/digitaltwins/azure-digitaltwins-core/build.ps1 b/sdk/digitaltwins/azure-digitaltwins-core/build.ps1 new file mode 100644 index 0000000000000..7a199c91fb20e --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/build.ps1 @@ -0,0 +1,16 @@ +# Builds the azure-digitaltwins-core project +# The output will be in the target directory. +# You can use the generated azure-digitaltwins-core-x-sources.jar to upload to the API review tool at https://apiview.dev/ + +param ( + + [Parameter(Mandatory = $false)] + [switch] $skipTests +) + +if($skipTests) { + mvn install -DskipTests +} +else { + mvn install +} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/update-recorded-sessions.ps1 b/sdk/digitaltwins/azure-digitaltwins-core/update-recorded-sessions.ps1 new file mode 100644 index 0000000000000..34860c078fd04 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/update-recorded-sessions.ps1 @@ -0,0 +1,11 @@ + + +$sourceSessionRecordPath = ".\target\test-classes\session-records\" +$targetSessionRecordPath = ".\src\test\resources\" + +if (-not (Test-Path -Path $sourceSessionRecordPath)) +{ + Write-Host("Ensure you have run the tests in Record mode. $sessionRecordPath does not exist`n") +} + +Copy-Item -Path $sourceSessionRecordPath -Destination $targetSessionRecordPath -Force -Recurse -Container \ No newline at end of file From 259e63f6ebf3bb0d2d5b661b249e8e2296620646 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Tue, 8 Sep 2020 14:01:28 -0700 Subject: [PATCH 134/168] Fix HttpRequest Body Being Consumed and Sending an Empty Request Body (#14915) * Fix AppConfiguration live tests * Update Form Recognizer and Text Analytics as additional validation, fix version checks --- eng/versioning/version_client.txt | 5 +++++ .../azure-data-appconfiguration/pom.xml | 10 +++++----- .../main/java/com/azure/core/http/rest/RestProxy.java | 4 ++-- sdk/formrecognizer/azure-ai-formrecognizer/pom.xml | 10 +++++----- sdk/identity/azure-identity/pom.xml | 4 ++-- sdk/textanalytics/azure-ai-textanalytics/pom.xml | 10 +++++----- 6 files changed, 24 insertions(+), 19 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f91905615797d..cb8eeac483c40 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -130,6 +130,11 @@ com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;1.2.8-beta.1;1.2. # Format; # unreleased_:;dependency-version # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. +unreleased_com.azure:azure-core;1.9.0-beta.1 +unreleased_com.azure:azure-core-test;1.5.0-beta.1 +unreleased_com.azure:azure-core-http-netty;1.7.0-beta.1 +unreleased_com.azure:azure-core-http-okhttp;1.4.0-beta.1 +unreleased_com.azure:azure-identity;1.2.0-beta.1 unreleased_com.azure:azure-core-amqp;1.5.0-beta.1 unreleased_com.azure:azure-messaging-servicebus;7.0.0-beta.5 unreleased_com.azure:azure-security-keyvault-keys;4.3.0-beta.1 diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 49743d4228d2f..2ff392161f545 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.8.0 + 1.9.0-beta.1 com.azure azure-core-http-netty - 1.6.0 + 1.7.0-beta.1 com.azure azure-core-test - 1.4.1 + 1.5.0-beta.1 test com.azure azure-core-http-okhttp - 1.3.0 + 1.4.0-beta.1 test @@ -90,7 +90,7 @@ com.azure azure-identity - 1.1.0 + 1.2.0-beta.1 test diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java index c5144ce8f81fc..6582d6193ad77 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java @@ -279,7 +279,7 @@ private HttpRequest configRequest(final HttpRequest request, final SwaggerMethod serializer.serialize(bodyContentObject, SerializerEncoding.JSON, stream); request.setHeader("Content-Length", String.valueOf(stream.size())); - request.setBody(Flux.just(ByteBuffer.wrap(stream.toByteArray(), 0, stream.size()))); + request.setBody(Flux.defer(() -> Flux.just(ByteBuffer.wrap(stream.toByteArray(), 0, stream.size())))); } else if (FluxUtil.isFluxByteBuffer(methodParser.getBodyJavaType())) { // Content-Length or Transfer-Encoding: chunked must be provided by a user-specified header when a // Flowable is given for the body. @@ -298,7 +298,7 @@ private HttpRequest configRequest(final HttpRequest request, final SwaggerMethod serializer.serialize(bodyContentObject, SerializerEncoding.fromHeaders(request.getHeaders()), stream); request.setHeader("Content-Length", String.valueOf(stream.size())); - request.setBody(Flux.just(ByteBuffer.wrap(stream.toByteArray(), 0, stream.size()))); + request.setBody(Flux.defer(() -> Flux.just(ByteBuffer.wrap(stream.toByteArray(), 0, stream.size())))); } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index cba43d5f080b3..1560a251de677 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.8.0 + 1.9.0-beta.1 com.azure azure-core-http-netty - 1.6.0 + 1.7.0-beta.1 com.azure azure-core-test - 1.4.1 + 1.5.0-beta.1 test com.azure azure-core-http-okhttp - 1.3.0 + 1.4.0-beta.1 test @@ -78,7 +78,7 @@ com.azure azure-identity - 1.1.0 + 1.2.0-beta.1 test diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index fd9b15a1d0fb6..415ab05714fc9 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -27,7 +27,7 @@ com.azure azure-core - 1.8.0 + 1.9.0-beta.1 com.microsoft.azure @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.7.0-beta.1 test diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index 7b8eeea35fc73..796cf748693ea 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.8.0 + 1.9.0-beta.1 com.azure azure-core-http-netty - 1.6.0 + 1.7.0-beta.1 + 1.5.0-beta.1 test com.azure azure-core-http-okhttp - 1.3.0 + 1.4.0-beta.1 test @@ -88,7 +88,7 @@ com.azure azure-identity - 1.1.0 + 1.2.0-beta.1 test From eee7889f35c21290e93edd73616e1a564e1a228d Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 8 Sep 2020 14:11:14 -0700 Subject: [PATCH 135/168] Updated the ci.yml for publishing the new Key Vault Administration package (#14914) * Updated the ci.yml file for publishing the new Key Vault Administration package. * Fixed Javadoc issue. * Fixed checkstyle and spotbugs errors. --- .../checkstyle/checkstyle-suppressions.xml | 9 +- .../KeyVaultAccessControlAsyncClient.java | 207 +++++++++--------- .../KeyVaultAccessControlClient.java | 7 +- .../KeyVaultAccessControlClientBuilder.java | 8 +- .../KeyVaultBackupAsyncClient.java | 19 +- .../KeyVaultBackupClientBuilder.java | 8 +- .../administration/models/KeyVaultError.java | 6 +- .../models/KeyVaultPermission.java | 8 +- .../models/KeyVaultRoleAssignment.java | 10 +- .../KeyVaultRoleAssignmentProperties.java | 10 +- .../models/KeyVaultRoleDefinition.java | 11 +- .../KeyVaultRoleDefinitionProperties.java | 10 +- .../KeyVaultAccessControlAsyncClientTest.java | 3 + .../KeyVaultAdministrationClientTestBase.java | 17 +- .../KeyVaultBackupAsyncClientTest.java | 5 +- .../KeyVaultBackupClientTest.java | 3 + .../KeyVaultBackupClientTestBase.java | 3 + sdk/keyvault/ci.yml | 3 + 18 files changed, 198 insertions(+), 149 deletions(-) diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index bf5ae0bed99ee..24f91ca6b0cf2 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -299,6 +299,10 @@ + + - + + @@ -420,6 +425,8 @@ + + diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java index ba8ccdb048eab..c84e917b59829 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java @@ -19,8 +19,18 @@ import com.azure.security.keyvault.administration.implementation.KeyVaultAccessControlClientImpl; import com.azure.security.keyvault.administration.implementation.KeyVaultAccessControlClientImplBuilder; import com.azure.security.keyvault.administration.implementation.KeyVaultErrorCodeStrings; -import com.azure.security.keyvault.administration.implementation.models.*; -import com.azure.security.keyvault.administration.models.*; +import com.azure.security.keyvault.administration.implementation.models.Permission; +import com.azure.security.keyvault.administration.implementation.models.RoleAssignment; +import com.azure.security.keyvault.administration.implementation.models.RoleAssignmentCreateParameters; +import com.azure.security.keyvault.administration.implementation.models.RoleAssignmentProperties; +import com.azure.security.keyvault.administration.implementation.models.RoleAssignmentPropertiesWithScope; +import com.azure.security.keyvault.administration.implementation.models.RoleDefinition; +import com.azure.security.keyvault.administration.models.KeyVaultPermission; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignment; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentProperties; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentScope; +import com.azure.security.keyvault.administration.models.KeyVaultRoleDefinition; +import com.azure.security.keyvault.administration.models.KeyVaultRoleDefinitionProperties; import reactor.core.publisher.Mono; import java.io.IOException; @@ -142,7 +152,7 @@ Mono> listRoleDefinitionsFirstPage(String .doOnSuccess(response -> logger.info("Listed role definitions for roleScope - {}", roleScope)) .doOnError(error -> logger.warning(String.format("Failed to list role definitions for roleScope - %s", roleScope), error)) - .map(this::transformRoleDefinitionsPagedResponse); + .map(KeyVaultAccessControlAsyncClient::transformRoleDefinitionsPagedResponse); } catch (RuntimeException e) { return monoError(logger, e); } @@ -168,7 +178,7 @@ Mono> listRoleDefinitionsNextPage(String c .doOnSuccess(response -> logger.info("Listed next role definitions page - Page {}", continuationToken)) .doOnError(error -> logger.warning("Failed to list next role definitions page - Page {}", continuationToken, error)) - .map(this::transformRoleDefinitionsPagedResponse); + .map(KeyVaultAccessControlAsyncClient::transformRoleDefinitionsPagedResponse); } catch (RuntimeException e) { return monoError(logger, e); } @@ -230,7 +240,7 @@ Mono> listRoleAssignmentsFirstPage(String .doOnSuccess(response -> logger.info("Listed role assignments for roleScope - {}", roleScope)) .doOnError(error -> logger.warning(String.format("Failed to list role assignments for roleScope - %s", roleScope), error)) - .map(this::transformRoleAssignmentsPagedResponse); + .map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentsPagedResponse); } catch (RuntimeException e) { return monoError(logger, e); } @@ -256,7 +266,7 @@ Mono> listRoleAssignmentsNextPage(String c .doOnSuccess(response -> logger.info("Listed next role assignments page - Page {}", continuationToken)) .doOnError(error -> logger.warning("Failed to list next role assignments page - Page {}", continuationToken, error)) - .map(this::transformRoleAssignmentsPagedResponse); + .map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentsPagedResponse); } catch (RuntimeException e) { return monoError(logger, e); } @@ -364,7 +374,7 @@ Mono> createRoleAssignmentWithResponse(KeyVault .doOnRequest(ignored -> logger.info("Creating role assignment - {}", name)) .doOnSuccess(response -> logger.info("Created role assignment - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to create role assignment - {}", name, error)) - .map(this::transformRoleAssignmentResponse); + .map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentResponse); } /** @@ -422,7 +432,7 @@ Mono> getRoleAssignmentWithResponse(KeyVaultRol .doOnRequest(ignored -> logger.info("Retrieving role assignment - {}", name)) .doOnSuccess(response -> logger.info("Retrieved role assignment - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to retrieved role assignment - {}", name, error)) - .map(this::transformRoleAssignmentResponse); + .map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentResponse); } catch (RuntimeException e) { return monoError(logger, e); } @@ -483,83 +493,30 @@ Mono> deleteRoleAssignmentWithResponse(KeyVault .doOnRequest(ignored -> logger.info("Deleting role assignment - {}", name)) .doOnSuccess(response -> logger.info("Deleted role assignment - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to delete role assignment - {}", name, error)) - .map(this::transformRoleAssignmentResponse); + .map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentResponse); } catch (RuntimeException e) { return monoError(logger, e); } } - private PagedResponse transformRoleDefinitionsPagedResponse(PagedResponse pagedResponse) { + @SuppressWarnings("BoundedWildcard") + private static PagedResponse transformRoleDefinitionsPagedResponse(PagedResponse pagedResponse) { List keyVaultRoleDefinitions = new ArrayList<>(); for (RoleDefinition roleDefinition : pagedResponse.getValue()) { keyVaultRoleDefinitions.add(roleDefinitionToKeyVaultRoleDefinition(roleDefinition)); } - return new PagedResponse() { - @Override - public void close() throws IOException { - } - - @Override - public IterableStream getElements() { - return new IterableStream<>(keyVaultRoleDefinitions); - } - - @Override - public String getContinuationToken() { - return pagedResponse.getContinuationToken(); - } - - @Override - public int getStatusCode() { - return pagedResponse.getStatusCode(); - } - - @Override - public HttpHeaders getHeaders() { - return pagedResponse.getHeaders(); - } - - @Override - public HttpRequest getRequest() { - return pagedResponse.getRequest(); - } - - @Override - public List getValue() { - return keyVaultRoleDefinitions; - } - }; + return new TransformedPagedResponse<>(keyVaultRoleDefinitions, pagedResponse); } - private Response transformRoleAssignmentResponse(Response response) { + private static Response transformRoleAssignmentResponse(Response response) { KeyVaultRoleAssignment keyVaultRoleAssignment = roleAssignmentToKeyVaultRoleAssignment(response.getValue()); - return new Response() { - @Override - public int getStatusCode() { - return response.getStatusCode(); - } - - @Override - public HttpHeaders getHeaders() { - return response.getHeaders(); - } - - @Override - public HttpRequest getRequest() { - return response.getRequest(); - } - - @Override - public KeyVaultRoleAssignment getValue() { - return keyVaultRoleAssignment; - } - }; + return new TransformedResponse<>(keyVaultRoleAssignment, response); } - private KeyVaultRoleDefinition roleDefinitionToKeyVaultRoleDefinition(RoleDefinition roleDefinition) { + private static KeyVaultRoleDefinition roleDefinitionToKeyVaultRoleDefinition(RoleDefinition roleDefinition) { List keyVaultPermissions = new ArrayList<>(); for (Permission permission : roleDefinition.getPermissions()) { @@ -574,55 +531,95 @@ private KeyVaultRoleDefinition roleDefinitionToKeyVaultRoleDefinition(RoleDefini roleDefinition.getAssignableScopes())); } - private PagedResponse transformRoleAssignmentsPagedResponse(PagedResponse pagedResponse) { + private static PagedResponse transformRoleAssignmentsPagedResponse(PagedResponse pagedResponse) { List keyVaultRoleAssignments = new ArrayList<>(); for (RoleAssignment roleAssignment : pagedResponse.getValue()) { keyVaultRoleAssignments.add(roleAssignmentToKeyVaultRoleAssignment(roleAssignment)); } - return new PagedResponse() { - @Override - public void close() throws IOException { - } - - @Override - public IterableStream getElements() { - return new IterableStream<>(keyVaultRoleAssignments); - } - - @Override - public String getContinuationToken() { - return pagedResponse.getContinuationToken(); - } - - @Override - public int getStatusCode() { - return pagedResponse.getStatusCode(); - } - - @Override - public HttpHeaders getHeaders() { - return pagedResponse.getHeaders(); - } - - @Override - public HttpRequest getRequest() { - return pagedResponse.getRequest(); - } - - @Override - public List getValue() { - return keyVaultRoleAssignments; - } - }; + return new TransformedPagedResponse<>(keyVaultRoleAssignments, pagedResponse); } - private KeyVaultRoleAssignment roleAssignmentToKeyVaultRoleAssignment(RoleAssignment roleAssignment) { + private static KeyVaultRoleAssignment roleAssignmentToKeyVaultRoleAssignment(RoleAssignment roleAssignment) { RoleAssignmentPropertiesWithScope propertiesWithScope = roleAssignment.getProperties(); return new KeyVaultRoleAssignment(roleAssignment.getId(), roleAssignment.getName(), roleAssignment.getType(), new KeyVaultRoleAssignmentProperties(propertiesWithScope.getRoleDefinitionId(), propertiesWithScope.getPrincipalId()), KeyVaultRoleAssignmentScope.fromString(propertiesWithScope.getScope())); } + + private static final class TransformedPagedResponse, T, U> implements PagedResponse { + private final L output; + private final PagedResponse pagedResponse; + + TransformedPagedResponse(L output, PagedResponse inputPagedResponse) { + this.output = output; + this.pagedResponse = inputPagedResponse; + } + + @Override + public void close() throws IOException { + } + + @Override + public IterableStream getElements() { + return new IterableStream<>(output); + } + + @Override + public String getContinuationToken() { + return pagedResponse.getContinuationToken(); + } + + @Override + public int getStatusCode() { + return pagedResponse.getStatusCode(); + } + + @Override + public HttpHeaders getHeaders() { + return pagedResponse.getHeaders(); + } + + @Override + public HttpRequest getRequest() { + return pagedResponse.getRequest(); + } + + @Override + public List getValue() { + return output; + } + } + + private static final class TransformedResponse implements Response { + private final T output; + private final Response response; + + TransformedResponse(T output, Response response) { + this.output = output; + this.response = response; + } + + @Override + public int getStatusCode() { + return response.getStatusCode(); + } + + @Override + public HttpHeaders getHeaders() { + return response.getHeaders(); + } + + @Override + public HttpRequest getRequest() { + return response.getRequest(); + } + + @Override + public T getValue() { + return output; + } + } } diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java index d4cdcff2808ae..97044d618c6a2 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java @@ -9,7 +9,10 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.security.keyvault.administration.models.*; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignment; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentProperties; +import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentScope; +import com.azure.security.keyvault.administration.models.KeyVaultRoleDefinition; import reactor.core.publisher.Mono; import java.util.UUID; @@ -170,6 +173,7 @@ public KeyVaultRoleAssignment getRoleAssignment(KeyVaultRoleAssignmentScope role * * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. * @param name The name of the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * @return The {@link KeyVaultRoleAssignment}. * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link UUID name} are * {@code null}. @@ -198,6 +202,7 @@ public KeyVaultRoleAssignment deleteRoleAssignment(KeyVaultRoleAssignmentScope r * * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. * @param name The name of the {@link KeyVaultRoleAssignment}. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * @return The {@link KeyVaultRoleAssignment}. * @throws NullPointerException if the {@link KeyVaultRoleAssignmentScope roleScope} or {@link UUID name} are * {@code null}. diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java index 2bfa61f3a75f4..7cf60cfc7a605 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java @@ -8,7 +8,13 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java index 345fe9dfa231b..5c3c824d82584 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java @@ -20,7 +20,13 @@ import com.azure.security.keyvault.administration.implementation.KeyVaultBackupClientImplBuilder; import com.azure.security.keyvault.administration.implementation.KeyVaultErrorCodeStrings; import com.azure.security.keyvault.administration.implementation.models.Error; -import com.azure.security.keyvault.administration.implementation.models.*; +import com.azure.security.keyvault.administration.implementation.models.FullBackupOperation; +import com.azure.security.keyvault.administration.implementation.models.KeyVaultErrorException; +import com.azure.security.keyvault.administration.implementation.models.RestoreOperation; +import com.azure.security.keyvault.administration.implementation.models.RestoreOperationParameters; +import com.azure.security.keyvault.administration.implementation.models.SASTokenParameter; +import com.azure.security.keyvault.administration.implementation.models.SelectiveKeyRestoreOperation; +import com.azure.security.keyvault.administration.implementation.models.SelectiveKeyRestoreOperationParameters; import com.azure.security.keyvault.administration.models.KeyVaultBackupOperation; import com.azure.security.keyvault.administration.models.KeyVaultError; import com.azure.security.keyvault.administration.models.KeyVaultLongRunningOperation; @@ -29,6 +35,7 @@ import java.net.URL; import java.time.Duration; +import java.util.Locale; import java.util.Objects; import java.util.function.Function; @@ -196,10 +203,10 @@ private Function, Mono> backupFe } private static Mono> processBackupOperationResponse(Response response) { - String operationStatus = response.getValue().getStatus().toLowerCase(); + String operationStatus = response.getValue().getStatus().toLowerCase(Locale.US); - return Mono.just( - new PollResponse<>(toLongRunningOperationStatus(operationStatus.toLowerCase()), response.getValue())); + return Mono.just(new PollResponse<>( + toLongRunningOperationStatus(operationStatus.toLowerCase(Locale.US)), response.getValue())); } private static LongRunningOperationStatus toLongRunningOperationStatus(String operationStatus) { @@ -327,10 +334,10 @@ private Function, Mono> processRestoreOperationResponse(Response response) { - String operationStatus = response.getValue().getStatus().toLowerCase(); + String operationStatus = response.getValue().getStatus().toLowerCase(Locale.US); return Mono.just(new PollResponse<>( - toLongRunningOperationStatus(operationStatus.toLowerCase()), response.getValue())); + toLongRunningOperationStatus(operationStatus.toLowerCase(Locale.US)), response.getValue())); } /** diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java index 5231e57bd71b6..7953211e8ed9a 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java @@ -8,7 +8,13 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultError.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultError.java index 1dc9e4e71423d..16f98eba519ad 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultError.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultError.java @@ -7,9 +7,9 @@ * A class that represents an error occurred in a Key Vault operation. */ public final class KeyVaultError { - private String code; - private String message; - private KeyVaultError innerError; + private final String code; + private final String message; + private final KeyVaultError innerError; /** * Creates an object that represents an error occurred in a Key Vault operation. diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java index d987cbb040726..4ab5eaa738342 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java @@ -9,10 +9,10 @@ * A class describing allowed and denied actions and data actions of a {@link KeyVaultRoleDefinition}. */ public final class KeyVaultPermission { - private List actions; - private List deniedActions; - private List dataActions; - private List deniedDataActions; + private final List actions; + private final List deniedActions; + private final List dataActions; + private final List deniedDataActions; /** * Creates a new {@link KeyVaultPermission} with the specified allowed and denied actions and data actions. diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java index ef085aea877b3..bf4cc805e1c41 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java @@ -7,11 +7,11 @@ * A class that defines a role assignment. */ public final class KeyVaultRoleAssignment { - private String id; - private String name; - private String type; - private KeyVaultRoleAssignmentProperties properties; - private KeyVaultRoleAssignmentScope scope; + private final String id; + private final String name; + private final String type; + private final KeyVaultRoleAssignmentProperties properties; + private final KeyVaultRoleAssignmentScope scope; /** * Creates a new {@link KeyVaultRoleAssignment role assignment} with the specified details. diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java index cc0a945730e77..b35c645231664 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java @@ -11,17 +11,17 @@ * A class that defines a role assignment's properties. */ public final class KeyVaultRoleAssignmentProperties { - private String roleDefinitionId; - private String principalId; + private final String roleDefinitionId; + private final String principalId; /** * Creates a new {@link KeyVaultRoleAssignmentProperties role assignment properties} object with the specified * details. * * @param roleDefinitionId The {@link KeyVaultRoleDefinition role definition} ID used in the - * {@link KeyVaultRoleAssignment role assignment}. - * @param principalId The principal ID assigned to the role. This maps to the ID inside the Active Directory. - * It can point to a user, service principal, or security group. + * {@link KeyVaultRoleAssignment role assignment}. + * @param principalId The principal ID assigned to the role. This maps to the ID inside the Active Directory. + * It can point to a user, service principal, or security group. */ public KeyVaultRoleAssignmentProperties(String roleDefinitionId, String principalId) { Objects.requireNonNull(roleDefinitionId, diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java index 9d4a7465ffc53..f0421ccd7372e 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java @@ -3,17 +3,14 @@ package com.azure.security.keyvault.administration.models; -import java.util.List; - /** * A class that defines a role. */ public final class KeyVaultRoleDefinition { - private String id; - private String name; - private String type; - private KeyVaultRoleDefinitionProperties properties; - private List scopes; + private final String id; + private final String name; + private final String type; + private final KeyVaultRoleDefinitionProperties properties; /** * Creates a new {@link KeyVaultRoleDefinition role definition} with the specified details. diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java index 599a6ceae1f0c..fb71bfa77954f 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java @@ -9,11 +9,11 @@ * A class that defines a role definition's properties. */ public final class KeyVaultRoleDefinitionProperties { - private String roleName; - private String description; - private String roleType; - private List permissions; - private List assignableScopes; + private final String roleName; + private final String description; + private final String roleType; + private final List permissions; + private final List assignableScopes; /** * Creates a new {@link KeyVaultRoleDefinitionProperties role definition properties} object with the specified diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClientTest.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClientTest.java index 02e32e8afddac..42638b8dec3a8 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClientTest.java @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + package com.azure.security.keyvault.administration; import com.azure.core.http.HttpClient; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAdministrationClientTestBase.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAdministrationClientTestBase.java index f18bef7cec011..963200be557ab 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAdministrationClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultAdministrationClientTestBase.java @@ -1,8 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + package com.azure.security.keyvault.administration; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.ExponentialBackoff; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.RetryStrategy; +import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; import com.azure.identity.AzureCliCredentialBuilder; @@ -55,8 +66,8 @@ protected List getPolicies() { } public String getEndpoint() { - final String endpoint = interceptorManager.isPlaybackMode() ? "http://localhost:8080" : - System.getenv("AZURE_KEYVAULT_ENDPOINT"); + final String endpoint = interceptorManager.isPlaybackMode() ? "http://localhost:8080" + : System.getenv("AZURE_KEYVAULT_ENDPOINT"); Objects.requireNonNull(endpoint); return endpoint; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClientTest.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClientTest.java index 3134b16e80b7d..1d36fe080a4f3 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClientTest.java @@ -1,11 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + package com.azure.security.keyvault.administration; import com.azure.core.http.HttpClient; import com.azure.core.test.TestMode; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollResponse; -import com.azure.core.util.polling.SyncPoller; import com.azure.security.keyvault.administration.models.KeyVaultBackupOperation; import com.azure.security.keyvault.administration.models.KeyVaultRestoreOperation; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTest.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTest.java index 696f96027e68d..fcbda0b111ee4 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTest.java @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + package com.azure.security.keyvault.administration; import com.azure.core.http.HttpClient; diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTestBase.java b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTestBase.java index 91fe5dea44319..a215264cf9719 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-administration/src/test/java/com/azure/security/keyvault/administration/KeyVaultBackupClientTestBase.java @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + package com.azure.security.keyvault.administration; import com.azure.core.http.HttpClient; diff --git a/sdk/keyvault/ci.yml b/sdk/keyvault/ci.yml index 5f9e2995cdfad..331e673a980f7 100644 --- a/sdk/keyvault/ci.yml +++ b/sdk/keyvault/ci.yml @@ -48,6 +48,9 @@ extends: parameters: ServiceDirectory: keyvault Artifacts: + - name: azure-security-keyvault-administration + groupId: com.azure + safeName: azuresecuritykeyvaultadministration - name: azure-security-keyvault-certificates groupId: com.azure safeName: azuresecuritykeyvaultcertificates From 1a4077f0d68b8e6ccc2f058e8503772209982efa Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Tue, 8 Sep 2020 14:49:59 -0700 Subject: [PATCH 136/168] Release Azure Core Hotfix for HttpRequest Body Consumption Fix (#14920) * Update CHANGELOGs and READMEs in preparation for release * Update versions for release * Revert Core AMQP version changes --- eng/jacoco-test-coverage/pom.xml | 10 +++++----- eng/versioning/version_client.txt | 20 +++++++++---------- .../azure-data-appconfiguration/pom.xml | 8 ++++---- sdk/core/azure-core-amqp/pom.xml | 2 +- sdk/core/azure-core-experimental/CHANGELOG.md | 3 ++- sdk/core/azure-core-experimental/README.md | 2 +- sdk/core/azure-core-experimental/pom.xml | 2 +- .../azure-core-http-jdk-httpclient/pom.xml | 8 ++++---- sdk/core/azure-core-http-netty/CHANGELOG.md | 3 ++- sdk/core/azure-core-http-netty/README.md | 2 +- sdk/core/azure-core-http-netty/pom.xml | 10 +++++----- sdk/core/azure-core-http-okhttp/CHANGELOG.md | 3 ++- sdk/core/azure-core-http-okhttp/README.md | 2 +- sdk/core/azure-core-http-okhttp/pom.xml | 10 +++++----- sdk/core/azure-core-management/pom.xml | 4 ++-- .../CHANGELOG.md | 3 ++- .../README.md | 2 +- .../azure-core-serializer-avro-apache/pom.xml | 2 +- .../pom.xml | 2 +- .../CHANGELOG.md | 3 ++- .../azure-core-serializer-json-gson/README.md | 2 +- .../azure-core-serializer-json-gson/pom.xml | 4 ++-- .../CHANGELOG.md | 3 ++- .../README.md | 2 +- .../pom.xml | 4 ++-- sdk/core/azure-core-test/CHANGELOG.md | 3 ++- sdk/core/azure-core-test/README.md | 2 +- sdk/core/azure-core-test/pom.xml | 4 ++-- .../azure-core-tracing-opentelemetry/pom.xml | 4 ++-- sdk/core/azure-core/CHANGELOG.md | 3 ++- sdk/core/azure-core/README.md | 2 +- sdk/core/azure-core/pom.xml | 2 +- sdk/e2e/pom.xml | 6 +++--- .../azure-ai-formrecognizer/pom.xml | 8 ++++---- sdk/identity/azure-identity/pom.xml | 4 ++-- .../azure-ai-textanalytics/pom.xml | 8 ++++---- 36 files changed, 85 insertions(+), 77 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index ae4a3f2bd29e8..44c5f8d020771 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -54,7 +54,7 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 com.azure @@ -74,12 +74,12 @@ com.azure azure-core-http-netty - 1.7.0-beta.1 + 1.6.1 com.azure azure-core-http-okhttp - 1.4.0-beta.1 + 1.3.1 com.azure @@ -94,12 +94,12 @@ com.azure azure-core-serializer-json-gson - 1.1.0-beta.1 + 1.0.1 com.azure azure-core-serializer-json-jackson - 1.1.0-beta.1 + 1.0.1 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index cb8eeac483c40..fc0ff09a11df7 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -7,18 +7,18 @@ com.azure:azure-client-sdk-parent;1.7.0;1.7.0 com.azure:azure-ai-anomalydetector;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-ai-formrecognizer;3.0.0;3.1.0-beta.1 com.azure:azure-ai-textanalytics;5.0.0;5.1.0-beta.1 -com.azure:azure-core;1.8.0;1.9.0-beta.1 +com.azure:azure-core;1.8.0;1.8.1 com.azure:azure-core-amqp;1.4.0;1.5.0-beta.1 com.azure:azure-core-experimental;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-core-http-netty;1.6.0;1.7.0-beta.1 -com.azure:azure-core-http-okhttp;1.3.0;1.4.0-beta.1 +com.azure:azure-core-http-netty;1.6.0;1.6.1 +com.azure:azure-core-http-okhttp;1.3.0;1.3.1 com.azure:azure-core-management;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-core-serializer-avro-apache;1.0.0-beta.2;1.0.0-beta.3 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.0.0;1.1.0-beta.1 -com.azure:azure-core-serializer-json-jackson;1.0.0;1.1.0-beta.1 -com.azure:azure-core-test;1.4.1;1.5.0-beta.1 +com.azure:azure-core-serializer-json-gson;1.0.0;1.0.1 +com.azure:azure-core-serializer-json-jackson;1.0.0;1.0.1 +com.azure:azure-core-test;1.4.1;1.4.2 com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.6;1.0.0-beta.7 com.azure:azure-cosmos;4.3.1;4.4.0-beta.2 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 @@ -130,10 +130,10 @@ com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;1.2.8-beta.1;1.2. # Format; # unreleased_:;dependency-version # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. -unreleased_com.azure:azure-core;1.9.0-beta.1 -unreleased_com.azure:azure-core-test;1.5.0-beta.1 -unreleased_com.azure:azure-core-http-netty;1.7.0-beta.1 -unreleased_com.azure:azure-core-http-okhttp;1.4.0-beta.1 +unreleased_com.azure:azure-core;1.8.1 +unreleased_com.azure:azure-core-test;1.4.2 +unreleased_com.azure:azure-core-http-netty;1.6.1 +unreleased_com.azure:azure-core-http-okhttp;1.3.1 unreleased_com.azure:azure-identity;1.2.0-beta.1 unreleased_com.azure:azure-core-amqp;1.5.0-beta.1 unreleased_com.azure:azure-messaging-servicebus;7.0.0-beta.5 diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 2ff392161f545..07cd818567d71 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.9.0-beta.1 + 1.8.1 com.azure azure-core-http-netty - 1.7.0-beta.1 + 1.6.1 com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test com.azure azure-core-http-okhttp - 1.4.0-beta.1 + 1.3.1 test diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml index 5110e8b7dc950..a1242f343b3ce 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.9.0-beta.1 + 1.8.1 com.microsoft.azure diff --git a/sdk/core/azure-core-experimental/CHANGELOG.md b/sdk/core/azure-core-experimental/CHANGELOG.md index 56de7d38d9038..c8af5f19c35e1 100644 --- a/sdk/core/azure-core-experimental/CHANGELOG.md +++ b/sdk/core/azure-core-experimental/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.4 (2020-09-08) +- Updated `azure-core` version to pickup bug fix. ## 1.0.0-beta.3 (2020-09-03) diff --git a/sdk/core/azure-core-experimental/README.md b/sdk/core/azure-core-experimental/README.md index 92eafdb5a578d..e8f64642387e9 100644 --- a/sdk/core/azure-core-experimental/README.md +++ b/sdk/core/azure-core-experimental/README.md @@ -17,7 +17,7 @@ Azure Core Experimental contains types that are being evaluated and might eventu com.azure azure-core-experimental - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-experimental/pom.xml b/sdk/core/azure-core-experimental/pom.xml index 5550c59fe4987..ed558ca89153d 100644 --- a/sdk/core/azure-core-experimental/pom.xml +++ b/sdk/core/azure-core-experimental/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 diff --git a/sdk/core/azure-core-http-jdk-httpclient/pom.xml b/sdk/core/azure-core-http-jdk-httpclient/pom.xml index e5590b70f9a03..6fa4942e25cbc 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.9.0-beta.1 + 1.8.1 com.azure azure-core - 1.9.0-beta.1 + 1.8.1 test-jar test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test-jar test diff --git a/sdk/core/azure-core-http-netty/CHANGELOG.md b/sdk/core/azure-core-http-netty/CHANGELOG.md index ec93f6b213965..1127274094d64 100644 --- a/sdk/core/azure-core-http-netty/CHANGELOG.md +++ b/sdk/core/azure-core-http-netty/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.7.0-beta.1 (Unreleased) +## 1.6.1 (2020-09-08) +- Updated `azure-core` version to pickup bug fix. ## 1.6.0 (2020-09-03) diff --git a/sdk/core/azure-core-http-netty/README.md b/sdk/core/azure-core-http-netty/README.md index c87567b981a7b..37f3c68baa05d 100644 --- a/sdk/core/azure-core-http-netty/README.md +++ b/sdk/core/azure-core-http-netty/README.md @@ -15,7 +15,7 @@ Azure Core Netty HTTP client is a plugin for the `azure-core` HTTP client API. com.azure azure-core-http-netty - 1.6.0 + 1.6.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml index 1198a61507293..253c1e26702e9 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.7.0-beta.1 + 1.6.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.9.0-beta.1 + 1.8.1 @@ -117,20 +117,20 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 test-jar test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test-jar test diff --git a/sdk/core/azure-core-http-okhttp/CHANGELOG.md b/sdk/core/azure-core-http-okhttp/CHANGELOG.md index ca86acf1ee5a3..676fdef52b9d6 100644 --- a/sdk/core/azure-core-http-okhttp/CHANGELOG.md +++ b/sdk/core/azure-core-http-okhttp/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.3.1 (2020-09-08) +- Updated `azure-core` version to pickup bug fix. ## 1.3.0 (2020-09-03) diff --git a/sdk/core/azure-core-http-okhttp/README.md b/sdk/core/azure-core-http-okhttp/README.md index 34a5a5d17a0fd..5e96034d231e2 100644 --- a/sdk/core/azure-core-http-okhttp/README.md +++ b/sdk/core/azure-core-http-okhttp/README.md @@ -15,7 +15,7 @@ Azure Core OkHttp HTTP client is a plugin for the `azure-core` HTTP client API. com.azure azure-core-http-okhttp - 1.3.0 + 1.3.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml index 2d1deb20b2962..293880cec1f08 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.4.0-beta.1 + 1.3.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.9.0-beta.1 + 1.8.1 @@ -73,20 +73,20 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 test-jar test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test-jar test diff --git a/sdk/core/azure-core-management/pom.xml b/sdk/core/azure-core-management/pom.xml index 79f77538c1f33..52183dcd1d084 100644 --- a/sdk/core/azure-core-management/pom.xml +++ b/sdk/core/azure-core-management/pom.xml @@ -59,7 +59,7 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.7.0-beta.1 + 1.6.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 d4a8d96145e42..eb987af9253f8 100644 --- a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.3 (2020-09-08) +- Updated `azure-core` version to pickup bug fix. ## 1.0.0-beta.2 (2020-09-03) diff --git a/sdk/core/azure-core-serializer-avro-apache/README.md b/sdk/core/azure-core-serializer-avro-apache/README.md index 6363759389b6c..4662764a8090f 100644 --- a/sdk/core/azure-core-serializer-avro-apache/README.md +++ b/sdk/core/azure-core-serializer-avro-apache/README.md @@ -15,7 +15,7 @@ Azure Core Apache Avro Serializer is a plugin for the `azure-core` `AvroSerializ com.azure azure-core-serializer-avro-apache - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-serializer-avro-apache/pom.xml b/sdk/core/azure-core-serializer-avro-apache/pom.xml index 32e0343ed2481..abeaa2e8d3cfe 100644 --- a/sdk/core/azure-core-serializer-avro-apache/pom.xml +++ b/sdk/core/azure-core-serializer-avro-apache/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 com.azure diff --git a/sdk/core/azure-core-serializer-avro-jackson/pom.xml b/sdk/core/azure-core-serializer-avro-jackson/pom.xml index 8862fe9c3b08e..b4e88639c63fd 100644 --- a/sdk/core/azure-core-serializer-avro-jackson/pom.xml +++ b/sdk/core/azure-core-serializer-avro-jackson/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 com.azure diff --git a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md index c03901f74bbb4..a3f84d7f82993 100644 --- a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.1 (2020-09-08) +- Updated `azure-core` version to pickup bug fix. ## 1.0.0 (2020-09-03) diff --git a/sdk/core/azure-core-serializer-json-gson/README.md b/sdk/core/azure-core-serializer-json-gson/README.md index c324c60ddf3bf..fccbee836b331 100644 --- a/sdk/core/azure-core-serializer-json-gson/README.md +++ b/sdk/core/azure-core-serializer-json-gson/README.md @@ -15,7 +15,7 @@ Azure Core Gson JSON Serializer is a plugin for the `azure-core` `JsonSerializer com.azure azure-core-serializer-json-gson - 1.0.0 + 1.0.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-serializer-json-gson/pom.xml b/sdk/core/azure-core-serializer-json-gson/pom.xml index f6d14c0eb15d9..a240aaf76a450 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.0-beta.1 + 1.0.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.9.0-beta.1 + 1.8.1 diff --git a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md index e577e84b2da95..b64a622f830fe 100644 --- a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.1 (2020-09-08) +- Updated `azure-core` version to pickup bug fix. ## 1.0.0 (2020-09-03) diff --git a/sdk/core/azure-core-serializer-json-jackson/README.md b/sdk/core/azure-core-serializer-json-jackson/README.md index 99f51c87d72ae..a32be52cd3fbc 100644 --- a/sdk/core/azure-core-serializer-json-jackson/README.md +++ b/sdk/core/azure-core-serializer-json-jackson/README.md @@ -15,7 +15,7 @@ Azure Core Jackson JSON Serializer is a plugin for the `azure-core` `JsonSeriali com.azure azure-core-serializer-json-jackson - 1.0.0 + 1.0.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-serializer-json-jackson/pom.xml b/sdk/core/azure-core-serializer-json-jackson/pom.xml index 0a9eaf4476096..682f54eb98743 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.1.0-beta.1 + 1.0.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.9.0-beta.1 + 1.8.1 diff --git a/sdk/core/azure-core-test/CHANGELOG.md b/sdk/core/azure-core-test/CHANGELOG.md index 91fb991278674..a1d8f4e282c5f 100644 --- a/sdk/core/azure-core-test/CHANGELOG.md +++ b/sdk/core/azure-core-test/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.5.0-beta.1 (Unreleased) +## 1.4.2 (2020-09-08) +- Updated `azure-core` version to pickup bug fix. ## 1.4.1 (2020-09-03) diff --git a/sdk/core/azure-core-test/README.md b/sdk/core/azure-core-test/README.md index 1f3a054649ee9..2e0c5d9174931 100644 --- a/sdk/core/azure-core-test/README.md +++ b/sdk/core/azure-core-test/README.md @@ -18,7 +18,7 @@ To use this package, add the following to your _pom.xml_. com.azure azure-core-test - 1.4.1 + 1.4.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index 0285e31bf6943..3623bea1e0f2c 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.5.0-beta.1 + 1.4.2 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.9.0-beta.1 + 1.8.1 diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml index bcd00b18502ea..7667fd235d101 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml +++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml @@ -40,7 +40,7 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 io.grpc @@ -58,7 +58,7 @@ com.azure azure-core-http-netty - 1.7.0-beta.1 + 1.6.1 test diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index e8b1da313c746..9ad6981e2902a 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.9.0-beta.1 (Unreleased) +## 1.8.1 (2020-09-08) +- Fixed bug where some `HttpRequests` would have their body consumed before being sent resulting in an exception being thrown. ## 1.8.0 (2020-09-03) diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index a6aaa1b3dd844..497ddfa8a784f 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -27,7 +27,7 @@ tool when you depend on client libraries using it. com.azure azure-core - 1.8.0 + 1.8.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index 79fe83364e68b..a36ff7caf45b1 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.9.0-beta.1 + 1.8.1 Microsoft Azure Java Core Library This package contains core types for Azure Java clients. diff --git a/sdk/e2e/pom.xml b/sdk/e2e/pom.xml index 5c373c3b882a1..b23297b2865b4 100644 --- a/sdk/e2e/pom.xml +++ b/sdk/e2e/pom.xml @@ -23,12 +23,12 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 com.azure azure-core-http-netty - 1.7.0-beta.1 + 1.6.1 com.azure @@ -64,7 +64,7 @@ com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index 1560a251de677..c471ff52fdc70 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.9.0-beta.1 + 1.8.1 com.azure azure-core-http-netty - 1.7.0-beta.1 + 1.6.1 com.azure azure-core-test - 1.5.0-beta.1 + 1.4.2 test com.azure azure-core-http-okhttp - 1.4.0-beta.1 + 1.3.1 test diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index 415ab05714fc9..04e5a0aff616b 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -27,7 +27,7 @@ com.azure azure-core - 1.9.0-beta.1 + 1.8.1 com.microsoft.azure @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.7.0-beta.1 + 1.6.1 test diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index 796cf748693ea..661cd7de7ed93 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.9.0-beta.1 + 1.8.1 com.azure azure-core-http-netty - 1.7.0-beta.1 + 1.6.1 + 1.4.2 test com.azure azure-core-http-okhttp - 1.4.0-beta.1 + 1.3.1 test From de0908441983dcb8caf4f2ff7f0b0a09eed72a14 Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Tue, 8 Sep 2020 15:04:12 -0700 Subject: [PATCH 137/168] Refactor util and helper classes to their own packages (#14919) * refactor(adt, samples): Refactor util and helper classes to their own package --- .../core/DigitalTwinsAsyncClient.java | 5 +- .../digitaltwins/core/DigitalTwinsClient.java | 3 +- .../DeleteDigitalTwinRequestOptions.java | 4 +- .../DeleteRelationshipRequestOptions.java | 4 +- .../core/{ => util}/RequestOptions.java | 2 +- .../UpdateComponentRequestOptions.java | 4 +- .../UpdateDigitalTwinRequestOptions.java | 4 +- .../UpdateRelationshipRequestOptions.java | 4 +- .../azure/digitaltwins/core/AsyncSample.java | 158 ------------------ .../DigitalTwinsLifecycleAsyncSample.java | 20 ++- .../core/ModelsLifecycleSyncSamples.java | 2 +- .../azure/digitaltwins/core/SyncSample.java | 62 ------- .../core/{ => helpers}/SamplesConstants.java | 2 +- .../core/helpers/SamplesUtil.java | 8 +- .../CustomDigitalTwin.java | 2 +- 15 files changed, 37 insertions(+), 247 deletions(-) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{ => util}/DeleteDigitalTwinRequestOptions.java (87%) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{ => util}/DeleteRelationshipRequestOptions.java (89%) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{ => util}/RequestOptions.java (97%) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{ => util}/UpdateComponentRequestOptions.java (90%) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{ => util}/UpdateDigitalTwinRequestOptions.java (88%) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{ => util}/UpdateRelationshipRequestOptions.java (90%) delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SyncSample.java rename sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/{ => helpers}/SamplesConstants.java (98%) rename sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/{ => serialization}/CustomDigitalTwin.java (98%) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index e4c54bcfeb47f..61593687b0c38 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -19,10 +19,7 @@ import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; -import com.azure.digitaltwins.core.util.DigitalTwinsResponse; -import com.azure.digitaltwins.core.util.DigitalTwinsResponseHeaders; -import com.azure.digitaltwins.core.util.ListModelOptions; -import com.azure.digitaltwins.core.util.UpdateOperationUtility; +import com.azure.digitaltwins.core.util.*; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index cba238e16d2e9..cd8c2274ec93e 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -13,8 +13,7 @@ import com.azure.core.util.Context; import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; -import com.azure.digitaltwins.core.util.DigitalTwinsResponse; -import com.azure.digitaltwins.core.util.ListModelOptions; +import com.azure.digitaltwins.core.util.*; import java.util.List; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DeleteDigitalTwinRequestOptions.java similarity index 87% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DeleteDigitalTwinRequestOptions.java index c9b488cd9be7a..71bd11269008c 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteDigitalTwinRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DeleteDigitalTwinRequestOptions.java @@ -1,7 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.util; + +import com.azure.digitaltwins.core.DigitalTwinsClient; /** * Optional settings that are specific to calls to {@link DigitalTwinsClient#deleteDigitalTwin(String)} and its overloads. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DeleteRelationshipRequestOptions.java similarity index 89% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DeleteRelationshipRequestOptions.java index 4b839645960e6..c80846eadc356 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DeleteRelationshipRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/DeleteRelationshipRequestOptions.java @@ -1,9 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.util; +import com.azure.digitaltwins.core.DigitalTwinsClient; + import java.util.List; /** diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/RequestOptions.java similarity index 97% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/RequestOptions.java index e40b800e408c3..cd91822017122 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/RequestOptions.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.util; import com.azure.core.annotation.Fluent; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateComponentRequestOptions.java similarity index 90% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateComponentRequestOptions.java index deebd2adda14b..cdee08c382305 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateComponentRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateComponentRequestOptions.java @@ -1,9 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.util; +import com.azure.digitaltwins.core.DigitalTwinsClient; + import java.util.List; /** diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateDigitalTwinRequestOptions.java similarity index 88% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateDigitalTwinRequestOptions.java index 397eba883b52d..24be984c229e1 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateDigitalTwinRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateDigitalTwinRequestOptions.java @@ -1,7 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.util; + +import com.azure.digitaltwins.core.DigitalTwinsClient; import java.util.List; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateRelationshipRequestOptions.java similarity index 90% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateRelationshipRequestOptions.java index 2dfc4c1dad9a1..fa5a779c510df 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/UpdateRelationshipRequestOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/util/UpdateRelationshipRequestOptions.java @@ -1,9 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.util; +import com.azure.digitaltwins.core.DigitalTwinsClient; + import java.util.List; /** diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java deleted file mode 100644 index 32762a1b61373..0000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.digitaltwins.core; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.digitaltwins.core.implementation.serialization.BasicDigitalTwin; -import com.azure.digitaltwins.core.implementation.serialization.DigitalTwinMetadata; -import com.azure.digitaltwins.core.util.DigitalTwinsResponse; -import com.azure.digitaltwins.core.util.UpdateOperationUtility; -import com.azure.identity.ClientSecretCredentialBuilder; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import reactor.core.publisher.Mono; - -import java.util.Arrays; -import java.util.Random; -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; - -public class AsyncSample -{ - private static final ObjectMapper mapper = new ObjectMapper(); - private static final Random random = new Random(); - - public static void main(String[] args) throws InterruptedException, JsonProcessingException { - String tenantId = System.getenv("TENANT_ID"); - String clientId = System.getenv("CLIENT_ID"); - String clientSecret = System.getenv("CLIENT_SECRET"); - String endpoint = System.getenv("DIGITAL_TWINS_ENDPOINT"); - - String modelId = "dtmi:samples:Building;1"; - - TokenCredential tokenCredential = new ClientSecretCredentialBuilder() - .tenantId(tenantId) - .clientId(clientId) - .clientSecret(clientSecret) - .build(); - - DigitalTwinsAsyncClient client = new DigitalTwinsClientBuilder() - .tokenCredential(tokenCredential) - .endpoint(endpoint) - .httpLogOptions( - new HttpLogOptions() - .setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) - .buildAsyncClient(); - - // Create the source twin - final Semaphore createTwinsSemaphore = new Semaphore(0); - - // Request is json string - DigitalTwinMetadata metadata = new DigitalTwinMetadata().setModelId(modelId); - - // Response is Response - String dtId_String = "dt_String_" + random.nextInt(); - BasicDigitalTwin basicDigitalTwin = new BasicDigitalTwin() - .setId(dtId_String) - .setMetadata(metadata) - .setCustomProperties("AverageTemperature", random.nextInt(50)) - .setCustomProperties("TemperatureUnit", "Celsius"); - String dt_String = mapper.writeValueAsString(basicDigitalTwin); - - Mono> sourceTwinWithResponseString = client.createDigitalTwinWithResponse(dtId_String, dt_String); - sourceTwinWithResponseString.subscribe( - result -> { - System.out.println(String.format("%s: Created twin, Status = %d, Etag = %s", - dtId_String, result.getStatusCode(), result.getDeserializedHeaders().getETag())); - try { - String jsonResponse = result.getValue(); - - // Deserialize the String output to a BasicDigitalTwin so that the metadata fields are easily accessible. - BasicDigitalTwin twin = mapper.readValue(jsonResponse, BasicDigitalTwin.class); - - // Check if the returned digital twin follows CustomDigitalTwin's model definition. - if (twin.getMetadata().getModelId().equals(modelId)) { - // Parse it as CustomDigitalTwin - CustomDigitalTwin customDigitalTwin = mapper.readValue(jsonResponse, CustomDigitalTwin.class); - System.out.println( - String.format("%s: Deserialized CustomDigitalTwin, \n\tId=%s, \n\tEtag=%s, \n\tModelId=%s, \n\tAverageTemperature=%d, \n\tTemperatureUnit=%s \n", - dtId_String, customDigitalTwin.getId(), customDigitalTwin.getEtag(), customDigitalTwin.getMetadata().getModelId(), customDigitalTwin.getAverageTemperature(), customDigitalTwin.getTemperatureUnit())); - } else { - // Parse it as BasicDigitalTwin - System.out.println( - String.format("%s: Deserialized BasicDigitalTwin, \n\tId=%s, \n\tEtag=%s, \n\tModelId=%s, \n\tCustomProperties=%s \n", - dtId_String, twin.getId(), twin.getTwinETag(), twin.getMetadata().getModelId(), Arrays.toString(twin.getCustomProperties().entrySet().toArray()))); - } - } catch (JsonProcessingException e) { - System.err.println("Reading response into DigitalTwin failed: "); - e.printStackTrace(); - } - }, - throwable -> System.err.println("Failed to create source twin on digital twin with Id " + dtId_String + " due to error message " + throwable.getMessage()), - createTwinsSemaphore::release); - - // Request is strongly typed object - String dtId_Generic = "dt_Generic_" + random.nextInt(); - CustomDigitalTwin customDigitalTwin = new CustomDigitalTwin() - .setId(dtId_Generic) - .setMetadata((CustomDigitalTwinMetadata) new CustomDigitalTwinMetadata().setModelId(modelId)) - .setAverageTemperature(random.nextInt(50)) - .setTemperatureUnit("Celsius"); - - - // Response is strongly typed object Response - Mono> sourceTwinWithResponseGeneric = client.createDigitalTwinWithResponse(dtId_Generic, customDigitalTwin, CustomDigitalTwin.class); - sourceTwinWithResponseGeneric.subscribe( - result -> { - System.out.println(String.format("%s: Created twin, Status = %d, Etag = %s", - dtId_Generic, result.getStatusCode(), result.getHeaders().get("etag"))); - CustomDigitalTwin twin = result.getValue(); - System.out.println(String.format("%s: Deserialized CustomDigitalTwin, \n\tId=%s, \n\tEtag=%s, \n\tModelId=%s, \n\tAverageTemperature=%d, \n\tTemperatureUnit=%s \n", - dtId_Generic, twin.getId(), twin.getEtag(), twin.getMetadata().getModelId(), twin.getAverageTemperature(), twin.getTemperatureUnit())); - }, - throwable -> System.err.println("Failed to create source twin on digital twin with Id " + dtId_Generic + " due to error message " + throwable.getMessage()), - createTwinsSemaphore::release); - - boolean created = createTwinsSemaphore.tryAcquire(2, 20, TimeUnit.SECONDS); - System.out.println("Source twins created: " + created); - - String targetTwin1_Id = "targetTwin_1_" + random.nextInt(); - String targetTwin_1 = "{\"$metadata\": {\"$model\": \"dtmi:samples:HVAC;1\"}, \"Efficiency\": 10, \"TargetTemperature\": 10, \"TargetHumidity\": 10}"; - - String targetTwin2_Id = "targetTwin_2_" + random.nextInt(); - String targetTwin_2 = "{\"$metadata\": {\"$model\": \"dtmi:samples:HVAC;1\"}, \"Efficiency\": 50, \"TargetTemperature\": 50, \"TargetHumidity\": 50}"; - - String targetTwin3_Id = "targetTwin_3_" + random.nextInt(); - String targetTwin_3 = "{\"$metadata\": {\"$model\": \"dtmi:samples:Floor;1\"}, \"AverageTemperature\": 100}"; - - client.createDigitalTwinWithResponse(targetTwin1_Id, targetTwin_1).block(); - client.createDigitalTwinWithResponse(targetTwin2_Id, targetTwin_2).block(); - client.createDigitalTwinWithResponse(targetTwin3_Id, targetTwin_3).block(); - - String r_id_1 = "r_id_1_" + random.nextInt(); - String r_id_2 = "r_id_2_" + random.nextInt(); - String r_id_3 = "r_id_3_" + random.nextInt(); - String relationship1 = "{\"$relationshipName\": \"isEquippedWith\", \"$targetId\": \"" + targetTwin1_Id + "\"}"; - String relationship2 = "{\"$relationshipName\": \"isEquippedWith\", \"$targetId\": \"" + targetTwin2_Id + "\"}"; - String relationship3 = "{\"$relationshipName\": \"has\", \"$targetId\": \"" + targetTwin3_Id + "\"}"; - - client.createRelationshipWithResponse(dtId_String, r_id_1, relationship1).block(); - client.createRelationshipWithResponse(dtId_String, r_id_2, relationship2).block(); - client.createRelationshipWithResponse(dtId_String, r_id_3, relationship3).block(); - - UpdateOperationUtility utility = new UpdateOperationUtility().appendAddOperation("/isAccessRestricted", false); - client.updateRelationship(dtId_String, r_id_3, utility.getUpdateOperations()).block(); - - String createdRelationship2 = client.getRelationship(dtId_String, r_id_2).block(); - JsonNode jsonNode = mapper.readTree(createdRelationship2); - String etag = jsonNode.path("$etag").textValue(); - - client.deleteRelationship(dtId_String, r_id_1).block(); - client.deleteRelationshipWithResponse(dtId_String, r_id_2, new DeleteRelationshipRequestOptions().setIfMatch(etag)).block(); - - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java index 9bfd91e267283..747d606a4d9b2 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java @@ -27,7 +27,7 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; -import static com.azure.digitaltwins.core.SamplesConstants.*; +import static com.azure.digitaltwins.core.helpers.SamplesConstants.*; import static com.azure.digitaltwins.core.helpers.SamplesUtil.IgnoreConflictError; import static com.azure.digitaltwins.core.helpers.SamplesUtil.IgnoreNotFoundError; import static java.util.Arrays.asList; @@ -146,30 +146,32 @@ public static void deleteTwins() throws IOException, InterruptedException { // This list contains all the relationships that existing between the twins referenced by this sample. List relationshipList = Collections.synchronizedList(new ArrayList<>()); - // These semaphores indicate when the relationship list and relationship delete operations have completed. + // This latch is to maintain a thread-safe count to ensure that we wait for both the list relationships and list incoming relationships operations to complete, + // before proceeding to the delete operation. + CountDownLatch listRelationshipSemaphore = new CountDownLatch(2); + // This latch is to maintain a thread-safe count to ensure that we wait for the delete twin operation to complete, before proceeding. + CountDownLatch deleteTwinsLatch = new CountDownLatch(1); + + // This semaphores indicates when the relationship delete operation has has completed. // We cannot use a latch here since we do not know the no. of relationships that will be deleted (so we do cannot set the latch initial count). - Semaphore listRelationshipSemaphore = new Semaphore(0); Semaphore deleteRelationshipsSemaphore = new Semaphore(0); - // This latch is to ensure that we wait for the delete twin operation to complete, before proceeding. - CountDownLatch deleteTwinsLatch = new CountDownLatch(1); - // Call APIs to retrieve all relationships. client.listRelationships(twinId, BasicRelationship.class) .doOnNext(relationshipList::add) .doOnError(IgnoreNotFoundError) - .doOnTerminate(listRelationshipSemaphore::release) + .doOnTerminate(listRelationshipSemaphore::countDown) .subscribe(); // Call APIs to retrieve all incoming relationships. client.listIncomingRelationships(twinId) .doOnNext(e -> relationshipList.add(mapper.convertValue(e, BasicRelationship.class))) .doOnError(IgnoreNotFoundError) - .doOnTerminate(listRelationshipSemaphore::release) + .doOnTerminate(listRelationshipSemaphore::countDown) .subscribe(); // Call APIs to delete all relationships. - if (listRelationshipSemaphore.tryAcquire(2, MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS)) { + if (listRelationshipSemaphore.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS)) { relationshipList .forEach(relationship -> client.deleteRelationship(relationship.getSourceId(), relationship.getId()) .doOnSuccess(aVoid -> { diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java index d4f14d266c2b7..ae3ed9c6d1b60 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java @@ -3,11 +3,11 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.digitaltwins.core.helpers.ConsoleLogger; import com.azure.digitaltwins.core.helpers.SamplesArguments; +import com.azure.digitaltwins.core.helpers.SamplesConstants; import com.azure.digitaltwins.core.helpers.UniqueIdHelper; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; import com.azure.digitaltwins.core.models.ModelData; import com.azure.identity.ClientSecretCredentialBuilder; -import org.apache.http.HttpStatus; import java.io.IOException; import java.net.HttpURLConnection; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SyncSample.java deleted file mode 100644 index 3ac5ba5a49b5b..0000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SyncSample.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.digitaltwins.core; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.identity.ClientSecretCredentialBuilder; -import com.fasterxml.jackson.core.JsonProcessingException; - -public class SyncSample -{ - public static void main(String[] args) throws JsonProcessingException { - String tenantId = System.getenv("TENANT_ID"); - String clientId = System.getenv("CLIENT_ID"); - String clientSecret = System.getenv("CLIENT_SECRET"); - String endpoint = System.getenv("DIGITAL_TWINS_ENDPOINT"); - String sourceDigitalTwinId = System.getenv("SOURCE_DIGITAL_TWIN_ID"); - String sourceDigitalTwin = System.getenv("SOURCE_DIGITAL_TWIN"); - String targetDigitalTwinId = System.getenv("TARGET_DIGITAL_TWIN_ID"); - String targetDigitalTwin = System.getenv("TARGET_DIGITAL_TWIN"); - String relationshipId = System.getenv("RELATIONSHIP_ID"); - String relationship = System.getenv("RELATIONSHIP"); - - TokenCredential tokenCredential = new ClientSecretCredentialBuilder() - .tenantId(tenantId) - .clientId(clientId) - .clientSecret(clientSecret) - .build(); - - DigitalTwinsClient client = new DigitalTwinsClientBuilder() - .tokenCredential(tokenCredential) - .endpoint(endpoint) - .buildClient(); - - // Create relationship on a digital twin - String createdRelationship = client.createRelationshipWithResponse(sourceDigitalTwinId, relationshipId, relationship, Context.NONE).getValue(); - System.out.println("Created relationship: " + createdRelationship); - - // List all relationships on a digital twin - PagedIterable relationships = client.listRelationships(sourceDigitalTwinId, relationshipId, Context.NONE); - - // Process using the Stream interface by iterating over each page - relationships - // You can also subscribe to pages by specifying the preferred page size or the associated continuation token to start the processing from. - .streamByPage() - .forEach(page -> { - System.out.println("Response headers status code is " + page.getStatusCode()); - page.getValue().forEach(item -> System.out.println("Relationship retrieved: " + item)); - }); - - // Process using the Iterable interface by iterating over each page - relationships - // You can also subscribe to pages by specifying the preferred page size or the associated continuation token to start the processing from. - .iterableByPage() - .forEach(page -> { - System.out.println("Response headers status code is " + page.getStatusCode()); - page.getValue().forEach(item -> System.out.println("Relationship retrieved: " + item)); - }); - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesConstants.java similarity index 98% rename from sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesConstants.java index 0771e7f97e747..b62dcdc3da40a 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/SamplesConstants.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesConstants.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.helpers; public class SamplesConstants { public static final String RoomModelId = "dtmi:samples:Room;1"; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java index 6e73ad6e635f5..38d28fdaeeffa 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java @@ -4,19 +4,21 @@ package com.azure.digitaltwins.core.helpers; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; -import org.apache.http.HttpStatus; import java.util.function.Consumer; +import static javax.net.ssl.HttpsURLConnection.HTTP_CONFLICT; +import static javax.net.ssl.HttpsURLConnection.HTTP_NOT_FOUND; + public class SamplesUtil { public static final Consumer IgnoreNotFoundError = throwable -> { - if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HttpStatus.SC_NOT_FOUND) { + if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HTTP_NOT_FOUND) { System.err.println("Error received: " + throwable); } }; public static final Consumer IgnoreConflictError = throwable -> { - if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HttpStatus.SC_CONFLICT) { + if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HTTP_CONFLICT) { System.err.println("Error received: " + throwable); } }; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/CustomDigitalTwin.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/serialization/CustomDigitalTwin.java similarity index 98% rename from sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/CustomDigitalTwin.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/serialization/CustomDigitalTwin.java index 948a2be57aa38..b0873ef19ff12 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/CustomDigitalTwin.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/serialization/CustomDigitalTwin.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core; +package com.azure.digitaltwins.core.serialization; import com.azure.core.annotation.Fluent; import com.azure.digitaltwins.core.implementation.serialization.WritableProperty; From 1b5a85b55c38fee612389a2de01aad54a36e6f24 Mon Sep 17 00:00:00 2001 From: Vinay Gera Date: Tue, 8 Sep 2020 16:33:51 -0700 Subject: [PATCH 138/168] Fix smoke test compile issue aug 2020 (#14662) --- common/smoke-tests/pom.xml | 4 +-- .../main/java/com/azure/KeyVaultSecrets.java | 29 ++++++++++++++----- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/common/smoke-tests/pom.xml b/common/smoke-tests/pom.xml index feb9d8c2c9a1e..ee77cdff72e57 100644 --- a/common/smoke-tests/pom.xml +++ b/common/smoke-tests/pom.xml @@ -126,13 +126,13 @@ com.azure azure-identity - 1.0.3 + 1.1.0 com.azure azure-security-keyvault-secrets - 4.1.0 + 4.2.0 diff --git a/common/smoke-tests/src/main/java/com/azure/KeyVaultSecrets.java b/common/smoke-tests/src/main/java/com/azure/KeyVaultSecrets.java index 851edddd5b0f6..c30b91ee3866e 100644 --- a/common/smoke-tests/src/main/java/com/azure/KeyVaultSecrets.java +++ b/common/smoke-tests/src/main/java/com/azure/KeyVaultSecrets.java @@ -2,10 +2,11 @@ // Licensed under the MIT License. package com.azure; +import com.azure.identity.AzureAuthorityHosts; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.identity.KnownAuthorityHosts; import com.azure.security.keyvault.secrets.SecretClient; import com.azure.security.keyvault.secrets.SecretClientBuilder; +import com.azure.security.keyvault.secrets.SecretServiceVersion; import com.azure.security.keyvault.secrets.models.DeletedSecret; import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.core.util.polling.SyncPoller; @@ -24,10 +25,18 @@ public class KeyVaultSecrets { private static final Logger LOGGER = LoggerFactory.getLogger(KeyVaultSecrets.class); private static HashMap AUTHORITY_HOST_MAP = new HashMap() {{ - put("AzureCloud", KnownAuthorityHosts.AZURE_CLOUD); - put("AzureChinaCloud", KnownAuthorityHosts.AZURE_CHINA_CLOUD); - put("AzureGermanCloud", KnownAuthorityHosts.AZURE_GERMAN_CLOUD); - put("AzureUSGovernment", KnownAuthorityHosts.AZURE_US_GOVERNMENT); + put("AzureCloud", AzureAuthorityHosts.AZURE_PUBLIC_CLOUD); + put("AzureChinaCloud", AzureAuthorityHosts.AZURE_CHINA); + put("AzureGermanCloud", AzureAuthorityHosts.AZURE_GERMANY); + put("AzureUSGovernment", AzureAuthorityHosts.AZURE_GOVERNMENT); + }}; + + private static HashMap AUTHORITY_HOST_SERVICE_VERSION_MAP = + new HashMap() {{ + put("AzureCloud", SecretServiceVersion.V7_1); + put("AzureChinaCloud", SecretServiceVersion.V7_0); + put("AzureGermanCloud", SecretServiceVersion.V7_0); + put("AzureUSGovernment", SecretServiceVersion.V7_0); }}; private static void setSecret() { @@ -59,7 +68,10 @@ public static void main(String[] args) { // Configure authority host from AZURE_CLOUD String azureCloud = System.getenv("AZURE_CLOUD"); String authorityHost = AUTHORITY_HOST_MAP.getOrDefault( - azureCloud, KnownAuthorityHosts.AZURE_CLOUD); + azureCloud, AzureAuthorityHosts.AZURE_PUBLIC_CLOUD); + + SecretServiceVersion serviceVersion = + AUTHORITY_HOST_SERVICE_VERSION_MAP.getOrDefault(azureCloud, SecretServiceVersion.getLatest()); /* DefaultAzureCredentialBuilder() is expecting the following environment variables: @@ -72,8 +84,9 @@ public static void main(String[] args) { .credential( new DefaultAzureCredentialBuilder() .authorityHost(authorityHost) - .build() - ).buildClient(); + .build()) + .serviceVersion(serviceVersion) + .buildClient(); try { setSecret(); getSecret(); From 3f42cdb2d08c7c46f7a821e796a980b58e87d8f8 Mon Sep 17 00:00:00 2001 From: Xia ZHU <398289931@qq.com> Date: Wed, 9 Sep 2020 07:39:14 +0800 Subject: [PATCH 139/168] [Cog Serv Anomaly Detector] add sample codes (#14591) * add samples and sample data * add REAME.md for samples * add javafdoc; rename variates; * add more comments --- .../src/samples/README.md | 59 +++++++++++ .../DetectAnomaliesEntireSeries.java | 97 +++++++++++++++++++ .../DetectAnomaliesLastPoint.java | 91 +++++++++++++++++ .../anomalydetector/DetectChangePoints.java | 97 +++++++++++++++++++ .../samples/java/sample_data/request-data.csv | 47 +++++++++ 5 files changed, 391 insertions(+) create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md new file mode 100644 index 0000000000000..e20e2a81ac7c1 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md @@ -0,0 +1,59 @@ +--- +page_type: sample +languages: + - java +products: + - azure + - azure-cognitive-services + - azure-anomaly-detector +urlFragment: anomalydetector-java-samples +--- + +# Azure Anomaly Detector client library samples for Java + +Azure Anomaly Detector samples are a set of self-contained Java programs that demonstrate interacting with Azure self-contained service using the client library. Each sample focuses on a specific scenario and can be executed independently. + +## Key concepts + +Key concepts are explained in detail [here][SDK_README_KEY_CONCEPTS]. + +## Getting started + +Getting started explained in detail [here][SDK_README_GETTING_STARTED]. + +## Examples + +The following sections provide code samples covering common scenario operations with the Azure Anomaly Detector client library. + +All of these samples need the endpoint to your Anomaly Detector resource, and your Anomaly Detector API key. + +|**File Name**|**Description**| +|----------------|-------------| +|[DetectAnomaliesEntireSeries.java][detect_anomaly_entire]|Detect anomalies as a batch| +|[DetectAnomaliesLastPoint.java][detect_anomaly_last]|Detect if last point is anomaly| +|[DetectChangePoints.java][detect_change_point]|Detect change points in series| + +## Troubleshooting + +Troubleshooting steps can be found [here][SDK_README_TROUBLESHOOTING]. + +## Next steps + +See [Next steps][SDK_README_NEXT_STEPS]. + +## Contributing + +If you would like to become an active contributor to this project please refer to our [Contribution +Guidelines][SDK_README_CONTRIBUTING] for more information. + + +[SDK_README_CONTRIBUTING]: ../../README.md#contributing +[SDK_README_GETTING_STARTED]: ../../README.md#getting-started +[SDK_README_TROUBLESHOOTING]: ../../README.md#troubleshooting +[SDK_README_KEY_CONCEPTS]: ../../README.md#key-concepts +[SDK_README_DEPENDENCY]: ../../README.md#include-the-package +[SDK_README_NEXT_STEPS]: ../../README.md#next-steps + +[detect_anomaly_entire]: ./java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java +[detect_anomaly_last]: ./java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java +[detect_change_point]: ./java/com/azure/ai/anomalydetector/DetectChangePoints.java \ No newline at end of file diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java new file mode 100644 index 0000000000000..e5a028cab511f --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.DetectRequest; +import com.azure.ai.anomalydetector.models.EntireDetectResponse; +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.ContentType; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Sample for detecting anomalies in a piece of time series. + */ +public class DetectAnomaliesEntireSeries { + + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + * @throws IOException Exception thrown when there is an error in reading all the lines from the csv file. + */ + public static void main(final String[] args) throws IOException { + String endpoint = ""; + String key = ""; + HttpHeaders headers = new HttpHeaders() + .put("Accept", ContentType.APPLICATION_JSON); + + HttpPipelinePolicy authPolicy = new AzureKeyCredentialPolicy("Ocp-Apim-Subscription-Key", + new AzureKeyCredential(key)); + AddHeadersPolicy addHeadersPolicy = new AddHeadersPolicy(headers); + + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(HttpClient.createDefault()) + .policies(authPolicy, addHeadersPolicy).build(); + // Instantiate a client that will be used to call the service. + AnomalyDetectorClient anomalyDetectorClient = new AnomalyDetectorClientBuilder() + .pipeline(httpPipeline) + .endpoint(endpoint) + .buildClient(); + + // Read the time series from csv file and organize the time series into list of TimeSeriesPoint. + // The sample csv file has no header, and it contains 2 columns, namely timestamp and value. + // The following is a snippet of the sample csv file: + // 2018-03-01T00:00:00Z,32858923 + // 2018-03-02T00:00:00Z,29615278 + // 2018-03-03T00:00:00Z,22839355 + // 2018-03-04T00:00:00Z,25948736 + Path path = Paths.get("./src/samples/java/sample_data/request-data.csv"); + List requestData = Files.readAllLines(path); + List series = requestData.stream() + .map(line -> line.trim()) + .filter(line -> line.length() > 0) + .map(line -> line.split(",", 2)) + .filter(splits -> splits.length == 2) + .map(splits -> { + TimeSeriesPoint timeSeriesPoint = new TimeSeriesPoint(); + timeSeriesPoint.setTimestamp(OffsetDateTime.parse(splits[0])); + timeSeriesPoint.setValue(Float.parseFloat(splits[1])); + return timeSeriesPoint; + }) + .collect(Collectors.toList()); + + System.out.println("Detecting anomalies as a batch..."); + DetectRequest request = new DetectRequest(); + request.setSeries(series); + // Set the granularity to be DAILY since the minimal interval in time of the sample data is one day. + request.setGranularity(TimeGranularity.DAILY); + EntireDetectResponse response = anomalyDetectorClient.detectEntireSeries(request); + if (response.getIsAnomaly().contains(true)) { + System.out.println("Anomalies found in the following data positions:"); + for (int i = 0; i < request.getSeries().size(); ++i) { + if (response.getIsAnomaly().get(i)) { + System.out.print(i + " "); + } + } + System.out.println(); + } else { + System.out.println("No anomalies were found in the series."); + } + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java new file mode 100644 index 0000000000000..d7a54162cb521 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.DetectRequest; +import com.azure.ai.anomalydetector.models.LastDetectResponse; +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.ContentType; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Sample for detecting whether the last point of time series is anomaly or not. + */ +public class DetectAnomaliesLastPoint { + + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + * @throws IOException Exception thrown when there is an error in reading all the lines from the csv file. + */ + public static void main(final String[] args) throws IOException { + String endpoint = ""; + String key = ""; + HttpHeaders headers = new HttpHeaders() + .put("Accept", ContentType.APPLICATION_JSON); + + HttpPipelinePolicy authPolicy = new AzureKeyCredentialPolicy("Ocp-Apim-Subscription-Key", + new AzureKeyCredential(key)); + AddHeadersPolicy addHeadersPolicy = new AddHeadersPolicy(headers); + + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(HttpClient.createDefault()) + .policies(authPolicy, addHeadersPolicy).build(); + // Instantiate a client that will be used to call the service. + AnomalyDetectorClient anomalyDetectorClient = new AnomalyDetectorClientBuilder() + .pipeline(httpPipeline) + .endpoint(endpoint) + .buildClient(); + + // Read the time series from csv file and organize the time series into list of TimeSeriesPoint. + // The sample csv file has no header, and it contains 2 columns, namely timestamp and value. + // The following is a snippet of the sample csv file: + // 2018-03-01T00:00:00Z,32858923 + // 2018-03-02T00:00:00Z,29615278 + // 2018-03-03T00:00:00Z,22839355 + // 2018-03-04T00:00:00Z,25948736 + Path path = Paths.get("./src/samples/java/sample_data/request-data.csv"); + List requestData = Files.readAllLines(path); + List series = requestData.stream() + .map(line -> line.trim()) + .filter(line -> line.length() > 0) + .map(line -> line.split(",", 2)) + .filter(splits -> splits.length == 2) + .map(splits -> { + TimeSeriesPoint timeSeriesPoint = new TimeSeriesPoint(); + timeSeriesPoint.setTimestamp(OffsetDateTime.parse(splits[0])); + timeSeriesPoint.setValue(Float.parseFloat(splits[1])); + return timeSeriesPoint; + }) + .collect(Collectors.toList()); + + System.out.println("Determining if latest data point is an anomaly..."); + DetectRequest request = new DetectRequest(); + request.setSeries(series); + // Set the granularity to be DAILY since the minimal interval in time of the sample data is one day. + request.setGranularity(TimeGranularity.DAILY); + LastDetectResponse response = anomalyDetectorClient.detectLastPoint(request); + if (response.isAnomaly()) { + System.out.println("The latest point was detected as an anomaly."); + } else { + System.out.println("The latest point was not detected as an anomaly."); + } + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java new file mode 100644 index 0000000000000..6c2e00ced95a9 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.ChangePointDetectRequest; +import com.azure.ai.anomalydetector.models.ChangePointDetectResponse; +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.ContentType; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Sample for detecting change points in a piece of time series. + */ +public class DetectChangePoints { + + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + * @throws IOException Exception thrown when there is an error in reading all the lines from the csv file. + */ + public static void main(final String[] args) throws IOException { + String endpoint = ""; + String key = ""; + HttpHeaders headers = new HttpHeaders() + .put("Accept", ContentType.APPLICATION_JSON); + + HttpPipelinePolicy authPolicy = new AzureKeyCredentialPolicy("Ocp-Apim-Subscription-Key", + new AzureKeyCredential(key)); + AddHeadersPolicy addHeadersPolicy = new AddHeadersPolicy(headers); + + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(HttpClient.createDefault()) + .policies(authPolicy, addHeadersPolicy).build(); + // Instantiate a client that will be used to call the service. + AnomalyDetectorClient anomalyDetectorClient = new AnomalyDetectorClientBuilder() + .pipeline(httpPipeline) + .endpoint(endpoint) + .buildClient(); + + // Read the time series from csv file and organize the time series into list of TimeSeriesPoint. + // The sample csv file has no header, and it contains 2 columns, namely timestamp and value. + // The following is a snippet of the sample csv file: + // 2018-03-01T00:00:00Z,32858923 + // 2018-03-02T00:00:00Z,29615278 + // 2018-03-03T00:00:00Z,22839355 + // 2018-03-04T00:00:00Z,25948736 + Path path = Paths.get("./src/samples/java/sample_data/request-data.csv"); + List requestData = Files.readAllLines(path); + List series = requestData.stream() + .map(line -> line.trim()) + .filter(line -> line.length() > 0) + .map(line -> line.split(",", 2)) + .filter(splits -> splits.length == 2) + .map(splits -> { + TimeSeriesPoint timeSeriesPoint = new TimeSeriesPoint(); + timeSeriesPoint.setTimestamp(OffsetDateTime.parse(splits[0])); + timeSeriesPoint.setValue(Float.parseFloat(splits[1])); + return timeSeriesPoint; + }) + .collect(Collectors.toList()); + + System.out.println("Detecting change points..."); + ChangePointDetectRequest request = new ChangePointDetectRequest(); + request.setSeries(series); + // Set the granularity to be DAILY since the minimal interval in time of the sample data is one day. + request.setGranularity(TimeGranularity.DAILY); + ChangePointDetectResponse response = anomalyDetectorClient.detectChangePoint(request); + if (response.getIsChangePoint().contains(true)) { + System.out.println("Change points found in the following data positions:"); + for (int i = 0; i < request.getSeries().size(); ++i) { + if (response.getIsChangePoint().get(i)) { + System.out.print(i + " "); + } + } + System.out.println(); + } else { + System.out.println("No change points were found in the series."); + } + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv new file mode 100644 index 0000000000000..7f242c3712c1e --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv @@ -0,0 +1,47 @@ +2018-03-01T00:00:00Z,32858923 +2018-03-02T00:00:00Z,29615278 +2018-03-03T00:00:00Z,22839355 +2018-03-04T00:00:00Z,25948736 +2018-03-05T00:00:00Z,34139159 +2018-03-06T00:00:00Z,33843985 +2018-03-07T00:00:00Z,33637661 +2018-03-08T00:00:00Z,32627350 +2018-03-09T00:00:00Z,29881076 +2018-03-10T00:00:00Z,22681575 +2018-03-11T00:00:00Z,24629393 +2018-03-12T00:00:00Z,34010679 +2018-03-13T00:00:00Z,33893888 +2018-03-14T00:00:00Z,33760076 +2018-03-15T00:00:00Z,33093515 +2018-03-16T00:00:00Z,29945555 +2018-03-17T00:00:00Z,22676212 +2018-03-18T00:00:00Z,25262514 +2018-03-19T00:00:00Z,33631649 +2018-03-20T00:00:00Z,34468310 +2018-03-21T00:00:00Z,34212281 +2018-03-22T00:00:00Z,38144434 +2018-03-23T00:00:00Z,34662949 +2018-03-24T00:00:00Z,24623684 +2018-03-25T00:00:00Z,26530491 +2018-03-26T00:00:00Z,35445003 +2018-03-27T00:00:00Z,34250789 +2018-03-28T00:00:00Z,33423012 +2018-03-29T00:00:00Z,30744783 +2018-03-30T00:00:00Z,25825128 +2018-03-31T00:00:00Z,21244209 +2018-04-01T00:00:00Z,22576956 +2018-04-02T00:00:00Z,31957221 +2018-04-03T00:00:00Z,33841228 +2018-04-04T00:00:00Z,33554483 +2018-04-05T00:00:00Z,32383350 +2018-04-06T00:00:00Z,29494850 +2018-04-07T00:00:00Z,22815534 +2018-04-08T00:00:00Z,25557267 +2018-04-09T00:00:00Z,34858252 +2018-04-10T00:00:00Z,34750597 +2018-04-11T00:00:00Z,34717956 +2018-04-12T00:00:00Z,34132534 +2018-04-13T00:00:00Z,30762236 +2018-04-14T00:00:00Z,22504059 +2018-04-15T00:00:00Z,26149060 +2018-04-16T00:00:00Z,35250105 \ No newline at end of file From 1ea7f177f604afb6a9982eb290d60a4db3ae4d94 Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Tue, 8 Sep 2020 17:43:49 -0700 Subject: [PATCH 140/168] [Event Hubs] Support SAS token in connnection string (#14912) * Move load balancing options changes to main branch * Support SAS token in connnection string --- .../ConnectionStringProperties.java | 40 +++++++++--- .../ConnectionStringPropertiesTest.java | 60 ++++++++++++++++- .../eventhubs/EventHubClientBuilder.java | 20 ++++-- .../EventHubSharedKeyCredential.java | 47 ++++++++++++++ .../eventhubs/EventHubClientBuilderTest.java | 17 +++++ ...HubProducerAsyncClientIntegrationTest.java | 34 ++++++++++ .../EventHubSharedKeyCredentialTest.java | 65 ++++++++++++++++--- .../eventhubs/IntegrationTestBase.java | 10 ++- 8 files changed, 266 insertions(+), 27 deletions(-) diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionStringProperties.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionStringProperties.java index 2d2a2f1dc8905..facb49ba31438 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionStringProperties.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionStringProperties.java @@ -25,10 +25,15 @@ public class ConnectionStringProperties { private static final String ENDPOINT = "Endpoint"; private static final String SHARED_ACCESS_KEY_NAME = "SharedAccessKeyName"; private static final String SHARED_ACCESS_KEY = "SharedAccessKey"; + private static final String SHARED_ACCESS_SIGNATURE = "SharedAccessSignature"; + private static final String SAS_VALUE_PREFIX = "sharedaccesssignature "; private static final String ENTITY_PATH = "EntityPath"; + private static final String CONNECTION_STRING_WITH_ACCESS_KEY = "Endpoint={endpoint};" + + "SharedAccessKeyName={sharedAccessKeyName};SharedAccessKey={sharedAccessKey};EntityPath={entityPath}"; + private static final String CONNECTION_STRING_WITH_SAS = "Endpoint={endpoint};SharedAccessSignature=" + + "SharedAccessSignature {sharedAccessSignature};EntityPath={entityPath}"; private static final String ERROR_MESSAGE_FORMAT = "Could not parse 'connectionString'. Expected format: " - + "'Endpoint={endpoint};SharedAccessKeyName={sharedAccessKeyName};" - + "SharedAccessKey={sharedAccessKey};EntityPath={entityPath}'. Actual: %s"; + + CONNECTION_STRING_WITH_ACCESS_KEY + " or " + CONNECTION_STRING_WITH_SAS + ". Actual: %s"; private static final String ERROR_MESSAGE_ENDPOINT_FORMAT = "'Endpoint' must be provided in 'connectionString'." + " Actual: %s"; @@ -36,14 +41,15 @@ public class ConnectionStringProperties { private final String entityPath; private final String sharedAccessKeyName; private final String sharedAccessKey; + private final String sharedAccessSignature; /** * Creates a new instance by parsing the {@code connectionString} into its components. - * * @param connectionString The connection string to the Event Hub instance. + * * @throws NullPointerException if {@code connectionString} is null. * @throws IllegalArgumentException if {@code connectionString} is an empty string or the connection string has - * an invalid format. + * an invalid format. */ public ConnectionStringProperties(String connectionString) { Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); @@ -56,6 +62,7 @@ public ConnectionStringProperties(String connectionString) { String entityPath = null; String sharedAccessKeyName = null; String sharedAccessKeyValue = null; + String sharedAccessSignature = null; for (String tokenValuePair : tokenValuePairs) { final String[] pair = tokenValuePair.split(TOKEN_VALUE_SEPARATOR, 2); @@ -83,13 +90,22 @@ public ConnectionStringProperties(String connectionString) { sharedAccessKeyValue = value; } else if (key.equalsIgnoreCase(ENTITY_PATH)) { entityPath = value; + } else if (key.equalsIgnoreCase(SHARED_ACCESS_SIGNATURE) + && value.toLowerCase(Locale.ROOT).startsWith(SAS_VALUE_PREFIX)) { + sharedAccessSignature = value; } else { throw new IllegalArgumentException( String.format(Locale.US, "Illegal connection string parameter name: %s", key)); } } - if (endpoint == null || sharedAccessKeyName == null || sharedAccessKeyValue == null) { + // connection string should have an endpoint and either shared access signature or shared access key and value + boolean includesSharedKey = sharedAccessKeyName != null || sharedAccessKeyValue != null; + boolean hasSharedKeyAndValue = sharedAccessKeyName != null && sharedAccessKeyValue != null; + boolean includesSharedAccessSignature = sharedAccessSignature != null; + if (endpoint == null + || (includesSharedKey && includesSharedAccessSignature) // includes both SAS and key or value + || (!hasSharedKeyAndValue && !includesSharedAccessSignature)) { // invalid key, value and SAS throw new IllegalArgumentException(String.format(Locale.US, ERROR_MESSAGE_FORMAT, connectionString)); } @@ -97,11 +113,11 @@ public ConnectionStringProperties(String connectionString) { this.entityPath = entityPath; this.sharedAccessKeyName = sharedAccessKeyName; this.sharedAccessKey = sharedAccessKeyValue; + this.sharedAccessSignature = sharedAccessSignature; } /** * Gets the endpoint to be used for connecting to the AMQP message broker. - * * @return The endpoint address, including protocol, from the connection string. */ public URI getEndpoint() { @@ -110,7 +126,6 @@ public URI getEndpoint() { /** * Gets the entity path to connect to in the message broker. - * * @return The entity path to connect to in the message broker. */ public String getEntityPath() { @@ -119,7 +134,6 @@ public String getEntityPath() { /** * Gets the name of the shared access key, either for the Event Hubs namespace or the Event Hub instance. - * * @return The name of the shared access key. */ public String getSharedAccessKeyName() { @@ -128,13 +142,21 @@ public String getSharedAccessKeyName() { /** * The value of the shared access key, either for the Event Hubs namespace or the Event Hub. - * * @return The value of the shared access key. */ public String getSharedAccessKey() { return sharedAccessKey; } + /** + * The value of the shared access signature, if the connection string used to create this instance included the + * shared access signature component. + * @return The shared access signature value, if included in the connection string. + */ + public String getSharedAccessSignature() { + return sharedAccessSignature; + } + /* * The function checks for pre existing scheme of "sb://" , "http://" or "https://". If the scheme is not provided * in endpoint, it will set the default scheme to "sb://". diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionStringPropertiesTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionStringPropertiesTest.java index e203b8c42940d..12667ecb9873f 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionStringPropertiesTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionStringPropertiesTest.java @@ -5,8 +5,11 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.util.Locale; +import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -16,6 +19,11 @@ public class ConnectionStringPropertiesTest { private static final String EVENT_HUB = "event-hub-instance"; private static final String SAS_KEY = "test-sas-key"; private static final String SAS_VALUE = "some-secret-value"; + private static final String SHARED_ACCESS_SIGNATURE = "SharedAccessSignature " + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&se=100000" + + "&skn=test-sas-key"; @Test public void nullConnectionString() { @@ -130,7 +138,54 @@ public void parseConnectionString() { Assertions.assertEquals(EVENT_HUB, properties.getEntityPath()); } - private static String getConnectionString(String hostname, String eventHubName, String sasKeyName, String sasKeyValue) { + @ParameterizedTest + @MethodSource("getInvalidConnectionString") + public void testConnectionStringWithSas(String invalidConnectionString) { + assertThrows(IllegalArgumentException.class, () -> new ConnectionStringProperties(invalidConnectionString)); + } + + @ParameterizedTest + @MethodSource("getSharedAccessSignature") + public void testInvalidSharedAccessSignature(String sas) { + assertThrows(IllegalArgumentException.class, () -> + new ConnectionStringProperties(getConnectionString(HOSTNAME_URI, null, null, null, sas))); + } + + private static Stream getInvalidConnectionString() { + String keyNameWithSas = getConnectionString(HOSTNAME_URI, EVENT_HUB, SAS_KEY, null, SHARED_ACCESS_SIGNATURE); + String keyValueWithSas = getConnectionString(HOSTNAME_URI, EVENT_HUB, null, SAS_VALUE, SHARED_ACCESS_SIGNATURE); + String keyNameAndValueWithSas = getConnectionString(HOSTNAME_URI, EVENT_HUB, SAS_KEY, SAS_VALUE, + SHARED_ACCESS_SIGNATURE); + String nullHostName = getConnectionString(null, EVENT_HUB, SAS_KEY, SAS_VALUE, SHARED_ACCESS_SIGNATURE); + String nullHostNameValidSas = getConnectionString(null, EVENT_HUB, null, null, SHARED_ACCESS_SIGNATURE); + String nullHostNameValidKey = getConnectionString(null, EVENT_HUB, SAS_KEY, SAS_VALUE, null); + return Stream.of(keyNameWithSas, keyValueWithSas, keyNameAndValueWithSas, nullHostName, nullHostNameValidSas, + nullHostNameValidKey); + } + + private static Stream getSharedAccessSignature() { + String nullSas = null; + String sasInvalidPrefix = "AccessSignature " // invalid prefix + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&se=100000" + + "&skn=test-sas-key"; + String sasWithoutSpace = "SharedAccessSignature" // no space after prefix + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&se=100000" + + "&skn=test-sas-key"; + + return Stream.of(nullSas, sasInvalidPrefix, sasWithoutSpace); + } + + private static String getConnectionString(String hostname, String eventHubName, String sasKeyName, + String sasKeyValue) { + return getConnectionString(hostname, eventHubName, sasKeyName, sasKeyValue, null); + } + + private static String getConnectionString(String hostname, String eventHubName, String sasKeyName, + String sasKeyValue, String sharedAccessSignature) { final StringBuilder builder = new StringBuilder(); if (hostname != null) { builder.append(String.format(Locale.US, "Endpoint=%s;", hostname)); @@ -144,6 +199,9 @@ private static String getConnectionString(String hostname, String eventHubName, if (sasKeyValue != null) { builder.append(String.format(Locale.US, "SharedAccessKey=%s;", sasKeyValue)); } + if (sharedAccessSignature != null) { + builder.append(String.format(Locale.US, "SharedAccessSignature=%s;", sharedAccessSignature)); + } return builder.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 f752e7a06cfa6..d20613d9a5a0c 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 @@ -178,13 +178,22 @@ public EventHubClientBuilder() { * connection string. */ public EventHubClientBuilder connectionString(String connectionString) { - final ConnectionStringProperties properties = new ConnectionStringProperties(connectionString); - final TokenCredential tokenCredential = new EventHubSharedKeyCredential(properties.getSharedAccessKeyName(), - properties.getSharedAccessKey(), ClientConstants.TOKEN_VALIDITY); - + ConnectionStringProperties properties = new ConnectionStringProperties(connectionString); + TokenCredential tokenCredential = getTokenCredential(properties); return credential(properties.getEndpoint().getHost(), properties.getEntityPath(), tokenCredential); } + private TokenCredential getTokenCredential(ConnectionStringProperties properties) { + TokenCredential tokenCredential; + if (properties.getSharedAccessSignature() == null) { + tokenCredential = new EventHubSharedKeyCredential(properties.getSharedAccessKeyName(), + properties.getSharedAccessKey(), ClientConstants.TOKEN_VALIDITY); + } else { + tokenCredential = new EventHubSharedKeyCredential(properties.getSharedAccessSignature()); + } + return tokenCredential; + } + /** * Sets the credential information given a connection string to the Event Hubs namespace and name to a specific * Event Hub instance. @@ -213,8 +222,7 @@ public EventHubClientBuilder connectionString(String connectionString, String ev } final ConnectionStringProperties properties = new ConnectionStringProperties(connectionString); - final TokenCredential tokenCredential = new EventHubSharedKeyCredential(properties.getSharedAccessKeyName(), - properties.getSharedAccessKey(), ClientConstants.TOKEN_VALIDITY); + TokenCredential tokenCredential = getTokenCredential(properties); if (!CoreUtils.isNullOrEmpty(properties.getEntityPath()) && !eventHubName.equals(properties.getEntityPath())) { diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubSharedKeyCredential.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubSharedKeyCredential.java index 03e1df34b68fc..d9c0ce5222ee0 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubSharedKeyCredential.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubSharedKeyCredential.java @@ -18,8 +18,10 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.time.Duration; +import java.time.Instant; import java.time.OffsetDateTime; import java.time.ZoneOffset; +import java.util.Arrays; import java.util.Base64; import java.util.Locale; import java.util.Objects; @@ -51,6 +53,7 @@ public class EventHubSharedKeyCredential implements TokenCredential { private final String policyName; private final Duration tokenValidity; private final SecretKeySpec secretKeySpec; + private final String sharedAccessSignature; /** * Creates an instance that authorizes using the {@code policyName} and {@code sharedAccessKey}. @@ -98,6 +101,26 @@ public EventHubSharedKeyCredential(String policyName, String sharedAccessKey, Du final byte[] sasKeyBytes = sharedAccessKey.getBytes(UTF_8); secretKeySpec = new SecretKeySpec(sasKeyBytes, HASH_ALGORITHM); + sharedAccessSignature = null; + } + + /** + * Creates an instance using the provided Shared Access Signature (SAS) string. The credential created using this + * constructor will not be refreshed. The expiration time is set to the time defined in "se={ + * tokenValidationSeconds}`. If the SAS string does not contain this or is in invalid format, then the token + * expiration will be set to {@link OffsetDateTime#MAX max duration}. + *

    See how to generate SAS + * programmatically.

    + * + * @param sharedAccessSignature The base64 encoded shared access signature string. + * @throws NullPointerException if {@code sharedAccessSignature} is null. + */ + public EventHubSharedKeyCredential(String sharedAccessSignature) { + this.sharedAccessSignature = Objects.requireNonNull(sharedAccessSignature, + "'sharedAccessSignature' cannot be null"); + this.policyName = null; + this.secretKeySpec = null; + this.tokenValidity = null; } /** @@ -124,6 +147,10 @@ private AccessToken generateSharedAccessSignature(final String resource) throws throw logger.logExceptionAsError(new IllegalArgumentException("resource cannot be empty")); } + if (sharedAccessSignature != null) { + return new AccessToken(sharedAccessSignature, getExpirationTime(sharedAccessSignature)); + } + final Mac hmac; try { hmac = Mac.getInstance(HASH_ALGORITHM); @@ -153,4 +180,24 @@ private AccessToken generateSharedAccessSignature(final String resource) throws return new AccessToken(token, expiresOn); } + + private OffsetDateTime getExpirationTime(String sharedAccessSignature) { + String[] parts = sharedAccessSignature.split("&"); + return Arrays.stream(parts) + .map(part -> part.split("=")) + .filter(pair -> pair.length == 2 && pair[0].equalsIgnoreCase("se")) + .findFirst() + .map(pair -> pair[1]) + .map(expirationTimeStr -> { + try { + long epochSeconds = Long.parseLong(expirationTimeStr); + return Instant.ofEpochSecond(epochSeconds).atOffset(ZoneOffset.UTC); + } catch (NumberFormatException exception) { + logger.verbose("Invalid expiration time format in the SAS token: {}. Falling back to max " + + "expiration time.", expirationTimeStr); + return OffsetDateTime.MAX; + } + }) + .orElse(OffsetDateTime.MAX); + } } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubClientBuilderTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubClientBuilderTest.java index fa175f98e4363..62af53cc63682 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubClientBuilderTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubClientBuilderTest.java @@ -90,6 +90,23 @@ public void throwsWithProxyWhenTransportTypeNotChanged() { assertNotNull(builder.buildAsyncClient()); }); } + @Test + public void testConnectionStringWithSas() { + + String connectionStringWithNoEntityPath = "Endpoint=sb://eh-name.servicebus.windows.net/;" + + "SharedAccessSignature=SharedAccessSignature test-value"; + String connectionStringWithEntityPath = "Endpoint=sb://eh-name.servicebus.windows.net/;" + + "SharedAccessSignature=SharedAccessSignature test-value;EntityPath=eh-name"; + + assertNotNull(new EventHubClientBuilder() + .connectionString(connectionStringWithNoEntityPath, "eh-name")); + assertNotNull(new EventHubClientBuilder() + .connectionString(connectionStringWithEntityPath)); + assertThrows(NullPointerException.class, () -> new EventHubClientBuilder() + .connectionString(connectionStringWithNoEntityPath)); + assertThrows(IllegalArgumentException.class, () -> new EventHubClientBuilder() + .connectionString(connectionStringWithEntityPath, "eh-name-mismatch")); + } @MethodSource("getProxyConfigurations") @ParameterizedTest diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerAsyncClientIntegrationTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerAsyncClientIntegrationTest.java index 6052c625cdc2d..afdf63be3d373 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerAsyncClientIntegrationTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerAsyncClientIntegrationTest.java @@ -3,12 +3,15 @@ package com.azure.messaging.eventhubs; +import com.azure.core.amqp.AmqpTransportType; +import com.azure.core.amqp.ProxyOptions; import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.eventhubs.models.CreateBatchOptions; import com.azure.messaging.eventhubs.models.SendOptions; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -196,4 +199,35 @@ void sendWithCredentials() { dispose(client); } } + + @Test + @EnabledIfEnvironmentVariable(named = "AZURE_EVENTHUBS_CONNECTION_STRING_WITH_SAS", matches = + ".*ShadAccessSignature .*") + void sendWithSasConnectionString() { + final EventData event = new EventData("body"); + final SendOptions options = new SendOptions().setPartitionId(PARTITION_ID); + EventHubProducerAsyncClient eventHubAsyncClient = new EventHubClientBuilder() + .proxyOptions(ProxyOptions.SYSTEM_DEFAULTS) + .retry(RETRY_OPTIONS) + .transportType(AmqpTransportType.AMQP) + .connectionString(getConnectionString(true)) + .buildAsyncProducerClient(); + + try { + StepVerifier.create(eventHubAsyncClient.getEventHubProperties()) + .assertNext(properties -> { + Assertions.assertEquals(getEventHubName(), properties.getName()); + Assertions.assertEquals(NUMBER_OF_PARTITIONS, properties.getPartitionIds().stream().count()); + }) + .expectComplete() + .verify(TIMEOUT); + + StepVerifier.create(eventHubAsyncClient.send(event, options)) + .expectComplete() + .verify(TIMEOUT); + } finally { + dispose(eventHubAsyncClient); + } + + } } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubSharedKeyCredentialTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubSharedKeyCredentialTest.java index cefbb7d602f40..9ee6b684532eb 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubSharedKeyCredentialTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubSharedKeyCredentialTest.java @@ -5,8 +5,10 @@ import com.azure.core.credential.TokenRequestContext; import com.azure.messaging.eventhubs.implementation.EventHubSharedKeyCredential; -import org.junit.jupiter.api.Assertions; 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 reactor.test.StepVerifier; import java.io.UnsupportedEncodingException; @@ -18,8 +20,13 @@ import java.time.ZoneOffset; 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.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; public class EventHubSharedKeyCredentialTest { private static final String KEY_NAME = "some-key-name"; @@ -69,14 +76,14 @@ public void constructsToken() throws UnsupportedEncodingException { // Act & Assert StepVerifier.create(credential.getToken(new TokenRequestContext().addScopes(resource))) .assertNext(accessToken -> { - Assertions.assertNotNull(accessToken); + assertNotNull(accessToken); - Assertions.assertFalse(accessToken.isExpired()); - Assertions.assertTrue(accessToken.getExpiresAt().isAfter(OffsetDateTime.now(ZoneOffset.UTC))); + assertFalse(accessToken.isExpired()); + assertTrue(accessToken.getExpiresAt().isAfter(OffsetDateTime.now(ZoneOffset.UTC))); final String[] split = accessToken.getToken().split(" "); - Assertions.assertEquals(2, split.length); - Assertions.assertEquals("SharedAccessSignature", split[0].trim()); + assertEquals(2, split.length); + assertEquals("SharedAccessSignature", split[0].trim()); final String[] components = split[1].split("&"); for (String component : components) { @@ -85,19 +92,57 @@ public void constructsToken() throws UnsupportedEncodingException { final String value = pair[1]; final String expectedValue = expected.get(key); - Assertions.assertTrue(expected.containsKey(key)); + assertTrue(expected.containsKey(key)); // These are the values that are random, but we expect the expiration to be after this date. if (signatureExpires.equals(key)) { final Instant instant = Instant.ofEpochSecond(Long.parseLong(value)); - Assertions.assertTrue(instant.isAfter(Instant.now())); + assertTrue(instant.isAfter(Instant.now())); } else if (expectedValue == null) { - Assertions.assertNotNull(value); + assertNotNull(value); } else { - Assertions.assertEquals(expectedValue, value); + assertEquals(expectedValue, value); } } }) .verifyComplete(); } + + @ParameterizedTest + @MethodSource("getSas") + public void testSharedAccessSignatureCredential(String sas, OffsetDateTime expectedExpirationTime) { + EventHubSharedKeyCredential eventHubSharedKeyCredential = new EventHubSharedKeyCredential(sas); + StepVerifier.create(eventHubSharedKeyCredential.getToken(new TokenRequestContext().addScopes("sb://test" + + "-entity.servicebus.windows.net/.default"))) + .assertNext(token -> { + assertNotNull(token.getToken()); + assertEquals(sas, token.getToken()); + assertEquals(expectedExpirationTime, token.getExpiresAt()); + }) + .verifyComplete(); + } + + private static Stream getSas() { + String validSas = "SharedAccessSignature " + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&se=1599537084" + + "&skn=test-sas-key"; + String validSasWithNoExpirationTime = "SharedAccessSignature " + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&skn=test-sas-key"; + String validSasInvalidExpirationTimeFormat = "SharedAccessSignature " + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&se=se=2020-12-31T13:37:45Z" + + "&skn=test-sas-key"; + + return Stream.of( + Arguments.of(validSas, OffsetDateTime.parse("2020-09-08T03:51:24Z")), + Arguments.of(validSasWithNoExpirationTime, OffsetDateTime.MAX), + Arguments.of(validSasInvalidExpirationTimeFormat, OffsetDateTime.MAX) + ); + } + } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/IntegrationTestBase.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/IntegrationTestBase.java index 738f3e47aa534..ff5a8b3498e48 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/IntegrationTestBase.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/IntegrationTestBase.java @@ -61,6 +61,7 @@ public abstract class IntegrationTestBase extends TestBase { private static final String PROXY_AUTHENTICATION_TYPE = "PROXY_AUTHENTICATION_TYPE"; private static final String EVENT_HUB_CONNECTION_STRING_ENV_NAME = "AZURE_EVENTHUBS_CONNECTION_STRING"; + private static final String EVENT_HUB_CONNECTION_STRING_WITH_SAS = "AZURE_EVENTHUBS_CONNECTION_STRING_WITH_SAS"; private static final String AZURE_EVENTHUBS_FULLY_QUALIFIED_DOMAIN_NAME = "AZURE_EVENTHUBS_FULLY_QUALIFIED_DOMAIN_NAME"; private static final String AZURE_EVENTHUBS_EVENT_HUB_NAME = "AZURE_EVENTHUBS_EVENT_HUB_NAME"; @@ -122,7 +123,14 @@ public TestMode getTestMode() { return CoreUtils.isNullOrEmpty(getConnectionString()) ? TestMode.PLAYBACK : TestMode.RECORD; } - protected static String getConnectionString() { + static String getConnectionString() { + return getConnectionString(false); + } + + static String getConnectionString(boolean withSas) { + if (withSas) { + return System.getenv(EVENT_HUB_CONNECTION_STRING_WITH_SAS); + } return System.getenv(EVENT_HUB_CONNECTION_STRING_ENV_NAME); } From ac8715d427ed234dc18c67dea1e86f526df0a4f7 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu <31145988+chidozieononiwu@users.noreply.github.com> Date: Tue, 8 Sep 2020 17:49:10 -0700 Subject: [PATCH 141/168] Update Language Settings (#14842) --- eng/scripts/Language-Settings.ps1 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index d9a0e1c0ff83e..5a4ebe0601c50 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -95,10 +95,10 @@ function Get-java-PackageInfoFromPackageFile ($pkg, $workingDirectory) { function Publish-java-GithubIODocs () { $PublishedDocs = Get-ChildItem "$DocLocation" | Where-Object -FilterScript {$_.Name.EndsWith("-javadoc.jar")} - foreach ($Item in $PublishedDocs) + foreach ($Item in $PublishedDocs) { $UnjarredDocumentationPath = "" - try + try { $PkgName = $Item.BaseName # The jar's unpacking command doesn't allow specifying a target directory @@ -136,14 +136,15 @@ function Publish-java-GithubIODocs () Write-Host "DocDir $($UnjarredDocumentationPath)" Write-Host "PkgName $($ArtifactId)" Write-Host "DocVersion $($Version)" + $releaseTag = RetrieveReleaseTag "Maven" $PublicArtifactLocation + Upload-Blobs -DocDir $UnjarredDocumentationPath -PkgName $ArtifactId -DocVersion $Version -ReleaseTag $releaseTag - Upload-Blobs -DocDir $UnjarredDocumentationPath -PkgName $ArtifactId -DocVersion $Version - } - Finally + } + Finally { - if (![string]::IsNullOrEmpty($UnjarredDocumentationPath)) + if (![string]::IsNullOrEmpty($UnjarredDocumentationPath)) { - if (Test-Path -Path $UnjarredDocumentationPath) + if (Test-Path -Path $UnjarredDocumentationPath) { Write-Host "Cleaning up $UnjarredDocumentationPath" Remove-Item -Recurse -Force $UnjarredDocumentationPath From 992ee0b4e839c6bfef0619ec072a82d8f20d64bf Mon Sep 17 00:00:00 2001 From: Brandon Siegel <96068+bsiegel@users.noreply.github.com> Date: Tue, 8 Sep 2020 18:02:21 -0700 Subject: [PATCH 142/168] [Tables] Fix tables livetest (#14797) * Fix tables livetests * Fix LIVE mode and switch from RECORD to LIVE * Work around unsupported operation in Cosmos API * Mono.when doesn't play nice with Cosmos's 429 retries * Permit more retries in tests * Fix tests and re-enable disabled tests --- .../tables/TableServiceAsyncClientTest.java | 35 +- .../data/tables/TableServiceClientTest.java | 16 +- .../data/tables/TablesAsyncClientTest.java | 111 ++- .../implementation/AzureTableImplTest.java | 251 +++--- .../session-records/createEntityAsync.json | 30 +- ...eEntityWithAllSupportedDataTypesAsync.json | 44 +- .../createEntityWithResponseAsync.json | 30 +- .../session-records/createTableAsync.json | 26 +- .../createTableDuplicateNameImpl.json | 44 +- .../session-records/createTableImpl.json | 34 +- .../createTableWithResponseAsync.json | 26 +- .../session-records/deleteEntityAsync.json | 54 +- .../session-records/deleteEntityImpl.json | 60 +- .../deleteEntityWithResponseAsync.json | 54 +- ...eleteEntityWithResponseMatchETagAsync.json | 54 +- .../deleteNonExistentEntityImpl.json | 46 +- .../deleteNonExistentTableImpl.json | 22 +- .../session-records/deleteTableAsync.json | 24 +- .../session-records/deleteTableImpl.json | 32 +- .../deleteTableWithResponseAsync.json | 24 +- .../getEntityWithResponseAsync.json | 44 +- .../session-records/insertNoETagImpl.json | 50 +- .../session-records/listEntitiesAsync.json | 58 +- .../listEntitiesWithFilterAsync.json | 58 +- .../listEntitiesWithSelectAsync.json | 42 +- .../listEntitiesWithTopAsync.json | 90 +-- .../session-records/mergeEntityImpl.json | 62 +- .../mergeNonExistentEntityImpl.json | 46 +- ...eryEntitiesImplWithPartitionAndRowKey.json | 112 ++- .../session-records/queryEntityImpl.json | 142 ++++ .../queryEntityImplWithFilter.json | 142 ++++ .../queryEntityImplWithSelect.json | 142 ++++ .../queryEntityImplWithTop.json | 144 ++++ .../session-records/queryTableImpl.json | 754 +++++++++++++++--- .../queryTableWithFilterImpl.json | 158 ++++ .../queryTableWithTopImpl.json | 90 ++- .../session-records/serviceCreateTable.json | 14 +- .../serviceCreateTableAsync.json | 14 +- .../serviceCreateTableFailsIfExists.json | 24 +- .../serviceCreateTableFailsIfExistsAsync.json | 24 +- .../serviceCreateTableIfNotExists.json | 14 +- .../serviceCreateTableIfNotExistsAsync.json | 14 +- ...reateTableIfNotExistsSucceedsIfExists.json | 24 +- ...TableIfNotExistsSucceedsIfExistsAsync.json | 24 +- ...eateTableIfNotExistsWithResponseAsync.json | 14 +- ...istsWithResponseSucceedsIfExistsAsync.json | 24 +- .../serviceCreateTableWithResponseAsync.json | 14 +- .../session-records/serviceDeleteTable.json | 2 +- .../serviceDeleteTableAsync.json | 24 +- .../serviceDeleteTableWithResponse.json | 2 +- .../serviceDeleteTableWithResponseAsync.json | 24 +- .../serviceListTablesAsync.json | 36 +- .../serviceListTablesWithFilterAsync.json | 38 +- .../serviceListTablesWithTopAsync.json | 326 +++++--- .../session-records/updateEntityImpl.json | 62 +- .../updateEntityWithResponseMergeAsync.json | 70 +- .../updateEntityWithResponseReplaceAsync.json | 70 +- .../updateNonExistentEntityImpl.json | 46 +- sdk/tables/test-resources.json | 2 +- 59 files changed, 2772 insertions(+), 1285 deletions(-) create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImpl.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithFilter.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithSelect.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithTop.json create mode 100644 sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableWithFilterImpl.json diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java index 0262afda0edcb..3bead9b4014d5 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceAsyncClientTest.java @@ -4,6 +4,7 @@ package com.azure.data.tables; import com.azure.core.http.HttpClient; +import com.azure.core.http.policy.ExponentialBackoff; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.RetryPolicy; @@ -15,7 +16,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import java.time.Duration; @@ -26,7 +26,7 @@ * Tests methods for {@link TableServiceAsyncClient}. */ public class TableServiceAsyncClientTest extends TestBase { - private static final Duration TIMEOUT = Duration.ofSeconds(30); + private static final Duration TIMEOUT = Duration.ofSeconds(100); private TableServiceAsyncClient serviceClient; @BeforeAll @@ -49,9 +49,12 @@ protected void beforeTest() { if (interceptorManager.isPlaybackMode()) { builder.httpClient(interceptorManager.getPlaybackClient()); } else { - builder.httpClient(HttpClient.createDefault()) - .addPolicy(interceptorManager.getRecordPolicy()) - .addPolicy(new RetryPolicy()); + builder.httpClient(HttpClient.createDefault()); + if (!interceptorManager.isLiveMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + builder.addPolicy(new RetryPolicy(new ExponentialBackoff(6, Duration.ofMillis(1500), + Duration.ofSeconds(100)))); } serviceClient = builder.buildAsyncClient(); @@ -184,10 +187,8 @@ void serviceListTablesAsync() { // Arrange final String tableName = testResourceNamer.randomName("test", 20); final String tableName2 = testResourceNamer.randomName("test", 20); - Mono.when( - serviceClient.createTable(tableName), - serviceClient.createTable(tableName2) - ).block(TIMEOUT); + serviceClient.createTable(tableName).block(TIMEOUT); + serviceClient.createTable(tableName2).block(TIMEOUT); // Act & Assert StepVerifier.create(serviceClient.listTables()) @@ -204,10 +205,8 @@ void serviceListTablesWithFilterAsync() { final String tableName = testResourceNamer.randomName("test", 20); final String tableName2 = testResourceNamer.randomName("test", 20); ListTablesOptions options = new ListTablesOptions().setFilter("TableName eq '" + tableName + "'"); - Mono.when( - serviceClient.createTable(tableName), - serviceClient.createTable(tableName2) - ).block(TIMEOUT); + serviceClient.createTable(tableName).block(TIMEOUT); + serviceClient.createTable(tableName2).block(TIMEOUT); // Act & Assert StepVerifier.create(serviceClient.listTables(options)) @@ -228,12 +227,10 @@ void serviceListTablesWithTopAsync() { final String tableName2 = testResourceNamer.randomName("test", 20); final String tableName3 = testResourceNamer.randomName("test", 20); ListTablesOptions options = new ListTablesOptions().setTop(2); - Mono.when( - serviceClient.createTable(tableName), - serviceClient.createTable(tableName2), - serviceClient.createTable(tableName3) - ).block(TIMEOUT); - + serviceClient.createTable(tableName).block(TIMEOUT); + serviceClient.createTable(tableName2).block(TIMEOUT); + serviceClient.createTable(tableName3).block(TIMEOUT); + // Act & Assert StepVerifier.create(serviceClient.listTables(options)) .expectNextCount(2) diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceClientTest.java index da0e885c49831..164851e0cef87 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TableServiceClientTest.java @@ -4,6 +4,7 @@ package com.azure.data.tables; import com.azure.core.http.HttpClient; +import com.azure.core.http.policy.ExponentialBackoff; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.RetryPolicy; @@ -12,6 +13,8 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.time.Duration; + public class TableServiceClientTest extends TestBase { private TableServiceClient serviceClient; @@ -25,11 +28,13 @@ protected void beforeTest() { if (interceptorManager.isPlaybackMode()) { builder.httpClient(interceptorManager.getPlaybackClient()); } else { - builder.httpClient(HttpClient.createDefault()) - .addPolicy(interceptorManager.getRecordPolicy()) - .addPolicy(new RetryPolicy()); + builder.httpClient(HttpClient.createDefault()); + if (!interceptorManager.isLiveMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + builder.addPolicy(new RetryPolicy(new ExponentialBackoff(6, Duration.ofMillis(1500), + Duration.ofSeconds(100)))); } - serviceClient = builder.buildClient(); } @@ -49,7 +54,8 @@ void serviceCreateTableFailsIfExists() { serviceClient.createTable(tableName); // Act & Assert - Assertions.assertThrows(TableServiceErrorException.class, () -> serviceClient.createTable(tableName)); + Assertions.assertThrows(TableServiceErrorException.class, + () -> serviceClient.createTable(tableName)); } @Test diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java index 1911a40abd17b..f4e2cfad7e9ec 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/TablesAsyncClientTest.java @@ -4,6 +4,7 @@ package com.azure.data.tables; import com.azure.core.http.HttpClient; +import com.azure.core.http.policy.ExponentialBackoff; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -12,9 +13,10 @@ import com.azure.data.tables.models.ListEntitiesOptions; import com.azure.data.tables.models.TableEntity; import com.azure.data.tables.models.UpdateMode; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import java.time.Duration; @@ -32,12 +34,22 @@ * Tests {@link TableAsyncClient}. */ public class TablesAsyncClientTest extends TestBase { - private static final Duration TIMEOUT = Duration.ofSeconds(30); + private static final Duration TIMEOUT = Duration.ofSeconds(100); private TableAsyncClient tableClient; private HttpPipelinePolicy recordPolicy; private HttpClient playbackClient; + @BeforeAll + static void beforeAll() { + StepVerifier.setDefaultTimeout(TIMEOUT); + } + + @AfterAll + static void afterAll() { + StepVerifier.resetDefaultTimeout(); + } + @Override protected void beforeTest() { final String tableName = testResourceNamer.randomName("tableName", 20); @@ -51,10 +63,13 @@ protected void beforeTest() { playbackClient = interceptorManager.getPlaybackClient(); builder.httpClient(playbackClient); } else { - recordPolicy = interceptorManager.getRecordPolicy(); - builder.httpClient(HttpClient.createDefault()) - .addPolicy(recordPolicy) - .addPolicy(new RetryPolicy()); + builder.httpClient(HttpClient.createDefault()); + if (!interceptorManager.isLiveMode()) { + recordPolicy = interceptorManager.getRecordPolicy(); + builder.addPolicy(recordPolicy); + } + builder.addPolicy(new RetryPolicy(new ExponentialBackoff(6, Duration.ofMillis(1500), + Duration.ofSeconds(100)))); } tableClient = builder.buildAsyncClient(); @@ -74,15 +89,18 @@ void createTableAsync() { if (interceptorManager.isPlaybackMode()) { builder.httpClient(playbackClient); } else { - builder.httpClient(HttpClient.createDefault()) - .addPolicy(recordPolicy) - .addPolicy(new RetryPolicy()); + builder.httpClient(HttpClient.createDefault()); + if (!interceptorManager.isLiveMode()) { + builder.addPolicy(recordPolicy); + } + builder.addPolicy(new RetryPolicy(new ExponentialBackoff(6, Duration.ofMillis(1500), + Duration.ofSeconds(100)))); } - final TableAsyncClient asyncClient2 = builder.buildAsyncClient(); + final TableAsyncClient tableClient2 = builder.buildAsyncClient(); // Act & Assert - StepVerifier.create(asyncClient2.create()) + StepVerifier.create(tableClient2.create()) .expectComplete() .verify(); } @@ -100,16 +118,19 @@ void createTableWithResponseAsync() { if (interceptorManager.isPlaybackMode()) { builder.httpClient(playbackClient); } else { - builder.httpClient(HttpClient.createDefault()) - .addPolicy(recordPolicy) - .addPolicy(new RetryPolicy()); + builder.httpClient(HttpClient.createDefault()); + if (!interceptorManager.isLiveMode()) { + builder.addPolicy(recordPolicy); + } + builder.addPolicy(new RetryPolicy(new ExponentialBackoff(6, Duration.ofMillis(1500), + Duration.ofSeconds(100)))); } - final TableAsyncClient asyncClient2 = builder.buildAsyncClient(); + final TableAsyncClient tableClient2 = builder.buildAsyncClient(); final int expectedStatusCode = 204; // Act & Assert - StepVerifier.create(asyncClient2.createWithResponse()) + StepVerifier.create(tableClient2.createWithResponse()) .assertNext(response -> { assertEquals(expectedStatusCode, response.getStatusCode()); }) @@ -271,7 +292,8 @@ void deleteEntityWithResponseMatchETagAsync() { assertNotNull(createdEntity.getETag(), "'eTag' should not be null."); // Act & Assert - StepVerifier.create(tableClient.deleteEntityWithResponse(partitionKeyValue, rowKeyValue, createdEntity.getETag())) + StepVerifier.create(tableClient.deleteEntityWithResponse(partitionKeyValue, rowKeyValue, + createdEntity.getETag())) .assertNext(response -> { assertEquals(expectedStatusCode, response.getStatusCode()); }) @@ -339,20 +361,27 @@ void updateEntityWithResponseAsync(UpdateMode mode) { createdEntity.getProperties().remove(oldPropertyKey); createdEntity.addProperty(newPropertyKey, "valueB"); - // Act - StepVerifier.create(tableClient.updateEntityWithResponse(createdEntity, true, mode)) - .assertNext(response -> assertEquals(expectedStatusCode, response.getStatusCode())) - .expectComplete() - .verify(); - - // Assert and verify that the new properties are in there. - StepVerifier.create(tableClient.getEntity(partitionKeyValue, rowKeyValue)) - .assertNext(entity -> { - final Map properties = entity.getProperties(); - assertTrue(properties.containsKey(newPropertyKey)); - assertEquals(expectOldProperty, properties.containsKey(oldPropertyKey)); - }) - .verifyComplete(); + // Act & Assert + if (mode == UpdateMode.MERGE && tableClient.getTableUrl().contains("cosmos.azure.com")) { + // This scenario is currently broken when using the CosmosDB Table API + StepVerifier.create(tableClient.updateEntityWithResponse(createdEntity, true, mode)) + .expectError(com.azure.data.tables.implementation.models.TableServiceErrorException.class) + .verify(); + } else { + StepVerifier.create(tableClient.updateEntityWithResponse(createdEntity, true, mode)) + .assertNext(response -> assertEquals(expectedStatusCode, response.getStatusCode())) + .expectComplete() + .verify(); + + // Assert and verify that the new properties are in there. + StepVerifier.create(tableClient.getEntity(partitionKeyValue, rowKeyValue)) + .assertNext(entity -> { + final Map properties = entity.getProperties(); + assertTrue(properties.containsKey(newPropertyKey)); + assertEquals(expectOldProperty, properties.containsKey(oldPropertyKey)); + }) + .verifyComplete(); + } } @Test @@ -362,10 +391,8 @@ void listEntitiesAsync() { final String partitionKeyValue = testResourceNamer.randomName("partitionKey", 20); final String rowKeyValue = testResourceNamer.randomName("rowKey", 20); final String rowKeyValue2 = testResourceNamer.randomName("rowKey", 20); - Mono.when( - tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)), - tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)) - ).block(TIMEOUT); + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)).block(TIMEOUT); + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)).block(TIMEOUT); // Act & Assert StepVerifier.create(tableClient.listEntities()) @@ -383,10 +410,8 @@ void listEntitiesWithFilterAsync() { final String rowKeyValue = testResourceNamer.randomName("rowKey", 20); final String rowKeyValue2 = testResourceNamer.randomName("rowKey", 20); ListEntitiesOptions options = new ListEntitiesOptions().setFilter("RowKey eq '" + rowKeyValue + "'"); - Mono.when( - tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)), - tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)) - ).block(TIMEOUT); + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)).block(TIMEOUT); + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)).block(TIMEOUT); // Act & Assert StepVerifier.create(tableClient.listEntities(options)) @@ -434,11 +459,9 @@ void listEntitiesWithTopAsync() { final String rowKeyValue2 = testResourceNamer.randomName("rowKey", 20); final String rowKeyValue3 = testResourceNamer.randomName("rowKey", 20); ListEntitiesOptions options = new ListEntitiesOptions().setTop(2); - Mono.when( - tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)), - tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)), - tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue3)) - ).block(TIMEOUT); + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue)).block(TIMEOUT); + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue2)).block(TIMEOUT); + tableClient.createEntity(new TableEntity(partitionKeyValue, rowKeyValue3)).block(TIMEOUT); // Act & Assert StepVerifier.create(tableClient.listEntities(options)) diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/implementation/AzureTableImplTest.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/implementation/AzureTableImplTest.java index bb277fff8dd1f..a8d8e130c641e 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/implementation/AzureTableImplTest.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/implementation/AzureTableImplTest.java @@ -9,6 +9,7 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.ExponentialBackoff; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; @@ -33,7 +34,6 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -47,6 +47,7 @@ import static com.azure.data.tables.implementation.TablesConstants.PARTITION_KEY; import static com.azure.data.tables.implementation.TablesConstants.ROW_KEY; +import static com.azure.data.tables.implementation.TablesConstants.TABLE_NAME_KEY; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -55,7 +56,7 @@ * This class tests the Autorest code for the Tables track 2 SDK */ public class AzureTableImplTest extends TestBase { - private static final int TIMEOUT_IN_MS = 5000; + private static final int TIMEOUT_IN_MS = 100_000; private final QueryOptions defaultQueryOptions = new QueryOptions() .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); @@ -82,8 +83,8 @@ protected void beforeTest() { Assertions.assertNotNull(connectionString, "Cannot continue test if connectionString is not set."); StorageAuthenticationSettings authSettings = storageConnectionString.getStorageAuthSettings(); - TablesSharedKeyCredential sharedKeyCredential = new TablesSharedKeyCredential(authSettings.getAccount().getName(), - authSettings.getAccount().getAccessKey()); + TablesSharedKeyCredential sharedKeyCredential = new TablesSharedKeyCredential( + authSettings.getAccount().getName(), authSettings.getAccount().getAccessKey()); List policies = new ArrayList<>(); policies.add(new AddDatePolicy()); @@ -99,9 +100,11 @@ protected void beforeTest() { httpClientToUse = interceptorManager.getPlaybackClient(); } else { httpClientToUse = HttpClient.createDefault(); - HttpPipelinePolicy recordPolicy = interceptorManager.getRecordPolicy(); - policies.add(recordPolicy); - policies.add(new RetryPolicy()); + if (!interceptorManager.isLiveMode()) { + HttpPipelinePolicy recordPolicy = interceptorManager.getRecordPolicy(); + policies.add(recordPolicy); + } + policies.add(new RetryPolicy(new ExponentialBackoff(6, Duration.ofMillis(1500), Duration.ofSeconds(100)))); } HttpPipeline pipeline = new HttpPipelineBuilder() @@ -109,11 +112,11 @@ protected void beforeTest() { .policies(policies.toArray(new HttpPipelinePolicy[0])) .build(); azureTable = new AzureTableImplBuilder() - .pipeline(pipeline) - .serializerAdapter(new TablesJacksonSerializer()) - .version(TablesServiceVersion.getLatest().getVersion()) - .url(storageConnectionString.getTableEndpoint().getPrimaryUri()) - .buildClient(); + .pipeline(pipeline) + .serializerAdapter(new TablesJacksonSerializer()) + .version(TablesServiceVersion.getLatest().getVersion()) + .url(storageConnectionString.getTableEndpoint().getPrimaryUri()) + .buildClient(); } @Override @@ -121,28 +124,27 @@ protected void afterTest() { QueryOptions queryOptions = new QueryOptions() .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_MINIMALMETADATA); - Mono.when(azureTable.getTables().queryWithResponseAsync(testResourceNamer.randomUuid(), null, - queryOptions, Context.NONE).flatMapMany(tablesQueryResponse -> { - return Flux.fromIterable(tablesQueryResponse.getValue().getValue()).flatMap(tableResponseProperty -> { - return azureTable.getTables().deleteWithResponseAsync(tableResponseProperty.getTableName(), - testResourceNamer.randomUuid(), Context.NONE); - }); - })).block(); + List result = azureTable.getTables().queryWithResponseAsync( + testResourceNamer.randomUuid(), null, queryOptions, Context.NONE).block().getValue().getValue(); + + Mono.when(Flux.fromIterable(result).flatMap(tableResponseProperty -> + azureTable.getTables().deleteWithResponseAsync(tableResponseProperty.getTableName(), + testResourceNamer.randomUuid(), Context.NONE))).block(); } void createTable(String tableName) { TableProperties tableProperties = new TableProperties().setTableName(tableName); String requestId = testResourceNamer.randomUuid(); - azureTable.getTables().createWithResponseAsync(tableProperties, requestId, - ResponseFormat.RETURN_NO_CONTENT, null, Context.NONE).block(); + azureTable.getTables().createWithResponseAsync(tableProperties, requestId, ResponseFormat.RETURN_NO_CONTENT, + null, Context.NONE).block(); } void insertNoETag(String tableName, Map properties) { String requestId = testResourceNamer.randomUuid(); - azureTable.getTables().insertEntityWithResponseAsync(tableName, TIMEOUT_IN_MS, - requestId, ResponseFormat.RETURN_NO_CONTENT, properties, null, Context.NONE).log().block(); + azureTable.getTables().insertEntityWithResponseAsync(tableName, TIMEOUT_IN_MS, requestId, + ResponseFormat.RETURN_NO_CONTENT, properties, null, Context.NONE).log().block(); } @Test @@ -154,8 +156,8 @@ void createTableImpl() { String requestId = testResourceNamer.randomUuid(); // Act & Assert - StepVerifier.create(azureTable.getTables().createWithResponseAsync(tableProperties, - requestId, ResponseFormat.RETURN_NO_CONTENT, null, Context.NONE)) + StepVerifier.create(azureTable.getTables().createWithResponseAsync(tableProperties, requestId, + ResponseFormat.RETURN_NO_CONTENT, null, Context.NONE)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); }) @@ -173,8 +175,8 @@ void createTableDuplicateNameImpl() { String requestId = testResourceNamer.randomUuid(); // Act & Assert - StepVerifier.create(azureTable.getTables().createWithResponseAsync(tableProperties, - requestId, ResponseFormat.RETURN_NO_CONTENT, defaultQueryOptions, Context.NONE)) + StepVerifier.create(azureTable.getTables().createWithResponseAsync(tableProperties, requestId, + ResponseFormat.RETURN_NO_CONTENT, defaultQueryOptions, Context.NONE)) .expectErrorSatisfies(error -> { assertTrue(error instanceof TableServiceErrorException); @@ -197,8 +199,7 @@ void deleteTableImpl() { String requestId = testResourceNamer.randomUuid(); // Act & Assert - StepVerifier.create(azureTable.getTables().deleteWithResponseAsync(tableName, requestId, - Context.NONE)) + StepVerifier.create(azureTable.getTables().deleteWithResponseAsync(tableName, requestId, Context.NONE)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); }) @@ -213,8 +214,7 @@ void deleteNonExistentTableImpl() { String requestId = testResourceNamer.randomUuid(); // Act & Assert - StepVerifier.create(azureTable.getTables().deleteWithResponseAsync(tableName, requestId, - Context.NONE)) + StepVerifier.create(azureTable.getTables().deleteWithResponseAsync(tableName, requestId, Context.NONE)) .expectError(com.azure.data.tables.implementation.models.TableServiceErrorException.class) .verify(); } @@ -222,6 +222,8 @@ void deleteNonExistentTableImpl() { @Test void queryTableImpl() { // Arrange + afterTest(); // Clean up any tables that may have been made by other tests before this one + QueryOptions queryOptions = new QueryOptions() .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_MINIMALMETADATA); String tableA = testResourceNamer.randomName("AtestA", 20); @@ -229,21 +231,44 @@ void queryTableImpl() { createTable(tableA); createTable(tableB); int expectedStatusCode = 200; + int expectedSize = 2; String requestId = testResourceNamer.randomUuid(); // Act & Assert - StepVerifier.create(azureTable.getTables().queryWithResponseAsync(requestId, null, - queryOptions, Context.NONE)) + StepVerifier.create(azureTable.getTables().queryWithResponseAsync(requestId, null, queryOptions, Context.NONE)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); - Assertions.assertNotNull(response.getValue(), "Expected there to be a result."); - List results = response.getValue().getValue(); + Assertions.assertEquals(expectedSize, results.size()); + assertTrue(results.stream().anyMatch(p -> tableA.equals(p.getTableName()))); + assertTrue(results.stream().anyMatch(p -> tableB.equals(p.getTableName()))); + }) + .expectComplete() + .verify(); + } + + @Test + void queryTableWithFilterImpl() { + // Arrange + afterTest(); // Clean up any tables that may have been made by other tests before this one + + QueryOptions queryOptions = new QueryOptions() + .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_MINIMALMETADATA); + String tableA = testResourceNamer.randomName("AtestA", 20); + String tableB = testResourceNamer.randomName("BtestB", 20); + createTable(tableA); + createTable(tableB); + int expectedStatusCode = 200; + int expectedSize = 1; + String requestId = testResourceNamer.randomUuid(); + queryOptions.setFilter(TABLE_NAME_KEY + " eq '" + tableA + "'"); - Assertions.assertNotNull(results, "Expected there to be a set of items."); - Assertions.assertTrue(results.size() >= 2); - Assertions.assertEquals(response.getValue().getValue().get(0).getTableName(), tableA); - Assertions.assertEquals(response.getValue().getValue().get(1).getTableName(), tableB); + // Act & Assert + StepVerifier.create(azureTable.getTables().queryWithResponseAsync(requestId, null, queryOptions, Context.NONE)) + .assertNext(response -> { + Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); + Assertions.assertEquals(expectedSize, response.getValue().getValue().size()); + Assertions.assertEquals(tableA, response.getValue().getValue().get(0).getTableName()); }) .expectComplete() .verify(); @@ -252,6 +277,8 @@ void queryTableImpl() { @Test void queryTableWithTopImpl() { // Arrange + afterTest(); // Clean up any tables that may have been made by other tests before this one + QueryOptions queryOptions = new QueryOptions() .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_MINIMALMETADATA); String tableA = testResourceNamer.randomName("AtestA", 20); @@ -264,12 +291,14 @@ void queryTableWithTopImpl() { queryOptions.setTop(1); // Act & Assert - StepVerifier.create(azureTable.getTables().queryWithResponseAsync(requestId, null, - queryOptions, Context.NONE)) + StepVerifier.create(azureTable.getTables().queryWithResponseAsync(requestId, null, queryOptions, Context.NONE)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); Assertions.assertEquals(expectedSize, response.getValue().getValue().size()); - Assertions.assertEquals(tableA, response.getValue().getValue().get(0).getTableName()); + String tableName = response.getValue().getValue().get(0).getTableName(); + // Query results returned by the Table API aren't sorted in partition key/row key order as they are + // in Azure Table storage. + Assertions.assertTrue(tableA.equals(tableName) || tableB.equals(tableName)); }) .expectComplete() .verify(); @@ -289,8 +318,8 @@ void insertNoETagImpl() { String requestId = testResourceNamer.randomUuid(); // Act & Assert - StepVerifier.create(azureTable.getTables().insertEntityWithResponseAsync(tableName, TIMEOUT_IN_MS, - requestId, ResponseFormat.RETURN_NO_CONTENT, properties, null, Context.NONE)) + StepVerifier.create(azureTable.getTables().insertEntityWithResponseAsync(tableName, TIMEOUT_IN_MS, requestId, + ResponseFormat.RETURN_NO_CONTENT, properties, null, Context.NONE)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); }) @@ -314,13 +343,21 @@ void mergeEntityImpl() { properties.put("extraProperty", testResourceNamer.randomName("extraProperty", 16)); // Act & Assert - StepVerifier.create(azureTable.getTables().mergeEntityWithResponseAsync(tableName, partitionKeyValue, - rowKeyValue, TIMEOUT_IN_MS, requestId, "*", properties, null, Context.NONE)) - .assertNext(response -> { - Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); - }) - .expectComplete() - .verify(); + if (azureTable.getUrl().contains("cosmos.azure.com")) { + // This scenario is currently broken when using the CosmosDB Table API + StepVerifier.create(azureTable.getTables().mergeEntityWithResponseAsync(tableName, partitionKeyValue, + rowKeyValue, TIMEOUT_IN_MS, requestId, "*", properties, null, Context.NONE)) + .expectError(com.azure.data.tables.implementation.models.TableServiceErrorException.class) + .verify(); + } else { + StepVerifier.create(azureTable.getTables().mergeEntityWithResponseAsync(tableName, partitionKeyValue, + rowKeyValue, TIMEOUT_IN_MS, requestId, "*", properties, null, Context.NONE)) + .assertNext(response -> { + Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); + }) + .expectComplete() + .verify(); + } } @Test @@ -422,12 +459,12 @@ void deleteNonExistentEntityImpl() { .verify(); } - @Disabled("Multiple entity deserialization not supported yet.") @Test void queryEntityImpl() { // Arrange String requestId = testResourceNamer.randomUuid(); - QueryOptions queryOptions = new QueryOptions().setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); + QueryOptions queryOptions = new QueryOptions() + .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); String tableName = testResourceNamer.randomName("test", 20); createTable(tableName); //insert entity A @@ -445,25 +482,27 @@ void queryEntityImpl() { int expectedStatusCode = 200; // Act & Assert - StepVerifier.create(azureTable.getTables().queryEntitiesWithResponseAsync(tableName, TIMEOUT_IN_MS, - requestId, null, null, queryOptions, Context.NONE)) + StepVerifier.create(azureTable.getTables().queryEntitiesWithResponseAsync(tableName, TIMEOUT_IN_MS, requestId, + null, null, queryOptions, Context.NONE)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); - assertTrue(response.getValue().getValue().get(0).containsValue(partitionKeyEntityA)); - assertTrue(response.getValue().getValue().get(1).containsValue(partitionKeyEntityB)); + List> results = response.getValue().getValue(); + assertTrue(results.stream().anyMatch(p -> p.containsValue(partitionKeyEntityA))); + assertTrue(results.stream().anyMatch(p -> p.containsValue(partitionKeyEntityB))); }) .expectComplete() .verify(); } - @Disabled("Multiple entity deserialization not supported yet.") @Test void queryEntityImplWithSelect() { // Arrange String requestId = testResourceNamer.randomUuid(); - QueryOptions queryOptions = new QueryOptions().setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); + QueryOptions queryOptions = new QueryOptions() + .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); String tableName = testResourceNamer.randomName("test", 20); createTable(tableName); + //insert entity A Map entityA = new HashMap<>(); String partitionKeyEntityA = testResourceNamer.randomName("partitionKeyA", 20); @@ -471,6 +510,7 @@ void queryEntityImplWithSelect() { entityA.put(PARTITION_KEY, partitionKeyEntityA); entityA.put(ROW_KEY, rowKeyEntityA); insertNoETag(tableName, entityA); + //insert entity B Map entityB = new HashMap<>(); String partitionKeyEntityB = testResourceNamer.randomName("partitionKeyB", 20); @@ -478,89 +518,104 @@ void queryEntityImplWithSelect() { entityB.put(PARTITION_KEY, partitionKeyEntityB); entityB.put(ROW_KEY, rowKeyEntityB); insertNoETag(tableName, entityB); + int expectedStatusCode = 200; + int expectedSize = 2; queryOptions.setSelect(ROW_KEY); // Act & Assert - StepVerifier.create(azureTable.getTables().queryEntitiesWithResponseAsync(tableName, TIMEOUT_IN_MS, - requestId, null, null, queryOptions, Context.NONE)) + StepVerifier.create(azureTable.getTables().queryEntitiesWithResponseAsync(tableName, TIMEOUT_IN_MS, requestId, + null, null, queryOptions, Context.NONE)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); - Assertions.assertEquals(true, response.getValue().getValue().get(0).containsValue(rowKeyEntityA)); - Assertions.assertEquals(true, response.getValue().getValue().get(1).containsValue(rowKeyEntityB)); - + List> results = response.getValue().getValue(); + Assertions.assertEquals(expectedSize, results.size()); + assertTrue(results.stream().anyMatch(p -> p.containsValue(rowKeyEntityA))); + assertTrue(results.stream().anyMatch(p -> p.containsValue(rowKeyEntityB))); }) .expectComplete() .verify(); } - @Disabled("Multiple entity deserialization not supported yet.") @Test void queryEntityImplWithFilter() { // Arrange String requestId = testResourceNamer.randomUuid(); - QueryOptions queryOptions = new QueryOptions().setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); + QueryOptions queryOptions = new QueryOptions() + .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); String tableName = testResourceNamer.randomName("test", 20); createTable(tableName); + + //insert entity A Map entityA = new HashMap<>(); String partitionKeyEntityA = testResourceNamer.randomName("partitionKeyA", 20); entityA.put(PARTITION_KEY, partitionKeyEntityA); entityA.put(ROW_KEY, testResourceNamer.randomName("rowKeyA", 20)); insertNoETag(tableName, entityA); + + //insert entity B + Map entityB = new HashMap<>(); + String partitionKeyEntityB = testResourceNamer.randomName("partitionKeyB", 20); + String rowKeyEntityB = testResourceNamer.randomName("rowKeyB", 20); + entityB.put(PARTITION_KEY, partitionKeyEntityB); + entityB.put(ROW_KEY, rowKeyEntityB); + insertNoETag(tableName, entityB); + int expectedStatusCode = 200; - queryOptions.setSelect(PARTITION_KEY + "eq" + partitionKeyEntityA); + int expectedSize = 1; + queryOptions.setFilter(PARTITION_KEY + " eq '" + partitionKeyEntityA + "'"); // Act & Assert - StepVerifier.create(azureTable.getTables().queryEntitiesWithResponseAsync(tableName, TIMEOUT_IN_MS, - requestId, null, null, queryOptions, Context.NONE)) + StepVerifier.create(azureTable.getTables().queryEntitiesWithResponseAsync(tableName, TIMEOUT_IN_MS, requestId, + null, null, queryOptions, Context.NONE)) .assertNext(response -> { Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); - + Assertions.assertEquals(expectedSize, response.getValue().getValue().size()); + assertTrue(response.getValue().getValue().get(0).containsValue(partitionKeyEntityA)); }) .expectComplete() .verify(); } - @Disabled("Multiple entity deserialization not supported yet.") @Test void queryEntityImplWithTop() { // Arrange String requestId = testResourceNamer.randomUuid(); - QueryOptions queryOptions = new QueryOptions().setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); + QueryOptions queryOptions = new QueryOptions() + .setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); String tableName = testResourceNamer.randomName("test", 20); createTable(tableName); - int expectedStatusCode = 200; - queryOptions.setTop(0); - // Act & Assert - StepVerifier.create(azureTable.getTables().queryEntitiesWithResponseAsync(tableName, TIMEOUT_IN_MS, - requestId, null, null, queryOptions, Context.NONE)) - .assertNext(response -> { - Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); + //insert entity A + Map entityA = new HashMap<>(); + String partitionKeyEntityA = testResourceNamer.randomName("partitionKeyA", 20); + entityA.put(PARTITION_KEY, partitionKeyEntityA); + entityA.put(ROW_KEY, testResourceNamer.randomName("rowKeyA", 20)); + insertNoETag(tableName, entityA); - }) - .expectComplete() - .verify(); - } + //insert entity B + Map entityB = new HashMap<>(); + String partitionKeyEntityB = testResourceNamer.randomName("partitionKeyB", 20); + String rowKeyEntityB = testResourceNamer.randomName("rowKeyB", 20); + entityB.put(PARTITION_KEY, partitionKeyEntityB); + entityB.put(ROW_KEY, rowKeyEntityB); + insertNoETag(tableName, entityB); - @Test - void queryEntitiesImplWithPartitionAndRowKey() { - // Arrange - QueryOptions queryOptions = new QueryOptions().setFormat(OdataMetadataFormat.APPLICATION_JSON_ODATA_FULLMETADATA); - String tableName = testResourceNamer.randomName("test", 20); - createTable(tableName); - Map properties = new HashMap<>(); - String partitionKeyValue = testResourceNamer.randomName("partitionKey", 20); - String rowKeyValue = testResourceNamer.randomName("rowKey", 20); - properties.put(PARTITION_KEY, partitionKeyValue); - properties.put(ROW_KEY, rowKeyValue); - insertNoETag(tableName, properties); + int expectedStatusCode = 200; + int expectedSize = 1; + queryOptions.setTop(1); // Act & Assert - StepVerifier.create(azureTable.getTables().queryEntitiesWithPartitionAndRowKeyWithResponseAsync(tableName, partitionKeyValue, - rowKeyValue, TIMEOUT_IN_MS, testResourceNamer.randomUuid(), queryOptions, Context.NONE)) + StepVerifier.create(azureTable.getTables().queryEntitiesWithResponseAsync(tableName, TIMEOUT_IN_MS, requestId, + null, null, queryOptions, Context.NONE)) .assertNext(response -> { - Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(expectedStatusCode, response.getStatusCode()); + Assertions.assertEquals(expectedSize, response.getValue().getValue().size()); + Map properties = response.getValue().getValue().get(0); + // Query results returned by the Table API aren't sorted in partition key/row key order as they are + // in Azure Table storage. + Assertions.assertTrue(properties.containsValue(partitionKeyEntityA) + || properties.containsValue(partitionKeyEntityB)); }) .expectComplete() .verify(); diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityAsync.json index 635b7b2d8f523..178c59300a205 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "74c98c20-3d92-441e-905a-a35279c9b727", + "x-ms-client-request-id" : "01af7d99-5a50-4b10-a262-e73da568b770", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:27 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:41 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename68684fa1')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename781972b9')", "Content-Length" : "0", - "x-ms-request-id" : "aedbd0eb-c002-00e9-55ff-770c16000000", + "x-ms-request-id" : "bcb95eb5-e002-0068-313e-86accc000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "74c98c20-3d92-441e-905a-a35279c9b727", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename68684fa1')" + "x-ms-client-request-id" : "01af7d99-5a50-4b10-a262-e73da568b770", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename781972b9')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename68684fa1", + "Uri" : "https://REDACTED.table.core.windows.net/tablename781972b9", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "9b1e5ed0-9f47-48ab-9773-6475a2164da3", + "x-ms-client-request-id" : "34065524-0629-4d73-a930-d56aa96d75d3", "Content-Type" : "application/json" }, "Response" : { @@ -39,17 +39,17 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:27 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:41 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A27.9216596Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename68684fa1(PartitionKey='partitionkey23458d',RowKey='rowkey52529a13c')", + "ETag" : "W/datetime'2020-09-09T00%3A16%3A41.9454276Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename781972b9(PartitionKey='partitionkey77856c',RowKey='rowkey81306eecf')", "Content-Length" : "0", - "x-ms-request-id" : "aedbd0f7-c002-00e9-5dff-770c16000000", + "x-ms-request-id" : "bcb95ec3-e002-0068-3a3e-86accc000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "9b1e5ed0-9f47-48ab-9773-6475a2164da3", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename68684fa1(PartitionKey='partitionkey23458d',RowKey='rowkey52529a13c')" + "x-ms-client-request-id" : "34065524-0629-4d73-a930-d56aa96d75d3", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename781972b9(PartitionKey='partitionkey77856c',RowKey='rowkey81306eecf')" }, "Exception" : null } ], - "variables" : [ "tablename68684fa1", "partitionkey23458d", "rowkey52529a13c" ] + "variables" : [ "tablename781972b9", "partitionkey77856c", "rowkey81306eecf" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithAllSupportedDataTypesAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithAllSupportedDataTypesAsync.json index 039a3a7b373c6..89a1b20cfff1a 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithAllSupportedDataTypesAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithAllSupportedDataTypesAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "45469cdb-8e1b-4d39-af22-903d90eb4dac", + "x-ms-client-request-id" : "dd30bc20-8031-41d1-9060-1b97d224cda4", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 01 Sep 2020 09:09:13 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:34 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename1410928e')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename88771eb5')", "Content-Length" : "0", - "x-ms-request-id" : "c8af5d7d-8002-007e-423f-805a1b000000", + "x-ms-request-id" : "2103d752-5002-0030-6a3e-867493000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "45469cdb-8e1b-4d39-af22-903d90eb4dac", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename1410928e')" + "x-ms-client-request-id" : "dd30bc20-8031-41d1-9060-1b97d224cda4", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename88771eb5')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename1410928e", + "Uri" : "https://REDACTED.table.core.windows.net/tablename88771eb5", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "66b90cd1-3fd9-42c4-a95a-c9a7766e6fdb", + "x-ms-client-request-id" : "52ff4b90-5f54-4554-8dda-179810078bbc", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Tue, 01 Sep 2020 09:09:14 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:34 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-09-01T09%3A09%3A14.7106597Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A34.5997602Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename88771eb5(PartitionKey='partitionkey845716',RowKey='rowkey19161f54a')", "Content-Length" : "0", - "x-ms-request-id" : "c8af5d97-8002-007e-593f-805a1b000000", + "x-ms-request-id" : "2103d7ae-5002-0030-423e-867493000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "66b90cd1-3fd9-42c4-a95a-c9a7766e6fdb", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')" + "x-ms-client-request-id" : "52ff4b90-5f54-4554-8dda-179810078bbc", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename88771eb5(PartitionKey='partitionkey845716',RowKey='rowkey19161f54a')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename88771eb5(PartitionKey='partitionkey845716',RowKey='rowkey19161f54a')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "1298b5be-8b23-47b5-b083-e356d1ee4f49" + "x-ms-client-request-id" : "d56eb210-1a8e-4837-9d3a-e323759287da" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,15 +65,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 01 Sep 2020 09:09:14 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:34 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-09-01T09%3A09%3A14.7106597Z'", - "x-ms-request-id" : "c8af5da1-8002-007e-603f-805a1b000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename1410928e/@Element\",\"odata.type\":\"brsiegelsample.tablename1410928e\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')\",\"odata.etag\":\"W/\\\"datetime'2020-09-01T09%3A09%3A14.7106597Z'\\\"\",\"odata.editLink\":\"tablename1410928e(PartitionKey='partitionkey06883c',RowKey='rowkey60363fa81')\",\"PartitionKey\":\"partitionkey06883c\",\"RowKey\":\"rowkey60363fa81\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-01T09:09:14.7106597Z\",\"Int32TypeProperty\":1337,\"DateTypeProperty@odata.type\":\"Edm.DateTime\",\"DateTypeProperty\":\"2020-09-01T09:09:14.66Z\",\"BooleanTypeProperty\":true,\"OffsetDateTimeTypeProperty@odata.type\":\"Edm.DateTime\",\"OffsetDateTimeTypeProperty\":\"2020-09-01T09:09:14.660377Z\",\"BinaryTypeProperty@odata.type\":\"Edm.Binary\",\"BinaryTypeProperty\":\"VGVzdCB2YWx1ZQ==\",\"Int64TypeProperty@odata.type\":\"Edm.Int64\",\"Int64TypeProperty\":\"1337\",\"StringTypeProperty\":\"This is table entity\",\"GuidTypeProperty@odata.type\":\"Edm.Guid\",\"GuidTypeProperty\":\"a50ad59d-7f9c-4c75-aa3c-bd3bb3a2930b\",\"DoubleTypeProperty\":2.0}", - "x-ms-client-request-id" : "1298b5be-8b23-47b5-b083-e356d1ee4f49", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A34.5997602Z'", + "x-ms-request-id" : "2103d7be-5002-0030-513e-867493000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename88771eb5/@Element\",\"odata.type\":\"brsiegelsample.tablename88771eb5\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename88771eb5(PartitionKey='partitionkey845716',RowKey='rowkey19161f54a')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A34.5997602Z'\\\"\",\"odata.editLink\":\"tablename88771eb5(PartitionKey='partitionkey845716',RowKey='rowkey19161f54a')\",\"PartitionKey\":\"partitionkey845716\",\"RowKey\":\"rowkey19161f54a\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:34.5997602Z\",\"Int32TypeProperty\":1337,\"DateTypeProperty@odata.type\":\"Edm.DateTime\",\"DateTypeProperty\":\"2020-09-09T00:14:34.551Z\",\"BooleanTypeProperty\":true,\"OffsetDateTimeTypeProperty@odata.type\":\"Edm.DateTime\",\"OffsetDateTimeTypeProperty\":\"2020-09-09T00:14:34.55156Z\",\"BinaryTypeProperty@odata.type\":\"Edm.Binary\",\"BinaryTypeProperty\":\"VGVzdCB2YWx1ZQ==\",\"Int64TypeProperty@odata.type\":\"Edm.Int64\",\"Int64TypeProperty\":\"1337\",\"StringTypeProperty\":\"This is table entity\",\"GuidTypeProperty@odata.type\":\"Edm.Guid\",\"GuidTypeProperty\":\"de67c570-5db8-4351-92c7-d2e973f9db93\",\"DoubleTypeProperty\":2.0}", + "x-ms-client-request-id" : "d56eb210-1a8e-4837-9d3a-e323759287da", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "tablename1410928e", "partitionkey06883c", "rowkey60363fa81" ] + "variables" : [ "tablename88771eb5", "partitionkey845716", "rowkey19161f54a" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithResponseAsync.json index c973a59fe4932..8b2af8aadf1d3 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithResponseAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/createEntityWithResponseAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "ac1ffed0-ae8d-42ee-83b6-e29fd321aa43", + "x-ms-client-request-id" : "413f38e4-5e60-4884-972e-cfec9c963215", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:24 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:34 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename07736a8a')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename85167a96')", "Content-Length" : "0", - "x-ms-request-id" : "c1cfb448-4002-0071-35ff-772c77000000", + "x-ms-request-id" : "8d1c5092-3002-00d2-633e-8649b2000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "ac1ffed0-ae8d-42ee-83b6-e29fd321aa43", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename07736a8a')" + "x-ms-client-request-id" : "413f38e4-5e60-4884-972e-cfec9c963215", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename85167a96')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename07736a8a", + "Uri" : "https://REDACTED.table.core.windows.net/tablename85167a96", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "453d2ba4-6383-472d-8089-c3eba3b7593a", + "x-ms-client-request-id" : "73bfc396-9e4c-4852-9b0e-8568486e198d", "Content-Type" : "application/json" }, "Response" : { @@ -39,17 +39,17 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:24 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:35 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A25.3321021Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename07736a8a(PartitionKey='partitionkey327255',RowKey='rowkey88051e115')", + "ETag" : "W/datetime'2020-09-09T00%3A16%3A35.3733124Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename85167a96(PartitionKey='partitionkey88485e',RowKey='rowkey00775d8b6')", "Content-Length" : "0", - "x-ms-request-id" : "c1cfb453-4002-0071-3dff-772c77000000", + "x-ms-request-id" : "8d1c50c0-3002-00d2-083e-8649b2000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "453d2ba4-6383-472d-8089-c3eba3b7593a", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename07736a8a(PartitionKey='partitionkey327255',RowKey='rowkey88051e115')" + "x-ms-client-request-id" : "73bfc396-9e4c-4852-9b0e-8568486e198d", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename85167a96(PartitionKey='partitionkey88485e',RowKey='rowkey00775d8b6')" }, "Exception" : null } ], - "variables" : [ "tablename07736a8a", "partitionkey327255", "rowkey88051e115" ] + "variables" : [ "tablename85167a96", "partitionkey88485e", "rowkey00775d8b6" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableAsync.json index 949b0889ffc5b..f1741fe81acb7 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "0a75f1dc-6a20-4459-8f4f-a9e16cf4bd04", + "x-ms-client-request-id" : "86a6a134-e81a-42e5-b72c-53c6de3f021f", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:06 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:57 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename38123c64')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename53480d0a')", "Content-Length" : "0", - "x-ms-request-id" : "53d61450-c002-009b-24ff-770b59000000", + "x-ms-request-id" : "f7d7d5da-4002-0095-503e-8622e9000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "0a75f1dc-6a20-4459-8f4f-a9e16cf4bd04", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename38123c64')" + "x-ms-client-request-id" : "86a6a134-e81a-42e5-b72c-53c6de3f021f", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename53480d0a')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "99727f26-f010-4dcc-8797-edf609330788", + "x-ms-client-request-id" : "6681bf07-d447-4912-9586-f0bbe4ee5730", "Content-Type" : "application/json" }, "Response" : { @@ -39,16 +39,16 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:07 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:57 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename85993f92')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename57443886')", "Content-Length" : "0", - "x-ms-request-id" : "53d61463-c002-009b-32ff-770b59000000", + "x-ms-request-id" : "f7d7d5e8-4002-0095-5c3e-8622e9000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "99727f26-f010-4dcc-8797-edf609330788", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename85993f92')" + "x-ms-client-request-id" : "6681bf07-d447-4912-9586-f0bbe4ee5730", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename57443886')" }, "Exception" : null } ], - "variables" : [ "tablename38123c64", "tablename85993f92" ] + "variables" : [ "tablename53480d0a", "tablename57443886" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableDuplicateNameImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableDuplicateNameImpl.json index 3dd43421f8731..18afb2c608445 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableDuplicateNameImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableDuplicateNameImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "362e7a8c-2750-49e6-ae60-96422ed8ce23", + "x-ms-client-request-id" : "ef3bc7d3-bf3d-44af-b02c-cf10c281c693", "Content-Type" : "application/json" }, "Response" : { @@ -13,14 +13,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:28 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:37 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test0361686a77')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test89500d2e15')", "Content-Length" : "0", - "x-ms-request-id" : "d6bccdd1-d002-0063-57ff-7757a7000000", + "x-ms-request-id" : "d7c67c12-d002-0097-293e-869c51000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "362e7a8c-2750-49e6-ae60-96422ed8ce23", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test0361686a77')" + "x-ms-client-request-id" : "ef3bc7d3-bf3d-44af-b02c-cf10c281c693", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test89500d2e15')" }, "Exception" : null }, { @@ -28,7 +28,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "4bb38982-774c-46a9-8965-b53d22b544c0", + "x-ms-client-request-id" : "20263ca2-c704-4e64-80d9-7966a04d419a", "Content-Type" : "application/json" }, "Response" : { @@ -38,12 +38,12 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Fri, 21 Aug 2020 21:09:28 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:37 GMT", "Cache-Control" : "no-cache", - "x-ms-request-id" : "d6bccde3-d002-0063-62ff-7757a7000000", - "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:d6bccde3-d002-0063-62ff-7757a7000000\\nTime:2020-08-21T21:09:29.0517520Z\"}}}", + "x-ms-request-id" : "d7c67c2d-d002-0097-3d3e-869c51000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:d7c67c2d-d002-0097-3d3e-869c51000000\\nTime:2020-09-09T00:13:37.5936253Z\"}}}", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "4bb38982-774c-46a9-8965-b53d22b544c0", + "x-ms-client-request-id" : "20263ca2-c704-4e64-80d9-7966a04d419a", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null @@ -52,7 +52,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "75263029-9bea-413c-bc8c-a2862001743a" + "x-ms-client-request-id" : "02209cb9-c627-46cb-b277-6de9b61bc612" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -62,19 +62,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "d6bccdf0-d002-0063-6dff-7757a7000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test0361686a77\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:28 GMT", - "x-ms-client-request-id" : "75263029-9bea-413c-bc8c-a2862001743a", + "x-ms-request-id" : "d7c67c3b-d002-0097-4a3e-869c51000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test89500d2e15\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:37 GMT", + "x-ms-client-request-id" : "02209cb9-c627-46cb-b277-6de9b61bc612", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test0361686a77')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test89500d2e15')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "40d2b018-213f-495c-88b7-6b24b53b6d70" + "x-ms-client-request-id" : "f6881829-0e6d-45f3-8975-b94c8a6ef64d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -84,11 +84,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "0704a116-2002-0077-04ff-771fc8000000", - "Date" : "Fri, 21 Aug 2020 21:09:28 GMT", - "x-ms-client-request-id" : "40d2b018-213f-495c-88b7-6b24b53b6d70" + "x-ms-request-id" : "d7c67c3e-d002-0097-4c3e-869c51000000", + "Date" : "Wed, 09 Sep 2020 00:13:37 GMT", + "x-ms-client-request-id" : "f6881829-0e6d-45f3-8975-b94c8a6ef64d" }, "Exception" : null } ], - "variables" : [ "test0361686a77", "362e7a8c-2750-49e6-ae60-96422ed8ce23", "4bb38982-774c-46a9-8965-b53d22b544c0", "75263029-9bea-413c-bc8c-a2862001743a", "40d2b018-213f-495c-88b7-6b24b53b6d70" ] + "variables" : [ "test89500d2e15", "ef3bc7d3-bf3d-44af-b02c-cf10c281c693", "20263ca2-c704-4e64-80d9-7966a04d419a", "02209cb9-c627-46cb-b277-6de9b61bc612", "f6881829-0e6d-45f3-8975-b94c8a6ef64d" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableImpl.json index b5c3842e8ba24..164357de8b636 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "dd576296-1cdd-44b2-9fd7-7d651d6cf3a8", + "x-ms-client-request-id" : "864915c6-b88d-437f-9e09-5636602fe656", "Content-Type" : "application/json" }, "Response" : { @@ -13,14 +13,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:37 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:47 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test077343f063')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test0989707444')", "Content-Length" : "0", - "x-ms-request-id" : "b61827e2-4002-004e-69ff-77e4d4000000", + "x-ms-request-id" : "0679efe0-6002-0059-4d3e-864ddf000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "dd576296-1cdd-44b2-9fd7-7d651d6cf3a8", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test077343f063')" + "x-ms-client-request-id" : "864915c6-b88d-437f-9e09-5636602fe656", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test0989707444')" }, "Exception" : null }, { @@ -28,7 +28,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "20c02d70-e78e-409e-ac0f-b6f5e5146e32" + "x-ms-client-request-id" : "b5e5af7c-e749-4154-a9de-e663772c65b6" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -38,19 +38,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b61827ec-4002-004e-70ff-77e4d4000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test077343f063\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:37 GMT", - "x-ms-client-request-id" : "20c02d70-e78e-409e-ac0f-b6f5e5146e32", + "x-ms-request-id" : "0679efef-6002-0059-573e-864ddf000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test0989707444\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:48 GMT", + "x-ms-client-request-id" : "b5e5af7c-e749-4154-a9de-e663772c65b6", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test077343f063')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test0989707444')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "2d912068-6226-4ab4-ac7a-4276a0de53a2" + "x-ms-client-request-id" : "17a7515f-7a35-4013-bb38-ea538f00c20a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -60,11 +60,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "533cfa6e-a002-00b2-56ff-77352d000000", - "Date" : "Fri, 21 Aug 2020 21:09:37 GMT", - "x-ms-client-request-id" : "2d912068-6226-4ab4-ac7a-4276a0de53a2" + "x-ms-request-id" : "0679eff9-6002-0059-5e3e-864ddf000000", + "Date" : "Wed, 09 Sep 2020 00:13:48 GMT", + "x-ms-client-request-id" : "17a7515f-7a35-4013-bb38-ea538f00c20a" }, "Exception" : null } ], - "variables" : [ "test077343f063", "dd576296-1cdd-44b2-9fd7-7d651d6cf3a8", "20c02d70-e78e-409e-ac0f-b6f5e5146e32", "2d912068-6226-4ab4-ac7a-4276a0de53a2" ] + "variables" : [ "test0989707444", "864915c6-b88d-437f-9e09-5636602fe656", "b5e5af7c-e749-4154-a9de-e663772c65b6", "17a7515f-7a35-4013-bb38-ea538f00c20a" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableWithResponseAsync.json index 03477a0466d19..603081e629984 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableWithResponseAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/createTableWithResponseAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "1e0e3702-e196-477f-83f3-720b9a524fbe", + "x-ms-client-request-id" : "6a7590b4-76fb-4b6c-940b-03a8e0a3f27b", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:58 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:41 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename774088ea')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename195207fa')", "Content-Length" : "0", - "x-ms-request-id" : "ee05d887-f002-0074-75ff-77feac000000", + "x-ms-request-id" : "b9dd635d-b002-00dc-7b3e-866002000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "1e0e3702-e196-477f-83f3-720b9a524fbe", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename774088ea')" + "x-ms-client-request-id" : "6a7590b4-76fb-4b6c-940b-03a8e0a3f27b", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename195207fa')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "e4866138-24ce-4bc6-a2b9-b80a05cb80fe", + "x-ms-client-request-id" : "655c49cf-2af6-4c20-8d4c-41c2c20c8fcd", "Content-Type" : "application/json" }, "Response" : { @@ -39,16 +39,16 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:58 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:41 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename08545350')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename07060a19')", "Content-Length" : "0", - "x-ms-request-id" : "ee05d8ac-f002-0074-0fff-77feac000000", + "x-ms-request-id" : "b9dd637a-b002-00dc-113e-866002000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "e4866138-24ce-4bc6-a2b9-b80a05cb80fe", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename08545350')" + "x-ms-client-request-id" : "655c49cf-2af6-4c20-8d4c-41c2c20c8fcd", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename07060a19')" }, "Exception" : null } ], - "variables" : [ "tablename774088ea", "tablename08545350" ] + "variables" : [ "tablename195207fa", "tablename07060a19" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityAsync.json index 31c86b4a8f35b..49cbe8ae8dd4e 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "d1f2369b-af83-4bc8-a415-e7477d148b0a", + "x-ms-client-request-id" : "1af7043b-3b48-4ad7-8153-7ec97ce81bad", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:18 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:27 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename20344821')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename212182bd')", "Content-Length" : "0", - "x-ms-request-id" : "7c5bb9cf-3002-00c2-10ff-778cda000000", + "x-ms-request-id" : "b897eb46-a002-0056-213e-863bb3000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "d1f2369b-af83-4bc8-a415-e7477d148b0a", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename20344821')" + "x-ms-client-request-id" : "1af7043b-3b48-4ad7-8153-7ec97ce81bad", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename212182bd')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename20344821", + "Uri" : "https://REDACTED.table.core.windows.net/tablename212182bd", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "036c90db-2d59-4710-8c2a-3200458dc9e4", + "x-ms-client-request-id" : "ff390132-1df6-4241-b94e-ceeb79de6e91", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:19 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:27 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A19.8243198Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename20344821(PartitionKey='partitionkey53663f',RowKey='rowkey713953d34')", + "ETag" : "W/datetime'2020-09-09T00%3A16%3A28.3715366Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename212182bd(PartitionKey='partitionkey081696',RowKey='rowkey99975bb80')", "Content-Length" : "0", - "x-ms-request-id" : "7c5bb9e5-3002-00c2-23ff-778cda000000", + "x-ms-request-id" : "b897eb5a-a002-0056-2d3e-863bb3000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "036c90db-2d59-4710-8c2a-3200458dc9e4", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename20344821(PartitionKey='partitionkey53663f',RowKey='rowkey713953d34')" + "x-ms-client-request-id" : "ff390132-1df6-4241-b94e-ceeb79de6e91", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename212182bd(PartitionKey='partitionkey081696',RowKey='rowkey99975bb80')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename20344821(PartitionKey='partitionkey53663f',RowKey='rowkey713953d34')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename212182bd(PartitionKey='partitionkey081696',RowKey='rowkey99975bb80')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "6a72d18f-a157-47ed-b1f5-cc0336f6cace" + "x-ms-client-request-id" : "271e77f2-3fc4-4f25-9f57-92593b9f3e0c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,22 +65,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:10:19 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:27 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A19.8243198Z'", - "x-ms-request-id" : "7c5bba00-3002-00c2-3bff-778cda000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename20344821/@Element\",\"odata.type\":\"brsiegelsample.tablename20344821\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename20344821(PartitionKey='partitionkey53663f',RowKey='rowkey713953d34')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A10%3A19.8243198Z'\\\"\",\"odata.editLink\":\"tablename20344821(PartitionKey='partitionkey53663f',RowKey='rowkey713953d34')\",\"PartitionKey\":\"partitionkey53663f\",\"RowKey\":\"rowkey713953d34\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:10:19.8243198Z\"}", - "x-ms-client-request-id" : "6a72d18f-a157-47ed-b1f5-cc0336f6cace", + "ETag" : "W/datetime'2020-09-09T00%3A16%3A28.3715366Z'", + "x-ms-request-id" : "b897eb5e-a002-0056-313e-863bb3000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename212182bd/@Element\",\"odata.type\":\"brsiegelsample.tablename212182bd\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename212182bd(PartitionKey='partitionkey081696',RowKey='rowkey99975bb80')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A16%3A28.3715366Z'\\\"\",\"odata.editLink\":\"tablename212182bd(PartitionKey='partitionkey081696',RowKey='rowkey99975bb80')\",\"PartitionKey\":\"partitionkey081696\",\"RowKey\":\"rowkey99975bb80\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:16:28.3715366Z\"}", + "x-ms-client-request-id" : "271e77f2-3fc4-4f25-9f57-92593b9f3e0c", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/tablename20344821(PartitionKey='partitionkey53663f',RowKey='rowkey713953d34')", + "Uri" : "https://REDACTED.table.core.windows.net/tablename212182bd(PartitionKey='partitionkey081696',RowKey='rowkey99975bb80')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "0941c723-feb2-47e7-b52b-054dd7bf9d3b" + "x-ms-client-request-id" : "84faa44c-1803-4a56-ae58-189170d03976" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -90,11 +90,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "7c5bba14-3002-00c2-49ff-778cda000000", - "Date" : "Fri, 21 Aug 2020 21:10:19 GMT", - "x-ms-client-request-id" : "0941c723-feb2-47e7-b52b-054dd7bf9d3b" + "x-ms-request-id" : "b897eb71-a002-0056-3f3e-863bb3000000", + "Date" : "Wed, 09 Sep 2020 00:16:28 GMT", + "x-ms-client-request-id" : "84faa44c-1803-4a56-ae58-189170d03976" }, "Exception" : null } ], - "variables" : [ "tablename20344821", "partitionkey53663f", "rowkey713953d34" ] + "variables" : [ "tablename212182bd", "partitionkey081696", "rowkey99975bb80" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityImpl.json index 9770805077113..f3e59c83629c9 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "905a0024-47d5-48b6-a3c2-d9b2d7f8a1c1", + "x-ms-client-request-id" : "2087e32b-151b-418b-87a7-f212caa75128", "Content-Type" : "application/json" }, "Response" : { @@ -13,22 +13,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:40 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:52 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test35791926bd')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test33864ff018')", "Content-Length" : "0", - "x-ms-request-id" : "80f63693-6002-0076-0cff-774014000000", + "x-ms-request-id" : "dc573bbd-9002-004d-383e-8605b0000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "905a0024-47d5-48b6-a3c2-d9b2d7f8a1c1", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test35791926bd')" + "x-ms-client-request-id" : "2087e32b-151b-418b-87a7-f212caa75128", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test33864ff018')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/test35791926bd?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test33864ff018?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "f19638f2-0561-4aae-93e8-bc7097c7315a", + "x-ms-client-request-id" : "c78897fb-9453-480e-92af-cac38ed1af7c", "Content-Type" : "application/json" }, "Response" : { @@ -37,23 +37,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:40 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:52 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/\"datetime'2020-08-21T21%3A09%3A40.8835619Z'\"", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test35791926bd(PartitionKey='partitionkey32752a',RowKey='rowkey087190307')", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A53.621257Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test33864ff018(PartitionKey='partitionkey838012',RowKey='rowkey66462cbb3')", "Content-Length" : "0", - "x-ms-request-id" : "80f636a7-6002-0076-1bff-774014000000", + "x-ms-request-id" : "dc573bc8-9002-004d-3f3e-8605b0000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "f19638f2-0561-4aae-93e8-bc7097c7315a", - "Location" : "https://brsiegelsample.table.core.windows.net/test35791926bd(PartitionKey='partitionkey32752a',RowKey='rowkey087190307')" + "x-ms-client-request-id" : "c78897fb-9453-480e-92af-cac38ed1af7c", + "Location" : "https://brsiegelsample.table.core.windows.net/test33864ff018(PartitionKey='partitionkey838012',RowKey='rowkey66462cbb3')" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/test35791926bd(PartitionKey='partitionkey32752a',RowKey='rowkey087190307')?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test33864ff018(PartitionKey='partitionkey838012',RowKey='rowkey66462cbb3')?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "422e77e2-9532-4bba-8fb3-b67d0f35765d" + "x-ms-client-request-id" : "2fa0759f-6be3-4a7f-aa9c-1cf4a38389b8" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -63,9 +63,9 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "80f636ad-6002-0076-21ff-774014000000", - "Date" : "Fri, 21 Aug 2020 21:09:40 GMT", - "x-ms-client-request-id" : "422e77e2-9532-4bba-8fb3-b67d0f35765d" + "x-ms-request-id" : "dc573bd1-9002-004d-453e-8605b0000000", + "Date" : "Wed, 09 Sep 2020 00:13:52 GMT", + "x-ms-client-request-id" : "2fa0759f-6be3-4a7f-aa9c-1cf4a38389b8" }, "Exception" : null }, { @@ -73,7 +73,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "87acc482-94e0-450b-947b-2a15d3955b4f" + "x-ms-client-request-id" : "b564014c-df01-44f8-98ba-5f83468118fb" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -83,19 +83,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "80f636b0-6002-0076-24ff-774014000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test35791926bd\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:40 GMT", - "x-ms-client-request-id" : "87acc482-94e0-450b-947b-2a15d3955b4f", + "x-ms-request-id" : "dc573bd5-9002-004d-493e-8605b0000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test33864ff018\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:53 GMT", + "x-ms-client-request-id" : "b564014c-df01-44f8-98ba-5f83468118fb", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test35791926bd')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test33864ff018')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "cb92801c-4c1c-4530-bbc1-729ae58962d7" + "x-ms-client-request-id" : "7490da76-2ce6-4249-bebc-62d379ad26d1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -105,11 +105,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "0af58ddf-c002-00c6-45ff-7701dd000000", - "Date" : "Fri, 21 Aug 2020 21:09:40 GMT", - "x-ms-client-request-id" : "cb92801c-4c1c-4530-bbc1-729ae58962d7" + "x-ms-request-id" : "dc573bd9-9002-004d-4c3e-8605b0000000", + "Date" : "Wed, 09 Sep 2020 00:13:53 GMT", + "x-ms-client-request-id" : "7490da76-2ce6-4249-bebc-62d379ad26d1" }, "Exception" : null } ], - "variables" : [ "test35791926bd", "905a0024-47d5-48b6-a3c2-d9b2d7f8a1c1", "partitionkey32752a", "rowkey087190307", "422e77e2-9532-4bba-8fb3-b67d0f35765d", "f19638f2-0561-4aae-93e8-bc7097c7315a", "87acc482-94e0-450b-947b-2a15d3955b4f", "cb92801c-4c1c-4530-bbc1-729ae58962d7" ] + "variables" : [ "test33864ff018", "2087e32b-151b-418b-87a7-f212caa75128", "partitionkey838012", "rowkey66462cbb3", "2fa0759f-6be3-4a7f-aa9c-1cf4a38389b8", "c78897fb-9453-480e-92af-cac38ed1af7c", "b564014c-df01-44f8-98ba-5f83468118fb", "7490da76-2ce6-4249-bebc-62d379ad26d1" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityWithResponseAsync.json index 006bf0ee5635a..c0e7194a0782f 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityWithResponseAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityWithResponseAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "b53376d4-ff76-4634-b9d4-ee24681456cc", + "x-ms-client-request-id" : "3bc5a2bd-9721-4f4f-bb17-e511d1ba6655", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:05 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:52 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename53065f85')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename103535ed')", "Content-Length" : "0", - "x-ms-request-id" : "2bdc3936-8002-00d7-79ff-779b69000000", + "x-ms-request-id" : "56da4adf-3002-00ed-043e-868111000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "b53376d4-ff76-4634-b9d4-ee24681456cc", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename53065f85')" + "x-ms-client-request-id" : "3bc5a2bd-9721-4f4f-bb17-e511d1ba6655", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename103535ed')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename53065f85", + "Uri" : "https://REDACTED.table.core.windows.net/tablename103535ed", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "24e0f004-8da9-4d93-9174-3373f261af53", + "x-ms-client-request-id" : "66602ac9-6d31-4bf6-b469-ded7904b5873", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:05 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:52 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A05.2881569Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename53065f85(PartitionKey='partitionkey75862c',RowKey='rowkey5076374ee')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A52.968337Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename103535ed(PartitionKey='partitionkey97808e',RowKey='rowkey595510524')", "Content-Length" : "0", - "x-ms-request-id" : "2bdc3944-8002-00d7-03ff-779b69000000", + "x-ms-request-id" : "56da4afa-3002-00ed-1a3e-868111000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "24e0f004-8da9-4d93-9174-3373f261af53", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename53065f85(PartitionKey='partitionkey75862c',RowKey='rowkey5076374ee')" + "x-ms-client-request-id" : "66602ac9-6d31-4bf6-b469-ded7904b5873", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename103535ed(PartitionKey='partitionkey97808e',RowKey='rowkey595510524')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename53065f85(PartitionKey='partitionkey75862c',RowKey='rowkey5076374ee')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename103535ed(PartitionKey='partitionkey97808e',RowKey='rowkey595510524')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "25b4e982-6416-40a1-81dc-eac8bdd9d37e" + "x-ms-client-request-id" : "58b3544f-93b9-40f3-9a4d-539ffe32baa1" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,22 +65,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:10:05 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:52 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A05.2881569Z'", - "x-ms-request-id" : "2bdc394d-8002-00d7-0bff-779b69000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename53065f85/@Element\",\"odata.type\":\"brsiegelsample.tablename53065f85\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename53065f85(PartitionKey='partitionkey75862c',RowKey='rowkey5076374ee')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A10%3A05.2881569Z'\\\"\",\"odata.editLink\":\"tablename53065f85(PartitionKey='partitionkey75862c',RowKey='rowkey5076374ee')\",\"PartitionKey\":\"partitionkey75862c\",\"RowKey\":\"rowkey5076374ee\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:10:05.2881569Z\"}", - "x-ms-client-request-id" : "25b4e982-6416-40a1-81dc-eac8bdd9d37e", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A52.968337Z'", + "x-ms-request-id" : "56da4aff-3002-00ed-1f3e-868111000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename103535ed/@Element\",\"odata.type\":\"brsiegelsample.tablename103535ed\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename103535ed(PartitionKey='partitionkey97808e',RowKey='rowkey595510524')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A52.968337Z'\\\"\",\"odata.editLink\":\"tablename103535ed(PartitionKey='partitionkey97808e',RowKey='rowkey595510524')\",\"PartitionKey\":\"partitionkey97808e\",\"RowKey\":\"rowkey595510524\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:52.968337Z\"}", + "x-ms-client-request-id" : "58b3544f-93b9-40f3-9a4d-539ffe32baa1", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/tablename53065f85(PartitionKey='partitionkey75862c',RowKey='rowkey5076374ee')", + "Uri" : "https://REDACTED.table.core.windows.net/tablename103535ed(PartitionKey='partitionkey97808e',RowKey='rowkey595510524')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "6904bbf3-b5ff-4a7b-9acd-ce302cdaa224" + "x-ms-client-request-id" : "d7ab4752-df24-472e-994e-390e0c11b662" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -90,11 +90,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "2bdc3956-8002-00d7-12ff-779b69000000", - "Date" : "Fri, 21 Aug 2020 21:10:05 GMT", - "x-ms-client-request-id" : "6904bbf3-b5ff-4a7b-9acd-ce302cdaa224" + "x-ms-request-id" : "56da4b26-3002-00ed-413e-868111000000", + "Date" : "Wed, 09 Sep 2020 00:14:52 GMT", + "x-ms-client-request-id" : "d7ab4752-df24-472e-994e-390e0c11b662" }, "Exception" : null } ], - "variables" : [ "tablename53065f85", "partitionkey75862c", "rowkey5076374ee" ] + "variables" : [ "tablename103535ed", "partitionkey97808e", "rowkey595510524" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityWithResponseMatchETagAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityWithResponseMatchETagAsync.json index 5b92c4c212e50..091e5c3c334f1 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityWithResponseMatchETagAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteEntityWithResponseMatchETagAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "380cfb28-3c4f-4592-afb9-27bb845b49b7", + "x-ms-client-request-id" : "1fb5b0ee-4114-4d2d-89c1-36ed5d91ebc2", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:13 GMT", + "Date" : "Wed, 09 Sep 2020 00:15:02 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename56815762')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename636041ef')", "Content-Length" : "0", - "x-ms-request-id" : "3aa2ca22-b002-004a-32ff-7769d3000000", + "x-ms-request-id" : "151a683f-8002-00b5-553e-86594e000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "380cfb28-3c4f-4592-afb9-27bb845b49b7", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename56815762')" + "x-ms-client-request-id" : "1fb5b0ee-4114-4d2d-89c1-36ed5d91ebc2", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename636041ef')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename56815762", + "Uri" : "https://REDACTED.table.core.windows.net/tablename636041ef", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "ace379a1-86f7-4ab3-b979-b8a380f43bdb", + "x-ms-client-request-id" : "06f93083-7779-4d32-89b9-6796a395059a", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:14 GMT", + "Date" : "Wed, 09 Sep 2020 00:15:03 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A14.2888492Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename56815762(PartitionKey='partitionkey81559e',RowKey='rowkey34093676f')", + "ETag" : "W/datetime'2020-09-09T00%3A15%3A03.306533Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename636041ef(PartitionKey='partitionkey58413d',RowKey='rowkey1618275e8')", "Content-Length" : "0", - "x-ms-request-id" : "3aa2ca34-b002-004a-40ff-7769d3000000", + "x-ms-request-id" : "151a6862-8002-00b5-723e-86594e000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "ace379a1-86f7-4ab3-b979-b8a380f43bdb", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename56815762(PartitionKey='partitionkey81559e',RowKey='rowkey34093676f')" + "x-ms-client-request-id" : "06f93083-7779-4d32-89b9-6796a395059a", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename636041ef(PartitionKey='partitionkey58413d',RowKey='rowkey1618275e8')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename56815762(PartitionKey='partitionkey81559e',RowKey='rowkey34093676f')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename636041ef(PartitionKey='partitionkey58413d',RowKey='rowkey1618275e8')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "b4143b63-b81d-4ea6-81c0-32ad2925a7c9" + "x-ms-client-request-id" : "c6057e90-7023-4744-be0a-1e348c04e60e" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,22 +65,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:10:14 GMT", + "Date" : "Wed, 09 Sep 2020 00:15:03 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A14.2888492Z'", - "x-ms-request-id" : "3aa2ca3c-b002-004a-47ff-7769d3000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename56815762/@Element\",\"odata.type\":\"brsiegelsample.tablename56815762\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename56815762(PartitionKey='partitionkey81559e',RowKey='rowkey34093676f')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A10%3A14.2888492Z'\\\"\",\"odata.editLink\":\"tablename56815762(PartitionKey='partitionkey81559e',RowKey='rowkey34093676f')\",\"PartitionKey\":\"partitionkey81559e\",\"RowKey\":\"rowkey34093676f\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:10:14.2888492Z\"}", - "x-ms-client-request-id" : "b4143b63-b81d-4ea6-81c0-32ad2925a7c9", + "ETag" : "W/datetime'2020-09-09T00%3A15%3A03.306533Z'", + "x-ms-request-id" : "151a687d-8002-00b5-0d3e-86594e000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename636041ef/@Element\",\"odata.type\":\"brsiegelsample.tablename636041ef\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename636041ef(PartitionKey='partitionkey58413d',RowKey='rowkey1618275e8')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A15%3A03.306533Z'\\\"\",\"odata.editLink\":\"tablename636041ef(PartitionKey='partitionkey58413d',RowKey='rowkey1618275e8')\",\"PartitionKey\":\"partitionkey58413d\",\"RowKey\":\"rowkey1618275e8\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:15:03.306533Z\"}", + "x-ms-client-request-id" : "c6057e90-7023-4744-be0a-1e348c04e60e", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/tablename56815762(PartitionKey='partitionkey81559e',RowKey='rowkey34093676f')", + "Uri" : "https://REDACTED.table.core.windows.net/tablename636041ef(PartitionKey='partitionkey58413d',RowKey='rowkey1618275e8')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "93ad363a-d0c0-4d73-9123-1938eb2cbddb" + "x-ms-client-request-id" : "aaf37a47-5143-4dc4-a541-6503f34d80e5" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -90,11 +90,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "3aa2ca4b-b002-004a-54ff-7769d3000000", - "Date" : "Fri, 21 Aug 2020 21:10:14 GMT", - "x-ms-client-request-id" : "93ad363a-d0c0-4d73-9123-1938eb2cbddb" + "x-ms-request-id" : "151a688f-8002-00b5-1f3e-86594e000000", + "Date" : "Wed, 09 Sep 2020 00:15:03 GMT", + "x-ms-client-request-id" : "aaf37a47-5143-4dc4-a541-6503f34d80e5" }, "Exception" : null } ], - "variables" : [ "tablename56815762", "partitionkey81559e", "rowkey34093676f" ] + "variables" : [ "tablename636041ef", "partitionkey58413d", "rowkey1618275e8" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteNonExistentEntityImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteNonExistentEntityImpl.json index 006e6dd5ef627..dc5e58599a59f 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteNonExistentEntityImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteNonExistentEntityImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "0961e984-b5e9-454c-b816-4419a03a3354", + "x-ms-client-request-id" : "e742068a-326e-48e5-bc3e-682371114771", "Content-Type" : "application/json" }, "Response" : { @@ -13,22 +13,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:17 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:24 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test81472bb1e7')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test35245267ea')", "Content-Length" : "0", - "x-ms-request-id" : "5fd057fa-0002-003d-32ff-77bc47000000", + "x-ms-request-id" : "c1c201c6-f002-00e2-593e-86f77d000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "0961e984-b5e9-454c-b816-4419a03a3354", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test81472bb1e7')" + "x-ms-client-request-id" : "e742068a-326e-48e5-bc3e-682371114771", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test35245267ea')" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/test81472bb1e7(PartitionKey='partitionkey66838c',RowKey='rowkey80923896c')?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test35245267ea(PartitionKey='partitionkey429375',RowKey='rowkey919681088')?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "fa334175-1da8-41bc-817e-77a7923b9486" + "x-ms-client-request-id" : "21a223c3-4892-4694-b803-b136a5f6c46c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -38,10 +38,10 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "5fd05810-0002-003d-43ff-77bc47000000", - "Body" : "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:5fd05810-0002-003d-43ff-77bc47000000\\nTime:2020-08-21T21:09:18.5478139Z\"}}}", - "Date" : "Fri, 21 Aug 2020 21:09:17 GMT", - "x-ms-client-request-id" : "fa334175-1da8-41bc-817e-77a7923b9486", + "x-ms-request-id" : "c1c201d3-f002-00e2-633e-86f77d000000", + "Body" : "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:c1c201d3-f002-00e2-633e-86f77d000000\\nTime:2020-09-09T00:13:24.6242564Z\"}}}", + "Date" : "Wed, 09 Sep 2020 00:13:24 GMT", + "x-ms-client-request-id" : "21a223c3-4892-4694-b803-b136a5f6c46c", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null @@ -50,7 +50,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "040f5a55-7bd6-44b6-82de-ffcc52e5759d" + "x-ms-client-request-id" : "e8e94789-a6d0-4683-a5bb-96d6575e86f0" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -60,19 +60,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5fd0581a-0002-003d-4dff-77bc47000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test81472bb1e7\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:17 GMT", - "x-ms-client-request-id" : "040f5a55-7bd6-44b6-82de-ffcc52e5759d", + "x-ms-request-id" : "c1c201d6-f002-00e2-653e-86f77d000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test35245267ea\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:24 GMT", + "x-ms-client-request-id" : "e8e94789-a6d0-4683-a5bb-96d6575e86f0", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test81472bb1e7')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test35245267ea')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "eb822c1f-5e29-4fb4-ae39-16d21445fe0e" + "x-ms-client-request-id" : "c9bea2b6-8dbc-4ccf-8eff-6d3bea577f7d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -82,11 +82,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "a69346a8-f002-0029-76ff-77f428000000", - "Date" : "Fri, 21 Aug 2020 21:09:17 GMT", - "x-ms-client-request-id" : "eb822c1f-5e29-4fb4-ae39-16d21445fe0e" + "x-ms-request-id" : "c1c201dd-f002-00e2-6b3e-86f77d000000", + "Date" : "Wed, 09 Sep 2020 00:13:24 GMT", + "x-ms-client-request-id" : "c9bea2b6-8dbc-4ccf-8eff-6d3bea577f7d" }, "Exception" : null } ], - "variables" : [ "test81472bb1e7", "0961e984-b5e9-454c-b816-4419a03a3354", "partitionkey66838c", "rowkey80923896c", "fa334175-1da8-41bc-817e-77a7923b9486", "040f5a55-7bd6-44b6-82de-ffcc52e5759d", "eb822c1f-5e29-4fb4-ae39-16d21445fe0e" ] + "variables" : [ "test35245267ea", "e742068a-326e-48e5-bc3e-682371114771", "partitionkey429375", "rowkey919681088", "21a223c3-4892-4694-b803-b136a5f6c46c", "e8e94789-a6d0-4683-a5bb-96d6575e86f0", "c9bea2b6-8dbc-4ccf-8eff-6d3bea577f7d" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteNonExistentTableImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteNonExistentTableImpl.json index 714ad4b134b3f..aa69c32254dd7 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteNonExistentTableImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteNonExistentTableImpl.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test78156389eb')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test7205076b67')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "0858bf69-adff-4d47-b57e-9d620b018555" + "x-ms-client-request-id" : "00e19e32-e7e9-4368-bd10-11875633594d" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -14,10 +14,10 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "117d9419-9002-0062-2cff-77087b000000", - "Body" : "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:117d9419-9002-0062-2cff-77087b000000\\nTime:2020-08-21T21:09:35.5512687Z\"}}}", - "Date" : "Fri, 21 Aug 2020 21:09:35 GMT", - "x-ms-client-request-id" : "0858bf69-adff-4d47-b57e-9d620b018555", + "x-ms-request-id" : "04c5c860-d002-00e5-113e-869b1e000000", + "Body" : "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:04c5c860-d002-00e5-113e-869b1e000000\\nTime:2020-09-09T00:13:45.3437444Z\"}}}", + "Date" : "Wed, 09 Sep 2020 00:13:45 GMT", + "x-ms-client-request-id" : "00e19e32-e7e9-4368-bd10-11875633594d", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null @@ -26,7 +26,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "3a5a3a86-3a43-46cd-9051-c15a8d4b726b" + "x-ms-client-request-id" : "0752032a-dd80-44d6-8033-e132ed1dff4b" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -36,13 +36,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "117d9426-9002-0062-36ff-77087b000000", + "x-ms-request-id" : "04c5c864-d002-00e5-143e-869b1e000000", "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[]}", - "Date" : "Fri, 21 Aug 2020 21:09:35 GMT", - "x-ms-client-request-id" : "3a5a3a86-3a43-46cd-9051-c15a8d4b726b", + "Date" : "Wed, 09 Sep 2020 00:13:45 GMT", + "x-ms-client-request-id" : "0752032a-dd80-44d6-8033-e132ed1dff4b", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test78156389eb", "0858bf69-adff-4d47-b57e-9d620b018555", "3a5a3a86-3a43-46cd-9051-c15a8d4b726b" ] + "variables" : [ "test7205076b67", "00e19e32-e7e9-4368-bd10-11875633594d", "0752032a-dd80-44d6-8033-e132ed1dff4b" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableAsync.json index e60f73cd2b26e..5c815868a6e37 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "9b6fb7fd-1281-45fd-91ca-5d11bd172a25", + "x-ms-client-request-id" : "a4fd839c-c7b4-4661-b4fb-d1ce4fc03e4b", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:16 GMT", + "Date" : "Wed, 09 Sep 2020 00:15:06 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename13930307')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename78355bdf')", "Content-Length" : "0", - "x-ms-request-id" : "c2865fe6-8002-009a-6aff-775485000000", + "x-ms-request-id" : "d808032b-7002-00a1-0d3e-861121000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "9b6fb7fd-1281-45fd-91ca-5d11bd172a25", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename13930307')" + "x-ms-client-request-id" : "a4fd839c-c7b4-4661-b4fb-d1ce4fc03e4b", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename78355bdf')" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename13930307')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename78355bdf')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "bd9d4c73-4c8b-4565-8f0b-f4b5e23b16aa" + "x-ms-client-request-id" : "18f57192-5376-407f-aeb8-3f6ff3046816" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -40,11 +40,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "c2865fee-8002-009a-70ff-775485000000", - "Date" : "Fri, 21 Aug 2020 21:10:16 GMT", - "x-ms-client-request-id" : "bd9d4c73-4c8b-4565-8f0b-f4b5e23b16aa" + "x-ms-request-id" : "d808033d-7002-00a1-1c3e-861121000000", + "Date" : "Wed, 09 Sep 2020 00:15:07 GMT", + "x-ms-client-request-id" : "18f57192-5376-407f-aeb8-3f6ff3046816" }, "Exception" : null } ], - "variables" : [ "tablename13930307" ] + "variables" : [ "tablename78355bdf" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableImpl.json index 32051e865e526..09da4a0c0bcee 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "d9a45745-4270-4c96-97b3-5645455ff309", + "x-ms-client-request-id" : "6574c224-e369-4c95-80b5-0226097abd47", "Content-Type" : "application/json" }, "Response" : { @@ -13,22 +13,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:22 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:32 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test08290de21e')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test13545526fe')", "Content-Length" : "0", - "x-ms-request-id" : "7ddf023f-b002-0028-52ff-77abf4000000", + "x-ms-request-id" : "4020571b-6002-0082-1e3e-868be2000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "d9a45745-4270-4c96-97b3-5645455ff309", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test08290de21e')" + "x-ms-client-request-id" : "6574c224-e369-4c95-80b5-0226097abd47", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test13545526fe')" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test08290de21e')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test13545526fe')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "9893591b-2cf8-43d8-85f4-d2f43074377c" + "x-ms-client-request-id" : "6ce513ee-9521-4775-8d4c-ba47520ff3eb" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -38,9 +38,9 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "7ddf025d-b002-0028-6bff-77abf4000000", - "Date" : "Fri, 21 Aug 2020 21:09:23 GMT", - "x-ms-client-request-id" : "9893591b-2cf8-43d8-85f4-d2f43074377c" + "x-ms-request-id" : "4020572e-6002-0082-253e-868be2000000", + "Date" : "Wed, 09 Sep 2020 00:13:32 GMT", + "x-ms-client-request-id" : "6ce513ee-9521-4775-8d4c-ba47520ff3eb" }, "Exception" : null }, { @@ -48,7 +48,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "7fdc3c30-0428-4208-972b-a88763af61f5" + "x-ms-client-request-id" : "91a41d79-44fc-473c-be73-ae26ec6f3aba" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -58,13 +58,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7ddf0265-b002-0028-72ff-77abf4000000", + "x-ms-request-id" : "40205730-6002-0082-273e-868be2000000", "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[]}", - "Date" : "Fri, 21 Aug 2020 21:09:23 GMT", - "x-ms-client-request-id" : "7fdc3c30-0428-4208-972b-a88763af61f5", + "Date" : "Wed, 09 Sep 2020 00:13:32 GMT", + "x-ms-client-request-id" : "91a41d79-44fc-473c-be73-ae26ec6f3aba", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test08290de21e", "d9a45745-4270-4c96-97b3-5645455ff309", "9893591b-2cf8-43d8-85f4-d2f43074377c", "7fdc3c30-0428-4208-972b-a88763af61f5" ] + "variables" : [ "test13545526fe", "6574c224-e369-4c95-80b5-0226097abd47", "6ce513ee-9521-4775-8d4c-ba47520ff3eb", "91a41d79-44fc-473c-be73-ae26ec6f3aba" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableWithResponseAsync.json index 9c56771d351e9..7150b6f0cfea0 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableWithResponseAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/deleteTableWithResponseAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "04f49e94-5b4d-412b-917e-6d4672153a66", + "x-ms-client-request-id" : "86985dbb-0576-4295-9cf5-f9ac156f4b60", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:02 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:45 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename24219d2c')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename31785bf5')", "Content-Length" : "0", - "x-ms-request-id" : "fcf55d64-d002-0073-56ff-7792cf000000", + "x-ms-request-id" : "13fc4b17-0002-0094-363e-867d35000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "04f49e94-5b4d-412b-917e-6d4672153a66", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename24219d2c')" + "x-ms-client-request-id" : "86985dbb-0576-4295-9cf5-f9ac156f4b60", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename31785bf5')" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename24219d2c')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename31785bf5')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "01cd0c88-e6b4-4b8a-b130-19ca8f2af661" + "x-ms-client-request-id" : "da6cc81c-664c-43bb-ab06-2f097c3c6c6c" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -40,11 +40,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "fcf55d6e-d002-0073-5cff-7792cf000000", - "Date" : "Fri, 21 Aug 2020 21:10:02 GMT", - "x-ms-client-request-id" : "01cd0c88-e6b4-4b8a-b130-19ca8f2af661" + "x-ms-request-id" : "13fc4b1e-0002-0094-3b3e-867d35000000", + "Date" : "Wed, 09 Sep 2020 00:14:45 GMT", + "x-ms-client-request-id" : "da6cc81c-664c-43bb-ab06-2f097c3c6c6c" }, "Exception" : null } ], - "variables" : [ "tablename24219d2c" ] + "variables" : [ "tablename31785bf5" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/getEntityWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/getEntityWithResponseAsync.json index 2d8c72d14a07a..095a084018f4d 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/getEntityWithResponseAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/getEntityWithResponseAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "81f2d824-6213-457e-831c-7d5e35aa6267", + "x-ms-client-request-id" : "ca5e21f8-ce94-4587-8498-a36ccb069504", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:53 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:25 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename428063ec')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename639231a3')", "Content-Length" : "0", - "x-ms-request-id" : "956a9202-d002-004c-1dff-775a6c000000", + "x-ms-request-id" : "2fef261c-2002-0083-753e-86d43e000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "81f2d824-6213-457e-831c-7d5e35aa6267", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename428063ec')" + "x-ms-client-request-id" : "ca5e21f8-ce94-4587-8498-a36ccb069504", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename639231a3')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename428063ec", + "Uri" : "https://REDACTED.table.core.windows.net/tablename639231a3", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "63a087ff-0560-4faa-ad63-ccc8a1b9169b", + "x-ms-client-request-id" : "aa811275-44dc-497a-ab8f-f91ef1d1ea09", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:53 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:25 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A09%3A53.8307024Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename428063ec(PartitionKey='partitionkey163801',RowKey='rowkey7034938ba')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A26.1434277Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename639231a3(PartitionKey='partitionkey50128f',RowKey='rowkey238002172')", "Content-Length" : "0", - "x-ms-request-id" : "956a920b-d002-004c-22ff-775a6c000000", + "x-ms-request-id" : "2fef2630-2002-0083-013e-86d43e000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "63a087ff-0560-4faa-ad63-ccc8a1b9169b", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename428063ec(PartitionKey='partitionkey163801',RowKey='rowkey7034938ba')" + "x-ms-client-request-id" : "aa811275-44dc-497a-ab8f-f91ef1d1ea09", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename639231a3(PartitionKey='partitionkey50128f',RowKey='rowkey238002172')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename428063ec(PartitionKey='partitionkey163801',RowKey='rowkey7034938ba')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename639231a3(PartitionKey='partitionkey50128f',RowKey='rowkey238002172')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "525ea6fe-59c9-4f0d-b92b-007bfddd0bb7" + "x-ms-client-request-id" : "6f21a420-01d4-4f0a-8a00-36781e88df77" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,15 +65,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:09:53 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:25 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A09%3A53.8307024Z'", - "x-ms-request-id" : "956a9210-d002-004c-25ff-775a6c000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename428063ec/@Element\",\"odata.type\":\"brsiegelsample.tablename428063ec\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename428063ec(PartitionKey='partitionkey163801',RowKey='rowkey7034938ba')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A09%3A53.8307024Z'\\\"\",\"odata.editLink\":\"tablename428063ec(PartitionKey='partitionkey163801',RowKey='rowkey7034938ba')\",\"PartitionKey\":\"partitionkey163801\",\"RowKey\":\"rowkey7034938ba\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:09:53.8307024Z\"}", - "x-ms-client-request-id" : "525ea6fe-59c9-4f0d-b92b-007bfddd0bb7", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A26.1434277Z'", + "x-ms-request-id" : "2fef263d-2002-0083-0a3e-86d43e000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename639231a3/@Element\",\"odata.type\":\"brsiegelsample.tablename639231a3\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename639231a3(PartitionKey='partitionkey50128f',RowKey='rowkey238002172')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A26.1434277Z'\\\"\",\"odata.editLink\":\"tablename639231a3(PartitionKey='partitionkey50128f',RowKey='rowkey238002172')\",\"PartitionKey\":\"partitionkey50128f\",\"RowKey\":\"rowkey238002172\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:26.1434277Z\"}", + "x-ms-client-request-id" : "6f21a420-01d4-4f0a-8a00-36781e88df77", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "tablename428063ec", "partitionkey163801", "rowkey7034938ba" ] + "variables" : [ "tablename639231a3", "partitionkey50128f", "rowkey238002172" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/insertNoETagImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/insertNoETagImpl.json index 7bb57428094f9..5f9c5e236f5ea 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/insertNoETagImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/insertNoETagImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "dda1b5a9-5247-4d08-b8d0-4ab83c21877d", + "x-ms-client-request-id" : "e17c2575-a75e-4581-a7eb-be576478170e", "Content-Type" : "application/json" }, "Response" : { @@ -13,22 +13,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:43 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:01 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test440049d595')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test513353e71c')", "Content-Length" : "0", - "x-ms-request-id" : "9d55e6d9-1002-00c5-06ff-77e0b9000000", + "x-ms-request-id" : "b897c80c-a002-0056-183e-863bb3000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "dda1b5a9-5247-4d08-b8d0-4ab83c21877d", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test440049d595')" + "x-ms-client-request-id" : "e17c2575-a75e-4581-a7eb-be576478170e", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test513353e71c')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/test440049d595?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test513353e71c?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "301c8d19-baa8-48cf-842b-3f6c01eb5c4b", + "x-ms-client-request-id" : "a355af2d-95e4-40cd-b8d1-9427b8758c35", "Content-Type" : "application/json" }, "Response" : { @@ -37,15 +37,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:43 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:01 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/\"datetime'2020-08-21T21%3A09%3A44.6492858Z'\"", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test440049d595(PartitionKey='partitionkey73818c',RowKey='rowkey385600b9d')", + "ETag" : "W/\"datetime'2020-09-09T00%3A14%3A01.7683954Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test513353e71c(PartitionKey='partitionkey196012',RowKey='rowkey573554309')", "Content-Length" : "0", - "x-ms-request-id" : "9d55e6e8-1002-00c5-12ff-77e0b9000000", + "x-ms-request-id" : "b897c825-a002-0056-2c3e-863bb3000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "301c8d19-baa8-48cf-842b-3f6c01eb5c4b", - "Location" : "https://brsiegelsample.table.core.windows.net/test440049d595(PartitionKey='partitionkey73818c',RowKey='rowkey385600b9d')" + "x-ms-client-request-id" : "a355af2d-95e4-40cd-b8d1-9427b8758c35", + "Location" : "https://brsiegelsample.table.core.windows.net/test513353e71c(PartitionKey='partitionkey196012',RowKey='rowkey573554309')" }, "Exception" : null }, { @@ -53,7 +53,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "5ad420c7-4efb-452c-86c4-8d17d4c329bc" + "x-ms-client-request-id" : "d67659c3-78b6-4b32-bffd-1c7394be2695" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -63,19 +63,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "9d55e6ed-1002-00c5-16ff-77e0b9000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test440049d595\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:43 GMT", - "x-ms-client-request-id" : "5ad420c7-4efb-452c-86c4-8d17d4c329bc", + "x-ms-request-id" : "b897c829-a002-0056-2f3e-863bb3000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test513353e71c\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:01 GMT", + "x-ms-client-request-id" : "d67659c3-78b6-4b32-bffd-1c7394be2695", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test440049d595')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test513353e71c')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "141444ad-cf95-468f-b037-4a324e71933f" + "x-ms-client-request-id" : "e1a39492-62f7-4c44-b4d0-1f079da26af1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -85,11 +85,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "5c2a470f-b002-0075-78ff-77a170000000", - "Date" : "Fri, 21 Aug 2020 21:09:44 GMT", - "x-ms-client-request-id" : "141444ad-cf95-468f-b037-4a324e71933f" + "x-ms-request-id" : "b897c839-a002-0056-363e-863bb3000000", + "Date" : "Wed, 09 Sep 2020 00:14:01 GMT", + "x-ms-client-request-id" : "e1a39492-62f7-4c44-b4d0-1f079da26af1" }, "Exception" : null } ], - "variables" : [ "test440049d595", "dda1b5a9-5247-4d08-b8d0-4ab83c21877d", "partitionkey73818c", "rowkey385600b9d", "301c8d19-baa8-48cf-842b-3f6c01eb5c4b", "5ad420c7-4efb-452c-86c4-8d17d4c329bc", "141444ad-cf95-468f-b037-4a324e71933f" ] + "variables" : [ "test513353e71c", "e17c2575-a75e-4581-a7eb-be576478170e", "partitionkey196012", "rowkey573554309", "a355af2d-95e4-40cd-b8d1-9427b8758c35", "d67659c3-78b6-4b32-bffd-1c7394be2695", "e1a39492-62f7-4c44-b4d0-1f079da26af1" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesAsync.json index 442d9f50cf2ed..3956be955d086 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "fad069a0-b37b-4737-85fa-3ba98cb6f3dd", + "x-ms-client-request-id" : "728c13b1-1797-4dec-a9dd-33247e21cea9", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:58 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:48 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename577453a5')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename441531bf')", "Content-Length" : "0", - "x-ms-request-id" : "70d54cd7-7002-00c3-7ee2-7cd306000000", + "x-ms-request-id" : "0991c8fc-d002-005c-1e3e-869f04000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "fad069a0-b37b-4737-85fa-3ba98cb6f3dd", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename577453a5')" + "x-ms-client-request-id" : "728c13b1-1797-4dec-a9dd-33247e21cea9", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename441531bf')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename577453a5", + "Uri" : "https://REDACTED.table.core.windows.net/tablename441531bf", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "f00db36d-d908-4ca7-b19a-ea4c351cf969", + "x-ms-client-request-id" : "c8276c11-f8df-41dc-9959-925cdae62e52", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:58 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:48 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-28T02%3A26%3A58.439355Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey97788c73c')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A48.3782359Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename441531bf(PartitionKey='partitionkey241360',RowKey='rowkey25836fddb')", "Content-Length" : "0", - "x-ms-request-id" : "70d54ce7-7002-00c3-0be2-7cd306000000", + "x-ms-request-id" : "0991c914-d002-005c-313e-869f04000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "f00db36d-d908-4ca7-b19a-ea4c351cf969", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey97788c73c')" + "x-ms-client-request-id" : "c8276c11-f8df-41dc-9959-925cdae62e52", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename441531bf(PartitionKey='partitionkey241360',RowKey='rowkey25836fddb')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename577453a5", + "Uri" : "https://REDACTED.table.core.windows.net/tablename441531bf", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "e4975ec7-7893-4e35-ac3d-8d353dafd1ac", + "x-ms-client-request-id" : "ae5f6fb7-a399-4623-9f4e-dc674e121e1e", "Content-Type" : "application/json" }, "Response" : { @@ -65,24 +65,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:58 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:48 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-28T02%3A26%3A58.464373Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey68919b12e')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A48.4122605Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename441531bf(PartitionKey='partitionkey241360',RowKey='rowkey992576eab')", "Content-Length" : "0", - "x-ms-request-id" : "70d54ce8-7002-00c3-0ce2-7cd306000000", + "x-ms-request-id" : "0991c91b-d002-005c-383e-869f04000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "e4975ec7-7893-4e35-ac3d-8d353dafd1ac", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey68919b12e')" + "x-ms-client-request-id" : "ae5f6fb7-a399-4623-9f4e-dc674e121e1e", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename441531bf(PartitionKey='partitionkey241360',RowKey='rowkey992576eab')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename577453a5()?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename441531bf()?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "b2e2ebae-423a-44d1-91fe-6916abf1ef91" + "x-ms-client-request-id" : "d03e7bd6-5919-49c3-8caf-b8ecdc5766e0" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -92,13 +92,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "70d54cf2-7002-00c3-16e2-7cd306000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename577453a5\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename577453a5\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey68919b12e')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A58.464373Z'\\\"\",\"odata.editLink\":\"tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey68919b12e')\",\"PartitionKey\":\"partitionkey46738e\",\"RowKey\":\"rowkey68919b12e\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:58.464373Z\"},{\"odata.type\":\"brsiegelsample.tablename577453a5\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey97788c73c')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A58.439355Z'\\\"\",\"odata.editLink\":\"tablename577453a5(PartitionKey='partitionkey46738e',RowKey='rowkey97788c73c')\",\"PartitionKey\":\"partitionkey46738e\",\"RowKey\":\"rowkey97788c73c\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:58.439355Z\"}]}", - "Date" : "Fri, 28 Aug 2020 02:26:58 GMT", - "x-ms-client-request-id" : "b2e2ebae-423a-44d1-91fe-6916abf1ef91", + "x-ms-request-id" : "0991c924-d002-005c-403e-869f04000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename441531bf\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename441531bf\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename441531bf(PartitionKey='partitionkey241360',RowKey='rowkey25836fddb')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A48.3782359Z'\\\"\",\"odata.editLink\":\"tablename441531bf(PartitionKey='partitionkey241360',RowKey='rowkey25836fddb')\",\"PartitionKey\":\"partitionkey241360\",\"RowKey\":\"rowkey25836fddb\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:48.3782359Z\"},{\"odata.type\":\"brsiegelsample.tablename441531bf\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename441531bf(PartitionKey='partitionkey241360',RowKey='rowkey992576eab')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A48.4122605Z'\\\"\",\"odata.editLink\":\"tablename441531bf(PartitionKey='partitionkey241360',RowKey='rowkey992576eab')\",\"PartitionKey\":\"partitionkey241360\",\"RowKey\":\"rowkey992576eab\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:48.4122605Z\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:48 GMT", + "x-ms-client-request-id" : "d03e7bd6-5919-49c3-8caf-b8ecdc5766e0", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "tablename577453a5", "partitionkey46738e", "rowkey97788c73c", "rowkey68919b12e" ] + "variables" : [ "tablename441531bf", "partitionkey241360", "rowkey25836fddb", "rowkey992576eab" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithFilterAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithFilterAsync.json index b67e0fd6ddb04..72fbdc63e7611 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithFilterAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithFilterAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "b375b08e-0964-4563-a383-f59ea8087d1d", + "x-ms-client-request-id" : "8e3e4413-c89a-46b1-b60e-d17901c9704c", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:49 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:19 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename1503261f')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename9070101d')", "Content-Length" : "0", - "x-ms-request-id" : "285df789-9002-003f-5de2-7c02ff000000", + "x-ms-request-id" : "36f41b4f-8002-00d7-363e-869b69000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "b375b08e-0964-4563-a383-f59ea8087d1d", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename1503261f')" + "x-ms-client-request-id" : "8e3e4413-c89a-46b1-b60e-d17901c9704c", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename9070101d')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename1503261f", + "Uri" : "https://REDACTED.table.core.windows.net/tablename9070101d", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "1e4e4506-8ae8-4b69-b46f-9c7baab89b18", + "x-ms-client-request-id" : "843c8057-01d6-4075-9422-f386eaf03f67", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:49 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:19 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-28T02%3A26%3A50.3094455Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey846239572')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A19.6859829Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename9070101d(PartitionKey='partitionkey22322c',RowKey='rowkey880333c02')", "Content-Length" : "0", - "x-ms-request-id" : "285df7a4-9002-003f-76e2-7c02ff000000", + "x-ms-request-id" : "36f41b6d-8002-00d7-513e-869b69000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "1e4e4506-8ae8-4b69-b46f-9c7baab89b18", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey846239572')" + "x-ms-client-request-id" : "843c8057-01d6-4075-9422-f386eaf03f67", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename9070101d(PartitionKey='partitionkey22322c',RowKey='rowkey880333c02')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename1503261f", + "Uri" : "https://REDACTED.table.core.windows.net/tablename9070101d", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "4b2bc3d6-9965-4dae-b80e-582f3791637b", + "x-ms-client-request-id" : "3be3f752-7922-4807-b69a-480f67bfb6cf", "Content-Type" : "application/json" }, "Response" : { @@ -65,24 +65,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:49 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:19 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-28T02%3A26%3A50.3354635Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey041465618')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A19.7140026Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename9070101d(PartitionKey='partitionkey22322c',RowKey='rowkey189544ac4')", "Content-Length" : "0", - "x-ms-request-id" : "285df7ad-9002-003f-7fe2-7c02ff000000", + "x-ms-request-id" : "36f41b72-8002-00d7-563e-869b69000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "4b2bc3d6-9965-4dae-b80e-582f3791637b", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey041465618')" + "x-ms-client-request-id" : "3be3f752-7922-4807-b69a-480f67bfb6cf", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename9070101d(PartitionKey='partitionkey22322c',RowKey='rowkey189544ac4')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename1503261f()?$format=application/json%3Bodata%3Dfullmetadata&$filter=RowKey%20eq%20%27rowkey846239572%27", + "Uri" : "https://REDACTED.table.core.windows.net/tablename9070101d()?$format=application/json%3Bodata%3Dfullmetadata&$filter=RowKey%20eq%20%27rowkey880333c02%27", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "c4892b9a-ae0f-4653-b036-753a85f0cedc" + "x-ms-client-request-id" : "c1647c58-fdc6-4edd-9c8d-cea3b9960acc" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -92,13 +92,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "285df7b6-9002-003f-08e2-7c02ff000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename1503261f\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename1503261f\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey846239572')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A50.3094455Z'\\\"\",\"odata.editLink\":\"tablename1503261f(PartitionKey='partitionkey75827c',RowKey='rowkey846239572')\",\"PartitionKey\":\"partitionkey75827c\",\"RowKey\":\"rowkey846239572\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:50.3094455Z\"}]}", - "Date" : "Fri, 28 Aug 2020 02:26:50 GMT", - "x-ms-client-request-id" : "c4892b9a-ae0f-4653-b036-753a85f0cedc", + "x-ms-request-id" : "36f41b7d-8002-00d7-5f3e-869b69000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename9070101d\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename9070101d\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename9070101d(PartitionKey='partitionkey22322c',RowKey='rowkey880333c02')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A19.6859829Z'\\\"\",\"odata.editLink\":\"tablename9070101d(PartitionKey='partitionkey22322c',RowKey='rowkey880333c02')\",\"PartitionKey\":\"partitionkey22322c\",\"RowKey\":\"rowkey880333c02\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:19.6859829Z\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:19 GMT", + "x-ms-client-request-id" : "c1647c58-fdc6-4edd-9c8d-cea3b9960acc", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "tablename1503261f", "partitionkey75827c", "rowkey846239572", "rowkey041465618" ] + "variables" : [ "tablename9070101d", "partitionkey22322c", "rowkey880333c02", "rowkey189544ac4" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithSelectAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithSelectAsync.json index 9c6af2025909c..790d9d197094a 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithSelectAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithSelectAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "098dbc14-5c49-4d95-94c4-310729fbf5d9", + "x-ms-client-request-id" : "093406ac-aedc-42d1-a8d6-1cde1a782cd4", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:54 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:38 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename52409778')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename25786f7b')", "Content-Length" : "0", - "x-ms-request-id" : "cf783c07-d002-0073-09e2-7c92cf000000", + "x-ms-request-id" : "1d932037-0002-0084-1a3e-86b85d000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "098dbc14-5c49-4d95-94c4-310729fbf5d9", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename52409778')" + "x-ms-client-request-id" : "093406ac-aedc-42d1-a8d6-1cde1a782cd4", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename25786f7b')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename52409778", + "Uri" : "https://REDACTED.table.core.windows.net/tablename25786f7b", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "d7c60741-caeb-41b7-a893-7239d31a91b6", + "x-ms-client-request-id" : "d673acef-38a4-4664-aa79-f59458b045c6", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:54 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:38 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-28T02%3A26%3A55.6348765Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename52409778(PartitionKey='partitionkey005024',RowKey='rowkey19878b418')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A38.6931138Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename25786f7b(PartitionKey='partitionkey26561e',RowKey='rowkey7131781f2')", "Content-Length" : "0", - "x-ms-request-id" : "cf783c2b-d002-0073-27e2-7c92cf000000", + "x-ms-request-id" : "1d932075-0002-0084-543e-86b85d000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "d7c60741-caeb-41b7-a893-7239d31a91b6", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename52409778(PartitionKey='partitionkey005024',RowKey='rowkey19878b418')" + "x-ms-client-request-id" : "d673acef-38a4-4664-aa79-f59458b045c6", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename25786f7b(PartitionKey='partitionkey26561e',RowKey='rowkey7131781f2')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename52409778()?$format=application/json%3Bodata%3Dfullmetadata&$select=propertyC", + "Uri" : "https://REDACTED.table.core.windows.net/tablename25786f7b()?$format=application/json%3Bodata%3Dfullmetadata&$select=propertyC", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "0bb758c9-aa0a-4d87-9141-fabb1aa392db" + "x-ms-client-request-id" : "8a540048-29cd-4940-ad0e-52c1b9644833" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -66,13 +66,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cf783c3a-d002-0073-36e2-7c92cf000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename52409778&$select=propertyC\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename52409778\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename52409778(PartitionKey='partitionkey005024',RowKey='rowkey19878b418')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A55.6348765Z'\\\"\",\"odata.editLink\":\"tablename52409778(PartitionKey='partitionkey005024',RowKey='rowkey19878b418')\",\"propertyC\":\"valueC\"}]}", - "Date" : "Fri, 28 Aug 2020 02:26:54 GMT", - "x-ms-client-request-id" : "0bb758c9-aa0a-4d87-9141-fabb1aa392db", + "x-ms-request-id" : "1d93208f-0002-0084-6e3e-86b85d000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename25786f7b&$select=propertyC\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename25786f7b\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename25786f7b(PartitionKey='partitionkey26561e',RowKey='rowkey7131781f2')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A38.6931138Z'\\\"\",\"odata.editLink\":\"tablename25786f7b(PartitionKey='partitionkey26561e',RowKey='rowkey7131781f2')\",\"propertyC\":\"valueC\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:38 GMT", + "x-ms-client-request-id" : "8a540048-29cd-4940-ad0e-52c1b9644833", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "tablename52409778", "partitionkey005024", "rowkey19878b418" ] + "variables" : [ "tablename25786f7b", "partitionkey26561e", "rowkey7131781f2" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithTopAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithTopAsync.json index 424b03d2898f8..c14af75c9017f 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithTopAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/listEntitiesWithTopAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "5670cdd2-5d72-46ae-aaf4-a05e673a2ef9", + "x-ms-client-request-id" : "1d18680d-5f21-4729-a254-fb1cf76ab2e2", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:22 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename04439a16')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename78587c1a')", "Content-Length" : "0", - "x-ms-request-id" : "93862bd3-f002-005b-46e2-7cf367000000", + "x-ms-request-id" : "52d36f8f-6002-002b-633e-864a90000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "5670cdd2-5d72-46ae-aaf4-a05e673a2ef9", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename04439a16')" + "x-ms-client-request-id" : "1d18680d-5f21-4729-a254-fb1cf76ab2e2", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename78587c1a')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16", + "Uri" : "https://REDACTED.table.core.windows.net/tablename78587c1a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "93c97b2c-093d-41e7-a939-c4902ff7d816", + "x-ms-client-request-id" : "9540a779-8701-42df-9dd7-caca321677dc", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:22 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-28T02%3A26%3A52.9304254Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey5423059a3')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A23.4481147Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey49170eff2')", "Content-Length" : "0", - "x-ms-request-id" : "93862be0-f002-005b-51e2-7cf367000000", + "x-ms-request-id" : "52d36fad-6002-002b-7b3e-864a90000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "93c97b2c-093d-41e7-a939-c4902ff7d816", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey5423059a3')" + "x-ms-client-request-id" : "9540a779-8701-42df-9dd7-caca321677dc", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey49170eff2')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16", + "Uri" : "https://REDACTED.table.core.windows.net/tablename78587c1a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "f7710adb-a82d-4536-bb43-8724b1660840", + "x-ms-client-request-id" : "b5f755b7-c934-4f45-884d-5029f70dc560", "Content-Type" : "application/json" }, "Response" : { @@ -65,24 +65,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:22 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-28T02%3A26%3A52.952441Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey999612231')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A23.4731324Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey97132c6e3')", "Content-Length" : "0", - "x-ms-request-id" : "93862be6-f002-005b-56e2-7cf367000000", + "x-ms-request-id" : "52d36fb1-6002-002b-7f3e-864a90000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "f7710adb-a82d-4536-bb43-8724b1660840", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey999612231')" + "x-ms-client-request-id" : "b5f755b7-c934-4f45-884d-5029f70dc560", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey97132c6e3')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16", + "Uri" : "https://REDACTED.table.core.windows.net/tablename78587c1a", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "b63785b9-7062-40e8-a0a8-29c89e0a573e", + "x-ms-client-request-id" : "0e464963-5087-4c92-a2a1-bdf86a54da9a", "Content-Type" : "application/json" }, "Response" : { @@ -91,49 +91,49 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:22 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-28T02%3A26%3A52.9744561Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey914436f52')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A23.4961491Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey6907352d5')", "Content-Length" : "0", - "x-ms-request-id" : "93862beb-f002-005b-5ae2-7cf367000000", + "x-ms-request-id" : "52d36fb5-6002-002b-033e-864a90000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "b63785b9-7062-40e8-a0a8-29c89e0a573e", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey914436f52')" + "x-ms-client-request-id" : "0e464963-5087-4c92-a2a1-bdf86a54da9a", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey6907352d5')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16()?$format=application/json%3Bodata%3Dfullmetadata&$top=2", + "Uri" : "https://REDACTED.table.core.windows.net/tablename78587c1a()?$format=application/json%3Bodata%3Dfullmetadata&$top=2", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "bc366565-49d3-439a-803b-cf7d59a42288" + "x-ms-client-request-id" : "a17dbaae-dc66-40c1-98b7-ead6cfe2df3a" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-02-02", - "x-ms-continuation-NextPartitionKey" : "1!24!cGFydGl0aW9ua2V5MTkyNjU4", + "x-ms-continuation-NextPartitionKey" : "1!24!cGFydGl0aW9ua2V5OTEyNzVl", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:22 GMT", "Cache-Control" : "no-cache", - "x-ms-continuation-NextRowKey" : "1!20!cm93a2V5OTk5NjEyMjMx", - "x-ms-request-id" : "93862bef-f002-005b-5ee2-7cf367000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename04439a16\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename04439a16\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey5423059a3')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A52.9304254Z'\\\"\",\"odata.editLink\":\"tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey5423059a3')\",\"PartitionKey\":\"partitionkey192658\",\"RowKey\":\"rowkey5423059a3\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:52.9304254Z\"},{\"odata.type\":\"brsiegelsample.tablename04439a16\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey914436f52')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A52.9744561Z'\\\"\",\"odata.editLink\":\"tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey914436f52')\",\"PartitionKey\":\"partitionkey192658\",\"RowKey\":\"rowkey914436f52\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:52.9744561Z\"}]}", - "x-ms-client-request-id" : "bc366565-49d3-439a-803b-cf7d59a42288", + "x-ms-continuation-NextRowKey" : "1!20!cm93a2V5OTcxMzJjNmUz", + "x-ms-request-id" : "52d36fbc-6002-002b-0a3e-864a90000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename78587c1a\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename78587c1a\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey49170eff2')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A23.4481147Z'\\\"\",\"odata.editLink\":\"tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey49170eff2')\",\"PartitionKey\":\"partitionkey91275e\",\"RowKey\":\"rowkey49170eff2\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:23.4481147Z\"},{\"odata.type\":\"brsiegelsample.tablename78587c1a\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey6907352d5')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A23.4961491Z'\\\"\",\"odata.editLink\":\"tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey6907352d5')\",\"PartitionKey\":\"partitionkey91275e\",\"RowKey\":\"rowkey6907352d5\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:23.4961491Z\"}]}", + "x-ms-client-request-id" : "a17dbaae-dc66-40c1-98b7-ead6cfe2df3a", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename04439a16()?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextPartitionKey=1%2124%21cGFydGl0aW9ua2V5MTkyNjU4&NextRowKey=1%2120%21cm93a2V5OTk5NjEyMjMx", + "Uri" : "https://REDACTED.table.core.windows.net/tablename78587c1a()?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextPartitionKey=1%2124%21cGFydGl0aW9ua2V5OTEyNzVl&NextRowKey=1%2120%21cm93a2V5OTcxMzJjNmUz", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "927a9498-40e7-4657-920b-e34daaddedae" + "x-ms-client-request-id" : "6f701b5a-d6b1-49ae-993a-204ee4424e91" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -143,13 +143,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "93862bf3-f002-005b-62e2-7cf367000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename04439a16\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename04439a16\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey999612231')\",\"odata.etag\":\"W/\\\"datetime'2020-08-28T02%3A26%3A52.952441Z'\\\"\",\"odata.editLink\":\"tablename04439a16(PartitionKey='partitionkey192658',RowKey='rowkey999612231')\",\"PartitionKey\":\"partitionkey192658\",\"RowKey\":\"rowkey999612231\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-28T02:26:52.952441Z\"}]}", - "Date" : "Fri, 28 Aug 2020 02:26:52 GMT", - "x-ms-client-request-id" : "927a9498-40e7-4657-920b-e34daaddedae", + "x-ms-request-id" : "52d36fc6-6002-002b-133e-864a90000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename78587c1a\",\"value\":[{\"odata.type\":\"brsiegelsample.tablename78587c1a\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey97132c6e3')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A23.4731324Z'\\\"\",\"odata.editLink\":\"tablename78587c1a(PartitionKey='partitionkey91275e',RowKey='rowkey97132c6e3')\",\"PartitionKey\":\"partitionkey91275e\",\"RowKey\":\"rowkey97132c6e3\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:23.4731324Z\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:22 GMT", + "x-ms-client-request-id" : "6f701b5a-d6b1-49ae-993a-204ee4424e91", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "tablename04439a16", "partitionkey192658", "rowkey5423059a3", "rowkey999612231", "rowkey914436f52" ] + "variables" : [ "tablename78587c1a", "partitionkey91275e", "rowkey49170eff2", "rowkey97132c6e3", "rowkey6907352d5" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/mergeEntityImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/mergeEntityImpl.json index 55d00918ebdc9..893c9a46c7d33 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/mergeEntityImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/mergeEntityImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "56e916cb-6058-41dd-968f-38125286aaa2", + "x-ms-client-request-id" : "8f79cf27-ac53-4626-88fc-10a53c65cfa8", "Content-Type" : "application/json" }, "Response" : { @@ -13,22 +13,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:14 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:18 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test3790978600')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test781711de6e')", "Content-Length" : "0", - "x-ms-request-id" : "cd9d482e-7002-00a1-6aff-771121000000", + "x-ms-request-id" : "b6c65ca8-6002-00bd-393e-864341000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "56e916cb-6058-41dd-968f-38125286aaa2", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test3790978600')" + "x-ms-client-request-id" : "8f79cf27-ac53-4626-88fc-10a53c65cfa8", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test781711de6e')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/test3790978600?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test781711de6e?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "3a27e11f-3ea7-4e06-9ef1-e848b3cf14fd", + "x-ms-client-request-id" : "99dc4a40-e505-460f-844e-13d343288454", "Content-Type" : "application/json" }, "Response" : { @@ -37,37 +37,37 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:14 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:18 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/\"datetime'2020-08-21T21%3A09%3A14.8269972Z'\"", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test3790978600(PartitionKey='partitionkey733397',RowKey='rowkey028932ec1')", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A18.9557945Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test781711de6e(PartitionKey='partitionkey141772',RowKey='rowkey89645f143')", "Content-Length" : "0", - "x-ms-request-id" : "cd9d4847-7002-00a1-7fff-771121000000", + "x-ms-request-id" : "b6c65ccd-6002-00bd-513e-864341000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "3a27e11f-3ea7-4e06-9ef1-e848b3cf14fd", - "Location" : "https://brsiegelsample.table.core.windows.net/test3790978600(PartitionKey='partitionkey733397',RowKey='rowkey028932ec1')" + "x-ms-client-request-id" : "99dc4a40-e505-460f-844e-13d343288454", + "Location" : "https://brsiegelsample.table.core.windows.net/test781711de6e(PartitionKey='partitionkey141772',RowKey='rowkey89645f143')" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.table.core.windows.net/test3790978600(PartitionKey='partitionkey733397',RowKey='rowkey028932ec1')?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test781711de6e(PartitionKey='partitionkey141772',RowKey='rowkey89645f143')?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "7d21c6ea-91f9-4389-92d9-5ab245fba369", + "x-ms-client-request-id" : "afd8656a-43dc-4eb0-8ab3-6f7387a7ea29", "Content-Type" : "application/json" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", - "ETag" : "W/\"datetime'2020-08-21T21%3A09%3A14.9269739Z'\"", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A19.0215965Z'\"", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "cd9d4859-7002-00a1-11ff-771121000000", - "Date" : "Fri, 21 Aug 2020 21:09:14 GMT", - "x-ms-client-request-id" : "7d21c6ea-91f9-4389-92d9-5ab245fba369" + "x-ms-request-id" : "b6c65cdf-6002-00bd-5e3e-864341000000", + "Date" : "Wed, 09 Sep 2020 00:13:18 GMT", + "x-ms-client-request-id" : "afd8656a-43dc-4eb0-8ab3-6f7387a7ea29" }, "Exception" : null }, { @@ -75,7 +75,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "1f42e870-1086-404e-84ef-41cfef87d986" + "x-ms-client-request-id" : "5c3d9e01-d7e0-4033-85cb-484c8c993838" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -85,19 +85,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cd9d485d-7002-00a1-15ff-771121000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test3790978600\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:14 GMT", - "x-ms-client-request-id" : "1f42e870-1086-404e-84ef-41cfef87d986", + "x-ms-request-id" : "b6c65ce4-6002-00bd-623e-864341000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test781711de6e\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:18 GMT", + "x-ms-client-request-id" : "5c3d9e01-d7e0-4033-85cb-484c8c993838", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test3790978600')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test781711de6e')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "ea4f173a-8899-429d-886e-ef69fed801e3" + "x-ms-client-request-id" : "75df86cc-90d3-4764-b0cb-c8e6d193f874" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -107,11 +107,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "8feff4f6-a002-008d-46ff-77fd8e000000", - "Date" : "Fri, 21 Aug 2020 21:09:14 GMT", - "x-ms-client-request-id" : "ea4f173a-8899-429d-886e-ef69fed801e3" + "x-ms-request-id" : "b6c65cf1-6002-00bd-6a3e-864341000000", + "Date" : "Wed, 09 Sep 2020 00:13:18 GMT", + "x-ms-client-request-id" : "75df86cc-90d3-4764-b0cb-c8e6d193f874" }, "Exception" : null } ], - "variables" : [ "test3790978600", "56e916cb-6058-41dd-968f-38125286aaa2", "partitionkey733397", "rowkey028932ec1", "7d21c6ea-91f9-4389-92d9-5ab245fba369", "3a27e11f-3ea7-4e06-9ef1-e848b3cf14fd", "8eb2f08a2cb74f62", "1f42e870-1086-404e-84ef-41cfef87d986", "ea4f173a-8899-429d-886e-ef69fed801e3" ] + "variables" : [ "test781711de6e", "8f79cf27-ac53-4626-88fc-10a53c65cfa8", "partitionkey141772", "rowkey89645f143", "afd8656a-43dc-4eb0-8ab3-6f7387a7ea29", "99dc4a40-e505-460f-844e-13d343288454", "00d1047945024d39", "5c3d9e01-d7e0-4033-85cb-484c8c993838", "75df86cc-90d3-4764-b0cb-c8e6d193f874" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/mergeNonExistentEntityImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/mergeNonExistentEntityImpl.json index 53c57a69e7458..77b9d8308532f 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/mergeNonExistentEntityImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/mergeNonExistentEntityImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "24466e11-8c8f-4f81-9c00-5b57a0af3820", + "x-ms-client-request-id" : "bb01dbb1-d0a2-47b5-a9c7-875edd656d9b", "Content-Type" : "application/json" }, "Response" : { @@ -13,22 +13,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:25 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:34 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test71113fded9')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test9276972196')", "Content-Length" : "0", - "x-ms-request-id" : "030d1562-4002-003c-46ff-77e39b000000", + "x-ms-request-id" : "604e1723-8002-008a-2e3e-8691ed000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "24466e11-8c8f-4f81-9c00-5b57a0af3820", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test71113fded9')" + "x-ms-client-request-id" : "bb01dbb1-d0a2-47b5-a9c7-875edd656d9b", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test9276972196')" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.table.core.windows.net/test71113fded9(PartitionKey='partitionkey94087a',RowKey='rowkey83233427a')?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test9276972196(PartitionKey='partitionkey29152f',RowKey='rowkey185601acf')?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "ba4f2d21-20f6-4d19-bec0-6b11c7f047b3", + "x-ms-client-request-id" : "da96118f-3f51-4ad3-909c-750a36a5f93a", "Content-Type" : "application/json" }, "Response" : { @@ -39,10 +39,10 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "030d1576-4002-003c-56ff-77e39b000000", - "Body" : "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:030d1576-4002-003c-56ff-77e39b000000\\nTime:2020-08-21T21:09:26.4746535Z\"}}}", - "Date" : "Fri, 21 Aug 2020 21:09:25 GMT", - "x-ms-client-request-id" : "ba4f2d21-20f6-4d19-bec0-6b11c7f047b3", + "x-ms-request-id" : "604e1743-8002-008a-4b3e-8691ed000000", + "Body" : "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:604e1743-8002-008a-4b3e-8691ed000000\\nTime:2020-09-09T00:13:35.0692866Z\"}}}", + "Date" : "Wed, 09 Sep 2020 00:13:34 GMT", + "x-ms-client-request-id" : "da96118f-3f51-4ad3-909c-750a36a5f93a", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null @@ -51,7 +51,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "14d4b32d-8a97-4d79-9539-6f5259dc83b0" + "x-ms-client-request-id" : "fe9efd20-91db-40b6-961a-d18d0883c7b0" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -61,19 +61,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "030d1584-4002-003c-60ff-77e39b000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test71113fded9\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:25 GMT", - "x-ms-client-request-id" : "14d4b32d-8a97-4d79-9539-6f5259dc83b0", + "x-ms-request-id" : "604e1752-8002-008a-573e-8691ed000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test9276972196\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:34 GMT", + "x-ms-client-request-id" : "fe9efd20-91db-40b6-961a-d18d0883c7b0", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test71113fded9')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test9276972196')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "89cabe16-61e3-455d-9caf-b65395e536ac" + "x-ms-client-request-id" : "0a6cac08-7866-427b-8dce-c25f47afe0e7" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -83,11 +83,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "9ef88497-3002-00a0-02ff-774efd000000", - "Date" : "Fri, 21 Aug 2020 21:09:25 GMT", - "x-ms-client-request-id" : "89cabe16-61e3-455d-9caf-b65395e536ac" + "x-ms-request-id" : "604e175d-8002-008a-603e-8691ed000000", + "Date" : "Wed, 09 Sep 2020 00:13:34 GMT", + "x-ms-client-request-id" : "0a6cac08-7866-427b-8dce-c25f47afe0e7" }, "Exception" : null } ], - "variables" : [ "test71113fded9", "24466e11-8c8f-4f81-9c00-5b57a0af3820", "partitionkey94087a", "rowkey83233427a", "ba4f2d21-20f6-4d19-bec0-6b11c7f047b3", "14d4b32d-8a97-4d79-9539-6f5259dc83b0", "89cabe16-61e3-455d-9caf-b65395e536ac" ] + "variables" : [ "test9276972196", "bb01dbb1-d0a2-47b5-a9c7-875edd656d9b", "partitionkey29152f", "rowkey185601acf", "da96118f-3f51-4ad3-909c-750a36a5f93a", "fe9efd20-91db-40b6-961a-d18d0883c7b0", "0a6cac08-7866-427b-8dce-c25f47afe0e7" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntitiesImplWithPartitionAndRowKey.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntitiesImplWithPartitionAndRowKey.json index 594467aecdd11..765b707e2994f 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntitiesImplWithPartitionAndRowKey.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntitiesImplWithPartitionAndRowKey.json @@ -1,118 +1,116 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Uri" : "https://REDACTED.table.cosmos.azure.com:443/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "3a2f5cdf-09cd-4709-a792-136762fe778b", + "x-ms-client-request-id" : "0e50e21c-3678-40c7-ace5-aaca0ded15aa", "Content-Type" : "application/json" }, "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "429", + "x-ms-request-id" : "0e50e21c-3678-40c7-ace5-aaca0ded15aa", + "Body" : "{\"odata.error\":{\"code\":\"429\",\"message\":{\"lang\":\"en-us\",\"value\":\"Message: {\\\"Errors\\\":[\\\"Request rate is large. More Request Units may be needed, so no changes were made. Please retry this request later. Learn more: http://aka.ms/cosmosdb-error-429\\\"]}\\r\\nActivityId: 7de04a7e-8069-48b1-beff-8f28bbe737b2, Request URI: /apps/d27ef9bf-18ce-4431-b8de-709648aab568/services/4dd6fb7b-494c-42d2-aa08-ef0e00997fef/partitions/0ce4b13d-f0a7-4f1d-85d7-800ffa60bb5f/replicas/132437297013117481p, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.11.0, documentdb-dotnet-sdk/2.11.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0\\nRequestID:0e50e21c-3678-40c7-ace5-aaca0ded15aa\\n\"}}}\r\n", + "Date" : "Sat, 05 Sep 2020 00:24:34 GMT", + "Content-Type" : "application/json;odata=fullmetadata" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.cosmos.azure.com:443/Tables", + "Headers" : { "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", - "X-Content-Type-Options" : "nosniff", + "x-ms-client-request-id" : "0e50e21c-3678-40c7-ace5-aaca0ded15aa", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "ETag" : "W/\"datetime'2020-09-05T00%3A24%3A36.6894087Z'\"", "retry-after" : "0", - "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:32 GMT", - "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test803184be66')", "Content-Length" : "0", - "x-ms-request-id" : "81a93484-a002-00ef-5eff-773fa9000000", + "StatusCode" : "204", + "x-ms-request-id" : "0e50e21c-3678-40c7-ace5-aaca0ded15aa", + "Date" : "Sat, 05 Sep 2020 00:24:35 GMT", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "3a2f5cdf-09cd-4709-a792-136762fe778b", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test803184be66')" + "Location" : "https://brsiegelsample.table.cosmos.azure.com/Tables('test4689564691')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/test803184be66?timeout=5000", + "Uri" : "https://REDACTED.table.cosmos.azure.com:443/test4689564691?timeout=5000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "ec1c444b-be12-41db-b67d-e668734ec2f4", + "x-ms-client-request-id" : "e914adf1-b0fa-47b2-b2c5-9c2615ee58f6", "Content-Type" : "application/json" }, "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", - "X-Content-Type-Options" : "nosniff", + "Server" : "Microsoft-HTTPAPI/2.0", + "ETag" : "W/\"datetime'2020-09-05T00%3A24%3A37.0688007Z'\"", "retry-after" : "0", - "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:32 GMT", - "Cache-Control" : "no-cache", - "ETag" : "W/\"datetime'2020-08-21T21%3A09%3A32.7322358Z'\"", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test803184be66(PartitionKey='partitionkey33648b',RowKey='rowkey25604fef6')", "Content-Length" : "0", - "x-ms-request-id" : "81a93494-a002-00ef-6cff-773fa9000000", + "StatusCode" : "204", + "x-ms-request-id" : "e914adf1-b0fa-47b2-b2c5-9c2615ee58f6", + "Date" : "Sat, 05 Sep 2020 00:24:36 GMT", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "ec1c444b-be12-41db-b67d-e668734ec2f4", - "Location" : "https://brsiegelsample.table.core.windows.net/test803184be66(PartitionKey='partitionkey33648b',RowKey='rowkey25604fef6')" + "Location" : "https://brsiegelsample.table.cosmos.azure.com/test4689564691(PartitionKey='partitionkey13912f',RowKey='rowkey87897e123')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/test803184be66(PartitionKey='partitionkey33648b',RowKey='rowkey25604fef6')?timeout=5000&$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.cosmos.azure.com:443/test4689564691(PartitionKey='partitionkey13912f',RowKey='rowkey87897e123')?timeout=5000&$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "6ff91ed9-3ea6-4750-b02e-d834c74d58fc" + "x-ms-client-request-id" : "9078680f-c50f-477d-a864-8412996352a0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", - "X-Content-Type-Options" : "nosniff", + "Server" : "Microsoft-HTTPAPI/2.0", + "ETag" : "W/\"datetime'2020-09-05T00%3A24%3A37.0688007Z'\"", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:09:32 GMT", - "Cache-Control" : "no-cache", - "ETag" : "W/\"datetime'2020-08-21T21%3A09%3A32.7322358Z'\"", - "x-ms-request-id" : "81a934b1-a002-00ef-07ff-773fa9000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#test803184be66/@Element\",\"odata.type\":\"brsiegelsample.test803184be66\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/test803184be66(PartitionKey='partitionkey33648b',RowKey='rowkey25604fef6')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A09%3A32.7322358Z'\\\"\",\"odata.editLink\":\"test803184be66(PartitionKey='partitionkey33648b',RowKey='rowkey25604fef6')\",\"PartitionKey\":\"partitionkey33648b\",\"RowKey\":\"rowkey25604fef6\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:09:32.7322358Z\"}", - "x-ms-client-request-id" : "6ff91ed9-3ea6-4750-b02e-d834c74d58fc", - "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + "x-ms-request-id" : "9078680f-c50f-477d-a864-8412996352a0", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.cosmos.azure.com/test4689564691/$metadata#test4689564691/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-09-05T00%3A24%3A37.0688007Z'\\\"\",\"RowKey\":\"rowkey87897e123\",\"PartitionKey\":\"partitionkey13912f\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-05T00:24:37.0688007Z\"}", + "Date" : "Sat, 05 Sep 2020 00:24:36 GMT", + "Content-Type" : "application/json" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Uri" : "https://REDACTED.table.cosmos.azure.com:443/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "116e8c84-1935-4850-bfb4-f15b83ebafb2" + "x-ms-client-request-id" : "44ad43b1-8dd0-40d2-a70e-1e1d8b5403bb" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "X-Content-Type-Options" : "nosniff", + "Server" : "Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "81a934b6-a002-00ef-0aff-773fa9000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test803184be66\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:32 GMT", - "x-ms-client-request-id" : "116e8c84-1935-4850-bfb4-f15b83ebafb2", - "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + "x-ms-request-id" : "44ad43b1-8dd0-40d2-a70e-1e1d8b5403bb", + "Body" : "{\"value\":[{\"TableName\":\"test4689564691\"}]}", + "Date" : "Sat, 05 Sep 2020 00:24:36 GMT", + "Content-Type" : "application/json" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test803184be66')", + "Uri" : "https://REDACTED.table.cosmos.azure.com:443/Tables('test4689564691')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "d4f0551d-0fe0-4883-81a4-a3eed8e9c2b4" + "x-ms-client-request-id" : "3c45f904-3e14-4c38-ae2f-d55f7ae832c2" }, "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "X-Content-Type-Options" : "nosniff", + "Server" : "Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "112d64c3-6002-003b-66ff-778ff8000000", - "Date" : "Fri, 21 Aug 2020 21:09:32 GMT", - "x-ms-client-request-id" : "d4f0551d-0fe0-4883-81a4-a3eed8e9c2b4" + "x-ms-request-id" : "3c45f904-3e14-4c38-ae2f-d55f7ae832c2", + "Date" : "Sat, 05 Sep 2020 00:24:36 GMT" }, "Exception" : null } ], - "variables" : [ "test803184be66", "3a2f5cdf-09cd-4709-a792-136762fe778b", "partitionkey33648b", "rowkey25604fef6", "ec1c444b-be12-41db-b67d-e668734ec2f4", "6ff91ed9-3ea6-4750-b02e-d834c74d58fc", "116e8c84-1935-4850-bfb4-f15b83ebafb2", "d4f0551d-0fe0-4883-81a4-a3eed8e9c2b4" ] + "variables" : [ "test4689564691", "0e50e21c-3678-40c7-ace5-aaca0ded15aa", "partitionkey13912f", "rowkey87897e123", "e914adf1-b0fa-47b2-b2c5-9c2615ee58f6", "9078680f-c50f-477d-a864-8412996352a0", "44ad43b1-8dd0-40d2-a70e-1e1d8b5403bb", "3c45f904-3e14-4c38-ae2f-d55f7ae832c2" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImpl.json new file mode 100644 index 0000000000000..a3cd5ed3c3937 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImpl.json @@ -0,0 +1,142 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "de968c09-e1e3-41c3-8336-7a1fe118bea2", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:40 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test69056e0035')", + "Content-Length" : "0", + "x-ms-request-id" : "635024c3-8002-001c-693e-86983c000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "de968c09-e1e3-41c3-8336-7a1fe118bea2", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test69056e0035')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/test69056e0035?timeout=100000", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "18dbce47-ce42-412a-8200-8c2285b21732", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:40 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A41.559973Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test69056e0035(PartitionKey='partitionkeya27105d',RowKey='rowkeya032546f8a')", + "Content-Length" : "0", + "x-ms-request-id" : "635024d0-8002-001c-713e-86983c000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "18dbce47-ce42-412a-8200-8c2285b21732", + "Location" : "https://brsiegelsample.table.core.windows.net/test69056e0035(PartitionKey='partitionkeya27105d',RowKey='rowkeya032546f8a')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/test69056e0035?timeout=100000", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "d4a55a5b-dacb-45fb-a642-79a32472cc40", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:40 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A41.5879925Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test69056e0035(PartitionKey='partitionkeyb294255',RowKey='rowkeyb044931bbd')", + "Content-Length" : "0", + "x-ms-request-id" : "635024d1-8002-001c-723e-86983c000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "d4a55a5b-dacb-45fb-a642-79a32472cc40", + "Location" : "https://brsiegelsample.table.core.windows.net/test69056e0035(PartitionKey='partitionkeyb294255',RowKey='rowkeyb044931bbd')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/test69056e0035()?timeout=100000&$format=application/json%3Bodata%3Dfullmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "486e418f-dcf3-4f7e-93c4-d2c79451bbf0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "635024d2-8002-001c-733e-86983c000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#test69056e0035\",\"value\":[{\"odata.type\":\"brsiegelsample.test69056e0035\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/test69056e0035(PartitionKey='partitionkeya27105d',RowKey='rowkeya032546f8a')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A13%3A41.559973Z'\\\"\",\"odata.editLink\":\"test69056e0035(PartitionKey='partitionkeya27105d',RowKey='rowkeya032546f8a')\",\"PartitionKey\":\"partitionkeya27105d\",\"RowKey\":\"rowkeya032546f8a\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:13:41.559973Z\"},{\"odata.type\":\"brsiegelsample.test69056e0035\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/test69056e0035(PartitionKey='partitionkeyb294255',RowKey='rowkeyb044931bbd')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A13%3A41.5879925Z'\\\"\",\"odata.editLink\":\"test69056e0035(PartitionKey='partitionkeyb294255',RowKey='rowkeyb044931bbd')\",\"PartitionKey\":\"partitionkeyb294255\",\"RowKey\":\"rowkeyb044931bbd\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:13:41.5879925Z\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:40 GMT", + "x-ms-client-request-id" : "486e418f-dcf3-4f7e-93c4-d2c79451bbf0", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "dfc9e9cd-31e7-459b-8898-b11bd177fb4b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "635024d5-8002-001c-753e-86983c000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test69056e0035\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:40 GMT", + "x-ms-client-request-id" : "dfc9e9cd-31e7-459b-8898-b11bd177fb4b", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test69056e0035')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "2dbd78a2-991c-4500-abc0-d3d1cfd37c3f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "635024d7-8002-001c-773e-86983c000000", + "Date" : "Wed, 09 Sep 2020 00:13:40 GMT", + "x-ms-client-request-id" : "2dbd78a2-991c-4500-abc0-d3d1cfd37c3f" + }, + "Exception" : null + } ], + "variables" : [ "486e418f-dcf3-4f7e-93c4-d2c79451bbf0", "test69056e0035", "de968c09-e1e3-41c3-8336-7a1fe118bea2", "partitionkeya27105d", "rowkeya032546f8a", "18dbce47-ce42-412a-8200-8c2285b21732", "partitionkeyb294255", "rowkeyb044931bbd", "d4a55a5b-dacb-45fb-a642-79a32472cc40", "dfc9e9cd-31e7-459b-8898-b11bd177fb4b", "2dbd78a2-991c-4500-abc0-d3d1cfd37c3f" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithFilter.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithFilter.json new file mode 100644 index 0000000000000..4860d5f4de20e --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithFilter.json @@ -0,0 +1,142 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "d05bc430-710f-4612-ab78-626d8d9c556b", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:56 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test797117c7d4')", + "Content-Length" : "0", + "x-ms-request-id" : "db2ab67f-a002-0079-4b3e-863678000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "d05bc430-710f-4612-ab78-626d8d9c556b", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test797117c7d4')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/test797117c7d4?timeout=100000", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "488d7b96-6138-4ba1-aeb1-0773fd0544e0", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:57 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A57.5996008Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test797117c7d4(PartitionKey='partitionkeya023024',RowKey='rowkeya178985500')", + "Content-Length" : "0", + "x-ms-request-id" : "db2ab69f-a002-0079-683e-863678000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "488d7b96-6138-4ba1-aeb1-0773fd0544e0", + "Location" : "https://brsiegelsample.table.core.windows.net/test797117c7d4(PartitionKey='partitionkeya023024',RowKey='rowkeya178985500')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/test797117c7d4?timeout=100000", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "c0e434eb-307e-4a80-a7f7-efe6d1ec2a9c", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:57 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A57.6286217Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test797117c7d4(PartitionKey='partitionkeyb318778',RowKey='rowkeyb10740a538')", + "Content-Length" : "0", + "x-ms-request-id" : "db2ab6a3-a002-0079-6c3e-863678000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "c0e434eb-307e-4a80-a7f7-efe6d1ec2a9c", + "Location" : "https://brsiegelsample.table.core.windows.net/test797117c7d4(PartitionKey='partitionkeyb318778',RowKey='rowkeyb10740a538')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/test797117c7d4()?timeout=100000&$format=application/json%3Bodata%3Dfullmetadata&$filter=PartitionKey%20eq%20%27partitionkeya023024%27", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "a27a75aa-2bd7-434c-8e62-851ee482fd5d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "db2ab6aa-a002-0079-733e-863678000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#test797117c7d4\",\"value\":[{\"odata.type\":\"brsiegelsample.test797117c7d4\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/test797117c7d4(PartitionKey='partitionkeya023024',RowKey='rowkeya178985500')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A13%3A57.5996008Z'\\\"\",\"odata.editLink\":\"test797117c7d4(PartitionKey='partitionkeya023024',RowKey='rowkeya178985500')\",\"PartitionKey\":\"partitionkeya023024\",\"RowKey\":\"rowkeya178985500\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:13:57.5996008Z\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:57 GMT", + "x-ms-client-request-id" : "a27a75aa-2bd7-434c-8e62-851ee482fd5d", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "220c83f0-df3a-487e-bdd2-aa7a68ab1749" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "db2ab6bb-a002-0079-023e-863678000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test797117c7d4\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:57 GMT", + "x-ms-client-request-id" : "220c83f0-df3a-487e-bdd2-aa7a68ab1749", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test797117c7d4')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "88009ebf-e74a-4881-9fef-7b5a5ca3e40d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "db2ab6c2-a002-0079-093e-863678000000", + "Date" : "Wed, 09 Sep 2020 00:13:57 GMT", + "x-ms-client-request-id" : "88009ebf-e74a-4881-9fef-7b5a5ca3e40d" + }, + "Exception" : null + } ], + "variables" : [ "a27a75aa-2bd7-434c-8e62-851ee482fd5d", "test797117c7d4", "d05bc430-710f-4612-ab78-626d8d9c556b", "partitionkeya023024", "rowkeya178985500", "488d7b96-6138-4ba1-aeb1-0773fd0544e0", "partitionkeyb318778", "rowkeyb10740a538", "c0e434eb-307e-4a80-a7f7-efe6d1ec2a9c", "220c83f0-df3a-487e-bdd2-aa7a68ab1749", "88009ebf-e74a-4881-9fef-7b5a5ca3e40d" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithSelect.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithSelect.json new file mode 100644 index 0000000000000..88722a0f651f4 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithSelect.json @@ -0,0 +1,142 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "7a4f6c21-8d51-46e4-b612-4f27cdb69717", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:14:08 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test903437dcc6')", + "Content-Length" : "0", + "x-ms-request-id" : "221ca31e-f002-00af-6a3e-863891000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "7a4f6c21-8d51-46e4-b612-4f27cdb69717", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test903437dcc6')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/test903437dcc6?timeout=100000", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "a2b64e12-d608-4759-a230-a5a9cd0fa280", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:14:08 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/\"datetime'2020-09-09T00%3A14%3A08.9724093Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test903437dcc6(PartitionKey='partitionkeya667757',RowKey='rowkeya47769e16f')", + "Content-Length" : "0", + "x-ms-request-id" : "221ca32e-f002-00af-723e-863891000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "a2b64e12-d608-4759-a230-a5a9cd0fa280", + "Location" : "https://brsiegelsample.table.core.windows.net/test903437dcc6(PartitionKey='partitionkeya667757',RowKey='rowkeya47769e16f')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/test903437dcc6?timeout=100000", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "a2f8cdad-9450-4f21-b176-3e7098c1e03f", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:14:08 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/\"datetime'2020-09-09T00%3A14%3A08.9984277Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test903437dcc6(PartitionKey='partitionkeyb473054',RowKey='rowkeyb89732f47a')", + "Content-Length" : "0", + "x-ms-request-id" : "221ca331-f002-00af-743e-863891000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "a2f8cdad-9450-4f21-b176-3e7098c1e03f", + "Location" : "https://brsiegelsample.table.core.windows.net/test903437dcc6(PartitionKey='partitionkeyb473054',RowKey='rowkeyb89732f47a')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/test903437dcc6()?timeout=100000&$format=application/json%3Bodata%3Dfullmetadata&$select=RowKey", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "81c03ca5-cd0f-416c-881c-0e6c1b577383" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "221ca333-f002-00af-753e-863891000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#test903437dcc6&$select=RowKey\",\"value\":[{\"odata.type\":\"brsiegelsample.test903437dcc6\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/test903437dcc6(PartitionKey='partitionkeya667757',RowKey='rowkeya47769e16f')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A08.9724093Z'\\\"\",\"odata.editLink\":\"test903437dcc6(PartitionKey='partitionkeya667757',RowKey='rowkeya47769e16f')\",\"RowKey\":\"rowkeya47769e16f\"},{\"odata.type\":\"brsiegelsample.test903437dcc6\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/test903437dcc6(PartitionKey='partitionkeyb473054',RowKey='rowkeyb89732f47a')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A08.9984277Z'\\\"\",\"odata.editLink\":\"test903437dcc6(PartitionKey='partitionkeyb473054',RowKey='rowkeyb89732f47a')\",\"RowKey\":\"rowkeyb89732f47a\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:08 GMT", + "x-ms-client-request-id" : "81c03ca5-cd0f-416c-881c-0e6c1b577383", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "ae7097ef-3534-4131-9334-b53c5b1b8f2b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "221ca339-f002-00af-793e-863891000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test903437dcc6\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:08 GMT", + "x-ms-client-request-id" : "ae7097ef-3534-4131-9334-b53c5b1b8f2b", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test903437dcc6')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "bb43f969-4bd4-4aa9-a8e0-e1f169584895" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "221ca33d-f002-00af-7c3e-863891000000", + "Date" : "Wed, 09 Sep 2020 00:14:09 GMT", + "x-ms-client-request-id" : "bb43f969-4bd4-4aa9-a8e0-e1f169584895" + }, + "Exception" : null + } ], + "variables" : [ "81c03ca5-cd0f-416c-881c-0e6c1b577383", "test903437dcc6", "7a4f6c21-8d51-46e4-b612-4f27cdb69717", "partitionkeya667757", "rowkeya47769e16f", "a2b64e12-d608-4759-a230-a5a9cd0fa280", "partitionkeyb473054", "rowkeyb89732f47a", "a2f8cdad-9450-4f21-b176-3e7098c1e03f", "ae7097ef-3534-4131-9334-b53c5b1b8f2b", "bb43f969-4bd4-4aa9-a8e0-e1f169584895" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithTop.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithTop.json new file mode 100644 index 0000000000000..a14b132d8987a --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryEntityImplWithTop.json @@ -0,0 +1,144 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "d65ada4d-efd5-4ef1-8e9b-c543b082712a", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:21 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test6812620515')", + "Content-Length" : "0", + "x-ms-request-id" : "6417a6e9-5002-0089-553e-867089000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "d65ada4d-efd5-4ef1-8e9b-c543b082712a", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test6812620515')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/test6812620515?timeout=100000", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "285b987d-3804-4727-b9d8-2bc3100a4cc9", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:21 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A21.8389425Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test6812620515(PartitionKey='partitionkeya127517',RowKey='rowkeya28981e288')", + "Content-Length" : "0", + "x-ms-request-id" : "6417a6f9-5002-0089-633e-867089000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "285b987d-3804-4727-b9d8-2bc3100a4cc9", + "Location" : "https://brsiegelsample.table.core.windows.net/test6812620515(PartitionKey='partitionkeya127517',RowKey='rowkeya28981e288')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/test6812620515?timeout=100000", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "4c572e79-0757-4914-bc47-d096205b454f", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:21 GMT", + "Cache-Control" : "no-cache", + "ETag" : "W/\"datetime'2020-09-09T00%3A13%3A21.8639598Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test6812620515(PartitionKey='partitionkeyb385464',RowKey='rowkeyb639690338')", + "Content-Length" : "0", + "x-ms-request-id" : "6417a704-5002-0089-6e3e-867089000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "4c572e79-0757-4914-bc47-d096205b454f", + "Location" : "https://brsiegelsample.table.core.windows.net/test6812620515(PartitionKey='partitionkeyb385464',RowKey='rowkeyb639690338')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/test6812620515()?timeout=100000&$format=application/json%3Bodata%3Dfullmetadata&$top=1", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "1cbc295f-dc47-4f5c-92c4-ff154fa199b0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "x-ms-continuation-NextPartitionKey" : "1!28!cGFydGl0aW9ua2V5YjM4NTQ2NA--", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 09 Sep 2020 00:13:21 GMT", + "Cache-Control" : "no-cache", + "x-ms-continuation-NextRowKey" : "1!24!cm93a2V5YjYzOTY5MDMzOA--", + "x-ms-request-id" : "6417a710-5002-0089-7a3e-867089000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#test6812620515\",\"value\":[{\"odata.type\":\"brsiegelsample.test6812620515\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/test6812620515(PartitionKey='partitionkeya127517',RowKey='rowkeya28981e288')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A13%3A21.8389425Z'\\\"\",\"odata.editLink\":\"test6812620515(PartitionKey='partitionkeya127517',RowKey='rowkeya28981e288')\",\"PartitionKey\":\"partitionkeya127517\",\"RowKey\":\"rowkeya28981e288\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:13:21.8389425Z\"}]}", + "x-ms-client-request-id" : "1cbc295f-dc47-4f5c-92c4-ff154fa199b0", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "d013f478-549f-42a6-9e79-0b2ea7d141f5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6417a71d-5002-0089-073e-867089000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test6812620515\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:21 GMT", + "x-ms-client-request-id" : "d013f478-549f-42a6-9e79-0b2ea7d141f5", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test6812620515')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "47aa6ab1-d79a-4223-a2de-9b341bdbaead" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6417a71f-5002-0089-093e-867089000000", + "Date" : "Wed, 09 Sep 2020 00:13:21 GMT", + "x-ms-client-request-id" : "47aa6ab1-d79a-4223-a2de-9b341bdbaead" + }, + "Exception" : null + } ], + "variables" : [ "1cbc295f-dc47-4f5c-92c4-ff154fa199b0", "test6812620515", "d65ada4d-efd5-4ef1-8e9b-c543b082712a", "partitionkeya127517", "rowkeya28981e288", "285b987d-3804-4727-b9d8-2bc3100a4cc9", "partitionkeyb385464", "rowkeyb639690338", "4c572e79-0757-4914-bc47-d096205b454f", "d013f478-549f-42a6-9e79-0b2ea7d141f5", "47aa6ab1-d79a-4223-a2de-9b341bdbaead" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableImpl.json index e8522266854b8..8ede030fc6bcd 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableImpl.json @@ -1,102 +1,412 @@ { "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "738abccf-60e4-4449-b9e9-509cf1ed1f5a", - "Content-Type" : "application/json" + "x-ms-client-request-id" : "e7784cad-d851-4391-8b30-292a1da088b1" }, "Response" : { + "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fcfbd639-4002-00c8-5b3e-86286d000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"tablename011358ea\"},{\"TableName\":\"tablename0854970e\"},{\"TableName\":\"tablename15814016\"},{\"TableName\":\"tablename1829064d\"},{\"TableName\":\"tablename2139389a\"},{\"TableName\":\"tablename242281e0\"},{\"TableName\":\"tablename30503866\"},{\"TableName\":\"tablename375762fb\"},{\"TableName\":\"tablename39788bd1\"},{\"TableName\":\"tablename484312c7\"},{\"TableName\":\"tablename5250560d\"},{\"TableName\":\"tablename54667ed5\"},{\"TableName\":\"tablename62078e43\"},{\"TableName\":\"tablename74433eec\"},{\"TableName\":\"tablename7591756d\"},{\"TableName\":\"tablename8528219f\"},{\"TableName\":\"tablename958097fe\"},{\"TableName\":\"tablename9823321b\"},{\"TableName\":\"test1563600bc0\"},{\"TableName\":\"test1711305199\"},{\"TableName\":\"test2158859a38\"},{\"TableName\":\"test295844bbd6\"},{\"TableName\":\"test2962772a7f\"},{\"TableName\":\"test3051152d60\"},{\"TableName\":\"test322072ebfb\"},{\"TableName\":\"test4221425ba9\"},{\"TableName\":\"test44136180d1\"},{\"TableName\":\"test454714f862\"},{\"TableName\":\"test47786fb448\"},{\"TableName\":\"test5305356519\"},{\"TableName\":\"test636568eb1e\"},{\"TableName\":\"test66288e3362\"},{\"TableName\":\"test67193dff08\"},{\"TableName\":\"test92276e4eb3\"},{\"TableName\":\"test962936613a\"},{\"TableName\":\"test98085d79c1\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "e7784cad-d851-4391-8b30-292a1da088b1", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename011358ea')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "fa41bd59-83bb-4936-9fe9-4765aa4a73eb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", + "x-ms-request-id" : "fcfbd643-4002-00c8-613e-86286d000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "fa41bd59-83bb-4936-9fe9-4765aa4a73eb" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename15814016')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "7912be4a-799c-4e85-b337-3777d19ee9a7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('atesta35206610b')", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", "Content-Length" : "0", - "x-ms-request-id" : "38b4d7fd-e002-00ee-58ff-776075000000", - "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "738abccf-60e4-4449-b9e9-509cf1ed1f5a", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('atesta35206610b')" + "StatusCode" : "204", + "x-ms-request-id" : "ca84abbb-a002-0034-343e-86f994000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "7912be4a-799c-4e85-b337-3777d19ee9a7" }, "Exception" : null }, { - "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename1829064d')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "cd9a5ca8-626b-4060-884e-b439df8785f5", - "Content-Type" : "application/json" + "x-ms-client-request-id" : "b8040754-93bd-4c98-8158-75eb738dcaf0" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", + "Content-Length" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", + "x-ms-request-id" : "6350194e-8002-001c-463e-86983c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "b8040754-93bd-4c98-8158-75eb738dcaf0" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename2139389a')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "1c55e396-3c2b-4c59-b70e-da5c49b9d4a2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('btestb27050dd4a')", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", "Content-Length" : "0", - "x-ms-request-id" : "38b4d810-e002-00ee-69ff-776075000000", - "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "cd9a5ca8-626b-4060-884e-b439df8785f5", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('btestb27050dd4a')" + "StatusCode" : "204", + "x-ms-request-id" : "57c5e1ee-f002-0090-5f3e-86f032000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "1c55e396-3c2b-4c59-b70e-da5c49b9d4a2" }, "Exception" : null }, { - "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename0854970e')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "abb694db-bd11-43fc-ab7d-bc54de3392fe" + "x-ms-client-request-id" : "3c5f9ffd-c33d-4c9a-880a-31f06c18b3de" }, "Response" : { - "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "38b4d820-e002-00ee-74ff-776075000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta35206610b\"},{\"TableName\":\"btestb27050dd4a\"},{\"TableName\":\"tablename1241627b\"},{\"TableName\":\"tablename40421e18\"},{\"TableName\":\"tablename5733576f\"},{\"TableName\":\"tablename63634170\"},{\"TableName\":\"tablename666613e0\"},{\"TableName\":\"tablename90401540\"},{\"TableName\":\"tablename98625b74\"},{\"TableName\":\"test40691150a0\"},{\"TableName\":\"test68406ec902\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "abb694db-bd11-43fc-ab7d-bc54de3392fe", - "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9fe5ef63-d002-004c-1c3e-865a6c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "3c5f9ffd-c33d-4c9a-880a-31f06c18b3de" }, "Exception" : null }, { - "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename242281e0')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "6dd944e1-3819-4d2b-83ce-663c8a625c9d" + "x-ms-client-request-id" : "c9b6e0a8-73e0-4938-9283-e083b46b420a" }, "Response" : { - "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "38b4d825-e002-00ee-79ff-776075000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta35206610b\"},{\"TableName\":\"btestb27050dd4a\"},{\"TableName\":\"tablename1241627b\"},{\"TableName\":\"tablename40421e18\"},{\"TableName\":\"tablename5733576f\"},{\"TableName\":\"tablename63634170\"},{\"TableName\":\"tablename666613e0\"},{\"TableName\":\"tablename90401540\"},{\"TableName\":\"tablename98625b74\"},{\"TableName\":\"test40691150a0\"},{\"TableName\":\"test68406ec902\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "6dd944e1-3819-4d2b-83ce-663c8a625c9d", - "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6a9a8188-c002-0050-343e-86080c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "c9b6e0a8-73e0-4938-9283-e083b46b420a" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename958097fe')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "2d1029a3-466e-4899-a1ea-a2c0fa6d90d2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "63501955-8002-001c-4c3e-86983c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "2d1029a3-466e-4899-a1ea-a2c0fa6d90d2" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename375762fb')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "40add689-6a66-441e-9962-80112a841408" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6ded8c7e-5002-0020-183e-86b1fb000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "40add689-6a66-441e-9962-80112a841408" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename8528219f')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "a26ee7c0-012e-4989-b718-3d4bf6613d3f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "57c5e1f1-f002-0090-613e-86f032000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "a26ee7c0-012e-4989-b718-3d4bf6613d3f" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename9823321b')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "6d03580c-260b-46aa-8891-add738aac742" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "ca84abc0-a002-0034-383e-86f994000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "6d03580c-260b-46aa-8891-add738aac742" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test1563600bc0')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "bdca1074-e175-486e-b555-ec64e0640203" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fcfbd64a-4002-00c8-663e-86286d000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "bdca1074-e175-486e-b555-ec64e0640203" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test1711305199')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "fdfd9354-204a-4a07-a983-7c1cc2171ef3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9fe5ef77-d002-004c-2e3e-865a6c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "fdfd9354-204a-4a07-a983-7c1cc2171ef3" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename5250560d')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "530907ce-6000-4bde-ab9e-9548357a39aa" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8e50ced1-1002-007c-303e-86e4a3000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "530907ce-6000-4bde-ab9e-9548357a39aa" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename54667ed5')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "504a74b4-ac12-46b3-8da8-c9d894032adc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "cba97abe-8002-0051-453e-8657d0000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "504a74b4-ac12-46b3-8da8-c9d894032adc" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename62078e43')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "d2a1f984-113d-4b22-9154-e91a1f4ea59e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7e23f3c4-f002-0039-193e-863140000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "d2a1f984-113d-4b22-9154-e91a1f4ea59e" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test2962772a7f')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "20f8da71-9d9a-42c1-a338-6e3d5a1b53a0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6350195b-8002-001c-523e-86983c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "20f8da71-9d9a-42c1-a338-6e3d5a1b53a0" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename7591756d')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "e3a40a9b-7c86-439b-a5cd-6cf659cd3eee" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0679e586-6002-0059-1b3e-864ddf000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "e3a40a9b-7c86-439b-a5cd-6cf659cd3eee" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test295844bbd6')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "17e936bf-0946-40bd-8d67-ebff591cd7b1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6a9a818c-c002-0050-363e-86080c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "17e936bf-0946-40bd-8d67-ebff591cd7b1" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test3051152d60')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "1f7f832f-92af-43b7-9392-b56e0869b8da" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6ded8c82-5002-0020-1b3e-86b1fb000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "1f7f832f-92af-43b7-9392-b56e0869b8da" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename40421e18')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename484312c7')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "dc0f6e1f-13ac-4949-ad45-1a735fa3d82b" + "x-ms-client-request-id" : "e2bef8ae-6813-4dc8-abc7-c02595e144a2" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -106,17 +416,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "590e1307-5002-0089-34ff-777089000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "dc0f6e1f-13ac-4949-ad45-1a735fa3d82b" + "x-ms-request-id" : "04c5c32e-d002-00e5-183e-869b1e000000", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "x-ms-client-request-id" : "e2bef8ae-6813-4dc8-abc7-c02595e144a2" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('atesta35206610b')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test322072ebfb')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "04c8a27b-f8d4-421e-9e2c-3f6010d0a9a4" + "x-ms-client-request-id" : "829740ca-34e4-4d48-a4b8-6988b5b7d834" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -126,17 +436,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "aeeecfee-7002-00b1-40ff-77d449000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "04c8a27b-f8d4-421e-9e2c-3f6010d0a9a4" + "x-ms-request-id" : "57c5e1f3-f002-0090-633e-86f032000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "829740ca-34e4-4d48-a4b8-6988b5b7d834" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename5733576f')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test4221425ba9')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "2b89259e-a9fb-490f-892b-533288c6c516" + "x-ms-client-request-id" : "0dea5d83-2ba0-4f9d-991a-1ab95d435c2f" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -146,17 +456,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "ef5daaee-4002-0061-0dff-77e91f000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "2b89259e-a9fb-490f-892b-533288c6c516" + "x-ms-request-id" : "ca84abc9-a002-0034-3f3e-86f994000000", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "x-ms-client-request-id" : "0dea5d83-2ba0-4f9d-991a-1ab95d435c2f" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename666613e0')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test44136180d1')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "6b782d61-e219-4cce-9a66-41c52111f8e0" + "x-ms-client-request-id" : "b712d7b4-1875-4c6d-a045-22675d8d9175" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -166,17 +476,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "5ae8792a-5002-00b6-4cff-77b82a000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "6b782d61-e219-4cce-9a66-41c52111f8e0" + "x-ms-request-id" : "fcfbd64e-4002-00c8-683e-86286d000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "b712d7b4-1875-4c6d-a045-22675d8d9175" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename98625b74')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test47786fb448')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "4eba19b7-2abf-4963-abcf-a9d7f3277d94" + "x-ms-client-request-id" : "982fef78-a046-41dd-be31-47701867093a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -186,17 +496,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "7cf50b5d-2002-002a-79ff-77154c000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "4eba19b7-2abf-4963-abcf-a9d7f3277d94" + "x-ms-request-id" : "8e50ced6-1002-007c-333e-86e4a3000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "982fef78-a046-41dd-be31-47701867093a" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('btestb27050dd4a')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test5305356519')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "7c0afeec-6c4f-4c4f-9d41-5a9d9aada393" + "x-ms-client-request-id" : "39cfe7a3-3416-45b5-8083-18c83c563899" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -206,17 +516,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "9d55d8d8-1002-00c5-70ff-77e0b9000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "7c0afeec-6c4f-4c4f-9d41-5a9d9aada393" + "x-ms-request-id" : "cba97ac7-8002-0051-493e-8657d0000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "39cfe7a3-3416-45b5-8083-18c83c563899" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename90401540')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test454714f862')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "213a9d8f-cfa1-466f-b7be-772e57e66a0e" + "x-ms-client-request-id" : "44b2c066-d6b5-41a4-a1e1-be33a0c626e1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -226,17 +536,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "7dcbc896-6002-0066-5aff-77857c000000", - "Date" : "Fri, 21 Aug 2020 21:09:12 GMT", - "x-ms-client-request-id" : "213a9d8f-cfa1-466f-b7be-772e57e66a0e" + "x-ms-request-id" : "9fe5ef8c-d002-004c-3e3e-865a6c000000", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "x-ms-client-request-id" : "44b2c066-d6b5-41a4-a1e1-be33a0c626e1" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename1241627b')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename39788bd1')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "59b0c64a-e5aa-489c-a663-11de70da16e0" + "x-ms-client-request-id" : "be7f2633-feb8-4251-8249-953c5bad1391" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -246,17 +556,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "5c2a3db3-b002-0075-5bff-77a170000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "59b0c64a-e5aa-489c-a663-11de70da16e0" + "x-ms-request-id" : "3dc23887-9002-00b9-3b3e-86ce46000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "be7f2633-feb8-4251-8249-953c5bad1391" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test40691150a0')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test636568eb1e')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "5817cde7-ee37-4a38-a3c5-bb2b38085fc9" + "x-ms-client-request-id" : "42c6e5a1-45cd-4fac-b6b0-067c2aa36704" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -266,17 +576,269 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "58354d8a-d002-003e-2eff-775d23000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "5817cde7-ee37-4a38-a3c5-bb2b38085fc9" + "x-ms-request-id" : "7e23f3ce-f002-0039-203e-863140000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "42c6e5a1-45cd-4fac-b6b0-067c2aa36704" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test66288e3362')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "6dacb959-7d0a-4fc1-b771-dd24d79712b3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0679e58b-6002-0059-1d3e-864ddf000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "6dacb959-7d0a-4fc1-b771-dd24d79712b3" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test2158859a38')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "5d33eb10-c17d-49ac-8997-080d1baa54c1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6aa346ae-0002-003d-643e-86bc47000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "5d33eb10-c17d-49ac-8997-080d1baa54c1" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test92276e4eb3')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "e89f7151-edc0-431b-9c1d-dbda00e06d66" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "63501969-8002-001c-5e3e-86983c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "e89f7151-edc0-431b-9c1d-dbda00e06d66" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test67193dff08')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "3af3006b-1f71-432b-9544-25b56c7025f8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6a9a8193-c002-0050-3a3e-86080c000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "3af3006b-1f71-432b-9544-25b56c7025f8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test98085d79c1')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "ede18b84-f1ee-4004-bf12-5d03eb6ff58f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "04c5c341-d002-00e5-243e-869b1e000000", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "x-ms-client-request-id" : "ede18b84-f1ee-4004-bf12-5d03eb6ff58f" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test962936613a')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "b8b87e08-d774-400f-b54b-d43ff763e561" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6ded8c8b-5002-0020-203e-86b1fb000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "b8b87e08-d774-400f-b54b-d43ff763e561" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename74433eec')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "d2b052ee-1d92-432f-b470-c36044a4eaae" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7c04c434-1002-00d5-493e-8625d1000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "d2b052ee-1d92-432f-b470-c36044a4eaae" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename30503866')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "c7b9f1e0-60ea-4271-ab4c-6a0788a90942" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "e913d5b4-a002-009d-643e-8638e6000000", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "c7b9f1e0-60ea-4271-ab4c-6a0788a90942" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "74944e4c-b157-417b-8111-3c34a37ccd38", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('atesta911830bb8')", + "Content-Length" : "0", + "x-ms-request-id" : "57c5e211-f002-0090-763e-86f032000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "74944e4c-b157-417b-8111-3c34a37ccd38", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('atesta911830bb8')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "90baf913-f620-4225-9ab9-034c7182fb78", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('btestb690570aa2')", + "Content-Length" : "0", + "x-ms-request-id" : "ca84ac20-a002-0034-113e-86f994000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "90baf913-f620-4225-9ab9-034c7182fb78", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('btestb690570aa2')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "aa5f6fb1-8d7a-4d3c-8e64-91706dc17e24" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fcfbd67e-4002-00c8-0a3e-86286d000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta911830bb8\"},{\"TableName\":\"btestb690570aa2\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "x-ms-client-request-id" : "aa5f6fb1-8d7a-4d3c-8e64-91706dc17e24", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "1f3d167f-21db-46f1-b6c9-6d59ab76a6fd" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "cba97aef-8002-0051-6b3e-8657d0000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta911830bb8\"},{\"TableName\":\"btestb690570aa2\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:13 GMT", + "x-ms-client-request-id" : "1f3d167f-21db-46f1-b6c9-6d59ab76a6fd", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('tablename63634170')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('atesta911830bb8')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "ce65cfd1-4c28-4e3f-a91d-f9f4566a44bd" + "x-ms-client-request-id" : "38594280-4905-40fb-8403-f89b0f5f4169" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -286,17 +848,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "4835d203-7002-008e-5eff-771cea000000", - "Date" : "Fri, 21 Aug 2020 21:09:11 GMT", - "x-ms-client-request-id" : "ce65cfd1-4c28-4e3f-a91d-f9f4566a44bd" + "x-ms-request-id" : "8e50cf0c-1002-007c-633e-86e4a3000000", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "x-ms-client-request-id" : "38594280-4905-40fb-8403-f89b0f5f4169" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test68406ec902')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('btestb690570aa2')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "13da2030-7306-4038-8ae0-d0362f780d2a" + "x-ms-client-request-id" : "c98c3735-0a94-4569-9445-9654559f6851" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -306,11 +868,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "1e9e4b07-7002-007a-34ff-77d71c000000", - "Date" : "Fri, 21 Aug 2020 21:09:12 GMT", - "x-ms-client-request-id" : "13da2030-7306-4038-8ae0-d0362f780d2a" + "x-ms-request-id" : "9fe5f08c-d002-004c-2b3e-865a6c000000", + "Date" : "Wed, 09 Sep 2020 00:13:14 GMT", + "x-ms-client-request-id" : "c98c3735-0a94-4569-9445-9654559f6851" }, "Exception" : null } ], - "variables" : [ "atesta35206610b", "btestb27050dd4a", "738abccf-60e4-4449-b9e9-509cf1ed1f5a", "cd9a5ca8-626b-4060-884e-b439df8785f5", "abb694db-bd11-43fc-ab7d-bc54de3392fe", "6dd944e1-3819-4d2b-83ce-663c8a625c9d", "04c8a27b-f8d4-421e-9e2c-3f6010d0a9a4", "7c0afeec-6c4f-4c4f-9d41-5a9d9aada393", "59b0c64a-e5aa-489c-a663-11de70da16e0", "dc0f6e1f-13ac-4949-ad45-1a735fa3d82b", "2b89259e-a9fb-490f-892b-533288c6c516", "ce65cfd1-4c28-4e3f-a91d-f9f4566a44bd", "6b782d61-e219-4cce-9a66-41c52111f8e0", "213a9d8f-cfa1-466f-b7be-772e57e66a0e", "4eba19b7-2abf-4963-abcf-a9d7f3277d94", "5817cde7-ee37-4a38-a3c5-bb2b38085fc9", "13da2030-7306-4038-8ae0-d0362f780d2a" ] + "variables" : [ "e7784cad-d851-4391-8b30-292a1da088b1", "fa41bd59-83bb-4936-9fe9-4765aa4a73eb", "3c5f9ffd-c33d-4c9a-880a-31f06c18b3de", "7912be4a-799c-4e85-b337-3777d19ee9a7", "b8040754-93bd-4c98-8158-75eb738dcaf0", "1c55e396-3c2b-4c59-b70e-da5c49b9d4a2", "c9b6e0a8-73e0-4938-9283-e083b46b420a", "c7b9f1e0-60ea-4271-ab4c-6a0788a90942", "40add689-6a66-441e-9962-80112a841408", "be7f2633-feb8-4251-8249-953c5bad1391", "e2bef8ae-6813-4dc8-abc7-c02595e144a2", "530907ce-6000-4bde-ab9e-9548357a39aa", "504a74b4-ac12-46b3-8da8-c9d894032adc", "d2a1f984-113d-4b22-9154-e91a1f4ea59e", "d2b052ee-1d92-432f-b470-c36044a4eaae", "e3a40a9b-7c86-439b-a5cd-6cf659cd3eee", "a26ee7c0-012e-4989-b718-3d4bf6613d3f", "2d1029a3-466e-4899-a1ea-a2c0fa6d90d2", "6d03580c-260b-46aa-8891-add738aac742", "bdca1074-e175-486e-b555-ec64e0640203", "fdfd9354-204a-4a07-a983-7c1cc2171ef3", "5d33eb10-c17d-49ac-8997-080d1baa54c1", "17e936bf-0946-40bd-8d67-ebff591cd7b1", "20f8da71-9d9a-42c1-a338-6e3d5a1b53a0", "1f7f832f-92af-43b7-9392-b56e0869b8da", "829740ca-34e4-4d48-a4b8-6988b5b7d834", "0dea5d83-2ba0-4f9d-991a-1ab95d435c2f", "b712d7b4-1875-4c6d-a045-22675d8d9175", "44b2c066-d6b5-41a4-a1e1-be33a0c626e1", "982fef78-a046-41dd-be31-47701867093a", "39cfe7a3-3416-45b5-8083-18c83c563899", "42c6e5a1-45cd-4fac-b6b0-067c2aa36704", "6dacb959-7d0a-4fc1-b771-dd24d79712b3", "3af3006b-1f71-432b-9544-25b56c7025f8", "e89f7151-edc0-431b-9c1d-dbda00e06d66", "b8b87e08-d774-400f-b54b-d43ff763e561", "ede18b84-f1ee-4004-bf12-5d03eb6ff58f", "atesta911830bb8", "btestb690570aa2", "74944e4c-b157-417b-8111-3c34a37ccd38", "90baf913-f620-4225-9ab9-034c7182fb78", "aa5f6fb1-8d7a-4d3c-8e64-91706dc17e24", "1f3d167f-21db-46f1-b6c9-6d59ab76a6fd", "38594280-4905-40fb-8403-f89b0f5f4169", "c98c3735-0a94-4569-9445-9654559f6851" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableWithFilterImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableWithFilterImpl.json new file mode 100644 index 0000000000000..f1e1467cadf1d --- /dev/null +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableWithFilterImpl.json @@ -0,0 +1,158 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "03aefb91-3fde-47a1-98f6-d5a5e6371569" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "01de9e6d-1002-00b7-753e-86e7f6000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[]}", + "Date" : "Wed, 09 Sep 2020 00:14:10 GMT", + "x-ms-client-request-id" : "03aefb91-3fde-47a1-98f6-d5a5e6371569", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "d3c2d925-9072-4583-866f-16ab266debf7", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:14:11 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('atesta457151bd1')", + "Content-Length" : "0", + "x-ms-request-id" : "01de9e72-1002-00b7-793e-86e7f6000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "d3c2d925-9072-4583-866f-16ab266debf7", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('atesta457151bd1')" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.table.core.windows.net/Tables", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "35c9424e-8a48-4c3e-97f0-0e6af8b4b523", + "Content-Type" : "application/json" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 00:14:11 GMT", + "Cache-Control" : "no-cache", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('btestb68004d045')", + "Content-Length" : "0", + "x-ms-request-id" : "01de9e75-1002-00b7-7b3e-86e7f6000000", + "Preference-Applied" : "return-no-content", + "x-ms-client-request-id" : "35c9424e-8a48-4c3e-97f0-0e6af8b4b523", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('btestb68004d045')" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata&$filter=TableName%20eq%20%27atesta457151bd1%27", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "ed75a877-76dc-4b81-8771-e744c2b789c4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "01de9e77-1002-00b7-7c3e-86e7f6000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta457151bd1\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:11 GMT", + "x-ms-client-request-id" : "ed75a877-76dc-4b81-8771-e744c2b789c4", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "ac897b53-6d35-4bd4-a12d-d8f251053ac7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "01de9e78-1002-00b7-7d3e-86e7f6000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta457151bd1\"},{\"TableName\":\"btestb68004d045\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:11 GMT", + "x-ms-client-request-id" : "ac897b53-6d35-4bd4-a12d-d8f251053ac7", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('atesta457151bd1')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "170f9012-66d2-4203-833b-bcb8202125b6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "01de9e79-1002-00b7-7e3e-86e7f6000000", + "Date" : "Wed, 09 Sep 2020 00:14:11 GMT", + "x-ms-client-request-id" : "170f9012-66d2-4203-833b-bcb8202125b6" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('btestb68004d045')", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "4d46bba4-69a5-48c1-96b8-3441d9e4a2e9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "acc78e80-2002-003a-463e-86d024000000", + "Date" : "Wed, 09 Sep 2020 00:14:10 GMT", + "x-ms-client-request-id" : "4d46bba4-69a5-48c1-96b8-3441d9e4a2e9" + }, + "Exception" : null + } ], + "variables" : [ "03aefb91-3fde-47a1-98f6-d5a5e6371569", "atesta457151bd1", "btestb68004d045", "d3c2d925-9072-4583-866f-16ab266debf7", "35c9424e-8a48-4c3e-97f0-0e6af8b4b523", "ed75a877-76dc-4b81-8771-e744c2b789c4", "ac897b53-6d35-4bd4-a12d-d8f251053ac7", "170f9012-66d2-4203-833b-bcb8202125b6", "4d46bba4-69a5-48c1-96b8-3441d9e4a2e9" ] +} \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableWithTopImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableWithTopImpl.json index 933511fa2b934..36f17664349d9 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableWithTopImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/queryTableWithTopImpl.json @@ -1,10 +1,32 @@ { "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", + "Headers" : { + "x-ms-version" : "2019-02-02", + "x-ms-client-request-id" : "88881d0f-8832-4a45-81eb-bc30e3b3b9f8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8d1bffeb-3002-00d2-0c3e-8649b2000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[]}", + "Date" : "Wed, 09 Sep 2020 00:13:27 GMT", + "x-ms-client-request-id" : "88881d0f-8832-4a45-81eb-bc30e3b3b9f8", + "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { "Method" : "POST", "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "f843877d-330a-4362-9c47-6e44b314ef6c", + "x-ms-client-request-id" : "ba33a6ad-a613-4708-966e-f511641d8fb3", "Content-Type" : "application/json" }, "Response" : { @@ -13,14 +35,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:20 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:27 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('atesta516919a09')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('atesta16205ffb0')", "Content-Length" : "0", - "x-ms-request-id" : "5efa3c8b-c002-0050-6eff-77080c000000", + "x-ms-request-id" : "8d1bfff1-3002-00d2-113e-8649b2000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "f843877d-330a-4362-9c47-6e44b314ef6c", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('atesta516919a09')" + "x-ms-client-request-id" : "ba33a6ad-a613-4708-966e-f511641d8fb3", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('atesta16205ffb0')" }, "Exception" : null }, { @@ -28,7 +50,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "572b2186-5bdb-4b95-98b1-6339efa164cb", + "x-ms-client-request-id" : "9b8e5069-3304-4c07-8495-e43fc9950290", "Content-Type" : "application/json" }, "Response" : { @@ -37,14 +59,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:20 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:27 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('btestb827789d02')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('btestb218590b70')", "Content-Length" : "0", - "x-ms-request-id" : "5efa3c93-c002-0050-74ff-77080c000000", + "x-ms-request-id" : "8d1bfff6-3002-00d2-153e-8649b2000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "572b2186-5bdb-4b95-98b1-6339efa164cb", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('btestb827789d02')" + "x-ms-client-request-id" : "9b8e5069-3304-4c07-8495-e43fc9950290", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('btestb218590b70')" }, "Exception" : null }, { @@ -52,7 +74,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata&$top=1", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "98ac27af-1488-4334-9eb7-fec2dbc24236" + "x-ms-client-request-id" : "90a5c382-69e7-4060-aa91-da8686792e1f" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -61,12 +83,12 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:09:20 GMT", - "x-ms-continuation-NextTableName" : "1!44!YnRlc3RiMjcwNTBkZDRhATAxZDY3N2ZmNTE2ZTQ5MmY-", + "Date" : "Wed, 09 Sep 2020 00:13:27 GMT", + "x-ms-continuation-NextTableName" : "1!44!YXRlc3RhOTExODMwYmI4ATAxZDY4NjNlMDJkYTNmMDE-", "Cache-Control" : "no-cache", - "x-ms-request-id" : "5efa3c9d-c002-0050-7bff-77080c000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta516919a09\"}]}", - "x-ms-client-request-id" : "98ac27af-1488-4334-9eb7-fec2dbc24236", + "x-ms-request-id" : "8d1bfffc-3002-00d2-1a3e-8649b2000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta16205ffb0\"}]}", + "x-ms-client-request-id" : "90a5c382-69e7-4060-aa91-da8686792e1f", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null @@ -75,7 +97,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "dae23938-1fb1-4ebc-8fe0-51f38084b1ae" + "x-ms-client-request-id" : "2cf15c39-c914-4ae2-94d9-23325d91b4f6" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -85,19 +107,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5efa3ca5-c002-0050-01ff-77080c000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta516919a09\"},{\"TableName\":\"btestb827789d02\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:20 GMT", - "x-ms-client-request-id" : "dae23938-1fb1-4ebc-8fe0-51f38084b1ae", + "x-ms-request-id" : "8d1c0000-3002-00d2-1d3e-8649b2000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"atesta16205ffb0\"},{\"TableName\":\"btestb218590b70\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:27 GMT", + "x-ms-client-request-id" : "2cf15c39-c914-4ae2-94d9-23325d91b4f6", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('atesta516919a09')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('atesta16205ffb0')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "80cca126-7f1b-4947-95bf-a12df1e1d654" + "x-ms-client-request-id" : "c0a681df-f045-41ea-8dd3-97f283171a83" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -107,17 +129,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "1f1386af-c002-00b4-59ff-770692000000", - "Date" : "Fri, 21 Aug 2020 21:09:20 GMT", - "x-ms-client-request-id" : "80cca126-7f1b-4947-95bf-a12df1e1d654" + "x-ms-request-id" : "8d1c0004-3002-00d2-213e-8649b2000000", + "Date" : "Wed, 09 Sep 2020 00:13:27 GMT", + "x-ms-client-request-id" : "c0a681df-f045-41ea-8dd3-97f283171a83" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('btestb827789d02')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('btestb218590b70')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "0b6c3726-3db5-4b27-885e-80368aa52f06" + "x-ms-client-request-id" : "74ec099e-a029-476f-8118-24543f93ea59" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -127,11 +149,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "f2301176-4002-00c8-1eff-77286d000000", - "Date" : "Fri, 21 Aug 2020 21:09:20 GMT", - "x-ms-client-request-id" : "0b6c3726-3db5-4b27-885e-80368aa52f06" + "x-ms-request-id" : "b897be9c-a002-0056-243e-863bb3000000", + "Date" : "Wed, 09 Sep 2020 00:13:28 GMT", + "x-ms-client-request-id" : "74ec099e-a029-476f-8118-24543f93ea59" }, "Exception" : null } ], - "variables" : [ "atesta516919a09", "btestb827789d02", "f843877d-330a-4362-9c47-6e44b314ef6c", "572b2186-5bdb-4b95-98b1-6339efa164cb", "98ac27af-1488-4334-9eb7-fec2dbc24236", "dae23938-1fb1-4ebc-8fe0-51f38084b1ae", "80cca126-7f1b-4947-95bf-a12df1e1d654", "0b6c3726-3db5-4b27-885e-80368aa52f06" ] + "variables" : [ "88881d0f-8832-4a45-81eb-bc30e3b3b9f8", "atesta16205ffb0", "btestb218590b70", "ba33a6ad-a613-4708-966e-f511641d8fb3", "9b8e5069-3304-4c07-8495-e43fc9950290", "90a5c382-69e7-4060-aa91-da8686792e1f", "2cf15c39-c914-4ae2-94d9-23325d91b4f6", "c0a681df-f045-41ea-8dd3-97f283171a83", "74ec099e-a029-476f-8118-24543f93ea59" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTable.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTable.json index aa2ff384fdb74..d0df6b62290dd 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTable.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTable.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "222d3cd7-3487-4cbb-b351-b6f491409c5d", + "x-ms-client-request-id" : "d541556a-cd1b-41f5-9be0-5601193a7905", "Content-Type" : "application/json" }, "Response" : { @@ -14,16 +14,16 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:32 GMT", + "Date" : "Wed, 09 Sep 2020 00:17:03 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test655206aeeb')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test7019070da3')", "Content-Length" : "0", - "x-ms-request-id" : "fdb2ed96-d002-005c-59ff-779f04000000", + "x-ms-request-id" : "15a205e2-4002-005e-5d3e-8621bc000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "222d3cd7-3487-4cbb-b351-b6f491409c5d", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test655206aeeb')" + "x-ms-client-request-id" : "d541556a-cd1b-41f5-9be0-5601193a7905", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test7019070da3')" }, "Exception" : null } ], - "variables" : [ "test655206aeeb" ] + "variables" : [ "test7019070da3" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableAsync.json index 88946e250faa1..5919779e2e64e 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "ab9318a5-67cf-45c7-a5ef-7c3af944c0b3", + "x-ms-client-request-id" : "47a6dc3e-d996-45fb-ae30-3c9b969d4446", "Content-Type" : "application/json" }, "Response" : { @@ -14,16 +14,16 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:08:59 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:45 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test68406ec902')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test4221425ba9')", "Content-Length" : "0", - "x-ms-request-id" : "a2f9e3e5-2002-003a-7aff-77d024000000", + "x-ms-request-id" : "c6a79d0f-c002-00d6-563d-86c4b5000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "ab9318a5-67cf-45c7-a5ef-7c3af944c0b3", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test68406ec902')" + "x-ms-client-request-id" : "47a6dc3e-d996-45fb-ae30-3c9b969d4446", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test4221425ba9')" }, "Exception" : null } ], - "variables" : [ "test68406ec902" ] + "variables" : [ "test4221425ba9" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExists.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExists.json index 9fa3959b18aad..156b4c5ca7b83 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExists.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExists.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "d86532b0-9bfa-474d-9a54-49d1c0294cd2", + "x-ms-client-request-id" : "c1531a6e-13d6-4529-9b73-fdbe8d049f5a", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 21:38:34 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:50 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test15790b43b7')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test52714b3efe')", "Content-Length" : "0", - "x-ms-request-id" : "f56aa02c-4002-00c8-61ba-7c286d000000", + "x-ms-request-id" : "47b9ce7c-f002-00bf-0a3e-86fdf9000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "d86532b0-9bfa-474d-9a54-49d1c0294cd2", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test15790b43b7')" + "x-ms-client-request-id" : "c1531a6e-13d6-4529-9b73-fdbe8d049f5a", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test52714b3efe')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "f8f6d880-45e0-4b30-b42f-8c55014bcc94", + "x-ms-client-request-id" : "e4d35ace-a08e-4494-93be-b2c3dbc47078", "Content-Type" : "application/json" }, "Response" : { @@ -40,15 +40,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Thu, 27 Aug 2020 21:38:34 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:50 GMT", "Cache-Control" : "no-cache", - "x-ms-request-id" : "f56aa030-4002-00c8-63ba-7c286d000000", - "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:f56aa030-4002-00c8-63ba-7c286d000000\\nTime:2020-08-27T21:38:34.8728592Z\"}}}", + "x-ms-request-id" : "47b9ce91-f002-00bf-1c3e-86fdf9000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:47b9ce91-f002-00bf-1c3e-86fdf9000000\\nTime:2020-09-09T00:16:50.9421433Z\"}}}", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "f8f6d880-45e0-4b30-b42f-8c55014bcc94", + "x-ms-client-request-id" : "e4d35ace-a08e-4494-93be-b2c3dbc47078", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test15790b43b7" ] + "variables" : [ "test52714b3efe" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExistsAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExistsAsync.json index a918cc60f9301..917bdfc7a1381 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExistsAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableFailsIfExistsAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "4b14eb7d-4782-47b6-87f1-ef7c18ec6375", + "x-ms-client-request-id" : "e92e0585-1f87-45ed-b719-7c2cf01fb329", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 21:37:02 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:02 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test95670e2797')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test47786fb448')", "Content-Length" : "0", - "x-ms-request-id" : "18358b1a-5002-0030-3fba-7c7493000000", + "x-ms-request-id" : "0e01bd13-4002-003c-603d-86e39b000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "4b14eb7d-4782-47b6-87f1-ef7c18ec6375", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test95670e2797')" + "x-ms-client-request-id" : "e92e0585-1f87-45ed-b719-7c2cf01fb329", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test47786fb448')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "8866db20-4dbd-4b0c-842e-f9b9d5820482", + "x-ms-client-request-id" : "dde7e619-f8ce-484b-9969-bb1ad2d02cfc", "Content-Type" : "application/json" }, "Response" : { @@ -40,15 +40,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Thu, 27 Aug 2020 21:37:02 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:02 GMT", "Cache-Control" : "no-cache", - "x-ms-request-id" : "18358b2d-5002-0030-50ba-7c7493000000", - "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:18358b2d-5002-0030-50ba-7c7493000000\\nTime:2020-08-27T21:37:02.7996625Z\"}}}", + "x-ms-request-id" : "0e01bd4b-4002-003c-153d-86e39b000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:0e01bd4b-4002-003c-153d-86e39b000000\\nTime:2020-09-09T00:13:03.4959323Z\"}}}", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "8866db20-4dbd-4b0c-842e-f9b9d5820482", + "x-ms-client-request-id" : "dde7e619-f8ce-484b-9969-bb1ad2d02cfc", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test95670e2797" ] + "variables" : [ "test47786fb448" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExists.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExists.json index dac7dc8ac32a4..83f7e9de9c575 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExists.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExists.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "028ae606-12ab-429a-b0d0-a6ee00215377", + "x-ms-client-request-id" : "4dbbf8e5-5f0b-4851-83c2-1b6d9ba22985", "Content-Type" : "application/json" }, "Response" : { @@ -14,16 +14,16 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 21:38:31 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:45 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test79947b18e1')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test03071bc29b')", "Content-Length" : "0", - "x-ms-request-id" : "8ef6e693-1002-0088-30ba-7c2f55000000", + "x-ms-request-id" : "d5e32476-d002-0073-613e-8692cf000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "028ae606-12ab-429a-b0d0-a6ee00215377", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test79947b18e1')" + "x-ms-client-request-id" : "4dbbf8e5-5f0b-4851-83c2-1b6d9ba22985", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test03071bc29b')" }, "Exception" : null } ], - "variables" : [ "test79947b18e1" ] + "variables" : [ "test03071bc29b" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsAsync.json index 704a78a6c2a69..030143cfcf4e5 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "5c560ffe-c0ab-44a2-8dfd-c171966c9ecf", + "x-ms-client-request-id" : "a5c02fc8-962e-404b-bd79-eb4cbeb8e60c", "Content-Type" : "application/json" }, "Response" : { @@ -14,16 +14,16 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 21:36:51 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:53 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test002158a072')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test92276e4eb3')", "Content-Length" : "0", - "x-ms-request-id" : "140844c0-6002-003b-5bba-7c8ff8000000", + "x-ms-request-id" : "29850d97-7002-0037-6f3d-8618f0000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "5c560ffe-c0ab-44a2-8dfd-c171966c9ecf", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test002158a072')" + "x-ms-client-request-id" : "a5c02fc8-962e-404b-bd79-eb4cbeb8e60c", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test92276e4eb3')" }, "Exception" : null } ], - "variables" : [ "test002158a072" ] + "variables" : [ "test92276e4eb3" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExists.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExists.json index ca42f54d49d48..ccc00bee3de25 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExists.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExists.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "da640b5b-358c-4b00-af94-6113be63e82e", + "x-ms-client-request-id" : "fe1beb74-acc3-4685-af20-1ce66c82c6df", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 21:38:40 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:59 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test31065a18ca')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test97201a8ce9')", "Content-Length" : "0", - "x-ms-request-id" : "63b4c6ee-c002-0050-40ba-7c080c000000", + "x-ms-request-id" : "651a1f18-5002-00b6-243e-86b82a000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "da640b5b-358c-4b00-af94-6113be63e82e", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test31065a18ca')" + "x-ms-client-request-id" : "fe1beb74-acc3-4685-af20-1ce66c82c6df", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test97201a8ce9')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "b8963546-fa06-4651-ba49-9b8bbb5dc940", + "x-ms-client-request-id" : "18cb25e2-22b4-464e-bf7d-1271adff6dc9", "Content-Type" : "application/json" }, "Response" : { @@ -40,15 +40,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Thu, 27 Aug 2020 21:38:40 GMT", + "Date" : "Wed, 09 Sep 2020 00:16:59 GMT", "Cache-Control" : "no-cache", - "x-ms-request-id" : "63b4c6ff-c002-0050-4eba-7c080c000000", - "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:63b4c6ff-c002-0050-4eba-7c080c000000\\nTime:2020-08-27T21:38:40.5250347Z\"}}}", + "x-ms-request-id" : "651a1f26-5002-00b6-303e-86b82a000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:651a1f26-5002-00b6-303e-86b82a000000\\nTime:2020-09-09T00:17:00.2981570Z\"}}}", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "b8963546-fa06-4651-ba49-9b8bbb5dc940", + "x-ms-client-request-id" : "18cb25e2-22b4-464e-bf7d-1271adff6dc9", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test31065a18ca" ] + "variables" : [ "test97201a8ce9" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExistsAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExistsAsync.json index f137c00edd041..61118c19a57e2 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExistsAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsSucceedsIfExistsAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "fee1b199-6178-4c19-a2df-789f7035ccc3", + "x-ms-client-request-id" : "2f8c0488-2f1d-42de-b3c0-2e6c4fa297f2", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 21:36:44 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:37 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test5149491e99')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test636568eb1e')", "Content-Length" : "0", - "x-ms-request-id" : "32eef6a8-a002-0046-66ba-7cfedb000000", + "x-ms-request-id" : "15a179a4-4002-005e-0d3d-8621bc000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "fee1b199-6178-4c19-a2df-789f7035ccc3", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test5149491e99')" + "x-ms-client-request-id" : "2f8c0488-2f1d-42de-b3c0-2e6c4fa297f2", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test636568eb1e')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "a38b4f2f-09e4-40d6-9700-2c12ff0aa2be", + "x-ms-client-request-id" : "99413fee-875a-4ded-bf55-df8a6c3ef8cb", "Content-Type" : "application/json" }, "Response" : { @@ -40,15 +40,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Thu, 27 Aug 2020 21:36:44 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:37 GMT", "Cache-Control" : "no-cache", - "x-ms-request-id" : "32eef6b2-a002-0046-6dba-7cfedb000000", - "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:32eef6b2-a002-0046-6dba-7cfedb000000\\nTime:2020-08-27T21:36:45.5055127Z\"}}}", + "x-ms-request-id" : "15a179ba-4002-005e-213d-8621bc000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:15a179ba-4002-005e-213d-8621bc000000\\nTime:2020-09-09T00:12:38.1840909Z\"}}}", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "a38b4f2f-09e4-40d6-9700-2c12ff0aa2be", + "x-ms-client-request-id" : "99413fee-875a-4ded-bf55-df8a6c3ef8cb", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test5149491e99" ] + "variables" : [ "test636568eb1e" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseAsync.json index 3687cb1bf9c5f..77f94b4a17401 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "460c0b0d-4ff4-4aab-b4b8-5a973ac1dc5e", + "x-ms-client-request-id" : "2e7cc21d-50e4-4f53-a20e-26339bca3d50", "Content-Type" : "application/json" }, "Response" : { @@ -14,16 +14,16 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 22:54:28 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:49 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test46374d0f85')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test322072ebfb')", "Content-Length" : "0", - "x-ms-request-id" : "0aebf3ba-1002-006c-44c5-7c21cb000000", + "x-ms-request-id" : "a8e53d25-9002-0062-3e3d-86087b000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "460c0b0d-4ff4-4aab-b4b8-5a973ac1dc5e", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test46374d0f85')" + "x-ms-client-request-id" : "2e7cc21d-50e4-4f53-a20e-26339bca3d50", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test322072ebfb')" }, "Exception" : null } ], - "variables" : [ "test46374d0f85" ] + "variables" : [ "test322072ebfb" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync.json index 754094a560993..82a71dd5e0ad0 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableIfNotExistsWithResponseSucceedsIfExistsAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "876aae1c-f914-454e-8c2f-e67e1f2843d3", + "x-ms-client-request-id" : "28a017aa-06b6-4a59-a880-0826543b25be", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Thu, 27 Aug 2020 22:54:07 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:31 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test46962d85c7')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test67193dff08')", "Content-Length" : "0", - "x-ms-request-id" : "0d226c5b-8002-00b5-09c4-7c594e000000", + "x-ms-request-id" : "b1ae94c5-f002-0029-1f3d-86f428000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "876aae1c-f914-454e-8c2f-e67e1f2843d3", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test46962d85c7')" + "x-ms-client-request-id" : "28a017aa-06b6-4a59-a880-0826543b25be", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test67193dff08')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "9134baa8-adf5-423d-832d-3748c73b0fdc", + "x-ms-client-request-id" : "52a12406-18de-41db-80ec-1331f91bbfec", "Content-Type" : "application/json" }, "Response" : { @@ -40,15 +40,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "409", - "Date" : "Thu, 27 Aug 2020 22:54:08 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:31 GMT", "Cache-Control" : "no-cache", - "x-ms-request-id" : "0d2275aa-8002-00b5-04c4-7c594e000000", - "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:0d2275aa-8002-00b5-04c4-7c594e000000\\nTime:2020-08-27T22:54:08.2704495Z\"}}}", + "x-ms-request-id" : "b1ae94ec-f002-0029-423d-86f428000000", + "Body" : "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"The table specified already exists.\\nRequestId:b1ae94ec-f002-0029-423d-86f428000000\\nTime:2020-09-09T00:12:32.2253140Z\"}}}", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "9134baa8-adf5-423d-832d-3748c73b0fdc", + "x-ms-client-request-id" : "52a12406-18de-41db-80ec-1331f91bbfec", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test46962d85c7" ] + "variables" : [ "test67193dff08" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableWithResponseAsync.json index c0fa6339c23ae..04ee4383455bb 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableWithResponseAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceCreateTableWithResponseAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "c1298342-d3d7-4c07-ac36-5b92911797b8", + "x-ms-client-request-id" : "19d1b8a3-bcdb-49ae-a07a-22609e8eae88", "Content-Type" : "application/json" }, "Response" : { @@ -14,16 +14,16 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:03 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:56 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test40691150a0')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test295844bbd6')", "Content-Length" : "0", - "x-ms-request-id" : "52a414ab-d002-00da-52ff-7753bd000000", + "x-ms-request-id" : "4ac96803-b002-00cc-573d-86a56a000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "c1298342-d3d7-4c07-ac36-5b92911797b8", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test40691150a0')" + "x-ms-client-request-id" : "19d1b8a3-bcdb-49ae-a07a-22609e8eae88", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test295844bbd6')" }, "Exception" : null } ], - "variables" : [ "test40691150a0" ] + "variables" : [ "test295844bbd6" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTable.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTable.json index a298bdac4b7d9..78ee93d89f94c 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTable.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTable.json @@ -1,4 +1,4 @@ { "networkCallRecords" : [ ], - "variables" : [ "test4318645780" ] + "variables" : [ "test043239b0dd" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableAsync.json index 800d2f3233613..1bfb5c2830d3c 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "433950ac-1a74-4c76-9e5a-baa8351571ff", + "x-ms-client-request-id" : "faab62af-5bb3-4403-a5cd-e7026498fcde", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:05 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:59 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test11242d9a59')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test21025bf5eb')", "Content-Length" : "0", - "x-ms-request-id" : "b6181bd6-4002-004e-4dff-77e4d4000000", + "x-ms-request-id" : "d7c65b51-d002-0097-433d-869c51000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "433950ac-1a74-4c76-9e5a-baa8351571ff", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test11242d9a59')" + "x-ms-client-request-id" : "faab62af-5bb3-4403-a5cd-e7026498fcde", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test21025bf5eb')" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test11242d9a59')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test21025bf5eb')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "d4e93b33-3ee4-440d-8e42-2dbf70d67754" + "x-ms-client-request-id" : "8fb5ea2b-4b86-4398-8bcd-ca3b0c9772de" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -40,11 +40,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "b6181bde-4002-004e-53ff-77e4d4000000", - "Date" : "Fri, 21 Aug 2020 21:09:05 GMT", - "x-ms-client-request-id" : "d4e93b33-3ee4-440d-8e42-2dbf70d67754" + "x-ms-request-id" : "d7c65b5e-d002-0097-4c3d-869c51000000", + "Date" : "Wed, 09 Sep 2020 00:12:59 GMT", + "x-ms-client-request-id" : "8fb5ea2b-4b86-4398-8bcd-ca3b0c9772de" }, "Exception" : null } ], - "variables" : [ "test11242d9a59" ] + "variables" : [ "test21025bf5eb" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableWithResponse.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableWithResponse.json index 819a863a85037..217104e75f3ec 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableWithResponse.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableWithResponse.json @@ -1,4 +1,4 @@ { "networkCallRecords" : [ ], - "variables" : [ "test8208273166" ] + "variables" : [ "test0821614925" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableWithResponseAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableWithResponseAsync.json index bd6da47243c45..b96c966e32fa8 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableWithResponseAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceDeleteTableWithResponseAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "71d1228d-1969-4fb4-b8c4-99d646e29e9c", + "x-ms-client-request-id" : "3563cce2-594c-4b54-8b6f-cd37113418f3", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:08 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:06 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test76417a6582')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test34181d181b')", "Content-Length" : "0", - "x-ms-request-id" : "55377bf8-8002-008a-15ff-7791ed000000", + "x-ms-request-id" : "e019abfc-c002-00a4-1a3d-86c3fa000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "71d1228d-1969-4fb4-b8c4-99d646e29e9c", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test76417a6582')" + "x-ms-client-request-id" : "3563cce2-594c-4b54-8b6f-cd37113418f3", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test34181d181b')" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test76417a6582')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test34181d181b')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "cbad353e-9b15-4f51-bdc5-6609eac7505f" + "x-ms-client-request-id" : "f451e6e5-a385-4bf6-8c69-d14bac41bbfb" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -40,11 +40,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "55377bfc-8002-008a-17ff-7791ed000000", - "Date" : "Fri, 21 Aug 2020 21:09:08 GMT", - "x-ms-client-request-id" : "cbad353e-9b15-4f51-bdc5-6609eac7505f" + "x-ms-request-id" : "e019ac39-c002-00a4-553d-86c3fa000000", + "Date" : "Wed, 09 Sep 2020 00:13:07 GMT", + "x-ms-client-request-id" : "f451e6e5-a385-4bf6-8c69-d14bac41bbfb" }, "Exception" : null } ], - "variables" : [ "test76417a6582" ] + "variables" : [ "test34181d181b" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesAsync.json index 41d3f2dd8563f..44e9757b97b52 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "45f1c2da-f5dc-49c6-bac2-c296f155031c", + "x-ms-client-request-id" : "b1db2e14-f691-423c-9e2c-6606e85f7225", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:31:53 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:41 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test06383c9e71')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test98085d79c1')", "Content-Length" : "0", - "x-ms-request-id" : "6a583a33-c002-0032-5ce3-7cca2b000000", + "x-ms-request-id" : "d807d7a9-7002-00a1-463d-861121000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "45f1c2da-f5dc-49c6-bac2-c296f155031c", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test06383c9e71')" + "x-ms-client-request-id" : "b1db2e14-f691-423c-9e2c-6606e85f7225", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test98085d79c1')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "babc6f73-f740-4f14-8f33-5d85ee1148b9", + "x-ms-client-request-id" : "e158c254-0140-4a2c-a227-daf494ffb07b", "Content-Type" : "application/json" }, "Response" : { @@ -39,14 +39,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:31:53 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:41 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test82653e4fb9')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test2158859a38')", "Content-Length" : "0", - "x-ms-request-id" : "6a583a3d-c002-0032-64e3-7cca2b000000", + "x-ms-request-id" : "d807d7b3-7002-00a1-4b3d-861121000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "babc6f73-f740-4f14-8f33-5d85ee1148b9", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test82653e4fb9')" + "x-ms-client-request-id" : "e158c254-0140-4a2c-a227-daf494ffb07b", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test2158859a38')" }, "Exception" : null }, { @@ -55,7 +55,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "5459e73f-430d-4d3d-9be3-c253d5e5028b" + "x-ms-client-request-id" : "629b7e75-86eb-4012-9bcc-df1211db8474" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,13 +65,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6a583a42-c002-0032-68e3-7cca2b000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename005593d7')\",\"odata.editLink\":\"Tables('tablename005593d7')\",\"TableName\":\"tablename005593d7\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename04439a16')\",\"odata.editLink\":\"Tables('tablename04439a16')\",\"TableName\":\"tablename04439a16\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename05399ab1')\",\"odata.editLink\":\"Tables('tablename05399ab1')\",\"TableName\":\"tablename05399ab1\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename08863144')\",\"odata.editLink\":\"Tables('tablename08863144')\",\"TableName\":\"tablename08863144\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename12011fa2')\",\"odata.editLink\":\"Tables('tablename12011fa2')\",\"TableName\":\"tablename12011fa2\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename1503261f')\",\"odata.editLink\":\"Tables('tablename1503261f')\",\"TableName\":\"tablename1503261f\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename1740503e')\",\"odata.editLink\":\"Tables('tablename1740503e')\",\"TableName\":\"tablename1740503e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename22151d64')\",\"odata.editLink\":\"Tables('tablename22151d64')\",\"TableName\":\"tablename22151d64\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename22570f34')\",\"odata.editLink\":\"Tables('tablename22570f34')\",\"TableName\":\"tablename22570f34\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename22926b61')\",\"odata.editLink\":\"Tables('tablename22926b61')\",\"TableName\":\"tablename22926b61\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename24297981')\",\"odata.editLink\":\"Tables('tablename24297981')\",\"TableName\":\"tablename24297981\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename266742d8')\",\"odata.editLink\":\"Tables('tablename266742d8')\",\"TableName\":\"tablename266742d8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename2735672b')\",\"odata.editLink\":\"Tables('tablename2735672b')\",\"TableName\":\"tablename2735672b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename28265d57')\",\"odata.editLink\":\"Tables('tablename28265d57')\",\"TableName\":\"tablename28265d57\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename29023a45')\",\"odata.editLink\":\"Tables('tablename29023a45')\",\"TableName\":\"tablename29023a45\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename29498f86')\",\"odata.editLink\":\"Tables('tablename29498f86')\",\"TableName\":\"tablename29498f86\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename318470ba')\",\"odata.editLink\":\"Tables('tablename318470ba')\",\"TableName\":\"tablename318470ba\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename380507a9')\",\"odata.editLink\":\"Tables('tablename380507a9')\",\"TableName\":\"tablename380507a9\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename429824e5')\",\"odata.editLink\":\"Tables('tablename429824e5')\",\"TableName\":\"tablename429824e5\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename4765688e')\",\"odata.editLink\":\"Tables('tablename4765688e')\",\"TableName\":\"tablename4765688e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename50892c11')\",\"odata.editLink\":\"Tables('tablename50892c11')\",\"TableName\":\"tablename50892c11\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename52409778')\",\"odata.editLink\":\"Tables('tablename52409778')\",\"TableName\":\"tablename52409778\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename55175482')\",\"odata.editLink\":\"Tables('tablename55175482')\",\"TableName\":\"tablename55175482\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename577453a5')\",\"odata.editLink\":\"Tables('tablename577453a5')\",\"TableName\":\"tablename577453a5\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename5869215e')\",\"odata.editLink\":\"Tables('tablename5869215e')\",\"TableName\":\"tablename5869215e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename59331a54')\",\"odata.editLink\":\"Tables('tablename59331a54')\",\"TableName\":\"tablename59331a54\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename61704c28')\",\"odata.editLink\":\"Tables('tablename61704c28')\",\"TableName\":\"tablename61704c28\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename676177ca')\",\"odata.editLink\":\"Tables('tablename676177ca')\",\"TableName\":\"tablename676177ca\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename752523f0')\",\"odata.editLink\":\"Tables('tablename752523f0')\",\"TableName\":\"tablename752523f0\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename759867f7')\",\"odata.editLink\":\"Tables('tablename759867f7')\",\"TableName\":\"tablename759867f7\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8230294b')\",\"odata.editLink\":\"Tables('tablename8230294b')\",\"TableName\":\"tablename8230294b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8345426e')\",\"odata.editLink\":\"Tables('tablename8345426e')\",\"TableName\":\"tablename8345426e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename84415286')\",\"odata.editLink\":\"Tables('tablename84415286')\",\"TableName\":\"tablename84415286\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8628280c')\",\"odata.editLink\":\"Tables('tablename8628280c')\",\"TableName\":\"tablename8628280c\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename86719a4c')\",\"odata.editLink\":\"Tables('tablename86719a4c')\",\"TableName\":\"tablename86719a4c\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename89280cf9')\",\"odata.editLink\":\"Tables('tablename89280cf9')\",\"TableName\":\"tablename89280cf9\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename911357f6')\",\"odata.editLink\":\"Tables('tablename911357f6')\",\"TableName\":\"tablename911357f6\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename92139cb2')\",\"odata.editLink\":\"Tables('tablename92139cb2')\",\"TableName\":\"tablename92139cb2\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename94779836')\",\"odata.editLink\":\"Tables('tablename94779836')\",\"TableName\":\"tablename94779836\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9640599b')\",\"odata.editLink\":\"Tables('tablename9640599b')\",\"TableName\":\"tablename9640599b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test006395df14')\",\"odata.editLink\":\"Tables('test006395df14')\",\"TableName\":\"test006395df14\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test007347455e')\",\"odata.editLink\":\"Tables('test007347455e')\",\"TableName\":\"test007347455e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test0374771735')\",\"odata.editLink\":\"Tables('test0374771735')\",\"TableName\":\"test0374771735\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test04639b0b55')\",\"odata.editLink\":\"Tables('test04639b0b55')\",\"TableName\":\"test04639b0b55\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test057208851c')\",\"odata.editLink\":\"Tables('test057208851c')\",\"TableName\":\"test057208851c\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test06383c9e71')\",\"odata.editLink\":\"Tables('test06383c9e71')\",\"TableName\":\"test06383c9e71\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test0745122b86')\",\"odata.editLink\":\"Tables('test0745122b86')\",\"TableName\":\"test0745122b86\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test10015a9f16')\",\"odata.editLink\":\"Tables('test10015a9f16')\",\"TableName\":\"test10015a9f16\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test155744f244')\",\"odata.editLink\":\"Tables('test155744f244')\",\"TableName\":\"test155744f244\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test1647277e78')\",\"odata.editLink\":\"Tables('test1647277e78')\",\"TableName\":\"test1647277e78\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test21844768a3')\",\"odata.editLink\":\"Tables('test21844768a3')\",\"TableName\":\"test21844768a3\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test257389fbf8')\",\"odata.editLink\":\"Tables('test257389fbf8')\",\"TableName\":\"test257389fbf8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2599971a94')\",\"odata.editLink\":\"Tables('test2599971a94')\",\"TableName\":\"test2599971a94\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2622631dd8')\",\"odata.editLink\":\"Tables('test2622631dd8')\",\"TableName\":\"test2622631dd8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test26338149bb')\",\"odata.editLink\":\"Tables('test26338149bb')\",\"TableName\":\"test26338149bb\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test281826ce94')\",\"odata.editLink\":\"Tables('test281826ce94')\",\"TableName\":\"test281826ce94\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test28355fbd99')\",\"odata.editLink\":\"Tables('test28355fbd99')\",\"TableName\":\"test28355fbd99\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test33027fb27c')\",\"odata.editLink\":\"Tables('test33027fb27c')\",\"TableName\":\"test33027fb27c\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test3894166e75')\",\"odata.editLink\":\"Tables('test3894166e75')\",\"TableName\":\"test3894166e75\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test3997052fe6')\",\"odata.editLink\":\"Tables('test3997052fe6')\",\"TableName\":\"test3997052fe6\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test4212370301')\",\"odata.editLink\":\"Tables('test4212370301')\",\"TableName\":\"test4212370301\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test4765734d77')\",\"odata.editLink\":\"Tables('test4765734d77')\",\"TableName\":\"test4765734d77\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test47781842bc')\",\"odata.editLink\":\"Tables('test47781842bc')\",\"TableName\":\"test47781842bc\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test51168a9b38')\",\"odata.editLink\":\"Tables('test51168a9b38')\",\"TableName\":\"test51168a9b38\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test520311ed97')\",\"odata.editLink\":\"Tables('test520311ed97')\",\"TableName\":\"test520311ed97\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test520753e49d')\",\"odata.editLink\":\"Tables('test520753e49d')\",\"TableName\":\"test520753e49d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test566703d6dd')\",\"odata.editLink\":\"Tables('test566703d6dd')\",\"TableName\":\"test566703d6dd\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test56846ce380')\",\"odata.editLink\":\"Tables('test56846ce380')\",\"TableName\":\"test56846ce380\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test59416cb4ec')\",\"odata.editLink\":\"Tables('test59416cb4ec')\",\"TableName\":\"test59416cb4ec\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test6722241abb')\",\"odata.editLink\":\"Tables('test6722241abb')\",\"TableName\":\"test6722241abb\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test679311d126')\",\"odata.editLink\":\"Tables('test679311d126')\",\"TableName\":\"test679311d126\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test702437ff4e')\",\"odata.editLink\":\"Tables('test702437ff4e')\",\"TableName\":\"test702437ff4e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test734214d762')\",\"odata.editLink\":\"Tables('test734214d762')\",\"TableName\":\"test734214d762\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test752186f9b8')\",\"odata.editLink\":\"Tables('test752186f9b8')\",\"TableName\":\"test752186f9b8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test78362c260e')\",\"odata.editLink\":\"Tables('test78362c260e')\",\"TableName\":\"test78362c260e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test80861bd1a2')\",\"odata.editLink\":\"Tables('test80861bd1a2')\",\"TableName\":\"test80861bd1a2\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test81380603c8')\",\"odata.editLink\":\"Tables('test81380603c8')\",\"TableName\":\"test81380603c8\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test82653e4fb9')\",\"odata.editLink\":\"Tables('test82653e4fb9')\",\"TableName\":\"test82653e4fb9\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test830095af33')\",\"odata.editLink\":\"Tables('test830095af33')\",\"TableName\":\"test830095af33\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test85149324b9')\",\"odata.editLink\":\"Tables('test85149324b9')\",\"TableName\":\"test85149324b9\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test853437ea44')\",\"odata.editLink\":\"Tables('test853437ea44')\",\"TableName\":\"test853437ea44\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test85922dd8da')\",\"odata.editLink\":\"Tables('test85922dd8da')\",\"TableName\":\"test85922dd8da\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test88876136a4')\",\"odata.editLink\":\"Tables('test88876136a4')\",\"TableName\":\"test88876136a4\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test90030d7fe2')\",\"odata.editLink\":\"Tables('test90030d7fe2')\",\"TableName\":\"test90030d7fe2\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test90613aee41')\",\"odata.editLink\":\"Tables('test90613aee41')\",\"TableName\":\"test90613aee41\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test92691e7cc4')\",\"odata.editLink\":\"Tables('test92691e7cc4')\",\"TableName\":\"test92691e7cc4\"}]}", - "Date" : "Fri, 28 Aug 2020 02:31:53 GMT", - "x-ms-client-request-id" : "5459e73f-430d-4d3d-9be3-c253d5e5028b", + "x-ms-request-id" : "d807d7c5-7002-00a1-5b3d-861121000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename011358ea')\",\"odata.editLink\":\"Tables('tablename011358ea')\",\"TableName\":\"tablename011358ea\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename0854970e')\",\"odata.editLink\":\"Tables('tablename0854970e')\",\"TableName\":\"tablename0854970e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename15814016')\",\"odata.editLink\":\"Tables('tablename15814016')\",\"TableName\":\"tablename15814016\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename1829064d')\",\"odata.editLink\":\"Tables('tablename1829064d')\",\"TableName\":\"tablename1829064d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename2139389a')\",\"odata.editLink\":\"Tables('tablename2139389a')\",\"TableName\":\"tablename2139389a\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename242281e0')\",\"odata.editLink\":\"Tables('tablename242281e0')\",\"TableName\":\"tablename242281e0\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename30503866')\",\"odata.editLink\":\"Tables('tablename30503866')\",\"TableName\":\"tablename30503866\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename375762fb')\",\"odata.editLink\":\"Tables('tablename375762fb')\",\"TableName\":\"tablename375762fb\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename39788bd1')\",\"odata.editLink\":\"Tables('tablename39788bd1')\",\"TableName\":\"tablename39788bd1\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename484312c7')\",\"odata.editLink\":\"Tables('tablename484312c7')\",\"TableName\":\"tablename484312c7\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename5250560d')\",\"odata.editLink\":\"Tables('tablename5250560d')\",\"TableName\":\"tablename5250560d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename54667ed5')\",\"odata.editLink\":\"Tables('tablename54667ed5')\",\"TableName\":\"tablename54667ed5\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename62078e43')\",\"odata.editLink\":\"Tables('tablename62078e43')\",\"TableName\":\"tablename62078e43\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename74433eec')\",\"odata.editLink\":\"Tables('tablename74433eec')\",\"TableName\":\"tablename74433eec\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename7591756d')\",\"odata.editLink\":\"Tables('tablename7591756d')\",\"TableName\":\"tablename7591756d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8528219f')\",\"odata.editLink\":\"Tables('tablename8528219f')\",\"TableName\":\"tablename8528219f\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename958097fe')\",\"odata.editLink\":\"Tables('tablename958097fe')\",\"TableName\":\"tablename958097fe\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9823321b')\",\"odata.editLink\":\"Tables('tablename9823321b')\",\"TableName\":\"tablename9823321b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test1563600bc0')\",\"odata.editLink\":\"Tables('test1563600bc0')\",\"TableName\":\"test1563600bc0\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2158859a38')\",\"odata.editLink\":\"Tables('test2158859a38')\",\"TableName\":\"test2158859a38\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2962772a7f')\",\"odata.editLink\":\"Tables('test2962772a7f')\",\"TableName\":\"test2962772a7f\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test3051152d60')\",\"odata.editLink\":\"Tables('test3051152d60')\",\"TableName\":\"test3051152d60\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test44136180d1')\",\"odata.editLink\":\"Tables('test44136180d1')\",\"TableName\":\"test44136180d1\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test5305356519')\",\"odata.editLink\":\"Tables('test5305356519')\",\"TableName\":\"test5305356519\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test636568eb1e')\",\"odata.editLink\":\"Tables('test636568eb1e')\",\"TableName\":\"test636568eb1e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test66288e3362')\",\"odata.editLink\":\"Tables('test66288e3362')\",\"TableName\":\"test66288e3362\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test67193dff08')\",\"odata.editLink\":\"Tables('test67193dff08')\",\"TableName\":\"test67193dff08\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test98085d79c1')\",\"odata.editLink\":\"Tables('test98085d79c1')\",\"TableName\":\"test98085d79c1\"}]}", + "Date" : "Wed, 09 Sep 2020 00:12:41 GMT", + "x-ms-client-request-id" : "629b7e75-86eb-4012-9bcc-df1211db8474", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test06383c9e71", "test82653e4fb9" ] + "variables" : [ "test98085d79c1", "test2158859a38" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json index 653cac014908d..e6e4d7b792d50 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithFilterAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "22243d2c-0c42-487e-84a9-483849e3fd28", + "x-ms-client-request-id" : "0caa094d-aa81-4f6a-bbf3-a67eb0463740", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:31:50 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:34 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test90030d7fe2')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test44136180d1')", "Content-Length" : "0", - "x-ms-request-id" : "5e05a870-5002-00b6-2de3-7cb82a000000", + "x-ms-request-id" : "faeb6ada-4002-0061-713d-86e91f000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "22243d2c-0c42-487e-84a9-483849e3fd28", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test90030d7fe2')" + "x-ms-client-request-id" : "0caa094d-aa81-4f6a-bbf3-a67eb0463740", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test44136180d1')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "c0083317-0462-4d71-b5b4-c7e91544c5a1", + "x-ms-client-request-id" : "f51ed7fd-192c-4e0c-8f4b-a88b3e0d6471", "Content-Type" : "application/json" }, "Response" : { @@ -39,23 +39,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 28 Aug 2020 02:31:50 GMT", + "Date" : "Wed, 09 Sep 2020 00:12:34 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test81380603c8')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test2962772a7f')", "Content-Length" : "0", - "x-ms-request-id" : "5e05a87c-5002-00b6-37e3-7cb82a000000", + "x-ms-request-id" : "8f764de9-e002-00d1-613d-86a8d6000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "c0083317-0462-4d71-b5b4-c7e91544c5a1", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test81380603c8')" + "x-ms-client-request-id" : "f51ed7fd-192c-4e0c-8f4b-a88b3e0d6471", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test2962772a7f')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$filter=TableName%20eq%20%27test90030d7fe2%27", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$filter=TableName%20eq%20%27test44136180d1%27", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "38544705-b1d0-4467-8864-8aff39b2064e" + "x-ms-client-request-id" : "2c135aa1-7cca-44a8-b6d4-6c0f68269e68" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,13 +65,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5e05a881-5002-00b6-3be3-7cb82a000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test90030d7fe2')\",\"odata.editLink\":\"Tables('test90030d7fe2')\",\"TableName\":\"test90030d7fe2\"}]}", - "Date" : "Fri, 28 Aug 2020 02:31:50 GMT", - "x-ms-client-request-id" : "38544705-b1d0-4467-8864-8aff39b2064e", + "x-ms-request-id" : "faeb6b13-4002-0061-273d-86e91f000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test44136180d1')\",\"odata.editLink\":\"Tables('test44136180d1')\",\"TableName\":\"test44136180d1\"}]}", + "Date" : "Wed, 09 Sep 2020 00:12:35 GMT", + "x-ms-client-request-id" : "2c135aa1-7cca-44a8-b6d4-6c0f68269e68", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test90030d7fe2", "test81380603c8" ] + "variables" : [ "test44136180d1", "test2962772a7f" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithTopAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithTopAsync.json index 1f33790e9fcd7..eb0dfd94bf7ea 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithTopAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/serviceListTablesWithTopAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "8c2ddc34-77e4-4207-af59-90703668bf9b", + "x-ms-client-request-id" : "3b79acaf-66ac-4550-947e-fa3a4e83da8e", "Content-Type" : "application/json" }, "Response" : { @@ -14,14 +14,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test2869773f50')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test962936613a')", "Content-Length" : "0", - "x-ms-request-id" : "3685c5fd-7002-0018-619f-7d153b000000", + "x-ms-request-id" : "41f66658-2002-0048-023d-86d76b000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "8c2ddc34-77e4-4207-af59-90703668bf9b", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test2869773f50')" + "x-ms-client-request-id" : "3b79acaf-66ac-4550-947e-fa3a4e83da8e", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test962936613a')" }, "Exception" : null }, { @@ -30,7 +30,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "6703030a-6486-42fe-bf7f-3d3f21e6c113", + "x-ms-client-request-id" : "0730abfc-869b-4d04-8418-de2cd43f6d8b", "Content-Type" : "application/json" }, "Response" : { @@ -39,14 +39,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test61000c4016')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test1711305199')", "Content-Length" : "0", - "x-ms-request-id" : "57e6a677-c002-009b-069f-7d0b59000000", + "x-ms-request-id" : "41f6666a-2002-0048-0d3d-86d76b000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "6703030a-6486-42fe-bf7f-3d3f21e6c113", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test61000c4016')" + "x-ms-client-request-id" : "0730abfc-869b-4d04-8418-de2cd43f6d8b", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test1711305199')" }, "Exception" : null }, { @@ -55,7 +55,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "d2e9b05e-0fe9-4d73-921e-73539291091c", + "x-ms-client-request-id" : "98970af6-a92d-4eb4-805d-4a5633d57fc4", "Content-Type" : "application/json" }, "Response" : { @@ -64,14 +64,14 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test50046e8327')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test454714f862')", "Content-Length" : "0", - "x-ms-request-id" : "a2d08562-3002-00a0-0e9f-7d4efd000000", + "x-ms-request-id" : "41f66670-2002-0048-123e-86d76b000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "d2e9b05e-0fe9-4d73-921e-73539291091c", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test50046e8327')" + "x-ms-client-request-id" : "98970af6-a92d-4eb4-805d-4a5633d57fc4", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test454714f862')" }, "Exception" : null }, { @@ -80,7 +80,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "f6c5a706-dc25-4ddf-8da3-df43ba1cac4a" + "x-ms-client-request-id" : "c6f883d0-ade7-4e92-bbd7-5a0c09f5c9e8" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -89,22 +89,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lMjAwNTA1ZjUBMDFkNjdkOTExNGYzNjhhNQ--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lMTU4MTQwMTYBMDFkNjg1NzMyOTg3ODdkMQ--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "3685c609-7002-0018-6a9f-7d153b000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename18710f82')\",\"odata.editLink\":\"Tables('tablename18710f82')\",\"TableName\":\"tablename18710f82\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename20049a1f')\",\"odata.editLink\":\"Tables('tablename20049a1f')\",\"TableName\":\"tablename20049a1f\"}]}", - "x-ms-client-request-id" : "f6c5a706-dc25-4ddf-8da3-df43ba1cac4a", + "x-ms-request-id" : "41f66679-2002-0048-183e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename011358ea')\",\"odata.editLink\":\"Tables('tablename011358ea')\",\"TableName\":\"tablename011358ea\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename0854970e')\",\"odata.editLink\":\"Tables('tablename0854970e')\",\"TableName\":\"tablename0854970e\"}]}", + "x-ms-client-request-id" : "c6f883d0-ade7-4e92-bbd7-5a0c09f5c9e8", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lMjAwNTA1ZjUBMDFkNjdkOTExNGYzNjhhNQ--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lMTU4MTQwMTYBMDFkNjg1NzMyOTg3ODdkMQ--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "ae5f3487-09a0-4d74-a042-2ee3e40fdf31" + "x-ms-client-request-id" : "dfb85be9-fe83-452f-b4c7-27beab4ae874" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -113,22 +113,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNDI5MTNlMTIBMDFkNjdkOTEwMzYxNGMwZg--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lMjEzOTM4OWEBMDFkNjg1NzMzNTYyMzgzZQ--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "57e6a686-c002-009b-0f9f-7d0b59000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename200505f5')\",\"odata.editLink\":\"Tables('tablename200505f5')\",\"TableName\":\"tablename200505f5\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename376233ff')\",\"odata.editLink\":\"Tables('tablename376233ff')\",\"TableName\":\"tablename376233ff\"}]}", - "x-ms-client-request-id" : "ae5f3487-09a0-4d74-a042-2ee3e40fdf31", + "x-ms-request-id" : "41f66680-2002-0048-1d3e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename15814016')\",\"odata.editLink\":\"Tables('tablename15814016')\",\"TableName\":\"tablename15814016\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename1829064d')\",\"odata.editLink\":\"Tables('tablename1829064d')\",\"TableName\":\"tablename1829064d\"}]}", + "x-ms-client-request-id" : "dfb85be9-fe83-452f-b4c7-27beab4ae874", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNDI5MTNlMTIBMDFkNjdkOTEwMzYxNGMwZg--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lMjEzOTM4OWEBMDFkNjg1NzMzNTYyMzgzZQ--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "9d378ac2-cfbd-4f95-92df-847788bbb7aa" + "x-ms-client-request-id" : "ada33852-01b1-40c2-922b-24020f6978ec" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -137,22 +137,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNDM3MzFkNjUBMDFkNjdkOTBmZTY1ZmJmZA--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lMzA1MDM4NjYBMDFkNjg1NzMyMDQxZGQ2NQ--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "a2d0856b-3002-00a0-159f-7d4efd000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename42913e12')\",\"odata.editLink\":\"Tables('tablename42913e12')\",\"TableName\":\"tablename42913e12\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename43390846')\",\"odata.editLink\":\"Tables('tablename43390846')\",\"TableName\":\"tablename43390846\"}]}", - "x-ms-client-request-id" : "9d378ac2-cfbd-4f95-92df-847788bbb7aa", + "x-ms-request-id" : "41f66682-2002-0048-1f3e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename2139389a')\",\"odata.editLink\":\"Tables('tablename2139389a')\",\"TableName\":\"tablename2139389a\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename242281e0')\",\"odata.editLink\":\"Tables('tablename242281e0')\",\"TableName\":\"tablename242281e0\"}]}", + "x-ms-client-request-id" : "ada33852-01b1-40c2-922b-24020f6978ec", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNDM3MzFkNjUBMDFkNjdkOTBmZTY1ZmJmZA--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lMzA1MDM4NjYBMDFkNjg1NzMyMDQxZGQ2NQ--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "d66f4cf2-d16a-4098-b0b4-71cf777da718" + "x-ms-client-request-id" : "a04b8cb1-5aa7-4053-a1e4-b14ce01f454f" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -161,22 +161,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNjY0NjhkN2IBMDFkNjdkOTEwYjQyMTk2NQ--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lMzk3ODhiZDEBMDFkNjg1NzMyZjZjNTJmMw--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "3685c613-7002-0018-749f-7d153b000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename43731d65')\",\"odata.editLink\":\"Tables('tablename43731d65')\",\"TableName\":\"tablename43731d65\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename4907877c')\",\"odata.editLink\":\"Tables('tablename4907877c')\",\"TableName\":\"tablename4907877c\"}]}", - "x-ms-client-request-id" : "d66f4cf2-d16a-4098-b0b4-71cf777da718", + "x-ms-request-id" : "41f66685-2002-0048-223e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename30503866')\",\"odata.editLink\":\"Tables('tablename30503866')\",\"TableName\":\"tablename30503866\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename375762fb')\",\"odata.editLink\":\"Tables('tablename375762fb')\",\"TableName\":\"tablename375762fb\"}]}", + "x-ms-client-request-id" : "a04b8cb1-5aa7-4053-a1e4-b14ce01f454f", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNjY0NjhkN2IBMDFkNjdkOTEwYjQyMTk2NQ--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lMzk3ODhiZDEBMDFkNjg1NzMyZjZjNTJmMw--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "8abd5c72-f88d-4bb3-9bd6-9fc83aa96f91" + "x-ms-client-request-id" : "e373e5b9-deb2-4d42-b9fc-8617dfaac803" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -185,22 +185,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lODI5MjcwYWYBMDFkNjdkOTEwOTlkNmM1MQ--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNTI1MDU2MGQBMDFkNjg1NzMyOTk0ZjdjMg--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "57e6a688-c002-009b-119f-7d0b59000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename66468d7b')\",\"odata.editLink\":\"Tables('tablename66468d7b')\",\"TableName\":\"tablename66468d7b\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename71199fe7')\",\"odata.editLink\":\"Tables('tablename71199fe7')\",\"TableName\":\"tablename71199fe7\"}]}", - "x-ms-client-request-id" : "8abd5c72-f88d-4bb3-9bd6-9fc83aa96f91", + "x-ms-request-id" : "41f66688-2002-0048-253e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename39788bd1')\",\"odata.editLink\":\"Tables('tablename39788bd1')\",\"TableName\":\"tablename39788bd1\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename484312c7')\",\"odata.editLink\":\"Tables('tablename484312c7')\",\"TableName\":\"tablename484312c7\"}]}", + "x-ms-client-request-id" : "e373e5b9-deb2-4d42-b9fc-8617dfaac803", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lODI5MjcwYWYBMDFkNjdkOTEwOTlkNmM1MQ--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNTI1MDU2MGQBMDFkNjg1NzMyOTk0ZjdjMg--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "70b80a1b-4276-4775-b0e7-de71855a535a" + "x-ms-client-request-id" : "73703681-204b-4f56-88f8-a8f1b6f5c853" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -209,22 +209,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lODU3Nzc3MGYBMDFkNjdkOTExMzU3OTZjYQ--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNjIwNzhlNDMBMDFkNjg1NzMyNjhmMWE0ZA--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "a2d0857e-3002-00a0-279f-7d4efd000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename829270af')\",\"odata.editLink\":\"Tables('tablename829270af')\",\"TableName\":\"tablename829270af\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename83209b67')\",\"odata.editLink\":\"Tables('tablename83209b67')\",\"TableName\":\"tablename83209b67\"}]}", - "x-ms-client-request-id" : "70b80a1b-4276-4775-b0e7-de71855a535a", + "x-ms-request-id" : "41f66689-2002-0048-263e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename5250560d')\",\"odata.editLink\":\"Tables('tablename5250560d')\",\"TableName\":\"tablename5250560d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename54667ed5')\",\"odata.editLink\":\"Tables('tablename54667ed5')\",\"TableName\":\"tablename54667ed5\"}]}", + "x-ms-client-request-id" : "73703681-204b-4f56-88f8-a8f1b6f5c853", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lODU3Nzc3MGYBMDFkNjdkOTExMzU3OTZjYQ--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNjIwNzhlNDMBMDFkNjg1NzMyNjhmMWE0ZA--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "e79577eb-ae05-45f2-a765-3c298951bae2" + "x-ms-client-request-id" : "9cf20f69-4613-473d-a1be-2c3a91542d34" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -233,22 +233,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lOTMwNTU5OWQBMDFkNjdkOTEwY2M0NmQyNA--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lNzU5MTc1NmQBMDFkNjg1NzMyMWQ4YTVlNA--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "3685c618-7002-0018-799f-7d153b000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8577770f')\",\"odata.editLink\":\"Tables('tablename8577770f')\",\"TableName\":\"tablename8577770f\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9126961e')\",\"odata.editLink\":\"Tables('tablename9126961e')\",\"TableName\":\"tablename9126961e\"}]}", - "x-ms-client-request-id" : "e79577eb-ae05-45f2-a765-3c298951bae2", + "x-ms-request-id" : "41f6668b-2002-0048-283e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename62078e43')\",\"odata.editLink\":\"Tables('tablename62078e43')\",\"TableName\":\"tablename62078e43\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename74433eec')\",\"odata.editLink\":\"Tables('tablename74433eec')\",\"TableName\":\"tablename74433eec\"}]}", + "x-ms-client-request-id" : "9cf20f69-4613-473d-a1be-2c3a91542d34", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lOTMwNTU5OWQBMDFkNjdkOTEwY2M0NmQyNA--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lNzU5MTc1NmQBMDFkNjg1NzMyMWQ4YTVlNA--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "391ec67b-1951-4df7-8e00-f493e9be18ab" + "x-ms-client-request-id" : "80059676-c4ad-4a7d-a667-e3ed49b9a452" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -257,22 +257,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!44!dGVzdDA3Mzg3MGQyMjIBMDFkNjdkOTExZDJmZDNmZg--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!48!dGFibGVuYW1lOTU4MDk3ZmUBMDFkNjg1NzMzODU0ZmZhYg--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "57e6a691-c002-009b-189f-7d0b59000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9305599d')\",\"odata.editLink\":\"Tables('tablename9305599d')\",\"TableName\":\"tablename9305599d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9526959a')\",\"odata.editLink\":\"Tables('tablename9526959a')\",\"TableName\":\"tablename9526959a\"}]}", - "x-ms-client-request-id" : "391ec67b-1951-4df7-8e00-f493e9be18ab", + "x-ms-request-id" : "41f6668c-2002-0048-293e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename7591756d')\",\"odata.editLink\":\"Tables('tablename7591756d')\",\"TableName\":\"tablename7591756d\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename8528219f')\",\"odata.editLink\":\"Tables('tablename8528219f')\",\"TableName\":\"tablename8528219f\"}]}", + "x-ms-client-request-id" : "80059676-c4ad-4a7d-a667-e3ed49b9a452", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDA3Mzg3MGQyMjIBMDFkNjdkOTExZDJmZDNmZg--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2148%21dGFibGVuYW1lOTU4MDk3ZmUBMDFkNjg1NzMzODU0ZmZhYg--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "03163fad-bfcf-462e-8332-641bf0cb7568" + "x-ms-client-request-id" : "e6be9b2a-d98c-41a7-902f-a29a212038ec" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -281,22 +281,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:39 GMT", - "x-ms-continuation-NextTableName" : "1!44!dGVzdDI4Njk3NzNmNTABMDFkNjdkOWZjZjcxYzQxZQ--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDE1NjM2MDBiYzABMDFkNjg1NzMzZTVmYTkzOQ--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "a2d08595-3002-00a0-3e9f-7d4efd000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test073870d222')\",\"odata.editLink\":\"Tables('test073870d222')\",\"TableName\":\"test073870d222\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test221679dc96')\",\"odata.editLink\":\"Tables('test221679dc96')\",\"TableName\":\"test221679dc96\"}]}", - "x-ms-client-request-id" : "03163fad-bfcf-462e-8332-641bf0cb7568", + "x-ms-request-id" : "41f6668e-2002-0048-2b3e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename958097fe')\",\"odata.editLink\":\"Tables('tablename958097fe')\",\"TableName\":\"tablename958097fe\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('tablename9823321b')\",\"odata.editLink\":\"Tables('tablename9823321b')\",\"TableName\":\"tablename9823321b\"}]}", + "x-ms-client-request-id" : "e6be9b2a-d98c-41a7-902f-a29a212038ec", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDI4Njk3NzNmNTABMDFkNjdkOWZjZjcxYzQxZQ--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDE1NjM2MDBiYzABMDFkNjg1NzMzZTVmYTkzOQ--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "1103dc99-34d1-41a6-ba9d-9cb9d0156da4" + "x-ms-client-request-id" : "23f2b033-45d8-498f-bedb-a344c5f0d591" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -305,22 +305,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!44!dGVzdDYxMDAwYzQwMTYBMDFkNjdkOWZjZjcxZWIzYQ--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDIxMDI1YmY1ZWIBMDFkNjg2M2RmOTliYzE5Nw--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "3685c622-7002-0018-019f-7d153b000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2869773f50')\",\"odata.editLink\":\"Tables('test2869773f50')\",\"TableName\":\"test2869773f50\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test50046e8327')\",\"odata.editLink\":\"Tables('test50046e8327')\",\"TableName\":\"test50046e8327\"}]}", - "x-ms-client-request-id" : "1103dc99-34d1-41a6-ba9d-9cb9d0156da4", + "x-ms-request-id" : "41f66692-2002-0048-2f3e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test1563600bc0')\",\"odata.editLink\":\"Tables('test1563600bc0')\",\"TableName\":\"test1563600bc0\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test1711305199')\",\"odata.editLink\":\"Tables('test1711305199')\",\"TableName\":\"test1711305199\"}]}", + "x-ms-client-request-id" : "23f2b033-45d8-498f-bedb-a344c5f0d591", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDYxMDAwYzQwMTYBMDFkNjdkOWZjZjcxZWIzYQ--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDIxMDI1YmY1ZWIBMDFkNjg2M2RmOTliYzE5Nw--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "2a654345-510b-4ba1-b20d-eb37fcb73572" + "x-ms-client-request-id" : "4438586c-62c8-4a1f-9417-e76d492c8af8" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -329,22 +329,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!44!dGVzdDczNzQyNjNkNTYBMDFkNjdkOTExYmE4OWY0Yw--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDI5NjI3NzJhN2YBMDFkNjg2M2RlYjcwMjU2Zg--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "57e6a697-c002-009b-1e9f-7d0b59000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test61000c4016')\",\"odata.editLink\":\"Tables('test61000c4016')\",\"TableName\":\"test61000c4016\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test7364588c80')\",\"odata.editLink\":\"Tables('test7364588c80')\",\"TableName\":\"test7364588c80\"}]}", - "x-ms-client-request-id" : "2a654345-510b-4ba1-b20d-eb37fcb73572", + "x-ms-request-id" : "41f66693-2002-0048-303e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2158859a38')\",\"odata.editLink\":\"Tables('test2158859a38')\",\"TableName\":\"test2158859a38\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test295844bbd6')\",\"odata.editLink\":\"Tables('test295844bbd6')\",\"TableName\":\"test295844bbd6\"}]}", + "x-ms-client-request-id" : "4438586c-62c8-4a1f-9417-e76d492c8af8", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDczNzQyNjNkNTYBMDFkNjdkOTExYmE4OWY0Yw--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDI5NjI3NzJhN2YBMDFkNjg2M2RlYjcwMjU2Zg--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "871f7872-6136-407a-afbb-976d39fb28ff" + "x-ms-client-request-id" : "91ce8d49-4286-4929-9b3b-82fae752768c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -353,22 +353,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:39 GMT", - "x-ms-continuation-NextTableName" : "1!44!dGVzdDgwODU0NzdiMzMBMDFkNjdkOTExNjhlYzUzYg--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDMyMjA3MmViZmIBMDFkNjg2M2RmNDEzY2Q1YQ--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "a2d085aa-3002-00a0-539f-7d4efd000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test7374263d56')\",\"odata.editLink\":\"Tables('test7374263d56')\",\"TableName\":\"test7374263d56\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test792520b9e3')\",\"odata.editLink\":\"Tables('test792520b9e3')\",\"TableName\":\"test792520b9e3\"}]}", - "x-ms-client-request-id" : "871f7872-6136-407a-afbb-976d39fb28ff", + "x-ms-request-id" : "41f66694-2002-0048-313e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test2962772a7f')\",\"odata.editLink\":\"Tables('test2962772a7f')\",\"TableName\":\"test2962772a7f\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test3051152d60')\",\"odata.editLink\":\"Tables('test3051152d60')\",\"TableName\":\"test3051152d60\"}]}", + "x-ms-client-request-id" : "91ce8d49-4286-4929-9b3b-82fae752768c", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDgwODU0NzdiMzMBMDFkNjdkOTExNjhlYzUzYg--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDMyMjA3MmViZmIBMDFkNjg2M2RmNDEzY2Q1YQ--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "041c7387-65fd-4f35-af4a-59268246cb78" + "x-ms-client-request-id" : "766b5c13-65d7-450e-a7db-87b95929a013" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -377,22 +377,118 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-continuation-NextTableName" : "1!44!dGVzdDk4OTk4NjY3ZTIBMDFkNjdkOWZjYzQyNWYxMg--", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDQ0MTM2MTgwZDEBMDFkNjg2M2RlYjQwY2Y3Yw--", "Cache-Control" : "no-cache", - "x-ms-request-id" : "3685c62d-7002-0018-0a9f-7d153b000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test8085477b33')\",\"odata.editLink\":\"Tables('test8085477b33')\",\"TableName\":\"test8085477b33\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test97656af5d7')\",\"odata.editLink\":\"Tables('test97656af5d7')\",\"TableName\":\"test97656af5d7\"}]}", - "x-ms-client-request-id" : "041c7387-65fd-4f35-af4a-59268246cb78", + "x-ms-request-id" : "41f66695-2002-0048-323e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test322072ebfb')\",\"odata.editLink\":\"Tables('test322072ebfb')\",\"TableName\":\"test322072ebfb\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test4221425ba9')\",\"odata.editLink\":\"Tables('test4221425ba9')\",\"TableName\":\"test4221425ba9\"}]}", + "x-ms-client-request-id" : "766b5c13-65d7-450e-a7db-87b95929a013", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDk4OTk4NjY3ZTIBMDFkNjdkOWZjYzQyNWYxMg--", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDQ0MTM2MTgwZDEBMDFkNjg2M2RlYjQwY2Y3Yw--", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "f0bebb6f-af3d-463c-b101-1648527f7cb3" + "x-ms-client-request-id" : "5b2c40a9-2688-4a11-85af-49d0d3ffda1f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDQ3Nzg2ZmI0NDgBMDFkNjg2M2RmYmZjNjc2Ng--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "41f66697-2002-0048-343e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test44136180d1')\",\"odata.editLink\":\"Tables('test44136180d1')\",\"TableName\":\"test44136180d1\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test454714f862')\",\"odata.editLink\":\"Tables('test454714f862')\",\"TableName\":\"test454714f862\"}]}", + "x-ms-client-request-id" : "5b2c40a9-2688-4a11-85af-49d0d3ffda1f", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDQ3Nzg2ZmI0NDgBMDFkNjg2M2RmYmZjNjc2Ng--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "96ec4523-32ef-4ace-ad3a-0153ad1b3ad1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 09 Sep 2020 00:13:09 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDYzNjU2OGViMWUBMDFkNjg2M2RlY2ZiN2EyNQ--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "41f66698-2002-0048-353e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test47786fb448')\",\"odata.editLink\":\"Tables('test47786fb448')\",\"TableName\":\"test47786fb448\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test5305356519')\",\"odata.editLink\":\"Tables('test5305356519')\",\"TableName\":\"test5305356519\"}]}", + "x-ms-client-request-id" : "96ec4523-32ef-4ace-ad3a-0153ad1b3ad1", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDYzNjU2OGViMWUBMDFkNjg2M2RlY2ZiN2EyNQ--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "b9b4751e-6017-423a-8cca-d03d4c9ad2e2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 09 Sep 2020 00:13:10 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDY3MTkzZGZmMDgBMDFkNjg2M2RlOTZhY2Y2Mg--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "41f6669d-2002-0048-383e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test636568eb1e')\",\"odata.editLink\":\"Tables('test636568eb1e')\",\"TableName\":\"test636568eb1e\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test66288e3362')\",\"odata.editLink\":\"Tables('test66288e3362')\",\"TableName\":\"test66288e3362\"}]}", + "x-ms-client-request-id" : "b9b4751e-6017-423a-8cca-d03d4c9ad2e2", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDY3MTkzZGZmMDgBMDFkNjg2M2RlOTZhY2Y2Mg--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "8258062a-0a1d-41b3-aa65-f33aa71e1aa9" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 09 Sep 2020 00:13:10 GMT", + "x-ms-continuation-NextTableName" : "1!44!dGVzdDk2MjkzNjYxM2EBMDFkNjg2M2RmZmY0MjQxNg--", + "Cache-Control" : "no-cache", + "x-ms-request-id" : "41f666a0-2002-0048-3b3e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test67193dff08')\",\"odata.editLink\":\"Tables('test67193dff08')\",\"TableName\":\"test67193dff08\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test92276e4eb3')\",\"odata.editLink\":\"Tables('test92276e4eb3')\",\"TableName\":\"test92276e4eb3\"}]}", + "x-ms-client-request-id" : "8258062a-0a1d-41b3-aa65-f33aa71e1aa9", + "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dfullmetadata&$top=2&NextTableName=1%2144%21dGVzdDk2MjkzNjYxM2EBMDFkNjg2M2RmZmY0MjQxNg--", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", + "x-ms-client-request-id" : "3fae69b5-2213-4e42-8b50-7fbb2d74d523" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -402,13 +498,13 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "57e6a69c-c002-009b-229f-7d0b59000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test98998667e2')\",\"odata.editLink\":\"Tables('test98998667e2')\",\"TableName\":\"test98998667e2\"}]}", - "Date" : "Sat, 29 Aug 2020 01:00:38 GMT", - "x-ms-client-request-id" : "f0bebb6f-af3d-463c-b101-1648527f7cb3", + "x-ms-request-id" : "41f666a2-2002-0048-3d3e-86d76b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test962936613a')\",\"odata.editLink\":\"Tables('test962936613a')\",\"TableName\":\"test962936613a\"},{\"odata.type\":\"brsiegelsample.Tables\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/Tables('test98085d79c1')\",\"odata.editLink\":\"Tables('test98085d79c1')\",\"TableName\":\"test98085d79c1\"}]}", + "Date" : "Wed, 09 Sep 2020 00:13:10 GMT", + "x-ms-client-request-id" : "3fae69b5-2213-4e42-8b50-7fbb2d74d523", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "test61000c4016", "test2869773f50", "test50046e8327" ] + "variables" : [ "test962936613a", "test1711305199", "test454714f862" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityImpl.json index d5255a4414f77..98225836098a8 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "36deacdd-1c8e-4f79-b647-da6bdce9e441", + "x-ms-client-request-id" : "d30887ab-a341-4761-ab51-0fe95ba1ce35", "Content-Type" : "application/json" }, "Response" : { @@ -13,22 +13,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:46 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:04 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test98361150f0')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test0529781892')", "Content-Length" : "0", - "x-ms-request-id" : "ef5db567-4002-0061-12ff-77e91f000000", + "x-ms-request-id" : "ccdf7134-8002-007e-0e3e-865a1b000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "36deacdd-1c8e-4f79-b647-da6bdce9e441", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test98361150f0')" + "x-ms-client-request-id" : "d30887ab-a341-4761-ab51-0fe95ba1ce35", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test0529781892')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/test98361150f0?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test0529781892?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "618aa9cd-d410-4568-880e-2e43aa2c0b0a", + "x-ms-client-request-id" : "7d0db479-1740-4d3b-ba48-004f4d893593", "Content-Type" : "application/json" }, "Response" : { @@ -37,37 +37,37 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:46 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:05 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/\"datetime'2020-08-21T21%3A09%3A47.3394925Z'\"", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test98361150f0(PartitionKey='partitionkey907410',RowKey='rowkey978995da4')", + "ETag" : "W/\"datetime'2020-09-09T00%3A14%3A05.9361121Z'\"", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/test0529781892(PartitionKey='partitionkey522703',RowKey='rowkey61478eefb')", "Content-Length" : "0", - "x-ms-request-id" : "ef5db56e-4002-0061-16ff-77e91f000000", + "x-ms-request-id" : "ccdf7141-8002-007e-193e-865a1b000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "618aa9cd-d410-4568-880e-2e43aa2c0b0a", - "Location" : "https://brsiegelsample.table.core.windows.net/test98361150f0(PartitionKey='partitionkey907410',RowKey='rowkey978995da4')" + "x-ms-client-request-id" : "7d0db479-1740-4d3b-ba48-004f4d893593", + "Location" : "https://brsiegelsample.table.core.windows.net/test0529781892(PartitionKey='partitionkey522703',RowKey='rowkey61478eefb')" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.table.core.windows.net/test98361150f0(PartitionKey='partitionkey907410',RowKey='rowkey978995da4')?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test0529781892(PartitionKey='partitionkey522703',RowKey='rowkey61478eefb')?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "567341bc-b4f0-40f5-a553-8540726532e2", + "x-ms-client-request-id" : "3629f8fb-774f-4a79-adbf-c4b3e0af305a", "Content-Type" : "application/json" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", - "ETag" : "W/\"datetime'2020-08-21T21%3A09%3A47.3876724Z'\"", + "ETag" : "W/\"datetime'2020-09-09T00%3A14%3A05.9830743Z'\"", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "ef5db570-4002-0061-18ff-77e91f000000", - "Date" : "Fri, 21 Aug 2020 21:09:46 GMT", - "x-ms-client-request-id" : "567341bc-b4f0-40f5-a553-8540726532e2" + "x-ms-request-id" : "ccdf7144-8002-007e-1c3e-865a1b000000", + "Date" : "Wed, 09 Sep 2020 00:14:05 GMT", + "x-ms-client-request-id" : "3629f8fb-774f-4a79-adbf-c4b3e0af305a" }, "Exception" : null }, { @@ -75,7 +75,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "280a3ebd-8745-42ea-a133-b2378d7a9764" + "x-ms-client-request-id" : "46371d8d-8561-4af0-aba5-4ddde7d6c647" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -85,19 +85,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ef5db575-4002-0061-1cff-77e91f000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test98361150f0\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:46 GMT", - "x-ms-client-request-id" : "280a3ebd-8745-42ea-a133-b2378d7a9764", + "x-ms-request-id" : "ccdf7145-8002-007e-1d3e-865a1b000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test0529781892\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:05 GMT", + "x-ms-client-request-id" : "46371d8d-8561-4af0-aba5-4ddde7d6c647", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test98361150f0')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test0529781892')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "ef633548-15c5-4178-9d2c-b98877069627" + "x-ms-client-request-id" : "72530f91-f65f-4720-8ee8-e01523060cee" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -107,11 +107,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "d2ae7830-9002-004d-3cff-7705b0000000", - "Date" : "Fri, 21 Aug 2020 21:09:47 GMT", - "x-ms-client-request-id" : "ef633548-15c5-4178-9d2c-b98877069627" + "x-ms-request-id" : "ccdf7148-8002-007e-203e-865a1b000000", + "Date" : "Wed, 09 Sep 2020 00:14:05 GMT", + "x-ms-client-request-id" : "72530f91-f65f-4720-8ee8-e01523060cee" }, "Exception" : null } ], - "variables" : [ "test98361150f0", "36deacdd-1c8e-4f79-b647-da6bdce9e441", "partitionkey907410", "rowkey978995da4", "567341bc-b4f0-40f5-a553-8540726532e2", "618aa9cd-d410-4568-880e-2e43aa2c0b0a", "fa120d28f2b24cfd", "280a3ebd-8745-42ea-a133-b2378d7a9764", "ef633548-15c5-4178-9d2c-b98877069627" ] + "variables" : [ "test0529781892", "d30887ab-a341-4761-ab51-0fe95ba1ce35", "partitionkey522703", "rowkey61478eefb", "3629f8fb-774f-4a79-adbf-c4b3e0af305a", "7d0db479-1740-4d3b-ba48-004f4d893593", "744d909f448246a4", "46371d8d-8561-4af0-aba5-4ddde7d6c647", "72530f91-f65f-4720-8ee8-e01523060cee" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityWithResponseMergeAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityWithResponseMergeAsync.json index b530ef9319f09..7f4a5d9d46529 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityWithResponseMergeAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityWithResponseMergeAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "7dfadb18-9983-44e8-8f54-764cf20dc815", + "x-ms-client-request-id" : "5a5bb2a6-45b1-48a3-8a13-ef9314bba26e", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:10 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:59 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename96712732')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename512296f6')", "Content-Length" : "0", - "x-ms-request-id" : "bc5ba40e-c002-00d6-31ff-77c4b5000000", + "x-ms-request-id" : "ced79b07-5002-0099-5a3e-86b5e1000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "7dfadb18-9983-44e8-8f54-764cf20dc815", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename96712732')" + "x-ms-client-request-id" : "5a5bb2a6-45b1-48a3-8a13-ef9314bba26e", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename512296f6')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename96712732", + "Uri" : "https://REDACTED.table.core.windows.net/tablename512296f6", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "af7a41e0-ca0c-4ed6-b97f-2178d54da87e", + "x-ms-client-request-id" : "03867068-483c-4e0f-ba88-9cfa681a33f1", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:10:10 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:59 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A11.5813849Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')", + "ETag" : "W/datetime'2020-09-09T00%3A15%3A00.1838982Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')", "Content-Length" : "0", - "x-ms-request-id" : "bc5ba42d-c002-00d6-4eff-77c4b5000000", + "x-ms-request-id" : "ced79b23-5002-0099-6f3e-86b5e1000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "af7a41e0-ca0c-4ed6-b97f-2178d54da87e", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')" + "x-ms-client-request-id" : "03867068-483c-4e0f-ba88-9cfa681a33f1", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "bfbcaac8-fbff-4777-8fec-5ec3d7613808" + "x-ms-client-request-id" : "bd676ced-376c-4697-acce-91f42e0454e6" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,45 +65,45 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:10:10 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:59 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A11.5813849Z'", - "x-ms-request-id" : "bc5ba43a-c002-00d6-5bff-77c4b5000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename96712732/@Element\",\"odata.type\":\"brsiegelsample.tablename96712732\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A10%3A11.5813849Z'\\\"\",\"odata.editLink\":\"tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')\",\"PartitionKey\":\"apartitionkey354542\",\"RowKey\":\"arowkey41117bd03\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:10:11.5813849Z\",\"propertyA\":\"valueA\"}", - "x-ms-client-request-id" : "bfbcaac8-fbff-4777-8fec-5ec3d7613808", + "ETag" : "W/datetime'2020-09-09T00%3A15%3A00.1838982Z'", + "x-ms-request-id" : "ced79b28-5002-0099-733e-86b5e1000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename512296f6/@Element\",\"odata.type\":\"brsiegelsample.tablename512296f6\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A15%3A00.1838982Z'\\\"\",\"odata.editLink\":\"tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')\",\"PartitionKey\":\"apartitionkey25030c\",\"RowKey\":\"arowkey6587337be\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:15:00.1838982Z\",\"propertyA\":\"valueA\"}", + "x-ms-client-request-id" : "bd676ced-376c-4697-acce-91f42e0454e6", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.table.core.windows.net/tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')", + "Uri" : "https://REDACTED.table.core.windows.net/tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "fd4a1866-02b3-429b-a688-16b82b69f79d", + "x-ms-client-request-id" : "1a93ebaf-27bf-43da-9549-fa2d6f3c61c8", "Content-Type" : "application/json" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A11.6673955Z'", + "ETag" : "W/datetime'2020-09-09T00%3A15%3A00.2687749Z'", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "bc5ba441-c002-00d6-62ff-77c4b5000000", - "Date" : "Fri, 21 Aug 2020 21:10:10 GMT", - "x-ms-client-request-id" : "fd4a1866-02b3-429b-a688-16b82b69f79d" + "x-ms-request-id" : "ced79b2c-5002-0099-773e-86b5e1000000", + "Date" : "Wed, 09 Sep 2020 00:14:59 GMT", + "x-ms-client-request-id" : "1a93ebaf-27bf-43da-9549-fa2d6f3c61c8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "4f78fa72-d4a2-49be-9b4d-836cb2946fcf" + "x-ms-client-request-id" : "a33ecf2c-8999-47cf-8329-0c67f94756b4" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -112,15 +112,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:10:10 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:59 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A10%3A11.6673955Z'", - "x-ms-request-id" : "bc5ba446-c002-00d6-67ff-77c4b5000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename96712732/@Element\",\"odata.type\":\"brsiegelsample.tablename96712732\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A10%3A11.6673955Z'\\\"\",\"odata.editLink\":\"tablename96712732(PartitionKey='apartitionkey354542',RowKey='arowkey41117bd03')\",\"PartitionKey\":\"apartitionkey354542\",\"RowKey\":\"arowkey41117bd03\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:10:11.6673955Z\",\"propertyA\":\"valueA\",\"propertyB\":\"valueB\"}", - "x-ms-client-request-id" : "4f78fa72-d4a2-49be-9b4d-836cb2946fcf", + "ETag" : "W/datetime'2020-09-09T00%3A15%3A00.2687749Z'", + "x-ms-request-id" : "ced79b35-5002-0099-803e-86b5e1000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename512296f6/@Element\",\"odata.type\":\"brsiegelsample.tablename512296f6\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A15%3A00.2687749Z'\\\"\",\"odata.editLink\":\"tablename512296f6(PartitionKey='apartitionkey25030c',RowKey='arowkey6587337be')\",\"PartitionKey\":\"apartitionkey25030c\",\"RowKey\":\"arowkey6587337be\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:15:00.2687749Z\",\"propertyA\":\"valueA\",\"propertyB\":\"valueB\"}", + "x-ms-client-request-id" : "a33ecf2c-8999-47cf-8329-0c67f94756b4", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "tablename96712732", "apartitionkey354542", "arowkey41117bd03" ] + "variables" : [ "tablename512296f6", "apartitionkey25030c", "arowkey6587337be" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityWithResponseReplaceAsync.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityWithResponseReplaceAsync.json index b1f1848150158..106c1880b9058 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityWithResponseReplaceAsync.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/updateEntityWithResponseReplaceAsync.json @@ -5,7 +5,7 @@ "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "6aab574d-9a54-4bf4-aa64-b09ebfef7076", + "x-ms-client-request-id" : "696b76e2-d305-4317-9b2b-a3f26ba9d41f", "Content-Type" : "application/json" }, "Response" : { @@ -14,23 +14,23 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:56 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:29 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename5177939b')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('tablename842332c0')", "Content-Length" : "0", - "x-ms-request-id" : "8a39c6d1-1002-0088-15ff-772f55000000", + "x-ms-request-id" : "ff57724b-d002-0063-2d3e-8657a7000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "6aab574d-9a54-4bf4-aa64-b09ebfef7076", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename5177939b')" + "x-ms-client-request-id" : "696b76e2-d305-4317-9b2b-a3f26ba9d41f", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('tablename842332c0')" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.table.core.windows.net/tablename5177939b", + "Uri" : "https://REDACTED.table.core.windows.net/tablename842332c0", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "9130fe50-7fd3-4074-b92b-22f4743b0ffb", + "x-ms-client-request-id" : "c9a10d32-5fce-4c1f-bfc2-e464e6f0c043", "Content-Type" : "application/json" }, "Response" : { @@ -39,24 +39,24 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:56 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:30 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A09%3A56.5119955Z'", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A30.3712376Z'", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')", "Content-Length" : "0", - "x-ms-request-id" : "8a39c6f5-1002-0088-35ff-772f55000000", + "x-ms-request-id" : "ff577252-d002-0063-303e-8657a7000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "9130fe50-7fd3-4074-b92b-22f4743b0ffb", - "Location" : "https://brsiegelsample.table.core.windows.net/tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')" + "x-ms-client-request-id" : "c9a10d32-5fce-4c1f-bfc2-e464e6f0c043", + "Location" : "https://brsiegelsample.table.core.windows.net/tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "cc0f1646-9572-4f9c-9021-334cdc2d8797" + "x-ms-client-request-id" : "41db159f-29a9-44d2-a137-f79314a05303" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -65,45 +65,45 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:09:56 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:30 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A09%3A56.5119955Z'", - "x-ms-request-id" : "8a39c702-1002-0088-42ff-772f55000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename5177939b/@Element\",\"odata.type\":\"brsiegelsample.tablename5177939b\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A09%3A56.5119955Z'\\\"\",\"odata.editLink\":\"tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')\",\"PartitionKey\":\"apartitionkey513197\",\"RowKey\":\"arowkey62695019c\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:09:56.5119955Z\",\"propertyA\":\"valueA\"}", - "x-ms-client-request-id" : "cc0f1646-9572-4f9c-9021-334cdc2d8797", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A30.3712376Z'", + "x-ms-request-id" : "ff577259-d002-0063-353e-8657a7000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename842332c0/@Element\",\"odata.type\":\"brsiegelsample.tablename842332c0\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A30.3712376Z'\\\"\",\"odata.editLink\":\"tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')\",\"PartitionKey\":\"apartitionkey85403c\",\"RowKey\":\"arowkey917105d8e\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:30.3712376Z\",\"propertyA\":\"valueA\"}", + "x-ms-client-request-id" : "41db159f-29a9-44d2-a137-f79314a05303", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.table.core.windows.net/tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')", + "Uri" : "https://REDACTED.table.core.windows.net/tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "11dc86ec-4334-4247-9884-c9432f1cf1d9", + "x-ms-client-request-id" : "b9e2eb89-b080-4f0c-92e6-31ca47957832", "Content-Type" : "application/json" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A09%3A56.6073985Z'", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A30.4905434Z'", "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "8a39c713-1002-0088-52ff-772f55000000", - "Date" : "Fri, 21 Aug 2020 21:09:56 GMT", - "x-ms-client-request-id" : "11dc86ec-4334-4247-9884-c9432f1cf1d9" + "x-ms-request-id" : "ff57725d-d002-0063-393e-8657a7000000", + "Date" : "Wed, 09 Sep 2020 00:14:30 GMT", + "x-ms-client-request-id" : "b9e2eb89-b080-4f0c-92e6-31ca47957832" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.table.core.windows.net/tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')?$format=application/json%3Bodata%3Dfullmetadata", + "Uri" : "https://REDACTED.table.core.windows.net/tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')?$format=application/json%3Bodata%3Dfullmetadata", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Mac OS X; 10.15.6)", - "x-ms-client-request-id" : "8248d9a1-b8bc-4171-82e3-e53e3505b51e" + "x-ms-client-request-id" : "5945b6bf-6d9a-46b6-9816-9d743ab43f3b" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -112,15 +112,15 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 21 Aug 2020 21:09:56 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:30 GMT", "Cache-Control" : "no-cache", - "ETag" : "W/datetime'2020-08-21T21%3A09%3A56.6073985Z'", - "x-ms-request-id" : "8a39c72d-1002-0088-6cff-772f55000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename5177939b/@Element\",\"odata.type\":\"brsiegelsample.tablename5177939b\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T21%3A09%3A56.6073985Z'\\\"\",\"odata.editLink\":\"tablename5177939b(PartitionKey='apartitionkey513197',RowKey='arowkey62695019c')\",\"PartitionKey\":\"apartitionkey513197\",\"RowKey\":\"arowkey62695019c\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-08-21T21:09:56.6073985Z\",\"propertyB\":\"valueB\"}", - "x-ms-client-request-id" : "8248d9a1-b8bc-4171-82e3-e53e3505b51e", + "ETag" : "W/datetime'2020-09-09T00%3A14%3A30.4905434Z'", + "x-ms-request-id" : "ff577261-d002-0063-3b3e-8657a7000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#tablename842332c0/@Element\",\"odata.type\":\"brsiegelsample.tablename842332c0\",\"odata.id\":\"https://brsiegelsample.table.core.windows.net/tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')\",\"odata.etag\":\"W/\\\"datetime'2020-09-09T00%3A14%3A30.4905434Z'\\\"\",\"odata.editLink\":\"tablename842332c0(PartitionKey='apartitionkey85403c',RowKey='arowkey917105d8e')\",\"PartitionKey\":\"apartitionkey85403c\",\"RowKey\":\"arowkey917105d8e\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2020-09-09T00:14:30.4905434Z\",\"propertyB\":\"valueB\"}", + "x-ms-client-request-id" : "5945b6bf-6d9a-46b6-9816-9d743ab43f3b", "Content-Type" : "application/json;odata=fullmetadata;streaming=true;charset=utf-8" }, "Exception" : null } ], - "variables" : [ "tablename5177939b", "apartitionkey513197", "arowkey62695019c" ] + "variables" : [ "tablename842332c0", "apartitionkey85403c", "arowkey917105d8e" ] } \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/src/test/resources/session-records/updateNonExistentEntityImpl.json b/sdk/tables/azure-data-tables/src/test/resources/session-records/updateNonExistentEntityImpl.json index 144c1cdb3bfd3..8d3509e226649 100644 --- a/sdk/tables/azure-data-tables/src/test/resources/session-records/updateNonExistentEntityImpl.json +++ b/sdk/tables/azure-data-tables/src/test/resources/session-records/updateNonExistentEntityImpl.json @@ -4,7 +4,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "d8ac5a3f-5395-4a39-a187-246a53dd2c0c", + "x-ms-client-request-id" : "ca44ed97-c738-44a6-9830-4e2bdc36af80", "Content-Type" : "application/json" }, "Response" : { @@ -13,22 +13,22 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "204", - "Date" : "Fri, 21 Aug 2020 21:09:50 GMT", + "Date" : "Wed, 09 Sep 2020 00:14:15 GMT", "Cache-Control" : "no-cache", - "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test37481c47c5')", + "DataServiceId" : "https://brsiegelsample.table.core.windows.net/Tables('test34564b2afe')", "Content-Length" : "0", - "x-ms-request-id" : "4ce33bd0-3002-00ed-58ff-778111000000", + "x-ms-request-id" : "434801f2-2002-0093-283e-861156000000", "Preference-Applied" : "return-no-content", - "x-ms-client-request-id" : "d8ac5a3f-5395-4a39-a187-246a53dd2c0c", - "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test37481c47c5')" + "x-ms-client-request-id" : "ca44ed97-c738-44a6-9830-4e2bdc36af80", + "Location" : "https://brsiegelsample.table.core.windows.net/Tables('test34564b2afe')" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.table.core.windows.net/test37481c47c5(PartitionKey='partitionkey419809',RowKey='rowkey62809130b')?timeout=5000", + "Uri" : "https://REDACTED.table.core.windows.net/test34564b2afe(PartitionKey='partitionkey03822d',RowKey='rowkey74747a60b')?timeout=100000", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "355a8fb0-230e-4d6b-812d-a2282035dd63", + "x-ms-client-request-id" : "d39525ce-9311-4918-b90c-0cfaa9923489", "Content-Type" : "application/json" }, "Response" : { @@ -39,10 +39,10 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "4ce33be1-3002-00ed-64ff-778111000000", - "Body" : "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:4ce33be1-3002-00ed-64ff-778111000000\\nTime:2020-08-21T21:09:51.1524701Z\"}}}", - "Date" : "Fri, 21 Aug 2020 21:09:51 GMT", - "x-ms-client-request-id" : "355a8fb0-230e-4d6b-812d-a2282035dd63", + "x-ms-request-id" : "434801fe-2002-0093-2e3e-861156000000", + "Body" : "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:434801fe-2002-0093-2e3e-861156000000\\nTime:2020-09-09T00:14:15.6538843Z\"}}}", + "Date" : "Wed, 09 Sep 2020 00:14:15 GMT", + "x-ms-client-request-id" : "d39525ce-9311-4918-b90c-0cfaa9923489", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null @@ -51,7 +51,7 @@ "Uri" : "https://REDACTED.table.core.windows.net/Tables?$format=application/json%3Bodata%3Dminimalmetadata", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "1aa7aace-7ee7-4e08-9f2b-f0c03d4aff7c" + "x-ms-client-request-id" : "e97da34e-11fd-4e97-80bc-327ea974e754" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -61,19 +61,19 @@ "X-Content-Type-Options" : "nosniff", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "4ce33be6-3002-00ed-69ff-778111000000", - "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test37481c47c5\"}]}", - "Date" : "Fri, 21 Aug 2020 21:09:51 GMT", - "x-ms-client-request-id" : "1aa7aace-7ee7-4e08-9f2b-f0c03d4aff7c", + "x-ms-request-id" : "43480206-2002-0093-343e-861156000000", + "Body" : "{\"odata.metadata\":\"https://brsiegelsample.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"test34564b2afe\"}]}", + "Date" : "Wed, 09 Sep 2020 00:14:15 GMT", + "x-ms-client-request-id" : "e97da34e-11fd-4e97-80bc-327ea974e754", "Content-Type" : "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.table.core.windows.net/Tables('test37481c47c5')", + "Uri" : "https://REDACTED.table.core.windows.net/Tables('test34564b2afe')", "Headers" : { "x-ms-version" : "2019-02-02", - "x-ms-client-request-id" : "79689594-0144-4034-bdf4-5163c9d0c63d" + "x-ms-client-request-id" : "9661c8ca-02d7-4ad0-9995-13853dccd13e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -83,11 +83,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "db613a7f-a002-009d-65ff-7738e6000000", - "Date" : "Fri, 21 Aug 2020 21:09:50 GMT", - "x-ms-client-request-id" : "79689594-0144-4034-bdf4-5163c9d0c63d" + "x-ms-request-id" : "4348020c-2002-0093-373e-861156000000", + "Date" : "Wed, 09 Sep 2020 00:14:15 GMT", + "x-ms-client-request-id" : "9661c8ca-02d7-4ad0-9995-13853dccd13e" }, "Exception" : null } ], - "variables" : [ "test37481c47c5", "d8ac5a3f-5395-4a39-a187-246a53dd2c0c", "partitionkey419809", "rowkey62809130b", "355a8fb0-230e-4d6b-812d-a2282035dd63", "1aa7aace-7ee7-4e08-9f2b-f0c03d4aff7c", "79689594-0144-4034-bdf4-5163c9d0c63d" ] + "variables" : [ "test34564b2afe", "ca44ed97-c738-44a6-9830-4e2bdc36af80", "partitionkey03822d", "rowkey74747a60b", "d39525ce-9311-4918-b90c-0cfaa9923489", "e97da34e-11fd-4e97-80bc-327ea974e754", "9661c8ca-02d7-4ad0-9995-13853dccd13e" ] } \ No newline at end of file diff --git a/sdk/tables/test-resources.json b/sdk/tables/test-resources.json index 3bf759d1ef6b4..892cacaa36e29 100644 --- a/sdk/tables/test-resources.json +++ b/sdk/tables/test-resources.json @@ -97,7 +97,7 @@ "outputs": { "AZURE_TABLES_CONNECTION_STRING": { "type": "string", - "value": "[if(equals(parameters('endpointType'), 'storage'), concat('DefaultEndpointsProtocol=https;AccountName=', variables('primaryAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName')), variables('mgmtApiVersion')).keys[0].value, ';EndpointSuffix=core.windows.net/;'), concat('DefaultEndpointsProtocol=https;AccountName=', variables('primaryAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.DocumentDB/databaseAccounts', variables('primaryAccountName')), variables('mgmtApiVersion')).primaryMasterKey, ';EndpointSuffix=cosmos.azure.com:443/;'))]", + "value": "[if(equals(parameters('endpointType'), 'storage'), concat('DefaultEndpointsProtocol=https;AccountName=', variables('primaryAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName')), variables('mgmtApiVersion')).keys[0].value, ';EndpointSuffix=core.windows.net/;'), concat('DefaultEndpointsProtocol=https;AccountName=', variables('primaryAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.DocumentDB/databaseAccounts', variables('primaryAccountName')), '2020-04-01').primaryMasterKey, ';EndpointSuffix=cosmos.azure.com:443/;'))]", } } } From 45599a3d9fb942710fef805f3d5f211c2d574d6d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 8 Sep 2020 18:14:01 -0700 Subject: [PATCH 143/168] Increment version for core releases (#14923) * Increment package version after release of com.azure azure-core * Increment package version after release of com.azure azure-core-experimental * Increment package version after release of com.azure azure-core-serializer-avro-apache * Increment package version after release of com.azure azure-core-test * Increment package version after release of com.azure azure-core-http-okhttp * Increment package version after release of com.azure azure-core-http-netty * Increment package version after release of com.azure azure-core-serializer-json-gson * Increment package version after release of com.azure azure-core-serializer-json-jackson * Remove unreleased Core tags (except AMQP as that is still in use Co-authored-by: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> --- common/perf-test-core/pom.xml | 2 +- eng/jacoco-test-coverage/pom.xml | 14 ++++++------- eng/versioning/version_client.txt | 20 ++++++++----------- .../azure-ai-anomalydetector/pom.xml | 6 +++--- .../azure-data-appconfiguration/pom.xml | 8 ++++---- .../pom.xml | 4 ++-- 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/pom.xml | 4 ++-- .../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 ++-- .../azure-core-tracing-opentelemetry/pom.xml | 4 ++-- sdk/core/azure-core/CHANGELOG.md | 3 +++ sdk/core/azure-core/pom.xml | 2 +- sdk/cosmos/azure-cosmos/pom.xml | 2 +- .../azure-digitaltwins-core/pom.xml | 8 ++++---- sdk/e2e/pom.xml | 6 +++--- .../azure-messaging-eventgrid/pom.xml | 8 ++++---- .../azure-messaging-eventhubs/pom.xml | 4 ++-- .../azure-ai-formrecognizer/pom.xml | 8 ++++---- sdk/identity/azure-identity/pom.xml | 4 ++-- .../pom.xml | 8 ++++---- .../pom.xml | 8 ++++---- .../azure-security-keyvault-keys/pom.xml | 8 ++++---- .../azure-security-keyvault-secrets/pom.xml | 8 ++++---- .../microsoft-azure-loganalytics/pom.xml | 2 +- .../azure-resourcemanager-appplatform/pom.xml | 2 +- .../azure-resourcemanager-appservice/pom.xml | 2 +- .../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 | 2 +- .../azure-resourcemanager-servicebus/pom.xml | 2 +- .../azure-resourcemanager-sql/pom.xml | 2 +- .../azure-resourcemanager-storage/pom.xml | 2 +- .../azure-resourcemanager-test/pom.xml | 4 ++-- .../pom.xml | 2 +- .../azure-resourcemanager/pom.xml | 2 +- .../azure-data-schemaregistry/pom.xml | 4 ++-- sdk/search/azure-search-documents/pom.xml | 8 ++++---- .../azure-messaging-servicebus/pom.xml | 8 ++++---- 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 | 2 +- sdk/storage/azure-storage-blob/pom.xml | 6 +++--- sdk/storage/azure-storage-common/pom.xml | 6 +++--- .../azure-storage-file-datalake/pom.xml | 4 ++-- sdk/storage/azure-storage-file-share/pom.xml | 4 ++-- sdk/storage/azure-storage-queue/pom.xml | 6 +++--- sdk/tables/azure-data-tables/pom.xml | 4 ++-- sdk/template/azure-sdk-template/pom.xml | 2 +- .../azure-ai-textanalytics/pom.xml | 8 ++++---- 77 files changed, 183 insertions(+), 163 deletions(-) diff --git a/common/perf-test-core/pom.xml b/common/perf-test-core/pom.xml index 6187de26c007b..7e5c215b2ce76 100644 --- a/common/perf-test-core/pom.xml +++ b/common/perf-test-core/pom.xml @@ -78,7 +78,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 44c5f8d020771..66688d6581fcc 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -54,7 +54,7 @@ com.azure azure-core - 1.8.1 + 1.9.0-beta.1 com.azure @@ -64,7 +64,7 @@ com.azure azure-core-experimental - 1.0.0-beta.4 + 1.0.0-beta.5 com.azure @@ -74,12 +74,12 @@ com.azure azure-core-http-netty - 1.6.1 + 1.7.0-beta.1 com.azure azure-core-http-okhttp - 1.3.1 + 1.4.0-beta.1 com.azure @@ -89,17 +89,17 @@ com.azure azure-core-serializer-avro-apache - 1.0.0-beta.3 + 1.0.0-beta.4 com.azure azure-core-serializer-json-gson - 1.0.1 + 1.1.0-beta.1 com.azure azure-core-serializer-json-jackson - 1.0.1 + 1.1.0-beta.1 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index fc0ff09a11df7..f4c0adfc6755b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -7,18 +7,18 @@ com.azure:azure-client-sdk-parent;1.7.0;1.7.0 com.azure:azure-ai-anomalydetector;3.0.0-beta.1;3.0.0-beta.2 com.azure:azure-ai-formrecognizer;3.0.0;3.1.0-beta.1 com.azure:azure-ai-textanalytics;5.0.0;5.1.0-beta.1 -com.azure:azure-core;1.8.0;1.8.1 +com.azure:azure-core;1.8.1;1.9.0-beta.1 com.azure:azure-core-amqp;1.4.0;1.5.0-beta.1 -com.azure:azure-core-experimental;1.0.0-beta.3;1.0.0-beta.4 +com.azure:azure-core-experimental;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-core-http-netty;1.6.0;1.6.1 -com.azure:azure-core-http-okhttp;1.3.0;1.3.1 +com.azure:azure-core-http-netty;1.6.1;1.7.0-beta.1 +com.azure:azure-core-http-okhttp;1.3.1;1.4.0-beta.1 com.azure:azure-core-management;1.0.0-beta.3;1.0.0-beta.4 -com.azure:azure-core-serializer-avro-apache;1.0.0-beta.2;1.0.0-beta.3 +com.azure:azure-core-serializer-avro-apache;1.0.0-beta.3;1.0.0-beta.4 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.0.0;1.0.1 -com.azure:azure-core-serializer-json-jackson;1.0.0;1.0.1 -com.azure:azure-core-test;1.4.1;1.4.2 +com.azure:azure-core-serializer-json-gson;1.0.1;1.1.0-beta.1 +com.azure:azure-core-serializer-json-jackson;1.0.1;1.1.0-beta.1 +com.azure:azure-core-test;1.4.2;1.5.0-beta.1 com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.6;1.0.0-beta.7 com.azure:azure-cosmos;4.3.1;4.4.0-beta.2 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 @@ -130,10 +130,6 @@ com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;1.2.8-beta.1;1.2. # Format; # unreleased_:;dependency-version # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. -unreleased_com.azure:azure-core;1.8.1 -unreleased_com.azure:azure-core-test;1.4.2 -unreleased_com.azure:azure-core-http-netty;1.6.1 -unreleased_com.azure:azure-core-http-okhttp;1.3.1 unreleased_com.azure:azure-identity;1.2.0-beta.1 unreleased_com.azure:azure-core-amqp;1.5.0-beta.1 unreleased_com.azure:azure-messaging-servicebus;7.0.0-beta.5 diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml index 193fc1af0d86a..51557abfbad32 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 @@ -68,7 +68,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 07cd818567d71..bcab807e0b65d 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.8.1 + 1.8.1 com.azure azure-core-http-netty - 1.6.1 + 1.6.1 com.azure azure-core-test - 1.4.2 + 1.4.2 test com.azure azure-core-http-okhttp - 1.3.1 + 1.3.1 test diff --git a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml index 1a94983e3a53e..f18cba2234744 100644 --- a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml +++ b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml @@ -57,7 +57,7 @@ com.azure azure-core - 1.8.0 + 1.8.1 com.azure @@ -77,7 +77,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 org.hibernate.validator diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml index a1242f343b3ce..5110e8b7dc950 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.8.1 + 1.9.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 c8af5f19c35e1..492fdfb9f8831 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.5 (Unreleased) + + ## 1.0.0-beta.4 (2020-09-08) - Updated `azure-core` version to pickup bug fix. diff --git a/sdk/core/azure-core-experimental/pom.xml b/sdk/core/azure-core-experimental/pom.xml index ed558ca89153d..1caabe0b005cc 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.4 + 1.0.0-beta.5 Microsoft Azure Java Core Experimental Library This package contains experimental core types for Azure Java clients. @@ -58,7 +58,7 @@ com.azure azure-core - 1.8.1 + 1.9.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 6fa4942e25cbc..e5590b70f9a03 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.8.1 + 1.9.0-beta.1 com.azure azure-core - 1.8.1 + 1.9.0-beta.1 test-jar test com.azure azure-core-test - 1.4.2 + 1.5.0-beta.1 test com.azure azure-core-test - 1.4.2 + 1.5.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 1127274094d64..ca78a865d4896 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.7.0-beta.1 (Unreleased) + + ## 1.6.1 (2020-09-08) - Updated `azure-core` version to pickup bug fix. diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml index 253c1e26702e9..1198a61507293 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.6.1 + 1.7.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.8.1 + 1.9.0-beta.1 @@ -117,20 +117,20 @@ com.azure azure-core - 1.8.1 + 1.9.0-beta.1 test-jar test com.azure azure-core-test - 1.4.2 + 1.5.0-beta.1 test com.azure azure-core-test - 1.4.2 + 1.5.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 676fdef52b9d6..57fa5830fcd01 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.4.0-beta.1 (Unreleased) + + ## 1.3.1 (2020-09-08) - Updated `azure-core` version to pickup bug fix. diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml index 293880cec1f08..2d1deb20b2962 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.3.1 + 1.4.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.8.1 + 1.9.0-beta.1 @@ -73,20 +73,20 @@ com.azure azure-core - 1.8.1 + 1.9.0-beta.1 test-jar test com.azure azure-core-test - 1.4.2 + 1.5.0-beta.1 test com.azure azure-core-test - 1.4.2 + 1.5.0-beta.1 test-jar test diff --git a/sdk/core/azure-core-management/pom.xml b/sdk/core/azure-core-management/pom.xml index 52183dcd1d084..79f77538c1f33 100644 --- a/sdk/core/azure-core-management/pom.xml +++ b/sdk/core/azure-core-management/pom.xml @@ -59,7 +59,7 @@ com.azure azure-core - 1.8.1 + 1.9.0-beta.1 @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.6.1 + 1.7.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 eb987af9253f8..fe0e7be80e5d2 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.4 (Unreleased) + + ## 1.0.0-beta.3 (2020-09-08) - Updated `azure-core` version to pickup bug fix. diff --git a/sdk/core/azure-core-serializer-avro-apache/pom.xml b/sdk/core/azure-core-serializer-avro-apache/pom.xml index abeaa2e8d3cfe..656b9a8ed33fc 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.3 + 1.0.0-beta.4 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.8.1 + 1.9.0-beta.1 com.azure azure-core-experimental - 1.0.0-beta.4 + 1.0.0-beta.5 diff --git a/sdk/core/azure-core-serializer-avro-jackson/pom.xml b/sdk/core/azure-core-serializer-avro-jackson/pom.xml index b4e88639c63fd..d7f055f297075 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.8.1 + 1.9.0-beta.1 com.azure azure-core-experimental - 1.0.0-beta.4 + 1.0.0-beta.5 diff --git a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md index a3f84d7f82993..b1625ecf3d898 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.1.0-beta.1 (Unreleased) + + ## 1.0.1 (2020-09-08) - Updated `azure-core` version to pickup bug fix. diff --git a/sdk/core/azure-core-serializer-json-gson/pom.xml b/sdk/core/azure-core-serializer-json-gson/pom.xml index a240aaf76a450..f6d14c0eb15d9 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.0.1 + 1.1.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.8.1 + 1.9.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 b64a622f830fe..5120c78b53350 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.1.0-beta.1 (Unreleased) + + ## 1.0.1 (2020-09-08) - Updated `azure-core` version to pickup bug fix. diff --git a/sdk/core/azure-core-serializer-json-jackson/pom.xml b/sdk/core/azure-core-serializer-json-jackson/pom.xml index 682f54eb98743..0a9eaf4476096 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.0.1 + 1.1.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.8.1 + 1.9.0-beta.1 diff --git a/sdk/core/azure-core-test/CHANGELOG.md b/sdk/core/azure-core-test/CHANGELOG.md index a1d8f4e282c5f..84068238dc27e 100644 --- a/sdk/core/azure-core-test/CHANGELOG.md +++ b/sdk/core/azure-core-test/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.5.0-beta.1 (Unreleased) + + ## 1.4.2 (2020-09-08) - Updated `azure-core` version to pickup bug fix. diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index 3623bea1e0f2c..0285e31bf6943 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.4.2 + 1.5.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.8.1 + 1.9.0-beta.1 diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml index 7667fd235d101..bcd00b18502ea 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml +++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml @@ -40,7 +40,7 @@ com.azure azure-core - 1.8.1 + 1.9.0-beta.1 io.grpc @@ -58,7 +58,7 @@ com.azure azure-core-http-netty - 1.6.1 + 1.7.0-beta.1 test diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 9ad6981e2902a..f0cd51d87d79f 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.9.0-beta.1 (Unreleased) + + ## 1.8.1 (2020-09-08) - Fixed bug where some `HttpRequests` would have their body consumed before being sent resulting in an exception being thrown. diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index a36ff7caf45b1..79fe83364e68b 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.8.1 + 1.9.0-beta.1 Microsoft Azure Java Core Library This package contains core types for Azure Java clients. diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index d72b79f091f97..57793f614ef5d 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -120,7 +120,7 @@ Licensed under the MIT License. com.azure azure-core - 1.8.0 + 1.8.1 com.fasterxml.jackson.module diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml index 2d704698820c3..f9ec9469dac0f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml +++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml @@ -25,12 +25,12 @@ com.azure azure-core - 1.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 com.fasterxml.jackson.core @@ -42,7 +42,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test @@ -54,7 +54,7 @@ com.azure azure-core-http-okhttp - 1.3.0 + 1.3.1 test diff --git a/sdk/e2e/pom.xml b/sdk/e2e/pom.xml index b23297b2865b4..5c373c3b882a1 100644 --- a/sdk/e2e/pom.xml +++ b/sdk/e2e/pom.xml @@ -23,12 +23,12 @@ com.azure azure-core - 1.8.1 + 1.9.0-beta.1 com.azure azure-core-http-netty - 1.6.1 + 1.7.0-beta.1 com.azure @@ -64,7 +64,7 @@ com.azure azure-core-test - 1.4.2 + 1.5.0-beta.1 test diff --git a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml index 3ee9bf0478b8f..71a7946a4ebec 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml @@ -62,17 +62,17 @@ com.azure azure-core - 1.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 com.azure azure-core-serializer-json-jackson - 1.0.0 + 1.0.1 @@ -103,7 +103,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml index a84ca5e9e0761..aaa25f14b6294 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.8.0 + 1.8.1 com.azure @@ -55,7 +55,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index c471ff52fdc70..08f0474d1844e 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.8.1 + 1.8.1 com.azure azure-core-http-netty - 1.6.1 + 1.6.1 com.azure azure-core-test - 1.4.2 + 1.4.2 test com.azure azure-core-http-okhttp - 1.3.1 + 1.3.1 test diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index 04e5a0aff616b..3a34fafff96d9 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -27,7 +27,7 @@ com.azure azure-core - 1.8.1 + 1.8.1 com.microsoft.azure @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.6.1 + 1.6.1 test diff --git a/sdk/keyvault/azure-security-keyvault-administration/pom.xml b/sdk/keyvault/azure-security-keyvault-administration/pom.xml index 08da987d5cab5..00e18a5d111d0 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 @@ -77,13 +77,13 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test com.azure azure-core-http-okhttp - 1.3.0 + 1.3.1 test diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml index 7f720a3cf10a1..282010eb0352f 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 @@ -84,14 +84,14 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test com.azure azure-core-http-okhttp - 1.3.0 + 1.3.1 test diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml index 9a983a60e9bc9..dceeb2f08191a 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 @@ -93,13 +93,13 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test com.azure azure-core-http-okhttp - 1.3.0 + 1.3.1 test diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml index d5b4fb33f7c19..cdf1abb3a9c98 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 com.azure azure-core-http-okhttp - 1.3.0 + 1.3.1 test @@ -98,7 +98,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/loganalytics/microsoft-azure-loganalytics/pom.xml b/sdk/loganalytics/microsoft-azure-loganalytics/pom.xml index 299f8d7e15afd..f764f77884b41 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.4.1 + 1.4.2 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml index f30e5b5bb736c..64f11a93d3a25 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml @@ -80,7 +80,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml index 6a6a128bdbde9..f6e30d7df6fb9 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml index fc1562ef119cb..19505c1d1d441 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml index e9954dbf5cd58..4ee14db2a59f3 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml index c8e468249e8c2..ba1f0a00e78d2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml @@ -90,7 +90,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml index e58ba86179027..b5dbf3114a992 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml index 51b0b958e498d..28f4ebc66fa55 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml index dd8e0c2166efc..817225dae0ad6 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml index 630391c538b9a..461e597e9c116 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml index 9e01925a89172..51543a4cde14f 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml index 47ce306dda608..bd8f5714212b3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml @@ -84,7 +84,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml index db91d88f64279..54c403d2af78c 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml index b85cf2ea7a7ac..0930198b335d7 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml index f0cad3cbdf6b1..ca50ca4bd2a5a 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml index 2b3b776795d16..f751c77d91a66 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml index c749bfa02f829..936fb199e91c1 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml index 12754bead5843..23bdfac4ac127 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml @@ -92,7 +92,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml b/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml index 36f469d691215..8b2eb3103f905 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml index d5e7b81d71889..2750264e515e5 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.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml index 4b474852eb1e7..3773a436f3567 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml @@ -76,7 +76,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml index 12b2eee0b9f1b..72034b403c192 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml @@ -52,7 +52,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 com.azure @@ -67,7 +67,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml index 2cf316ed1308a..73c8ae0f284a1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml @@ -76,7 +76,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index b07ee6c6db657..dae929684ce5c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -182,7 +182,7 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/schemaregistry/azure-data-schemaregistry/pom.xml b/sdk/schemaregistry/azure-data-schemaregistry/pom.xml index f7a32bf0fc06c..86b1a44f1b308 100644 --- a/sdk/schemaregistry/azure-data-schemaregistry/pom.xml +++ b/sdk/schemaregistry/azure-data-schemaregistry/pom.xml @@ -47,12 +47,12 @@ com.azure azure-core - 1.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 diff --git a/sdk/search/azure-search-documents/pom.xml b/sdk/search/azure-search-documents/pom.xml index ba212bc78a867..b73b14d1f8221 100644 --- a/sdk/search/azure-search-documents/pom.xml +++ b/sdk/search/azure-search-documents/pom.xml @@ -28,17 +28,17 @@ com.azure azure-core - 1.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 com.azure azure-core-serializer-json-jackson - 1.0.0 + 1.0.1 + 1.4.2 test diff --git a/sdk/servicebus/azure-messaging-servicebus/pom.xml b/sdk/servicebus/azure-messaging-servicebus/pom.xml index 816ceae3df891..e1d00889ee0dd 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.8.0 + 1.8.1 com.azure @@ -52,20 +52,20 @@ com.azure azure-core-http-netty - 1.6.0 + 1.6.1 com.azure azure-core-test - 1.4.1 + 1.4.2 test com.azure azure-core-http-okhttp - 1.3.0 + 1.3.1 test diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml index a046674a0da3b..abe28601aa443 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 com.azure @@ -81,7 +81,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/storage/azure-storage-blob-changefeed/pom.xml b/sdk/storage/azure-storage-blob-changefeed/pom.xml index ef72d9a25881f..9b025f90393cb 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 com.azure @@ -81,7 +81,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml index 69b3055b16a4a..8be91af1a3e57 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 com.azure @@ -56,7 +56,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/storage/azure-storage-blob-nio/pom.xml b/sdk/storage/azure-storage-blob-nio/pom.xml index c1ae2740a1189..4738999624e49 100644 --- a/sdk/storage/azure-storage-blob-nio/pom.xml +++ b/sdk/storage/azure-storage-blob-nio/pom.xml @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 1c9741956ac18..5a9fd3022c124 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -55,7 +55,7 @@ com.azure azure-core - 1.8.0 + 1.8.1 com.azure @@ -80,13 +80,13 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml index 29496ef00f27b..d7bec4b305fe7 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.8.0 + 1.8.1 com.azure azure-core-http-netty - 1.6.0 + 1.6.1 + 1.4.2 test diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 2a2de8a14162f..4c63f837f9e0d 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -71,13 +71,13 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/storage/azure-storage-file-share/pom.xml b/sdk/storage/azure-storage-file-share/pom.xml index 88b45a5dcb455..a8aa78f0a005d 100644 --- a/sdk/storage/azure-storage-file-share/pom.xml +++ b/sdk/storage/azure-storage-file-share/pom.xml @@ -52,13 +52,13 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index 7a2a8d0190b90..653660c859f36 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -36,7 +36,7 @@ com.azure azure-core - 1.8.0 + 1.8.1 com.azure @@ -46,13 +46,13 @@ com.azure azure-core-test - 1.4.1 + 1.4.2 test com.azure azure-core-http-netty - 1.6.0 + 1.6.1 test diff --git a/sdk/tables/azure-data-tables/pom.xml b/sdk/tables/azure-data-tables/pom.xml index 13cf21cd7092c..14d1bbd126f04 100644 --- a/sdk/tables/azure-data-tables/pom.xml +++ b/sdk/tables/azure-data-tables/pom.xml @@ -40,7 +40,7 @@ Licensed under the MIT License. com.azure azure-core - 1.8.0 + 1.8.1 com.azure @@ -74,7 +74,7 @@ Licensed under the MIT License. com.azure azure-core-test - 1.4.1 + 1.4.2 test diff --git a/sdk/template/azure-sdk-template/pom.xml b/sdk/template/azure-sdk-template/pom.xml index e253a8c55d367..58d70f3086d2d 100644 --- a/sdk/template/azure-sdk-template/pom.xml +++ b/sdk/template/azure-sdk-template/pom.xml @@ -31,7 +31,7 @@ com.azure azure-core - 1.8.0 + 1.8.1 org.junit.jupiter diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index 661cd7de7ed93..27ed3cda37907 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.8.1 + 1.8.1 com.azure azure-core-http-netty - 1.6.1 + 1.6.1 + 1.4.2 test com.azure azure-core-http-okhttp - 1.3.1 + 1.3.1 test From c1ad3ca604a739df87594ff73c1bf9a7d3ac73c1 Mon Sep 17 00:00:00 2001 From: zhoufenqin Date: Wed, 9 Sep 2020 11:26:41 +0800 Subject: [PATCH 144/168] upgrade spring release version 2.3.5 (#14904) Co-authored-by: unknown --- eng/jacoco-test-coverage/pom.xml | 18 +++++++++--------- eng/versioning/version_client.txt | 18 +++++++++--------- .../azure-cloud-foundry-service-sample/pom.xml | 4 ++-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../azure-spring-boot-sample-cosmosdb/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../CHANGELOG.md | 2 +- .../pom.xml | 6 +++--- .../CHANGELOG.md | 2 +- .../pom.xml | 6 +++--- .../CHANGELOG.md | 2 +- .../azure-spring-boot-starter-cosmosdb/pom.xml | 6 +++--- .../CHANGELOG.md | 2 +- .../pom.xml | 6 +++--- .../CHANGELOG.md | 2 +- .../pom.xml | 6 +++--- .../CHANGELOG.md | 2 +- .../azure-spring-boot-starter-metrics/pom.xml | 6 +++--- .../CHANGELOG.md | 2 +- .../pom.xml | 6 +++--- .../azure-spring-boot-starter/CHANGELOG.md | 2 +- sdk/spring/azure-spring-boot-starter/pom.xml | 6 +++--- sdk/spring/azure-spring-boot-test-aad/pom.xml | 4 ++-- .../azure-spring-boot-test-application/pom.xml | 2 +- sdk/spring/azure-spring-boot-test-core/pom.xml | 4 ++-- .../azure-spring-boot-test-cosmosdb/pom.xml | 4 ++-- .../azure-spring-boot-test-keyvault/pom.xml | 4 ++-- .../pom.xml | 4 ++-- sdk/spring/azure-spring-boot/CHANGELOG.md | 2 +- sdk/spring/azure-spring-boot/pom.xml | 2 +- 39 files changed, 77 insertions(+), 77 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 66688d6581fcc..fb2f443f5329a 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -330,47 +330,47 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-active-directory-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-keyvault-secrets-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-spring-boot-metrics-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-servicebus-jms-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-active-directory-b2c-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-data-gremlin-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f4c0adfc6755b..3a489cb99306e 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -89,15 +89,15 @@ com.azure.resourcemanager:azure-resourcemanager-sql;2.0.0-beta.4;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-storage;2.0.0-beta.4;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.0.0-beta.4;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.4;2.0.0-beta.5 -com.microsoft.azure:azure-active-directory-b2c-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-cosmosdb-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-data-gremlin-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.3.4;2.4.0-beta.1 -com.microsoft.azure:azure-spring-boot-metrics-starter;2.3.3;2.4.0-beta.1 -com.microsoft.azure:azure-spring-boot-starter;2.3.4;2.4.0-beta.1 -com.microsoft.azure:azure-spring-boot;2.3.4;2.4.0-beta.1 +com.microsoft.azure:azure-active-directory-b2c-spring-boot-starter;2.3.3;2.3.5-beta.1 +com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.3;2.3.5-beta.1 +com.microsoft.azure:azure-cosmosdb-spring-boot-starter;2.3.3;2.3.5-beta.1 +com.microsoft.azure:azure-data-gremlin-spring-boot-starter;2.3.3;2.3.5-beta.1 +com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter;2.3.3;2.3.5-beta.1 +com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.3.4;2.3.5-beta.1 +com.microsoft.azure:azure-spring-boot-metrics-starter;2.3.3;2.3.5-beta.1 +com.microsoft.azure:azure-spring-boot-starter;2.3.4;2.3.5-beta.1 +com.microsoft.azure:azure-spring-boot;2.3.4;2.3.5-beta.1 com.microsoft.azure:spring-cloud-azure-appconfiguration-config-web;1.2.8-beta.1;1.2.8-beta.1 com.microsoft.azure:spring-cloud-azure-appconfiguration-config;1.2.8-beta.1;1.2.8-beta.1 com.microsoft.azure:spring-cloud-azure-context;1.2.8-beta.1;1.2.8-beta.1 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 0679465ad6b90..ae1b923b732d9 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 @@ -22,12 +22,12 @@ com.microsoft.azure azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure azure-servicebus-jms-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 org.springframework.boot 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 02e9438b40932..44c893c4ee7f2 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 @@ -22,7 +22,7 @@ com.microsoft.azure azure-active-directory-b2c-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend-v2/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend-v2/pom.xml index 21fc6e9c46719..e3045e7eff1cc 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend-v2/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend-v2/pom.xml @@ -22,7 +22,7 @@ com.microsoft.azure azure-active-directory-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend/pom.xml index 444453c57c275..b4e22327915f3 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend/pom.xml @@ -22,7 +22,7 @@ com.microsoft.azure azure-active-directory-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-stateless/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-stateless/pom.xml index d33627773b210..bf79a6fe24c4e 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-stateless/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-stateless/pom.xml @@ -22,7 +22,7 @@ com.microsoft.azure azure-active-directory-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/pom.xml index b48bc37bccf53..7c7a593b300a9 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/pom.xml @@ -22,7 +22,7 @@ com.microsoft.azure azure-active-directory-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 org.springframework.boot diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml index 0b34ed7bd23d0..95280ffbdf181 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb/pom.xml @@ -22,7 +22,7 @@ com.microsoft.azure azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 org.springframework.boot diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-data-gremlin/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-data-gremlin/pom.xml index e22e6e96ab555..20c457eee879c 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-data-gremlin/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-data-gremlin/pom.xml @@ -23,7 +23,7 @@ com.microsoft.azure azure-data-gremlin-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 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 117fdb22c78cd..d54fb4de2480a 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 @@ -23,7 +23,7 @@ com.microsoft.azure azure-keyvault-secrets-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 org.springframework.boot 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 01d28a96c5291..33139cad28290 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 @@ -28,7 +28,7 @@ com.microsoft.azure azure-servicebus-jms-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 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 4582597c9a479..4256a3332e4e9 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 @@ -28,7 +28,7 @@ com.microsoft.azure azure-servicebus-jms-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml index 6433a1c135d9a..83cd21973a5b8 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete/pom.xml @@ -31,7 +31,7 @@ com.microsoft.azure azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.google.guava diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml index 644d98045c0a7..465c77d9e19dd 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial/pom.xml @@ -32,7 +32,7 @@ com.microsoft.azure azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.google.guava diff --git a/sdk/spring/azure-spring-boot-starter-active-directory-b2c/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter-active-directory-b2c/CHANGELOG.md index 1f1ba7ab3dba9..12f6c4f67fd32 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory-b2c/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter-active-directory-b2c/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.3 (2020-08-13) diff --git a/sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml b/sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml index cdeda46d63f61..88a0382ebe4a1 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml @@ -13,7 +13,7 @@ com.microsoft.azure azure-active-directory-b2c-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 Azure AD B2C Spring Security Integration Spring Boot Starter Spring Boot Starter for Azure AD B2C and Spring Security Integration @@ -34,7 +34,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 @@ -98,7 +98,7 @@ - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] + com.microsoft.azure:azure-spring-boot:[2.3.5-beta.1] javax.validation:validation-api:[2.0.1.Final] org.springframework:spring-web:[5.2.8.RELEASE] org.springframework.boot:spring-boot-starter:[2.3.3.RELEASE] 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 1f1ba7ab3dba9..12f6c4f67fd32 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter-active-directory/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.3 (2020-08-13) diff --git a/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml b/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml index 0afbbe0b8b072..d25a4346afa80 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml @@ -13,7 +13,7 @@ com.microsoft.azure azure-active-directory-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 Azure AD Spring Security Integration Spring Boot Starter Spring Boot Starter for Azure AD and Spring Security Integration @@ -33,7 +33,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 org.springframework @@ -82,7 +82,7 @@ - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] --> + com.microsoft.azure:azure-spring-boot:[2.3.5-beta.1] --> com.fasterxml.jackson.core:jackson-databind:[2.11.2] com.microsoft.azure:msal4j:[1.6.2] com.nimbusds:nimbus-jose-jwt:[7.9] diff --git a/sdk/spring/azure-spring-boot-starter-cosmosdb/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter-cosmosdb/CHANGELOG.md index 1f1ba7ab3dba9..12f6c4f67fd32 100644 --- a/sdk/spring/azure-spring-boot-starter-cosmosdb/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter-cosmosdb/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.3 (2020-08-13) diff --git a/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml index a9c4a380fd0a6..16fe9afc8d6aa 100644 --- a/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml @@ -13,7 +13,7 @@ com.microsoft.azure azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 Azure Cosmos DB Spring Boot Starter Spring Boot Starter for Azure Document DB service @@ -33,7 +33,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.azure @@ -52,7 +52,7 @@ - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] + com.microsoft.azure:azure-spring-boot:[2.3.5-beta.1] com.microsoft.azure:spring-data-cosmosdb:[2.3.0] org.springframework.boot:spring-boot-starter:[2.3.3.RELEASE] org.springframework.boot:spring-boot-starter-validation:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-starter-data-gremlin/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter-data-gremlin/CHANGELOG.md index 1f1ba7ab3dba9..12f6c4f67fd32 100644 --- a/sdk/spring/azure-spring-boot-starter-data-gremlin/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter-data-gremlin/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.3 (2020-08-13) diff --git a/sdk/spring/azure-spring-boot-starter-data-gremlin/pom.xml b/sdk/spring/azure-spring-boot-starter-data-gremlin/pom.xml index 35474a0f46a08..12ba939055e46 100644 --- a/sdk/spring/azure-spring-boot-starter-data-gremlin/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-data-gremlin/pom.xml @@ -12,7 +12,7 @@ com.microsoft.azure azure-data-gremlin-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 Spring Data Gremlin Boot Starter Spring Boot Starter for Spring Data Gremlin @@ -32,7 +32,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 com.microsoft.spring.data.gremlin @@ -56,7 +56,7 @@ - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] + com.microsoft.azure:azure-spring-boot:[2.3.5-beta.1] com.fasterxml.jackson.core:jackson-core:[2.11.2] com.microsoft.spring.data.gremlin:spring-data-gremlin:[2.3.0] org.springframework.boot:spring-boot-starter:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-starter-keyvault-secrets/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter-keyvault-secrets/CHANGELOG.md index 6456f7f08de9c..030d9a88dac02 100644 --- a/sdk/spring/azure-spring-boot-starter-keyvault-secrets/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter-keyvault-secrets/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.3 (2020-08-13) diff --git a/sdk/spring/azure-spring-boot-starter-keyvault-secrets/pom.xml b/sdk/spring/azure-spring-boot-starter-keyvault-secrets/pom.xml index 4fd747c3cc97e..e2bb1d2d2779a 100644 --- a/sdk/spring/azure-spring-boot-starter-keyvault-secrets/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-keyvault-secrets/pom.xml @@ -13,7 +13,7 @@ com.microsoft.azure azure-keyvault-secrets-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 Azure Key Vault Secrets Spring Boot Starter Spring Boot Starter supporting Azure Key Vault Secrets as PropertySource @@ -33,7 +33,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 com.azure @@ -51,7 +51,7 @@ - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] + com.microsoft.azure:azure-spring-boot:[2.3.5-beta.1] com.azure:azure-security-keyvault-secrets:[4.2.0] org.springframework.boot:spring-boot-starter:[2.3.3.RELEASE] org.springframework.boot:spring-boot-starter-validation:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-starter-metrics/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter-metrics/CHANGELOG.md index 18f449454edf2..b2b635381e53d 100644 --- a/sdk/spring/azure-spring-boot-starter-metrics/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter-metrics/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.3 (2020-08-13) diff --git a/sdk/spring/azure-spring-boot-starter-metrics/pom.xml b/sdk/spring/azure-spring-boot-starter-metrics/pom.xml index a7c289dd624d7..b3648154e197c 100644 --- a/sdk/spring/azure-spring-boot-starter-metrics/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-metrics/pom.xml @@ -13,7 +13,7 @@ com.microsoft.azure azure-spring-boot-metrics-starter - 2.4.0-beta.1 + 2.3.5-beta.1 Azure Metrics Spring Boot Starter Spring Boot Starter for Micrometer Metrics @@ -33,7 +33,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 io.micrometer @@ -57,7 +57,7 @@ - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] + com.microsoft.azure:azure-spring-boot:[2.3.5-beta.1] io.micrometer:micrometer-registry-azure-monitor:[1.5.4] org.springframework.boot:spring-boot-actuator-autoconfigure:[2.3.3.RELEASE] org.springframework.boot:spring-boot-starter:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-starter-servicebus-jms/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter-servicebus-jms/CHANGELOG.md index fa45bcd71b948..903ac5ce5a9c7 100644 --- a/sdk/spring/azure-spring-boot-starter-servicebus-jms/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter-servicebus-jms/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.4 (2020-08-20) diff --git a/sdk/spring/azure-spring-boot-starter-servicebus-jms/pom.xml b/sdk/spring/azure-spring-boot-starter-servicebus-jms/pom.xml index 6a5ac24df8b19..52e05baa7dd26 100644 --- a/sdk/spring/azure-spring-boot-starter-servicebus-jms/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-servicebus-jms/pom.xml @@ -13,7 +13,7 @@ com.microsoft.azure azure-servicebus-jms-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 Azure Service Bus JMS Spring Boot Starter Spring Boot Starter for Azure Service Bus JMS @@ -23,7 +23,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 @@ -97,7 +97,7 @@ io.netty:netty-transport-native-epoll:[4.1.51.Final] io.netty:netty-transport-native-kqueue:[4.1.51.Final] io.netty:netty-codec-http:[4.1.51.Final] - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] + com.microsoft.azure:azure-spring-boot:[2.3.5-beta.1] org.springframework:spring-jms:[5.2.8.RELEASE] org.springframework.boot:spring-boot-starter-validation:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-starter/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter/CHANGELOG.md index 26aedc7956d34..3b706e15e78b6 100644 --- a/sdk/spring/azure-spring-boot-starter/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.4 (2020-08-20) diff --git a/sdk/spring/azure-spring-boot-starter/pom.xml b/sdk/spring/azure-spring-boot-starter/pom.xml index 6ef3a1f76c407..966b01ee04d06 100644 --- a/sdk/spring/azure-spring-boot-starter/pom.xml +++ b/sdk/spring/azure-spring-boot-starter/pom.xml @@ -13,7 +13,7 @@ com.microsoft.azure azure-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 Azure Spring Boot Starter Core starter, including auto-configuration support @@ -33,7 +33,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 @@ -47,7 +47,7 @@ - com.microsoft.azure:azure-spring-boot:[2.4.0-beta.1] + com.microsoft.azure:azure-spring-boot:[2.3.5-beta.1] org.springframework.boot:spring-boot-starter:[2.3.3.RELEASE] org.springframework.boot:spring-boot-starter-validation:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-test-aad/pom.xml b/sdk/spring/azure-spring-boot-test-aad/pom.xml index 787208560b2d4..20fabb33a23be 100644 --- a/sdk/spring/azure-spring-boot-test-aad/pom.xml +++ b/sdk/spring/azure-spring-boot-test-aad/pom.xml @@ -23,7 +23,7 @@ com.microsoft.azure azure-active-directory-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 org.springframework.boot @@ -47,7 +47,7 @@ - com.microsoft.azure:azure-active-directory-spring-boot-starter:[2.4.0-beta.1] + com.microsoft.azure:azure-active-directory-spring-boot-starter:[2.3.5-beta.1] org.springframework.boot:spring-boot-starter-web:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-test-application/pom.xml b/sdk/spring/azure-spring-boot-test-application/pom.xml index aaab23146d6e2..8887fbd8a9316 100644 --- a/sdk/spring/azure-spring-boot-test-application/pom.xml +++ b/sdk/spring/azure-spring-boot-test-application/pom.xml @@ -36,7 +36,7 @@ com.microsoft.azure azure-keyvault-secrets-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 diff --git a/sdk/spring/azure-spring-boot-test-core/pom.xml b/sdk/spring/azure-spring-boot-test-core/pom.xml index 495aa167b802a..7c8ba9f468f25 100644 --- a/sdk/spring/azure-spring-boot-test-core/pom.xml +++ b/sdk/spring/azure-spring-boot-test-core/pom.xml @@ -81,7 +81,7 @@ com.microsoft.azure azure-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 @@ -96,7 +96,7 @@ com.microsoft.azure:azure:[1.34.0] - com.microsoft.azure:azure-spring-boot-starter:[2.4.0-beta.1] + com.microsoft.azure:azure-spring-boot-starter:[2.3.5-beta.1] com.jcraft:jsch:[0.1.54] com.github.cverges.expect4j:expect4j:[1.6] org.apache.maven:maven-embedder:[3.6.2] diff --git a/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml index dc244b8da17d3..efadc7b6542a7 100644 --- a/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml @@ -18,7 +18,7 @@ com.microsoft.azure azure-cosmosdb-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.azure @@ -57,7 +57,7 @@ - com.microsoft.azure:azure-cosmosdb-spring-boot-starter:[2.4.0-beta.1] + com.microsoft.azure:azure-cosmosdb-spring-boot-starter:[2.3.5-beta.1] org.springframework.boot:spring-boot-starter-web:[2.3.3.RELEASE] org.springframework.boot:spring-boot-starter-actuator:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-test-keyvault/pom.xml b/sdk/spring/azure-spring-boot-test-keyvault/pom.xml index 12753f11f2be7..a256e1a5e126b 100644 --- a/sdk/spring/azure-spring-boot-test-keyvault/pom.xml +++ b/sdk/spring/azure-spring-boot-test-keyvault/pom.xml @@ -34,7 +34,7 @@ com.microsoft.azure azure-keyvault-secrets-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 com.azure @@ -73,7 +73,7 @@ com.microsoft.azure:azure:[1.34.0] - com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter:[2.4.0-beta.1] + com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter:[2.3.5-beta.1] org.springframework.boot:spring-boot-starter-actuator:[2.3.3.RELEASE] org.springframework.boot:spring-boot-starter-web:[2.3.3.RELEASE] diff --git a/sdk/spring/azure-spring-boot-test-servicebus-jms/pom.xml b/sdk/spring/azure-spring-boot-test-servicebus-jms/pom.xml index 627e96e5044d1..6ed544ce4421b 100644 --- a/sdk/spring/azure-spring-boot-test-servicebus-jms/pom.xml +++ b/sdk/spring/azure-spring-boot-test-servicebus-jms/pom.xml @@ -22,7 +22,7 @@ com.microsoft.azure azure-servicebus-jms-spring-boot-starter - 2.4.0-beta.1 + 2.3.5-beta.1 @@ -49,7 +49,7 @@ - com.microsoft.azure:azure-servicebus-jms-spring-boot-starter:[2.4.0-beta.1] + com.microsoft.azure:azure-servicebus-jms-spring-boot-starter:[2.3.5-beta.1] diff --git a/sdk/spring/azure-spring-boot/CHANGELOG.md b/sdk/spring/azure-spring-boot/CHANGELOG.md index 26aedc7956d34..3b706e15e78b6 100644 --- a/sdk/spring/azure-spring-boot/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.4.0-beta.1 (Unreleased) +## 2.3.5-beta.1 (Unreleased) ## 2.3.4 (2020-08-20) diff --git a/sdk/spring/azure-spring-boot/pom.xml b/sdk/spring/azure-spring-boot/pom.xml index 9faff1b021415..b98604a3644c0 100644 --- a/sdk/spring/azure-spring-boot/pom.xml +++ b/sdk/spring/azure-spring-boot/pom.xml @@ -13,7 +13,7 @@ com.microsoft.azure azure-spring-boot - 2.4.0-beta.1 + 2.3.5-beta.1 jar Azure Spring Boot AutoConfigure From 2521ad688764c3f90d247240d777c382949d0d41 Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Wed, 9 Sep 2020 12:05:08 +0800 Subject: [PATCH 145/168] Mgmt: remove catch exception Samples (#14897) * remove catch exception in samples * fix compile error * throws Exception in samples * throws Exception in test * remove return false in last * fix compile error * Revert "throws Exception in test" This reverts commit 3cb862d25f9c2e5b01eea7d39674dba5196f4925. * Revert "throws Exception in samples" This reverts commit d61c58aa08c4bf68cd35ca8080e57387ed64e522. * throw specific exception for samples * throw exception in test --- .../samples/ManageSpringCloud.java | 9 +- .../samples/ManageFunctionAppBasic.java | 4 - .../samples/ManageFunctionAppLogs.java | 6 +- .../ManageFunctionAppSourceControl.java | 7 +- .../ManageFunctionAppWithAuthentication.java | 7 +- .../ManageFunctionAppWithDomainSsl.java | 8 +- .../ManageLinuxFunctionAppSourceControl.java | 4 - .../samples/ManageLinuxWebAppBasic.java | 4 - .../ManageLinuxWebAppSourceControl.java | 7 +- .../ManageLinuxWebAppSqlConnection.java | 8 +- ...geLinuxWebAppStorageAccountConnection.java | 4 - ...anageLinuxWebAppWithContainerRegistry.java | 7 +- .../ManageLinuxWebAppWithDomainSsl.java | 8 +- .../ManageLinuxWebAppWithTrafficManager.java | 8 +- .../appservice/samples/ManageWebAppBasic.java | 4 - .../samples/ManageWebAppCosmosDbByMsi.java | 4 - .../ManageWebAppCosmosDbThroughKeyVault.java | 4 - .../appservice/samples/ManageWebAppLogs.java | 6 +- .../appservice/samples/ManageWebAppSlots.java | 4 - .../samples/ManageWebAppSourceControl.java | 7 +- .../ManageWebAppSourceControlAsync.java | 4 - .../samples/ManageWebAppSqlConnection.java | 8 +- .../ManageWebAppStorageAccountConnection.java | 4 - .../ManageWebAppWithAuthentication.java | 4 - .../samples/ManageWebAppWithDomainSsl.java | 8 +- .../ManageWebAppWithTrafficManager.java | 8 +- .../ManageServicePrincipalCredentials.java | 7 +- .../samples/ManageUsersGroupsAndRoles.java | 4 - .../ConvertVirtualMachineToManagedDisks.java | 5 - ...VirtualMachineUsingCustomImageFromVHD.java | 4 - ...eVirtualMachineUsingCustomImageFromVM.java | 5 - ...chineUsingSpecializedDiskFromSnapshot.java | 5 - ...ualMachineUsingSpecializedDiskFromVhd.java | 5 - ...MachinesAsyncTrackingRelatedResources.java | 4 - .../CreateVirtualMachinesInParallel.java | 6 - ...hinesUsingCustomImageOrSpecializedVHD.java | 6 - .../samples/ManageAvailabilitySet.java | 6 - .../compute/samples/ManageManagedDisks.java | 6 - ...nabledVirtualMachineBelongsToAADGroup.java | 4 - ...etUserAssignedMSIFromServicePrincipal.java | 4 - ...geStorageFromMSIEnabledVirtualMachine.java | 4 - ...eUserAssignedMSIEnabledVirtualMachine.java | 4 - .../compute/samples/ManageVirtualMachine.java | 6 - .../samples/ManageVirtualMachineAsync.java | 6 - .../ManageVirtualMachineExtension.java | 6 - .../samples/ManageVirtualMachineScaleSet.java | 6 - .../ManageVirtualMachineScaleSetAsync.java | 6 - ...tualMachineScaleSetWithUnmanagedDisks.java | 6 - .../samples/ManageVirtualMachineWithDisk.java | 5 - ...anageVirtualMachineWithUnmanagedDisks.java | 6 - .../ManageVirtualMachinesInParallel.java | 7 - .../samples/ManageZonalVirtualMachine.java | 6 - .../ManageZonalVirtualMachineScaleSet.java | 6 - ...tainerInstanceWithAzureFileShareMount.java | 4 - ...WithManualAzureFileShareMountCreation.java | 4 - ...erInstanceWithMultipleContainerImages.java | 4 - ...ManyUsingContainerServiceOrchestrator.java | 8 +- .../samples/ManageContainerRegistry.java | 7 +- .../ManageContainerRegistryWithWebhooks.java | 7 +- ...teCosmosDBTableWithVirtualNetworkRule.java | 4 - ...CreateCosmosDBWithEventualConsistency.java | 4 - .../samples/CreateCosmosDBWithIPRange.java | 4 - .../CreateCosmosDBWithKindMongoDB.java | 4 - .../cosmos/samples/ManageHACosmosDB.java | 4 - .../dns/samples/ManageDns.java | 8 +- .../eventhubs/samples/ManageEventHub.java | 4 - .../samples/ManageEventHubEvents.java | 5 - .../ManageEventHubGeoDisasterRecovery.java | 6 +- .../keyvault/samples/ManageKeyVault.java | 4 - ...mageFromContainerRegistryToKubernetes.java | 8 +- .../samples/ManageKubernetesCluster.java | 8 +- ...bernetesClusterWithAdvancedNetworking.java | 8 +- ...eSettingsBasedOnPerformanceOrSchedule.java | 4 - .../samples/QueryMetricsAndActivityLogs.java | 6 +- ...SecurityBreachOrRiskActivityLogAlerts.java | 4 - .../WebAppPerformanceMonitoringAlerts.java | 4 - ...reateSimpleInternetFacingLoadBalancer.java | 6 - .../samples/ManageApplicationGateway.java | 9 +- .../network/samples/ManageExpressRoute.java | 4 - .../ManageExpressRouteCrossConnection.java | 137 +++++++++--------- .../network/samples/ManageIPAddress.java | 3 - .../samples/ManageInternalLoadBalancer.java | 6 - .../ManageInternetFacingLoadBalancer.java | 6 - .../samples/ManageNetworkInterface.java | 6 - ...anageNetworkPeeringInSameSubscription.java | 6 - .../samples/ManageNetworkSecurityGroup.java | 10 +- .../network/samples/ManageNetworkWatcher.java | 5 - .../ManageSimpleApplicationGateway.java | 9 +- ...eVirtualMachinesInParallelWithNetwork.java | 6 - .../network/samples/ManageVirtualNetwork.java | 4 - .../samples/ManageVirtualNetworkAsync.java | 5 - .../ManageVpnGatewayPoint2SiteConnection.java | 8 +- .../ManageVpnGatewaySite2SiteConnection.java | 4 - .../ManageVpnGatewayVNet2VNetConnection.java | 5 - ...erifyNetworkPeeringWithNetworkWatcher.java | 6 - .../privatedns/samples/ManagePrivateDns.java | 4 - .../rediscache/samples/ManageRedisCache.java | 4 - .../samples/DeployUsingARMTemplate.java | 8 +- .../samples/DeployUsingARMTemplateAsync.java | 8 +- ...ngARMTemplateWithDeploymentOperations.java | 8 +- .../DeployUsingARMTemplateWithProgress.java | 8 +- .../DeployUsingARMTemplateWithTags.java | 8 +- .../DeployVirtualMachineUsingARMTemplate.java | 8 +- .../resources/samples/ManageResource.java | 6 - .../samples/ManageResourceGroup.java | 6 - .../resourcemanager/samples/DockerUtils.java | 4 +- .../resourcemanager/samples/SSHShell.java | 3 +- .../azure/resourcemanager/samples/Utils.java | 12 +- ...iceBusPublishSubscribeAdvanceFeatures.java | 4 - .../ServiceBusPublishSubscribeBasic.java | 4 - .../ServiceBusQueueAdvanceFeatures.java | 4 - .../samples/ServiceBusQueueBasic.java | 4 - ...ServiceBusWithClaimBasedAuthorization.java | 4 - .../sql/samples/GettingSqlServerMetrics.java | 7 +- .../sql/samples/ManageSqlDatabase.java | 4 - .../ManageSqlDatabaseInElasticPool.java | 4 - ...qlDatabasesAcrossDifferentDataCenters.java | 4 - .../sql/samples/ManageSqlFailoverGroups.java | 4 - .../sql/samples/ManageSqlFirewallRules.java | 4 - .../ManageSqlImportExportDatabase.java | 4 - .../samples/ManageSqlServerDnsAliases.java | 7 +- ...nageSqlServerKeysWithAzureKeyVaultKey.java | 4 - .../ManageSqlServerSecurityAlertPolicy.java | 4 - .../samples/ManageSqlVirtualNetworkRules.java | 4 - ...ageSqlWithRecoveredOrRestoredDatabase.java | 4 - .../storage/samples/ManageStorageAccount.java | 4 - .../samples/ManageStorageAccountAsync.java | 4 - .../ManageStorageAccountNetworkRules.java | 4 - .../samples/ManageSimpleTrafficManager.java | 6 - .../samples/ManageTrafficManager.java | 7 +- .../samples/AppPlatformLiveOnlyTests.java | 7 +- .../AppServiceSampleLiveOnlyTests.java | 27 ++-- .../samples/AppServiceSampleTests.java | 6 +- .../samples/ContainerInstanceTests.java | 5 +- .../samples/ContainerRegistryTests.java | 6 +- .../samples/DnsSampleTests.java | 4 +- .../samples/GraphRbacTests.java | 3 +- .../samples/KubernetesClusterTests.java | 9 +- .../resourcemanager/samples/MonitorTests.java | 4 +- .../samples/NetworkSampleTests.java | 12 +- .../samples/ResourceSampleTests.java | 14 +- .../samples/SqlSampleTests.java | 5 +- .../samples/TrafficManagerSampleTests.java | 4 +- 143 files changed, 221 insertions(+), 740 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java index 30345e115e459..adc1b92d85c22 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java @@ -41,7 +41,10 @@ import java.net.HttpURLConnection; import java.net.URL; import java.security.KeyStore; +import java.security.KeyStoreException; import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; import java.util.Base64; import java.util.Collections; @@ -68,7 +71,7 @@ public class ManageSpringCloud { * @return true if sample runs successfully * @throws IllegalStateException unexcepted state */ - public static boolean runSample(Azure azure, String clientId) { + public static boolean runSample(Azure azure, String clientId) throws IOException, KeyStoreException, CertificateException, NoSuchAlgorithmException { final String rgName = azure.sdkContext().randomResourceName("rg", 24); final String serviceName = azure.sdkContext().randomResourceName("service", 24); final Region region = Region.US_EAST; @@ -255,9 +258,6 @@ public static boolean runSample(Azure azure, String clientId) { System.out.printf("Successfully expose domain ssl.%s%n", domainName); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Delete Resource Group: " + rgName); @@ -268,7 +268,6 @@ public static boolean runSample(Azure azure, String clientId) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppBasic.java index 933d0f2f36d96..e570830fe965b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppBasic.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppBasic.java @@ -126,9 +126,6 @@ public static boolean runSample(Azure azure) { Utils.print(functionApp); } return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rg1Name); @@ -143,7 +140,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java index 79abc6ffdadd4..7d9d633099f61 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java @@ -37,7 +37,7 @@ public final class ManageFunctionAppLogs { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { // New resources final String suffix = ".azurewebsites.net"; final String appName = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -140,9 +140,6 @@ protected void hookOnError(Throwable throwable) { }); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -154,7 +151,6 @@ protected void hookOnError(Throwable throwable) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppSourceControl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppSourceControl.java index 892208440ede7..a34a1328f9d4b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppSourceControl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppSourceControl.java @@ -17,6 +17,7 @@ import com.azure.resourcemanager.samples.Utils; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.PushCommand; +import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.transport.RefSpec; import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; @@ -40,7 +41,7 @@ public final class ManageFunctionAppSourceControl { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws GitAPIException { // New resources final String suffix = ".azurewebsites.net"; final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -243,9 +244,6 @@ public static boolean runSample(Azure azure) { System.out.println("Square of 926 is " + Utils.post("http://" + app6Url + "/api/square", "926")); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -257,7 +255,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithAuthentication.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithAuthentication.java index ee1759d9bf6fe..1383885e49059 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithAuthentication.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithAuthentication.java @@ -18,6 +18,7 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.PushCommand; +import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.transport.RefSpec; import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; @@ -43,7 +44,7 @@ public final class ManageFunctionAppWithAuthentication { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws GitAPIException { // New resources final String suffix = ".azurewebsites.net"; final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -193,9 +194,6 @@ public static boolean runSample(Azure azure) { System.out.println("Square of 925 is " + Utils.post("http://" + app3Url + "/api/square?code=mysecretkey", "925")); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -207,7 +205,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithDomainSsl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithDomainSsl.java index d0b96fd75cc41..7c90f3eed0980 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithDomainSsl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppWithDomainSsl.java @@ -18,6 +18,7 @@ import com.azure.resourcemanager.samples.Utils; import java.io.File; +import java.io.IOException; import java.util.Locale; @@ -38,7 +39,7 @@ public final class ManageFunctionAppWithDomainSsl { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { // New resources final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); final String app2Name = azure.sdkContext().randomResourceName("webapp2-", 20); @@ -157,9 +158,6 @@ public static boolean runSample(Azure azure) { Utils.print(app2); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -171,8 +169,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxFunctionAppSourceControl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxFunctionAppSourceControl.java index 7a9d3076dec55..c7ea7b287774d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxFunctionAppSourceControl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxFunctionAppSourceControl.java @@ -121,9 +121,6 @@ public static boolean runSample(Azure azure) { // response would be "Hello, ..." return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -135,7 +132,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppBasic.java index 2cf8a74f3c98d..5dd06c478ecc0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppBasic.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppBasic.java @@ -142,9 +142,6 @@ public static boolean runSample(Azure azure) { Utils.print(webApp); } return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rg1Name); @@ -159,7 +156,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSourceControl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSourceControl.java index 535cb83ca3198..7f2e719a7bd29 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSourceControl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSourceControl.java @@ -19,6 +19,7 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.PushCommand; +import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.transport.RefSpec; import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; @@ -40,7 +41,7 @@ public final class ManageLinuxWebAppSourceControl { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws GitAPIException { // New resources final String suffix = ".azurewebsites.net"; final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -184,9 +185,6 @@ public static boolean runSample(Azure azure) { System.out.println(Utils.curl("http://" + app4Url)); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -198,7 +196,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSqlConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSqlConnection.java index 9a5a90dc060ee..e89291bebafc9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSqlConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppSqlConnection.java @@ -17,6 +17,8 @@ import com.azure.resourcemanager.sql.models.SqlServer; import com.azure.core.http.policy.HttpLogDetailLevel; +import java.io.IOException; + /** * Azure App Service basic sample for managing web apps. * - Create a SQL database in a new SQL server @@ -33,7 +35,7 @@ public final class ManageLinuxWebAppSqlConnection { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { // New resources final String suffix = ".azurewebsites.net"; final String appName = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -112,9 +114,6 @@ public static boolean runSample(Azure azure) { System.in.read(); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -126,7 +125,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java index 26496f254c7b5..840df9b41d852 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java @@ -123,9 +123,6 @@ public static boolean runSample(Azure azure) { System.out.println(Utils.curl("http://" + app1Url + "/azure-samples-blob-traverser/")); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -137,7 +134,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithContainerRegistry.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithContainerRegistry.java index a58289fee708e..ac81d00a02200 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithContainerRegistry.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithContainerRegistry.java @@ -26,6 +26,7 @@ import com.github.dockerjava.api.model.Image; import com.github.dockerjava.core.command.PushImageResultCallback; +import java.io.IOException; import java.util.Date; import java.util.List; @@ -47,7 +48,7 @@ public class ManageLinuxWebAppWithContainerRegistry { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException, InterruptedException { final String rgName = azure.sdkContext().randomResourceName("rgACR", 15); final String acrName = azure.sdkContext().randomResourceName("acrsample", 20); final String appName = azure.sdkContext().randomResourceName("webapp", 20); @@ -155,9 +156,6 @@ public static boolean runSample(Azure azure) { System.out.println(Utils.get("http://" + appUrl)); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -169,7 +167,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithDomainSsl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithDomainSsl.java index d1dfcc2b2123a..3e54b759945c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithDomainSsl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithDomainSsl.java @@ -21,6 +21,7 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import java.io.File; +import java.io.IOException; import java.util.Locale; @@ -41,7 +42,7 @@ public final class ManageLinuxWebAppWithDomainSsl { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { // New resources final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); final String app2Name = azure.sdkContext().randomResourceName("webapp2-", 20); @@ -164,9 +165,6 @@ public static boolean runSample(Azure azure) { Utils.print(app2); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -178,8 +176,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithTrafficManager.java index 321bb4c5d0a7e..843531c55a974 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithTrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppWithTrafficManager.java @@ -24,6 +24,7 @@ import com.azure.resourcemanager.trafficmanager.models.TrafficRoutingMethod; import java.io.File; +import java.io.IOException; import java.util.Locale; @@ -50,7 +51,7 @@ public final class ManageLinuxWebAppWithTrafficManager { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); if (ManageLinuxWebAppWithTrafficManager.azure == null) { @@ -225,9 +226,6 @@ public static boolean runSample(Azure azure) { Utils.print(plan3); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -239,8 +237,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } private static AppServicePlan createAppServicePlan(String name, Region region) { diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppBasic.java index b10bf6dc2914f..456f72c68d11f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppBasic.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppBasic.java @@ -138,9 +138,6 @@ public static boolean runSample(Azure azure) { Utils.print(webApp); } return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rg1Name); @@ -155,7 +152,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbByMsi.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbByMsi.java index 94c89484ca7ce..294d34bc82f31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbByMsi.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbByMsi.java @@ -145,9 +145,6 @@ public static boolean runSample(Azure azure, TokenCredential credential, String return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -159,7 +156,6 @@ public static boolean runSample(Azure azure, TokenCredential credential, String g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java index 02e2548b7f9cc..07480ac837994 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java @@ -144,9 +144,6 @@ public static boolean runSample(Azure azure, String clientId) { return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -158,7 +155,6 @@ public static boolean runSample(Azure azure, String clientId) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppLogs.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppLogs.java index d671574ac9e1e..acfa82953ea36 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppLogs.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppLogs.java @@ -41,7 +41,7 @@ public final class ManageWebAppLogs { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { // New resources final String suffix = ".azurewebsites.net"; final String appName = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -152,9 +152,6 @@ protected void hookOnError(Throwable throwable) { }); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -166,7 +163,6 @@ protected void hookOnError(Throwable throwable) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSlots.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSlots.java index 093b1eb11a6b0..982d30b1930ab 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSlots.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSlots.java @@ -77,9 +77,6 @@ public static boolean runSample(Azure azure) { swapProductionBacktoSlot(slot3); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + resourceGroupName); @@ -91,7 +88,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControl.java index 4a47287401427..3d75dcd0091de 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControl.java @@ -21,6 +21,7 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.PushCommand; +import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.transport.RefSpec; import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; @@ -45,7 +46,7 @@ public final class ManageWebAppSourceControl { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws GitAPIException { // New resources final String suffix = ".azurewebsites.net"; final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -317,9 +318,6 @@ public static boolean runSample(Azure azure) { System.out.println("Warming up " + app7Url); Utils.curl("http://" + app7Url); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -332,7 +330,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControlAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControlAsync.java index 37e3bd57e2961..0011801445125 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControlAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSourceControlAsync.java @@ -185,9 +185,6 @@ public static boolean runSample(final Azure azure) { System.out.println(Utils.curl("http://" + app4Url)); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -199,7 +196,6 @@ public static boolean runSample(final Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSqlConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSqlConnection.java index d7d12f92561b8..f0bf4e16f2199 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSqlConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppSqlConnection.java @@ -17,6 +17,8 @@ import com.azure.resourcemanager.sql.models.SqlServer; import com.azure.core.http.policy.HttpLogDetailLevel; +import java.io.IOException; + /** * Azure App Service basic sample for managing web apps. * - Create a SQL database in a new SQL server @@ -32,7 +34,7 @@ public final class ManageWebAppSqlConnection { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { // New resources final String suffix = ".azurewebsites.net"; final String appName = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -111,9 +113,6 @@ public static boolean runSample(Azure azure) { System.in.read(); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -125,7 +124,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java index 38630657abf5a..c899619eab400 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java @@ -124,9 +124,6 @@ public static boolean runSample(Azure azure) { System.out.println(Utils.curl("http://" + app1Url + "/azure-samples-blob-traverser/")); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -138,7 +135,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithAuthentication.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithAuthentication.java index 23a65d3e8aa7b..b6558e8f6874e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithAuthentication.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithAuthentication.java @@ -197,9 +197,6 @@ public static boolean runSample(Azure azure) { Utils.print(app4); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -211,7 +208,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithDomainSsl.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithDomainSsl.java index dcc9858020ed2..f0ab377fda914 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithDomainSsl.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithDomainSsl.java @@ -20,6 +20,7 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import java.io.File; +import java.io.IOException; import java.util.Locale; @@ -40,7 +41,7 @@ public final class ManageWebAppWithDomainSsl { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { // New resources final String app1Name = azure.sdkContext().randomResourceName("webapp1-", 20); final String app2Name = azure.sdkContext().randomResourceName("webapp2-", 20); @@ -161,9 +162,6 @@ public static boolean runSample(Azure azure) { Utils.print(app2); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -175,8 +173,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithTrafficManager.java index 4fb9e6d930c0b..7f0795c4c9ee6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithTrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppWithTrafficManager.java @@ -23,6 +23,7 @@ import com.azure.resourcemanager.trafficmanager.models.TrafficRoutingMethod; import java.io.File; +import java.io.IOException; import java.util.Locale; /** @@ -48,7 +49,7 @@ public final class ManageWebAppWithTrafficManager { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); if (ManageWebAppWithTrafficManager.azure == null) { @@ -223,9 +224,6 @@ public static boolean runSample(Azure azure) { Utils.print(plan3); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -237,8 +235,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } private static AppServicePlan createAppServicePlan(String name, Region region) { diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageServicePrincipalCredentials.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageServicePrincipalCredentials.java index 0a341d963bdf7..1ea915f1e61d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageServicePrincipalCredentials.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageServicePrincipalCredentials.java @@ -18,6 +18,7 @@ import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; +import java.io.IOException; import java.time.Duration; /** @@ -38,7 +39,7 @@ public final class ManageServicePrincipalCredentials { * @param profile the profile the sample is running in * @return true if sample runs successfully */ - public static boolean runSample(Azure.Authenticated authenticated, AzureProfile profile) { + public static boolean runSample(Azure.Authenticated authenticated, AzureProfile profile) throws IOException { final String spName = authenticated.sdkContext().randomResourceName("sp", 20); final String appName = authenticated.sdkContext().randomResourceName("app", 20); final String appUrl = "https://" + appName; @@ -205,9 +206,6 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting application: " + appName); @@ -217,7 +215,6 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile System.out.println("Did not create applications in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageUsersGroupsAndRoles.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageUsersGroupsAndRoles.java index 65d60d6d8e9d0..e37a880c70fb8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageUsersGroupsAndRoles.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/authorization/samples/ManageUsersGroupsAndRoles.java @@ -143,9 +143,6 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile Utils.print(group2); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Service Principal: " + spName); @@ -155,7 +152,6 @@ public static boolean runSample(Azure.Authenticated authenticated, AzureProfile System.out.println("Did not create Service Principal in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ConvertVirtualMachineToManagedDisks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ConvertVirtualMachineToManagedDisks.java index e216d398c910e..1b053e8327ffa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ConvertVirtualMachineToManagedDisks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ConvertVirtualMachineToManagedDisks.java @@ -85,9 +85,6 @@ public static boolean runSample(Azure azure) { Utils.print(linuxVM); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -99,8 +96,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVHD.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVHD.java index 2356dfde6f108..04ef7add38dfa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVHD.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVHD.java @@ -227,9 +227,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted custom image"); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -241,7 +238,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVM.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVM.java index 7b1cc6d788c65..c8732bdbb73a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVM.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingCustomImageFromVM.java @@ -207,10 +207,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted custom image"); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -223,7 +219,6 @@ public static boolean runSample(Azure azure) { } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromSnapshot.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromSnapshot.java index d56dbddd12ac5..02b2cda65c302 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromSnapshot.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromSnapshot.java @@ -239,10 +239,6 @@ public static boolean runSample(Azure azure) { System.out.println(String.format("Data disk (lun: %d) SAS Uri: %s", disk.lun(), dataDiskSasUri)); } return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -254,7 +250,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java index a8f24bb138919..4669ec21ffdfe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java @@ -194,10 +194,6 @@ public static boolean runSample(Azure azure) { System.out.println(String.format("Data disk SAS Uri: %s", dataDiskSasUri)); } return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -209,7 +205,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesAsyncTrackingRelatedResources.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesAsyncTrackingRelatedResources.java index 54907b1db76f9..c427f10c6b8ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesAsyncTrackingRelatedResources.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesAsyncTrackingRelatedResources.java @@ -257,9 +257,6 @@ public static boolean runSample(Azure azure) { System.out.println(String.format("Remaining availability sets (should be %d): %d", actualVMCount, actualAvailabilitySetCount)); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Starting the deletion of resource group: " + resourceGroupName); @@ -270,7 +267,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesInParallel.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesInParallel.java index 52a73bd5d74e8..c92ef7d477a8f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesInParallel.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesInParallel.java @@ -194,11 +194,6 @@ public static boolean runSample(Azure azure) { // stopwatch.stop(); // System.out.println("Created a traffic manager profile (took " + (stopwatch.getTime() / 1000) + " seconds to create): " + trafficManagerProfile.id()); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -212,7 +207,6 @@ public static boolean runSample(Azure azure) { } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesUsingCustomImageOrSpecializedVHD.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesUsingCustomImageOrSpecializedVHD.java index 92353e49b7a21..e280244e72349 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesUsingCustomImageOrSpecializedVHD.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachinesUsingCustomImageOrSpecializedVHD.java @@ -162,11 +162,6 @@ public static boolean runSample(Azure azure) { Utils.print(linuxVM3); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -180,7 +175,6 @@ public static boolean runSample(Azure azure) { } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageAvailabilitySet.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageAvailabilitySet.java index 84f971bb22775..7c8be1dac9364 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageAvailabilitySet.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageAvailabilitySet.java @@ -171,11 +171,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted availability set: " + availSet2.id()); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -188,7 +183,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageManagedDisks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageManagedDisks.java index 1993894201e93..a8af702603dfd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageManagedDisks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageManagedDisks.java @@ -330,11 +330,6 @@ public static boolean runSample(Azure azure) { System.out.println("Migrated VM"); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -347,7 +342,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageResourceFromMSIEnabledVirtualMachineBelongsToAADGroup.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageResourceFromMSIEnabledVirtualMachineBelongsToAADGroup.java index 5f1bd6d889086..8933407907774 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageResourceFromMSIEnabledVirtualMachineBelongsToAADGroup.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageResourceFromMSIEnabledVirtualMachineBelongsToAADGroup.java @@ -162,9 +162,6 @@ public static boolean runSample(Azure azure) { System.out.println("Storage account created by az cli using MSI credential"); Utils.print(storageAccount); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -175,7 +172,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageScaleSetUserAssignedMSIFromServicePrincipal.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageScaleSetUserAssignedMSIFromServicePrincipal.java index 7c43e2ccb12ab..2b2c8853f4c9b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageScaleSetUserAssignedMSIFromServicePrincipal.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageScaleSetUserAssignedMSIFromServicePrincipal.java @@ -137,9 +137,6 @@ public static boolean runSample(Azure.Authenticated authenticated) { ex.printStackTrace(); } return true; - } catch (Exception e) { - System.out.println(e.getMessage()); - e.printStackTrace(); } finally { if (azure != null) { azure.resourceGroups().beginDeleteByName(rgName); @@ -157,7 +154,6 @@ public static boolean runSample(Azure.Authenticated authenticated) { e.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageStorageFromMSIEnabledVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageStorageFromMSIEnabledVirtualMachine.java index 65f938266f481..af4b1968de9b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageStorageFromMSIEnabledVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageStorageFromMSIEnabledVirtualMachine.java @@ -106,9 +106,6 @@ public static boolean runSample(Azure azure) { System.out.println("Storage account created by az cli using MSI credential"); Utils.print(storageAccount); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -119,7 +116,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageUserAssignedMSIEnabledVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageUserAssignedMSIEnabledVirtualMachine.java index 8435e61ae2244..03948251d6cf2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageUserAssignedMSIEnabledVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageUserAssignedMSIEnabledVirtualMachine.java @@ -139,9 +139,6 @@ public static boolean runSample(Azure azure) { } return true; - } catch (Exception e) { - System.out.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName1); @@ -154,7 +151,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } private static RunCommandResult runCommandOnVM(Azure azure, VirtualMachine virtualMachine, List commands) { diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachine.java index af04eef9dde3e..20032cb4bfb39 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachine.java @@ -195,11 +195,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted VM: " + windowsVM.id()); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -212,7 +207,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineAsync.java index 34601e63ab44f..41bd3146f960d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineAsync.java @@ -187,11 +187,6 @@ public static boolean runSample(final Azure azure) { .singleOrEmpty().block(); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -204,7 +199,6 @@ public static boolean runSample(final Azure azure) { g.printStackTrace(); } } - return false; } private static boolean isWindowsVM(VirtualMachine vm) { diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java index dcff0252c22b9..b6ea997c5bfcb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java @@ -274,11 +274,6 @@ public static boolean runSample(Azure azure) { System.out.println("Removed the VM Access extensions from Windows VM"); Utils.print(windowsVM); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -290,7 +285,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSet.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSet.java index a112bd87ebf6e..27071d05239e2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSet.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSet.java @@ -328,11 +328,6 @@ public static boolean runSample(Azure azure) { System.out.println("re-started virtual machine scale set"); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -344,7 +339,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java index e42f3a270b6b1..82b3f91d5f18a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java @@ -315,11 +315,6 @@ public static boolean runSample(final Azure azure) { })).singleOrEmpty().block(); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -331,7 +326,6 @@ public static boolean runSample(final Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetWithUnmanagedDisks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetWithUnmanagedDisks.java index 6bb7735af54d7..f7b524f028e50 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetWithUnmanagedDisks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetWithUnmanagedDisks.java @@ -314,11 +314,6 @@ public static boolean runSample(Azure azure) { System.out.println("re-started virtual machine scale set"); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -330,7 +325,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithDisk.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithDisk.java index 4e52a23bd480a..dfd1069373053 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithDisk.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithDisk.java @@ -184,10 +184,6 @@ public static boolean runSample(Azure azure) { System.out.println("Started Linux VM"); Utils.print(linuxVM); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -199,7 +195,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithUnmanagedDisks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithUnmanagedDisks.java index 604b8af365fac..159ebab6f2e02 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithUnmanagedDisks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineWithUnmanagedDisks.java @@ -229,11 +229,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted VM: " + windowsVM.id()); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -246,7 +241,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachinesInParallel.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachinesInParallel.java index 5b2effcbb42c2..5b91a994077e2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachinesInParallel.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachinesInParallel.java @@ -94,11 +94,6 @@ public static boolean runSample(Azure azure) { System.out.println("Virtual Machines create: (took " + (stopwatch.getTime() / 1000) + " seconds) "); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -110,8 +105,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachine.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachine.java index 2bc72499e8d1d..ca3724a43ba4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachine.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachine.java @@ -133,11 +133,6 @@ public static boolean runSample(Azure azure) { Utils.print(virtualMachine2); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -150,7 +145,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachineScaleSet.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachineScaleSet.java index 866f19e67c04e..15b9ed9d12cfb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachineScaleSet.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageZonalVirtualMachineScaleSet.java @@ -210,11 +210,6 @@ public static boolean runSample(Azure azure) { System.out.println("Created zone aware virtual machine scale set: " + virtualMachineScaleSet2.id()); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -226,7 +221,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java index ca4a3c4e5c895..f691078cd0ee8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java @@ -103,9 +103,6 @@ public static boolean runSample(Azure azure) { azure.containerGroups().deleteById(containerGroup.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -117,7 +114,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java index 1776fa8ff2749..42c08e14b170a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java @@ -119,9 +119,6 @@ public static boolean runSample(Azure azure) { } return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -133,7 +130,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java index 8be0b67d59ab2..462749284cc48 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java @@ -88,9 +88,6 @@ public static boolean runSample(Azure azure) { azure.containerGroups().deleteById(containerGroup.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -102,7 +99,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java index 989e82045f308..796c6fe6d535b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java @@ -28,6 +28,7 @@ import com.github.dockerjava.api.model.Container; import com.github.dockerjava.api.model.Image; import com.github.dockerjava.core.command.PushImageResultCallback; +import com.jcraft.jsch.JSchException; import io.fabric8.kubernetes.api.model.LoadBalancerIngress; import io.fabric8.kubernetes.api.model.Namespace; import io.fabric8.kubernetes.api.model.NamespaceBuilder; @@ -46,6 +47,7 @@ import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; +import java.io.IOException; import java.io.OutputStreamWriter; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -85,7 +87,7 @@ public class ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOr * @param secret secondary service principal secret * @return true if sample runs successfully */ - public static boolean runSample(Azure azure, String clientId, String secret) { + public static boolean runSample(Azure azure, String clientId, String secret) throws IOException, InterruptedException, JSchException { final String rgName = azure.sdkContext().randomResourceName("rgaci", 15); final Region region = Region.US_EAST2; @@ -477,9 +479,6 @@ public static boolean runSample(Azure azure, String clientId, String secret) { kubernetesClient.namespaces().delete(ns); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -491,7 +490,6 @@ public static boolean runSample(Azure azure, String clientId, String secret) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistry.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistry.java index cde98263cdc18..23b4917ddba3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistry.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistry.java @@ -24,6 +24,7 @@ import com.github.dockerjava.core.command.PullImageResultCallback; import com.github.dockerjava.core.command.PushImageResultCallback; +import java.io.IOException; import java.util.Date; import java.util.List; @@ -45,7 +46,7 @@ public class ManageContainerRegistry { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { final String rgName = azure.sdkContext().randomResourceName("rgACR", 15); final String acrName = azure.sdkContext().randomResourceName("acrsample", 20); final Region region = Region.US_EAST; @@ -158,9 +159,6 @@ public static boolean runSample(Azure azure) { } return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -172,7 +170,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistryWithWebhooks.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistryWithWebhooks.java index 56cc2c2e0f9f4..df1ed3f80f714 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistryWithWebhooks.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/containerregistry/samples/ManageContainerRegistryWithWebhooks.java @@ -27,6 +27,7 @@ import com.github.dockerjava.api.model.Image; import com.github.dockerjava.core.command.PushImageResultCallback; +import java.io.IOException; import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -48,7 +49,7 @@ public class ManageContainerRegistryWithWebhooks { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException, InterruptedException { final String rgName = azure.sdkContext().randomResourceName("rgACR", 15); final String acrName = azure.sdkContext().randomResourceName("acrsample", 20); final Region region = Region.US_WEST_CENTRAL; @@ -177,9 +178,6 @@ public static boolean runSample(Azure azure) { } return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -191,7 +189,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBTableWithVirtualNetworkRule.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBTableWithVirtualNetworkRule.java index d81da01b32d3f..e37e2a5547628 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBTableWithVirtualNetworkRule.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBTableWithVirtualNetworkRule.java @@ -126,8 +126,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted the CosmosDB"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); } finally { try { System.out.println("Deleting resource group: " + rgName); @@ -139,8 +137,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithEventualConsistency.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithEventualConsistency.java index 0a2e8c6db8205..1a1f3523d525f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithEventualConsistency.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithEventualConsistency.java @@ -85,8 +85,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted the CosmosDB"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); } finally { try { System.out.println("Deleting resource group: " + rgName); @@ -98,8 +96,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } private static void createDBAndAddCollection(String masterKey, String endPoint) { diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java index 9638ab8c027ef..da5c986fb9c7d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java @@ -59,8 +59,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted the CosmosDB"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); } finally { try { System.out.println("Deleting resource group: " + rgName); @@ -72,8 +70,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithKindMongoDB.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithKindMongoDB.java index 792c0455e73ba..e6d8cd952954d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithKindMongoDB.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithKindMongoDB.java @@ -69,8 +69,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted the CosmosDB"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); } finally { try { System.out.println("Deleting resource group: " + rgName); @@ -82,8 +80,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/ManageHACosmosDB.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/ManageHACosmosDB.java index 375aa06f3761b..8a5ddc5250ce8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/ManageHACosmosDB.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/ManageHACosmosDB.java @@ -99,8 +99,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted the CosmosDB"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); } finally { try { System.out.println("Deleting resource group: " + rgName); @@ -112,8 +110,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } private static void createDBAndAddCollection(String masterKey, String endPoint) { diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/dns/samples/ManageDns.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/dns/samples/ManageDns.java index cc01cf82a1446..5f17bcdce60b7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/dns/samples/ManageDns.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/dns/samples/ManageDns.java @@ -26,6 +26,8 @@ import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.samples.Utils; +import java.io.IOException; + /** * Azure DNS sample for managing DNS zones. * - Create a root DNS zone (contoso.com) @@ -46,7 +48,7 @@ public class ManageDns { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { final String customDomainName = "THE CUSTOM DOMAIN THAT YOU OWN (e.g. contoso.com)"; final String rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); final String webAppName = azure.sdkContext().randomResourceName("webapp1-", 20); @@ -257,9 +259,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted child DNS zone " + partnersDnsZone.name()); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -271,7 +270,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java index ca8c9be6d3bcc..465fc0f5d9b60 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHub.java @@ -159,9 +159,6 @@ public static boolean runSample(Azure azure) { Utils.print(eh); } return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -173,7 +170,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java index d3b0e067de962..28268671cc48e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubEvents.java @@ -108,9 +108,6 @@ public static boolean runSample(Azure azure) { // Listen for events from event hub using Event Hub dataplane APIs. return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { if (diagnosticSettingId != null) { @@ -126,8 +123,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java index 11b3fc9f1c421..dc4a91fadd760 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/eventhubs/samples/ManageEventHubGeoDisasterRecovery.java @@ -89,7 +89,7 @@ public static boolean runSample(Azure azure) { pairing = pairing.refresh(); SdkContext.sleep(15 * 1000); if (pairing.provisioningState() == ProvisioningStateDR.FAILED) { - throw new Exception("Provisioning state of the pairing is FAILED"); + throw new IllegalStateException("Provisioning state of the pairing is FAILED"); } } @@ -137,9 +137,6 @@ public static boolean runSample(Azure azure) { System.out.println("Fail over initiated"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { try { @@ -161,7 +158,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/keyvault/samples/ManageKeyVault.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/keyvault/samples/ManageKeyVault.java index a84e8d9d0bc6f..451baf940115f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/keyvault/samples/ManageKeyVault.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/keyvault/samples/ManageKeyVault.java @@ -128,8 +128,6 @@ public static boolean runSample(Azure azure, String clientId) { System.out.println("Deleted the key vaults"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -141,8 +139,6 @@ public static boolean runSample(Azure azure, String clientId) { g.printStackTrace(); } } - - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java index ced9675f88ac3..d04bb15fe6a6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java @@ -26,6 +26,7 @@ import com.github.dockerjava.api.model.Container; import com.github.dockerjava.api.model.Image; import com.github.dockerjava.core.command.PushImageResultCallback; +import com.jcraft.jsch.JSchException; import io.fabric8.kubernetes.api.model.LoadBalancerIngress; import io.fabric8.kubernetes.api.model.Namespace; import io.fabric8.kubernetes.api.model.NamespaceBuilder; @@ -44,6 +45,7 @@ import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; +import java.io.IOException; import java.io.OutputStreamWriter; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -76,7 +78,7 @@ public class DeployImageFromContainerRegistryToKubernetes { * @param secret secondary service principal secret * @return true if sample runs successfully */ - public static boolean runSample(Azure azure, String clientId, String secret) { + public static boolean runSample(Azure azure, String clientId, String secret) throws IOException, JSchException, InterruptedException { final String rgName = azure.sdkContext().randomResourceName("rgaks", 15); final String acrName = azure.sdkContext().randomResourceName("acrsample", 20); final String aksName = azure.sdkContext().randomResourceName("akssample", 30); @@ -429,9 +431,6 @@ public static boolean runSample(Azure azure, String clientId, String secret) { kubernetesClient.namespaces().delete(ns); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -443,7 +442,6 @@ public static boolean runSample(Azure azure, String clientId, String secret) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManageKubernetesCluster.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManageKubernetesCluster.java index 5859b1dd6a3e8..b074ea7c79f74 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManageKubernetesCluster.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManageKubernetesCluster.java @@ -13,7 +13,9 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.SSHShell; import com.azure.resourcemanager.samples.Utils; +import com.jcraft.jsch.JSchException; +import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Date; @@ -34,7 +36,7 @@ public class ManageKubernetesCluster { * @param secret secondary service principal secret * @return true if sample runs successfully */ - public static boolean runSample(Azure azure, String clientId, String secret) { + public static boolean runSample(Azure azure, String clientId, String secret) throws IOException, JSchException { final String rgName = azure.sdkContext().randomResourceName("rgaks", 15); final String aksName = azure.sdkContext().randomResourceName("akssample", 30); final Region region = Region.US_EAST; @@ -118,9 +120,6 @@ public static boolean runSample(Azure azure, String clientId, String secret) { Utils.print(kubernetesCluster); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -132,7 +131,6 @@ public static boolean runSample(Azure azure, String clientId, String secret) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManagedKubernetesClusterWithAdvancedNetworking.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManagedKubernetesClusterWithAdvancedNetworking.java index f64cb84d1e1c1..c4510563d94f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManagedKubernetesClusterWithAdvancedNetworking.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/ManagedKubernetesClusterWithAdvancedNetworking.java @@ -16,7 +16,9 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.SSHShell; import com.azure.resourcemanager.samples.Utils; +import com.jcraft.jsch.JSchException; +import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Date; @@ -38,7 +40,7 @@ public class ManagedKubernetesClusterWithAdvancedNetworking { * @param secret secondary service principal secret * @return true if sample runs successfully */ - public static boolean runSample(Azure azure, String clientId, String secret) { + public static boolean runSample(Azure azure, String clientId, String secret) throws IOException, JSchException { final String rgName = azure.sdkContext().randomResourceName("rgaks", 15); final String vnetName = azure.sdkContext().randomResourceName("vnetaks", 20); final String aksName = azure.sdkContext().randomResourceName("akssample", 30); @@ -150,9 +152,6 @@ public static boolean runSample(Azure azure, String clientId, String secret) { Utils.print(kubernetesCluster); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -164,7 +163,6 @@ public static boolean runSample(Azure azure, String clientId, String secret) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/AutoscaleSettingsBasedOnPerformanceOrSchedule.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/AutoscaleSettingsBasedOnPerformanceOrSchedule.java index f1af5f5fbb0ca..55eff00291112 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/AutoscaleSettingsBasedOnPerformanceOrSchedule.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/AutoscaleSettingsBasedOnPerformanceOrSchedule.java @@ -117,9 +117,6 @@ public static boolean runSample(Azure azure) { // 7. Under the chart, you see the activity log entries for each scale action taken by this autoscale setting. return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { if (azure.resourceGroups().getByName(rgName) != null) { System.out.println("Deleting Resource Group: " + rgName); @@ -129,7 +126,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java index 4a3229f4d4d12..18973810b4524 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/QueryMetricsAndActivityLogs.java @@ -59,7 +59,7 @@ public final class QueryMetricsAndActivityLogs { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { final String storageAccountName = azure.sdkContext().randomResourceName("saMonitor", 20); final String rgName = azure.sdkContext().randomResourceName("rgMonitor", 20); @@ -155,9 +155,6 @@ public static boolean runSample(Azure azure) { } return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { if (azure.resourceGroups().getByName(rgName) != null) { System.out.println("Deleting Resource Group: " + rgName); @@ -167,7 +164,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/SecurityBreachOrRiskActivityLogAlerts.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/SecurityBreachOrRiskActivityLogAlerts.java index 2bc5c7bedfebd..26a9b352d2706 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/SecurityBreachOrRiskActivityLogAlerts.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/SecurityBreachOrRiskActivityLogAlerts.java @@ -123,9 +123,6 @@ public static boolean runSample(Azure azure) { } return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { if (azure.resourceGroups().getByName(rgName) != null) { System.out.println("Deleting Resource Group: " + rgName); @@ -135,7 +132,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/WebAppPerformanceMonitoringAlerts.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/WebAppPerformanceMonitoringAlerts.java index 86300bc65a4ec..8092fdbbd90e0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/WebAppPerformanceMonitoringAlerts.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/monitor/samples/WebAppPerformanceMonitoringAlerts.java @@ -88,9 +88,6 @@ public static boolean runSample(Azure azure) { Utils.print(ma); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { if (azure.resourceGroups().getByName(rgName) != null) { System.out.println("Deleting Resource Group: " + rgName); @@ -100,7 +97,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/CreateSimpleInternetFacingLoadBalancer.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/CreateSimpleInternetFacingLoadBalancer.java index c2f2845a16893..b2cb93a79f7eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/CreateSimpleInternetFacingLoadBalancer.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/CreateSimpleInternetFacingLoadBalancer.java @@ -187,11 +187,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted load balancer" + loadBalancerName); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + resourceGroupName); @@ -203,7 +198,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageApplicationGateway.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageApplicationGateway.java index 8fbf05043687b..a5c6eb4860744 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageApplicationGateway.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageApplicationGateway.java @@ -25,6 +25,7 @@ import org.apache.commons.lang.time.StopWatch; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -81,7 +82,7 @@ public final class ManageApplicationGateway { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { final String rgName = azure.sdkContext().randomResourceName("rgNEAG", 15); final String pipName = azure.sdkContext().randomResourceName("pip" + "-", 18); @@ -297,11 +298,6 @@ public static boolean runSample(Azure azure) { System.out.println("Application gateway updated: (took " + (stopwatch.getTime() / 1000) + " seconds)"); Utils.print(applicationGateway); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -313,7 +309,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRoute.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRoute.java index 2685eea31d70c..9f154998d5c33 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRoute.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRoute.java @@ -106,9 +106,6 @@ public static boolean runSample(Azure azure) { System.out.println("Created virtual network gateway connection"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -119,7 +116,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRouteCrossConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRouteCrossConnection.java index 890ea991e05c8..4ba482d6c3006 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRouteCrossConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageExpressRouteCrossConnection.java @@ -30,77 +30,72 @@ public final class ManageExpressRouteCrossConnection { */ public static boolean runSample(Azure azure) { final String connectionId = ""; - try { - //============================================================ - // list Express Route Cross Connections - System.out.println("List express route cross connection..."); - azure.expressRouteCrossConnections().list().forEach(expressRouteCrossConnection -> - System.out.println(expressRouteCrossConnection.name())); - System.out.println(); - - //============================================================ - // get Express Route Cross Connection by id - ExpressRouteCrossConnection crossConnection = azure.expressRouteCrossConnections().getById(connectionId); - - //============================================================ - // create Express Route Cross Connection private peering - crossConnection.peerings() - .defineAzurePrivatePeering() - .withPrimaryPeerAddressPrefix("10.0.0.0/30") - .withSecondaryPeerAddressPrefix("10.0.0.4/30") - .withVlanId(100) - .withPeerAsn(500) - .withSharedKey("A1B2C3D4") - .create(); - - //============================================================ - // create Express Route Cross Connection Microsoft peering - crossConnection.peerings() - .defineMicrosoftPeering() - .withAdvertisedPublicPrefixes("123.1.0.0/24") - .withCustomerAsn(45) - .withRoutingRegistryName("ARIN") - .withPrimaryPeerAddressPrefix("10.0.0.0/30") - .withSecondaryPeerAddressPrefix("10.0.0.4/30") - .withVlanId(600) - .withPeerAsn(500) - .withSharedKey("A1B2C3D4") - .defineIpv6Config() - .withAdvertisedPublicPrefix("3FFE:FFFF:0:CD31::/120") - .withCustomerAsn(23) - .withRoutingRegistryName("ARIN") - .withPrimaryPeerAddressPrefix("3FFE:FFFF:0:CD30::/126") - .withSecondaryPeerAddressPrefix("3FFE:FFFF:0:CD30::4/126") - .attach() - .create(); - - //============================================================ - // update Microsoft peering - crossConnection.peerings() - .getByName("MicrosoftPeering") - .update() - .withoutIpv6Config() - .withAdvertisedPublicPrefixes("123.1.0.0/30") - .apply(); - - //============================================================ - // update private peering from crossconnection resource - crossConnection.peeringsMap().get("AzurePrivatePeering") - .update() - .withPrimaryPeerAddressPrefix("10.1.0.0/30") - .apply(); - - //============================================================ - // delete peerings - crossConnection.peerings().deleteByName("AzurePrivatePeering"); - crossConnection.peerings().deleteByName("MicrosoftPeering"); - - return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); - } - return false; + + //============================================================ + // list Express Route Cross Connections + System.out.println("List express route cross connection..."); + azure.expressRouteCrossConnections().list().forEach(expressRouteCrossConnection -> + System.out.println(expressRouteCrossConnection.name())); + System.out.println(); + + //============================================================ + // get Express Route Cross Connection by id + ExpressRouteCrossConnection crossConnection = azure.expressRouteCrossConnections().getById(connectionId); + + //============================================================ + // create Express Route Cross Connection private peering + crossConnection.peerings() + .defineAzurePrivatePeering() + .withPrimaryPeerAddressPrefix("10.0.0.0/30") + .withSecondaryPeerAddressPrefix("10.0.0.4/30") + .withVlanId(100) + .withPeerAsn(500) + .withSharedKey("A1B2C3D4") + .create(); + + //============================================================ + // create Express Route Cross Connection Microsoft peering + crossConnection.peerings() + .defineMicrosoftPeering() + .withAdvertisedPublicPrefixes("123.1.0.0/24") + .withCustomerAsn(45) + .withRoutingRegistryName("ARIN") + .withPrimaryPeerAddressPrefix("10.0.0.0/30") + .withSecondaryPeerAddressPrefix("10.0.0.4/30") + .withVlanId(600) + .withPeerAsn(500) + .withSharedKey("A1B2C3D4") + .defineIpv6Config() + .withAdvertisedPublicPrefix("3FFE:FFFF:0:CD31::/120") + .withCustomerAsn(23) + .withRoutingRegistryName("ARIN") + .withPrimaryPeerAddressPrefix("3FFE:FFFF:0:CD30::/126") + .withSecondaryPeerAddressPrefix("3FFE:FFFF:0:CD30::4/126") + .attach() + .create(); + + //============================================================ + // update Microsoft peering + crossConnection.peerings() + .getByName("MicrosoftPeering") + .update() + .withoutIpv6Config() + .withAdvertisedPublicPrefixes("123.1.0.0/30") + .apply(); + + //============================================================ + // update private peering from crossconnection resource + crossConnection.peeringsMap().get("AzurePrivatePeering") + .update() + .withPrimaryPeerAddressPrefix("10.1.0.0/30") + .apply(); + + //============================================================ + // delete peerings + crossConnection.peerings().deleteByName("AzurePrivatePeering"); + crossConnection.peerings().deleteByName("MicrosoftPeering"); + + return true; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageIPAddress.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageIPAddress.java index d8f86e4cdf082..64fab315f96a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageIPAddress.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageIPAddress.java @@ -148,8 +148,6 @@ public static boolean runSample(Azure azure) { azure.publicIpAddresses().deleteById(publicIPAddress.id()); System.out.println("Deleted the public IP address"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -161,7 +159,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternalLoadBalancer.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternalLoadBalancer.java index 587ea990accb8..79e17404c968f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternalLoadBalancer.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternalLoadBalancer.java @@ -411,11 +411,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted load balancer" + loadBalancerName4); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -426,7 +421,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternetFacingLoadBalancer.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternetFacingLoadBalancer.java index 59226fae78c4f..638f71d632c74 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternetFacingLoadBalancer.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageInternetFacingLoadBalancer.java @@ -472,11 +472,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted load balancer" + loadBalancerName2); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -487,7 +482,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkInterface.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkInterface.java index 9175221c902ad..71b3d041c508b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkInterface.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkInterface.java @@ -184,11 +184,6 @@ public static boolean runSample(Azure azure) { Utils.print(networkinterface); } return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -202,7 +197,6 @@ public static boolean runSample(Azure azure) { } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkPeeringInSameSubscription.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkPeeringInSameSubscription.java index 9fd1920b3ef42..00a5d3044e3de 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkPeeringInSameSubscription.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkPeeringInSameSubscription.java @@ -150,11 +150,6 @@ public static boolean runSample(Azure azure) { Utils.print(networkB); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + resourceGroupName); @@ -165,7 +160,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkSecurityGroup.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkSecurityGroup.java index 7c9a9ca3961f5..ce01b175e68cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkSecurityGroup.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkSecurityGroup.java @@ -20,7 +20,9 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.samples.SSHShell; import com.azure.resourcemanager.samples.Utils; +import com.jcraft.jsch.JSchException; +import java.io.UnsupportedEncodingException; import java.util.Date; /** @@ -41,7 +43,7 @@ public final class ManageNetworkSecurityGroup { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws UnsupportedEncodingException, JSchException { final Region region = Region.US_NORTH_CENTRAL; final String frontEndNSGName = azure.sdkContext().randomResourceName("fensg", 24); final String backEndNSGName = azure.sdkContext().randomResourceName("bensg", 24); @@ -275,11 +277,6 @@ public static boolean runSample(Azure azure) { System.out.println("Updated the front end network security group"); Utils.print(frontEndNSG); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -292,7 +289,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java index b11f7d4c1bb6e..3b479caac3eba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java @@ -295,9 +295,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted network watcher"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -312,8 +309,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageSimpleApplicationGateway.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageSimpleApplicationGateway.java index 7e3bca5d7b88a..b0d681a75bae6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageSimpleApplicationGateway.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageSimpleApplicationGateway.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.samples.Utils; import java.io.File; +import java.io.IOException; /** * Azure network sample for managing application gateways. @@ -59,7 +60,7 @@ public final class ManageSimpleApplicationGateway { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { final String rgName = azure.sdkContext().randomResourceName("rgNEAGS", 15); try { //======================================================================= @@ -123,11 +124,6 @@ public static boolean runSample(Azure azure) { System.out.println("Application gateway updated: (took " + (t2 - t1) / 1000 + " seconds)"); Utils.print(applicationGateway); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -139,7 +135,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualMachinesInParallelWithNetwork.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualMachinesInParallelWithNetwork.java index 8a9ad7e310896..1569ec7dae1ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualMachinesInParallelWithNetwork.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualMachinesInParallelWithNetwork.java @@ -218,11 +218,6 @@ public static boolean runSample(Azure azure) { System.out.println("Virtual Machines create: (took " + (stopwatch.getTime() / 1000) + " seconds) "); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -236,7 +231,6 @@ public static boolean runSample(Azure azure) { } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetwork.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetwork.java index dd1b8874ed1b1..e28ea5d0246b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetwork.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetwork.java @@ -237,8 +237,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted the virtual network"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -249,8 +247,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetworkAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetworkAsync.java index 73951e352d5e5..fdcfac83a4965 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetworkAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVirtualNetworkAsync.java @@ -251,9 +251,6 @@ public static boolean runSample(final Azure azure) { } return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -265,8 +262,6 @@ public static boolean runSample(final Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayPoint2SiteConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayPoint2SiteConnection.java index 6e79488140c3c..219b4d35eb624 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayPoint2SiteConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayPoint2SiteConnection.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.samples.Utils; import java.io.File; +import java.io.IOException; /** * Azure Network sample for managing virtual network gateway. @@ -42,7 +43,7 @@ public final class ManageVpnGatewayPoint2SiteConnection { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { final String certPath = System.getenv("CERT_PATH"); final String clientCertThumbprint = System.getenv("CLIENT_CERT_THUMBPRINT"); final Region region = Region.US_WEST2; @@ -109,9 +110,6 @@ public static boolean runSample(Azure azure) { System.out.println("Revoked client certificate"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -122,8 +120,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewaySite2SiteConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewaySite2SiteConnection.java index 9868c60a57a9d..4964ffae5dbdf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewaySite2SiteConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewaySite2SiteConnection.java @@ -100,9 +100,6 @@ public static boolean runSample(Azure azure) { vngw.reset(); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -113,7 +110,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayVNet2VNetConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayVNet2VNetConnection.java index 5305865194351..7df0ca9604892 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayVNet2VNetConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/ManageVpnGatewayVNet2VNetConnection.java @@ -223,9 +223,6 @@ public static boolean runSample(Azure azure) { .execute(); System.out.println("Connectivity status: " + connectivity.connectionStatus()); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -236,8 +233,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/VerifyNetworkPeeringWithNetworkWatcher.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/VerifyNetworkPeeringWithNetworkWatcher.java index 9759f45a3c91a..d1dbc5a195797 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/VerifyNetworkPeeringWithNetworkWatcher.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/network/samples/VerifyNetworkPeeringWithNetworkWatcher.java @@ -181,11 +181,6 @@ public static boolean runSample(Azure azure) { System.out.println("Connectivity from B to A: " + connectivityBtoA.execute().connectionStatus()); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + resourceGroupName); @@ -196,7 +191,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/privatedns/samples/ManagePrivateDns.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/privatedns/samples/ManagePrivateDns.java index b6e9a768973b6..409b135a74d7b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/privatedns/samples/ManagePrivateDns.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/privatedns/samples/ManagePrivateDns.java @@ -162,9 +162,6 @@ public static boolean runSample(Azure azure) { System.out.println(status.message()); } return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -176,7 +173,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/rediscache/samples/ManageRedisCache.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/rediscache/samples/ManageRedisCache.java index 4d3374e22a12a..d992c68279e8a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/rediscache/samples/ManageRedisCache.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/rediscache/samples/ManageRedisCache.java @@ -148,9 +148,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted Redis Cache"); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { if (azure.resourceGroups().getByName(rgName) != null) { System.out.println("Deleting Resource Group: " + rgName); @@ -160,7 +157,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplate.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplate.java index c1f9a4fb05018..6af54b56b6c55 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplate.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplate.java @@ -34,7 +34,7 @@ public final class DeployUsingARMTemplate { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException, IllegalAccessException { final String rgName = azure.sdkContext().randomResourceName("rgRSAT", 24); final String deploymentName = azure.sdkContext().randomResourceName("dpRSAT", 24); try { @@ -70,11 +70,6 @@ public static boolean runSample(Azure azure) { System.out.println("Started a deployment for an Azure App Service: " + deploymentName); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { Deployment deployment = azure.deployments() @@ -110,7 +105,6 @@ public static boolean runSample(Azure azure) { } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateAsync.java index 41c9b30f9112a..61cdc85800757 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateAsync.java @@ -38,7 +38,7 @@ public final class DeployUsingARMTemplateAsync { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(final Azure azure) { + public static boolean runSample(final Azure azure) throws InterruptedException { final String rgPrefix = azure.sdkContext().randomResourceName("rgJavaTest", 16); final String deploymentPrefix = azure.sdkContext().randomResourceName("javaTest", 16); final String sshKey = getSSHPublicKey(); @@ -115,11 +115,6 @@ public static boolean runSample(final Azure azure) { String.join(", ", succeeded), String.join(", ", failed))); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { for (int i = 1; i != numDeployments; i++) { @@ -135,7 +130,6 @@ public static boolean runSample(final Azure azure) { } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithDeploymentOperations.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithDeploymentOperations.java index 9d340d853e026..283aba87eaa5c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithDeploymentOperations.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithDeploymentOperations.java @@ -40,7 +40,7 @@ public final class DeployUsingARMTemplateWithDeploymentOperations { * @param defaultPollingInterval polling interval in seconds * @return true if sample runs successfully */ - public static boolean runSample(final Azure azure, int defaultPollingInterval) { + public static boolean runSample(final Azure azure, int defaultPollingInterval) throws InterruptedException { final String rgPrefix = azure.sdkContext().randomResourceName("rgJavaTest", 16); final String deploymentPrefix = azure.sdkContext().randomResourceName("javaTest", 16); final String sshKey = getSSHPublicKey(); @@ -150,11 +150,6 @@ public static boolean runSample(final Azure azure, int defaultPollingInterval) { String.join(", ", succeeded), String.join(", ", failed))); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { for (int i = 1; i != numDeployments; i++) { @@ -170,7 +165,6 @@ public static boolean runSample(final Azure azure, int defaultPollingInterval) { } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithProgress.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithProgress.java index 0850c6a092a3d..b97e96d7c8d29 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithProgress.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithProgress.java @@ -34,7 +34,7 @@ public final class DeployUsingARMTemplateWithProgress { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException, IllegalAccessException { final String rgName = azure.sdkContext().randomResourceName("rgRSAP", 24); final String deploymentName = azure.sdkContext().randomResourceName("dpRSAP", 24); try { @@ -78,11 +78,6 @@ public static boolean runSample(Azure azure) { System.out.println("Current deployment status : " + deployment.provisioningState()); } return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -95,7 +90,6 @@ public static boolean runSample(Azure azure) { } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithTags.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithTags.java index c3b48f27bb030..a379360fd11a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithTags.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployUsingARMTemplateWithTags.java @@ -38,7 +38,7 @@ public final class DeployUsingARMTemplateWithTags { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException, IllegalAccessException { final String rgName = azure.sdkContext().randomResourceName("rgRSAT", 24); final String deploymentName = azure.sdkContext().randomResourceName("dpRSAT", 24); try { @@ -96,11 +96,6 @@ public static boolean runSample(Azure azure) { System.out.println(genericResource.resourceProviderNamespace() + "/" + genericResource.resourceType() + ": " + genericResource.name()); } return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -114,7 +109,6 @@ public static boolean runSample(Azure azure) { } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployVirtualMachineUsingARMTemplate.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployVirtualMachineUsingARMTemplate.java index 8130671de695f..9f3b23c8fd31b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployVirtualMachineUsingARMTemplate.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/DeployVirtualMachineUsingARMTemplate.java @@ -32,7 +32,7 @@ public class DeployVirtualMachineUsingARMTemplate { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException, IllegalAccessException { final String rgName = azure.sdkContext().randomResourceName("rgRSAT", 24); final String deploymentName = azure.sdkContext().randomResourceName("dpRSAT", 24); try { @@ -77,11 +77,6 @@ public static boolean runSample(Azure azure) { System.out.println("Current deployment status : " + deployment.provisioningState()); } return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -94,7 +89,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResource.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResource.java index 168bd815d99d3..596e21b738eeb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResource.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResource.java @@ -104,11 +104,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted storage account: " + resourceName2); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -121,7 +116,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResourceGroup.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResourceGroup.java index e59c71bc0045d..372325f92beb2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResourceGroup.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/resources/samples/ManageResourceGroup.java @@ -89,11 +89,6 @@ public static boolean runSample(Azure azure) { azure.resourceGroups().beginDeleteByName(rgName2); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -105,7 +100,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/DockerUtils.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/DockerUtils.java index c81be18ff1511..9bd00d78255d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/DockerUtils.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/DockerUtils.java @@ -92,7 +92,7 @@ public SSLContext getSSLContext() { * @throws Exception exception thrown */ public static DockerClient createDockerClient(Azure azure, String rgName, Region region, - String registryServerUrl, String username, String password) throws Exception { + String registryServerUrl, String username, String password) throws IOException { final String envDockerHost = System.getenv("DOCKER_HOST"); final String envDockerCertPath = System.getenv("DOCKER_CERT_PATH"); String dockerHostUrl; @@ -188,7 +188,7 @@ public static DockerClientConfig createDockerClientConfig(String host, String re * @throws Exception exception thrown */ public static DockerClient fromNewDockerVM(Azure azure, String rgName, Region region, - String registryServerUrl, String username, String password) throws Exception { + String registryServerUrl, String username, String password) { final String dockerVMName = azure.sdkContext().randomResourceName("dockervm", 15); final String publicIPDnsLabel = azure.sdkContext().randomResourceName("pip", 10); final String vmUserName = "dockerUser"; diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/SSHShell.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/SSHShell.java index 94c0bdd6f2d77..3a58a09304727 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/SSHShell.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/SSHShell.java @@ -22,6 +22,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Hashtable; @@ -310,7 +311,7 @@ public void run(ExpectState expectState) throws Exception { * @return SSH public and private key * @throws Exception exception thrown */ - public static SshPublicPrivateKey generateSSHKeys(String passPhrase, String comment) throws Exception { + public static SshPublicPrivateKey generateSSHKeys(String passPhrase, String comment) throws UnsupportedEncodingException, JSchException { JSch jsch = new JSch(); KeyPair keyPair = KeyPair.genKeyPair(jsch, KeyPair.RSA); ByteArrayOutputStream privateKeyBuff = new ByteArrayOutputStream(2048); diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java index 9e9145d41b367..5890052d5d9e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/samples/Utils.java @@ -1499,7 +1499,7 @@ public static void print(KubernetesCluster kubernetesCluster) { * @return a service principal client ID * @throws Exception exception */ - public static String getSecondaryServicePrincipalClientID(String envSecondaryServicePrincipal) throws Exception { + public static String getSecondaryServicePrincipalClientID(String envSecondaryServicePrincipal) throws IOException { String content = new String(Files.readAllBytes(new File(envSecondaryServicePrincipal).toPath()), StandardCharsets.UTF_8).trim(); HashMap auth = new HashMap<>(); @@ -1522,7 +1522,7 @@ public static String getSecondaryServicePrincipalClientID(String envSecondarySer * @return a service principal secret * @throws Exception exception */ - public static String getSecondaryServicePrincipalSecret(String envSecondaryServicePrincipal) throws Exception { + public static String getSecondaryServicePrincipalSecret(String envSecondaryServicePrincipal) throws IOException { String content = new String(Files.readAllBytes(new File(envSecondaryServicePrincipal).toPath()), StandardCharsets.UTF_8).trim(); HashMap auth = new HashMap<>(); @@ -1560,7 +1560,7 @@ public static String getSecondaryServicePrincipalSecret(String envSecondaryServi * @throws IOException IO Exception */ public static void createCertificate(String certPath, String pfxPath, - String alias, String password, String cnName) throws Exception { + String alias, String password, String cnName) throws IOException { if (new File(pfxPath).exists()) { return; } @@ -1621,7 +1621,7 @@ public static void createCertificate(String certPath, String pfxPath, * @throws Exception exceptions thrown from the execution */ public static String cmdInvocation(String[] command, - boolean ignoreErrorStream) throws Exception { + boolean ignoreErrorStream) throws IOException { String result = ""; String error = ""; @@ -1639,11 +1639,11 @@ public static String cmdInvocation(String[] command, // To do - Log error message if (!ignoreErrorStream) { - throw new Exception(error, null); + throw new IOException(error, null); } } } catch (Exception e) { - throw new Exception("Exception occurred while invoking command", e); + throw new RuntimeException("Exception occurred while invoking command", e); } return result; } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeAdvanceFeatures.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeAdvanceFeatures.java index 28f48be51a3a5..c2aa8db6b26af 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeAdvanceFeatures.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeAdvanceFeatures.java @@ -185,9 +185,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted namespace " + namespaceName + "..."); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -199,7 +196,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeBasic.java index 01b8df470b50f..a714f852670ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeBasic.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusPublishSubscribeBasic.java @@ -169,9 +169,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted namespace " + namespaceName + "..."); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -183,7 +180,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueAdvanceFeatures.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueAdvanceFeatures.java index 8d869bea05457..8419c0d534c53 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueAdvanceFeatures.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueAdvanceFeatures.java @@ -161,9 +161,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted namespace " + namespaceName + "..."); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -175,7 +172,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueBasic.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueBasic.java index b5c6cc913885b..0b7fe0e05d9a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueBasic.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusQueueBasic.java @@ -165,9 +165,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted namespace " + namespaceName + "..."); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -179,7 +176,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusWithClaimBasedAuthorization.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusWithClaimBasedAuthorization.java index 178df4e73c045..181e837d86d7e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusWithClaimBasedAuthorization.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/servicebus/samples/ServiceBusWithClaimBasedAuthorization.java @@ -125,9 +125,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted namespace " + namespaceName + "..."); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -139,7 +136,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/GettingSqlServerMetrics.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/GettingSqlServerMetrics.java index bd01546667e54..09bf4751a18cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/GettingSqlServerMetrics.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/GettingSqlServerMetrics.java @@ -30,6 +30,7 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.sql.SQLException; import java.sql.Statement; import java.time.Duration; import java.time.OffsetDateTime; @@ -50,7 +51,7 @@ public class GettingSqlServerMetrics { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws ClassNotFoundException, SQLException { final String sqlServerName = azure.sdkContext().randomResourceName("sqltest", 20); final String dbName = "dbSample"; final String epName = "epSample"; @@ -312,9 +313,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleting the Sql Server"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -324,7 +322,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabase.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabase.java index aee34da87a22e..390c7c8d709b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabase.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabase.java @@ -113,9 +113,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleting a Sql Server"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -125,7 +122,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabaseInElasticPool.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabaseInElasticPool.java index 8d9cb4c76876a..8a3e1b6c5a5b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabaseInElasticPool.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabaseInElasticPool.java @@ -200,9 +200,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleting a Sql Server"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -212,7 +209,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabasesAcrossDifferentDataCenters.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabasesAcrossDifferentDataCenters.java index a72fb3d9ea9d3..26426d848d03b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabasesAcrossDifferentDataCenters.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlDatabasesAcrossDifferentDataCenters.java @@ -197,9 +197,6 @@ public static boolean runSample(Azure azure) { azure.sqlServers().deleteById(sqlServer.id()); } return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -209,7 +206,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFailoverGroups.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFailoverGroups.java index 81c969d730310..6c5ef6be12616 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFailoverGroups.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFailoverGroups.java @@ -155,9 +155,6 @@ public static boolean runSample(Azure azure) { azure.sqlServers().deleteById(sqlPrimaryServer.id()); azure.sqlServers().deleteById(sqlSecondaryServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -167,7 +164,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFirewallRules.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFirewallRules.java index 853c2194b0f3c..68ea80572dc5d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFirewallRules.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlFirewallRules.java @@ -108,9 +108,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleting a Sql Server"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -120,7 +117,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlImportExportDatabase.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlImportExportDatabase.java index 835e7c5bc0579..b2d02abd99eb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlImportExportDatabase.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlImportExportDatabase.java @@ -125,9 +125,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleting a Sql Server"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -137,7 +134,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerDnsAliases.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerDnsAliases.java index 6b754bce9317e..ecc1ec01cc7d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerDnsAliases.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerDnsAliases.java @@ -18,6 +18,7 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; +import java.sql.SQLException; import java.sql.Statement; /** @@ -37,7 +38,7 @@ public class ManageSqlServerDnsAliases { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws ClassNotFoundException, SQLException { final String sqlServerForTestName = azure.sdkContext().randomResourceName("sqltest", 20); final String sqlServerForProdName = azure.sdkContext().randomResourceName("sqlprod", 20); final String sqlServerDnsAlias = azure.sdkContext().randomResourceName("sqlserver", 20); @@ -199,9 +200,6 @@ public static boolean runSample(Azure azure) { azure.sqlServers().deleteById(sqlServerForTest.id()); azure.sqlServers().deleteById(sqlServerForProd.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -211,7 +209,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerKeysWithAzureKeyVaultKey.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerKeysWithAzureKeyVaultKey.java index d5446b556c8cf..0c3851e32bfa2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerKeysWithAzureKeyVaultKey.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerKeysWithAzureKeyVaultKey.java @@ -135,9 +135,6 @@ public static boolean runSample(Azure azure, String objectId) { System.out.println("Deleting a Sql Server"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -147,7 +144,6 @@ public static boolean runSample(Azure azure, String objectId) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerSecurityAlertPolicy.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerSecurityAlertPolicy.java index 2ccf2261d16bd..85d405f8a981d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerSecurityAlertPolicy.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlServerSecurityAlertPolicy.java @@ -102,9 +102,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleting the Sql Servers"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -114,7 +111,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlVirtualNetworkRules.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlVirtualNetworkRules.java index 388dcad214898..3c64542bd907b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlVirtualNetworkRules.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlVirtualNetworkRules.java @@ -128,9 +128,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleting a Sql Server"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -140,7 +137,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlWithRecoveredOrRestoredDatabase.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlWithRecoveredOrRestoredDatabase.java index c8a222b060ab6..3d63d1dca4585 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlWithRecoveredOrRestoredDatabase.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/sql/samples/ManageSqlWithRecoveredOrRestoredDatabase.java @@ -139,9 +139,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleting a Sql Server"); azure.sqlServers().deleteById(sqlServer.id()); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -151,7 +148,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccount.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccount.java index 68a9dfb72dfb8..a3f284587ddc9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccount.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccount.java @@ -139,9 +139,6 @@ public static boolean runSample(Azure azure) { System.out.println("Deleted storage account"); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -151,7 +148,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountAsync.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountAsync.java index 0abe475919d34..9dffbedee150c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountAsync.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountAsync.java @@ -94,9 +94,6 @@ public static boolean runSample(final Azure azure) { }).blockLast(); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -106,7 +103,6 @@ public static boolean runSample(final Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountNetworkRules.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountNetworkRules.java index af614641db3bf..83ab22f63d65f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountNetworkRules.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/storage/samples/ManageStorageAccountNetworkRules.java @@ -142,9 +142,6 @@ public static boolean runSample(Azure azure) { Utils.print(storageAccount); return true; - } catch (Exception f) { - System.out.println(f.getMessage()); - f.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -154,7 +151,6 @@ public static boolean runSample(Azure azure) { System.out.println("Did not create any resources in Azure. No clean up is necessary"); } } - return false; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageSimpleTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageSimpleTrafficManager.java index 505b752521e5f..a9b978621934c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageSimpleTrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageSimpleTrafficManager.java @@ -134,11 +134,6 @@ public static boolean runSample(Azure azure) { System.out.println("Modified the traffic manager to use priority-based routing."); return true; - } catch (Exception f) { - - System.out.println(f.getMessage()); - f.printStackTrace(); - } finally { try { @@ -151,7 +146,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageTrafficManager.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageTrafficManager.java index 1cedbea9cc5aa..7ab80e8c2ce74 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageTrafficManager.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/trafficmanager/samples/ManageTrafficManager.java @@ -22,6 +22,7 @@ import com.azure.resourcemanager.trafficmanager.models.TrafficManagerProfile; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Locale; @@ -48,7 +49,7 @@ public final class ManageTrafficManager { * @param azure instance of the azure client * @return true if sample runs successfully */ - public static boolean runSample(Azure azure) { + public static boolean runSample(Azure azure) throws IOException { final String rgName = azure.sdkContext().randomResourceName("rgNEMV_", 24); final String domainName = azure.sdkContext().randomResourceName("jsdkdemo-", 20) + ".com"; // [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Serves as an example, not for deployment. Please change when using this in your code.")] @@ -230,9 +231,6 @@ public static boolean runSample(Azure azure) { azure.trafficManagerProfiles().deleteById(trafficManagerProfile.id()); System.out.println("Traffic manager profile deleted"); return true; - } catch (Exception e) { - System.err.println(e.getMessage()); - e.printStackTrace(); } finally { try { System.out.println("Deleting Resource Group: " + rgName); @@ -244,7 +242,6 @@ public static boolean runSample(Azure azure) { g.printStackTrace(); } } - return false; } /** * Main entry point. diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java index 85f2c2393a187..bd0f2a1674d4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java @@ -8,11 +8,16 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; + public class AppPlatformLiveOnlyTests extends SamplesTestBase { @Test @DoNotRecord - public void testSpringCloud() { + public void testSpringCloud() throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException { if (skipInPlayback()) { return; } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java index 8fa7237137b4d..7737b44f7bb17 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleLiveOnlyTests.java @@ -22,14 +22,17 @@ import com.azure.resourcemanager.appservice.samples.ManageWebAppStorageAccountConnection; import com.azure.resourcemanager.appservice.samples.ManageWebAppWithDomainSsl; import com.azure.resourcemanager.appservice.samples.ManageWebAppWithTrafficManager; +import org.eclipse.jgit.api.errors.GitAPIException; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class AppServiceSampleLiveOnlyTests extends SamplesTestBase { @Test @DoNotRecord - public void testManageWebAppSourceControl() { + public void testManageWebAppSourceControl() throws GitAPIException { if (skipInPlayback()) { return; } @@ -49,7 +52,7 @@ public void testManageWebAppStorageAccountConnection() { @Test @DoNotRecord - public void testManageLinuxWebAppSourceControl() { + public void testManageLinuxWebAppSourceControl() throws GitAPIException { if (skipInPlayback()) { return; } @@ -69,7 +72,7 @@ public void testManageLinuxWebAppStorageAccountConnection() { @Test @DoNotRecord - public void testManageLinuxWebAppWithContainerRegistry() { + public void testManageLinuxWebAppWithContainerRegistry() throws IOException, InterruptedException { if (skipInPlayback()) { return; } @@ -79,7 +82,7 @@ public void testManageLinuxWebAppWithContainerRegistry() { @Test @DoNotRecord - public void testManageFunctionAppWithAuthentication() { + public void testManageFunctionAppWithAuthentication() throws GitAPIException { if (skipInPlayback()) { return; } @@ -89,7 +92,7 @@ public void testManageFunctionAppWithAuthentication() { @Test @DoNotRecord - public void testManageFunctionAppSourceControl() { + public void testManageFunctionAppSourceControl() throws GitAPIException { if (skipInPlayback()) { return; } @@ -129,7 +132,7 @@ public void testManageWebAppCosmosDbThroughKeyVault() { @Test @DoNotRecord - public void testManageFunctionAppLogs() { + public void testManageFunctionAppLogs() throws IOException { if (skipInPlayback()) { return; } @@ -139,7 +142,7 @@ public void testManageFunctionAppLogs() { @Test @DoNotRecord - public void testManageWebAppLogs() { + public void testManageWebAppLogs() throws IOException { if (skipInPlayback()) { return; } @@ -159,7 +162,7 @@ public void testManageLinuxFunctionAppSourceControl() { @Test @DoNotRecord - public void testManageWebAppWithDomainSsl() { + public void testManageWebAppWithDomainSsl() throws IOException { if (skipInPlayback()) { return; } @@ -169,7 +172,7 @@ public void testManageWebAppWithDomainSsl() { @Test @DoNotRecord - public void testManageWebAppWithTrafficManager() { + public void testManageWebAppWithTrafficManager() throws IOException { if (skipInPlayback()) { return; } @@ -179,7 +182,7 @@ public void testManageWebAppWithTrafficManager() { @Test @DoNotRecord - public void testManageLinuxWebAppWithDomainSsl() { + public void testManageLinuxWebAppWithDomainSsl() throws IOException { if (skipInPlayback()) { return; } @@ -189,7 +192,7 @@ public void testManageLinuxWebAppWithDomainSsl() { @Test @DoNotRecord - public void testManageLinuxWebAppWithTrafficManager() { + public void testManageLinuxWebAppWithTrafficManager() throws IOException { if (skipInPlayback()) { return; } @@ -199,7 +202,7 @@ public void testManageLinuxWebAppWithTrafficManager() { @Test @DoNotRecord - public void testManageFunctionAppWithDomainSsl() { + public void testManageFunctionAppWithDomainSsl() throws IOException { if (skipInPlayback()) { return; } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleTests.java index 5aca71b42d0e1..e37016ee3d879 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/AppServiceSampleTests.java @@ -15,6 +15,8 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class AppServiceSampleTests extends SamplesTestBase { @Test public void testManageWebAppBasic() { @@ -35,7 +37,7 @@ public void testManageWebAppSourceControlAsync() { @Test @Disabled("Stops in between for user input") - public void testManageWebAppSqlConnection() { + public void testManageWebAppSqlConnection() throws IOException { Assertions.assertTrue(ManageWebAppSqlConnection.runSample(azure)); } @@ -46,7 +48,7 @@ public void testManageLinuxWebAppBasic() { @Test @Disabled("Stops in between for user input") - public void testManageLinuxWebAppSqlConnection() { + public void testManageLinuxWebAppSqlConnection() throws IOException { Assertions.assertTrue(ManageLinuxWebAppSqlConnection.runSample(azure)); } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerInstanceTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerInstanceTests.java index d96f09f4beef4..622b2cb5780cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerInstanceTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerInstanceTests.java @@ -7,9 +7,12 @@ import com.azure.resourcemanager.containerinstance.samples.ManageContainerInstanceWithManualAzureFileShareMountCreation; import com.azure.resourcemanager.containerinstance.samples.ManageContainerInstanceWithMultipleContainerImages; import com.azure.resourcemanager.containerinstance.samples.ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator; +import com.jcraft.jsch.JSchException; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class ContainerInstanceTests extends SamplesTestBase { @Test @@ -37,7 +40,7 @@ public void testManageContainerInstanceWithMultipleContainerImages() { } @Test - public void testManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator() { + public void testManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator() throws InterruptedException, JSchException, IOException { // Skip test in "playback" mode due to HTTP calls made outside of the management plane which can not be recorded at this time if (!isPlaybackMode()) { Assertions.assertTrue(ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.runSample(azure, "", "")); diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerRegistryTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerRegistryTests.java index 0edabedc43674..6ae3994b98593 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerRegistryTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ContainerRegistryTests.java @@ -9,11 +9,13 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class ContainerRegistryTests extends SamplesTestBase { @Test @DoNotRecord - public void testManageContainerRegistry() { + public void testManageContainerRegistry() throws IOException { if (skipInPlayback()) { return; } @@ -23,7 +25,7 @@ public void testManageContainerRegistry() { @Test @DoNotRecord - public void testManageContainerRegistryWithWebhooks() { + public void testManageContainerRegistryWithWebhooks() throws IOException, InterruptedException { if (skipInPlayback()) { return; } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/DnsSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/DnsSampleTests.java index 9adb8b2310771..0fb463e7a1c1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/DnsSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/DnsSampleTests.java @@ -8,11 +8,13 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class DnsSampleTests extends SamplesTestBase { @Test @Disabled("The domain name 'the custom domain that you own (e.g. contoso.com)' is invalid.") - public void testManageDns() { + public void testManageDns() throws IOException { Assertions.assertTrue(ManageDns.runSample(azure)); } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/GraphRbacTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/GraphRbacTests.java index ef88f37531b36..267f96c980669 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/GraphRbacTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/GraphRbacTests.java @@ -19,6 +19,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; import java.time.temporal.ChronoUnit; import java.util.List; @@ -43,7 +44,7 @@ public void testManageUsersGroupsAndRoles() { @Test @DoNotRecord - public void testManageServicePrincipalCredentials() { + public void testManageServicePrincipalCredentials() throws IOException { if (skipInPlayback()) { return; } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/KubernetesClusterTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/KubernetesClusterTests.java index 4d4526ef5692d..12f5de3903bf8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/KubernetesClusterTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/KubernetesClusterTests.java @@ -6,14 +6,17 @@ import com.azure.resourcemanager.kubernetescluster.samples.DeployImageFromContainerRegistryToKubernetes; import com.azure.resourcemanager.kubernetescluster.samples.ManageKubernetesCluster; import com.azure.resourcemanager.kubernetescluster.samples.ManagedKubernetesClusterWithAdvancedNetworking; +import com.jcraft.jsch.JSchException; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class KubernetesClusterTests extends SamplesTestBase { @Test @Disabled("QuotaExceeded error: Public preview limit of 5 for managed cluster(AKS) has been reached for subscription sub-id in location ukwest. Same error even after deleting all clusters") - public void testManageKubernetesCluster() { + public void testManageKubernetesCluster() throws IOException, JSchException { if (isPlaybackMode()) { // Disable mocked testing but keep it commented out in case we want to re-enable it later // Assertions.assertTrue(ManageKubernetesCluster.runSample(azure, "client id", "secret")); @@ -25,7 +28,7 @@ public void testManageKubernetesCluster() { @Test @Disabled("QuotaExceeded error: Public preview limit of 5 for managed cluster(AKS) has been reached for subscription sub-id in location ukwest. Same error even after deleting all clusters") - public void testManageKubernetesClusterWithAdvancedNetworking() { + public void testManageKubernetesClusterWithAdvancedNetworking() throws IOException, JSchException { if (isPlaybackMode()) { // Disable mocked testing but keep it commented out in case we want to re-enable it later // Assertions.assertTrue(ManageKubernetesCluster.runSample(azure, "client id", "secret")); @@ -36,7 +39,7 @@ public void testManageKubernetesClusterWithAdvancedNetworking() { } @Test - public void testDeployImageFromContainerRegistryToKubernetes() { + public void testDeployImageFromContainerRegistryToKubernetes() throws InterruptedException, JSchException, IOException { if (!isPlaybackMode()) { Assertions.assertTrue(DeployImageFromContainerRegistryToKubernetes.runSample(azure, "", "")); } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/MonitorTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/MonitorTests.java index 257fe9937f406..ce1a62c86246b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/MonitorTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/MonitorTests.java @@ -11,10 +11,12 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class MonitorTests extends SamplesTestBase { @Test - public void testQueryMetricsAndActivityLogs() { + public void testQueryMetricsAndActivityLogs() throws IOException { // Skip test in "playback" mode due to HTTP calls made outside of the management plane which can not be recorded at this time if (!isPlaybackMode()) { Assertions.assertTrue(QueryMetricsAndActivityLogs.runSample(azure)); diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/NetworkSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/NetworkSampleTests.java index 55be7bf2d6183..8f8adc07a5270 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/NetworkSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/NetworkSampleTests.java @@ -18,10 +18,14 @@ import com.azure.resourcemanager.network.samples.ManageVpnGatewayPoint2SiteConnection; import com.azure.resourcemanager.network.samples.ManageVpnGatewaySite2SiteConnection; import com.azure.resourcemanager.network.samples.VerifyNetworkPeeringWithNetworkWatcher; +import com.jcraft.jsch.JSchException; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import java.io.IOException; +import java.io.UnsupportedEncodingException; + public class NetworkSampleTests extends SamplesTestBase { @Test @@ -36,7 +40,7 @@ public void testVerifyNetworkPeeringWithNetworkWatcher() { } @Test - public void testManageApplicationGateway() { + public void testManageApplicationGateway() throws IOException { Assertions.assertTrue(ManageApplicationGateway.runSample(azure)); } @@ -66,12 +70,12 @@ public void testManageNetworkInterface() { } @Test - public void testManageNetworkSecurityGroup() { + public void testManageNetworkSecurityGroup() throws UnsupportedEncodingException, JSchException { Assertions.assertTrue(ManageNetworkSecurityGroup.runSample(azure)); } @Test - public void testManageSimpleApplicationGateway() { + public void testManageSimpleApplicationGateway() throws IOException { Assertions.assertTrue(ManageSimpleApplicationGateway.runSample(azure)); } @@ -97,7 +101,7 @@ public void testManageVpnGatewaySite2SiteConnection() { @Test @Disabled("Need root certificate file and client certificate thumbprint to run the sample") - public void testManageVpnGatewayPoint2SiteConnection() { + public void testManageVpnGatewayPoint2SiteConnection() throws IOException { Assertions.assertTrue(ManageVpnGatewayPoint2SiteConnection.runSample(azure)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java index 674a7ccb40035..dc863d959fbbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java @@ -15,9 +15,11 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class ResourceSampleTests extends SamplesTestBase { @Test - public void testDeployUsingARMTemplate() { + public void testDeployUsingARMTemplate() throws IOException, IllegalAccessException { if (isPlaybackMode()) { return; } @@ -25,17 +27,17 @@ public void testDeployUsingARMTemplate() { } @Test - public void testDeployUsingARMTemplateWithProgress() { + public void testDeployUsingARMTemplateWithProgress() throws IOException, IllegalAccessException { Assertions.assertTrue(DeployUsingARMTemplateWithProgress.runSample(azure)); } @Test - public void testDeployUsingARMTemplateAsync() { + public void testDeployUsingARMTemplateAsync() throws InterruptedException { Assertions.assertTrue(DeployUsingARMTemplateAsync.runSample(azure)); } @Test() - public void testDeployUsingARMTemplateWithDeploymentOperations() { + public void testDeployUsingARMTemplateWithDeploymentOperations() throws InterruptedException { if (isPlaybackMode()) { Assertions.assertTrue(DeployUsingARMTemplateWithDeploymentOperations.runSample(azure, 0)); } else { @@ -44,7 +46,7 @@ public void testDeployUsingARMTemplateWithDeploymentOperations() { } @Test - public void testDeployUsingARMTemplateWithTags() { + public void testDeployUsingARMTemplateWithTags() throws IOException, IllegalAccessException { Assertions.assertTrue(DeployUsingARMTemplateWithTags.runSample(azure)); } @@ -59,7 +61,7 @@ public void testManageResourceGroup() { } @Test - public void testDeployVirtualMachineUsingARMTemplate() { + public void testDeployVirtualMachineUsingARMTemplate() throws IOException, IllegalAccessException { Assertions.assertTrue(DeployVirtualMachineUsingARMTemplate.runSample(azure)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/SqlSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/SqlSampleTests.java index 45e1961cc4cc2..884398e064301 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/SqlSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/SqlSampleTests.java @@ -20,6 +20,7 @@ import java.nio.file.Files; import java.nio.file.Paths; +import java.sql.SQLException; public class SqlSampleTests extends SamplesTestBase { @@ -82,7 +83,7 @@ public void testManageSqlFailoverGroups() { } @Test - public void testGettingSqlServerMetrics() { + public void testGettingSqlServerMetrics() throws SQLException, ClassNotFoundException { // Skip test in "playback" mode due to HTTP calls made outside of the management plane which can not be recorded at this time if (!isPlaybackMode()) { Assertions.assertTrue(GettingSqlServerMetrics.runSample(azure)); @@ -90,7 +91,7 @@ public void testGettingSqlServerMetrics() { } @Test - public void testManageSqlServerDnsAliases() { + public void testManageSqlServerDnsAliases() throws SQLException, ClassNotFoundException { // Skip test in "playback" mode due to HTTP calls made outside of the management plane which can not be recorded at this time if (!isPlaybackMode()) { Assertions.assertTrue(ManageSqlServerDnsAliases.runSample(azure)); diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java index 94a0c961cbe5b..04b4626856edb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/TrafficManagerSampleTests.java @@ -9,6 +9,8 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + public class TrafficManagerSampleTests extends SamplesTestBase { @Test public void testManageSimpleTrafficManager() { @@ -20,7 +22,7 @@ public void testManageSimpleTrafficManager() { @Test @DoNotRecord - public void testManageTrafficManager() { + public void testManageTrafficManager() throws IOException { if (this.skipInPlayback()) { // sample creates certificate return; From 32f9ae0279a1a4d8b13201572bed5a031ff54c49 Mon Sep 17 00:00:00 2001 From: Bhaskar Mallapragada Date: Tue, 8 Sep 2020 23:21:15 -0700 Subject: [PATCH 146/168] Query annotation support (#14661) * This PR adds support for query annotations. This enables end users to add annotated queries to their repositories using @Query(value = "") which opens up all the query capabilities of underlying cosmos java sdk to the cosmos spring driver. --- .../data/cosmos/core/CosmosOperations.java | 12 ++ .../data/cosmos/core/CosmosTemplate.java | 31 ++++- .../cosmos/core/ReactiveCosmosOperations.java | 12 ++ .../cosmos/core/ReactiveCosmosTemplate.java | 20 ++++ .../spring/data/cosmos/repository/Query.java | 24 ++++ .../repository/query/AbstractCosmosQuery.java | 3 +- .../query/AbstractReactiveCosmosQuery.java | 3 +- .../repository/query/CosmosQueryMethod.java | 35 ++++++ .../query/ReactiveCosmosQueryMethod.java | 31 +++++ .../support/CosmosRepositoryFactory.java | 7 +- .../ReactiveCosmosRepositoryFactory.java | 7 +- .../support/StringBasedCosmosQuery.java | 65 +++++++++++ .../StringBasedReactiveCosmosQuery.java | 69 +++++++++++ .../spring/data/cosmos/domain/Contact.java | 67 +++++++++-- .../integration/ContactRepositoryIT.java | 107 +++++++++++------- .../ReactiveCourseRepositoryIT.java | 11 ++ .../repository/ContactRepository.java | 17 +++ .../repository/ReactiveCourseRepository.java | 9 ++ 18 files changed, 477 insertions(+), 53 deletions(-) create mode 100644 sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/Query.java create mode 100644 sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQuery.java create mode 100644 sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQuery.java diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/CosmosOperations.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/CosmosOperations.java index ca3092abf1b1a..fe9732f49f7d9 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/CosmosOperations.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/CosmosOperations.java @@ -5,6 +5,7 @@ import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.SqlQuerySpec; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.query.CosmosQuery; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; @@ -274,4 +275,15 @@ public interface CosmosOperations { * @return MappingCosmosConverter */ MappingCosmosConverter getConverter(); + + /** + * Run the query. + * + * @param the type parameter + * @param querySpec the query spec + * @param domainType the domain type + * @param returnType the return type + * @return the Iterable + */ + Iterable runQuery(SqlQuerySpec querySpec, Class domainType, Class returnType); } diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java index 0223389dc7578..10895eac62caf 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java @@ -720,6 +720,13 @@ public MappingCosmosConverter getConverter() { return this.mappingCosmosConverter; } + @Override + public Iterable runQuery(SqlQuerySpec querySpec, Class domainType, Class returnType) { + return getJsonNodeFluxFromQuerySpec(domainType.getSimpleName(), querySpec, returnType) + .collectList() + .block(); + } + private JsonNode prepareToPersistAndConvertToItemProperties(Object object) { if (cosmosAuditingHandler != null) { cosmosAuditingHandler.markAudited(object); @@ -766,13 +773,35 @@ private Flux findItemsAsFlux(@NonNull CosmosQuery query, .publishOn(Schedulers.parallel()) .flatMap(cosmosItemFeedResponse -> { CosmosUtils.fillAndProcessResponseDiagnostics(this.responseDiagnosticsProcessor, - cosmosItemFeedResponse.getCosmosDiagnostics(), cosmosItemFeedResponse); + cosmosItemFeedResponse.getCosmosDiagnostics(), + cosmosItemFeedResponse); return Flux.fromIterable(cosmosItemFeedResponse.getResults()); }) .onErrorResume(throwable -> CosmosExceptionUtils.exceptionHandler("Failed to find items", throwable)); } + private Flux getJsonNodeFluxFromQuerySpec( + @NonNull String containerName, SqlQuerySpec sqlQuerySpec, Class classType) { + final CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + cosmosQueryRequestOptions.setQueryMetricsEnabled(this.queryMetricsEnabled); + + return cosmosAsyncClient + .getDatabase(this.databaseName) + .getContainer(containerName) + .queryItems(sqlQuerySpec, cosmosQueryRequestOptions, classType) + .byPage() + .publishOn(Schedulers.parallel()) + .flatMap(cosmosItemFeedResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(this.responseDiagnosticsProcessor, + cosmosItemFeedResponse.getCosmosDiagnostics(), + cosmosItemFeedResponse); + return Flux.fromIterable(cosmosItemFeedResponse.getResults()); + }) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to find items", throwable)); + } + private List findItems(@NonNull CosmosQuery query, @NonNull String containerName) { return findItemsAsFlux(query, containerName) diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosOperations.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosOperations.java index 8024a890974e4..584966fdd08fe 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosOperations.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosOperations.java @@ -5,6 +5,7 @@ import com.azure.cosmos.models.CosmosContainerResponse; import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.SqlQuerySpec; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.query.CosmosQuery; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; @@ -242,4 +243,15 @@ public interface ReactiveCosmosOperations { * @return MappingCosmosConverter */ MappingCosmosConverter getConverter(); + + /** + * Run the query. + * + * @param the type parameter + * @param querySpec the query spec + * @param domainType the domain type + * @param returnType the return type + * @return the flux + */ + Flux runQuery(SqlQuerySpec querySpec, Class domainType, Class returnType); } diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java index 110155b5cb11f..feb23a344ceb8 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java @@ -578,6 +578,26 @@ public MappingCosmosConverter getConverter() { return mappingCosmosConverter; } + @Override + public Flux runQuery(SqlQuerySpec querySpec, Class domainType, Class returnType) { + String containerName = domainType.getSimpleName(); + CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + return cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .queryItems(querySpec, options, returnType) + .byPage() + .publishOn(Schedulers.parallel()) + .flatMap(cosmosItemFeedResponse -> { + CosmosUtils + .fillAndProcessResponseDiagnostics(this.responseDiagnosticsProcessor, + cosmosItemFeedResponse.getCosmosDiagnostics(), + cosmosItemFeedResponse); + return Flux.fromIterable(cosmosItemFeedResponse.getResults()); + }) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to find items", throwable)); + } + private Mono getCountValue(CosmosQuery query, String containerName) { final SqlQuerySpec querySpec = new CountQueryGenerator().generateCosmos(query); final CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/Query.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/Query.java new file mode 100644 index 0000000000000..fb181ae431406 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/Query.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository; +import org.springframework.data.annotation.QueryAnnotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation to declare finder queries directly on repository methods. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE}) +@QueryAnnotation +public @interface Query { + /** + * value of the query + * + * @return the value + */ + String value() default ""; +} diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQuery.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQuery.java index 98a99c4a8d11b..792a985313225 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQuery.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQuery.java @@ -14,7 +14,7 @@ public abstract class AbstractCosmosQuery implements RepositoryQuery { private final CosmosQueryMethod method; - private final CosmosOperations operations; + protected final CosmosOperations operations; /** * Initialization @@ -33,6 +33,7 @@ public AbstractCosmosQuery(CosmosQueryMethod method, CosmosOperations operations * @param parameters must not be {@literal null}. * @return execution result. Can be {@literal null}. */ + @Override public Object execute(Object[] parameters) { final CosmosParameterAccessor accessor = new CosmosParameterParameterAccessor(method, parameters); final CosmosQuery query = createQuery(accessor); diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQuery.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQuery.java index 6986db4ce5f61..c718f8f847049 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQuery.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQuery.java @@ -15,7 +15,7 @@ public abstract class AbstractReactiveCosmosQuery implements RepositoryQuery { private final ReactiveCosmosQueryMethod method; - private final ReactiveCosmosOperations operations; + protected final ReactiveCosmosOperations operations; /** * Initialization @@ -35,6 +35,7 @@ public AbstractReactiveCosmosQuery(ReactiveCosmosQueryMethod method, * @param parameters must not be {@literal null}. * @return execution result. Can be {@literal null}. */ + @Override public Object execute(Object[] parameters) { final ReactiveCosmosParameterAccessor accessor = new ReactiveCosmosParameterParameterAccessor(method, parameters); diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryMethod.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryMethod.java index ebce667e0520a..2e1ed6ab31939 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryMethod.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryMethod.java @@ -2,13 +2,18 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.query; +import com.azure.spring.data.cosmos.repository.Query; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.repository.core.EntityMetadata; import org.springframework.data.repository.core.RepositoryMetadata; import org.springframework.data.repository.query.QueryMethod; +import org.springframework.lang.Nullable; +import org.springframework.util.StringUtils; import java.lang.reflect.Method; +import java.util.Optional; /** * Inherit QueryMethod class to generate a method that is designated to execute a finder query. @@ -16,6 +21,7 @@ public class CosmosQueryMethod extends QueryMethod { private CosmosEntityMetadata metadata; + private final String annotatedQueryValue; /** * Creates a new {@link CosmosQueryMethod} from the given parameters. Looks up the correct query to use @@ -27,6 +33,7 @@ public class CosmosQueryMethod extends QueryMethod { */ public CosmosQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory) { super(method, metadata, factory); + this.annotatedQueryValue = findAnnotatedQuery(method).orElse(null); } @Override @@ -39,4 +46,32 @@ public EntityMetadata getEntityInformation() { this.metadata = new SimpleCosmosEntityMetadata(domainType, entityInformation); return this.metadata; } + + /** + * Returns whether the method has an annotated query. + * + * @return if the query method has an annotated query + */ + public boolean hasAnnotatedQuery() { + return annotatedQueryValue != null; + } + + /** + * Returns the query string declared in a {@link Query} annotation or {@literal null} if neither the annotation + * found + * nor the attribute was specified. + * + * @return the query string or null + */ + @Nullable + public String getQueryAnnotation() { + return annotatedQueryValue; + } + + private Optional findAnnotatedQuery(Method method) { + return Optional.ofNullable(AnnotatedElementUtils.findMergedAnnotation(method, Query.class)) + .map(Query::value) + .filter(StringUtils::hasText); + } + } diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java index 2102e988b7955..5b2755257164d 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java @@ -2,15 +2,20 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.query; +import com.azure.spring.data.cosmos.repository.Query; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.repository.core.EntityMetadata; import org.springframework.data.repository.core.RepositoryMetadata; import org.springframework.data.repository.query.QueryMethod; +import org.springframework.lang.Nullable; +import org.springframework.util.StringUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import java.lang.reflect.Method; +import java.util.Optional; /** * Inherit from QueryMethod class to execute a finder query. @@ -19,6 +24,7 @@ public class ReactiveCosmosQueryMethod extends QueryMethod { private ReactiveCosmosEntityMetadata metadata; private final Method method; + private final String annotatedQueryValue; /** * Creates a new {@link QueryMethod} from the given parameters. Looks up the correct query to use for following @@ -31,6 +37,7 @@ public class ReactiveCosmosQueryMethod extends QueryMethod { public ReactiveCosmosQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory) { super(method, metadata, factory); this.method = method; + this.annotatedQueryValue = findAnnotatedQuery(method).orElse(null); } @Override @@ -56,4 +63,28 @@ public Class getReactiveWrapper() { private static boolean isReactiveWrapperClass(Class clazz) { return clazz.equals(Flux.class) || clazz.equals(Mono.class); } + + /** + * Returns whether the method has an annotated query. + * @return if the query method has an annotated query + */ + public boolean hasAnnotatedQuery() { + return annotatedQueryValue != null; + } + + /** + * Gets the annotated query or returns null + * @return the annotated query String or null + */ + @Nullable + public String getQueryAnnotation() { + return annotatedQueryValue; + } + + private Optional findAnnotatedQuery(Method method) { + return Optional.ofNullable(AnnotatedElementUtils.findMergedAnnotation(method, Query.class)) + .map(Query::value) + .filter(StringUtils::hasText); + } + } diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java index ac495642ec7d9..ec70b15aad30b 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java @@ -74,7 +74,12 @@ public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, Assert.notNull(queryMethod, "queryMethod must not be null!"); Assert.notNull(dbOperations, "dbOperations must not be null!"); - return new PartTreeCosmosQuery(queryMethod, dbOperations); + + if (queryMethod.hasAnnotatedQuery()) { + return new StringBasedCosmosQuery(queryMethod, dbOperations); + } else { + return new PartTreeCosmosQuery(queryMethod, dbOperations); + } } } diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java index a949964eb4630..ad04d04b21fb1 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java @@ -77,8 +77,11 @@ public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, Assert.notNull(queryMethod, "queryMethod must not be null!"); Assert.notNull(cosmosOperations, "dbOperations must not be null!"); - return new PartTreeReactiveCosmosQuery(queryMethod, cosmosOperations); - + if (queryMethod.hasAnnotatedQuery()) { + return new StringBasedReactiveCosmosQuery(queryMethod, cosmosOperations); + } else { + return new PartTreeReactiveCosmosQuery(queryMethod, cosmosOperations); + } } } diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQuery.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQuery.java new file mode 100644 index 0000000000000..e9825d5dd7798 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQuery.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.support; + +import com.azure.cosmos.models.SqlParameter; +import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.spring.data.cosmos.core.CosmosOperations; +import com.azure.spring.data.cosmos.core.query.CosmosQuery; +import com.azure.spring.data.cosmos.repository.query.AbstractCosmosQuery; +import com.azure.spring.data.cosmos.repository.query.CosmosParameterAccessor; +import com.azure.spring.data.cosmos.repository.query.CosmosParameterParameterAccessor; +import com.azure.spring.data.cosmos.repository.query.CosmosQueryMethod; +import org.springframework.data.repository.query.ResultProcessor; + +import java.util.List; +import java.util.stream.Collectors; + +import static com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter.toCosmosDbValue; + +/** + * Cosmos query class to handle the annotated queries. This overrides the execution and runs the query directly + */ +public class StringBasedCosmosQuery extends AbstractCosmosQuery { + private final String query; + + /** + * Constructor + * @param queryMethod the CosmosQueryMethod + * @param dbOperations the CosmosOperations + */ + public StringBasedCosmosQuery(CosmosQueryMethod queryMethod, CosmosOperations dbOperations) { + super(queryMethod, dbOperations); + this.query = queryMethod.getQueryAnnotation(); + } + + @Override + protected CosmosQuery createQuery(CosmosParameterAccessor accessor) { + return null; + } + + @Override + public Object execute(final Object[] parameters) { + final CosmosParameterAccessor accessor = new CosmosParameterParameterAccessor(getQueryMethod(), parameters); + final ResultProcessor processor = getQueryMethod().getResultProcessor().withDynamicProjection(accessor); + + List sqlParameters = getQueryMethod().getParameters().stream() + .map(p -> new SqlParameter("@" + p.getName().orElse(""), + toCosmosDbValue(parameters[p.getIndex()]))) + .collect(Collectors.toList()); + + SqlQuerySpec querySpec = new SqlQuerySpec(query, sqlParameters); + return this.operations.runQuery(querySpec, processor.getReturnedType().getDomainType(), + processor.getReturnedType().getReturnedType()); + } + + @Override + protected boolean isDeleteQuery() { + return false; + } + + @Override + protected boolean isExistsQuery() { + return false; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQuery.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQuery.java new file mode 100644 index 0000000000000..f2ec40b97dba5 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQuery.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.support; + +import com.azure.cosmos.models.SqlParameter; +import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; +import com.azure.spring.data.cosmos.core.query.CosmosQuery; +import com.azure.spring.data.cosmos.repository.query.AbstractReactiveCosmosQuery; +import com.azure.spring.data.cosmos.repository.query.ReactiveCosmosParameterAccessor; +import com.azure.spring.data.cosmos.repository.query.ReactiveCosmosParameterParameterAccessor; +import com.azure.spring.data.cosmos.repository.query.ReactiveCosmosQueryMethod; +import org.springframework.data.repository.query.ResultProcessor; +import reactor.core.publisher.Flux; + +import java.util.List; +import java.util.stream.Collectors; + +import static com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter.toCosmosDbValue; + +/** + * Cosmos query class to handle the annotated queries. This overrides the execution and runs the query directly + */ +public class StringBasedReactiveCosmosQuery extends AbstractReactiveCosmosQuery { + private final String query; + + /** + * Constructor + * @param queryMethod the query method + * @param dbOperations the reactive cosmos operations + */ + public StringBasedReactiveCosmosQuery(ReactiveCosmosQueryMethod queryMethod, + ReactiveCosmosOperations dbOperations) { + super(queryMethod, dbOperations); + this.query = queryMethod.getQueryAnnotation(); + } + + @Override + protected CosmosQuery createQuery(ReactiveCosmosParameterAccessor accessor) { + return null; + } + + @Override + public Object execute(final Object[] parameters) { + final ReactiveCosmosParameterAccessor accessor = new ReactiveCosmosParameterParameterAccessor(getQueryMethod(), + parameters); + final ResultProcessor processor = getQueryMethod().getResultProcessor().withDynamicProjection(accessor); + + List sqlParameters = getQueryMethod().getParameters().stream() + .map(p -> new SqlParameter("@" + p.getName().orElse(""), + toCosmosDbValue(parameters[p.getIndex()]))) + .collect(Collectors.toList()); + + SqlQuerySpec querySpec = new SqlQuerySpec(query, sqlParameters); + Flux flux = this.operations.runQuery(querySpec, processor.getReturnedType().getDomainType(), + processor.getReturnedType().getReturnedType()); + return flux; + } + + @Override + protected boolean isDeleteQuery() { + return false; + } + + @Override + protected boolean isExistsQuery() { + return false; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/domain/Contact.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/domain/Contact.java index 1fd2466910110..5b8bc513dfd36 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/domain/Contact.java +++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/domain/Contact.java @@ -14,6 +14,10 @@ public class Contact { private String title; + private int intValue; + + private boolean isActive; + public Contact() { } @@ -22,6 +26,13 @@ public Contact(String logicId, String title) { this.title = title; } + public Contact(final String logicId, final String title, final int intValue, boolean isActive) { + this.logicId = logicId; + this.title = title; + this.intValue = intValue; + this.isActive = isActive; + } + public String getLogicId() { return logicId; } @@ -38,6 +49,42 @@ public void setTitle(String title) { this.title = title; } + /** + * Getter for property 'status'. + * + * @return Value for property 'status'. + */ + public boolean isActive() { + return isActive; + } + + /** + * Setter for property 'status'. + * + * @param active Value to set for property 'status'. + */ + public void setActive(final boolean active) { + this.isActive = active; + } + + /** + * Getter for property 'value'. + * + * @return Value for property 'value'. + */ + public int getIntValue() { + return intValue; + } + + /** + * Setter for property 'value'. + * + * @param intValue Value to set for property 'value'. + */ + public void setIntValue(final int intValue) { + this.intValue = intValue; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -59,12 +106,18 @@ public int hashCode() { @Override public String toString() { return "Contact{" - + "logicId='" - + logicId - + '\'' - + ", title='" - + title - + '\'' - + '}'; + + "logicId='" + + logicId + + '\'' + + ", title='" + + title + + '\'' + + ", value='" + + intValue + + '\'' + + ", status='" + + isActive + + '\'' + + '}'; } } diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java index e7fa52777d084..450010c2417d3 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java @@ -9,6 +9,7 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ContactRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import com.fasterxml.jackson.databind.node.ObjectNode; import org.assertj.core.util.Lists; import org.junit.After; import org.junit.AfterClass; @@ -22,6 +23,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; +import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Optional; @@ -33,7 +35,11 @@ @ContextConfiguration(classes = TestRepositoryConfig.class) public class ContactRepositoryIT { - private static final Contact TEST_CONTACT = new Contact("testId", "faketitle"); + private static final Contact TEST_CONTACT1 = new Contact("testId", "faketitle", 25, true); + private static final Contact TEST_CONTACT2 = new Contact("testId2", "faketitle2", 32, false); + private static final Contact TEST_CONTACT3 = new Contact("testId3", "faketitle3", 25, false); + private static final Contact TEST_CONTACT4 = new Contact("testId4", "faketitle4", 43, true); + private static final Contact TEST_CONTACT5 = new Contact("testId5", "faketitle3", 43, true); private static final CosmosEntityInformation entityInformation = new CosmosEntityInformation<>(Contact.class); @@ -47,13 +53,22 @@ public class ContactRepositoryIT { @Autowired private CosmosTemplate template; + @AfterClass + public static void afterClassCleanup() { + staticTemplate.deleteContainer(entityInformation.getContainerName()); + } + @Before public void setUp() { if (!isSetupDone) { staticTemplate = template; template.createContainerIfNotExists(entityInformation); } - repository.save(TEST_CONTACT); + repository.save(TEST_CONTACT1); + repository.save(TEST_CONTACT2); + repository.save(TEST_CONTACT3); + repository.save(TEST_CONTACT4); + repository.save(TEST_CONTACT5); isSetupDone = true; } @@ -62,23 +77,18 @@ public void cleanup() { repository.deleteAll(); } - @AfterClass - public static void afterClassCleanup() { - staticTemplate.deleteContainer(entityInformation.getContainerName()); - } - @Test public void testFindAll() { final List result = TestUtils.toList(repository.findAll()); - assertThat(result.size()).isEqualTo(1); - assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT.getLogicId()); - assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT.getTitle()); + assertThat(result.size()).isEqualTo(5); + Assert.assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, + TEST_CONTACT5), result); - final Contact contact = repository.findById(TEST_CONTACT.getLogicId()).get(); + final Contact contact = repository.findById(TEST_CONTACT1.getLogicId()).get(); - assertThat(contact.getLogicId()).isEqualTo(TEST_CONTACT.getLogicId()); - assertThat(contact.getTitle()).isEqualTo(TEST_CONTACT.getTitle()); + assertThat(contact.getLogicId()).isEqualTo(TEST_CONTACT1.getLogicId()); + assertThat(contact.getTitle()).isEqualTo(TEST_CONTACT1.getTitle()); } @Test @@ -86,21 +96,21 @@ public void testCountAndDeleteByID() { final Contact contact2 = new Contact("newid", "newtitle"); repository.save(contact2); final List all = TestUtils.toList(repository.findAll()); - assertThat(all.size()).isEqualTo(2); + assertThat(all.size()).isEqualTo(6); long count = repository.count(); - assertThat(count).isEqualTo(2); + assertThat(count).isEqualTo(6); repository.deleteById(contact2.getLogicId()); final List result = TestUtils.toList(repository.findAll()); - assertThat(result.size()).isEqualTo(1); - assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT.getLogicId()); - assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT.getTitle()); + assertThat(result.size()).isEqualTo(5); + assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT1.getLogicId()); + assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT1.getTitle()); count = repository.count(); - assertThat(count).isEqualTo(1); + assertThat(count).isEqualTo(5); } @Test @@ -108,20 +118,22 @@ public void testCountAndDeleteEntity() { final Contact contact2 = new Contact("newid", "newtitle"); repository.save(contact2); final List all = TestUtils.toList(repository.findAll()); - assertThat(all.size()).isEqualTo(2); + assertThat(all.size()).isEqualTo(6); repository.delete(contact2); final List result = TestUtils.toList(repository.findAll()); - assertThat(result.size()).isEqualTo(1); - assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT.getLogicId()); - assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT.getTitle()); + assertThat(result.size()).isEqualTo(5); + Assert.assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, + TEST_CONTACT5), result); + assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT1.getLogicId()); + assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT1.getTitle()); } @Test public void testUpdateEntity() { - final Contact updatedContact = new Contact(TEST_CONTACT.getLogicId(), "updated"); + final Contact updatedContact = new Contact(TEST_CONTACT1.getLogicId(), "updated"); final Contact savedContact = repository.save(updatedContact); @@ -129,7 +141,7 @@ public void testUpdateEntity() { assertThat(savedContact.getLogicId()).isEqualTo(updatedContact.getLogicId()); assertThat(savedContact.getTitle()).isEqualTo(updatedContact.getTitle()); - final Contact contact = repository.findById(TEST_CONTACT.getLogicId()).get(); + final Contact contact = repository.findById(TEST_CONTACT1.getLogicId()).get(); assertThat(contact.getLogicId()).isEqualTo(updatedContact.getLogicId()); assertThat(contact.getTitle()).isEqualTo(updatedContact.getTitle()); @@ -168,11 +180,11 @@ public void testBatchOperations() { @Test public void testCustomQuery() { - final List result = TestUtils.toList(repository.findByTitle(TEST_CONTACT.getTitle())); + final List result = TestUtils.toList(repository.findByTitle(TEST_CONTACT1.getTitle())); assertThat(result.size()).isEqualTo(1); - assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT.getLogicId()); - assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT.getTitle()); + assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT1.getLogicId()); + assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT1.getTitle()); } @@ -188,10 +200,10 @@ public void testNullIdContact() { @Test public void testFindById() { - final Optional optional = repository.findById(TEST_CONTACT.getLogicId()); + final Optional optional = repository.findById(TEST_CONTACT1.getLogicId()); Assert.assertTrue(optional.isPresent()); - Assert.assertEquals(TEST_CONTACT, optional.get()); + Assert.assertEquals(TEST_CONTACT1, optional.get()); Assert.assertFalse(repository.findById("").isPresent()); } @@ -204,36 +216,51 @@ public void testFindByIdNotFound() { @Test public void testShouldFindSingleEntity() { - final Contact contact = repository.findOneByTitle(TEST_CONTACT.getTitle()); + final Contact contact = repository.findOneByTitle(TEST_CONTACT1.getTitle()); - Assert.assertEquals(TEST_CONTACT, contact); + Assert.assertEquals(TEST_CONTACT1, contact); } @Test public void testShouldFindSingleOptionalEntity() { - final Optional contact = repository.findOptionallyByTitle(TEST_CONTACT.getTitle()); + final Optional contact = repository.findOptionallyByTitle(TEST_CONTACT1.getTitle()); Assert.assertTrue(contact.isPresent()); - Assert.assertEquals(TEST_CONTACT, contact.get()); + Assert.assertEquals(TEST_CONTACT1, contact.get()); Assert.assertFalse(repository.findOptionallyByTitle("not here").isPresent()); } @Test(expected = CosmosAccessException.class) public void testShouldFailIfMultipleResultsReturned() { - repository.save(new Contact("testId2", TEST_CONTACT.getTitle())); + repository.save(new Contact("testId2", TEST_CONTACT1.getTitle())); - repository.findOneByTitle(TEST_CONTACT.getTitle()); + repository.findOneByTitle(TEST_CONTACT1.getTitle()); } @Test public void testShouldAllowListAndIterableResponses() { - final List contactList = TestUtils.toList(repository.findByTitle(TEST_CONTACT.getTitle())); - Assert.assertEquals(TEST_CONTACT, contactList.get(0)); + final List contactList = TestUtils.toList(repository.findByTitle(TEST_CONTACT1.getTitle())); + Assert.assertEquals(TEST_CONTACT1, contactList.get(0)); Assert.assertEquals(1, contactList.size()); - final Iterator contactIterator = repository.findByLogicId(TEST_CONTACT.getLogicId()).iterator(); + final Iterator contactIterator = repository.findByLogicId(TEST_CONTACT1.getLogicId()).iterator(); Assert.assertTrue(contactIterator.hasNext()); - Assert.assertEquals(TEST_CONTACT, contactIterator.next()); + Assert.assertEquals(TEST_CONTACT1, contactIterator.next()); Assert.assertFalse(contactIterator.hasNext()); } + + @Test + public void testAnnotatedQueries() { + List valueContacts = repository.getContactsByTitleAndValue(43, TEST_CONTACT5.getTitle()); + Assert.assertEquals(1, valueContacts.size()); + Assert.assertEquals(TEST_CONTACT5, valueContacts.get(0)); + + List contactsWithOffset = repository.getContactsWithOffsetLimit(1, 2); + Assert.assertEquals(2, contactsWithOffset.size()); + Assert.assertEquals(TEST_CONTACT2, contactsWithOffset.get(0)); + Assert.assertEquals(TEST_CONTACT3, contactsWithOffset.get(1)); + + List groupByContacts = repository.selectGroupBy(); + Assert.assertEquals(3, groupByContacts.size()); + } } diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java index c4f0694998afe..d7049921ca8ae 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java @@ -9,6 +9,7 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveCourseRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import com.fasterxml.jackson.databind.node.ObjectNode; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -299,4 +300,14 @@ public void testFindByNameOrDepartmentAllIgnoreCase() { COURSE_NAME_1.toLowerCase(), DEPARTMENT_NAME_3.toLowerCase()); StepVerifier.create(findResult).expectNext(COURSE_1).verifyComplete(); } + + @Test + public void testAnnotatedQueries() { + Flux courseFlux = repository.getCoursesWithNameDepartment(COURSE_NAME_1, DEPARTMENT_NAME_3); + StepVerifier.create(courseFlux).expectNext(COURSE_1).verifyComplete(); + + Flux courseGroupBy = repository.getCoursesGroupByDepartment(); + StepVerifier.create(courseGroupBy).expectComplete(); + StepVerifier.create(courseGroupBy).expectNextCount(1); + } } diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/repository/ContactRepository.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/repository/ContactRepository.java index 449c0d5952028..58fed4c43623f 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/repository/ContactRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/repository/ContactRepository.java @@ -4,8 +4,12 @@ import com.azure.spring.data.cosmos.domain.Contact; import com.azure.spring.data.cosmos.repository.CosmosRepository; +import com.azure.spring.data.cosmos.repository.Query; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; +import java.util.List; import java.util.Optional; @Repository @@ -17,4 +21,17 @@ public interface ContactRepository extends CosmosRepository { Contact findOneByTitle(String title); Optional findOptionallyByTitle(String title); + + @Query(value = "select * from c where c.title = @title and c.intValue = @value") + List getContactsByTitleAndValue(@Param("value") int value, @Param("title") String name); + + @Query(value = "select * from c offset @offset limit @limit") + List getContactsWithOffsetLimit(@Param("offset") int offset, @Param("limit") int limit); + + @Query(value = "select * from c where c.status= true") + List findActiveContacts(); + + @Query(value = "SELECT count(c.id) as id_count, c.intValue FROM c group by c.intValue") + List selectGroupBy(); + } diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveCourseRepository.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveCourseRepository.java index d43708223fdc5..d3d1545d4de83 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveCourseRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveCourseRepository.java @@ -3,7 +3,10 @@ package com.azure.spring.data.cosmos.repository.repository; import com.azure.spring.data.cosmos.domain.Course; +import com.azure.spring.data.cosmos.repository.Query; import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.springframework.data.repository.query.Param; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -43,4 +46,10 @@ public interface ReactiveCourseRepository extends ReactiveCosmosRepository findOneByName(String name); + @Query(value = "select * from c where c.name = @name and c.department = @department") + Flux getCoursesWithNameDepartment(@Param("name") String name, @Param("department") String department); + + @Query(value = "select count(c.id) as num_ids, c.department from c group by c.department") + Flux getCoursesGroupByDepartment(); + } From 3e48a040e30d79f80b2cb67c4a436e8622d4ec11 Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Wed, 9 Sep 2020 16:21:07 +0800 Subject: [PATCH 147/168] Mgmt: add flatmap test (#14960) * add reactor test * add flatmap test * remove reator-test duplicate versioning * add return mono.error --- .../azure-resourcemanager-resources/pom.xml | 6 ++ .../utils/FlatMapSequentialTests.java | 100 ++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/fluentcore/utils/FlatMapSequentialTests.java diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml index 23bdfac4ac127..324efd88b8150 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml @@ -95,6 +95,12 @@ 1.6.1 test + + io.projectreactor + reactor-test + 3.3.9.RELEASE + test + diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/fluentcore/utils/FlatMapSequentialTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/fluentcore/utils/FlatMapSequentialTests.java new file mode 100644 index 0000000000000..e7c002829b924 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/fluentcore/utils/FlatMapSequentialTests.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.resources.fluentcore.utils; + +import org.junit.jupiter.api.Test; +import org.reactivestreams.Publisher; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Function; +import java.util.function.Supplier; + +public class FlatMapSequentialTests { + @Test + public void testFlatMapSequential() { + Mono mono = Mono.just("1"); + Flux complete = Flux.just("2", "3"); + Function> onNext = s -> Mono.delay(Duration.ofMillis(10)).thenReturn(s); + Function> onError = e -> Mono.just(e.getMessage()); + Supplier> onComplete = () -> complete; + + StepVerifier.create( + mono.flatMapMany(onNext, onError, onComplete) + ) + .expectNext("2", "3", "1") + .verifyComplete(); + + StepVerifier.create( + Utils.flatMapSequential(mono.flux(), + onNext, onError, onComplete) + ) + .expectNext("1", "2", "3") + .verifyComplete(); + + StepVerifier.create( + Utils.flatMapSequential(mono.flux().concatWith(Flux.error(new RuntimeException("Test"))), + onNext, onError, onComplete) + ) + .expectNext("1", "Test") + .verifyComplete(); + } + + @Test + public void testFlatMapSequentialDelayError() { + List> flux = new ArrayList<>(); + for (int i = 0; i < 5; ++i) { + if (i == 3) { + flux.add(Flux.error(new RuntimeException("Test"))); + } + flux.add(Flux.just(i)); + } + + StepVerifier.create( + Utils.flatMapSequential( + Flux.range(0, flux.size()), + flux::get, + null, null + ) + ) + .expectNext(0, 1, 2) + .verifyErrorMessage("Test"); + + StepVerifier.create( + Utils.flatMapSequentialDelayError( + Flux.range(0, flux.size()), + flux::get, + null, null, 32, 32 + ) + ) + .expectNext(0, 1, 2, 3, 4) + .verifyErrorMessage("Test"); + + StepVerifier.create(Flux.just(1, 3, 5, 7) + .flatMapDelayError(i -> { + if (i == 5) { + throw new RuntimeException("Test"); + } + return Mono.just(i); + }, 32, 32) + ) + .expectNext(1, 3) + .verifyErrorMessage("Test"); + + StepVerifier.create(Flux.just(1, 3, 5, 7) + .flatMapDelayError(i -> { + if (i == 5) { + return Mono.error(new RuntimeException("Test")); + } + return Mono.just(i); + }, 32, 32) + ) + .expectNext(1, 3, 7) + .verifyErrorMessage("Test"); + } +} From 020de8644570113dfaf5ea81cf3b27f4df5ac033 Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 9 Sep 2020 16:33:38 +0800 Subject: [PATCH 148/168] Update readme docs link to directly point to resource manager (#14969) --- sdk/resourcemanager/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/README.md b/sdk/resourcemanager/README.md index c1236fc9f4c2a..a893d42ea1d71 100644 --- a/sdk/resourcemanager/README.md +++ b/sdk/resourcemanager/README.md @@ -322,7 +322,7 @@ If you would like to become an active contributor to this project please follow 5. Create new Pull Request -[docs]: http://azure.github.io/azure-sdk-for-java/ +[docs]: http://azure.github.io/azure-sdk-for-java/resourcemanager.html [jdk]: https://docs.microsoft.com/java/azure/jdk/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: ../identity/azure-identity From ca756d50debd59c475dd90f026af9b05c3015a24 Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Wed, 9 Sep 2020 11:18:40 -0700 Subject: [PATCH 149/168] [Service Bus] Enable SAS support in connection string for Service Bus (#14939) * Enable SAS support in connection string for Service Bus * Fix checkstyle * Add logs --- .../servicebus/ServiceBusClientBuilder.java | 14 ++++- .../ServiceBusSharedKeyCredential.java | 47 +++++++++++++++ .../ServiceBusClientBuilderTest.java | 16 +++++ .../ServiceBusSharedKeyCredentialTest.java | 58 +++++++++++++++++++ 4 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusSharedKeyCredentialTest.java 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 6ac47b834d7f4..b171b9d0613ac 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 @@ -106,8 +106,7 @@ public ServiceBusClientBuilder connectionString(String connectionString) { final ConnectionStringProperties properties = new ConnectionStringProperties(connectionString); final TokenCredential tokenCredential; try { - tokenCredential = new ServiceBusSharedKeyCredential(properties.getSharedAccessKeyName(), - properties.getSharedAccessKey(), ServiceBusConstants.TOKEN_VALIDITY); + tokenCredential = getTokenCredential(properties); } catch (Exception e) { throw logger.logExceptionAsError( new AzureException("Could not create the ServiceBusSharedKeyCredential.", e)); @@ -123,6 +122,17 @@ public ServiceBusClientBuilder connectionString(String connectionString) { return credential(properties.getEndpoint().getHost(), tokenCredential); } + private TokenCredential getTokenCredential(ConnectionStringProperties properties) { + TokenCredential tokenCredential; + if (properties.getSharedAccessSignature() == null) { + tokenCredential = new ServiceBusSharedKeyCredential(properties.getSharedAccessKeyName(), + properties.getSharedAccessKey(), ServiceBusConstants.TOKEN_VALIDITY); + } else { + tokenCredential = new ServiceBusSharedKeyCredential(properties.getSharedAccessSignature()); + } + return tokenCredential; + } + /** * Sets the configuration store that is used during construction of the service client. * diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusSharedKeyCredential.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusSharedKeyCredential.java index 78c351a814126..1a152720e2bd8 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusSharedKeyCredential.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusSharedKeyCredential.java @@ -19,8 +19,10 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.time.Duration; +import java.time.Instant; import java.time.OffsetDateTime; import java.time.ZoneOffset; +import java.util.Arrays; import java.util.Base64; import java.util.Locale; import java.util.Objects; @@ -52,6 +54,7 @@ public class ServiceBusSharedKeyCredential implements TokenCredential { private final String policyName; private final Mac hmac; private final Duration tokenValidity; + private final String sharedAccessSignature; /** * Creates an instance that authorizes using the {@code policyName} and {@code sharedAccessKey}. @@ -112,6 +115,26 @@ public ServiceBusSharedKeyCredential(String policyName, String sharedAccessKey, throw logger.logExceptionAsError(new IllegalArgumentException( "'sharedAccessKey' is an invalid value for the hashing algorithm.", e)); } + this.sharedAccessSignature = null; + } + + /** + * Creates an instance using the provided Shared Access Signature (SAS) string. The credential created using this + * constructor will not be refreshed. The expiration time is set to the time defined in "se={ + * tokenValidationSeconds}`. If the SAS string does not contain this or is in invalid format, then the token + * expiration will be set to {@link OffsetDateTime#MAX max duration}. + *

    See how to generate SAS + * programmatically.

    + * + * @param sharedAccessSignature The base64 encoded shared access signature string. + * @throws NullPointerException if {@code sharedAccessSignature} is null. + */ + public ServiceBusSharedKeyCredential(String sharedAccessSignature) { + this.sharedAccessSignature = Objects.requireNonNull(sharedAccessSignature, + "'sharedAccessSignature' cannot be null"); + this.policyName = null; + this.hmac = null; + this.tokenValidity = null; } /** @@ -138,6 +161,10 @@ private AccessToken generateSharedAccessSignature(final String resource) throws throw logger.logExceptionAsError(new IllegalArgumentException("resource cannot be empty")); } + if (sharedAccessSignature != null) { + return new AccessToken(sharedAccessSignature, getExpirationTime(sharedAccessSignature)); + } + final String utf8Encoding = UTF_8.name(); final OffsetDateTime expiresOn = OffsetDateTime.now(ZoneOffset.UTC).plus(tokenValidity); final String expiresOnEpochSeconds = Long.toString(expiresOn.toEpochSecond()); @@ -155,4 +182,24 @@ private AccessToken generateSharedAccessSignature(final String resource) throws return new AccessToken(token, expiresOn); } + + private OffsetDateTime getExpirationTime(String sharedAccessSignature) { + String[] parts = sharedAccessSignature.split("&"); + return Arrays.stream(parts) + .map(part -> part.split("=")) + .filter(pair -> pair.length == 2 && pair[0].equalsIgnoreCase("se")) + .findFirst() + .map(pair -> pair[1]) + .map(expirationTimeStr -> { + try { + long epochSeconds = Long.parseLong(expirationTimeStr); + return Instant.ofEpochSecond(epochSeconds).atOffset(ZoneOffset.UTC); + } catch (NumberFormatException exception) { + logger.verbose("Invalid expiration time format in the SAS token: {}. Falling back to max " + + "expiration time.", expirationTimeStr); + return OffsetDateTime.MAX; + } + }) + .orElse(OffsetDateTime.MAX); + } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java index 675f296a51038..62bc0a9e8cc76 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusClientBuilderTest.java @@ -289,6 +289,22 @@ public void testProxyOptionsConfiguration(String proxyConfiguration, boolean exp Assertions.assertEquals(expectedClientCreation, clientCreated); } + @Test + public void testConnectionStringWithSas() { + String connectionStringWithEntityPath = "Endpoint=sb://sb-name.servicebus.windows.net/;" + + "SharedAccessSignature=SharedAccessSignature test-value;EntityPath=sb-name"; + assertNotNull(new ServiceBusClientBuilder() + .connectionString(connectionStringWithEntityPath)); + + assertThrows(IllegalArgumentException.class, + () -> new ServiceBusClientBuilder() + .connectionString("SharedAccessSignature=SharedAccessSignature test-value;EntityPath=sb-name")); + + assertThrows(IllegalArgumentException.class, + () -> new ServiceBusClientBuilder() + .connectionString("Endpoint=sb://sb-name.servicebus.windows.net/;EntityPath=sb-name")); + } + private static Stream getProxyConfigurations() { return Stream.of( Arguments.of("http://localhost:8080", true), diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusSharedKeyCredentialTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusSharedKeyCredentialTest.java new file mode 100644 index 0000000000000..761ef3c11bd6e --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusSharedKeyCredentialTest.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.implementation; + +import com.azure.core.credential.TokenRequestContext; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import reactor.test.StepVerifier; + +import java.time.OffsetDateTime; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.*; + +/** + * Unit tests for {@link ServiceBusSharedKeyCredential}. + */ +public class ServiceBusSharedKeyCredentialTest { + + @ParameterizedTest + @MethodSource("getSas") + public void testSharedAccessSignatureCredential(String sas, OffsetDateTime expectedExpirationTime) { + ServiceBusSharedKeyCredential serviceBusSharedKeyCredential = new ServiceBusSharedKeyCredential(sas); + StepVerifier.create(serviceBusSharedKeyCredential.getToken(new TokenRequestContext().addScopes("sb://test" + + "-entity.servicebus.windows.net/.default"))) + .assertNext(token -> { + assertNotNull(token.getToken()); + assertEquals(sas, token.getToken()); + assertEquals(expectedExpirationTime, token.getExpiresAt()); + }) + .verifyComplete(); + } + + private static Stream getSas() { + String validSas = "SharedAccessSignature " + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&se=1599537084" + + "&skn=test-sas-key"; + String validSasWithNoExpirationTime = "SharedAccessSignature " + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&skn=test-sas-key"; + String validSasInvalidExpirationTimeFormat = "SharedAccessSignature " + + "sr=https%3A%2F%2Fentity-name.servicebus.windows.net%2F" + + "&sig=encodedsignature%3D" + + "&se=se=2020-12-31T13:37:45Z" + + "&skn=test-sas-key"; + + return Stream.of( + Arguments.of(validSas, OffsetDateTime.parse("2020-09-08T03:51:24Z")), + Arguments.of(validSasWithNoExpirationTime, OffsetDateTime.MAX), + Arguments.of(validSasInvalidExpirationTimeFormat, OffsetDateTime.MAX) + ); + } +} From 3a7e4466e2c3a056bbbceb300ab694e01f7e3f68 Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Wed, 9 Sep 2020 12:21:05 -0700 Subject: [PATCH 150/168] refactor(adt): Refactor variable names as per java guidelines (#14985) --- .../core/DigitalTwinsClientBuilder.java | 2 +- .../DigitalTwinsLifecycleAsyncSample.java | 98 ++++++++++--------- .../core/ModelsLifecycleSyncSamples.java | 4 +- .../core/helpers/SamplesUtil.java | 4 +- .../core/DigitalTwinsTestBase.java | 8 +- 5 files changed, 59 insertions(+), 57 deletions(-) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClientBuilder.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClientBuilder.java index 65c9bb9080db0..bf97884107644 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClientBuilder.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClientBuilder.java @@ -198,7 +198,7 @@ public DigitalTwinsClientBuilder endpoint(String endpoint) { * @param tokenCredential the authentication token provider. * @return the updated DigitalTwinsClientBuilder instance for fluent building. */ - public DigitalTwinsClientBuilder tokenCredential(TokenCredential tokenCredential) { + public DigitalTwinsClientBuilder credential(TokenCredential tokenCredential) { this.tokenCredential = tokenCredential; return this; } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java index 747d606a4d9b2..72bb9e1008b9a 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java @@ -4,6 +4,7 @@ package com.azure.digitaltwins.core; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.digitaltwins.core.helpers.ConsoleLogger; import com.azure.digitaltwins.core.helpers.FileHelper; import com.azure.digitaltwins.core.helpers.SamplesArguments; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; @@ -12,7 +13,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.http.HttpStatus; import java.io.IOException; import java.net.URISyntaxException; @@ -30,6 +30,7 @@ import static com.azure.digitaltwins.core.helpers.SamplesConstants.*; import static com.azure.digitaltwins.core.helpers.SamplesUtil.IgnoreConflictError; import static com.azure.digitaltwins.core.helpers.SamplesUtil.IgnoreNotFoundError; +import static java.net.HttpURLConnection.HTTP_NOT_FOUND; import static java.util.Arrays.asList; /** @@ -57,27 +58,27 @@ */ public class DigitalTwinsLifecycleAsyncSample { - private static final int MaxWaitTimeAsyncOperationsInSeconds = 10; - private static final ObjectMapper mapper = new ObjectMapper(); + private static final int MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS = 10; + private static final ObjectMapper MAPPER = new ObjectMapper(); - private static final URL DtdlDirectoryUrl = DigitalTwinsLifecycleAsyncSample.class.getClassLoader().getResource("DTDL"); - private static final Path DtDlDirectoryPath; - private static final Path TwinsPath; - private static final Path ModelsPath; - private static final Path RelationshipsPath; + private static final URL DTDL_DIRECTORY_URL = DigitalTwinsLifecycleAsyncSample.class.getClassLoader().getResource("DTDL"); + private static final Path DTDL_DIRECTORY_PATH; + private static final Path TWINS_PATH; + private static final Path MODELS_PATH; + private static final Path RELATIONSHIPS_PATH; private static DigitalTwinsAsyncClient client; static { try { - assert DtdlDirectoryUrl != null; - DtDlDirectoryPath = Paths.get(DtdlDirectoryUrl.toURI()); + assert DTDL_DIRECTORY_URL != null; + DTDL_DIRECTORY_PATH = Paths.get(DTDL_DIRECTORY_URL.toURI()); } catch (URISyntaxException e) { throw new RuntimeException("Unable to convert the DTDL directory URL to URI", e); } - TwinsPath = Paths.get(DtDlDirectoryPath.toString(), "DigitalTwins"); - ModelsPath = Paths.get(DtDlDirectoryPath.toString(), "Models"); - RelationshipsPath = Paths.get(DtDlDirectoryPath.toString(), "Relationships"); + TWINS_PATH = Paths.get(DTDL_DIRECTORY_PATH.toString(), "DigitalTwins"); + MODELS_PATH = Paths.get(DTDL_DIRECTORY_PATH.toString(), "Models"); + RELATIONSHIPS_PATH = Paths.get(DTDL_DIRECTORY_PATH.toString(), "Relationships"); } public static void main(String[] args) throws IOException, InterruptedException { @@ -85,7 +86,7 @@ public static void main(String[] args) throws IOException, InterruptedException SamplesArguments parsedArguments = new SamplesArguments(args); client = new DigitalTwinsClientBuilder() - .tokenCredential( + .credential( new ClientSecretCredentialBuilder() .tenantId(parsedArguments.getTenantId()) .clientId(parsedArguments.getClientId()) @@ -135,8 +136,8 @@ public static void main(String[] args) throws IOException, InterruptedException * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void deleteTwins() throws IOException, InterruptedException { - System.out.println("DELETE DIGITAL TWINS"); - Map twins = FileHelper.loadAllFilesInPath(TwinsPath); + ConsoleLogger.PrintHeader("Delete digital twins"); + Map twins = FileHelper.loadAllFilesInPath(TWINS_PATH); // Call APIs to clean up any pre-existing resources that might be referenced by this sample. If digital twin does not exist, ignore. // Once the async API terminates (either successfully, or with an error), the latch count is decremented, or the semaphore is released. @@ -165,20 +166,20 @@ public static void deleteTwins() throws IOException, InterruptedException { // Call APIs to retrieve all incoming relationships. client.listIncomingRelationships(twinId) - .doOnNext(e -> relationshipList.add(mapper.convertValue(e, BasicRelationship.class))) + .doOnNext(e -> relationshipList.add(MAPPER.convertValue(e, BasicRelationship.class))) .doOnError(IgnoreNotFoundError) .doOnTerminate(listRelationshipSemaphore::countDown) .subscribe(); // Call APIs to delete all relationships. - if (listRelationshipSemaphore.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS)) { + if (listRelationshipSemaphore.await(MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS, TimeUnit.SECONDS)) { relationshipList .forEach(relationship -> client.deleteRelationship(relationship.getSourceId(), relationship.getId()) .doOnSuccess(aVoid -> { if (twinId.equals(relationship.getSourceId())) { - System.out.println("Found and deleted relationship: " + relationship.getId()); + ConsoleLogger.PrintSuccess("Found and deleted relationship: " + relationship.getId()); } else { - System.out.println("Found and deleted incoming relationship: " + relationship.getId()); + ConsoleLogger.PrintSuccess("Found and deleted incoming relationship: " + relationship.getId()); } }) .doOnError(IgnoreNotFoundError) @@ -187,28 +188,27 @@ public static void deleteTwins() throws IOException, InterruptedException { } // Verify that the relationships have been deleted. - if (deleteRelationshipsSemaphore.tryAcquire(relationshipList.size(), MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS)) { + if (deleteRelationshipsSemaphore.tryAcquire(relationshipList.size(), MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS, TimeUnit.SECONDS)) { // Now the digital twin should be safe to delete // Call APIs to delete the twins. client.deleteDigitalTwin(twinId) - .doOnSuccess(aVoid -> System.out.println("Deleted digital twin: " + twinId)) + .doOnSuccess(aVoid -> ConsoleLogger.PrintSuccess("Deleted digital twin: " + twinId)) .doOnError(IgnoreNotFoundError) .doOnTerminate(deleteTwinsLatch::countDown) .subscribe(); // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. - deleteTwinsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + deleteTwinsLatch.await(MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS, TimeUnit.SECONDS); } } } /** * Delete models created by FullLifecycleSample for the ADT service instance. - * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ - public static void deleteAllModels() throws InterruptedException { - System.out.println("DELETING MODELS"); + public static void deleteAllModels() { + ConsoleLogger.PrintHeader("Deleting models"); // This is to ensure models are deleted in an order such that no other models are referencing it. List models = asList(RoomModelId, WifiModelId, BuildingModelId, FloorModelId, HvacModelId); @@ -219,10 +219,10 @@ public static void deleteAllModels() throws InterruptedException { .forEach(modelId -> { try { client.deleteModel(modelId).block(); - System.out.println("Deleted model: " + modelId); + ConsoleLogger.PrintSuccess("Deleted model: " + modelId); } catch (ErrorResponseException ex) { - if (ex.getResponse().getStatusCode() != HttpStatus.SC_NOT_FOUND) { - System.err.println("Could not delete model " + modelId + " due to " + ex); + if (ex.getResponse().getStatusCode() != HTTP_NOT_FOUND) { + ConsoleLogger.PrintFatal("Could not delete model " + modelId + " due to " + ex); } } }); @@ -234,19 +234,21 @@ public static void deleteAllModels() throws InterruptedException { * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void createAllModels() throws IOException, InterruptedException { - System.out.println("CREATING MODELS"); - List modelsToCreate = new ArrayList<>(FileHelper.loadAllFilesInPath(ModelsPath).values()); + ConsoleLogger.PrintHeader("Creating models"); + List modelsToCreate = new ArrayList<>(FileHelper.loadAllFilesInPath(MODELS_PATH).values()); final CountDownLatch createModelsLatch = new CountDownLatch(1); // Call API to create the models. For each async operation, once the operation is completed successfully, a latch is counted down. client.createModels(modelsToCreate) - .doOnNext(listOfModelData -> System.out.println("Count of created models: " + listOfModelData.size())) + .doOnNext(listOfModelData -> listOfModelData.forEach( + modelData -> ConsoleLogger.PrintSuccess("Created model: " + modelData.getId()) + )) .doOnError(IgnoreConflictError) .doOnTerminate(createModelsLatch::countDown) .subscribe(); // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. - createModelsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + createModelsLatch.await(MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS, TimeUnit.SECONDS); } /** @@ -254,19 +256,19 @@ public static void createAllModels() throws IOException, InterruptedException { * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void listAllModels() throws InterruptedException { - System.out.println("LISTING MODELS"); + ConsoleLogger.PrintHeader("Listing models"); final CountDownLatch listModelsLatch = new CountDownLatch(1); // Call API to list the models. For each async operation, once the operation is completed successfully, a latch is counted down. client.listModels() - .doOnNext(modelData -> System.out.println("Retrieved model: " + modelData.getId() + ", display name '" + modelData.getDisplayName().get("en") + "'," + + .doOnNext(modelData -> ConsoleLogger.PrintSuccess("Retrieved model: " + modelData.getId() + ", display name '" + modelData.getDisplayName().get("en") + "'," + " upload time '" + modelData.getUploadTime() + "' and decommissioned '" + modelData.isDecommissioned() + "'")) - .doOnError(throwable -> System.err.println("List models error: " + throwable)) + .doOnError(throwable -> ConsoleLogger.PrintFatal("List models error: " + throwable)) .doOnTerminate(listModelsLatch::countDown) .subscribe(); // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. - listModelsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + listModelsLatch.await(MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS, TimeUnit.SECONDS); } /** @@ -275,20 +277,20 @@ public static void listAllModels() throws InterruptedException { * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void createAllTwins() throws IOException, InterruptedException { - System.out.println("CREATE DIGITAL TWINS"); - Map twins = FileHelper.loadAllFilesInPath(TwinsPath); + ConsoleLogger.PrintHeader("Create digital twins"); + Map twins = FileHelper.loadAllFilesInPath(TWINS_PATH); final CountDownLatch createTwinsLatch = new CountDownLatch(twins.size()); // Call APIs to create the twins. For each async operation, once the operation is completed successfully, a latch is counted down. twins .forEach((twinId, twinContent) -> client.createDigitalTwin(twinId, twinContent) .subscribe( - twin -> System.out.println("Created digital twin: " + twinId + "\n\t Body: " + twin), - throwable -> System.err.println("Could not create digital twin " + twinId + " due to " + throwable), + twin -> ConsoleLogger.PrintSuccess("Created digital twin: " + twinId + "\n\t Body: " + twin), + throwable -> ConsoleLogger.PrintFatal("Could not create digital twin " + twinId + " due to " + throwable), createTwinsLatch::countDown)); // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. - createTwinsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + createTwinsLatch.await(MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS, TimeUnit.SECONDS); } /** @@ -297,8 +299,8 @@ public static void createAllTwins() throws IOException, InterruptedException { * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void connectTwinsTogether() throws IOException, InterruptedException { - System.out.println("CONNECT DIGITAL TWINS"); - Map allRelationships = FileHelper.loadAllFilesInPath(RelationshipsPath); + ConsoleLogger.PrintHeader("Connect digital twins"); + Map allRelationships = FileHelper.loadAllFilesInPath(RELATIONSHIPS_PATH); final CountDownLatch connectTwinsLatch = new CountDownLatch(4); // For each relationship array we deserialize it first. @@ -306,14 +308,14 @@ public static void connectTwinsTogether() throws IOException, InterruptedExcepti allRelationships.values().forEach( relationshipContent -> { try { - List relationships = mapper.readValue(relationshipContent, new TypeReference>() { }); + List relationships = MAPPER.readValue(relationshipContent, new TypeReference>() { }); // From loaded relationships, get the source Id and Id from each one, and create it with full relationship payload. relationships .forEach(relationship -> { try { - client.createRelationship(relationship.getSourceId(), relationship.getId(), mapper.writeValueAsString(relationship)) - .doOnSuccess(s -> System.out.println("Linked twin " + relationship.getSourceId() + " to twin " + relationship.getTargetId() + " as " + relationship.getName())) + client.createRelationship(relationship.getSourceId(), relationship.getId(), MAPPER.writeValueAsString(relationship)) + .doOnSuccess(s -> ConsoleLogger.PrintSuccess("Linked twin " + relationship.getSourceId() + " to twin " + relationship.getTargetId() + " as " + relationship.getName())) .doOnError(IgnoreConflictError) .doOnTerminate(connectTwinsLatch::countDown) .subscribe(); @@ -328,6 +330,6 @@ public static void connectTwinsTogether() throws IOException, InterruptedExcepti ); // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. - connectTwinsLatch.await(MaxWaitTimeAsyncOperationsInSeconds, TimeUnit.SECONDS); + connectTwinsLatch.await(MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS, TimeUnit.SECONDS); } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java index ae3ed9c6d1b60..452bb13ffbed2 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java @@ -24,12 +24,12 @@ public class ModelsLifecycleSyncSamples { private static DigitalTwinsClient client; - public static void main(String[] args) throws IOException, InterruptedException { + public static void main(String[] args) { SamplesArguments parsedArguments = new SamplesArguments(args); client = new DigitalTwinsClientBuilder() - .tokenCredential( + .credential( new ClientSecretCredentialBuilder() .tenantId(parsedArguments.getTenantId()) .clientId(parsedArguments.getClientId()) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java index 38d28fdaeeffa..94a1b7c713919 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java @@ -13,13 +13,13 @@ public class SamplesUtil { public static final Consumer IgnoreNotFoundError = throwable -> { if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HTTP_NOT_FOUND) { - System.err.println("Error received: " + throwable); + ConsoleLogger.PrintFatal("Error received: " + throwable); } }; public static final Consumer IgnoreConflictError = throwable -> { if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HTTP_CONFLICT) { - System.err.println("Error received: " + throwable); + ConsoleLogger.PrintFatal("Error received: " + throwable); } }; } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java index 258df31566766..307e7bc9160f0 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java @@ -30,7 +30,7 @@ protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder() { if (interceptorManager.isPlaybackMode()){ builder.httpClient(interceptorManager.getPlaybackClient()); // Use fake credentials for playback mode. - builder.tokenCredential(new FakeCredentials()); + builder.credential(new FakeCredentials()); return builder; } @@ -43,7 +43,7 @@ protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder() { } // Only get valid live token when running live tests. - builder.tokenCredential(new ClientSecretCredentialBuilder() + builder.credential(new ClientSecretCredentialBuilder() .tenantId(TENANT_ID) .clientId(CLIENT_ID) .clientSecret(CLIENT_SECRET) @@ -59,7 +59,7 @@ protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder(HttpPipelinePol if (interceptorManager.isPlaybackMode()){ builder.httpClient(interceptorManager.getPlaybackClient()); // Use fake credentials for playback mode. - builder.tokenCredential(new FakeCredentials()); + builder.credential(new FakeCredentials()); addPolicies(builder, policies); return builder; } @@ -75,7 +75,7 @@ protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder(HttpPipelinePol } // Only get valid live token when running live tests. - builder.tokenCredential(new ClientSecretCredentialBuilder() + builder.credential(new ClientSecretCredentialBuilder() .tenantId(TENANT_ID) .clientId(CLIENT_ID) .clientSecret(CLIENT_SECRET) From a683ebdb243249c369f769b0beb0985c0e46c6f6 Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Wed, 9 Sep 2020 13:00:34 -0700 Subject: [PATCH 151/168] Add Model API tests to ADT, fix a few ADT implementation details (#14791) Fixed a few test assets as well. While they were accepted by the service when the context field was just one value, the service always returns a model such that the context is an array with one value instead. This makes it easier to test that models retrieved from the service match our expectations --- .../azure-digitaltwins-core/pom.xml | 17 +- .../core/ModelsLifecycleSyncSamples.java | 11 +- .../core/helpers/UniqueIdHelper.java | 29 +- .../core/DigitalTwinsTestBase.java | 83 ++--- .../digitaltwins/core/ModelsAsyncTest.java | 137 +++++++++ .../azure/digitaltwins/core/ModelsTest.java | 130 ++++++++ .../digitaltwins/core/ModelsTestBase.java | 79 +++++ .../azure/digitaltwins/core/SampleTest.java | 42 --- .../digitaltwins/core/TestAssetDefaults.java | 28 +- .../digitaltwins/core/TestAssetsHelper.java | 110 ++----- .../azure/digitaltwins/core/TestHelper.java | 92 ++++++ .../resources/session-records/ListTest.json | 21 -- ...createModelThrowsIfModelAlreadyExists.json | 57 ++++ .../getModelThrowsIfModelDoesNotExist.json | 21 ++ .../getModelThrowsIfModelIdInvalid.json | 21 ++ .../session-records/modelLifecycleTest.json | 285 ++++++++++++++++++ .../test-assets/BuildingModelPayload.json | 2 +- .../test-assets/FloorModelPayload.json | 2 +- .../test-assets/HvacModelPayload.json | 2 +- .../test-assets/RoomModelPayload.json | 2 +- .../test-assets/RoomWithWifiModelPayload.json | 2 +- .../test-assets/WardModelPayload.json | 2 +- 22 files changed, 953 insertions(+), 222 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsAsyncTest.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsTest.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsTestBase.java delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestHelper.java delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/createModelThrowsIfModelAlreadyExists.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelDoesNotExist.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelIdInvalid.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/modelLifecycleTest.json diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml index f9ec9469dac0f..3632638f95579 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml +++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml @@ -11,9 +11,9 @@ ../../parents/azure-client-sdk-parent - com.azure - azure-digitaltwins-core - 1.0.0-beta.1 + com.azure + azure-digitaltwins-core + 1.0.0-beta.1 @@ -84,11 +84,14 @@ - - + + src/samples/resources - - + + + src/test/resources + + org.apache.maven.plugins diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java index 452bb13ffbed2..be803e9dd46ee 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java @@ -13,6 +13,8 @@ import java.net.HttpURLConnection; import java.util.ArrayList; import java.util.Arrays; +import java.util.Random; +import java.util.function.Function; /** * Creates a component with a random Id. @@ -45,11 +47,16 @@ public static void main(String[] args) { runModelLifecycleSample(); } + public static Function randomIntegerStringGenerator = (maxLength) -> { + int randInt = new Random().nextInt(maxLength); + return String.valueOf(randInt); + }; + public static void runModelLifecycleSample() { // For the purpose of this sample we will create temporary models using random model Ids and then decommission a model. // We have to make sure these model Ids are unique within the DigitalTwin instance. - String componentModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TemporaryComponentModelPrefix, client); - String sampleModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TemporaryModelPrefix, client); + String componentModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TemporaryComponentModelPrefix, client, randomIntegerStringGenerator); + String sampleModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TemporaryModelPrefix, client, randomIntegerStringGenerator); String newComponentModelPayload = SamplesConstants.TemporaryComponentModelPayload .replace(SamplesConstants.ComponentId, componentModelId); diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java index 4f0214413b5f6..22d5f554663b3 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java @@ -1,36 +1,39 @@ package com.azure.digitaltwins.core.helpers; +import com.azure.digitaltwins.core.DigitalTwinsAsyncClient; import com.azure.digitaltwins.core.DigitalTwinsClient; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; import java.net.HttpURLConnection; -import java.util.Random; import java.util.function.Function; public class UniqueIdHelper { - private static final Random random = new Random(); - - public static String getUniqueModelId(String baseName, DigitalTwinsClient client) { - return getUniqueId(baseName, (modelId -> client.getModel(modelId).getId())); + public static String getUniqueModelId(String baseName, DigitalTwinsAsyncClient client, Function randomIntegerStringGenerator) { + return getUniqueId(baseName, (modelId -> client.getModel(modelId).block().getId()), randomIntegerStringGenerator); } + public static String getUniqueModelId(String baseName, DigitalTwinsClient client, Function randomIntegerStringGenerator) { + return getUniqueId(baseName, (modelId -> client.getModel(modelId).getId()), randomIntegerStringGenerator); + } - private static String getUniqueId(String baseName, Function getResource) { + // Taking randomIntegerStringGenerator as a parameter here because e2e tests use a special function for recording and replaying "random" numbers + // and samples just use random numbers. + private static String getUniqueId(String baseName, Function getResource, Function randomIntegerStringGenerator) { int maxAttempts = 10; - int maxVal = 10000; - String id = baseName + random.nextInt(maxVal); + int maxRandomDigits = 8; // Not to be confused with max random value. This value determines the length of the string of random integers - for (int attemptsMade = 0 ; attemptsMade < maxAttempts ; attemptsMade ++ ) { + for (int attemptsMade = 0 ; attemptsMade < maxAttempts ; attemptsMade++) { + String id = baseName + randomIntegerStringGenerator.apply(maxRandomDigits); try { getResource.apply(id); - } - catch (ErrorResponseException ex){ + } catch (ErrorResponseException ex) { if (ex.getResponse().getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) { return id; + } else { + // This request should not retried if it encounters a 401 error, for instance + throw new IllegalStateException("Encountered unexpected error while searching for unique id", ex); } } - - id = baseName + random.nextInt(maxVal); } throw new IllegalStateException("Unique id could not be found with base name" + baseName); diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java index 307e7bc9160f0..e4b70ea1fe923 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java @@ -3,14 +3,20 @@ import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; import com.azure.core.credential.TokenRequestContext; +import com.azure.core.http.HttpClient; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; import com.azure.identity.ClientSecretCredentialBuilder; import reactor.core.publisher.Mono; +import java.time.OffsetDateTime; +import java.util.function.Function; + public class DigitalTwinsTestBase extends TestBase { + private static final String PLAYBACK_ENDPOINT = "https://playback.api.wus2.digitaltwins.azure.net"; + protected static final String TENANT_ID = Configuration.getGlobalConfiguration() .get("TENANT_ID", "tenantId"); @@ -21,16 +27,16 @@ public class DigitalTwinsTestBase extends TestBase .get("CLIENT_ID", "clientId"); protected static final String DIGITALTWINS_URL = Configuration.getGlobalConfiguration() - .get("DIGITALTWINS_URL", "https://playback.api.wus2.digitaltwins.azure.net"); - - protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder() { - DigitalTwinsClientBuilder builder = new DigitalTwinsClientBuilder() - .endpoint(DIGITALTWINS_URL); + .get("DIGITALTWINS_URL", PLAYBACK_ENDPOINT); + protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsClientBuilder builder = new DigitalTwinsClientBuilder(); if (interceptorManager.isPlaybackMode()){ builder.httpClient(interceptorManager.getPlaybackClient()); // Use fake credentials for playback mode. builder.credential(new FakeCredentials()); + // Connect to a special host when running tests in playback mode. + builder.endpoint(PLAYBACK_ENDPOINT); return builder; } @@ -42,6 +48,8 @@ protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder() { builder.addPolicy(interceptorManager.getRecordPolicy()); } + builder.endpoint(DIGITALTWINS_URL); + // Only get valid live token when running live tests. builder.credential(new ClientSecretCredentialBuilder() .tenantId(TENANT_ID) @@ -52,53 +60,50 @@ protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder() { return builder; } - protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder(HttpPipelinePolicy... policies) { - DigitalTwinsClientBuilder builder = new DigitalTwinsClientBuilder() - .endpoint(DIGITALTWINS_URL); - - if (interceptorManager.isPlaybackMode()){ - builder.httpClient(interceptorManager.getPlaybackClient()); - // Use fake credentials for playback mode. - builder.credential(new FakeCredentials()); - addPolicies(builder, policies); - return builder; - } - - addPolicies(builder, policies); - - // TODO: investigate whether or not we need to add a retry policy. + protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion, HttpPipelinePolicy... policies) { + DigitalTwinsClientBuilder builder = getDigitalTwinsClientBuilder(httpClient, serviceVersion); - // If it is record mode, we add record mode policies to the builder. - // There is no isRecordMode method on interceptorManger. - if (!interceptorManager.isLiveMode()) { - builder.addPolicy(interceptorManager.getRecordPolicy()); + if (policies != null) { + for (HttpPipelinePolicy policy : policies) { + builder.addPolicy(policy); + } } - // Only get valid live token when running live tests. - builder.credential(new ClientSecretCredentialBuilder() - .tenantId(TENANT_ID) - .clientId(CLIENT_ID) - .clientSecret(CLIENT_SECRET) - .build()); - return builder; } - private static void addPolicies(DigitalTwinsClientBuilder builder, HttpPipelinePolicy... policies) { - if (policies == null) { - return; + /** + * This function generates a random string of integers for use when creating models with a random version. It takes + * a maxLength parameter that determines how long of a string of integers will be produced. + * + * For instance, if maxLength is 5, then the longest string of integers generated by this function may be "12345" + */ + public Function randomIntegerStringGenerator = (maxLength) -> { + // This random string provided by azure.core is recorded, but it is also not guaranteed to be only integers + // It usually generates a string like "154A52c29F42D" or similar. We need a string of random integers though + // since our e2e tests need a random version number for our models. This function will convert the random + // string of characters into a random string of integers. + char[] randomCharactersString = testResourceNamer.randomName("", maxLength).toCharArray(); + String randomIntegersString = ""; + + // Convert the random string of characters into a random string of integers. A given random string of characters will always + // be converted into the same random string of integers which is important since a recorded test and its replay + // need to use the same random model version number so that the service calls match the session records. + for (int i = 0; i < randomCharactersString.length; i++) + { + randomIntegersString += ((int) randomCharactersString[i]) % 10; } - for (HttpPipelinePolicy policy : policies) { - builder.addPolicy(policy); - } - } + return randomIntegersString; + }; + // This should only be used when running tests in playback mode. Our client library requires that some token provider + // is provided, but the actual value of the token is irrelevant when running playback tests. static class FakeCredentials implements TokenCredential { @Override public Mono getToken(TokenRequestContext tokenRequestContext) { - return Mono.empty(); + return Mono.just(new AccessToken("someFakeToken", OffsetDateTime.MAX)); } } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsAsyncTest.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsAsyncTest.java new file mode 100644 index 0000000000000..bcba730b9c742 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsAsyncTest.java @@ -0,0 +1,137 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.HttpClient; +import com.azure.core.util.logging.ClientLogger; +import com.azure.digitaltwins.core.helpers.UniqueIdHelper; +import com.azure.digitaltwins.core.models.ModelData; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import reactor.test.StepVerifier; + +import java.net.HttpURLConnection; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Consumer; + +import static com.azure.digitaltwins.core.TestHelper.DISPLAY_NAME_WITH_ARGUMENTS; +import static com.azure.digitaltwins.core.TestHelper.assertRestException; +import static org.junit.jupiter.api.Assertions.*; + +/** + * Async client implementation of the model tests defined in {@link ModelsTestBase} + */ +public class ModelsAsyncTest extends ModelsTestBase { + + private final ClientLogger logger = new ClientLogger(ModelsAsyncTest.class); + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void modelLifecycleTest(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion); + + // Create some models to test the lifecycle of + List createdModels = new ArrayList<>(); + createModelsRunner(asyncClient, (modelsList) -> { + StepVerifier.create(asyncClient.createModels(modelsList)) + .assertNext(createdModelsResponseList -> { + createdModels.addAll(createdModelsResponseList); + logger.info("Created {} models successfully", createdModelsResponseList.size()); + }) + .verifyComplete(); + }); + + for (int modelIndex = 0; modelIndex < createdModels.size(); modelIndex++) { + final ModelData expected = createdModels.get(modelIndex); + + // Get the model + getModelRunner(expected.getId(), (modelId) -> { + StepVerifier.create(asyncClient.getModelWithResponse(modelId)) + .assertNext(retrievedModel -> { + assertModelDataAreEqual(expected, retrievedModel.getValue(), false); + }) + .verifyComplete(); + logger.info("Model {} matched expectations", modelId); + }); + + // Decommission the model + decommissionModelRunner(expected.getId(), (modelId) -> { + logger.info("Decommissioning model {}", modelId); + StepVerifier.create(asyncClient.decommissionModel(modelId)) + .verifyComplete(); + }); + + // Get the model again to see if it was decommissioned as expected + getModelRunner(expected.getId(), (modelId) -> { + StepVerifier.create(asyncClient.getModel(modelId)) + .assertNext(retrievedModel -> { + assertTrue(retrievedModel.isDecommissioned()); + }) + .verifyComplete(); + logger.info("Model {} was decommissioned successfully", modelId); + }); + + // Delete the model + deleteModelRunner(expected.getId(), (modelId) -> { + logger.info("Deleting model {}", modelId); + StepVerifier.create(asyncClient.deleteModel(modelId)) + .verifyComplete(); + }); + } + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void getModelThrowsIfModelDoesNotExist(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion); + final String nonExistantModelId = "urn:doesnotexist:fakemodel:1000"; + StepVerifier.create(asyncClient.getModel(nonExistantModelId)) + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpURLConnection.HTTP_NOT_FOUND)); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void createModelThrowsIfModelAlreadyExists(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion); + + final List modelsToCreate = new ArrayList<>(); + final String wardModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.WARD_MODEL_ID, asyncClient, this.randomIntegerStringGenerator); + final String wardModelPayload = TestAssetsHelper.getWardModelPayload(wardModelId); + modelsToCreate.add(wardModelPayload); + + StepVerifier.create(asyncClient.createModels(modelsToCreate)) + .assertNext((modelData -> { + assertNotNull(modelData); + })) + .verifyComplete(); + + StepVerifier.create(asyncClient.createModels(modelsToCreate)) + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpURLConnection.HTTP_CONFLICT)); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void getModelThrowsIfModelIdInvalid(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion); + final String malformedModelId = "thisIsNotAValidModelId"; + StepVerifier.create(asyncClient.getModel(malformedModelId)) + .verifyErrorSatisfies(ex -> assertRestException(ex, HttpURLConnection.HTTP_BAD_REQUEST)); + } + + private void createModelsRunner(DigitalTwinsAsyncClient asyncClient, Consumer> createModelsTestRunner) { + String buildingModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.BUILDING_MODEL_ID, asyncClient, this.randomIntegerStringGenerator); + String floorModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.FLOOR_MODEL_ID, asyncClient, this.randomIntegerStringGenerator); + String hvacModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.HVAC_MODEL_ID, asyncClient, this.randomIntegerStringGenerator); + String wardModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.WARD_MODEL_ID, asyncClient, this.randomIntegerStringGenerator); + + createModelsRunner(buildingModelId, floorModelId, hvacModelId, wardModelId, createModelsTestRunner); + } + + private DigitalTwinsAsyncClient getAsyncClient(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + return getDigitalTwinsClientBuilder(httpClient, serviceVersion) + .buildAsyncClient(); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsTest.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsTest.java new file mode 100644 index 0000000000000..9bc07a224088b --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsTest.java @@ -0,0 +1,130 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.HttpClient; +import com.azure.core.util.logging.ClientLogger; +import com.azure.digitaltwins.core.helpers.UniqueIdHelper; +import com.azure.digitaltwins.core.models.ModelData; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.net.HttpURLConnection; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Consumer; + +import static com.azure.digitaltwins.core.TestHelper.DISPLAY_NAME_WITH_ARGUMENTS; +import static com.azure.digitaltwins.core.TestHelper.assertRestException; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Sync client implementation of the model tests defined in {@link ModelsTestBase} + */ +public class ModelsTest extends ModelsTestBase { + + private final ClientLogger logger = new ClientLogger(ModelsTestBase.class); + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void modelLifecycleTest(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsClient client = getClient(httpClient, serviceVersion); + + // Create some models to test the lifecycle of + final List createdModels = new ArrayList<>(); + createModelsRunner(client, (modelsList) -> { + List createdModelsResponseList = client.createModels(modelsList); + createdModelsResponseList.forEach((modelData) -> { + createdModels.add(modelData); + logger.info("Created {} models successfully", createdModelsResponseList.size()); + }); + }); + + for (int modelIndex = 0; modelIndex < createdModels.size(); modelIndex++) { + final ModelData expected = createdModels.get(modelIndex); + + // Get the model + getModelRunner(expected.getId(), (modelId) -> { + ModelData actual = client.getModel(modelId); + assertModelDataAreEqual(expected, actual, false); + logger.info("Model {} matched expectations", modelId); + }); + + // Decommission the model + decommissionModelRunner(expected.getId(), (modelId) -> { + logger.info("Decommissioning model {}", modelId); + client.decommissionModel(modelId); + }); + + // Get the model again to see if it was decommissioned as expected + getModelRunner(expected.getId(), (modelId) -> { + ModelData actual = client.getModel(modelId); + assertTrue(actual.isDecommissioned()); + logger.info("Model {} was decommissioned successfully", modelId); + }); + + // Delete the model + deleteModelRunner(expected.getId(), (modelId) -> { + logger.info("Deleting model {}", modelId); + client.deleteModel(modelId); + }); + } + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void getModelThrowsIfModelDoesNotExist(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsClient client = getClient(httpClient, serviceVersion); + final String nonExistantModelId = "urn:doesnotexist:fakemodel:1000"; + getModelRunner(nonExistantModelId, (modelId) -> { + assertRestException(() -> client.getModel(modelId), HttpURLConnection.HTTP_NOT_FOUND); + }); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void createModelThrowsIfModelAlreadyExists(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsClient client = getClient(httpClient, serviceVersion); + + final List modelsToCreate = new ArrayList<>(); + final String wardModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.WARD_MODEL_ID, client, randomIntegerStringGenerator); + final String wardModelPayload = TestAssetsHelper.getWardModelPayload(wardModelId); + modelsToCreate.add(wardModelPayload); + + List createdModels = client.createModels(modelsToCreate); + createdModels.forEach((modelData) -> { + assertNotNull(modelData); + }); + + assertRestException( + () -> client.createModels(modelsToCreate), + HttpURLConnection.HTTP_CONFLICT); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void getModelThrowsIfModelIdInvalid(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsClient client = getClient(httpClient, serviceVersion); + final String malformedModelId = "thisIsNotAValidModelId"; + getModelRunner(malformedModelId, (modelId) -> { + assertRestException(() -> client.getModel(modelId), HttpURLConnection.HTTP_BAD_REQUEST); + }); + } + + private void createModelsRunner(DigitalTwinsClient client, Consumer> createModelsTestRunner) { + String buildingModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.BUILDING_MODEL_ID, client, randomIntegerStringGenerator); + String floorModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.FLOOR_MODEL_ID, client, randomIntegerStringGenerator); + String hvacModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.HVAC_MODEL_ID, client, randomIntegerStringGenerator); + String wardModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.WARD_MODEL_ID, client, randomIntegerStringGenerator); + + createModelsRunner(buildingModelId, floorModelId, hvacModelId, wardModelId, createModelsTestRunner); + } + + private DigitalTwinsClient getClient(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + return getDigitalTwinsClientBuilder(httpClient, serviceVersion) + .buildClient(); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsTestBase.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsTestBase.java new file mode 100644 index 0000000000000..b18df43ccff91 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsTestBase.java @@ -0,0 +1,79 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.HttpClient; +import com.azure.digitaltwins.core.models.ModelData; +import org.junit.jupiter.api.Test; +import org.opentest4j.AssertionFailedError; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.function.Consumer; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * This abstract test class defines all the tests that both the sync and async model test classes need to implement. It also + * houses some model test specific helper functions. + */ +public abstract class ModelsTestBase extends DigitalTwinsTestBase { + @Test + public abstract void modelLifecycleTest(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion); + + @Test + public abstract void getModelThrowsIfModelDoesNotExist(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion); + + @Test + public abstract void createModelThrowsIfModelAlreadyExists(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion); + + @Test + public abstract void getModelThrowsIfModelIdInvalid(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion); + + static void createModelsRunner(String buildingModelId, String floorModelId, String hvacModelId, String wardModelId, Consumer> createModelsTestRunner) { + String modelBuilding = TestAssetsHelper.getBuildingModelPayload(buildingModelId, hvacModelId, floorModelId); + String modelHvac = TestAssetsHelper.getHvacModelPayload(hvacModelId, floorModelId); + String modelWard = TestAssetsHelper.getWardModelPayload(wardModelId); + + List modelsList = new ArrayList<>(Arrays.asList(modelBuilding, modelHvac, modelWard)); + + createModelsTestRunner.accept(modelsList); + } + + void getModelRunner(String modelId, Consumer getModelTestRunner) { + getModelTestRunner.accept(modelId); + } + + void decommissionModelRunner(String modelId, Consumer decommissionModelRunner) { + decommissionModelRunner.accept(modelId); + } + + void deleteModelRunner(String modelId, Consumer deleteModelRunner) { + deleteModelRunner.accept(modelId); + } + + static void assertModelDataAreEqual(ModelData expected, ModelData actual, boolean compareModel) { + assertEquals(expected.getId(), actual.getId()); + assertEquals(expected.getUploadTime(), actual.getUploadTime()); + + // ModelData objects that are obtained through the createModels API do not populate the model field, so it isn't + // worth comparing those ModelData objects with ModelData objects retrieved through getModel calls + if (compareModel) { + assertEquals(expected.getModel(), actual.getModel()); + } + + assertEquals(expected.getDescription().size(), actual.getDescription().size()); + for (String key : expected.getDescription().keySet()) { + assertTrue(actual.getDescription().containsKey(key)); + assertEquals(expected.getDescription().get(key), actual.getDescription().get(key)); + } + + assertEquals(expected.getDisplayName().size(), actual.getDisplayName().size()); + for (String key : expected.getDisplayName().keySet()) { + assertTrue(actual.getDisplayName().containsKey(key)); + assertEquals(expected.getDisplayName().get(key), actual.getDisplayName().get(key)); + } + + assertEquals(expected.isDecommissioned(), actual.isDecommissioned()); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java deleted file mode 100644 index ee9b75d898076..0000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/SampleTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.azure.digitaltwins.core; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.digitaltwins.core.models.ModelData; -import com.azure.digitaltwins.core.util.ListModelOptions; -import org.junit.jupiter.api.Test; - -public class SampleTest extends DigitalTwinsTestBase { - - private static DigitalTwinsClient client; - - @Override - protected void beforeTest(){ - super.beforeTest(); - client = setupClient(); - } - - @Override - protected void afterTest() - { - super.afterTest(); - } - - private DigitalTwinsClient setupClient(){ - return getDigitalTwinsClientBuilder() - .buildClient(); - } - - @Test - public void ListTest(){ - PagedIterable models = client.listModels(new ListModelOptions().setIncludeModelDefinition(true), Context.NONE); - - models - // You can also subscribe to pages by specifying the preferred page size or the associated continuation token to start the processing from. - .streamByPage() - .forEach(page -> { - System.out.println("Response headers status code is " + page.getStatusCode()); - page.getValue().forEach(item -> System.out.println("Model Id retrieved: " + item.getId() + "model definition: " + item.getModel())); - }); - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetDefaults.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetDefaults.java index 2f770d978dbab..429888a8ec5c1 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetDefaults.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetDefaults.java @@ -1,31 +1,31 @@ package com.azure.digitaltwins.core; public class TestAssetDefaults { - public static final String FloorTwinIdPrefix = "floorTwin"; + public static final String FLOOR_TWIN_ID_PREFIX = "floorTwin"; - public static final String RoomTwinIdPrefix = "roomTwin"; + public static final String ROOM_TWIN_ID_PREFIX = "roomTwin"; - public static final String HvacTwinIdPrefix = "hvacTwin"; + public static final String HVAC_TWIN_ID_PREFIX = "hvacTwin"; - public static final String RoomWithWifiTwinIdPrefix = "roomWithWifiTwin"; + public static final String ROOM_WITH_WIFI_TWIN_ID_PREFIX = "roomWithWifiTwin"; - public static final String WifiModelIdPrefix = "dtmi:example:wifi;1"; + public static final String WIFI_MODEL_ID_PREFIX = "dtmi:example:wifi;1"; - public static final String RoomModelIdPrefix = "dtmi:example:room;1"; + public static final String ROOM_MODEL_ID_PREFIX = "dtmi:example:room;1"; - public static final String FloorModelIdPrefix = "dtmi:example:floor;1"; + public static final String FLOOR_MODEL_ID_PREFIX = "dtmi:example:floor;1"; - public static final String HvacModelIdPrefix = "dtmi:example:hvac;1"; + public static final String HVAC_MODEL_ID_PREFIX = "dtmi:example:hvac;1"; - public static final String RoomWithWifiModelIdPrefix = "dtmi:example:wifiroom;1"; + public static final String ROOM_WITH_WIFI_MODEL_ID_PREFIX = "dtmi:example:wifiroom;1"; - public static final String FloorModelId = "dtmi:example:Floor;1"; + public static final String FLOOR_MODEL_ID = "dtmi:example:Floor;1"; - public static final String RoomModelId = "dtmi:example:Room;1"; + public static final String ROOM_MODEL_ID = "dtmi:example:Room;1"; - public static final String HvacModelId = "dtmi:example:Hvac;1"; + public static final String HVAC_MODEL_ID = "dtmi:example:Hvac;1"; - public static final String BuildingModelId = "dtmi:example:Building;1"; + public static final String BUILDING_MODEL_ID = "dtmi:example:Building;1"; - public static final String WardModelId = "dtmi:example:Ward;1"; + public static final String WARD_MODEL_ID = "dtmi:example:Ward;1"; } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java index 8beb4af4d182d..27497ec1d27d3 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestAssetsHelper.java @@ -6,59 +6,57 @@ import java.io.IOException; import java.io.InputStream; +import java.net.HttpURLConnection; import java.util.List; import java.util.Random; import java.util.Scanner; import java.util.function.Consumer; public class TestAssetsHelper { - protected static int MaxTries = 10; - protected static int MaxIdLength = 27; - // Remove all new line characters as they are different in different Operaing Systems. // This will ensure that the recorded files always match the request in playback mode of tests. - private static String RemoveNewLines(String payload) + private static String removeNewLines(String payload) { return payload.replace(System.lineSeparator(), ""); } - public static String GetFloorModelPayload(String floorModelId, String roomModelId, String hvacModelId) + public static String getFloorModelPayload(String floorModelId, String roomModelId, String hvacModelId) { - return RemoveNewLines(readResourceFile("FloorModelPayload") + return removeNewLines(readResourceFile("FloorModelPayload") .replace("FLOOR_MODEL_ID", floorModelId) .replace("ROOM_MODEL_ID", roomModelId) .replace("HVAC_MODEL_ID", hvacModelId)); } - public static String GetRoomModelPayload(String roomModelId, String floorModelId) + public static String getRoomModelPayload(String roomModelId, String floorModelId) { - return RemoveNewLines(readResourceFile("RoomModelPayload") + return removeNewLines(readResourceFile("RoomModelPayload") .replace("ROOM_MODEL_ID", roomModelId) .replace("FLOOR_MODEL_ID", floorModelId)); } - public static String GetHvacModelPayload(String hvacModelId, String floorModelId) + public static String getHvacModelPayload(String hvacModelId, String floorModelId) { - return RemoveNewLines(readResourceFile("HvacModelPayload") + return removeNewLines(readResourceFile("HvacModelPayload") .replace("HVAC_MODEL_ID", hvacModelId) .replace("FLOOR_MODEL_ID", floorModelId)); } - public static String GetBuildingModelPayload(String buildingModelId, String hvacModelId, String floorModelId) + public static String getBuildingModelPayload(String buildingModelId, String hvacModelId, String floorModelId) { - return RemoveNewLines(readResourceFile("BuildingModelPayload") + return removeNewLines(readResourceFile("BuildingModelPayload") .replace("BUILDING_MODEL_ID", buildingModelId) .replace("HVAC_MODEL_ID", hvacModelId) .replace("FLOOR_MODEL_ID", floorModelId)); } - public static String GetWardModelPayload(String wardModelId) + public static String getWardModelPayload(String wardModelId) { - return RemoveNewLines(readResourceFile("WardModelPayload") + return removeNewLines(readResourceFile("WardModelPayload") .replace("WARD_MODEL_ID", wardModelId)); } - public static List GetRoomTwinUpdatePayload() + public static List getRoomTwinUpdatePayload() { UpdateOperationUtility uou = new UpdateOperationUtility(); uou.appendAddOperation("/Humidity", 30); @@ -67,72 +65,72 @@ public static List GetRoomTwinUpdatePayload() return uou.getUpdateOperations(); } - public static List GetWifiComponentUpdatePayload() + public static List getWifiComponentUpdatePayload() { UpdateOperationUtility uou = new UpdateOperationUtility(); uou.appendReplaceOperation("/Network", "New Network"); return uou.getUpdateOperations(); } - public static String GetFloorTwinPayload(String floorModelId) + public static String getFloorTwinPayload(String floorModelId) { - return RemoveNewLines(readResourceFile("FloorTwinPayload") + return removeNewLines(readResourceFile("FloorTwinPayload") .replace("FLOOR_MODEL_ID", floorModelId)); } - public static String GetRoomTwinPayload(String roomModelId) + public static String getRoomTwinPayload(String roomModelId) { - return RemoveNewLines(readResourceFile("RoomTwinPayload") + return removeNewLines(readResourceFile("RoomTwinPayload") .replace("ROOM_MODEL_ID", roomModelId)); } - public static String GetRelationshipPayload(String targetTwinId, String relationshipName) + public static String getRelationshipPayload(String targetTwinId, String relationshipName) { - return RemoveNewLines(readResourceFile("RelationshipPayload") + return removeNewLines(readResourceFile("RelationshipPayload") .replace("TARGET_TWIN_ID", targetTwinId) .replace("RELATIONSHIP_NAME", relationshipName)); } - public static String GetRelationshipWithPropertyPayload(String targetTwinId, String relationshipName, String propertyName, boolean propertyValue) + public static String getRelationshipWithPropertyPayload(String targetTwinId, String relationshipName, String propertyName, boolean propertyValue) { - return RemoveNewLines(readResourceFile("RelationshipWithPropertyPayload") + return removeNewLines(readResourceFile("RelationshipWithPropertyPayload") .replace("TARGET_TWIN_ID", targetTwinId) .replace("RELATIONSHIP_NAME", relationshipName) .replace("PROPERTY_NAME", propertyName) .replace("\"PROPERTY_VALUE\"", String.valueOf(propertyValue).toLowerCase())); } - public static List GetRelationshipUpdatePayload(String propertyName, boolean propertyValue) + public static List getRelationshipUpdatePayload(String propertyName, boolean propertyValue) { UpdateOperationUtility uou = new UpdateOperationUtility(); uou.appendReplaceOperation(propertyName, propertyValue); return uou.getUpdateOperations(); } - public static String GetWifiModelPayload(String wifiModelId) + public static String getWifiModelPayload(String wifiModelId) { - return RemoveNewLines(readResourceFile("WifiModelPayload") + return removeNewLines(readResourceFile("WifiModelPayload") .replace("WIFI_MODEL_ID", wifiModelId)); } - public static String GetRoomWithWifiModelPayload(String roomWithWifiModelId, String wifiModelId, String wifiComponentName) + public static String getRoomWithWifiModelPayload(String roomWithWifiModelId, String wifiModelId, String wifiComponentName) { - return RemoveNewLines(readResourceFile("RoomWithWifiModelPayload") + return removeNewLines(readResourceFile("RoomWithWifiModelPayload") .replace("ROOM_WITH_WIFI_MODEL_ID", roomWithWifiModelId) .replace("WIFI_MODEL_ID", wifiModelId) .replace("WIFI_COMPONENT_NAME", wifiComponentName)); } - public static String GetRoomWithWifiTwinPayload(String roomWithWifiModelId, String wifiComponentName) + public static String getRoomWithWifiTwinPayload(String roomWithWifiModelId, String wifiComponentName) { - return RemoveNewLines(readResourceFile("RoomWithWifiTwinPayload") + return removeNewLines(readResourceFile("RoomWithWifiTwinPayload") .replace("ROOM_WITH_WIFI_MODEL_ID", roomWithWifiModelId) .replace("WIFI_COMPONENT_NAME", wifiComponentName)); } - public static String GetHvacTwinPayload(String hvacModelId) + public static String getHvacTwinPayload(String hvacModelId) { - return RemoveNewLines(readResourceFile("HvacTwinPayload") + return removeNewLines(readResourceFile("HvacTwinPayload") .replace("HVAC_MODEL_ID", hvacModelId)); } @@ -148,51 +146,7 @@ public static String readResourceFile(String fileName) return resourceFileContents; } catch (IOException e) { - throw new RuntimeException("Cannot find file " + fileName, e); - } - } - - public static String GetUniqueModelId(DigitalTwinsClient dtClient, String baseName) - { - return GetUniqueModelId(baseName, (id) -> dtClient.getModel(id)); - } - - public static String GetUniqueDigitalTwinId(DigitalTwinsClient dtClient, String baseName) - { - return GetUniqueModelId(baseName, (id) -> dtClient.getDigitalTwin(id)); - } - - public static String GetUniqueModelId(DigitalTwinsAsyncClient dtClient, String baseName) - { - return GetUniqueModelId(baseName, (id) -> dtClient.getModel(id).block()); - } - - public static String GetUniqueDigitalTwinId(DigitalTwinsAsyncClient dtClient, String baseName) - { - return GetUniqueModelId(baseName, (id) -> dtClient.getDigitalTwin(id).block()); - } - - private static String GetUniqueModelId(String baseName, Consumer getMethod) - { - String id; - Random random = new Random(); - for (int i = 0; i < MaxTries; ++i) - { - id = baseName + random.nextInt(); - id = id.length() > MaxIdLength ? id.substring(0, MaxIdLength) : id; - try - { - getMethod.accept(id); - } - catch (ErrorResponseException e) - { - if (e.getResponse().getStatusCode() == 404) - { - return id; - } - } + throw new RuntimeException("Cannot find file /test-assets/" + fileName + ".json in the resources folder", e); } - - throw new AssertionFailedError("Unique Id could not be found with base " + baseName); } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestHelper.java new file mode 100644 index 0000000000000..ea9879a3930cc --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/TestHelper.java @@ -0,0 +1,92 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.HttpClient; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; +import org.junit.jupiter.params.provider.Arguments; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Stream; + +import static com.azure.core.test.TestBase.AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL; +import static com.azure.core.test.TestBase.getHttpClients; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + +public class TestHelper { + public static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]"; + private static final String AZURE_DIGITALTWINS_TEST_SERVICE_VERSIONS = "AZURE_DIGITALTWINS_TEST_SERVICE_VERSIONS"; + private static final String SERVICE_VERSION_FROM_ENV = + Configuration.getGlobalConfiguration().get(AZURE_DIGITALTWINS_TEST_SERVICE_VERSIONS); + + static void assertRestException(Runnable exceptionThrower, int expectedStatusCode) { + assertRestException(exceptionThrower, ErrorResponseException.class, expectedStatusCode); + } + + static void assertRestException(Runnable exceptionThrower, Class expectedExceptionType, int expectedStatusCode) { + try { + exceptionThrower.run(); + fail("Expected exception was not thrown"); + } catch (Throwable ex) { + assertRestException(ex, expectedExceptionType, expectedStatusCode); + } + } + + static void assertRestException(Throwable exception, int expectedStatusCode) { + assertRestException(exception, ErrorResponseException.class, expectedStatusCode); + } + + static void assertRestException(Throwable exception, Class expectedExceptionType, int expectedStatusCode) { + assertEquals(expectedExceptionType, exception.getClass()); + assertEquals(expectedStatusCode, ((ErrorResponseException) exception).getResponse().getStatusCode()); + } + + /** + * Returns a stream of arguments that includes all combinations of eligible {@link HttpClient HttpClients} and + * service versions that should be tested. + * + * @return A stream of HttpClient and service version combinations to test. + */ + static Stream getTestParameters() { + // when this issues is closed, the newer version of junit will have better support for + // cartesian product of arguments - https://github.com/junit-team/junit5/issues/1427 + List argumentsList = new ArrayList<>(); + getHttpClients() + .forEach(httpClient -> { + Arrays.stream(DigitalTwinsServiceVersion.values()).filter(TestHelper::shouldServiceVersionBeTested) + .forEach(serviceVersion -> argumentsList.add(Arguments.of(httpClient, serviceVersion))); + }); + return argumentsList.stream(); + } + + /** + * Returns whether the given service version match the rules of test framework. + * + *
      + *
    • Using latest service version as default if no environment variable is set.
    • + *
    • If it's set to ALL, all Service versions in {@link DigitalTwinsServiceVersion} will be tested.
    • + *
    • Otherwise, Service version string should match env variable.
    • + *
    + * + * Environment values currently supported are: "ALL", "${version}". + * Use comma to separate http clients want to test. + * e.g. {@code set AZURE_TEST_SERVICE_VERSIONS = V1_0, V2_0} + * + * @param serviceVersion ServiceVersion needs to check + * @return Boolean indicates whether filters out the service version or not. + */ + private static boolean shouldServiceVersionBeTested(DigitalTwinsServiceVersion serviceVersion) { + if (CoreUtils.isNullOrEmpty(SERVICE_VERSION_FROM_ENV)) { + return DigitalTwinsServiceVersion.getLatest().equals(serviceVersion); + } + if (AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL.equalsIgnoreCase(SERVICE_VERSION_FROM_ENV)) { + return true; + } + String[] configuredServiceVersionList = SERVICE_VERSION_FROM_ENV.split(","); + return Arrays.stream(configuredServiceVersionList).anyMatch(configuredServiceVersion -> + serviceVersion.getVersion().equals(configuredServiceVersion.trim())); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json deleted file mode 100644 index 54972e5a89172..0000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/ListTest.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?includeModelDefinition=true&api-version=2020-05-31-preview", - "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b705b0b3-9128-4aff-bdda-afc038f480d8" - }, - "Response" : { - "Strict-Transport-Security" : "max-age=2592000", - "retry-after" : "0", - "Content-Length" : "26814", - "StatusCode" : "200", - "Body" : "{\"value\":[{\"id\":\"dtmi:example:Ward;114653809\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:35:57.0043855+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;114653809\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;111815882\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:35:57.3524717+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;111815882\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;189947004\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:04.264631+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;189947004\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;134000272\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:05.0983867+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;134000272\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;192739528\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:11.4816322+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;192739528\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;116332842\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:11.7749519+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;116332842\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;116238422\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:29.4055305+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;116238422\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;198163867\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:29.8807133+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;198163867\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;121159740\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:51.8135839+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;121159740\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;121200167\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:36:52.3203982+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;121200167\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;112162783\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:08.6579838+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;112162783\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;147373991\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:09.529767+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;147373991\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;161147759\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:15.2200393+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;161147759\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;120708472\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:15.2352591+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;120708472\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;110887268\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:22.2311573+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;110887268\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;118301577\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:37:22.3667165+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;118301577\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;139439832\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:40:48.8947652+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;139439832\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;111263086\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:40:54.0431308+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;111263086\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;168646450\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:05.1032132+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;168646450\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;115143769\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:06.4744458+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;115143769\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;128072960\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:10.0981475+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;128072960\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;110184439\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:10.1085481+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;110184439\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;116847374\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:16.6955258+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;116847374\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;155773321\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:17.7553908+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;155773321\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;114761833\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:37.6566323+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;114761833\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;120391613\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:48.012186+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;120391613\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;159816443\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:53.8412956+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;159816443\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;112440549\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:41:58.1808299+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;112440549\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;186622131\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:01.9623456+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;186622131\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;145075813\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:02.2606087+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;145075813\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;145121366\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:09.2690772+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;145121366\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;116421010\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:42:09.6711432+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;116421010\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:wifiroom;14907\",\"description\":{},\"displayName\":{\"en\":\"RoomWithWifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:44:42.3445106+00:00\",\"model\":{\"@id\":\"dtmi:example:wifiroom;14907\",\"@type\":\"Interface\",\"displayName\":\"RoomWithWifi\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Temperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"Humidity\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"IsOccupied\",\"schema\":\"boolean\"},{\"@type\":\"Property\",\"name\":\"EmployeeId\",\"schema\":\"string\"},{\"@type\":\"Component\",\"name\":\"wifiAccessPoint\",\"schema\":\"dtmi:example:wifi;117599647\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:wifi;117599647\",\"description\":{},\"displayName\":{\"en\":\"Wifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:44:42.3447161+00:00\",\"model\":{\"@id\":\"dtmi:example:wifi;117599647\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Wifi\",\"contents\":[{\"@type\":\"Property\",\"name\":\"RouterName\",\"schema\":\"string\"},{\"@type\":\"Property\",\"name\":\"Network\",\"schema\":\"string\"}]}},{\"id\":\"dtmi:example:Ward;115429255\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:26.6388005+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;115429255\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;189540703\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:26.7312243+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;189540703\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;144568920\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:30.5678849+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;144568920\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:example:Ward;110855032\",\"description\":{\"en\":\"A separate partition in a building, made of rooms and hallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-07-28T23:48:30.7037839+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;110855032\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"A separate partition in a building, made of rooms and hallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}},{\"id\":\"dtmi:samples:Building;1\",\"description\":{},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.2508513+00:00\",\"model\":{\"@id\":\"dtmi:samples:Building;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Building\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"has\",\"target\":\"dtmi:samples:Floor;1\",\"properties\":[{\"@type\":\"Property\",\"name\":\"isAccessRestricted\",\"schema\":\"boolean\"}]},{\"@type\":\"Relationship\",\"name\":\"isEquippedWith\",\"target\":\"dtmi:samples:HVAC;1\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TemperatureUnit\",\"schema\":\"string\"}]}},{\"id\":\"dtmi:samples:Floor;1\",\"description\":{},\"displayName\":{\"en\":\"Floor\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.2510159+00:00\",\"model\":{\"@id\":\"dtmi:samples:Floor;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Floor\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"contains\",\"target\":\"dtmi:samples:Room;1\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"}]}},{\"id\":\"dtmi:samples:HVAC;1\",\"description\":{},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.2510852+00:00\",\"model\":{\"@id\":\"dtmi:samples:HVAC;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"HVAC\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Efficiency\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetHumidity\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"controlsTemperature\",\"target\":\"dtmi:samples:Floor;1\"}]}},{\"id\":\"dtmi:samples:Room;1\",\"description\":{},\"displayName\":{\"en\":\"Room\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.2511785+00:00\",\"model\":{\"@id\":\"dtmi:samples:Room;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Room\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Temperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"Humidity\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"IsOccupied\",\"schema\":\"boolean\"},{\"@type\":\"Property\",\"name\":\"EmployeeId\",\"schema\":\"string\"},{\"@type\":\"Component\",\"name\":\"wifiAccessPoint\",\"schema\":\"dtmi:samples:Wifi;1\"}]}},{\"id\":\"dtmi:samples:Wifi;1\",\"description\":{},\"displayName\":{\"en\":\"Wifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:00.251297+00:00\",\"model\":{\"@id\":\"dtmi:samples:Wifi;1\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Wifi\",\"contents\":[{\"@type\":\"Property\",\"name\":\"RouterName\",\"schema\":\"string\"},{\"@type\":\"Property\",\"name\":\"Network\",\"schema\":\"string\"}]}},{\"id\":\"dtmi:samples:ComponentModel;3759\",\"description\":{},\"displayName\":{\"en\":\"Component1\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:03.8903012+00:00\",\"model\":{\"@id\":\"dtmi:samples:ComponentModel;3759\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"Component1\",\"contents\":[{\"@type\":\"Property\",\"name\":\"ComponentProp1\",\"schema\":\"string\"},{\"@type\":\"Property\",\"name\":\"ComponentProp2\",\"schema\":\"integer\"},{\"@type\":\"Telemetry\",\"name\":\"ComponentTelemetry1\",\"schema\":\"integer\"}]}},{\"id\":\"dtmi:samples:TempModel;5380\",\"description\":{},\"displayName\":{\"en\":\"TempModel\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-01T23:53:03.8904562+00:00\",\"model\":{\"@id\":\"dtmi:samples:TempModel;5380\",\"@type\":\"Interface\",\"@context\":[\"dtmi:dtdl:context;2\"],\"displayName\":\"TempModel\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Prop1\",\"schema\":\"string\"},{\"@type\":\"Property\",\"name\":\"Prop2\",\"schema\":\"integer\"},{\"@type\":\"Component\",\"name\":\"Component1\",\"schema\":\"dtmi:samples:ComponentModel;3759\"},{\"@type\":\"Telemetry\",\"name\":\"Telemetry1\",\"schema\":\"integer\"}]}}],\"nextLink\":null}", - "Date" : "Wed, 02 Sep 2020 20:33:00 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/createModelThrowsIfModelAlreadyExists.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/createModelThrowsIfModelAlreadyExists.json new file mode 100644 index 0000000000000..94bbae2323470 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/createModelThrowsIfModelAlreadyExists.json @@ -0,0 +1,57 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1840022?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f2a0720-db02-450b-ae91-944055ee2c14" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "210", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Ward;1840022. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "c5c9c8de-19b0-4d1b-8636-09859061ef25", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "213", + "StatusCode" : "201", + "Body" : "[{\"id\":\"dtmi:example:Ward;1840022\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:59.3097627+00:00\"}]", + "Date" : "Wed, 09 Sep 2020 19:12:59 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "4d600240-eefd-48a2-81fd-2aaecb1de86f", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "222", + "StatusCode" : "409", + "Body" : "{\"error\":{\"code\":\"ModelAlreadyExists\",\"message\":\"Model with same ID already exists dtmi:example:Ward;1840022. Use Model_List API to view models that already exist. See the Swagger example.(http://aka.ms/ModelListSwSmpl)\"}}", + "Date" : "Wed, 09 Sep 2020 19:12:59 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "06224f" ] +} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelDoesNotExist.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelDoesNotExist.json new file mode 100644 index 0000000000000..4eac6ca631361 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelDoesNotExist.json @@ -0,0 +1,21 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/urn:doesnotexist:fakemodel:1000?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "21c0d44e-fcad-4040-8720-fb336bcb8509" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "216", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) urn:doesnotexist:fakemodel:1000. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelIdInvalid.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelIdInvalid.json new file mode 100644 index 0000000000000..a0e39e4e889d9 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelIdInvalid.json @@ -0,0 +1,21 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/thisIsNotAValidModelId?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "c1e49002-33a0-4846-99df-a6ff324a906c" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "198", + "StatusCode" : "400", + "Body" : "{\"error\":{\"code\":\"InvalidArgument\",\"message\":\"The format of the Model ID thisIsNotAValidModelId provided is not supported. See model documentation(http://aka.ms/ADTv2Models) for supported format.\"}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/modelLifecycleTest.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/modelLifecycleTest.json new file mode 100644 index 0000000000000..9bb4c0c26d8b1 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/modelLifecycleTest.json @@ -0,0 +1,285 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e55febc-1b85-4d4d-8a37-72edf7c6fa75" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "214", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Building;1700523. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Floor;1183981?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "d70c6aac-8d26-4e8e-be5d-502503cddbcf" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "211", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Floor;1183981. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "56230e32-ca5f-4584-a9df-cb2f8ef20680" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "210", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Hvac;1898112. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "8852effd-b57e-44f6-b5d5-be86b0344a23" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "210", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Ward;1172526. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd41e595-13f1-48f6-a183-a4feb434d273", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "607", + "StatusCode" : "201", + "Body" : "[{\"id\":\"dtmi:example:Building;1700523\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7975266+00:00\"},{\"id\":\"dtmi:example:Hvac;1898112\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7976454+00:00\"},{\"id\":\"dtmi:example:Ward;1172526\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7977533+00:00\"}]", + "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "db87f565-3f6e-498f-a519-b9a9502cec35" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "601", + "StatusCode" : "200", + "Body" : "{\"id\":\"dtmi:example:Building;1700523\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7975266+00:00\",\"model\":{\"@id\":\"dtmi:example:Building;1700523\",\"@type\":\"Interface\",\"displayName\":\"Building\",\"description\":\"Afree-standingstructure.\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"has\",\"target\":\"dtmi:example:Floor;1183981\"},{\"@type\":\"Relationship\",\"name\":\"isEquippedWith\",\"target\":\"dtmi:example:Hvac;1898112\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ef6769f-dd0f-4748-8699-61a61f9cf48a", + "Content-Type" : "application/json-patch+json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "de393573-eea7-463a-9af0-dbd4a85b70d6" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "600", + "StatusCode" : "200", + "Body" : "{\"id\":\"dtmi:example:Building;1700523\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T19:12:57.7975266+00:00\",\"model\":{\"@id\":\"dtmi:example:Building;1700523\",\"@type\":\"Interface\",\"displayName\":\"Building\",\"description\":\"Afree-standingstructure.\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"has\",\"target\":\"dtmi:example:Floor;1183981\"},{\"@type\":\"Relationship\",\"name\":\"isEquippedWith\",\"target\":\"dtmi:example:Hvac;1898112\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "f45d9aae-762b-48ef-8944-37f890071140" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "36cd5357-f608-450c-b765-e891af3ec165" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "662", + "StatusCode" : "200", + "Body" : "{\"id\":\"dtmi:example:Hvac;1898112\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7976454+00:00\",\"model\":{\"@id\":\"dtmi:example:Hvac;1898112\",\"@type\":\"Interface\",\"displayName\":\"HVAC\",\"description\":\"Aheating,ventilation,andairconditioningunit.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Efficiency\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetHumidity\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"cools\",\"target\":\"dtmi:example:Floor;1183981\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "501f4c6b-2aab-4e6a-8c83-3419eba91799", + "Content-Type" : "application/json-patch+json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "e141529f-7363-4ed6-b974-5dfb795c49f8" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "661", + "StatusCode" : "200", + "Body" : "{\"id\":\"dtmi:example:Hvac;1898112\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T19:12:57.7976454+00:00\",\"model\":{\"@id\":\"dtmi:example:Hvac;1898112\",\"@type\":\"Interface\",\"displayName\":\"HVAC\",\"description\":\"Aheating,ventilation,andairconditioningunit.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Efficiency\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetHumidity\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"cools\",\"target\":\"dtmi:example:Floor;1183981\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "b21f862d-ecd5-405b-adee-33e6559597d2" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "5670f3d3-88a6-4f52-8148-277e43279acb" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "589", + "StatusCode" : "200", + "Body" : "{\"id\":\"dtmi:example:Ward;1172526\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7977533+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;1172526\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf339b27-1f66-4299-b654-5645718b2cd7", + "Content-Type" : "application/json-patch+json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "17b5a126-85e7-4ed8-9e0a-04252c9eaf6d" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "588", + "StatusCode" : "200", + "Body" : "{\"id\":\"dtmi:example:Ward;1172526\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T19:12:57.7977533+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;1172526\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", + "x-ms-client-request-id" : "45b8490b-e9a9-4741-9b23-22ca1c9862cb" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + }, + "Exception" : null + } ], + "variables" : [ "922745", "30510e", "01033f", "394748" ] +} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/BuildingModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/BuildingModelPayload.json index 838d8435acc24..c511a0b1ee611 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/BuildingModelPayload.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/BuildingModelPayload.json @@ -20,5 +20,5 @@ "schema": "double" } ], - "@context": "dtmi:dtdl:context;2" + "@context": ["dtmi:dtdl:context;2"] } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorModelPayload.json index 176ed5e64ea40..fd782731e2441 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorModelPayload.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/FloorModelPayload.json @@ -1,7 +1,7 @@ { "@id": "FLOOR_MODEL_ID", "@type": "Interface", - "@context": "dtmi:dtdl:context;2", + "@context": ["dtmi:dtdl:context;2"], "displayName": "Floor", "description": "A building story.", "contents": [ diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacModelPayload.json index ab89d13888f9a..4dc830380efd0 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacModelPayload.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/HvacModelPayload.json @@ -25,5 +25,5 @@ "target": "FLOOR_MODEL_ID" } ], - "@context": "dtmi:dtdl:context;2" + "@context": ["dtmi:dtdl:context;2"] } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomModelPayload.json index b10638e4232f2..c044862acb798 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomModelPayload.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomModelPayload.json @@ -30,5 +30,5 @@ "schema": "string" } ], - "@context": "dtmi:dtdl:context;2" + "@context": ["dtmi:dtdl:context;2"] } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiModelPayload.json index 2741751368f55..41e373271d5ad 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiModelPayload.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/RoomWithWifiModelPayload.json @@ -29,5 +29,5 @@ "schema": "WIFI_MODEL_ID" } ], - "@context": "dtmi:dtdl:context;2" + "@context": ["dtmi:dtdl:context;2"] } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WardModelPayload.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WardModelPayload.json index 12e223e17d4eb..efd9cb07df451 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WardModelPayload.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/test-assets/WardModelPayload.json @@ -19,5 +19,5 @@ "name": "managedRooms" } ], - "@context": "dtmi:dtdl:context;2" + "@context": ["dtmi:dtdl:context;2"] } From 4f90c1cd025d2818eaa31fb58814e48a9aaa3938 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Wed, 9 Sep 2020 13:57:43 -0700 Subject: [PATCH 152/168] feat(samples): Components samples (#14987) --- .../core/DigitalTwinsAsyncClient.java | 3 +- .../digitaltwins/core/DigitalTwinsClient.java | 27 ++- .../serialization/BasicDigitalTwin.java | 2 +- .../serialization/BasicRelationship.java | 2 +- .../core/serialization/ComponentMetadata.java | 44 +++++ .../serialization/DigitalTwinMetadata.java | 2 +- .../core/serialization/ModelProperties.java | 68 +++++++ .../serialization/WritableProperty.java | 2 +- .../core/ComponentSyncSamples.java | 168 ++++++++++++++++++ .../DigitalTwinsLifecycleAsyncSample.java | 39 ++-- .../core/ModelsLifecycleSyncSamples.java | 41 +++-- .../core/helpers/ConsoleLogger.java | 34 +++- .../core/helpers/SamplesConstants.java | 30 ++-- .../core/helpers/SamplesUtil.java | 4 +- .../core/helpers/UniqueIdHelper.java | 8 + .../core/serialization/CustomDigitalTwin.java | 1 - 16 files changed, 402 insertions(+), 73 deletions(-) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{implementation => }/serialization/BasicDigitalTwin.java (98%) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{implementation => }/serialization/BasicRelationship.java (98%) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/ComponentMetadata.java rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{implementation => }/serialization/DigitalTwinMetadata.java (97%) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/ModelProperties.java rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{implementation => }/serialization/WritableProperty.java (98%) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ComponentSyncSamples.java diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 61593687b0c38..46fd0d17834bf 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -19,6 +19,7 @@ import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; +import com.azure.digitaltwins.core.serialization.BasicRelationship; import com.azure.digitaltwins.core.util.*; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -647,7 +648,7 @@ Mono> listRelationshipsNextPage(String nextLink, Context c * Gets all the relationships on a digital twin by iterating through a collection. * * @param digitalTwinId The Id of the source digital twin. - * @param clazz The model class to convert the relationship to. Since a digital twin might have relationships conforming to different models, it is advisable to convert them to a generic model like {@link com.azure.digitaltwins.core.implementation.serialization.BasicRelationship}. + * @param clazz The model class to convert the relationship to. Since a digital twin might have relationships conforming to different models, it is advisable to convert them to a generic model like {@link BasicRelationship}. * @param The generic type to convert the relationship to. * @return A {@link PagedFlux} of relationships belonging to the specified digital twin and the http response. */ diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index cd8c2274ec93e..1bcda775bb1e1 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.Context; import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; +import com.azure.digitaltwins.core.serialization.BasicRelationship; import com.azure.digitaltwins.core.util.*; import java.util.List; @@ -58,6 +59,8 @@ public DigitalTwinsServiceVersion getServiceVersion() { return this.digitalTwinsAsyncClient.getServiceVersion(); } + //region DigitalTwin APIs + /** * Creates a digital twin. * @@ -221,6 +224,10 @@ public Response deleteDigitalTwinWithResponse(String digitalTwinId, Delete return digitalTwinsAsyncClient.deleteDigitalTwinWithResponse(digitalTwinId, options, context).block(); } + //endregion + + //region Relationship APIs + /** * Creates a relationship on a digital twin. * @@ -413,7 +420,7 @@ public PagedIterable listRelationships(String digitalTwinId, String rela * Gets all the relationships on a digital twin by iterating through a collection. * * @param digitalTwinId The Id of the source digital twin. - * @param clazz The model class to convert the relationship to. Since a digital twin might have relationships conforming to different models, it is advisable to convert them to a generic model like {@link com.azure.digitaltwins.core.implementation.serialization.BasicRelationship}. + * @param clazz The model class to convert the relationship to. Since a digital twin might have relationships conforming to different models, it is advisable to convert them to a generic model like {@link BasicRelationship}. * @param The generic type to convert the relationship to. * @return A {@link PagedIterable} of relationships belonging to the specified digital twin and the http response. */ @@ -449,9 +456,9 @@ public PagedIterable listIncomingRelationships(String digi return new PagedIterable<>(digitalTwinsAsyncClient.listIncomingRelationships(digitalTwinId, context)); } - //================================================================================================================================================== - // Models APIs - //================================================================================================================================================== + //endregion + + //region Models APIs /** * Creates one or many models. @@ -555,9 +562,9 @@ public Response decommissionModelWithResponse(String modelId, Context cont return digitalTwinsAsyncClient.decommissionModelWithResponse(modelId, context).block(); } - //================================================================================================================================================== - // Component APIs - //================================================================================================================================================== + //endregion + + //region Component APIs /** * Get a component of a digital twin. @@ -636,6 +643,10 @@ public DigitalTwinsResponse updateComponentWithResponse(String digitalTwin return digitalTwinsAsyncClient.updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context).block(); } + //endregion + + //region Query APIs + /** * Query digital twins. * @@ -685,4 +696,6 @@ public PagedIterable query(String query, Class clazz) { public PagedIterable query(String query, Class clazz, Context context) { return new PagedIterable<>(digitalTwinsAsyncClient.query(query, clazz, context)); } + + //endregion } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicDigitalTwin.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/BasicDigitalTwin.java similarity index 98% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicDigitalTwin.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/BasicDigitalTwin.java index 9e8e448b10d68..c1187185717fb 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicDigitalTwin.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/BasicDigitalTwin.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core.implementation.serialization; +package com.azure.digitaltwins.core.serialization; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/BasicRelationship.java similarity index 98% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/BasicRelationship.java index df584f95c4ee1..2ae2a86640687 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/BasicRelationship.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/BasicRelationship.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core.implementation.serialization; +package com.azure.digitaltwins.core.serialization; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/ComponentMetadata.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/ComponentMetadata.java new file mode 100644 index 0000000000000..700b4a3032d0b --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/ComponentMetadata.java @@ -0,0 +1,44 @@ +package com.azure.digitaltwins.core.serialization; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.HashMap; +import java.util.Map; + +/** + * An optional helper class for deserializing a digital twin + */ +@Fluent +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ComponentMetadata { + + /** + * Model-defined writable properties' request state. + */ + private final Map writeableProperties = new HashMap<>(); + + public ComponentMetadata() {} + + /** + * Gets the model-defined writable properties' request state. + * For your convenience, the value of each map can be turned into an instance of {@link WritableProperty}. + * @return The model-defined writable properties' request state. + */ + @JsonAnyGetter + public Map getWriteableProperties() { + return writeableProperties; + } + + /** + * Sets the model-defined writable properties' request state. + * @return The ComponentMetadata object itself. + */ + @JsonAnySetter + ComponentMetadata setWritableProperties(String key, Object value) { + this.writeableProperties.put(key, value); + return this; + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/DigitalTwinMetadata.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/DigitalTwinMetadata.java similarity index 97% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/DigitalTwinMetadata.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/DigitalTwinMetadata.java index 9fca254197698..3362109f8f40b 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/DigitalTwinMetadata.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/DigitalTwinMetadata.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core.implementation.serialization; +package com.azure.digitaltwins.core.serialization; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/ModelProperties.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/ModelProperties.java new file mode 100644 index 0000000000000..32df7b4e5e1f5 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/ModelProperties.java @@ -0,0 +1,68 @@ +package com.azure.digitaltwins.core.serialization; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.HashMap; +import java.util.Map; + +/** + * Properties on a component that adhere to a specific model. + */ +@Fluent +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ModelProperties { + + /** + * Information about the model a component conforms to. This field is present on every digital twin. + */ + @JsonProperty(value = "$metadata", required = true) + private ComponentMetadata metadata = new ComponentMetadata(); + + /** + * The additional properties of the model. This field will contain any properties of the digital twin that are not already defined by the other strong types of this class. + */ + private final Map customProperties = new HashMap<>(); + + /** + * Gets the metadata about the model. + * @return The model metadata. + */ + public ComponentMetadata getMetadata() { + return metadata; + } + + /** + * Sets the model metadata. + * @param metadata Model metadata. + * @return The ModelProperties object itself. + */ + public ModelProperties setMetadata(ComponentMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Gets the custom properties + * @return The custom properties + */ + @JsonAnyGetter + public Map getCustomProperties() { + return customProperties; + } + + /** + * Sets the custom properties + * @param key The key of the additional property to be added to the digital twin. + * @param value The value of the additional property to be added to the digital twin. + * @return The ModelProperties object itself. + */ + @JsonAnySetter + public ModelProperties setCustomProperties(String key, Object value) { + this.customProperties.put(key, value); + return this; + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/WritableProperty.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/WritableProperty.java similarity index 98% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/WritableProperty.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/WritableProperty.java index 227e09c76cb01..8c43f6ca2126b 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/serialization/WritableProperty.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/serialization/WritableProperty.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.digitaltwins.core.implementation.serialization; +package com.azure.digitaltwins.core.serialization; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ComponentSyncSamples.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ComponentSyncSamples.java new file mode 100644 index 0000000000000..2bbe8458e3515 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ComponentSyncSamples.java @@ -0,0 +1,168 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.digitaltwins.core.helpers.ConsoleLogger; +import com.azure.digitaltwins.core.helpers.SamplesArguments; +import com.azure.digitaltwins.core.helpers.SamplesConstants; +import com.azure.digitaltwins.core.helpers.UniqueIdHelper; +import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; +import com.azure.digitaltwins.core.models.ModelData; +import com.azure.digitaltwins.core.serialization.BasicDigitalTwin; +import com.azure.digitaltwins.core.serialization.DigitalTwinMetadata; +import com.azure.digitaltwins.core.serialization.ModelProperties; +import com.azure.digitaltwins.core.util.UpdateOperationUtility; +import com.azure.identity.ClientSecretCredentialBuilder; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import javax.net.ssl.HttpsURLConnection; +import java.io.IOException; +import java.util.*; +import java.util.function.Function; + +public class ComponentSyncSamples { + private static DigitalTwinsClient client; + private static final ObjectMapper mapper = new ObjectMapper(); + + public static Function randomIntegerStringGenerator = (maxLength) -> { + int randInt = new Random().nextInt((int)Math.pow(10, 8) - 1) + 1; + return String.valueOf(randInt); + }; + + public static void main(String[] args) throws IOException { + + SamplesArguments parsedArguments = new SamplesArguments(args); + + client = new DigitalTwinsClientBuilder() + .credential( + new ClientSecretCredentialBuilder() + .tenantId(parsedArguments.getTenantId()) + .clientId(parsedArguments.getClientId()) + .clientSecret(parsedArguments.getClientSecret()) + .build() + ) + .endpoint(parsedArguments.getDigitalTwinEndpoint()) + .httpLogOptions( + new HttpLogOptions() + .setLogLevel(parsedArguments.getHttpLogDetailLevel())) + .buildClient(); + + runComponentSample(); + } + + @SuppressWarnings("rawtypes") + public static void runComponentSample() throws JsonProcessingException { + + ConsoleLogger.printHeader("COMPONENT SAMPLES"); + + // For the purpose of this example we will create temporary models using a random model Ids. + // We have to make sure these model Ids are unique within the DT instance. + + String componentModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TEMPORARY_COMPONENT_MODEL_PREFIX, client, randomIntegerStringGenerator); + String modelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TEMPORARY_MODEL_PREFIX, client, randomIntegerStringGenerator); + String basicDigitalTwinId = UniqueIdHelper.getUniqueDigitalTwinId(SamplesConstants.TEMPORARY_TWIN_PREFIX, client, randomIntegerStringGenerator); + + String newComponentModelPayload = SamplesConstants.TEMPORARY_COMPONENT_MODEL_PAYLOAD + .replace(SamplesConstants.COMPONENT_ID, componentModelId); + + String newModelPayload = SamplesConstants.TEMPORARY_MODEL_WITH_COMPONENT_PAYLOAD + .replace(SamplesConstants.MODEL_ID, modelId) + .replace(SamplesConstants.COMPONENT_ID, componentModelId); + + List modelsList = new ArrayList<>(Arrays.asList(newComponentModelPayload, newModelPayload)); + + ConsoleLogger.printHeader("Create Models"); + // We now create all the models (including components) + List modelList = client.createModels(modelsList); + + for (ModelData model : modelList) { + ConsoleLogger.print("Created model: " + model.getId()); + } + + ConsoleLogger.printHeader("Create digital twin with components"); + // Create digital twin with component payload using the BasicDigitalTwin serialization helper. + BasicDigitalTwin basicTwin = new BasicDigitalTwin() + .setId(basicDigitalTwinId) + .setMetadata( + new DigitalTwinMetadata() + .setModelId(modelId) + ) + .setCustomProperties("Prop1", "Value1") + .setCustomProperties("Prop2", 987) + .setCustomProperties( + "Component1", + new ModelProperties() + .setCustomProperties("ComponentProp1", "Component value 1") + .setCustomProperties("ComponentProp2", 123) + ); + + String basicDigitalTwinPayload = mapper.writeValueAsString(basicTwin); + + client.createDigitalTwin(basicDigitalTwinId, basicDigitalTwinPayload); + + ConsoleLogger.print("Created digital twin " + basicDigitalTwinId); + + // You can get a digital twin in json string format and deserialize it on your own + Response getStringDigitalTwinResponse = client.getDigitalTwinWithResponse(basicDigitalTwinId, Context.NONE); + ConsoleLogger.print("Successfully retrieved digital twin as a json string \n" + getStringDigitalTwinResponse.getValue()); + + BasicDigitalTwin deserializedDigitalTwin = mapper.readValue(getStringDigitalTwinResponse.getValue(), BasicDigitalTwin.class); + ConsoleLogger.print("Deserialized the string response into a BasicDigitalTwin with Id: " + deserializedDigitalTwin.getId()); + + // You can also get a digital twin using the built in deserializer into a BasicDigitalTwin. + // It works well for basic stuff, but as you can see it gets more difficult when delving into + // more complex properties, like components. + Response basicDigitalTwinResponse = client.getDigitalTwinWithResponse(basicDigitalTwinId, BasicDigitalTwin.class, Context.NONE); + + if (basicDigitalTwinResponse.getStatusCode() == HttpsURLConnection.HTTP_OK) { + + BasicDigitalTwin basicDigitalTwin = basicDigitalTwinResponse.getValue(); + + String component1RawText = mapper.writeValueAsString(basicDigitalTwin.getCustomProperties().get("Component1")); + + HashMap component1 = mapper.readValue(component1RawText, HashMap.class); + + ConsoleLogger.print("Retrieved digital twin using generic API to use built in deserialization into a BasicDigitalTwin with Id: " + basicDigitalTwin.getId() + ":\n\t" + + "Etag: " + basicDigitalTwin.getTwinETag() + "\n\t" + + "Prop1: " + basicDigitalTwin.getCustomProperties().get("Prop1") + "\n\t" + + "Prop2: " + basicDigitalTwin.getCustomProperties().get("Prop2") + "\n\t" + + "ComponentProp1: " + component1.get("ComponentProp1") + "\n\t" + + "ComponentProp2: " + component1.get("ComponentProp2") + "\n\t" + ); + } + + ConsoleLogger.printHeader("Update Component"); + + // Update Component1 by replacing the property ComponentProp1 value, + // using the UpdateOperationUtility to build the payload. + UpdateOperationUtility updateOperationUtility = new UpdateOperationUtility(); + + updateOperationUtility.appendReplaceOperation("/ComponentProp1", "Some new Value"); + + client.updateComponent(basicDigitalTwinId, "Component1", updateOperationUtility.getUpdateOperations()); + + ConsoleLogger.print("Updated component for digital twin: " + basicDigitalTwinId); + + ConsoleLogger.printHeader("Get Component"); + String getComponentResponse = client.getComponent(basicDigitalTwinId, "Component1"); + ConsoleLogger.print("Retrieved component for digital twin " + basicDigitalTwinId + " :\n" + getComponentResponse); + + // Clean up + try { + client.deleteDigitalTwin(basicDigitalTwinId); + } + catch (ErrorResponseException ex) { + ConsoleLogger.printFatal("Failed to delete digital twin due to" + ex); + } + + try { + client.deleteModel(modelId); + client.deleteModel(componentModelId); + } + catch (ErrorResponseException ex) { + ConsoleLogger.printFatal("Failed to delete models due to" + ex); + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java index 72bb9e1008b9a..b239d230d1abc 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/DigitalTwinsLifecycleAsyncSample.java @@ -8,7 +8,7 @@ import com.azure.digitaltwins.core.helpers.FileHelper; import com.azure.digitaltwins.core.helpers.SamplesArguments; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; -import com.azure.digitaltwins.core.implementation.serialization.BasicRelationship; +import com.azure.digitaltwins.core.serialization.BasicRelationship; import com.azure.identity.ClientSecretCredentialBuilder; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; @@ -136,7 +136,7 @@ public static void main(String[] args) throws IOException, InterruptedException * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void deleteTwins() throws IOException, InterruptedException { - ConsoleLogger.PrintHeader("Delete digital twins"); + ConsoleLogger.printHeader("Delete digital twins"); Map twins = FileHelper.loadAllFilesInPath(TWINS_PATH); // Call APIs to clean up any pre-existing resources that might be referenced by this sample. If digital twin does not exist, ignore. @@ -177,9 +177,9 @@ public static void deleteTwins() throws IOException, InterruptedException { .forEach(relationship -> client.deleteRelationship(relationship.getSourceId(), relationship.getId()) .doOnSuccess(aVoid -> { if (twinId.equals(relationship.getSourceId())) { - ConsoleLogger.PrintSuccess("Found and deleted relationship: " + relationship.getId()); + ConsoleLogger.printSuccess("Found and deleted relationship: " + relationship.getId()); } else { - ConsoleLogger.PrintSuccess("Found and deleted incoming relationship: " + relationship.getId()); + ConsoleLogger.printSuccess("Found and deleted incoming relationship: " + relationship.getId()); } }) .doOnError(IgnoreNotFoundError) @@ -193,7 +193,7 @@ public static void deleteTwins() throws IOException, InterruptedException { // Call APIs to delete the twins. client.deleteDigitalTwin(twinId) - .doOnSuccess(aVoid -> ConsoleLogger.PrintSuccess("Deleted digital twin: " + twinId)) + .doOnSuccess(aVoid -> ConsoleLogger.printSuccess("Deleted digital twin: " + twinId)) .doOnError(IgnoreNotFoundError) .doOnTerminate(deleteTwinsLatch::countDown) .subscribe(); @@ -208,10 +208,11 @@ public static void deleteTwins() throws IOException, InterruptedException { * Delete models created by FullLifecycleSample for the ADT service instance. */ public static void deleteAllModels() { - ConsoleLogger.PrintHeader("Deleting models"); + + ConsoleLogger.printHeader("Deleting models"); // This is to ensure models are deleted in an order such that no other models are referencing it. - List models = asList(RoomModelId, WifiModelId, BuildingModelId, FloorModelId, HvacModelId); + List models = asList(ROOM_MODEL_ID, WIFI_MODEL_ID, BUILDING_MODEL_ID, FLOOR_MODEL_ID, HVAC_MODEL_ID); // Call APIs to delete the models. // Note that we are blocking the async API call. This is to ensure models are deleted in an order such that no other models are referencing it. @@ -219,10 +220,10 @@ public static void deleteAllModels() { .forEach(modelId -> { try { client.deleteModel(modelId).block(); - ConsoleLogger.PrintSuccess("Deleted model: " + modelId); + ConsoleLogger.printSuccess("Deleted model: " + modelId); } catch (ErrorResponseException ex) { if (ex.getResponse().getStatusCode() != HTTP_NOT_FOUND) { - ConsoleLogger.PrintFatal("Could not delete model " + modelId + " due to " + ex); + ConsoleLogger.printFatal("Could not delete model " + modelId + " due to " + ex); } } }); @@ -234,14 +235,14 @@ public static void deleteAllModels() { * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void createAllModels() throws IOException, InterruptedException { - ConsoleLogger.PrintHeader("Creating models"); + ConsoleLogger.printHeader("Creating models"); List modelsToCreate = new ArrayList<>(FileHelper.loadAllFilesInPath(MODELS_PATH).values()); final CountDownLatch createModelsLatch = new CountDownLatch(1); // Call API to create the models. For each async operation, once the operation is completed successfully, a latch is counted down. client.createModels(modelsToCreate) .doOnNext(listOfModelData -> listOfModelData.forEach( - modelData -> ConsoleLogger.PrintSuccess("Created model: " + modelData.getId()) + modelData -> ConsoleLogger.printSuccess("Created model: " + modelData.getId()) )) .doOnError(IgnoreConflictError) .doOnTerminate(createModelsLatch::countDown) @@ -256,14 +257,14 @@ public static void createAllModels() throws IOException, InterruptedException { * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void listAllModels() throws InterruptedException { - ConsoleLogger.PrintHeader("Listing models"); + ConsoleLogger.printHeader("Listing models"); final CountDownLatch listModelsLatch = new CountDownLatch(1); // Call API to list the models. For each async operation, once the operation is completed successfully, a latch is counted down. client.listModels() - .doOnNext(modelData -> ConsoleLogger.PrintSuccess("Retrieved model: " + modelData.getId() + ", display name '" + modelData.getDisplayName().get("en") + "'," + + .doOnNext(modelData -> ConsoleLogger.printSuccess("Retrieved model: " + modelData.getId() + ", display name '" + modelData.getDisplayName().get("en") + "'," + " upload time '" + modelData.getUploadTime() + "' and decommissioned '" + modelData.isDecommissioned() + "'")) - .doOnError(throwable -> ConsoleLogger.PrintFatal("List models error: " + throwable)) + .doOnError(throwable -> ConsoleLogger.printFatal("List models error: " + throwable)) .doOnTerminate(listModelsLatch::countDown) .subscribe(); @@ -277,7 +278,7 @@ public static void listAllModels() throws InterruptedException { * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void createAllTwins() throws IOException, InterruptedException { - ConsoleLogger.PrintHeader("Create digital twins"); + ConsoleLogger.printHeader("Create digital twins"); Map twins = FileHelper.loadAllFilesInPath(TWINS_PATH); final CountDownLatch createTwinsLatch = new CountDownLatch(twins.size()); @@ -285,8 +286,8 @@ public static void createAllTwins() throws IOException, InterruptedException { twins .forEach((twinId, twinContent) -> client.createDigitalTwin(twinId, twinContent) .subscribe( - twin -> ConsoleLogger.PrintSuccess("Created digital twin: " + twinId + "\n\t Body: " + twin), - throwable -> ConsoleLogger.PrintFatal("Could not create digital twin " + twinId + " due to " + throwable), + twin -> ConsoleLogger.printSuccess("Created digital twin: " + twinId + "\n\t Body: " + twin), + throwable -> ConsoleLogger.printFatal("Could not create digital twin " + twinId + " due to " + throwable), createTwinsLatch::countDown)); // Wait until the latch count reaches zero, signifying that the async calls have completed successfully. @@ -299,7 +300,7 @@ public static void createAllTwins() throws IOException, InterruptedException { * @throws InterruptedException If the current thread is interrupted while waiting to acquire latch. */ public static void connectTwinsTogether() throws IOException, InterruptedException { - ConsoleLogger.PrintHeader("Connect digital twins"); + ConsoleLogger.printHeader("Connect digital twins"); Map allRelationships = FileHelper.loadAllFilesInPath(RELATIONSHIPS_PATH); final CountDownLatch connectTwinsLatch = new CountDownLatch(4); @@ -315,7 +316,7 @@ public static void connectTwinsTogether() throws IOException, InterruptedExcepti .forEach(relationship -> { try { client.createRelationship(relationship.getSourceId(), relationship.getId(), MAPPER.writeValueAsString(relationship)) - .doOnSuccess(s -> ConsoleLogger.PrintSuccess("Linked twin " + relationship.getSourceId() + " to twin " + relationship.getTargetId() + " as " + relationship.getName())) + .doOnSuccess(s -> ConsoleLogger.printSuccess("Linked twin " + relationship.getSourceId() + " to twin " + relationship.getTargetId() + " as " + relationship.getName())) .doOnError(IgnoreConflictError) .doOnTerminate(connectTwinsLatch::countDown) .subscribe(); diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java index be803e9dd46ee..d4efe4ea4c362 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/ModelsLifecycleSyncSamples.java @@ -9,7 +9,6 @@ import com.azure.digitaltwins.core.models.ModelData; import com.azure.identity.ClientSecretCredentialBuilder; -import java.io.IOException; import java.net.HttpURLConnection; import java.util.ArrayList; import java.util.Arrays; @@ -55,67 +54,67 @@ public static void main(String[] args) { public static void runModelLifecycleSample() { // For the purpose of this sample we will create temporary models using random model Ids and then decommission a model. // We have to make sure these model Ids are unique within the DigitalTwin instance. - String componentModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TemporaryComponentModelPrefix, client, randomIntegerStringGenerator); - String sampleModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TemporaryModelPrefix, client, randomIntegerStringGenerator); + String componentModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TEMPORARY_COMPONENT_MODEL_PREFIX, client, randomIntegerStringGenerator); + String sampleModelId = UniqueIdHelper.getUniqueModelId(SamplesConstants.TEMPORARY_MODEL_PREFIX, client, randomIntegerStringGenerator); - String newComponentModelPayload = SamplesConstants.TemporaryComponentModelPayload - .replace(SamplesConstants.ComponentId, componentModelId); + String newComponentModelPayload = SamplesConstants.TEMPORARY_COMPONENT_MODEL_PAYLOAD + .replace(SamplesConstants.COMPONENT_ID, componentModelId); - String newModelPayload = SamplesConstants.TemporaryModelWithComponentPayload - .replace(SamplesConstants.ModelId, sampleModelId) - .replace(SamplesConstants.ComponentId, componentModelId); + String newModelPayload = SamplesConstants.TEMPORARY_MODEL_WITH_COMPONENT_PAYLOAD + .replace(SamplesConstants.MODEL_ID, sampleModelId) + .replace(SamplesConstants.COMPONENT_ID, componentModelId); - ConsoleLogger.PrintHeader("Create models"); + ConsoleLogger.printHeader("Create models"); try { client.createModels(new ArrayList(Arrays.asList(newComponentModelPayload, newModelPayload))); - ConsoleLogger.PrintSuccess("Created models " + componentModelId + " and " + sampleModelId); + ConsoleLogger.print("Created models " + componentModelId + " and " + sampleModelId); } catch (ErrorResponseException ex) { if (ex.getResponse().getStatusCode() == HttpURLConnection.HTTP_CONFLICT) { - ConsoleLogger.PrintWarning("One or more models already existed"); + ConsoleLogger.printWarning("One or more models already existed"); } } catch (Exception ex) { - ConsoleLogger.PrintFatal("Failed to create models due to: \n" + ex); + ConsoleLogger.printFatal("Failed to create models due to: \n" + ex); System.exit(0); } - ConsoleLogger.PrintHeader("Get models"); + ConsoleLogger.printHeader("Get models"); try { ModelData sampleModelResponse = client.getModel(sampleModelId); - ConsoleLogger.PrintSuccess("Retrieved model " + sampleModelResponse.getId()); + ConsoleLogger.print("Retrieved model " + sampleModelResponse.getId()); } catch (Exception ex) { - ConsoleLogger.PrintFatal("Failed to get the model due to:\n" + ex); + ConsoleLogger.printFatal("Failed to get the model due to:\n" + ex); System.exit(0); } - ConsoleLogger.PrintHeader("Decommission models"); + ConsoleLogger.printHeader("Decommission models"); try { client.decommissionModel(sampleModelId); client.decommissionModel(componentModelId); - ConsoleLogger.PrintSuccess("Decommissioned "+ sampleModelId + " and " + componentModelId); + ConsoleLogger.print("Decommissioned "+ sampleModelId + " and " + componentModelId); } catch (Exception ex) { - ConsoleLogger.PrintFatal("Failed to decommission models due to:\n" + ex); + ConsoleLogger.printFatal("Failed to decommission models due to:\n" + ex); System.exit(0); } - ConsoleLogger.PrintHeader("Delete models"); + ConsoleLogger.printHeader("Delete models"); try { client.deleteModel(sampleModelId); client.deleteModel(componentModelId); - ConsoleLogger.PrintSuccess("Deleted "+ sampleModelId + " and " + componentModelId); + ConsoleLogger.print("Deleted "+ sampleModelId + " and " + componentModelId); } catch (Exception ex) { - ConsoleLogger.PrintFatal("Failed to deleteModel models due to:\n" + ex); + ConsoleLogger.printFatal("Failed to deleteModel models due to:\n" + ex); System.exit(0); } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/ConsoleLogger.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/ConsoleLogger.java index 09ea96eef5bd1..e5bd5bd93bdf2 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/ConsoleLogger.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/ConsoleLogger.java @@ -7,21 +7,47 @@ public class ConsoleLogger { private static final String ANSI_RED = "\u001B[31m"; private static final String ANSI_GREEN = "\u001B[32m"; public static final String ANSI_YELLOW = "\u001B[33m"; + public static final String ANSI_BLUE = "\u001B[34m"; private static final String ANSI_CYAN = "\u001B[36m"; - public static void PrintHeader(String message) { + /** + * Prints a header with a new line before and after the message. Use this to create different sections. + * @param message Header message to be printed for the section. + */ + public static void printHeader(String message) { System.out.println(ANSI_CYAN + "\n===" + message.toUpperCase() + "===\n" + ANSI_RESET); } - public static void PrintSuccess(String message) { + /** + * Prints a message to console. Use this for logging verbose. + * @param message Message to be printed + */ + public static void print(String message) { + System.out.println(ANSI_BLUE + message + ANSI_RESET); + } + + /** + * Prints a message to console. Use this for logging successful events. + * @param message Message to be printed + */ + public static void printSuccess(String message){ System.out.println(ANSI_GREEN + message + ANSI_RESET); } - public static void PrintWarning(String message) { + /** + * Prints a message to console. Use this for logging warnings. + * @param message Message to be printed + */ + public static void printWarning(String message) { + System.out.println(ANSI_YELLOW + message + ANSI_RESET); } - public static void PrintFatal(String message) { + /** + * Prints a message to console. Use this for logging fatal failures. + * @param message Message to be printed + */ + public static void printFatal(String message) { System.out.println(ANSI_RED + message + ANSI_RESET); } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesConstants.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesConstants.java index b62dcdc3da40a..16c3af3dda4dd 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesConstants.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesConstants.java @@ -4,21 +4,23 @@ package com.azure.digitaltwins.core.helpers; public class SamplesConstants { - public static final String RoomModelId = "dtmi:samples:Room;1"; - public static final String WifiModelId = "dtmi:samples:Wifi;1"; - public static final String BuildingModelId = "dtmi:samples:Building;1"; - public static final String FloorModelId = "dtmi:samples:Floor;1"; - public static final String HvacModelId = "dtmi:samples:HVAC;1"; + public static final String ROOM_MODEL_ID = "dtmi:samples:Room;1"; + public static final String WIFI_MODEL_ID = "dtmi:samples:Wifi;1"; + public static final String BUILDING_MODEL_ID = "dtmi:samples:Building;1"; + public static final String FLOOR_MODEL_ID = "dtmi:samples:Floor;1"; + public static final String HVAC_MODEL_ID = "dtmi:samples:HVAC;1"; - public static final String TemporaryComponentModelPrefix = "dtmi:samples:ComponentModel;"; - public static final String TemporaryModelPrefix = "dtmi:samples:TempModel;"; + public static final String TEMPORARY_COMPONENT_MODEL_PREFIX = "dtmi:samples:ComponentModel;"; + public static final String TEMPORARY_MODEL_PREFIX = "dtmi:samples:TempModel;"; - public static final String ComponentId = "COMPONENT_ID"; - public static final String ModelId = "MODEL_ID"; + public static final String TEMPORARY_TWIN_PREFIX = "sampleTwin"; - public static final String TemporaryComponentModelPayload = + public static final String COMPONENT_ID = "COMPONENT_ID"; + public static final String MODEL_ID = "MODEL_ID"; + + public static final String TEMPORARY_COMPONENT_MODEL_PAYLOAD = "{" + - "\"@id\": \"" + ComponentId + "\","+ + "\"@id\": \"" + COMPONENT_ID + "\","+ "\"@type\": \"Interface\"," + "\"@context\": \"dtmi:dtdl:context;2\"," + "\"displayName\": \"Component1\"," + @@ -41,9 +43,9 @@ public class SamplesConstants { "]" + "}"; - public static final String TemporaryModelWithComponentPayload = + public static final String TEMPORARY_MODEL_WITH_COMPONENT_PAYLOAD = "{" + - "\"@id\": \""+ ModelId + "\"," + + "\"@id\": \""+ MODEL_ID + "\"," + "\"@type\": \"Interface\"," + "\"@context\": \"dtmi:dtdl:context;2\"," + "\"displayName\": \"TempModel\"," + @@ -61,7 +63,7 @@ public class SamplesConstants { "{" + "\"@type\": \"Component\"," + "\"name\": \"Component1\"," + - "\"schema\": \"" + ComponentId + "\"" + + "\"schema\": \"" + COMPONENT_ID + "\"" + "}," + "{" + "\"@type\": \"Telemetry\"," + diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java index 94a1b7c713919..d33a605980296 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/SamplesUtil.java @@ -13,13 +13,13 @@ public class SamplesUtil { public static final Consumer IgnoreNotFoundError = throwable -> { if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HTTP_NOT_FOUND) { - ConsoleLogger.PrintFatal("Error received: " + throwable); + ConsoleLogger.printFatal("Error received: " + throwable); } }; public static final Consumer IgnoreConflictError = throwable -> { if (!(throwable instanceof ErrorResponseException) || ((ErrorResponseException) throwable).getResponse().getStatusCode() != HTTP_CONFLICT) { - ConsoleLogger.PrintFatal("Error received: " + throwable); + ConsoleLogger.printFatal("Error received: " + throwable); } }; } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java index 22d5f554663b3..5c8ad2e7641b0 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/helpers/UniqueIdHelper.java @@ -16,6 +16,14 @@ public static String getUniqueModelId(String baseName, DigitalTwinsClient client return getUniqueId(baseName, (modelId -> client.getModel(modelId).getId()), randomIntegerStringGenerator); } + public static String getUniqueDigitalTwinId(String baseName, DigitalTwinsAsyncClient client, Function randomIntegerStringGenerator) { + return getUniqueId(baseName, (digitalTwinId -> client.getDigitalTwin(digitalTwinId).block()), randomIntegerStringGenerator); + } + + public static String getUniqueDigitalTwinId(String baseName, DigitalTwinsClient client, Function randomIntegerStringGenerator) { + return getUniqueId(baseName, (digitalTwinId -> client.getDigitalTwin(digitalTwinId)), randomIntegerStringGenerator); + } + // Taking randomIntegerStringGenerator as a parameter here because e2e tests use a special function for recording and replaying "random" numbers // and samples just use random numbers. private static String getUniqueId(String baseName, Function getResource, Function randomIntegerStringGenerator) { diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/serialization/CustomDigitalTwin.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/serialization/CustomDigitalTwin.java index b0873ef19ff12..fc74bce64edee 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/serialization/CustomDigitalTwin.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/serialization/CustomDigitalTwin.java @@ -4,7 +4,6 @@ package com.azure.digitaltwins.core.serialization; import com.azure.core.annotation.Fluent; -import com.azure.digitaltwins.core.implementation.serialization.WritableProperty; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; From 82f97f96d83a427f87896c4bea7ad97dccc3a133 Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Wed, 9 Sep 2020 15:14:14 -0700 Subject: [PATCH 153/168] fix(adt): Add client side validations for service API calls (#14992) --- .../azure-digitaltwins-core/autorest.md | 1 + .../implementation/DigitalTwinModelsImpl.java | 38 +++++ .../core/implementation/DigitalTwinsImpl.java | 143 ++++++++++++++++++ .../core/implementation/EventRoutesImpl.java | 34 +++++ .../core/implementation/QueriesImpl.java | 10 ++ .../models/DigitalTwinModelsListOptions.java | 7 + .../models/DigitalTwinsAddHeaders.java | 7 + .../DigitalTwinsAddRelationshipHeaders.java | 7 + .../models/DigitalTwinsGetByIdHeaders.java | 7 + .../DigitalTwinsGetComponentHeaders.java | 7 + ...igitalTwinsGetRelationshipByIdHeaders.java | 7 + .../DigitalTwinsUpdateComponentHeaders.java | 7 + .../models/DigitalTwinsUpdateHeaders.java | 7 + ...DigitalTwinsUpdateRelationshipHeaders.java | 7 + .../core/implementation/models/Error.java | 14 ++ .../implementation/models/ErrorResponse.java | 11 ++ .../implementation/models/EventRoute.java | 11 ++ .../models/EventRouteCollection.java | 11 ++ .../models/EventRoutesListOptions.java | 7 + .../IncomingRelationshipCollection.java | 11 ++ .../implementation/models/InnerError.java | 11 ++ .../core/implementation/models/ModelData.java | 11 ++ .../models/PagedModelDataCollection.java | 11 ++ .../models/QueriesQueryTwinsHeaders.java | 7 + .../implementation/models/QueryResult.java | 7 + .../models/QuerySpecification.java | 7 + .../models/RelationshipCollection.java | 7 + .../core/models/IncomingRelationship.java | 7 + 28 files changed, 422 insertions(+) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md index 2d4a76cd07234..87ad550903d61 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md @@ -33,6 +33,7 @@ java: namespace: com.azure.digitaltwins.core add-credentials: true sync-methods: none + client-side-validations: true generate-client-as-impl: true implementation-subpackage: implementation models-subpackage: implementation.models diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java index 23485ec9ee3d4..876617706a50f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java @@ -129,6 +129,10 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> addWithResponseAsync(List models, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } return service.add(this.client.getHost(), this.client.getApiVersion(), models, context); } @@ -151,6 +155,13 @@ public Mono> listSinglePageAsync( Boolean includeModelDefinition, DigitalTwinModelsListOptions digitalTwinModelsListOptions, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (digitalTwinModelsListOptions != null) { + digitalTwinModelsListOptions.validate(); + } Integer maxItemCountInternal = null; if (digitalTwinModelsListOptions != null) { maxItemCountInternal = digitalTwinModelsListOptions.getMaxItemCount(); @@ -191,6 +202,13 @@ public Mono> listSinglePageAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByIdWithResponseAsync( String id, Boolean includeModelDefinition, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } return service.getById(this.client.getHost(), id, includeModelDefinition, this.client.getApiVersion(), context); } @@ -208,6 +226,16 @@ public Mono> getByIdWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateWithResponseAsync(String id, List updateModel, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (updateModel == null) { + return Mono.error(new IllegalArgumentException("Parameter updateModel is required and cannot be null.")); + } return service.update(this.client.getHost(), id, this.client.getApiVersion(), updateModel, context); } @@ -225,6 +253,13 @@ public Mono> updateWithResponseAsync(String id, List upda */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String id, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } return service.delete(this.client.getHost(), id, this.client.getApiVersion(), context); } @@ -240,6 +275,9 @@ public Mono> deleteWithResponseAsync(String id, Context context) */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } return service.listNext(nextLink, context) .map( res -> diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java index 9aed42a28e807..c7e9baf8efe64 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java @@ -244,6 +244,13 @@ Mono> listIncomingRelationshipsNext( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getByIdWithResponseAsync(String id, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } return service.getById(this.client.getHost(), id, this.client.getApiVersion(), context); } @@ -262,6 +269,16 @@ public Mono getByIdWithResponseAsync(String id, Con */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono addWithResponseAsync(String id, Object twin, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (twin == null) { + return Mono.error(new IllegalArgumentException("Parameter twin is required and cannot be null.")); + } final String ifNoneMatch = "*"; return service.add(this.client.getHost(), id, ifNoneMatch, this.client.getApiVersion(), twin, context); } @@ -282,6 +299,13 @@ public Mono addWithResponseAsync(String id, Object twin */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String id, String ifMatch, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } return service.delete(this.client.getHost(), id, ifMatch, this.client.getApiVersion(), context); } @@ -302,6 +326,16 @@ public Mono> deleteWithResponseAsync(String id, String ifMatch, C @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateWithResponseAsync( String id, List patchDocument, String ifMatch, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (patchDocument == null) { + return Mono.error(new IllegalArgumentException("Parameter patchDocument is required and cannot be null.")); + } return service.update(this.client.getHost(), id, ifMatch, this.client.getApiVersion(), patchDocument, context); } @@ -320,6 +354,16 @@ public Mono updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono getRelationshipByIdWithResponseAsync( String id, String relationshipId, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (relationshipId == null) { + return Mono.error(new IllegalArgumentException("Parameter relationshipId is required and cannot be null.")); + } return service.getRelationshipById( this.client.getHost(), id, relationshipId, this.client.getApiVersion(), context); } @@ -341,6 +385,16 @@ public Mono getRelationshipByIdWithResp @ServiceMethod(returns = ReturnType.SINGLE) public Mono addRelationshipWithResponseAsync( String id, String relationshipId, Object relationship, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (relationshipId == null) { + return Mono.error(new IllegalArgumentException("Parameter relationshipId is required and cannot be null.")); + } final String ifNoneMatch = "*"; return service.addRelationship( this.client.getHost(), @@ -369,6 +423,16 @@ public Mono addRelationshipWithResponseAsyn @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteRelationshipWithResponseAsync( String id, String relationshipId, String ifMatch, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (relationshipId == null) { + return Mono.error(new IllegalArgumentException("Parameter relationshipId is required and cannot be null.")); + } return service.deleteRelationship( this.client.getHost(), id, relationshipId, ifMatch, this.client.getApiVersion(), context); } @@ -392,6 +456,16 @@ public Mono> deleteRelationshipWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateRelationshipWithResponseAsync( String id, String relationshipId, String ifMatch, List patchDocument, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (relationshipId == null) { + return Mono.error(new IllegalArgumentException("Parameter relationshipId is required and cannot be null.")); + } return service.updateRelationship( this.client.getHost(), id, @@ -417,6 +491,13 @@ public Mono updateRelationshipWithRespon @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listRelationshipsSinglePageAsync( String id, String relationshipName, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } return service.listRelationships( this.client.getHost(), id, relationshipName, this.client.getApiVersion(), context) .map( @@ -444,6 +525,13 @@ public Mono> listRelationshipsSinglePageAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listIncomingRelationshipsSinglePageAsync( String id, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } return service.listIncomingRelationships(this.client.getHost(), id, this.client.getApiVersion(), context) .map( res -> @@ -474,6 +562,19 @@ public Mono> listIncomingRelationshipsSingle @ServiceMethod(returns = ReturnType.SINGLE) public Mono> sendTelemetryWithResponseAsync( String id, String dtId, Object telemetry, String dtTimestamp, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (dtId == null) { + return Mono.error(new IllegalArgumentException("Parameter dtId is required and cannot be null.")); + } + if (telemetry == null) { + return Mono.error(new IllegalArgumentException("Parameter telemetry is required and cannot be null.")); + } return service.sendTelemetry( this.client.getHost(), id, dtId, dtTimestamp, this.client.getApiVersion(), telemetry, context); } @@ -498,6 +599,22 @@ public Mono> sendTelemetryWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> sendComponentTelemetryWithResponseAsync( String id, String componentPath, String dtId, Object telemetry, String dtTimestamp, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (componentPath == null) { + return Mono.error(new IllegalArgumentException("Parameter componentPath is required and cannot be null.")); + } + if (dtId == null) { + return Mono.error(new IllegalArgumentException("Parameter dtId is required and cannot be null.")); + } + if (telemetry == null) { + return Mono.error(new IllegalArgumentException("Parameter telemetry is required and cannot be null.")); + } return service.sendComponentTelemetry( this.client.getHost(), id, @@ -524,6 +641,16 @@ public Mono> sendComponentTelemetryWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono getComponentWithResponseAsync( String id, String componentPath, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (componentPath == null) { + return Mono.error(new IllegalArgumentException("Parameter componentPath is required and cannot be null.")); + } return service.getComponent(this.client.getHost(), id, componentPath, this.client.getApiVersion(), context); } @@ -545,6 +672,16 @@ public Mono getComponentWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateComponentWithResponseAsync( String id, String componentPath, String ifMatch, List patchDocument, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (componentPath == null) { + return Mono.error(new IllegalArgumentException("Parameter componentPath is required and cannot be null.")); + } return service.updateComponent( this.client.getHost(), id, componentPath, ifMatch, this.client.getApiVersion(), patchDocument, context); } @@ -561,6 +698,9 @@ public Mono updateComponentWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listRelationshipsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } return service.listRelationshipsNext(nextLink, context) .map( res -> @@ -586,6 +726,9 @@ public Mono> listRelationshipsNextSinglePageAsync(String n @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listIncomingRelationshipsNextSinglePageAsync( String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } return service.listIncomingRelationshipsNext(nextLink, context) .map( res -> diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java index be87139ca4008..9b247071c6af9 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java @@ -112,6 +112,13 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listSinglePageAsync( EventRoutesListOptions eventRoutesListOptions, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (eventRoutesListOptions != null) { + eventRoutesListOptions.validate(); + } Integer maxItemCountInternal = null; if (eventRoutesListOptions != null) { maxItemCountInternal = eventRoutesListOptions.getMaxItemCount(); @@ -142,6 +149,13 @@ public Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByIdWithResponseAsync(String id, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } return service.getById(this.client.getHost(), id, this.client.getApiVersion(), context); } @@ -159,6 +173,16 @@ public Mono> getByIdWithResponseAsync(String id, Context co */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> addWithResponseAsync(String id, EventRoute eventRoute, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (eventRoute != null) { + eventRoute.validate(); + } return service.add(this.client.getHost(), id, this.client.getApiVersion(), eventRoute, context); } @@ -175,6 +199,13 @@ public Mono> addWithResponseAsync(String id, EventRoute eventRout */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String id, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } return service.delete(this.client.getHost(), id, this.client.getApiVersion(), context); } @@ -190,6 +221,9 @@ public Mono> deleteWithResponseAsync(String id, Context context) */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } return service.listNext(nextLink, context) .map( res -> diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/QueriesImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/QueriesImpl.java index 9f7dcddfb6c53..2175a671ff97f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/QueriesImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/QueriesImpl.java @@ -71,6 +71,16 @@ Mono queryTwins( @ServiceMethod(returns = ReturnType.SINGLE) public Mono queryTwinsWithResponseAsync( QuerySpecification querySpecification, Context context) { + if (this.client.getHost() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (querySpecification == null) { + return Mono.error( + new IllegalArgumentException("Parameter querySpecification is required and cannot be null.")); + } else { + querySpecification.validate(); + } return service.queryTwins(this.client.getHost(), this.client.getApiVersion(), querySpecification, context); } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinModelsListOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinModelsListOptions.java index 79abcea7a9aaf..6fa7fc36f8a6f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinModelsListOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinModelsListOptions.java @@ -38,4 +38,11 @@ public DigitalTwinModelsListOptions setMaxItemCount(Integer maxItemCount) { this.maxItemCount = maxItemCount; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsAddHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsAddHeaders.java index fbd8c2b5223c3..a0daa05c0e1a7 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsAddHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsAddHeaders.java @@ -35,4 +35,11 @@ public DigitalTwinsAddHeaders setETag(String eTag) { this.eTag = eTag; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsAddRelationshipHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsAddRelationshipHeaders.java index 604f192fde846..6c479975a84df 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsAddRelationshipHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsAddRelationshipHeaders.java @@ -35,4 +35,11 @@ public DigitalTwinsAddRelationshipHeaders setETag(String eTag) { this.eTag = eTag; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetByIdHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetByIdHeaders.java index b884c53178409..6e2d77ff516e5 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetByIdHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetByIdHeaders.java @@ -35,4 +35,11 @@ public DigitalTwinsGetByIdHeaders setETag(String eTag) { this.eTag = eTag; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetComponentHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetComponentHeaders.java index 67c2153308848..28e961fdf78b8 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetComponentHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetComponentHeaders.java @@ -35,4 +35,11 @@ public DigitalTwinsGetComponentHeaders setETag(String eTag) { this.eTag = eTag; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetRelationshipByIdHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetRelationshipByIdHeaders.java index fc6b9eee17352..27ba7a164640e 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetRelationshipByIdHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsGetRelationshipByIdHeaders.java @@ -35,4 +35,11 @@ public DigitalTwinsGetRelationshipByIdHeaders setETag(String eTag) { this.eTag = eTag; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateComponentHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateComponentHeaders.java index e5a628d33948f..3cb1e5a8b223d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateComponentHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateComponentHeaders.java @@ -35,4 +35,11 @@ public DigitalTwinsUpdateComponentHeaders setETag(String eTag) { this.eTag = eTag; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateHeaders.java index 2968d2850fd88..cb2dbe2848e43 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateHeaders.java @@ -35,4 +35,11 @@ public DigitalTwinsUpdateHeaders setETag(String eTag) { this.eTag = eTag; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateRelationshipHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateRelationshipHeaders.java index c5729e244beab..a4d6d308c0038 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateRelationshipHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsUpdateRelationshipHeaders.java @@ -35,4 +35,11 @@ public DigitalTwinsUpdateRelationshipHeaders setETag(String eTag) { this.eTag = eTag; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/Error.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/Error.java index 1be2988ede5d4..2d67c0ffbe319 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/Error.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/Error.java @@ -85,4 +85,18 @@ public Error setInnererror(InnerError innererror) { this.innererror = innererror; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (getDetails() != null) { + getDetails().forEach(e -> e.validate()); + } + if (getInnererror() != null) { + getInnererror().validate(); + } + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ErrorResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ErrorResponse.java index 402f08986c39d..2572015aa8ef3 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ErrorResponse.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ErrorResponse.java @@ -35,4 +35,15 @@ public ErrorResponse setError(Error error) { this.error = error; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (getError() != null) { + getError().validate(); + } + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoute.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoute.java index 53221b6bc3e73..4d20920931f34 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoute.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoute.java @@ -77,4 +77,15 @@ public EventRoute setFilter(String filter) { this.filter = filter; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (getEndpointName() == null) { + throw new IllegalArgumentException("Missing required property endpointName in model EventRoute"); + } + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRouteCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRouteCollection.java index e49d3803e34fc..95d28700ece76 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRouteCollection.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRouteCollection.java @@ -62,4 +62,15 @@ public EventRouteCollection setNextLink(String nextLink) { this.nextLink = nextLink; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (getValue() != null) { + getValue().forEach(e -> e.validate()); + } + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoutesListOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoutesListOptions.java index 5cf244a807a8d..c3e17223a4151 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoutesListOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoutesListOptions.java @@ -38,4 +38,11 @@ public EventRoutesListOptions setMaxItemCount(Integer maxItemCount) { this.maxItemCount = maxItemCount; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationshipCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationshipCollection.java index 1b132253c14b6..2130885e049c2 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationshipCollection.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationshipCollection.java @@ -63,4 +63,15 @@ public IncomingRelationshipCollection setNextLink(String nextLink) { this.nextLink = nextLink; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (getValue() != null) { + getValue().forEach(e -> e.validate()); + } + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/InnerError.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/InnerError.java index f91880a74e1f2..1af1bfff46ee8 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/InnerError.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/InnerError.java @@ -64,4 +64,15 @@ public InnerError setInnererror(InnerError innererror) { this.innererror = innererror; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (getInnererror() != null) { + getInnererror().validate(); + } + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ModelData.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ModelData.java index cf05f37543a13..b7992d09010ca 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ModelData.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/ModelData.java @@ -176,4 +176,15 @@ public ModelData setModel(Object model) { this.model = model; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (getId() == null) { + throw new IllegalArgumentException("Missing required property id in model ModelData"); + } + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/PagedModelDataCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/PagedModelDataCollection.java index bbbcf2947b469..46aa9cc1af881 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/PagedModelDataCollection.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/PagedModelDataCollection.java @@ -62,4 +62,15 @@ public PagedModelDataCollection setNextLink(String nextLink) { this.nextLink = nextLink; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (getValue() != null) { + getValue().forEach(e -> e.validate()); + } + } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueriesQueryTwinsHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueriesQueryTwinsHeaders.java index cea11f60ba7c1..3d5175e719b2d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueriesQueryTwinsHeaders.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueriesQueryTwinsHeaders.java @@ -35,4 +35,11 @@ public QueriesQueryTwinsHeaders setQueryCharge(Float queryCharge) { this.queryCharge = queryCharge; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueryResult.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueryResult.java index 29b0869689ed7..ef40a9c0418a5 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueryResult.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueryResult.java @@ -65,4 +65,11 @@ public QueryResult setContinuationToken(String continuationToken) { this.continuationToken = continuationToken; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QuerySpecification.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QuerySpecification.java index 9f8c1a4d5c647..50f82d49d83e0 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QuerySpecification.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QuerySpecification.java @@ -65,4 +65,11 @@ public QuerySpecification setContinuationToken(String continuationToken) { this.continuationToken = continuationToken; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/RelationshipCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/RelationshipCollection.java index 48dd297fe37d5..f9e99f5fd0724 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/RelationshipCollection.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/RelationshipCollection.java @@ -62,4 +62,11 @@ public RelationshipCollection setNextLink(String nextLink) { this.nextLink = nextLink; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java index 2d5dbcb633eef..ad871572d324f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java @@ -117,4 +117,11 @@ public IncomingRelationship setRelationshipLink(String relationshipLink) { this.relationshipLink = relationshipLink; return this; } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() {} } From cd8b4a161e2e5550cecb29aec2b8530587b91059 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Wed, 9 Sep 2020 15:20:08 -0700 Subject: [PATCH 154/168] Fixes management support for AuthorizationRules (#14865) * Expose AuthorizationRules on Queue and Topic options. * Rename AuthorizationRule -> AuthorizationRuleImpl. Add an implementation of SharedAccessAuthorizationRule. * Adding CreateQueueEntry with rules. * Fixing namespaces on autogenerated code. * Fixing serialization and replacing global namespace. --- .../models/AuthorizationRule.java | 274 ++--------------- .../models/CreateQueueOptions.java | 15 + .../models/CreateTopicOptions.java | 15 + .../models/QueueProperties.java | 17 +- .../models/SharedAccessAuthorizationRule.java | 226 ++++++++++++++ .../models/TopicProperties.java | 24 +- .../implementation/EntityHelper.java | 75 ++++- .../ServiceBusManagementSerializer.java | 24 +- .../models/AuthorizationRuleImpl.java | 289 ++++++++++++++++++ .../models/QueueDescription.java | 16 +- .../models/TopicDescription.java | 11 +- .../azure/messaging/servicebus/TestUtils.java | 74 +++-- ...inistrationAsyncClientIntegrationTest.java | 61 +++- .../models/CreateQueueOptionsTest.java | 33 +- .../ServiceBusManagementSerializerTest.java | 109 +++++++ .../createQueueAuthorizationRules.json | 22 ++ .../test/resources/xml/CreateQueueEntry.xml | 27 ++ 17 files changed, 985 insertions(+), 327 deletions(-) create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SharedAccessAuthorizationRule.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/AuthorizationRuleImpl.java create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/createQueueAuthorizationRules.json create mode 100644 sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/CreateQueueEntry.xml diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/AuthorizationRule.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/AuthorizationRule.java index df15238af751f..7a658ba992cc2 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/AuthorizationRule.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/AuthorizationRule.java @@ -1,284 +1,70 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.messaging.servicebus.administration.models; -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - import java.time.OffsetDateTime; -import java.util.ArrayList; import java.util.List; -/** The AuthorizationRule model. */ -@JacksonXmlRootElement( - localName = "AuthorizationRule", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") -@Fluent -public final class AuthorizationRule { - /* - * The authorization type. - */ - @JacksonXmlProperty(localName = "type", isAttribute = true) - private String type; - - /* - * The claim type. - */ - @JacksonXmlProperty( - localName = "ClaimType", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private String claimType; - - /* - * The claim value. - */ - @JacksonXmlProperty( - localName = "ClaimValue", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private String claimValue; - - private static final class RightsWrapper { - @JacksonXmlProperty(localName = "AccessRights") - private final List items; - - @JsonCreator - private RightsWrapper(@JacksonXmlProperty(localName = "AccessRights") List items) { - this.items = items; - } - } - - /* - * Access rights of the entity. Values are 'Send', 'Listen', or 'Manage' - */ - @JacksonXmlProperty( - localName = "Rights", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private RightsWrapper rights; - - /* - * The date and time when the authorization rule was created. - */ - @JacksonXmlProperty( - localName = "CreatedTime", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private OffsetDateTime createdTime; - - /* - * The date and time when the authorization rule was modified. - */ - @JacksonXmlProperty( - localName = "ModifiedTime", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private OffsetDateTime modifiedTime; - - /* - * The authorization rule key name - */ - @JacksonXmlProperty( - localName = "KeyName", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private String keyName; - - /* - * The primary key of the authorization rule - */ - @JacksonXmlProperty( - localName = "PrimaryKey", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private String primaryKey; - - /* - * The primary key of the authorization rule - */ - @JacksonXmlProperty( - localName = "SecondaryKey", - namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") - private String secondaryKey; - - /** - * Get the type property: The authorization type. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * Set the type property: The authorization type. - * - * @param type the type value to set. - * @return the AuthorizationRule object itself. - */ - public AuthorizationRule setType(String type) { - this.type = type; - return this; - } - - /** - * Get the claimType property: The claim type. - * - * @return the claimType value. - */ - public String getClaimType() { - return this.claimType; - } - - /** - * Set the claimType property: The claim type. - * - * @param claimType the claimType value to set. - * @return the AuthorizationRule object itself. - */ - public AuthorizationRule setClaimType(String claimType) { - this.claimType = claimType; - return this; - } - - /** - * Get the claimValue property: The claim value. - * - * @return the claimValue value. - */ - public String getClaimValue() { - return this.claimValue; - } - - /** - * Set the claimValue property: The claim value. - * - * @param claimValue the claimValue value to set. - * @return the AuthorizationRule object itself. - */ - public AuthorizationRule setClaimValue(String claimValue) { - this.claimValue = claimValue; - return this; - } - - /** - * Get the rights property: Access rights of the entity. Values are 'Send', 'Listen', or 'Manage'. - * - * @return the rights value. - */ - public List getRights() { - if (this.rights == null) { - this.rights = new RightsWrapper(new ArrayList()); - } - return this.rights.items; - } - - /** - * Set the rights property: Access rights of the entity. Values are 'Send', 'Listen', or 'Manage'. - * - * @param rights the rights value to set. - * @return the AuthorizationRule object itself. - */ - public AuthorizationRule setRights(List rights) { - this.rights = new RightsWrapper(rights); - return this; - } - - /** - * Get the createdTime property: The date and time when the authorization rule was created. - * - * @return the createdTime value. - */ - public OffsetDateTime getCreatedTime() { - return this.createdTime; - } - - /** - * Set the createdTime property: The date and time when the authorization rule was created. - * - * @param createdTime the createdTime value to set. - * @return the AuthorizationRule object itself. - */ - public AuthorizationRule setCreatedTime(OffsetDateTime createdTime) { - this.createdTime = createdTime; - return this; - } - +/** + * Represents an authorization rule to access Service Bus entities. + * + * @see SharedAccessAuthorizationRule + */ +public interface AuthorizationRule { /** - * Get the modifiedTime property: The date and time when the authorization rule was modified. + * Gets the access rights for the rule. * - * @return the modifiedTime value. + * @return The access rights for the rule. */ - public OffsetDateTime getModifiedTime() { - return this.modifiedTime; - } + List getAccessRights(); /** - * Set the modifiedTime property: The date and time when the authorization rule was modified. + * Gets the claim type. * - * @param modifiedTime the modifiedTime value to set. - * @return the AuthorizationRule object itself. + * @return The claim type. */ - public AuthorizationRule setModifiedTime(OffsetDateTime modifiedTime) { - this.modifiedTime = modifiedTime; - return this; - } + String getClaimType(); /** - * Get the keyName property: The authorization rule key name. + * Gets the claim value. * - * @return the keyName value. + * @return The claim value. */ - public String getKeyName() { - return this.keyName; - } + String getClaimValue(); /** - * Set the keyName property: The authorization rule key name. + * Gets the date time this rule was created. * - * @param keyName the keyName value to set. - * @return the AuthorizationRule object itself. + * @return The date time this rule was created. */ - public AuthorizationRule setKeyName(String keyName) { - this.keyName = keyName; - return this; - } + OffsetDateTime getCreatedAt(); /** - * Get the primaryKey property: The primary key of the authorization rule. + * Gets the name of the authorization rule. * - * @return the primaryKey value. + * @return name of the authoriation rule. */ - public String getPrimaryKey() { - return this.primaryKey; - } + String getKeyName(); /** - * Set the primaryKey property: The primary key of the authorization rule. + * Gets the date time this rule was last modified. * - * @param primaryKey the primaryKey value to set. - * @return the AuthorizationRule object itself. + * @return The date time this rule was last modified. */ - public AuthorizationRule setPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } + OffsetDateTime getModifiedAt(); /** - * Get the secondaryKey property: The primary key of the authorization rule. + * Gets the primary key. * - * @return the secondaryKey value. + * @return The primary key. */ - public String getSecondaryKey() { - return this.secondaryKey; - } + String getPrimaryKey(); /** - * Set the secondaryKey property: The primary key of the authorization rule. + * Gets the secondary key. * - * @param secondaryKey the secondaryKey value to set. - * @return the AuthorizationRule object itself. + * @return The secondary key. */ - public AuthorizationRule setSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } + String getSecondaryKey(); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateQueueOptions.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateQueueOptions.java index 58f5ef4bca158..8ff0c24c1546f 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateQueueOptions.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateQueueOptions.java @@ -8,6 +8,8 @@ import com.azure.messaging.servicebus.administration.ServiceBusAdministrationClient; import java.time.Duration; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; import static com.azure.messaging.servicebus.implementation.ServiceBusConstants.DEFAULT_DUPLICATE_DETECTION_DURATION; @@ -24,6 +26,8 @@ */ @Fluent public class CreateQueueOptions { + private final List authorizationRules; + private Duration autoDeleteOnIdle; private Duration defaultMessageTimeToLive; private boolean deadLetteringOnMessageExpiration; @@ -62,6 +66,7 @@ public class CreateQueueOptions { * @throws IllegalArgumentException if {@code queueName} is an empty string. */ public CreateQueueOptions() { + this.authorizationRules = new ArrayList<>(); this.autoDeleteOnIdle = MAX_DURATION; this.defaultMessageTimeToLive = MAX_DURATION; this.duplicateDetectionHistoryTimeWindow = DEFAULT_DUPLICATE_DETECTION_DURATION; @@ -85,6 +90,7 @@ public CreateQueueOptions() { public CreateQueueOptions(QueueProperties queue) { Objects.requireNonNull(queue, "'queue' cannot be null."); + this.authorizationRules = new ArrayList<>(queue.getAuthorizationRules()); this.autoDeleteOnIdle = queue.getAutoDeleteOnIdle(); this.defaultMessageTimeToLive = queue.getDefaultMessageTimeToLive(); @@ -106,6 +112,15 @@ public CreateQueueOptions(QueueProperties queue) { this.userMetadata = queue.getUserMetadata(); } + /** + * Gets the authorization rules to control user access at entity level. + * + * @return The authorization rules to control user access at entity level. + */ + public List getAuthorizationRules() { + return authorizationRules; + } + /** * Get the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the queue is automatically * deleted. The minimum duration is 5 minutes. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateTopicOptions.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateTopicOptions.java index 4a3c441fcc6df..bb5fbbe7cb5ed 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateTopicOptions.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CreateTopicOptions.java @@ -8,6 +8,8 @@ import com.azure.messaging.servicebus.administration.ServiceBusAdministrationClient; import java.time.Duration; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; import static com.azure.messaging.servicebus.implementation.ServiceBusConstants.DEFAULT_DUPLICATE_DETECTION_DURATION; @@ -23,6 +25,8 @@ * @see ServiceBusAdministrationClient#createTopic(String, CreateTopicOptions) */ public class CreateTopicOptions { + private final List authorizationRules; + private Duration autoDeleteOnIdle; private Duration defaultMessageTimeToLive; private Duration duplicateDetectionHistoryTimeWindow; @@ -58,6 +62,7 @@ public class CreateTopicOptions { * @throws IllegalArgumentException if {@code topicName} is an empty string. */ public CreateTopicOptions() { + this.authorizationRules = new ArrayList<>(); this.autoDeleteOnIdle = MAX_DURATION; this.defaultMessageTimeToLive = MAX_DURATION; this.duplicateDetectionHistoryTimeWindow = DEFAULT_DUPLICATE_DETECTION_DURATION; @@ -80,6 +85,7 @@ public CreateTopicOptions() { public CreateTopicOptions(TopicProperties topic) { Objects.requireNonNull(topic, "'topic' cannot be null."); + this.authorizationRules = new ArrayList<>(topic.getAuthorizationRules()); this.autoDeleteOnIdle = topic.getAutoDeleteOnIdle(); this.defaultMessageTimeToLive = topic.getDefaultMessageTimeToLive(); this.duplicateDetectionHistoryTimeWindow = topic.getDuplicateDetectionHistoryTimeWindow(); @@ -92,6 +98,15 @@ public CreateTopicOptions(TopicProperties topic) { this.userMetadata = topic.getUserMetadata(); } + /** + * Gets the authorization rules to control user access at entity level. + * + * @return The authorization rules to control user access at entity level. + */ + public List getAuthorizationRules() { + return authorizationRules; + } + /** * Get the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the queue is automatically * deleted. The minimum duration is 5 minutes. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueProperties.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueProperties.java index 823ea0861ba7d..b17363f080961 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueProperties.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/QueueProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.messaging.servicebus.implementation.EntityHelper; +import com.azure.messaging.servicebus.implementation.models.AuthorizationRuleImpl; import com.azure.messaging.servicebus.implementation.models.EntityAvailabilityStatus; import com.azure.messaging.servicebus.implementation.models.MessageCountDetails; import com.azure.messaging.servicebus.implementation.models.QueueDescription; @@ -14,6 +15,7 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; import static com.azure.messaging.servicebus.implementation.MessageUtils.toPrimitive; @@ -54,10 +56,9 @@ public final class QueueProperties { // This is used by classes in different packages to get access to private and package-private methods. EntityHelper.setQueueAccessor(new EntityHelper.QueueAccessor() { @Override - public QueueDescription toImplementation(QueueProperties queue) { - return new QueueDescription() + public QueueDescription toImplementation(QueueProperties queue, List rules) { + final QueueDescription description = new QueueDescription() .setAccessedAt(queue.getAccessedAt()) - .setAuthorizationRules(queue.getAuthorizationRules()) .setAutoDeleteOnIdle(queue.getAutoDeleteOnIdle()) .setCreatedAt(queue.getCreatedAt()) .setDeadLetteringOnMessageExpiration(queue.isDeadLetteringOnMessageExpiration()) @@ -82,6 +83,12 @@ public QueueDescription toImplementation(QueueProperties queue) { .setRequiresDuplicateDetection(queue.requiresDuplicateDetection()) .setUpdatedAt(queue.getUpdatedAt()) .setUserMetadata(queue.getUserMetadata()); + + if (!rules.isEmpty()) { + description.setAuthorizationRules(rules); + } + + return description; } @Override @@ -104,7 +111,9 @@ public void setName(QueueProperties queueProperties, String name) { QueueProperties(QueueDescription description) { this.accessedAt = description.getAccessedAt(); this.autoDeleteOnIdle = description.getAutoDeleteOnIdle(); - this.authorizationRules = description.getAuthorizationRules(); + this.authorizationRules = description.getAuthorizationRules().stream() + .map(SharedAccessAuthorizationRule::new) + .collect(Collectors.toList()); this.createdAt = description.getCreatedAt(); this.defaultMessageTimeToLive = description.getDefaultMessageTimeToLive(); this.deadLetteringOnMessageExpiration = toPrimitive(description.isDeadLetteringOnMessageExpiration()); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SharedAccessAuthorizationRule.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SharedAccessAuthorizationRule.java new file mode 100644 index 0000000000000..1b2ee9892d56b --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/SharedAccessAuthorizationRule.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.servicebus.administration.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.messaging.servicebus.implementation.models.AuthorizationRuleImpl; + +import java.security.SecureRandom; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Base64; +import java.util.List; +import java.util.Objects; + +/** + * A shared access key for accessing Service Bus entities. + */ +@Fluent +public class SharedAccessAuthorizationRule implements AuthorizationRule { + /** + * There one type of authorization rule. + */ + private static final String FIXED_CLAIM_TYPE = "SharedAccessKey"; + private static final SecureRandom SECURE_RANDOM = new SecureRandom(); + + private final List accessRights; + private final OffsetDateTime createdAt; + private final String keyName; + private final ClientLogger logger = new ClientLogger(SharedAccessAuthorizationRule.class); + private final OffsetDateTime modifiedAt; + + private String primaryKey; + private String secondaryKey; + + /** + * Creates an instance with the given key name and access rights. The {@link #getPrimaryKey() primary key} and + * {@link #getSecondaryKey() secondary key} is randomly generated. + * + * @param keyName The name of the rule. + * @param accessRights The access rights. + * + * @throws NullPointerException if {@code keyName} or {@code accessRights} are null. + * @throws IllegalArgumentException if {@code keyName} are empty strings. + */ + public SharedAccessAuthorizationRule(String keyName, List accessRights) { + this(keyName, generateRandomKey(), generateRandomKey(), accessRights); + } + + /** + * Creates an instance with the given key name, primary key, secondary key, and access rights. The {@link + * #getSecondaryKey() secondary key} is randomly generated. + * + * @param keyName The name of the rule. + * @param primaryKey The primary key. + * @param accessRights The access rights. + * + * @throws NullPointerException if {@code keyName}, {@code primaryKey}, or {@code accessRights} are null. + * @throws IllegalArgumentException if {@code keyName}, {@code primaryKey} are empty strings. + */ + public SharedAccessAuthorizationRule(String keyName, String primaryKey, List accessRights) { + this(keyName, primaryKey, generateRandomKey(), accessRights); + } + + /** + * Creates an instance with the given key name, primary key, secondary key, and access rights. + * + * @param keyName The name of the rule. + * @param primaryKey The primary key. + * @param secondaryKey The secondary key. + * @param accessRights The access rights. + * + * @throws NullPointerException if {@code keyName}, {@code primaryKey}, {@code secondaryKey}, or {@code + * accessRights} are null. + * @throws IllegalArgumentException if {@code keyName}, {@code primaryKey}, {@code secondaryKey} are empty + * strings. + */ + public SharedAccessAuthorizationRule(String keyName, String primaryKey, String secondaryKey, + List accessRights) { + this.keyName = Objects.requireNonNull(keyName, "'keyName' cannot be null."); + this.primaryKey = Objects.requireNonNull(primaryKey, "'primaryKey' cannot be null."); + this.secondaryKey = Objects.requireNonNull(secondaryKey, "'secondaryKey' cannot be null."); + this.accessRights = new ArrayList<>(Objects.requireNonNull(accessRights, + "'accessRights' cannot be null.")); + this.createdAt = null; + this.modifiedAt = null; + + if (keyName.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'keyName' cannot be an empty string.")); + } else if (primaryKey.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'primaryKey' cannot be an empty string.")); + } else if (secondaryKey.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "'secondaryKey' cannot be an empty string.")); + } + } + + /** + * Creates an instance using the implementation model. + * + * @param implementation Implementation model. + */ + SharedAccessAuthorizationRule(AuthorizationRuleImpl implementation) { + this.keyName = implementation.getKeyName(); + this.primaryKey = implementation.getPrimaryKey(); + this.secondaryKey = implementation.getSecondaryKey(); + this.accessRights = new ArrayList<>(implementation.getRights()); + this.createdAt = implementation.getCreatedTime(); + this.modifiedAt = implementation.getModifiedTime(); + } + + /** + * {@inheritDoc} + */ + @Override + public List getAccessRights() { + return accessRights; + } + + /** + * {@inheritDoc} + */ + @Override + public String getClaimType() { + return FIXED_CLAIM_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getClaimValue() { + return "None"; + } + + /** + * {@inheritDoc} + */ + @Override + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * {@inheritDoc} + */ + @Override + public String getKeyName() { + return keyName; + } + + /** + * {@inheritDoc} + */ + @Override + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + /** + * {@inheritDoc} + */ + @Override + public String getPrimaryKey() { + return primaryKey; + } + + /** + * Sets the primary key. + * + * @param primaryKey The primary key to set. + * + * @return The updated {@link SharedAccessAuthorizationRule} object. + * @throws NullPointerException if {@code primaryKey} is null. + * @throws IllegalArgumentException if {@code primaryKey} is an empty string. + */ + public SharedAccessAuthorizationRule setPrimaryKey(String primaryKey) { + if (Objects.isNull(primaryKey)) { + throw logger.logExceptionAsError(new NullPointerException("'primaryKey' cannot be null.")); + } else if (primaryKey.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'primaryKey' cannot be an empty string.")); + } + this.primaryKey = primaryKey; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public String getSecondaryKey() { + return secondaryKey; + } + + /** + * Sets the secondary key. + * + * @param secondaryKey The secondary key to set. + * + * @return The updated {@link SharedAccessAuthorizationRule} object. + * @throws NullPointerException if {@code secondary} is null. + * @throws IllegalArgumentException if {@code secondary} is an empty string. + */ + public SharedAccessAuthorizationRule setSecondaryKey(String secondaryKey) { + if (Objects.isNull(secondaryKey)) { + throw logger.logExceptionAsError(new NullPointerException("'primaryKey' cannot be null.")); + } else if (secondaryKey.isEmpty()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'primaryKey' cannot be an empty string.")); + } + this.secondaryKey = secondaryKey; + return this; + } + + /** + * Generates a random Base64 encoded key. + * + * @return A base 64 encoded key. + */ + private static String generateRandomKey() { + final byte[] key256 = new byte[32]; + + SECURE_RANDOM.nextBytes(key256); + return Base64.getEncoder().encodeToString(key256); + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicProperties.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicProperties.java index 2e904012004ca..9e77f77af6d1c 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicProperties.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/TopicProperties.java @@ -6,15 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.messaging.servicebus.implementation.EntityHelper; +import com.azure.messaging.servicebus.implementation.models.AuthorizationRuleImpl; import com.azure.messaging.servicebus.implementation.models.EntityAvailabilityStatus; import com.azure.messaging.servicebus.implementation.models.MessageCountDetails; import com.azure.messaging.servicebus.implementation.models.TopicDescription; import java.time.Duration; import java.time.OffsetDateTime; -import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; import static com.azure.messaging.servicebus.implementation.MessageUtils.toPrimitive; @@ -30,7 +31,7 @@ public final class TopicProperties { private final EntityAvailabilityStatus entityAvailabilityStatus; private boolean filteringMessagesBeforePublishing; private Boolean isAnonymousAccessible; - private List authorizationRules; + private final List authorizationRules; private EntityStatus status; private final OffsetDateTime createdAt; private final OffsetDateTime updatedAt; @@ -55,10 +56,9 @@ public TopicProperties toModel(TopicDescription options) { } @Override - public TopicDescription toImplementation(TopicProperties topic) { - return new TopicDescription() + public TopicDescription toImplementation(TopicProperties topic, List rules) { + final TopicDescription description = new TopicDescription() .setAccessedAt(topic.getAccessedAt()) - .setAuthorizationRules(topic.getAuthorizationRules()) .setAutoDeleteOnIdle(topic.getAutoDeleteOnIdle()) .setCreatedAt(topic.getCreatedAt()) .setDefaultMessageTimeToLive(topic.getDefaultMessageTimeToLive()) @@ -79,6 +79,12 @@ public TopicDescription toImplementation(TopicProperties topic) { .setRequiresDuplicateDetection(topic.requiresDuplicateDetection()) .setUpdatedAt(topic.getUpdatedAt()) .setUserMetadata(topic.getUserMetadata()); + + if (!rules.isEmpty()) { + description.setAuthorizationRules(rules); + } + + return description; } @Override @@ -96,7 +102,10 @@ public void setName(TopicProperties topicProperties, String name) { TopicProperties(TopicDescription topic) { Objects.requireNonNull(topic, "'options' cannot be null."); this.accessedAt = topic.getAccessedAt(); - this.authorizationRules = topic.getAuthorizationRules(); + this.authorizationRules = topic.getAuthorizationRules() + .stream() + .map(SharedAccessAuthorizationRule::new) + .collect(Collectors.toList()); this.autoDeleteOnIdle = topic.getAutoDeleteOnIdle(); this.createdAt = topic.getCreatedAt(); this.defaultMessageTimeToLive = topic.getDefaultMessageTimeToLive(); @@ -243,9 +252,6 @@ public boolean enableBatchedOperations() { * @return the authorizationRules value. */ public List getAuthorizationRules() { - if (this.authorizationRules == null) { - this.authorizationRules = new ArrayList<>(); - } return this.authorizationRules; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java index f92bc31b5169a..8d55b008bce27 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java @@ -4,6 +4,7 @@ package com.azure.messaging.servicebus.implementation; import com.azure.core.util.logging.ClientLogger; +import com.azure.messaging.servicebus.administration.models.AuthorizationRule; import com.azure.messaging.servicebus.administration.models.CreateQueueOptions; import com.azure.messaging.servicebus.administration.models.CreateSubscriptionOptions; import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; @@ -11,8 +12,10 @@ import com.azure.messaging.servicebus.administration.models.RuleAction; import com.azure.messaging.servicebus.administration.models.RuleFilter; import com.azure.messaging.servicebus.administration.models.RuleProperties; +import com.azure.messaging.servicebus.administration.models.SharedAccessAuthorizationRule; import com.azure.messaging.servicebus.administration.models.SubscriptionProperties; import com.azure.messaging.servicebus.administration.models.TopicProperties; +import com.azure.messaging.servicebus.implementation.models.AuthorizationRuleImpl; import com.azure.messaging.servicebus.implementation.models.QueueDescription; import com.azure.messaging.servicebus.implementation.models.RuleActionImpl; import com.azure.messaging.servicebus.implementation.models.RuleDescription; @@ -20,7 +23,10 @@ import com.azure.messaging.servicebus.implementation.models.SubscriptionDescription; import com.azure.messaging.servicebus.implementation.models.TopicDescription; +import java.util.Collections; +import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** * Used to access internal methods on {@link QueueProperties}. @@ -52,7 +58,7 @@ public final class EntityHelper { */ public static QueueDescription getQueueDescription(CreateQueueOptions options) { Objects.requireNonNull(options, "'options' cannot be null."); - return new QueueDescription() + final QueueDescription description = new QueueDescription() .setAutoDeleteOnIdle(options.getAutoDeleteOnIdle()) .setDefaultMessageTimeToLive(options.getDefaultMessageTimeToLive()) .setDeadLetteringOnMessageExpiration(options.deadLetteringOnMessageExpiration()) @@ -68,6 +74,12 @@ public static QueueDescription getQueueDescription(CreateQueueOptions options) { .setRequiresSession(options.requiresSession()) .setStatus(options.getStatus()) .setUserMetadata(options.getUserMetadata()); + + if (!options.getAuthorizationRules().isEmpty()) { + description.setAuthorizationRules(toImplementation(options.getAuthorizationRules())); + } + + return description; } public static SubscriptionDescription getSubscriptionDescription(CreateSubscriptionOptions options) { @@ -89,7 +101,7 @@ public static SubscriptionDescription getSubscriptionDescription(CreateSubscript public static TopicDescription getTopicDescription(CreateTopicOptions options) { Objects.requireNonNull(options, "'options' cannot be null."); - return new TopicDescription() + final TopicDescription description = new TopicDescription() .setAutoDeleteOnIdle(options.getAutoDeleteOnIdle()) .setDefaultMessageTimeToLive(options.getDefaultMessageTimeToLive()) .setDuplicateDetectionHistoryTimeWindow(options.getDuplicateDetectionHistoryTimeWindow()) @@ -100,24 +112,34 @@ public static TopicDescription getTopicDescription(CreateTopicOptions options) { .setSupportOrdering(options.isSupportOrdering()) .setStatus(options.getStatus()) .setUserMetadata(options.getUserMetadata()); + + if (!options.getAuthorizationRules().isEmpty()) { + description.setAuthorizationRules(toImplementation(options.getAuthorizationRules())); + } + + return description; } /** * Creates a new queue given the existing queue. * - * @param description Options to create queue with. + * @param properties Options to create queue with. * * @return A new {@link QueueProperties} with the set options. */ - public static QueueDescription toImplementation(QueueProperties description) { - Objects.requireNonNull(description, "'description' cannot be null."); + public static QueueDescription toImplementation(QueueProperties properties) { + Objects.requireNonNull(properties, "'properties' cannot be null."); if (queueAccessor == null) { throw new ClientLogger(EntityHelper.class).logExceptionAsError( new IllegalStateException("'queueAccessor' should not be null.")); } - return queueAccessor.toImplementation(description); + final List rules = !properties.getAuthorizationRules().isEmpty() + ? toImplementation(properties.getAuthorizationRules()) + : Collections.emptyList(); + + return queueAccessor.toImplementation(properties, rules); } /** @@ -204,7 +226,11 @@ public static TopicDescription toImplementation(TopicProperties properties) { new IllegalStateException("'topicAccessor' should not be null.")); } - return topicAccessor.toImplementation(properties); + final List rules = !properties.getAuthorizationRules().isEmpty() + ? toImplementation(properties.getAuthorizationRules()) + : Collections.emptyList(); + + return topicAccessor.toImplementation(properties, rules); } /** @@ -436,6 +462,31 @@ public static void setTopicName(TopicProperties topicProperties, String topicNam topicAccessor.setName(topicProperties, topicName); } + private static List toImplementation(List rules) { + return rules.stream().map(rule -> { + final AuthorizationRuleImpl implementation = new AuthorizationRuleImpl() + .setClaimType(rule.getClaimType()) + .setClaimValue(rule.getClaimValue()) + .setCreatedTime(rule.getCreatedAt()) + .setKeyName(rule.getKeyName()) + .setModifiedTime(rule.getModifiedAt()) + .setPrimaryKey(rule.getPrimaryKey()) + .setSecondaryKey(rule.getSecondaryKey()) + .setRights(rule.getAccessRights()); + + if (rule instanceof SharedAccessAuthorizationRule) { + // This is the type name constant. + implementation.setType("SharedAccessAuthorizationRule"); + } else { + final String className = rule.getClass().getName(); + new ClientLogger(EntityHelper.class).warning("AuthorizationRule type '{}' is unknown.", className); + implementation.setType(className); + } + + return implementation; + }).collect(Collectors.toList()); + } + /** * Interface for accessing methods on a queue. */ @@ -447,7 +498,7 @@ public interface QueueAccessor { * * @return A new queue with the properties set. */ - QueueDescription toImplementation(QueueProperties queueDescription); + QueueDescription toImplementation(QueueProperties queueDescription, List rules); /** * Creates a new queue from the given {@code queueDescription}. @@ -530,20 +581,20 @@ public interface TopicAccessor { /** * Sets properties on the TopicProperties based on the CreateTopicOptions. * - * @param topic The implementation topic. + * @param topic The model topic. * * @return A new topic with the properties set. */ - TopicProperties toModel(TopicDescription topic); + TopicDescription toImplementation(TopicProperties topic, List rules); /** * Sets properties on the TopicProperties based on the CreateTopicOptions. * - * @param topic The model topic. + * @param topic The implementation topic. * * @return A new topic with the properties set. */ - TopicDescription toImplementation(TopicProperties topic); + TopicProperties toModel(TopicDescription topic); /** * Sets the name on a topicDescription. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializer.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializer.java index 33910011c7826..c619db1279c12 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializer.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializer.java @@ -9,6 +9,7 @@ import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.messaging.servicebus.implementation.models.CreateQueueBody; import java.io.IOException; import java.lang.reflect.Type; @@ -21,7 +22,10 @@ */ public class ServiceBusManagementSerializer implements SerializerAdapter { private static final String MINIMUM_DATETIME_FORMATTED = ">0001-01-01T00:00:00Z0001\\-01\\-01T00:00:00\\<\\/", + private static final Pattern MINIMUM_DATETIME_PATTERN = Pattern.compile(">0001-01-01T00:00:00\\w+)=\"http://schemas\\.microsoft\\.com/netservices/2010/10/servicebus/connect\"", Pattern.MULTILINE); private final JacksonAdapter jacksonAdapter = new JacksonAdapter(); @@ -29,7 +33,23 @@ public class ServiceBusManagementSerializer implements SerializerAdapter { @Override public String serialize(Object object, SerializerEncoding encoding) throws IOException { - return jacksonAdapter.serialize(object, encoding); + final String contents = jacksonAdapter.serialize(object, encoding); + + // This hack exists because the service requires a global namespace for the XML rather than allowing + // each XML element to be prefaced with an explicit namespace. For example: + // xmlns="foo" works because "foo" is assigned the global namespace. + // xmlns:ns0="foo", and then prefixing all elements with ns0:AuthorizationRule will break. + if (object instanceof CreateQueueBody) { + final Matcher matcher = NAMESPACE_PATTERN.matcher(contents); + if (matcher.find()) { + final String namespace = matcher.group("namespace"); + return contents + .replaceAll(namespace + ":", "") + .replace("xmlns:" + namespace + "=", "xmlns="); + } + } + + return contents; } @Override diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/AuthorizationRuleImpl.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/AuthorizationRuleImpl.java new file mode 100644 index 0000000000000..feb7404401fe1 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/AuthorizationRuleImpl.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.servicebus.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.messaging.servicebus.administration.models.AccessRights; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; + +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +/** The AuthorizationRule model. */ +@JacksonXmlRootElement( + localName = "AuthorizationRule", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") +@Fluent +public final class AuthorizationRuleImpl { + /* + * The authorization type. + */ + @JacksonXmlProperty(localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance", + isAttribute = true) + private String type; + + /* + * The claim type. + */ + @JacksonXmlProperty( + localName = "ClaimType", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private String claimType; + + /* + * The claim value. + */ + @JacksonXmlProperty( + localName = "ClaimValue", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private String claimValue; + + private static final class RightsWrapper { + @JacksonXmlProperty(localName = "AccessRights", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private final List items; + + @JsonCreator + private RightsWrapper(@JacksonXmlProperty(localName = "AccessRights", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + List items) { + this.items = items; + } + } + + /* + * Access rights of the entity. Values are 'Send', 'Listen', or 'Manage' + */ + @JacksonXmlProperty( + localName = "Rights", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private RightsWrapper rights; + + /* + * The date and time when the authorization rule was created. + */ + @JacksonXmlProperty( + localName = "CreatedTime", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private OffsetDateTime createdTime; + + /* + * The date and time when the authorization rule was modified. + */ + @JacksonXmlProperty( + localName = "ModifiedTime", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private OffsetDateTime modifiedTime; + + /* + * The authorization rule key name + */ + @JacksonXmlProperty( + localName = "KeyName", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private String keyName; + + /* + * The primary key of the authorization rule + */ + @JacksonXmlProperty( + localName = "PrimaryKey", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private String primaryKey; + + /* + * The primary key of the authorization rule + */ + @JacksonXmlProperty( + localName = "SecondaryKey", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private String secondaryKey; + + /** + * Get the type property: The authorization type. + * + * @return the type value. + */ + public String getType() { + return this.type; + } + + /** + * Set the type property: The authorization type. + * + * @param type the type value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setType(String type) { + this.type = type; + return this; + } + + /** + * Get the claimType property: The claim type. + * + * @return the claimType value. + */ + public String getClaimType() { + return this.claimType; + } + + /** + * Set the claimType property: The claim type. + * + * @param claimType the claimType value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setClaimType(String claimType) { + this.claimType = claimType; + return this; + } + + /** + * Get the claimValue property: The claim value. + * + * @return the claimValue value. + */ + public String getClaimValue() { + return this.claimValue; + } + + /** + * Set the claimValue property: The claim value. + * + * @param claimValue the claimValue value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setClaimValue(String claimValue) { + this.claimValue = claimValue; + return this; + } + + /** + * Get the rights property: Access rights of the entity. Values are 'Send', 'Listen', or 'Manage'. + * + * @return the rights value. + */ + public List getRights() { + if (this.rights == null) { + this.rights = new RightsWrapper(new ArrayList()); + } + return this.rights.items; + } + + /** + * Set the rights property: Access rights of the entity. Values are 'Send', 'Listen', or 'Manage'. + * + * @param rights the rights value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setRights(List rights) { + this.rights = new RightsWrapper(rights); + return this; + } + + /** + * Get the createdTime property: The date and time when the authorization rule was created. + * + * @return the createdTime value. + */ + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Set the createdTime property: The date and time when the authorization rule was created. + * + * @param createdTime the createdTime value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setCreatedTime(OffsetDateTime createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Get the modifiedTime property: The date and time when the authorization rule was modified. + * + * @return the modifiedTime value. + */ + public OffsetDateTime getModifiedTime() { + return this.modifiedTime; + } + + /** + * Set the modifiedTime property: The date and time when the authorization rule was modified. + * + * @param modifiedTime the modifiedTime value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setModifiedTime(OffsetDateTime modifiedTime) { + this.modifiedTime = modifiedTime; + return this; + } + + /** + * Get the keyName property: The authorization rule key name. + * + * @return the keyName value. + */ + public String getKeyName() { + return this.keyName; + } + + /** + * Set the keyName property: The authorization rule key name. + * + * @param keyName the keyName value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the primaryKey property: The primary key of the authorization rule. + * + * @return the primaryKey value. + */ + public String getPrimaryKey() { + return this.primaryKey; + } + + /** + * Set the primaryKey property: The primary key of the authorization rule. + * + * @param primaryKey the primaryKey value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setPrimaryKey(String primaryKey) { + this.primaryKey = primaryKey; + return this; + } + + /** + * Get the secondaryKey property: The primary key of the authorization rule. + * + * @return the secondaryKey value. + */ + public String getSecondaryKey() { + return this.secondaryKey; + } + + /** + * Set the secondaryKey property: The primary key of the authorization rule. + * + * @param secondaryKey the secondaryKey value to set. + * @return the AuthorizationRule object itself. + */ + public AuthorizationRuleImpl setSecondaryKey(String secondaryKey) { + this.secondaryKey = secondaryKey; + return this; + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/QueueDescription.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/QueueDescription.java index 92311c1099de7..9a464f96ef471 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/QueueDescription.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/QueueDescription.java @@ -5,7 +5,6 @@ package com.azure.messaging.servicebus.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.messaging.servicebus.administration.models.AuthorizationRule; import com.azure.messaging.servicebus.administration.models.EntityStatus; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -130,12 +129,15 @@ public final class QueueDescription { private Boolean isAnonymousAccessible; private static final class AuthorizationRulesWrapper { - @JacksonXmlProperty(localName = "AuthorizationRule") - private final List items; + @JacksonXmlProperty(localName = "AuthorizationRule", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + private final List items; @JsonCreator private AuthorizationRulesWrapper( - @JacksonXmlProperty(localName = "AuthorizationRule") List items) { + @JacksonXmlProperty(localName = "AuthorizationRule", + namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect") + List items) { this.items = items; } } @@ -523,9 +525,9 @@ public QueueDescription setIsAnonymousAccessible(Boolean isAnonymousAccessible) * * @return the authorizationRules value. */ - public List getAuthorizationRules() { + public List getAuthorizationRules() { if (this.authorizationRules == null) { - this.authorizationRules = new AuthorizationRulesWrapper(new ArrayList()); + this.authorizationRules = new AuthorizationRulesWrapper(new ArrayList()); } return this.authorizationRules.items; } @@ -536,7 +538,7 @@ public List getAuthorizationRules() { * @param authorizationRules the authorizationRules value to set. * @return the QueueDescription object itself. */ - public QueueDescription setAuthorizationRules(List authorizationRules) { + public QueueDescription setAuthorizationRules(List authorizationRules) { this.authorizationRules = new AuthorizationRulesWrapper(authorizationRules); return this; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TopicDescription.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TopicDescription.java index 3a11cf46426fb..858e141b01d9d 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TopicDescription.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/models/TopicDescription.java @@ -5,7 +5,6 @@ package com.azure.messaging.servicebus.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.messaging.servicebus.administration.models.AuthorizationRule; import com.azure.messaging.servicebus.administration.models.EntityStatus; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -94,11 +93,11 @@ public final class TopicDescription { private static final class AuthorizationRulesWrapper { @JacksonXmlProperty(localName = "AuthorizationRule") - private final List items; + private final List items; @JsonCreator private AuthorizationRulesWrapper( - @JacksonXmlProperty(localName = "AuthorizationRule") List items) { + @JacksonXmlProperty(localName = "AuthorizationRule") List items) { this.items = items; } } @@ -396,9 +395,9 @@ public TopicDescription setIsAnonymousAccessible(Boolean isAnonymousAccessible) * * @return the authorizationRules value. */ - public List getAuthorizationRules() { + public List getAuthorizationRules() { if (this.authorizationRules == null) { - this.authorizationRules = new AuthorizationRulesWrapper(new ArrayList()); + this.authorizationRules = new AuthorizationRulesWrapper(new ArrayList()); } return this.authorizationRules.items; } @@ -409,7 +408,7 @@ public List getAuthorizationRules() { * @param authorizationRules the authorizationRules value to set. * @return the TopicDescription object itself. */ - public TopicDescription setAuthorizationRules(List authorizationRules) { + public TopicDescription setAuthorizationRules(List authorizationRules) { this.authorizationRules = new AuthorizationRulesWrapper(authorizationRules); return this; } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java index a69b9efc6fada..8c46f3675c181 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java @@ -5,6 +5,8 @@ import com.azure.core.amqp.exception.AmqpResponseCode; import com.azure.core.util.CoreUtils; +import com.azure.messaging.servicebus.administration.models.AccessRights; +import com.azure.messaging.servicebus.administration.models.AuthorizationRule; import org.apache.qpid.proton.Proton; import org.apache.qpid.proton.amqp.Binary; import org.apache.qpid.proton.amqp.Symbol; @@ -12,23 +14,24 @@ import org.apache.qpid.proton.amqp.messaging.Data; import org.apache.qpid.proton.amqp.messaging.MessageAnnotations; import org.apache.qpid.proton.message.Message; -import reactor.core.publisher.Flux; -import reactor.core.publisher.FluxSink; import java.time.Instant; -import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.concurrent.ConcurrentLinkedDeque; import java.util.stream.Collectors; import java.util.stream.IntStream; import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_TIME_UTC_ANNOTATION_NAME; import static com.azure.core.amqp.AmqpMessageConstant.SEQUENCE_NUMBER_ANNOTATION_NAME; import static java.nio.charset.StandardCharsets.UTF_8; +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.assertTrue; public class TestUtils { @@ -235,34 +238,39 @@ public static ServiceBusMessage getServiceBusMessage(byte[] body, String message return message; } - /** - * Given a set of messages, will create a FluxSink that emits them. When there are no more messages to emit, a - * completion signal is emitted. - * - * @param messages Messages to emit. - * - * @return A flux of messages. - */ - public static Flux createMessageSink(ServiceBusReceivedMessage... messages) { - final ConcurrentLinkedDeque queue = new ConcurrentLinkedDeque<>( - Arrays.asList(messages)); - - return Flux.create(emitter -> { - emitter.onRequest(request -> { - if (queue.isEmpty()) { - return; - } - - for (int i = 0; i < request; i++) { - final ServiceBusReceivedMessage message = queue.poll(); - if (message == null) { - emitter.complete(); - return; - } - - emitter.next(message); - } - }); - }, FluxSink.OverflowStrategy.BUFFER); + public static void assertAuthorizationRules(AuthorizationRule expected, AuthorizationRule actual) { + if (expected == null) { + assertNull(actual); + return; + } + + assertNotNull(actual); + assertEquals(expected.getKeyName(), actual.getKeyName()); + assertEquals(expected.getClaimType(), actual.getClaimType()); + assertEquals(expected.getClaimValue(), actual.getClaimValue()); + assertEquals(expected.getPrimaryKey(), actual.getPrimaryKey()); + assertEquals(expected.getSecondaryKey(), actual.getSecondaryKey()); + + final HashSet expectedRights = new HashSet<>(expected.getAccessRights()); + final HashSet actualRights = new HashSet<>(actual.getAccessRights()); + + assertEquals(expectedRights.size(), actualRights.size()); + expectedRights.forEach(right -> assertTrue(actualRights.contains(right))); + } + + public static void assertAuthorizationRules(List expected, List actual) { + if (expected == null) { + assertNull(actual); + return; + } + + assertNotNull(actual); + assertEquals(expected.size(), actual.size()); + for (int i = 0; i < expected.size(); i++) { + final AuthorizationRule expectedItem = expected.get(i); + final AuthorizationRule actualItem = actual.get(i); + + assertAuthorizationRules(expectedItem, actualItem); + } } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java index 9838bc771c85c..0da8fd49ce056 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientIntegrationTest.java @@ -7,21 +7,24 @@ import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpResponse; +import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.test.TestBase; import com.azure.messaging.servicebus.TestUtils; +import com.azure.messaging.servicebus.administration.models.AccessRights; import com.azure.messaging.servicebus.administration.models.CreateQueueOptions; import com.azure.messaging.servicebus.administration.models.CreateSubscriptionOptions; import com.azure.messaging.servicebus.administration.models.CreateTopicOptions; import com.azure.messaging.servicebus.administration.models.EmptyRuleAction; import com.azure.messaging.servicebus.administration.models.NamespaceType; import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; +import com.azure.messaging.servicebus.administration.models.RuleProperties; +import com.azure.messaging.servicebus.administration.models.SharedAccessAuthorizationRule; import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeProperties; import com.azure.messaging.servicebus.administration.models.TopicProperties; import com.azure.messaging.servicebus.administration.models.TopicRuntimeProperties; -import com.azure.messaging.servicebus.administration.models.RuleProperties; import com.azure.messaging.servicebus.administration.models.TrueRuleFilter; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@ -34,8 +37,11 @@ import java.time.Clock; import java.time.Duration; import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; import java.util.stream.Stream; +import static com.azure.messaging.servicebus.TestUtils.assertAuthorizationRules; import static com.azure.messaging.servicebus.TestUtils.getEntityName; import static com.azure.messaging.servicebus.TestUtils.getSessionSubscriptionBaseName; import static com.azure.messaging.servicebus.TestUtils.getSubscriptionBaseName; @@ -63,7 +69,9 @@ static void afterAll() { } static Stream createHttpClients() { - return TestBase.getHttpClients().map(Arguments::of); + return Stream.of( + Arguments.of(new NettyAsyncHttpClientBuilder().build()) + ); } @ParameterizedTest @@ -120,6 +128,55 @@ void createQueueExistingName(HttpClient httpClient) { .verify(); } + @ParameterizedTest + @MethodSource("createHttpClients") + void createQueueAuthorizationRules(HttpClient httpClient) { + // Arrange + final String keyName = "test-rule"; + final List accessRights = Collections.singletonList(AccessRights.SEND); + final ServiceBusAdministrationAsyncClient client = createClient(httpClient); + final String queueName = testResourceNamer.randomName("test", 10); + final SharedAccessAuthorizationRule rule = interceptorManager.isPlaybackMode() + ? new SharedAccessAuthorizationRule(keyName, "Uobo65ke57pwWehaL9JzGXAK30MZgErqVyn5E+rHl1c=", + "B4ENtK9Ze1nVMQ1mGdDsy9TuuQuGC4/K8q7OnPl8mn0=", accessRights) + : new SharedAccessAuthorizationRule(keyName, accessRights); + + final CreateQueueOptions expected = new CreateQueueOptions() + .setMaxSizeInMegabytes(1024) + .setMaxDeliveryCount(7) + .setLockDuration(Duration.ofSeconds(45)) + .setRequiresSession(true) + .setRequiresDuplicateDetection(true) + .setDuplicateDetectionHistoryTimeWindow(Duration.ofMinutes(2)) + .setUserMetadata("some-metadata-for-testing"); + + expected.getAuthorizationRules().add(rule); + + // Act & Assert + StepVerifier.create(client.createQueue(queueName, expected)) + .assertNext(actual -> { + assertEquals(queueName, actual.getName()); + + assertEquals(expected.getLockDuration(), actual.getLockDuration()); + assertEquals(expected.getMaxDeliveryCount(), actual.getMaxDeliveryCount()); + assertEquals(expected.getMaxSizeInMegabytes(), actual.getMaxSizeInMegabytes()); + assertEquals(expected.getUserMetadata(), actual.getUserMetadata()); + + assertEquals(expected.deadLetteringOnMessageExpiration(), actual.isDeadLetteringOnMessageExpiration()); + assertEquals(expected.enablePartitioning(), actual.enablePartitioning()); + assertEquals(expected.requiresDuplicateDetection(), actual.requiresDuplicateDetection()); + assertEquals(expected.requiresSession(), actual.requiresSession()); + + final QueueRuntimeProperties runtimeProperties = new QueueRuntimeProperties(actual); + assertEquals(0, runtimeProperties.getTotalMessageCount()); + assertEquals(0, runtimeProperties.getSizeInBytes()); + assertNotNull(runtimeProperties.getCreatedAt()); + + assertAuthorizationRules(expected.getAuthorizationRules(), actual.getAuthorizationRules()); + }) + .verifyComplete(); + } + @ParameterizedTest @MethodSource("createHttpClients") void createSubscription(HttpClient httpClient) { diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/models/CreateQueueOptionsTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/models/CreateQueueOptionsTest.java index 335615096d21c..12b242757ad93 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/models/CreateQueueOptionsTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/models/CreateQueueOptionsTest.java @@ -4,6 +4,7 @@ package com.azure.messaging.servicebus.administration.models; +import com.azure.messaging.servicebus.TestUtils; import com.azure.messaging.servicebus.implementation.EntityHelper; import com.azure.messaging.servicebus.implementation.models.QueueDescription; import org.junit.jupiter.api.Test; @@ -11,7 +12,6 @@ import java.time.Duration; import java.util.Arrays; import java.util.Collections; -import java.util.List; import static com.azure.messaging.servicebus.implementation.ServiceBusConstants.DEFAULT_DUPLICATE_DETECTION_DURATION; import static com.azure.messaging.servicebus.implementation.ServiceBusConstants.DEFAULT_LOCK_DURATION; @@ -22,9 +22,10 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; class CreateQueueOptionsTest { - /** * Creates an instance with the given defaults. */ @@ -52,12 +53,22 @@ void constructor() { @Test void constructorWithOptions() { // Arrange - final List rules = Arrays.asList( - new AuthorizationRule().setClaimType("a").setClaimValue("b").setKeyName("c").setPrimaryKey("pk") - .setSecondaryKey("sk").setRights(Arrays.asList(AccessRights.LISTEN, AccessRights.MANAGE)), - new AuthorizationRule().setClaimType("a2").setClaimValue("b2").setKeyName("c2").setPrimaryKey("pk2") - .setSecondaryKey("sk2").setRights(Collections.singletonList(AccessRights.LISTEN)) - ); + final AuthorizationRule rule1 = mock(AuthorizationRule.class); + when(rule1.getKeyName()).thenReturn("name1"); + when(rule1.getClaimType()).thenReturn("claimType1"); + when(rule1.getClaimValue()).thenReturn("claimValue1"); + when(rule1.getPrimaryKey()).thenReturn("primaryKey1"); + when(rule1.getSecondaryKey()).thenReturn("secondaryKey1"); + when(rule1.getAccessRights()).thenReturn(Arrays.asList(AccessRights.LISTEN, AccessRights.MANAGE)); + + final AuthorizationRule rule2 = mock(AuthorizationRule.class); + when(rule2.getKeyName()).thenReturn("name2"); + when(rule2.getClaimType()).thenReturn("claimType2"); + when(rule2.getClaimValue()).thenReturn("claimValue2"); + when(rule2.getPrimaryKey()).thenReturn("primaryKey2"); + when(rule2.getSecondaryKey()).thenReturn("secondaryKey2"); + when(rule2.getAccessRights()).thenReturn(Collections.singletonList(AccessRights.SEND)); + final QueueProperties expected = EntityHelper.toModel(new QueueDescription()) .setAutoDeleteOnIdle(Duration.ofSeconds(15)) .setDefaultMessageTimeToLive(Duration.ofSeconds(50)) @@ -73,6 +84,10 @@ void constructorWithOptions() { .setRequiresSession(true) .setUserMetadata("Test-queue-Metadata") .setStatus(EntityStatus.DISABLED); + + expected.getAuthorizationRules().add(rule1); + expected.getAuthorizationRules().add(rule2); + final String queueName = "some-queue"; EntityHelper.setQueueName(expected, queueName); @@ -96,5 +111,7 @@ void constructorWithOptions() { assertEquals(expected.requiresSession(), actual.requiresSession()); assertEquals(expected.getUserMetadata(), actual.getUserMetadata()); assertEquals(expected.getStatus(), actual.getStatus()); + + TestUtils.assertAuthorizationRules(expected.getAuthorizationRules(), actual.getAuthorizationRules()); } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java index 3e75c548727cb..8254de69c8a3c 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementSerializerTest.java @@ -3,6 +3,9 @@ package com.azure.messaging.servicebus.implementation; +import com.azure.messaging.servicebus.TestUtils; +import com.azure.messaging.servicebus.administration.models.AccessRights; +import com.azure.messaging.servicebus.administration.models.AuthorizationRule; import com.azure.messaging.servicebus.administration.models.CreateQueueOptions; import com.azure.messaging.servicebus.administration.models.CreateSubscriptionOptions; import com.azure.messaging.servicebus.administration.models.EntityStatus; @@ -11,7 +14,9 @@ import com.azure.messaging.servicebus.administration.models.NamespaceType; import com.azure.messaging.servicebus.administration.models.QueueProperties; import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; +import com.azure.messaging.servicebus.administration.models.SharedAccessAuthorizationRule; import com.azure.messaging.servicebus.administration.models.SubscriptionRuntimeProperties; +import com.azure.messaging.servicebus.implementation.models.AuthorizationRuleImpl; import com.azure.messaging.servicebus.implementation.models.CorrelationFilterImpl; import com.azure.messaging.servicebus.implementation.models.EmptyRuleActionImpl; import com.azure.messaging.servicebus.implementation.models.FalseFilterImpl; @@ -66,6 +71,48 @@ class ServiceBusManagementSerializerTest { private final ServiceBusManagementSerializer serializer = new ServiceBusManagementSerializer(); + /** + * Verify we can deserialize XML request when creating a queue. + */ + @Test + void deserializeCreateQueueDescription() throws IOException { + // Arrange + final String contents = getContents("CreateQueueEntry.xml"); + final AuthorizationRule rule = new SharedAccessAuthorizationRule("test-name", + "/4jWkzKBFwO0VemXmUYtBnXJ3Me+saF8hQPE5HzJ/hg=", + "NsNSEwj//k4ShF7wHsRHj54HsjnyWvyjmfCd3tfXR2Y=", + Collections.singletonList(AccessRights.SEND)); + final CreateQueueOptions expected = new CreateQueueOptions() + .setAutoDeleteOnIdle(null) + .setDefaultMessageTimeToLive(null) + .setDuplicateDetectionHistoryTimeWindow(null) + .setLockDuration(Duration.ofMinutes(10)) + .setMaxSizeInMegabytes(1028) + .setRequiresDuplicateDetection(false) + .setRequiresSession(true) + .setDeadLetteringOnMessageExpiration(false) + .setMaxDeliveryCount(5) + .setEnableBatchedOperations(true) + .setEnablePartitioning(false); + + expected.getAuthorizationRules().add(rule); + + // Act + final QueueDescriptionEntry entry = serializer.deserialize(contents, QueueDescriptionEntry.class); + + // Assert + assertNotNull(entry); + assertNotNull(entry.getContent()); + + final QueueDescription actual = entry.getContent().getQueueDescription(); + assertQueueEquals(expected, EntityStatus.ACTIVE, actual); + + final List actualRules = actual.getAuthorizationRules().stream() + .map(TestAuthorizationRule::new) + .collect(Collectors.toList()); + TestUtils.assertAuthorizationRules(expected.getAuthorizationRules(), actualRules); + } + /** * Verify we can deserialize XML from a GET queue request. */ @@ -846,4 +893,66 @@ private static LinkedHashMap getResponseTitle(String entityName) map.put("type", "text"); return map; } + + private static class TestAuthorizationRule implements AuthorizationRule { + private final List accessRights; + private final String claimType; + private final String claimValue; + private final String keyName; + private final OffsetDateTime createdAt; + private final OffsetDateTime modifiedAt; + private final String primaryKey; + private final String secondaryKey; + + TestAuthorizationRule(AuthorizationRuleImpl rule) { + this.accessRights = rule.getRights(); + this.claimType = rule.getClaimType(); + this.claimValue = rule.getClaimValue(); + this.createdAt = rule.getCreatedTime(); + this.keyName = rule.getKeyName(); + this.modifiedAt = rule.getModifiedTime(); + this.primaryKey = rule.getPrimaryKey(); + this.secondaryKey = rule.getSecondaryKey(); + } + + @Override + public List getAccessRights() { + return accessRights; + } + + @Override + public String getClaimType() { + return claimType; + } + + @Override + public String getClaimValue() { + return claimValue; + } + + @Override + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @Override + public String getKeyName() { + return keyName; + } + + @Override + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + @Override + public String getPrimaryKey() { + return primaryKey; + } + + @Override + public String getSecondaryKey() { + return secondaryKey; + } + } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/createQueueAuthorizationRules.json b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/createQueueAuthorizationRules.json new file mode 100644 index 0000000000000..522bd1b4827ed --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/session-records/createQueueAuthorizationRules.json @@ -0,0 +1,22 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.servicebus.windows.net/test40289?api-version=2017-04", + "Headers" : { + "User-Agent" : "azsdk-java-azure-messaging-servicebus/7.0.0-beta.6 (11.0.5; Windows 10; 10.0)", + "Content-Type" : "application/atom+xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Strict-Transport-Security" : "max-age=31536000", + "Server" : "Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "Body" : "https://sb-java-conniey-3.servicebus.windows.net/test40289?api-version=2017-04test402892020-09-07T01:33:52Z2020-09-07T01:33:52Zsb-java-conniey-3PT45S1024truetrueP10675199DT2H48M5.477SfalsePT2M7true00falseSharedAccessKeyNoneSendtest-ruleUobo65ke57pwWehaL9JzGXAK30MZgErqVyn5E+rHl1c=B4ENtK9Ze1nVMQ1mGdDsy9TuuQuGC4/K8q7OnPl8mn0=Active2020-09-07T01:33:52.38Z2020-09-07T01:33:52.427Zsome-metadata-for-testingtrueP10675199DT2H48M5.477SfalseAvailablefalse", + "Date" : "Mon, 07 Sep 2020 01:33:51 GMT", + "Content-Type" : "application/atom+xml;type=entry;charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "test40289" ] +} \ No newline at end of file diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/CreateQueueEntry.xml b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/CreateQueueEntry.xml new file mode 100644 index 0000000000000..ff00ce9219c86 --- /dev/null +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/resources/xml/CreateQueueEntry.xml @@ -0,0 +1,27 @@ + + + + PT10M + 1028 + false + true + false + 5 + true + + + SharedAccessKey + None + + Send + + test-name + /4jWkzKBFwO0VemXmUYtBnXJ3Me+saF8hQPE5HzJ/hg= + NsNSEwj//k4ShF7wHsRHj54HsjnyWvyjmfCd3tfXR2Y= + + + Active + false + + + From e96097f20408e0339f7ab0e27daeb5def82585f8 Mon Sep 17 00:00:00 2001 From: Alex Ghiondea Date: Wed, 9 Sep 2020 16:07:12 -0700 Subject: [PATCH 155/168] Update CODEOWNERS (#14991) Update label for AzConfig --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2c45cac5358ae..59b53da109a2f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -16,7 +16,7 @@ #### # Service teams #### -# PRLabel: %AzConfig +# PRLabel: %App Configuration /sdk/appconfiguration/ @mssfang @alzimmermsft /sdk/appconfiguration/spring-cloud-azure-*/ @mrm9084 @saragluna @yiliuTo @chenrujun @zhoufenqin @jialindai From c9b6a2e3bdf36363e3641920a533cfd5588b23bc Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Wed, 9 Sep 2020 16:12:55 -0700 Subject: [PATCH 156/168] Prepare azure-search-documents for September 2020 GA Release (#14988) * Renamed SearchableFieldProperty to SearchableField and SimpleFieldProperty to SimpleField and updated the CHANGELOG and README in preparation for release * Update version for release --- eng/jacoco-test-coverage/pom.xml | 2 +- eng/versioning/version_client.txt | 2 +- .../azure-search-documents/CHANGELOG.md | 38 ++++-- sdk/search/azure-search-documents/README.md | 120 +++++++++--------- sdk/search/azure-search-documents/pom.xml | 2 +- .../implementation/util/FieldBuilder.java | 56 ++++---- .../documents/indexes/SearchableField.java | 93 ++++++++++++++ .../indexes/SearchableFieldProperty.java | 87 ------------- .../search/documents/indexes/SimpleField.java | 55 ++++++++ .../indexes/SimpleFieldProperty.java | 54 -------- .../azure/search/documents/models/Hotel.java | 8 +- .../test/environment/models/Foo.java | 4 +- .../test/environment/models/Hotel.java | 14 +- .../test/environment/models/HotelAddress.java | 14 +- .../models/HotelAnalyzerException.java | 4 +- .../models/HotelRenameProperty.java | 10 +- .../models/HotelSearchException.java | 4 +- .../HotelSearchableExceptionOnList.java | 4 +- .../environment/models/HotelWithArray.java | 8 +- .../models/HotelWithEmptyInSynonymMaps.java | 4 +- sdk/search/azure-search-perf/pom.xml | 2 +- .../com/azure/search/perf/core/Address.java | 12 +- .../com/azure/search/perf/core/Hotel.java | 22 ++-- 23 files changed, 322 insertions(+), 297 deletions(-) create mode 100644 sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchableField.java delete mode 100644 sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchableFieldProperty.java create mode 100644 sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SimpleField.java delete mode 100644 sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SimpleFieldProperty.java diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index fb2f443f5329a..e02fce5ce87f8 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -164,7 +164,7 @@ com.azure azure-search-documents - 11.1.0-beta.2 + 11.1.0 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 3a489cb99306e..7a3b074e5f05b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -35,7 +35,7 @@ com.azure:azure-messaging-eventgrid;2.0.0-beta.1;2.0.0-beta.1 com.azure:azure-messaging-eventhubs;5.1.2;5.2.0-beta.3 com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.1.2;1.2.0-beta.3 com.azure:azure-messaging-servicebus;7.0.0-beta.5;7.0.0-beta.6 -com.azure:azure-search-documents;11.0.0;11.1.0-beta.2 +com.azure:azure-search-documents;11.0.0;11.1.0 com.azure:azure-search-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-security-keyvault-administration;4.0.0-beta.1;4.0.0-beta.1 com.azure:azure-security-keyvault-certificates;4.1.0;4.2.0-beta.1 diff --git a/sdk/search/azure-search-documents/CHANGELOG.md b/sdk/search/azure-search-documents/CHANGELOG.md index ddc366a4c37c8..f5aee93ee1004 100644 --- a/sdk/search/azure-search-documents/CHANGELOG.md +++ b/sdk/search/azure-search-documents/CHANGELOG.md @@ -1,9 +1,23 @@ # Release History -## 11.1.0-beta.2 (Unreleased) +## 11.1.0 (2020-09-09) +### New Features + +- GA release of `buildSearchFields` on `SearchIndexClient` and `SearchIndexAsyncClient`. +- GA release of `JsonSerializer` functionality for `SearchClient` and `SearchAsyncClient`. +- GA release of default `HttpLogOptions` on client builders. + +### Breaking Changes + +- Renamed `SearchableFieldProperty` to `SearchableField` and `SimpleFieldProperty` to `SimpleField`. +- Renamed `FieldBuilderOptions.setConverter` to `FieldBuilderOptions.setJsonSerializer`. - Replaced `ObjectSerializer` setters in builders with `JsonSerializer` to better represent the type requirement. +### Bug Fixes + +- Deprecated getter `OcrSkill.setShouldDetectOrientation()` and replaced with correct Javabeans named `isShouldDetectOrientation()`. + ## 11.1.0-beta.1 (2020-08-12) - Added `buildSearchFields` API to `SearchIndexClient` and `SearchIndexAsyncClient` to aid in creating `SearchField`s from the passed `Class`. @@ -32,6 +46,7 @@ - Removed `implementation` classes from APIs. ## 1.0.0-beta.4 (2020-06-09) + - Split `SearchServiceClient` into two clients `SearchIndexClient`, `SearchIndexerClient`. - Split `SearchServiceAsyncClient` into two clients `SearchIndexAsyncClient`, `SearchIndexerAsyncClient`. - Added `SearchIndexClientBuilder` to build sync client `SearchIndexClient` and async client `SearchIndexAsyncClient`. @@ -39,9 +54,9 @@ - Removed `SearchServiceClientBuilder`. - Renamed `SearchIndexClient` to `SearchClient` and `SearchIndexAsyncClient` to `SearchAsyncClient`. - Put all models used `SearchIndexClient` and `SearchIndexerClient` (same for async clients) under `com.azure.search.documents.indexes`. -- Removed `SearchIndexerDataSource` to `SearchIndexerDataSourceConnection`, +- Removed `SearchIndexerDataSource` to `SearchIndexerDataSourceConnection`. - Renamed methods on `SearchIndexerClient` and `SearchIndexerAsyncClient` idiomatically matching "DataSource" to "DataSourceConnection". -- Removed `DataSourceCredential` and `AzureActiveDirectoryApplicationCredentials`, +- Removed `DataSourceCredential` and `AzureActiveDirectoryApplicationCredentials` and uplifted the properties to `SearchIndexerDataSourceConnection` and `SearchResourceEncryptionKey` respectively. - Removed `select` parameter from list service resource APIs. - Added list names APIs for each search service resource. (e.g. `listSearchIndexNames`, `listSearchIndexerNames`, `listDataSourceNames`, `listSkillsetNames`, `listSynonymMapNames`) @@ -49,24 +64,25 @@ and uplifted the properties to `SearchIndexerDataSourceConnection` and `SearchRe `NGramTokenFilter`, and `PathHierarchyTokenizer`. - Renamed `Similarity` to `SimilarityAlgorithm`. - Renamed `Suggester` to `SearchSuggester`. -- Renamed fields `synonymMaps` to `synonymMapNames`, `analyzer` to `analyzerName`, -`searchAnalyzer` to `searchAnalyzerName` and `indexAnalyzer` to `indexAnalyzerName` +- Renamed fields `synonymMaps` to `synonymMapNames`, `analyzer` to `analyzerName`, +`searchAnalyzer` to `searchAnalyzerName` and `indexAnalyzer` to `indexAnalyzerName` in `SearchField`, `SearchableField`. - Renamed `SimpleField` to `SimpleFieldBuilder`, `SearchableField` to `SearchableFieldBuilder` and `ComplexField` to `ComplexFieldBuilder`. ## 1.0.0-beta.3 (2020-05-05) + - Replaced `isRetrievable` API with `isHidden`, parameter name changed from `retrievable` to `hidden`. -- Changed Azure Search service version from `2019-05-06` to `2019-05-06-Preview` +- Changed Azure Search service version from `2019-05-06` to `2019-05-06-Preview`. - Changed `createOrUpdate` and `delete` APIs in `SearchServiceClient` to use boolean `onlyIfUnchanged` instead of `MatchConditions`. - Updated reactor core to `3.3.5.RELEASE`. -- Added helper class `FieldBuilder` which converts a strongly-typed model class to `List`. +- Added helper class `FieldBuilder` which converts a strongly-typed model class to `List`. - Added annotations `FieldIgnore`, `SimpleFieldProperty`, and `SearchableFieldProperty` to define the `Field` on model properties. - Added fluent class `SimpleField`, `SearchableField`, and `ComplexField` to build `Field`. ## 1.0.0-beta.2 (2020-04-06) -Version 1.0.0-beta.2 is the consecutive beta version of 11.0.0-beta.1. The version is made because we renamed +Version 1.0.0-beta.2 is the consecutive beta version of 11.0.0-beta.1. The version is made because we renamed the search client library module name and namespace. - Renamed the azure-search module to azure-search-documents. @@ -77,15 +93,15 @@ the search client library module name and namespace. - Fixed a bug where the Date header wouldn't be updated with a new value on request retry. - Changed the field type of `CustomAnalyzer`. - Made `RangeFacetResult` and `ValueFacetResult` object strongly typed. -- Added helper function for IndexBatchException. +- Added helper function for IndexBatchException. - Added ScoringParameter class. - Refactored some boolean field getter. - Made `IndexDocumentsBatch` APIs plurality. ## 11.0.0-beta.1 (2020-03-10) -Version 11.0.0-beta.1 is a preview of our efforts in creating a client library that is developer-friendly, idiomatic -to the Java ecosystem, and as consistent across different languages and platforms as possible. The principles that guide +Version 11.0.0-beta.1 is a preview of our efforts in creating a client library that is developer-friendly, idiomatic +to the Java ecosystem, and as consistent across different languages and platforms as possible. The principles that guide our efforts can be found in the [Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java_introduction.html). - Initial release. Please see the README and wiki for information on the new design. diff --git a/sdk/search/azure-search-documents/README.md b/sdk/search/azure-search-documents/README.md index ae77d3aa62c0b..62f9bdd5ca98d 100644 --- a/sdk/search/azure-search-documents/README.md +++ b/sdk/search/azure-search-documents/README.md @@ -1,16 +1,17 @@ # Azure Cognitive Search client library for Java -This is the Java client library for [Azure Cognitive Search](https://docs.microsoft.com/azure/search/). -Azure Cognitive Search service is a search-as-a-service cloud solution that gives developers APIs and tools for adding + +This is the Java client library for [Azure Cognitive Search](https://docs.microsoft.com/azure/search/). +Azure Cognitive Search service is a search-as-a-service cloud solution that gives developers APIs and tools for adding a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications. The Azure Cognitive Search service is well suited for the following application scenarios: -* Consolidate varied content types into a single searchable index. To populate an index, you can push JSON documents +* Consolidate varied content types into a single searchable index. To populate an index, you can push JSON documents that contain your content, or if your data is already in Azure, create an indexer to pull in data automatically. -* Attach skillsets to an indexer to create searchable content from images and large text documents. A skillset leverages -AI from Cognitive Services for built-in OCR, entity recognition, key phrase extraction, language detection, text -translation, and sentiment analysis. You can also add custom skills to integrate external processing of your content +* Attach skillsets to an indexer to create searchable content from images and large text documents. A skillset leverages +AI from Cognitive Services for built-in OCR, entity recognition, key phrase extraction, language detection, text +translation, and sentiment analysis. You can also add custom skills to integrate external processing of your content during data ingestion. * In a search client application, implement query logic and user experiences similar to commercial web search engines. @@ -37,58 +38,59 @@ Use the Azure Cognitive Search client library to: com.azure azure-search-documents - 11.1.0-beta.1 + 11.1.0 ``` [//]: # ({x-version-update-end}) ### Prerequisites -- [Java Development Kit (JDK) with version 8 or above][jdk] -- [Azure subscription][azure_subscription] -- [Azure Cognitive Search service][search] -- To create a new search service, you can use the [Azure portal][create_search_service_docs], +* [Java Development Kit (JDK) with version 8 or above][jdk] +* [Azure subscription][azure_subscription] +* [Azure Cognitive Search service][search] +* To create a new search service, you can use the [Azure portal][create_search_service_docs], [Azure PowerShell][create_search_service_ps], or the [Azure CLI][create_search_service_cli]. Here's an example using the Azure CLI to create a free instance for getting started: -``` +```bash az search service create --name --resource-group --sku free --location westus ``` -- See [choosing a pricing tier](https://docs.microsoft.com/azure/search/search-sku-tier) - for more information about available options. - +See [choosing a pricing tier](https://docs.microsoft.com/azure/search/search-sku-tier) for more information about available options. + ### Authenticate the client -In order to interact with the Azure Cognitive Search service you'll need to create an instance of the Search Client class. -To make this possible you will need, +In order to interact with the Azure Cognitive Search service you'll need to create an instance of the Search Client class. +To make this possible you will need, + 1. [URL endpoint](https://docs.microsoft.com/azure/search/search-create-service-portal#get-a-key-and-url-endpoint) -1. All requests to a search service need an api-key that was generated specifically +1. [API key](https://docs.microsoft.com/azure/search/search-create-service-portal#get-a-key-and-url-endpoint) + for your service. [The api-key is the sole mechanism for authenticating access to your search service endpoint.](https://docs.microsoft.com/azure/search/search-security-api-keys) You can obtain your api-key from the [Azure portal](https://portal.azure.com/) or via the Azure CLI: -``` +```bash az search admin-key show --service-name --resource-group ``` **Note:** -1. The example Azure CLI snippet above retrieves an admin key. This allows for easier access when exploring APIs, + +* The example Azure CLI snippet above retrieves an admin key. This allows for easier access when exploring APIs, but it should be managed carefully. -1. There are two types of keys used to access your search service: **admin** *(read-write)* and **query** *(read-only)* +* There are two types of keys used to access your search service: **admin** *(read-write)* and **query** *(read-only)* keys. Restricting access and operations in client apps is essential to safeguarding the search assets on your service. Always use a query key rather than an admin key for any query originating from a client app. - The SDK provides three clients. -1. `SearchIndexClient` for CRUD operations on indexes and synonym maps. -1. `SearchIndexerClient` for CRUD operations on indexers, date sources, and skillsets. -1. `SearchClient` for all document operations. +* `SearchIndexClient` for CRUD operations on indexes and synonym maps. +* `SearchIndexerClient` for CRUD operations on indexers, date sources, and skillsets. +* `SearchClient` for all document operations. #### Create a SearchIndexClient -To create a `SearchIndexClient/SearchIndexAsyncClient`, you will need the values of the Azure Cognitive Search service +To create a `SearchIndexClient/SearchIndexAsyncClient`, you will need the values of the Azure Cognitive Search service URL endpoint and admin key. @@ -111,7 +113,7 @@ SearchIndexAsyncClient searchIndexAsyncClient = new SearchIndexClientBuilder() #### Create a SearchIndexerClient -To create a `SearchIndexerClient/SearchIndexerAsyncClient`, you will need the values of the Azure Cognitive Search service +To create a `SearchIndexerClient/SearchIndexerAsyncClient`, you will need the values of the Azure Cognitive Search service URL endpoint and admin key. @@ -134,7 +136,7 @@ SearchIndexerAsyncClient searchIndexerAsyncClient = new SearchIndexerClientBuild #### Create a SearchClient -Once you have the values of the Azure Cognitive Search service URL endpoint and +Once you have the values of the Azure Cognitive Search service URL endpoint and admin key, you can create the `SearchClient/SearchAsyncClient` with an existing index name: @@ -159,7 +161,7 @@ SearchAsyncClient searchAsyncClient = new SearchClientBuilder() ### Send your first search query -To get running immediately, we're going to connect to a well-known sandbox Search service provided by Microsoft. This +To get running immediately, we're going to connect to a well-known sandbox Search service provided by Microsoft. This means you do not need an Azure subscription or Azure Cognitive Search service to try out this query. @@ -194,8 +196,8 @@ for (SearchResult searchResult: searchResultsIterable) { ## Key concepts -An Azure Cognitive Search service contains one or more indexes that provide persistent storage of searchable data in -the form of JSON documents. _(If you're new to search, you can make a very rough analogy between indexes and database +An Azure Cognitive Search service contains one or more indexes that provide persistent storage of searchable data in +the form of JSON documents. _(If you're new to search, you can make a very rough analogy between indexes and database tables.)_ The `azure-search-documents` client library exposes operations on these resources through two main client types. * `SearchClient` helps with: @@ -220,6 +222,7 @@ tables.)_ The `azure-search-documents` client library exposes operations on thes * [Define AI powered Skillsets to transform and enrich your data](https://docs.microsoft.com/rest/api/searchservice/skillset-operations) ## Examples + The following examples all use a simple [Hotel data set](https://docs.microsoft.com/samples/azure-samples/azure-search-sample-data/azure-search-sample-data/) that you can [import into your own index from the Azure portal.](https://docs.microsoft.com/azure/search/search-get-started-portal#step-1---start-the-import-data-wizard-and-create-a-data-source) These are just a few of the basics - please [check out our Samples][samples_readme] for much more. @@ -241,7 +244,7 @@ Let's explore them with a search for a "luxury" hotel. #### Use `SearchDocument` like a dictionary for search results -`SearchDocument` is the default type returned from queries when you don't provide your own. Here we perform the search, +`SearchDocument` is the default type returned from queries when you don't provide your own. Here we perform the search, enumerate over the results, and extract data using `SearchDocument`'s dictionary indexer. @@ -307,7 +310,7 @@ The `SearchOptions` provide powerful control over the behavior of our queries. Let's search for the top 5 luxury hotels with a good rating. -```java +```java int stars = 4; SearchOptions options = new SearchOptions() .setFilter(String.format("rating ge %s", stars)) @@ -319,12 +322,12 @@ SearchPagedIterable searchResultsIterable = searchClient.search("luxury", option ### Creating an index -You can use the [`SearchIndexClient`](#Create-a-SearchIndexClient) to create a search index. Indexes can also define +You can use the [`SearchIndexClient`](#Create-a-SearchIndexClient) to create a search index. Indexes can also define suggesters, lexical analyzers, and more. There are multiple ways of preparing search fields for a search index. For basic needs, we provide a static helper method -`buildSearchFields` in `SearchIndexClient` and `SearchIndexAsyncClient`, which can convert Java POJO class into -`List`. There are three annotations `SimpleFieldProperty`, `SearchFieldProperty` and `FieldBuilderIgnore` +`buildSearchFields` in `SearchIndexClient` and `SearchIndexAsyncClient`, which can convert Java POJO class into +`List`. There are three annotations `SimpleFieldProperty`, `SearchFieldProperty` and `FieldBuilderIgnore` to configure the field of model class. @@ -391,12 +394,12 @@ searchIndexClient.createIndex(index); ### Retrieving a specific document from your index -In addition to querying for documents using keywords and optional filters, you can retrieve a specific document from +In addition to querying for documents using keywords and optional filters, you can retrieve a specific document from your index if you already know the key. You could get the key from a query, for example, and want to show more information about it or navigate your customer to that document. -```java +```java Hotel hotel = searchClient.getDocument("1", Hotel.class); System.out.printf("This is hotelId %s, and this is hotel name %s.%n", hotel.getId(), hotel.getName()); ``` @@ -415,14 +418,13 @@ batch.addMergeActions(Collections.singletonList(new Hotel().setId("12").setName( searchClient.indexDocuments(batch); ``` -The request will throw `IndexBatchException` by default if any of the individual actions fail, and you can use -`findFailedActionsToRetry` to retry on failed documents. There's also a `throwOnAnyError` option, and you can set it +The request will throw `IndexBatchException` by default if any of the individual actions fail, and you can use +`findFailedActionsToRetry` to retry on failed documents. There's also a `throwOnAnyError` option, and you can set it to `false` to get a successful response with an `IndexDocumentsResult` for inspection. - ### Async APIs -The examples so far have been using synchronous APIs, but we provide full support for async APIs as well. You'll need +The examples so far have been using synchronous APIs, but we provide full support for async APIs as well. You'll need to use [SearchAsyncClient](#Create-a-SearchClient). @@ -438,13 +440,13 @@ searchAsyncClient.search("luxury") ### General -When you interact with Azure Cognitive Search using this Java client library, errors returned by the service correspond -to the same HTTP status codes returned for [REST API][rest_api] requests. For example, the service will return a `404` +When you interact with Azure Cognitive Search using this Java client library, errors returned by the service correspond +to the same HTTP status codes returned for [REST API][rest_api] requests. For example, the service will return a `404` error if you try to retrieve a document that doesn't exist in your index. ### Handling Search Error Response -Any Search API operation that fails will throw an [`HttpResponseException`][HttpResponseException] with helpful +Any Search API operation that fails will throw an [`HttpResponseException`][HttpResponseException] with helpful [`Status codes`][status_codes]. Many of these errors are recoverable. @@ -460,13 +462,13 @@ try { } ``` -You can also easily [enable console logging][logging] if you want to dig deeper into the requests you're making against +You can also easily [enable console logging][logging] if you want to dig deeper into the requests you're making against the service. ### Enabling Logging -Azure SDKs for Java provide a consistent logging story to help aid in troubleshooting application errors and expedite -their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help +Azure SDKs for Java provide a consistent logging story to help aid in troubleshooting application errors and expedite +their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. ### Default HTTP Client @@ -476,21 +478,21 @@ provides more information on configuring or changing the HTTP client. ## Next steps -- Samples are explained in detail [here][samples_readme]. -- Watch a [demo or deep dive video](https://azure.microsoft.com/resources/videos/index/?services=search) -- Read more about the [Azure Cognitive Search service](https://docs.microsoft.com/azure/search/search-what-is-azure-search) +* Samples are explained in detail [here][samples_readme]. +* Watch a [demo or deep dive video](https://azure.microsoft.com/resources/videos/index/?services=search) +* Read more about the [Azure Cognitive Search service](https://docs.microsoft.com/azure/search/search-what-is-azure-search) ## Contributing -This project welcomes contributions and suggestions. Most contributions require you to agree to a -[Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights +This project welcomes contributions and suggestions. Most contributions require you to agree to a +[Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate -the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate +the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. -This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. @@ -501,9 +503,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [azure_subscription]: https://azure.microsoft.com/free [maven]: https://maven.apache.org/ [package]: https://search.maven.org/artifact/com.azure/azure-search-documents -[samples]: src/samples/java/com/azure/search -[samples_readme]: src/samples/README.md -[source_code]: src +[samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents +[samples_readme]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/search/azure-search-documents/src/samples/README.md +[source_code]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/search/azure-search-documents/src [logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK [cla]: https://cla.microsoft.com [coc]: https://opensource.microsoft.com/codeofconduct/ diff --git a/sdk/search/azure-search-documents/pom.xml b/sdk/search/azure-search-documents/pom.xml index b73b14d1f8221..123f9da4134a7 100644 --- a/sdk/search/azure-search-documents/pom.xml +++ b/sdk/search/azure-search-documents/pom.xml @@ -16,7 +16,7 @@ com.azure azure-search-documents - 11.1.0-beta.2 + 11.1.0 jar diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/util/FieldBuilder.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/util/FieldBuilder.java index ec93b9f112b56..5276492ac9a30 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/util/FieldBuilder.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/util/FieldBuilder.java @@ -8,8 +8,8 @@ import com.azure.core.util.serializer.MemberNameConverterProviders; import com.azure.core.util.serializer.ObjectSerializer; import com.azure.search.documents.indexes.FieldBuilderIgnore; -import com.azure.search.documents.indexes.SearchableFieldProperty; -import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.azure.search.documents.indexes.SearchableField; +import com.azure.search.documents.indexes.SimpleField; import com.azure.search.documents.indexes.models.FieldBuilderOptions; import com.azure.search.documents.indexes.models.LexicalAnalyzerName; import com.azure.search.documents.indexes.models.SearchField; @@ -248,22 +248,22 @@ private static SearchField convertToBasicSearchField(String fieldName, Type type } private static SearchField enrichWithAnnotation(SearchField searchField, Member member) { - SimpleFieldProperty simpleFieldProperty = getDeclaredAnnotation(member, SimpleFieldProperty.class); - SearchableFieldProperty searchableFieldProperty = getDeclaredAnnotation(member, SearchableFieldProperty.class); + SimpleField simpleField = getDeclaredAnnotation(member, SimpleField.class); + SearchableField searchableField = getDeclaredAnnotation(member, SearchableField.class); - if (simpleFieldProperty != null && searchableFieldProperty != null) { + if (simpleField != null && searchableField != null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("@SimpleFieldProperty and @SearchableFieldProperty cannot be present simultaneously " + "for %s", member.getName()))); } - if (simpleFieldProperty != null) { + if (simpleField != null) { searchField.setSearchable(false) - .setSortable(simpleFieldProperty.isSortable()) - .setFilterable(simpleFieldProperty.isFilterable()) - .setFacetable(simpleFieldProperty.isFacetable()) - .setKey(simpleFieldProperty.isKey()) - .setHidden(simpleFieldProperty.isHidden()); - } else if (searchableFieldProperty != null) { + .setSortable(simpleField.isSortable()) + .setFilterable(simpleField.isFilterable()) + .setFacetable(simpleField.isFacetable()) + .setKey(simpleField.isKey()) + .setHidden(simpleField.isHidden()); + } else if (searchableField != null) { if (!searchField.getType().equals(SearchFieldDataType.STRING) && !searchField.getType().equals(SearchFieldDataType.collection(SearchFieldDataType.STRING))) { throw LOGGER.logExceptionAsError(new RuntimeException(String.format("SearchFieldProperty can only" @@ -272,32 +272,32 @@ private static SearchField enrichWithAnnotation(SearchField searchField, Member } searchField.setSearchable(true) - .setSortable(searchableFieldProperty.isSortable()) - .setFilterable(searchableFieldProperty.isFilterable()) - .setFacetable(searchableFieldProperty.isFacetable()) - .setKey(searchableFieldProperty.isKey()) - .setHidden(searchableFieldProperty.isHidden()); - String analyzer = searchableFieldProperty.analyzerName(); - String searchAnalyzer = searchableFieldProperty.searchAnalyzerName(); - String indexAnalyzer = searchableFieldProperty.indexAnalyzerName(); + .setSortable(searchableField.isSortable()) + .setFilterable(searchableField.isFilterable()) + .setFacetable(searchableField.isFacetable()) + .setKey(searchableField.isKey()) + .setHidden(searchableField.isHidden()); + String analyzer = searchableField.analyzerName(); + String searchAnalyzer = searchableField.searchAnalyzerName(); + String indexAnalyzer = searchableField.indexAnalyzerName(); if (!analyzer.isEmpty() && (!searchAnalyzer.isEmpty() || !indexAnalyzer.isEmpty())) { throw LOGGER.logExceptionAsError(new RuntimeException( "Please specify either analyzer or both searchAnalyzer and indexAnalyzer.")); } - if (!searchableFieldProperty.analyzerName().isEmpty()) { + if (!searchableField.analyzerName().isEmpty()) { searchField.setAnalyzerName(LexicalAnalyzerName.fromString( - searchableFieldProperty.analyzerName())); + searchableField.analyzerName())); } - if (!searchableFieldProperty.searchAnalyzerName().isEmpty()) { + if (!searchableField.searchAnalyzerName().isEmpty()) { searchField.setAnalyzerName(LexicalAnalyzerName.fromString( - searchableFieldProperty.searchAnalyzerName())); + searchableField.searchAnalyzerName())); } - if (!searchableFieldProperty.indexAnalyzerName().isEmpty()) { + if (!searchableField.indexAnalyzerName().isEmpty()) { searchField.setAnalyzerName(LexicalAnalyzerName.fromString( - searchableFieldProperty.indexAnalyzerName())); + searchableField.indexAnalyzerName())); } - if (searchableFieldProperty.synonymMapNames().length != 0) { - List synonymMaps = Arrays.stream(searchableFieldProperty.synonymMapNames()) + if (searchableField.synonymMapNames().length != 0) { + List synonymMaps = Arrays.stream(searchableField.synonymMapNames()) .filter(synonym -> !synonym.trim().isEmpty()).collect(Collectors.toList()); searchField.setSynonymMapNames(synonymMaps); } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchableField.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchableField.java new file mode 100644 index 0000000000000..cec17d813d595 --- /dev/null +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchableField.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.documents.indexes; + +import com.azure.search.documents.indexes.models.FieldBuilderOptions; +import com.azure.search.documents.indexes.models.LexicalAnalyzerName; +import com.azure.search.documents.indexes.models.SearchField; +import com.azure.search.documents.indexes.models.SynonymMap; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * An annotation that directs {@link SearchIndexAsyncClient#buildSearchFields(Class, FieldBuilderOptions)} to turn the + * field or method into a searchable {@link SearchField field}. + */ +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface SearchableField { + /** + * Indicates if the field or method should generate as a key {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a key {@link SearchField field}. + */ + boolean isKey() default false; + + /** + * Indicates if the field or method should generate as a hidden {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a hidden {@link SearchField field}. + */ + boolean isHidden() default false; + + /** + * Indicates if the field or method should generate as a facetable {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a facetable {@link SearchField field}. + */ + boolean isFacetable() default false; + + /** + * Indicates if the field or method should generate as a sortable {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a sortable {@link SearchField field}. + */ + boolean isSortable() default false; + + /** + * Indicates if the field or method should generate as a filterable {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a filterable {@link SearchField field}. + */ + boolean isFilterable() default false; + + /** + * A {@link LexicalAnalyzerName} to associate as the search and index analyzer for the {@link SearchField field}. + * + * @return The {@link LexicalAnalyzerName} that will be associated as the search and index analyzer for the {@link + * SearchField field}. + */ + String analyzerName() default ""; + + /** + * A {@link LexicalAnalyzerName} to associate as the search analyzer for the {@link SearchField field}. + * + * @return The {@link LexicalAnalyzerName} that will be associated as the search analyzer for the {@link SearchField + * field}. + */ + String searchAnalyzerName() default ""; + + /** + * A {@link LexicalAnalyzerName} to associate as the index analyzer for the {@link SearchField field}. + * + * @return The {@link LexicalAnalyzerName} that will be associated as the index analyzer for the {@link SearchField + * field}. + */ + String indexAnalyzerName() default ""; + + /** + * A list of {@link SynonymMap} names to be associated with the {@link SearchField field}. + *

    + * Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using + * the rules in the synonym map. The synonym map attribute may be changed on existing fields. + *

    + * Currently, only one synonym map per field is supported. + * + * @return The {@link SynonymMap} names that will be associated with the {@link SearchField field}. + */ + String[] synonymMapNames() default {}; +} diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchableFieldProperty.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchableFieldProperty.java deleted file mode 100644 index 8f37ec1018de9..0000000000000 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchableFieldProperty.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.search.documents.indexes; - -import com.azure.search.documents.indexes.models.LexicalAnalyzerName; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * The annotation is to indicate whether the field is a searchable field. The boolean field of isSearchable - * defaults to true if use the annotation. - */ -@Target({ElementType.FIELD, ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface SearchableFieldProperty { - /** - * Optional arguments defines whether the field is a key field or not. - * - * @return True if it is the key of SearchField, and false by default for non-key field. - */ - boolean isKey() default false; - - /** - * Optional arguments defines whether the field is hidden or not. - * - * @return True if it is not retrievable, and false by default for retrievable field. - */ - boolean isHidden() default false; - - /** - * Optional arguments defines whether the field is facetable or not. - * - * @return True if it is facetable, and false by default for non-facetable field. - */ - boolean isFacetable() default false; - - /** - * Optional arguments defines whether the field is sortable or not. - * - * @return True if it is sortable, and false by default for non-sortable field. - */ - boolean isSortable() default false; - - /** - * Optional arguments defines whether the field is filterable or not. - * - * @return True if it is filterable, and false by default for non-filterable field. - */ - boolean isFilterable() default false; - - /** - * Optional arguments defines the name of the analyzer used for the field. - * - * @return {@link LexicalAnalyzerName} String value. Or default to "null" String type. - */ - String analyzerName() default ""; - - /** - * Optional arguments defines the name of the search analyzer used for the field. - * - * @return {@link LexicalAnalyzerName} String value. Or default to an empty String. - */ - String searchAnalyzerName() default ""; - - /** - * Optional arguments defines the name of the analyzer used for the field. - * - * @return {@link LexicalAnalyzerName} String value. Or default to an empty String. - */ - String indexAnalyzerName() default ""; - - /** - * Optional arguments defines the array of synonymMaps used for the field. - * This option can be used only with searchable fields. Currently only one - * synonym map per field is supported. Assigning a synonym map to a field - * ensures that query terms targeting that field are expanded at query-time - * using the rules in the synonym map. This attribute can be changed on - * existing fields. - * - * @return An array of synonym map values. Or default to empty string array. - */ - String[] synonymMapNames() default {}; -} diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SimpleField.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SimpleField.java new file mode 100644 index 0000000000000..98d4609465747 --- /dev/null +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SimpleField.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.search.documents.indexes; + +import com.azure.search.documents.indexes.models.FieldBuilderOptions; +import com.azure.search.documents.indexes.models.SearchField; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * An annotation that directs {@link SearchIndexAsyncClient#buildSearchFields(Class, FieldBuilderOptions)} to turn the + * field or method into a non-searchable {@link SearchField field}. + */ +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface SimpleField { + /** + * Indicates if the field or method should generate as a key {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a key {@link SearchField field}. + */ + boolean isKey() default false; + + /** + * Indicates if the field or method should generate as a hidden {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a hidden {@link SearchField field}. + */ + boolean isHidden() default false; + + /** + * Indicates if the field or method should generate as a facetable {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a facetable {@link SearchField field}. + */ + boolean isFacetable() default false; + + /** + * Indicates if the field or method should generate as a sortable {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a sortable {@link SearchField field}. + */ + boolean isSortable() default false; + + /** + * Indicates if the field or method should generate as a filterable {@link SearchField field}. + * + * @return A flag indicating if the field or method should generate as a filterable {@link SearchField field}. + */ + boolean isFilterable() default false; +} diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SimpleFieldProperty.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SimpleFieldProperty.java deleted file mode 100644 index f8a9acd34e30e..0000000000000 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SimpleFieldProperty.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.search.documents.indexes; - -import com.azure.search.documents.indexes.models.SearchField; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * The annotation is to indicate whether the field is a simple field. This annotation can only set boolean field of - * {@link SearchField}. {@code isSearchable} will set to {@code false}. - */ -@Target({ElementType.FIELD, ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface SimpleFieldProperty { - /** - * Optional arguments defines whether the field is a key field or not. - * - * @return True if it is the key of SearchField, and false by default for non-key field. - */ - boolean isKey() default false; - - /** - * Optional arguments defines whether the field is hidden or not. - * - * @return True if it is not retrievable, and false by default for retrievable field. - */ - boolean isHidden() default false; - - /** - * Optional arguments defines whether the field is facetable or not. - * - * @return True if it is facetable, and false by default for non-facetable field. - */ - boolean isFacetable() default false; - - /** - * Optional arguments defines whether the field is sortable or not. - * - * @return True if it is sortable, and false by default for non-sortable field. - */ - boolean isSortable() default false; - - /** - * Optional arguments defines whether the field is filterable or not. - * - * @return True if it is filterable, and false by default for non-filterable field. - */ - boolean isFilterable() default false; -} diff --git a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/models/Hotel.java b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/models/Hotel.java index c4769aa7696ac..7aa1133e926cf 100644 --- a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/models/Hotel.java +++ b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/models/Hotel.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.search.documents.models; -import com.azure.search.documents.indexes.SearchableFieldProperty; -import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.azure.search.documents.indexes.SearchableField; +import com.azure.search.documents.indexes.SimpleField; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.ArrayList; @@ -19,7 +19,7 @@ public Hotel() { } @JsonProperty(value = "HotelId") - @SimpleFieldProperty(isKey = true) + @SimpleField(isKey = true) public String getHotelId() { return this.hotelId; } @@ -30,7 +30,7 @@ public Hotel setHotelId(String hotelId) { } @JsonProperty(value = "Tags") - @SearchableFieldProperty(isFilterable = true, analyzerName = "en.lucene") + @SearchableField(isFilterable = true, analyzerName = "en.lucene") public List getTags() { return this.tags; } diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/Foo.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/Foo.java index 076083b370781..a3978236379da 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/Foo.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/Foo.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. package com.azure.search.documents.test.environment.models; -import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.azure.search.documents.indexes.SimpleField; public class Foo { - @SimpleFieldProperty(isKey = true) + @SimpleField(isKey = true) private String intValue; private String stringValue; diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/Hotel.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/Hotel.java index 34ebb04ff2c9c..4f24eef9a1da6 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/Hotel.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/Hotel.java @@ -3,8 +3,8 @@ package com.azure.search.documents.test.environment.models; import com.azure.search.documents.indexes.FieldBuilderIgnore; -import com.azure.search.documents.indexes.SearchableFieldProperty; -import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.azure.search.documents.indexes.SearchableField; +import com.azure.search.documents.indexes.SimpleField; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,15 +14,15 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Hotel { - @SimpleFieldProperty(isKey = true, isSortable = true) + @SimpleField(isKey = true, isSortable = true) @JsonProperty(value = "HotelId") private String hotelId; - @SearchableFieldProperty(isSortable = true, analyzerName = "en.lucene") + @SearchableField(isSortable = true, analyzerName = "en.lucene") @JsonProperty(value = "HotelName") private String hotelName; - @SimpleFieldProperty + @SimpleField @JsonProperty(value = "Description") private String description; @@ -30,11 +30,11 @@ public class Hotel { @JsonProperty(value = "Description_fr") private String descriptionFr; - @SimpleFieldProperty + @SimpleField @JsonProperty(value = "Category") private String category; - @SearchableFieldProperty + @SearchableField @JsonProperty(value = "Tags") private List tags; diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelAddress.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelAddress.java index 15a2874148e7c..9a830067808d2 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelAddress.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelAddress.java @@ -2,28 +2,28 @@ // Licensed under the MIT License. package com.azure.search.documents.test.environment.models; -import com.azure.search.documents.indexes.SearchableFieldProperty; -import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.azure.search.documents.indexes.SearchableField; +import com.azure.search.documents.indexes.SimpleField; import com.fasterxml.jackson.annotation.JsonProperty; public class HotelAddress { - @SimpleFieldProperty(isFacetable = true) + @SimpleField(isFacetable = true) @JsonProperty(value = "StreetAddress") private String streetAddress; - @SearchableFieldProperty(isFilterable = true) + @SearchableField(isFilterable = true) @JsonProperty(value = "City") private String city; - @SearchableFieldProperty + @SearchableField @JsonProperty(value = "StateProvince") private String stateProvince; - @SearchableFieldProperty(synonymMapNames = {"fieldbuilder"}) + @SearchableField(synonymMapNames = {"fieldbuilder"}) @JsonProperty(value = "Country") private String country; - @SimpleFieldProperty + @SimpleField @JsonProperty(value = "PostalCode") private String postalCode; diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelAnalyzerException.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelAnalyzerException.java index 52b6dca0e717a..b80544ad7c15c 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelAnalyzerException.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelAnalyzerException.java @@ -3,7 +3,7 @@ package com.azure.search.documents.test.environment.models; -import com.azure.search.documents.indexes.SearchableFieldProperty; +import com.azure.search.documents.indexes.SearchableField; public class HotelAnalyzerException { private String tag; @@ -13,7 +13,7 @@ public class HotelAnalyzerException { * * @return The tag of hotel. */ - @SearchableFieldProperty(analyzerName = "en.microsoft", indexAnalyzerName = "whitespce") + @SearchableField(analyzerName = "en.microsoft", indexAnalyzerName = "whitespce") public String getTag() { return tag; } diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelRenameProperty.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelRenameProperty.java index cb3e139d29204..bb17db8d1695b 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelRenameProperty.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelRenameProperty.java @@ -3,8 +3,8 @@ package com.azure.search.documents.test.environment.models; -import com.azure.search.documents.indexes.SearchableFieldProperty; -import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.azure.search.documents.indexes.SearchableField; +import com.azure.search.documents.indexes.SimpleField; import com.fasterxml.jackson.annotation.JsonProperty; public class HotelRenameProperty { @@ -12,7 +12,7 @@ public class HotelRenameProperty { private String hotelName; private String description; - @SimpleFieldProperty(isKey = true, isSortable = true) + @SimpleField(isKey = true, isSortable = true) @JsonProperty public String getHotelId() { return this.hotelId; @@ -23,7 +23,7 @@ public HotelRenameProperty setHotelId(String hotelId) { return this; } - @SearchableFieldProperty(isSortable = true, analyzerName = "en.lucene") + @SearchableField(isSortable = true, analyzerName = "en.lucene") @JsonProperty(value = "HotelName") public String getHotelName() { return this.hotelName; @@ -34,7 +34,7 @@ public HotelRenameProperty setHotelName(String hotelName) { return this; } - @SimpleFieldProperty + @SimpleField public String getDescription() { return this.description; } diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelSearchException.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelSearchException.java index 9f845f381af93..19da08dfd9fb7 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelSearchException.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelSearchException.java @@ -3,7 +3,7 @@ package com.azure.search.documents.test.environment.models; -import com.azure.search.documents.indexes.SearchableFieldProperty; +import com.azure.search.documents.indexes.SearchableField; /** * The data object model is to test exception case. @@ -16,7 +16,7 @@ public class HotelSearchException { * * @return Get hotel id */ - @SearchableFieldProperty + @SearchableField public int getHotelId() { return hotelId; } diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelSearchableExceptionOnList.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelSearchableExceptionOnList.java index 9abe73d60463c..fbda29d6519c9 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelSearchableExceptionOnList.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelSearchableExceptionOnList.java @@ -3,7 +3,7 @@ package com.azure.search.documents.test.environment.models; -import com.azure.search.documents.indexes.SearchableFieldProperty; +import com.azure.search.documents.indexes.SearchableField; import java.util.List; @@ -17,7 +17,7 @@ public class HotelSearchableExceptionOnList { * Gets passcode. * @return the passcode of hotel. */ - @SearchableFieldProperty + @SearchableField public List getPasscode() { return passcode; } diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelWithArray.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelWithArray.java index 1287cbcca1a0d..e789a5197fcfa 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelWithArray.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelWithArray.java @@ -4,19 +4,19 @@ package com.azure.search.documents.test.environment.models; import com.azure.core.util.CoreUtils; -import com.azure.search.documents.indexes.SearchableFieldProperty; -import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.azure.search.documents.indexes.SearchableField; +import com.azure.search.documents.indexes.SimpleField; public class HotelWithArray { private String hotelId; private String[] tags; - @SimpleFieldProperty(isKey = true, isSortable = true) + @SimpleField(isKey = true, isSortable = true) public String getHotelId() { return hotelId; } - @SearchableFieldProperty + @SearchableField public String[] getTags() { return CoreUtils.clone(tags); } diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelWithEmptyInSynonymMaps.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelWithEmptyInSynonymMaps.java index 47714d33e1c14..488ba8b806d3e 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelWithEmptyInSynonymMaps.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/test/environment/models/HotelWithEmptyInSynonymMaps.java @@ -3,7 +3,7 @@ package com.azure.search.documents.test.environment.models; -import com.azure.search.documents.indexes.SearchableFieldProperty; +import com.azure.search.documents.indexes.SearchableField; import java.util.List; @@ -18,7 +18,7 @@ public class HotelWithEmptyInSynonymMaps { * * @return The tags of hotel. */ - @SearchableFieldProperty(synonymMapNames = {"asynonymMaps", "", " ", "maps"}) + @SearchableField(synonymMapNames = {"asynonymMaps", "", " ", "maps"}) public List getTags() { return tags; } diff --git a/sdk/search/azure-search-perf/pom.xml b/sdk/search/azure-search-perf/pom.xml index b4977a8f70c98..d7eebbfa19d78 100644 --- a/sdk/search/azure-search-perf/pom.xml +++ b/sdk/search/azure-search-perf/pom.xml @@ -32,7 +32,7 @@ com.azure azure-search-documents - 11.1.0-beta.2 + 11.1.0 diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Address.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Address.java index 2b3f0d696d40d..10150f803f289 100644 --- a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Address.java +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Address.java @@ -3,7 +3,7 @@ package com.azure.search.perf.core; -import com.azure.search.documents.indexes.SearchableFieldProperty; +import com.azure.search.documents.indexes.SearchableField; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -11,22 +11,22 @@ */ public class Address { @JsonProperty("StreetAddress") - @SearchableFieldProperty + @SearchableField public String streetAddress; @JsonProperty("City") - @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + @SearchableField(isFilterable = true, isSortable = true, isFacetable = true) public String city; @JsonProperty("StateProvince") - @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + @SearchableField(isFilterable = true, isSortable = true, isFacetable = true) public String stateProvince; @JsonProperty("PostalCode") - @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + @SearchableField(isFilterable = true, isSortable = true, isFacetable = true) public String postalCode; @JsonProperty("Country") - @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + @SearchableField(isFilterable = true, isSortable = true, isFacetable = true) public String country; } diff --git a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Hotel.java b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Hotel.java index 8250958ce0d14..60e354aa5f2e9 100644 --- a/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Hotel.java +++ b/sdk/search/azure-search-perf/src/main/java/com/azure/search/perf/core/Hotel.java @@ -3,8 +3,8 @@ package com.azure.search.perf.core; -import com.azure.search.documents.indexes.SearchableFieldProperty; -import com.azure.search.documents.indexes.SimpleFieldProperty; +import com.azure.search.documents.indexes.SearchableField; +import com.azure.search.documents.indexes.SimpleField; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -14,39 +14,39 @@ */ public class Hotel { @JsonProperty("HotelId") - @SimpleFieldProperty(isKey = true) + @SimpleField(isKey = true) public String hotelId; @JsonProperty("HotelName") - @SearchableFieldProperty(isSortable = true) + @SearchableField(isSortable = true) public String hotelName; @JsonProperty("Description") - @SearchableFieldProperty(analyzerName = "en.microsoft") + @SearchableField(analyzerName = "en.microsoft") public String description; @JsonProperty("DescriptionFr") - @SearchableFieldProperty(analyzerName = "fr.lucene") + @SearchableField(analyzerName = "fr.lucene") public String descriptionFr; @JsonProperty("Category") - @SearchableFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + @SearchableField(isFilterable = true, isSortable = true, isFacetable = true) public String category; @JsonProperty("Tags") - @SearchableFieldProperty(isFilterable = true, isFacetable = true) + @SearchableField(isFilterable = true, isFacetable = true) public String[] tags; @JsonProperty("ParkingIncluded") - @SimpleFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + @SimpleField(isFilterable = true, isSortable = true, isFacetable = true) public Boolean parkingIncluded; @JsonProperty("LastRenovationDate") - @SimpleFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + @SimpleField(isFilterable = true, isSortable = true, isFacetable = true) public OffsetDateTime lastRenovationDate; @JsonProperty("Rating") - @SimpleFieldProperty(isFilterable = true, isSortable = true, isFacetable = true) + @SimpleField(isFilterable = true, isSortable = true, isFacetable = true) public Double rating; @JsonProperty("Address") From 55f2ab15e49be9297053c5080f8563b96c7dacbc Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Wed, 9 Sep 2020 16:50:17 -0700 Subject: [PATCH 157/168] Scope Which Folders in /eng Trigger Core CI (#14983) * Scope which folders in /eng trigger Core CI * Update ci.yml * Update ci.yml --- sdk/core/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index f742ddbc1412b..afd28604fc32d 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -12,6 +12,9 @@ trigger: - sdk/parents/azure-sdk-parent/ - sdk/parents/azure-client-sdk-parent/ - eng/ + exclude: + - eng/versioning + - eng/jacoco-test-coverage pr: branches: @@ -26,6 +29,9 @@ pr: - sdk/parents/azure-sdk-parent/ - sdk/parents/azure-client-sdk-parent/ - eng/ + exclude: + - eng/versioning + - eng/jacoco-test-coverage extends: From 4e742501a46d4a2d5ab333e954b48fc3302abe92 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Wed, 9 Sep 2020 17:11:23 -0700 Subject: [PATCH 158/168] Feat(e2e): Components tests (#14996) --- .../core/ComponentsAsyncTests.java | 93 ++++++++++ .../digitaltwins/core/ComponentsTestBase.java | 19 ++ .../digitaltwins/core/ComponentsTests.java | 93 ++++++++++ .../core/DigitalTwinsTestBase.java | 10 + .../digitaltwins/core/ModelsAsyncTest.java | 6 - .../azure/digitaltwins/core/ModelsTest.java | 5 - .../componentLifcycleTest.json | 172 ++++++++++++++++++ .../componentLifecycleTest.json | 172 ++++++++++++++++++ ...createModelThrowsIfModelAlreadyExists.json | 28 +-- .../getModelThrowsIfModelDoesNotExist.json | 6 +- .../getModelThrowsIfModelIdInvalid.json | 6 +- .../session-records/modelLifecycleTest.json | 158 ++++++++-------- 12 files changed, 658 insertions(+), 110 deletions(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsAsyncTests.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsTestBase.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsTests.java create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/componentLifcycleTest.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/componentLifecycleTest.json diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsAsyncTests.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsAsyncTests.java new file mode 100644 index 0000000000000..638a43221019d --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsAsyncTests.java @@ -0,0 +1,93 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.HttpClient; +import com.azure.core.util.logging.ClientLogger; +import com.azure.digitaltwins.core.helpers.UniqueIdHelper; +import com.azure.digitaltwins.core.serialization.BasicDigitalTwin; +import com.azure.digitaltwins.core.util.UpdateComponentRequestOptions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.opentest4j.AssertionFailedError; +import reactor.test.StepVerifier; + +import java.net.HttpURLConnection; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; +import static com.azure.digitaltwins.core.TestHelper.DISPLAY_NAME_WITH_ARGUMENTS; + +public class ComponentsAsyncTests extends ComponentsTestBase { + + private final ClientLogger logger = new ClientLogger(ComponentsAsyncTests.class); + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void componentLifecycleTest(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsAsyncClient asyncClient = getAsyncClient(httpClient, serviceVersion); + + String wifiComponentName = "wifiAccessPoint"; + + String roomWithWifiTwinId = UniqueIdHelper.getUniqueDigitalTwinId(TestAssetDefaults.ROOM_WITH_WIFI_TWIN_ID_PREFIX, asyncClient, randomIntegerStringGenerator); + String roomWithWifiModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.ROOM_WITH_WIFI_MODEL_ID_PREFIX, asyncClient, randomIntegerStringGenerator); + String wifiModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.WIFI_MODEL_ID_PREFIX, asyncClient, randomIntegerStringGenerator); + + String modelWifi = TestAssetsHelper.getWifiModelPayload(wifiModelId); + String modelRoomWithWifi = TestAssetsHelper.getRoomWithWifiModelPayload(roomWithWifiModelId, wifiModelId, wifiComponentName); + String roomWithWifiTwin = TestAssetsHelper.getRoomWithWifiTwinPayload(roomWithWifiModelId, wifiComponentName); + List modelsList = new ArrayList<>(Arrays.asList(modelWifi, modelRoomWithWifi)); + + try { + // Create models and components to test the lifecycle. + StepVerifier + .create(asyncClient.createModels(modelsList)) + .assertNext(createResponseList -> logger.info("Created {} models successfully", createResponseList.size())) + .verifyComplete(); + + StepVerifier.create(asyncClient.createDigitalTwin(roomWithWifiTwinId, roomWithWifiTwin, BasicDigitalTwin.class)) + .assertNext(createdTwin -> { + assertEquals(createdTwin.getId(), roomWithWifiTwinId); + logger.info("Created {} twin successfully", createdTwin.getId()); + }) + .verifyComplete(); + + StepVerifier.create(asyncClient.getComponentWithResponse(roomWithWifiTwinId, wifiComponentName)) + .assertNext(createResponse -> { + assertEquals(createResponse.getStatusCode(), HttpURLConnection.HTTP_OK); + logger.info("Got component successfully"); + + }) + .verifyComplete(); + + StepVerifier.create(asyncClient.updateComponentWithResponse(roomWithWifiTwinId, wifiComponentName, TestAssetsHelper.getWifiComponentUpdatePayload(), new UpdateComponentRequestOptions())) + .assertNext(updateResponse -> { + assertEquals(updateResponse.getStatusCode(), HttpURLConnection.HTTP_NO_CONTENT); + logger.info("Updated component successfully"); + }) + .verifyComplete(); + } + finally { + try + { + if (roomWithWifiTwinId != null) + { + asyncClient.deleteDigitalTwin(roomWithWifiTwinId).block(); + } + if (roomWithWifiModelId != null) + { + asyncClient.deleteModel(roomWithWifiModelId).block(); + } + if (wifiModelId != null) + { + asyncClient.deleteModel(wifiModelId).block(); + } + } + catch (Exception ex) + { + throw new AssertionFailedError("Test celanup failed", ex); + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsTestBase.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsTestBase.java new file mode 100644 index 0000000000000..6db061a54c7b3 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsTestBase.java @@ -0,0 +1,19 @@ +package com.azure.digitaltwins.core; + +import org.junit.jupiter.api.Test; + +import com.azure.core.http.HttpClient; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.function.Consumer; + +/** + * This abstract test class defines all the tests that both the sync and async component test classes need to implement. + * It also houses some component test specific helper functions. + */ +public abstract class ComponentsTestBase extends DigitalTwinsTestBase { + @Test + public abstract void componentLifecycleTest(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion); +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsTests.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsTests.java new file mode 100644 index 0000000000000..0571fb46958a3 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ComponentsTests.java @@ -0,0 +1,93 @@ +package com.azure.digitaltwins.core; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.http.HttpClient; +import com.azure.digitaltwins.core.helpers.UniqueIdHelper; +import com.azure.digitaltwins.core.models.ModelData; +import com.azure.digitaltwins.core.serialization.BasicDigitalTwin; +import com.azure.digitaltwins.core.util.DigitalTwinsResponse; +import com.azure.digitaltwins.core.util.UpdateComponentRequestOptions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.opentest4j.AssertionFailedError; + +import java.net.HttpURLConnection; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static com.azure.digitaltwins.core.TestHelper.DISPLAY_NAME_WITH_ARGUMENTS; +import static org.junit.jupiter.api.Assertions.*; + +public class ComponentsTests extends ComponentsTestBase { + + private final ClientLogger logger = new ClientLogger(ComponentsTests.class); + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.digitaltwins.core.TestHelper#getTestParameters") + @Override + public void componentLifecycleTest(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + DigitalTwinsClient client = getClient(httpClient, serviceVersion); + + String wifiComponentName = "wifiAccessPoint"; + + String roomWithWifiTwinId = UniqueIdHelper.getUniqueDigitalTwinId(TestAssetDefaults.ROOM_WITH_WIFI_TWIN_ID_PREFIX, client, randomIntegerStringGenerator); + String roomWithWifiModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.ROOM_WITH_WIFI_MODEL_ID_PREFIX, client, randomIntegerStringGenerator); + String wifiModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.WIFI_MODEL_ID_PREFIX, client, randomIntegerStringGenerator); + + String modelWifi = TestAssetsHelper.getWifiModelPayload(wifiModelId); + String modelRoomWithWifi = TestAssetsHelper.getRoomWithWifiModelPayload(roomWithWifiModelId, wifiModelId, wifiComponentName); + String roomWithWifiTwin = TestAssetsHelper.getRoomWithWifiTwinPayload(roomWithWifiModelId, wifiComponentName); + + List modelsList = new ArrayList<>(Arrays.asList(modelWifi, modelRoomWithWifi)); + + try { + // Create models and components to test the lifecycle. + List createdList = client.createModels(modelsList); + logger.info("Created {} models successfully", createdList.size()); + + BasicDigitalTwin createdTwin = client.createDigitalTwin(roomWithWifiTwinId, roomWithWifiTwin,BasicDigitalTwin.class); + + logger.info("Created {} twin successfully", createdTwin.getId()); + assertEquals(createdTwin.getId(), roomWithWifiTwinId); + + // Get the component + Response getComponentResponse = client.getComponentWithResponse(roomWithWifiTwinId, wifiComponentName, Context.NONE); + assertEquals(getComponentResponse.getStatusCode(), HttpURLConnection.HTTP_OK); + + // Update component + DigitalTwinsResponse updateComponentResponse = client.updateComponentWithResponse( + roomWithWifiTwinId, + wifiComponentName, + TestAssetsHelper.getWifiComponentUpdatePayload(), + new UpdateComponentRequestOptions(), + Context.NONE); + + assertEquals(updateComponentResponse.getStatusCode(), HttpURLConnection.HTTP_NO_CONTENT); + } + // clean up + finally { + try + { + if (roomWithWifiTwinId != null) + { + client.deleteDigitalTwin(roomWithWifiTwinId); + } + if (roomWithWifiModelId != null) + { + client.deleteModel(roomWithWifiModelId); + } + if (wifiModelId != null) + { + client.deleteModel(wifiModelId); + } + } + catch (Exception ex) + { + throw new AssertionFailedError("Test celanup failed", ex); + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java index e4b70ea1fe923..c2fa66360b045 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/DigitalTwinsTestBase.java @@ -72,6 +72,16 @@ protected DigitalTwinsClientBuilder getDigitalTwinsClientBuilder(HttpClient http return builder; } + protected DigitalTwinsClient getClient(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + return getDigitalTwinsClientBuilder(httpClient, serviceVersion) + .buildClient(); + } + + protected DigitalTwinsAsyncClient getAsyncClient(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { + return getDigitalTwinsClientBuilder(httpClient, serviceVersion) + .buildAsyncClient(); + } + /** * This function generates a random string of integers for use when creating models with a random version. It takes * a maxLength parameter that determines how long of a string of integers will be produced. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsAsyncTest.java b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsAsyncTest.java index bcba730b9c742..1d28074d96f7d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsAsyncTest.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/java/com/azure/digitaltwins/core/ModelsAsyncTest.java @@ -7,7 +7,6 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import reactor.test.StepVerifier; - import java.net.HttpURLConnection; import java.util.ArrayList; import java.util.List; @@ -129,9 +128,4 @@ private void createModelsRunner(DigitalTwinsAsyncClient asyncClient, Consumer

  • createModelsRunner(buildingModelId, floorModelId, hvacModelId, wardModelId, createModelsTestRunner); } - - private DigitalTwinsClient getClient(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { - return getDigitalTwinsClientBuilder(httpClient, serviceVersion) - .buildClient(); - } } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/componentLifcycleTest.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/componentLifcycleTest.json new file mode 100644 index 0000000000000..1944809b3d32e --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/componentLifcycleTest.json @@ -0,0 +1,172 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin331110?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fda5f7a8-cb69-4627-8355-52825377ee46" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "275", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"DigitalTwinNotFound\",\"message\":\"There is no digital twin instance that exists with the ID roomWithWifiTwin331110. Please verify that the twin id is valid and ensure that the twin is not deleted. See section on querying the twins http://aka.ms/adtv2query.\"}}", + "Date" : "Wed, 09 Sep 2020 22:40:17 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:wifiroom;1037585?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "798b4fdd-d77e-477a-9616-f406b59d8c38" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "214", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:wifiroom;1037585. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:40:17 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:wifi;1114222?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8bf827f-1621-46c8-ad5a-d9020d0a7ad3" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "210", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:wifi;1114222. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:40:17 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52bc6fd2-db02-4e32-8b6c-a7dffd8a2e27", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "317", + "StatusCode" : "201", + "Body" : "[{\"id\":\"dtmi:example:wifi;1114222\",\"description\":{},\"displayName\":{\"en\":\"Wifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:40:19.1310492+00:00\"},{\"id\":\"dtmi:example:wifiroom;1037585\",\"description\":{},\"displayName\":{\"en\":\"RoomWithWifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:40:19.1311549+00:00\"}]", + "Date" : "Wed, 09 Sep 2020 22:40:19 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin331110?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8eb53df8-a1f7-4cb9-91a9-1ec22ab451a7", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "ETag" : "W/\"b6f5d122-a950-4a9c-8245-7b1a320516b9\"", + "retry-after" : "0", + "Content-Length" : "968", + "StatusCode" : "200", + "Body" : "{\"$dtId\":\"roomWithWifiTwin331110\",\"$etag\":\"W/\\\"b6f5d122-a950-4a9c-8245-7b1a320516b9\\\"\",\"Temperature\":80,\"Humidity\":25,\"IsOccupied\":true,\"EmployeeId\":\"Employee1\",\"wifiAccessPoint\":{\"RouterName\":\"Cisco1\",\"Network\":\"Room1\",\"$metadata\":{\"RouterName\":{\"desiredValue\":\"Cisco1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"Network\":{\"desiredValue\":\"Room1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"}}},\"$metadata\":{\"$model\":\"dtmi:example:wifiroom;1037585\",\"Temperature\":{\"desiredValue\":80,\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"Humidity\":{\"desiredValue\":25,\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"IsOccupied\":{\"desiredValue\":true,\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"EmployeeId\":{\"desiredValue\":\"Employee1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"}}}", + "Date" : "Wed, 09 Sep 2020 22:40:19 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin331110/components/wifiAccessPoint?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9582e667-2fe2-403a-bab2-6cb650e65ee0" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "ETag" : "W/\"b6f5d122-a950-4a9c-8245-7b1a320516b9\"", + "retry-after" : "0", + "Content-Length" : "283", + "StatusCode" : "200", + "Body" : "{\"RouterName\":\"Cisco1\",\"Network\":\"Room1\",\"$metadata\":{\"RouterName\":{\"desiredValue\":\"Cisco1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"Network\":{\"desiredValue\":\"Room1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"}}}", + "Date" : "Wed, 09 Sep 2020 22:40:19 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin331110/components/wifiAccessPoint?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd1c51ae-9768-49ec-a00a-c1fb607e5ab0", + "Content-Type" : "application/json-patch+json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "ETag" : "W/\"b362e3d7-5a30-4b83-8132-56f79d81b13c\"", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 22:40:19 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin331110?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "434a8e17-b2ca-4e42-9cab-5895d623d275" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 22:40:19 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:wifiroom;1037585?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c6544e8-ed93-4018-b3c3-94e9288daacf" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 22:40:19 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:wifi;1114222?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0a4c44d-aaa5-4b6a-a45a-d8a1f758320b" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 22:40:19 GMT" + }, + "Exception" : null + } ], + "variables" : [ "553332", "259707", "33644f" ] +} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/componentLifecycleTest.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/componentLifecycleTest.json new file mode 100644 index 0000000000000..9258be51b44eb --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/componentLifecycleTest.json @@ -0,0 +1,172 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin654432?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "9897fc14-06eb-41a6-8c19-e9b752fd9936" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "275", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"DigitalTwinNotFound\",\"message\":\"There is no digital twin instance that exists with the ID roomWithWifiTwin654432. Please verify that the twin id is valid and ensure that the twin is not deleted. See section on querying the twins http://aka.ms/adtv2query.\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:23 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:wifiroom;1962337?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ea9ad48-0e22-4b42-8975-f8ec8aecd55d" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "214", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:wifiroom;1962337. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:23 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:wifi;1167250?includeModelDefinition=true&api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "14319c3d-7f2a-4182-a67e-5ec742095a88" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "210", + "StatusCode" : "404", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:wifi;1167250. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:23 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "992ca901-bdc8-451c-8785-b27a77f42688", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "316", + "StatusCode" : "201", + "Body" : "[{\"id\":\"dtmi:example:wifi;1167250\",\"description\":{},\"displayName\":{\"en\":\"Wifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:24.1735726+00:00\"},{\"id\":\"dtmi:example:wifiroom;1962337\",\"description\":{},\"displayName\":{\"en\":\"RoomWithWifi\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:24.173675+00:00\"}]", + "Date" : "Wed, 09 Sep 2020 22:46:24 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin654432?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1478a39-8ec5-4bf7-b627-d78593e7abf1", + "Content-Type" : "application/json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "ETag" : "W/\"e15b30f0-91a9-47d4-b626-8ecf0513e69e\"", + "retry-after" : "0", + "Content-Length" : "968", + "StatusCode" : "200", + "Body" : "{\"$dtId\":\"roomWithWifiTwin654432\",\"$etag\":\"W/\\\"e15b30f0-91a9-47d4-b626-8ecf0513e69e\\\"\",\"Temperature\":80,\"Humidity\":25,\"IsOccupied\":true,\"EmployeeId\":\"Employee1\",\"wifiAccessPoint\":{\"RouterName\":\"Cisco1\",\"Network\":\"Room1\",\"$metadata\":{\"RouterName\":{\"desiredValue\":\"Cisco1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"Network\":{\"desiredValue\":\"Room1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"}}},\"$metadata\":{\"$model\":\"dtmi:example:wifiroom;1962337\",\"Temperature\":{\"desiredValue\":80,\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"Humidity\":{\"desiredValue\":25,\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"IsOccupied\":{\"desiredValue\":true,\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"EmployeeId\":{\"desiredValue\":\"Employee1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"}}}", + "Date" : "Wed, 09 Sep 2020 22:46:24 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin654432/components/wifiAccessPoint?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2219b47-8820-4d8a-91a0-506adc43bbcf" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "ETag" : "W/\"e15b30f0-91a9-47d4-b626-8ecf0513e69e\"", + "retry-after" : "0", + "Content-Length" : "283", + "StatusCode" : "200", + "Body" : "{\"RouterName\":\"Cisco1\",\"Network\":\"Room1\",\"$metadata\":{\"RouterName\":{\"desiredValue\":\"Cisco1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"},\"Network\":{\"desiredValue\":\"Room1\",\"desiredVersion\":1,\"ackVersion\":1,\"ackCode\":200,\"ackDescription\":\"Auto-Sync\"}}}", + "Date" : "Wed, 09 Sep 2020 22:46:24 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin654432/components/wifiAccessPoint?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "d0523def-4d1c-4dab-a9cd-c8a5f20549f6", + "Content-Type" : "application/json-patch+json" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "ETag" : "W/\"05820bb1-8fac-4b23-a298-d6cbb35f416d\"", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 22:46:24 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/digitaltwins/roomWithWifiTwin654432?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "84e94b49-f8d8-4178-ba76-89076de46717" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 22:46:24 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:wifiroom;1962337?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "f84194ff-722a-421d-85d6-8930ac508f56" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 22:46:24 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:wifi;1167250?api-version=2020-05-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "bce61120-d0b3-44ee-8055-8b38602934fe" + }, + "Response" : { + "Strict-Transport-Security" : "max-age=2592000", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "Date" : "Wed, 09 Sep 2020 22:46:24 GMT" + }, + "Exception" : null + } ], + "variables" : [ "87665f", "18455a", "38947d" ] +} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/createModelThrowsIfModelAlreadyExists.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/createModelThrowsIfModelAlreadyExists.json index 94bbae2323470..e2fa568e6e5cc 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/createModelThrowsIfModelAlreadyExists.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/createModelThrowsIfModelAlreadyExists.json @@ -1,18 +1,18 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1840022?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1000939?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "0f2a0720-db02-450b-ae91-944055ee2c14" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9c9cceb-656a-450a-bb39-50ee55181e0c" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "210", "StatusCode" : "404", - "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Ward;1840022. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Ward;1000939. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null @@ -20,8 +20,8 @@ "Method" : "POST", "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "c5c9c8de-19b0-4d1b-8636-09859061ef25", + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "8bd69e4f-ff44-408a-9769-3ba71cf16e77", "Content-Type" : "application/json" }, "Response" : { @@ -29,8 +29,8 @@ "retry-after" : "0", "Content-Length" : "213", "StatusCode" : "201", - "Body" : "[{\"id\":\"dtmi:example:Ward;1840022\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:59.3097627+00:00\"}]", - "Date" : "Wed, 09 Sep 2020 19:12:59 GMT", + "Body" : "[{\"id\":\"dtmi:example:Ward;1000939\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:29.9501501+00:00\"}]", + "Date" : "Wed, 09 Sep 2020 22:46:29 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null @@ -38,8 +38,8 @@ "Method" : "POST", "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "4d600240-eefd-48a2-81fd-2aaecb1de86f", + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "edec8538-52af-4985-919f-8d30421731ae", "Content-Type" : "application/json" }, "Response" : { @@ -47,11 +47,11 @@ "retry-after" : "0", "Content-Length" : "222", "StatusCode" : "409", - "Body" : "{\"error\":{\"code\":\"ModelAlreadyExists\",\"message\":\"Model with same ID already exists dtmi:example:Ward;1840022. Use Model_List API to view models that already exist. See the Swagger example.(http://aka.ms/ModelListSwSmpl)\"}}", - "Date" : "Wed, 09 Sep 2020 19:12:59 GMT", + "Body" : "{\"error\":{\"code\":\"ModelAlreadyExists\",\"message\":\"Model with same ID already exists dtmi:example:Ward;1000939. Use Model_List API to view models that already exist. See the Swagger example.(http://aka.ms/ModelListSwSmpl)\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:29 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null } ], - "variables" : [ "06224f" ] + "variables" : [ "22215c" ] } \ No newline at end of file diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelDoesNotExist.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelDoesNotExist.json index 4eac6ca631361..58790dbf03911 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelDoesNotExist.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelDoesNotExist.json @@ -3,8 +3,8 @@ "Method" : "GET", "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/urn:doesnotexist:fakemodel:1000?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "21c0d44e-fcad-4040-8720-fb336bcb8509" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "592b2242-2b34-4572-af60-a64fc8603fbf" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", @@ -12,7 +12,7 @@ "Content-Length" : "216", "StatusCode" : "404", "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) urn:doesnotexist:fakemodel:1000. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelIdInvalid.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelIdInvalid.json index a0e39e4e889d9..4db7611da28ff 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelIdInvalid.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/getModelThrowsIfModelIdInvalid.json @@ -3,8 +3,8 @@ "Method" : "GET", "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/thisIsNotAValidModelId?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "c1e49002-33a0-4846-99df-a6ff324a906c" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "0229ab25-69eb-4ebb-a2fd-ee6ed928868d" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", @@ -12,7 +12,7 @@ "Content-Length" : "198", "StatusCode" : "400", "Body" : "{\"error\":{\"code\":\"InvalidArgument\",\"message\":\"The format of the Model ID thisIsNotAValidModelId provided is not supported. See model documentation(http://aka.ms/ADTv2Models) for supported format.\"}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/modelLifecycleTest.json b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/modelLifecycleTest.json index 9bb4c0c26d8b1..356c477c4b5ad 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/modelLifecycleTest.json +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/test/resources/session-records/modelLifecycleTest.json @@ -1,69 +1,69 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1801882?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "3e55febc-1b85-4d4d-8a37-72edf7c6fa75" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "aef6306a-0cdb-4e2e-840a-6af6bdb76142" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "214", "StatusCode" : "404", - "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Building;1700523. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", - "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Building;1801882. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:26 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Floor;1183981?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Floor;1978519?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "d70c6aac-8d26-4e8e-be5d-502503cddbcf" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6fb6200-551c-4a97-8eeb-d7b8d5675dde" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "211", "StatusCode" : "404", - "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Floor;1183981. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", - "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Floor;1978519. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1292489?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "56230e32-ca5f-4584-a9df-cb2f8ef20680" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4980173-7370-4240-8c3e-7061b6381c23" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "210", "StatusCode" : "404", - "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Hvac;1898112. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", - "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Hvac;1292489. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1194200?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "8852effd-b57e-44f6-b5d5-be86b0344a23" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a95baa5-4cfc-4ec8-b8ef-5519d935fe91" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "210", "StatusCode" : "404", - "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Ward;1172526. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", - "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Body" : "{\"error\":{\"code\":\"ModelNotFound\",\"message\":\"There is no Model(s) available that matches the provided id(s) dtmi:example:Ward;1194200. Check that the Model ID provided is valid by doing a Model_List API call.\"}}", + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null @@ -71,8 +71,8 @@ "Method" : "POST", "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "dd41e595-13f1-48f6-a183-a4feb434d273", + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "c31baba2-9ffb-4a12-a4de-14c6abba205c", "Content-Type" : "application/json" }, "Response" : { @@ -80,34 +80,34 @@ "retry-after" : "0", "Content-Length" : "607", "StatusCode" : "201", - "Body" : "[{\"id\":\"dtmi:example:Building;1700523\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7975266+00:00\"},{\"id\":\"dtmi:example:Hvac;1898112\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7976454+00:00\"},{\"id\":\"dtmi:example:Ward;1172526\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7977533+00:00\"}]", - "Date" : "Wed, 09 Sep 2020 19:12:56 GMT", + "Body" : "[{\"id\":\"dtmi:example:Building;1801882\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:28.5241684+00:00\"},{\"id\":\"dtmi:example:Hvac;1292489\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:28.5242822+00:00\"},{\"id\":\"dtmi:example:Ward;1194200\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:28.5243751+00:00\"}]", + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1801882?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "db87f565-3f6e-498f-a519-b9a9502cec35" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b48136b-4f0f-450b-89aa-50f403adc12f" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "601", "StatusCode" : "200", - "Body" : "{\"id\":\"dtmi:example:Building;1700523\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7975266+00:00\",\"model\":{\"@id\":\"dtmi:example:Building;1700523\",\"@type\":\"Interface\",\"displayName\":\"Building\",\"description\":\"Afree-standingstructure.\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"has\",\"target\":\"dtmi:example:Floor;1183981\"},{\"@type\":\"Relationship\",\"name\":\"isEquippedWith\",\"target\":\"dtmi:example:Hvac;1898112\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Body" : "{\"id\":\"dtmi:example:Building;1801882\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:28.5241684+00:00\",\"model\":{\"@id\":\"dtmi:example:Building;1801882\",\"@type\":\"Interface\",\"displayName\":\"Building\",\"description\":\"Afree-standingstructure.\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"has\",\"target\":\"dtmi:example:Floor;1978519\"},{\"@type\":\"Relationship\",\"name\":\"isEquippedWith\",\"target\":\"dtmi:example:Hvac;1292489\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1801882?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "0ef6769f-dd0f-4748-8699-61a61f9cf48a", + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b9f3bff-71c4-41f5-b2e9-3d7218180c0a", "Content-Type" : "application/json-patch+json" }, "Response" : { @@ -115,64 +115,64 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1801882?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "de393573-eea7-463a-9af0-dbd4a85b70d6" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "87b550ab-82b1-4fb0-a2e4-3eb03ecfea81" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "600", "StatusCode" : "200", - "Body" : "{\"id\":\"dtmi:example:Building;1700523\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T19:12:57.7975266+00:00\",\"model\":{\"@id\":\"dtmi:example:Building;1700523\",\"@type\":\"Interface\",\"displayName\":\"Building\",\"description\":\"Afree-standingstructure.\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"has\",\"target\":\"dtmi:example:Floor;1183981\"},{\"@type\":\"Relationship\",\"name\":\"isEquippedWith\",\"target\":\"dtmi:example:Hvac;1898112\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Body" : "{\"id\":\"dtmi:example:Building;1801882\",\"description\":{\"en\":\"Afree-standingstructure.\"},\"displayName\":{\"en\":\"Building\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T22:46:28.5241684+00:00\",\"model\":{\"@id\":\"dtmi:example:Building;1801882\",\"@type\":\"Interface\",\"displayName\":\"Building\",\"description\":\"Afree-standingstructure.\",\"contents\":[{\"@type\":\"Relationship\",\"name\":\"has\",\"target\":\"dtmi:example:Floor;1978519\"},{\"@type\":\"Relationship\",\"name\":\"isEquippedWith\",\"target\":\"dtmi:example:Hvac;1292489\"},{\"@type\":\"Property\",\"name\":\"AverageTemperature\",\"schema\":\"double\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1700523?api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Building;1801882?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "f45d9aae-762b-48ef-8944-37f890071140" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "caddb130-04d0-41a4-ba92-2b4697b555ec" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1292489?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "36cd5357-f608-450c-b765-e891af3ec165" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "a2784265-ae05-4ef3-8074-0ccc265c7548" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "662", "StatusCode" : "200", - "Body" : "{\"id\":\"dtmi:example:Hvac;1898112\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7976454+00:00\",\"model\":{\"@id\":\"dtmi:example:Hvac;1898112\",\"@type\":\"Interface\",\"displayName\":\"HVAC\",\"description\":\"Aheating,ventilation,andairconditioningunit.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Efficiency\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetHumidity\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"cools\",\"target\":\"dtmi:example:Floor;1183981\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Body" : "{\"id\":\"dtmi:example:Hvac;1292489\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:28.5242822+00:00\",\"model\":{\"@id\":\"dtmi:example:Hvac;1292489\",\"@type\":\"Interface\",\"displayName\":\"HVAC\",\"description\":\"Aheating,ventilation,andairconditioningunit.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Efficiency\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetHumidity\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"cools\",\"target\":\"dtmi:example:Floor;1978519\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 22:46:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1292489?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "501f4c6b-2aab-4e6a-8c83-3419eba91799", + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "0e8bb919-492b-4022-a1aa-75f6540dac3d", "Content-Type" : "application/json-patch+json" }, "Response" : { @@ -180,64 +180,64 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1292489?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "e141529f-7363-4ed6-b974-5dfb795c49f8" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee855364-b4c1-48f4-a5ae-5fb0fb11413d" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "661", "StatusCode" : "200", - "Body" : "{\"id\":\"dtmi:example:Hvac;1898112\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T19:12:57.7976454+00:00\",\"model\":{\"@id\":\"dtmi:example:Hvac;1898112\",\"@type\":\"Interface\",\"displayName\":\"HVAC\",\"description\":\"Aheating,ventilation,andairconditioningunit.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Efficiency\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetHumidity\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"cools\",\"target\":\"dtmi:example:Floor;1183981\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Body" : "{\"id\":\"dtmi:example:Hvac;1292489\",\"description\":{\"en\":\"Aheating,ventilation,andairconditioningunit.\"},\"displayName\":{\"en\":\"HVAC\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T22:46:28.5242822+00:00\",\"model\":{\"@id\":\"dtmi:example:Hvac;1292489\",\"@type\":\"Interface\",\"displayName\":\"HVAC\",\"description\":\"Aheating,ventilation,andairconditioningunit.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"Efficiency\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetTemperature\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"TargetHumidity\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"cools\",\"target\":\"dtmi:example:Floor;1978519\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1898112?api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Hvac;1292489?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "b21f862d-ecd5-405b-adee-33e6559597d2" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "f17ad2a3-7d6f-4745-b98c-83eb7fd19381" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1194200?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "5670f3d3-88a6-4f52-8148-277e43279acb" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "601a972c-069b-4420-a438-411f87274007" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "589", "StatusCode" : "200", - "Body" : "{\"id\":\"dtmi:example:Ward;1172526\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T19:12:57.7977533+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;1172526\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Body" : "{\"id\":\"dtmi:example:Ward;1194200\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":false,\"uploadTime\":\"2020-09-09T22:46:28.5243751+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;1194200\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1194200?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "bf339b27-1f66-4299-b654-5645718b2cd7", + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "367d4a25-5ef7-4814-b149-b4bf220585ca", "Content-Type" : "application/json-patch+json" }, "Response" : { @@ -245,41 +245,41 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?includeModelDefinition=true&api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1194200?includeModelDefinition=true&api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "17b5a126-85e7-4ed8-9e0a-04252c9eaf6d" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "659c4bf3-05d5-4bdc-a434-bce1bb2e7020" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "588", "StatusCode" : "200", - "Body" : "{\"id\":\"dtmi:example:Ward;1172526\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T19:12:57.7977533+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;1172526\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT", + "Body" : "{\"id\":\"dtmi:example:Ward;1194200\",\"description\":{\"en\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\"},\"displayName\":{\"en\":\"Ward\"},\"decommissioned\":true,\"uploadTime\":\"2020-09-09T22:46:28.5243751+00:00\",\"model\":{\"@id\":\"dtmi:example:Ward;1194200\",\"@type\":\"Interface\",\"displayName\":\"Ward\",\"description\":\"Aseparatepartitioninabuilding,madeofroomsandhallways.\",\"contents\":[{\"@type\":\"Property\",\"name\":\"VisitorCount\",\"schema\":\"double\"},{\"@type\":\"Property\",\"name\":\"HandWashPercentage\",\"schema\":\"double\"},{\"@type\":\"Relationship\",\"name\":\"managedRooms\"}],\"@context\":[\"dtmi:dtdl:context;2\"]}}", + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1172526?api-version=2020-05-31-preview", + "Uri" : "https://REDACTED.api.wus2.digitaltwins.azure.net/models/dtmi:example:Ward;1194200?api-version=2020-05-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_201; Windows 10; 10.0)", - "x-ms-client-request-id" : "45b8490b-e9a9-4741-9b23-22ca1c9862cb" + "User-Agent" : "azsdk-java-azure-digitaltwins-core/1.0.0-beta.1 (1.8.0_265; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4bfe1c3-1a9d-47d9-b9e9-67380064db75" }, "Response" : { "Strict-Transport-Security" : "max-age=2592000", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "Date" : "Wed, 09 Sep 2020 19:12:57 GMT" + "Date" : "Wed, 09 Sep 2020 22:46:28 GMT" }, "Exception" : null } ], - "variables" : [ "922745", "30510e", "01033f", "394748" ] + "variables" : [ "02300f", "19073c", "41460c", "31642d" ] } \ No newline at end of file From 96eccb488e1a4fe0b6c9ee68f9898649645920f4 Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Wed, 9 Sep 2020 17:14:29 -0700 Subject: [PATCH 159/168] Add ADT event route APIs and implementation (#14994) --- .../azure-digitaltwins-core/autorest.md | 2 +- .../core/DigitalTwinsAsyncClient.java | 160 +++++++++++++++++- .../digitaltwins/core/DigitalTwinsClient.java | 84 ++++++++- .../core/implementation/EventRoutesImpl.java | 2 +- .../models/EventRouteCollection.java | 1 + .../models/EventRoute.java | 2 +- 6 files changed, 235 insertions(+), 16 deletions(-) rename sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/{implementation => }/models/EventRoute.java (97%) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md index 87ad550903d61..e682c655748a3 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md @@ -39,5 +39,5 @@ java: models-subpackage: implementation.models context-client-method-parameter: true custom-types-subpackage: models - custom-types: IncomingRelationship + custom-types: IncomingRelationship,EventRoute ``` diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 46fd0d17834bf..90220c9cd2821 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -15,8 +15,10 @@ import com.azure.digitaltwins.core.implementation.AzureDigitalTwinsAPIImplBuilder; import com.azure.digitaltwins.core.implementation.converters.ModelDataConverter; import com.azure.digitaltwins.core.implementation.models.DigitalTwinModelsListOptions; +import com.azure.digitaltwins.core.implementation.models.EventRoutesListOptions; import com.azure.digitaltwins.core.implementation.models.QuerySpecification; import com.azure.digitaltwins.core.implementation.serializer.DigitalTwinsStringSerializer; +import com.azure.digitaltwins.core.models.EventRoute; import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; import com.azure.digitaltwins.core.serialization.BasicRelationship; @@ -90,6 +92,8 @@ public HttpPipeline getHttpPipeline() { return this.protocolLayer.getHttpPipeline(); } + //region Digital twin APIs + /** * Creates a digital twin. * @@ -325,6 +329,10 @@ Mono> deleteDigitalTwinWithResponse(String digitalTwinId, DeleteD .deleteWithResponseAsync(digitalTwinId, ifMatch, context); } + //endregion Digital twin APIs + + //region Relationship APIs + /** * Creates a relationship on a digital twin. * @@ -738,10 +746,9 @@ PagedFlux listIncomingRelationships(String digitalTwinId, nextLink -> protocolLayer.getDigitalTwins().listIncomingRelationshipsNextSinglePageAsync(nextLink, context)); } + //endregion Relationship APIs - //================================================================================================================================================== - // Models APIs - //================================================================================================================================================== + //region Model APIs /** * Creates one or many models. @@ -952,9 +959,9 @@ Mono> decommissionModelWithResponse(String modelId, Context conte return protocolLayer.getDigitalTwinModels().updateWithResponseAsync(modelId, updateOperation, context); } - //================================================================================================================================================== - // Component APIs - //================================================================================================================================================== + //endregion Model APIs + + //region Component APIs /** * Get a component of a digital twin. @@ -1067,6 +1074,10 @@ Mono> updateComponentWithResponse(String digitalTwinI }); } + //endregion Component APIs + + //region Query APIs + /** * Query digital twins. * @param query The query string, in SQL-like syntax. @@ -1190,4 +1201,141 @@ Mono> queryNextPage(String nextLink, Class clazz, Contex objectPagedResponse.getValue().getContinuationToken(), objectPagedResponse.getDeserializedHeaders())); } + + //endregion Query APIs + + //region Event Route APIs + + /** + * Create an event route. + * @param eventRouteId The Id of the event route to create. + * @param eventRoute The event route to create. + * @return An empty mono. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createEventRoute(String eventRouteId, EventRoute eventRoute) + { + return createEventRouteWithResponse(eventRouteId, eventRoute) + .flatMap(voidResponse -> Mono.empty()); + } + + /** + * Create an event route. + * @param eventRouteId The Id of the event route to create. + * @param eventRoute The event route to create. + * @return A {@link Response} containing an empty mono. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createEventRouteWithResponse(String eventRouteId, EventRoute eventRoute) + { + return withContext(context -> createEventRouteWithResponse(eventRouteId, eventRoute, context)); + } + + Mono> createEventRouteWithResponse(String eventRouteId, EventRoute eventRoute, Context context) + { + return this.protocolLayer.getEventRoutes().addWithResponseAsync(eventRouteId, eventRoute, context); + } + + /** + * Get an event route. + * @param eventRouteId The Id of the event route to get. + * @return The retrieved event route. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getEventRoute(String eventRouteId) + { + return getEventRouteWithResponse(eventRouteId) + .map(Response::getValue); + } + + /** + * Get an event route. + * @param eventRouteId The Id of the event route to get. + * @return A {@link Response} containing the retrieved event route. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getEventRouteWithResponse(String eventRouteId) + { + return withContext(context -> getEventRouteWithResponse(eventRouteId, context)); + } + + Mono> getEventRouteWithResponse(String eventRouteId, Context context) + { + return this.protocolLayer.getEventRoutes().getByIdWithResponseAsync(eventRouteId, context); + } + + /** + * Delete an event route. + * @param eventRouteId The Id of the event route to delete. + * @return An empty mono. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteEventRoute(String eventRouteId) + { + return deleteEventRouteWithResponse(eventRouteId) + .flatMap(voidResponse -> Mono.empty()); + } + + /** + * Delete an event route. + * @param eventRouteId The Id of the event route to delete. + * @return A {@link Response} containing an empty mono. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteEventRouteWithResponse(String eventRouteId) + { + return withContext(context -> deleteEventRouteWithResponse(eventRouteId, context)); + } + + Mono> deleteEventRouteWithResponse(String eventRouteId, Context context) + { + return this.protocolLayer.getEventRoutes().deleteWithResponseAsync(eventRouteId, context); + } + + /** + * List all the event routes that exist in your digital twins instance. + * @return A {@link PagedFlux} that contains all the event routes that exist in your digital twins instance. + * This PagedFlux may take multiple service requests to iterate over all event routes. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listEventRoutes() + { + return listEventRoutes(new EventRoutesListOptions()); + } + + /** + * List all the event routes that exist in your digital twins instance. + * @param options The optional parameters to use when listing event routes. See {@link EventRoutesListOptions} for more details + * on what optional parameters can be set. + * @return A {@link PagedFlux} that contains all the event routes that exist in your digital twins instance. + * This PagedFlux may take multiple service requests to iterate over all event routes. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listEventRoutes(EventRoutesListOptions options) + { + return new PagedFlux<>( + () -> withContext(context -> listEventRoutesFirstPage(options, context)), + nextLink -> withContext(context -> listEventRoutesNextPage(nextLink, context))); + } + + PagedFlux listEventRoutes(EventRoutesListOptions options, Context context) + { + return new PagedFlux<>( + () -> listEventRoutesFirstPage(options, context), + nextLink -> listEventRoutesNextPage(nextLink, context)); + } + + Mono> listEventRoutesFirstPage(EventRoutesListOptions options, Context context) { + return protocolLayer + .getEventRoutes() + .listSinglePageAsync(options, context); + } + + Mono> listEventRoutesNextPage(String nextLink, Context context) { + return protocolLayer + .getEventRoutes() + .listNextSinglePageAsync(nextLink, context); + } + + //endregion Event Route APIs } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 1bcda775bb1e1..d121bf89d30f9 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -11,6 +11,8 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.digitaltwins.core.implementation.models.EventRoutesListOptions; +import com.azure.digitaltwins.core.models.EventRoute; import com.azure.digitaltwins.core.models.IncomingRelationship; import com.azure.digitaltwins.core.models.ModelData; import com.azure.digitaltwins.core.serialization.BasicRelationship; @@ -59,7 +61,7 @@ public DigitalTwinsServiceVersion getServiceVersion() { return this.digitalTwinsAsyncClient.getServiceVersion(); } - //region DigitalTwin APIs + //region Digital twin APIs /** * Creates a digital twin. @@ -224,7 +226,7 @@ public Response deleteDigitalTwinWithResponse(String digitalTwinId, Delete return digitalTwinsAsyncClient.deleteDigitalTwinWithResponse(digitalTwinId, options, context).block(); } - //endregion + //endregion Digital twin APIs //region Relationship APIs @@ -456,9 +458,9 @@ public PagedIterable listIncomingRelationships(String digi return new PagedIterable<>(digitalTwinsAsyncClient.listIncomingRelationships(digitalTwinId, context)); } - //endregion + //endregion Relationship APIs - //region Models APIs + //region Model APIs /** * Creates one or many models. @@ -562,7 +564,7 @@ public Response decommissionModelWithResponse(String modelId, Context cont return digitalTwinsAsyncClient.decommissionModelWithResponse(modelId, context).block(); } - //endregion + //endregion Model APIs //region Component APIs @@ -643,7 +645,7 @@ public DigitalTwinsResponse updateComponentWithResponse(String digitalTwin return digitalTwinsAsyncClient.updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context).block(); } - //endregion + //endregion Component APIs //region Query APIs @@ -697,5 +699,73 @@ public PagedIterable query(String query, Class clazz, Context context) return new PagedIterable<>(digitalTwinsAsyncClient.query(query, clazz, context)); } - //endregion + //endregion Query APIs + + //region Event Route APIs + /** + * Create an event route. + * @param eventRouteId The id of the event route to create. + * @param eventRoute The event route to create. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void createEventRoute(String eventRouteId, EventRoute eventRoute) { + createEventRouteWithResponse(eventRouteId, eventRoute, Context.NONE); + } + + /** + * Create an event route. + * @param eventRouteId The id of the event route to create. + * @param eventRoute The event route to create. + * @param context Additional context that is passed through the Http pipeline during the service call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void createEventRouteWithResponse(String eventRouteId, EventRoute eventRoute, Context context) { + this.digitalTwinsAsyncClient.createEventRouteWithResponse(eventRouteId, eventRoute, context).block(); + } + + /** + * Get an event route. + * @param eventRouteId The Id of the event route to get. + * @return The retrieved event route. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventRoute getEventRoute(String eventRouteId) { + return getEventRouteWithResponse(eventRouteId, Context.NONE).getValue(); + } + + /** + * Get an event route. + * @param eventRouteId The Id of the event route to get. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link Response} containing the retrieved event route. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEventRouteWithResponse(String eventRouteId, Context context) { + return this.digitalTwinsAsyncClient.getEventRouteWithResponse(eventRouteId, context).block(); + } + + /** + * List all the event routes that exist in your digital twins instance. + * @return A {@link PagedIterable} containing all the event routes that exist in your digital twins instance. + * This PagedIterable may take multiple service requests to iterate over all event routes. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listEventRoutes() { + return listEventRoutes(new EventRoutesListOptions(), Context.NONE); + } + + /** + * List all the event routes that exist in your digital twins instance. + * @param options The optional parameters to use when listing event routes. See {@link EventRoutesListOptions} for more details + * on what optional parameters can be set. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link PagedIterable} containing all the event routes that exist in your digital twins instance. + * This PagedIterable may take multiple service requests to iterate over all event routes. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listEventRoutes(EventRoutesListOptions options, Context context) { + return new PagedIterable<>(this.digitalTwinsAsyncClient.listEventRoutes(options, context)); + } + + //endregion Event Route APIs } diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java index 9b247071c6af9..01620d826db9f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java @@ -24,9 +24,9 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; import com.azure.digitaltwins.core.implementation.models.ErrorResponseException; -import com.azure.digitaltwins.core.implementation.models.EventRoute; import com.azure.digitaltwins.core.implementation.models.EventRouteCollection; import com.azure.digitaltwins.core.implementation.models.EventRoutesListOptions; +import com.azure.digitaltwins.core.models.EventRoute; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in EventRoutes. */ diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRouteCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRouteCollection.java index 95d28700ece76..571bbf8c3282d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRouteCollection.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRouteCollection.java @@ -5,6 +5,7 @@ package com.azure.digitaltwins.core.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.digitaltwins.core.models.EventRoute; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoute.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoute.java similarity index 97% rename from sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoute.java rename to sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoute.java index 4d20920931f34..dbf431f3f2c38 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoute.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoute.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.digitaltwins.core.implementation.models; +package com.azure.digitaltwins.core.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; From 10bf934a2ec0439c1e4ff72665025fae37ac5986 Mon Sep 17 00:00:00 2001 From: Vinay Gera Date: Wed, 9 Sep 2020 17:28:45 -0700 Subject: [PATCH 160/168] Bump Identity dependency versions September 2020. (#14913) --- eng/versioning/version_client.txt | 3 +-- sdk/anomalydetector/azure-ai-anomalydetector/pom.xml | 2 +- sdk/appconfiguration/azure-data-appconfiguration/pom.xml | 2 +- .../azure-spring-cloud-appconfiguration-config/pom.xml | 2 +- sdk/digitaltwins/azure-digitaltwins-core/pom.xml | 2 +- .../azure-messaging-eventhubs-checkpointstore-blob/pom.xml | 2 +- sdk/eventhubs/azure-messaging-eventhubs/pom.xml | 2 +- sdk/formrecognizer/azure-ai-formrecognizer/pom.xml | 2 +- sdk/identity/azure-identity/README.md | 2 +- sdk/keyvault/azure-security-keyvault-administration/pom.xml | 2 +- sdk/keyvault/azure-security-keyvault-certificates/pom.xml | 2 +- sdk/keyvault/azure-security-keyvault-keys/pom.xml | 2 +- sdk/keyvault/azure-security-keyvault-secrets/pom.xml | 2 +- sdk/resourcemanager/azure-resourcemanager-samples/pom.xml | 2 +- sdk/resourcemanager/azure-resourcemanager-test/pom.xml | 2 +- sdk/servicebus/azure-messaging-servicebus/pom.xml | 2 +- sdk/spring/azure-spring-boot/pom.xml | 2 +- sdk/storage/azure-storage-blob-batch/pom.xml | 2 +- sdk/storage/azure-storage-blob-changefeed/pom.xml | 2 +- sdk/storage/azure-storage-blob-cryptography/pom.xml | 2 +- sdk/storage/azure-storage-blob/pom.xml | 2 +- sdk/storage/azure-storage-common/pom.xml | 2 +- sdk/storage/azure-storage-file-datalake/pom.xml | 2 +- sdk/storage/azure-storage-queue/pom.xml | 2 +- sdk/textanalytics/azure-ai-textanalytics/pom.xml | 2 +- 25 files changed, 25 insertions(+), 26 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 7a3b074e5f05b..4cf6d683a719b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -29,7 +29,7 @@ com.azure:azure-data-schemaregistry-avro;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-data-tables;12.0.0-beta.1;12.0.0-beta.1 com.azure:azure-digitaltwins-core;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-identity;1.1.0;1.2.0-beta.1 +com.azure:azure-identity;1.1.2;1.2.0-beta.1 com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-messaging-eventgrid;2.0.0-beta.1;2.0.0-beta.1 com.azure:azure-messaging-eventhubs;5.1.2;5.2.0-beta.3 @@ -130,7 +130,6 @@ com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;1.2.8-beta.1;1.2. # Format; # unreleased_:;dependency-version # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. -unreleased_com.azure:azure-identity;1.2.0-beta.1 unreleased_com.azure:azure-core-amqp;1.5.0-beta.1 unreleased_com.azure:azure-messaging-servicebus;7.0.0-beta.5 unreleased_com.azure:azure-security-keyvault-keys;4.3.0-beta.1 diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml index 51557abfbad32..b28e10799dbfe 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml +++ b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml @@ -74,7 +74,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index bcab807e0b65d..a71054b9492bd 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml @@ -90,7 +90,7 @@ com.azure azure-identity - 1.2.0-beta.1 + 1.1.2 test diff --git a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml index f18cba2234744..bc72ebdb971f2 100644 --- a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml +++ b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml @@ -67,7 +67,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 com.azure diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml index 3632638f95579..062377814a5c3 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml +++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml @@ -48,7 +48,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml index 7b74cef16d39f..0a29bf3254369 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml @@ -52,7 +52,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml index aaa25f14b6294..de9a9394cb478 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml @@ -49,7 +49,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index 08f0474d1844e..82657a3085c52 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml @@ -78,7 +78,7 @@ com.azure azure-identity - 1.2.0-beta.1 + 1.1.2 test diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index f03384cc36920..3a01a9c48cc2d 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -24,7 +24,7 @@ Maven dependency for Azure Secret Client library. Add it to your project's pom f com.azure azure-identity - 1.1.0 + 1.1.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/keyvault/azure-security-keyvault-administration/pom.xml b/sdk/keyvault/azure-security-keyvault-administration/pom.xml index 00e18a5d111d0..32d479b600a41 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-administration/pom.xml @@ -89,7 +89,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml index 282010eb0352f..2630baa6b31b3 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml @@ -98,7 +98,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml index dceeb2f08191a..d58851d936c8c 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-keys/pom.xml @@ -105,7 +105,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml index cdf1abb3a9c98..cf66df3f22cda 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml @@ -105,7 +105,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index c71f3b7e7d1f2..953c10515afbf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -58,7 +58,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 com.jcraft diff --git a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml index 72034b403c192..186cdc3218b7d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml @@ -62,7 +62,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 com.azure diff --git a/sdk/servicebus/azure-messaging-servicebus/pom.xml b/sdk/servicebus/azure-messaging-servicebus/pom.xml index e1d00889ee0dd..409be547380b4 100644 --- a/sdk/servicebus/azure-messaging-servicebus/pom.xml +++ b/sdk/servicebus/azure-messaging-servicebus/pom.xml @@ -71,7 +71,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/spring/azure-spring-boot/pom.xml b/sdk/spring/azure-spring-boot/pom.xml index b98604a3644c0..beae177e7b20c 100644 --- a/sdk/spring/azure-spring-boot/pom.xml +++ b/sdk/spring/azure-spring-boot/pom.xml @@ -165,7 +165,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml index abe28601aa443..7a17a44482346 100644 --- a/sdk/storage/azure-storage-blob-batch/pom.xml +++ b/sdk/storage/azure-storage-blob-batch/pom.xml @@ -87,7 +87,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/storage/azure-storage-blob-changefeed/pom.xml b/sdk/storage/azure-storage-blob-changefeed/pom.xml index 9b025f90393cb..4d6353257e463 100644 --- a/sdk/storage/azure-storage-blob-changefeed/pom.xml +++ b/sdk/storage/azure-storage-blob-changefeed/pom.xml @@ -87,7 +87,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml index 8be91af1a3e57..10e976ef6a6a3 100644 --- a/sdk/storage/azure-storage-blob-cryptography/pom.xml +++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml @@ -103,7 +103,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 5a9fd3022c124..0a40cbc1c341b 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -92,7 +92,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml index d7bec4b305fe7..9d5544c1a6447 100644 --- a/sdk/storage/azure-storage-common/pom.xml +++ b/sdk/storage/azure-storage-common/pom.xml @@ -68,7 +68,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 4c63f837f9e0d..f5952d2c3d758 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -83,7 +83,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index 653660c859f36..dfb921d1252fe 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -71,7 +71,7 @@ com.azure azure-identity - 1.1.0 + 1.1.2 test diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index 27ed3cda37907..42f05b05c79b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/pom.xml +++ b/sdk/textanalytics/azure-ai-textanalytics/pom.xml @@ -88,7 +88,7 @@ com.azure azure-identity - 1.2.0-beta.1 + 1.1.2 test From f69050cebc4bd31402a4bf890ddb08ede89070d3 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Thu, 10 Sep 2020 09:19:58 +0800 Subject: [PATCH 161/168] Update spring cloud reademe (#14971) * readme: autoconfig, context, appconfig * update readme for spring cloud services * udpate readme of storage * update readme for storage queue * readme: autoconfig, context, appconfig * update readme for spring cloud services * udpate readme of storage * update readme for storage queue * update readme for version tag * fix for pipeline errors --- .../README.md | 103 +++++++++++------ .../README.md | 107 +++++++++++++++++- .../azure-spring-cloud-context/README.md | 54 ++++++++- .../README.md | 4 +- .../azure-spring-cloud-messaging/README.md | 2 +- .../README.md | 60 +++++++++- .../README.md | 4 +- .../README.md | 4 +- .../README.md | 4 +- .../README.md | 86 +++++++++----- .../azure-spring-cloud-storage/README.md | 58 +++++++++- .../README.md | 1 + .../azure-spring-cloud-telemetry/README.md | 2 +- .../azure-spring-integration-core/README.md | 2 +- .../README.md | 4 +- .../README.md | 60 +++++++++- .../azure-spring-integration-test/README.md | 3 +- 17 files changed, 477 insertions(+), 81 deletions(-) diff --git a/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md index 71612232d0d55..ceb12ac6b3bfa 100644 --- a/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md +++ b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md @@ -1,54 +1,46 @@ # Azure Spring cloud starter App Configuration client library for Java -This project allows Spring Application to load properties from Azure Configuration Store. +This package helps Spring Application to load properties from Azure Configuration Store. -## Key concepts +[Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][app_configuration_sample] ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above -## Examples - -Please use this `sample` as a reference for how to use this starter. - -### Dependency Management - +### Include the package There are two libraries that can be used spring-cloud-azure-appconfiguration-config and spring-cloud-azure-appconfiguration-config-web. There are two differences between them the first being the web version takes on spring-web as a dependency, and the web version will attempt a refresh when the application is active when the cache expires. For more information on refresh see the [Configuration Refresh](#Configuration-Refresh) section. -#### Maven Coordinates - +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-azure-appconfiguration-config;current}) ```xml com.microsoft.azure spring-cloud-azure-appconfiguration-config - {version} + 1.2.8-beta.1 ``` +[//]: # ({x-version-update-end}) or +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-azure-appconfiguration-config-web;current}) ```xml com.microsoft.azure spring-cloud-azure-appconfiguration-config-web - {version} + 1.2.8-beta.1 ``` +[//]: # ({x-version-update-end}) -#### Gradle Coordinates - -```gradle -dependencies { - compile group: 'com.microsoft.azure', name: 'spring-cloud-azure-appconfiguration-config', version: '{starter-version}' -} -``` +## Key concepts +Azure App Configuration provides a service to centrally manage application settings and feature flags. Modern programs, especially programs running in a cloud, generally have many components that are distributed in nature. Spreading configuration settings across these components can lead to hard-to-troubleshoot errors during an application deployment. Use App Configuration to store all the settings for your application and secure their accesses in one place. -or +## Examples -```gradle -dependencies { - compile group: 'com.microsoft.azure', name: 'spring-cloud-azure-appconfiguration-config-web', version: '{starter-version}' -} -``` +Please use this `sample` as a reference for how to use this starter. ### Supported properties @@ -59,7 +51,7 @@ spring.cloud.azure.appconfiguration.enabled | Whether enable spring-cloud-azure- spring.cloud.azure.appconfiguration.default-context | Default context path to load properties from | No | application spring.cloud.azure.appconfiguration.name | Alternative to Spring application name, if not configured, fallback to default Spring application name | No | ${spring.application.name} spring.cloud.azure.appconfiguration.profile-separator | Profile separator for the key name, e.g., /foo-app_dev/db.connection.key, must follow format `^[a-zA-Z0-9_@]+$` | No | `_` -spring.cloud.azure.appconfiguration.cache-expiration | Amount of time, of type [Duration](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-duration), configurations are stored before a check can occur. | No | 30s +spring.cloud.azure.appconfiguration.cache-expiration | Amount of time, of type [Duration][spring_conversion_duration], configurations are stored before a check can occur. | No | 30s spring.cloud.azure.appconfiguration.managed-identity.client-id | Client id of the user assigned managed identity, only required when choosing to use user assigned managed identity on Azure | No | null `spring.cloud.azure.appconfiguration.stores` is a List of stores, for each store should follow below format: @@ -178,13 +170,13 @@ The values in App Configuration are filtered through the existing Environment wh #### Use Managed Identity to access App Configuration -[Managed identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) allows application to access [Azure Active Directory][azure_active_directory] protected resource on [Azure][azure]. +[Managed identity][azure_managed_identity] allows application to access [Azure Active Directory][azure_active_directory] protected resource on [Azure][azure]. In this library, [Azure Identity SDK][azure_identity_sdk] is used to access Azure App Configuration and optionally Azure Key Vault, for secrets. Only one method of authentication can be set at one time. When not using the AppConfigCredentialProvider and/or KeyVaultCredentialProvider the same authentication method is used for both App Configuration and Key Vault. Follow the below steps to enable accessing App Configuration with managed identity: -1. [Enable managed identities](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview#how-can-i-use-managed-identities-for-azure-resources) for the [supported Azure services](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/services-support-managed-identities), for example, virtual machine or App Service, on which the application will be deployed. +1. [Enable managed identities][enable_managed_identities] for the [supported Azure services][support_azure_services], for example, virtual machine or App Service, on which the application will be deployed. 1. Configure the [Azure RBAC][azure_rbac] of your App Configuration store to grant access to the Azure service where your application is running. Select the App Configuration Data Reader. The App Configuration Data Owner role is not required but can be used if needed. @@ -227,7 +219,7 @@ public class MyCredentials implements AppConfigCredentialProvider, KeyVaultCrede #### Client Builder Customization -The service client builders used for connecting to App Configuration and Key Vault can be customized by implementing interfaces `ConfigurationClientBuilderSetup` and `SecretClientBuilderSetup` respectively. Generating and providing a `@Bean` of them will update the default service client builders used in [App Configuration SDK](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/appconfiguration/azure-data-appconfiguration#key-concepts) and [Key Vault SDK](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/keyvault/azure-security-keyvault-secrets#key-concepts). If necessary, the customization can be done per App Configuration store or Key Vault instance. +The service client builders used for connecting to App Configuration and Key Vault can be customized by implementing interfaces `ConfigurationClientBuilderSetup` and `SecretClientBuilderSetup` respectively. Generating and providing a `@Bean` of them will update the default service client builders used in [App Configuration SDK][app_configuration_SDK] and [Key Vault SDK][key_vault_SDK]. If necessary, the customization can be done per App Configuration store or Key Vault instance. ```java public interface ConfigurationClientBuilderSetup { @@ -269,12 +261,55 @@ public class MyClient implements ConfigurationClientBuilderSetup, SecretClientBu } ``` - +## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + +## Next steps + +The following section provide a sample project illustrating how to use the starter. +### More sample code +- [Azure App Configuration][app_configuration_sample] +- [Azure App Configuration Conversation Complete][app_configuration_conversation_complete_sample] +- [Azure App Configuration Conversation Initial][app_configuration_conversation_initail_sample] + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-azure-appconfiguration-config +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-starter-azure-appconfiguration-config +[app_configuration_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample +[app_configuration_conversation_complete_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete +[app_configuration_conversation_initail_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-initial +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ +[spring_conversion_duration]: https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-duration +[azure_managed_identity]: https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview +[enable_managed_identities]: https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview#how-can-i-use-managed-identities-for-azure-resources +[support_azure_services]: https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/services-support-managed-identities [azure]: https://azure.microsoft.com [azure_active_directory]: https://azure.microsoft.com/services/active-directory/ [azure_identity_sdk]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/identity/azure-identity [azure_rbac]: https://docs.microsoft.com/azure/role-based-access-control/role-assignments-portal - -## Troubleshooting -## Next steps -## Contributing +[app_configuration_SDK]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/appconfiguration/azure-data-appconfiguration#key-concepts +[key_vault_SDK]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/keyvault/azure-security-keyvault-secrets#key-concepts diff --git a/sdk/spring/azure-spring-cloud-autoconfigure/README.md b/sdk/spring/azure-spring-cloud-autoconfigure/README.md index c116f06984b0e..88271616f0c0a 100644 --- a/sdk/spring/azure-spring-cloud-autoconfigure/README.md +++ b/sdk/spring/azure-spring-cloud-autoconfigure/README.md @@ -1,9 +1,114 @@ # Azure Spring cloud AutoConfigure client library for Java +This package is for Spring Cloud Starters of Azure services. It helps Spring Cloud developers to adopt Azure services. + +[Source code][src] | [Package (Maven)][package] | [API reference documentation][refdocs] -## Key concepts ## Getting started + +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the Package +To start a new project using Azure, go on [start.spring.io][spring_io] and select "Azure +Support": this will configure the project to make sure you can integrate easily with Azure service. + +For instance, let's assume that you want to use Event Hubs starter, you can add the usual `spring-cloud-starter-azure-eventhubs` +dependency to your project and the Spring Cloud auto-configuration will kick-in: + +```xml + + com.microsoft.azure + spring-cloud-starter-azure-eventhubs + +``` + +Note that there is no need to add a `version` as those are managed already by the project. + ## Key concepts +This project provides auto-configuration for the following Azure services: + +- [Azure App Configuration][app_configuration] +- [Azure Cache][cache] +- [Event Hubs][event_hubs] +- [Event Hubs Kafka][event_hubs_kafka] +- [Service Bus][service_bus] +- [Storage][storage] +- [Storage Queue][storage_queue] + ## Examples + +The following section provides sample projects illustrating how to use the Azure Spring Cloud starters. +### More sample code +- [Azure App Configuration][app_configuration_sample] +- [Azure App Configuration Conversation][app_configuration_conversation_sample] +- [Azure Cache][cache_sample] +- [Event Hubs][event_hubs_sample] +- [Event Hubs Kafka][event_hubs_kafka_sample] +- [Service Bus][service_bus_sample] +- [Storage][storage_sample] +- [Storage Queue][storage_queue_sample] + ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + ## Next steps + +The following section provides sample projects illustrating how to use the Azure Spring Cloud starters. +### More sample code +- [Azure App Configuration][app_configuration_sample] +- [Azure App Configuration Conversation][app_configuration_conversation_sample] +- [Azure Cache][cache_sample] +- [Event Hubs][event_hubs_sample] +- [Event Hubs Kafka][event_hubs_kafka_sample] +- [Service Bus][service_bus_sample] +- [Storage][storage_sample] +- [Storage Queue][storage_queue_sample] + ## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[src]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-autoconfigure/src/ +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-azure-autoconfigure +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-azure-autoconfigure +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[spring_io]: https://start.spring.io +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ +[app_configuration]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config +[cache]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-starter-cache +[event_hubs]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-starter-eventhubs +[event_hubs_kafka]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka +[service_bus]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-starter-servicebus +[storage]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-starter-storage +[storage_queue]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-starter-storage-queue +[app_configuration_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-sample +[app_configuration_conversation_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-appconfiguration-conversion-sample-complete +[cache_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-cache-sample +[event_hubs_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-eventhubs-integration-sample +[event_hubs_kafka_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-eventhubs-kafka-sample +[service_bus_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-servicebus-integration-sample +[storage_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-storage-resource-sample +[storage_queue_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-storage-queue-integration-sample diff --git a/sdk/spring/azure-spring-cloud-context/README.md b/sdk/spring/azure-spring-cloud-context/README.md index bb8bb039d3933..437904f40bc45 100644 --- a/sdk/spring/azure-spring-cloud-context/README.md +++ b/sdk/spring/azure-spring-cloud-context/README.md @@ -1,9 +1,61 @@ # Azure Spring cloud azure context client library for Java +This package helps developers to finish the auto-configuration of Azure Context. + +[Source code][src] | [Package (Maven)][package] | [API reference documentation][refdocs] -## Key concepts ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-azure-context;current}) +```xml + + com.microsoft.azure + spring-cloud-azure-context + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) + ## Key concepts +Azure contexts represent your active subscription to run commands against, and the authentication information needed to connect to an Azure cloud. With Azure contexts, Azure Spring Cloud services doesn't need to reauthenticate your account each time you switch subscriptions. ## Examples + ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + ## Next steps + + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[src]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-context/src +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-azure-context +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-azure-context +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ diff --git a/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/README.md b/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/README.md index 67e33dda39874..844da8b7d0275 100644 --- a/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/README.md +++ b/sdk/spring/azure-spring-cloud-eventhubs-stream-binder/README.md @@ -12,7 +12,7 @@ microservice using **Spring Cloud Stream** based on [Azure Event Hub][azure_even - [Maven][maven] 3.0 and above ### Include the package -[//]: # "{x-version-update-start;com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;current}" +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder;current}) ```xml com.microsoft.azure @@ -20,7 +20,7 @@ microservice using **Spring Cloud Stream** based on [Azure Event Hub][azure_even 1.2.8-beta.1 ``` -[//]: # "{x-version-update-end}" +[//]: # ({x-version-update-end}) ## Key concepts diff --git a/sdk/spring/azure-spring-cloud-messaging/README.md b/sdk/spring/azure-spring-cloud-messaging/README.md index 2d2bdad5b1c2c..f86388ba49127 100644 --- a/sdk/spring/azure-spring-cloud-messaging/README.md +++ b/sdk/spring/azure-spring-cloud-messaging/README.md @@ -1,6 +1,6 @@ # Azure Spring Cloud Messaging client library for Java +This package is an internal package providing supporting config and annotation classes for Azure Messaging services. -## Key concepts ## Getting started ## Key concepts ## Examples diff --git a/sdk/spring/azure-spring-cloud-starter-cache/README.md b/sdk/spring/azure-spring-cloud-starter-cache/README.md index f9ef4a17bc08d..78737885cde6b 100644 --- a/sdk/spring/azure-spring-cloud-starter-cache/README.md +++ b/sdk/spring/azure-spring-cloud-starter-cache/README.md @@ -1,8 +1,66 @@ # Azure Spring Cloud Starter Cache client library for Java +This starter provides auto-configuration of Azure Cache for Redis. Azure Cache for Redis provides an in-memory data store based on the open-source software Redis. + +[Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][sample] -## Key concepts ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-starter-azure-cache;current}) +```xml + + com.microsoft.azure + spring-starter-azure-cache + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) + +## Key concepts +Redis improves the performance and scalability of an application that uses on backend data stores heavily. It is able to process large volumes of application request by keeping frequently accessed data in the server memory that can be written to and read from quickly. + +Azure Cache for Redis offers Redis as a managed service. It provides secure and dedicated Redis server instances and full Redis API compatibility. The service is operated by Microsoft, hosted on Azure, and accessible to any application within or outside of Azure. + ## Examples +Please refer to this [sample project][sample] illustrating how to use this starter. ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + ## Next steps +The following section provide a sample project illustrating how to use the starter. +### More sample code +- [Azure Cache for Redis][sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-starter-azure-cache +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-starter-azure-cache +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-cache-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ diff --git a/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka/README.md b/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka/README.md index e7a9735e7c49a..ae440b91ee462 100644 --- a/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka/README.md +++ b/sdk/spring/azure-spring-cloud-starter-eventhubs-kafka/README.md @@ -10,7 +10,7 @@ The Spring Cloud Stream Kafka binder for Azure Event Hubs helps developers to fi - [Maven][maven] 3.0 and above ### Include the package -[//]: # "{x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-eventhubs-kafka;current}" +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-eventhubs-kafka;current}) ```xml com.microsoft.azure @@ -18,7 +18,7 @@ The Spring Cloud Stream Kafka binder for Azure Event Hubs helps developers to fi 1.2.8-beta.1 ``` -[//]: # "{x-version-update-end}" +[//]: # ({x-version-update-end}) ## Key concepts Event Hubs provides a Kafka endpoint that can be used by your existing Kafka based applications as an alternative to running your own Kafka cluster. Event Hubs supports Apache Kafka protocol 1.0 and later, and works with your existing Kafka applications, including MirrorMaker. diff --git a/sdk/spring/azure-spring-cloud-starter-eventhubs/README.md b/sdk/spring/azure-spring-cloud-starter-eventhubs/README.md index 81752527841c7..e712fa3fb1160 100644 --- a/sdk/spring/azure-spring-cloud-starter-eventhubs/README.md +++ b/sdk/spring/azure-spring-cloud-starter-eventhubs/README.md @@ -13,7 +13,7 @@ For Spring Integration on Event Hubs, please refer to the [source code][source_c - [Maven][maven] 3.0 and above ### Include the package -[//]: # "{x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-eventhubs;current}" +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-eventhubs;current}) ```xml com.microsoft.azure @@ -21,7 +21,7 @@ For Spring Integration on Event Hubs, please refer to the [source code][source_c 1.2.8-beta.1 ``` -[//]: # "{x-version-update-end}" +[//]: # ({x-version-update-end}) ## Key concepts Azure Event Hubs is a big data streaming platform and event ingestion service. It can receive and process millions of events per second. Data sent to an event hub can be transformed and stored by using any real-time analytics provider or batching/storage adapters. diff --git a/sdk/spring/azure-spring-cloud-starter-storage-queue/README.md b/sdk/spring/azure-spring-cloud-starter-storage-queue/README.md index 1904840f18420..25a3115621c33 100644 --- a/sdk/spring/azure-spring-cloud-starter-storage-queue/README.md +++ b/sdk/spring/azure-spring-cloud-starter-storage-queue/README.md @@ -12,7 +12,7 @@ The Spring Cloud Storage Queue starter helps developers to finish the auto-confi - [Maven][maven] 3.0 and above ### Include the package -[//]: # "{x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-storage-queue;current}" +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-starter-azure-storage-queue;current}) ```xml com.microsoft.azure @@ -20,7 +20,7 @@ The Spring Cloud Storage Queue starter helps developers to finish the auto-confi 1.2.8-beta.1 ``` -[//]: # "{x-version-update-end}" +[//]: # ({x-version-update-end}) ## Key concepts diff --git a/sdk/spring/azure-spring-cloud-starter-storage/README.md b/sdk/spring/azure-spring-cloud-starter-storage/README.md index e2d24b8c4ab84..bf3fb08b05113 100644 --- a/sdk/spring/azure-spring-cloud-starter-storage/README.md +++ b/sdk/spring/azure-spring-cloud-starter-storage/README.md @@ -1,38 +1,33 @@ # Azure Spring Cloud Starter Storage client library for Java -The project provides a Spring Boot Starter `spring-cloud-starter-azure-storage` to auto-configure [Azure Blob storage](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction) in your Spring projects. It implements Spring Resource abstraction for Azure Storage service which allows you to interact with Azure Blob storage using Spring programming model. +The project provides a Spring Boot Starter `spring-cloud-starter-azure-storage` to auto-configure [Azure Blob storage][azure_blob_storage] in your Spring projects. It implements Spring Resource abstraction for Azure Storage service which allows you to interact with Azure Blob storage using Spring programming model. -## Key concepts ## Getting started -## Examples +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-starter-azure-storage;current}) +```xml + + com.microsoft.azure + spring-starter-azure-storage + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) -Please use this `sample` as a reference for how to use **Spring Cloud Azure Storage** in your projects. +## Key concepts +The Azure Storage platform is Microsoft's cloud storage solution for modern data storage scenarios. Core storage services offer a massively scalable object store for data objects, disk storage for Azure virtual machines (VMs), a file system service for the cloud, a messaging store for reliable messaging, and a NoSQL store. -### Feature List +## Examples -- [Auto-configuration for Azure Blob storage](#auto-configuration-for-azure-blob-storage) -- [Autowire a resource](#autowire-a-resource) -- [Read and write to a resource](#read-and-write-to-a-resource) -- [Other operations](#other-operations) +Please use this `sample` as a reference for how to use **Spring Cloud Azure Storage** in your projects. #### Auto-configuration for Azure Blob storage -Please use `spring-cloud-starter-azure-storage` to auto-configure Azure Storge in your project. - -**Maven Coordinates** -``` - - com.microsoft.azure - spring-cloud-starter-azure-storage - -``` -**Gradle Coordinates** -``` -dependencies { - compile group: 'com.microsoft.azure', name: 'spring-cloud-starter-azure-storage' -} -``` - The `spring-cloud-starter-azure-storage` provides the following configuration options in `application.properties`. Name | Description | Required | Default @@ -44,7 +39,7 @@ Name | Description | Required | Default spring.cloud.azure.storage.enabled | Turn on or off functionalities of Spring Cloud Azure Storage | No | true #### Autowire a resource -You can use the annotation of `@Value("blob://{containerName}/{blobName}")` to autowire a `Resource` with that in [Azure Blob storage](https://azure.microsoft.com/en-us/services/storage/blobs/). +You can use the annotation of `@Value("blob://{containerName}/{blobName}")` to autowire a `Resource` with that in [Azure Blob storage][azure_storage]. ``` @Value("blob://{containerName}/{blobName}") @@ -64,9 +59,46 @@ You can write to a resource in Azure Blob storage by casting the Spring `Resourc ``` #### Other operations -The Spring Resource abstraction for Azure Storage also supports [other operations](https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#resources) defined in Spring's `Resource` and `WritableResource` interface. +The Spring Resource abstraction for Azure Storage also supports [other operations][other_operation] defined in Spring's `Resource` and `WritableResource` interface. ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + ## Next steps +The following section provide a sample project illustrating how to use the starter. +### More sample code +- [Azure Storage][sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[src]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-starter-storage +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-starter-azure-storage +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-starter-azure-storage +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-storage-resource-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ +[azure_blob_storage]: https://docs.microsoft.com/azure/storage/blobs/storage-blobs-introduction +[azure_storage]: https://azure.microsoft.com/services/storage/blobs/ +[other_operation]: https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#resources diff --git a/sdk/spring/azure-spring-cloud-storage/README.md b/sdk/spring/azure-spring-cloud-storage/README.md index 524f057d39f98..6c96e8396bea3 100644 --- a/sdk/spring/azure-spring-cloud-storage/README.md +++ b/sdk/spring/azure-spring-cloud-storage/README.md @@ -1,9 +1,65 @@ # Azure Spring cloud azure Storage client library for Java +This package helps developers to finish the auto-configuration of Azure Storage. + +[Source code][src] | [Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][sample] -## Key concepts ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-cloud-azure-storage;current}) +```xml + + com.microsoft.azure + spring-cloud-azure-storage + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) + ## Key concepts +The Azure Storage platform is Microsoft's cloud storage solution for modern data storage scenarios. Core storage services offer a massively scalable object store for data objects, disk storage for Azure virtual machines (VMs), a file system service for the cloud, a messaging store for reliable messaging, and a NoSQL store. + ## Examples +Please refer to this [sample project][sample] illustrating how to use this package. + ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + ## Next steps +The following section provide a sample project illustrating how to use the package. +### More sample code +- [Azure Storage][sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[src]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-cloud-storage +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-cloud-azure-storage +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-cloud-azure-storage +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-storage-resource-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ diff --git a/sdk/spring/azure-spring-cloud-stream-binder-test/README.md b/sdk/spring/azure-spring-cloud-stream-binder-test/README.md index f8bbbf381daad..3edd7b7fbd45f 100644 --- a/sdk/spring/azure-spring-cloud-stream-binder-test/README.md +++ b/sdk/spring/azure-spring-cloud-stream-binder-test/README.md @@ -1,4 +1,5 @@ # Azure Spring Cloud Stream Binder Test client library for Java +This package is an internal package providing test base classes for spring cloud integration on binders. ## Key concepts ## Getting started diff --git a/sdk/spring/azure-spring-cloud-telemetry/README.md b/sdk/spring/azure-spring-cloud-telemetry/README.md index 8f4a009dbb1ae..324af0dbd77d1 100644 --- a/sdk/spring/azure-spring-cloud-telemetry/README.md +++ b/sdk/spring/azure-spring-cloud-telemetry/README.md @@ -1,6 +1,6 @@ # Azure Spring cloud azure telemetry client library for Java +This package is an internal package sending telemetry data for Azure Spring Cloud services. -## Key concepts ## Getting started ## Key concepts ## Examples diff --git a/sdk/spring/azure-spring-integration-core/README.md b/sdk/spring/azure-spring-integration-core/README.md index 21e7ce56fafd2..41ad9f1a62bdf 100644 --- a/sdk/spring/azure-spring-integration-core/README.md +++ b/sdk/spring/azure-spring-integration-core/README.md @@ -1,6 +1,6 @@ # Azure Spring Integration Core client library for Java +This package is an internal package providing base classes for Azure Spring integration. -## Key concepts ## Getting started ## Key concepts ## Examples diff --git a/sdk/spring/azure-spring-integration-eventhubs/README.md b/sdk/spring/azure-spring-integration-eventhubs/README.md index 4a65717b99d94..8b55c0cab6b36 100644 --- a/sdk/spring/azure-spring-integration-eventhubs/README.md +++ b/sdk/spring/azure-spring-integration-eventhubs/README.md @@ -12,7 +12,7 @@ Event Hubs is a fully managed, real-time data ingestion service that’s simple, - [Maven][maven] 3.0 and above ### Include the package -[//]: # "{x-version-update-start;com.microsoft.azure:spring-integration-eventhubs;current}" +[//]: # ({x-version-update-start;com.microsoft.azure:spring-integration-eventhubs;current}) ```xml com.microsoft.azure @@ -20,7 +20,7 @@ Event Hubs is a fully managed, real-time data ingestion service that’s simple, 1.2.8-beta.1 ``` -[//]: # "{x-version-update-end}" +[//]: # ({x-version-update-end}) ## Key concepts Spring Integration enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters. Those adapters provide a higher-level of abstraction over Spring’s support for remoting, messaging, and scheduling. diff --git a/sdk/spring/azure-spring-integration-storage-queue/README.md b/sdk/spring/azure-spring-integration-storage-queue/README.md index 9856f809117bd..01c6e2ef71e13 100644 --- a/sdk/spring/azure-spring-integration-storage-queue/README.md +++ b/sdk/spring/azure-spring-integration-storage-queue/README.md @@ -1,9 +1,67 @@ # Azure Spring Integration storage queue client library for Java +The *Spring Integration for Storage Queue* extension project provides inbound and outbound channel adapters and gateways for Azure Storage Queue. + +[Source code][src] | [Package (Maven)][package] | [API reference documentation][refdocs] | [Samples][sample] -## Key concepts ## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] +- [Maven][maven] 3.0 and above + +### Include the package +[//]: # ({x-version-update-start;com.microsoft.azure:spring-integration-storage-queue;current}) +```xml + + com.microsoft.azure + spring-integration-storage-queue + 1.2.8-beta.1 + +``` +[//]: # ({x-version-update-end}) + ## Key concepts +Azure Queue Storage is a service for storing large numbers of messages. You access messages from anywhere in the world via authenticated calls using HTTP or HTTPS. A queue message can be up to 64 KB in size. A queue may contain millions of messages, up to the total capacity limit of a storage account. Queues are commonly used to create a backlog of work to process asynchronously. ## Examples +Please refer to this [sample project][sample] illustrating how to use Storage Queue integration. + ## Troubleshooting +### Enable client logging +Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +### Enable Spring logging +Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.=` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root. + +The following example shows potential logging settings in `application.properties`: + +```properties +logging.level.root=WARN +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +``` + +For more information about setting logging in spring, please refer to the [official doc][logging_doc]. + + ## Next steps + +The following section provide a sample project illustrating how to use this package. +### More sample code +- [Storage Queue Integration Sample][sample] + ## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +Please follow [instructions here][contributing_md] to build from source or contribute. + + +[src]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-integration-storage-queue +[package]: https://mvnrepository.com/artifact/com.microsoft.azure/spring-integration-storage-queue +[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#spring-integration-storage-queue +[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-storage-queue-integration-sample +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application +[azure_subscription]: https://azure.microsoft.com/free +[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-logging +[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/CONTRIBUTING.md +[maven]: http://maven.apache.org/ + diff --git a/sdk/spring/azure-spring-integration-test/README.md b/sdk/spring/azure-spring-integration-test/README.md index 553a6d5cf7a0c..f21e2cbc03761 100644 --- a/sdk/spring/azure-spring-integration-test/README.md +++ b/sdk/spring/azure-spring-integration-test/README.md @@ -1,6 +1,5 @@ # Azure Spring Integration shared library for Java - -## Key concepts +This package is an internal package providing test base classes for Azure Spring integration. ## Getting started ## Key concepts ## Examples From 272ad9c3192271b54184fb16ce056011baebca93 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 9 Sep 2020 18:52:50 -0700 Subject: [PATCH 162/168] Increment package version after release of com.azure azure-search-documents (#15009) --- eng/jacoco-test-coverage/pom.xml | 2 +- eng/versioning/version_client.txt | 2 +- sdk/search/azure-search-documents/CHANGELOG.md | 3 +++ sdk/search/azure-search-documents/pom.xml | 2 +- sdk/search/azure-search-perf/pom.xml | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index e02fce5ce87f8..ce6b951f35fd0 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -164,7 +164,7 @@ com.azure azure-search-documents - 11.1.0 + 11.2.0-beta.1 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 4cf6d683a719b..99070d34dafed 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -35,7 +35,7 @@ com.azure:azure-messaging-eventgrid;2.0.0-beta.1;2.0.0-beta.1 com.azure:azure-messaging-eventhubs;5.1.2;5.2.0-beta.3 com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.1.2;1.2.0-beta.3 com.azure:azure-messaging-servicebus;7.0.0-beta.5;7.0.0-beta.6 -com.azure:azure-search-documents;11.0.0;11.1.0 +com.azure:azure-search-documents;11.1.0;11.2.0-beta.1 com.azure:azure-search-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-security-keyvault-administration;4.0.0-beta.1;4.0.0-beta.1 com.azure:azure-security-keyvault-certificates;4.1.0;4.2.0-beta.1 diff --git a/sdk/search/azure-search-documents/CHANGELOG.md b/sdk/search/azure-search-documents/CHANGELOG.md index f5aee93ee1004..d5edac9a459fe 100644 --- a/sdk/search/azure-search-documents/CHANGELOG.md +++ b/sdk/search/azure-search-documents/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 11.2.0-beta.1 (Unreleased) + + ## 11.1.0 (2020-09-09) ### New Features diff --git a/sdk/search/azure-search-documents/pom.xml b/sdk/search/azure-search-documents/pom.xml index 123f9da4134a7..2be4c6654fe15 100644 --- a/sdk/search/azure-search-documents/pom.xml +++ b/sdk/search/azure-search-documents/pom.xml @@ -16,7 +16,7 @@ com.azure azure-search-documents - 11.1.0 + 11.2.0-beta.1 jar diff --git a/sdk/search/azure-search-perf/pom.xml b/sdk/search/azure-search-perf/pom.xml index d7eebbfa19d78..8bd062b2cd577 100644 --- a/sdk/search/azure-search-perf/pom.xml +++ b/sdk/search/azure-search-perf/pom.xml @@ -32,7 +32,7 @@ com.azure azure-search-documents - 11.1.0 + 11.2.0-beta.1 From 70d16c35f5c1ff866540c538e49a394b42ae9825 Mon Sep 17 00:00:00 2001 From: Hemant Tanwar Date: Wed, 9 Sep 2020 19:08:56 -0700 Subject: [PATCH 163/168] SB Track2: Expose AMQP details ServiceBus Messages for sending and receiving. (#14848) Expose AMQP details ServiceBus Messages for sending and receiving. --- sdk/core/azure-core-amqp/CHANGELOG.md | 1 + .../azure/core/amqp/AmqpMessageConstant.java | 31 +- .../amqp/models/AmqpAnnotatedMessage.java | 123 +++++++ .../azure/core/amqp/models/AmqpBodyType.java | 23 ++ .../azure/core/amqp/models/AmqpDataBody.java | 41 +++ .../core/amqp/models/AmqpMessageBody.java | 16 + .../core/amqp/models/AmqpMessageHeader.java | 138 ++++++++ .../amqp/models/AmqpMessageProperties.java | 331 ++++++++++++++++++ .../azure/core/amqp/models/BinaryData.java | 34 ++ .../azure/core/amqp/models/package-info.java | 7 + .../src/main/java/module-info.java | 1 + .../amqp/models/AmqpAnnotatedMessageTest.java | 185 ++++++++++ .../core/amqp/models/AmqpDataBodyTest.java | 54 +++ .../core/amqp/models/BinaryDataTest.java | 40 +++ .../azure-messaging-servicebus/CHANGELOG.md | 2 + .../servicebus/ServiceBusMessage.java | 188 ++++++---- .../servicebus/ServiceBusMessageBatch.java | 3 +- .../ServiceBusMessageSerializer.java | 208 ++++++----- .../servicebus/ServiceBusReceivedMessage.java | 216 ++++++++---- .../ServiceBusSenderAsyncClient.java | 2 +- .../models/CorrelationRuleFilter.java | 2 +- ...usSenderAsyncClientJavaDocCodeSamples.java | 4 +- ...viceBusSenderClientJavaDocCodeSamples.java | 6 +- .../ServiceBusMessageSerializerTest.java | 59 +++- .../servicebus/ServiceBusMessageTest.java | 146 +++++++- .../ServiceBusReceivedMessageTest.java | 98 ++++-- ...BusReceiverAsyncClientIntegrationTest.java | 141 +++++++- ...rviceBusReceiverClientIntegrationTest.java | 6 +- .../ServiceBusSenderAsyncClientTest.java | 2 +- .../azure/messaging/servicebus/TestUtils.java | 5 +- sdk/servicebus/test-resources.json | 2 +- 31 files changed, 1824 insertions(+), 291 deletions(-) create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpAnnotatedMessage.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpBodyType.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpDataBody.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageBody.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageHeader.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageProperties.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/BinaryData.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/package-info.java create mode 100644 sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/AmqpAnnotatedMessageTest.java create mode 100644 sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/AmqpDataBodyTest.java create mode 100644 sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/BinaryDataTest.java diff --git a/sdk/core/azure-core-amqp/CHANGELOG.md b/sdk/core/azure-core-amqp/CHANGELOG.md index 37453e692edf1..5b99af016d9df 100644 --- a/sdk/core/azure-core-amqp/CHANGELOG.md +++ b/sdk/core/azure-core-amqp/CHANGELOG.md @@ -1,6 +1,7 @@ # Release History ## 1.5.0-beta.1 (Unreleased) +- Added Amqp Message envelope which can be accessed using `AmqpAnnotatedMessage`. ## 1.4.0 (2020-08-11) diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpMessageConstant.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpMessageConstant.java index 4f250ca9719f1..3cc986e779ef8 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpMessageConstant.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpMessageConstant.java @@ -93,7 +93,36 @@ public enum AmqpMessageConstant { /** * The name of the entity that published a message. */ - PUBLISHER_ANNOTATION_NAME("x-opt-publisher"); + PUBLISHER_ANNOTATION_NAME("x-opt-publisher"), + /** + * The name representing scheduled enqueue time. + */ + SCHEDULED_ENQUEUE_UTC_TIME_NAME("x-opt-scheduled-enqueue-time"), + /** + * The identifier associated with a given via-partition. + */ + VIA_PARTITION_KEY_ANNOTATION_NAME("x-opt-via-partition-key"), + /** + * The identifier for locked until. + */ + LOCKED_UNTIL_KEY_ANNOTATION_NAME("x-opt-locked-until"), + /** + * The identifier for deadletter source. + */ + DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME("x-opt-deadletter-source"), + /** + * The name representing enqueue sequence number. + * This one appears to always be 0, but is always returned with each message. + */ + ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME("x-opt-enqueue-sequence-number"), + /** + * The identifier for deadletter description. + */ + DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME("DeadLetterErrorDescription"), + /** + * The identifier for deadletter reason. + */ + DEAD_LETTER_REASON_ANNOTATION_NAME("DeadLetterReason"); private static final Map RESERVED_CONSTANTS_MAP = new HashMap<>(); private final String constant; diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpAnnotatedMessage.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpAnnotatedMessage.java new file mode 100644 index 0000000000000..a07e930123180 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpAnnotatedMessage.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The representation of message as defined by AMQP protocol. + * + * @see + * Amqp Message Format. + */ +public final class AmqpAnnotatedMessage { + private final AmqpMessageBody amqpMessageBody; + private final Map applicationProperties; + private final Map deliveryAnnotations; + private final Map messageAnnotations; + private final Map footer; + private final AmqpMessageHeader header; + private final AmqpMessageProperties properties; + + /** + * Creates instance of {@link AmqpAnnotatedMessage} with given {@link AmqpMessageBody}. + * + * @param body to be set on amqp message. + * + * @throws NullPointerException if {@code body} is null. + */ + public AmqpAnnotatedMessage(AmqpMessageBody body) { + amqpMessageBody = Objects.requireNonNull(body, "'body' cannot be null."); + + applicationProperties = new HashMap<>(); + deliveryAnnotations = new HashMap<>(); + messageAnnotations = new HashMap<>(); + footer = new HashMap<>(); + header = new AmqpMessageHeader(); + properties = new AmqpMessageProperties(); + } + + /** + * Creates instance of {@link AmqpAnnotatedMessage} with given {@link AmqpAnnotatedMessage} instance. + * + * @param message used to create another instance of {@link AmqpAnnotatedMessage}. + * + * @throws NullPointerException if {@code message} or {@link AmqpAnnotatedMessage#getBody() body} is null. + */ + public AmqpAnnotatedMessage(AmqpAnnotatedMessage message) { + Objects.requireNonNull(message, "'message' cannot be null."); + amqpMessageBody = Objects.requireNonNull(message.getBody(), "'message.body' cannot be null."); + applicationProperties = new HashMap<>(message.getApplicationProperties()); + deliveryAnnotations = new HashMap<>(message.getDeliveryAnnotations()); + messageAnnotations = new HashMap<>(message.getMessageAnnotations()); + footer = new HashMap<>(message.getFooter()); + header = new AmqpMessageHeader(message.getHeader()); + properties = new AmqpMessageProperties(message.getProperties()); + } + + /** + * Gets the {@link Map} of application properties. + * + * @return The application properties. + */ + public Map getApplicationProperties() { + return applicationProperties; + } + + /** + * Gets the {@link AmqpMessageBody} of an amqp message. + * + * @return the {@link AmqpMessageBody} object. + */ + public AmqpMessageBody getBody() { + return amqpMessageBody; + } + + /** + * Gets the {@link Map} representation of delivery annotations defined on an amqp message. + * + * @return the {@link Map} representation of delivery annotations. + */ + public Map getDeliveryAnnotations() { + return deliveryAnnotations; + } + + /** + * Gets the {@link Map} representation of footer defined on an amqp message. + * + * @return the {@link Map} representation of footer. + */ + public Map getFooter() { + return footer; + } + + /** + * Gets the {@link AmqpMessageHeader} defined on an amqp message. + * + * @return the {@link AmqpMessageHeader} object. + */ + public AmqpMessageHeader getHeader() { + return header; + } + + /** + * Gets the {@link Map} representation of message annotations defined on an amqp message. + * + * @return the {@link Map} representation of message annotations. + */ + public Map getMessageAnnotations() { + return messageAnnotations; + } + + /** + * Gets the {@link AmqpMessageProperties} defined on an amqp message. + * + * @return the {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties getProperties() { + return properties; + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpBodyType.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpBodyType.java new file mode 100644 index 0000000000000..80c66af356087 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpBodyType.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +/** + * All AmqpBodyType available for AMQP Message. + */ +public enum AmqpBodyType { + /** + * Represent Amqp Data type + */ + DATA, + /** + * Represent Amqp Value type + */ + VALUE, + /** + * Represent Amqp Sequence type + */ + SEQUENCE; + +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpDataBody.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpDataBody.java new file mode 100644 index 0000000000000..a71b65f45d618 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpDataBody.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import com.azure.core.util.IterableStream; + +import java.util.Objects; + +/** + * This is amqp message body which represents {@link AmqpBodyType#DATA} type. + */ +public final class AmqpDataBody implements AmqpMessageBody { + private final IterableStream data; + + /** + * Creates instance of {@link AmqpDataBody} with given {@link Iterable} of {@link BinaryData}. + * + * @param data to be set on amqp body. + * + * @throws NullPointerException if {@code data} is null. + */ + public AmqpDataBody(Iterable data) { + Objects.requireNonNull(data, "'data' cannot be null."); + this.data = new IterableStream<>(data); + } + + @Override + public AmqpBodyType getBodyType() { + return AmqpBodyType.DATA; + } + + /** + * Gets {@link BinaryData} set on this {@link AmqpDataBody}. + * + * @return data set on {@link AmqpDataBody}. + */ + public IterableStream getData() { + return data; + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageBody.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageBody.java new file mode 100644 index 0000000000000..a984fb566720d --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageBody.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +/** + * Interface representing Amqp Message Body. + */ +public interface AmqpMessageBody { + /** + * Type representing various supported amqp body types. + * + * @return The {@link AmqpBodyType}. + */ + AmqpBodyType getBodyType(); +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageHeader.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageHeader.java new file mode 100644 index 0000000000000..e15a482558f3a --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageHeader.java @@ -0,0 +1,138 @@ +// 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.time.Duration; +import java.util.Objects; + +/** + * The representation of message header as defined by AMQP protocol. + * @see + * Amqp Message Format. + */ +@Fluent +public class AmqpMessageHeader { + + private Long deliveryCount; + private Boolean durable; + private Boolean firstAcquirer; + private Short priority; + private Duration timeToLive; + + AmqpMessageHeader() { + // This class does not have any public constructors, and is not able to be instantiated using 'new'. + } + + /** + * The constructor is used to clone the values. + */ + AmqpMessageHeader(AmqpMessageHeader header) { + super(); + Objects.requireNonNull(header, "'header' cannot be null."); + deliveryCount = header.getDeliveryCount(); + durable = header.isDurable(); + firstAcquirer = header.isFirstAcquirer(); + timeToLive = header.getTimeToLive(); + priority = header.getPriority(); + } + + /** + * Gets the delivery count from amqp message header. + * + * @return the delivery count value. + */ + public Long getDeliveryCount() { + return deliveryCount; + } + + /** + * Sets the given {@code deliveryCount} value on {@link AmqpMessageHeader} object. + * @param deliveryCount to be set. + * + * @return updated {@link AmqpMessageHeader} object. + */ + public AmqpMessageHeader setDeliveryCount(Long deliveryCount) { + this.deliveryCount = deliveryCount; + return this; + } + + /** + * Gets durable boolean flag from amqp message header. + * @return the durable flag. + */ + public Boolean isDurable() { + return durable; + } + + /** + * Sets the given {@code durable} value on {@link AmqpMessageHeader} object. + * @param durable to set on {@link AmqpMessageHeader}. + * + * @return updated {@link AmqpMessageHeader} object. + */ + public AmqpMessageHeader setDurable(Boolean durable) { + this.durable = durable; + return this; + } + + /** + * Gets boolean flag for {@code firstAcquirer} from amqp message header. + * @return the {@code firstAcquirer} value. + */ + public Boolean isFirstAcquirer() { + return this.firstAcquirer; + } + + /** + * Sets the given {@code firstAcquirer} value on {@link AmqpMessageHeader} object. + * @param firstAcquirer to set on {@link AmqpMessageHeader}. + * + * @return updated {@link AmqpMessageHeader} object. + */ + public AmqpMessageHeader setFirstAcquirer(Boolean firstAcquirer) { + this.firstAcquirer = firstAcquirer; + return this; + } + + /** + * Gets the priority on {@code amqpMessage} from amqp message header. + * @return the {@code priority} value. + */ + public Short getPriority() { + return priority; + } + + /** + * Sets the given {@code priority} value on {@link AmqpMessageHeader} object. + * @param priority to set on {@link AmqpMessageHeader}. + * + * @return updated {@link AmqpMessageHeader} object. + */ + public AmqpMessageHeader setPriority(Short priority) { + this.priority = priority; + return this; + } + + /** + * Gets {@code timeToLive} from amqp message header. + * + * @return the {@code timeToLive} value. + */ + public Duration getTimeToLive() { + return timeToLive; + } + + /** + * Sets the given {@code timeToLive} value on {@link AmqpMessageHeader} object. + * @param timeToLive to set on {@link AmqpMessageHeader}. + * + * @return updated {@link AmqpMessageHeader} object. + */ + public AmqpMessageHeader setTimeToLive(Duration timeToLive) { + this.timeToLive = timeToLive; + return this; + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageProperties.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageProperties.java new file mode 100644 index 0000000000000..29e7595e5b417 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageProperties.java @@ -0,0 +1,331 @@ +// 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.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Objects; + +/** + * The representation of message properties as defined by AMQP protocol. + * + * @see + * Amqp Message Format. + */ +@Fluent +public class AmqpMessageProperties { + + private OffsetDateTime absoluteExpiryTime; + private String contentEncoding; + private String contentType; + private String correlationId; + private OffsetDateTime creationTime; + private String groupId; + private Long groupSequence; + private String messageId; + private String replyToGroupId; + private String replyTo; + private String to; + private String subject; + private byte[] userId; + + AmqpMessageProperties() { + // This class does not have any public constructors, and is not able to be instantiated using 'new'. + } + + /** + * The constructor is used to clone the values. + */ + AmqpMessageProperties(AmqpMessageProperties properties) { + super(); + Objects.requireNonNull(properties, "'properties' cannot be null."); + absoluteExpiryTime = properties.getAbsoluteExpiryTime(); + contentEncoding = properties.getContentEncoding(); + contentType = properties.getContentType(); + correlationId = properties.getCorrelationId(); + creationTime = properties.getCreationTime(); + groupId = properties.getGroupId(); + groupSequence = properties.getGroupSequence(); + messageId = properties.getMessageId(); + replyToGroupId = properties.getReplyToGroupId(); + replyTo = properties.getReplyTo(); + to = properties.getTo(); + subject = properties.getSubject(); + userId = properties.getUserId(); + } + + /** + * Gets {@code absoluteExpiryTime} from amqp message properties. + * + * @return the {@code absoluteExpiryTime} value. + */ + public OffsetDateTime getAbsoluteExpiryTime() { + return absoluteExpiryTime; + } + + /** + * Sets the given {@code absoluteExpiryTime} value on {@link AmqpMessageProperties} object. + * + * @param absoluteExpiryTime to be set. + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setAbsoluteExpiryTime(OffsetDateTime absoluteExpiryTime) { + this.absoluteExpiryTime = absoluteExpiryTime; + return this; + } + + /** + * Gets AbsoluteExpiryTime from amqp message properties. + * + * @return the {@code absoluteExpiryTime} value. + */ + public String getContentEncoding() { + return contentEncoding; + } + + /** + * Sets the given {@code contentEncoding} value on {@link AmqpMessageProperties} object. + * + * @param contentEncoding to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Gets {@code contentType} from amqp message properties. + * + * @return the {@code contentType} value. + */ + public String getContentType() { + return contentType; + } + + /** + * Sets the given {@code contentType} value on {@link AmqpMessageProperties} object. + * + * @param contentType to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Gets {@code correlationId} from amqp message properties. + * + * @return the {@code correlationId} value. + */ + public String getCorrelationId() { + return correlationId; + } + + /** + * Sets the given {@code correlationId} value on {@link AmqpMessageProperties} object. + * + * @param correlationId to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Gets {@code creationTime} from amqp message properties. + * + * @return the {@code creationTime} value. + */ + public OffsetDateTime getCreationTime() { + return creationTime; + } + + /** + * Sets the given {@code creationTime} value on {@link AmqpMessageProperties} object. + * + * @param creationTime to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setCreationTime(OffsetDateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * Gets {@code groupId} from amqp message properties. + * + * @return the {@code groupId} value. + */ + public String getGroupId() { + return groupId; + } + + /** + * Sets the given {@code groupId} value on {@link AmqpMessageProperties} object. + * + * @param groupId to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Gets {@code groupSequence} from amqp message properties. + * + * @return the {@code groupSequence} value. + */ + public Long getGroupSequence() { + return groupSequence; + } + + /** + * Sets the given {@code groupSequence} value on {@link AmqpMessageProperties} object. + * + * @param groupSequence to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setGroupSequence(Long groupSequence) { + this.groupSequence = groupSequence; + return this; + } + + /** + * Gets {@code messageId} from amqp message properties. + * + * @return the {@code messageId} value. + */ + public String getMessageId() { + return messageId; + } + + /** + * Sets the given {@code messageId} value on {@link AmqpMessageProperties} object. + * + * @param messageId to be set . + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setMessageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Gets {@code replyTo} from amqp message properties. + * + * @return The {@code replyTo} value. + */ + public String getReplyTo() { + return replyTo; + } + + /** + * Sets the given {@code replyTo} value on {@link AmqpMessageProperties} object. + * + * @param replyTo to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setReplyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Gets {@code replyToGroupId} from amqp message properties. + * + * @return The {@code replyToGroupId} value. + */ + public String getReplyToGroupId() { + return replyToGroupId; + } + + /** + * Sets the given {@code replyToGroupId} value on {@link AmqpMessageProperties} object. + * + * @param replyToGroupId to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setReplyToGroupId(String replyToGroupId) { + this.replyToGroupId = replyToGroupId; + return this; + } + + /** + * Gets {@code subject} from amqp message properties. + * + * @return the {@code subject} value. + */ + public String getSubject() { + return subject; + } + + /** + * Sets the given {@code subject} value on {@link AmqpMessageProperties} object. + * + * @param subject to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setSubject(String subject) { + this.subject = subject; + return this; + } + + /** + * Gets {@code to} from amqp message properties. + * + * @return the {@code to} value. + */ + public String getTo() { + return to; + } + + /** + * Sets the given {@code to} value on {@link AmqpMessageProperties} object. + * + * @param to to be set. + * + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setTo(String to) { + this.to = to; + return this; + } + + /** + * Gets {@code userId} from amqp message properties. + * + * @return the {@code userId} value. + */ + public byte[] getUserId() { + return userId != null ? Arrays.copyOf(userId, userId.length) : new byte[0]; + } + + /** + * Sets the given {@code userId} value on {@link AmqpMessageProperties} object. + * + * @param userId to be set . + * @return updated {@link AmqpMessageProperties} object. + */ + public AmqpMessageProperties setUserId(byte[] userId) { + this.userId = userId != null ? Arrays.copyOf(userId, userId.length) : new byte[0]; + return this; + } + +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/BinaryData.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/BinaryData.java new file mode 100644 index 0000000000000..218e1eed10a36 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/BinaryData.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import java.util.Arrays; +import java.util.Objects; + +/** + * Binary representation of amqp message body. + */ +public final class BinaryData { + private final byte[] data; + + /** + * Create {@link BinaryData} instance with given byte array data. + * + * @param data to use. + */ + public BinaryData(byte[] data) { + Objects.requireNonNull(data, "'data' cannot be null."); + this.data = Arrays.copyOf(data, data.length); + } + + /** + * Gets the data. + * + * @return byte array representing {@link BinaryData}. + */ + + public byte[] getData() { + return Arrays.copyOf(data, data.length); + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/package-info.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/package-info.java new file mode 100644 index 0000000000000..49c5ed1490ff0 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing classes related to AMQP models classes. + */ +package com.azure.core.amqp.models; diff --git a/sdk/core/azure-core-amqp/src/main/java/module-info.java b/sdk/core/azure-core-amqp/src/main/java/module-info.java index 77497a6a08af5..3edfcafb02114 100644 --- a/sdk/core/azure-core-amqp/src/main/java/module-info.java +++ b/sdk/core/azure-core-amqp/src/main/java/module-info.java @@ -9,6 +9,7 @@ requires transitive org.apache.qpid.proton.j; exports com.azure.core.amqp; + exports com.azure.core.amqp.models; exports com.azure.core.amqp.exception; // FIXME this should not be a long-term solution diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/AmqpAnnotatedMessageTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/AmqpAnnotatedMessageTest.java new file mode 100644 index 0000000000000..aea81dc2a7fa2 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/AmqpAnnotatedMessageTest.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import com.azure.core.util.logging.ClientLogger; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +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.assertNotSame; + +/** + * Test class for {@link AmqpAnnotatedMessage} + */ +public class AmqpAnnotatedMessageTest { + + private static final byte[] CONTENTS_BYTES = "Some-contents".getBytes(StandardCharsets.UTF_8); + private static final BinaryData DATA_BYTES = new BinaryData(CONTENTS_BYTES); + private final ClientLogger logger = new ClientLogger(AmqpAnnotatedMessageTest.class); + + /** + * Verifies we correctly set values via copy constructor for {@link AmqpAnnotatedMessage} and create new + * instances of the properties. + */ + @Test + public void copyConstructorTest() { + // Arrange + final int expectedBinaryDataSize = 1; + List expectedBinaryData = new ArrayList<>(); + expectedBinaryData.add(DATA_BYTES); + + final AmqpDataBody amqpDataBody = new AmqpDataBody(expectedBinaryData); + final AmqpAnnotatedMessage expected = new AmqpAnnotatedMessage(amqpDataBody); + final Map expectedMessageAnnotations = expected.getMessageAnnotations(); + expectedMessageAnnotations.put("ma-1", "ma-value1"); + + final Map expectedDeliveryAnnotations = expected.getDeliveryAnnotations(); + expectedDeliveryAnnotations.put("da-1", "da-value1"); + + final Map expectedApplicationProperties = expected.getApplicationProperties(); + expectedApplicationProperties.put("ap-1", "ap-value1"); + + final Map expectedFooter = expected.getFooter(); + expectedFooter.put("foo-1", "foo-value1"); + + final AmqpMessageProperties expectedMessageProperties = expected.getProperties(); + expectedMessageProperties.setGroupSequence(2L); + expectedMessageProperties.setContentEncoding("content-enc"); + expectedMessageProperties.setReplyToGroupId("a"); + expectedMessageProperties.setReplyTo("b"); + expectedMessageProperties.setCorrelationId("c"); + expectedMessageProperties.setSubject("d"); + expectedMessageProperties.setMessageId("id"); + + final AmqpMessageHeader expectedMessageHeader = expected.getHeader(); + expectedMessageHeader.setDeliveryCount(5L); + expectedMessageHeader.setTimeToLive(Duration.ofSeconds(20)); + expectedMessageHeader.setPriority(Short.valueOf("4")); + + final AmqpAnnotatedMessage actual = new AmqpAnnotatedMessage(expected); + + // Act + // Now update the values after we have created AmqpAnnotatedMessage using copy constructor. + expectedDeliveryAnnotations.remove("da-1"); + expectedApplicationProperties.put("ap-2", "ap-value2"); + expectedFooter.remove("foo-1"); + expected.getHeader().setDeliveryCount(Long.valueOf(100)); + expectedBinaryData = new ArrayList<>(); + + // Assert + // Ensure the memory references are not same. + assertNotSame(expected.getProperties(), actual.getProperties()); + assertNotSame(expected.getApplicationProperties(), actual.getApplicationProperties()); + assertNotSame(expected.getDeliveryAnnotations(), actual.getDeliveryAnnotations()); + assertNotSame(expected.getFooter(), actual.getFooter()); + assertNotSame(expected.getHeader(), actual.getHeader()); + assertNotSame(expected.getMessageAnnotations(), actual.getMessageAnnotations()); + assertNotSame(expected.getProperties().getUserId(), actual.getProperties().getUserId()); + assertNotSame(expected.getHeader().getDeliveryCount(), actual.getHeader().getDeliveryCount()); + + assertEquals(1, actual.getDeliveryAnnotations().size()); + assertEquals(1, actual.getApplicationProperties().size()); + assertEquals(1, actual.getFooter().size()); + + assertEquals(expectedMessageProperties.getGroupSequence(), actual.getProperties().getGroupSequence()); + assertEquals(expectedMessageProperties.getContentEncoding(), actual.getProperties().getContentEncoding()); + assertEquals(expectedMessageProperties.getReplyToGroupId(), actual.getProperties().getReplyToGroupId()); + assertEquals(expectedMessageProperties.getReplyTo(), actual.getProperties().getReplyTo()); + assertEquals(expectedMessageProperties.getCorrelationId(), actual.getProperties().getCorrelationId()); + assertEquals(expectedMessageProperties.getSubject(), actual.getProperties().getSubject()); + assertEquals(expectedMessageProperties.getMessageId(), actual.getProperties().getMessageId()); + + assertEquals(expectedMessageHeader.getTimeToLive(), actual.getHeader().getTimeToLive()); + assertEquals(expectedMessageHeader.getPriority(), actual.getHeader().getPriority()); + + assertMessageBody(expectedBinaryDataSize, CONTENTS_BYTES, actual); + } + + /** + * Verifies we correctly set values via constructor for {@link AmqpAnnotatedMessage}. + */ + @Test + public void constructorValidValues() { + // Arrange + final List expectedBinaryData = Collections.singletonList(DATA_BYTES); + final AmqpDataBody amqpDataBody = new AmqpDataBody(expectedBinaryData); + + // Act + final AmqpAnnotatedMessage actual = new AmqpAnnotatedMessage(amqpDataBody); + + // Assert + assertMessageCreation(AmqpBodyType.DATA, expectedBinaryData.size(), actual); + } + + /** + * Verifies we correctly set values via constructor for {@link AmqpAnnotatedMessage}. + */ + @Test + public void constructorAmqpValidValues() { + // Arrange + final List expectedBinaryData = Collections.singletonList(DATA_BYTES); + final AmqpDataBody amqpDataBody = new AmqpDataBody(expectedBinaryData); + final AmqpAnnotatedMessage expected = new AmqpAnnotatedMessage(amqpDataBody); + + // Act + final AmqpAnnotatedMessage actual = new AmqpAnnotatedMessage(expected); + + // Assert + assertMessageCreation(AmqpBodyType.DATA, expectedBinaryData.size(), actual); + } + + /** + * Verifies {@link AmqpAnnotatedMessage} constructor for null values. + */ + @Test + public void constructorNullValidValues() { + // Arrange + final AmqpDataBody body = null; + + // Act & Assert + Assertions.assertThrows(NullPointerException.class, () -> new AmqpAnnotatedMessage(body)); + } + + private void assertMessageCreation(AmqpBodyType expectedType, int expectedMessageSize, AmqpAnnotatedMessage actual) { + assertEquals(expectedType, actual.getBody().getBodyType()); + assertNotNull(actual.getProperties()); + assertNotNull(actual.getHeader()); + assertNotNull(actual.getFooter()); + assertNotNull(actual.getApplicationProperties()); + assertNotNull(actual.getDeliveryAnnotations()); + assertNotNull(actual.getMessageAnnotations()); + assertNotNull(actual.getApplicationProperties()); + + // Validate Message Body + assertNotNull(actual.getBody()); + assertMessageBody(expectedMessageSize, CONTENTS_BYTES, actual); + } + + private void assertMessageBody(int expectedMessageSize, byte[] expectedbody, AmqpAnnotatedMessage actual) { + final AmqpBodyType actualType = actual.getBody().getBodyType(); + switch (actualType) { + case DATA: + List actualData = ((AmqpDataBody) actual.getBody()).getData().stream().collect(Collectors.toList()); + assertEquals(expectedMessageSize, actualData.size()); + assertArrayEquals(expectedbody, actualData.get(0).getData()); + break; + case VALUE: + case SEQUENCE: + throw logger.logExceptionAsError(new UnsupportedOperationException("type not supported yet :" + actualType)); + default: + throw logger.logExceptionAsError(new IllegalStateException("Invalid type :" + actualType)); + } + } +} diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/AmqpDataBodyTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/AmqpDataBodyTest.java new file mode 100644 index 0000000000000..1b9b6ecd752f4 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/AmqpDataBodyTest.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * Test for {@link AmqpDataBody}. + */ +public class AmqpDataBodyTest { + + /** + * Verifies we correctly set values via constructor for {@link AmqpAnnotatedMessage}. + */ + @Test + public void constructorValidValues() { + // Arrange + final List expectedDataList = new ArrayList<>(); + expectedDataList.add(new BinaryData("some data 1".getBytes())); + expectedDataList.add(new BinaryData("some data 2".getBytes())); + + // Act + final AmqpDataBody actual = new AmqpDataBody(expectedDataList); + + // Assert + assertEquals(AmqpBodyType.DATA, actual.getBodyType()); + + // Validate Message Body + final List dataList = actual.getData().stream().collect(Collectors.toList()); + assertEquals(expectedDataList.size(), dataList.size()); + assertArrayEquals(expectedDataList.toArray(), dataList.toArray()); + } + + /** + * Verifies {@link BinaryData} constructor for null values. + */ + @Test + public void constructorNullValidValues() { + // Arrange + final List listBinaryData = null; + + // Act & Assert + Assertions.assertThrows(NullPointerException.class, () -> new AmqpDataBody(listBinaryData)); + } +} diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/BinaryDataTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/BinaryDataTest.java new file mode 100644 index 0000000000000..ba52eb9c996c6 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/BinaryDataTest.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.nio.charset.StandardCharsets; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; + +/** + * Test for {@link BinaryData}. + */ +public class BinaryDataTest { + + private static final byte[] CONTENTS_BYTES = "Some-contents".getBytes(StandardCharsets.UTF_8); + + /** + * Verifies we correctly set values via constructor for {@link BinaryData}. + */ + @Test + public void constructorValidValues() { + // Arrange & Act + final BinaryData actual = new BinaryData(CONTENTS_BYTES); + + // Assert + assertArrayEquals(CONTENTS_BYTES, actual.getData()); + } + + /** + * Verifies {@link BinaryData} constructor for null valeus. + */ + @Test + public void constructorNullValidValues() { + // Arrange, Act & Assert + Assertions.assertThrows(NullPointerException.class, () -> new BinaryData(null)); + } +} diff --git a/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md b/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md index c6e7114bad31a..609ebe8b9d750 100644 --- a/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md @@ -1,11 +1,13 @@ # Release History ## 7.0.0-beta.6 (Unreleased) +- Exposing Amqp Message envelope in form of `AmqpAnnotatedMessage` as a property of `ServiceBusReceivedMessage` and `ServiceBusMessage`. - Removed `ServiceBusReceiverClientBuilder.maxAutoLockRenewalDuration`. Use method `getAutoRenewMessageLock` of classes `ServiceBusReceiverClient` and `ServiceBusReceiverAsyncClient` to lock messages and sessions. - Updated datetime related APIs to use `java.time.OffsetDateTime` instead of `java.time.Instant`. - Removed `scheduledMessageCount` from `SubscriptionRuntimeInfo` and added it to `TopicRuntimeInfo`. - Changed `QueueRuntimeInfo`, `TopicRuntimeInfo` and `SubscriptionRuntimeInfo` to `QueueRuntimeProperties`, `TopicRuntimeProperties` and `SubscriptionRuntimeProperties` respectively. + ## 7.0.0-beta.5 (2020-08-11) - Remove public constructor for QueueDescription, TopicDescription, SubscriptionDescription. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java index aa54261b7dbd4..1b64b77a28978 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java @@ -3,16 +3,35 @@ package com.azure.messaging.servicebus; +import com.azure.core.amqp.AmqpMessageConstant; +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.AmqpBodyType; +import com.azure.core.amqp.models.AmqpDataBody; +import com.azure.core.amqp.models.BinaryData; import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; import java.nio.charset.StandardCharsets; import java.time.Duration; import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Arrays; -import java.util.HashMap; +import java.util.Collections; +import java.util.Date; import java.util.Map; import java.util.Objects; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_REASON_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_TIME_UTC_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.LOCKED_UNTIL_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.PARTITION_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.SCHEDULED_ENQUEUE_UTC_TIME_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.SEQUENCE_NUMBER_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.VIA_PARTITION_KEY_ANNOTATION_NAME; + /** * The data structure encapsulating the message being sent-to Service Bus. * @@ -22,7 +41,7 @@ * AMQP 1.0 specification * *
      - *
    1. {@link #getProperties()} - AMQPMessage.ApplicationProperties section
    2. + *
    3. {@link #getApplicationProperties()} - AMQPMessage.ApplicationProperties section
    4. *
    5. {@link #getBody()} - if AMQPMessage.Body has Data section
    6. *
    * @@ -34,21 +53,11 @@ * @see ServiceBusMessageBatch */ public class ServiceBusMessage { - private final Map properties = new HashMap<>(); - private final byte[] body; + private final AmqpAnnotatedMessage amqpAnnotatedMessage; + private final ClientLogger logger = new ClientLogger(ServiceBusMessage.class); + + private final byte[] binaryData; private Context context; - private String contentType; - private String correlationId; - private String label; - private String messageId; - private String partitionKey; - private String replyTo; - private String replyToSessionId; - private OffsetDateTime scheduledEnqueueTime; - private String sessionId; - private Duration timeToLive; - private String to; - private String viaPartitionKey; /** * Creates a {@link ServiceBusMessage} with a {@link java.nio.charset.StandardCharsets#UTF_8 UTF_8} encoded body. @@ -69,8 +78,10 @@ public ServiceBusMessage(String body) { * @throws NullPointerException if {@code body} is {@code null}. */ public ServiceBusMessage(byte[] body) { - this.body = Objects.requireNonNull(body, "'body' cannot be null."); + this.binaryData = Objects.requireNonNull(body, "'body' cannot be null."); this.context = Context.NONE; + this.amqpAnnotatedMessage = new AmqpAnnotatedMessage(new AmqpDataBody(Collections.singletonList( + new BinaryData(binaryData)))); } /** @@ -82,32 +93,43 @@ public ServiceBusMessage(byte[] body) { * @throws NullPointerException if {@code receivedMessage} is {@code null}. */ public ServiceBusMessage(ServiceBusReceivedMessage receivedMessage) { - this.body = receivedMessage.getBody(); + Objects.requireNonNull(receivedMessage, "'receivedMessage' cannot be null."); + + this.amqpAnnotatedMessage = new AmqpAnnotatedMessage(receivedMessage.getAmqpAnnotatedMessage()); this.context = Context.NONE; - setMessageId(receivedMessage.getMessageId()); - setScheduledEnqueueTime(receivedMessage.getScheduledEnqueueTime()); - setContentType(receivedMessage.getContentType()); - setCorrelationId(receivedMessage.getCorrelationId()); - setLabel(receivedMessage.getLabel()); - setPartitionKey(receivedMessage.getPartitionKey()); - setReplyTo(receivedMessage.getReplyTo()); - setReplyToSessionId(receivedMessage.getReplyToSessionId()); - setTimeToLive(receivedMessage.getTimeToLive()); - setTo(receivedMessage.getTo()); - setSessionId(receivedMessage.getSessionId()); - setViaPartitionKey(receivedMessage.getViaPartitionKey()); + this.binaryData = receivedMessage.getBody(); + + // clean up data which user is not allowed to set. + amqpAnnotatedMessage.getHeader().setDeliveryCount(null); + + removeValues(amqpAnnotatedMessage.getMessageAnnotations(), LOCKED_UNTIL_KEY_ANNOTATION_NAME, + SEQUENCE_NUMBER_ANNOTATION_NAME, DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME, + ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME, ENQUEUED_TIME_UTC_ANNOTATION_NAME); + + removeValues(amqpAnnotatedMessage.getApplicationProperties(), DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME, + DEAD_LETTER_REASON_ANNOTATION_NAME); + + } + + /** + * Gets the {@link AmqpAnnotatedMessage}. + * + * @return the amqp message. + */ + public AmqpAnnotatedMessage getAmqpAnnotatedMessage() { + return amqpAnnotatedMessage; } /** * Gets the set of free-form {@link ServiceBusMessage} properties which may be used for passing metadata associated - * with the {@link ServiceBusMessage} during Service Bus operations. A common use-case for {@code properties()} is - * to associate serialization hints for the {@link #getBody()} as an aid to consumers who wish to deserialize the - * binary data. + * with the {@link ServiceBusMessage} during Service Bus operations. A common use-case for + * {@code getApplicationProperties()} is to associate serialization hints for the {@link #getBody()} as an aid to + * consumers who wish to deserialize the binary data. * * @return Application properties associated with this {@link ServiceBusMessage}. */ - public Map getProperties() { - return properties; + public Map getApplicationProperties() { + return amqpAnnotatedMessage.getApplicationProperties(); } /** @@ -115,14 +137,25 @@ public Map getProperties() { * *

    * If the means for deserializing the raw data is not apparent to consumers, a common technique is to make use of - * {@link #getProperties()} when creating the event, to associate serialization hints as an aid to consumers who - * wish to deserialize the binary data. + * {@link #getApplicationProperties()} when creating the event, to associate serialization hints as an aid to + * consumers who wish to deserialize the binary data. *

    * * @return A byte array representing the data. */ public byte[] getBody() { - return Arrays.copyOf(body, body.length); + final AmqpBodyType type = amqpAnnotatedMessage.getBody().getBodyType(); + switch (type) { + case DATA: + return Arrays.copyOf(binaryData, binaryData.length); + case SEQUENCE: + case VALUE: + throw logger.logExceptionAsError(new UnsupportedOperationException("Not supported AmqpBodyType: " + + type.toString())); + default: + throw logger.logExceptionAsError(new IllegalArgumentException("Unknown AmqpBodyType: " + + type.toString())); + } } /** @@ -131,7 +164,7 @@ public byte[] getBody() { * @return the contentType of the {@link ServiceBusMessage}. */ public String getContentType() { - return contentType; + return amqpAnnotatedMessage.getProperties().getContentType(); } /** @@ -142,7 +175,7 @@ public String getContentType() { * @return The updated {@link ServiceBusMessage}. */ public ServiceBusMessage setContentType(String contentType) { - this.contentType = contentType; + amqpAnnotatedMessage.getProperties().setContentType(contentType); return this; } @@ -158,7 +191,7 @@ public ServiceBusMessage setContentType(String contentType) { * Routing and Correlation */ public String getCorrelationId() { - return correlationId; + return amqpAnnotatedMessage.getProperties().getCorrelationId(); } /** @@ -170,28 +203,28 @@ public String getCorrelationId() { * @see #getCorrelationId() */ public ServiceBusMessage setCorrelationId(String correlationId) { - this.correlationId = correlationId; + amqpAnnotatedMessage.getProperties().setCorrelationId(correlationId); return this; } /** - * Gets the label for the message. + * Gets the subject for the message. * - * @return The label for the message. + * @return The subject for the message. */ - public String getLabel() { - return label; + public String getSubject() { + return amqpAnnotatedMessage.getProperties().getSubject(); } /** - * Sets the label for the message. + * Sets the subject for the message. * - * @param label The label to set. + * @param subject The subject to set. * * @return The updated {@link ServiceBusMessage} object. */ - public ServiceBusMessage setLabel(String label) { - this.label = label; + public ServiceBusMessage setSubject(String subject) { + amqpAnnotatedMessage.getProperties().setSubject(subject); return this; } @@ -199,7 +232,7 @@ public ServiceBusMessage setLabel(String label) { * @return Id of the {@link ServiceBusMessage}. */ public String getMessageId() { - return messageId; + return amqpAnnotatedMessage.getProperties().getMessageId(); } /** @@ -210,7 +243,7 @@ public String getMessageId() { * @return The updated {@link ServiceBusMessage}. */ public ServiceBusMessage setMessageId(String messageId) { - this.messageId = messageId; + amqpAnnotatedMessage.getProperties().setMessageId(messageId); return this; } @@ -228,7 +261,7 @@ public ServiceBusMessage setMessageId(String messageId) { * entities */ public String getPartitionKey() { - return partitionKey; + return (String) amqpAnnotatedMessage.getMessageAnnotations().get(PARTITION_KEY_ANNOTATION_NAME.getValue()); } /** @@ -240,7 +273,7 @@ public String getPartitionKey() { * @see #getPartitionKey() */ public ServiceBusMessage setPartitionKey(String partitionKey) { - this.partitionKey = partitionKey; + amqpAnnotatedMessage.getMessageAnnotations().put(PARTITION_KEY_ANNOTATION_NAME.getValue(), partitionKey); return this; } @@ -256,7 +289,7 @@ public ServiceBusMessage setPartitionKey(String partitionKey) { * Routing and Correlation */ public String getReplyTo() { - return replyTo; + return amqpAnnotatedMessage.getProperties().getReplyTo(); } /** @@ -268,7 +301,7 @@ public String getReplyTo() { * @see #getReplyTo() */ public ServiceBusMessage setReplyTo(String replyTo) { - this.replyTo = replyTo; + amqpAnnotatedMessage.getProperties().setReplyTo(replyTo); return this; } @@ -278,7 +311,7 @@ public ServiceBusMessage setReplyTo(String replyTo) { * @return "To" property value of this message */ public String getTo() { - return to; + return amqpAnnotatedMessage.getProperties().getTo(); } /** @@ -294,7 +327,7 @@ public String getTo() { * @return The updated {@link ServiceBusMessage}. */ public ServiceBusMessage setTo(String to) { - this.to = to; + amqpAnnotatedMessage.getProperties().setTo(to); return this; } @@ -311,7 +344,7 @@ public ServiceBusMessage setTo(String to) { * @see Message Expiration */ public Duration getTimeToLive() { - return timeToLive; + return amqpAnnotatedMessage.getHeader().getTimeToLive(); } /** @@ -323,7 +356,7 @@ public Duration getTimeToLive() { * @see #getTimeToLive() */ public ServiceBusMessage setTimeToLive(Duration timeToLive) { - this.timeToLive = timeToLive; + amqpAnnotatedMessage.getHeader().setTimeToLive(timeToLive); return this; } @@ -341,11 +374,16 @@ public ServiceBusMessage setTimeToLive(Duration timeToLive) { * Timestamps */ public OffsetDateTime getScheduledEnqueueTime() { - return scheduledEnqueueTime; + Object value = amqpAnnotatedMessage.getMessageAnnotations().get(SCHEDULED_ENQUEUE_UTC_TIME_NAME.getValue()); + return value != null + ? ((Date) value).toInstant().atOffset(ZoneOffset.UTC) + : null; } /** - * Sets the scheduled enqueue time of this message. + * Sets the scheduled enqueue time of this message. A {@code null} will not be set. If this value needs to be unset + * it could be done by value removing from {@link AmqpAnnotatedMessage#getMessageAnnotations()} using key + * {@link AmqpMessageConstant#SCHEDULED_ENQUEUE_UTC_TIME_NAME}. * * @param scheduledEnqueueTime the datetime at which this message should be enqueued in Azure Service Bus. * @@ -353,7 +391,10 @@ public OffsetDateTime getScheduledEnqueueTime() { * @see #getScheduledEnqueueTime() */ public ServiceBusMessage setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime) { - this.scheduledEnqueueTime = scheduledEnqueueTime; + if (scheduledEnqueueTime != null) { + amqpAnnotatedMessage.getMessageAnnotations().put(SCHEDULED_ENQUEUE_UTC_TIME_NAME.getValue(), + scheduledEnqueueTime); + } return this; } @@ -368,7 +409,7 @@ public ServiceBusMessage setScheduledEnqueueTime(OffsetDateTime scheduledEnqueue * Routing and Correlation */ public String getReplyToSessionId() { - return replyToSessionId; + return amqpAnnotatedMessage.getProperties().getReplyToGroupId(); } /** @@ -379,7 +420,7 @@ public String getReplyToSessionId() { * @return The updated {@link ServiceBusMessage}. */ public ServiceBusMessage setReplyToSessionId(String replyToSessionId) { - this.replyToSessionId = replyToSessionId; + amqpAnnotatedMessage.getProperties().setReplyToGroupId(replyToSessionId); return this; } @@ -395,7 +436,7 @@ public ServiceBusMessage setReplyToSessionId(String replyToSessionId) { * and Send Via */ public String getViaPartitionKey() { - return viaPartitionKey; + return (String) amqpAnnotatedMessage.getMessageAnnotations().get(VIA_PARTITION_KEY_ANNOTATION_NAME.getValue()); } /** @@ -407,7 +448,7 @@ public String getViaPartitionKey() { * @see #getViaPartitionKey() */ public ServiceBusMessage setViaPartitionKey(String viaPartitionKey) { - this.viaPartitionKey = viaPartitionKey; + amqpAnnotatedMessage.getMessageAnnotations().put(VIA_PARTITION_KEY_ANNOTATION_NAME.getValue(), viaPartitionKey); return this; } @@ -417,7 +458,7 @@ public ServiceBusMessage setViaPartitionKey(String viaPartitionKey) { * @return Session Id of the {@link ServiceBusMessage}. */ public String getSessionId() { - return sessionId; + return amqpAnnotatedMessage.getProperties().getGroupId(); } /** @@ -428,7 +469,7 @@ public String getSessionId() { * @return The updated {@link ServiceBusMessage}. */ public ServiceBusMessage setSessionId(String sessionId) { - this.sessionId = sessionId; + amqpAnnotatedMessage.getProperties().setGroupId(sessionId); return this; } @@ -458,4 +499,13 @@ public ServiceBusMessage addContext(String key, Object value) { return this; } + + /* + * Gets value from given map. + */ + private void removeValues(Map dataMap, AmqpMessageConstant... keys) { + for (AmqpMessageConstant key : keys) { + dataMap.remove(key.getValue()); + } + } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageBatch.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageBatch.java index d4c94b1dcb775..57d5f363fc8da 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageBatch.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageBatch.java @@ -144,7 +144,8 @@ private ServiceBusMessage traceMessageSpan(ServiceBusMessage serviceBusMessage) Context eventSpanContext = tracerProvider.startSpan(serviceBusMessage.getContext(), ProcessKind.MESSAGE); Optional eventDiagnosticIdOptional = eventSpanContext.getData(DIAGNOSTIC_ID_KEY); if (eventDiagnosticIdOptional.isPresent()) { - serviceBusMessage.getProperties().put(DIAGNOSTIC_ID_KEY, eventDiagnosticIdOptional.get().toString()); + serviceBusMessage.getApplicationProperties().put(DIAGNOSTIC_ID_KEY, eventDiagnosticIdOptional.get() + .toString()); tracerProvider.endSpan(eventSpanContext, Signal.complete()); serviceBusMessage.addContext(SPAN_CONTEXT_KEY, eventSpanContext); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageSerializer.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageSerializer.java index 9e06ac82c6748..ad2aab025c63c 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageSerializer.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessageSerializer.java @@ -3,9 +3,15 @@ package com.azure.messaging.servicebus; +import static com.azure.core.amqp.AmqpMessageConstant.SCHEDULED_ENQUEUE_UTC_TIME_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.PARTITION_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.VIA_PARTITION_KEY_ANNOTATION_NAME; import com.azure.core.amqp.exception.AmqpResponseCode; import com.azure.core.amqp.implementation.MessageSerializer; import com.azure.core.amqp.implementation.RequestResponseUtils; +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.AmqpMessageHeader; +import com.azure.core.amqp.models.AmqpMessageProperties; import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.servicebus.implementation.ManagementConstants; import com.azure.messaging.servicebus.implementation.MessageWithLockToken; @@ -24,6 +30,8 @@ import org.apache.qpid.proton.amqp.messaging.AmqpValue; 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.Properties; import org.apache.qpid.proton.amqp.messaging.Section; @@ -53,18 +61,6 @@ */ class ServiceBusMessageSerializer implements MessageSerializer { private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; - private static final String ENQUEUED_TIME_UTC_NAME = "x-opt-enqueued-time"; - private static final String SCHEDULED_ENQUEUE_TIME_NAME = "x-opt-scheduled-enqueue-time"; - private static final String SEQUENCE_NUMBER_NAME = "x-opt-sequence-number"; - private static final String LOCKED_UNTIL_NAME = "x-opt-locked-until"; - private static final String PARTITION_KEY_NAME = "x-opt-partition-key"; - private static final String VIA_PARTITION_KEY_NAME = "x-opt-via-partition-key"; - private static final String DEAD_LETTER_SOURCE_NAME = "x-opt-deadletter-source"; - private static final String DEAD_LETTER_DESCRIPTION = "DeadLetterErrorDescription"; - private static final String DEAD_LETTER_REASON = "DeadLetterReason"; - - // This one appears to always be 0, but is always returned with each message. - private static final String ENQUEUED_SEQUENCE_NUMBER = "x-opt-enqueue-sequence-number"; private final ClientLogger logger = new ClientLogger(ServiceBusMessageSerializer.class); @@ -132,8 +128,8 @@ public Message serialize(T object) { //TODO (conniey): support AMQP sequence and AMQP value. amqpMessage.setBody(new Data(new Binary(body))); - if (brokeredMessage.getProperties() != null) { - amqpMessage.setApplicationProperties(new ApplicationProperties(brokeredMessage.getProperties())); + if (brokeredMessage.getApplicationProperties() != null) { + amqpMessage.setApplicationProperties(new ApplicationProperties(brokeredMessage.getApplicationProperties())); } if (brokeredMessage.getTimeToLive() != null) { @@ -143,34 +139,82 @@ public Message serialize(T object) { if (amqpMessage.getProperties() == null) { amqpMessage.setProperties(new Properties()); } - amqpMessage.setMessageId(brokeredMessage.getMessageId()); amqpMessage.setContentType(brokeredMessage.getContentType()); amqpMessage.setCorrelationId(brokeredMessage.getCorrelationId()); - amqpMessage.setSubject(brokeredMessage.getLabel()); - amqpMessage.getProperties().setTo(brokeredMessage.getTo()); + amqpMessage.setSubject(brokeredMessage.getSubject()); amqpMessage.setReplyTo(brokeredMessage.getReplyTo()); amqpMessage.setReplyToGroupId(brokeredMessage.getReplyToSessionId()); amqpMessage.setGroupId(brokeredMessage.getSessionId()); + final AmqpMessageProperties brokeredProperties = brokeredMessage.getAmqpAnnotatedMessage().getProperties(); + + amqpMessage.setContentEncoding(brokeredProperties.getContentEncoding()); + if (brokeredProperties.getGroupSequence() != null) { + amqpMessage.setGroupSequence(brokeredProperties.getGroupSequence()); + } + amqpMessage.getProperties().setTo(brokeredMessage.getTo()); + amqpMessage.getProperties().setUserId(new Binary(brokeredProperties.getUserId())); + + if (brokeredProperties.getAbsoluteExpiryTime() != null) { + amqpMessage.getProperties().setAbsoluteExpiryTime(Date.from(brokeredProperties.getAbsoluteExpiryTime() + .toInstant())); + } + if (brokeredProperties.getCreationTime() != null) { + amqpMessage.getProperties().setCreationTime(Date.from(brokeredProperties.getCreationTime().toInstant())); + } + + //set footer + amqpMessage.setFooter(new Footer(brokeredMessage.getAmqpAnnotatedMessage().getFooter())); + + //set header + AmqpMessageHeader header = brokeredMessage.getAmqpAnnotatedMessage().getHeader(); + if (header.getDeliveryCount() != null) { + amqpMessage.setDeliveryCount(header.getDeliveryCount()); + } + if (header.getPriority() != null) { + amqpMessage.setPriority(header.getPriority()); + } + if (header.isDurable() != null) { + amqpMessage.setDurable(header.isDurable()); + } + if (header.isFirstAcquirer() != null) { + amqpMessage.setFirstAcquirer(header.isFirstAcquirer()); + } + if (header.getTimeToLive() != null) { + amqpMessage.setTtl(header.getTimeToLive().toMillis()); + } + final Map messageAnnotationsMap = new HashMap<>(); if (brokeredMessage.getScheduledEnqueueTime() != null) { - messageAnnotationsMap.put(Symbol.valueOf(SCHEDULED_ENQUEUE_TIME_NAME), + messageAnnotationsMap.put(Symbol.valueOf(SCHEDULED_ENQUEUE_UTC_TIME_NAME.getValue()), Date.from(brokeredMessage.getScheduledEnqueueTime().toInstant())); } final String partitionKey = brokeredMessage.getPartitionKey(); if (partitionKey != null && !partitionKey.isEmpty()) { - messageAnnotationsMap.put(Symbol.valueOf(PARTITION_KEY_NAME), brokeredMessage.getPartitionKey()); + messageAnnotationsMap.put(Symbol.valueOf(PARTITION_KEY_ANNOTATION_NAME.getValue()), + brokeredMessage.getPartitionKey()); } final String viaPartitionKey = brokeredMessage.getViaPartitionKey(); if (viaPartitionKey != null && !viaPartitionKey.isEmpty()) { - messageAnnotationsMap.put(Symbol.valueOf(VIA_PARTITION_KEY_NAME), viaPartitionKey); + messageAnnotationsMap.put(Symbol.valueOf(VIA_PARTITION_KEY_ANNOTATION_NAME.getValue()), viaPartitionKey); } amqpMessage.setMessageAnnotations(new MessageAnnotations(messageAnnotationsMap)); + // Set Delivery Annotations. + final Map deliveryAnnotationsMap = new HashMap<>(); + + final Map deliveryAnnotations = brokeredMessage.getAmqpAnnotatedMessage() + .getDeliveryAnnotations(); + for (Map.Entry deliveryEntry : deliveryAnnotations.entrySet()) { + deliveryAnnotationsMap.put(Symbol.valueOf(deliveryEntry.getKey()), deliveryEntry.getValue()); + } + + amqpMessage.setDeliveryAnnotations(new DeliveryAnnotations(deliveryAnnotationsMap)); + return amqpMessage; } @@ -317,106 +361,92 @@ private List deserializeListOfMessages(Message amqpMe } private ServiceBusReceivedMessage deserializeMessage(Message amqpMessage) { - final ServiceBusReceivedMessage brokeredMessage; + final byte[] bytes; final Section body = amqpMessage.getBody(); if (body != null) { //TODO (conniey): Support other AMQP types like AmqpValue and AmqpSequence. if (body instanceof Data) { final Binary messageData = ((Data) body).getValue(); - final byte[] bytes = messageData.getArray(); - brokeredMessage = new ServiceBusReceivedMessage(bytes); + bytes = messageData.getArray(); } else { logger.warning(String.format(Messages.MESSAGE_NOT_OF_TYPE, body.getType())); - brokeredMessage = new ServiceBusReceivedMessage(EMPTY_BYTE_ARRAY); + bytes = EMPTY_BYTE_ARRAY; } } else { logger.warning(String.format(Messages.MESSAGE_NOT_OF_TYPE, "null")); - brokeredMessage = new ServiceBusReceivedMessage(EMPTY_BYTE_ARRAY); + bytes = EMPTY_BYTE_ARRAY; } + final ServiceBusReceivedMessage brokeredMessage = new ServiceBusReceivedMessage(bytes); + AmqpAnnotatedMessage brokeredAmqpAnnotatedMessage = brokeredMessage.getAmqpAnnotatedMessage(); // Application properties ApplicationProperties applicationProperties = amqpMessage.getApplicationProperties(); if (applicationProperties != null) { final Map propertiesValue = applicationProperties.getValue(); - brokeredMessage.getProperties().putAll(propertiesValue); - - if (propertiesValue.containsKey(DEAD_LETTER_REASON)) { - brokeredMessage.setDeadLetterReason(String.valueOf(propertiesValue.get(DEAD_LETTER_REASON))); - } - if (propertiesValue.containsKey(DEAD_LETTER_DESCRIPTION)) { - brokeredMessage.setDeadLetterErrorDescription(String.valueOf( - propertiesValue.get(DEAD_LETTER_DESCRIPTION))); - } + brokeredAmqpAnnotatedMessage.getApplicationProperties().putAll(propertiesValue); } // Header - brokeredMessage.setTimeToLive(Duration.ofMillis(amqpMessage.getTtl())); - brokeredMessage.setDeliveryCount(amqpMessage.getDeliveryCount()); + final AmqpMessageHeader brokeredHeader = brokeredAmqpAnnotatedMessage.getHeader(); + brokeredHeader.setTimeToLive(Duration.ofMillis(amqpMessage.getTtl())); + brokeredHeader.setDeliveryCount(amqpMessage.getDeliveryCount()); + brokeredHeader.setDurable(amqpMessage.getHeader().getDurable()); + brokeredHeader.setFirstAcquirer(amqpMessage.getHeader().getFirstAcquirer()); + brokeredHeader.setPriority(amqpMessage.getPriority()); + + // Footer + final Footer footer = amqpMessage.getFooter(); + if (footer != null && footer.getValue() != null) { + @SuppressWarnings("unchecked") final Map footerValue = footer.getValue(); + setValues(footerValue, brokeredAmqpAnnotatedMessage.getFooter()); + + } // Properties + final AmqpMessageProperties brokeredProperties = brokeredAmqpAnnotatedMessage.getProperties(); + brokeredProperties.setReplyToGroupId(amqpMessage.getReplyToGroupId()); + brokeredProperties.setReplyTo(amqpMessage.getReplyTo()); final Object messageId = amqpMessage.getMessageId(); if (messageId != null) { - brokeredMessage.setMessageId(messageId.toString()); + brokeredProperties.setMessageId(messageId.toString()); } - brokeredMessage.setContentType(amqpMessage.getContentType()); + brokeredProperties.setContentType(amqpMessage.getContentType()); final Object correlationId = amqpMessage.getCorrelationId(); if (correlationId != null) { - brokeredMessage.setCorrelationId(correlationId.toString()); + brokeredProperties.setCorrelationId(correlationId.toString()); } - final Properties properties = amqpMessage.getProperties(); - if (properties != null) { - brokeredMessage.setTo(properties.getTo()); + final Properties amqpProperties = amqpMessage.getProperties(); + if (amqpProperties != null) { + brokeredProperties.setTo(amqpProperties.getTo()); + + if (amqpProperties.getAbsoluteExpiryTime() != null) { + brokeredProperties.setAbsoluteExpiryTime(amqpProperties.getAbsoluteExpiryTime().toInstant() + .atOffset(ZoneOffset.UTC)); + } + if (amqpProperties.getCreationTime() != null) { + brokeredProperties.setCreationTime(amqpProperties.getCreationTime().toInstant() + .atOffset(ZoneOffset.UTC)); + } } - brokeredMessage.setLabel(amqpMessage.getSubject()); - brokeredMessage.setReplyTo(amqpMessage.getReplyTo()); - brokeredMessage.setReplyToSessionId(amqpMessage.getReplyToGroupId()); - brokeredMessage.setSessionId(amqpMessage.getGroupId()); + brokeredProperties.setSubject(amqpMessage.getSubject()); + brokeredProperties.setGroupId(amqpMessage.getGroupId()); + brokeredProperties.setContentEncoding(amqpMessage.getContentEncoding()); + brokeredProperties.setGroupSequence(amqpMessage.getGroupSequence()); + brokeredProperties.setUserId(amqpMessage.getUserId()); + + // DeliveryAnnotations + final DeliveryAnnotations deliveryAnnotations = amqpMessage.getDeliveryAnnotations(); + if (deliveryAnnotations != null) { + setValues(deliveryAnnotations.getValue(), brokeredAmqpAnnotatedMessage.getDeliveryAnnotations()); + } // Message Annotations final MessageAnnotations messageAnnotations = amqpMessage.getMessageAnnotations(); if (messageAnnotations != null) { - Map messageAnnotationsMap = messageAnnotations.getValue(); - if (messageAnnotationsMap != null) { - for (Map.Entry entry : messageAnnotationsMap.entrySet()) { - final String key = entry.getKey().toString(); - final Object value = entry.getValue(); - - switch (key) { - case ENQUEUED_TIME_UTC_NAME: - brokeredMessage.setEnqueuedTime(((Date) value).toInstant().atOffset(ZoneOffset.UTC)); - - break; - case SCHEDULED_ENQUEUE_TIME_NAME: - brokeredMessage.setScheduledEnqueueTime(((Date) value).toInstant() - .atOffset(ZoneOffset.UTC)); - break; - case SEQUENCE_NUMBER_NAME: - brokeredMessage.setSequenceNumber((long) value); - break; - case LOCKED_UNTIL_NAME: - brokeredMessage.setLockedUntil(((Date) value).toInstant().atOffset(ZoneOffset.UTC)); - break; - case PARTITION_KEY_NAME: - brokeredMessage.setPartitionKey((String) value); - break; - case VIA_PARTITION_KEY_NAME: - brokeredMessage.setViaPartitionKey((String) value); - break; - case DEAD_LETTER_SOURCE_NAME: - brokeredMessage.setDeadLetterSource((String) value); - break; - case ENQUEUED_SEQUENCE_NUMBER: - brokeredMessage.setEnqueuedSequenceNumber((long) value); - break; - default: - logger.info("Unrecognised key: {}, value: {}", key, value); - break; - } - } - } + setValues(messageAnnotations.getValue(), brokeredAmqpAnnotatedMessage.getMessageAnnotations()); } if (amqpMessage instanceof MessageWithLockToken) { @@ -445,6 +475,14 @@ private static int getPayloadSize(Message msg) { } } + private void setValues(Map sourceMap, Map targetMap) { + if (sourceMap != null) { + for (Map.Entry entry : sourceMap.entrySet()) { + targetMap.put(entry.getKey().toString(), entry.getValue()); + } + } + } + @SuppressWarnings("rawtypes") private static int sizeof(Object obj) { if (obj == null) { diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceivedMessage.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceivedMessage.java index e709f04901e93..33373fe9d7596 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceivedMessage.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceivedMessage.java @@ -3,12 +3,31 @@ package com.azure.messaging.servicebus; +import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_TIME_UTC_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.PARTITION_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.SCHEDULED_ENQUEUE_UTC_TIME_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.VIA_PARTITION_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.SEQUENCE_NUMBER_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.LOCKED_UNTIL_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_REASON_ANNOTATION_NAME; + +import com.azure.core.amqp.AmqpMessageConstant; +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.AmqpBodyType; +import com.azure.core.amqp.models.AmqpDataBody; +import com.azure.core.amqp.models.BinaryData; +import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.servicebus.models.ReceiveMode; import java.time.Duration; import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Arrays; -import java.util.HashMap; +import java.util.Collections; +import java.util.Date; import java.util.Map; import java.util.Objects; import java.util.UUID; @@ -17,34 +36,28 @@ * This class represents a received message from Service Bus. */ public final class ServiceBusReceivedMessage { + private final ClientLogger logger = new ClientLogger(ServiceBusReceivedMessage.class); + + private final AmqpAnnotatedMessage amqpAnnotatedMessage; + private final byte[] binaryData; private UUID lockToken; - private long sequenceNumber; - private long enqueuedSequenceNumber; - private long deliveryCount; - private OffsetDateTime enqueuedTime; - private OffsetDateTime lockedUntil; - private String deadLetterSource; - - private final Map properties; - private final byte[] body; - private String contentType; - private String correlationId; - private String label; - private String messageId; - private String partitionKey; - private String replyTo; - private String replyToSessionId; - private OffsetDateTime scheduledEnqueueTime; - private String sessionId; - private Duration timeToLive; - private String to; - private String viaPartitionKey; - private String deadLetterReason; - private String deadLetterErrorDescription; + + /** + * The representation of message as defined by AMQP protocol. + * + * @see + * Amqp Message Format. + * + * @return the {@link AmqpAnnotatedMessage} representing amqp message. + */ + public AmqpAnnotatedMessage getAmqpAnnotatedMessage() { + return amqpAnnotatedMessage; + } ServiceBusReceivedMessage(byte[] body) { - this.body = Objects.requireNonNull(body, "'body' cannot be null."); - this.properties = new HashMap<>(); + binaryData = Objects.requireNonNull(body, "'body' cannot be null."); + amqpAnnotatedMessage = new AmqpAnnotatedMessage(new AmqpDataBody(Collections.singletonList( + new BinaryData(binaryData)))); } /** @@ -52,14 +65,26 @@ public final class ServiceBusReceivedMessage { * *

    * If the means for deserializing the raw data is not apparent to consumers, a common technique is to make use of - * {@link #getProperties()} when creating the event, to associate serialization hints as an aid to consumers who - * wish to deserialize the binary data. + * {@link #getApplicationProperties()} when creating the event, to associate serialization hints as an aid to + * consumers who wish to deserialize the binary data. *

    * * @return A byte array representing the data. */ public byte[] getBody() { - return Arrays.copyOf(body, body.length); + final AmqpBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType(); + switch (bodyType) { + case DATA: + return Arrays.copyOf(binaryData, binaryData.length); + case SEQUENCE: + case VALUE: + throw logger.logExceptionAsError(new UnsupportedOperationException("Body type not supported yet " + + bodyType.toString())); + default: + logger.warning("Invalid body type {}.", bodyType); + throw logger.logExceptionAsError(new IllegalStateException("Body type not valid " + + bodyType.toString())); + } } /** @@ -68,7 +93,7 @@ public byte[] getBody() { * @return the contentType of the {@link ServiceBusReceivedMessage}. */ public String getContentType() { - return contentType; + return amqpAnnotatedMessage.getProperties().getContentType(); } /** @@ -84,7 +109,7 @@ public String getContentType() { * Routing and Correlation */ public String getCorrelationId() { - return correlationId; + return amqpAnnotatedMessage.getProperties().getCorrelationId(); } /** @@ -93,7 +118,8 @@ public String getCorrelationId() { * @return The description for a message that has been dead-lettered. */ public String getDeadLetterErrorDescription() { - return deadLetterErrorDescription; + return getStringValue(amqpAnnotatedMessage.getApplicationProperties(), + DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME.getValue()); } /** @@ -102,7 +128,8 @@ public String getDeadLetterErrorDescription() { * @return The reason for a message that has been dead-lettered. */ public String getDeadLetterReason() { - return deadLetterReason; + return getStringValue(amqpAnnotatedMessage.getApplicationProperties(), + DEAD_LETTER_REASON_ANNOTATION_NAME.getValue()); } /** @@ -119,7 +146,8 @@ public String getDeadLetterReason() { * queues */ public String getDeadLetterSource() { - return deadLetterSource; + return getStringValue(amqpAnnotatedMessage.getMessageAnnotations(), + DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME.getValue()); } /** @@ -134,7 +162,7 @@ public String getDeadLetterSource() { * transfers, locks, and settlement. */ public long getDeliveryCount() { - return deliveryCount; + return amqpAnnotatedMessage.getHeader().getDeliveryCount(); } /** @@ -149,7 +177,8 @@ public long getDeliveryCount() { * Timestamps */ public long getEnqueuedSequenceNumber() { - return this.enqueuedSequenceNumber; + return getLongValue(amqpAnnotatedMessage.getMessageAnnotations(), + ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME.getValue()); } /** @@ -165,7 +194,8 @@ public long getEnqueuedSequenceNumber() { * Timestamps */ public OffsetDateTime getEnqueuedTime() { - return enqueuedTime; + return getOffsetDateTimeValue(amqpAnnotatedMessage.getMessageAnnotations(), + ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue()); } /** @@ -182,6 +212,7 @@ public OffsetDateTime getEnqueuedTime() { */ public OffsetDateTime getExpiresAt() { final Duration timeToLive = getTimeToLive(); + final OffsetDateTime enqueuedTime = getEnqueuedTime(); return enqueuedTime != null && timeToLive != null ? enqueuedTime.plus(timeToLive) : null; @@ -193,7 +224,7 @@ public OffsetDateTime getExpiresAt() { * @return The label for the message. */ public String getLabel() { - return label; + return amqpAnnotatedMessage.getProperties().getSubject(); } /** @@ -232,14 +263,15 @@ public String getLockToken() { * transfers, locks, and settlement */ public OffsetDateTime getLockedUntil() { - return lockedUntil; + return getOffsetDateTimeValue(amqpAnnotatedMessage.getMessageAnnotations(), + LOCKED_UNTIL_KEY_ANNOTATION_NAME.getValue()); } /** * @return Id of the {@link ServiceBusReceivedMessage}. */ public String getMessageId() { - return messageId; + return amqpAnnotatedMessage.getProperties().getMessageId(); } /** @@ -257,7 +289,8 @@ public String getMessageId() { * entities */ public String getPartitionKey() { - return partitionKey; + return getStringValue(amqpAnnotatedMessage.getMessageAnnotations(), + PARTITION_KEY_ANNOTATION_NAME.getValue()); } /** @@ -268,8 +301,8 @@ public String getPartitionKey() { * * @return Application properties associated with this {@link ServiceBusReceivedMessage}. */ - public Map getProperties() { - return properties; + public Map getApplicationProperties() { + return amqpAnnotatedMessage.getApplicationProperties(); } /** @@ -285,7 +318,7 @@ public Map getProperties() { * Routing and Correlation */ public String getReplyTo() { - return replyTo; + return amqpAnnotatedMessage.getProperties().getReplyTo(); } /** @@ -300,7 +333,7 @@ public String getReplyTo() { * Routing and Correlation */ public String getReplyToSessionId() { - return replyToSessionId; + return amqpAnnotatedMessage.getProperties().getReplyToGroupId(); } /** @@ -318,7 +351,8 @@ public String getReplyToSessionId() { * Timestamps */ public OffsetDateTime getScheduledEnqueueTime() { - return scheduledEnqueueTime; + return getOffsetDateTimeValue(amqpAnnotatedMessage.getMessageAnnotations(), + SCHEDULED_ENQUEUE_UTC_TIME_NAME.getValue()); } /** @@ -335,7 +369,8 @@ public OffsetDateTime getScheduledEnqueueTime() { * Timestamps */ public long getSequenceNumber() { - return this.sequenceNumber; + return getLongValue(amqpAnnotatedMessage.getMessageAnnotations(), + SEQUENCE_NUMBER_ANNOTATION_NAME.getValue()); } /** @@ -344,7 +379,7 @@ public long getSequenceNumber() { * @return Session Id of the {@link ServiceBusReceivedMessage}. */ public String getSessionId() { - return sessionId; + return amqpAnnotatedMessage.getProperties().getGroupId(); } /** @@ -361,7 +396,7 @@ public String getSessionId() { * @see Message Expiration */ public Duration getTimeToLive() { - return timeToLive; + return amqpAnnotatedMessage.getHeader().getTimeToLive(); } /** @@ -370,7 +405,7 @@ public Duration getTimeToLive() { * @return "To" property value of this message */ public String getTo() { - return to; + return amqpAnnotatedMessage.getProperties().getTo(); } /** @@ -385,7 +420,8 @@ public String getTo() { * @see Transfers and Send Via */ public String getViaPartitionKey() { - return viaPartitionKey; + return getStringValue(amqpAnnotatedMessage.getMessageAnnotations(), + VIA_PARTITION_KEY_ANNOTATION_NAME.getValue()); } /** @@ -396,7 +432,7 @@ public String getViaPartitionKey() { * @see #getCorrelationId() */ void setCorrelationId(String correlationId) { - this.correlationId = correlationId; + amqpAnnotatedMessage.getProperties().setCorrelationId(correlationId); } /** @@ -405,7 +441,7 @@ void setCorrelationId(String correlationId) { * @param contentType of the message. */ void setContentType(String contentType) { - this.contentType = contentType; + amqpAnnotatedMessage.getProperties().setContentType(contentType); } /** @@ -414,7 +450,8 @@ void setContentType(String contentType) { * @param deadLetterErrorDescription Dead letter description. */ void setDeadLetterErrorDescription(String deadLetterErrorDescription) { - this.deadLetterErrorDescription = deadLetterErrorDescription; + amqpAnnotatedMessage.getApplicationProperties().put(DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME.getValue(), + deadLetterErrorDescription); } /** @@ -423,7 +460,8 @@ void setDeadLetterErrorDescription(String deadLetterErrorDescription) { * @param deadLetterReason Dead letter reason. */ void setDeadLetterReason(String deadLetterReason) { - this.deadLetterReason = deadLetterReason; + amqpAnnotatedMessage.getApplicationProperties().put(DEAD_LETTER_REASON_ANNOTATION_NAME.getValue(), + deadLetterReason); } /** @@ -434,7 +472,8 @@ void setDeadLetterReason(String deadLetterReason) { * before it was deadlettered. */ void setDeadLetterSource(String deadLetterSource) { - this.deadLetterSource = deadLetterSource; + amqpAnnotatedMessage.getMessageAnnotations().put(DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME.getValue(), + deadLetterSource); } /** @@ -443,11 +482,12 @@ void setDeadLetterSource(String deadLetterSource) { * @param deliveryCount the number of the times this message was delivered to clients. */ void setDeliveryCount(long deliveryCount) { - this.deliveryCount = deliveryCount; + amqpAnnotatedMessage.getHeader().setDeliveryCount(deliveryCount); } void setEnqueuedSequenceNumber(long enqueuedSequenceNumber) { - this.enqueuedSequenceNumber = enqueuedSequenceNumber; + amqpAnnotatedMessage.getMessageAnnotations().put(ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME.getValue(), + enqueuedSequenceNumber); } /** @@ -456,16 +496,16 @@ void setEnqueuedSequenceNumber(long enqueuedSequenceNumber) { * @param enqueuedTime the datetime at which this message was enqueued in Azure Service Bus. */ void setEnqueuedTime(OffsetDateTime enqueuedTime) { - this.enqueuedTime = enqueuedTime; + setValue(amqpAnnotatedMessage.getMessageAnnotations(), ENQUEUED_TIME_UTC_ANNOTATION_NAME, enqueuedTime); } /** - * Sets the label for the message. + * Sets the subject for the message. * - * @param label The label to set. + * @param subject The subject to set. */ - void setLabel(String label) { - this.label = label; + void setSubject(String subject) { + amqpAnnotatedMessage.getProperties().setSubject(subject); } /** @@ -483,7 +523,7 @@ void setLockToken(UUID lockToken) { * @param lockedUntil the datetime at which the lock of this message expires. */ void setLockedUntil(OffsetDateTime lockedUntil) { - this.lockedUntil = lockedUntil; + setValue(amqpAnnotatedMessage.getMessageAnnotations(), LOCKED_UNTIL_KEY_ANNOTATION_NAME, lockedUntil); } /** @@ -492,7 +532,7 @@ void setLockedUntil(OffsetDateTime lockedUntil) { * @param messageId to be set. */ void setMessageId(String messageId) { - this.messageId = messageId; + amqpAnnotatedMessage.getProperties().setMessageId(messageId); } /** @@ -503,7 +543,7 @@ void setMessageId(String messageId) { * @see #getPartitionKey() */ void setPartitionKey(String partitionKey) { - this.partitionKey = partitionKey; + amqpAnnotatedMessage.getMessageAnnotations().put(PARTITION_KEY_ANNOTATION_NAME.getValue(), partitionKey); } /** @@ -514,7 +554,7 @@ void setPartitionKey(String partitionKey) { * @see #getScheduledEnqueueTime() */ void setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime) { - this.scheduledEnqueueTime = scheduledEnqueueTime; + setValue(amqpAnnotatedMessage.getMessageAnnotations(), SCHEDULED_ENQUEUE_UTC_TIME_NAME, scheduledEnqueueTime); } /** @@ -523,7 +563,7 @@ void setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime) { * @param sequenceNumber the unique number assigned to a message by Service Bus. */ void setSequenceNumber(long sequenceNumber) { - this.sequenceNumber = sequenceNumber; + amqpAnnotatedMessage.getMessageAnnotations().put(SEQUENCE_NUMBER_ANNOTATION_NAME.getValue(), sequenceNumber); } /** @@ -532,7 +572,7 @@ void setSequenceNumber(long sequenceNumber) { * @param sessionId to be set. */ void setSessionId(String sessionId) { - this.sessionId = sessionId; + amqpAnnotatedMessage.getProperties().setGroupId(sessionId); } /** @@ -543,7 +583,7 @@ void setSessionId(String sessionId) { * @see #getTimeToLive() */ void setTimeToLive(Duration timeToLive) { - this.timeToLive = timeToLive; + amqpAnnotatedMessage.getHeader().setTimeToLive(timeToLive); } /** @@ -554,7 +594,7 @@ void setTimeToLive(Duration timeToLive) { * @see #getReplyTo() */ void setReplyTo(String replyTo) { - this.replyTo = replyTo; + amqpAnnotatedMessage.getProperties().setReplyTo(replyTo); } /** @@ -563,7 +603,7 @@ void setReplyTo(String replyTo) { * @param replyToSessionId ReplyToSessionId property value of this message */ void setReplyToSessionId(String replyToSessionId) { - this.replyToSessionId = replyToSessionId; + amqpAnnotatedMessage.getProperties().setReplyToGroupId(replyToSessionId); } /** @@ -577,7 +617,7 @@ void setReplyToSessionId(String replyToSessionId) { * @param to To property value of this message */ void setTo(String to) { - this.to = to; + amqpAnnotatedMessage.getProperties().setTo(to); } /** @@ -588,6 +628,34 @@ void setTo(String to) { * @see #getViaPartitionKey() */ void setViaPartitionKey(String viaPartitionKey) { - this.viaPartitionKey = viaPartitionKey; + amqpAnnotatedMessage.getMessageAnnotations().put(VIA_PARTITION_KEY_ANNOTATION_NAME.getValue(), viaPartitionKey); + } + + /* + * Gets String value from given map and null if key does not exists. + */ + private String getStringValue(Map dataMap, String key) { + return (String) dataMap.get(key); + } + + /* + * Gets long value from given map and 0 if key does not exists. + */ + private long getLongValue(Map dataMap, String key) { + return dataMap.containsKey(key) ? (long) dataMap.get(key) : 0; + } + + /* + * Gets OffsetDateTime value from given map and null if key does not exists. + */ + private OffsetDateTime getOffsetDateTimeValue(Map dataMap, String key) { + return dataMap.containsKey(key) ? ((Date) dataMap.get(key)).toInstant().atOffset(ZoneOffset.UTC) : null; + } + + private void setValue(Map dataMap, AmqpMessageConstant key, OffsetDateTime value) { + if (value != null) { + amqpAnnotatedMessage.getMessageAnnotations().put(key.getValue(), + new Date(value.toInstant().toEpochMilli())); + } } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java index c4fde770c3fc2..ffb3985056c0a 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java @@ -427,7 +427,7 @@ private Mono sendIterable(Iterable messages, ServiceBus } private Mono scheduleMessageInternal(ServiceBusMessage message, OffsetDateTime scheduledEnqueueTime, - ServiceBusTransactionContext transactionContext) { + ServiceBusTransactionContext transactionContext) { if (Objects.isNull(message)) { return monoError(logger, new NullPointerException("'message' cannot be null.")); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilter.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilter.java index da66d912e9add..3792823e6e11b 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilter.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/CorrelationRuleFilter.java @@ -16,7 +16,7 @@ * A CorrelationRuleFilter holds a set of conditions that are matched against one of more of an arriving message's user * and system properties. A common use is a match against the {@link ServiceBusMessage#getCorrelationId()} property, but * the application can also choose to match against {@link ServiceBusMessage#getContentType()}, {@link - * ServiceBusMessage#getLabel()}, {@link ServiceBusMessage#getMessageId()}, {@link ServiceBusMessage#getReplyTo()}, + * ServiceBusMessage#getSubject()}, {@link ServiceBusMessage#getMessageId()}, {@link ServiceBusMessage#getReplyTo()}, * {@link ServiceBusMessage#getReplyToSessionId()}, {@link ServiceBusMessage#getSessionId()}, {@link * ServiceBusMessage#getTo()}, and any user-defined properties. A match exists when an arriving message's value for a * property is equal to the value specified in the correlation filter. For string expressions, the comparison is diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientJavaDocCodeSamples.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientJavaDocCodeSamples.java index 08dd588c842e8..a9dadc7bc03a1 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientJavaDocCodeSamples.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientJavaDocCodeSamples.java @@ -94,9 +94,9 @@ public void batchSizeLimited() { .buildAsyncClient(); final ServiceBusMessage firstMessage = new ServiceBusMessage("92".getBytes(UTF_8)); - firstMessage.getProperties().put("telemetry", "latency"); + firstMessage.getApplicationProperties().put("telemetry", "latency"); final ServiceBusMessage secondMessage = new ServiceBusMessage("98".getBytes(UTF_8)); - secondMessage.getProperties().put("telemetry", "cpu-temperature"); + secondMessage.getApplicationProperties().put("telemetry", "cpu-temperature"); // BEGIN: com.azure.messaging.servicebus.servicebusasyncsenderclient.createBatch#CreateBatchOptionsLimitedSize final Flux telemetryMessages = Flux.just(firstMessage, secondMessage); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSenderClientJavaDocCodeSamples.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSenderClientJavaDocCodeSamples.java index 3e1f5a8745268..b9506539e0829 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSenderClientJavaDocCodeSamples.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSenderClientJavaDocCodeSamples.java @@ -80,11 +80,11 @@ public void batchSizeLimited() { .buildClient(); final ServiceBusMessage firstMessage = new ServiceBusMessage("message-1".getBytes(UTF_8)); - firstMessage.getProperties().put("telemetry", "latency"); + firstMessage.getApplicationProperties().put("telemetry", "latency"); final ServiceBusMessage secondMessage = new ServiceBusMessage("message-2".getBytes(UTF_8)); - secondMessage.getProperties().put("telemetry", "cpu-temperature"); + secondMessage.getApplicationProperties().put("telemetry", "cpu-temperature"); final ServiceBusMessage thirdMessage = new ServiceBusMessage("message-3".getBytes(UTF_8)); - thirdMessage.getProperties().put("telemetry", "fps"); + thirdMessage.getApplicationProperties().put("telemetry", "fps"); // BEGIN: com.azure.messaging.servicebus.servicebussenderclient.createBatch#CreateBatchOptions-int diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusMessageSerializerTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusMessageSerializerTest.java index e8c2745955738..c8ac8ec4ed956 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusMessageSerializerTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusMessageSerializerTest.java @@ -5,8 +5,11 @@ import com.azure.core.amqp.exception.AmqpResponseCode; import org.apache.qpid.proton.Proton; +import org.apache.qpid.proton.amqp.Symbol; import org.apache.qpid.proton.amqp.messaging.AmqpValue; import org.apache.qpid.proton.amqp.messaging.ApplicationProperties; +import org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations; +import org.apache.qpid.proton.amqp.messaging.Footer; import org.apache.qpid.proton.message.Message; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -82,34 +85,58 @@ void deserializeMessage() { message.setReplyToGroupId("reply-to-session-id-property"); message.setGroupId("session-id-as-a-group-id"); + // Message Annotations + Map expectedMessageAnnotations = message.getMessageAnnotations().getValue(); + expectedMessageAnnotations.put(Symbol.valueOf("A"), "A value"); + + // Message Annotations + Map expectedDeliveryAnnotations = new HashMap<>(); + expectedDeliveryAnnotations.put(Symbol.valueOf("D"), "D value"); + message.setDeliveryAnnotations(new DeliveryAnnotations(expectedDeliveryAnnotations)); + + Map expectedFooterValues = new HashMap<>(); + expectedFooterValues.put(Symbol.valueOf("footer1"), "footer value"); + message.setFooter(new Footer(expectedFooterValues)); + // Act - final ServiceBusReceivedMessage serviceBusMessage = serializer.deserialize(message, ServiceBusReceivedMessage.class); + final ServiceBusReceivedMessage actualMessage = serializer.deserialize(message, ServiceBusReceivedMessage.class); // Assert // Verifying all our system properties were properly deserialized. - assertNotNull(serviceBusMessage.getEnqueuedTime()); - assertEquals(SEQUENCE_NUMBER, serviceBusMessage.getSequenceNumber()); + assertNotNull(actualMessage.getEnqueuedTime()); + assertEquals(SEQUENCE_NUMBER, actualMessage.getSequenceNumber()); // Verifying that all our properties are set. - assertEquals(message.getTtl(), serviceBusMessage.getTimeToLive().toMillis()); - assertEquals(message.getSubject(), serviceBusMessage.getLabel()); - assertEquals(message.getReplyTo(), serviceBusMessage.getReplyTo()); - assertEquals(message.getDeliveryCount(), serviceBusMessage.getDeliveryCount()); - assertEquals(message.getProperties().getTo(), serviceBusMessage.getTo()); - assertEquals(message.getReplyToGroupId(), serviceBusMessage.getReplyToSessionId()); - assertEquals(message.getGroupId(), serviceBusMessage.getSessionId()); - assertEquals(message.getContentType(), serviceBusMessage.getContentType()); - assertEquals(message.getCorrelationId(), serviceBusMessage.getCorrelationId()); + assertEquals(message.getTtl(), actualMessage.getTimeToLive().toMillis()); + assertEquals(message.getSubject(), actualMessage.getLabel()); + assertEquals(message.getReplyTo(), actualMessage.getReplyTo()); + assertEquals(message.getDeliveryCount(), actualMessage.getDeliveryCount()); + assertEquals(message.getProperties().getTo(), actualMessage.getTo()); + assertEquals(message.getReplyToGroupId(), actualMessage.getReplyToSessionId()); + assertEquals(message.getGroupId(), actualMessage.getSessionId()); + assertEquals(message.getContentType(), actualMessage.getContentType()); + assertEquals(message.getCorrelationId(), actualMessage.getCorrelationId()); + + assertValues(expectedMessageAnnotations, actualMessage.getAmqpAnnotatedMessage().getMessageAnnotations()); + assertValues(expectedDeliveryAnnotations, actualMessage.getAmqpAnnotatedMessage().getDeliveryAnnotations()); + assertValues(expectedFooterValues, actualMessage.getAmqpAnnotatedMessage().getFooter()); // Verifying our application properties are the same. - assertEquals(APPLICATION_PROPERTIES.size(), serviceBusMessage.getProperties().size()); + assertEquals(APPLICATION_PROPERTIES.size(), actualMessage.getApplicationProperties().size()); APPLICATION_PROPERTIES.forEach((key, value) -> { - Assertions.assertTrue(serviceBusMessage.getProperties().containsKey(key)); - assertEquals(value, serviceBusMessage.getProperties().get(key)); + Assertions.assertTrue(actualMessage.getApplicationProperties().containsKey(key)); + assertEquals(value, actualMessage.getApplicationProperties().get(key)); }); // Verifying the contents of our message is the same. - assertEquals(payload, new String(serviceBusMessage.getBody(), UTF_8)); + assertEquals(payload, new String(actualMessage.getBody(), UTF_8)); + } + + private void assertValues(Map expected, Map actual) { + assertEquals(expected.size(), actual.size()); + for (Map.Entry expectedEntry : expected.entrySet()) { + assertEquals(expectedEntry.getValue(), actual.get(expectedEntry.getKey().toString())); + } } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusMessageTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusMessageTest.java index b060a8d731561..aab956b1a4c55 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusMessageTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusMessageTest.java @@ -3,18 +3,158 @@ package com.azure.messaging.servicebus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_REASON_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_TIME_UTC_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.LOCKED_UNTIL_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.PARTITION_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.SEQUENCE_NUMBER_ANNOTATION_NAME; import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotSame; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.time.Duration; + +/** + * Test for {@link ServiceBusMessage}. + */ public class ServiceBusMessageTest { // Create a giant payload with 10000 characters that are "a". private static final String PAYLOAD = new String(new char[10000]).replace("\0", "a"); private static final byte[] PAYLOAD_BYTES = PAYLOAD.getBytes(UTF_8); + /** + * Verifies we correctly set values via copy constructor for {@link ServiceBusMessage}. + * 1. And ensure system properties are cleared. + * 2. Ensure modifying original `ServiceBusReceivedMessage` object does not change values of new ServiceBusMessage + * object created using original `ServiceBusReceivedMessage`. + */ + @Test + public void copyConstructorTest() { + // Arrange + final String expectedSubject = "old-subject"; + final String expectedTo = "old-to"; + final String expectedReplyTo = "old-reply-to"; + final String expectedReplyToSessionId = "old-reply-to-session-id"; + final String expectedCorrelationId = "old-d-id"; + final String expectedDeadLetterSource = "old-d-l-source"; + final Duration expectedTimeToLive = Duration.ofSeconds(20); + final String expectedPartitionKey = "old-p-key"; + + final ServiceBusReceivedMessage expected = new ServiceBusReceivedMessage(PAYLOAD_BYTES); + expected.getAmqpAnnotatedMessage().getMessageAnnotations().put(SEQUENCE_NUMBER_ANNOTATION_NAME.getValue(), "10"); + expected.getAmqpAnnotatedMessage().getMessageAnnotations().put(DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME.getValue(), "abc"); + expected.getAmqpAnnotatedMessage().getMessageAnnotations().put(ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME.getValue(), "11"); + expected.getAmqpAnnotatedMessage().getMessageAnnotations().put(ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue(), "11"); + expected.getAmqpAnnotatedMessage().getApplicationProperties().put(DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME.getValue(), "abc"); + expected.getAmqpAnnotatedMessage().getApplicationProperties().put(DEAD_LETTER_REASON_ANNOTATION_NAME.getValue(), "abc"); + expected.setSubject(expectedSubject); + expected.setTo(expectedTo); + expected.setReplyTo(expectedReplyTo); + expected.setReplyToSessionId(expectedReplyToSessionId); + expected.setCorrelationId(expectedCorrelationId); + expected.setDeadLetterSource(expectedDeadLetterSource); + expected.setTimeToLive(expectedTimeToLive); + expected.setPartitionKey(expectedPartitionKey); + + final ServiceBusMessage actual = new ServiceBusMessage(expected); + + // Act + // Modify the values after invoking copy constructor + expected.setSubject("new-subject"); + expected.setTo("new-to"); + expected.setReplyTo("new-reply-to"); + expected.setReplyToSessionId("new-session-id"); + expected.setCorrelationId("new-c-id"); + expected.setTimeToLive(Duration.ofSeconds(40)); + expected.setPartitionKey("new-p-key"); + + // Assert + assertNotSame(expected.getAmqpAnnotatedMessage(), actual.getAmqpAnnotatedMessage()); + + // Validate updated values + assertEquals(expectedSubject, actual.getSubject()); + assertEquals(expectedTo, actual.getTo()); + assertEquals(expectedReplyTo, actual.getReplyTo()); + assertEquals(expectedReplyToSessionId, actual.getReplyToSessionId()); + assertEquals(expectedCorrelationId, actual.getCorrelationId()); + assertEquals(expectedTimeToLive, actual.getTimeToLive()); + assertEquals(expectedPartitionKey, actual.getPartitionKey()); + + // Following values should be reset. + assertNull(actual.getAmqpAnnotatedMessage().getMessageAnnotations().get(LOCKED_UNTIL_KEY_ANNOTATION_NAME.getValue())); + assertNull(actual.getAmqpAnnotatedMessage().getMessageAnnotations().get(SEQUENCE_NUMBER_ANNOTATION_NAME.getValue())); + assertNull(actual.getAmqpAnnotatedMessage().getMessageAnnotations().get(DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME.getValue())); + assertNull(actual.getAmqpAnnotatedMessage().getMessageAnnotations().get(ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME.getValue())); + assertNull(actual.getAmqpAnnotatedMessage().getMessageAnnotations().get(ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue())); + + assertNull(actual.getAmqpAnnotatedMessage().getApplicationProperties().get(DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME.getValue())); + assertNull(actual.getAmqpAnnotatedMessage().getApplicationProperties().get(DEAD_LETTER_REASON_ANNOTATION_NAME.getValue())); + assertNull(actual.getAmqpAnnotatedMessage().getHeader().getDeliveryCount()); + } + + + /** + * Verifies we correctly set values via copy constructor for {@link ServiceBusMessage}. + * 1. Ensure modifying original `ServiceBusReceivedMessage` object does not change values of new ServiceBusMessage + * object changes its values. + */ + @Test + public void copyConstructorModifyAfterCopyTest() { + // Arrange + final String expectedSubject = "old-subject"; + final String expectedTo = "old-to"; + final String expectedReplyTo = "old-reply-to"; + final String expectedReplyToSessionId = "old-reply-to-session-id"; + final String expectedCorrelationId = "old-d-id"; + final String expectedDeadLetterSource = "old-d-l-source"; + final Duration expectedTimeToLive = Duration.ofSeconds(20); + final String expectedPartitionKey = "old-p-key"; + + final ServiceBusReceivedMessage originalMessage = new ServiceBusReceivedMessage(PAYLOAD_BYTES); + originalMessage.setSubject(expectedSubject); + originalMessage.setTo(expectedTo); + originalMessage.setReplyTo(expectedReplyTo); + originalMessage.setReplyToSessionId(expectedReplyToSessionId); + originalMessage.setCorrelationId(expectedCorrelationId); + originalMessage.setDeadLetterSource(expectedDeadLetterSource); + originalMessage.setTimeToLive(expectedTimeToLive); + originalMessage.setPartitionKey(expectedPartitionKey); + + final ServiceBusMessage copiedMessage = new ServiceBusMessage(originalMessage); + + // Act + // Modify the values after invoking copy constructor + copiedMessage.setSubject("new-subject"); + copiedMessage.setTo("new-to"); + copiedMessage.setReplyTo("new-reply-to"); + copiedMessage.setReplyToSessionId("new-session-id"); + copiedMessage.setCorrelationId("new-c-id"); + copiedMessage.setTimeToLive(Duration.ofSeconds(40)); + copiedMessage.setPartitionKey("new-p-key"); + + // Assert + // Validate updated values + assertEquals(expectedSubject, originalMessage.getAmqpAnnotatedMessage().getProperties().getSubject()); + assertEquals(expectedTo, originalMessage.getAmqpAnnotatedMessage().getProperties().getTo()); + assertEquals(expectedReplyTo, originalMessage.getAmqpAnnotatedMessage().getProperties().getReplyTo()); + assertEquals(expectedReplyToSessionId, originalMessage.getAmqpAnnotatedMessage().getProperties().getReplyToGroupId()); + assertEquals(expectedCorrelationId, originalMessage.getAmqpAnnotatedMessage().getProperties().getCorrelationId()); + + assertEquals(expectedTimeToLive, originalMessage.getAmqpAnnotatedMessage().getHeader().getTimeToLive()); + + assertEquals(expectedPartitionKey, originalMessage.getAmqpAnnotatedMessage().getMessageAnnotations().get(PARTITION_KEY_ANNOTATION_NAME.getValue())); + } + /** * Verify UTF_8 encoded body is created. */ @@ -48,7 +188,7 @@ void messagePropertiesShouldNotBeNull() { // Assert Assertions.assertNotNull(serviceBusMessageData.getBody()); Assertions.assertNotNull(serviceBusMessageData.getContext()); - Assertions.assertNotNull(serviceBusMessageData.getProperties()); + Assertions.assertNotNull(serviceBusMessageData.getApplicationProperties()); } /** diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceivedMessageTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceivedMessageTest.java index 093c6c189dd2a..6b89faa6e030d 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceivedMessageTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceivedMessageTest.java @@ -3,24 +3,41 @@ package com.azure.messaging.servicebus; -import org.junit.jupiter.api.Assertions; +import com.azure.core.amqp.AmqpMessageConstant; +import org.apache.qpid.proton.amqp.Binary; +import org.apache.qpid.proton.amqp.messaging.Data; +import org.apache.qpid.proton.message.Message; import org.junit.jupiter.api.Test; import java.time.Duration; - +import java.time.Instant; +import java.util.Date; +import java.util.Map; + +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_REASON_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.ENQUEUED_TIME_UTC_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.LOCKED_UNTIL_KEY_ANNOTATION_NAME; +import static com.azure.core.amqp.AmqpMessageConstant.SEQUENCE_NUMBER_ANNOTATION_NAME; import static java.nio.charset.StandardCharsets.UTF_8; +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.mockito.Mockito.mock; +import static org.mockito.Mockito.when; public class ServiceBusReceivedMessageTest { // Create a giant payload with 10000 characters that are "a". private static final String PAYLOAD = new String(new char[10000]).replace("\0", "a"); private static final byte[] PAYLOAD_BYTES = PAYLOAD.getBytes(UTF_8); - private static final String PAYLOAD_STRING = new String(PAYLOAD_BYTES); @Test public void byteArrayNotNull() { - assertThrows(NullPointerException.class, () -> new ServiceBusReceivedMessage((byte[]) null)); + assertThrows(NullPointerException.class, () -> new ServiceBusReceivedMessage(null)); } @Test @@ -29,8 +46,8 @@ public void messagePropertiesShouldNotBeNull() { final ServiceBusReceivedMessage receivedMessage = new ServiceBusReceivedMessage(PAYLOAD_BYTES); // Assert - Assertions.assertNotNull(receivedMessage.getBody()); - Assertions.assertNotNull(receivedMessage.getProperties()); + assertNotNull(receivedMessage.getBody()); + assertNotNull(receivedMessage.getApplicationProperties()); } @@ -47,8 +64,8 @@ public void canCreateWithEmptyArray() { // Assert final byte[] actual = serviceBusMessageData.getBody(); - Assertions.assertNotNull(actual); - Assertions.assertEquals(0, actual.length); + assertNotNull(actual); + assertEquals(0, actual.length); } /** @@ -60,13 +77,17 @@ public void canCreateWithBytePayload() { final ServiceBusReceivedMessage serviceBusMessageData = new ServiceBusReceivedMessage(PAYLOAD_BYTES); // Assert - Assertions.assertNotNull(serviceBusMessageData.getBody()); - Assertions.assertEquals(PAYLOAD, new String(serviceBusMessageData.getBody(), UTF_8)); + assertNotNull(serviceBusMessageData.getBody()); + assertEquals(PAYLOAD, new String(serviceBusMessageData.getBody(), UTF_8)); } @Test public void toServiceBusMessageTest() { //Arrange + Message amqpMessage = mock(Message.class); + Data data = new Data(new Binary(PAYLOAD_BYTES)); + when(amqpMessage.getBody()).thenReturn(data); + // final ServiceBusReceivedMessage originalMessage = new ServiceBusReceivedMessage(PAYLOAD_BYTES); originalMessage.setMessageId("mid"); originalMessage.setContentType("type"); @@ -75,24 +96,53 @@ public void toServiceBusMessageTest() { originalMessage.setViaPartitionKey("something"); originalMessage.setTimeToLive(Duration.ofSeconds(10)); originalMessage.setReplyToSessionId("rsessionid"); - originalMessage.setLabel("label"); + originalMessage.setSubject("subject"); originalMessage.setTo("to"); + final Map originalMessageAnnotations = originalMessage.getAmqpAnnotatedMessage().getMessageAnnotations(); + originalMessageAnnotations.put(DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME.getValue(), "message annotations"); + originalMessageAnnotations.put(ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME.getValue(), Long.valueOf(3)); + originalMessageAnnotations.put(LOCKED_UNTIL_KEY_ANNOTATION_NAME.getValue(), new Date(Instant.now().toEpochMilli())); + originalMessageAnnotations.put(ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue(), new Date(Instant.now().toEpochMilli())); + + originalMessageAnnotations.put(SEQUENCE_NUMBER_ANNOTATION_NAME.getValue(), Long.valueOf(3)); + + final Map originalApplicationProperties = originalMessage.getAmqpAnnotatedMessage().getApplicationProperties(); + originalApplicationProperties.put(DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME.getValue(), "description"); + originalApplicationProperties.put(DEAD_LETTER_REASON_ANNOTATION_NAME.getValue(), "description"); + + originalMessage.getAmqpAnnotatedMessage().getHeader().setDeliveryCount(Long.valueOf(5)); // Act - final ServiceBusMessage messageToSend = new ServiceBusMessage(originalMessage); + final ServiceBusMessage actual = new ServiceBusMessage(originalMessage); // Assert - Assertions.assertNotNull(messageToSend); - Assertions.assertNotNull(messageToSend.getBody()); - Assertions.assertEquals(PAYLOAD, new String(messageToSend.getBody(), UTF_8)); - Assertions.assertEquals(originalMessage.getMessageId(), messageToSend.getMessageId()); - Assertions.assertEquals(originalMessage.getContentType(), messageToSend.getContentType()); - Assertions.assertEquals(originalMessage.getCorrelationId(), messageToSend.getCorrelationId()); - Assertions.assertEquals(originalMessage.getReplyTo(), messageToSend.getReplyTo()); - Assertions.assertEquals(originalMessage.getViaPartitionKey(), messageToSend.getViaPartitionKey()); - Assertions.assertEquals(originalMessage.getTimeToLive().toMillis(), messageToSend.getTimeToLive().toMillis()); - Assertions.assertEquals(originalMessage.getLabel(), messageToSend.getLabel()); - Assertions.assertEquals(originalMessage.getReplyToSessionId(), messageToSend.getReplyToSessionId()); - Assertions.assertEquals(originalMessage.getTo(), messageToSend.getTo()); + assertNotNull(actual); + assertNotNull(actual.getBody()); + assertEquals(PAYLOAD, new String(actual.getBody(), UTF_8)); + assertEquals(originalMessage.getMessageId(), actual.getMessageId()); + assertEquals(originalMessage.getContentType(), actual.getContentType()); + assertEquals(originalMessage.getCorrelationId(), actual.getCorrelationId()); + assertEquals(originalMessage.getReplyTo(), actual.getReplyTo()); + assertEquals(originalMessage.getViaPartitionKey(), actual.getViaPartitionKey()); + assertEquals(originalMessage.getTimeToLive().toMillis(), actual.getTimeToLive().toMillis()); + assertEquals(originalMessage.getLabel(), actual.getSubject()); + assertEquals(originalMessage.getReplyToSessionId(), actual.getReplyToSessionId()); + assertEquals(originalMessage.getTo(), actual.getTo()); + + // Following values should be cleaned up. + assertNullValues(actual.getAmqpAnnotatedMessage().getMessageAnnotations(), DEAD_LETTER_SOURCE_KEY_ANNOTATION_NAME, + ENQUEUED_SEQUENCE_NUMBER_ANNOTATION_NAME, LOCKED_UNTIL_KEY_ANNOTATION_NAME, + SEQUENCE_NUMBER_ANNOTATION_NAME, ENQUEUED_TIME_UTC_ANNOTATION_NAME); + + assertNullValues(actual.getAmqpAnnotatedMessage().getApplicationProperties(), DEAD_LETTER_DESCRIPTION_ANNOTATION_NAME, + DEAD_LETTER_REASON_ANNOTATION_NAME); + + assertNull(actual.getAmqpAnnotatedMessage().getHeader().getDeliveryCount()); + } + + public void assertNullValues(Map dataMap, AmqpMessageConstant... keys) { + for (AmqpMessageConstant key : keys) { + assertNull(dataMap.get(key.getValue())); + } } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java index fddf42cc1e944..11cadd363de10 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientIntegrationTest.java @@ -3,6 +3,11 @@ package com.azure.messaging.servicebus; +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.AmqpDataBody; +import com.azure.core.amqp.models.AmqpMessageHeader; +import com.azure.core.amqp.models.AmqpMessageProperties; +import com.azure.core.amqp.models.BinaryData; import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.servicebus.administration.models.DeadLetterOptions; import com.azure.messaging.servicebus.implementation.DispositionStatus; @@ -23,6 +28,8 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.UUID; @@ -461,7 +468,7 @@ void peekBatchMessages(MessagingEntityType entityType, boolean isSessionEnabled) setSenderAndReceiver(entityType, TestUtils.USE_CASE_PEEK_BATCH_MESSAGES, isSessionEnabled); final BiConsumer checkCorrectMessage = (message, index) -> { - final Map properties = message.getProperties(); + final Map properties = message.getApplicationProperties(); final Object value = properties.get(MESSAGE_POSITION_ID); assertTrue(value instanceof Integer, "Did not contain correct position number: " + value); @@ -794,7 +801,7 @@ void sendReceiveMessageWithVariousPropertyTypes(MessagingEntityType entityType) final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage messageToSend = getMessage(messageId, isSessionEnabled); - Map sentProperties = messageToSend.getProperties(); + Map sentProperties = messageToSend.getApplicationProperties(); sentProperties.put("NullProperty", null); sentProperties.put("BooleanProperty", true); sentProperties.put("ByteProperty", (byte) 1); @@ -815,7 +822,7 @@ void sendReceiveMessageWithVariousPropertyTypes(MessagingEntityType entityType) messagesPending.decrementAndGet(); assertMessageEquals(receivedMessage, messageId, isSessionEnabled); - final Map received = receivedMessage.getMessage().getProperties(); + final Map received = receivedMessage.getMessage().getApplicationProperties(); assertEquals(sentProperties.size(), received.size()); @@ -953,6 +960,133 @@ void renewMessageLock(MessagingEntityType entityType) throws InterruptedExceptio .verify(Duration.ofMinutes(3)); } + /** + * Verifies that we can receive a message which have different section set (i.e header, footer, annotations, + * application properties etc). + */ + @MethodSource("com.azure.messaging.servicebus.IntegrationTestBase#messagingEntityProvider") + @ParameterizedTest + void receiveAndValidateProperties(MessagingEntityType entityType) { + // Arrange + final boolean isSessionEnabled = false; + final String subject = "subject"; + final Map footer = new HashMap<>(); + footer.put("footer-key-1", "footer-value-1"); + footer.put("footer-key-2", "footer-value-2"); + + final Map aplicaitonProperties = new HashMap<>(); + aplicaitonProperties.put("ap-key-1", "ap-value-1"); + aplicaitonProperties.put("ap-key-2", "ap-value-2"); + + final Map deliveryAnnotation = new HashMap<>(); + deliveryAnnotation.put("delivery-annotations-key-1", "delivery-annotations-value-1"); + deliveryAnnotation.put("delivery-annotations-key-2", "delivery-annotations-value-2"); + + setSenderAndReceiver(entityType, TestUtils.USE_CASE_VALIDATE_AMQP_PROPERTIES, isSessionEnabled); + + final String messageId = UUID.randomUUID().toString(); + final AmqpAnnotatedMessage expectedAmqpProperties = new AmqpAnnotatedMessage(new AmqpDataBody(Collections.singletonList(new BinaryData(CONTENTS_BYTES)))); + expectedAmqpProperties.getProperties().setSubject(subject); + expectedAmqpProperties.getProperties().setReplyToGroupId("r-gid"); + expectedAmqpProperties.getProperties().setReplyTo("replyto"); + expectedAmqpProperties.getProperties().setContentType("content-type"); + expectedAmqpProperties.getProperties().setCorrelationId("corelation-id"); + expectedAmqpProperties.getProperties().setTo("to"); + expectedAmqpProperties.getProperties().setAbsoluteExpiryTime(OffsetDateTime.now().plusSeconds(60)); + expectedAmqpProperties.getProperties().setUserId("user-id-1".getBytes()); + expectedAmqpProperties.getProperties().setContentEncoding("string"); + expectedAmqpProperties.getProperties().setGroupSequence(Long.valueOf(2)); + expectedAmqpProperties.getProperties().setCreationTime(OffsetDateTime.now().plusSeconds(30)); + + expectedAmqpProperties.getHeader().setPriority(Short.valueOf((short) 2)); + expectedAmqpProperties.getHeader().setFirstAcquirer(true); + expectedAmqpProperties.getHeader().setDurable(true); + + expectedAmqpProperties.getFooter().putAll(footer); + expectedAmqpProperties.getDeliveryAnnotations().putAll(deliveryAnnotation); + expectedAmqpProperties.getApplicationProperties().putAll(aplicaitonProperties); + + final ServiceBusMessage message = TestUtils.getServiceBusMessage(CONTENTS_BYTES, messageId); + + final AmqpAnnotatedMessage amqpAnnotatedMessage = message.getAmqpAnnotatedMessage(); + amqpAnnotatedMessage.getMessageAnnotations().putAll(expectedAmqpProperties.getMessageAnnotations()); + amqpAnnotatedMessage.getApplicationProperties().putAll(expectedAmqpProperties.getApplicationProperties()); + amqpAnnotatedMessage.getDeliveryAnnotations().putAll(expectedAmqpProperties.getDeliveryAnnotations()); + amqpAnnotatedMessage.getFooter().putAll(expectedAmqpProperties.getFooter()); + + final AmqpMessageHeader header = amqpAnnotatedMessage.getHeader(); + header.setFirstAcquirer(expectedAmqpProperties.getHeader().isFirstAcquirer()); + header.setTimeToLive(expectedAmqpProperties.getHeader().getTimeToLive()); + header.setDurable(expectedAmqpProperties.getHeader().isDurable()); + header.setDeliveryCount(expectedAmqpProperties.getHeader().getDeliveryCount()); + header.setPriority(expectedAmqpProperties.getHeader().getPriority()); + + final AmqpMessageProperties amqpMessageProperties = amqpAnnotatedMessage.getProperties(); + amqpMessageProperties.setReplyTo((expectedAmqpProperties.getProperties().getReplyTo())); + amqpMessageProperties.setContentEncoding((expectedAmqpProperties.getProperties().getContentEncoding())); + amqpMessageProperties.setAbsoluteExpiryTime((expectedAmqpProperties.getProperties().getAbsoluteExpiryTime())); + amqpMessageProperties.setSubject((expectedAmqpProperties.getProperties().getSubject())); + amqpMessageProperties.setContentType(expectedAmqpProperties.getProperties().getContentType()); + amqpMessageProperties.setCorrelationId(expectedAmqpProperties.getProperties().getCorrelationId()); + amqpMessageProperties.setTo(expectedAmqpProperties.getProperties().getTo()); + amqpMessageProperties.setGroupSequence(expectedAmqpProperties.getProperties().getGroupSequence()); + amqpMessageProperties.setUserId(expectedAmqpProperties.getProperties().getUserId()); + amqpMessageProperties.setAbsoluteExpiryTime(expectedAmqpProperties.getProperties().getAbsoluteExpiryTime()); + amqpMessageProperties.setCreationTime(expectedAmqpProperties.getProperties().getCreationTime()); + amqpMessageProperties.setReplyToGroupId(expectedAmqpProperties.getProperties().getReplyToGroupId()); + + // Send the message + sendMessage(message).block(TIMEOUT); + + StepVerifier.create(receiver.receiveMessages().map(ServiceBusReceivedMessageContext::getMessage)) + .assertNext(received -> { + assertNotNull(received.getLockToken()); + AmqpAnnotatedMessage actual = received.getAmqpAnnotatedMessage(); + try { + assertArrayEquals(CONTENTS_BYTES, message.getBody()); + assertEquals(expectedAmqpProperties.getHeader().getPriority(), actual.getHeader().getPriority()); + assertEquals(expectedAmqpProperties.getHeader().isFirstAcquirer(), actual.getHeader().isFirstAcquirer()); + assertEquals(expectedAmqpProperties.getHeader().isDurable(), actual.getHeader().isDurable()); + + assertEquals(expectedAmqpProperties.getProperties().getSubject(), actual.getProperties().getSubject()); + assertEquals(expectedAmqpProperties.getProperties().getReplyToGroupId(), actual.getProperties().getReplyToGroupId()); + assertEquals(expectedAmqpProperties.getProperties().getReplyTo(), actual.getProperties().getReplyTo()); + assertEquals(expectedAmqpProperties.getProperties().getContentType(), actual.getProperties().getContentType()); + assertEquals(expectedAmqpProperties.getProperties().getCorrelationId(), actual.getProperties().getCorrelationId()); + assertEquals(expectedAmqpProperties.getProperties().getTo(), actual.getProperties().getTo()); + assertEquals(expectedAmqpProperties.getProperties().getAbsoluteExpiryTime().toEpochSecond(), actual.getProperties().getAbsoluteExpiryTime().toEpochSecond()); + assertEquals(expectedAmqpProperties.getProperties().getSubject(), actual.getProperties().getSubject()); + assertEquals(expectedAmqpProperties.getProperties().getContentEncoding(), actual.getProperties().getContentEncoding()); + assertEquals(expectedAmqpProperties.getProperties().getGroupSequence(), actual.getProperties().getGroupSequence()); + assertEquals(expectedAmqpProperties.getProperties().getCreationTime().toEpochSecond(), actual.getProperties().getCreationTime().toEpochSecond()); + assertArrayEquals(expectedAmqpProperties.getProperties().getUserId(), actual.getProperties().getUserId()); + + assertMapValues(expectedAmqpProperties.getDeliveryAnnotations(), actual.getDeliveryAnnotations()); + assertMapValues(expectedAmqpProperties.getMessageAnnotations(), actual.getMessageAnnotations()); + assertMapValues(expectedAmqpProperties.getApplicationProperties(), actual.getApplicationProperties()); + assertMapValues(expectedAmqpProperties.getFooter(), actual.getFooter()); + } finally { + logger.info("Completing message."); + receiver.complete(received).block(Duration.ofSeconds(15)); + messagesPending.decrementAndGet(); + } + }) + .thenCancel() + .verify(Duration.ofMinutes(2)); + } + + /** + * Asserts the length and values with in the map. + */ + private void assertMapValues(Map expectedMap, Map actualMap) { + assertTrue(actualMap.size() >= expectedMap.size()); + Iterator expectedKeys = expectedMap.keySet().iterator(); + while (expectedKeys.hasNext()) { + String key = expectedKeys.next(); + assertEquals(expectedMap.get(key), actualMap.get(key), "Value is not equal for Key " + key); + } + } + /** * Sets the sender and receiver. If session is enabled, then a single-named session receiver is created. */ @@ -1046,6 +1180,5 @@ private ServiceBusClientBuilder.ServiceBusReceiverClientBuilder getDeadLetterRec default: throw logger.logExceptionAsError(new IllegalArgumentException("Unknown entity type: " + entityType)); } - } } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java index 3875224e2af46..3ca0041e90ffc 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java @@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.fail; /** - * Integration tests for {@link ServiceBusReceiverClient} from queues or subscriptions. + * Integration tests for {@link com.azure.messaging.servicebus.ServiceBusReceiverClient} from queues or subscriptions. */ @Tag("integration") class ServiceBusReceiverClientIntegrationTest extends IntegrationTestBase { @@ -739,7 +739,7 @@ void sendReceiveMessageWithVariousPropertyTypes(MessagingEntityType entityType, final ServiceBusMessage messageToSend = getMessage(messageId, isSessionEnabled); final int maxMessages = 1; - Map sentProperties = messageToSend.getProperties(); + Map sentProperties = messageToSend.getApplicationProperties(); sentProperties.put("NullProperty", null); sentProperties.put("BooleanProperty", true); sentProperties.put("ByteProperty", (byte) 1); @@ -770,7 +770,7 @@ void sendReceiveMessageWithVariousPropertyTypes(MessagingEntityType entityType, messagesPending.decrementAndGet(); assertMessageEquals(receivedMessage, messageId, isSessionEnabled); - final Map received = receivedMessage.getProperties(); + final Map received = receivedMessage.getApplicationProperties(); assertEquals(sentProperties.size(), received.size()); 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 c7dc1b1461266..3d5384d5376b3 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 @@ -235,7 +235,7 @@ void createsMessageBatchWithSize() { int batchSize = 1024; // Overhead when serializing an event, to figure out what the maximum size we can use for an event payload. - int eventOverhead = 46; + int eventOverhead = 75; int maxEventPayload = batchSize - eventOverhead; final AmqpSendLink link = mock(AmqpSendLink.class); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java index 8c46f3675c181..10c5c1c031fb1 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/TestUtils.java @@ -58,6 +58,7 @@ public class TestUtils { static final int USE_CASE_SEND_VIA_QUEUE_2 = 14; static final int USE_CASE_SEND_VIA_TOPIC_1 = 15; static final int USE_CASE_SEND_VIA_TOPIC_2 = 16; + static final int USE_CASE_VALIDATE_AMQP_PROPERTIES = 17; // An application property key to identify where in the stream this message was created. static final String MESSAGE_POSITION_ID = "message-position"; @@ -201,7 +202,7 @@ public static List getServiceBusMessages(int numberOfEvents, return IntStream.range(0, numberOfEvents) .mapToObj(number -> { final ServiceBusMessage message = getServiceBusMessage(content, messageId); - message.getProperties().put(MESSAGE_POSITION_ID, number); + message.getApplicationProperties().put(MESSAGE_POSITION_ID, number); return message; }) @@ -221,7 +222,7 @@ public static List getServiceBusMessages(int numberOfEvents, return IntStream.range(0, numberOfEvents) .mapToObj(number -> { final ServiceBusMessage message = getServiceBusMessage("Event " + number, messageId); - message.getProperties().put(MESSAGE_POSITION_ID, number); + message.getApplicationProperties().put(MESSAGE_POSITION_ID, number); return message; }) diff --git a/sdk/servicebus/test-resources.json b/sdk/servicebus/test-resources.json index ee1c184187f9b..97672339014ff 100644 --- a/sdk/servicebus/test-resources.json +++ b/sdk/servicebus/test-resources.json @@ -56,7 +56,7 @@ "namespaceDomainNameSuffix": "servicebus.windows.net", "queueName": "queue", "queueSessionName": "queue-session", - "numberOfInstances": 17, + "numberOfInstances": 20, "subscriptionName": "subscription", "subscriptionSessionName": "subscription-session", "serviceBusDataOwnerRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419')]", From 03fe53439dc890ef2b1516d7735e6325cb72c2dd Mon Sep 17 00:00:00 2001 From: Yijun Xie <48257664+YijunXieMS@users.noreply.github.com> Date: Wed, 9 Sep 2020 19:15:30 -0700 Subject: [PATCH 164/168] Update CODEOWNERS for event grid (#15002) * Update CODEOWNERS for event grid --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 59b53da109a2f..4f69904fc7296 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -39,6 +39,9 @@ # PRLabel: %DigitalTwins /sdk/digitaltwins/ @drwill-ms @timtay-microsoft @abhipsaMisra @vinagesh @azabbasi @bikamani @barustum +# PRLabel: %Event Grid +/sdk/eventgrid/ @srnagar @yijunxiems + # PRLabel: %Event Hubs /sdk/eventhubs/ @conniey @srnagar @mssfang @yijunxiems From c94fcb40923c289b9cb645b6dcab7a4b90b19ea7 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 10 Sep 2020 11:33:17 +0800 Subject: [PATCH 165/168] mgmt improve test (#14970) * enable test * fix delay in playback --- .../model/implementation/AcceptedImpl.java | 2 +- .../implementation/TypeSerializationTests.java | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java index c2734b3078edb..8ac24d4adb125 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java @@ -329,7 +329,7 @@ public static Accepted newAccepted( activationResponse, client.getSerializerAdapter(), client.getHttpPipeline(), - client.getDefaultPollInterval(), + SdkContext.getDelayDuration(client.getDefaultPollInterval()), innerType, innerType, convertOperation); diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/implementation/TypeSerializationTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/implementation/TypeSerializationTests.java index c5376985889d9..e462e4cd7196b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/implementation/TypeSerializationTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/implementation/TypeSerializationTests.java @@ -9,13 +9,13 @@ import com.azure.resourcemanager.resources.fluent.inner.DeploymentExtendedInner; import com.azure.resourcemanager.resources.fluent.inner.DeploymentInner; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import java.lang.reflect.Field; + public class TypeSerializationTests { @Test - @Disabled("To fix later as swagger changes on DeploymentExtendedInner") public void testDeploymentSerialization() throws Exception { final String templateJson = "{ \"/subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/\": {} }"; @@ -27,11 +27,15 @@ public void testDeploymentSerialization() throws Exception { Assertions.assertTrue(deploymentJson.contains("Microsoft.ManagedIdentity")); } - private static DeploymentInner createRequestFromInner(DeploymentImpl deployment) { + private static DeploymentInner createRequestFromInner(DeploymentImpl deployment) throws NoSuchFieldException, IllegalAccessException { + Field field = DeploymentImpl.class.getDeclaredField("deploymentCreateUpdateParameters"); + field.setAccessible(true); + DeploymentInner implInner = (DeploymentInner) field.get(deployment); + DeploymentInner inner = new DeploymentInner() .withProperties(new DeploymentProperties()); inner.properties().withMode(deployment.mode()); - //inner.properties().withTemplate(deployment.template()); + inner.properties().withTemplate(implInner.properties().template()); inner.properties().withTemplateLink(deployment.templateLink()); inner.properties().withParameters(deployment.parameters()); inner.properties().withParametersLink(deployment.parametersLink()); From d8bdf647461200941e371a16abf3f56194e62c74 Mon Sep 17 00:00:00 2001 From: Bhaskar Mallapragada Date: Wed, 9 Sep 2020 21:43:49 -0700 Subject: [PATCH 166/168] Updating user agent and adding query annotation snippets to readme (#14998) * - Updating user agent as per the guidelines. - Adding query annotation snippets to readme. * readme changes --- .../azure-spring-data-cosmos-core/README.md | 70 ++++++++++++++----- .../azure/spring/data/cosmos/Constants.java | 3 +- .../spring/data/cosmos/CosmosFactory.java | 2 +- ...riesUserReactiveRepositoryCodeSnippet.java | 20 ++++++ ...tatedQueriesUserRepositoryCodeSnippet.java | 17 +++++ .../data/cosmos/CosmosFactoryTestIT.java | 2 +- 6 files changed, 95 insertions(+), 19 deletions(-) create mode 100644 sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AnnotatedQueriesUserReactiveRepositoryCodeSnippet.java create mode 100644 sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AnnotatedQueriesUserRepositoryCodeSnippet.java diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/README.md b/sdk/cosmos/azure-spring-data-cosmos-core/README.md index eefb47653384b..317615a80ecfd 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/README.md +++ b/sdk/cosmos/azure-spring-data-cosmos-core/README.md @@ -27,7 +27,7 @@ SLF4J is only needed if you plan to use logging, please also download an SLF4J b - Azure-spring-data-cosmos also supports `Response Diagnostics String` and `Query Metrics`. Set `queryMetricsEnabled` flag to true in application.properties to enable query metrics. In addition to setting the flag, implement `ResponseDiagnosticsProcessor` to log diagnostics information. - + ```java @Configuration @@ -93,7 +93,7 @@ public class AppConfiguration extends AbstractCosmosConfiguration { ``` ### Customizing Configuration You can customize `DirectConnectionConfig` or `GatewayConnectionConfig` or both and provide them to `CosmosClientBuilder` bean to customize `CosmosAsyncClient` - + ```java @Bean @@ -126,7 +126,7 @@ Use it to annotate your Configuration class to scan a different root package by - Containers will be created automatically unless you don't want them to. Set `autoCreateContainer` to false in `@Container` annotation to disable auto creation of containers. - Note: By default request units assigned to newly created containers is 400. Specify different ru value to customize request units for the container created by the SDK (minimum RU value is 400). - + ```java @Container(containerName = "myContainer", ru = "400") public class User { @@ -182,7 +182,7 @@ public class User { - Annotation `@Container(containerName="myContainer")` specifies container name in Azure Cosmos DB. - Annotation `@PartitionKey` on `lastName` field specifies this field as partition key in Azure Cosmos DB. - + ```java @Container(containerName = "myContainer") public class UserSample { @@ -194,7 +194,7 @@ public class UserSample { ### Create repositories Extends CosmosRepository interface, which provides Spring Data repository support. - + ```java @Repository @@ -206,9 +206,45 @@ public interface UserRepository extends CosmosRepository { - `findByFirstName` method is custom query method, it will find items per firstName. +#### Using annotated queries in repositories +Azure spring data cosmos supports specifying annotated queries in the repositories using `@Query`. +- Examples for annotated queries in synchronous CosmosRepository: + + +```java +public interface AnnotatedQueriesUserRepositoryCodeSnippet extends CosmosRepository { + @Query(value = "select * from c where c.firstName = @firstName and c.lastName = @lastName") + List getUsersByTitleAndValue(@Param("firstName") int firstName, @Param("lastName") String lastName); + + @Query(value = "select * from c offset @offset limit @limit") + List getUsersWithOffsetLimit(@Param("offset") int offset, @Param("limit") int limit); +} +``` + +- Examples for annotated queries in ReactiveCosmosRepository. + + +```java +public interface AnnotatedQueriesUserReactiveRepositoryCodeSnippet extends ReactiveCosmosRepository { + @Query(value = "select * from c where c.firstName = @firstName and c.lastName = @lastName") + Flux getUsersByTitleAndValue(@Param("firstName") int firstName, @Param("lastName") String lastName); + + @Query(value = "select * from c offset @offset limit @limit") + Flux getUsersWithOffsetLimit(@Param("offset") int offset, @Param("limit") int limit); + + @Query(value = "select count(c.id) as num_ids, c.lastName from c group by c.lastName") + Flux getCoursesGroupByDepartment(); +} +``` + +The queries that are specified in the annotation are same as the cosmos queries. +Please refer to the following articles for more information on sql queries in cosmos + - [sql-query-getting-started] [sql_queries_getting_started] + - [tutorial-query-sql-api] [sql_queries_in_cosmos] + ### Create an Application class Here create an application class with all the components - + ```java @SpringBootApplication @@ -266,7 +302,7 @@ public class SampleApplication implements CommandLineRunner { - set name of this field to `id`, this field will be mapped to Item `id` in Azure Cosmos DB. - Supports auto generation of string type UUIDs using the @GeneratedValue annotation. The id field of an entity with a string type id can be annotated with `@GeneratedValue` to automatically generate a random UUID prior to insertion. - + ```java public class GeneratedIdEntity { @@ -280,7 +316,7 @@ public class SampleApplication implements CommandLineRunner { By default, container name will be class name of user domain class. To customize it, add the `@Container(containerName="myCustomContainerName")` annotation to the domain class. The container field also supports SpEL expressions (eg. `container = "${dynamic.container.name}"` or `container = "#{@someBean.getContainerName()}"`) in order to provide container names programmatically/via configuration properties. - Custom IndexingPolicy By default, IndexingPolicy will be set by azure service. To customize it add annotation `@CosmosIndexingPolicy` to domain class. This annotation has 4 attributes to customize, see following: - + ```java // Indicate if indexing policy use automatic or not // Default value is true @@ -306,7 +342,7 @@ String[] excludePaths() default {}; - Azure-spring-data-cosmos supports Optimistic Locking for specific containers, which means upserts/deletes by item will fail with an exception in case the item is modified by another process in the meanwhile. - To enable Optimistic Locking for a container, just create a string `_etag` field and mark it with the `@Version` annotation. See the following: - + ```java @Container(containerName = "myContainer") public class MyItem { @@ -322,7 +358,7 @@ public class MyItem { - Supports [Spring Data pageable and sort](https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters). - Based on available RUs on the database account, cosmosDB can return items less than or equal to the requested size. - Due to this variable number of returned items in every iteration, user should not rely on the totalPageSize, and instead iterating over pageable should be done in this way. - + ```java private List findAllWithPageSize(int pageSize) { @@ -342,7 +378,7 @@ private List findAllWithPageSize(int pageSize) { - Azure-spring-data-cosmos supports [spring-boot-starter-data-rest](https://projects.spring.io/spring-data-rest/). - Supports List and nested type in domain class. - Configurable ObjectMapper bean with unique name `cosmosObjectMapper`, only configure customized ObjectMapper if you really need to. e.g., - + ```java @Bean(name = "cosmosObjectMapper") public ObjectMapper objectMapper() { @@ -354,7 +390,7 @@ public ObjectMapper objectMapper() { - Azure-spring-data-cosmos supports auditing fields on database entities using standard spring-data annotations. - This feature can be enabled by adding `@EnableCosmosAuditing` annotation to your application configuration. - Entities can annotate fields using `@CreatedBy`, `@CreatedDate`, `@LastModifiedBy` and `@LastModifiedDate`. These fields will be updated automatically. - + ```java @Container(containerName = "myContainer") public class AuditableUser { @@ -395,7 +431,7 @@ azure.cosmos.secondary.populateQueryMetrics=if-populate-query-metrics - The `@EnableReactiveCosmosRepositories` or `@EnableCosmosRepositories` support user-define the cosmos template, use `reactiveCosmosTemplateRef` or `cosmosTemplateRef` to config the name of the `ReactiveCosmosTemplate` or `CosmosTemplate` bean to be used with the repositories detected. - If you have multiple cosmos database accounts, you can define multiple `CosmosAsyncClient`. If the single cosmos account has multiple databases, you can use the same `CosmosAsyncClient` to initialize the cosmos template. - + ```java @Configuration @@ -500,7 +536,7 @@ public class DatabaseConfiguration extends AbstractCosmosConfiguration { - In the above example, we have two cosmos account, each account has two databases. For each account, we can use the same Cosmos Client. You can create the `CosmosAsyncClient` like this: - + ```java @Bean("secondaryCosmosAsyncClient") @@ -511,7 +547,7 @@ public CosmosAsyncClient getCosmosAsyncClient(CosmosClientBuilder secondaryCosmo - Besides, if you want to define `queryMetricsEnabled` or `ResponseDiagnosticsProcessor` , you can create the `CosmosConfig` for your cosmos template. - + ```java @Bean("secondaryCosmosConfig") @@ -525,7 +561,7 @@ public CosmosConfig getCosmosConfig() { - Create an Application class - + ```java @SpringBootApplication @@ -647,5 +683,7 @@ or contact [opencode@microsoft.com][coc_contact] with any additional questions o [address_repository_it_test]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java [azure_spring_data_cosmos_docs]: https://docs.microsoft.com/azure/cosmos-db/sql-api-sdk-java-spring-v3 [spring_data_custom_query]: https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.query-methods.details +[sql_queries_in_cosmos]: https://docs.microsoft.com/en-us/azure/cosmos-db/tutorial-query-sql-api +[sql_queries_getting_started]: https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-getting-started ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcosmos%2F%2Fazure-spring-data-cosmos-core%2FREADME.png) diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/Constants.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/Constants.java index 0e6cf5fb266da..8b03ad2f938bc 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/Constants.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/Constants.java @@ -22,7 +22,8 @@ public final class Constants { public static final String COSMOS_MODULE_NAME = "cosmos"; public static final String COSMOS_MODULE_PREFIX = "cosmos"; - public static final String USER_AGENT_SUFFIX = "spring-data/"; + private static final String AZURE_SPRING_DATA_COSMOS = "az-sd-cos"; + public static final String USER_AGENT_SUFFIX = AZURE_SPRING_DATA_COSMOS + "/"; public static final String OBJECT_MAPPER_BEAN_NAME = "cosmosObjectMapper"; public static final String AUDITING_HANDLER_BEAN_NAME = "cosmosAuditingHandler"; diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java index 3408e72249da0..51721280b8471 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java @@ -26,7 +26,7 @@ public class CosmosFactory { Constants.USER_AGENT_SUFFIX + PropertyLoader.getProjectVersion(); private static String getUserAgentSuffix() { - return ";" + USER_AGENT_SUFFIX; + return USER_AGENT_SUFFIX; } /** diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AnnotatedQueriesUserReactiveRepositoryCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AnnotatedQueriesUserReactiveRepositoryCodeSnippet.java new file mode 100644 index 0000000000000..d7bfea46e6688 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AnnotatedQueriesUserReactiveRepositoryCodeSnippet.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos; + +import com.azure.spring.data.cosmos.repository.Query; +import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.springframework.data.repository.query.Param; +import reactor.core.publisher.Flux; + +public interface AnnotatedQueriesUserReactiveRepositoryCodeSnippet extends ReactiveCosmosRepository { + @Query(value = "select * from c where c.firstName = @firstName and c.lastName = @lastName") + Flux getUsersByTitleAndValue(@Param("firstName") int firstName, @Param("lastName") String lastName); + + @Query(value = "select * from c offset @offset limit @limit") + Flux getUsersWithOffsetLimit(@Param("offset") int offset, @Param("limit") int limit); + + @Query(value = "select count(c.id) as num_ids, c.lastName from c group by c.lastName") + Flux getCoursesGroupByDepartment(); +} diff --git a/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AnnotatedQueriesUserRepositoryCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AnnotatedQueriesUserRepositoryCodeSnippet.java new file mode 100644 index 0000000000000..e8671ce8d8816 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos-core/src/samples/java/com/azure/spring/data/cosmos/AnnotatedQueriesUserRepositoryCodeSnippet.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos; + +import com.azure.spring.data.cosmos.repository.CosmosRepository; +import com.azure.spring.data.cosmos.repository.Query; +import org.springframework.data.repository.query.Param; + +import java.util.List; + +public interface AnnotatedQueriesUserRepositoryCodeSnippet extends CosmosRepository { + @Query(value = "select * from c where c.firstName = @firstName and c.lastName = @lastName") + List getUsersByTitleAndValue(@Param("firstName") int firstName, @Param("lastName") String lastName); + + @Query(value = "select * from c offset @offset limit @limit") + List getUsersWithOffsetLimit(@Param("offset") int offset, @Param("limit") int limit); +} diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java index 59bad6c9bfbf5..2cd58294af61b 100644 --- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java @@ -67,7 +67,7 @@ public void testConnectionPolicyUserAgentKept() throws IllegalAccessException { CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); final String uaSuffix = getUserAgentSuffixValue(cosmosClientBuilder); - assertThat(uaSuffix).contains("spring-data"); + assertThat(uaSuffix).contains(Constants.USER_AGENT_SUFFIX); } private String getUserAgentSuffixValue(CosmosClientBuilder cosmosClientBuilder) throws IllegalAccessException { From 5733f75c065f9925bf81b190e79a2d00ed6e4613 Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Thu, 10 Sep 2020 13:49:23 +0800 Subject: [PATCH 167/168] Mgmt: add junit platform (#14972) * add junit platform * suppress non sequetial test due to random fail * add comment --- .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../utils/FlatMapSequentialTests.java | 52 ++++++++++--------- .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ .../test/resources/junit-platform.properties | 4 ++ 23 files changed, 115 insertions(+), 25 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-appservice/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-authorization/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerinstance/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-dns/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-monitor/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-msi/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-network/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-storage/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/junit-platform.properties create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/test/resources/junit-platform.properties diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-dns/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-dns/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-msi/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-msi/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-network/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/fluentcore/utils/FlatMapSequentialTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/fluentcore/utils/FlatMapSequentialTests.java index e7c002829b924..d88c15a6f9729 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/fluentcore/utils/FlatMapSequentialTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/fluentcore/utils/FlatMapSequentialTests.java @@ -24,11 +24,12 @@ public void testFlatMapSequential() { Function> onError = e -> Mono.just(e.getMessage()); Supplier> onComplete = () -> complete; - StepVerifier.create( - mono.flatMapMany(onNext, onError, onComplete) - ) - .expectNext("2", "3", "1") - .verifyComplete(); + // commented due to it cannot guarantee the time sequence + // StepVerifier.create( + // mono.flatMapMany(onNext, onError, onComplete) + // ) + // .expectNext("2", "3", "1") + // .verifyComplete(); StepVerifier.create( Utils.flatMapSequential(mono.flux(), @@ -75,26 +76,27 @@ public void testFlatMapSequentialDelayError() { .expectNext(0, 1, 2, 3, 4) .verifyErrorMessage("Test"); - StepVerifier.create(Flux.just(1, 3, 5, 7) - .flatMapDelayError(i -> { - if (i == 5) { - throw new RuntimeException("Test"); - } - return Mono.just(i); - }, 32, 32) - ) - .expectNext(1, 3) - .verifyErrorMessage("Test"); + // commented due to it cannot guarantee the time sequence + // StepVerifier.create(Flux.just(1, 3, 5, 7) + // .flatMapDelayError(i -> { + // if (i == 5) { + // throw new RuntimeException("Test"); + // } + // return Mono.just(i); + // }, 32, 32) + // ) + // .expectNext(1, 3) + // .verifyErrorMessage("Test"); - StepVerifier.create(Flux.just(1, 3, 5, 7) - .flatMapDelayError(i -> { - if (i == 5) { - return Mono.error(new RuntimeException("Test")); - } - return Mono.just(i); - }, 32, 32) - ) - .expectNext(1, 3, 7) - .verifyErrorMessage("Test"); + // StepVerifier.create(Flux.just(1, 3, 5, 7) + // .flatMapDelayError(i -> { + // if (i == 5) { + // return Mono.error(new RuntimeException("Test")); + // } + // return Mono.just(i); + // }, 32, 32) + // ) + // .expectNext(1, 3, 7) + // .verifyErrorMessage("Test"); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/junit-platform.properties b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/junit-platform.properties new file mode 100644 index 0000000000000..202d099b3ee84 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/junit-platform.properties @@ -0,0 +1,4 @@ +junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.mode.default=concurrent +junit.jupiter.execution.parallel.config.strategy=fixed +junit.jupiter.execution.parallel.config.fixed.parallelism=32 From 3a823fac5a9f87a629df5c6ca8bb3a12324cdecb Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 10 Sep 2020 07:16:57 +0000 Subject: [PATCH 168/168] Generated from f69510cef189b74f05f0a26e815a096faccbc386 --- .../mgmt-v2018_01_01_preview/pom.xml | 6 +- .../v2018_01_01_preview/AccessKeys.java | 55 + .../v2018_01_01_preview/AccessRights.java | 44 + .../ArmDisasterRecovery.java | 161 ++ .../CaptureDescription.java | 179 ++ .../CheckNameAvailabilityParameter.java | 43 + .../CheckNameAvailabilityResult.java | 35 + .../v2018_01_01_preview/Cluster.java | 22 +- .../v2018_01_01_preview/Clusters.java | 2 +- .../v2018_01_01_preview/Configurations.java | 4 +- .../v2018_01_01_preview/ConnectionState.java | 70 + .../v2018_01_01_preview/ConsumerGroup.java | 129 + .../v2018_01_01_preview/ConsumerGroups.java | 56 + .../v2018_01_01_preview/Destination.java | 126 + ...overyConfigNamespaceAuthorizationRule.java | 43 + .../DisasterRecoveryConfigs.java | 122 + .../v2018_01_01_preview/EHNamespace.java | 91 +- .../EncodingCaptureDescription.java | 53 + .../v2018_01_01_preview/Encryption.java | 71 + .../EndPointProvisioningState.java | 53 + .../v2018_01_01_preview/EntityStatus.java | 74 + .../v2018_01_01_preview/ErrorResponse.java | 2 +- .../v2018_01_01_preview/EventHubs.java | 121 + .../v2018_01_01_preview/Eventhub.java | 221 ++ .../EventhubNamespaceAuthorizationRule.java | 119 + .../v2018_01_01_preview/Identity.java | 96 + .../v2018_01_01_preview/IdentityType.java | 50 + .../v2018_01_01_preview/IpFilterRule.java | 2 +- .../v2018_01_01_preview/KeySource.java | 50 + .../v2018_01_01_preview/KeyType.java | 53 + .../KeyVaultProperties.java | 95 + .../v2018_01_01_preview/MessagingRegions.java | 51 + .../MessagingRegionsProperties.java | 47 + .../NamespaceAuthorizationRule.java | 118 + .../v2018_01_01_preview/Namespaces.java | 88 +- .../v2018_01_01_preview/NetworkRuleSet.java | 5 + .../v2018_01_01_preview/PrivateEndpoint.java | 43 + .../PrivateEndpointConnection.java | 175 ++ .../PrivateEndpointConnections.java | 53 + .../PrivateLinkConnectionStatus.java | 47 + .../PrivateLinkResources.java | 29 + .../PrivateLinkResourcesListResult.java | 32 + .../ProvisioningStateDR.java | 56 + .../RegenerateAccessKeyParameters.java | 72 + .../v2018_01_01_preview/Regions.java | 28 + .../RoleDisasterRecovery.java | 56 + .../UnavailableReason.java | 65 + .../VirtualNetworkRule.java | 2 +- .../implementation/AccessKeysImpl.java | 61 + .../implementation/AccessKeysInner.java | 124 + .../ArmDisasterRecoveryImpl.java | 133 + .../ArmDisasterRecoveryInner.java | 124 + .../AuthorizationRuleInner.java | 48 + .../CheckNameAvailabilityResultImpl.java | 42 + .../CheckNameAvailabilityResultInner.java | 88 + .../implementation/ClusterImpl.java | 12 +- .../implementation/ClusterInner.java | 20 +- .../implementation/ClustersInner.java | 260 +- .../implementation/ConfigurationsInner.java | 46 +- .../implementation/ConsumerGroupImpl.java | 125 + .../implementation/ConsumerGroupInner.java | 80 + .../implementation/ConsumerGroupsImpl.java | 85 + .../implementation/ConsumerGroupsInner.java | 853 ++++++ ...yConfigNamespaceAuthorizationRuleImpl.java | 67 + .../DisasterRecoveryConfigsImpl.java | 171 ++ .../DisasterRecoveryConfigsInner.java | 1338 ++++++++++ .../implementation/EHNamespaceImpl.java | 35 + .../implementation/EHNamespaceInner.java | 80 + .../EventHubManagementClientImpl.java | 309 +++ .../implementation/EventHubsImpl.java | 174 ++ .../implementation/EventHubsInner.java | 1504 +++++++++++ .../implementation/EventHubsManager.java | 114 +- .../implementation/EventhubImpl.java | 157 ++ .../implementation/EventhubInner.java | 177 ++ ...venthubNamespaceAuthorizationRuleImpl.java | 116 + .../implementation/MessagingRegionsImpl.java | 58 + .../implementation/MessagingRegionsInner.java | 47 + .../NamespaceAuthorizationRuleImpl.java | 113 + .../implementation/NamespacesImpl.java | 121 +- .../implementation/NamespacesInner.java | 2308 +++++++++++------ .../implementation/NetworkRuleSetImpl.java | 5 + .../implementation/NetworkRuleSetInner.java | 26 + .../implementation/OperationsInner.java | 28 +- .../implementation/PageImpl.java | 2 +- .../implementation/PageImpl1.java | 2 +- .../PrivateEndpointConnectionImpl.java | 130 + .../PrivateEndpointConnectionInner.java | 103 + .../PrivateEndpointConnectionsImpl.java | 85 + .../PrivateEndpointConnectionsInner.java | 678 +++++ .../PrivateLinkResourceInner.java | 176 ++ .../PrivateLinkResourcesImpl.java | 42 + .../PrivateLinkResourcesInner.java | 144 + .../PrivateLinkResourcesListResultImpl.java | 37 + .../PrivateLinkResourcesListResultInner.java | 70 + .../implementation/RegionsImpl.java | 49 + .../implementation/RegionsInner.java | 293 +++ .../implementation/package-info.java | 3 +- .../v2018_01_01_preview/package-info.java | 3 +- 98 files changed, 13073 insertions(+), 1008 deletions(-) create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/AccessKeys.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/AccessRights.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ArmDisasterRecovery.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CaptureDescription.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CheckNameAvailabilityParameter.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CheckNameAvailabilityResult.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConnectionState.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConsumerGroup.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConsumerGroups.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Destination.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/DisasterRecoveryConfigNamespaceAuthorizationRule.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/DisasterRecoveryConfigs.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EncodingCaptureDescription.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Encryption.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EndPointProvisioningState.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EntityStatus.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EventHubs.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Eventhub.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EventhubNamespaceAuthorizationRule.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Identity.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/IdentityType.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeySource.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeyType.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeyVaultProperties.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/MessagingRegions.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/MessagingRegionsProperties.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/NamespaceAuthorizationRule.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpoint.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpointConnection.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpointConnections.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkConnectionStatus.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkResources.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkResourcesListResult.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ProvisioningStateDR.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/RegenerateAccessKeyParameters.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Regions.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/RoleDisasterRecovery.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/UnavailableReason.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AccessKeysImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AccessKeysInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ArmDisasterRecoveryImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ArmDisasterRecoveryInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AuthorizationRuleInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/CheckNameAvailabilityResultImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/CheckNameAvailabilityResultInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupsImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupsInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigNamespaceAuthorizationRuleImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigsImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigsInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubManagementClientImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubNamespaceAuthorizationRuleImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/MessagingRegionsImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/MessagingRegionsInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespaceAuthorizationRuleImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionsInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourceInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesListResultImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesListResultInner.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/RegionsImpl.java create mode 100644 sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/RegionsInner.java diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/pom.xml b/sdk/eventhubs/mgmt-v2018_01_01_preview/pom.xml index 1ca0238349260..b702a03e5233f 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/pom.xml +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/pom.xml @@ -11,8 +11,8 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-eventhubs 1.0.0-beta @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/AccessKeys.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/AccessKeys.java new file mode 100644 index 0000000000000..27e7706789bb0 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/AccessKeys.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.AccessKeysInner; + +/** + * Type representing AccessKeys. + */ +public interface AccessKeys extends HasInner, HasManager { + /** + * @return the aliasPrimaryConnectionString value. + */ + String aliasPrimaryConnectionString(); + + /** + * @return the aliasSecondaryConnectionString value. + */ + String aliasSecondaryConnectionString(); + + /** + * @return the keyName value. + */ + String keyName(); + + /** + * @return the primaryConnectionString value. + */ + String primaryConnectionString(); + + /** + * @return the primaryKey value. + */ + String primaryKey(); + + /** + * @return the secondaryConnectionString value. + */ + String secondaryConnectionString(); + + /** + * @return the secondaryKey value. + */ + String secondaryKey(); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/AccessRights.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/AccessRights.java new file mode 100644 index 0000000000000..e2126a47c1a9a --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/AccessRights.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AccessRights. + */ +public final class AccessRights extends ExpandableStringEnum { + /** Static value Manage for AccessRights. */ + public static final AccessRights MANAGE = fromString("Manage"); + + /** Static value Send for AccessRights. */ + public static final AccessRights SEND = fromString("Send"); + + /** Static value Listen for AccessRights. */ + public static final AccessRights LISTEN = fromString("Listen"); + + /** + * Creates or finds a AccessRights from its string representation. + * @param name a name to look for + * @return the corresponding AccessRights + */ + @JsonCreator + public static AccessRights fromString(String name) { + return fromString(name, AccessRights.class); + } + + /** + * @return known AccessRights values + */ + public static Collection values() { + return values(AccessRights.class); + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ArmDisasterRecovery.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ArmDisasterRecovery.java new file mode 100644 index 0000000000000..64a59e4ee22fd --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ArmDisasterRecovery.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.ArmDisasterRecoveryInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; + +/** + * Type representing ArmDisasterRecovery. + */ +public interface ArmDisasterRecovery extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the alternateName value. + */ + String alternateName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the partnerNamespace value. + */ + String partnerNamespace(); + + /** + * @return the pendingReplicationOperationsCount value. + */ + Long pendingReplicationOperationsCount(); + + /** + * @return the provisioningState value. + */ + ProvisioningStateDR provisioningState(); + + /** + * @return the role value. + */ + RoleDisasterRecovery role(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ArmDisasterRecovery definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate { + } + + /** + * Grouping of ArmDisasterRecovery definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ArmDisasterRecovery definition. + */ + interface Blank extends WithNamespace { + } + + /** + * The stage of the armdisasterrecovery definition allowing to specify Namespace. + */ + interface WithNamespace { + /** + * Specifies resourceGroupName, namespaceName. + * @param resourceGroupName Name of the resource group within the azure subscription + * @param namespaceName The Namespace name + * @return the next definition stage + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + + /** + * The stage of the armdisasterrecovery definition allowing to specify AlternateName. + */ + interface WithAlternateName { + /** + * Specifies alternateName. + * @param alternateName Alternate name specified when alias and namespace names are same + * @return the next definition stage + */ + WithCreate withAlternateName(String alternateName); + } + + /** + * The stage of the armdisasterrecovery definition allowing to specify PartnerNamespace. + */ + interface WithPartnerNamespace { + /** + * Specifies partnerNamespace. + * @param partnerNamespace ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + * @return the next definition stage + */ + WithCreate withPartnerNamespace(String partnerNamespace); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithAlternateName, DefinitionStages.WithPartnerNamespace { + } + } + /** + * The template for a ArmDisasterRecovery update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAlternateName, UpdateStages.WithPartnerNamespace { + } + + /** + * Grouping of ArmDisasterRecovery update stages. + */ + interface UpdateStages { + /** + * The stage of the armdisasterrecovery update allowing to specify AlternateName. + */ + interface WithAlternateName { + /** + * Specifies alternateName. + * @param alternateName Alternate name specified when alias and namespace names are same + * @return the next update stage + */ + Update withAlternateName(String alternateName); + } + + /** + * The stage of the armdisasterrecovery update allowing to specify PartnerNamespace. + */ + interface WithPartnerNamespace { + /** + * Specifies partnerNamespace. + * @param partnerNamespace ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + * @return the next update stage + */ + Update withPartnerNamespace(String partnerNamespace); + } + + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CaptureDescription.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CaptureDescription.java new file mode 100644 index 0000000000000..aa488dbf19147 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CaptureDescription.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties to configure capture description for eventhub. + */ +public class CaptureDescription { + /** + * A value that indicates whether capture description is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Enumerates the possible values for the encoding format of capture + * description. Note: 'AvroDeflate' will be deprecated in New API Version. + * Possible values include: 'Avro', 'AvroDeflate'. + */ + @JsonProperty(value = "encoding") + private EncodingCaptureDescription encoding; + + /** + * The time window allows you to set the frequency with which the capture + * to Azure Blobs will happen, value should between 60 to 900 seconds. + */ + @JsonProperty(value = "intervalInSeconds") + private Integer intervalInSeconds; + + /** + * The size window defines the amount of data built up in your Event Hub + * before an capture operation, value should be between 10485760 to + * 524288000 bytes. + */ + @JsonProperty(value = "sizeLimitInBytes") + private Integer sizeLimitInBytes; + + /** + * Properties of Destination where capture will be stored. (Storage + * Account, Blob Names). + */ + @JsonProperty(value = "destination") + private Destination destination; + + /** + * A value that indicates whether to Skip Empty Archives. + */ + @JsonProperty(value = "skipEmptyArchives") + private Boolean skipEmptyArchives; + + /** + * Get a value that indicates whether capture description is enabled. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set a value that indicates whether capture description is enabled. + * + * @param enabled the enabled value to set + * @return the CaptureDescription object itself. + */ + public CaptureDescription withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version. Possible values include: 'Avro', 'AvroDeflate'. + * + * @return the encoding value + */ + public EncodingCaptureDescription encoding() { + return this.encoding; + } + + /** + * Set enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version. Possible values include: 'Avro', 'AvroDeflate'. + * + * @param encoding the encoding value to set + * @return the CaptureDescription object itself. + */ + public CaptureDescription withEncoding(EncodingCaptureDescription encoding) { + this.encoding = encoding; + return this; + } + + /** + * Get the time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds. + * + * @return the intervalInSeconds value + */ + public Integer intervalInSeconds() { + return this.intervalInSeconds; + } + + /** + * Set the time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds. + * + * @param intervalInSeconds the intervalInSeconds value to set + * @return the CaptureDescription object itself. + */ + public CaptureDescription withIntervalInSeconds(Integer intervalInSeconds) { + this.intervalInSeconds = intervalInSeconds; + return this; + } + + /** + * Get the size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes. + * + * @return the sizeLimitInBytes value + */ + public Integer sizeLimitInBytes() { + return this.sizeLimitInBytes; + } + + /** + * Set the size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes. + * + * @param sizeLimitInBytes the sizeLimitInBytes value to set + * @return the CaptureDescription object itself. + */ + public CaptureDescription withSizeLimitInBytes(Integer sizeLimitInBytes) { + this.sizeLimitInBytes = sizeLimitInBytes; + return this; + } + + /** + * Get properties of Destination where capture will be stored. (Storage Account, Blob Names). + * + * @return the destination value + */ + public Destination destination() { + return this.destination; + } + + /** + * Set properties of Destination where capture will be stored. (Storage Account, Blob Names). + * + * @param destination the destination value to set + * @return the CaptureDescription object itself. + */ + public CaptureDescription withDestination(Destination destination) { + this.destination = destination; + return this; + } + + /** + * Get a value that indicates whether to Skip Empty Archives. + * + * @return the skipEmptyArchives value + */ + public Boolean skipEmptyArchives() { + return this.skipEmptyArchives; + } + + /** + * Set a value that indicates whether to Skip Empty Archives. + * + * @param skipEmptyArchives the skipEmptyArchives value to set + * @return the CaptureDescription object itself. + */ + public CaptureDescription withSkipEmptyArchives(Boolean skipEmptyArchives) { + this.skipEmptyArchives = skipEmptyArchives; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CheckNameAvailabilityParameter.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CheckNameAvailabilityParameter.java new file mode 100644 index 0000000000000..e5f0889079d57 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CheckNameAvailabilityParameter.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameter supplied to check Namespace name availability operation. + */ +public class CheckNameAvailabilityParameter { + /** + * Name to check the namespace name availability. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get name to check the namespace name availability. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name to check the namespace name availability. + * + * @param name the name value to set + * @return the CheckNameAvailabilityParameter object itself. + */ + public CheckNameAvailabilityParameter withName(String name) { + this.name = name; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CheckNameAvailabilityResult.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CheckNameAvailabilityResult.java new file mode 100644 index 0000000000000..6cb18f38a46e4 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/CheckNameAvailabilityResult.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.CheckNameAvailabilityResultInner; + +/** + * Type representing CheckNameAvailabilityResult. + */ +public interface CheckNameAvailabilityResult extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + UnavailableReason reason(); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Cluster.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Cluster.java index 61f6e5ae0fd50..93a9bb9da11c0 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Cluster.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Cluster.java @@ -25,9 +25,9 @@ */ public interface Cluster extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { /** - * @return the created value. + * @return the createdAt value. */ - String created(); + String createdAt(); /** * @return the metricId value. @@ -45,9 +45,9 @@ public interface Cluster extends HasInner, Resource, GroupableReso String status(); /** - * @return the updated value. + * @return the updatedAt value. */ - String updated(); + String updatedAt(); /** * The entirety of the Cluster definition. @@ -71,12 +71,24 @@ interface Blank extends GroupableResourceCore.DefinitionWithRegion { interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { } + /** + * The stage of the cluster definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Properties of the cluster SKU + * @return the next definition stage + */ + WithCreate withSku(ClusterSku sku); + } + /** * The stage of the definition which contains all the minimum required inputs for * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithSku { } } /** diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Clusters.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Clusters.java index c7414ce7d64be..9fd22cc996639 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Clusters.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Clusters.java @@ -32,7 +32,7 @@ public interface Clusters extends SupportsCreating { /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -29,7 +29,7 @@ public interface Configurations extends HasInner { /** * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings imposed on the cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConnectionState.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConnectionState.java new file mode 100644 index 0000000000000..d278f1cee221a --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConnectionState.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ConnectionState information. + */ +public class ConnectionState { + /** + * Status of the connection. Possible values include: 'Pending', + * 'Approved', 'Rejected', 'Disconnected'. + */ + @JsonProperty(value = "status") + private PrivateLinkConnectionStatus status; + + /** + * Description of the connection state. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get status of the connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'. + * + * @return the status value + */ + public PrivateLinkConnectionStatus status() { + return this.status; + } + + /** + * Set status of the connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'. + * + * @param status the status value to set + * @return the ConnectionState object itself. + */ + public ConnectionState withStatus(PrivateLinkConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get description of the connection state. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the connection state. + * + * @param description the description value to set + * @return the ConnectionState object itself. + */ + public ConnectionState withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConsumerGroup.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConsumerGroup.java new file mode 100644 index 0000000000000..d6fd8e3543b67 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConsumerGroup.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.ConsumerGroupInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import org.joda.time.DateTime; + +/** + * Type representing ConsumerGroup. + */ +public interface ConsumerGroup extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the createdAt value. + */ + DateTime createdAt(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the updatedAt value. + */ + DateTime updatedAt(); + + /** + * @return the userMetadata value. + */ + String userMetadata(); + + /** + * The entirety of the ConsumerGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithEventhub, DefinitionStages.WithUserMetadata, DefinitionStages.WithCreate { + } + + /** + * Grouping of ConsumerGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ConsumerGroup definition. + */ + interface Blank extends WithEventhub { + } + + /** + * The stage of the consumergroup definition allowing to specify Eventhub. + */ + interface WithEventhub { + /** + * Specifies resourceGroupName, namespaceName, eventHubName. + * @param resourceGroupName Name of the resource group within the azure subscription + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @return the next definition stage + */ + WithUserMetadata withExistingEventhub(String resourceGroupName, String namespaceName, String eventHubName); + } + + /** + * The stage of the consumergroup definition allowing to specify UserMetadata. + */ + interface WithUserMetadata { + /** + * Specifies userMetadata. + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored + * @return the next definition stage + */ + WithCreate withUserMetadata(String userMetadata); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a ConsumerGroup update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithUserMetadata { + } + + /** + * Grouping of ConsumerGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the consumergroup update allowing to specify UserMetadata. + */ + interface WithUserMetadata { + /** + * Specifies userMetadata. + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored + * @return the next update stage + */ + Update withUserMetadata(String userMetadata); + } + + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConsumerGroups.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConsumerGroups.java new file mode 100644 index 0000000000000..87954d64bc63a --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ConsumerGroups.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.ConsumerGroupsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ConsumerGroups. + */ +public interface ConsumerGroups extends SupportsCreating, HasInner { + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName); + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByEventHubAsync(final String resourceGroupName, final String namespaceName, final String eventHubName); + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Destination.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Destination.java new file mode 100644 index 0000000000000..c6dddb2869112 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Destination.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Capture storage details for capture description. + */ +@JsonFlatten +public class Destination { + /** + * Name for capture destination. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Resource id of the storage account to be used to create the blobs. + */ + @JsonProperty(value = "properties.storageAccountResourceId") + private String storageAccountResourceId; + + /** + * Blob container Name. + */ + @JsonProperty(value = "properties.blobContainer") + private String blobContainer; + + /** + * Blob naming convention for archive, e.g. + * {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. + * Here all the parameters (Namespace,EventHub .. etc) are mandatory + * irrespective of order. + */ + @JsonProperty(value = "properties.archiveNameFormat") + private String archiveNameFormat; + + /** + * Get name for capture destination. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name for capture destination. + * + * @param name the name value to set + * @return the Destination object itself. + */ + public Destination withName(String name) { + this.name = name; + return this; + } + + /** + * Get resource id of the storage account to be used to create the blobs. + * + * @return the storageAccountResourceId value + */ + public String storageAccountResourceId() { + return this.storageAccountResourceId; + } + + /** + * Set resource id of the storage account to be used to create the blobs. + * + * @param storageAccountResourceId the storageAccountResourceId value to set + * @return the Destination object itself. + */ + public Destination withStorageAccountResourceId(String storageAccountResourceId) { + this.storageAccountResourceId = storageAccountResourceId; + return this; + } + + /** + * Get blob container Name. + * + * @return the blobContainer value + */ + public String blobContainer() { + return this.blobContainer; + } + + /** + * Set blob container Name. + * + * @param blobContainer the blobContainer value to set + * @return the Destination object itself. + */ + public Destination withBlobContainer(String blobContainer) { + this.blobContainer = blobContainer; + return this; + } + + /** + * Get blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order. + * + * @return the archiveNameFormat value + */ + public String archiveNameFormat() { + return this.archiveNameFormat; + } + + /** + * Set blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order. + * + * @param archiveNameFormat the archiveNameFormat value to set + * @return the Destination object itself. + */ + public Destination withArchiveNameFormat(String archiveNameFormat) { + this.archiveNameFormat = archiveNameFormat; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/DisasterRecoveryConfigNamespaceAuthorizationRule.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/DisasterRecoveryConfigNamespaceAuthorizationRule.java new file mode 100644 index 0000000000000..84740a64eac5e --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/DisasterRecoveryConfigNamespaceAuthorizationRule.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.AuthorizationRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import java.util.List; + +/** + * Type representing DisasterRecoveryConfigNamespaceAuthorizationRule. + */ +public interface DisasterRecoveryConfigNamespaceAuthorizationRule extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the rights value. + */ + List rights(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/DisasterRecoveryConfigs.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/DisasterRecoveryConfigs.java new file mode 100644 index 0000000000000..c1083ff0a8b63 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/DisasterRecoveryConfigs.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.DisasterRecoveryConfigsInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigNamespaceAuthorizationRule; + +/** + * Type representing DisasterRecoveryConfigs. + */ +public interface DisasterRecoveryConfigs extends SupportsCreating, HasInner { + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param name Name to check the namespace name availability + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String resourceGroupName, String namespaceName, String name); + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable breakPairingAsync(String resourceGroupName, String namespaceName, String alias); + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable failOverAsync(String resourceGroupName, String namespaceName, String alias); + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String namespaceName, String alias); + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String namespaceName); + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String namespaceName, String alias); + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName); + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String alias); + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listKeysAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EHNamespace.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EHNamespace.java index 168d7ee6b9dec..e3635f3c49f1d 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EHNamespace.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EHNamespace.java @@ -25,11 +25,26 @@ * Type representing EHNamespace. */ public interface EHNamespace extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the clusterArmId value. + */ + String clusterArmId(); + /** * @return the createdAt value. */ DateTime createdAt(); + /** + * @return the encryption value. + */ + Encryption encryption(); + + /** + * @return the identity value. + */ + Identity identity(); + /** * @return the isAutoInflateEnabled value. */ @@ -97,6 +112,42 @@ interface Blank extends GroupableResourceCore.DefinitionWithRegion { interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { } + /** + * The stage of the ehnamespace definition allowing to specify ClusterArmId. + */ + interface WithClusterArmId { + /** + * Specifies clusterArmId. + * @param clusterArmId Cluster ARM ID of the Namespace + * @return the next definition stage + */ + WithCreate withClusterArmId(String clusterArmId); + } + + /** + * The stage of the ehnamespace definition allowing to specify Encryption. + */ + interface WithEncryption { + /** + * Specifies encryption. + * @param encryption Properties of BYOK Encryption description + * @return the next definition stage + */ + WithCreate withEncryption(Encryption encryption); + } + + /** + * The stage of the ehnamespace definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity Properties of BYOK Identity description + * @return the next definition stage + */ + WithCreate withIdentity(Identity identity); + } + /** * The stage of the ehnamespace definition allowing to specify IsAutoInflateEnabled. */ @@ -162,19 +213,55 @@ interface WithZoneRedundant { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithIsAutoInflateEnabled, DefinitionStages.WithKafkaEnabled, DefinitionStages.WithMaximumThroughputUnits, DefinitionStages.WithSku, DefinitionStages.WithZoneRedundant { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithClusterArmId, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsAutoInflateEnabled, DefinitionStages.WithKafkaEnabled, DefinitionStages.WithMaximumThroughputUnits, DefinitionStages.WithSku, DefinitionStages.WithZoneRedundant { } } /** * The template for a EHNamespace update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIsAutoInflateEnabled, UpdateStages.WithKafkaEnabled, UpdateStages.WithMaximumThroughputUnits, UpdateStages.WithSku, UpdateStages.WithZoneRedundant { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithClusterArmId, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithIsAutoInflateEnabled, UpdateStages.WithKafkaEnabled, UpdateStages.WithMaximumThroughputUnits, UpdateStages.WithSku, UpdateStages.WithZoneRedundant { } /** * Grouping of EHNamespace update stages. */ interface UpdateStages { + /** + * The stage of the ehnamespace update allowing to specify ClusterArmId. + */ + interface WithClusterArmId { + /** + * Specifies clusterArmId. + * @param clusterArmId Cluster ARM ID of the Namespace + * @return the next update stage + */ + Update withClusterArmId(String clusterArmId); + } + + /** + * The stage of the ehnamespace update allowing to specify Encryption. + */ + interface WithEncryption { + /** + * Specifies encryption. + * @param encryption Properties of BYOK Encryption description + * @return the next update stage + */ + Update withEncryption(Encryption encryption); + } + + /** + * The stage of the ehnamespace update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity Properties of BYOK Identity description + * @return the next update stage + */ + Update withIdentity(Identity identity); + } + /** * The stage of the ehnamespace update allowing to specify IsAutoInflateEnabled. */ diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EncodingCaptureDescription.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EncodingCaptureDescription.java new file mode 100644 index 0000000000000..6c746391c9246 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EncodingCaptureDescription.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EncodingCaptureDescription. + */ +public enum EncodingCaptureDescription { + /** Enum value Avro. */ + AVRO("Avro"), + + /** Enum value AvroDeflate. */ + AVRO_DEFLATE("AvroDeflate"); + + /** The actual serialized value for a EncodingCaptureDescription instance. */ + private String value; + + EncodingCaptureDescription(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncodingCaptureDescription instance. + * + * @param value the serialized value to parse. + * @return the parsed EncodingCaptureDescription object, or null if unable to parse. + */ + @JsonCreator + public static EncodingCaptureDescription fromString(String value) { + EncodingCaptureDescription[] items = EncodingCaptureDescription.values(); + for (EncodingCaptureDescription item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Encryption.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Encryption.java new file mode 100644 index 0000000000000..db22c3a196467 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Encryption.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties to configure Encryption. + */ +public class Encryption { + /** + * Properties of KeyVault. + */ + @JsonProperty(value = "keyVaultProperties") + private List keyVaultProperties; + + /** + * Enumerates the possible value of keySource for Encryption. Possible + * values include: 'Microsoft.KeyVault'. + */ + @JsonProperty(value = "keySource") + private KeySource keySource; + + /** + * Get properties of KeyVault. + * + * @return the keyVaultProperties value + */ + public List keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set properties of KeyVault. + * + * @param keyVaultProperties the keyVaultProperties value to set + * @return the Encryption object itself. + */ + public Encryption withKeyVaultProperties(List keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get enumerates the possible value of keySource for Encryption. Possible values include: 'Microsoft.KeyVault'. + * + * @return the keySource value + */ + public KeySource keySource() { + return this.keySource; + } + + /** + * Set enumerates the possible value of keySource for Encryption. Possible values include: 'Microsoft.KeyVault'. + * + * @param keySource the keySource value to set + * @return the Encryption object itself. + */ + public Encryption withKeySource(KeySource keySource) { + this.keySource = keySource; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EndPointProvisioningState.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EndPointProvisioningState.java new file mode 100644 index 0000000000000..f1e210af0904e --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EndPointProvisioningState.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EndPointProvisioningState. + */ +public final class EndPointProvisioningState extends ExpandableStringEnum { + /** Static value Creating for EndPointProvisioningState. */ + public static final EndPointProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for EndPointProvisioningState. */ + public static final EndPointProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for EndPointProvisioningState. */ + public static final EndPointProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for EndPointProvisioningState. */ + public static final EndPointProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for EndPointProvisioningState. */ + public static final EndPointProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for EndPointProvisioningState. */ + public static final EndPointProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a EndPointProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding EndPointProvisioningState + */ + @JsonCreator + public static EndPointProvisioningState fromString(String name) { + return fromString(name, EndPointProvisioningState.class); + } + + /** + * @return known EndPointProvisioningState values + */ + public static Collection values() { + return values(EndPointProvisioningState.class); + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EntityStatus.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EntityStatus.java new file mode 100644 index 0000000000000..1824ae835b13c --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EntityStatus.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EntityStatus. + */ +public enum EntityStatus { + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value Restoring. */ + RESTORING("Restoring"), + + /** Enum value SendDisabled. */ + SEND_DISABLED("SendDisabled"), + + /** Enum value ReceiveDisabled. */ + RECEIVE_DISABLED("ReceiveDisabled"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Renaming. */ + RENAMING("Renaming"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a EntityStatus instance. */ + private String value; + + EntityStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EntityStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed EntityStatus object, or null if unable to parse. + */ + @JsonCreator + public static EntityStatus fromString(String value) { + EntityStatus[] items = EntityStatus.values(); + for (EntityStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ErrorResponse.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ErrorResponse.java index 9f158bb1dc4b5..d1bc7d5ec1367 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ErrorResponse.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ErrorResponse.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Error response that indicates the service is not able to process the + * Error response indicates Event Hub service is not able to process the * incoming request. The reason is provided in the error message. */ public class ErrorResponse { diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EventHubs.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EventHubs.java new file mode 100644 index 0000000000000..7dbd4cc5bb639 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EventHubs.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventhubNamespaceAuthorizationRule; + +/** + * Type representing EventHubs. + */ +public interface EventHubs extends SupportsCreating, HasInner { + /** + * Begins definition for a new AuthorizationRule resource. + * @param name resource name. + * @return the first stage of the new AuthorizationRule definition. + */ + EventhubNamespaceAuthorizationRule.DefinitionStages.Blank defineAuthorizationRule(String name); + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName); + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByNamespaceAsync(final String resourceGroupName, final String namespaceName); + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName); + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName); + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String eventHubName); + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName); + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName); + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Eventhub.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Eventhub.java new file mode 100644 index 0000000000000..b17597ead740e --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Eventhub.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventhubInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing Eventhub. + */ +public interface Eventhub extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the captureDescription value. + */ + CaptureDescription captureDescription(); + + /** + * @return the createdAt value. + */ + DateTime createdAt(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the messageRetentionInDays value. + */ + Long messageRetentionInDays(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the partitionCount value. + */ + Long partitionCount(); + + /** + * @return the partitionIds value. + */ + List partitionIds(); + + /** + * @return the status value. + */ + EntityStatus status(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the updatedAt value. + */ + DateTime updatedAt(); + + /** + * The entirety of the Eventhub definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate { + } + + /** + * Grouping of Eventhub definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Eventhub definition. + */ + interface Blank extends WithNamespace { + } + + /** + * The stage of the eventhub definition allowing to specify Namespace. + */ + interface WithNamespace { + /** + * Specifies resourceGroupName, namespaceName. + * @param resourceGroupName Name of the resource group within the azure subscription + * @param namespaceName The Namespace name + * @return the next definition stage + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + + /** + * The stage of the eventhub definition allowing to specify CaptureDescription. + */ + interface WithCaptureDescription { + /** + * Specifies captureDescription. + * @param captureDescription Properties of capture description + * @return the next definition stage + */ + WithCreate withCaptureDescription(CaptureDescription captureDescription); + } + + /** + * The stage of the eventhub definition allowing to specify MessageRetentionInDays. + */ + interface WithMessageRetentionInDays { + /** + * Specifies messageRetentionInDays. + * @param messageRetentionInDays Number of days to retain the events for this Event Hub, value should be 1 to 7 days + * @return the next definition stage + */ + WithCreate withMessageRetentionInDays(Long messageRetentionInDays); + } + + /** + * The stage of the eventhub definition allowing to specify PartitionCount. + */ + interface WithPartitionCount { + /** + * Specifies partitionCount. + * @param partitionCount Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions + * @return the next definition stage + */ + WithCreate withPartitionCount(Long partitionCount); + } + + /** + * The stage of the eventhub definition allowing to specify Status. + */ + interface WithStatus { + /** + * Specifies status. + * @param status Enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown' + * @return the next definition stage + */ + WithCreate withStatus(EntityStatus status); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithCaptureDescription, DefinitionStages.WithMessageRetentionInDays, DefinitionStages.WithPartitionCount, DefinitionStages.WithStatus { + } + } + /** + * The template for a Eventhub update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithCaptureDescription, UpdateStages.WithMessageRetentionInDays, UpdateStages.WithPartitionCount, UpdateStages.WithStatus { + } + + /** + * Grouping of Eventhub update stages. + */ + interface UpdateStages { + /** + * The stage of the eventhub update allowing to specify CaptureDescription. + */ + interface WithCaptureDescription { + /** + * Specifies captureDescription. + * @param captureDescription Properties of capture description + * @return the next update stage + */ + Update withCaptureDescription(CaptureDescription captureDescription); + } + + /** + * The stage of the eventhub update allowing to specify MessageRetentionInDays. + */ + interface WithMessageRetentionInDays { + /** + * Specifies messageRetentionInDays. + * @param messageRetentionInDays Number of days to retain the events for this Event Hub, value should be 1 to 7 days + * @return the next update stage + */ + Update withMessageRetentionInDays(Long messageRetentionInDays); + } + + /** + * The stage of the eventhub update allowing to specify PartitionCount. + */ + interface WithPartitionCount { + /** + * Specifies partitionCount. + * @param partitionCount Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions + * @return the next update stage + */ + Update withPartitionCount(Long partitionCount); + } + + /** + * The stage of the eventhub update allowing to specify Status. + */ + interface WithStatus { + /** + * Specifies status. + * @param status Enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown' + * @return the next update stage + */ + Update withStatus(EntityStatus status); + } + + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EventhubNamespaceAuthorizationRule.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EventhubNamespaceAuthorizationRule.java new file mode 100644 index 0000000000000..a24ce622172ef --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/EventhubNamespaceAuthorizationRule.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.AuthorizationRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import java.util.List; + +/** + * Type representing EventhubNamespaceAuthorizationRule. + */ +public interface EventhubNamespaceAuthorizationRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the rights value. + */ + List rights(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the EventhubNamespaceAuthorizationRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithEventhub, DefinitionStages.WithRights, DefinitionStages.WithCreate { + } + + /** + * Grouping of EventhubNamespaceAuthorizationRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a EventhubNamespaceAuthorizationRule definition. + */ + interface Blank extends WithEventhub { + } + + /** + * The stage of the eventhubnamespaceauthorizationrule definition allowing to specify Eventhub. + */ + interface WithEventhub { + /** + * Specifies resourceGroupName, namespaceName, eventHubName. + * @param resourceGroupName Name of the resource group within the azure subscription + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @return the next definition stage + */ + WithRights withExistingEventhub(String resourceGroupName, String namespaceName, String eventHubName); + } + + /** + * The stage of the eventhubnamespaceauthorizationrule definition allowing to specify Rights. + */ + interface WithRights { + /** + * Specifies rights. + * @param rights The rights associated with the rule + * @return the next definition stage + */ + WithCreate withRights(List rights); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a EventhubNamespaceAuthorizationRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithRights { + } + + /** + * Grouping of EventhubNamespaceAuthorizationRule update stages. + */ + interface UpdateStages { + /** + * The stage of the eventhubnamespaceauthorizationrule update allowing to specify Rights. + */ + interface WithRights { + /** + * Specifies rights. + * @param rights The rights associated with the rule + * @return the next update stage + */ + Update withRights(List rights); + } + + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Identity.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Identity.java new file mode 100644 index 0000000000000..86d459330076d --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Identity.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties to configure Identity for Bring your Own Keys. + */ +public class Identity { + /** + * ObjectId from the KeyVault. + */ + @JsonProperty(value = "principalId") + private String principalId; + + /** + * TenantId from the KeyVault. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * Enumerates the possible value Identity type, which currently supports + * only 'SystemAssigned'. Possible values include: 'SystemAssigned'. + */ + @JsonProperty(value = "type") + private IdentityType type; + + /** + * Get objectId from the KeyVault. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Set objectId from the KeyVault. + * + * @param principalId the principalId value to set + * @return the Identity object itself. + */ + public Identity withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get tenantId from the KeyVault. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set tenantId from the KeyVault. + * + * @param tenantId the tenantId value to set + * @return the Identity object itself. + */ + public Identity withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get enumerates the possible value Identity type, which currently supports only 'SystemAssigned'. Possible values include: 'SystemAssigned'. + * + * @return the type value + */ + public IdentityType type() { + return this.type; + } + + /** + * Set enumerates the possible value Identity type, which currently supports only 'SystemAssigned'. Possible values include: 'SystemAssigned'. + * + * @param type the type value to set + * @return the Identity object itself. + */ + public Identity withType(IdentityType type) { + this.type = type; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/IdentityType.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/IdentityType.java new file mode 100644 index 0000000000000..5ba624f01cc3d --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/IdentityType.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for IdentityType. + */ +public enum IdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"); + + /** The actual serialized value for a IdentityType instance. */ + private String value; + + IdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed IdentityType object, or null if unable to parse. + */ + @JsonCreator + public static IdentityType fromString(String value) { + IdentityType[] items = IdentityType.values(); + for (IdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/IpFilterRule.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/IpFilterRule.java index 73869dd697f86..e234ea14bde38 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/IpFilterRule.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/IpFilterRule.java @@ -74,7 +74,7 @@ interface Blank extends WithNamespace { interface WithNamespace { /** * Specifies resourceGroupName, namespaceName. - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName Name of the resource group within the azure subscription * @param namespaceName The Namespace name * @return the next definition stage */ diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeySource.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeySource.java new file mode 100644 index 0000000000000..ed68de3c2ac70 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeySource.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for KeySource. + */ +public enum KeySource { + /** Enum value Microsoft.KeyVault. */ + MICROSOFT_KEY_VAULT("Microsoft.KeyVault"); + + /** The actual serialized value for a KeySource instance. */ + private String value; + + KeySource(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a KeySource instance. + * + * @param value the serialized value to parse. + * @return the parsed KeySource object, or null if unable to parse. + */ + @JsonCreator + public static KeySource fromString(String value) { + KeySource[] items = KeySource.values(); + for (KeySource item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeyType.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeyType.java new file mode 100644 index 0000000000000..09268288fe417 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeyType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for KeyType. + */ +public enum KeyType { + /** Enum value PrimaryKey. */ + PRIMARY_KEY("PrimaryKey"), + + /** Enum value SecondaryKey. */ + SECONDARY_KEY("SecondaryKey"); + + /** The actual serialized value for a KeyType instance. */ + private String value; + + KeyType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a KeyType instance. + * + * @param value the serialized value to parse. + * @return the parsed KeyType object, or null if unable to parse. + */ + @JsonCreator + public static KeyType fromString(String value) { + KeyType[] items = KeyType.values(); + for (KeyType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeyVaultProperties.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeyVaultProperties.java new file mode 100644 index 0000000000000..8dbaa4a8ae0fd --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/KeyVaultProperties.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties to configure keyVault Properties. + */ +public class KeyVaultProperties { + /** + * Name of the Key from KeyVault. + */ + @JsonProperty(value = "keyName") + private String keyName; + + /** + * Uri of KeyVault. + */ + @JsonProperty(value = "keyVaultUri") + private String keyVaultUri; + + /** + * Key Version. + */ + @JsonProperty(value = "keyVersion") + private String keyVersion; + + /** + * Get name of the Key from KeyVault. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Set name of the Key from KeyVault. + * + * @param keyName the keyName value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get uri of KeyVault. + * + * @return the keyVaultUri value + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set uri of KeyVault. + * + * @param keyVaultUri the keyVaultUri value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get key Version. + * + * @return the keyVersion value + */ + public String keyVersion() { + return this.keyVersion; + } + + /** + * Set key Version. + * + * @param keyVersion the keyVersion value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVersion(String keyVersion) { + this.keyVersion = keyVersion; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/MessagingRegions.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/MessagingRegions.java new file mode 100644 index 0000000000000..af41c821243ec --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/MessagingRegions.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.MessagingRegionsInner; +import java.util.Map; + +/** + * Type representing MessagingRegions. + */ +public interface MessagingRegions extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + MessagingRegionsProperties properties(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/MessagingRegionsProperties.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/MessagingRegionsProperties.java new file mode 100644 index 0000000000000..946a7efede4ca --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/MessagingRegionsProperties.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of Messaging Region. + */ +public class MessagingRegionsProperties { + /** + * Region code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * Full name of the region. + */ + @JsonProperty(value = "fullName", access = JsonProperty.Access.WRITE_ONLY) + private String fullName; + + /** + * Get region code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get full name of the region. + * + * @return the fullName value + */ + public String fullName() { + return this.fullName; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/NamespaceAuthorizationRule.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/NamespaceAuthorizationRule.java new file mode 100644 index 0000000000000..0ca2d02d43040 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/NamespaceAuthorizationRule.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.AuthorizationRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import java.util.List; + +/** + * Type representing NamespaceAuthorizationRule. + */ +public interface NamespaceAuthorizationRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the rights value. + */ + List rights(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the NamespaceAuthorizationRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithRights, DefinitionStages.WithCreate { + } + + /** + * Grouping of NamespaceAuthorizationRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NamespaceAuthorizationRule definition. + */ + interface Blank extends WithNamespace { + } + + /** + * The stage of the namespaceauthorizationrule definition allowing to specify Namespace. + */ + interface WithNamespace { + /** + * Specifies resourceGroupName, namespaceName. + * @param resourceGroupName Name of the resource group within the azure subscription + * @param namespaceName The Namespace name + * @return the next definition stage + */ + WithRights withExistingNamespace(String resourceGroupName, String namespaceName); + } + + /** + * The stage of the namespaceauthorizationrule definition allowing to specify Rights. + */ + interface WithRights { + /** + * Specifies rights. + * @param rights The rights associated with the rule + * @return the next definition stage + */ + WithCreate withRights(List rights); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a NamespaceAuthorizationRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithRights { + } + + /** + * Grouping of NamespaceAuthorizationRule update stages. + */ + interface UpdateStages { + /** + * The stage of the namespaceauthorizationrule update allowing to specify Rights. + */ + interface WithRights { + /** + * Specifies rights. + * @param rights The rights associated with the rule + * @return the next update stage + */ + Update withRights(List rights); + } + + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Namespaces.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Namespaces.java index 43f0faada39af..27ccef7cf8c9c 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Namespaces.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Namespaces.java @@ -21,6 +21,7 @@ import rx.Completable; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.VirtualNetworkRule; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.NetworkRuleSetInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.NamespaceAuthorizationRule; /** * Type representing Namespaces. @@ -40,10 +41,26 @@ public interface Namespaces extends SupportsCreating checkNameAvailabilityAsync(String name); + /** * Gets an IpFilterRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param ipFilterRuleName The IP Filter Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -54,7 +71,7 @@ public interface Namespaces extends SupportsCreating getNetworkRuleSetAsync(String resourceGroupName, String namespaceName); + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName); + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName); + + /** + * Deletes an AuthorizationRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName); + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName); + + /** + * Regenerates the primary or secondary connection strings for the specified Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters required to regenerate the connection string. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters); + } diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/NetworkRuleSet.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/NetworkRuleSet.java index 23b2e4cd10606..4dd56da5e9232 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/NetworkRuleSet.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/NetworkRuleSet.java @@ -38,6 +38,11 @@ public interface NetworkRuleSet extends HasInner, HasManage */ String name(); + /** + * @return the trustedServiceAccessEnabled value. + */ + Boolean trustedServiceAccessEnabled(); + /** * @return the type value. */ diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpoint.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpoint.java new file mode 100644 index 0000000000000..cc6bf9ff74256 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpoint.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * PrivateEndpoint information. + */ +public class PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the ARM identifier for Private Endpoint. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the ARM identifier for Private Endpoint. + * + * @param id the id value to set + * @return the PrivateEndpoint object itself. + */ + public PrivateEndpoint withId(String id) { + this.id = id; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpointConnection.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpointConnection.java new file mode 100644 index 0000000000000..8b71a2a88d598 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpointConnection.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.PrivateEndpointConnectionInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; + +/** + * Type representing PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * @return the privateLinkServiceConnectionState value. + */ + ConnectionState privateLinkServiceConnectionState(); + + /** + * @return the provisioningState value. + */ + EndPointProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the PrivateEndpointConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate { + } + + /** + * Grouping of PrivateEndpointConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PrivateEndpointConnection definition. + */ + interface Blank extends WithNamespace { + } + + /** + * The stage of the privateendpointconnection definition allowing to specify Namespace. + */ + interface WithNamespace { + /** + * Specifies resourceGroupName, namespaceName. + * @param resourceGroupName Name of the resource group within the azure subscription + * @param namespaceName The Namespace name + * @return the next definition stage + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify PrivateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies privateEndpoint. + * @param privateEndpoint The Private Endpoint resource for this Connection + * @return the next definition stage + */ + WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState Details about the state of the connection + * @return the next definition stage + */ + WithCreate withPrivateLinkServiceConnectionState(ConnectionState privateLinkServiceConnectionState); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify ProvisioningState. + */ + interface WithProvisioningState { + /** + * Specifies provisioningState. + * @param provisioningState Provisioning state of the Private Endpoint Connection. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @return the next definition stage + */ + WithCreate withProvisioningState(EndPointProvisioningState provisioningState); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState, DefinitionStages.WithProvisioningState { + } + } + /** + * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState, UpdateStages.WithProvisioningState { + } + + /** + * Grouping of PrivateEndpointConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the privateendpointconnection update allowing to specify PrivateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies privateEndpoint. + * @param privateEndpoint The Private Endpoint resource for this Connection + * @return the next update stage + */ + Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the privateendpointconnection update allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState Details about the state of the connection + * @return the next update stage + */ + Update withPrivateLinkServiceConnectionState(ConnectionState privateLinkServiceConnectionState); + } + + /** + * The stage of the privateendpointconnection update allowing to specify ProvisioningState. + */ + interface WithProvisioningState { + /** + * Specifies provisioningState. + * @param provisioningState Provisioning state of the Private Endpoint Connection. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @return the next update stage + */ + Update withProvisioningState(EndPointProvisioningState provisioningState); + } + + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpointConnections.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpointConnections.java new file mode 100644 index 0000000000000..2252c392c2d4e --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateEndpointConnections.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.PrivateEndpointConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PrivateEndpointConnections. + */ +public interface PrivateEndpointConnections extends SupportsCreating, HasInner { + /** + * Gets a description for the specified Private Endpoint Connection name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName); + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String namespaceName); + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkConnectionStatus.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkConnectionStatus.java new file mode 100644 index 0000000000000..f901397c01f26 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkConnectionStatus.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrivateLinkConnectionStatus. + */ +public final class PrivateLinkConnectionStatus extends ExpandableStringEnum { + /** Static value Pending for PrivateLinkConnectionStatus. */ + public static final PrivateLinkConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for PrivateLinkConnectionStatus. */ + public static final PrivateLinkConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for PrivateLinkConnectionStatus. */ + public static final PrivateLinkConnectionStatus REJECTED = fromString("Rejected"); + + /** Static value Disconnected for PrivateLinkConnectionStatus. */ + public static final PrivateLinkConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a PrivateLinkConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding PrivateLinkConnectionStatus + */ + @JsonCreator + public static PrivateLinkConnectionStatus fromString(String name) { + return fromString(name, PrivateLinkConnectionStatus.class); + } + + /** + * @return known PrivateLinkConnectionStatus values + */ + public static Collection values() { + return values(PrivateLinkConnectionStatus.class); + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkResources.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkResources.java new file mode 100644 index 0000000000000..9acf588464184 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkResources.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.PrivateLinkResourcesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PrivateLinkResources. + */ +public interface PrivateLinkResources extends HasInner { + /** + * Gets lists of resources that supports Privatelinks. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String namespaceName); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkResourcesListResult.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkResourcesListResult.java new file mode 100644 index 0000000000000..eada347d4ce96 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/PrivateLinkResourcesListResult.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.EventHubsManager; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.PrivateLinkResourcesListResultInner; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.PrivateLinkResourceInner; +import java.util.List; + +/** + * Type representing PrivateLinkResourcesListResult. + */ +public interface PrivateLinkResourcesListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ProvisioningStateDR.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ProvisioningStateDR.java new file mode 100644 index 0000000000000..9a3c3b44c487b --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/ProvisioningStateDR.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ProvisioningStateDR. + */ +public enum ProvisioningStateDR { + /** Enum value Accepted. */ + ACCEPTED("Accepted"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a ProvisioningStateDR instance. */ + private String value; + + ProvisioningStateDR(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProvisioningStateDR instance. + * + * @param value the serialized value to parse. + * @return the parsed ProvisioningStateDR object, or null if unable to parse. + */ + @JsonCreator + public static ProvisioningStateDR fromString(String value) { + ProvisioningStateDR[] items = ProvisioningStateDR.values(); + for (ProvisioningStateDR item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/RegenerateAccessKeyParameters.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/RegenerateAccessKeyParameters.java new file mode 100644 index 0000000000000..b9cbfbc5ebd24 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/RegenerateAccessKeyParameters.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters supplied to the Regenerate Authorization Rule operation, + * specifies which key needs to be reset. + */ +public class RegenerateAccessKeyParameters { + /** + * The access key to regenerate. Possible values include: 'PrimaryKey', + * 'SecondaryKey'. + */ + @JsonProperty(value = "keyType", required = true) + private KeyType keyType; + + /** + * Optional, if the key value provided, is set for KeyType or autogenerated + * Key value set for keyType. + */ + @JsonProperty(value = "key") + private String key; + + /** + * Get the access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey'. + * + * @return the keyType value + */ + public KeyType keyType() { + return this.keyType; + } + + /** + * Set the access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey'. + * + * @param keyType the keyType value to set + * @return the RegenerateAccessKeyParameters object itself. + */ + public RegenerateAccessKeyParameters withKeyType(KeyType keyType) { + this.keyType = keyType; + return this; + } + + /** + * Get optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType. + * + * @param key the key value to set + * @return the RegenerateAccessKeyParameters object itself. + */ + public RegenerateAccessKeyParameters withKey(String key) { + this.key = key; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Regions.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Regions.java new file mode 100644 index 0000000000000..e78411cb30339 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/Regions.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation.RegionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Regions. + */ +public interface Regions extends HasInner { + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listBySkuAsync(final String sku); + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/RoleDisasterRecovery.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/RoleDisasterRecovery.java new file mode 100644 index 0000000000000..34eec0bd0ca5f --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/RoleDisasterRecovery.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for RoleDisasterRecovery. + */ +public enum RoleDisasterRecovery { + /** Enum value Primary. */ + PRIMARY("Primary"), + + /** Enum value PrimaryNotReplicating. */ + PRIMARY_NOT_REPLICATING("PrimaryNotReplicating"), + + /** Enum value Secondary. */ + SECONDARY("Secondary"); + + /** The actual serialized value for a RoleDisasterRecovery instance. */ + private String value; + + RoleDisasterRecovery(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RoleDisasterRecovery instance. + * + * @param value the serialized value to parse. + * @return the parsed RoleDisasterRecovery object, or null if unable to parse. + */ + @JsonCreator + public static RoleDisasterRecovery fromString(String value) { + RoleDisasterRecovery[] items = RoleDisasterRecovery.values(); + for (RoleDisasterRecovery item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/UnavailableReason.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/UnavailableReason.java new file mode 100644 index 0000000000000..f7e7b473c0192 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/UnavailableReason.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UnavailableReason. + */ +public enum UnavailableReason { + /** Enum value None. */ + NONE("None"), + + /** Enum value InvalidName. */ + INVALID_NAME("InvalidName"), + + /** Enum value SubscriptionIsDisabled. */ + SUBSCRIPTION_IS_DISABLED("SubscriptionIsDisabled"), + + /** Enum value NameInUse. */ + NAME_IN_USE("NameInUse"), + + /** Enum value NameInLockdown. */ + NAME_IN_LOCKDOWN("NameInLockdown"), + + /** Enum value TooManyNamespaceInCurrentSubscription. */ + TOO_MANY_NAMESPACE_IN_CURRENT_SUBSCRIPTION("TooManyNamespaceInCurrentSubscription"); + + /** The actual serialized value for a UnavailableReason instance. */ + private String value; + + UnavailableReason(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UnavailableReason instance. + * + * @param value the serialized value to parse. + * @return the parsed UnavailableReason object, or null if unable to parse. + */ + @JsonCreator + public static UnavailableReason fromString(String value) { + UnavailableReason[] items = UnavailableReason.values(); + for (UnavailableReason item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/VirtualNetworkRule.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/VirtualNetworkRule.java index ba23d13503fd5..cf0f2ab433882 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/VirtualNetworkRule.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/VirtualNetworkRule.java @@ -64,7 +64,7 @@ interface Blank extends WithNamespace { interface WithNamespace { /** * Specifies resourceGroupName, namespaceName. - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName Name of the resource group within the azure subscription * @param namespaceName The Namespace name * @return the next definition stage */ diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AccessKeysImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AccessKeysImpl.java new file mode 100644 index 0000000000000..65464fcafe864 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AccessKeysImpl.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessKeys; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class AccessKeysImpl extends WrapperImpl implements AccessKeys { + private final EventHubsManager manager; + AccessKeysImpl(AccessKeysInner inner, EventHubsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public String aliasPrimaryConnectionString() { + return this.inner().aliasPrimaryConnectionString(); + } + + @Override + public String aliasSecondaryConnectionString() { + return this.inner().aliasSecondaryConnectionString(); + } + + @Override + public String keyName() { + return this.inner().keyName(); + } + + @Override + public String primaryConnectionString() { + return this.inner().primaryConnectionString(); + } + + @Override + public String primaryKey() { + return this.inner().primaryKey(); + } + + @Override + public String secondaryConnectionString() { + return this.inner().secondaryConnectionString(); + } + + @Override + public String secondaryKey() { + return this.inner().secondaryKey(); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AccessKeysInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AccessKeysInner.java new file mode 100644 index 0000000000000..4d6a1262db2a2 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AccessKeysInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Namespace/EventHub Connection String. + */ +public class AccessKeysInner { + /** + * Primary connection string of the created namespace AuthorizationRule. + */ + @JsonProperty(value = "primaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String primaryConnectionString; + + /** + * Secondary connection string of the created namespace AuthorizationRule. + */ + @JsonProperty(value = "secondaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryConnectionString; + + /** + * Primary connection string of the alias if GEO DR is enabled. + */ + @JsonProperty(value = "aliasPrimaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String aliasPrimaryConnectionString; + + /** + * Secondary connection string of the alias if GEO DR is enabled. + */ + @JsonProperty(value = "aliasSecondaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String aliasSecondaryConnectionString; + + /** + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String primaryKey; + + /** + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryKey; + + /** + * A string that describes the AuthorizationRule. + */ + @JsonProperty(value = "keyName", access = JsonProperty.Access.WRITE_ONLY) + private String keyName; + + /** + * Get primary connection string of the created namespace AuthorizationRule. + * + * @return the primaryConnectionString value + */ + public String primaryConnectionString() { + return this.primaryConnectionString; + } + + /** + * Get secondary connection string of the created namespace AuthorizationRule. + * + * @return the secondaryConnectionString value + */ + public String secondaryConnectionString() { + return this.secondaryConnectionString; + } + + /** + * Get primary connection string of the alias if GEO DR is enabled. + * + * @return the aliasPrimaryConnectionString value + */ + public String aliasPrimaryConnectionString() { + return this.aliasPrimaryConnectionString; + } + + /** + * Get secondary connection string of the alias if GEO DR is enabled. + * + * @return the aliasSecondaryConnectionString value + */ + public String aliasSecondaryConnectionString() { + return this.aliasSecondaryConnectionString; + } + + /** + * Get a base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the primaryKey value + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Get a base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the secondaryKey value + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Get a string that describes the AuthorizationRule. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ArmDisasterRecoveryImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ArmDisasterRecoveryImpl.java new file mode 100644 index 0000000000000..54b4eb34296d4 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ArmDisasterRecoveryImpl.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ArmDisasterRecovery; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ProvisioningStateDR; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.RoleDisasterRecovery; + +class ArmDisasterRecoveryImpl extends CreatableUpdatableImpl implements ArmDisasterRecovery, ArmDisasterRecovery.Definition, ArmDisasterRecovery.Update { + private final EventHubsManager manager; + private String resourceGroupName; + private String namespaceName; + private String alias; + + ArmDisasterRecoveryImpl(String name, EventHubsManager manager) { + super(name, new ArmDisasterRecoveryInner()); + this.manager = manager; + // Set resource name + this.alias = name; + // + } + + ArmDisasterRecoveryImpl(ArmDisasterRecoveryInner inner, EventHubsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.alias = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces"); + this.alias = IdParsingUtils.getValueFromIdByName(inner.id(), "disasterRecoveryConfigs"); + // + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DisasterRecoveryConfigsInner client = this.manager().inner().disasterRecoveryConfigs(); + return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.alias, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DisasterRecoveryConfigsInner client = this.manager().inner().disasterRecoveryConfigs(); + return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.alias, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DisasterRecoveryConfigsInner client = this.manager().inner().disasterRecoveryConfigs(); + return client.getAsync(this.resourceGroupName, this.namespaceName, this.alias); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String alternateName() { + return this.inner().alternateName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String partnerNamespace() { + return this.inner().partnerNamespace(); + } + + @Override + public Long pendingReplicationOperationsCount() { + return this.inner().pendingReplicationOperationsCount(); + } + + @Override + public ProvisioningStateDR provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public RoleDisasterRecovery role() { + return this.inner().role(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ArmDisasterRecoveryImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + @Override + public ArmDisasterRecoveryImpl withAlternateName(String alternateName) { + this.inner().withAlternateName(alternateName); + return this; + } + + @Override + public ArmDisasterRecoveryImpl withPartnerNamespace(String partnerNamespace) { + this.inner().withPartnerNamespace(partnerNamespace); + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ArmDisasterRecoveryInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ArmDisasterRecoveryInner.java new file mode 100644 index 0000000000000..4be691fac4e7c --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ArmDisasterRecoveryInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ProvisioningStateDR; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.RoleDisasterRecovery; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Single item in List or Get Alias(Disaster Recovery configuration) operation. + */ +@JsonFlatten +public class ArmDisasterRecoveryInner extends ProxyResource { + /** + * Provisioning state of the Alias(Disaster Recovery configuration) - + * possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values + * include: 'Accepted', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningStateDR provisioningState; + + /** + * ARM Id of the Primary/Secondary eventhub namespace name, which is part + * of GEO DR pairing. + */ + @JsonProperty(value = "properties.partnerNamespace") + private String partnerNamespace; + + /** + * Alternate name specified when alias and namespace names are same. + */ + @JsonProperty(value = "properties.alternateName") + private String alternateName; + + /** + * role of namespace in GEO DR - possible values 'Primary' or + * 'PrimaryNotReplicating' or 'Secondary'. Possible values include: + * 'Primary', 'PrimaryNotReplicating', 'Secondary'. + */ + @JsonProperty(value = "properties.role", access = JsonProperty.Access.WRITE_ONLY) + private RoleDisasterRecovery role; + + /** + * Number of entities pending to be replicated. + */ + @JsonProperty(value = "properties.pendingReplicationOperationsCount", access = JsonProperty.Access.WRITE_ONLY) + private Long pendingReplicationOperationsCount; + + /** + * Get provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningStateDR provisioningState() { + return this.provisioningState; + } + + /** + * Get aRM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing. + * + * @return the partnerNamespace value + */ + public String partnerNamespace() { + return this.partnerNamespace; + } + + /** + * Set aRM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing. + * + * @param partnerNamespace the partnerNamespace value to set + * @return the ArmDisasterRecoveryInner object itself. + */ + public ArmDisasterRecoveryInner withPartnerNamespace(String partnerNamespace) { + this.partnerNamespace = partnerNamespace; + return this; + } + + /** + * Get alternate name specified when alias and namespace names are same. + * + * @return the alternateName value + */ + public String alternateName() { + return this.alternateName; + } + + /** + * Set alternate name specified when alias and namespace names are same. + * + * @param alternateName the alternateName value to set + * @return the ArmDisasterRecoveryInner object itself. + */ + public ArmDisasterRecoveryInner withAlternateName(String alternateName) { + this.alternateName = alternateName; + return this; + } + + /** + * Get role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary'. + * + * @return the role value + */ + public RoleDisasterRecovery role() { + return this.role; + } + + /** + * Get number of entities pending to be replicated. + * + * @return the pendingReplicationOperationsCount value + */ + public Long pendingReplicationOperationsCount() { + return this.pendingReplicationOperationsCount; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AuthorizationRuleInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AuthorizationRuleInner.java new file mode 100644 index 0000000000000..56280715edb31 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/AuthorizationRuleInner.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import java.util.List; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessRights; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Single item in a List or Get AuthorizationRule operation. + */ +@JsonFlatten +public class AuthorizationRuleInner extends ProxyResource { + /** + * The rights associated with the rule. + */ + @JsonProperty(value = "properties.rights", required = true) + private List rights; + + /** + * Get the rights associated with the rule. + * + * @return the rights value + */ + public List rights() { + return this.rights; + } + + /** + * Set the rights associated with the rule. + * + * @param rights the rights value to set + * @return the AuthorizationRuleInner object itself. + */ + public AuthorizationRuleInner withRights(List rights) { + this.rights = rights; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/CheckNameAvailabilityResultImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/CheckNameAvailabilityResultImpl.java new file mode 100644 index 0000000000000..c5f722730bec0 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/CheckNameAvailabilityResultImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.CheckNameAvailabilityResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.UnavailableReason; + +class CheckNameAvailabilityResultImpl extends WrapperImpl implements CheckNameAvailabilityResult { + private final EventHubsManager manager; + CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner inner, EventHubsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public UnavailableReason reason() { + return this.inner().reason(); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/CheckNameAvailabilityResultInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/CheckNameAvailabilityResultInner.java new file mode 100644 index 0000000000000..14eb267e7a71b --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/CheckNameAvailabilityResultInner.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.UnavailableReason; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Result of the CheckNameAvailability operation. + */ +public class CheckNameAvailabilityResultInner { + /** + * The detailed info regarding the reason associated with the Namespace. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Value indicating Namespace is availability, true if the Namespace is + * available; otherwise, false. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * The reason for unavailability of a Namespace. Possible values include: + * 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', + * 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'. + */ + @JsonProperty(value = "reason") + private UnavailableReason reason; + + /** + * Get the detailed info regarding the reason associated with the Namespace. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get value indicating Namespace is availability, true if the Namespace is available; otherwise, false. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set value indicating Namespace is availability, true if the Namespace is available; otherwise, false. + * + * @param nameAvailable the nameAvailable value to set + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason for unavailability of a Namespace. Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'. + * + * @return the reason value + */ + public UnavailableReason reason() { + return this.reason; + } + + /** + * Set the reason for unavailability of a Namespace. Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'. + * + * @param reason the reason value to set + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withReason(UnavailableReason reason) { + this.reason = reason; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClusterImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClusterImpl.java index bab787115332f..9fe992e055e25 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClusterImpl.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClusterImpl.java @@ -21,14 +21,14 @@ class ClusterImpl extends GroupableResourceCoreImpl createResourceAsync() { ClustersInner client = this.manager().inner().clusters(); - return client.putAsync(this.resourceGroupName(), this.name()) + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) .map(innerToFluentMap(this)); } @Override public Observable updateResourceAsync() { ClustersInner client = this.manager().inner().clusters(); - return client.patchAsync(this.resourceGroupName(), this.name(), this.inner()) + return client.updateAsync(this.resourceGroupName(), this.name(), this.inner()) .map(innerToFluentMap(this)); } @@ -45,8 +45,8 @@ public boolean isInCreateMode() { @Override - public String created() { - return this.inner().created(); + public String createdAt() { + return this.inner().createdAt(); } @Override @@ -65,8 +65,8 @@ public String status() { } @Override - public String updated() { - return this.inner().updated(); + public String updatedAt() { + return this.inner().updatedAt(); } @Override diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClusterInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClusterInner.java index 3b6f1e96d45d8..7b9c74c537334 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClusterInner.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClusterInner.java @@ -29,14 +29,14 @@ public class ClusterInner extends Resource { /** * The UTC time when the Event Hubs Cluster was created. */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private String created; + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private String createdAt; /** * The UTC time when the Event Hubs Cluster was last updated. */ - @JsonProperty(value = "properties.updated", access = JsonProperty.Access.WRITE_ONLY) - private String updated; + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private String updatedAt; /** * The metric ID of the cluster resource. Provided by the service and not @@ -74,19 +74,19 @@ public ClusterInner withSku(ClusterSku sku) { /** * Get the UTC time when the Event Hubs Cluster was created. * - * @return the created value + * @return the createdAt value */ - public String created() { - return this.created; + public String createdAt() { + return this.createdAt; } /** * Get the UTC time when the Event Hubs Cluster was last updated. * - * @return the updated value + * @return the updatedAt value */ - public String updated() { - return this.updated; + public String updatedAt() { + return this.updatedAt; } /** diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClustersInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClustersInner.java index 0c6cf586b7b85..67c9293b80775 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClustersInner.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ClustersInner.java @@ -46,7 +46,7 @@ public class ClustersInner implements InnerSupportsGet, InnerSuppo /** The Retrofit service to perform REST calls. */ private ClustersService service; /** The service client containing this operation class. */ - private EventHub2018PreviewManagementClientImpl client; + private EventHubManagementClientImpl client; /** * Initializes an instance of ClustersInner. @@ -54,7 +54,7 @@ public class ClustersInner implements InnerSupportsGet, InnerSuppo * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public ClustersInner(Retrofit retrofit, EventHub2018PreviewManagementClientImpl client) { + public ClustersInner(Retrofit retrofit, EventHubManagementClientImpl client) { this.service = retrofit.create(ClustersService.class); this.client = client; } @@ -76,21 +76,21 @@ interface ClustersService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters put" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") - Observable> put(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Body ClusterInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters beginPut" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters beginCreateOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") - Observable> beginPut(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Body ClusterInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters patch" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") - Observable> patch(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters beginPatch" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") - Observable> beginPatch(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", method = "DELETE", hasBody = true) @@ -116,7 +116,7 @@ interface ClustersService { * @return the PagedList object if successful. */ public PagedList list() { - PageImpl1 page = new PageImpl1<>(); + PageImpl page = new PageImpl<>(); page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); page.setNextPageLink(null); return new PagedList(page) { @@ -146,7 +146,7 @@ public Observable> listAsync() { return listWithServiceResponseAsync().map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { - PageImpl1 page = new PageImpl1<>(); + PageImpl page = new PageImpl<>(); page.setItems(response.body()); return page; } @@ -162,15 +162,13 @@ public Observable>> listWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listDelegate(response); List items = null; if (result.body() != null) { items = result.body().items(); @@ -184,9 +182,9 @@ public Observable>> call(Response> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } @@ -194,7 +192,7 @@ private ServiceResponse> listDelegate(Response< /** * Lists the available Event Hubs Clusters within an ARM resource group. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @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 @@ -213,7 +211,7 @@ public Page nextPage(String nextPageLink) { /** * Lists the available Event Hubs Clusters within an ARM resource group. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -233,7 +231,7 @@ public Observable>> call(String nextPageLink) /** * Lists the available Event Hubs Clusters within an ARM resource group. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ClusterInner> object */ @@ -250,7 +248,7 @@ public Page call(ServiceResponse> response) { /** * Lists the available Event Hubs Clusters within an ARM resource group. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ClusterInner> object */ @@ -271,7 +269,7 @@ public Observable>> call(ServiceResponse> * @param resourceGroupName Name of the resource group within the Azure subscription. + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -282,15 +280,13 @@ public Observable>> listByResourceGroupSingle if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupDelegate(response); + ServiceResponse> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -299,9 +295,9 @@ public Observable>> call(Response> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } @@ -309,7 +305,7 @@ private ServiceResponse> listByResourceGroupDelegate(Resp /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -323,7 +319,7 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -336,7 +332,7 @@ public ServiceFuture getByResourceGroupAsync(String resourceGroupN /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ClusterInner object @@ -353,7 +349,7 @@ public ClusterInner call(ServiceResponse response) { /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ClusterInner object @@ -368,10 +364,8 @@ public Observable> getByResourceGroupWithServiceRe if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -395,40 +389,43 @@ private ServiceResponse getByResourceGroupDelegate(Response putAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(putWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); } /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable putAsync(String resourceGroupName, String clusterName) { - return putWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, ClusterInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { @Override public ClusterInner call(ServiceResponse response) { return response.body(); @@ -439,12 +436,13 @@ public ClusterInner call(ServiceResponse response) { /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> putWithServiceResponseAsync(String resourceGroupName, String clusterName) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -454,50 +452,55 @@ public Observable> putWithServiceResponseAsync(Str if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - Observable> observable = service.put(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + Validator.validate(parameters); + final String apiVersion = "2018-01-01-preview"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, clusterName, parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating a eventhub cluster resource. * @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 the ClusterInner object if successful. */ - public ClusterInner beginPut(String resourceGroupName, String clusterName) { - return beginPutWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + public ClusterInner beginCreateOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); } /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating a eventhub cluster resource. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPutAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginPutWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); } /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ClusterInner object */ - public Observable beginPutAsync(String resourceGroupName, String clusterName) { - return beginPutWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, ClusterInner>() { + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { @Override public ClusterInner call(ServiceResponse response) { return response.body(); @@ -508,12 +511,13 @@ public ClusterInner call(ServiceResponse response) { /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ClusterInner object */ - public Observable> beginPutWithServiceResponseAsync(String resourceGroupName, String clusterName) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -523,15 +527,17 @@ public Observable> beginPutWithServiceResponseAsyn if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - return service.beginPut(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + Validator.validate(parameters); + final String apiVersion = "2018-01-01-preview"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, clusterName, parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPutDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -540,7 +546,7 @@ public Observable> call(Response res }); } - private ServiceResponse beginPutDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) @@ -552,7 +558,7 @@ private ServiceResponse beginPutDelegate(Response re /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -560,35 +566,35 @@ private ServiceResponse beginPutDelegate(Response re * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ClusterInner object if successful. */ - public ClusterInner patch(String resourceGroupName, String clusterName, ClusterInner parameters) { - return patchWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body(); + public ClusterInner update(String resourceGroupName, String clusterName, ClusterInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body(); } /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture patchAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + public ServiceFuture updateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); } /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable patchAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { - return patchWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + public Observable updateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { @Override public ClusterInner call(ServiceResponse response) { return response.body(); @@ -599,13 +605,13 @@ public ClusterInner call(ServiceResponse response) { /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> patchWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -615,21 +621,19 @@ public Observable> patchWithServiceResponseAsync(S if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - Observable> observable = service.patch(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2018-01-01-preview"; + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -637,35 +641,35 @@ public Observable> patchWithServiceResponseAsync(S * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ClusterInner object if successful. */ - public ClusterInner beginPatch(String resourceGroupName, String clusterName, ClusterInner parameters) { - return beginPatchWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); + public ClusterInner beginUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); } /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPatchAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginPatchWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + public ServiceFuture beginUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); } /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ClusterInner object */ - public Observable beginPatchAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { - return beginPatchWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + public Observable beginUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { @Override public ClusterInner call(ServiceResponse response) { return response.body(); @@ -676,13 +680,13 @@ public ClusterInner call(ServiceResponse response) { /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ClusterInner object */ - public Observable> beginPatchWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -692,19 +696,17 @@ public Observable> beginPatchWithServiceResponseAs if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - return service.beginPatch(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPatchDelegate(response); + ServiceResponse clientResponse = beginUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -713,7 +715,7 @@ public Observable> call(Response res }); } - private ServiceResponse beginPatchDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + private ServiceResponse beginUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) @@ -725,7 +727,7 @@ private ServiceResponse beginPatchDelegate(Response /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -738,7 +740,7 @@ public void delete(String resourceGroupName, String clusterName) { /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -751,7 +753,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String clusterN /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -768,7 +770,7 @@ public Void call(ServiceResponse response) { /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -783,17 +785,15 @@ public Observable> deleteWithServiceResponseAsync(String r if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2018-01-01-preview"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -806,7 +806,7 @@ public void beginDelete(String resourceGroupName, String clusterName) { /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -819,7 +819,7 @@ public ServiceFuture beginDeleteAsync(String resourceGroupName, String clu /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. @@ -836,7 +836,7 @@ public Void call(ServiceResponse response) { /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. @@ -851,10 +851,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -880,7 +878,7 @@ private ServiceResponse beginDeleteDelegate(Response respons /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -894,7 +892,7 @@ public EHNamespaceIdListResultInner listNamespaces(String resourceGroupName, Str /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -907,7 +905,7 @@ public ServiceFuture listNamespacesAsync(String re /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EHNamespaceIdListResultInner object @@ -924,7 +922,7 @@ public EHNamespaceIdListResultInner call(ServiceResponse> listNamespacesW if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listNamespaces(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.listNamespaces(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1044,7 +1040,7 @@ public Observable>> call(ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -1058,7 +1054,7 @@ public Observable>> listByResourceGroupNextSi @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); + ServiceResponse> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1067,9 +1063,9 @@ public Observable>> call(Response> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConfigurationsInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConfigurationsInner.java index c9a6e319f164f..09b99cb7d584c 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConfigurationsInner.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConfigurationsInner.java @@ -37,7 +37,7 @@ public class ConfigurationsInner { /** The Retrofit service to perform REST calls. */ private ConfigurationsService service; /** The service client containing this operation class. */ - private EventHub2018PreviewManagementClientImpl client; + private EventHubManagementClientImpl client; /** * Initializes an instance of ConfigurationsInner. @@ -45,7 +45,7 @@ public class ConfigurationsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public ConfigurationsInner(Retrofit retrofit, EventHub2018PreviewManagementClientImpl client) { + public ConfigurationsInner(Retrofit retrofit, EventHubManagementClientImpl client) { this.service = retrofit.create(ConfigurationsService.class); this.client = client; } @@ -68,7 +68,7 @@ interface ConfigurationsService { /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -82,7 +82,7 @@ public ClusterQuotaConfigurationPropertiesInner patch(String resourceGroupName, /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -95,7 +95,7 @@ public ServiceFuture patchAsync(String /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ClusterQuotaConfigurationPropertiesInner object @@ -112,7 +112,7 @@ public ClusterQuotaConfigurationPropertiesInner call(ServiceResponse> pat if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2018-01-01-preview"; final Map settings = null; ClusterQuotaConfigurationPropertiesInner parameters = new ClusterQuotaConfigurationPropertiesInner(); parameters.withSettings(null); - return service.patch(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.patch(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -150,7 +148,7 @@ public Observable> cal /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param settings All possible Cluster settings - a collection of key/value paired settings which apply to quotas and configurations imposed on the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -165,7 +163,7 @@ public ClusterQuotaConfigurationPropertiesInner patch(String resourceGroupName, /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param settings All possible Cluster settings - a collection of key/value paired settings which apply to quotas and configurations imposed on the cluster. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -179,7 +177,7 @@ public ServiceFuture patchAsync(String /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param settings All possible Cluster settings - a collection of key/value paired settings which apply to quotas and configurations imposed on the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -197,7 +195,7 @@ public ClusterQuotaConfigurationPropertiesInner call(ServiceResponse> pat if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(settings); + final String apiVersion = "2018-01-01-preview"; ClusterQuotaConfigurationPropertiesInner parameters = new ClusterQuotaConfigurationPropertiesInner(); parameters.withSettings(settings); - return service.patch(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.patch(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -245,7 +241,7 @@ private ServiceResponse patchDelegate( /** * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings imposed on the cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -259,7 +255,7 @@ public ClusterQuotaConfigurationPropertiesInner get(String resourceGroupName, St /** * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings imposed on the cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -272,7 +268,7 @@ public ServiceFuture getAsync(String r /** * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings imposed on the cluster. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ClusterQuotaConfigurationPropertiesInner object @@ -289,7 +285,7 @@ public ClusterQuotaConfigurationPropertiesInner call(ServiceResponse> get if (clusterName == null) { throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.get(this.client.subscriptionId(), resourceGroupName, clusterName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupImpl.java new file mode 100644 index 0000000000000..5c70c31eb78c2 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupImpl.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroup; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import org.joda.time.DateTime; + +class ConsumerGroupImpl extends CreatableUpdatableImpl implements ConsumerGroup, ConsumerGroup.Definition, ConsumerGroup.Update { + private final EventHubsManager manager; + private String resourceGroupName; + private String namespaceName; + private String eventHubName; + private String consumerGroupName; + private String cuserMetadata; + private String uuserMetadata; + + ConsumerGroupImpl(String name, EventHubsManager manager) { + super(name, new ConsumerGroupInner()); + this.manager = manager; + // Set resource name + this.consumerGroupName = name; + // + } + + ConsumerGroupImpl(ConsumerGroupInner inner, EventHubsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.consumerGroupName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces"); + this.eventHubName = IdParsingUtils.getValueFromIdByName(inner.id(), "eventhubs"); + this.consumerGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "consumergroups"); + // + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ConsumerGroupsInner client = this.manager().inner().consumerGroups(); + return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.consumerGroupName, this.cuserMetadata) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ConsumerGroupsInner client = this.manager().inner().consumerGroups(); + return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.consumerGroupName, this.uuserMetadata) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ConsumerGroupsInner client = this.manager().inner().consumerGroups(); + return client.getAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.consumerGroupName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public DateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DateTime updatedAt() { + return this.inner().updatedAt(); + } + + @Override + public String userMetadata() { + return this.inner().userMetadata(); + } + + @Override + public ConsumerGroupImpl withExistingEventhub(String resourceGroupName, String namespaceName, String eventHubName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.eventHubName = eventHubName; + return this; + } + + @Override + public ConsumerGroupImpl withUserMetadata(String userMetadata) { + if (isInCreateMode()) { + this.cuserMetadata = userMetadata; + } else { + this.uuserMetadata = userMetadata; + } + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupInner.java new file mode 100644 index 0000000000000..5e5dd9c4af0e2 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupInner.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Single item in List or Get Consumer group operation. + */ +@JsonFlatten +public class ConsumerGroupInner extends ProxyResource { + /** + * Exact time the message was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdAt; + + /** + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private DateTime updatedAt; + + /** + * User Metadata is a placeholder to store user-defined string data with + * maximum length 1024. e.g. it can be used to store descriptive data, such + * as list of teams and their contact information also user-defined + * configuration settings can be stored. + */ + @JsonProperty(value = "properties.userMetadata") + private String userMetadata; + + /** + * Get exact time the message was created. + * + * @return the createdAt value + */ + public DateTime createdAt() { + return this.createdAt; + } + + /** + * Get the exact time the message was updated. + * + * @return the updatedAt value + */ + public DateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get user Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. + * + * @return the userMetadata value + */ + public String userMetadata() { + return this.userMetadata; + } + + /** + * Set user Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. + * + * @param userMetadata the userMetadata value to set + * @return the ConsumerGroupInner object itself. + */ + public ConsumerGroupInner withUserMetadata(String userMetadata) { + this.userMetadata = userMetadata; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupsImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupsImpl.java new file mode 100644 index 0000000000000..9a6fa3de80e68 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroups; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroup; + +class ConsumerGroupsImpl extends WrapperImpl implements ConsumerGroups { + private final EventHubsManager manager; + + ConsumerGroupsImpl(EventHubsManager manager) { + super(manager.inner().consumerGroups()); + this.manager = manager; + } + + public EventHubsManager manager() { + return this.manager; + } + + @Override + public ConsumerGroupImpl define(String name) { + return wrapModel(name); + } + + private ConsumerGroupImpl wrapModel(ConsumerGroupInner inner) { + return new ConsumerGroupImpl(inner, manager()); + } + + private ConsumerGroupImpl wrapModel(String name) { + return new ConsumerGroupImpl(name, this.manager()); + } + + @Override + public Observable listByEventHubAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { + ConsumerGroupsInner client = this.inner(); + return client.listByEventHubAsync(resourceGroupName, namespaceName, eventHubName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ConsumerGroup call(ConsumerGroupInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + ConsumerGroupsInner client = this.inner(); + return client.getAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName) + .flatMap(new Func1>() { + @Override + public Observable call(ConsumerGroupInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ConsumerGroup)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + ConsumerGroupsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).toCompletable(); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupsInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupsInner.java new file mode 100644 index 0000000000000..20f8ea1ecf8ec --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/ConsumerGroupsInner.java @@ -0,0 +1,853 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ConsumerGroups. + */ +public class ConsumerGroupsInner { + /** The Retrofit service to perform REST calls. */ + private ConsumerGroupsService service; + /** The service client containing this operation class. */ + private EventHubManagementClientImpl client; + + /** + * Initializes an instance of ConsumerGroupsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ConsumerGroupsInner(Retrofit retrofit, EventHubManagementClientImpl client) { + this.service = retrofit.create(ConsumerGroupsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ConsumerGroups to be + * used by Retrofit to perform actually REST calls. + */ + interface ConsumerGroupsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroups createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("consumerGroupName") String consumerGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConsumerGroupInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroups delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("consumerGroupName") String consumerGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroups get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("consumerGroupName") String consumerGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroups listByEventHub" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups") + Observable> listByEventHub(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$skip") Integer skip, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroups listByEventHubNext" }) + @GET + Observable> listByEventHubNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @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 the ConsumerGroupInner object if successful. + */ + public ConsumerGroupInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).toBlocking().single().body(); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName), serviceCallback); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConsumerGroupInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).map(new Func1, ConsumerGroupInner>() { + @Override + public ConsumerGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConsumerGroupInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (consumerGroupName == null) { + throw new IllegalArgumentException("Parameter consumerGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + final String userMetadata = null; + ConsumerGroupInner parameters = new ConsumerGroupInner(); + parameters.withUserMetadata(null); + return service.createOrUpdate(resourceGroupName, namespaceName, eventHubName, consumerGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. + * @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 the ConsumerGroupInner object if successful. + */ + public ConsumerGroupInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, String userMetadata) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, userMetadata).toBlocking().single().body(); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, String userMetadata, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, userMetadata), serviceCallback); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConsumerGroupInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, String userMetadata) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, userMetadata).map(new Func1, ConsumerGroupInner>() { + @Override + public ConsumerGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @param userMetadata User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConsumerGroupInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, String userMetadata) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (consumerGroupName == null) { + throw new IllegalArgumentException("Parameter consumerGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + ConsumerGroupInner parameters = new ConsumerGroupInner(); + parameters.withUserMetadata(userMetadata); + return service.createOrUpdate(resourceGroupName, namespaceName, eventHubName, consumerGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @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 + */ + public void delete(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).toBlocking().single().body(); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName), serviceCallback); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a consumer group from the specified Event Hub and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (consumerGroupName == null) { + throw new IllegalArgumentException("Parameter consumerGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.delete(resourceGroupName, namespaceName, eventHubName, consumerGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @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 the ConsumerGroupInner object if successful. + */ + public ConsumerGroupInner get(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).toBlocking().single().body(); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName), serviceCallback); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConsumerGroupInner object + */ + public Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).map(new Func1, ConsumerGroupInner>() { + @Override + public ConsumerGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a description for the specified consumer group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param consumerGroupName The consumer group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConsumerGroupInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (consumerGroupName == null) { + throw new IllegalArgumentException("Parameter consumerGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.get(resourceGroupName, namespaceName, eventHubName, consumerGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @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 the PagedList<ConsumerGroupInner> object if successful. + */ + public PagedList listByEventHub(final String resourceGroupName, final String namespaceName, final String eventHubName) { + ServiceResponse> response = listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByEventHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByEventHubAsync(final String resourceGroupName, final String namespaceName, final String eventHubName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByEventHubNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ConsumerGroupInner> object + */ + public Observable> listByEventHubAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { + return listByEventHubWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ConsumerGroupInner> object + */ + public Observable>> listByEventHubWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { + return listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByEventHubNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ConsumerGroupInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByEventHubSinglePageAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + final Integer skip = null; + final Integer top = null; + return service.listByEventHub(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), apiVersion, skip, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByEventHubDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 the PagedList<ConsumerGroupInner> object if successful. + */ + public PagedList listByEventHub(final String resourceGroupName, final String namespaceName, final String eventHubName, final Integer skip, final Integer top) { + ServiceResponse> response = listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName, skip, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByEventHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByEventHubAsync(final String resourceGroupName, final String namespaceName, final String eventHubName, final Integer skip, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName, skip, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByEventHubNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ConsumerGroupInner> object + */ + public Observable> listByEventHubAsync(final String resourceGroupName, final String namespaceName, final String eventHubName, final Integer skip, final Integer top) { + return listByEventHubWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, skip, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ConsumerGroupInner> object + */ + public Observable>> listByEventHubWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String eventHubName, final Integer skip, final Integer top) { + return listByEventHubSinglePageAsync(resourceGroupName, namespaceName, eventHubName, skip, top) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByEventHubNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name + ServiceResponse> * @param eventHubName The Event Hub name + ServiceResponse> * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + ServiceResponse> * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ConsumerGroupInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByEventHubSinglePageAsync(final String resourceGroupName, final String namespaceName, final String eventHubName, final Integer skip, final Integer top) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.listByEventHub(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), apiVersion, skip, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByEventHubDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByEventHubDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<ConsumerGroupInner> object if successful. + */ + public PagedList listByEventHubNext(final String nextPageLink) { + ServiceResponse> response = listByEventHubNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByEventHubNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByEventHubNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByEventHubNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByEventHubNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ConsumerGroupInner> object + */ + public Observable> listByEventHubNextAsync(final String nextPageLink) { + return listByEventHubNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ConsumerGroupInner> object + */ + public Observable>> listByEventHubNextWithServiceResponseAsync(final String nextPageLink) { + return listByEventHubNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByEventHubNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ConsumerGroupInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByEventHubNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByEventHubNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByEventHubNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByEventHubNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigNamespaceAuthorizationRuleImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigNamespaceAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..7064ed041fc81 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigNamespaceAuthorizationRuleImpl.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigNamespaceAuthorizationRule; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessRights; + +class DisasterRecoveryConfigNamespaceAuthorizationRuleImpl extends IndexableRefreshableWrapperImpl implements DisasterRecoveryConfigNamespaceAuthorizationRule { + private final EventHubsManager manager; + private String resourceGroupName; + private String namespaceName; + private String alias; + private String authorizationRuleName; + + DisasterRecoveryConfigNamespaceAuthorizationRuleImpl(AuthorizationRuleInner inner, EventHubsManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces"); + this.alias = IdParsingUtils.getValueFromIdByName(inner.id(), "disasterRecoveryConfigs"); + this.authorizationRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "authorizationRules"); + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + DisasterRecoveryConfigsInner client = this.manager().inner().disasterRecoveryConfigs(); + return client.getAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.alias, this.authorizationRuleName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List rights() { + return this.inner().rights(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigsImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigsImpl.java new file mode 100644 index 0000000000000..7d8b33829c175 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigsImpl.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.CheckNameAvailabilityResult; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ArmDisasterRecovery; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigNamespaceAuthorizationRule; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessKeys; + +class DisasterRecoveryConfigsImpl extends WrapperImpl implements DisasterRecoveryConfigs { + private final EventHubsManager manager; + + DisasterRecoveryConfigsImpl(EventHubsManager manager) { + super(manager.inner().disasterRecoveryConfigs()); + this.manager = manager; + } + + public EventHubsManager manager() { + return this.manager; + } + + @Override + public ArmDisasterRecoveryImpl define(String name) { + return wrapModel(name); + } + + private ArmDisasterRecoveryImpl wrapModel(ArmDisasterRecoveryInner inner) { + return new ArmDisasterRecoveryImpl(inner, manager()); + } + + private ArmDisasterRecoveryImpl wrapModel(String name) { + return new ArmDisasterRecoveryImpl(name, this.manager()); + } + + @Override + public Observable checkNameAvailabilityAsync(String resourceGroupName, String namespaceName, String name) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.checkNameAvailabilityAsync(resourceGroupName, namespaceName, name) + .map(new Func1() { + @Override + public CheckNameAvailabilityResult call(CheckNameAvailabilityResultInner inner) { + return new CheckNameAvailabilityResultImpl(inner, manager()); + } + }); + } + + @Override + public Completable breakPairingAsync(String resourceGroupName, String namespaceName, String alias) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.breakPairingAsync(resourceGroupName, namespaceName, alias).toCompletable(); + } + + @Override + public Completable failOverAsync(String resourceGroupName, String namespaceName, String alias) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.failOverAsync(resourceGroupName, namespaceName, alias).toCompletable(); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String namespaceName) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.listAsync(resourceGroupName, namespaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ArmDisasterRecovery call(ArmDisasterRecoveryInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String namespaceName, String alias) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.getAsync(resourceGroupName, namespaceName, alias) + .flatMap(new Func1>() { + @Override + public Observable call(ArmDisasterRecoveryInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ArmDisasterRecovery)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String namespaceName, String alias) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, namespaceName, alias).toCompletable(); + } + + private DisasterRecoveryConfigNamespaceAuthorizationRuleImpl wrapDisasterRecoveryConfigNamespaceAuthorizationRuleModel(AuthorizationRuleInner inner) { + return new DisasterRecoveryConfigNamespaceAuthorizationRuleImpl(inner, manager()); + } + + private Observable getAuthorizationRuleInnerUsingDisasterRecoveryConfigsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces"); + String alias = IdParsingUtils.getValueFromIdByName(id, "disasterRecoveryConfigs"); + String authorizationRuleName = IdParsingUtils.getValueFromIdByName(id, "authorizationRules"); + DisasterRecoveryConfigsInner client = this.inner(); + return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName); + } + + @Override + public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName) + .flatMap(new Func1>() { + @Override + public Observable call(AuthorizationRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DisasterRecoveryConfigNamespaceAuthorizationRule)wrapDisasterRecoveryConfigNamespaceAuthorizationRuleModel(inner)); + } + } + }); + } + + @Override + public Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String alias) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.listAuthorizationRulesAsync(resourceGroupName, namespaceName, alias) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DisasterRecoveryConfigNamespaceAuthorizationRule call(AuthorizationRuleInner inner) { + return wrapDisasterRecoveryConfigNamespaceAuthorizationRuleModel(inner); + } + }); + } + + @Override + public Observable listKeysAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + DisasterRecoveryConfigsInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, namespaceName, alias, authorizationRuleName) + .map(new Func1() { + @Override + public AccessKeys call(AccessKeysInner inner) { + return new AccessKeysImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigsInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigsInner.java new file mode 100644 index 0000000000000..0a019ca08ae80 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/DisasterRecoveryConfigsInner.java @@ -0,0 +1,1338 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.CheckNameAvailabilityParameter; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DisasterRecoveryConfigs. + */ +public class DisasterRecoveryConfigsInner { + /** The Retrofit service to perform REST calls. */ + private DisasterRecoveryConfigsService service; + /** The service client containing this operation class. */ + private EventHubManagementClientImpl client; + + /** + * Initializes an instance of DisasterRecoveryConfigsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DisasterRecoveryConfigsInner(Retrofit retrofit, EventHubManagementClientImpl client) { + this.service = retrofit.create(DisasterRecoveryConfigsService.class); + this.client = client; + } + + /** + * The interface defining all the services for DisasterRecoveryConfigs to be + * used by Retrofit to perform actually REST calls. + */ + interface DisasterRecoveryConfigsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs listAuthorizationRules" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules") + Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs getAuthorizationRule" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}") + Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs listKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys") + Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailabilityParameter parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("subscriptionId") String subscriptionId, @Body ArmDisasterRecoveryInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs breakPairing" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing") + Observable> breakPairing(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs failOver" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover") + Observable> failOver(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs listAuthorizationRulesNext" }) + @GET + Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @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 the PagedList<AuthorizationRuleInner> object if successful. + */ + public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName, final String alias) { + ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String alias, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AuthorizationRuleInner> object + */ + public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String alias) { + return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName, alias) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AuthorizationRuleInner> object + */ + public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String alias) { + return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name + ServiceResponse> * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName, final String alias) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (alias == null) { + throw new IllegalArgumentException("Parameter alias is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.listAuthorizationRules(resourceGroupName, namespaceName, alias, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAuthorizationRulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAuthorizationRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @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 the AuthorizationRuleInner object if successful. + */ + public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName).toBlocking().single().body(); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName), serviceCallback); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AuthorizationRuleInner object + */ + public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { + @Override + public AuthorizationRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AuthorizationRuleInner object + */ + public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (alias == null) { + throw new IllegalArgumentException("Parameter alias is required and cannot be null."); + } + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.getAuthorizationRule(resourceGroupName, namespaceName, alias, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAuthorizationRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @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 the AccessKeysInner object if successful. + */ + public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName).toBlocking().single().body(); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName), serviceCallback); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AccessKeysInner object + */ + public Observable listKeysAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName).map(new Func1, AccessKeysInner>() { + @Override + public AccessKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AccessKeysInner object + */ + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (alias == null) { + throw new IllegalArgumentException("Parameter alias is required and cannot be null."); + } + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.listKeys(resourceGroupName, namespaceName, alias, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param name Name to check the namespace name availability + * @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 the CheckNameAvailabilityResultInner object if successful. + */ + public CheckNameAvailabilityResultInner checkNameAvailability(String resourceGroupName, String namespaceName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, name).toBlocking().single().body(); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param name Name to check the namespace name availability + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String resourceGroupName, String namespaceName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, name), serviceCallback); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param name Name to check the namespace name availability + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameAvailabilityResultInner object + */ + public Observable checkNameAvailabilityAsync(String resourceGroupName, String namespaceName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, name).map(new Func1, CheckNameAvailabilityResultInner>() { + @Override + public CheckNameAvailabilityResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check the give Namespace name availability. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param name Name to check the namespace name availability + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameAvailabilityResultInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String resourceGroupName, String namespaceName, String name) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + CheckNameAvailabilityParameter parameters = new CheckNameAvailabilityParameter(); + parameters.withName(name); + return service.checkNameAvailability(this.client.subscriptionId(), resourceGroupName, namespaceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @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 the PagedList<ArmDisasterRecoveryInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String namespaceName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, namespaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ArmDisasterRecoveryInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String namespaceName) { + return listWithServiceResponseAsync(resourceGroupName, namespaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ArmDisasterRecoveryInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { + return listSinglePageAsync(resourceGroupName, namespaceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ArmDisasterRecoveryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String namespaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.list(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) + * @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 the ArmDisasterRecoveryInner object if successful. + */ + public ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String namespaceName, String alias, ArmDisasterRecoveryInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, alias, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String alias, ArmDisasterRecoveryInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, alias, parameters), serviceCallback); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArmDisasterRecoveryInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String alias, ArmDisasterRecoveryInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, alias, parameters).map(new Func1, ArmDisasterRecoveryInner>() { + @Override + public ArmDisasterRecoveryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a new Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArmDisasterRecoveryInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String alias, ArmDisasterRecoveryInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (alias == null) { + throw new IllegalArgumentException("Parameter alias is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-04-01"; + return service.createOrUpdate(resourceGroupName, namespaceName, alias, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @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 + */ + public void delete(String resourceGroupName, String namespaceName, String alias) { + deleteWithServiceResponseAsync(resourceGroupName, namespaceName, alias).toBlocking().single().body(); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, String alias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, alias), serviceCallback); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String namespaceName, String alias) { + return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, alias).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an Alias(Disaster Recovery configuration). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String alias) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (alias == null) { + throw new IllegalArgumentException("Parameter alias is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.delete(resourceGroupName, namespaceName, alias, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @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 the ArmDisasterRecoveryInner object if successful. + */ + public ArmDisasterRecoveryInner get(String resourceGroupName, String namespaceName, String alias) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName, alias).toBlocking().single().body(); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String namespaceName, String alias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, alias), serviceCallback); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArmDisasterRecoveryInner object + */ + public Observable getAsync(String resourceGroupName, String namespaceName, String alias) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName, alias).map(new Func1, ArmDisasterRecoveryInner>() { + @Override + public ArmDisasterRecoveryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArmDisasterRecoveryInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String alias) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (alias == null) { + throw new IllegalArgumentException("Parameter alias is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.get(resourceGroupName, namespaceName, alias, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @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 + */ + public void breakPairing(String resourceGroupName, String namespaceName, String alias) { + breakPairingWithServiceResponseAsync(resourceGroupName, namespaceName, alias).toBlocking().single().body(); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture breakPairingAsync(String resourceGroupName, String namespaceName, String alias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(breakPairingWithServiceResponseAsync(resourceGroupName, namespaceName, alias), serviceCallback); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable breakPairingAsync(String resourceGroupName, String namespaceName, String alias) { + return breakPairingWithServiceResponseAsync(resourceGroupName, namespaceName, alias).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> breakPairingWithServiceResponseAsync(String resourceGroupName, String namespaceName, String alias) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (alias == null) { + throw new IllegalArgumentException("Parameter alias is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.breakPairing(resourceGroupName, namespaceName, alias, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = breakPairingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse breakPairingDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @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 + */ + public void failOver(String resourceGroupName, String namespaceName, String alias) { + failOverWithServiceResponseAsync(resourceGroupName, namespaceName, alias).toBlocking().single().body(); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture failOverAsync(String resourceGroupName, String namespaceName, String alias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(failOverWithServiceResponseAsync(resourceGroupName, namespaceName, alias), serviceCallback); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable failOverAsync(String resourceGroupName, String namespaceName, String alias) { + return failOverWithServiceResponseAsync(resourceGroupName, namespaceName, alias).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> failOverWithServiceResponseAsync(String resourceGroupName, String namespaceName, String alias) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (alias == null) { + throw new IllegalArgumentException("Parameter alias is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.failOver(resourceGroupName, namespaceName, alias, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = failOverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse failOverDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<AuthorizationRuleInner> object if successful. + */ + public PagedList listAuthorizationRulesNext(final String nextPageLink) { + ServiceResponse> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAuthorizationRulesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AuthorizationRuleInner> object + */ + public Observable> listAuthorizationRulesNextAsync(final String nextPageLink) { + return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AuthorizationRuleInner> object + */ + public Observable>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAuthorizationRulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAuthorizationRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<ArmDisasterRecoveryInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ArmDisasterRecoveryInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ArmDisasterRecoveryInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ArmDisasterRecoveryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EHNamespaceImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EHNamespaceImpl.java index fc32754d967ba..7c56162180af0 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EHNamespaceImpl.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EHNamespaceImpl.java @@ -12,7 +12,9 @@ import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EHNamespace; import rx.Observable; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Sku; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Identity; import org.joda.time.DateTime; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Encryption; class EHNamespaceImpl extends GroupableResourceCoreImpl implements EHNamespace, EHNamespace.Definition, EHNamespace.Update { EHNamespaceImpl(String name, EHNamespaceInner inner, EventHubsManager manager) { @@ -45,11 +47,26 @@ public boolean isInCreateMode() { } + @Override + public String clusterArmId() { + return this.inner().clusterArmId(); + } + @Override public DateTime createdAt() { return this.inner().createdAt(); } + @Override + public Encryption encryption() { + return this.inner().encryption(); + } + + @Override + public Identity identity() { + return this.inner().identity(); + } + @Override public Boolean isAutoInflateEnabled() { return this.inner().isAutoInflateEnabled(); @@ -95,6 +112,24 @@ public Boolean zoneRedundant() { return this.inner().zoneRedundant(); } + @Override + public EHNamespaceImpl withClusterArmId(String clusterArmId) { + this.inner().withClusterArmId(clusterArmId); + return this; + } + + @Override + public EHNamespaceImpl withEncryption(Encryption encryption) { + this.inner().withEncryption(encryption); + return this; + } + + @Override + public EHNamespaceImpl withIdentity(Identity identity) { + this.inner().withIdentity(identity); + return this; + } + @Override public EHNamespaceImpl withIsAutoInflateEnabled(Boolean isAutoInflateEnabled) { this.inner().withIsAutoInflateEnabled(isAutoInflateEnabled); diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EHNamespaceInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EHNamespaceInner.java index 75928021004f9..09582bb4fb538 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EHNamespaceInner.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EHNamespaceInner.java @@ -9,7 +9,9 @@ package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Sku; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Identity; import org.joda.time.DateTime; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Encryption; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.rest.SkipParentValidation; @@ -27,6 +29,12 @@ public class EHNamespaceInner extends Resource { @JsonProperty(value = "sku") private Sku sku; + /** + * Properties of BYOK Identity description. + */ + @JsonProperty(value = "identity") + private Identity identity; + /** * Provisioning state of the Namespace. */ @@ -51,6 +59,12 @@ public class EHNamespaceInner extends Resource { @JsonProperty(value = "properties.serviceBusEndpoint", access = JsonProperty.Access.WRITE_ONLY) private String serviceBusEndpoint; + /** + * Cluster ARM ID of the Namespace. + */ + @JsonProperty(value = "properties.clusterArmId") + private String clusterArmId; + /** * Identifier for Azure Insights metrics. */ @@ -85,6 +99,12 @@ public class EHNamespaceInner extends Resource { @JsonProperty(value = "properties.zoneRedundant") private Boolean zoneRedundant; + /** + * Properties of BYOK Encryption description. + */ + @JsonProperty(value = "properties.encryption") + private Encryption encryption; + /** * Get properties of sku resource. * @@ -105,6 +125,26 @@ public EHNamespaceInner withSku(Sku sku) { return this; } + /** + * Get properties of BYOK Identity description. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set properties of BYOK Identity description. + * + * @param identity the identity value to set + * @return the EHNamespaceInner object itself. + */ + public EHNamespaceInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } + /** * Get provisioning state of the Namespace. * @@ -141,6 +181,26 @@ public String serviceBusEndpoint() { return this.serviceBusEndpoint; } + /** + * Get cluster ARM ID of the Namespace. + * + * @return the clusterArmId value + */ + public String clusterArmId() { + return this.clusterArmId; + } + + /** + * Set cluster ARM ID of the Namespace. + * + * @param clusterArmId the clusterArmId value to set + * @return the EHNamespaceInner object itself. + */ + public EHNamespaceInner withClusterArmId(String clusterArmId) { + this.clusterArmId = clusterArmId; + return this; + } + /** * Get identifier for Azure Insights metrics. * @@ -230,4 +290,24 @@ public EHNamespaceInner withZoneRedundant(Boolean zoneRedundant) { return this; } + /** + * Get properties of BYOK Encryption description. + * + * @return the encryption value + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Set properties of BYOK Encryption description. + * + * @param encryption the encryption value to set + * @return the EHNamespaceInner object itself. + */ + public EHNamespaceInner withEncryption(Encryption encryption) { + this.encryption = encryption; + return this; + } + } diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubManagementClientImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubManagementClientImpl.java new file mode 100644 index 0000000000000..0ea17d9a2c3bf --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubManagementClientImpl.java @@ -0,0 +1,309 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the EventHubManagementClientImpl class. + */ +public class EventHubManagementClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public EventHubManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public EventHubManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public EventHubManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public EventHubManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ClustersInner object to access its operations. + */ + private ClustersInner clusters; + + /** + * Gets the ClustersInner object to access its operations. + * @return the ClustersInner object. + */ + public ClustersInner clusters() { + return this.clusters; + } + + /** + * The NamespacesInner object to access its operations. + */ + private NamespacesInner namespaces; + + /** + * Gets the NamespacesInner object to access its operations. + * @return the NamespacesInner object. + */ + public NamespacesInner namespaces() { + return this.namespaces; + } + + /** + * The PrivateEndpointConnectionsInner object to access its operations. + */ + private PrivateEndpointConnectionsInner privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsInner object to access its operations. + * @return the PrivateEndpointConnectionsInner object. + */ + public PrivateEndpointConnectionsInner privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The PrivateLinkResourcesInner object to access its operations. + */ + private PrivateLinkResourcesInner privateLinkResources; + + /** + * Gets the PrivateLinkResourcesInner object to access its operations. + * @return the PrivateLinkResourcesInner object. + */ + public PrivateLinkResourcesInner privateLinkResources() { + return this.privateLinkResources; + } + + /** + * The ConfigurationsInner object to access its operations. + */ + private ConfigurationsInner configurations; + + /** + * Gets the ConfigurationsInner object to access its operations. + * @return the ConfigurationsInner object. + */ + public ConfigurationsInner configurations() { + return this.configurations; + } + + /** + * The DisasterRecoveryConfigsInner object to access its operations. + */ + private DisasterRecoveryConfigsInner disasterRecoveryConfigs; + + /** + * Gets the DisasterRecoveryConfigsInner object to access its operations. + * @return the DisasterRecoveryConfigsInner object. + */ + public DisasterRecoveryConfigsInner disasterRecoveryConfigs() { + return this.disasterRecoveryConfigs; + } + + /** + * The EventHubsInner object to access its operations. + */ + private EventHubsInner eventHubs; + + /** + * Gets the EventHubsInner object to access its operations. + * @return the EventHubsInner object. + */ + public EventHubsInner eventHubs() { + return this.eventHubs; + } + + /** + * The ConsumerGroupsInner object to access its operations. + */ + private ConsumerGroupsInner consumerGroups; + + /** + * Gets the ConsumerGroupsInner object to access its operations. + * @return the ConsumerGroupsInner object. + */ + public ConsumerGroupsInner consumerGroups() { + return this.consumerGroups; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The RegionsInner object to access its operations. + */ + private RegionsInner regions; + + /** + * Gets the RegionsInner object to access its operations. + * @return the RegionsInner object. + */ + public RegionsInner regions() { + return this.regions; + } + + /** + * Initializes an instance of EventHubManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public EventHubManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of EventHubManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public EventHubManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of EventHubManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public EventHubManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.clusters = new ClustersInner(restClient().retrofit(), this); + this.namespaces = new NamespacesInner(restClient().retrofit(), this); + this.privateEndpointConnections = new PrivateEndpointConnectionsInner(restClient().retrofit(), this); + this.privateLinkResources = new PrivateLinkResourcesInner(restClient().retrofit(), this); + this.configurations = new ConfigurationsInner(restClient().retrofit(), this); + this.disasterRecoveryConfigs = new DisasterRecoveryConfigsInner(restClient().retrofit(), this); + this.eventHubs = new EventHubsInner(restClient().retrofit(), this); + this.consumerGroups = new ConsumerGroupsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.regions = new RegionsInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "EventHubManagementClient", "2018-01-01-preiew"); + } +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsImpl.java new file mode 100644 index 0000000000000..29be3a5576b70 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsImpl.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Eventhub; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventhubNamespaceAuthorizationRule; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessKeys; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.RegenerateAccessKeyParameters; + +class EventHubsImpl extends WrapperImpl implements EventHubs { + private final EventHubsManager manager; + + EventHubsImpl(EventHubsManager manager) { + super(manager.inner().eventHubs()); + this.manager = manager; + } + + public EventHubsManager manager() { + return this.manager; + } + + @Override + public EventhubImpl define(String name) { + return wrapModel(name); + } + + private EventhubImpl wrapModel(EventhubInner inner) { + return new EventhubImpl(inner, manager()); + } + + private EventhubImpl wrapModel(String name) { + return new EventhubImpl(name, this.manager()); + } + + @Override + public Observable listByNamespaceAsync(final String resourceGroupName, final String namespaceName) { + EventHubsInner client = this.inner(); + return client.listByNamespaceAsync(resourceGroupName, namespaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Eventhub call(EventhubInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName) { + EventHubsInner client = this.inner(); + return client.getAsync(resourceGroupName, namespaceName, eventHubName) + .flatMap(new Func1>() { + @Override + public Observable call(EventhubInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Eventhub)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName) { + EventHubsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, namespaceName, eventHubName).toCompletable(); + } + + @Override + public EventhubNamespaceAuthorizationRuleImpl defineAuthorizationRule(String name) { + return wrapAuthorizationRuleModel(name); + } + + private EventhubNamespaceAuthorizationRuleImpl wrapAuthorizationRuleModel(String name) { + return new EventhubNamespaceAuthorizationRuleImpl(name, this.manager()); + } + + private EventhubNamespaceAuthorizationRuleImpl wrapEventhubNamespaceAuthorizationRuleModel(AuthorizationRuleInner inner) { + return new EventhubNamespaceAuthorizationRuleImpl(inner, manager()); + } + + private Observable getAuthorizationRuleInnerUsingEventHubsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces"); + String eventHubName = IdParsingUtils.getValueFromIdByName(id, "eventhubs"); + String authorizationRuleName = IdParsingUtils.getValueFromIdByName(id, "authorizationRules"); + EventHubsInner client = this.inner(); + return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName); + } + + @Override + public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + EventHubsInner client = this.inner(); + return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName) + .flatMap(new Func1>() { + @Override + public Observable call(AuthorizationRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((EventhubNamespaceAuthorizationRule)wrapEventhubNamespaceAuthorizationRuleModel(inner)); + } + } + }); + } + + @Override + public Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { + EventHubsInner client = this.inner(); + return client.listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public EventhubNamespaceAuthorizationRule call(AuthorizationRuleInner inner) { + return wrapEventhubNamespaceAuthorizationRuleModel(inner); + } + }); + } + + @Override + public Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + EventHubsInner client = this.inner(); + return client.deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).toCompletable(); + } + + @Override + public Observable listKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + EventHubsInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName) + .map(new Func1() { + @Override + public AccessKeys call(AccessKeysInner inner) { + return new AccessKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { + EventHubsInner client = this.inner(); + return client.regenerateKeysAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters) + .map(new Func1() { + @Override + public AccessKeys call(AccessKeysInner inner) { + return new AccessKeysImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsInner.java new file mode 100644 index 0000000000000..0da824055c6f9 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsInner.java @@ -0,0 +1,1504 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessRights; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ErrorResponseException; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.RegenerateAccessKeyParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in EventHubs. + */ +public class EventHubsInner { + /** The Retrofit service to perform REST calls. */ + private EventHubsService service; + /** The service client containing this operation class. */ + private EventHubManagementClientImpl client; + + /** + * Initializes an instance of EventHubsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public EventHubsInner(Retrofit retrofit, EventHubManagementClientImpl client) { + this.service = retrofit.create(EventHubsService.class); + this.client = client; + } + + /** + * The interface defining all the services for EventHubs to be + * used by Retrofit to perform actually REST calls. + */ + interface EventHubsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs listAuthorizationRules" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules") + Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs createOrUpdateAuthorizationRule" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") + Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AuthorizationRuleInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs getAuthorizationRule" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") + Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs deleteAuthorizationRule" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) + Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs listKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys") + Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs regenerateKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys") + Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs listByNamespace" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs") + Observable> listByNamespace(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$skip") Integer skip, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Body EventhubInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs listAuthorizationRulesNext" }) + @GET + Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs listByNamespaceNext" }) + @GET + Observable> listByNamespaceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @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 the PagedList<AuthorizationRuleInner> object if successful. + */ + public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName, final String eventHubName) { + ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String eventHubName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AuthorizationRuleInner> object + */ + public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { + return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AuthorizationRuleInner> object + */ + public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { + return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the authorization rules for an Event Hub. + * + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name + ServiceResponse> * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.listAuthorizationRules(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAuthorizationRulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAuthorizationRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @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 the AuthorizationRuleInner object if successful. + */ + public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, List rights) { + return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights).toBlocking().single().body(); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, List rights, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights), serviceCallback); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AuthorizationRuleInner object + */ + public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, List rights) { + return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights).map(new Func1, AuthorizationRuleInner>() { + @Override + public AuthorizationRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AuthorizationRuleInner object + */ + public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, List rights) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (rights == null) { + throw new IllegalArgumentException("Parameter rights is required and cannot be null."); + } + Validator.validate(rights); + final String apiVersion = "2017-04-01"; + AuthorizationRuleInner parameters = new AuthorizationRuleInner(); + parameters.withRights(rights); + return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @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 the AuthorizationRuleInner object if successful. + */ + public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).toBlocking().single().body(); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName), serviceCallback); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AuthorizationRuleInner object + */ + public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { + @Override + public AuthorizationRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an AuthorizationRule for an Event Hub by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AuthorizationRuleInner object + */ + public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.getAuthorizationRule(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAuthorizationRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @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 + */ + public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).toBlocking().single().body(); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName), serviceCallback); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.deleteAuthorizationRule(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteAuthorizationRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @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 the AccessKeysInner object if successful. + */ + public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).toBlocking().single().body(); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName), serviceCallback); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AccessKeysInner object + */ + public Observable listKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).map(new Func1, AccessKeysInner>() { + @Override + public AccessKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AccessKeysInner object + */ + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.listKeys(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + * @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 the AccessKeysInner object if successful. + */ + public AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { + return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters).toBlocking().single().body(); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters), serviceCallback); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AccessKeysInner object + */ + public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { + return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters).map(new Func1, AccessKeysInner>() { + @Override + public AccessKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerates the ACS and SAS connection strings for the Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AccessKeysInner object + */ + public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-04-01"; + return service.regenerateKeys(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regenerateKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @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 the PagedList<EventhubInner> object if successful. + */ + public PagedList listByNamespace(final String resourceGroupName, final String namespaceName) { + ServiceResponse> response = listByNamespaceSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByNamespaceSinglePageAsync(resourceGroupName, namespaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByNamespaceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventhubInner> object + */ + public Observable> listByNamespaceAsync(final String resourceGroupName, final String namespaceName) { + return listByNamespaceWithServiceResponseAsync(resourceGroupName, namespaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventhubInner> object + */ + public Observable>> listByNamespaceWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { + return listByNamespaceSinglePageAsync(resourceGroupName, namespaceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventhubInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByNamespaceSinglePageAsync(final String resourceGroupName, final String namespaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + final Integer skip = null; + final Integer top = null; + return service.listByNamespace(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, skip, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByNamespaceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 the PagedList<EventhubInner> object if successful. + */ + public PagedList listByNamespace(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top) { + ServiceResponse> response = listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByNamespaceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventhubInner> object + */ + public Observable> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top) { + return listByNamespaceWithServiceResponseAsync(resourceGroupName, namespaceName, skip, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventhubInner> object + */ + public Observable>> listByNamespaceWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top) { + return listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name + ServiceResponse> * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. + ServiceResponse> * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventhubInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByNamespaceSinglePageAsync(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.listByNamespace(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, skip, top, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByNamespaceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByNamespaceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param parameters Parameters supplied to create an Event Hub resource. + * @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 the EventhubInner object if successful. + */ + public EventhubInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param parameters Parameters supplied to create an Event Hub resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, parameters), serviceCallback); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param parameters Parameters supplied to create an Event Hub resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventhubInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, parameters).map(new Func1, EventhubInner>() { + @Override + public EventhubInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param parameters Parameters supplied to create an Event Hub resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventhubInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-04-01"; + return service.createOrUpdate(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @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 + */ + public void delete(String resourceGroupName, String namespaceName, String eventHubName) { + deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName).toBlocking().single().body(); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName), serviceCallback); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName) { + return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.delete(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @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 the EventhubInner object if successful. + */ + public EventhubInner get(String resourceGroupName, String namespaceName, String eventHubName) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName).toBlocking().single().body(); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String namespaceName, String eventHubName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName), serviceCallback); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventhubInner object + */ + public Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName).map(new Func1, EventhubInner>() { + @Override + public EventhubInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EventhubInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (eventHubName == null) { + throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.get(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<AuthorizationRuleInner> object if successful. + */ + public PagedList listAuthorizationRulesNext(final String nextPageLink) { + ServiceResponse> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAuthorizationRulesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AuthorizationRuleInner> object + */ + public Observable> listAuthorizationRulesNextAsync(final String nextPageLink) { + return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AuthorizationRuleInner> object + */ + public Observable>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the authorization rules for an Event Hub. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAuthorizationRulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAuthorizationRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<EventhubInner> object if successful. + */ + public PagedList listByNamespaceNext(final String nextPageLink) { + ServiceResponse> response = listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByNamespaceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByNamespaceNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByNamespaceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventhubInner> object + */ + public Observable> listByNamespaceNextAsync(final String nextPageLink) { + return listByNamespaceNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EventhubInner> object + */ + public Observable>> listByNamespaceNextWithServiceResponseAsync(final String nextPageLink) { + return listByNamespaceNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EventhubInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByNamespaceNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByNamespaceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByNamespaceNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByNamespaceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsManager.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsManager.java index ed42a636acaa3..209a98a9f9717 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsManager.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventHubsManager.java @@ -16,21 +16,33 @@ import com.microsoft.azure.arm.resources.AzureConfigurable; import com.microsoft.azure.serializer.AzureJacksonAdapter; import com.microsoft.rest.RestClient; -import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Operations; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Clusters; -import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Configurations; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnections; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateLinkResources; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Configurations; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.DisasterRecoveryConfigs; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventHubs; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConsumerGroups; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Operations; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Regions; import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; import com.microsoft.azure.arm.resources.implementation.ManagerCore; /** * Entry point to Azure EventHubs resource management. */ -public final class EventHubsManager extends ManagerCore { - private Operations operations; +public final class EventHubsManager extends ManagerCore { private Clusters clusters; - private Configurations configurations; private Namespaces namespaces; + private PrivateEndpointConnections privateEndpointConnections; + private PrivateLinkResources privateLinkResources; + private Configurations configurations; + private DisasterRecoveryConfigs disasterRecoveryConfigs; + private EventHubs eventHubs; + private ConsumerGroups consumerGroups; + private Operations operations; + private Regions regions; /** * Get a Configurable instance that can be used to create EventHubsManager with optional configuration. * @@ -78,16 +90,6 @@ public interface Configurable extends AzureConfigurable { EventHubsManager authenticate(AzureTokenCredentials credentials, String subscriptionId); } - /** - * @return Entry point to manage Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(this); - } - return this.operations; - } - /** * @return Entry point to manage Clusters. */ @@ -98,6 +100,36 @@ public Clusters clusters() { return this.clusters; } + /** + * @return Entry point to manage Namespaces. + */ + public Namespaces namespaces() { + if (this.namespaces == null) { + this.namespaces = new NamespacesImpl(this); + } + return this.namespaces; + } + + /** + * @return Entry point to manage PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); + } + return this.privateEndpointConnections; + } + + /** + * @return Entry point to manage PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(this); + } + return this.privateLinkResources; + } + /** * @return Entry point to manage Configurations. */ @@ -109,13 +141,53 @@ public Configurations configurations() { } /** - * @return Entry point to manage Namespaces. + * @return Entry point to manage DisasterRecoveryConfigs. */ - public Namespaces namespaces() { - if (this.namespaces == null) { - this.namespaces = new NamespacesImpl(this); + public DisasterRecoveryConfigs disasterRecoveryConfigs() { + if (this.disasterRecoveryConfigs == null) { + this.disasterRecoveryConfigs = new DisasterRecoveryConfigsImpl(this); } - return this.namespaces; + return this.disasterRecoveryConfigs; + } + + /** + * @return Entry point to manage EventHubs. + */ + public EventHubs eventHubs() { + if (this.eventHubs == null) { + this.eventHubs = new EventHubsImpl(this); + } + return this.eventHubs; + } + + /** + * @return Entry point to manage ConsumerGroups. + */ + public ConsumerGroups consumerGroups() { + if (this.consumerGroups == null) { + this.consumerGroups = new ConsumerGroupsImpl(this); + } + return this.consumerGroups; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage Regions. + */ + public Regions regions() { + if (this.regions == null) { + this.regions = new RegionsImpl(this); + } + return this.regions; } /** @@ -130,6 +202,6 @@ private EventHubsManager(RestClient restClient, String subscriptionId) { super( restClient, subscriptionId, - new EventHub2018PreviewManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + new EventHubManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); } } diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubImpl.java new file mode 100644 index 0000000000000..bd8e172134534 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubImpl.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Eventhub; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EntityStatus; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.CaptureDescription; + +class EventhubImpl extends CreatableUpdatableImpl implements Eventhub, Eventhub.Definition, Eventhub.Update { + private final EventHubsManager manager; + private String resourceGroupName; + private String namespaceName; + private String eventHubName; + + EventhubImpl(String name, EventHubsManager manager) { + super(name, new EventhubInner()); + this.manager = manager; + // Set resource name + this.eventHubName = name; + // + } + + EventhubImpl(EventhubInner inner, EventHubsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.eventHubName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces"); + this.eventHubName = IdParsingUtils.getValueFromIdByName(inner.id(), "eventhubs"); + // + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + EventHubsInner client = this.manager().inner().eventHubs(); + return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + EventHubsInner client = this.manager().inner().eventHubs(); + return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + EventHubsInner client = this.manager().inner().eventHubs(); + return client.getAsync(this.resourceGroupName, this.namespaceName, this.eventHubName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public CaptureDescription captureDescription() { + return this.inner().captureDescription(); + } + + @Override + public DateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Long messageRetentionInDays() { + return this.inner().messageRetentionInDays(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Long partitionCount() { + return this.inner().partitionCount(); + } + + @Override + public List partitionIds() { + return this.inner().partitionIds(); + } + + @Override + public EntityStatus status() { + return this.inner().status(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DateTime updatedAt() { + return this.inner().updatedAt(); + } + + @Override + public EventhubImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + @Override + public EventhubImpl withCaptureDescription(CaptureDescription captureDescription) { + this.inner().withCaptureDescription(captureDescription); + return this; + } + + @Override + public EventhubImpl withMessageRetentionInDays(Long messageRetentionInDays) { + this.inner().withMessageRetentionInDays(messageRetentionInDays); + return this; + } + + @Override + public EventhubImpl withPartitionCount(Long partitionCount) { + this.inner().withPartitionCount(partitionCount); + return this; + } + + @Override + public EventhubImpl withStatus(EntityStatus status) { + this.inner().withStatus(status); + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubInner.java new file mode 100644 index 0000000000000..10d8e091b577d --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubInner.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EntityStatus; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.CaptureDescription; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Single item in List or Get Event Hub operation. + */ +@JsonFlatten +public class EventhubInner extends ProxyResource { + /** + * Current number of shards on the Event Hub. + */ + @JsonProperty(value = "properties.partitionIds", access = JsonProperty.Access.WRITE_ONLY) + private List partitionIds; + + /** + * Exact time the Event Hub was created. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdAt; + + /** + * The exact time the message was updated. + */ + @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY) + private DateTime updatedAt; + + /** + * Number of days to retain the events for this Event Hub, value should be + * 1 to 7 days. + */ + @JsonProperty(value = "properties.messageRetentionInDays") + private Long messageRetentionInDays; + + /** + * Number of partitions created for the Event Hub, allowed values are from + * 1 to 32 partitions. + */ + @JsonProperty(value = "properties.partitionCount") + private Long partitionCount; + + /** + * Enumerates the possible values for the status of the Event Hub. Possible + * values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', + * 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'. + */ + @JsonProperty(value = "properties.status") + private EntityStatus status; + + /** + * Properties of capture description. + */ + @JsonProperty(value = "properties.captureDescription") + private CaptureDescription captureDescription; + + /** + * Get current number of shards on the Event Hub. + * + * @return the partitionIds value + */ + public List partitionIds() { + return this.partitionIds; + } + + /** + * Get exact time the Event Hub was created. + * + * @return the createdAt value + */ + public DateTime createdAt() { + return this.createdAt; + } + + /** + * Get the exact time the message was updated. + * + * @return the updatedAt value + */ + public DateTime updatedAt() { + return this.updatedAt; + } + + /** + * Get number of days to retain the events for this Event Hub, value should be 1 to 7 days. + * + * @return the messageRetentionInDays value + */ + public Long messageRetentionInDays() { + return this.messageRetentionInDays; + } + + /** + * Set number of days to retain the events for this Event Hub, value should be 1 to 7 days. + * + * @param messageRetentionInDays the messageRetentionInDays value to set + * @return the EventhubInner object itself. + */ + public EventhubInner withMessageRetentionInDays(Long messageRetentionInDays) { + this.messageRetentionInDays = messageRetentionInDays; + return this; + } + + /** + * Get number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. + * + * @return the partitionCount value + */ + public Long partitionCount() { + return this.partitionCount; + } + + /** + * Set number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. + * + * @param partitionCount the partitionCount value to set + * @return the EventhubInner object itself. + */ + public EventhubInner withPartitionCount(Long partitionCount) { + this.partitionCount = partitionCount; + return this; + } + + /** + * Get enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'. + * + * @return the status value + */ + public EntityStatus status() { + return this.status; + } + + /** + * Set enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'. + * + * @param status the status value to set + * @return the EventhubInner object itself. + */ + public EventhubInner withStatus(EntityStatus status) { + this.status = status; + return this; + } + + /** + * Get properties of capture description. + * + * @return the captureDescription value + */ + public CaptureDescription captureDescription() { + return this.captureDescription; + } + + /** + * Set properties of capture description. + * + * @param captureDescription the captureDescription value to set + * @return the EventhubInner object itself. + */ + public EventhubInner withCaptureDescription(CaptureDescription captureDescription) { + this.captureDescription = captureDescription; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubNamespaceAuthorizationRuleImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubNamespaceAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..abb79921f021e --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/EventhubNamespaceAuthorizationRuleImpl.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EventhubNamespaceAuthorizationRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessRights; + +class EventhubNamespaceAuthorizationRuleImpl extends CreatableUpdatableImpl implements EventhubNamespaceAuthorizationRule, EventhubNamespaceAuthorizationRule.Definition, EventhubNamespaceAuthorizationRule.Update { + private final EventHubsManager manager; + private String resourceGroupName; + private String namespaceName; + private String eventHubName; + private String authorizationRuleName; + private List crights; + private List urights; + + EventhubNamespaceAuthorizationRuleImpl(String name, EventHubsManager manager) { + super(name, new AuthorizationRuleInner()); + this.manager = manager; + // Set resource name + this.authorizationRuleName = name; + // + } + + EventhubNamespaceAuthorizationRuleImpl(AuthorizationRuleInner inner, EventHubsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.authorizationRuleName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces"); + this.eventHubName = IdParsingUtils.getValueFromIdByName(inner.id(), "eventhubs"); + this.authorizationRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "authorizationRules"); + // + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + EventHubsInner client = this.manager().inner().eventHubs(); + return client.createOrUpdateAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.authorizationRuleName, this.crights) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + EventHubsInner client = this.manager().inner().eventHubs(); + return client.createOrUpdateAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.authorizationRuleName, this.urights) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + EventHubsInner client = this.manager().inner().eventHubs(); + return client.getAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.authorizationRuleName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List rights() { + return this.inner().rights(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public EventhubNamespaceAuthorizationRuleImpl withExistingEventhub(String resourceGroupName, String namespaceName, String eventHubName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.eventHubName = eventHubName; + return this; + } + + @Override + public EventhubNamespaceAuthorizationRuleImpl withRights(List rights) { + if (isInCreateMode()) { + this.crights = rights; + } else { + this.urights = rights; + } + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/MessagingRegionsImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/MessagingRegionsImpl.java new file mode 100644 index 0000000000000..2193844eb2503 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/MessagingRegionsImpl.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.MessagingRegions; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.MessagingRegionsProperties; +import java.util.Map; + +class MessagingRegionsImpl extends WrapperImpl implements MessagingRegions { + private final EventHubsManager manager; + MessagingRegionsImpl(MessagingRegionsInner inner, EventHubsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public MessagingRegionsProperties properties() { + return this.inner().properties(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/MessagingRegionsInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/MessagingRegionsInner.java new file mode 100644 index 0000000000000..e6fb1a29b7b77 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/MessagingRegionsInner.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.MessagingRegionsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Messaging Region. + */ +@SkipParentValidation +public class MessagingRegionsInner extends Resource { + /** + * Properties of Messaging Region. + */ + @JsonProperty(value = "properties") + private MessagingRegionsProperties properties; + + /** + * Get properties of Messaging Region. + * + * @return the properties value + */ + public MessagingRegionsProperties properties() { + return this.properties; + } + + /** + * Set properties of Messaging Region. + * + * @param properties the properties value to set + * @return the MessagingRegionsInner object itself. + */ + public MessagingRegionsInner withProperties(MessagingRegionsProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespaceAuthorizationRuleImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespaceAuthorizationRuleImpl.java new file mode 100644 index 0000000000000..8e5f6c45ee8cf --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespaceAuthorizationRuleImpl.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.NamespaceAuthorizationRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessRights; + +class NamespaceAuthorizationRuleImpl extends CreatableUpdatableImpl implements NamespaceAuthorizationRule, NamespaceAuthorizationRule.Definition, NamespaceAuthorizationRule.Update { + private final EventHubsManager manager; + private String resourceGroupName; + private String namespaceName; + private String authorizationRuleName; + private List crights; + private List urights; + + NamespaceAuthorizationRuleImpl(String name, EventHubsManager manager) { + super(name, new AuthorizationRuleInner()); + this.manager = manager; + // Set resource name + this.authorizationRuleName = name; + // + } + + NamespaceAuthorizationRuleImpl(AuthorizationRuleInner inner, EventHubsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.authorizationRuleName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces"); + this.authorizationRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "authorizationRules"); + // + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + NamespacesInner client = this.manager().inner().namespaces(); + return client.createOrUpdateAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.authorizationRuleName, this.crights) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + NamespacesInner client = this.manager().inner().namespaces(); + return client.createOrUpdateAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.authorizationRuleName, this.urights) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + NamespacesInner client = this.manager().inner().namespaces(); + return client.getAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.authorizationRuleName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List rights() { + return this.inner().rights(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public NamespaceAuthorizationRuleImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + @Override + public NamespaceAuthorizationRuleImpl withRights(List rights) { + if (isInCreateMode()) { + this.crights = rights; + } else { + this.urights = rights; + } + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespacesImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespacesImpl.java index 0482ce8b03ff2..97d9713642b06 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespacesImpl.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespacesImpl.java @@ -22,9 +22,13 @@ import rx.functions.Func1; import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.CheckNameAvailabilityResult; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.IpFilterRule; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.VirtualNetworkRule; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.NetworkRuleSet; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.NamespaceAuthorizationRule; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessKeys; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.RegenerateAccessKeyParameters; class NamespacesImpl extends GroupableResourcesCoreImpl implements Namespaces { protected NamespacesImpl(EventHubsManager manager) { @@ -128,6 +132,18 @@ public EHNamespaceImpl define(String name) { return wrapModel(name); } + @Override + public Observable checkNameAvailabilityAsync(String name) { + NamespacesInner client = this.inner(); + return client.checkNameAvailabilityAsync(name) + .map(new Func1() { + @Override + public CheckNameAvailabilityResult call(CheckNameAvailabilityResultInner inner) { + return new CheckNameAvailabilityResultImpl(inner, manager()); + } + }); + } + @Override protected EHNamespaceImpl wrapModel(EHNamespaceInner inner) { return new EHNamespaceImpl(inner.name(), inner, manager()); @@ -148,6 +164,11 @@ public VirtualNetworkRuleImpl defineVirtualnetworkrule(String name) { return wrapVirtualnetworkruleModel(name); } + @Override + public NamespaceAuthorizationRuleImpl defineAuthorizationRule(String name) { + return wrapAuthorizationRuleModel(name); + } + private IpFilterRuleImpl wrapIpfilterruleModel(String name) { return new IpFilterRuleImpl(name, this.manager()); } @@ -156,6 +177,10 @@ private VirtualNetworkRuleImpl wrapVirtualnetworkruleModel(String name) { return new VirtualNetworkRuleImpl(name, this.manager()); } + private NamespaceAuthorizationRuleImpl wrapAuthorizationRuleModel(String name) { + return new NamespaceAuthorizationRuleImpl(name, this.manager()); + } + private IpFilterRuleImpl wrapIpFilterRuleModel(IpFilterRuleInner inner) { return new IpFilterRuleImpl(inner, manager()); } @@ -164,6 +189,10 @@ private VirtualNetworkRuleImpl wrapVirtualNetworkRuleModel(VirtualNetworkRuleInn return new VirtualNetworkRuleImpl(inner, manager()); } + private NamespaceAuthorizationRuleImpl wrapNamespaceAuthorizationRuleModel(AuthorizationRuleInner inner) { + return new NamespaceAuthorizationRuleImpl(inner, manager()); + } + private Observable getIpFilterRuleInnerUsingNamespacesInnerAsync(String id) { String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces"); @@ -180,14 +209,26 @@ private Observable getVirtualNetworkRuleInnerUsingNames return client.getVirtualNetworkRuleAsync(resourceGroupName, namespaceName, virtualNetworkRuleName); } + private Observable getAuthorizationRuleInnerUsingNamespacesInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces"); + String authorizationRuleName = IdParsingUtils.getValueFromIdByName(id, "authorizationRules"); + NamespacesInner client = this.inner(); + return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName); + } + @Override public Observable getIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { NamespacesInner client = this.inner(); return client.getIpFilterRuleAsync(resourceGroupName, namespaceName, ipFilterRuleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public IpFilterRule call(IpFilterRuleInner inner) { - return wrapIpFilterRuleModel(inner); + public Observable call(IpFilterRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((IpFilterRule)wrapIpFilterRuleModel(inner)); + } } }); } @@ -220,10 +261,14 @@ public Completable deleteIpFilterRuleAsync(String resourceGroupName, String name public Observable getVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { NamespacesInner client = this.inner(); return client.getVirtualNetworkRuleAsync(resourceGroupName, namespaceName, virtualNetworkRuleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public VirtualNetworkRule call(VirtualNetworkRuleInner inner) { - return wrapVirtualNetworkRuleModel(inner); + public Observable call(VirtualNetworkRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VirtualNetworkRule)wrapVirtualNetworkRuleModel(inner)); + } } }); } @@ -276,4 +321,68 @@ public NetworkRuleSet call(NetworkRuleSetInner inner) { }); } + @Override + public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + NamespacesInner client = this.inner(); + return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName) + .flatMap(new Func1>() { + @Override + public Observable call(AuthorizationRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NamespaceAuthorizationRule)wrapNamespaceAuthorizationRuleModel(inner)); + } + } + }); + } + + @Override + public Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName) { + NamespacesInner client = this.inner(); + return client.listAuthorizationRulesAsync(resourceGroupName, namespaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NamespaceAuthorizationRule call(AuthorizationRuleInner inner) { + return wrapNamespaceAuthorizationRuleModel(inner); + } + }); + } + + @Override + public Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + NamespacesInner client = this.inner(); + return client.deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName).toCompletable(); + } + + @Override + public Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + NamespacesInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, namespaceName, authorizationRuleName) + .map(new Func1() { + @Override + public AccessKeys call(AccessKeysInner inner) { + return new AccessKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { + NamespacesInner client = this.inner(); + return client.regenerateKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters) + .map(new Func1() { + @Override + public AccessKeys call(AccessKeysInner inner) { + return new AccessKeysImpl(inner, manager()); + } + }); + } + } diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespacesInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespacesInner.java index a8879fd6c3b90..fbb83562db7a1 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespacesInner.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NamespacesInner.java @@ -15,7 +15,10 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.AccessRights; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.CheckNameAvailabilityParameter; import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ErrorResponseException; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.RegenerateAccessKeyParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -32,6 +35,7 @@ import retrofit2.http.HTTP; import retrofit2.http.PATCH; import retrofit2.http.Path; +import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; @@ -47,7 +51,7 @@ public class NamespacesInner implements InnerSupportsGet, Inne /** The Retrofit service to perform REST calls. */ private NamespacesService service; /** The service client containing this operation class. */ - private EventHub2018PreviewManagementClientImpl client; + private EventHubManagementClientImpl client; /** * Initializes an instance of NamespacesInner. @@ -55,7 +59,7 @@ public class NamespacesInner implements InnerSupportsGet, Inne * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public NamespacesInner(Retrofit retrofit, EventHub2018PreviewManagementClientImpl client) { + public NamespacesInner(Retrofit retrofit, EventHubManagementClientImpl client) { this.service = retrofit.create(NamespacesService.class); this.client = client; } @@ -65,6 +69,22 @@ public NamespacesInner(Retrofit retrofit, EventHub2018PreviewManagementClientImp * used by Retrofit to perform actually REST calls. */ interface NamespacesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listIPFilterRules" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules") + Observable> listIPFilterRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces createOrUpdateIpFilterRule" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}") + Observable> createOrUpdateIpFilterRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("ipFilterRuleName") String ipFilterRuleName, @Path("subscriptionId") String subscriptionId, @Body IpFilterRuleInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces deleteIpFilterRule" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}", method = "DELETE", hasBody = true) + Observable> deleteIpFilterRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("ipFilterRuleName") String ipFilterRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces getIpFilterRule" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}") + Observable> getIpFilterRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("ipFilterRuleName") String ipFilterRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -97,22 +117,6 @@ interface NamespacesService { @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}") Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body EHNamespaceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listIPFilterRules" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules") - Observable> listIPFilterRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces createOrUpdateIpFilterRule" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}") - Observable> createOrUpdateIpFilterRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("ipFilterRuleName") String ipFilterRuleName, @Path("subscriptionId") String subscriptionId, @Body IpFilterRuleInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces deleteIpFilterRule" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}", method = "DELETE", hasBody = true) - Observable> deleteIpFilterRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("ipFilterRuleName") String ipFilterRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces getIpFilterRule" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}") - Observable> getIpFilterRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("ipFilterRuleName") String ipFilterRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listVirtualNetworkRules" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules") Observable> listVirtualNetworkRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -137,6 +141,38 @@ interface NamespacesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default") Observable> getNetworkRuleSet(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listAuthorizationRules" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules") + Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces createOrUpdateAuthorizationRule" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}") + Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AuthorizationRuleInner parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces deleteAuthorizationRule" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) + Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces getAuthorizationRule" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}") + Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys") + Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces regenerateKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys") + Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailabilityParameter parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listIPFilterRulesNext" }) + @GET + Observable> listIPFilterRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -145,14 +181,416 @@ interface NamespacesService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listIPFilterRulesNext" }) - @GET - Observable> listIPFilterRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listVirtualNetworkRulesNext" }) @GET Observable> listVirtualNetworkRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Namespaces listAuthorizationRulesNext" }) + @GET + Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of IP Filter rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @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 the PagedList<IpFilterRuleInner> object if successful. + */ + public PagedList listIPFilterRules(final String resourceGroupName, final String namespaceName) { + ServiceResponse> response = listIPFilterRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listIPFilterRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of IP Filter rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listIPFilterRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listIPFilterRulesSinglePageAsync(resourceGroupName, namespaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listIPFilterRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of IP Filter rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IpFilterRuleInner> object + */ + public Observable> listIPFilterRulesAsync(final String resourceGroupName, final String namespaceName) { + return listIPFilterRulesWithServiceResponseAsync(resourceGroupName, namespaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of IP Filter rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IpFilterRuleInner> object + */ + public Observable>> listIPFilterRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { + return listIPFilterRulesSinglePageAsync(resourceGroupName, namespaceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listIPFilterRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of IP Filter rules for a Namespace. + * + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IpFilterRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listIPFilterRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + return service.listIPFilterRules(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listIPFilterRulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listIPFilterRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates an IpFilterRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. + * @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 the IpFilterRuleInner object if successful. + */ + public IpFilterRuleInner createOrUpdateIpFilterRule(String resourceGroupName, String namespaceName, String ipFilterRuleName, IpFilterRuleInner parameters) { + return createOrUpdateIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an IpFilterRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, IpFilterRuleInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName, parameters), serviceCallback); + } + + /** + * Creates or updates an IpFilterRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpFilterRuleInner object + */ + public Observable createOrUpdateIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, IpFilterRuleInner parameters) { + return createOrUpdateIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName, parameters).map(new Func1, IpFilterRuleInner>() { + @Override + public IpFilterRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an IpFilterRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpFilterRuleInner object + */ + public Observable> createOrUpdateIpFilterRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, IpFilterRuleInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (ipFilterRuleName == null) { + throw new IllegalArgumentException("Parameter ipFilterRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-01-01-preview"; + return service.createOrUpdateIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateIpFilterRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateIpFilterRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an IpFilterRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @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 + */ + public void deleteIpFilterRule(String resourceGroupName, String namespaceName, String ipFilterRuleName) { + deleteIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName).toBlocking().single().body(); + } + + /** + * Deletes an IpFilterRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName), serviceCallback); + } + + /** + * Deletes an IpFilterRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { + return deleteIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an IpFilterRule for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteIpFilterRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (ipFilterRuleName == null) { + throw new IllegalArgumentException("Parameter ipFilterRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + return service.deleteIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteIpFilterRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteIpFilterRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets an IpFilterRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @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 the IpFilterRuleInner object if successful. + */ + public IpFilterRuleInner getIpFilterRule(String resourceGroupName, String namespaceName, String ipFilterRuleName) { + return getIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName).toBlocking().single().body(); + } + + /** + * Gets an IpFilterRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName), serviceCallback); + } + + /** + * Gets an IpFilterRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpFilterRuleInner object + */ + public Observable getIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { + return getIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName).map(new Func1, IpFilterRuleInner>() { + @Override + public IpFilterRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an IpFilterRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IpFilterRuleInner object + */ + public Observable> getIpFilterRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (ipFilterRuleName == null) { + throw new IllegalArgumentException("Parameter ipFilterRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + return service.getIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getIpFilterRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getIpFilterRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); } /** @@ -238,15 +676,13 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -255,9 +691,9 @@ public Observable>> call(Response> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } @@ -265,7 +701,7 @@ private ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { /** * Lists the available Namespaces within a resource group. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -304,7 +740,7 @@ public Observable>> call(String nextPageL /** * Lists the available Namespaces within a resource group. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<EHNamespaceInner> object */ @@ -321,7 +757,7 @@ public Page call(ServiceResponse> respo /** * Lists the available Namespaces within a resource group. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<EHNamespaceInner> object */ @@ -342,7 +778,7 @@ public Observable>> call(ServiceResponse< /** * Lists the available Namespaces within a resource group. * - ServiceResponse> * @param resourceGroupName Name of the resource group within the Azure subscription. + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<EHNamespaceInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -353,15 +789,13 @@ public Observable>> listByResourceGroupSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupDelegate(response); + ServiceResponse> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -370,9 +804,9 @@ public Observable>> call(Response> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } @@ -380,7 +814,7 @@ private ServiceResponse> listByResourceGroupDelegate( /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param parameters Parameters for creating a namespace resource. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -395,7 +829,7 @@ public EHNamespaceInner createOrUpdate(String resourceGroupName, String namespac /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param parameters Parameters for creating a namespace resource. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -409,7 +843,7 @@ public ServiceFuture createOrUpdateAsync(String resourceGroupN /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param parameters Parameters for creating a namespace resource. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -427,7 +861,7 @@ public EHNamespaceInner call(ServiceResponse response) { /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param parameters Parameters for creating a namespace resource. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -446,54 +880,294 @@ public Observable> createOrUpdateWithServiceRe if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2018-01-01-preview"; + Observable> observable = service.createOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param parameters Parameters for creating a namespace resource. + * @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 the EHNamespaceInner object if successful. + */ + public EHNamespaceInner beginCreateOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param parameters Parameters for creating a namespace resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param parameters Parameters for creating a namespace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EHNamespaceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, EHNamespaceInner>() { + @Override + public EHNamespaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param parameters Parameters for creating a namespace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EHNamespaceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-01-01-preview"; + return service.beginCreateOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @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 + */ + public void delete(String resourceGroupName, String namespaceName) { + deleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().last().body(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String namespaceName) { + return deleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + Observable> observable = service.delete(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @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 + */ + public void beginDelete(String resourceGroupName, String namespaceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String namespaceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String namespaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + return service.beginDelete(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the description of the specified namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters for creating a namespace resource. * @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 the EHNamespaceInner object if successful. */ - public EHNamespaceInner beginCreateOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); + public EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * Gets the description of the specified namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters for creating a namespace resource. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * Gets the description of the specified namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters for creating a namespace resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EHNamespaceInner object */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, EHNamespaceInner>() { + public Observable getByResourceGroupAsync(String resourceGroupName, String namespaceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, EHNamespaceInner>() { @Override public EHNamespaceInner call(ServiceResponse response) { return response.body(); @@ -502,15 +1176,14 @@ public EHNamespaceInner call(ServiceResponse response) { } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * Gets the description of the specified namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters for creating a namespace resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EHNamespaceInner object */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String namespaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -520,19 +1193,13 @@ public Observable> beginCreateOrUpdateWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-01-01-preview"; + return service.getByResourceGroup(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + ServiceResponse clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -541,67 +1208,71 @@ public Observable> call(Response }); } - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param parameters Parameters for updating a namespace resource. * @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 the EHNamespaceInner object if successful. */ - public void delete(String resourceGroupName, String namespaceName) { - deleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().last().body(); + public EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); } /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param parameters Parameters for updating a namespace resource. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); + public ServiceFuture updateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); } /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param parameters Parameters for updating a namespace resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the EHNamespaceInner object */ - public Observable deleteAsync(String resourceGroupName, String namespaceName) { - return deleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, Void>() { + public Observable updateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, EHNamespaceInner>() { @Override - public Void call(ServiceResponse response) { + public EHNamespaceInner call(ServiceResponse response) { return response.body(); } }); } /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param parameters Parameters for updating a namespace resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the EHNamespaceInner object */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -611,65 +1282,124 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - Observable> observable = service.delete(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + Validator.validate(parameters); + final String apiVersion = "2018-01-01-preview"; + return service.update(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); } /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @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 the PagedList<VirtualNetworkRuleInner> object if successful. */ - public void beginDelete(String resourceGroupName, String namespaceName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); + public PagedList listVirtualNetworkRules(final String resourceGroupName, final String namespaceName) { + ServiceResponse> response = listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); + public ServiceFuture> listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the PagedList<VirtualNetworkRuleInner> object */ - public Observable beginDeleteAsync(String resourceGroupName, String namespaceName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName) { + return listVirtualNetworkRulesWithServiceResponseAsync(resourceGroupName, namespaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the PagedList<VirtualNetworkRuleInner> object */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String namespaceName) { + public Observable>> listVirtualNetworkRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { + return listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listVirtualNetworkRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of VirtualNetwork rules for a Namespace. + * + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualNetworkRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -679,16 +1409,14 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2018-01-01-preview"; + return service.listVirtualNetworkRules(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listVirtualNetworkRulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -696,86 +1424,92 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) + private ServiceResponse> listVirtualNetworkRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Gets the description of the specified namespace. + * Creates or updates an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. * @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 the EHNamespaceInner object if successful. + * @return the VirtualNetworkRuleInner object if successful. */ - public EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); + public VirtualNetworkRuleInner createOrUpdateVirtualNetworkRule(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + return createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).toBlocking().single().body(); } /** - * Gets the description of the specified namespace. + * Creates or updates an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); + public ServiceFuture createOrUpdateVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName), serviceCallback); } /** - * Gets the description of the specified namespace. + * Creates or updates an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EHNamespaceInner object + * @return the observable to the VirtualNetworkRuleInner object */ - public Observable getByResourceGroupAsync(String resourceGroupName, String namespaceName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, EHNamespaceInner>() { + public Observable createOrUpdateVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + return createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).map(new Func1, VirtualNetworkRuleInner>() { @Override - public EHNamespaceInner call(ServiceResponse response) { + public VirtualNetworkRuleInner call(ServiceResponse response) { return response.body(); } }); } /** - * Gets the description of the specified namespace. + * Creates or updates an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EHNamespaceInner object + * @return the observable to the VirtualNetworkRuleInner object */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String namespaceName) { + public Observable> createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2018-01-01-preview"; + final String virtualNetworkSubnetId = null; + VirtualNetworkRuleInner parameters = new VirtualNetworkRuleInner(); + parameters.withVirtualNetworkSubnetId(null); + return service.createOrUpdateVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); + ServiceResponse clientResponse = createOrUpdateVirtualNetworkRuleDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -784,93 +1518,88 @@ public Observable> call(Response }); } - private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * Creates or updates an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters for updating a namespace resource. + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param virtualNetworkSubnetId ARM ID of Virtual Network Subnet * @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 the EHNamespaceInner object if successful. + * @return the VirtualNetworkRuleInner object if successful. */ - public EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); + public VirtualNetworkRuleInner createOrUpdateVirtualNetworkRule(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, String virtualNetworkSubnetId) { + return createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName, virtualNetworkSubnetId).toBlocking().single().body(); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * Creates or updates an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters for updating a namespace resource. + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param virtualNetworkSubnetId ARM ID of Virtual Network Subnet * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); + public ServiceFuture createOrUpdateVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, String virtualNetworkSubnetId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName, virtualNetworkSubnetId), serviceCallback); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * Creates or updates an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters for updating a namespace resource. + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param virtualNetworkSubnetId ARM ID of Virtual Network Subnet * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EHNamespaceInner object + * @return the observable to the VirtualNetworkRuleInner object */ - public Observable updateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, EHNamespaceInner>() { + public Observable createOrUpdateVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, String virtualNetworkSubnetId) { + return createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName, virtualNetworkSubnetId).map(new Func1, VirtualNetworkRuleInner>() { @Override - public EHNamespaceInner call(ServiceResponse response) { + public VirtualNetworkRuleInner call(ServiceResponse response) { return response.body(); } }); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + * Creates or updates an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters for updating a namespace resource. + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param virtualNetworkSubnetId ARM ID of Virtual Network Subnet * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EHNamespaceInner object + * @return the observable to the VirtualNetworkRuleInner object */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + public Observable> createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, String virtualNetworkSubnetId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.update(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2018-01-01-preview"; + VirtualNetworkRuleInner parameters = new VirtualNetworkRuleInner(); + parameters.withVirtualNetworkSubnetId(virtualNetworkSubnetId); + return service.createOrUpdateVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateDelegate(response); + ServiceResponse clientResponse = createOrUpdateVirtualNetworkRuleDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -879,124 +1608,89 @@ public Observable> call(Response }); } - private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse createOrUpdateVirtualNetworkRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Gets a list of IP Filter rules for a Namespace. + * Deletes an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. * @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 the PagedList<IpFilterRuleInner> object if successful. */ - public PagedList listIPFilterRules(final String resourceGroupName, final String namespaceName) { - ServiceResponse> response = listIPFilterRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listIPFilterRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public void deleteVirtualNetworkRule(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + deleteVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).toBlocking().single().body(); } /** - * Gets a list of IP Filter rules for a Namespace. + * Deletes an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listIPFilterRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listIPFilterRulesSinglePageAsync(resourceGroupName, namespaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listIPFilterRulesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture deleteVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName), serviceCallback); } /** - * Gets a list of IP Filter rules for a Namespace. + * Deletes an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IpFilterRuleInner> object + * @return the {@link ServiceResponse} object if successful. */ - public Observable> listIPFilterRulesAsync(final String resourceGroupName, final String namespaceName) { - return listIPFilterRulesWithServiceResponseAsync(resourceGroupName, namespaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public Observable deleteVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + return deleteVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); } /** - * Gets a list of IP Filter rules for a Namespace. + * Deletes an VirtualNetworkRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IpFilterRuleInner> object - */ - public Observable>> listIPFilterRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { - return listIPFilterRulesSinglePageAsync(resourceGroupName, namespaceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listIPFilterRulesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets a list of IP Filter rules for a Namespace. - * - ServiceResponse> * @param resourceGroupName Name of the resource group within the Azure subscription. - ServiceResponse> * @param namespaceName The Namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IpFilterRuleInner> object wrapped in {@link ServiceResponse} if successful. + * @return the {@link ServiceResponse} object if successful. */ - public Observable>> listIPFilterRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { + public Observable> deleteVirtualNetworkRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listIPFilterRules(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2018-01-01-preview"; + return service.deleteVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = listIPFilterRulesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = deleteVirtualNetworkRuleDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -1004,99 +1698,90 @@ public Observable>> call(Response> listIPFilterRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse deleteVirtualNetworkRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Creates or updates an IpFilterRule for a Namespace. + * Gets an VirtualNetworkRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. - * @param parameters The Namespace IpFilterRule. + * @param virtualNetworkRuleName The Virtual Network Rule name. * @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 the IpFilterRuleInner object if successful. + * @return the VirtualNetworkRuleInner object if successful. */ - public IpFilterRuleInner createOrUpdateIpFilterRule(String resourceGroupName, String namespaceName, String ipFilterRuleName, IpFilterRuleInner parameters) { - return createOrUpdateIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName, parameters).toBlocking().single().body(); + public VirtualNetworkRuleInner getVirtualNetworkRule(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + return getVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).toBlocking().single().body(); } /** - * Creates or updates an IpFilterRule for a Namespace. + * Gets an VirtualNetworkRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. - * @param parameters The Namespace IpFilterRule. + * @param virtualNetworkRuleName The Virtual Network Rule name. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createOrUpdateIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, IpFilterRuleInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName, parameters), serviceCallback); + public ServiceFuture getVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName), serviceCallback); } /** - * Creates or updates an IpFilterRule for a Namespace. + * Gets an VirtualNetworkRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. - * @param parameters The Namespace IpFilterRule. + * @param virtualNetworkRuleName The Virtual Network Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IpFilterRuleInner object + * @return the observable to the VirtualNetworkRuleInner object */ - public Observable createOrUpdateIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, IpFilterRuleInner parameters) { - return createOrUpdateIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName, parameters).map(new Func1, IpFilterRuleInner>() { + public Observable getVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + return getVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).map(new Func1, VirtualNetworkRuleInner>() { @Override - public IpFilterRuleInner call(ServiceResponse response) { + public VirtualNetworkRuleInner call(ServiceResponse response) { return response.body(); } }); } /** - * Creates or updates an IpFilterRule for a Namespace. + * Gets an VirtualNetworkRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. - * @param parameters The Namespace IpFilterRule. + * @param virtualNetworkRuleName The Virtual Network Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IpFilterRuleInner object + * @return the observable to the VirtualNetworkRuleInner object */ - public Observable> createOrUpdateIpFilterRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, IpFilterRuleInner parameters) { + public Observable> getVirtualNetworkRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } - if (ipFilterRuleName == null) { - throw new IllegalArgumentException("Parameter ipFilterRuleName is required and cannot be null."); + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdateIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2018-01-01-preview"; + return service.getVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateIpFilterRuleDelegate(response); + ServiceResponse clientResponse = getVirtualNetworkRuleDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1105,90 +1790,90 @@ public Observable> call(Response createOrUpdateIpFilterRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getVirtualNetworkRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Deletes an IpFilterRule for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. * @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 the NetworkRuleSetInner object if successful. */ - public void deleteIpFilterRule(String resourceGroupName, String namespaceName, String ipFilterRuleName) { - deleteIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName).toBlocking().single().body(); + public NetworkRuleSetInner createOrUpdateNetworkRuleSet(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { + return createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); } /** - * Deletes an IpFilterRule for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName), serviceCallback); + public ServiceFuture createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); } /** - * Deletes an IpFilterRule for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the NetworkRuleSetInner object */ - public Observable deleteIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { - return deleteIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName).map(new Func1, Void>() { + public Observable createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { + return createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, NetworkRuleSetInner>() { @Override - public Void call(ServiceResponse response) { + public NetworkRuleSetInner call(ServiceResponse response) { return response.body(); } }); } /** - * Deletes an IpFilterRule for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the NetworkRuleSetInner object */ - public Observable> deleteIpFilterRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { + public Observable> createOrUpdateNetworkRuleSetWithServiceResponseAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } - if (ipFilterRuleName == null) { - throw new IllegalArgumentException("Parameter ipFilterRuleName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - return service.deleteIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(parameters); + final String apiVersion = "2018-01-01-preview"; + return service.createOrUpdateNetworkRuleSet(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteIpFilterRuleDelegate(response); + ServiceResponse clientResponse = createOrUpdateNetworkRuleSetDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1197,92 +1882,82 @@ public Observable> call(Response response) { }); } - private ServiceResponse deleteIpFilterRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) + private ServiceResponse createOrUpdateNetworkRuleSetDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Gets an IpFilterRule for a Namespace by rule name. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. * @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 the IpFilterRuleInner object if successful. + * @return the NetworkRuleSetInner object if successful. */ - public IpFilterRuleInner getIpFilterRule(String resourceGroupName, String namespaceName, String ipFilterRuleName) { - return getIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName).toBlocking().single().body(); + public NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName) { + return getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); } /** - * Gets an IpFilterRule for a Namespace by rule name. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName), serviceCallback); + public ServiceFuture getNetworkRuleSetAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); } /** - * Gets an IpFilterRule for a Namespace by rule name. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IpFilterRuleInner object + * @return the observable to the NetworkRuleSetInner object */ - public Observable getIpFilterRuleAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { - return getIpFilterRuleWithServiceResponseAsync(resourceGroupName, namespaceName, ipFilterRuleName).map(new Func1, IpFilterRuleInner>() { + public Observable getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) { + return getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, NetworkRuleSetInner>() { @Override - public IpFilterRuleInner call(ServiceResponse response) { + public NetworkRuleSetInner call(ServiceResponse response) { return response.body(); } }); } /** - * Gets an IpFilterRule for a Namespace by rule name. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param ipFilterRuleName The IP Filter Rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the IpFilterRuleInner object + * @return the observable to the NetworkRuleSetInner object */ - public Observable> getIpFilterRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String ipFilterRuleName) { + public Observable> getNetworkRuleSetWithServiceResponseAsync(String resourceGroupName, String namespaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } - if (ipFilterRuleName == null) { - throw new IllegalArgumentException("Parameter ipFilterRuleName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2018-01-01-preview"; + return service.getNetworkRuleSet(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getIpFilterRuleDelegate(response); + ServiceResponse clientResponse = getNetworkRuleSetDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1291,103 +1966,103 @@ public Observable> call(Response getIpFilterRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getNetworkRuleSetDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @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 the PagedList<VirtualNetworkRuleInner> object if successful. + * @return the PagedList<AuthorizationRuleInner> object if successful. */ - public PagedList listVirtualNetworkRules(final String resourceGroupName, final String namespaceName) { - ServiceResponse> response = listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName) { + ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName), - new Func1>>>() { + listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkRuleInner> object + * @return the observable to the PagedList<AuthorizationRuleInner> object */ - public Observable> listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName) { - return listVirtualNetworkRulesWithServiceResponseAsync(resourceGroupName, namespaceName) - .map(new Func1>, Page>() { + public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName) { + return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkRuleInner> object + * @return the observable to the PagedList<AuthorizationRuleInner> object */ - public Observable>> listVirtualNetworkRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { - return listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { + return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listVirtualNetworkRulesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * - ServiceResponse> * @param resourceGroupName Name of the resource group within the Azure subscription. - ServiceResponse> * @param namespaceName The Namespace name + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<VirtualNetworkRuleInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listVirtualNetworkRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { + public Observable>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1397,16 +2072,14 @@ public Observable>> listVirtualNet if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listVirtualNetworkRules(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2017-04-01"; + return service.listAuthorizationRules(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listVirtualNetworkRulesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listAuthorizationRulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1414,94 +2087,99 @@ public Observable>> call(Response< }); } - private ServiceResponse> listVirtualNetworkRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listAuthorizationRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Creates or updates an VirtualNetworkRule for a Namespace. + * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. * @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 the VirtualNetworkRuleInner object if successful. + * @return the AuthorizationRuleInner object if successful. */ - public VirtualNetworkRuleInner createOrUpdateVirtualNetworkRule(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { - return createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).toBlocking().single().body(); + public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { + return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights).toBlocking().single().body(); } /** - * Creates or updates an VirtualNetworkRule for a Namespace. + * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createOrUpdateVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName), serviceCallback); + public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights), serviceCallback); } /** - * Creates or updates an VirtualNetworkRule for a Namespace. + * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkRuleInner object + * @return the observable to the AuthorizationRuleInner object */ - public Observable createOrUpdateVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { - return createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).map(new Func1, VirtualNetworkRuleInner>() { + public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { + return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights).map(new Func1, AuthorizationRuleInner>() { @Override - public VirtualNetworkRuleInner call(ServiceResponse response) { + public AuthorizationRuleInner call(ServiceResponse response) { return response.body(); } }); } /** - * Creates or updates an VirtualNetworkRule for a Namespace. + * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. + * @param rights The rights associated with the rule. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkRuleInner object + * @return the observable to the AuthorizationRuleInner object */ - public Observable> createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } - if (virtualNetworkRuleName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (rights == null) { + throw new IllegalArgumentException("Parameter rights is required and cannot be null."); } - final String virtualNetworkSubnetId = null; - VirtualNetworkRuleInner parameters = new VirtualNetworkRuleInner(); - parameters.withVirtualNetworkSubnetId(null); - return service.createOrUpdateVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(rights); + final String apiVersion = "2017-04-01"; + AuthorizationRuleInner parameters = new AuthorizationRuleInner(); + parameters.withRights(rights); + return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateVirtualNetworkRuleDelegate(response); + ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1510,90 +2188,88 @@ public Observable> call(Response createOrUpdateAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + /** - * Creates or updates an VirtualNetworkRule for a Namespace. + * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. - * @param virtualNetworkSubnetId ARM ID of Virtual Network Subnet + * @param authorizationRuleName The authorization rule name. * @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 the VirtualNetworkRuleInner object if successful. */ - public VirtualNetworkRuleInner createOrUpdateVirtualNetworkRule(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, String virtualNetworkSubnetId) { - return createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName, virtualNetworkSubnetId).toBlocking().single().body(); + public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { + deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); } /** - * Creates or updates an VirtualNetworkRule for a Namespace. + * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. - * @param virtualNetworkSubnetId ARM ID of Virtual Network Subnet + * @param authorizationRuleName The authorization rule name. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createOrUpdateVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, String virtualNetworkSubnetId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName, virtualNetworkSubnetId), serviceCallback); + public ServiceFuture deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); } /** - * Creates or updates an VirtualNetworkRule for a Namespace. + * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. - * @param virtualNetworkSubnetId ARM ID of Virtual Network Subnet + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkRuleInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable createOrUpdateVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, String virtualNetworkSubnetId) { - return createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName, virtualNetworkSubnetId).map(new Func1, VirtualNetworkRuleInner>() { + public Observable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, Void>() { @Override - public VirtualNetworkRuleInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Creates or updates an VirtualNetworkRule for a Namespace. + * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. - * @param virtualNetworkSubnetId ARM ID of Virtual Network Subnet + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkRuleInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable> createOrUpdateVirtualNetworkRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, String virtualNetworkSubnetId) { + public Observable> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } - if (virtualNetworkRuleName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - VirtualNetworkRuleInner parameters = new VirtualNetworkRuleInner(); - parameters.withVirtualNetworkSubnetId(virtualNetworkSubnetId); - return service.createOrUpdateVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-04-01"; + return service.deleteAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateVirtualNetworkRuleDelegate(response); + ServiceResponse clientResponse = deleteAuthorizationRuleDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1602,90 +2278,181 @@ public Observable> call(Response createOrUpdateVirtualNetworkRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Deletes an VirtualNetworkRule for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. * @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 the AuthorizationRuleInner object if successful. */ - public void deleteVirtualNetworkRule(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { - deleteVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).toBlocking().single().body(); + public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) { + return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); } /** - * Deletes an VirtualNetworkRule for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName), serviceCallback); + public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); } /** - * Deletes an VirtualNetworkRule for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the AuthorizationRuleInner object */ - public Observable deleteVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { - return deleteVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).map(new Func1, Void>() { + public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, AuthorizationRuleInner>() { @Override - public Void call(ServiceResponse response) { + public AuthorizationRuleInner call(ServiceResponse response) { return response.body(); } }); } /** - * Deletes an VirtualNetworkRule for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the AuthorizationRuleInner object */ - public Observable> deleteVirtualNetworkRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } - if (virtualNetworkRuleName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + final String apiVersion = "2017-04-01"; + return service.getAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAuthorizationRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param authorizationRuleName The authorization rule name. + * @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 the AccessKeysInner object if successful. + */ + public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) { + return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param authorizationRuleName The authorization rule name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AccessKeysInner object + */ + public Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, AccessKeysInner>() { + @Override + public AccessKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AccessKeysInner object + */ + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); } - return service.deleteVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.listKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteVirtualNetworkRuleDelegate(response); + ServiceResponse clientResponse = listKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1694,92 +2461,97 @@ public Observable> call(Response response) { }); } - private ServiceResponse deleteVirtualNetworkRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) + private ServiceResponse listKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Gets an VirtualNetworkRule for a Namespace by rule name. + * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters required to regenerate the connection string. * @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 the VirtualNetworkRuleInner object if successful. + * @return the AccessKeysInner object if successful. */ - public VirtualNetworkRuleInner getVirtualNetworkRule(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { - return getVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).toBlocking().single().body(); + public AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { + return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).toBlocking().single().body(); } /** - * Gets an VirtualNetworkRule for a Namespace by rule name. + * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters required to regenerate the connection string. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName), serviceCallback); + public ServiceFuture regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters), serviceCallback); } /** - * Gets an VirtualNetworkRule for a Namespace by rule name. + * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters required to regenerate the connection string. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkRuleInner object + * @return the observable to the AccessKeysInner object */ - public Observable getVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { - return getVirtualNetworkRuleWithServiceResponseAsync(resourceGroupName, namespaceName, virtualNetworkRuleName).map(new Func1, VirtualNetworkRuleInner>() { + public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { + return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).map(new Func1, AccessKeysInner>() { @Override - public VirtualNetworkRuleInner call(ServiceResponse response) { + public AccessKeysInner call(ServiceResponse response) { return response.body(); } }); } /** - * Gets an VirtualNetworkRule for a Namespace by rule name. + * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters required to regenerate the connection string. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkRuleInner object + * @return the observable to the AccessKeysInner object */ - public Observable> getVirtualNetworkRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName) { + public Observable> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } - if (virtualNetworkRuleName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + if (authorizationRuleName == null) { + throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - return service.getVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(parameters); + final String apiVersion = "2017-04-01"; + return service.regenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getVirtualNetworkRuleDelegate(response); + ServiceResponse clientResponse = regenerateKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1788,92 +2560,77 @@ public Observable> call(Response getVirtualNetworkRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse regenerateKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Create or update NetworkRuleSet for a Namespace. + * Check the give Namespace name availability. * - * @param resourceGroupName Name of the resource group within the Azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. + * @param name Name to check the namespace name availability * @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 the NetworkRuleSetInner object if successful. + * @return the CheckNameAvailabilityResultInner object if successful. */ - public NetworkRuleSetInner createOrUpdateNetworkRuleSet(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { - return createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); + public CheckNameAvailabilityResultInner checkNameAvailability(String name) { + return checkNameAvailabilityWithServiceResponseAsync(name).toBlocking().single().body(); } /** - * Create or update NetworkRuleSet for a Namespace. + * Check the give Namespace name availability. * - * @param resourceGroupName Name of the resource group within the Azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. + * @param name Name to check the namespace name availability * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); + public ServiceFuture checkNameAvailabilityAsync(String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback); } /** - * Create or update NetworkRuleSet for a Namespace. + * Check the give Namespace name availability. * - * @param resourceGroupName Name of the resource group within the Azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. + * @param name Name to check the namespace name availability * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkRuleSetInner object + * @return the observable to the CheckNameAvailabilityResultInner object */ - public Observable createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { - return createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, NetworkRuleSetInner>() { + public Observable checkNameAvailabilityAsync(String name) { + return checkNameAvailabilityWithServiceResponseAsync(name).map(new Func1, CheckNameAvailabilityResultInner>() { @Override - public NetworkRuleSetInner call(ServiceResponse response) { + public CheckNameAvailabilityResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * Create or update NetworkRuleSet for a Namespace. + * Check the give Namespace name availability. * - * @param resourceGroupName Name of the resource group within the Azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. + * @param name Name to check the namespace name availability * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkRuleSetInner object + * @return the observable to the CheckNameAvailabilityResultInner object */ - public Observable> createOrUpdateNetworkRuleSetWithServiceResponseAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } + public Observable> checkNameAvailabilityWithServiceResponseAsync(String name) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - Validator.validate(parameters); - return service.createOrUpdateNetworkRuleSet(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-04-01"; + CheckNameAvailabilityParameter parameters = new CheckNameAvailabilityParameter(); + parameters.withName(name); + return service.checkNameAvailability(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateNetworkRuleSetDelegate(response); + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1882,85 +2639,110 @@ public Observable> call(Response createOrUpdateNetworkRuleSetDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Gets NetworkRuleSet for a Namespace. + * Gets a list of IP Filter rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. - * @param namespaceName The Namespace name + * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 the NetworkRuleSetInner object if successful. + * @return the PagedList<IpFilterRuleInner> object if successful. */ - public NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName) { - return getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); + public PagedList listIPFilterRulesNext(final String nextPageLink) { + ServiceResponse> response = listIPFilterRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listIPFilterRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Gets NetworkRuleSet for a Namespace. + * Gets a list of IP Filter rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. - * @param namespaceName The Namespace name + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getNetworkRuleSetAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); + public ServiceFuture> listIPFilterRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listIPFilterRulesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listIPFilterRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Gets NetworkRuleSet for a Namespace. + * Gets a list of IP Filter rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. - * @param namespaceName The Namespace name + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkRuleSetInner object + * @return the observable to the PagedList<IpFilterRuleInner> object */ - public Observable getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) { - return getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, NetworkRuleSetInner>() { - @Override - public NetworkRuleSetInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listIPFilterRulesNextAsync(final String nextPageLink) { + return listIPFilterRulesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Gets NetworkRuleSet for a Namespace. + * Gets a list of IP Filter rules for a Namespace. * - * @param resourceGroupName Name of the resource group within the Azure subscription. - * @param namespaceName The Namespace name + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkRuleSetInner object + * @return the observable to the PagedList<IpFilterRuleInner> object */ - public Observable> getNetworkRuleSetWithServiceResponseAsync(String resourceGroupName, String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + public Observable>> listIPFilterRulesNextWithServiceResponseAsync(final String nextPageLink) { + return listIPFilterRulesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listIPFilterRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of IP Filter rules for a Namespace. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IpFilterRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listIPFilterRulesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getNetworkRuleSet(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + String nextUrl = String.format("%s", nextPageLink); + return service.listIPFilterRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getNetworkRuleSetDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listIPFilterRulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1968,9 +2750,9 @@ public Observable> call(Response getNetworkRuleSetDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listIPFilterRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } @@ -2056,7 +2838,7 @@ public Observable>> call(ServiceResponse< /** * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<EHNamespaceInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -2070,7 +2852,7 @@ public Observable>> listNextSinglePageAsy @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -2079,9 +2861,9 @@ public Observable>> call(Response> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } @@ -2167,7 +2949,7 @@ public Observable>> call(ServiceResponse< /** * Lists the available Namespaces within a resource group. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<EHNamespaceInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -2181,7 +2963,7 @@ public Observable>> listByResourceGroupNe @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); + ServiceResponse> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -2190,34 +2972,34 @@ public Observable>> call(Response> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Gets a list of IP Filter rules for a Namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 the PagedList<IpFilterRuleInner> object if successful. + * @return the PagedList<VirtualNetworkRuleInner> object if successful. */ - public PagedList listIPFilterRulesNext(final String nextPageLink) { - ServiceResponse> response = listIPFilterRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listVirtualNetworkRulesNext(final String nextPageLink) { + ServiceResponse> response = listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listIPFilterRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets a list of IP Filter rules for a Namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -2225,75 +3007,75 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listIPFilterRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listVirtualNetworkRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listIPFilterRulesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listVirtualNetworkRulesNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listIPFilterRulesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets a list of IP Filter rules for a Namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IpFilterRuleInner> object + * @return the observable to the PagedList<VirtualNetworkRuleInner> object */ - public Observable> listIPFilterRulesNextAsync(final String nextPageLink) { - return listIPFilterRulesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listVirtualNetworkRulesNextAsync(final String nextPageLink) { + return listVirtualNetworkRulesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets a list of IP Filter rules for a Namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IpFilterRuleInner> object + * @return the observable to the PagedList<VirtualNetworkRuleInner> object */ - public Observable>> listIPFilterRulesNextWithServiceResponseAsync(final String nextPageLink) { - return listIPFilterRulesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listVirtualNetworkRulesNextWithServiceResponseAsync(final String nextPageLink) { + return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listIPFilterRulesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listVirtualNetworkRulesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets a list of IP Filter rules for a Namespace. + * Gets a list of VirtualNetwork rules for a Namespace. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IpFilterRuleInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<VirtualNetworkRuleInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listIPFilterRulesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listVirtualNetworkRulesNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listIPFilterRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listVirtualNetworkRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listIPFilterRulesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listVirtualNetworkRulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2301,34 +3083,34 @@ public Observable>> call(Response> listIPFilterRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listVirtualNetworkRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 the PagedList<VirtualNetworkRuleInner> object if successful. + * @return the PagedList<AuthorizationRuleInner> object if successful. */ - public PagedList listVirtualNetworkRulesNext(final String nextPageLink) { - ServiceResponse> response = listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listAuthorizationRulesNext(final String nextPageLink) { + ServiceResponse> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -2336,75 +3118,75 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listVirtualNetworkRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listVirtualNetworkRulesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listAuthorizationRulesNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkRuleInner> object + * @return the observable to the PagedList<AuthorizationRuleInner> object */ - public Observable> listVirtualNetworkRulesNextAsync(final String nextPageLink) { - return listVirtualNetworkRulesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listAuthorizationRulesNextAsync(final String nextPageLink) { + return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkRuleInner> object + * @return the observable to the PagedList<AuthorizationRuleInner> object */ - public Observable>> listVirtualNetworkRulesNextWithServiceResponseAsync(final String nextPageLink) { - return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) { + return listAuthorizationRulesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listVirtualNetworkRulesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets a list of VirtualNetwork rules for a Namespace. + * Gets a list of authorization rules for a Namespace. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<VirtualNetworkRuleInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listVirtualNetworkRulesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listVirtualNetworkRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listVirtualNetworkRulesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listAuthorizationRulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2412,9 +3194,9 @@ public Observable>> call(Response< }); } - private ServiceResponse> listVirtualNetworkRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listAuthorizationRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NetworkRuleSetImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NetworkRuleSetImpl.java index 9bc3e6b106f85..b35a6af14f568 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NetworkRuleSetImpl.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NetworkRuleSetImpl.java @@ -47,6 +47,11 @@ public String name() { return this.inner().name(); } + @Override + public Boolean trustedServiceAccessEnabled() { + return this.inner().trustedServiceAccessEnabled(); + } + @Override public String type() { return this.inner().type(); diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NetworkRuleSetInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NetworkRuleSetInner.java index d8b32f623974c..369b454dba8ea 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NetworkRuleSetInner.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/NetworkRuleSetInner.java @@ -21,6 +21,12 @@ */ @JsonFlatten public class NetworkRuleSetInner extends ProxyResource { + /** + * Value that indicates whether Trusted Service Access is Enabled or not. + */ + @JsonProperty(value = "properties.trustedServiceAccessEnabled") + private Boolean trustedServiceAccessEnabled; + /** * Default Action for Network Rule Set. Possible values include: 'Allow', * 'Deny'. @@ -40,6 +46,26 @@ public class NetworkRuleSetInner extends ProxyResource { @JsonProperty(value = "properties.ipRules") private List ipRules; + /** + * Get value that indicates whether Trusted Service Access is Enabled or not. + * + * @return the trustedServiceAccessEnabled value + */ + public Boolean trustedServiceAccessEnabled() { + return this.trustedServiceAccessEnabled; + } + + /** + * Set value that indicates whether Trusted Service Access is Enabled or not. + * + * @param trustedServiceAccessEnabled the trustedServiceAccessEnabled value to set + * @return the NetworkRuleSetInner object itself. + */ + public NetworkRuleSetInner withTrustedServiceAccessEnabled(Boolean trustedServiceAccessEnabled) { + this.trustedServiceAccessEnabled = trustedServiceAccessEnabled; + return this; + } + /** * Get default Action for Network Rule Set. Possible values include: 'Allow', 'Deny'. * diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/OperationsInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/OperationsInner.java index 64e9ba017ed8c..8ca4df6373459 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/OperationsInner.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/OperationsInner.java @@ -37,7 +37,7 @@ public class OperationsInner { /** The Retrofit service to perform REST calls. */ private OperationsService service; /** The service client containing this operation class. */ - private EventHub2018PreviewManagementClientImpl client; + private EventHubManagementClientImpl client; /** * Initializes an instance of OperationsInner. @@ -45,7 +45,7 @@ public class OperationsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public OperationsInner(Retrofit retrofit, EventHub2018PreviewManagementClientImpl client) { + public OperationsInner(Retrofit retrofit, EventHubManagementClientImpl client) { this.service = retrofit.create(OperationsService.class); this.client = client; } @@ -145,15 +145,13 @@ public Observable>> call(ServiceResponse>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-04-01"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -162,9 +160,9 @@ public Observable>> call(Response> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } @@ -250,7 +248,7 @@ public Observable>> call(ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -264,7 +262,7 @@ public Observable>> listNextSinglePageAsync @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -273,9 +271,9 @@ public Observable>> call(Response> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PageImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PageImpl.java index 8b557af5c4f85..01d5c323fc38a 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PageImpl.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PageImpl.java @@ -22,7 +22,7 @@ public class PageImpl implements Page { /** * The link to the next page. */ - @JsonProperty("nextLink") + @JsonProperty("") private String nextPageLink; /** diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PageImpl1.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PageImpl1.java index eb32eab4148f8..c9dfd74270bf5 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PageImpl1.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PageImpl1.java @@ -22,7 +22,7 @@ public class PageImpl1 implements Page { /** * The link to the next page. */ - @JsonProperty("") + @JsonProperty("nextLink") private String nextPageLink; /** diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 0000000000000..029278ccdb50c --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpoint; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConnectionState; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EndPointProvisioningState; + +class PrivateEndpointConnectionImpl extends CreatableUpdatableImpl implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { + private final EventHubsManager manager; + private String resourceGroupName; + private String namespaceName; + private String privateEndpointConnectionName; + + PrivateEndpointConnectionImpl(String name, EventHubsManager manager) { + super(name, new PrivateEndpointConnectionInner()); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = name; + // + } + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner inner, EventHubsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces"); + this.privateEndpointConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateEndpointConnections"); + // + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.privateEndpointConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.privateEndpointConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return client.getAsync(this.resourceGroupName, this.namespaceName, this.privateEndpointConnectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PrivateEndpoint privateEndpoint() { + return this.inner().privateEndpoint(); + } + + @Override + public ConnectionState privateLinkServiceConnectionState() { + return this.inner().privateLinkServiceConnectionState(); + } + + @Override + public EndPointProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PrivateEndpointConnectionImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.inner().withPrivateEndpoint(privateEndpoint); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(ConnectionState privateLinkServiceConnectionState) { + this.inner().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withProvisioningState(EndPointProvisioningState provisioningState) { + this.inner().withProvisioningState(provisioningState); + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionInner.java new file mode 100644 index 0000000000000..47eca8960d4e6 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionInner.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpoint; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ConnectionState; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.EndPointProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Properties of the PrivateEndpointConnection. + */ +@JsonFlatten +public class PrivateEndpointConnectionInner extends ProxyResource { + /** + * The Private Endpoint resource for this Connection. + */ + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /** + * Details about the state of the connection. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private ConnectionState privateLinkServiceConnectionState; + + /** + * Provisioning state of the Private Endpoint Connection. Possible values + * include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', + * 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState") + private EndPointProvisioningState provisioningState; + + /** + * Get the Private Endpoint resource for this Connection. + * + * @return the privateEndpoint value + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the Private Endpoint resource for this Connection. + * + * @param privateEndpoint the privateEndpoint value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get details about the state of the connection. + * + * @return the privateLinkServiceConnectionState value + */ + public ConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set details about the state of the connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(ConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get provisioning state of the Private Endpoint Connection. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + * + * @return the provisioningState value + */ + public EndPointProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set provisioning state of the Private Endpoint Connection. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'. + * + * @param provisioningState the provisioningState value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withProvisioningState(EndPointProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionsImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 0000000000000..fd20c08f2e00f --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnections; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnection; + +class PrivateEndpointConnectionsImpl extends WrapperImpl implements PrivateEndpointConnections { + private final EventHubsManager manager; + + PrivateEndpointConnectionsImpl(EventHubsManager manager) { + super(manager.inner().privateEndpointConnections()); + this.manager = manager; + } + + public EventHubsManager manager() { + return this.manager; + } + + @Override + public PrivateEndpointConnectionImpl define(String name) { + return wrapModel(name); + } + + private PrivateEndpointConnectionImpl wrapModel(PrivateEndpointConnectionInner inner) { + return new PrivateEndpointConnectionImpl(inner, manager()); + } + + private PrivateEndpointConnectionImpl wrapModel(String name) { + return new PrivateEndpointConnectionImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String namespaceName) { + PrivateEndpointConnectionsInner client = this.inner(); + return client.listAsync(resourceGroupName, namespaceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PrivateEndpointConnection call(PrivateEndpointConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + PrivateEndpointConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, namespaceName, privateEndpointConnectionName) + .flatMap(new Func1>() { + @Override + public Observable call(PrivateEndpointConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PrivateEndpointConnection)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + PrivateEndpointConnectionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, namespaceName, privateEndpointConnectionName).toCompletable(); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionsInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionsInner.java new file mode 100644 index 0000000000000..3cca4bec8cf51 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateEndpointConnectionsInner.java @@ -0,0 +1,678 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PrivateEndpointConnections. + */ +public class PrivateEndpointConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private PrivateEndpointConnectionsService service; + /** The service client containing this operation class. */ + private EventHubManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateEndpointConnectionsInner(Retrofit retrofit, EventHubManagementClientImpl client) { + this.service = retrofit.create(PrivateEndpointConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateEndpointConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnections list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Body PrivateEndpointConnectionInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateEndpointConnections listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @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 the PagedList<PrivateEndpointConnectionInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String namespaceName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, namespaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointConnectionInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String namespaceName) { + return listWithServiceResponseAsync(resourceGroupName, namespaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointConnectionInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { + return listSinglePageAsync(resourceGroupName, namespaceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. + ServiceResponse> * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateEndpointConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String namespaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + return service.list(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates PrivateEndpointConnections of service namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + * @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 the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates PrivateEndpointConnections of service namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName, parameters), serviceCallback); + } + + /** + * Creates or updates PrivateEndpointConnections of service namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName, parameters).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates PrivateEndpointConnections of service namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-01-01-preview"; + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, namespaceName, privateEndpointConnectionName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @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 + */ + public void delete(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + deleteWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName).toBlocking().last().body(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName), serviceCallback); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + Observable> observable = service.delete(resourceGroupName, namespaceName, this.client.subscriptionId(), privateEndpointConnectionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @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 + */ + public void beginDelete(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName).toBlocking().single().body(); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName), serviceCallback); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + return service.beginDelete(resourceGroupName, namespaceName, this.client.subscriptionId(), privateEndpointConnectionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets a description for the specified Private Endpoint Connection name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @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 the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner get(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName).toBlocking().single().body(); + } + + /** + * Gets a description for the specified Private Endpoint Connection name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName), serviceCallback); + } + + /** + * Gets a description for the specified Private Endpoint Connection name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a description for the specified Private Endpoint Connection name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + return service.get(resourceGroupName, namespaceName, privateEndpointConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<PrivateEndpointConnectionInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointConnectionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateEndpointConnectionInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateEndpointConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourceInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourceInner.java new file mode 100644 index 0000000000000..31f4542a8607b --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourceInner.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information of the private link resource. + */ +@JsonFlatten +public class PrivateLinkResourceInner { + /** + * The private link resource group id. + */ + @JsonProperty(value = "properties.groupId") + private String groupId; + + /** + * The private link resource required member names. + */ + @JsonProperty(value = "properties.requiredMembers") + private List requiredMembers; + + /** + * The private link resource Private link DNS zone name. + */ + @JsonProperty(value = "properties.requiredZoneNames") + private List requiredZoneNames; + + /** + * Fully qualified identifier of the resource. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Name of the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Type of the resource. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the private link resource group id. + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the private link resource group id. + * + * @param groupId the groupId value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the private link resource required member names. + * + * @return the requiredMembers value + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Set the private link resource required member names. + * + * @param requiredMembers the requiredMembers value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { + this.requiredMembers = requiredMembers; + return this; + } + + /** + * Get the private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set the private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + + /** + * Get fully qualified identifier of the resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set fully qualified identifier of the resource. + * + * @param id the id value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get name of the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the resource. + * + * @param name the name value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get type of the resource. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set type of the resource. + * + * @param type the type value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 0000000000000..dcb73d343142e --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateLinkResources; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateLinkResourcesListResult; + +class PrivateLinkResourcesImpl extends WrapperImpl implements PrivateLinkResources { + private final EventHubsManager manager; + + PrivateLinkResourcesImpl(EventHubsManager manager) { + super(manager.inner().privateLinkResources()); + this.manager = manager; + } + + public EventHubsManager manager() { + return this.manager; + } + + @Override + public Observable getAsync(String resourceGroupName, String namespaceName) { + PrivateLinkResourcesInner client = this.inner(); + return client.getAsync(resourceGroupName, namespaceName) + .map(new Func1() { + @Override + public PrivateLinkResourcesListResult call(PrivateLinkResourcesListResultInner inner) { + return new PrivateLinkResourcesListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesInner.java new file mode 100644 index 0000000000000..7facd3d565531 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesInner.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ErrorResponseException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PrivateLinkResources. + */ +public class PrivateLinkResourcesInner { + /** The Retrofit service to perform REST calls. */ + private PrivateLinkResourcesService service; + /** The service client containing this operation class. */ + private EventHubManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateLinkResourcesInner(Retrofit retrofit, EventHubManagementClientImpl client) { + this.service = retrofit.create(PrivateLinkResourcesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateLinkResources to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateLinkResourcesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateLinkResources get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets lists of resources that supports Privatelinks. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @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 the PrivateLinkResourcesListResultInner object if successful. + */ + public PrivateLinkResourcesListResultInner get(String resourceGroupName, String namespaceName) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); + } + + /** + * Gets lists of resources that supports Privatelinks. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); + } + + /** + * Gets lists of resources that supports Privatelinks. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourcesListResultInner object + */ + public Observable getAsync(String resourceGroupName, String namespaceName) { + return getWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, PrivateLinkResourcesListResultInner>() { + @Override + public PrivateLinkResourcesListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets lists of resources that supports Privatelinks. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourcesListResultInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-01-01-preview"; + return service.get(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesListResultImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesListResultImpl.java new file mode 100644 index 0000000000000..729bc3b876794 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesListResultImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.PrivateLinkResourcesListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class PrivateLinkResourcesListResultImpl extends WrapperImpl implements PrivateLinkResourcesListResult { + private final EventHubsManager manager; + PrivateLinkResourcesListResultImpl(PrivateLinkResourcesListResultInner inner, EventHubsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public EventHubsManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesListResultInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesListResultInner.java new file mode 100644 index 0000000000000..5355635d55fa1 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/PrivateLinkResourcesListResultInner.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Result of the List private link resources operation. + */ +public class PrivateLinkResourcesListResultInner { + /** + * A collection of private link resources. + */ + @JsonProperty(value = "value") + private List value; + + /** + * A link for the next page of private link resources. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get a collection of private link resources. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a collection of private link resources. + * + * @param value the value value to set + * @return the PrivateLinkResourcesListResultInner object itself. + */ + public PrivateLinkResourcesListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get a link for the next page of private link resources. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set a link for the next page of private link resources. + * + * @param nextLink the nextLink value to set + * @return the PrivateLinkResourcesListResultInner object itself. + */ + public PrivateLinkResourcesListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/RegionsImpl.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/RegionsImpl.java new file mode 100644 index 0000000000000..508dde7cb3a5b --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/RegionsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Regions; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.MessagingRegions; + +class RegionsImpl extends WrapperImpl implements Regions { + private final EventHubsManager manager; + + RegionsImpl(EventHubsManager manager) { + super(manager.inner().regions()); + this.manager = manager; + } + + public EventHubsManager manager() { + return this.manager; + } + + @Override + public Observable listBySkuAsync(final String sku) { + RegionsInner client = this.inner(); + return client.listBySkuAsync(sku) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public MessagingRegions call(MessagingRegionsInner inner) { + return new MessagingRegionsImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/RegionsInner.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/RegionsInner.java new file mode 100644 index 0000000000000..55e9b9d67b9c3 --- /dev/null +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/RegionsInner.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.eventhubs.v2018_01_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Regions. + */ +public class RegionsInner { + /** The Retrofit service to perform REST calls. */ + private RegionsService service; + /** The service client containing this operation class. */ + private EventHubManagementClientImpl client; + + /** + * Initializes an instance of RegionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RegionsInner(Retrofit retrofit, EventHubManagementClientImpl client) { + this.service = retrofit.create(RegionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Regions to be + * used by Retrofit to perform actually REST calls. + */ + interface RegionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Regions listBySku" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventHub/sku/{sku}/regions") + Observable> listBySku(@Path("subscriptionId") String subscriptionId, @Path("sku") String sku, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhubs.v2018_01_01_preview.Regions listBySkuNext" }) + @GET + Observable> listBySkuNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @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 the PagedList<MessagingRegionsInner> object if successful. + */ + public PagedList listBySku(final String sku) { + ServiceResponse> response = listBySkuSinglePageAsync(sku).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySkuNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBySkuAsync(final String sku, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySkuSinglePageAsync(sku), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySkuNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MessagingRegionsInner> object + */ + public Observable> listBySkuAsync(final String sku) { + return listBySkuWithServiceResponseAsync(sku) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the available Regions for a given sku. + * + * @param sku The sku type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MessagingRegionsInner> object + */ + public Observable>> listBySkuWithServiceResponseAsync(final String sku) { + return listBySkuSinglePageAsync(sku) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBySkuNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the available Regions for a given sku. + * + ServiceResponse> * @param sku The sku type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MessagingRegionsInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySkuSinglePageAsync(final String sku) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (sku == null) { + throw new IllegalArgumentException("Parameter sku is required and cannot be null."); + } + final String apiVersion = "2017-04-01"; + return service.listBySku(this.client.subscriptionId(), sku, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySkuDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySkuDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the available Regions for a given sku. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 the PagedList<MessagingRegionsInner> object if successful. + */ + public PagedList listBySkuNext(final String nextPageLink) { + ServiceResponse> response = listBySkuNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySkuNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the available Regions for a given sku. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBySkuNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySkuNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySkuNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the available Regions for a given sku. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MessagingRegionsInner> object + */ + public Observable> listBySkuNextAsync(final String nextPageLink) { + return listBySkuNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the available Regions for a given sku. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MessagingRegionsInner> object + */ + public Observable>> listBySkuNextWithServiceResponseAsync(final String nextPageLink) { + return listBySkuNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBySkuNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the available Regions for a given sku. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MessagingRegionsInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySkuNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listBySkuNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySkuNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySkuNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/package-info.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/package-info.java index 445f6fb491aa2..4ad6684ee1c32 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/package-info.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/implementation/package-info.java @@ -5,7 +5,6 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the implementation classes for EventHub2018PreviewManagementClient. - * Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. + * This package contains the implementation classes for EventHubManagementClient. */ package com.microsoft.azure.management.eventhubs.v2018_01_01_preview.implementation; diff --git a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/package-info.java b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/package-info.java index 3378feeb457bd..35a29cb5a7270 100644 --- a/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/package-info.java +++ b/sdk/eventhubs/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhubs/v2018_01_01_preview/package-info.java @@ -5,7 +5,6 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the classes for EventHub2018PreviewManagementClient. - * Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. + * This package contains the classes for EventHubManagementClient. */ package com.microsoft.azure.management.eventhubs.v2018_01_01_preview;